VideoJS Dep. Manager: Allow custom registry url

This commit is contained in:
syeopite 2024-02-19 14:24:39 -08:00
parent 71806ae18b
commit ee5a396a0a
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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: