Skip to content

NPM Layout Provider

Introduction

The NPM layout provider allows storing artifacts using the NPM format. The code is located under the strongbox-storage-npm-layout-provider module.

Artifact Coordinates

This is the list of artifact coordinates supported by the provider:

Coordinate Description Type
scope The scope of the package Optional
name The name of the package Mandatory
version The version of the package Mandatory

User Agent

The accepted User-Agent headers supported must look like User-Agent=npm/*.

Supported Commands

Following CLI commands supported:

  • npm [adduser|login]

  • npm publish

  • npm install

  • npm view

  • npm search

  • npm unpublish

Classes of Interest

The following are some of the most important classes you will need to be familiar with in order to work on this layout provider:

Coordinate Description
NpmArtifactCoordinates This is an implementation of ArtifactCoordinates for the NPM layout. Basically, there are no coordinates.
NpmLayoutProvider This is the actual implementation of the NPM layout provider.
NpmRepositoryFeatures This defines the custom layout provider features for the NPM layout provider.
NpmRepositoryManagementStrategy This class is used to handle the initialization of NPM repositories.
NpmArtifactController This is the NPM-specific implementation of the BaseArtifactController.

See Also


Last update: 2020-12-07