Updated
On this page
npm pipeline implementation that publishes packages to the npm registry, authenticating via NPM_TOKEN and handling scoped package access.
#rlsbl.pipelines.npm
#rlsbl.pipelines.npm
npm pipeline implementation that publishes packages to the npm registry, authenticating via NPM_TOKEN and handling scoped package access.
#NpmPipeline
Pipeline that publishes to npm with provenance attestation.
#template_dir
python
def template_dir(self) -> str | NoneReturn the npm CI templates directory.
#template_mappings
python
def template_mappings(self, ctx) -> list[dict[str, str]]Return publish workflow mappings, selecting template by artifact type and package manager.
#_detect_package_manager
python
def _detect_package_manager(self, ctx) -> strDetect the package manager by checking for lock files.
#build_assets
python
def build_assets(self, dir_path: str, version: str, dist_dir: str, ctx) -> list[str]Pack an npm tarball into dist_dir.
#publish
python
def publish(self, dir_path: str, version: str, ctx) -> NonePublish to npm with --access public, probing first to skip duplicates.
#_publish_command
python
def _publish_command(self, dir_path: str, version: str, token: str) -> NoneRun npm publish; tags pre-release versions with their preid.