Skip to content

Commit

Permalink
feat: use oclif/core v2
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Jan 31, 2023
1 parent a79557b commit 9b2d3e7
Show file tree
Hide file tree
Showing 4 changed files with 316 additions and 49 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"author": "Salesforce",
"bugs": "https://github.com/salesforcecli/plugin-command-reference/issues",
"dependencies": {
"@oclif/core": "^1.23.1",
"@oclif/core": "^2.0.7",
"@salesforce/core": "^3.32.12",
"@salesforce/kit": "^1.8.2",
"@salesforce/sf-plugins-core": "^1.21.5",
"@salesforce/sf-plugins-core": "^2.0.1",
"@salesforce/ts-types": "^1.7.1",
"chalk": "^3.0.0",
"fs-extra": "^10.0.1",
Expand Down Expand Up @@ -40,7 +40,7 @@
"husky": "^7.0.4",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
"oclif": "^2.5.0",
"oclif": "^3.6.1",
"prettier": "^2.0.5",
"pretty-quick": "^3.1.0",
"shx": "^0.3.3",
Expand Down Expand Up @@ -101,4 +101,4 @@
"access": "public"
},
"main": "lib/index.js"
}
}
4 changes: 2 additions & 2 deletions src/commands/commandreference/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as os from 'os';
import * as path from 'path';
import { readJSON, pathExists } from 'fs-extra';
import { SfCommand } from '@salesforce/sf-plugins-core';
import { Flags, Interfaces } from '@oclif/core';
import { Flags, Interfaces, Command } from '@oclif/core';
import { Messages, SfError } from '@salesforce/core';
import { AnyJson, Dictionary, ensure, getString, JsonMap } from '@salesforce/ts-types';
import chalk = require('chalk');
Expand Down Expand Up @@ -209,7 +209,7 @@ export default class CommandReferenceGenerate extends SfCommand<AnyJson> {
return uniqBy(commands, 'id');
}

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

Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import { EventEmitter } from 'events';
import { EOL } from 'os';
import { Dictionary, isObject, JsonMap } from '@salesforce/ts-types';
import { Interfaces } from '@oclif/core';
import { Command } from '@oclif/core';

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

export const events = new EventEmitter();

Expand Down
Loading

0 comments on commit 9b2d3e7

Please sign in to comment.