@salesforce/plugin-org 2.6.10 → 2.6.12
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/commands/force/org/delete.d.ts +1 -1
- package/lib/commands/force/org/delete.js +4 -15
- package/lib/commands/force/org/delete.js.map +1 -1
- package/lib/commands/org/delete/sandbox.js +3 -11
- package/lib/commands/org/delete/sandbox.js.map +1 -1
- package/lib/commands/org/delete/scratch.d.ts +1 -1
- package/lib/commands/org/delete/scratch.js +4 -12
- package/lib/commands/org/delete/scratch.js.map +1 -1
- package/lib/shared/flags.d.ts +7 -0
- package/lib/shared/flags.js +41 -0
- package/lib/shared/flags.js.map +1 -0
- package/oclif.manifest.json +14 -5
- package/package.json +8 -10
|
@@ -12,7 +12,7 @@ export declare class Delete extends SfCommand<DeleteResult> {
|
|
|
12
12
|
message: string;
|
|
13
13
|
};
|
|
14
14
|
static readonly flags: {
|
|
15
|
-
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<string
|
|
15
|
+
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
16
16
|
targetdevhubusername: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
17
17
|
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
18
18
|
'no-prompt': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -9,19 +9,13 @@ exports.Delete = void 0;
|
|
|
9
9
|
*/
|
|
10
10
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
|
+
const flags_1 = require("../../../shared/flags");
|
|
12
13
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
14
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-org', 'delete');
|
|
14
15
|
class Delete extends sf_plugins_core_1.SfCommand {
|
|
15
16
|
async run() {
|
|
16
17
|
const { flags } = await this.parse(Delete);
|
|
17
|
-
const resolvedUsername =
|
|
18
|
-
// from -o alias -> -o username -> [default username]
|
|
19
|
-
(await core_1.StateAggregator.getInstance()).aliases.getUsername(flags['target-org'] ?? '') ??
|
|
20
|
-
flags['target-org'] ??
|
|
21
|
-
this.configAggregator.getPropertyValue('target-org');
|
|
22
|
-
if (!resolvedUsername) {
|
|
23
|
-
throw messages.createError('missingUsername');
|
|
24
|
-
}
|
|
18
|
+
const resolvedUsername = flags['target-org'];
|
|
25
19
|
const orgId = (await core_1.AuthInfo.create({ username: resolvedUsername })).getFields().orgId;
|
|
26
20
|
const isSandbox = await (await core_1.StateAggregator.getInstance()).sandboxes.hasFile(orgId);
|
|
27
21
|
// read the config file for the org to be deleted, if it has a PROD_ORG_USERNAME entry, it's a sandbox
|
|
@@ -70,13 +64,8 @@ Delete.deprecationOptions = {
|
|
|
70
64
|
message: messages.getMessage('deprecation'),
|
|
71
65
|
};
|
|
72
66
|
Delete.flags = {
|
|
73
|
-
'target-org':
|
|
74
|
-
|
|
75
|
-
aliases: ['targetusername', 'u'],
|
|
76
|
-
deprecateAliases: true,
|
|
77
|
-
// we're recreating the flag without all the validation
|
|
78
|
-
// eslint-disable-next-line sf-plugin/dash-o
|
|
79
|
-
char: 'o',
|
|
67
|
+
'target-org': (0, flags_1.orgThatMightBeDeleted)({
|
|
68
|
+
required: true,
|
|
80
69
|
summary: messages.getMessage('flags.target-org.summary'),
|
|
81
70
|
}),
|
|
82
71
|
targetdevhubusername: sf_plugins_core_1.Flags.string({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/force/org/delete.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iEAA4G;AAC5G,2CAAyF;
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/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C;QAClC,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;KACzD,CAAC;IACF,oBAAoB,EAAE,uBAAK,CAAC,MAAM,CAAC;QACjC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;QAC1D,IAAI,EAAE,GAAG;QACT,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE;YACV,OAAO,EAAE,MAAM;YACf,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;SAC3D;KACF,CAAC;IACF,aAAa,EAAE,mDAAiC;IAChD,WAAW,EAAE,uBAAK,CAAC,OAAO,CAAC;QACzB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAC9C,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,CAAC,UAAU,CAAC;KACtB,CAAC;IACF,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
|
@@ -8,18 +8,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
*/
|
|
9
9
|
const core_1 = require("@salesforce/core");
|
|
10
10
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const flags_1 = require("../../../shared/flags");
|
|
11
12
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
12
13
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-org', 'delete_sandbox');
|
|
13
14
|
class EnvDeleteSandbox extends sf_plugins_core_1.SfCommand {
|
|
14
15
|
async run() {
|
|
15
16
|
const flags = (await this.parse(EnvDeleteSandbox)).flags;
|
|
16
|
-
const username =
|
|
17
|
-
(await core_1.StateAggregator.getInstance()).aliases.getUsername(flags['target-org'] ?? '') ??
|
|
18
|
-
flags['target-org'] ??
|
|
19
|
-
this.configAggregator.getPropertyValue('target-org');
|
|
20
|
-
if (!username) {
|
|
21
|
-
throw new core_1.SfError('The org does not have a username.');
|
|
22
|
-
}
|
|
17
|
+
const username = flags['target-org'];
|
|
23
18
|
const orgId = (await core_1.AuthInfo.create({ username })).getFields().orgId;
|
|
24
19
|
const isSandbox = await (await core_1.StateAggregator.getInstance()).sandboxes.hasFile(orgId);
|
|
25
20
|
if (!isSandbox) {
|
|
@@ -57,10 +52,7 @@ EnvDeleteSandbox.examples = messages.getMessages('examples');
|
|
|
57
52
|
EnvDeleteSandbox.aliases = ['env:delete:sandbox'];
|
|
58
53
|
EnvDeleteSandbox.deprecateAliases = true;
|
|
59
54
|
EnvDeleteSandbox.flags = {
|
|
60
|
-
'target-org':
|
|
61
|
-
// we're recreating the flag without all the validation
|
|
62
|
-
// eslint-disable-next-line sf-plugin/dash-o
|
|
63
|
-
char: 'o',
|
|
55
|
+
'target-org': (0, flags_1.orgThatMightBeDeleted)({
|
|
64
56
|
summary: messages.getMessage('flags.target-org.summary'),
|
|
65
57
|
required: true,
|
|
66
58
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/sandbox.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/sandbox.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,2CAAyF;AACzF,iEAA+D;AAC/D,iDAA8D;AAE9D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,CAAC;AAOnF,MAAqB,gBAAiB,SAAQ,2BAAgC;IAiBrE,KAAK,CAAC,GAAG;QACd,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC;QACzD,MAAM,QAAQ,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC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iB,EAAE;oBAC7D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;iBACxE;qBAAM;oBACL,MAAM,CAAC,CAAC;iBACT;aACF;SACF;QACD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;;AAhDH,mCAiDC;AAhDwB,wBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,4BAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,yBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAC5C,wBAAO,GAAG,CAAC,oBAAoB,CAAC,CAAC;AACjC,iCAAgB,GAAG,IAAI,CAAC;AACxB,sBAAK,GAAG;IAC7B,YAAY,EAAE,IAAA,6BAAqB,EAAC;QAClC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;QACxD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,WAAW,EAAE,uBAAK,CAAC,OAAO,CAAC;QACzB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;KACxD,CAAC;CACH,CAAC"}
|
|
@@ -10,7 +10,7 @@ export default class EnvDeleteScratch extends SfCommand<ScratchDeleteResponse> {
|
|
|
10
10
|
static readonly aliases: string[];
|
|
11
11
|
static readonly deprecateAliases = true;
|
|
12
12
|
static readonly flags: {
|
|
13
|
-
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<string
|
|
13
|
+
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
14
|
'no-prompt': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
};
|
|
16
16
|
run(): Promise<ScratchDeleteResponse>;
|
|
@@ -8,16 +8,13 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const core_1 = require("@salesforce/core");
|
|
10
10
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const flags_1 = require("../../../shared/flags");
|
|
11
12
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
12
13
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-org', 'delete_scratch');
|
|
13
14
|
class EnvDeleteScratch extends sf_plugins_core_1.SfCommand {
|
|
14
15
|
async run() {
|
|
15
16
|
const flags = (await this.parse(EnvDeleteScratch)).flags;
|
|
16
|
-
const resolvedUsername =
|
|
17
|
-
// from -o alias -> -o username -> [default username]
|
|
18
|
-
(await core_1.StateAggregator.getInstance()).aliases.getUsername(flags['target-org'] ?? '') ??
|
|
19
|
-
flags['target-org'] ??
|
|
20
|
-
this.configAggregator.getPropertyValue('target-org');
|
|
17
|
+
const resolvedUsername = flags['target-org'];
|
|
21
18
|
const orgId = (await core_1.AuthInfo.create({ username: resolvedUsername })).getFields().orgId;
|
|
22
19
|
if (flags['no-prompt'] || (await this.confirm(messages.getMessage('prompt.confirm', [resolvedUsername])))) {
|
|
23
20
|
try {
|
|
@@ -52,14 +49,9 @@ EnvDeleteScratch.examples = messages.getMessages('examples');
|
|
|
52
49
|
EnvDeleteScratch.aliases = ['env:delete:scratch'];
|
|
53
50
|
EnvDeleteScratch.deprecateAliases = true;
|
|
54
51
|
EnvDeleteScratch.flags = {
|
|
55
|
-
'target-org':
|
|
56
|
-
// not required because the user could be assuming the default config
|
|
57
|
-
aliases: ['targetusername', 'u'],
|
|
58
|
-
deprecateAliases: true,
|
|
59
|
-
// we're recreating the flag without all the validation
|
|
60
|
-
// eslint-disable-next-line sf-plugin/dash-o
|
|
61
|
-
char: 'o',
|
|
52
|
+
'target-org': (0, flags_1.orgThatMightBeDeleted)({
|
|
62
53
|
summary: messages.getMessage('flags.target-org.summary'),
|
|
54
|
+
required: true,
|
|
63
55
|
}),
|
|
64
56
|
'no-prompt': sf_plugins_core_1.Flags.boolean({
|
|
65
57
|
char: 'p',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/scratch.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,
|
|
1
|
+
{"version":3,"file":"scratch.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/scratch.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAAwE;AACxE,iEAA+D;AAC/D,iDAA8D;AAE9D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,CAAC;AAOnF,MAAqB,gBAAiB,SAAQ,2BAAgC;IAiBrE,KAAK,CAAC,GAAG;QACd,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC;QACzD,MAAM,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;QAC7C,MAAM,KAAK,GAAG,CAAC,MAAM,eAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,KAAe,CAAC;QAElG,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE;YACzG,IAAI;gBACF,MAAM,GAAG,GAAG,MAAM,UAAG,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC,CAAC;gBAEpE,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;gBACnB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,SA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AQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;QACxD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,WAAW,EAAE,uBAAK,CAAC,OAAO,CAAC;QACzB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;KACxD,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Almost like the use case for the normal optional org flag,
|
|
3
|
+
* but delete commands need to handle the situation where connecting to the org fails because it's expired.
|
|
4
|
+
*
|
|
5
|
+
* Returns the username so you can construct your own org.
|
|
6
|
+
*/
|
|
7
|
+
export declare const orgThatMightBeDeleted: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string, Record<string, unknown>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.orgThatMightBeDeleted = void 0;
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
const core_2 = require("@salesforce/core");
|
|
12
|
+
core_2.Messages.importMessagesDirectory(__dirname);
|
|
13
|
+
const messages = core_2.Messages.loadMessages('@salesforce/plugin-org', 'delete');
|
|
14
|
+
const resolveUsername = async (usernameOrAlias) => {
|
|
15
|
+
const stateAggregator = await core_2.StateAggregator.getInstance();
|
|
16
|
+
// we have a value, but don't know if it's a username or an alias
|
|
17
|
+
if (usernameOrAlias)
|
|
18
|
+
return stateAggregator.aliases.resolveUsername(usernameOrAlias);
|
|
19
|
+
// we didn't get a value, so let's see if the config has a default target org
|
|
20
|
+
const configAggregator = await core_2.ConfigAggregator.create();
|
|
21
|
+
const defaultUsernameOrAlias = configAggregator.getPropertyValue('target-org');
|
|
22
|
+
if (defaultUsernameOrAlias)
|
|
23
|
+
return stateAggregator.aliases.resolveUsername(defaultUsernameOrAlias);
|
|
24
|
+
throw new core_2.SfError(messages.getMessage('missingUsername'), 'MissingUsernameError');
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Almost like the use case for the normal optional org flag,
|
|
28
|
+
* but delete commands need to handle the situation where connecting to the org fails because it's expired.
|
|
29
|
+
*
|
|
30
|
+
* Returns the username so you can construct your own org.
|
|
31
|
+
*/
|
|
32
|
+
exports.orgThatMightBeDeleted = core_1.Flags.custom({
|
|
33
|
+
char: 'o',
|
|
34
|
+
required: true,
|
|
35
|
+
deprecateAliases: true,
|
|
36
|
+
aliases: ['targetusername', 'u'],
|
|
37
|
+
parse: async (input) => resolveUsername(input),
|
|
38
|
+
default: async () => resolveUsername(),
|
|
39
|
+
defaultHelp: async () => resolveUsername(),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flags.js","sourceRoot":"","sources":["../../src/shared/flags.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sCAAoC;AACpC,2CAAwF;AAExF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;AAE3E,MAAM,eAAe,GAAG,KAAK,EAAE,eAAwB,EAAmB,EAAE;IAC1E,MAAM,eAAe,GAAG,MAAM,sBAAe,CAAC,WAAW,EAAE,CAAC;IAC5D,iEAAiE;IACjE,IAAI,eAAe;QAAE,OAAO,eAAe,CAAC,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IACrF,6EAA6E;IAC7E,MAAM,gBAAgB,GAAG,MAAM,uBAAgB,CAAC,MAAM,EAAE,CAAC;IACzD,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,YAAY,CAAuB,CAAC;IACrG,IAAI,sBAAsB;QAAE,OAAO,eAAe,CAAC,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;IACnG,MAAM,IAAI,cAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,sBAAsB,CAAC,CAAC;AACpF,CAAC,CAAC;AAEF;;;;;GAKG;AACU,QAAA,qBAAqB,GAAG,YAAK,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,IAAI;IACd,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,CAAC,gBAAgB,EAAE,GAAG,CAAC;IAChC,KAAK,EAAE,KAAK,EAAE,KAAyB,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC;IAClE,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,eAAe,EAAE;IACtC,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,eAAe,EAAE;CAC3C,CAAC,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.6.
|
|
2
|
+
"version": "2.6.12",
|
|
3
3
|
"commands": {
|
|
4
4
|
"org:display": {
|
|
5
5
|
"id": "org:display",
|
|
@@ -545,6 +545,7 @@
|
|
|
545
545
|
"type": "option",
|
|
546
546
|
"char": "o",
|
|
547
547
|
"summary": "Username or alias of the target org.",
|
|
548
|
+
"required": true,
|
|
548
549
|
"multiple": false,
|
|
549
550
|
"aliases": [
|
|
550
551
|
"targetusername",
|
|
@@ -592,7 +593,8 @@
|
|
|
592
593
|
}
|
|
593
594
|
}
|
|
594
595
|
},
|
|
595
|
-
"args": {}
|
|
596
|
+
"args": {},
|
|
597
|
+
"hasDynamicHelp": true
|
|
596
598
|
},
|
|
597
599
|
"force:org:status": {
|
|
598
600
|
"id": "force:org:status",
|
|
@@ -1033,7 +1035,11 @@
|
|
|
1033
1035
|
"summary": "Sandbox alias or login user.",
|
|
1034
1036
|
"required": true,
|
|
1035
1037
|
"multiple": false,
|
|
1036
|
-
"deprecateAliases": true
|
|
1038
|
+
"deprecateAliases": true,
|
|
1039
|
+
"aliases": [
|
|
1040
|
+
"targetusername",
|
|
1041
|
+
"u"
|
|
1042
|
+
]
|
|
1037
1043
|
},
|
|
1038
1044
|
"no-prompt": {
|
|
1039
1045
|
"name": "no-prompt",
|
|
@@ -1044,7 +1050,8 @@
|
|
|
1044
1050
|
"deprecateAliases": true
|
|
1045
1051
|
}
|
|
1046
1052
|
},
|
|
1047
|
-
"args": {}
|
|
1053
|
+
"args": {},
|
|
1054
|
+
"hasDynamicHelp": true
|
|
1048
1055
|
},
|
|
1049
1056
|
"org:delete:scratch": {
|
|
1050
1057
|
"id": "org:delete:scratch",
|
|
@@ -1077,6 +1084,7 @@
|
|
|
1077
1084
|
"type": "option",
|
|
1078
1085
|
"char": "o",
|
|
1079
1086
|
"summary": "Scratch org alias or login user.",
|
|
1087
|
+
"required": true,
|
|
1080
1088
|
"multiple": false,
|
|
1081
1089
|
"deprecateAliases": true,
|
|
1082
1090
|
"aliases": [
|
|
@@ -1093,7 +1101,8 @@
|
|
|
1093
1101
|
"deprecateAliases": true
|
|
1094
1102
|
}
|
|
1095
1103
|
},
|
|
1096
|
-
"args": {}
|
|
1104
|
+
"args": {},
|
|
1105
|
+
"hasDynamicHelp": true
|
|
1097
1106
|
},
|
|
1098
1107
|
"org:list:metadata-types": {
|
|
1099
1108
|
"id": "org:list:metadata-types",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-org",
|
|
3
3
|
"description": "Commands to interact with Salesforce orgs",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.12",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@salesforce/core": "^3.34.6",
|
|
11
11
|
"@salesforce/kit": "^1.9.2",
|
|
12
12
|
"@salesforce/sf-plugins-core": "^2.2.7",
|
|
13
|
-
"@salesforce/source-deploy-retrieve": "^
|
|
13
|
+
"@salesforce/source-deploy-retrieve": "^8.0.1",
|
|
14
14
|
"open": "^8.4.2",
|
|
15
15
|
"tslib": "^2"
|
|
16
16
|
},
|
|
@@ -24,12 +24,10 @@
|
|
|
24
24
|
"@salesforce/prettier-config": "^0.0.2",
|
|
25
25
|
"@salesforce/ts-sinon": "1.4.6",
|
|
26
26
|
"@swc/core": "1.3.39",
|
|
27
|
-
"@types/chai-as-promised": "^7.1.5",
|
|
28
27
|
"@types/shelljs": "^0.8.10",
|
|
29
28
|
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
|
30
29
|
"@typescript-eslint/parser": "^5.57.1",
|
|
31
30
|
"chai": "^4.3.7",
|
|
32
|
-
"chai-as-promised": "^7.1.1",
|
|
33
31
|
"eslint": "^8.38.0",
|
|
34
32
|
"eslint-config-prettier": "^8.6.0",
|
|
35
33
|
"eslint-config-salesforce": "^1.1.1",
|
|
@@ -40,7 +38,7 @@
|
|
|
40
38
|
"eslint-plugin-jsdoc": "^40.0.3",
|
|
41
39
|
"eslint-plugin-sf-plugin": "^1.14.0",
|
|
42
40
|
"husky": "^7.0.4",
|
|
43
|
-
"mocha": "^
|
|
41
|
+
"mocha": "^10.2.0",
|
|
44
42
|
"moment": "^2.29.1",
|
|
45
43
|
"nyc": "^15.1.0",
|
|
46
44
|
"oclif": "^3.7.3",
|
|
@@ -121,9 +119,9 @@
|
|
|
121
119
|
"prepack": "sf-prepack",
|
|
122
120
|
"prepare": "sf-install",
|
|
123
121
|
"test": "wireit",
|
|
124
|
-
"test:nuts": "nyc mocha \"./test/nut/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --jobs
|
|
125
|
-
"test:nuts:legacy": "nyc mocha \"./test/nut/legacy/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --jobs
|
|
126
|
-
"test:nuts:sandbox": "nyc mocha \"./test/**/*.sandboxNut.ts\" --slow 450000 --timeout 7200000 --parallel --jobs
|
|
122
|
+
"test:nuts": "nyc mocha \"./test/nut/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --jobs 5",
|
|
123
|
+
"test:nuts:legacy": "nyc mocha \"./test/nut/legacy/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --jobs 5",
|
|
124
|
+
"test:nuts:sandbox": "nyc mocha \"./test/**/*.sandboxNut.ts\" --slow 450000 --timeout 7200000 --parallel --jobs 5",
|
|
127
125
|
"test:only": "wireit",
|
|
128
126
|
"test:watch": "mocha --watch \"./test/**/*.test.ts\"",
|
|
129
127
|
"version": "oclif readme"
|
|
@@ -237,7 +235,7 @@
|
|
|
237
235
|
}
|
|
238
236
|
},
|
|
239
237
|
"sfdx": {
|
|
240
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/2.6.
|
|
241
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/2.6.
|
|
238
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/2.6.12.crt",
|
|
239
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/2.6.12.sig"
|
|
242
240
|
}
|
|
243
241
|
}
|