From ee5a396a0a9f60e2c2d5deb79929e31f6be8bf8c Mon Sep 17 00:00:00 2001 From: syeopite Date: Mon, 19 Feb 2024 14:24:39 -0800 Subject: [PATCH] VideoJS Dep. Manager: Allow custom registry url --- scripts/fetch-player-dependencies.cr | 3 ++- videojs-dependencies.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/fetch-player-dependencies.cr b/scripts/fetch-player-dependencies.cr index 2385dc36..f1004b34 100755 --- a/scripts/fetch-player-dependencies.cr +++ b/scripts/fetch-player-dependencies.cr @@ -72,6 +72,7 @@ class PlayerDependenciesConfig include YAML::Serializable property version : String + property registry_url : String property dependencies : Hash(YAML::Any, ConfigDependency) def get_dependencies_to_fetch @@ -131,7 +132,7 @@ class Dependency Dir.mkdir(@download_path) end - HTTP::Client.get("https://registry.npmjs.org/#{@dependency}/-/#{@dependency}-#{@config.version}.tgz") do |response| + HTTP::Client.get("#{CONFIG.dependency_config.registry_url}}/#{@dependency}/-/#{@dependency}-#{@config.version}.tgz") do |response| data = response.body_io.gets_to_end File.write(downloaded_package_path, data) self.validate_checksum(data) diff --git a/videojs-dependencies.yml b/videojs-dependencies.yml index 6b29b51a..2d9b67d3 100644 --- a/videojs-dependencies.yml +++ b/videojs-dependencies.yml @@ -1,4 +1,5 @@ version: 1 +registry_url: "https://registry.npmjs.org" dependencies: #Due to a 'video append of' error (see #3011), we're stuck on 7.12.1. video.js: