@salesforce/plugin-signups 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,14 +2,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## 1.0.0 (2022-04-13)
5
+ ## 1.1.0 (2022-05-11)
6
6
 
7
7
  ### Features
8
8
 
9
+ - get and list ([5e53f0e](https://github.com/salesforcecli/plugin-signups/commit/5e53f0ec74060ceea0e98cbc4cf0b898c458b37c))
9
10
  - multiple aliases, omit property if none ([2fc3781](https://github.com/salesforcecli/plugin-signups/commit/2fc3781aedbd886e21ba1221c9e0d38a80e5c4c5))
11
+ - snapshots with nuts ([316131c](https://github.com/salesforcecli/plugin-signups/commit/316131cf617c40e7ba0b5c83ec3d5ffc653b6795))
10
12
 
11
13
  ### Bug Fixes
12
14
 
13
15
  - aliases might not exist ([aa18406](https://github.com/salesforcecli/plugin-signups/commit/aa18406fac59d8b317b5ca74cac83873d0257219))
14
16
  - exit delete command when no shapes are found ([274fb80](https://github.com/salesforcecli/plugin-signups/commit/274fb80a8288196e93b4888b53746ea7864519b8))
17
+ - forgot to import msg dir ([123ee51](https://github.com/salesforcecli/plugin-signups/commit/123ee517ddbaded43f1bb363cd2a8ad5b7ee7ee7))
18
+ - lastclonedby might be null ([b0009e2](https://github.com/salesforcecli/plugin-signups/commit/b0009e25aab781d50f1ff7d71c121ad2e26ef991))
15
19
  - look in all non-scratch orgs for ShapeRep ([36c804d](https://github.com/salesforcecli/plugin-signups/commit/36c804db25c49cf6bcf01ee50af60b28389a35a4))
20
+ - null handling ([b95ba88](https://github.com/salesforcecli/plugin-signups/commit/b95ba88876603b99c6741cfe51807653a065d491))
package/README.md CHANGED
@@ -81,6 +81,10 @@ sfdx plugins
81
81
  - [`sfdx force:org:shape:create [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgshapecreate--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
82
82
  - [`sfdx force:org:shape:delete [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgshapedelete--p--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
83
83
  - [`sfdx force:org:shape:list [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgshapelist---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
84
+ - [`sfdx force:org:snapshot:create -o <string> -n <string> [-d <string>] [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgsnapshotcreate--o-string--n-string--d-string--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
85
+ - [`sfdx force:org:snapshot:delete -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgsnapshotdelete--s-string--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
86
+ - [`sfdx force:org:snapshot:get -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgsnapshotget--s-string--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
87
+ - [`sfdx force:org:snapshot:list [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgsnapshotlist--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
84
88
 
85
89
  ## `sfdx force:org:shape:create [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
86
90
 
@@ -109,7 +113,7 @@ EXAMPLES
109
113
  $ sfdx force:org:shape:create -u me@my.org --json --loglevel debug
110
114
  ```
111
115
 
112
- _See code: [src/commands/force/org/shape/create.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.0.0/src/commands/force/org/shape/create.ts)_
116
+ _See code: [src/commands/force/org/shape/create.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.1.0/src/commands/force/org/shape/create.ts)_
113
117
 
114
118
  ## `sfdx force:org:shape:delete [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
115
119
 
@@ -143,7 +147,7 @@ EXAMPLES
143
147
  $ sfdx force:org:shape:delete -u me@my.org -p --json > tmp/MyOrgShapeDelete.json
144
148
  ```
145
149
 
146
- _See code: [src/commands/force/org/shape/delete.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.0.0/src/commands/force/org/shape/delete.ts)_
150
+ _See code: [src/commands/force/org/shape/delete.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.1.0/src/commands/force/org/shape/delete.ts)_
147
151
 
148
152
  ## `sfdx force:org:shape:list [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
149
153
 
@@ -172,6 +176,195 @@ EXAMPLES
172
176
  $ sfdx force:org:shape:list --json > tmp/MyOrgShapeList.json
173
177
  ```
174
178
 
175
- _See code: [src/commands/force/org/shape/list.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.0.0/src/commands/force/org/shape/list.ts)_
179
+ _See code: [src/commands/force/org/shape/list.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.1.0/src/commands/force/org/shape/list.ts)_
180
+
181
+ ## `sfdx force:org:snapshot:create -o <string> -n <string> [-d <string>] [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
182
+
183
+ create a snapshot of a scratch org
184
+
185
+ ```
186
+ USAGE
187
+ $ sfdx force:org:snapshot:create -o <string> -n <string> [-d <string>] [-v <string>] [--apiversion <string>] [--json]
188
+ [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
189
+
190
+ FLAGS
191
+ -d, --description=<value> description of snapshot
192
+ -n, --snapshotname=<value> (required) unique name of snapshot
193
+ -o, --sourceorg=<value> (required) ID or locally
194
+ authenticated username or alias of
195
+ scratch org to snapshot
196
+ -v, --targetdevhubusername=<value> username or alias for the dev hub
197
+ org; overrides default dev hub org
198
+ --apiversion=<value> override the api version used for
199
+ api requests made by this command
200
+ --json format output as json
201
+ --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
202
+ this command invocation
203
+
204
+ DESCRIPTION
205
+ create a snapshot of a scratch org
206
+
207
+ A snapshot is a point-in-time copy of a scratch org. The copy is stored in Salesforce and referenced by its unique
208
+ name in a scratch org definition file.
209
+
210
+ Use "sfdx force:org:snapshot:get" to get details, including status, about a snapshot creation request.
211
+
212
+ To create a scratch org from a snapshot, include the "snapshot" entry (instead of "edition") in the scratch org
213
+ definition file and set it to the name of the snapshot. Then use "sfdx force:org:create" to create the scratch org.
214
+
215
+ EXAMPLES
216
+ Create a snapshot called "Dependencies" using the source scratch org ID:
217
+
218
+
219
+
220
+ sfdx force:org:snapshot:create --sourceorg 00Dxx0000000000 --snapshotname Dependencies --description 'Contains PackageA v1.1.0'
221
+
222
+
223
+
224
+ Create a snapshot called "NightlyBranch" using the source scratch org username:
225
+
226
+
227
+
228
+ sfdx force:org:snapshot:create -o myuser@myorg -n NightlyBranch -d 'Contains PkgA v2.1.0 and PkgB 3.3.0'
229
+ ```
230
+
231
+ _See code: [src/commands/force/org/snapshot/create.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.1.0/src/commands/force/org/snapshot/create.ts)_
232
+
233
+ ## `sfdx force:org:snapshot:delete -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
234
+
235
+ delete a scratch org snapshot
236
+
237
+ ```
238
+ USAGE
239
+ $ sfdx force:org:snapshot:delete -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel
240
+ trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
241
+
242
+ FLAGS
243
+ -s, --snapshot=<value> (required) name or ID of snapshot to
244
+ delete
245
+ -v, --targetdevhubusername=<value> username or alias for the dev hub
246
+ org; overrides default dev hub org
247
+ --apiversion=<value> override the api version used for
248
+ api requests made by this command
249
+ --json format output as json
250
+ --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
251
+ this command invocation
252
+
253
+ DESCRIPTION
254
+ delete a scratch org snapshot
255
+
256
+ Dev Hub admins can delete any snapshot, while users can delete only theirs unless a Dev Hub admin gives the user
257
+ Modify All permissions.
258
+
259
+ EXAMPLES
260
+ Delete a snapshot from the default Dev Hub using the snapshot ID:
261
+
262
+
263
+
264
+ sfdx force:org:snapshot:delete --snapshot 0Oo...
265
+
266
+
267
+
268
+ Delete a snapshot from the specified Dev Hub using the snapshot name:
269
+
270
+
271
+
272
+ sfdx force:org:snapshot:delete -s BaseSnapshot -v SnapshotDevHub
273
+ ```
274
+
275
+ _See code: [src/commands/force/org/snapshot/delete.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.1.0/src/commands/force/org/snapshot/delete.ts)_
276
+
277
+ ## `sfdx force:org:snapshot:get -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
278
+
279
+ get details about a scratch org snapshot
280
+
281
+ ```
282
+ USAGE
283
+ $ sfdx force:org:snapshot:get -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel
284
+ trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
285
+
286
+ FLAGS
287
+ -s, --snapshot=<value> (required) name or ID of snapshot to
288
+ retrieve
289
+ -v, --targetdevhubusername=<value> username or alias for the dev hub
290
+ org; overrides default dev hub org
291
+ --apiversion=<value> override the api version used for
292
+ api requests made by this command
293
+ --json format output as json
294
+ --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
295
+ this command invocation
296
+
297
+ DESCRIPTION
298
+ get details about a scratch org snapshot
299
+
300
+ Snapshot creation can take a while. Use this command with the snapshot name or ID to check its creation status. Once
301
+ the status changes to Active, you can use the snapshot to create scratch orgs.
302
+
303
+ To create a snapshot, use the "sfdx force:org:snapshot:create" command. To retrieve a list of all snapshots, use "sfdx
304
+ force:org:snapshot:list".
305
+
306
+ EXAMPLES
307
+ Get snapshot details using its ID:
308
+
309
+
310
+
311
+ sfdx force:org:snapshot:get --snapshot 0Oo...
312
+
313
+
314
+
315
+ Get snapshot details using its name:
316
+
317
+
318
+
319
+ sfdx force:org:snapshot:get -s Dependencies
320
+ ```
321
+
322
+ _See code: [src/commands/force/org/snapshot/get.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.1.0/src/commands/force/org/snapshot/get.ts)_
323
+
324
+ ## `sfdx force:org:snapshot:list [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
325
+
326
+ list scratch org snapshots
327
+
328
+ ```
329
+ USAGE
330
+ $ sfdx force:org:snapshot:list [-v <string>] [--apiversion <string>] [--json] [--loglevel
331
+ trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
332
+
333
+ FLAGS
334
+ -v, --targetdevhubusername=<value> username or alias for the dev hub
335
+ org; overrides default dev hub org
336
+ --apiversion=<value> override the api version used for
337
+ api requests made by this command
338
+ --json format output as json
339
+ --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
340
+ this command invocation
341
+
342
+ DESCRIPTION
343
+ list scratch org snapshots
344
+
345
+ You can view all the snapshots in a Dev Hub that you have access to. If you’re an admin, you can see all snapshots
346
+ associated with the Dev Hub org. If you’re a user, you can see only your snapshots unless a Dev Hub admin gives you
347
+ View All permissions.
348
+
349
+ To create a snapshot, use the "sfdx force:org:snapshot:create" command. To get details about a snapshot request, use
350
+ "sfdx force:org:snapshot:get".
351
+
352
+ EXAMPLES
353
+ List snapshots in the default Dev Hub:
354
+
355
+
356
+
357
+ sfdx force:org:snapshot:list
358
+
359
+
360
+
361
+ List snapshots in the Dev Hub with the specified username:
362
+
363
+
364
+
365
+ sfdx force:org:snapshot:list -v OtherDevHub@example.com
366
+ ```
367
+
368
+ _See code: [src/commands/force/org/snapshot/list.ts](https://github.com/salesforcecli/plugin-signups/blob/v1.1.0/src/commands/force/org/snapshot/list.ts)_
176
369
 
177
370
  <!-- commandsstop -->
@@ -0,0 +1,9 @@
1
+ import { SfdxCommand, FlagsConfig } from '@salesforce/command';
2
+ import { OrgSnapshot } from '../../../../shared/snapshot';
3
+ export declare class SnapshotGet extends SfdxCommand {
4
+ static readonly description: string;
5
+ static readonly examples: string[];
6
+ static readonly requiresDevhubUsername = true;
7
+ static readonly flagsConfig: FlagsConfig;
8
+ run(): Promise<OrgSnapshot>;
9
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SnapshotGet = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const os_1 = require("os");
11
+ const command_1 = require("@salesforce/command");
12
+ const core_1 = require("@salesforce/core");
13
+ const snapshot_1 = require("../../../../shared/snapshot");
14
+ core_1.Messages.importMessagesDirectory(__dirname);
15
+ const messages = core_1.Messages.loadMessages('@salesforce/plugin-signups', 'snapshot.create');
16
+ class SnapshotGet extends command_1.SfdxCommand {
17
+ async run() {
18
+ var _a, _b;
19
+ // sourceorg might be a username or alias, but we need an orgId
20
+ let sourceOrgId = this.flags.sourceorg;
21
+ if (!sourceOrgId.startsWith('00D')) {
22
+ const globalInfo = await core_1.GlobalInfo.create();
23
+ const username = (_a = globalInfo.aliases.getValue(sourceOrgId)) !== null && _a !== void 0 ? _a : sourceOrgId;
24
+ sourceOrgId = (_b = globalInfo.orgs.get(username)) === null || _b === void 0 ? void 0 : _b.orgId;
25
+ }
26
+ const createResponse = await this.hubOrg
27
+ .getConnection()
28
+ .sobject('OrgSnapshot')
29
+ .create({
30
+ SourceOrg: sourceOrgId,
31
+ Description: this.flags.description,
32
+ SnapshotName: this.flags.snapshotname,
33
+ Content: 'metadatadata',
34
+ });
35
+ const result = await (0, snapshot_1.queryByNameOrId)(this.hubOrg.getConnection(), createResponse.id);
36
+ if (!this.flags.json) {
37
+ (0, snapshot_1.printSingleRecordTable)(result);
38
+ }
39
+ return result;
40
+ }
41
+ }
42
+ exports.SnapshotGet = SnapshotGet;
43
+ SnapshotGet.description = messages.getMessage('description');
44
+ SnapshotGet.examples = messages.getMessage('examples').split(os_1.EOL);
45
+ SnapshotGet.requiresDevhubUsername = true;
46
+ SnapshotGet.flagsConfig = {
47
+ sourceorg: command_1.flags.string({
48
+ char: 'o',
49
+ description: messages.getMessage('flags.sourceorg'),
50
+ longDescription: messages.getMessage('flagsLong.sourceorg'),
51
+ required: true,
52
+ }),
53
+ snapshotname: command_1.flags.string({
54
+ char: 'n',
55
+ description: messages.getMessage('flags.snapshotname'),
56
+ longDescription: messages.getMessage('flagsLong.snapshotname'),
57
+ required: true,
58
+ }),
59
+ description: command_1.flags.string({
60
+ char: 'd',
61
+ description: messages.getMessage('flags.description'),
62
+ longDescription: messages.getMessage('flagsLong.description'),
63
+ }),
64
+ };
65
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../src/commands/force/org/snapshot/create.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2BAAyB;AACzB,iDAAsE;AACtE,2CAAwD;AACxD,0DAAmG;AAEnG,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,CAAC;AAExF,MAAa,WAAY,SAAQ,qBAAW;IAyBnC,KAAK,CAAC,GAAG;;QACd,+DAA+D;QAC/D,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,SAAmB,CAAC;QAEjD,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YAClC,MAAM,UAAU,GAAG,MAAM,iBAAU,CAAC,MAAM,EAAE,CAAC;YAC7C,MAAM,QAAQ,GAAG,MAAA,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,mCAAI,WAAW,CAAC;YACzE,WAAW,GAAG,MAAA,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,0CAAE,KAAK,CAAC;SACpD;QAED,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM;aACrC,aAAa,EAAE;aACf,OAAO,CAAC,aAAa,CAAC;aACtB,MAAM,CAAC;YACN,SAAS,EAAE,WAAW;YACtB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAqB;YAC7C,YAAY,E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 import { SfdxCommand, FlagsConfig } from '@salesforce/command';
2
+ import { SaveResult } from 'jsforce';
3
+ export declare class SnapshotGet extends SfdxCommand {
4
+ static readonly description: string;
5
+ static readonly examples: string[];
6
+ static readonly requiresDevhubUsername = true;
7
+ static readonly flagsConfig: FlagsConfig;
8
+ run(): Promise<SaveResult>;
9
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SnapshotGet = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const os_1 = require("os");
11
+ const command_1 = require("@salesforce/command");
12
+ const core_1 = require("@salesforce/core");
13
+ const snapshot_1 = require("../../../../shared/snapshot");
14
+ core_1.Messages.importMessagesDirectory(__dirname);
15
+ const messages = core_1.Messages.loadMessages('@salesforce/plugin-signups', 'snapshot.delete');
16
+ // jsforce can return SaveError[] or never[]
17
+ const isSaveError = (error) => error.message !== undefined;
18
+ class SnapshotGet extends command_1.SfdxCommand {
19
+ async run() {
20
+ // resolve the query to an ID. This also verifies the snapshot exists in the org
21
+ const result = await (0, snapshot_1.queryByNameOrId)(this.hubOrg.getConnection(), this.flags.snapshot);
22
+ const deleteResult = await this.hubOrg.getConnection().sobject('OrgSnapshot').delete(result.Id);
23
+ if (deleteResult.success) {
24
+ this.ux.log(messages.getMessage('success', [this.flags.snapshot]));
25
+ return deleteResult;
26
+ }
27
+ else if (deleteResult.errors) {
28
+ throw new Error(deleteResult.errors
29
+ .filter(isSaveError)
30
+ .map((error) => error.message)
31
+ .join(os_1.EOL));
32
+ }
33
+ }
34
+ }
35
+ exports.SnapshotGet = SnapshotGet;
36
+ SnapshotGet.description = messages.getMessage('description');
37
+ SnapshotGet.examples = messages.getMessage('examples').split(os_1.EOL);
38
+ SnapshotGet.requiresDevhubUsername = true;
39
+ SnapshotGet.flagsConfig = {
40
+ snapshot: command_1.flags.string({
41
+ char: 's',
42
+ description: messages.getMessage('flags.snapshot'),
43
+ longDescription: messages.getMessage('flagsLong.snapshot'),
44
+ required: true,
45
+ }),
46
+ };
47
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../src/commands/force/org/snapshot/delete.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2BAAyB;AACzB,iDAAsE;AACtE,2CAA4C;AAE5C,0DAA8D;AAE9D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,CAAC;AAExF,4CAA4C;AAC5C,MAAM,WAAW,GAAG,CAAC,KAA0B,EAAsB,EAAE,CAAE,KAAmB,CAAC,OAAO,KAAK,SAAS,CAAC;AAEnH,MAAa,WAAY,SAAQ,qBAAW;IAcnC,KAAK,CAAC,GAAG;QACd,iFAAiF;QACjF,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAe,EAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACvF,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAChG,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAkB,CAAC,CAAC,CAAC,CAAC;YAC7E,OAAO,YAAY,CAAC;SACrB;aAAM,IAAI,YAAY,CAAC,MAAM,EAAE;YAC9B,MAAM,IAAI,KAAK,CACb,YAAY,CAAC,MAAM;iBAChB,MAAM,CAAC,WAAW,CAAC;iBACnB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;iBAC7B,IAAI,CAAC,QAAG,CAAC,CACb,CAAC;SACH;IACH,CAAC;;AA7BH,kCA8BC;AA7BwB,uBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,oBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,QAAG,CAAC,CAAC;AACtD,kCAAsB,GAAG,IAAI,CAAC;AAE9B,uBAAW,GAAgB;IAChD,QAAQ,EAAE,eAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAClD,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAC1D,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { SfdxCommand, FlagsConfig } from '@salesforce/command';
2
+ import { OrgSnapshot } from '../../../../shared/snapshot';
3
+ export declare class SnapshotGet extends SfdxCommand {
4
+ static readonly description: string;
5
+ static readonly examples: string[];
6
+ static readonly requiresDevhubUsername = true;
7
+ static readonly flagsConfig: FlagsConfig;
8
+ run(): Promise<OrgSnapshot>;
9
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SnapshotGet = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const os_1 = require("os");
11
+ const command_1 = require("@salesforce/command");
12
+ const core_1 = require("@salesforce/core");
13
+ const snapshot_1 = require("../../../../shared/snapshot");
14
+ core_1.Messages.importMessagesDirectory(__dirname);
15
+ const messages = core_1.Messages.loadMessages('@salesforce/plugin-signups', 'snapshot.get');
16
+ class SnapshotGet extends command_1.SfdxCommand {
17
+ async run() {
18
+ const result = await (0, snapshot_1.queryByNameOrId)(this.hubOrg.getConnection(), this.flags.snapshot);
19
+ if (!this.flags.json) {
20
+ (0, snapshot_1.printSingleRecordTable)(result);
21
+ }
22
+ return result;
23
+ }
24
+ }
25
+ exports.SnapshotGet = SnapshotGet;
26
+ SnapshotGet.description = messages.getMessage('description');
27
+ SnapshotGet.examples = messages.getMessage('examples').split(os_1.EOL);
28
+ SnapshotGet.requiresDevhubUsername = true;
29
+ SnapshotGet.flagsConfig = {
30
+ snapshot: command_1.flags.string({
31
+ char: 's',
32
+ description: messages.getMessage('flags.snapshot'),
33
+ longDescription: messages.getMessage('flagsLong.snapshot'),
34
+ required: true,
35
+ }),
36
+ };
37
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../src/commands/force/org/snapshot/get.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2BAAyB;AACzB,iDAAsE;AACtE,2CAA4C;AAC5C,0DAAmG;AAEnG,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,cAAc,CAAC,CAAC;AAErF,MAAa,WAAY,SAAQ,qBAAW;IAcnC,KAAK,CAAC,GAAG;QACd,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAe,EAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACvF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACpB,IAAA,iCAAsB,EAAC,MAAM,CAAC,CAAC;SAChC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;;AApBH,kCAqBC;AApBwB,uBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,oBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,QAAG,CAAC,CAAC;AACtD,kCAAsB,GAAG,IAAI,CAAC;AAE9B,uBAAW,GAAgB;IAChD,QAAQ,EAAE,eAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAClD,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAC1D,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { SfdxCommand } from '@salesforce/command';
2
+ import { OrgSnapshot } from '../../../../shared/snapshot';
3
+ export declare class SnapshotGet extends SfdxCommand {
4
+ static readonly description: string;
5
+ static readonly examples: string[];
6
+ static readonly requiresDevhubUsername = true;
7
+ run(): Promise<OrgSnapshot[]>;
8
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SnapshotGet = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const os_1 = require("os");
11
+ const command_1 = require("@salesforce/command");
12
+ const core_1 = require("@salesforce/core");
13
+ const snapshot_1 = require("../../../../shared/snapshot");
14
+ core_1.Messages.importMessagesDirectory(__dirname);
15
+ const messages = core_1.Messages.loadMessages('@salesforce/plugin-signups', 'snapshot.list');
16
+ class SnapshotGet extends command_1.SfdxCommand {
17
+ async run() {
18
+ const results = await (0, snapshot_1.queryAll)(this.hubOrg.getConnection());
19
+ if (!this.flags.json) {
20
+ (0, snapshot_1.printRecordTable)(results);
21
+ }
22
+ return results;
23
+ }
24
+ }
25
+ exports.SnapshotGet = SnapshotGet;
26
+ SnapshotGet.description = messages.getMessage('description');
27
+ SnapshotGet.examples = messages.getMessage('examples').split(os_1.EOL);
28
+ SnapshotGet.requiresDevhubUsername = true;
29
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/commands/force/org/snapshot/list.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2BAAyB;AACzB,iDAAkD;AAClD,2CAA4C;AAC5C,0DAAsF;AAEtF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,eAAe,CAAC,CAAC;AAEtF,MAAa,WAAY,SAAQ,qBAAW;IAKnC,KAAK,CAAC,GAAG;QACd,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACpB,IAAA,2BAAgB,EAAC,OAAO,CAAC,CAAC;SAC3B;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;;AAXH,kCAYC;AAXwB,uBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,oBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,QAAG,CAAC,CAAC;AACtD,kCAAsB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { Connection } from '@salesforce/core';
2
+ export interface OrgSnapshotRequest {
3
+ SourceOrg: string;
4
+ SnapshotName: string;
5
+ Description: string;
6
+ Content?: string;
7
+ }
8
+ export interface OrgSnapshot extends OrgSnapshotRequest {
9
+ Id: string;
10
+ Status: string;
11
+ LastClonedDate?: string;
12
+ LastClonedById?: string;
13
+ CreatedDate: string;
14
+ LastModifiedDate: string;
15
+ ExpirationDate?: string;
16
+ Error?: string;
17
+ }
18
+ export declare const ORG_SNAPSHOT_FIELDS: string[];
19
+ export declare const queryAll: (conn: Connection) => Promise<OrgSnapshot[]>;
20
+ export declare const queryByNameOrId: (conn: Connection, nameOrId: string) => Promise<OrgSnapshot>;
21
+ export declare const printSingleRecordTable: (snapshotRecord: OrgSnapshot) => void;
22
+ export declare const printRecordTable: (snapshotRecords: OrgSnapshot[]) => void;
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2020, 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.printRecordTable = exports.printSingleRecordTable = exports.queryByNameOrId = exports.queryAll = exports.ORG_SNAPSHOT_FIELDS = void 0;
10
+ const core_1 = require("@oclif/core");
11
+ const core_2 = require("@salesforce/core");
12
+ const change_case_1 = require("change-case");
13
+ core_2.Messages.importMessagesDirectory(__dirname);
14
+ const messages = core_2.Messages.load('@salesforce/plugin-signups', 'snapshot', ['snapshotNotEnabled', 'noSnapshots']);
15
+ exports.ORG_SNAPSHOT_FIELDS = [
16
+ 'Id',
17
+ 'SnapshotName',
18
+ 'Description',
19
+ 'Status',
20
+ 'SourceOrg',
21
+ 'CreatedDate',
22
+ 'LastModifiedDate',
23
+ 'ExpirationDate',
24
+ 'LastClonedDate',
25
+ 'LastClonedById',
26
+ 'Error',
27
+ ];
28
+ const dateTimeFormatter = (dateString) => dateString
29
+ ? new Date(dateString).toLocaleString(undefined, {
30
+ month: '2-digit',
31
+ year: 'numeric',
32
+ day: '2-digit',
33
+ hour: '2-digit',
34
+ minute: '2-digit',
35
+ })
36
+ : '';
37
+ const rowDateTimeFormatter = (row, field) => dateTimeFormatter(row[field]);
38
+ const ORG_SNAPSHOT_COLUMNS = {
39
+ Id: {},
40
+ SnapshotName: { header: 'Snapshot Name' },
41
+ Status: {},
42
+ SourceOrg: { header: 'Source Org Id' },
43
+ CreatedDate: {
44
+ header: 'Created Date',
45
+ get: (row) => rowDateTimeFormatter(row, 'CreatedDate'),
46
+ },
47
+ LastModifiedDate: {
48
+ header: 'Last Modified Date',
49
+ get: (row) => rowDateTimeFormatter(row, 'LastModifiedDate'),
50
+ },
51
+ ExpirationDate: {
52
+ header: 'Expiration Date',
53
+ get: (row) => (row.ExpirationDate ? new Date(row.ExpirationDate).toLocaleDateString() : ''),
54
+ },
55
+ LastClonedDate: {
56
+ header: 'Last Cloned Date',
57
+ get: (row) => rowDateTimeFormatter(row, 'LastClonedDate'),
58
+ },
59
+ LastClonedById: { header: 'Last Cloned By Id', get: (row) => { var _a; return (_a = row.LastClonedById) !== null && _a !== void 0 ? _a : ''; } },
60
+ };
61
+ const invalidTypeErrorHandler = (e) => {
62
+ if (e instanceof Error && e.name === 'INVALID_TYPE') {
63
+ e.message = messages.getMessage('snapshotNotEnabled');
64
+ }
65
+ throw e;
66
+ };
67
+ const queryAll = async (conn) => {
68
+ const query = `SELECT ${exports.ORG_SNAPSHOT_FIELDS.join(',')} FROM OrgSnapshot Order by CreatedDate`;
69
+ try {
70
+ const result = (await conn.query(query)).records;
71
+ return result;
72
+ }
73
+ catch (e) {
74
+ invalidTypeErrorHandler(e);
75
+ }
76
+ };
77
+ exports.queryAll = queryAll;
78
+ const queryByNameOrId = async (conn, nameOrId) => {
79
+ const query = `SELECT ${exports.ORG_SNAPSHOT_FIELDS.join(',')} FROM OrgSnapshot WHERE ${nameOrId.startsWith('0Oo') ? 'Id' : 'SnapshotName'} = '${nameOrId}'`;
80
+ try {
81
+ const result = await conn.singleRecordQuery(query);
82
+ return result;
83
+ }
84
+ catch (e) {
85
+ if (e instanceof core_2.SfError && e.name === 'SingleRecordQuery_NoRecords') {
86
+ e.message = messages.getMessage('noSnapshots', [nameOrId]);
87
+ }
88
+ invalidTypeErrorHandler(e);
89
+ }
90
+ };
91
+ exports.queryByNameOrId = queryByNameOrId;
92
+ const printSingleRecordTable = (snapshotRecord) => {
93
+ core_1.CliUx.ux.table(Object.entries(snapshotRecord)
94
+ .filter(([key]) => key !== 'attributes')
95
+ // remove empty error field
96
+ .filter(([key, value]) => key !== 'Error' || value)
97
+ .map(([key, value]) => ({
98
+ Name: (0, change_case_1.capitalCase)(key),
99
+ // format the datetime values
100
+ Value: ['LastModifiedDate', 'LastClonedDate', 'CreatedDate'].includes(key)
101
+ ? dateTimeFormatter(value)
102
+ : value,
103
+ }))
104
+ // null/undefined becomes empty string
105
+ .map((row) => (row.Value ? row : { ...row, Value: '' })), { Name: {}, Value: {} });
106
+ };
107
+ exports.printSingleRecordTable = printSingleRecordTable;
108
+ const printRecordTable = (snapshotRecords) => {
109
+ if (snapshotRecords.length === 0) {
110
+ core_1.CliUx.ux.log('No snapshots found');
111
+ return;
112
+ }
113
+ core_1.CliUx.ux.table(
114
+ // snapshotRecords,
115
+ // without this, you encounter typing errors from CliUx.ux.table
116
+ snapshotRecords.map((s) => ({ ...s })), ORG_SNAPSHOT_COLUMNS, { title: `Org Snapshots [${snapshotRecords.length}]`, 'no-truncate': true });
117
+ };
118
+ exports.printRecordTable = printRecordTable;
119
+ //# sourceMappingURL=snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/shared/snapshot.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sCAAoC;AACpC,2CAAiE;AACjE,6CAA0C;AAE1C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,4BAA4B,EAAE,UAAU,EAAE,CAAC,oBAAoB,EAAE,aAAa,CAAC,CAAC,CAAC;AAoBnG,QAAA,mBAAmB,GAAG;IACjC,IAAI;IACJ,cAAc;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AI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CACxB,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,sBAAsB,0BAiBjC;AAEK,MAAM,gBAAgB,GAAG,CAAC,eAA8B,EAAQ,EAAE;IACvE,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,YAAK,CAAC,EAAE,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QACnC,OAAO;KACR;IAED,YAAK,CAAC,EAAE,CAAC,KAAK;IACZ,mBAAmB;IACnB,gEAAgE;IAChE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,EACtC,oBAAoB,EACpB,EAAE,KAAK,EAAE,kBAAkB,eAAe,CAAC,MAAM,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,CAC5E,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,gBAAgB,oBAa3B"}
@@ -0,0 +1,19 @@
1
+ {
2
+ "description": "create a snapshot of a scratch org\nA snapshot is a point-in-time copy of a scratch org. The copy is stored in Salesforce and referenced by its unique name in a scratch org definition file.\n\nUse \"sfdx force:org:snapshot:get\" to get details, including status, about a snapshot creation request.\n\nTo create a scratch org from a snapshot, include the \"snapshot\" entry (instead of \"edition\") in the scratch org definition file and set it to the name of the snapshot. Then use \"sfdx force:org:create\" to create the scratch org.",
3
+ "examples": [
4
+ "Create a snapshot called \"Dependencies\" using the source scratch org ID:\n",
5
+ " sfdx force:org:snapshot:create --sourceorg 00Dxx0000000000 --snapshotname Dependencies --description 'Contains PackageA v1.1.0'\n",
6
+ "Create a snapshot called \"NightlyBranch\" using the source scratch org username:\n",
7
+ " sfdx force:org:snapshot:create -o myuser@myorg -n NightlyBranch -d 'Contains PkgA v2.1.0 and PkgB 3.3.0'"
8
+ ],
9
+ "flags": {
10
+ "snapshotname": "unique name of snapshot",
11
+ "description": "description of snapshot",
12
+ "sourceorg": "ID or locally authenticated username or alias of scratch org to snapshot"
13
+ },
14
+ "flagsLong": {
15
+ "snapshotname": "The unique name of the snapshot. Use this name to create scratch orgs from the snapshot.",
16
+ "description": "A description of the snapshot. Use this description to document the contents of the snapshot.\nWe suggest that you include a reference point, such as a version control system tag or commit ID.'",
17
+ "sourceorg": "The org ID, or a locally authenticated username or alias, of the scratch org to snapshot."
18
+ }
19
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "description": "delete a scratch org snapshot\nDev Hub admins can delete any snapshot, while users can delete only theirs unless a Dev Hub admin gives the user Modify All permissions.",
3
+ "examples": [
4
+ "Delete a snapshot from the default Dev Hub using the snapshot ID:\n",
5
+ " sfdx force:org:snapshot:delete --snapshot 0Oo...\n",
6
+ "Delete a snapshot from the specified Dev Hub using the snapshot name:\n",
7
+ " sfdx force:org:snapshot:delete -s BaseSnapshot -v SnapshotDevHub"
8
+ ],
9
+ "flags": {
10
+ "snapshot": "name or ID of snapshot to delete"
11
+ },
12
+ "flagsLong": {
13
+ "snapshot": "The name or ID (starts with 0Oo) of the snapshot to delete."
14
+ },
15
+ "success": "Successfully deleted snapshot %s."
16
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "description": "get details about a scratch org snapshot\nSnapshot creation can take a while. Use this command with the snapshot name or ID to check its creation status. Once the status changes to Active, you can use the snapshot to create scratch orgs. \n\nTo create a snapshot, use the \"sfdx force:org:snapshot:create\" command. To retrieve a list of all snapshots, use \"sfdx force:org:snapshot:list\".",
3
+ "examples": [
4
+ "Get snapshot details using its ID:\n",
5
+ " sfdx force:org:snapshot:get --snapshot 0Oo...\n",
6
+ "Get snapshot details using its name:\n",
7
+ " sfdx force:org:snapshot:get -s Dependencies"
8
+ ],
9
+ "flags": {
10
+ "snapshot": "name or ID of snapshot to retrieve"
11
+ },
12
+ "flagsLong": {
13
+ "snapshot": "The name or ID (starts with 0Oo) of the snapshot to retrieve."
14
+ }
15
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "noSnapshots": "No snapshot found with the given name or id: %s",
3
+ "snapshotNotEnabled": "Org snapshots aren’t enabled for your Dev Hub."
4
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "description": "list scratch org snapshots\nYou can view all the snapshots in a Dev Hub that you have access to. If you’re an admin, you can see all snapshots associated with the Dev Hub org. If you’re a user, you can see only your snapshots unless a Dev Hub admin gives you View All permissions.\n\nTo create a snapshot, use the \"sfdx force:org:snapshot:create\" command. To get details about a snapshot request, use \"sfdx force:org:snapshot:get\".",
3
+ "examples": [
4
+ "List snapshots in the default Dev Hub:\n",
5
+ " sfdx force:org:snapshot:list\n",
6
+ "List snapshots in the Dev Hub with the specified username:\n",
7
+ " sfdx force:org:snapshot:list -v OtherDevHub@example.com"
8
+ ]
9
+ }
@@ -1 +1 @@
1
- {"version":"1.0.0","commands":{"force:org:shape:create":{"id":"force:org:shape:create","description":"Create a scratch org configuration (shape) based on the specified source org","strict":true,"usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["sfdx force:org:shape:create -u me@my.org","sfdx force:org:shape:create -u me@my.org --json --loglevel debug"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false}},"args":[],"requiresUsername":true},"force:org:shape:delete":{"id":"force:org:shape:delete","description":"Delete all org shapes for a target org","strict":true,"usage":"<%= command.id %> [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["sfdx force:org:shape:delete -u me@my.org","sfdx force:org:shape:delete -u MyOrgAlias -p","sfdx force:org:shape:delete -u me@my.org --json","sfdx force:org:shape:delete -u me@my.org -p --json > tmp/MyOrgShapeDelete.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"noprompt":{"name":"noprompt","type":"boolean","char":"p","description":"do not prompt for confirmation","allowNo":false}},"args":[],"requiresUsername":true,"flagsConfig":{"noprompt":{"kind":"boolean","char":"p","description":"do not prompt for confirmation","allowNo":false,"type":"boolean"}}},"force:org:shape:list":{"id":"force:org:shape:list","description":"List all org shapes you’ve created","strict":true,"usage":"<%= command.id %> [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["sfdx force:org:shape:list","sfdx force:org:shape:list --json","sfdx force:org:shape:list --json > tmp/MyOrgShapeList.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"verbose":{"name":"verbose","type":"boolean","description":"list more information about each org shape","allowNo":false}},"args":[],"flagsConfig":{"verbose":{"description":"list more information about each org shape","type":"boolean","kind":"boolean","longDescription":"Emit additional command output to stdout.","allowNo":false}}}}}
1
+ {"version":"1.1.0","commands":{"force:org:shape:create":{"id":"force:org:shape:create","description":"Create a scratch org configuration (shape) based on the specified source org","strict":true,"usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["sfdx force:org:shape:create -u me@my.org","sfdx force:org:shape:create -u me@my.org --json --loglevel debug"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false}},"args":[],"requiresUsername":true},"force:org:shape:delete":{"id":"force:org:shape:delete","description":"Delete all org shapes for a target org","strict":true,"usage":"<%= command.id %> [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["sfdx force:org:shape:delete -u me@my.org","sfdx force:org:shape:delete -u MyOrgAlias -p","sfdx force:org:shape:delete -u me@my.org --json","sfdx force:org:shape:delete -u me@my.org -p --json > tmp/MyOrgShapeDelete.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"noprompt":{"name":"noprompt","type":"boolean","char":"p","description":"do not prompt for confirmation","allowNo":false}},"args":[],"requiresUsername":true,"flagsConfig":{"noprompt":{"kind":"boolean","char":"p","description":"do not prompt for confirmation","allowNo":false,"type":"boolean"}}},"force:org:shape:list":{"id":"force:org:shape:list","description":"List all org shapes you’ve created","strict":true,"usage":"<%= command.id %> [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["sfdx force:org:shape:list","sfdx force:org:shape:list --json","sfdx force:org:shape:list --json > tmp/MyOrgShapeList.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"verbose":{"name":"verbose","type":"boolean","description":"list more information about each org shape","allowNo":false}},"args":[],"flagsConfig":{"verbose":{"description":"list more information about each org shape","type":"boolean","kind":"boolean","longDescription":"Emit additional command output to stdout.","allowNo":false}}},"force:org:snapshot:create":{"id":"force:org:snapshot:create","description":"create a snapshot of a scratch org\nA snapshot is a point-in-time copy of a scratch org. The copy is stored in Salesforce and referenced by its unique name in a scratch org definition file.\n\nUse \"sfdx force:org:snapshot:get\" to get details, including status, about a snapshot creation request.\n\nTo create a scratch org from a snapshot, include the \"snapshot\" entry (instead of \"edition\") in the scratch org definition file and set it to the name of the snapshot. Then use \"sfdx force:org:create\" to create the scratch org.","strict":true,"usage":"<%= command.id %> -o <string> -n <string> [-d <string>] [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["Create a snapshot called \"Dependencies\" using the source scratch org ID:",""," sfdx force:org:snapshot:create --sourceorg 00Dxx0000000000 --snapshotname Dependencies --description 'Contains PackageA v1.1.0'","","Create a snapshot called \"NightlyBranch\" using the source scratch org username:",""," sfdx force:org:snapshot:create -o myuser@myorg -n NightlyBranch -d 'Contains PkgA v2.1.0 and PkgB 3.3.0'"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetdevhubusername":{"name":"targetdevhubusername","type":"option","char":"v","description":"username or alias for the dev hub org; overrides default dev hub org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"sourceorg":{"name":"sourceorg","type":"option","char":"o","description":"ID or locally authenticated username or alias of scratch org to snapshot","required":true,"multiple":false},"snapshotname":{"name":"snapshotname","type":"option","char":"n","description":"unique name of snapshot","required":true,"multiple":false},"description":{"name":"description","type":"option","char":"d","description":"description of snapshot","multiple":false}},"args":[],"requiresDevhubUsername":true,"flagsConfig":{"sourceorg":{"kind":"string","char":"o","description":"ID or locally authenticated username or alias of scratch org to snapshot","longDescription":"The org ID, or a locally authenticated username or alias, of the scratch org to snapshot.","required":true,"input":[],"multiple":false,"type":"option"},"snapshotname":{"kind":"string","char":"n","description":"unique name of snapshot","longDescription":"The unique name of the snapshot. Use this name to create scratch orgs from the snapshot.","required":true,"input":[],"multiple":false,"type":"option"},"description":{"kind":"string","char":"d","description":"description of snapshot","longDescription":"A description of the snapshot. Use this description to document the contents of the snapshot.\nWe suggest that you include a reference point, such as a version control system tag or commit ID.'","input":[],"multiple":false,"type":"option"}}},"force:org:snapshot:delete":{"id":"force:org:snapshot:delete","description":"delete a scratch org snapshot\nDev Hub admins can delete any snapshot, while users can delete only theirs unless a Dev Hub admin gives the user Modify All permissions.","strict":true,"usage":"<%= command.id %> -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["Delete a snapshot from the default Dev Hub using the snapshot ID:",""," sfdx force:org:snapshot:delete --snapshot 0Oo...","","Delete a snapshot from the specified Dev Hub using the snapshot name:",""," sfdx force:org:snapshot:delete -s BaseSnapshot -v SnapshotDevHub"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetdevhubusername":{"name":"targetdevhubusername","type":"option","char":"v","description":"username or alias for the dev hub org; overrides default dev hub org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"snapshot":{"name":"snapshot","type":"option","char":"s","description":"name or ID of snapshot to delete","required":true,"multiple":false}},"args":[],"requiresDevhubUsername":true,"flagsConfig":{"snapshot":{"kind":"string","char":"s","description":"name or ID of snapshot to delete","longDescription":"The name or ID (starts with 0Oo) of the snapshot to delete.","required":true,"input":[],"multiple":false,"type":"option"}}},"force:org:snapshot:get":{"id":"force:org:snapshot:get","description":"get details about a scratch org snapshot\nSnapshot creation can take a while. Use this command with the snapshot name or ID to check its creation status. Once the status changes to Active, you can use the snapshot to create scratch orgs. \n\nTo create a snapshot, use the \"sfdx force:org:snapshot:create\" command. To retrieve a list of all snapshots, use \"sfdx force:org:snapshot:list\".","strict":true,"usage":"<%= command.id %> -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["Get snapshot details using its ID:",""," sfdx force:org:snapshot:get --snapshot 0Oo...","","Get snapshot details using its name:",""," sfdx force:org:snapshot:get -s Dependencies"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetdevhubusername":{"name":"targetdevhubusername","type":"option","char":"v","description":"username or alias for the dev hub org; overrides default dev hub org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"snapshot":{"name":"snapshot","type":"option","char":"s","description":"name or ID of snapshot to retrieve","required":true,"multiple":false}},"args":[],"requiresDevhubUsername":true,"flagsConfig":{"snapshot":{"kind":"string","char":"s","description":"name or ID of snapshot to retrieve","longDescription":"The name or ID (starts with 0Oo) of the snapshot to retrieve.","required":true,"input":[],"multiple":false,"type":"option"}}},"force:org:snapshot:list":{"id":"force:org:snapshot:list","description":"list scratch org snapshots\nYou can view all the snapshots in a Dev Hub that you have access to. If you’re an admin, you can see all snapshots associated with the Dev Hub org. If you’re a user, you can see only your snapshots unless a Dev Hub admin gives you View All permissions.\n\nTo create a snapshot, use the \"sfdx force:org:snapshot:create\" command. To get details about a snapshot request, use \"sfdx force:org:snapshot:get\".","strict":true,"usage":"<%= command.id %> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-signups","pluginAlias":"@salesforce/plugin-signups","pluginType":"core","aliases":[],"examples":["List snapshots in the default Dev Hub:",""," sfdx force:org:snapshot:list","","List snapshots in the Dev Hub with the specified username:",""," sfdx force:org:snapshot:list -v OtherDevHub@example.com"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetdevhubusername":{"name":"targetdevhubusername","type":"option","char":"v","description":"username or alias for the dev hub org; overrides default dev hub org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false}},"args":[],"requiresDevhubUsername":true}}}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-signups",
3
3
  "description": "Commands to interact with org shapes",
4
- "version": "1.0.0",
4
+ "version": "1.1.0",
5
5
  "author": "Salesforce",
6
6
  "main": "lib/index.js",
7
7
  "bugs": "https://github.com/forcedotcom/cli/issues",
8
8
  "dependencies": {
9
9
  "@oclif/core": "^1.6.3",
10
10
  "@salesforce/command": "^5.0.1",
11
- "@salesforce/core": "^3.10.1",
11
+ "@salesforce/core": "^3.16.0",
12
12
  "chalk": "^4.1.2",
13
+ "change-case": "^4.1.2",
13
14
  "tslib": "^2"
14
15
  },
15
16
  "devDependencies": {
16
- "oclif": "^2.6.1",
17
17
  "@oclif/plugin-command-snapshot": "^3.1.3",
18
18
  "@salesforce/cli-plugins-testkit": "^1.5.3",
19
19
  "@salesforce/dev-config": "^3.0.1",
@@ -22,10 +22,13 @@
22
22
  "@salesforce/prettier-config": "^0.0.2",
23
23
  "@salesforce/ts-sinon": "1.3.21",
24
24
  "@salesforce/ts-types": "^1.5.20",
25
+ "@types/chai-string": "^1.4.2",
26
+ "@types/shelljs": "^0.8.11",
25
27
  "@typescript-eslint/eslint-plugin": "^4.33.0",
26
28
  "@typescript-eslint/parser": "^4.32.0",
27
29
  "chai": "^4.3.4",
28
30
  "chai-as-promised": "7.1.1",
31
+ "chai-string": "^1.5.0",
29
32
  "cz-conventional-changelog": "^3.3.0",
30
33
  "eslint": "^7.32.0",
31
34
  "eslint-config-prettier": "^8.3.0",
@@ -40,12 +43,13 @@
40
43
  "lint-staged": "^11.2.0",
41
44
  "mocha": "^9.1.3",
42
45
  "nyc": "^15.1.0",
46
+ "oclif": "^2.6.1",
43
47
  "prettier": "^2.4.1",
44
48
  "pretty-quick": "^3.1.0",
45
- "shx": "0.2.2",
49
+ "shx": "0.3.4",
46
50
  "sinon": "^11.1.1",
47
51
  "ts-node": "^10.2.1",
48
- "typescript": "^4.1.3"
52
+ "typescript": "^4.6.4"
49
53
  },
50
54
  "config": {
51
55
  "commitizen": {
@@ -53,7 +57,7 @@
53
57
  }
54
58
  },
55
59
  "engines": {
56
- "node": ">=12.0.0"
60
+ "node": ">=14.0.0"
57
61
  },
58
62
  "files": [
59
63
  "/lib",
@@ -83,7 +87,20 @@
83
87
  "org": {
84
88
  "subtopics": {
85
89
  "shape": {
86
- "description": "manage org shape"
90
+ "description": "manage org shape",
91
+ "state": "beta",
92
+ "trailblazerCommunityLink": {
93
+ "url": "https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A0000009TPk",
94
+ "name": "Org Shape for Scratch Orgs"
95
+ }
96
+ },
97
+ "snapshot": {
98
+ "description": "manage org snapshots",
99
+ "state": "closedPilot",
100
+ "trailblazerCommunityLink": {
101
+ "url": "https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A00000020d5",
102
+ "name": "W19 Pilot: Scratch Org Snapshots"
103
+ }
87
104
  }
88
105
  }
89
106
  }
@@ -110,13 +127,14 @@
110
127
  "test:command-reference": "./bin/run commandreference:generate --erroronwarnings",
111
128
  "test:deprecation-policy": "./bin/run snapshot:compare",
112
129
  "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
130
+ "test:nuts:snapshots": "nyc mocha \"test/nuts/snapshots.nut.ts\" --slow 4500 --timeout 600000 --parallel",
113
131
  "version": "oclif readme"
114
132
  },
115
133
  "publishConfig": {
116
134
  "access": "public"
117
135
  },
118
136
  "sfdx": {
119
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-signups/1.0.0.crt",
120
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-signups/1.0.0.sig"
137
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-signups/1.1.0.crt",
138
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-signups/1.1.0.sig"
121
139
  }
122
140
  }