registry-sync
Advanced tools
Comparing version 1.4.13 to 2.0.0
{ | ||
"name": "registry-sync", | ||
"version": "1.4.13", | ||
"version": "2.0.0", | ||
"description": "synchronize a remote npm registry for private use", | ||
"repository": "https://github.com/heikkipora/registry-sync", | ||
"bin": { | ||
"registry-serve": "bin/serve", | ||
"registry-sync": "bin/sync" | ||
}, | ||
"scripts": { | ||
"test": "./node_modules/.bin/eslint bin/* lib" | ||
"build": "./build-npm", | ||
"eslint": "eslint --fix src/* bin/*", | ||
"test": "mocha --require babel-register --require babel-polyfill --timeout 60000 test/*.js" | ||
}, | ||
@@ -16,9 +17,9 @@ "author": "Heikki Pora", | ||
"dependencies": { | ||
"baconjs": "1.0.1", | ||
"babel-runtime": "6.26.0", | ||
"bluebird": "3.5.1", | ||
"commander": "2.13.0", | ||
"express": "4.16.2", | ||
"lodash": "4.17.4", | ||
"mkdirp": "0.5.1", | ||
"readdirp": "2.1.0", | ||
"request": "2.83.0", | ||
"request-promise": "4.2.2", | ||
"rimraf": "2.6.2", | ||
@@ -30,2 +31,17 @@ "semver": "5.5.0", | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "6.26.0", | ||
"babel-core": "6.26.0", | ||
"babel-eslint": "8.2.1", | ||
"babel-plugin-transform-object-rest-spread": "6.26.0", | ||
"babel-plugin-transform-runtime": "6.23.0", | ||
"babel-polyfill": "6.26.0", | ||
"babel-preset-env": "1.6.1", | ||
"babel-register": "6.26.0", | ||
"chai": "4.1.2", | ||
"eslint": "4.16.0", | ||
"eslint-plugin-mocha": "4.11.0", | ||
"express": "4.16.2", | ||
"mocha": "5.0.0" | ||
}, | ||
"keywords": [ | ||
@@ -39,7 +55,4 @@ "registry", | ||
"engines": { | ||
"node": ">=4.4.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "4.16.0" | ||
"node": ">=5.0.0" | ||
} | ||
} |
# registry-sync | ||
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. | ||
Synchronizes selected NPM packages 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. | ||
@@ -13,3 +13,3 @@ 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 | ||
- Node.js v4.4.0 or newer | ||
- Node.js v5.0.0 or newer | ||
@@ -29,3 +29,3 @@ ## Installation | ||
--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. | ||
--manifest <file> Path to a package-lock.json file to use as catalog for mirrored NPM packages | ||
--localUrl <url> URL to use as root in stored package metadata (i.e. where folder defined as --root will be exposed at) | ||
@@ -35,33 +35,17 @@ --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/ | ||
--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) | ||
--pretty Optionally pretty print JSON metadata files | ||
--registryUrl [url] Optional URL to use as NPM registry when fetching packages. Default value is https://registry.npmjs.org | ||
Example: | ||
registry-sync --root /tmp/my-registry --manifest ./package.json --localUrl http://localhost:8000 --binaryAbi 46,47,48 --binaryArch x64 --binaryPlatform linux,darwin | ||
registry-sync --root ./local-registry --manifest ./package-lock.json --localUrl http://localhost:8000 --binaryAbi 48,57 --binaryArch x64 --binaryPlatform darwin,linux | ||
..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](https://github.com/heikkipora/registry-sync/blob/master/test/package.json) for an example). Re-executing ```registry-sync``` will only download and update files for new package versions. | ||
Re-executing ```registry-sync``` will only download and update files for new package versions. | ||
### Serving the local registry after synchronization: | ||
### Serving the local root folder after synchronization: | ||
registry-serve [options] | ||
Configure a web server to use `index.json` as index file name instead of `index.html`. | ||
Also configure ```HTTP 404``` responses to have an ```application/json``` body of ```{}```. | ||
-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 | ||
## Using a proper web server instead of registry-serve (recommended) | ||
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 "{}". | ||
## Contributing | ||
Pull requests are welcome. Kindly check that your code passes ESLint checks by running ```npm test``` first. | ||
Pull requests are welcome. Kindly check that your code passes ESLint checks by running ```npm run eslint``` first. |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
40412
12
817
1
13
49
6
+ Addedbabel-runtime@6.26.0
+ Addedbluebird@3.5.1
+ Addedrequest-promise@4.2.2
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbluebird@3.5.1(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedrequest-promise@4.2.2(transitive)
+ Addedrequest-promise-core@1.1.1(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedstealthy-require@1.1.1(transitive)
- Removedbaconjs@1.0.1
- Removedexpress@4.16.2
- Removedreaddirp@2.1.0
- Removedaccepts@1.3.8(transitive)
- Removedarray-flatten@1.1.1(transitive)
- Removedbaconjs@1.0.1(transitive)
- Removedbody-parser@1.18.2(transitive)
- Removedbytes@3.0.0(transitive)
- Removedcontent-disposition@0.5.2(transitive)
- Removedcontent-type@1.0.5(transitive)
- Removedcookie@0.3.1(transitive)
- Removedcookie-signature@1.0.6(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddepd@1.1.11.1.2(transitive)
- Removeddestroy@1.0.4(transitive)
- Removedee-first@1.1.1(transitive)
- Removedencodeurl@1.0.2(transitive)
- Removedescape-html@1.0.3(transitive)
- Removedetag@1.8.1(transitive)
- Removedexpress@4.16.2(transitive)
- Removedfinalhandler@1.1.0(transitive)
- Removedforwarded@0.2.0(transitive)
- Removedfresh@0.5.2(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhttp-errors@1.6.21.6.3(transitive)
- Removediconv-lite@0.4.19(transitive)
- Removedinherits@2.0.3(transitive)
- Removedipaddr.js@1.9.1(transitive)
- Removedmedia-typer@0.3.0(transitive)
- Removedmerge-descriptors@1.0.1(transitive)
- Removedmethods@1.1.2(transitive)
- Removedmime@1.4.1(transitive)
- Removedms@2.0.0(transitive)
- Removednegotiator@0.6.3(transitive)
- Removedon-finished@2.3.0(transitive)
- Removedparseurl@1.3.3(transitive)
- Removedpath-to-regexp@0.1.7(transitive)
- Removedproxy-addr@2.0.7(transitive)
- Removedqs@6.5.1(transitive)
- Removedrange-parser@1.2.1(transitive)
- Removedraw-body@2.3.2(transitive)
- Removedreaddirp@2.1.0(transitive)
- Removedsafe-buffer@5.1.1(transitive)
- Removedsend@0.16.1(transitive)
- Removedserve-static@1.13.1(transitive)
- Removedset-immediate-shim@1.0.1(transitive)
- Removedsetprototypeof@1.0.31.1.0(transitive)
- Removedstatuses@1.3.11.5.0(transitive)
- Removedtype-is@1.6.18(transitive)
- Removedunpipe@1.0.0(transitive)
- Removedutils-merge@1.0.1(transitive)
- Removedvary@1.1.2(transitive)