I have a private npm registry with npmjs.org which contains several private npm packages. We are moving to a private npm registry in-house (verdaccio). Long-story short, with our AWS infrastructure, the verdaccio server could be rebuilt for many reasons and the main issue is that when a new server is spun up with a fresh verdaccio install, It won't have any packages published, obviously. I'm trying to create a script that will run when the server is created that will do a few things: 1. Ask the user what the previous npm registry is along with an authToken for a user (is our case, a service user that only the server uses) 2. Query the previous npm registry to get a list of all private scoped packages with all its versions 3. Copy/Migrate/Publish all previously existing packages and versions to the new verdaccio registry so the first person to run "npm install" will get them.
There are several utility packages out there for helping with type of task, but none deal with private packages. I've tried using the authToken from the .npmrc file that gets generated when a user is logged in, from within a curl command, but nothing gets returned. I've tried using the npm search function. I've tried all of these utility packages. I've tried the npm v2 api, but nothing seems to return private packages.
https://www.npmjs.com/package/registry-migrate
https://www.npmjs.com/package/npm-migrate
https://github.com/finn-no/migrate-npm-registry
https://github.com/npm/npm-registry-client
https://api-docs.npms.io/#api-Package-GetMultiPackageInfo
Anyone have any ideas?? Thanks!