Module Registry Client (MSC) is a command-line interface (CLI) tool designed to facilitate the installation and publishing of modules.
To install MSC, use the following commands:
npm install -g module-registry-client-lib
-
To check the installed version of MSC:
msc -v
-
To get help and see available commands:
msc -h
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.
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').
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.