Compare commits
	
		
			9 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d55c77560a | |||
| 0e337a3574 | |||
| 94c5567b75 | |||
| 7b37506d4e | |||
| a401633b73 | |||
| 948a8e64d7 | |||
| 9e8fbac573 | |||
| 362740a55f | |||
| 3edc08b0ed | 
| @@ -10,9 +10,11 @@ stages: | |||||||
| - security | - security | ||||||
| - test | - test | ||||||
| - release | - release | ||||||
| - trigger | - metadata | ||||||
| - pages |  | ||||||
|  |  | ||||||
|  | # ==================== | ||||||
|  | # security stage | ||||||
|  | # ==================== | ||||||
| mirror: | mirror: | ||||||
|   stage: security |   stage: security | ||||||
|   script: |   script: | ||||||
| @@ -31,25 +33,9 @@ snyk: | |||||||
|   - docker |   - docker | ||||||
|   - notpriv |   - notpriv | ||||||
|  |  | ||||||
| codequality: | # ==================== | ||||||
|   stage: security | # test stage | ||||||
|   image: docker:stable | # ==================== | ||||||
|   allow_failure: true |  | ||||||
|   services: |  | ||||||
|     - docker:stable-dind |  | ||||||
|   script: |  | ||||||
|     - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') |  | ||||||
|     - docker run |  | ||||||
|         --env SOURCE_CODE="$PWD" |  | ||||||
|         --volume "$PWD":/code |  | ||||||
|         --volume /var/run/docker.sock:/var/run/docker.sock |  | ||||||
|         "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code |  | ||||||
|   artifacts: |  | ||||||
|     paths: [codeclimate.json] |  | ||||||
|   tags: |  | ||||||
|   - docker |  | ||||||
|   - priv |  | ||||||
|  |  | ||||||
| testLEGACY: | testLEGACY: | ||||||
|   stage: test |   stage: test | ||||||
|   script: |   script: | ||||||
| @@ -87,8 +73,7 @@ testSTABLE: | |||||||
| release: | release: | ||||||
|   stage: release |   stage: release | ||||||
|   script: |   script: | ||||||
|   - npmci node install lts |   - npmci node install stable | ||||||
|   - npmci npm prepare |  | ||||||
|   - npmci npm publish |   - npmci npm publish | ||||||
|   only: |   only: | ||||||
|   - tags |   - tags | ||||||
| @@ -96,8 +81,30 @@ release: | |||||||
|   - docker |   - docker | ||||||
|   - notpriv |   - notpriv | ||||||
|  |  | ||||||
|  | # ==================== | ||||||
|  | # metadata stage | ||||||
|  | # ==================== | ||||||
|  | codequality: | ||||||
|  |   stage: metadata | ||||||
|  |   image: docker:stable | ||||||
|  |   allow_failure: true | ||||||
|  |   services: | ||||||
|  |     - docker:stable-dind | ||||||
|  |   script: | ||||||
|  |     - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') | ||||||
|  |     - docker run | ||||||
|  |         --env SOURCE_CODE="$PWD" | ||||||
|  |         --volume "$PWD":/code | ||||||
|  |         --volume /var/run/docker.sock:/var/run/docker.sock | ||||||
|  |         "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code | ||||||
|  |   artifacts: | ||||||
|  |     paths: [codeclimate.json] | ||||||
|  |   tags: | ||||||
|  |   - docker | ||||||
|  |   - priv | ||||||
|  |  | ||||||
| trigger: | trigger: | ||||||
|   stage: trigger |   stage: metadata | ||||||
|   script: |   script: | ||||||
|   - npmci trigger |   - npmci trigger | ||||||
|   only: |   only: | ||||||
| @@ -108,7 +115,7 @@ trigger: | |||||||
|  |  | ||||||
| pages: | pages: | ||||||
|   image: hosttoday/ht-docker-node:npmci |   image: hosttoday/ht-docker-node:npmci | ||||||
|   stage: pages |   stage: metadata | ||||||
|   script: |   script: | ||||||
|     - npmci command yarn global add npmpage |     - npmci command yarn global add npmpage | ||||||
|     - npmci command npmpage |     - npmci command npmpage | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								.npmignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.npmignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | node_modules/ | ||||||
|  | test/ | ||||||
|  | .yarn/ | ||||||
							
								
								
									
										8
									
								
								.snyk
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								.snyk
									
									
									
									
									
								
							| @@ -1,15 +1,15 @@ | |||||||
| # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. | # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. | ||||||
| version: v1.10.2 | version: v1.12.0 | ||||||
| # ignores vulnerabilities until expiry date; change duration by modifying expiry date | # ignores vulnerabilities until expiry date; change duration by modifying expiry date | ||||||
| ignore: | ignore: | ||||||
|   'npm:shelljs:20140723': |   'npm:shelljs:20140723': | ||||||
|     - shelljs: |     - shelljs: | ||||||
|         reason: None given |         reason: None given | ||||||
|         expires: '2018-05-04T20:41:54.426Z' |         expires: '2018-06-02T22:48:10.660Z' | ||||||
|     - smartshell > shelljs: |     - smartshell > shelljs: | ||||||
|         reason: None given |         reason: None given | ||||||
|         expires: '2018-05-04T20:41:54.426Z' |         expires: '2018-06-02T22:48:10.660Z' | ||||||
|     - smartssh > shelljs: |     - smartssh > shelljs: | ||||||
|         reason: None given |         reason: None given | ||||||
|         expires: '2018-05-04T20:41:54.426Z' |         expires: '2018-06-02T22:48:10.660Z' | ||||||
| patch: {} | patch: {} | ||||||
|   | |||||||
							
								
								
									
										100
									
								
								docs/index.md
									
									
									
									
									
								
							
							
						
						
									
										100
									
								
								docs/index.md
									
									
									
									
									
								
							| @@ -1,100 +0,0 @@ | |||||||
