@mreal/private-git-packages
v0.2.2
Published
CLI allows dynamically inject secret variables for git dependencies in package.json. It gives protected way use git dependencies in package.json in CI/CD
Downloads
7
Maintainers
Readme
private-git-packages
CLI allows dynamically inject secret variables for git dependencies in package.json. It gives protected way use git dependencies in package.json in CI/CD
# ANY CI
pgp change --username=BasicAuthUsername --password=BasicAuthPassword
npm i
pgp rollback
# GITLAB CI
pgp change --username=gitlab-ci-token --password=$CI_JOB_TOKEN
npm i
pgp rollback
Usage
$ npm install -g @mreal/private-git-packages
$ pgp COMMAND
running command...
$ pgp (-v|--version|version)
@mreal/private-git-packages/0.2.1 linux-x64 node-v8.10.0
$ pgp --help [COMMAND]
USAGE
$ pgp COMMAND
...
Commands
pgp change [PATTERN]
describe the command here
USAGE
$ pgp change [PATTERN]
ARGUMENTS
PATTERN Pattern for restricting selection. Any text or regular expression.
OPTIONS
-h, --help show CLI help
-n, --filename=filename [default: package] custom name of package.json
-p, --password=password (required) password -> https://[username]:[password]@your-git-host.com/...
-r, --recursively Apply to all files (package) at any level of nesting
-u, --username=username (required) username -> https://[username]:[password]@your-git-host.com/...
See code: src/commands/change.ts
pgp help [COMMAND]
display help for pgp
USAGE
$ pgp help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
pgp rollback
describe the command here
USAGE
$ pgp rollback
OPTIONS
-h, --help show CLI help
-n, --filename=filename [default: package] custom name of package.json
-r, --recursively Apply to all files (package) at any level of nesting
See code: src/commands/rollback.ts
Other
Run without package-lock.json
This information only applies when you do not have package-lock.json file.
Pay attention that during command npm install
package-lock.json file will be created automatically.
The package-lock.json file will be contain private tokens.
The file will be created automatically, after run pgp and npm. This means that pgp doesn't track this file and cannot roll back for this file.
So you should have package-lock.json before using pgp and npm install, or take care of removing package-lock.json yourself