@salesforce/plugin-org 4.8.1 → 5.0.0

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/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": "4.8.1",
4
+ "version": "5.0.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -9,7 +9,7 @@
9
9
  "@oclif/multi-stage-output": "^0.7.7",
10
10
  "@salesforce/core": "^8.6.3",
11
11
  "@salesforce/kit": "^3.2.3",
12
- "@salesforce/sf-plugins-core": "^12.0.6",
12
+ "@salesforce/sf-plugins-core": "^12.0.9",
13
13
  "@salesforce/source-deploy-retrieve": "^12.8.1",
14
14
  "ansis": "^3.2.0",
15
15
  "change-case": "^5.4.4",
@@ -80,14 +80,6 @@
80
80
  }
81
81
  },
82
82
  "external": true
83
- },
84
- "force": {
85
- "external": true,
86
- "subtopics": {
87
- "org": {
88
- "description": "Manage your sandbox and scratch orgs."
89
- }
90
- }
91
83
  }
92
84
  },
93
85
  "flexibleTaxonomy": true,
@@ -108,7 +100,6 @@
108
100
  "prepare": "sf-install",
109
101
  "test": "wireit",
110
102
  "test:nuts": "nyc mocha \"./test/nut/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --jobs 2",
111
- "test:nuts:legacy": "nyc mocha \"./test/nut/legacy/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --jobs 5",
112
103
  "test:nuts:sandbox": "nyc mocha \"./test/**/*.sandboxNut.ts\" --slow 450000 --timeout 7200000 --parallel --jobs 5",
113
104
  "test:only": "wireit",
114
105
  "test:watch": "mocha --watch \"./test/**/*.test.ts\"",
@@ -235,7 +226,7 @@
235
226
  "exports": "./lib/index.js",
236
227
  "type": "module",
237
228
  "sfdx": {
238
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.8.1.crt",
239
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.8.1.sig"
229
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/5.0.0.crt",
230
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/5.0.0.sig"
240
231
  }
241
232
  }
