@pie-framework/build-helper
Advanced tools
Comparing version 2.1.0 to 3.0.0
@@ -12,3 +12,3 @@ /// <reference types="node" /> | ||
runCmds(cmds: string[], opts?: any): Promise<(Buffer | string | undefined)[]>; | ||
private series(cmds, fn); | ||
private series; | ||
isGitTreeClean(): Promise<boolean>; | ||
@@ -15,0 +15,0 @@ beforePublish(): Promise<any>; |
@@ -54,3 +54,8 @@ "use strict"; | ||
return cmds.reduce((p, cmd) => { | ||
return p.then(() => fn(cmd)); | ||
return p | ||
.then(() => fn(cmd)) | ||
.catch(e => { | ||
log('error in series occured:', e.message); | ||
throw e; | ||
}); | ||
}, Promise.resolve()); | ||
@@ -57,0 +62,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const child_process_1 = require("child_process"); | ||
const debug_1 = require("debug"); | ||
const log = debug_1.default('build-helper:exec'); | ||
exports.execPromise = (cmd, opts, pipeStdout = true, pipeStderr = true) => { | ||
@@ -21,5 +23,13 @@ return new Promise((resolve, reject) => { | ||
child.on('error', reject); | ||
child.on('exit', () => resolve(out ? out.toString('utf8') : undefined)); | ||
child.on('exit', code => { | ||
log(cmd, 'exit:', code); | ||
if (code !== 0) { | ||
reject(new Error(`cmd: ${cmd} failed`)); | ||
} | ||
else { | ||
resolve(out ? out.toString('utf8') : undefined); | ||
} | ||
}); | ||
}); | ||
}; | ||
//# sourceMappingURL=exec.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.processFix = (log, onSigInt) => { | ||
process.on('unhandledRejection', error => { | ||
log(error.message); | ||
process.on('unhandledRejection', (reason) => { | ||
log(reason.message); | ||
}); | ||
@@ -12,3 +12,3 @@ if (process.platform === 'win32') { | ||
}); | ||
rl.on('SIGINT', () => process.emit('SIGINT')); | ||
rl.on('SIGINT', () => process.emit('disconnect')); | ||
} | ||
@@ -15,0 +15,0 @@ process.on('SIGINT', onSigInt); |
{ | ||
"name": "@pie-framework/build-helper", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"description": "", | ||
@@ -11,3 +11,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=9.2.0" | ||
"node": ">=11.x.x" | ||
}, | ||
@@ -20,8 +20,11 @@ "dependencies": { | ||
"devDependencies": { | ||
"tslint": "^5.10.0", | ||
"typescript": "^2.8.3", | ||
"release-it": "^7.4.3", | ||
"conventional-changelog-cli": "^1.3.22", | ||
"@types/node": "^10.0.6", | ||
"@types/fs-extra": "5.0.2" | ||
"tslint": "^5.13.1", | ||
"typescript": "^3.3.3333", | ||
"release-it": "^10.3.1", | ||
"conventional-changelog-cli": "^2.0.12", | ||
"ts-jest": "^24.0.0", | ||
"jest": "24.4.0", | ||
"@types/node": "^11.11.1", | ||
"@types/fs-extra": "^5.0.5", | ||
"@types/jest": "^24.0.11" | ||
}, | ||
@@ -28,0 +31,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
247408
29
498
9