Usage
To use this plugin, create a component to define the NPM artifacts to be used. The component contains the information for importing the artifacts and any processes to perform on the artifacts.
Step palette
To access this plugin in the palette, click Utilities > NPM.
Create a component
To create a component, complete the following steps. For more information, see .
Import a version
When the artifacts are imported, a component version is created using the version of the package. You can specify to import a specific package version or import all versions. If importing all versions, a component version is created for each version.
- Click the Versions tab for the component.
- Click Import New Versions.
- Specify a specific version of the package to import, or leave blank to import the latest version of the package available in the repository. Additionally, enable Import All Versions to import all versions of a package.
- Click Save.
Steps
The following process steps are available in the NPM plugin.
Import Version
Import NPM packages as TAR files.
This step has no input properties.
Roles in the NPM plugin
The plugin adds these roles automatically to resources. You cannot add these roles manually.
ComponentProperties
Properties for the ComponentProperties role
Name |
Type |
Description |
Reference |
Import All Versions |
Boolean |
Specify to import all versions of the specified package. By default only the latest version is imported. |
${p:component/ComponentProperties/allVersions} |
Log4j Logging Level |
Enumeration |
The level of Log4j messages to output to the console. Specify ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. |
${p:component/ComponentProperties/loggerLevel} |
NPM CLI Path |
String |
The path to the NPM executable file, if not specified on the system PATH environment variable. |
${p:component/ComponentProperties/cliPath} |
Package Name |
String |
The name of the NPM package to import. To specify a scope by prepending @<scope_name>/ to the package name. This associates the specified scope with your registry. |
${p:component/ComponentProperties/package} |
Password |
Password |
The password to authenticate with the registry. |
${p:component/ComponentProperties/password} |
Registry URL |
String |
The fully-qualified URL of the NPM registry. For example https://registry.npmjs.org/. |
${p:component/ComponentProperties/registryUrl} |
Username |
String |
The user name to authenticate with the registry. |
${p:component/ComponentProperties/username} |
ImportProperties
Properties for the ImportProperties role
Name |
Type |
Description |
Reference |
Version to Import |
String |
The version of a package to import. |
|
Summary
he Node Package Manager (NPM) source configuration plugin automates the importing of NPM packages. It uses the NPM Pack
command to import a package as a TAR file. You can then imported the TAR file into other NPM projects.
This plugin includes one step:
Compatibility
This plugin requires HCL Launch version 7.0.x or later.
This plugin requires that NPM be installed on the HCL Launch agent.
Installation
See Installing plugins in HCL Launch for installing and removing plugins.