Support external npm package registry #292

Open
opened 2023-04-06 14:21:30 +00:00 by dboreham · 3 comments
Owner

When building npm packages and containers, allow pulling of npm packages from a designated external registry.

Note: this is believed to already work via CERC_NPM_REGISTRY_URL but is largely untested and undocumented.

When building npm packages and containers, allow pulling of npm packages from a designated external registry. Note: this is believed to already work via `CERC_NPM_REGISTRY_URL` but is largely untested and undocumented.
Member

started in #276 ?

started in #276 ?
Author
Owner

I think this works if you define CERC_NPM_REGISTRY_URL and CERC_NPM_AUTH_TOKEN, at least my testing suggests it works.

I think this works if you define `CERC_NPM_REGISTRY_URL` and `CERC_NPM_AUTH_TOKEN`, at least my testing suggests it works.
Author
Owner

Reopened to add doc for how to do this:

$ export CERC_NPM_REGISTRY_URL=https://git.vdb.to/api/packages/cerc-io/npm/
$ export CERC_NPM_AUTH_TOKEN=<a-token-with-package-publish-rights>
$ laconic-so build-npms --include crypto
Building npm package: crypto
Fixing up dependencies in scope @cerc-io
Fixing up dependencies in scope @lirewine
Running build
Build and publish @lirewine/crypto version 1.0.0-beta.2
...
Browserslist: caniuse-lite is outdated. Please run the following command: `yarn upgrade`
Successfully compiled 4 files with Babel.
success Published.
[4/4] Revoking token...
info Not revoking login token, specified via config file.
Done in 4.50s.

And lo:

image

Reopened to add doc for how to do this: ``` $ export CERC_NPM_REGISTRY_URL=https://git.vdb.to/api/packages/cerc-io/npm/ $ export CERC_NPM_AUTH_TOKEN=<a-token-with-package-publish-rights> $ laconic-so build-npms --include crypto Building npm package: crypto Fixing up dependencies in scope @cerc-io Fixing up dependencies in scope @lirewine Running build Build and publish @lirewine/crypto version 1.0.0-beta.2 ... Browserslist: caniuse-lite is outdated. Please run the following command: `yarn upgrade` Successfully compiled 4 files with Babel. success Published. [4/4] Revoking token... info Not revoking login token, specified via config file. Done in 4.50s. ``` And lo: ![image](https://user-images.githubusercontent.com/1649760/231273993-f698e462-3c99-42eb-98da-d44b1531f580.png)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#292
No description provided.