Publish NPM packages
The DTaaS monorepo contains several npm packages.
Default npm registry
The default registry for npm packages is npmjs. Public packages are published to npmjs.
GitHub Actions publish the
library microservice (lib-ms.yml),
the runner
(runner.yml), the logger microservice
(logger-ms.yml) and the @into-cps-association/dt-automation library
(dt-automation.yml). Each workflow calls the reusable
.github/workflows/publish-npm.yml workflow.
A package can also be published by hand:
At least one version of the runner package is published to this registry for each release of the DTaaS platform.
GitHub npm registry
The GitHub Actions of the project also publish the packages to the GitHub npm registry. Installing from this registry requires a personal access token from GitHub.
Private Registry
Setup private npm registry
Publishing to npmjs is public and cannot be undone, so set up a private npm registry for local development. A private registry lets you publish and unpublish packages freely.
Verdaccio is the recommended registry. The following commands create a working private npm registry for development.
Open http://localhost:4873 in a browser and log in with the user
credentials to see the published packages.
Publish to private npm registry
To publish a package to the local registry, run:
The package version in package.json is updated accordingly. See the
verdaccio docs
for more information.
To unpublish a package, for example @into-cps-association/runner@0.0.2, run:
To install or uninstall this utility for all users, run:
Use the packages
Packages in the private npm registry are used like regular packages installed from npmjs.
For example, to use the @into-cps-association/runner@0.0.2 package, run: