module-registry-client-lib

1.2.0 • Public • Published

Module Registry Client

Introduction

Module Registry Client (MSC) is a command-line interface (CLI) tool designed to facilitate the installation and publishing of modules.

Installation

To install MSC, use the following commands:

npm install -g module-registry-client-lib

Usage

1. Version and Help Commands

  • To check the installed version of MSC:

    msc -v
  • To get help and see available commands:

    msc -h

2. Install Modules

2.1 Install Specific Module

Install a specific module using the following command:

msc install --appId=<app-id> --version=<app-version> --channel=<version-channel> --token=<token> --modulesPath=<modules-path>

Parameters:

  • appId (required): App ID.
  • version (optional): App version (default: "latest")
  • channel (optional): Version tag. Can be set from process.env.CHANNEL (default: "main")
  • token (required): JWT token for installation. Can be set from process.env.TOKEN
  • modulesPath (optional): Relative path for modules to install (default: './modules').

The channel parameter allows you to specify a version tag (e.g., "main" or "dev"). If not specified or provided incorrectly, the default is "main". Version parameter allows you to choose specific version that you need, and in that case channel parameter will not be used.

2.2 Install mmDependencies

Install all modules from mmDependencies:

msc install mmDependencies --token=<token> --modulesPath=<modules-path>

Parameters:

  • token (required): JWT token for installation.
  • modulesPath (optional): Relative path for modules to install (default: './modules').

3. Publish Module

Publish a module using the following command:

msc publish --modulePath=<module-path> --userToken=<user-token> --tag=<version-tag> --notes=<release-notes>

Parameters:

  • modulePath (required): Path to the app archive.
  • userToken (required): User token for authentication. Can be set from process.env.USER_TOKEN
  • tag (required): Version tag (default: 'main').
  • notes (required): Notes about app updates.

Publication Policies:

  • Version validation: Only valid semantic versions are accepted for publication
  • Tag Policy and Latest Version Check: For the specified tag, only a higher than the existing latest version can be published. If you want to publish lower version, create another tag and do it. If no tag is provided, the latest version is calculated based on semantic versioning. The tag "main" is considered the default if not specified or provided incorrectly.
  • Version Rewriting Prevention: Existing versions cannot be rewritten to maintain version history.

Dependents (1)

Package Sidebar

Install

npm i module-registry-client-lib

Weekly Downloads

10

Version

1.2.0

License

ISC

Unpacked Size

15.6 kB

Total Files

7

Last publish

Collaborators

  • xziy