Vetrix Docs

npm Registry

Vetrix provides a scoped npm-compatible registry for each repository.

Registry URL

https://<vetrix-host>/npm/<owner>/<repo>/

Authentication

Configure npm to use Bearer token authentication:

npm config set //vetrix-host/npm/owner/repo/:_authToken <jwt-token>

Or set the registry in your project's .npmrc:

@myscope:registry=https://<vetrix-host>/npm/<owner>/<repo>/
//vetrix-host/npm/owner/repo/:_authToken=<jwt-token>

Publishing

npm publish --registry https://<vetrix-host>/npm/<owner>/<repo>/

Installing packages

npm install <package-name> --registry https://<vetrix-host>/npm/<owner>/<repo>/

Supported endpoints

Method Path Description
GET /npm/{owner}/{repo}/{package} Package metadata (packument)
GET /npm/{owner}/{repo}/{package}/-/{tarball} Download tarball
PUT /npm/{owner}/{repo}/{package} Publish a new version

Access control

  • Public repositories: unauthenticated reads allowed.
  • Private repositories: Bearer JWT required for all operations.
  • Publishing always requires authentication and the caller must be the repository owner.