@salesforce/plugin-signups 2.5.23 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -7
- package/lib/commands/org/delete/shape.js +8 -7
- package/lib/commands/org/delete/shape.js.map +1 -1
- package/lib/commands/org/list/shape.js +7 -14
- package/lib/commands/org/list/shape.js.map +1 -1
- package/lib/shared/snapshot.js +28 -34
- package/lib/shared/snapshot.js.map +1 -1
- package/npm-shrinkwrap.json +2953 -5262
- package/oclif.lock +605 -1012
- package/oclif.manifest.json +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
@@ -123,7 +123,7 @@ EXAMPLES
|
|
123
123
|
$ sf org create shape --target-org SourceOrg
|
124
124
|
```
|
125
125
|
|
126
|
-
_See code: [src/commands/org/create/shape.ts](https://github.com/salesforcecli/plugin-signups/blob/2.
|
126
|
+
_See code: [src/commands/org/create/shape.ts](https://github.com/salesforcecli/plugin-signups/blob/2.6.1/src/commands/org/create/shape.ts)_
|
127
127
|
|
128
128
|
## `sf org create snapshot`
|
129
129
|
|
@@ -179,7 +179,7 @@ FLAG DESCRIPTIONS
|
|
179
179
|
as a version control system tag or commit ID.
|
180
180
|
```
|
181
181
|
|
182
|
-
_See code: [src/commands/org/create/snapshot.ts](https://github.com/salesforcecli/plugin-signups/blob/2.
|
182
|
+
_See code: [src/commands/org/create/snapshot.ts](https://github.com/salesforcecli/plugin-signups/blob/2.6.1/src/commands/org/create/snapshot.ts)_
|
183
183
|
|
184
184
|
## `sf org delete shape`
|
185
185
|
|
@@ -219,7 +219,7 @@ EXAMPLES
|
|
219
219
|
$ sf org delete shape --target-org SourceOrg --no-prompt
|
220
220
|
```
|
221
221
|
|
222
|
-
_See code: [src/commands/org/delete/shape.ts](https://github.com/salesforcecli/plugin-signups/blob/2.
|
222
|
+
_See code: [src/commands/org/delete/shape.ts](https://github.com/salesforcecli/plugin-signups/blob/2.6.1/src/commands/org/delete/shape.ts)_
|
223
223
|
|
224
224
|
## `sf org delete snapshot`
|
225
225
|
|
@@ -264,7 +264,7 @@ FLAG DESCRIPTIONS
|
|
264
264
|
The IDs of scratch org snapshots start with 0Oo.
|
265
265
|
```
|
266
266
|
|
267
|
-
_See code: [src/commands/org/delete/snapshot.ts](https://github.com/salesforcecli/plugin-signups/blob/2.
|
267
|
+
_See code: [src/commands/org/delete/snapshot.ts](https://github.com/salesforcecli/plugin-signups/blob/2.6.1/src/commands/org/delete/snapshot.ts)_
|
268
268
|
|
269
269
|
## `sf org get snapshot`
|
270
270
|
|
@@ -311,7 +311,7 @@ FLAG DESCRIPTIONS
|
|
311
311
|
The IDs of scratch org snapshots start with 0Oo.
|
312
312
|
```
|
313
313
|
|
314
|
-
_See code: [src/commands/org/get/snapshot.ts](https://github.com/salesforcecli/plugin-signups/blob/2.
|
314
|
+
_See code: [src/commands/org/get/snapshot.ts](https://github.com/salesforcecli/plugin-signups/blob/2.6.1/src/commands/org/get/snapshot.ts)_
|
315
315
|
|
316
316
|
## `sf org list shape`
|
317
317
|
|
@@ -344,7 +344,7 @@ EXAMPLES
|
|
344
344
|
$ sf org list shape --json > tmp/MyOrgShapeList.json
|
345
345
|
```
|
346
346
|
|
347
|
-
_See code: [src/commands/org/list/shape.ts](https://github.com/salesforcecli/plugin-signups/blob/2.
|
347
|
+
_See code: [src/commands/org/list/shape.ts](https://github.com/salesforcecli/plugin-signups/blob/2.6.1/src/commands/org/list/shape.ts)_
|
348
348
|
|
349
349
|
## `sf org list snapshot`
|
350
350
|
|
@@ -386,6 +386,6 @@ EXAMPLES
|
|
386
386
|
$ sf org list snapshot --target-dev-hub SnapshotDevHub
|
387
387
|
```
|
388
388
|
|
389
|
-
_See code: [src/commands/org/list/snapshot.ts](https://github.com/salesforcecli/plugin-signups/blob/2.
|
389
|
+
_See code: [src/commands/org/list/snapshot.ts](https://github.com/salesforcecli/plugin-signups/blob/2.6.1/src/commands/org/list/snapshot.ts)_
|
390
390
|
|
391
391
|
<!-- commandsstop -->
|
@@ -49,15 +49,16 @@ export class OrgShapeDeleteCommand extends SfCommand {
|
|
49
49
|
}
|
50
50
|
if (deleteRes.failures.length > 0) {
|
51
51
|
setExitCode(68);
|
52
|
-
this.styledHeader('Partial Success');
|
53
52
|
this.logSuccess(messages.getMessage('humanSuccess', [orgId]));
|
54
53
|
this.log('');
|
55
|
-
this.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
54
|
+
this.table({
|
55
|
+
data: deleteRes.failures,
|
56
|
+
columns: [
|
57
|
+
{ key: 'shapeId', name: 'Shape ID' },
|
58
|
+
{ key: 'message', name: 'Error Message' },
|
59
|
+
],
|
60
|
+
title: 'Failures',
|
61
|
+
});
|
61
62
|
}
|
62
63
|
else if (deleteRes.failures.length === deleteRes.shapeIds.length) {
|
63
64
|
setExitCode(1);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/shape.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,EACL,SAAS,EACT,+BAA+B,EAC/B,iCAAiC,EACjC,QAAQ,GACT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,KAA0B,MAAM,gCAAgC,CAAC;AAExE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,cAAc,CAAC,CAAC;AAMrF,MAAM,OAAO,qBAAsB,SAAQ,SAA2C;IAC7E,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CA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AAE,SAAS,CAAC,QAAQ;SAC7B,CAAC;IACJ,CAAC;;AAGH,MAAM,WAAW,GAAG,CAAC,IAAY,EAAQ,EAAE;IACzC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1B,CAAC,CAAC"}
|
@@ -9,18 +9,6 @@ import { Messages } from '@salesforce/core';
|
|
9
9
|
import utils from '../../../shared/orgShapeListUtils.js';
|
10
10
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
11
11
|
const messages = Messages.loadMessages('@salesforce/plugin-signups', 'shape.list');
|
12
|
-
// default columns for the shape list
|
13
|
-
const orgShapeColumns = {
|
14
|
-
alias: {
|
15
|
-
header: 'ALIAS',
|
16
|
-
get: (data) => data.alias ?? '',
|
17
|
-
},
|
18
|
-
username: { header: 'USERNAME' },
|
19
|
-
orgId: { header: 'ORG ID' },
|
20
|
-
status: { header: 'SHAPE STATUS' },
|
21
|
-
createdBy: { header: 'CREATED BY' },
|
22
|
-
createdDate: { header: 'CREATED DATE' },
|
23
|
-
};
|
24
12
|
export class OrgShapeListCommand extends SfCommand {
|
25
13
|
static summary = messages.getMessage('summary');
|
26
14
|
static description = messages.getMessage('description');
|
@@ -44,8 +32,13 @@ export class OrgShapeListCommand extends SfCommand {
|
|
44
32
|
this.info(messages.getMessage('noOrgShapes'));
|
45
33
|
return orgShapes;
|
46
34
|
}
|
47
|
-
this.
|
48
|
-
|
35
|
+
this.table({
|
36
|
+
data: orgShapes.map((shape) => ({
|
37
|
+
...(shape.status === 'Active' ? { ...shape, status: StandardColors.success(shape.status) } : shape),
|
38
|
+
})),
|
39
|
+
title: 'Org Shapes',
|
40
|
+
overflow: 'wrap',
|
41
|
+
});
|
49
42
|
return orgShapes;
|
50
43
|
}
|
51
44
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../../src/commands/org/list/shape.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,E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AC,UAAU,CAAC,uBAAuB,CAAC;YACrD,MAAM,EAAE,IAAI;SACb,CAAC;QACF,QAAQ;KACT,CAAC;IAEF,kDAAkD;IAClD,wDAAwD;IACjD,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,KAAK,CAAC,oCAAoC,EAAE,CAAC;QACjF,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,GAAG,EAAE,CAAC;YACX,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;YAC9C,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,CAAC,KAAK,CAAC;YACT,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC9B,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;aACpG,CAAC,CAAC;YACH,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC"}
|
package/lib/shared/snapshot.js
CHANGED
@@ -29,25 +29,6 @@ const dateTimeFormatter = (dateString) => dateString
|
|
29
29
|
minute: '2-digit',
|
30
30
|
})
|
31
31
|
: '';
|
32
|
-
const rowDateTimeFormatter = (row, field) => dateTimeFormatter(row[field]);
|
33
|
-
const ORG_SNAPSHOT_COLUMNS = {
|
34
|
-
Id: {},
|
35
|
-
SnapshotName: { header: 'Snapshot Name' },
|
36
|
-
Status: {},
|
37
|
-
SourceOrg: { header: 'Source Org Id' },
|
38
|
-
CreatedDate: {
|
39
|
-
header: 'Created Date',
|
40
|
-
get: (row) => rowDateTimeFormatter(row, 'CreatedDate'),
|
41
|
-
},
|
42
|
-
LastModifiedDate: {
|
43
|
-
header: 'Last Modified Date',
|
44
|
-
get: (row) => rowDateTimeFormatter(row, 'LastModifiedDate'),
|
45
|
-
},
|
46
|
-
ExpirationDate: {
|
47
|
-
header: 'Expiration Date',
|
48
|
-
get: (row) => (row.ExpirationDate ? new Date(row.ExpirationDate).toLocaleDateString() : ''),
|
49
|
-
},
|
50
|
-
};
|
51
32
|
export const invalidTypeErrorHandler = (e) => {
|
52
33
|
if (e instanceof Error && e.name === 'INVALID_TYPE') {
|
53
34
|
e.message = messages.getMessage('snapshotNotEnabled');
|
@@ -78,26 +59,39 @@ export const queryByNameOrId = async (conn, nameOrId) => {
|
|
78
59
|
}
|
79
60
|
};
|
80
61
|
export const printSingleRecordTable = (snapshotRecord) => {
|
81
|
-
new Ux().table(
|
82
|
-
.
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
62
|
+
new Ux().table({
|
63
|
+
data: Object.entries(snapshotRecord)
|
64
|
+
.filter(([key]) => key !== 'attributes')
|
65
|
+
// remove empty error field
|
66
|
+
.filter(([key, value]) => key !== 'Error' || typeof value === 'string')
|
67
|
+
// every field on the type is a string
|
68
|
+
.map(([key, value]) => ({
|
69
|
+
Name: capitalCase(key),
|
70
|
+
// format the datetime values
|
71
|
+
Value: ['LastModifiedDate', 'CreatedDate'].includes(key) ? dateTimeFormatter(value) : value,
|
72
|
+
}))
|
73
|
+
// null/undefined becomes empty string
|
74
|
+
.map((row) => (row.Value ? row : { ...row, Value: '' })),
|
75
|
+
columns: ['Name', 'Value'],
|
76
|
+
});
|
93
77
|
};
|
94
78
|
export const printRecordTable = (snapshotRecords) => {
|
95
79
|
if (snapshotRecords.length === 0) {
|
96
80
|
new Ux().log('No snapshots found');
|
97
81
|
return;
|
98
82
|
}
|
99
|
-
new Ux().table(
|
100
|
-
|
101
|
-
|
83
|
+
new Ux().table({
|
84
|
+
data: snapshotRecords.map((s) => ({
|
85
|
+
Id: s.Id,
|
86
|
+
'Snapshot Name': s.SnapshotName,
|
87
|
+
Status: s.Status,
|
88
|
+
'Source Org Id': s.SourceOrg,
|
89
|
+
'Created Date': dateTimeFormatter(s.CreatedDate),
|
90
|
+
'Last Modified Date': dateTimeFormatter(s.LastModifiedDate),
|
91
|
+
'Expiration Date': s.ExpirationDate ? new Date(s.ExpirationDate).toLocaleDateString() : '',
|
92
|
+
})),
|
93
|
+
title: `Org Snapshots [${snapshotRecords.length}]`,
|
94
|
+
overflow: 'wrap',
|
95
|
+
});
|
102
96
|
};
|
103
97
|
//# sourceMappingURL=snapshot.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/shared/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACjD,OAAO,EAAc,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,UAAU,CAAC,CAAC;AAkBxF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI;IACJ,cAAc;IACd,aAAa;IACb,QAAQ;IACR,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,gBAAgB;IAChB,OAAO;CACR,CAAC;AACF,MAAM,iBAAiB,GAAG,CAAC,UAAmB,EAAU,EAAE,CACxD,UAAU;IACR,C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