cubx-dependency-resolver
v1.3.2
Published
Npm package to resolve the dependencies of a list of artifacts
Downloads
23
Readme
cubx-dependency-resolver
Module for building the rarw dependency tree of a list of root dependencies.
Usage:
Command line:
cubx-dependency-resolver -u <baseUrl> -d <rootDependencies>
For instance:
cubx-dependency-resolver -u 'https://cubbles.world/sandbox' -d '[{ "webpackageId": "[email protected]", "artifactId": "cubx-structure-viewer" }]'
Parameters
-u
/--baseUrl
url of the base where dependencies are hostedd
/--rootDependencies
a list of root dependencies (JSON valid), or a path to a JSON file containing the list-t
/--type
to CLI accepting the values:raw
: returns raw DependencyTreeresolved
: returns resolved Dependency Treelist
(default): return ordered list of resourceswplist
: return a list of webpackages only (without resources and derived from resolved dependency tree)mlist
: return a list of manifests of all webpackages (derived from resolved dependency tree)
-m
/--mode
to CLI accepting the values (Note: this only applies if parametertype
is set to valuelist
:prod
(default): Use onlyprod
resourcesdev
: Use onlydev
resources
Other npm modules
var baseUrl = 'http://base.example';
var rootDependencies = [
{
"artifactId": "util1",
"webpackageId": "[email protected]"
},
{
"artifactId": "util2",
"webpackageId": "[email protected]"
}
];
var ArtifactsDepsResolver = require('cubx-dependency-resolver');
var artifactsDepsResolver = new ArtifactsDepsResolver();
artifactsDepsResolver.resolveDependencies(rootDependencies, baseUrl);