Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
registry-sync
Advanced tools
Synchronizes selected packages and their transitive dependencies from a remote NPM registry (such as https://registry.npmjs.org) to a local folder. The local copy can then be used as a simple private NPM registry without publishing capabilities. Pre-built native binaries (bundled with node-pre-gyp) are also included.
Inspired by https://www.npmjs.com/package/npm-mirror, which unfortunately seems to be in hibernation and not compatible with the current registry.npmjs.org
npm install -g registry-sync
registry-sync [options]
-h, --help output usage information
-V, --version output the version number
--root <path> Path to save NPM package tarballs and metadata to
--manifest <file> Path to a package.json file to use as catalog for mirrored NPM packages. Their transitive (production) dependencies are mirrored as well.
--localUrl <url> URL to use as root in stored package metadata (i.e. where folder defined as --root will be exposed at)
--binaryAbi <list> Comma-separated list of node C++ ABI numbers to download pre-built binaries for. See NODE_MODULE_VERSION column in https://nodejs.org/en/download/releases/
--binaryArch <list> Comma-separated list of CPU architectures to download pre-built binaries for. Valid values: arm, ia32, and x64
--binaryPlatform <list> Comma-separated list of OS platforms to download pre-built binaries for. Valid values: linux, darwin, win32, sunos, freebsd, openbsd, and aix
--registryUrl [url] URL to use as NPM registry when fetching packages (defaults to https://registry.npmjs.org)
--prune Optionally remove orphaned files from the root folder
--pretty Optionally pretty print JSON metadata files
Example:
registry-sync --root /tmp/my-registry --manifest ./package.json --localUrl http://localhost:8000 --binaryAbi 46,47,48 --binaryArch x64 --binaryPlatform linux,darwin
..where the referred package.json
file needs to contain at least a "dependencies" section. An extension to the standard package.json
syntax allows defining multiple versions of a top-level dependency (see test/package.json for an example). Re-executing registry-sync
will only download and update files for new package versions.
registry-serve [options]
-h, --help output usage information
-V, --version output the version number
--root <path> Path to serve NPM packages from
--httpPort [number] Local HTTP port to bind the server to (defaults to 8000)
--httpsPort [number] Local HTTPS port to bind the server to (defaults to 8443)
--sslCert [path] Optional path to SSL certificate file (defaults to listening only to HTTP)
--sslKey [path] Optional path to SSL private key file (defaults to listening only to HTTP)
Example:
registry-serve --root /tmp/my-registry
Configure your web server to use index.json
as index file name instead of index.html
. Also configure 404 responses to have an application/json body of "{}".
Pull requests are welcome. Kindly check that your code passes ESLint checks by running npm test
first.
FAQs
synchronize a remote npm registry for private use
The npm package registry-sync receives a total of 39 weekly downloads. As such, registry-sync popularity was classified as not popular.
We found that registry-sync demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.