Skip to content

Commit

Permalink
feat: use @oclif/core v2 (#454)
Browse files Browse the repository at this point in the history
* feat: use @oclif/core v2

* chore: update oclif

* chore: update oclif
  • Loading branch information
mdonnalley authored Jan 18, 2023
1 parent 03d5ae9 commit ae1fb0b
Show file tree
Hide file tree
Showing 3 changed files with 466 additions and 289 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Salesforce",
"bugs": "https://github.com/oclif/plugin-help/issues",
"dependencies": {
"@oclif/core": "^1.24.0"
"@oclif/core": "^2.0.2-beta.6"
},
"devDependencies": {
"@oclif/plugin-plugins": "^2.1.12",
Expand All @@ -17,7 +17,7 @@
"eslint-config-oclif": "^4.0.0",
"eslint-config-oclif-typescript": "^1.0.3",
"mocha": "^9.2.2",
"oclif": "^2.6.3",
"oclif": "^3.4.6",
"shx": "^0.3.4",
"ts-node": "^9.1.1",
"typescript": "^4.6.3"
Expand Down Expand Up @@ -53,4 +53,4 @@
"postpack": "shx rm oclif.manifest.json"
},
"types": "./lib/index.d.ts"
}
}
10 changes: 5 additions & 5 deletions src/commands/help.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Command, Flags, Help} from '@oclif/core'
import {Args, Command, Flags, Help} from '@oclif/core'

export default class HelpCommand extends Command {
static description = 'Display help for <%= config.bin %>.'
Expand All @@ -10,15 +10,15 @@ export default class HelpCommand extends Command {
}),
}

static args = [
{name: 'command', required: false, description: 'Command to show help for.'},
]
static args = {
commands: Args.string({required: false, description: 'Command to show help for.'}),
}

static strict = false

async run(): Promise<void> {
const {flags, argv} = await this.parse(HelpCommand)
const help = new Help(this.config, {all: flags['nested-commands']})
await help.showHelp(argv)
await help.showHelp(argv as string[])
}
}
Loading

0 comments on commit ae1fb0b

Please sign in to comment.