@fivethree/billy-core
Advanced tools
Comparing version 0.16.1 to 0.17.0
@@ -35,11 +35,6 @@ "use strict"; | ||
const onStart = this.controller.hooks.find(hook => hook.type === "ON_START"); | ||
this.controller.commands.forEach(command => this.command(command)); | ||
if (onStart) { | ||
this.controller.params | ||
.filter(param => param.propertyKey === onStart.lane.name) | ||
.forEach(p => this.param(commander_1.default, p)); | ||
} | ||
commander_1.default.on("command:*", args => { | ||
if (onStart) { | ||
commander_1.default.on("command:*", args => { | ||
// on start + no command specified | ||
console.log("on start + no command specified", args); | ||
const gitStyle = this.controller.params.find(p => p.options.gitStyle); | ||
@@ -49,16 +44,19 @@ if (gitStyle && typeof args[0] === "string") { | ||
} | ||
this.parseArgs(Object.assign(Object.assign({}, commander_1.default), args)); | ||
this.parseArgs(Object.assign({}, commander_1.default)); | ||
this.controller.run([onStart.lane]); | ||
} | ||
else { | ||
this.controller.run([]); | ||
} | ||
}); | ||
}); | ||
// add params to root command (if any) | ||
this.controller.params | ||
.filter(param => param.propertyKey === onStart.lane.name) | ||
.forEach(p => this.param(commander_1.default, p)); | ||
} | ||
this.controller.commands.forEach(command => this.command(command)); | ||
const command = commander_1.default.parse(process.argv); | ||
if (command.args.length === 0) { | ||
if (onStart) { | ||
this.parseArgs(commander_1.default); | ||
console.log("on start + no args"); | ||
this.controller.run([onStart.lane]); | ||
} | ||
else { | ||
console.log("no args no on start"); | ||
this.controller.run([]); | ||
@@ -65,0 +63,0 @@ } |
{ | ||
"name": "@fivethree/billy-core", | ||
"version": "0.16.1", | ||
"version": "0.17.0", | ||
"description": "cli plugin system core.", | ||
@@ -34,2 +34,3 @@ "repository": { | ||
"chalk": "^2.4.1", | ||
"camelcase": "5.3.1", | ||
"cli-table": "^0.3.1", | ||
@@ -36,0 +37,0 @@ "commander": "^2.19.0", |
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
59946
9
1318
+ Addedcamelcase@5.3.1
+ Addedcamelcase@5.3.1(transitive)