@salesforce/sf-plugins-core 9.0.12 → 9.0.14-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/compatibility.d.ts +7 -7
- package/lib/errorFormatting.d.ts +2 -2
- package/lib/flags/duration.d.ts +1 -1
- package/lib/flags/flags.d.ts +12 -12
- package/lib/flags/orgApiVersion.d.ts +1 -1
- package/lib/flags/orgFlags.d.ts +4 -4
- package/lib/flags/salesforceId.d.ts +1 -1
- package/lib/sfCommand.d.ts +1 -1
- package/lib/sfCommand.js +2 -2
- package/lib/stubUx.d.ts +3 -3
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/ux/progress.js +6 -3
- package/lib/ux/standardColors.d.ts +5 -4
- package/lib/ux/standardColors.js +5 -5
- package/lib/ux/styledObject.d.ts +3 -0
- package/lib/ux/styledObject.js +55 -0
- package/lib/ux/table.d.ts +22 -0
- package/lib/ux/table.js +257 -0
- package/lib/ux/ux.d.ts +11 -4
- package/lib/ux/ux.js +30 -7
- package/package.json +12 -5
package/lib/compatibility.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* }
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export declare const orgApiVersionFlagWithDeprecations: import("@oclif/core/
|
|
17
|
+
export declare const orgApiVersionFlagWithDeprecations: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
/**
|
|
19
19
|
* Use only for commands that maintain sfdx compatibility.
|
|
20
20
|
* Flag will be hidden and will show a warning if used.
|
|
@@ -23,23 +23,23 @@ export declare const orgApiVersionFlagWithDeprecations: import("@oclif/core/lib/
|
|
|
23
23
|
* @deprecated
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
export declare const loglevel: import("@oclif/core/
|
|
26
|
+
export declare const loglevel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
27
|
/**
|
|
28
28
|
* @deprecated
|
|
29
29
|
*/
|
|
30
|
-
export declare const optionalOrgFlagWithDeprecations: import("@oclif/core/
|
|
30
|
+
export declare const optionalOrgFlagWithDeprecations: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
31
|
/**
|
|
32
32
|
* @deprecated
|
|
33
33
|
*/
|
|
34
|
-
export declare const requiredOrgFlagWithDeprecations: import("@oclif/core/
|
|
34
|
+
export declare const requiredOrgFlagWithDeprecations: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
35
|
/**
|
|
36
36
|
* @deprecated
|
|
37
37
|
*/
|
|
38
|
-
export declare const requiredHubFlagWithDeprecations: import("@oclif/core/
|
|
38
|
+
export declare const requiredHubFlagWithDeprecations: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
39
39
|
/**
|
|
40
40
|
* @deprecated
|
|
41
41
|
*/
|
|
42
|
-
export declare const optionalHubFlagWithDeprecations: import("@oclif/core/
|
|
42
|
+
export declare const optionalHubFlagWithDeprecations: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
43
43
|
export type ArrayWithDeprecationOptions = {
|
|
44
44
|
multiple?: true;
|
|
45
45
|
parse?: undefined;
|
|
@@ -47,7 +47,7 @@ export type ArrayWithDeprecationOptions = {
|
|
|
47
47
|
/**
|
|
48
48
|
* @deprecated
|
|
49
49
|
*/
|
|
50
|
-
export declare const arrayWithDeprecation: import("@oclif/core/
|
|
50
|
+
export declare const arrayWithDeprecation: import("@oclif/core/interfaces").FlagDefinition<string[], ArrayWithDeprecationOptions, {
|
|
51
51
|
multiple: true;
|
|
52
52
|
requiredOrDefaulted: true;
|
|
53
53
|
}>;
|
package/lib/errorFormatting.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Ansis } from 'ansis';
|
|
2
2
|
import { SfCommandError } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Format errors and actions for human consumption. Adds 'Error (<ErrorCode>):',
|
|
@@ -16,7 +16,7 @@ import { SfCommandError } from './types.js';
|
|
|
16
16
|
* @private
|
|
17
17
|
*/
|
|
18
18
|
export declare const formatActions: (actions: string[], options?: {
|
|
19
|
-
actionColor:
|
|
19
|
+
actionColor: Ansis;
|
|
20
20
|
}) => string[];
|
|
21
21
|
export declare const formatError: (error: SfCommandError) => string;
|
|
22
22
|
//# sourceMappingURL=errorFormatting.d.ts.map
|
package/lib/flags/duration.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type DurationFlagConfig = {
|
|
|
26
26
|
* }
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare const durationFlag: import("@oclif/core/
|
|
29
|
+
export declare const durationFlag: import("@oclif/core/interfaces").FlagDefinition<Duration, DurationFlagConfig, {
|
|
30
30
|
multiple: false;
|
|
31
31
|
requiredOrDefaulted: true;
|
|
32
32
|
}>;
|
package/lib/flags/flags.d.ts
CHANGED
|
@@ -2,60 +2,60 @@
|
|
|
2
2
|
import { Flags as OclifFlags } from '@oclif/core';
|
|
3
3
|
export declare const Flags: {
|
|
4
4
|
boolean: typeof OclifFlags.boolean;
|
|
5
|
-
directory: import("@oclif/core/
|
|
5
|
+
directory: import("@oclif/core/interfaces").FlagDefinition<string, {
|
|
6
6
|
exists?: boolean | undefined;
|
|
7
7
|
}, {
|
|
8
8
|
multiple: false;
|
|
9
9
|
requiredOrDefaulted: false;
|
|
10
10
|
}>;
|
|
11
|
-
file: import("@oclif/core/
|
|
11
|
+
file: import("@oclif/core/interfaces").FlagDefinition<string, {
|
|
12
12
|
exists?: boolean | undefined;
|
|
13
13
|
}, {
|
|
14
14
|
multiple: false;
|
|
15
15
|
requiredOrDefaulted: false;
|
|
16
16
|
}>;
|
|
17
|
-
integer: import("@oclif/core/
|
|
17
|
+
integer: import("@oclif/core/interfaces").FlagDefinition<number, {
|
|
18
18
|
max?: number | undefined;
|
|
19
19
|
min?: number | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
multiple: false;
|
|
22
22
|
requiredOrDefaulted: false;
|
|
23
23
|
}>;
|
|
24
|
-
string: import("@oclif/core/
|
|
24
|
+
string: import("@oclif/core/interfaces").FlagDefinition<string, import("@oclif/core/interfaces").CustomOptions, {
|
|
25
25
|
multiple: false;
|
|
26
26
|
requiredOrDefaulted: false;
|
|
27
27
|
}>;
|
|
28
28
|
option: typeof OclifFlags.option;
|
|
29
|
-
url: import("@oclif/core/
|
|
29
|
+
url: import("@oclif/core/interfaces").FlagDefinition<import("url").URL, import("@oclif/core/interfaces").CustomOptions, {
|
|
30
30
|
multiple: false;
|
|
31
31
|
requiredOrDefaulted: false;
|
|
32
32
|
}>;
|
|
33
33
|
custom: typeof OclifFlags.custom;
|
|
34
|
-
duration: import("@oclif/core/
|
|
34
|
+
duration: import("@oclif/core/interfaces").FlagDefinition<import("@salesforce/kit").Duration, import("./duration.js").DurationFlagConfig, {
|
|
35
35
|
multiple: false;
|
|
36
36
|
requiredOrDefaulted: true;
|
|
37
37
|
}>;
|
|
38
|
-
salesforceId: import("@oclif/core/
|
|
38
|
+
salesforceId: import("@oclif/core/interfaces").FlagDefinition<string, import("./salesforceId.js").IdFlagConfig, {
|
|
39
39
|
multiple: false;
|
|
40
40
|
requiredOrDefaulted: false;
|
|
41
41
|
}>;
|
|
42
|
-
orgApiVersion: import("@oclif/core/
|
|
42
|
+
orgApiVersion: import("@oclif/core/interfaces").FlagDefinition<string, import("@oclif/core/interfaces").CustomOptions, {
|
|
43
43
|
multiple: false;
|
|
44
44
|
requiredOrDefaulted: false;
|
|
45
45
|
}>;
|
|
46
|
-
requiredOrg: import("@oclif/core/
|
|
46
|
+
requiredOrg: import("@oclif/core/interfaces").FlagDefinition<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
47
47
|
multiple: false;
|
|
48
48
|
requiredOrDefaulted: true;
|
|
49
49
|
}>;
|
|
50
|
-
requiredHub: import("@oclif/core/
|
|
50
|
+
requiredHub: import("@oclif/core/interfaces").FlagDefinition<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
51
51
|
multiple: false;
|
|
52
52
|
requiredOrDefaulted: true;
|
|
53
53
|
}>;
|
|
54
|
-
optionalOrg: import("@oclif/core/
|
|
54
|
+
optionalOrg: import("@oclif/core/interfaces").FlagDefinition<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
55
55
|
multiple: false;
|
|
56
56
|
requiredOrDefaulted: true;
|
|
57
57
|
}>;
|
|
58
|
-
optionalHub: import("@oclif/core/
|
|
58
|
+
optionalHub: import("@oclif/core/interfaces").FlagDefinition<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
59
59
|
multiple: false;
|
|
60
60
|
requiredOrDefaulted: true;
|
|
61
61
|
}>;
|
|
@@ -21,7 +21,7 @@ export declare const maxDeprecatedUrl = "https://help.salesforce.com/s/articleVi
|
|
|
21
21
|
* }
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export declare const orgApiVersionFlag: import("@oclif/core/
|
|
24
|
+
export declare const orgApiVersionFlag: import("@oclif/core/interfaces").FlagDefinition<string, import("@oclif/core/interfaces").CustomOptions, {
|
|
25
25
|
multiple: false;
|
|
26
26
|
requiredOrDefaulted: false;
|
|
27
27
|
}>;
|
package/lib/flags/orgFlags.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare const getHubOrThrow: (aliasOrUsername?: string) => Promise<Org>;
|
|
|
25
25
|
* }
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
export declare const optionalOrgFlag: import("@oclif/core/
|
|
28
|
+
export declare const optionalOrgFlag: import("@oclif/core/interfaces").FlagDefinition<Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
29
29
|
multiple: false;
|
|
30
30
|
requiredOrDefaulted: true;
|
|
31
31
|
}>;
|
|
@@ -51,7 +51,7 @@ export declare const optionalOrgFlag: import("@oclif/core/lib/interfaces/parser.
|
|
|
51
51
|
* }
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
|
-
export declare const requiredOrgFlag: import("@oclif/core/
|
|
54
|
+
export declare const requiredOrgFlag: import("@oclif/core/interfaces").FlagDefinition<Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
55
55
|
multiple: false;
|
|
56
56
|
requiredOrDefaulted: true;
|
|
57
57
|
}>;
|
|
@@ -77,7 +77,7 @@ export declare const requiredOrgFlag: import("@oclif/core/lib/interfaces/parser.
|
|
|
77
77
|
* }
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
export declare const requiredHubFlag: import("@oclif/core/
|
|
80
|
+
export declare const requiredHubFlag: import("@oclif/core/interfaces").FlagDefinition<Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
81
81
|
multiple: false;
|
|
82
82
|
requiredOrDefaulted: true;
|
|
83
83
|
}>;
|
|
@@ -102,7 +102,7 @@ export declare const requiredHubFlag: import("@oclif/core/lib/interfaces/parser.
|
|
|
102
102
|
* }
|
|
103
103
|
* ```
|
|
104
104
|
*/
|
|
105
|
-
export declare const optionalHubFlag: import("@oclif/core/
|
|
105
|
+
export declare const optionalHubFlag: import("@oclif/core/interfaces").FlagDefinition<Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
106
106
|
multiple: false;
|
|
107
107
|
requiredOrDefaulted: true;
|
|
108
108
|
}>;
|
|
@@ -30,7 +30,7 @@ export type IdFlagConfig = {
|
|
|
30
30
|
* }
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
export declare const salesforceIdFlag: import("@oclif/core/
|
|
33
|
+
export declare const salesforceIdFlag: import("@oclif/core/interfaces").FlagDefinition<string, IdFlagConfig, {
|
|
34
34
|
multiple: false;
|
|
35
35
|
requiredOrDefaulted: false;
|
|
36
36
|
}>;
|
package/lib/sfCommand.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export declare abstract class SfCommand<T> extends Command {
|
|
|
94
94
|
*/
|
|
95
95
|
static errorCodes?: HelpSection;
|
|
96
96
|
static baseFlags: {
|
|
97
|
-
'flags-dir': import("@oclif/core/
|
|
97
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* Set to true if the command must be executed inside a Salesforce project directory.
|
package/lib/sfCommand.js
CHANGED
|
@@ -210,7 +210,7 @@ export class SfCommand extends Command {
|
|
|
210
210
|
* @param obj The JSON to log.
|
|
211
211
|
*/
|
|
212
212
|
styledJSON(obj) {
|
|
213
|
-
this.ux.styledJSON(obj);
|
|
213
|
+
this.ux.styledJSON(obj, this.config.theme?.json);
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Log stylized object to the console. Will automatically be suppressed when --json flag is present.
|
|
@@ -234,7 +234,7 @@ export class SfCommand extends Command {
|
|
|
234
234
|
// If `--json` is enabled, then the ux instance on the class will disable output, which
|
|
235
235
|
// means that the logJson method will not output anything. So, we need to create a new
|
|
236
236
|
// instance of the ux class that does not have output disabled in order to log the json.
|
|
237
|
-
new Ux().styledJSON(json);
|
|
237
|
+
new Ux().styledJSON(json, this.config.theme?.json);
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
240
|
* Prompt user for yes/no confirmation.
|
package/lib/stubUx.d.ts
CHANGED
|
@@ -21,11 +21,11 @@ import { Ux } from './ux/ux.js';
|
|
|
21
21
|
export declare function stubUx(sandbox: SinonSandbox): {
|
|
22
22
|
log: import("sinon").SinonStub<[message?: string | undefined, ...args: string[]], void>;
|
|
23
23
|
warn: import("sinon").SinonStub<[message: string | Error], void>;
|
|
24
|
-
table: import("sinon").SinonStub<[data: Ux.Table.Data[], columns: Ux.Table.Columns<Ux.Table.Data>, options?: import("
|
|
24
|
+
table: import("sinon").SinonStub<[data: Ux.Table.Data[], columns: Ux.Table.Columns<Ux.Table.Data>, options?: import("./ux/table.js").Options | undefined], void>;
|
|
25
25
|
url: import("sinon").SinonStub<[text: string, uri: string, params?: {} | undefined], void>;
|
|
26
26
|
styledHeader: import("sinon").SinonStub<[text: string], void>;
|
|
27
27
|
styledObject: import("sinon").SinonStub<[obj: import("@salesforce/ts-types").AnyJson, keys?: string[] | undefined], void>;
|
|
28
|
-
styledJSON: import("sinon").SinonStub<[obj: import("@salesforce/ts-types").AnyJson], void>;
|
|
28
|
+
styledJSON: import("sinon").SinonStub<[obj: import("@salesforce/ts-types").AnyJson, theme?: Record<string, string> | undefined], void>;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* Stub methods on the Ux class.
|
|
@@ -52,7 +52,7 @@ export declare function stubSfCommandUx(sandbox: SinonSandbox): {
|
|
|
52
52
|
logSensitive: import("sinon").SinonStub<[msg?: string | undefined], void>;
|
|
53
53
|
info: import("sinon").SinonStub<[input: SfCommand.Info], void>;
|
|
54
54
|
warn: import("sinon").SinonStub<[input: SfCommand.Warning], SfCommand.Warning>;
|
|
55
|
-
table: import("sinon").SinonStub<[data: Ux.Table.Data[], columns: Ux.Table.Columns<Ux.Table.Data>, options?: import("
|
|
55
|
+
table: import("sinon").SinonStub<[data: Ux.Table.Data[], columns: Ux.Table.Columns<Ux.Table.Data>, options?: import("./ux/table.js").Options | undefined], void>;
|
|
56
56
|
url: import("sinon").SinonStub<[text: string, uri: string, params?: {} | undefined], void>;
|
|
57
57
|
styledHeader: import("sinon").SinonStub<[text: string], void>;
|
|
58
58
|
styledObject: import("sinon").SinonStub<[obj: import("@salesforce/ts-types").AnyJson], void>;
|