@salesforce/plugin-org 2.2.23 → 2.2.25
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/README.md +4 -0
- package/lib/commands/force/org/clone.d.ts +21 -9
- package/lib/commands/force/org/clone.js +50 -82
- package/lib/commands/force/org/clone.js.map +1 -1
- package/lib/commands/force/org/create.d.ts +27 -12
- package/lib/commands/force/org/create.js +85 -105
- package/lib/commands/force/org/create.js.map +1 -1
- package/lib/commands/force/org/delete.d.ts +14 -7
- package/lib/commands/force/org/delete.js +26 -16
- package/lib/commands/force/org/delete.js.map +1 -1
- package/lib/commands/force/org/status.d.ts +18 -6
- package/lib/commands/force/org/status.js +43 -37
- package/lib/commands/force/org/status.js.map +1 -1
- package/lib/commands/org/create/sandbox.d.ts +40 -0
- package/lib/commands/org/create/sandbox.js +244 -0
- package/lib/commands/org/create/sandbox.js.map +1 -0
- package/lib/commands/org/create/scratch.d.ts +30 -0
- package/lib/commands/org/create/scratch.js +183 -0
- package/lib/commands/org/create/scratch.js.map +1 -0
- package/lib/commands/org/delete/sandbox.d.ts +18 -0
- package/lib/commands/org/delete/sandbox.js +59 -0
- package/lib/commands/org/delete/sandbox.js.map +1 -0
- package/lib/commands/org/delete/scratch.d.ts +18 -0
- package/lib/commands/org/delete/scratch.js +52 -0
- package/lib/commands/org/delete/scratch.js.map +1 -0
- package/lib/commands/org/display.d.ts +20 -0
- package/lib/commands/{force/org → org}/display.js +38 -27
- package/lib/commands/org/display.js.map +1 -0
- package/lib/commands/org/list.d.ts +26 -0
- package/lib/commands/org/list.js +192 -0
- package/lib/commands/org/list.js.map +1 -0
- package/lib/commands/org/open.d.ts +25 -0
- package/lib/commands/{force/org → org}/open.js +47 -33
- package/lib/commands/org/open.js.map +1 -0
- package/lib/commands/org/resume/sandbox.d.ts +26 -0
- package/lib/commands/org/resume/sandbox.js +199 -0
- package/lib/commands/org/resume/sandbox.js.map +1 -0
- package/lib/commands/org/resume/scratch.d.ts +14 -0
- package/lib/commands/org/resume/scratch.js +61 -0
- package/lib/commands/org/resume/scratch.js.map +1 -0
- package/lib/shared/orgHighlighter.d.ts +2 -2
- package/lib/shared/orgHighlighter.js +7 -5
- package/lib/shared/orgHighlighter.js.map +1 -1
- package/lib/shared/orgHooks.d.ts +24 -0
- package/lib/shared/orgHooks.js +9 -0
- package/lib/shared/orgHooks.js.map +1 -0
- package/lib/shared/orgListUtil.d.ts +15 -25
- package/lib/shared/orgListUtil.js +71 -81
- package/lib/shared/orgListUtil.js.map +1 -1
- package/lib/shared/orgTypes.d.ts +39 -11
- package/lib/shared/sandboxCommandBase.d.ts +33 -0
- package/lib/shared/sandboxCommandBase.js +168 -0
- package/lib/shared/sandboxCommandBase.js.map +1 -0
- package/lib/shared/sandboxProgress.d.ts +28 -0
- package/lib/shared/sandboxProgress.js +104 -0
- package/lib/shared/sandboxProgress.js.map +1 -0
- package/lib/shared/sandboxReporter.d.ts +1 -1
- package/lib/shared/sandboxRequest.d.ts +9 -0
- package/lib/shared/sandboxRequest.js +58 -0
- package/lib/shared/sandboxRequest.js.map +1 -0
- package/lib/shared/scratchOrgOutput.d.ts +9 -0
- package/lib/shared/scratchOrgOutput.js +47 -0
- package/lib/shared/scratchOrgOutput.js.map +1 -0
- package/lib/shared/stagedProgress.d.ts +33 -0
- package/lib/shared/stagedProgress.js +98 -0
- package/lib/shared/stagedProgress.js.map +1 -0
- package/lib/shared/timeUtils.d.ts +10 -0
- package/lib/shared/timeUtils.js +37 -0
- package/lib/shared/timeUtils.js.map +1 -0
- package/lib/shared/utils.d.ts +1 -1
- package/lib/shared/utils.js.map +1 -1
- package/messages/clone.md +67 -0
- package/messages/create.md +125 -0
- package/messages/create.sandbox.md +123 -0
- package/messages/create_scratch.md +109 -0
- package/messages/delete.md +47 -0
- package/messages/delete_sandbox.md +46 -0
- package/messages/delete_scratch.md +42 -0
- package/messages/display.md +33 -0
- package/messages/list.md +65 -0
- package/messages/messages.md +81 -0
- package/messages/open.md +63 -0
- package/messages/resume.sandbox.md +71 -0
- package/messages/resume_scratch.md +41 -0
- package/messages/sandboxbase.md +17 -0
- package/messages/status.md +33 -0
- package/oclif.manifest.json +1194 -1
- package/package.json +138 -28
- package/lib/commands/force/org/display.d.ts +0 -11
- package/lib/commands/force/org/display.js.map +0 -1
- package/lib/commands/force/org/list.d.ts +0 -15
- package/lib/commands/force/org/list.js +0 -191
- package/lib/commands/force/org/list.js.map +0 -1
- package/lib/commands/force/org/open.d.ts +0 -15
- package/lib/commands/force/org/open.js.map +0 -1
- package/messages/clone.json +0 -24
- package/messages/create.json +0 -37
- package/messages/delete.json +0 -13
- package/messages/display.json +0 -11
- package/messages/list.json +0 -19
- package/messages/messages.json +0 -24
- package/messages/open.json +0 -19
- package/messages/status.json +0 -13
package/README.md
CHANGED
|
@@ -74,6 +74,10 @@ sfdx plugins:link .
|
|
|
74
74
|
sfdx plugins
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
### Sandbox NUTs
|
|
78
|
+
|
|
79
|
+
Sandboxes are pretty slow, and there's a constraint to how many we can have. So if your changes might impact sandboxes, and you want to check those in the real world, run the [SandboxNuts](https://github.com/salesforcecli/plugin-org/actions/workflows/sandboxNuts.yml) Github Action.
|
|
80
|
+
|
|
77
81
|
## Commands
|
|
78
82
|
|
|
79
83
|
<!-- commands -->
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { SandboxProcessObject } from '@salesforce/core';
|
|
3
|
+
export declare class OrgCloneCommand extends SfCommand<SandboxProcessObject> {
|
|
3
4
|
static readonly examples: string[];
|
|
5
|
+
static readonly summary: string;
|
|
4
6
|
static readonly description: string;
|
|
5
|
-
static readonly
|
|
6
|
-
static
|
|
7
|
-
static
|
|
7
|
+
static readonly strict = false;
|
|
8
|
+
static state: string;
|
|
9
|
+
static deprecationOptions: {
|
|
10
|
+
to: string;
|
|
11
|
+
version: string;
|
|
12
|
+
};
|
|
8
13
|
static readonly SANDBOXDEF_SRC_SANDBOXNAME = "SourceSandboxName";
|
|
9
|
-
static readonly
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
static readonly flags: {
|
|
15
|
+
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org>;
|
|
16
|
+
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
17
|
+
type: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
18
|
+
definitionfile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
19
|
+
setdefaultusername: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
setalias: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
21
|
+
wait: import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/kit").Duration | undefined>;
|
|
22
|
+
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
23
|
+
};
|
|
24
|
+
run(): Promise<SandboxProcessObject>;
|
|
13
25
|
}
|
|
@@ -7,129 +7,97 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.OrgCloneCommand = void 0;
|
|
10
|
-
const
|
|
11
|
-
const fs = require("fs");
|
|
12
|
-
const command_1 = require("@salesforce/command");
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
13
11
|
const core_1 = require("@salesforce/core");
|
|
14
|
-
const
|
|
15
|
-
const utils_1 = require("../../../shared/utils");
|
|
12
|
+
const sandboxRequest_1 = require("../../../shared/sandboxRequest");
|
|
16
13
|
const sandboxReporter_1 = require("../../../shared/sandboxReporter");
|
|
17
14
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
15
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-org', 'clone');
|
|
19
|
-
class OrgCloneCommand extends
|
|
16
|
+
class OrgCloneCommand extends sf_plugins_core_1.SfCommand {
|
|
20
17
|
async run() {
|
|
18
|
+
const { flags, args, argv } = await this.parse(OrgCloneCommand);
|
|
19
|
+
const logger = await core_1.Logger.child(this.constructor.name);
|
|
20
|
+
const varargs = (0, sf_plugins_core_1.parseVarArgs)(args, argv);
|
|
21
21
|
const lifecycle = core_1.Lifecycle.getInstance();
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
29
|
-
lifecycle.on(core_1.SandboxEvents.EVENT_STATUS, async (results) => {
|
|
30
|
-
this.ux.log(sandboxReporter_1.SandboxReporter.sandboxProgress(results));
|
|
31
|
-
});
|
|
22
|
+
if (flags.type === core_1.OrgTypes.Sandbox) {
|
|
23
|
+
lifecycle.on(core_1.SandboxEvents.EVENT_ASYNC_RESULT, async (results) =>
|
|
24
|
+
// Keep all console output in the command
|
|
25
|
+
Promise.resolve(this.log(messages.getMessage('commandSuccess', [results.Id, results.SandboxName]))));
|
|
26
|
+
lifecycle.on(core_1.SandboxEvents.EVENT_STATUS, async (results) => Promise.resolve(this.log(sandboxReporter_1.SandboxReporter.sandboxProgress(results))));
|
|
32
27
|
lifecycle.on(core_1.SandboxEvents.EVENT_RESULT, async (results) => {
|
|
33
28
|
const { sandboxReadyForUse, data } = sandboxReporter_1.SandboxReporter.logSandboxProcessResult(results);
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
29
|
+
this.log(sandboxReadyForUse);
|
|
30
|
+
this.styledHeader('Sandbox Org Cloning Status');
|
|
31
|
+
this.table(data, {
|
|
37
32
|
key: { header: 'Name' },
|
|
38
33
|
value: { header: 'Value' },
|
|
39
34
|
});
|
|
40
35
|
if (results?.sandboxRes?.authUserName) {
|
|
41
|
-
if (
|
|
36
|
+
if (flags.setalias) {
|
|
42
37
|
const stateAggregator = await core_1.StateAggregator.getInstance();
|
|
43
|
-
stateAggregator.aliases.set(
|
|
38
|
+
stateAggregator.aliases.set(flags.setalias, results.sandboxRes.authUserName);
|
|
44
39
|
const result = stateAggregator.aliases.getAll();
|
|
45
|
-
|
|
40
|
+
logger.debug('Set Alias: %s result: %s', flags.setalias, result);
|
|
46
41
|
}
|
|
47
|
-
if (
|
|
42
|
+
if (flags.setdefaultusername) {
|
|
48
43
|
const globalConfig = this.configAggregator.getGlobalConfig();
|
|
49
44
|
globalConfig.set(core_1.OrgConfigProperties.TARGET_ORG, results.sandboxRes.authUserName);
|
|
50
45
|
const result = await globalConfig.write();
|
|
51
|
-
|
|
46
|
+
logger.debug('Set defaultUsername: %s result: %s', flags.setdefaultusername, result);
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
49
|
});
|
|
55
|
-
const { sandboxReq, srcSandboxName } =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return
|
|
50
|
+
const { sandboxReq, srcSandboxName } = await (0, sandboxRequest_1.createSandboxRequest)(true, flags.definitionfile, logger, varargs);
|
|
51
|
+
logger.debug('Calling clone with SandboxRequest: %s and SandboxName: %s ', sandboxReq, srcSandboxName);
|
|
52
|
+
flags['target-org'].getConnection(flags['api-version']);
|
|
53
|
+
return flags['target-org'].cloneSandbox(sandboxReq, srcSandboxName, { wait: flags.wait });
|
|
59
54
|
}
|
|
60
55
|
else {
|
|
61
56
|
throw new core_1.SfError(messages.getMessage('commandOrganizationTypeNotSupport', [core_1.OrgTypes.Sandbox]), messages.getMessage('commandOrganizationTypeNotSupportAction', [core_1.OrgTypes.Sandbox]));
|
|
62
57
|
}
|
|
63
58
|
}
|
|
64
|
-
createSandboxRequest() {
|
|
65
|
-
this.logger.debug('Clone started with args %s ', this.flags);
|
|
66
|
-
this.logger.debug('Clone Varargs: %s ', this.varargs);
|
|
67
|
-
let sandboxDefFileContents = this.readJsonDefFile();
|
|
68
|
-
let capitalizedVarArgs = {};
|
|
69
|
-
if (sandboxDefFileContents) {
|
|
70
|
-
sandboxDefFileContents = (0, utils_1.lowerToUpper)(sandboxDefFileContents);
|
|
71
|
-
}
|
|
72
|
-
if (this.varargs) {
|
|
73
|
-
capitalizedVarArgs = (0, utils_1.lowerToUpper)(this.varargs);
|
|
74
|
-
}
|
|
75
|
-
// varargs override file input
|
|
76
|
-
const sandboxReq = { SandboxName: undefined, ...sandboxDefFileContents, ...capitalizedVarArgs };
|
|
77
|
-
this.logger.debug('SandboxRequest after merging DefFile and Varargs: %s ', sandboxReq);
|
|
78
|
-
// try to find the source sandbox name either from the definition file or the commandline arg
|
|
79
|
-
// NOTE the name and the case "SourceSandboxName" must match exactly
|
|
80
|
-
const srcSandboxName = sandboxReq[OrgCloneCommand.SANDBOXDEF_SRC_SANDBOXNAME];
|
|
81
|
-
if (srcSandboxName) {
|
|
82
|
-
// we have to delete this property from the sandboxRequest object,
|
|
83
|
-
// because sandboxRequest object represent the POST request to create SandboxInfo bpo,
|
|
84
|
-
// sandboxInfo does not have a column named SourceSandboxName, this field will be converted to sourceId in the clone call below
|
|
85
|
-
delete sandboxReq[OrgCloneCommand.SANDBOXDEF_SRC_SANDBOXNAME];
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
// error - we need SourceSandboxName to know which sandbox to clone from
|
|
89
|
-
throw new core_1.SfError(messages.getMessage('missingSourceSandboxName', [OrgCloneCommand.SANDBOXDEF_SRC_SANDBOXNAME]), messages.getMessage('missingSourceSandboxNameAction', [OrgCloneCommand.SANDBOXDEF_SRC_SANDBOXNAME]));
|
|
90
|
-
}
|
|
91
|
-
return { sandboxReq, srcSandboxName };
|
|
92
|
-
}
|
|
93
|
-
readJsonDefFile() {
|
|
94
|
-
// the -f option
|
|
95
|
-
if (this.flags.definitionfile) {
|
|
96
|
-
this.logger.debug('Reading JSON DefFile %s ', this.flags.definitionfile);
|
|
97
|
-
return JSON.parse(fs.readFileSync(this.flags.definitionfile, 'utf-8'));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
59
|
}
|
|
101
60
|
exports.OrgCloneCommand = OrgCloneCommand;
|
|
102
|
-
OrgCloneCommand.examples = messages.
|
|
61
|
+
OrgCloneCommand.examples = messages.getMessages('examples');
|
|
62
|
+
OrgCloneCommand.summary = messages.getMessage('summary');
|
|
103
63
|
OrgCloneCommand.description = messages.getMessage('description');
|
|
104
|
-
OrgCloneCommand.
|
|
105
|
-
OrgCloneCommand.
|
|
106
|
-
OrgCloneCommand.
|
|
64
|
+
OrgCloneCommand.strict = false;
|
|
65
|
+
OrgCloneCommand.state = 'deprecated';
|
|
66
|
+
OrgCloneCommand.deprecationOptions = {
|
|
67
|
+
to: 'org:create:sandbox',
|
|
68
|
+
version: '60.0',
|
|
69
|
+
};
|
|
107
70
|
OrgCloneCommand.SANDBOXDEF_SRC_SANDBOXNAME = 'SourceSandboxName';
|
|
108
|
-
OrgCloneCommand.
|
|
109
|
-
|
|
71
|
+
OrgCloneCommand.flags = {
|
|
72
|
+
'target-org': sf_plugins_core_1.requiredOrgFlagWithDeprecations,
|
|
73
|
+
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
|
74
|
+
type: sf_plugins_core_1.Flags.enum({
|
|
110
75
|
char: 't',
|
|
111
|
-
|
|
76
|
+
summary: messages.getMessage('flags.type'),
|
|
112
77
|
required: true,
|
|
113
78
|
options: ['sandbox'],
|
|
114
79
|
}),
|
|
115
|
-
definitionfile:
|
|
80
|
+
definitionfile: sf_plugins_core_1.Flags.file({
|
|
116
81
|
char: 'f',
|
|
117
|
-
|
|
82
|
+
exists: true,
|
|
83
|
+
summary: messages.getMessage('flags.definitionfile'),
|
|
118
84
|
}),
|
|
119
|
-
setdefaultusername:
|
|
85
|
+
setdefaultusername: sf_plugins_core_1.Flags.boolean({
|
|
120
86
|
char: 's',
|
|
121
|
-
|
|
87
|
+
summary: messages.getMessage('flags.setdefaultusername'),
|
|
122
88
|
}),
|
|
123
|
-
setalias:
|
|
89
|
+
setalias: sf_plugins_core_1.Flags.string({
|
|
124
90
|
char: 'a',
|
|
125
|
-
|
|
91
|
+
summary: messages.getMessage('flags.setalias'),
|
|
126
92
|
}),
|
|
127
|
-
wait:
|
|
93
|
+
wait: sf_plugins_core_1.Flags.duration({
|
|
94
|
+
unit: 'minutes',
|
|
128
95
|
char: 'w',
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
min:
|
|
132
|
-
|
|
96
|
+
summary: messages.getMessage('flags.wait'),
|
|
97
|
+
description: messages.getMessage('flagsLong.wait'),
|
|
98
|
+
min: 2,
|
|
99
|
+
defaultValue: 6,
|
|
133
100
|
}),
|
|
101
|
+
loglevel: sf_plugins_core_1.loglevel,
|
|
134
102
|
};
|
|
135
103
|
//# sourceMappingURL=clone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../../../src/commands/force/org/clone.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../../../src/commands/force/org/clone.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iEAOqC;AACrC,2CAa0B;AAC1B,mEAAsE;AACtE,qEAAkE;AAElE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;AAE1E,MAAa,eAAgB,SAAQ,2BAA+B;IA6C3D,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,MAAM,aAAM,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzD,MAAM,OAAO,GAAG,IAAA,8BAAY,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEzC,MA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IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC;QAC1C,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAClD,GAAG,EAAE,CAAC;QACN,YAAY,EAAE,CAAC;KAChB,CAAC;IACF,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Interfaces } from '@oclif/core';
|
|
2
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import { AuthFields, OrgTypes, SandboxProcessObject, ScratchOrgInfo } from '@salesforce/core';
|
|
3
4
|
export interface ScratchOrgProcessObject {
|
|
4
5
|
username?: string;
|
|
5
6
|
scratchOrgInfo: ScratchOrgInfo;
|
|
@@ -7,20 +8,34 @@ export interface ScratchOrgProcessObject {
|
|
|
7
8
|
warnings: string[];
|
|
8
9
|
orgId: string;
|
|
9
10
|
}
|
|
10
|
-
export
|
|
11
|
+
export type CreateResult = ScratchOrgProcessObject | SandboxProcessObject;
|
|
12
|
+
export declare class Create extends SfCommand<CreateResult> {
|
|
13
|
+
static readonly summary: string;
|
|
11
14
|
static readonly description: string;
|
|
12
15
|
static readonly examples: string[];
|
|
13
|
-
static readonly
|
|
14
|
-
static readonly
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
static readonly strict = false;
|
|
17
|
+
static readonly flags: {
|
|
18
|
+
'target-org': Interfaces.OptionFlag<import("@salesforce/core").Org | undefined>;
|
|
19
|
+
'target-dev-hub': Interfaces.OptionFlag<import("@salesforce/core").Org | undefined>;
|
|
20
|
+
'api-version': Interfaces.OptionFlag<string | undefined>;
|
|
21
|
+
loglevel: Interfaces.OptionFlag<string | undefined>;
|
|
22
|
+
type: Interfaces.OptionFlag<OrgTypes>;
|
|
23
|
+
definitionfile: Interfaces.OptionFlag<string | undefined>;
|
|
24
|
+
nonamespace: Interfaces.BooleanFlag<boolean>;
|
|
25
|
+
noancestors: Interfaces.BooleanFlag<boolean>;
|
|
26
|
+
clientid: Interfaces.OptionFlag<string | undefined>;
|
|
27
|
+
setdefaultusername: Interfaces.BooleanFlag<boolean>;
|
|
28
|
+
setalias: Interfaces.OptionFlag<string | undefined>;
|
|
29
|
+
wait: Interfaces.OptionFlag<import("@salesforce/kit").Duration | undefined>;
|
|
30
|
+
durationdays: Interfaces.OptionFlag<number>;
|
|
31
|
+
retry: Interfaces.OptionFlag<number>;
|
|
32
|
+
};
|
|
19
33
|
private sandboxAuth?;
|
|
20
|
-
|
|
34
|
+
private logger;
|
|
35
|
+
private varArgs;
|
|
36
|
+
private flags;
|
|
37
|
+
run(): Promise<CreateResult>;
|
|
21
38
|
private validateSandboxFlags;
|
|
22
|
-
private createSandboxRequest;
|
|
23
39
|
private createSandbox;
|
|
24
|
-
private readJsonDefFile;
|
|
25
40
|
private createScratchOrg;
|
|
26
41
|
}
|
|
@@ -7,23 +7,24 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.Create = void 0;
|
|
10
|
-
const
|
|
11
|
-
const fs = require("fs");
|
|
12
|
-
const command_1 = require("@salesforce/command");
|
|
13
|
-
const kit_1 = require("@salesforce/kit");
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
14
11
|
const core_1 = require("@salesforce/core");
|
|
15
|
-
const
|
|
12
|
+
const sandboxRequest_1 = require("../../../shared/sandboxRequest");
|
|
16
13
|
const sandboxReporter_1 = require("../../../shared/sandboxReporter");
|
|
17
14
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
15
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-org', 'create');
|
|
19
|
-
class Create extends
|
|
16
|
+
class Create extends sf_plugins_core_1.SfCommand {
|
|
20
17
|
constructor() {
|
|
21
18
|
super(...arguments);
|
|
22
|
-
this.
|
|
19
|
+
this.varArgs = {};
|
|
23
20
|
}
|
|
24
21
|
async run() {
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const { flags, args, argv } = await this.parse(Create);
|
|
23
|
+
this.flags = flags;
|
|
24
|
+
this.varArgs = (0, sf_plugins_core_1.parseVarArgs)(args, argv);
|
|
25
|
+
this.logger = await core_1.Logger.child(this.constructor.name);
|
|
26
|
+
this.logger.debug('Create started with args %s ', flags);
|
|
27
|
+
if (flags.type === core_1.OrgTypes.Sandbox) {
|
|
27
28
|
this.validateSandboxFlags();
|
|
28
29
|
return this.createSandbox();
|
|
29
30
|
}
|
|
@@ -33,70 +34,40 @@ class Create extends command_1.SfdxCommand {
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
validateSandboxFlags() {
|
|
36
|
-
if (!this.flags.targetusername) {
|
|
37
|
-
throw new core_1.SfError(messages.getMessage('requiresUsername'));
|
|
38
|
-
}
|
|
39
37
|
if (this.flags.retry !== 0) {
|
|
40
38
|
throw new core_1.SfError(messages.getMessage('retryIsNotValidForSandboxes'), 'retryIsNotValidForSandboxes');
|
|
41
39
|
}
|
|
42
40
|
if (this.flags.clientid) {
|
|
43
|
-
this.
|
|
41
|
+
this.warn(messages.getMessage('clientIdNotSupported', [this.flags.clientid]));
|
|
44
42
|
}
|
|
45
43
|
if (this.flags.nonamespace) {
|
|
46
|
-
this.
|
|
44
|
+
this.warn(messages.getMessage('noNamespaceNotSupported', [this.flags.nonamespace]));
|
|
47
45
|
}
|
|
48
46
|
if (this.flags.noancestors) {
|
|
49
|
-
this.
|
|
47
|
+
this.warn(messages.getMessage('noAncestorsNotSupported', [this.flags.noancestors]));
|
|
50
48
|
}
|
|
51
49
|
if (this.flags.durationdays) {
|
|
52
|
-
this.
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
createSandboxRequest() {
|
|
56
|
-
this.logger.debug('Create Varargs: %s ', this.varargs);
|
|
57
|
-
let sandboxDefFileContents = this.readJsonDefFile();
|
|
58
|
-
let capitalizedVarArgs = {};
|
|
59
|
-
if (sandboxDefFileContents) {
|
|
60
|
-
sandboxDefFileContents = (0, utils_1.lowerToUpper)(sandboxDefFileContents);
|
|
50
|
+
this.warn(messages.getMessage('durationDaysNotSupported', [this.flags.durationdays]));
|
|
61
51
|
}
|
|
62
|
-
if (this.varargs) {
|
|
63
|
-
capitalizedVarArgs = (0, utils_1.lowerToUpper)(this.varargs);
|
|
64
|
-
}
|
|
65
|
-
// varargs override file input
|
|
66
|
-
const sandboxReq = { SandboxName: undefined, ...sandboxDefFileContents, ...capitalizedVarArgs };
|
|
67
|
-
if (!sandboxReq.SandboxName) {
|
|
68
|
-
// sandbox names are 10 chars or less, a radix of 36 = [a-z][0-9]
|
|
69
|
-
// technically without querying the production org, the generated name could already exist, but the chances of that are lower than the perf penalty of querying and verifying
|
|
70
|
-
sandboxReq.SandboxName = `sbx${Date.now().toString(36).slice(-7)}`;
|
|
71
|
-
this.ux.warn(`No SandboxName defined, generating new SandboxName: ${sandboxReq.SandboxName}`);
|
|
72
|
-
}
|
|
73
|
-
if (!sandboxReq.LicenseType) {
|
|
74
|
-
throw new core_1.SfError(messages.getMessage('missingLicenseType'));
|
|
75
|
-
}
|
|
76
|
-
return sandboxReq;
|
|
77
52
|
}
|
|
78
53
|
async createSandbox() {
|
|
79
|
-
|
|
54
|
+
if (!this.flags['target-org']) {
|
|
55
|
+
throw new core_1.SfError(messages.getMessage('requiresUsername'));
|
|
56
|
+
}
|
|
80
57
|
const lifecycle = core_1.Lifecycle.getInstance();
|
|
58
|
+
const username = this.flags['target-org'].getUsername();
|
|
81
59
|
// register the sandbox event listeners before calling `prodOrg.createSandbox()`
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
lifecycle.on(core_1.SandboxEvents.EVENT_ASYNC_RESULT, async (results) => {
|
|
85
|
-
this.ux.log(messages.getMessage('sandboxSuccess', [results.Id, results.SandboxName, this.flags.targetusername]));
|
|
86
|
-
});
|
|
87
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
88
|
-
lifecycle.on(core_1.SandboxEvents.EVENT_STATUS, async (results) => {
|
|
89
|
-
this.ux.log(sandboxReporter_1.SandboxReporter.sandboxProgress(results));
|
|
90
|
-
});
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
60
|
+
lifecycle.on(core_1.SandboxEvents.EVENT_ASYNC_RESULT, async (results) => Promise.resolve(this.log(messages.getMessage('sandboxSuccess', [results.Id, results.SandboxName, username]))));
|
|
61
|
+
lifecycle.on(core_1.SandboxEvents.EVENT_STATUS, async (results) => Promise.resolve(this.log(sandboxReporter_1.SandboxReporter.sandboxProgress(results))));
|
|
92
62
|
lifecycle.on(core_1.SandboxEvents.EVENT_AUTH, async (results) => {
|
|
93
63
|
this.sandboxAuth = results;
|
|
64
|
+
return Promise.resolve();
|
|
94
65
|
});
|
|
95
66
|
lifecycle.on(core_1.SandboxEvents.EVENT_RESULT, async (results) => {
|
|
96
67
|
const { sandboxReadyForUse, data } = sandboxReporter_1.SandboxReporter.logSandboxProcessResult(results);
|
|
97
|
-
this.
|
|
98
|
-
this.
|
|
99
|
-
this.
|
|
68
|
+
this.log(sandboxReadyForUse);
|
|
69
|
+
this.styledHeader('Sandbox Org Creation Status');
|
|
70
|
+
this.table(data, {
|
|
100
71
|
key: { header: 'Name' },
|
|
101
72
|
value: { header: 'Value' },
|
|
102
73
|
});
|
|
@@ -115,11 +86,11 @@ class Create extends command_1.SfdxCommand {
|
|
|
115
86
|
}
|
|
116
87
|
}
|
|
117
88
|
});
|
|
118
|
-
const sandboxReq =
|
|
89
|
+
const { sandboxReq } = await (0, sandboxRequest_1.createSandboxRequest)(false, this.flags.definitionfile, this.logger, this.varArgs);
|
|
119
90
|
this.logger.debug('Calling create with SandboxRequest: %s ', sandboxReq);
|
|
120
91
|
const wait = this.flags.wait;
|
|
121
92
|
try {
|
|
122
|
-
return await
|
|
93
|
+
return await this.flags['target-org'].createSandbox(sandboxReq, { wait });
|
|
123
94
|
}
|
|
124
95
|
catch (e) {
|
|
125
96
|
// guaranteed to be SfdxError from core;
|
|
@@ -144,31 +115,24 @@ class Create extends command_1.SfdxCommand {
|
|
|
144
115
|
throw err;
|
|
145
116
|
}
|
|
146
117
|
}
|
|
147
|
-
readJsonDefFile() {
|
|
148
|
-
// the -f option
|
|
149
|
-
if (this.flags.definitionfile) {
|
|
150
|
-
this.logger.debug('Reading JSON DefFile %s ', this.flags.definitionfile);
|
|
151
|
-
return JSON.parse(fs.readFileSync(this.flags.definitionfile, 'utf-8'));
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
118
|
async createScratchOrg() {
|
|
155
119
|
this.logger.debug('OK, will do scratch org creation');
|
|
156
|
-
if (!this.
|
|
120
|
+
if (!this.flags['target-dev-hub']) {
|
|
157
121
|
throw new core_1.SfError(messages.getMessage('RequiresDevhubUsernameError'));
|
|
158
122
|
}
|
|
159
123
|
// Ensure we have an org config input source.
|
|
160
|
-
if (!this.flags.definitionfile && Object.keys(this.
|
|
124
|
+
if (!this.flags.definitionfile && Object.keys(this.varArgs).length === 0) {
|
|
161
125
|
throw new core_1.SfError(messages.getMessage('noConfig'));
|
|
162
126
|
}
|
|
163
127
|
this.logger.debug('validation complete');
|
|
164
128
|
// If the user supplied a specific client ID, we have no way of knowing if it's
|
|
165
129
|
// a certificate-based Connected App or not. Therefore, we have to assume that
|
|
166
130
|
// we'll need the client secret, so prompt the user for it.
|
|
167
|
-
const
|
|
168
|
-
? await this.
|
|
169
|
-
type: 'mask',
|
|
170
|
-
|
|
171
|
-
: undefined;
|
|
131
|
+
const { clientSecret } = this.flags.clientid
|
|
132
|
+
? await this.prompt([
|
|
133
|
+
{ name: 'clientSecret', type: 'mask', message: messages.getMessage('secretPrompt') },
|
|
134
|
+
])
|
|
135
|
+
: { clientSecret: undefined };
|
|
172
136
|
const createCommandOptions = {
|
|
173
137
|
connectedAppConsumerKey: this.flags.clientid,
|
|
174
138
|
durationDays: this.flags.durationdays,
|
|
@@ -176,22 +140,28 @@ class Create extends command_1.SfdxCommand {
|
|
|
176
140
|
noancestors: this.flags.noancestors,
|
|
177
141
|
wait: this.flags.wait,
|
|
178
142
|
retry: this.flags.retry,
|
|
179
|
-
apiversion: this.flags
|
|
143
|
+
apiversion: this.flags['api-version'],
|
|
180
144
|
definitionfile: this.flags.definitionfile,
|
|
181
|
-
orgConfig: this.
|
|
182
|
-
clientSecret
|
|
145
|
+
orgConfig: this.varArgs,
|
|
146
|
+
clientSecret,
|
|
183
147
|
setDefault: this.flags.setdefaultusername === true,
|
|
184
148
|
alias: this.flags.setalias,
|
|
185
149
|
tracksSource: true,
|
|
186
150
|
};
|
|
187
|
-
const { username, scratchOrgInfo, authFields, warnings } = await this.
|
|
151
|
+
const { username, scratchOrgInfo, authFields, warnings } = await this.flags['target-dev-hub'].scratchOrgCreate(createCommandOptions);
|
|
152
|
+
if (!scratchOrgInfo) {
|
|
153
|
+
throw new core_1.SfError('No scratch org info returned from scratchOrgCreate');
|
|
154
|
+
}
|
|
155
|
+
if (!authFields || !authFields.orgId) {
|
|
156
|
+
throw new core_1.SfError('Information missing from authFields');
|
|
157
|
+
}
|
|
188
158
|
await core_1.Lifecycle.getInstance().emit('scratchOrgInfo', scratchOrgInfo);
|
|
189
|
-
this.logger.debug(`orgConfig.loginUrl: ${authFields
|
|
190
|
-
this.logger.debug(`orgConfig.instanceUrl: ${authFields
|
|
191
|
-
this.
|
|
159
|
+
this.logger.debug(`orgConfig.loginUrl: ${authFields?.loginUrl}`);
|
|
160
|
+
this.logger.debug(`orgConfig.instanceUrl: ${authFields?.instanceUrl}`);
|
|
161
|
+
this.log(messages.getMessage('scratchOrgCreateSuccess', [authFields?.orgId, username]));
|
|
192
162
|
if (warnings.length > 0) {
|
|
193
163
|
warnings.forEach((warning) => {
|
|
194
|
-
this.
|
|
164
|
+
this.warn(warning);
|
|
195
165
|
});
|
|
196
166
|
}
|
|
197
167
|
return {
|
|
@@ -199,66 +169,76 @@ class Create extends command_1.SfdxCommand {
|
|
|
199
169
|
scratchOrgInfo,
|
|
200
170
|
authFields,
|
|
201
171
|
warnings,
|
|
202
|
-
orgId: authFields
|
|
172
|
+
orgId: authFields?.orgId,
|
|
203
173
|
};
|
|
204
174
|
}
|
|
205
175
|
}
|
|
206
176
|
exports.Create = Create;
|
|
177
|
+
Create.summary = messages.getMessage('summary');
|
|
207
178
|
Create.description = messages.getMessage('description');
|
|
208
|
-
Create.examples = messages.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
179
|
+
Create.examples = messages.getMessages('examples');
|
|
180
|
+
// waiting for oclif bug fix around missing config.id.
|
|
181
|
+
// public static state = 'deprecated';
|
|
182
|
+
// public static deprecationOptions = {
|
|
183
|
+
// message: messages.getMessage('deprecation'),
|
|
184
|
+
// };
|
|
185
|
+
// needed to allow varargs
|
|
186
|
+
Create.strict = false;
|
|
187
|
+
Create.flags = {
|
|
188
|
+
'target-org': sf_plugins_core_1.optionalOrgFlagWithDeprecations,
|
|
189
|
+
'target-dev-hub': sf_plugins_core_1.optionalHubFlagWithDeprecations,
|
|
190
|
+
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
|
191
|
+
loglevel: sf_plugins_core_1.loglevel,
|
|
192
|
+
type: sf_plugins_core_1.Flags.enum({
|
|
215
193
|
char: 't',
|
|
216
|
-
|
|
194
|
+
summary: messages.getMessage('flags.type'),
|
|
217
195
|
options: [core_1.OrgTypes.Scratch, core_1.OrgTypes.Sandbox],
|
|
218
196
|
default: core_1.OrgTypes.Scratch,
|
|
219
197
|
}),
|
|
220
|
-
definitionfile:
|
|
198
|
+
definitionfile: sf_plugins_core_1.Flags.file({
|
|
199
|
+
exists: true,
|
|
221
200
|
char: 'f',
|
|
222
|
-
|
|
201
|
+
summary: messages.getMessage('flags.definitionFile'),
|
|
223
202
|
}),
|
|
224
|
-
nonamespace:
|
|
203
|
+
nonamespace: sf_plugins_core_1.Flags.boolean({
|
|
225
204
|
char: 'n',
|
|
226
|
-
|
|
205
|
+
summary: messages.getMessage('flags.noNamespace'),
|
|
227
206
|
}),
|
|
228
|
-
noancestors:
|
|
207
|
+
noancestors: sf_plugins_core_1.Flags.boolean({
|
|
229
208
|
char: 'c',
|
|
230
|
-
|
|
209
|
+
summary: messages.getMessage('flags.noAncestors'),
|
|
231
210
|
}),
|
|
232
|
-
clientid:
|
|
211
|
+
clientid: sf_plugins_core_1.Flags.string({
|
|
233
212
|
char: 'i',
|
|
234
|
-
|
|
213
|
+
summary: messages.getMessage('flags.clientId'),
|
|
235
214
|
}),
|
|
236
|
-
setdefaultusername:
|
|
215
|
+
setdefaultusername: sf_plugins_core_1.Flags.boolean({
|
|
237
216
|
char: 's',
|
|
238
|
-
|
|
217
|
+
summary: messages.getMessage('flags.setDefaultUsername'),
|
|
239
218
|
}),
|
|
240
|
-
setalias:
|
|
219
|
+
setalias: sf_plugins_core_1.Flags.string({
|
|
241
220
|
char: 'a',
|
|
242
|
-
|
|
221
|
+
summary: messages.getMessage('flags.setAlias'),
|
|
243
222
|
}),
|
|
244
|
-
wait:
|
|
223
|
+
wait: sf_plugins_core_1.Flags.duration({
|
|
224
|
+
unit: 'minutes',
|
|
245
225
|
char: 'w',
|
|
246
|
-
|
|
226
|
+
summary: messages.getMessage('flags.wait'),
|
|
247
227
|
min: 6,
|
|
248
|
-
|
|
228
|
+
defaultValue: 6,
|
|
249
229
|
}),
|
|
250
|
-
durationdays:
|
|
230
|
+
durationdays: sf_plugins_core_1.Flags.integer({
|
|
251
231
|
char: 'd',
|
|
252
|
-
|
|
232
|
+
summary: messages.getMessage('flags.durationDays'),
|
|
253
233
|
min: 1,
|
|
254
234
|
max: 30,
|
|
255
235
|
default: 7,
|
|
256
236
|
}),
|
|
257
|
-
retry:
|
|
237
|
+
retry: sf_plugins_core_1.Flags.integer({
|
|
258
238
|
hidden: true,
|
|
259
239
|
default: 0,
|
|
260
240
|
max: 10,
|
|
261
|
-
|
|
241
|
+
summary: messages.getMessage('flags.retry'),
|
|
262
242
|
}),
|
|
263
243
|
};
|
|
264
244
|
//# sourceMappingURL=create.js.map
|