Manager Registry
Registry for OVHcloud Manager.
Installation
yarn global add @ovh-ux/manager-registry
or
yarn add @ovh-ux/manager-registry
Usage
CLI
manager-registry --help
Usage: manager-registry [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
dev <fragmentsPath> Dev server for local fragments
static <registryPath> Static registry commands
help [cmd] display help for [cmd]
Common Options
-
-V, --version
: Display version number -
-h, --help
: Display help
Dev
Help to serve a registry from dev fragments environment
manager-registry dev --help
Usage: manager-registry-dev [options] <fragmentsPath>
Options:
-V, --version output the version number
-p, --port <port> server port (default: 8888)
-e, --regexp <pattern> filter fragment pattern (default: [])
--fallbackRegistry <fallbackRegistry> Fallback server registry url
-h, --help output usage information
Options
-
-p, --port <port>
: Server port (default: 8888) -
-e, --regexp <pattern>
: Allows to filter fragments served (multiple allowed) -
--fallbackRegistry <fallbackRegistry>
: Fallback server registry url
Examples
$ manager-registry dev ./packages/manager/fragments
Serve: ./packages/manager/fragments - localhost:8888
$ manager-registry dev ./packages/manager/fragments -p 1234
Serve: ./packages/manager/fragments - localhost:1234
To serve fragments from dev environmment, and fallback missing fragments to another registry:
$ manager-registry dev ./packages/manager/fragments --fallbackRegistry http://localhost:1234
Serve: ./packages/manager/fragments - localhost:8888
Fallback registry: http://localhost:1234
To serve only the navbar
fragment:
$ manager-registry dev ./packages/manager/fragments -e navbar
Serve: ./packages/manager/fragments - localhost:8888
To serve only fragments with name following *bar
and !sidebar
patterns (e.g. navbar
, userbar
):
$ manager-registry dev ./packages/manager/fragments -e '*bar' -e '!sidebar'
Serve: ./packages/manager/fragments - localhost:8888
Static
Help to manage a static registry
manager-registry static --help
Usage: manager-registry-static [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
generate-manifests <registryPath> Generate manifest for static registry
serve <registryPath> Serve a static registry
add <registryPath> <fragmentPath> Add a fragment in static registry
sync <sourceRegistryPath> <targetRegistryPath> Sync two registry folders
help [cmd] display help for [cmd]
Generate Manifests
Will generate and write manifest for registry and fragments.
$ manager-registry static generate-manifests --help
Usage: manager-registry-static-generate-manifests [options] <registryPath>
Options:
-V, --version output the version number
--fallbackRegistry <fallbackRegistry> Fallback server registry url
-h, --help output usage information
Options
-
--fallbackRegistry <fallbackRegistry>
: Fallback server registry url
Examples
$ manager-registry static generate-manifests ./path/to/static/registry
Manifests are generated for static registry in ./path/to/static/registry
To generate manifests with static fragments and fallback registry informations:
$ manager-registry static generate-manifests ./path/to/static/registry --fallbackRegistry http://localhost:1234
Manifests are generated for static registry in ./path/to/static/registry with fallback informations from http://localhost:1234
Serve
Will serve a static registry
$ manager-registry static serve --help
Usage: manager-registry-static-serve [options] <registryPath>
Options:
-V, --version output the version number
-p, --port <port> server port (default: 8888)
-h, --help output usage information
Examples
$ manager-registry static serve ./path/to/static/registry -p 1234
Serve: ./path/to/static/registry - localhost:1234
Add fragment
Add a fragment dist to a static registry
$ manager-registry static add --help
Usage: manager-registry-static-add [options] <registryPath> <fragmentPath>
Options:
-V, --version output the version number
-h, --help output usage information
Examples
Add a fragment dist (containing a manifest.json
) in a static registry:
$ manager-registry static add ./path/to/static/registry ./path/to/fragment/dist
Fragment "fragment@1.0.O" added in registry ./path/to/static/registry
Trying to add an existant fragment version in a static registry:
$ manager-registry static add ./path/to/static/registry ./path/to/fragment/dist
Fragment "fragment@1.0.O" already exists in ./path/to/static/registry
Sync registry
Sync two registry directories (will add missing fragment from source to target directory)
$ manager-registry static sync --help
Usage: manager-registry-static-sync [options] <sourceRegistryPath> <targetRegistryPath>
Options:
-V, --version output the version number
-h, --help output usage information
Example
Sync a static registry with an another existing static registry
$ manager-registry static sync ./path/to/static/registry ./path/to/another/static/registry
Fragment "fragment@1.0.O" added in registry ./path/to/another/static/registry
Related
- dev-server-config - OVHcloud manager shared dev server configuration
Contributing
Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.
License
BSD-3-Clause © OVH SAS