Quick Info
Description
NPM (Node Package Manager) is a package manager for the JavaScript programming language. NPM includes command-line client that interacts with a remote registry. Using the command-line interface, you can use and distribute JavaScript modules that are available on the registry. The NPM plugin provides command steps to perform the following operations:- Initialize a package.json file
- Install packages
- Update packages
- Uninstall packages
- Publish a package to the registry
- Update and edit the contents of the user and global npmrc files
Quick Info
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 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.
History
The following table describes the changes made in each plugin version.
Version | Description |
---|---|
3 | Minor enhancements |
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 .
- In the HCL user interface, click Components and then click Create Component.
- In the Create Component window, specify a name and description for the component.
- In the Teams fields, specify the access information for the new component.
- To use a template for the new component, select a template from the Template list. In this case, the component inherits source configuration, properties, and processes from the template.
- In the Source Config Type list, select NPM.
- Specify the properties for the component. See the Setting tab for descriptions.
- Click Save.
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.
Settings and Roles
Roles in the NPM plugin
The plugin adds these roles automatically to resources. You cannot add these roles manually.
ComponentProperties
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
Name | Type | Description | Reference |
---|---|---|---|
Version to Import | String | The version of a package to import. |