npme-import
v1.0.0
Published
imports packages from an artifactory export into an npme instance
Downloads
2
Readme
npme import
This is a CLI tool designed to import export directories from other npm repositories into npmE.
Installation
npm i npme-import -g
Use
The import tool will scan from the top of the path provided and attempt to publish all private tarballs it finds to the specified registry.
If a scope argument is provided, the import tool will force the scope on all packages that it publishes to your npme registry. This is a recommended behavior as it allows you to associate a scope with your npme instance. Our scope-it
tool will rewrite your require statements in source to include the new scope.
If no scope is provided, then the import tool will publish private packages as is so that previously scoped packages will retain the same scope name as before and unscoped packages will not receive a new scope.
npmei import /path/to/export --registry=http://my.npme.registry:8080 --scope=myscope
/path/to/export
- the path containing the exported registries--registry
- the URL to your npme registry--scope
- the scope you have associated with your registry--verbose
- display more detailed debug output about what's going on
About Performance
You should expect this process to take quite some time. For every package it has to:
- check to see if the package is public or private
- pull versions for private packages from your npme instance
- use available data to determine the packages which are missing and eligible for publish
- (optionally) rewrite the package with the new scope
- publish each missing version of eligible packages to your npme instance
The tool is design not to make changes to any of the original export files and will output working files and folder to the /tmp
folder. It will attempt to clean up when everything completes successfully.
In the event of network disruption or failures, the tool can be re-run without worrying that it will cause registry issues or package corruption. It will just ignore any existing package versions that have already been published.
Important Things
- Don't edit or tamper with the exported tarballs from the source system.
- Don't point the import tool at any endpoint other than your primary npme instance (for multi-node clusters)
- Don't remove or change files or folders it creates in
/tmp
during a run