Closed UnrememberMe closed 6 years ago
where machines do not have external network connectivity
Am I missing anything, but without network connectivity you cannot install any public package right?
@rxaviers - @UnrememberMe works with me :)
We install the public packages from our artifactory instance, which mirrors the npm registry.
If we can't publish the cldr-data to npm, we'd want to modify the install script to pull from an internal endpoint instead of github.com.
We could come up with a package.json property that modifies the url source where cldr-data-npm fetches data from. The property usage would be similar to cldr-data-coverage
(https://github.com/rxaviers/cldr-data-npm#locale-coverage) and we somehow change https://github.com/rxaviers/cldr-data-npm/blob/master/urls.json dynamically.
Would that work?
FWIW, cldr-data-npm uses https://github.com/rxaviers/cldr-data-downloader under the hoods to fetch.
This should work. We can host the required .zip files on our own server and redirect the download to that server using the environment variable. As this example shows "CLDR_COVERAGE=full npm install"
This should work. We can host the required .zip files on our own server and redirect the download to that server using the environment variable. As this example shows "CLDR_COVERAGE=full npm install"
Excellent. Yeap, it should work either by setting a an environment variable or by using a npm config.
The implementation would be analogous to https://github.com/rxaviers/cldr-data-npm/blob/master/install.js#L65-L78. I would be happy to merge a PR implementing it. Please, just let me know on any questions.
Is this still relevant or should it be closed?
@dijonkitchen, thanks for asking...
In order to load CLDR from inside the intranet, I suggest to use the existing CLDR_DATA_URLS_JSON where you can pass a custom array of urls.
Similar to https://github.com/karma-runner/karma/issues/1424, cldr-data is pulling directly from github for some of its dependencies. I believe urls.json contains the direct reference. The installation failed for me when I tried to run npm install in a datacenter where machines do not have external network connectivity.