Skip to content

Commit 9b2d3e7

Browse files
committed
feat: use oclif/core v2
1 parent a79557b commit 9b2d3e7

File tree

4 files changed

+316
-49
lines changed

4 files changed

+316
-49
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"author": "Salesforce",
66
"bugs": "https://github.com/salesforcecli/plugin-command-reference/issues",
77
"dependencies": {
8-
"@oclif/core": "^1.23.1",
8+
"@oclif/core": "^2.0.7",
99
"@salesforce/core": "^3.32.12",
1010
"@salesforce/kit": "^1.8.2",
11-
"@salesforce/sf-plugins-core": "^1.21.5",
11+
"@salesforce/sf-plugins-core": "^2.0.1",
1212
"@salesforce/ts-types": "^1.7.1",
1313
"chalk": "^3.0.0",
1414
"fs-extra": "^10.0.1",
@@ -40,7 +40,7 @@
4040
"husky": "^7.0.4",
4141
"mocha": "^9.1.3",
4242
"nyc": "^15.1.0",
43-
"oclif": "^2.5.0",
43+
"oclif": "^3.6.1",
4444
"prettier": "^2.0.5",
4545
"pretty-quick": "^3.1.0",
4646
"shx": "^0.3.3",
@@ -101,4 +101,4 @@
101101
"access": "public"
102102
},
103103
"main": "lib/index.js"
104-
}
104+
}

src/commands/commandreference/generate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as os from 'os';
99
import * as path from 'path';
1010
import { readJSON, pathExists } from 'fs-extra';
1111
import { SfCommand } from '@salesforce/sf-plugins-core';
12-
import { Flags, Interfaces } from '@oclif/core';
12+
import { Flags, Interfaces, Command } from '@oclif/core';
1313
import { Messages, SfError } from '@salesforce/core';
1414
import { AnyJson, Dictionary, ensure, getString, JsonMap } from '@salesforce/ts-types';
1515
import chalk = require('chalk');
@@ -209,7 +209,7 @@ export default class CommandReferenceGenerate extends SfCommand<AnyJson> {
209209
return uniqBy(commands, 'id');
210210
}
211211

212-
private async loadCommand(command: Interfaces.Command.Loadable): Promise<Interfaces.Command.Class> {
212+
private async loadCommand(command: Command.Loadable): Promise<Command.Class> {
213213
return command.load.constructor.name === 'AsyncFunction' ? await command.load() : command.load();
214214
}
215215

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
import { EventEmitter } from 'events';
99
import { EOL } from 'os';
1010
import { Dictionary, isObject, JsonMap } from '@salesforce/ts-types';
11-
import { Interfaces } from '@oclif/core';
11+
import { Command } from '@oclif/core';
1212

13-
export type CommandClass = Interfaces.Command.Class & { topic: string; subtopic: string } & JsonMap;
13+
export type CommandClass = Command.Class & { topic: string; subtopic: string } & JsonMap;
1414

1515
export const events = new EventEmitter();
1616

0 commit comments

Comments
 (0)