@@ -1,76 +0,0 @@
1
- import Interfaces from '@oclif/core/interfaces';
2
- import { SfCommand } from '@salesforce/sf-plugins-core';
3
- import { AuthFields, OrgTypes, SandboxProcessObject, ScratchOrgInfo } from '@salesforce/core';
4
- export type ScratchOrgProcessObject = {
5
- username?: string;
6
- scratchOrgInfo: ScratchOrgInfo;
7
- authFields?: AuthFields;
8
- warnings: string[];
9
- orgId: string;
10
- };
11
- export type CreateResult = ScratchOrgProcessObject | SandboxProcessObject;
12
- export declare class Create extends SfCommand<CreateResult> {
13
- static readonly summary: string;
14
- static readonly description: string;
15
- static readonly examples: string[];
16
- static state: string;
17
- static readonly hidden = true;
18
- static deprecationOptions: {
19
- message: string;
20
- };
21
- static readonly strict = false;
22
- static readonly flags: {
23
- 'target-org': {
24
- summary: string;
25
- name: string;
26
- char?: Interfaces.AlphabetLowercase | Interfaces.AlphabetUppercase;
27
- description?: string;
28
- helpLabel?: string;
29
- helpGroup?: string;
30
- env?: string;
31
- hidden?: boolean;
32
- required?: boolean;
33
- dependsOn?: string[];
34
- exclusive?: string[];
35
- exactlyOne?: string[];
36
- relationships?: import("node_modules/@oclif/core/lib/interfaces/parser.js").Relationship[];
37
- deprecated?: true | Interfaces.Deprecation;
38
- aliases?: string[];
39
- charAliases?: (Interfaces.AlphabetLowercase | Interfaces.AlphabetUppercase)[];
40
- deprecateAliases?: boolean;
41
- noCacheDefault?: boolean;
42
- type: "option";
43
- helpValue?: string | string[];
44
- options?: readonly string[];
45
- multiple?: boolean;
46
- multipleNonGreedy?: boolean;
47
- delimiter?: ",";
48
- allowStdin?: boolean | "only";
49
- parse: import("node_modules/@oclif/core/lib/interfaces/parser.js").FlagParser<import("@salesforce/core").Org | undefined, string, Interfaces.CustomOptions>;
50
- defaultHelp?: import("node_modules/@oclif/core/lib/interfaces/parser.js").FlagDefaultHelp<import("@salesforce/core").Org, Interfaces.CustomOptions> | undefined;
51
- input: string[];
52
- default?: import("node_modules/@oclif/core/lib/interfaces/parser.js").FlagDefault<import("@salesforce/core").Org | undefined, Interfaces.CustomOptions>;
53
- };
54
- 'target-dev-hub': Interfaces.OptionFlag<import("@salesforce/core").Org | undefined, Interfaces.CustomOptions>;
55
- 'api-version': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
56
- loglevel: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
57
- type: Interfaces.OptionFlag<OrgTypes, Interfaces.CustomOptions>;
58
- definitionfile: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
59
- nonamespace: Interfaces.BooleanFlag<boolean>;
60
- noancestors: Interfaces.BooleanFlag<boolean>;
61
- clientid: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
62
- setdefaultusername: Interfaces.BooleanFlag<boolean>;
63
- setalias: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
64
- wait: Interfaces.OptionFlag<import("@salesforce/kit").Duration, Interfaces.CustomOptions>;
65
- durationdays: Interfaces.OptionFlag<number, Interfaces.CustomOptions>;
66
- retry: Interfaces.OptionFlag<number, Interfaces.CustomOptions>;
67
- };
68
- private sandboxAuth?;
69
- private logger;
70
- private varArgs;
71
- private flags;
72
- run(): Promise<CreateResult>;
73
- private validateSandboxFlags;
74
- private createSandbox;
75
- private createScratchOrg;
76
- }
@@ -1,241 +0,0 @@
1
- /*
2
- * Copyright (c) 2021, salesforce.com, inc.
3
- * All rights reserved.
4
- * Licensed under the BSD 3-Clause license.
5
- * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
- */
7
- import { Flags, loglevel, optionalHubFlagWithDeprecations, optionalOrgFlagWithDeprecations, orgApiVersionFlagWithDeprecations, parseVarArgs, SfCommand, } from '@salesforce/sf-plugins-core';
8
- import { Lifecycle, Logger, Messages, OrgConfigProperties, OrgTypes, SandboxEvents, SfError, StateAggregator, } from '@salesforce/core';
9
- import requestFunctions from '../../../shared/sandboxRequest.js';
10
- import { SandboxReporter } from '../../../shared/sandboxReporter.js';
11
- Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
12
- const messages = Messages.loadMessages('@salesforce/plugin-org', 'create');
13
- export class Create extends SfCommand {
14
- static summary = messages.getMessage('summary');
15
- static description = messages.getMessage('description');
16
- static examples = messages.getMessages('examples');
17
- static state = 'deprecated';
18
- static hidden = true;
19
- static deprecationOptions = {
20
- message: messages.getMessage('deprecation'),
21
- };
22
- // needed to allow varargs
23
- static strict = false;
24
- static flags = {
25
- 'target-org': {
26
- ...optionalOrgFlagWithDeprecations,
27
- summary: messages.getMessage('flags.targetOrg.summary'),
28
- },
29
- 'target-dev-hub': optionalHubFlagWithDeprecations,
30
- 'api-version': orgApiVersionFlagWithDeprecations,
31
- loglevel,
32
- type: Flags.custom({
33
- options: [OrgTypes.Scratch, OrgTypes.Sandbox],
34
- })({
35
- char: 't',
36
- summary: messages.getMessage('flags.type.summary'),
37
- default: OrgTypes.Scratch,
38
- }),
39
- definitionfile: Flags.file({
40
- exists: true,
41
- char: 'f',
42
- summary: messages.getMessage('flags.definitionfile.summary'),
43
- }),
44
- nonamespace: Flags.boolean({
45
- char: 'n',
46
- summary: messages.getMessage('flags.nonamespace.summary'),
47
- }),
48
- noancestors: Flags.boolean({
49
- char: 'c',
50
- summary: messages.getMessage('flags.noancestors.summary'),
51
- }),
52
- clientid: Flags.string({
53
- char: 'i',
54
- summary: messages.getMessage('flags.clientid.summary'),
55
- }),
56
- setdefaultusername: Flags.boolean({
57
- char: 's',
58
- summary: messages.getMessage('flags.setdefaultusername.summary'),
59
- }),
60
- setalias: Flags.string({
61
- char: 'a',
62
- summary: messages.getMessage('flags.setalias.summary'),
63
- }),
64
- wait: Flags.duration({
65
- unit: 'minutes',
66
- char: 'w',
67
- summary: messages.getMessage('flags.wait.summary'),
68
- min: 6,
69
- defaultValue: 6,
70
- }),
71
- durationdays: Flags.integer({
72
- char: 'd',
73
- summary: messages.getMessage('flags.durationdays.summary'),
74
- min: 1,
75
- max: 30,
76
- default: 7,
77
- }),
78
- retry: Flags.integer({
79
- hidden: true,
80
- default: 0,
81
- max: 10,
82
- summary: messages.getMessage('flags.retry.summary'),
83
- }),
84
- };
85
- sandboxAuth;
86
- logger;
87
- varArgs = {};
88
- flags;
89
- async run() {
90
- const { flags, args, argv } = await this.parse(Create);
91
- this.flags = flags;
92
- this.varArgs = parseVarArgs(args, argv);
93
- this.logger = await Logger.child(this.constructor.name);
94
- if (flags.type === OrgTypes.Sandbox) {
95
- this.validateSandboxFlags();
96
- return this.createSandbox();
97
- }
98
- else {
99
- // default to scratch org
100
- return this.createScratchOrg();
101
- }
102
- }
103
- validateSandboxFlags() {
104
- if (this.flags.retry !== 0) {
105
- throw new SfError(messages.getMessage('retryIsNotValidForSandboxes'), 'retryIsNotValidForSandboxes');
106
- }
107
- if (this.flags.clientid) {
108
- this.warn(messages.getMessage('clientIdNotSupported', [this.flags.clientid]));
109
- }
110
- if (this.flags.nonamespace) {
111
- this.warn(messages.getMessage('noNamespaceNotSupported', [this.flags.nonamespace]));
112
- }
113
- if (this.flags.noancestors) {
114
- this.warn(messages.getMessage('noAncestorsNotSupported', [this.flags.noancestors]));
115
- }
116
- if (this.flags.durationdays) {
117
- this.warn(messages.getMessage('durationDaysNotSupported', [this.flags.durationdays]));
118
- }
119
- }
120
- async createSandbox() {
121
- if (!this.flags['target-org']) {
122
- throw new SfError(messages.getMessage('requiresUsername', [this.config.bin]));
123
- }
124
- const lifecycle = Lifecycle.getInstance();
125
- const username = this.flags['target-org'].getUsername();
126
- // register the sandbox event listeners before calling `prodOrg.createSandbox()`
127
- lifecycle.on(SandboxEvents.EVENT_ASYNC_RESULT, async (results) => Promise.resolve(this.log(messages.getMessage('sandboxSuccess', [results.Id, this.config.bin, results.SandboxName, username]))));
128
- lifecycle.on(SandboxEvents.EVENT_STATUS, async (results) => Promise.resolve(this.log(SandboxReporter.sandboxProgress(results))));
129
- lifecycle.on(SandboxEvents.EVENT_AUTH, async (results) => {
130
- this.sandboxAuth = results;
131
- return Promise.resolve();
132
- });
133
- lifecycle.on(SandboxEvents.EVENT_RESULT, async (results) => {
134
- const { sandboxReadyForUse, data } = SandboxReporter.logSandboxProcessResult(results);
135
- this.log(sandboxReadyForUse);
136
- this.table({
137
- data,
138
- columns: [{ key: 'key', name: 'Name' }, 'value'],
139
- title: 'Sandbox Org Creation Status',
140
- });
141
- if (results.sandboxRes?.authUserName) {
142
- if (this.flags.setalias) {
143
- const stateAggregator = await StateAggregator.getInstance();
144
- await stateAggregator.aliases.setAndSave(this.flags.setalias, results.sandboxRes.authUserName);
145
- this.logger.debug('Set Alias: %s result: %s', this.flags.setalias, stateAggregator.aliases.getAll());
146
- }
147
- if (this.flags.setdefaultusername) {
148
- const globalConfig = this.configAggregator.getGlobalConfig();
149
- globalConfig.set(OrgConfigProperties.TARGET_ORG, results.sandboxRes.authUserName);
150
- const result = await globalConfig.write();
151
- this.logger.debug('Set defaultUsername: %s result: %s', this.flags.setdefaultusername, result);
152
- }
153
- }
154
- });
155
- const { sandboxReq } = await requestFunctions.createSandboxRequest(false, this.flags.definitionfile, this.logger, this.varArgs);
156
- this.logger.debug('Calling create with SandboxRequest: %s ', sandboxReq);
157
- const wait = this.flags.wait;
158
- try {
159
- return await this.flags['target-org'].createSandbox(sandboxReq, { wait });
160
- }
161
- catch (e) {
162
- // guaranteed to be SfError from core;
163
- const err = e;
164
- if (err?.message.includes('The org cannot be found')) {
165
- // there was most likely an issue with DNS when auth'ing to the new sandbox, but it was created.
166
- if (this.flags.setalias && this.sandboxAuth) {
167
- const stateAggregator = await StateAggregator.getInstance();
168
- await stateAggregator.aliases.setAndSave(this.flags.setalias, this.sandboxAuth.authUserName);
169
- this.logger.debug('Set Alias: %s result: %s', this.flags.setalias, stateAggregator.aliases.getAll());
170
- }
171
- if (this.flags.setdefaultusername && this.sandboxAuth) {
172
- const globalConfig = this.configAggregator.getGlobalConfig();
173
- globalConfig.set(OrgConfigProperties.TARGET_ORG, this.sandboxAuth.authUserName);
174
- const result = await globalConfig.write();
175
- this.logger.debug('Set defaultUsername: %s result: %s', this.flags.setdefaultusername, result);
176
- }
177
- err.actions = [
178
- messages.getMessage('dnsTimeout', [this.config.bin, this.config.bin]),
179
- messages.getMessage('partialSuccess', [this.config.bin, this.config.bin, this.config.bin]),
180
- ];
181
- err.exitCode = 68;
182
- }
183
- throw err;
184
- }
185
- }
186
- async createScratchOrg() {
187
- this.logger.debug('OK, will do scratch org creation');
188
- if (!this.flags['target-dev-hub']) {
189
- throw new SfError(messages.getMessage('RequiresDevhubUsernameError'));
190
- }
191
- // Ensure we have an org config input source.
192
- if (!this.flags.definitionfile && Object.keys(this.varArgs).length === 0) {
193
- throw new SfError(messages.getMessage('noConfig'));
194
- }
195
- this.logger.debug('validation complete');
196
- const createCommandOptions = {
197
- connectedAppConsumerKey: this.flags.clientid,
198
- durationDays: this.flags.durationdays,
199
- nonamespace: this.flags.nonamespace,
200
- noancestors: this.flags.noancestors,
201
- wait: this.flags.wait,
202
- retry: this.flags.retry,
203
- apiversion: this.flags['api-version'],
204
- definitionfile: this.flags.definitionfile,
205
- orgConfig: this.varArgs,
206
- // If the user supplied a specific client ID, we have no way of knowing if it's
207
- // a certificate-based Connected App or not. Therefore, we have to assume that
208
- // we'll need the client secret, so prompt the user for it.
209
- clientSecret: this.flags.clientid
210
- ? await this.secretPrompt({ message: messages.getMessage('secretPrompt') })
211
- : undefined,
212
- setDefault: this.flags.setdefaultusername === true,
213
- alias: this.flags.setalias,
214
- tracksSource: true,
215
- };
216
- const { username, scratchOrgInfo, authFields, warnings } = await this.flags['target-dev-hub'].scratchOrgCreate(createCommandOptions);
217
- if (!scratchOrgInfo) {
218
- throw new SfError('No scratch org info returned from scratchOrgCreate');
219
- }
220
- if (!authFields?.orgId) {
221
- throw new SfError('Information missing from authFields');
222
- }
223
- await Lifecycle.getInstance().emit('scratchOrgInfo', scratchOrgInfo);
224
- this.logger.debug(`orgConfig.loginUrl: ${authFields?.loginUrl ?? '<not found>'}`);
225
- this.logger.debug(`orgConfig.instanceUrl: ${authFields?.instanceUrl ?? '<not found>'}`);
226
- this.log(messages.getMessage('scratchOrgCreateSuccess', [authFields?.orgId, username]));
227
- if (warnings.length > 0) {
228
- warnings.forEach((warning) => {
229
- this.warn(warning);
230
- });
231
- }
232
- return {
233
- username,
234
- scratchOrgInfo,
235
- authFields,
236
- warnings,
237
- orgId: authFields?.orgId,
238
- };
239
- }
240
- }
241
- //# sourceMappingURL=create.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/force/org/create.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,KAAK,EACL,QAAQ,EACR,+BAA+B,EAC/B,+BAA+B,EAC/B,iCAAiC,EACjC,YAAY,EACZ,SAAS,GACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EAER,aAAa,EAKb,OAAO,EACP,eAAe,GAEhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;AAY3E,MAAM,OAAO,MAAO,SAAQ,SAAuB;IAC1C,MAAM,CAAU,OAAO,GAAG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,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAC5G,oBAAoB,CACrB,CAAC;QAEF,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,OAAO,CAAC,oDAAoD,CAAC,CAAC;QAC1E,CAAC;QACD,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC;YACvB,MAAM,IAAI,OAAO,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,SAAS,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;QAErE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,UAAU,EAAE,QAAQ,IAAI,aAAa,EAAE,CAAC,CAAC;QAClF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,UAAU,EAAE,WAAW,IAAI,aAAa,EAAE,CAAC,CAAC;QAExF,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QAExF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC3B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,QAAQ;YACR,cAAc;YACd,UAAU;YACV,QAAQ;YACR,KAAK,EAAE,UAAU,EAAE,KAAK;SACzB,CAAC;IACJ,CAAC"}
@@ -1,23 +0,0 @@
1
- import { SfCommand } from '@salesforce/sf-plugins-core';
2
- export type DeleteResult = {
3
- orgId: string;
4
- username: string;
5
- };
6
- export declare class Delete extends SfCommand<DeleteResult> {
7
- static readonly summary: string;
8
- static readonly description: string;
9
- static readonly examples: string[];
10
- static state: string;
11
- static readonly hidden = true;
12
- static deprecationOptions: {
13
- message: string;
14
- };
15
- static readonly flags: {
16
- 'target-org': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
17
- targetdevhubusername: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
- 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
- 'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
20
- loglevel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
- };
22
- run(): Promise<DeleteResult>;
23
- }
@@ -1,88 +0,0 @@
1
- /*
2
- * Copyright (c) 2020, salesforce.com, inc.
3
- * All rights reserved.
4
- * Licensed under the BSD 3-Clause license.
5
- * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
- */
7
- import { Flags, loglevel, orgApiVersionFlagWithDeprecations, SfCommand } from '@salesforce/sf-plugins-core';
8
- import { AuthInfo, AuthRemover, Messages, Org, StateAggregator } from '@salesforce/core';
9
- import { orgThatMightBeDeleted } from '../../../shared/flags.js';
10
- Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
11
- const messages = Messages.loadMessages('@salesforce/plugin-org', 'delete');
12
- export class Delete extends SfCommand {
13
- static summary = messages.getMessage('summary');
14
- static description = messages.getMessage('description');
15
- static examples = messages.getMessages('examples');
16
- static state = 'deprecated';
17
- static hidden = true;
18
- static deprecationOptions = {
19
- message: messages.getMessage('deprecation'),
20
- };
21
- static flags = {
22
- 'target-org': orgThatMightBeDeleted({
23
- required: true,
24
- summary: messages.getMessage('flags.target-org.summary'),
25
- }),
26
- targetdevhubusername: Flags.string({
27
- summary: messages.getMessage('flags.targetdevhubusername.summary'),
28
- char: 'v',
29
- hidden: true,
30
- deprecated: {
31
- version: '58.0',
32
- message: messages.getMessage('flags.targetdevhubusername.summary'),
33
- },
34
- }),
35
- 'api-version': orgApiVersionFlagWithDeprecations,
36
- 'no-prompt': Flags.boolean({
37
- char: 'p',
38
- summary: messages.getMessage('flags.no-prompt.summary'),
39
- deprecateAliases: true,
40
- aliases: ['noprompt'],
41
- }),
42
- loglevel,
43
- };
44
- async run() {
45
- const { flags } = await this.parse(Delete);
46
- const resolvedUsername = flags['target-org'];
47
- const orgId = (await AuthInfo.create({ username: resolvedUsername })).getFields().orgId;
48
- const isSandbox = await (await StateAggregator.getInstance()).sandboxes.hasFile(orgId);
49
- // read the config file for the org to be deleted, if it has a PROD_ORG_USERNAME entry, it's a sandbox
50
- // we either need permission to proceed without a prompt OR get the user to confirm
51
- if (flags['no-prompt'] ||
52
- (await this.confirm({
53
- message: messages.getMessage('confirmDelete', [isSandbox ? 'sandbox' : 'scratch', resolvedUsername]),
54
- }))) {
55
- let alreadyDeleted = false;
56
- let successMessageKey = 'commandSandboxSuccess';
57
- try {
58
- const org = await Org.create({ aliasOrUsername: resolvedUsername });
59
- // will determine if it's a scratch org or sandbox and will delete from the appropriate parent org (DevHub or Production)
60
- await org.delete();
61
- }
62
- catch (e) {
63
- if (e instanceof Error && e.name === 'DomainNotFoundError') {
64
- // the org has expired, so remote operations won't work
65
- // let's clean up the files locally
66
- const authRemover = await AuthRemover.create();
67
- await authRemover.removeAuth(resolvedUsername);
68
- }
69
- else if (e instanceof Error && e.name === 'ScratchOrgNotFound') {
70
- alreadyDeleted = true;
71
- }
72
- else if (e instanceof Error && e.name === 'SandboxNotFound') {
73
- successMessageKey = 'sandboxConfigOnlySuccess';
74
- }
75
- else {
76
- throw e;
77
- }
78
- }
79
- this.log(isSandbox
80
- ? messages.getMessage(successMessageKey, [resolvedUsername])
81
- : messages.getMessage(alreadyDeleted ? 'deleteOrgConfigOnlyCommandSuccess' : 'deleteOrgCommandSuccess', [
82
- resolvedUsername,
83
- ]));
84
- }
85
- return { username: resolvedUsername, orgId };
86
- }
87
- }
88
- //# sourceMappingURL=delete.js.map
@@ -1 +0,0 @@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MAAM,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC,CAAC;gBAEpE,yHAAyH;gBACzH,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;YACrB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;oBAC3D,uDAAuD;oBACvD,mCAAmC;oBACnC,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;oBAC/C,MAAM,WAAW,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;gBACjD,CAAC;qBAAM,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;oBACjE,cAAc,GAAG,IAAI,CAAC;gBACxB,CAAC;qBAAM,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;oBAC9D,iBAAiB,GAAG,0BAA0B,CAAC;gBACjD,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,CAAC;gBACV,CAAC;YACH,CAAC;YAED,IAAI,CAAC,GAAG,CACN,SAAS;gBACP,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,CAAC;gBAC5D,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,yBAAyB,EAAE;oBACpG,gBAAgB;iBACjB,CAAC,CACP,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC;IAC/C,CAAC"}
@@ -1,117 +0,0 @@
1
- # summary
2
-
3
- Create a scratch org or sandbox.
4
-
5
- # deprecation
6
-
7
- The force:org:create command is deprecated and will be removed on November 6, 2024. Use "org create scratch" or "org create sandbox" instead.
8
-
9
- # description
10
-
11
- Creates a scratch org or a sandbox org using the values specified in a configuration file or key=value pairs that you specify on the command line. Values specified on the command line override values in the configuration file. Specify a configuration file or provide key=value pairs while creating a scratch org or a sandbox. When creating scratch orgs, —targetdevhubusername (-v) must be a Dev Hub org. When creating sandboxes, the --targetusername (-u) must be a production org with sandbox licenses. The —type (-t) is required if creating a sandbox.
12
-
13
- # examples
14
-
15
- - $ <%= config.bin %> <%= command.id %> -f config/enterprise-scratch-def.json -a MyScratchOrg
16
-
17
- - $ <%= config.bin %> <%= command.id %> edition=Developer -a MyScratchOrg -s -v devHub
18
-
19
- - $ <%= config.bin %> <%= command.id %> -f config/enterprise-scratch-def.json -a ScratchOrgWithOverrides username=testuser1@mycompany.org
20
-
21
- - $ <%= config.bin %> <%= command.id %> -t sandbox -f config/dev-sandbox-def.json -a MyDevSandbox -u prodOrg
22
-
23
- # flags.clientid.summary
24
-
25
- Connected app consumer key; not supported for sandbox org creation.
26
-
27
- # flags.setdefaultusername.summary
28
-
29
- Set the created org as the default username.
30
-
31
- # flags.setalias.summary
32
-
33
- Alias for the created org.
34
-
35
- # flags.definitionfile.summary
36
-
37
- Path to an org definition file.
38
-
39
- # flags.nonamespace.summary
40
-
41
- Create the scratch org with no namespace.
42
-
43
- # flags.noancestors.summary
44
-
45
- Do not include second-generation package ancestors in the scratch org.
46
-
47
- # flags.type.summary
48
-
49
- Type of org to create.
50
-
51
- # flags.durationdays.summary
52
-
53
- Duration of the scratch org (in days) (default:7, min:1, max:30).
54
-
55
- # flags.retry.summary
56
-
57
- Number of scratch org auth retries after scratch org is successfully signed up.
58
-
59
- # flags.wait.summary
60
-
61
- Streaming client socket timeout (in minutes).
62
-
63
- # flags.targetOrg.summary
64
-
65
- Username or alias of the production org that contains the sandbox license.
66
-
67
- # scratchOrgCreateSuccess
68
-
69
- Successfully created scratch org: %s, username: %s.
70
-
71
- # clientIdNotSupported
72
-
73
- -i | --clientid is not supported for the sandbox org create command. Its value, %s, has been ignored.
74
-
75
- # noNamespaceNotSupported
76
-
77
- -n | --nonamespace is not supported for the sandbox org create command. Its value, %s, has been ignored.
78
-
79
- # noAncestorsNotSupported
80
-
81
- -c | --noancestors is not supported for the sandbox org create command. Its value, %s, has been ignored.
82
-
83
- # durationDaysNotSupported
84
-
85
- -d | --durationdays is not supported for the sandbox org create command. Its value, %s, has been ignored.
86
-
87
- # retryIsNotValidForSandboxes
88
-
89
- One cannot use flag retry with Sandbox org create.
90
-
91
- # sandboxSuccess
92
-
93
- The sandbox org creation process %s is in progress. Run "%s force:org:status -n %s -u %s" to check for status. If the org is ready, checking the status also authorizes the org for use with Salesforce CLI.
94
-
95
- # requiresUsername
96
-
97
- This command requires a username. Specify it with the -u parameter or with the "%s config set defaultusername=<username>" command.
98
-
99
- # dnsTimeout
100
-
101
- The sandbox was successfully created and authenticated. However, the sandbox DNS records aren't ready yet and so the sandbox may not be available. Run "%s org:list" and check if the sandbox is listed correctly. If it isn't listed, run "%s force:org:status" to view its status and, if necessary, authenticate to it again. If this issue happens frequently, try setting the SFDX_DNS_TIMEOUT environment variable to a larger number; the default value is 3 seconds.
102
-
103
- # partialSuccess
104
-
105
- If you specified the -a or -s parameters, but the sandbox wasn't immediately available, the "%s force:org:create" command may not have finished setting the alias or defaultusername. If so, set the alias manually with "%s alias:set" and the defaultusername with "%s config:set".
106
-
107
- # noConfig
108
-
109
- Please specify an org configuration via file and/or key=value pairs.
110
-
111
- # RequiresDevhubUsernameError
112
-
113
- This command requires a dev hub org username set either with a flag or by default in the config.
114
-
115
- # secretPrompt
116
-
117
- OAuth client secret of personal connected app?