Compare commits
	
		
			12 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 01c88a6a6c | |||
| f5cacb7400 | |||
| 887da51d78 | |||
| 585703fc55 | |||
| ec3e296d73 | |||
| 33f234cf73 | |||
| e7ec765ed5 | |||
| 2f46197864 | |||
| da44233263 | |||
| cb2430f7b2 | |||
| 5fe9134f4a | |||
| 7681f09d38 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -4,3 +4,4 @@ coverage/ | ||||
| public/ | ||||
| config.json | ||||
| .yarn/ | ||||
| .npmci_cache | ||||
|   | ||||
| @@ -1,3 +0,0 @@ | ||||
| node_modules/ | ||||
| test/ | ||||
| .yarn/ | ||||
							
								
								
									
										13
									
								
								.snyk
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								.snyk
									
									
									
									
									
								
							| @@ -6,10 +6,23 @@ ignore: | ||||
|     - shelljs: | ||||
|         reason: None given | ||||
|         expires: '2018-06-02T22:48:10.660Z' | ||||
|       smartshell > shelljs: | ||||
|         reason: None given | ||||
|         expires: '2018-08-14T21:49:25.248Z' | ||||
|     - smartshell > shelljs: | ||||
|         reason: None given | ||||
|         expires: '2018-06-02T22:48:10.660Z' | ||||
|       smartssh > shelljs: | ||||
|         reason: None given | ||||
|         expires: '2018-08-14T21:49:25.248Z' | ||||
|     - smartssh > shelljs: | ||||
|         reason: None given | ||||
|         expires: '2018-06-02T22:48:10.660Z' | ||||
|       shelljs: | ||||
|         reason: None given | ||||
|         expires: '2018-08-14T21:49:25.248Z' | ||||
|   'npm:stringstream:20180511': | ||||
|     - request > stringstream: | ||||
|         reason: None given | ||||
|         expires: '2018-08-14T21:49:25.248Z' | ||||
| patch: {} | ||||
|   | ||||
							
								
								
									
										2355
									
								
								package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										2355
									
								
								package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										31
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@shipzone/npmci", | ||||
|   "version": "3.0.47", | ||||
|   "version": "3.0.53", | ||||
|   "description": "node and docker in gitlab ci on steroids", | ||||
|   "main": "dist/index.js", | ||||
|   "typings": "dist/index.d.ts", | ||||
| @@ -23,31 +23,32 @@ | ||||
|   }, | ||||
|   "homepage": "https://gitlab.com/gitzone/npmci#README", | ||||
|   "devDependencies": { | ||||
|     "tapbundle": "^2.0.0" | ||||
|     "tapbundle": "^2.0.2" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@pushrocks/smartcli": "^3.0.1", | ||||
|     "@types/lodash": "^4.14.74", | ||||
|     "@types/shelljs": "^0.7.4", | ||||
|     "@pushrocks/smartcli": "^3.0.2", | ||||
|     "@pushrocks/smartpromise": "^2.0.2", | ||||
|     "@types/lodash": "^4.14.110", | ||||
|     "@types/shelljs": "^0.8.0", | ||||
|     "@types/through2": "^2.0.33", | ||||
|     "beautylog": "^6.1.10", | ||||
|     "cflare": "^1.0.5", | ||||
|     "lik": "^2.0.5", | ||||
|     "lodash": "^4.17.4", | ||||
|     "lodash": "^4.17.10", | ||||
|     "npmextra": "^2.0.9", | ||||
|     "projectinfo": "^3.0.2", | ||||
|     "request": "^2.81.0", | ||||
|     "shelljs": "^0.8.1", | ||||
|     "projectinfo": "^3.0.4", | ||||
|     "request": "^2.87.0", | ||||
|     "shelljs": "^0.8.2", | ||||
|     "smartanalytics": "^2.0.9", | ||||
|     "smartdelay": "^1.0.3", | ||||
|     "smartdelay": "^1.0.4", | ||||
|     "smartfile": "^4.2.20", | ||||
|     "smartparam": "^1.0.2", | ||||
|     "smartq": "^1.1.6", | ||||
|     "smartshell": "^1.0.18", | ||||
|     "smartsocket": "^1.1.10", | ||||
|     "smartshell": "^1.0.19", | ||||
|     "smartsocket": "^1.1.19", | ||||
|     "smartssh": "^1.2.2", | ||||
|     "smartstring": "^2.0.24", | ||||
|     "smartstring": "^2.0.28", | ||||
|     "smartsystem": "^2.0.2", | ||||
|     "through2": "^2.0.3" | ||||
|   } | ||||
|   }, | ||||
|   "private": false | ||||
| } | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| import * as plugins from '../npmci.plugins'; | ||||
| import * as paths from '../npmci.paths'; | ||||
| import * as npmciConfig from '../npmci.config'; | ||||
| import { bash, bashNoError, nvmAvailable, yarnAvailable } from '../npmci.bash'; | ||||
| import { bash, bashNoError, nvmAvailable } from '../npmci.bash'; | ||||
|  | ||||
| /** | ||||
|  * handle cli input | ||||
| @@ -33,11 +34,11 @@ export let install = async versionArg => { | ||||
|   plugins.beautylog.log(`now installing node version ${versionArg}`); | ||||
|   let version: string; | ||||
|   if (versionArg === 'stable') { | ||||
|     version = '9'; | ||||
|     version = '10'; | ||||
|   } else if (versionArg === 'lts') { | ||||
|     version = '8'; | ||||
|   } else if (versionArg === 'legacy') { | ||||
|     version = '8'; | ||||
|     version = '9'; | ||||
|   } else { | ||||
|     version = versionArg; | ||||
|   } | ||||
| @@ -49,6 +50,7 @@ export let install = async versionArg => { | ||||
|   } | ||||
|   await bash('node -v'); | ||||
|   await bash('npm -v'); | ||||
|   await bash(`npm config set cache ${paths.NpmciCacheDir}  --global `); | ||||
|   // lets look for further config | ||||
|   await npmciConfig.getConfig().then(async configArg => { | ||||
|     plugins.beautylog.log('Now checking for needed global npm tools...'); | ||||
| @@ -60,11 +62,7 @@ export let install = async versionArg => { | ||||
|         plugins.beautylog.log(`Tool ${npmTool} is available`); | ||||
|       } else { | ||||
|         plugins.beautylog.info(`globally installing ${npmTool} from npm`); | ||||
|         if (await yarnAvailable.promise) { | ||||
|           await bash(`yarn global add ${npmTool}`); | ||||
|         } else { | ||||
|           await bash(`npm install ${npmTool} -q -g`); | ||||
|         } | ||||
|         await bash(`npm install ${npmTool} -q -g`); | ||||
|       } | ||||
|     } | ||||
|     plugins.beautylog.success('all global npm tools specified in npmextra.json are now available!'); | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| import * as plugins from './mod.plugins'; | ||||
| import * as configModule from '../npmci.config'; | ||||
| import { bash, bashNoError, nvmAvailable, yarnAvailable } from '../npmci.bash'; | ||||
| import { bash, bashNoError, nvmAvailable } from '../npmci.bash'; | ||||
|  | ||||
| /** | ||||
|  * handle cli input | ||||
| @@ -72,14 +72,14 @@ let publish = async () => { | ||||
|   await bash(`npm -v`); | ||||
|  | ||||
|   // -> build it | ||||
|   await bash(`yarn install`); | ||||
|   await bash(`yarn run build`); | ||||
|   await bash(`npm install`); | ||||
|   await bash(`npm run build`); | ||||
|  | ||||
|   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:`); | ||||
|   // -> clean up before we publish stuff | ||||
|   await bash(`rm -r .yarn`); | ||||
|   await bash(`rm -r node_modules`); | ||||
|   await bashNoError(`rm -r ./.npmci_cache`); | ||||
|   await bash(`rm -r ./node_modules`); | ||||
|  | ||||
|   plugins.beautylog.success(`Cleaned up!:`); | ||||
|  | ||||
| @@ -91,14 +91,10 @@ let publish = async () => { | ||||
|  | ||||
| let install = async (): Promise<void> => { | ||||
|   plugins.beautylog.info('now installing dependencies:'); | ||||
|   if (await yarnAvailable.promise) { | ||||
|     await bash('yarn install'); | ||||
|   } else { | ||||
|     await bash('npm install'); | ||||
|   } | ||||
|   await bash('npm install'); | ||||
| }; | ||||
|  | ||||
| export let test = async (): Promise<void> => { | ||||
|   plugins.beautylog.info('now starting tests:'); | ||||
|   await bash('yarn test'); | ||||
|   await bash('npm test'); | ||||
| }; | ||||
|   | ||||
| @@ -1,13 +1,12 @@ | ||||
| import * as plugins from './npmci.plugins'; | ||||
| import * as paths from './npmci.paths'; | ||||
|  | ||||
| import * as smartq from 'smartq'; | ||||
| import * as smartpromise from '@pushrocks/smartpromise'; | ||||
|  | ||||
| /** | ||||
|  * wether nvm is available or not | ||||
|  */ | ||||
| export let nvmAvailable = smartq.defer<boolean>(); | ||||
| export let yarnAvailable = smartq.defer<boolean>(); | ||||
| export let nvmAvailable = smartpromise.defer<boolean>(); | ||||
| /** | ||||
|  * the smartshell instance for npmci | ||||
|  */ | ||||
| @@ -35,22 +34,8 @@ let checkToolsAvailable = async () => { | ||||
|     } else { | ||||
|       nvmAvailable.resolve(false); | ||||
|     } | ||||
|  | ||||
|     // check for yarn | ||||
|     await plugins.smartshell.which('yarn').then( | ||||
|       async () => { | ||||
|         await plugins.smartshell.exec( | ||||
|           `yarn config set cache-folder ${plugins.path.join(paths.cwd, '.yarn')}` | ||||
|         ); | ||||
|         yarnAvailable.resolve(true); | ||||
|       }, | ||||
|       () => { | ||||
|         yarnAvailable.resolve(false); | ||||
|       } | ||||
|     ); | ||||
|   } else { | ||||
|     nvmAvailable.resolve(true); | ||||
|     yarnAvailable.resolve(true); | ||||
|   } | ||||
| }; | ||||
| checkToolsAvailable(); | ||||
|   | ||||
| @@ -6,3 +6,4 @@ export let NpmciPackageRoot = plugins.path.join(__dirname, '../'); | ||||
| export let NpmciPackageConfig = plugins.path.join(NpmciPackageRoot, './config.json'); | ||||
| export let NpmciProjectDir = cwd; | ||||
| export let NpmciTestDir = plugins.path.join(cwd, './test'); | ||||
| export let NpmciCacheDir = plugins.path.join(cwd, './.npmci_cache'); | ||||
|   | ||||
| @@ -10,7 +10,7 @@ export import smartdelay = require('smartdelay'); | ||||
| export import smartfile = require('smartfile'); | ||||
| export import shelljs = require('shelljs'); | ||||
| export import smartparam = require('smartparam'); | ||||
| export import smartq = require('smartq'); | ||||
| export import smartpromise = require('@pushrocks/smartpromise'); | ||||
| export import smartshell = require('smartshell'); | ||||
| export import smartsocket = require('smartsocket'); | ||||
| export import smartsystem = require('smartsystem'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user