@mreal/private-git-packages
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

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

oclif Version Codecov Downloads/week License

Usage

$ npm install -g @mreal/private-git-packages
$ pgp COMMAND
running command...
$ pgp (-v|--version|version)
@mreal/private-git-packages/0.2.2 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

Package Sidebar

Install

npm i @mreal/private-git-packages

Weekly Downloads

0

Version

0.2.2

License

MIT

Unpacked Size

35.5 kB

Total Files

24

Last publish

Collaborators

  • mreal