@oclif/command
Advanced tools
Comparing version 1.5.20 to 1.6.0-rc1
@@ -1,2 +0,2 @@ | ||
## [1.5.20](https://github.com/oclif/command/compare/v1.5.19...v1.5.20) (2020-04-20) | ||
# [1.6.0-rc1](https://github.com/oclif/command/compare/v1.5.19...v1.6.0-rc1) (2020-04-22) | ||
@@ -3,0 +3,0 @@ |
@@ -48,3 +48,3 @@ import * as Config from '@oclif/config'; | ||
constructor(argv: string[], config: Config.IConfig); | ||
readonly ctor: typeof Command; | ||
get ctor(): typeof Command; | ||
_run<T>(): Promise<T | undefined>; | ||
@@ -51,0 +51,0 @@ exit(code?: number): never; |
@@ -8,2 +8,3 @@ "use strict"; | ||
const util_2 = require("./util"); | ||
const plugin_help_1 = require("@oclif/plugin-help"); | ||
/** | ||
@@ -117,4 +118,4 @@ * swallows stdout epipe errors | ||
_help() { | ||
const HHelp = require('@oclif/plugin-help').default; | ||
const help = new HHelp(this.config); | ||
const HelpClass = plugin_help_1.getHelpClass(this.config); | ||
const help = new HelpClass(this.config); | ||
const cmd = Config.Command.toCached(this.ctor); | ||
@@ -144,2 +145,3 @@ if (!cmd.id) | ||
} | ||
exports.default = Command; | ||
Command._base = `${pjson.name}@${pjson.version}`; | ||
@@ -165,2 +167,1 @@ /** An array of aliases for this command */ | ||
}; | ||
exports.default = Command; |
@@ -13,7 +13,7 @@ "use strict"; | ||
const _enum = (opts) => { | ||
return build(Object.assign({ parse(input) { | ||
return build(Object.assign(Object.assign({ parse(input) { | ||
if (!opts.options.includes(input)) | ||
throw new Error(`Expected --${this.name}=${input} to be one of: ${opts.options.join(', ')}`); | ||
return input; | ||
}, helpValue: `(${opts.options.join('|')})` }, opts, { optionType: 'enum' }))(); | ||
}, helpValue: `(${opts.options.join('|')})` }, opts), { optionType: 'enum' }))(); | ||
}; | ||
@@ -27,5 +27,5 @@ exports.enum = _enum; | ||
exports.version = (opts = {}) => { | ||
return Parser.flags.boolean(Object.assign({ | ||
return Parser.flags.boolean(Object.assign(Object.assign({ | ||
// char: 'v', | ||
description: 'show CLI version' }, opts, { parse: (_, cmd) => { | ||
description: 'show CLI version' }, opts), { parse: (_, cmd) => { | ||
cmd.log(cmd.config.userAgent); | ||
@@ -36,7 +36,7 @@ cmd.exit(0); | ||
exports.help = (opts = {}) => { | ||
return Parser.flags.boolean(Object.assign({ | ||
return Parser.flags.boolean(Object.assign(Object.assign({ | ||
// char: 'h', | ||
description: 'show CLI help' }, opts, { parse: (_, cmd) => { | ||
description: 'show CLI help' }, opts), { parse: (_, cmd) => { | ||
cmd._help(); | ||
} })); | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const _1 = require("."); | ||
const plugin_help_1 = require("@oclif/plugin-help"); | ||
class Main extends _1.Command { | ||
@@ -39,4 +40,4 @@ static run(argv = process.argv.slice(2), options) { | ||
_help() { | ||
const HHelp = require('@oclif/plugin-help').default; | ||
const help = new HHelp(this.config); | ||
const HelpClass = plugin_help_1.getHelpClass(this.config); | ||
const help = new HelpClass(this.config); | ||
help.showHelp(this.argv); | ||
@@ -43,0 +44,0 @@ return this.exit(0); |
{ | ||
"name": "@oclif/command", | ||
"description": "oclif base command", | ||
"version": "1.5.20", | ||
"version": "1.6.0-rc1", | ||
"author": "Jeff Dickey @jdxcode", | ||
"bugs": "https://github.com/oclif/command/issues", | ||
"dependencies": { | ||
"@oclif/config": "^1", | ||
"@oclif/config": "^1.15.1", | ||
"@oclif/errors": "^1.2.2", | ||
"@oclif/parser": "^3.8.3", | ||
"@oclif/plugin-help": "^2", | ||
"@oclif/plugin-help": "3.0.0-rc1.1", | ||
"debug": "^4.1.1", | ||
@@ -30,4 +30,5 @@ "semver": "^5.6.0" | ||
"mocha": "^6.0.2", | ||
"ts-node": "^8.0.3", | ||
"typescript": "^3.3.3333" | ||
"sinon": "^9.0.1", | ||
"ts-node": "^8.8.2", | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -34,0 +35,0 @@ "peerDependencies": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
52463
469
17
1
1
+ Added@oclif/command@1.8.36(transitive)
+ Added@oclif/config@1.18.16(transitive)
+ Added@oclif/help@1.0.15(transitive)
+ Added@oclif/plugin-help@3.0.0-rc1.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedsemver@7.7.1(transitive)
+ Addedwidest-line@3.1.0(transitive)
+ Addedwrap-ansi@6.2.0(transitive)
- Removed@oclif/plugin-help@2.2.3(transitive)
Updated@oclif/config@^1.15.1