| # npmci |  | ||||||
|  |  | ||||||
| node and docker in gitlab ci on steroids |  | ||||||
|  |  | ||||||
| ## Availabililty |  | ||||||
|  |  | ||||||
| [](https://www.npmjs.com/package/npmci) |  | ||||||
| [](https://GitLab.com/gitzone/npmci) |  | ||||||
| [](https://github.com/gitzone/npmci) |  | ||||||
| [](https://gitzone.gitlab.io/npmci/) |  | ||||||
|  |  | ||||||
| ## Status for master |  | ||||||
|  |  | ||||||
| [](https://GitLab.com/gitzone/npmci/commits/master) |  | ||||||
| [](https://GitLab.com/gitzone/npmci/commits/master) |  | ||||||
| [](https://www.npmjs.com/package/npmci) |  | ||||||
| [](https://david-dm.org/gitzonetools/npmci) |  | ||||||
| [](https://www.bithound.io/github/gitzonetools/npmci/master/dependencies/npm) |  | ||||||
| [](https://www.bithound.io/github/gitzonetools/npmci) |  | ||||||
| [](https://nodejs.org/dist/latest-v6.x/docs/api/) |  | ||||||
| [](https://nodejs.org/dist/latest-v6.x/docs/api/) |  | ||||||
| [](http://standardjs.com/) |  | ||||||
|  |  | ||||||
| ## Usage |  | ||||||
|  |  | ||||||
| Use TypeScript for best in class instellisense. |  | ||||||
|  |  | ||||||
| npmci is designed to work in docker CI environments. The following docker images come with npmci presinstalled: |  | ||||||
|  |  | ||||||
| Docker Hub: |  | ||||||
|  |  | ||||||
| * [hosttoday/ht-docker-node:npmci](https://hub.docker.com/r/hosttoday/ht-docker-node/)   |  | ||||||
|   has LTS node version and npmci preinstalled. |  | ||||||
| * [hosttoday/ht-docker-dbase](https://hub.docker.com/r/hosttoday/ht-docker-dbase/)   |  | ||||||
|   based on docker:git, can be used to build docker images in conjunction with docker:dind |  | ||||||
|  |  | ||||||
| npmci can be called from commandline: |  | ||||||
|  |  | ||||||
| ```shell |  | ||||||
| # Install any node version: |  | ||||||
| npmci install lts # will install latest LTS node version and update PATH for node and npm versions |  | ||||||
| npmci install stable # will install latest stable node version and update PATH for node and npm |  | ||||||
| npmci install legacy # will install latest legacy node version and update PATH for node and npm |  | ||||||
| npmci install x.x.x #  will install any specific node version. |  | ||||||
|  |  | ||||||
| # Install any node version, install dependencies and run test in cwd: |  | ||||||
| npmci test lts # will install latest lts node version and run "npm install" and "npm test". |  | ||||||
| npmci test stable # will install latest stable node version and run "npm install" and "npm test". |  | ||||||
| npmci test legacy # will install latest legacy node version and run "npm install" and "npm test". |  | ||||||
| npmci test x.x.x # will install any specific node version and run "npm install" and "npm test". |  | ||||||
| npmci test docker # will test any build image with tests defined in ./npmci/dockertest_1.sh to ./npmci/dockertest_100.sh |  | ||||||
| ## npmci test docker will look at all Dockerfiles and look for according tags on GitLab container registry |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # prepare tools |  | ||||||
| npmci prepare npm # will look for $NPMCI_TOKEN_NPM env var and create .npmrc, so npm is authenticated |  | ||||||
| npmci prepare docker # will look for $NPMCI_LOGIN_DOCKER in form username|password and authenticate docker |  | ||||||
| npmci prepare docker-gitlab # will authenticate docker for gitlab container registry |  | ||||||
|  |  | ||||||
| # build containers |  | ||||||
| npmci build docker # will build containers |  | ||||||
| ## all Dockerfiles named Dockerfile* are picked up. |  | ||||||
| ## specify tags like this Dockerfile_[tag] |  | ||||||
| ## uploads all built images as [username]/[reponame]:[tag]_test to GitLab |  | ||||||
| ## then test in next step with "npmci test docker" |  | ||||||
|  |  | ||||||
| # publish npm module |  | ||||||
| npmci publish npm # will look vor $NPMCI_TOKEN_NPM env var and push any module in cwd to npm |  | ||||||
| npmci publish docker |  | ||||||
|  |  | ||||||
| # trigger webhooks |  | ||||||
| npmci trigger # will look for NPMCI_TRIGGER_1 to NPMCI_TRIGGER_100 in form domain|id|token|ref|name   |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ## Configuration |  | ||||||
|  |  | ||||||
| npmci supports the use of npmextra. |  | ||||||
|  |  | ||||||
| To configure npmci create a `npmextra.json` file at the root of your project |  | ||||||
|  |  | ||||||
| ```json |  | ||||||
| { |  | ||||||
|   "npmci": { |  | ||||||
|     "globalNpmTools": ["npm-check-updates", "protractor", "npmts", "gitzone"] |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| **Available options** |  | ||||||
|  |  | ||||||
| | setting        | example                       | description                                                                                       | |  | ||||||
| | -------------- | ----------------------------- | ------------------------------------------------------------------------------------------------- | |  | ||||||
| | globalNpmTools | "globalNpmTools": ["gitbook"] | Will look for the specified package names locally and (if not yet present) install them from npm. | |  | ||||||
|  |  | ||||||
| For further information read the linked docs at the top of this README. |  | ||||||
|  |  | ||||||
| > MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) |  | ||||||
| > | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) |  | ||||||
|  |  | ||||||
| [](https://push.rocks) |  | ||||||
							
								
								
									
										22
									
								
								docs/ssh.md
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								docs/ssh.md
									
									
									
									
									
								
							| @@ -1,22 +0,0 @@ | |||||||
| # SSH |  | ||||||
|  |  | ||||||
| npmci allows easy usage of ssh: |  | ||||||
|  |  | ||||||
| ## Add the SSH KEY to the environment |  | ||||||
|  |  | ||||||
| To make npmci aware of any SSH KEY add it to the environment in the following format |  | ||||||
|  |  | ||||||
| ``` |  | ||||||
| # Key |  | ||||||
| NPMCI_SSHKEY_[A_NAME_FROM_YOU] |  | ||||||
| # Value: |  | ||||||
| [targeted host]|[privatekey as base64]|*** |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ## Use npmci cli tool in your ci script |  | ||||||
|  |  | ||||||
| ``` |  | ||||||
| npmci prepare ssh |  | ||||||
| npmci command git remote add heroku ssh://git@heroku.com/[you project name].git |  | ||||||
| npmci command git push heroku master |  | ||||||
| ``` |  | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "@shipzone/npmci", |   "name": "@shipzone/npmci", | ||||||
|   "version": "3.0.42", |   "version": "3.0.47", | ||||||
|   "description": "node and docker in gitlab ci on steroids", |   "description": "node and docker in gitlab ci on steroids", | ||||||
|   "main": "dist/index.js", |   "main": "dist/index.js", | ||||||
|   "typings": "dist/index.d.ts", |   "typings": "dist/index.d.ts", | ||||||
| @@ -26,6 +26,7 @@ | |||||||
|     "tapbundle": "^2.0.0" |     "tapbundle": "^2.0.0" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|  |     "@pushrocks/smartcli": "^3.0.1", | ||||||
|     "@types/lodash": "^4.14.74", |     "@types/lodash": "^4.14.74", | ||||||
|     "@types/shelljs": "^0.7.4", |     "@types/shelljs": "^0.7.4", | ||||||
|     "@types/through2": "^2.0.33", |     "@types/through2": "^2.0.33", | ||||||
| @@ -38,7 +39,6 @@ | |||||||
|     "request": "^2.81.0", |     "request": "^2.81.0", | ||||||
|     "shelljs": "^0.8.1", |     "shelljs": "^0.8.1", | ||||||
|     "smartanalytics": "^2.0.9", |     "smartanalytics": "^2.0.9", | ||||||
|     "smartcli": "^2.0.7", |  | ||||||
|     "smartdelay": "^1.0.3", |     "smartdelay": "^1.0.3", | ||||||
|     "smartfile": "^4.2.20", |     "smartfile": "^4.2.20", | ||||||
|     "smartparam": "^1.0.2", |     "smartparam": "^1.0.2", | ||||||
|   | |||||||
							
								
								
									
										73
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										73
									
								
								readme.md
									
									
									
									
									
								
							| @@ -25,6 +25,79 @@ node and docker in gitlab ci on steroids | |||||||
|  |  | ||||||
| Use TypeScript for best in class instellisense. | Use TypeScript for best in class instellisense. | ||||||
|  |  | ||||||
|  | npmci is designed to work in docker CI environments. The following docker images come with npmci presinstalled: | ||||||
|  |  | ||||||
|  | Docker Hub: | ||||||
|  |  | ||||||
|  | * [hosttoday/ht-docker-node:npmci](https://hub.docker.com/r/hosttoday/ht-docker-node/)   | ||||||
|  |   has LTS node version and npmci preinstalled. | ||||||
|  | * [hosttoday/ht-docker-dbase](https://hub.docker.com/r/hosttoday/ht-docker-dbase/)   | ||||||
|  |   based on docker:git, can be used to build docker images in conjunction with docker:dind | ||||||
|  |  | ||||||
|  | npmci can be called from commandline and handle a lot of tasks durug ci: | ||||||
|  |  | ||||||
|  | ```shell | ||||||
|  | # Handle node versions | ||||||
|  | npmci node install stable # will install latest stable node version and update PATH for node and npm | ||||||
|  | npmci node install lts # will install latest LTS node version and update PATH for node and npm versions | ||||||
|  | npmci node install legacy # will install latest legacy node version and update PATH for node and npm | ||||||
|  | npmci node install x.x.x #  will install any specific node version. | ||||||
|  |  | ||||||
|  | # Handle npm and yarn tasks | ||||||
|  | npmcu npm login # logs in npm using the auth key provided at env var "NPMCI_TOKEN_NPM" | ||||||
|  | npmci npm install  # installs dependencies using npm or yarn dependending on availablity | ||||||
|  | npmci npm test # tests the package | ||||||
|  | npmci npm publish # builds a package and publishes it | ||||||
|  |  | ||||||
|  | # handle docker tasks | ||||||
|  | npmci docker prepare | ||||||
|  | ## npmci test docker will look at all Dockerfiles and look for according tags on GitLab container registry | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # prepare tools | ||||||
|  | npmci prepare npm # will look for $NPMCI_TOKEN_NPM env var and create .npmrc, so npm is authenticated | ||||||
|  | npmci prepare docker # will look for $NPMCI_LOGIN_DOCKER in form username|password and authenticate docker | ||||||
|  | npmci prepare docker-gitlab # will authenticate docker for gitlab container registry | ||||||
|  |  | ||||||
|  | # build containers | ||||||
|  | npmci docker build # will build containers | ||||||
|  | ## all Dockerfiles named Dockerfile* are picked up. | ||||||
|  | ## specify tags like this Dockerfile_[tag] | ||||||
|  | ## uploads all built images as [username]/[reponame]:[tag]_test to GitLab | ||||||
|  | ## then test in next step with "npmci test docker" | ||||||
|  |  | ||||||
|  | # publish npm module | ||||||
|  | npmci publish npm # will look vor $NPMCI_TOKEN_NPM env var and push any module in cwd to npm | ||||||
|  | npmci publish docker | ||||||
|  |  | ||||||
|  | # trigger webhooks | ||||||
|  | npmci trigger # will look for NPMCI_TRIGGER_1 to NPMCI_TRIGGER_100 in form domain|id|token|ref|name   | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | ## Configuration | ||||||
|  |  | ||||||
|  | npmci supports the use of npmextra. | ||||||
|  |  | ||||||
|  | To configure npmci create a `npmextra.json` file at the root of your project | ||||||
|  |  | ||||||
|  | ```json | ||||||
|  | { | ||||||
|  |   "npmci": { | ||||||
|  |     "globalNpmTools": ["npm-check-updates", "protractor", "npmts", "gitzone"] | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | **Available options** | ||||||
|  |  | ||||||
|  | | setting        | example                       | description                                                                                       | | ||||||
|  | | -------------- | ----------------------------- | ------------------------------------------------------------------------------------------------- | | ||||||
|  | | globalNpmTools | "globalNpmTools": ["gitbook"] | Will look for the specified package names locally and (if not yet present) install them from npm. | | ||||||
|  |  | ||||||
|  | For further information read the linked docs at the top of this README. | ||||||
|  |  | ||||||
|  | Use TypeScript for best in class instellisense. | ||||||
|  |  | ||||||
| For further information read the linked docs at the top of this README. | For further information read the linked docs at the top of this README. | ||||||
|  |  | ||||||
| > MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) | > MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) | ||||||
|   | |||||||
| @@ -76,7 +76,7 @@ let publish = async () => { | |||||||
|   await bash(`yarn run build`); |   await bash(`yarn run build`); | ||||||
|  |  | ||||||
|   plugins.beautylog.success(`Nice!!! The build for the publication was successfull!`); |   plugins.beautylog.success(`Nice!!! The build for the publication was successfull!`); | ||||||
|   plugins.beautylog.log(`Lets clean up so we don't publish any packages that don't belong to us:`) |   plugins.beautylog.log(`Lets clean up so we don't publish any packages that don't belong to us:`); | ||||||
|   // -> clean up before we publish stuff |   // -> clean up before we publish stuff | ||||||
|   await bash(`rm -r .yarn`); |   await bash(`rm -r .yarn`); | ||||||
|   await bash(`rm -r node_modules`); |   await bash(`rm -r node_modules`); | ||||||
|   | |||||||
							
								
								
									
										115
									
								
								ts/npmci.cli.ts
									
									
									
									
									
								
							
							
						
						
									
										115
									
								
								ts/npmci.cli.ts
									
									
									
									
									
								
							| @@ -11,112 +11,113 @@ import * as NpmciEnv from './npmci.env'; | |||||||
|  |  | ||||||
| import * as npmciMods from './npmci.mods'; | import * as npmciMods from './npmci.mods'; | ||||||
|  |  | ||||||
| let smartcli = new plugins.smartcli.Smartcli(); | const npmciSmartcli = new plugins.smartcli.Smartcli(); | ||||||
| smartcli.addVersion(npmciInfo.version); | npmciSmartcli.addVersion(npmciInfo.version); | ||||||
|  |  | ||||||
| // clean | // clean | ||||||
| smartcli | npmciSmartcli.addCommand('clean').subscribe( | ||||||
|   .addCommand('clean') |   async argv => { | ||||||
|   .then(async argv => { |  | ||||||
|     let modClean = await npmciMods.modClean.load(); |     let modClean = await npmciMods.modClean.load(); | ||||||
|     await modClean.clean(); |     await modClean.clean(); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|     process.exit(1); |     process.exit(1); | ||||||
|   }); |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| // cloudflare | // cloudflare | ||||||
| smartcli | npmciSmartcli.addCommand('cloudflare').subscribe( | ||||||
|   .addCommand('cloudflare') |   async argvArg => { | ||||||
|   .then(async argvArg => { |  | ||||||
|     let modPurge = await npmciMods.modCloudflare.load(); |     let modPurge = await npmciMods.modCloudflare.load(); | ||||||
|     await modPurge.handleCli(argvArg); |     await modPurge.handleCli(argvArg); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|   }); |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| // command | // command | ||||||
| smartcli | npmciSmartcli.addCommand('command').subscribe( | ||||||
|   .addCommand('command') |   async argv => { | ||||||
|   .then(async argv => { |  | ||||||
|     let modCommand = await npmciMods.modCommand.load(); |     let modCommand = await npmciMods.modCommand.load(); | ||||||
|     await modCommand.command(); |     await modCommand.command(); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|     process.exit(1); |     process.exit(1); | ||||||
|   }); |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| // command | // command | ||||||
| smartcli | npmciSmartcli.addCommand('git').subscribe( | ||||||
|   .addCommand('git') |   async argvArg => { | ||||||
|   .then(async argvArg => { |  | ||||||
|     let modGit = await npmciMods.modGit.load(); |     let modGit = await npmciMods.modGit.load(); | ||||||
|     await modGit.handleCli(argvArg); |     await modGit.handleCli(argvArg); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|     process.exit(1); |     process.exit(1); | ||||||
|   }); |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| // build | // build | ||||||
| smartcli | npmciSmartcli.addCommand('docker').subscribe( | ||||||
|   .addCommand('docker') |   async argvArg => { | ||||||
|   .then(async argvArg => { |  | ||||||
|     let modDocker = await npmciMods.modDocker.load(); |     let modDocker = await npmciMods.modDocker.load(); | ||||||
|     await modDocker.handleCli(argvArg); |     await modDocker.handleCli(argvArg); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|     process.exit(1); |     process.exit(1); | ||||||
|   }); |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| // node | // node | ||||||
| smartcli | npmciSmartcli.addCommand('node').subscribe( | ||||||
|   .addCommand('node') |   async argvArg => { | ||||||
|   .then(async argvArg => { |  | ||||||
|     let modNode = await npmciMods.modNode.load(); |     let modNode = await npmciMods.modNode.load(); | ||||||
|     await modNode.handleCli(argvArg); |     await modNode.handleCli(argvArg); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|   }); |     process.exit(1); | ||||||
|  |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| // npm | // npm | ||||||
| smartcli | npmciSmartcli.addCommand('npm').subscribe( | ||||||
|   .addCommand('npm') |   async argvArg => { | ||||||
|   .then(async argvArg => { |  | ||||||
|     let modNpm = await npmciMods.modNpm.load(); |     let modNpm = await npmciMods.modNpm.load(); | ||||||
|     await modNpm.handleCli(argvArg); |     await modNpm.handleCli(argvArg); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|   }); |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| // trigger | // trigger | ||||||
| smartcli | npmciSmartcli.addCommand('ssh').subscribe( | ||||||
|   .addCommand('ssh') |   async argvArg => { | ||||||
|   .then(async argvArg => { |  | ||||||
|     let modSsh = await npmciMods.modSsh.load(); |     let modSsh = await npmciMods.modSsh.load(); | ||||||
|     await modSsh.handleCli(argvArg); |     await modSsh.handleCli(argvArg); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|     process.exit(1); |     process.exit(1); | ||||||
|   }); |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| // trigger | // trigger | ||||||
| smartcli | npmciSmartcli.addCommand('trigger').subscribe( | ||||||
|   .addCommand('trigger') |   async argv => { | ||||||
|   .then(async argv => { |  | ||||||
|     let modTrigger = await npmciMods.modTrigger.load(); |     let modTrigger = await npmciMods.modTrigger.load(); | ||||||
|     await modTrigger.trigger(); |     await modTrigger.trigger(); | ||||||
|   }) |   }, | ||||||
|   .catch(err => { |   err => { | ||||||
|     console.log(err); |     console.log(err); | ||||||
|     process.exit(1); |     process.exit(1); | ||||||
|   }); |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
| smartcli.startParse(); | npmciSmartcli.startParse(); | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ export import path = require('path'); | |||||||
| export import projectinfo = require('projectinfo'); | export import projectinfo = require('projectinfo'); | ||||||
| export import q = require('smartq'); | export import q = require('smartq'); | ||||||
| export let request = require('request'); | export let request = require('request'); | ||||||
| export import smartcli = require('smartcli'); | export import smartcli = require('@pushrocks/smartcli'); | ||||||
| export import smartdelay = require('smartdelay'); | export import smartdelay = require('smartdelay'); | ||||||
| export import smartfile = require('smartfile'); | export import smartfile = require('smartfile'); | ||||||
| export import shelljs = require('shelljs'); | export import shelljs = require('shelljs'); | ||||||
|   | |||||||
							
								
								
									
										43
									
								
								yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								yarn.lock
									
									
									
									
									
								
							| @@ -2,6 +2,18 @@ | |||||||
| # yarn lockfile v1 | # yarn lockfile v1 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | "@pushrocks/smartcli@^3.0.1": | ||||||
|  |   version "3.0.1" | ||||||
|  |   resolved "https://registry.yarnpkg.com/@pushrocks/smartcli/-/smartcli-3.0.1.tgz#330ca93f83ecaa23f9213cefa23270105a7728fc" | ||||||
|  |   dependencies: | ||||||
|  |     "@types/yargs" "^11.0.0" | ||||||
|  |     beautylog "^6.1.10" | ||||||
|  |     lik "^2.0.5" | ||||||
|  |     rxjs "^6.0.0" | ||||||
|  |     smartparam "1.0.2" | ||||||
|  |     smartq "^1.1.8" | ||||||
|  |     yargs "^11.0.0" | ||||||
|  |  | ||||||
| "@types/chai-as-promised@^7.1.0": | "@types/chai-as-promised@^7.1.0": | ||||||
|   version "7.1.0" |   version "7.1.0" | ||||||
|   resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.0.tgz#010b04cde78eacfb6e72bfddb3e58fe23c2e78b9" |   resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.0.tgz#010b04cde78eacfb6e72bfddb3e58fe23c2e78b9" | ||||||
| @@ -121,9 +133,9 @@ | |||||||
|   version "1.3.1" |   version "1.3.1" | ||||||
|   resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.1.tgz#7802c380887986ca909008afea4e08025b130f8d" |   resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.1.tgz#7802c380887986ca909008afea4e08025b130f8d" | ||||||
|  |  | ||||||
| "@types/yargs@^10.0.1": | "@types/yargs@^11.0.0": | ||||||
|   version "10.0.2" |   version "11.0.0" | ||||||
|   resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-10.0.2.tgz#cc4ea921877874d1261e2c44b89807bc836e1b12" |   resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-11.0.0.tgz#124b9ed9c65b7091cc36da59ae12cbd47d8745ea" | ||||||
|  |  | ||||||
| accepts@~1.3.4: | accepts@~1.3.4: | ||||||
|   version "1.3.5" |   version "1.3.5" | ||||||
| @@ -921,7 +933,7 @@ lik@^1.0.38: | |||||||
|     smartq "^1.1.6" |     smartq "^1.1.6" | ||||||
|     typings-global "^1.0.20" |     typings-global "^1.0.20" | ||||||
|  |  | ||||||
| lik@^2.0.2, lik@^2.0.5: | lik@^2.0.5: | ||||||
|   version "2.0.5" |   version "2.0.5" | ||||||
|   resolved "https://registry.yarnpkg.com/lik/-/lik-2.0.5.tgz#1338a3201828b557fa91a5b8a6013743ff720e10" |   resolved "https://registry.yarnpkg.com/lik/-/lik-2.0.5.tgz#1338a3201828b557fa91a5b8a6013743ff720e10" | ||||||
|   dependencies: |   dependencies: | ||||||
| @@ -1289,6 +1301,12 @@ rxjs@^5.4.2, rxjs@^5.4.3: | |||||||
|   dependencies: |   dependencies: | ||||||
|     symbol-observable "1.0.1" |     symbol-observable "1.0.1" | ||||||
|  |  | ||||||
|  | rxjs@^6.0.0: | ||||||
|  |   version "6.1.0" | ||||||
|  |   resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.1.0.tgz#833447de4e4f6427b9cec3e5eb9f56415cd28315" | ||||||
|  |   dependencies: | ||||||
|  |     tslib "^1.9.0" | ||||||
|  |  | ||||||
| safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: | safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: | ||||||
|   version "5.1.2" |   version "5.1.2" | ||||||
|   resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" |   resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" | ||||||
| @@ -1350,19 +1368,6 @@ smartchai@^2.0.0: | |||||||
|     chai-as-promised "^7.1.1" |     chai-as-promised "^7.1.1" | ||||||
|     chai-string "^1.4.0" |     chai-string "^1.4.0" | ||||||
|  |  | ||||||
| smartcli@^2.0.7: |  | ||||||
|   version "2.0.12" |  | ||||||
|   resolved "https://registry.yarnpkg.com/smartcli/-/smartcli-2.0.12.tgz#e31008539813cb0bf1122a9281521a2f0f1e0224" |  | ||||||
|   dependencies: |  | ||||||
|     "@types/yargs" "^10.0.1" |  | ||||||
|     beautylog "^6.1.10" |  | ||||||
|     lik "^2.0.2" |  | ||||||
|     rxjs "^5.4.3" |  | ||||||
|     smartparam "1.0.2" |  | ||||||
|     smartq "^1.1.6" |  | ||||||
|     typings-global "^1.0.20" |  | ||||||
|     yargs "^11.0.0" |  | ||||||
|  |  | ||||||
| smartdelay@^1.0.3, smartdelay@^1.0.4: | smartdelay@^1.0.3, smartdelay@^1.0.4: | ||||||
|   version "1.0.4" |   version "1.0.4" | ||||||
|   resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.4.tgz#791c1a4ee6770494064c10b1d2d2b8e6f3105b82" |   resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.4.tgz#791c1a4ee6770494064c10b1d2d2b8e6f3105b82" | ||||||
| @@ -1689,6 +1694,10 @@ tsclass@^1.0.12: | |||||||
|   version "1.0.18" |   version "1.0.18" | ||||||
|   resolved "https://registry.yarnpkg.com/tsclass/-/tsclass-1.0.18.tgz#bb96bf45b45e9ed8f3a6ca51f763b4d2db821dfb" |   resolved "https://registry.yarnpkg.com/tsclass/-/tsclass-1.0.18.tgz#bb96bf45b45e9ed8f3a6ca51f763b4d2db821dfb" | ||||||
|  |  | ||||||
|  | tslib@^1.9.0: | ||||||
|  |   version "1.9.0" | ||||||
|  |   resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" | ||||||
|  |  | ||||||
| tunnel-agent@^0.6.0: | tunnel-agent@^0.6.0: | ||||||
|   version "0.6.0" |   version "0.6.0" | ||||||
|   resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" |   resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user