1 | import { SfdxCommand, flags } from '@salesforce/command';
|
2 | import { Dictionary } from '@salesforce/ts-types';
|
3 | import Output = flags.Output;
|
4 | export declare abstract class ToolbeltCommand extends SfdxCommand {
|
5 | protected static supportsPerfLogLevelFlag: boolean;
|
6 | protected static schema: {
|
7 | name: string;
|
8 | flag: string;
|
9 | };
|
10 | static theDescription: string;
|
11 | static deprecated: {
|
12 | version: number;
|
13 | /**
|
14 | * Add the "Use <to> instead." messaging.
|
15 | */
|
16 | to?: string;
|
17 | /**
|
18 | * Use the default messaging but append an additional message at the end.
|
19 | */
|
20 | message?: string;
|
21 | /**
|
22 | * Override the default messaging.
|
23 | */
|
24 | messageOverride?: string;
|
25 | };
|
26 | /**
|
27 | * In order to get the help property displayed during --help, we need to append it onto the description.
|
28 | * This means that all commands that extend ToolbeltCommand can't use `public static readme description = ''`.
|
29 | * To get around this, we use the `theDescription` name instead.
|
30 | *
|
31 | * When commands migrate to SfdxCommand, they should change the messages for description to include both the
|
32 | * description and the help messages.
|
33 | */
|
34 | static readonly description: string;
|
35 | static readonly extraHelp: string;
|
36 | static readonly flags: Output;
|
37 | private legacyContext?;
|
38 | /**
|
39 | * Call to stringify parsed flags for backward compatibility.
|
40 | * Don't invoke this if you wish to use new-style parsed flags.
|
41 | */
|
42 | protected stringifyFlags(): void;
|
43 | /**
|
44 | * This is a bridge to for all old cli-engine commands.
|
45 | * All new oclif commands should be refactored to NOT use
|
46 | * this method anymore, and should move the old Command classes
|
47 | * in lib that have a validate and execute method to be in the
|
48 | * actual oclif command class.
|
49 | *
|
50 | * TODO Provide instructions on how to get people to move off of execLegacyCommand
|
51 | * * Remove src/lib/path/to/*Command file and put logic in the oclif/force/path/to/command file
|
52 | * * Change getColumnData to protected static results {} // TODO more info here.
|
53 | * * Remove getHumanSuccessMessage and just put it at the end of your run command
|
54 | * * Remove getHumanErrorMessage and throw an SfdxError
|
55 | * * ...
|
56 | * @param command
|
57 | */
|
58 | protected execLegacyCommand(command: any, context: any, stdin?: any): Promise<any>;
|
59 | /**
|
60 | * returns true if a wildcard like expansion or behavior is detected
|
61 | * @param param the next parameter passed into the cli
|
62 | */
|
63 | checkIfWildcardError(param: string): boolean;
|
64 | /**
|
65 | * SfdxError.wrap does not keep actions, so we need to convert ourselves if using almError
|
66 | * @param err
|
67 | */
|
68 | protected catch(err: Error): Promise<void>;
|
69 | protected getJsonResultObject(result: any, status: any): any;
|
70 | protected resolveLegacyContext(): Promise<Dictionary<any>>;
|
71 | protected legacyOutput(command: any, obj: any): void;
|
72 | protected readonly statics: typeof ToolbeltCommand;
|
73 | protected static logPerfMetrics(obj: any): any;
|
74 | }
|