@salesforce/plugin-org 4.3.6-dev.0 → 4.3.6-dev.2
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 +14 -14
- package/lib/commands/org/create/scratch.js +39 -15
- package/lib/commands/org/create/scratch.js.map +1 -1
- package/lib/commands/org/resume/scratch.js +39 -14
- package/lib/commands/org/resume/scratch.js.map +1 -1
- package/lib/components/spinner.d.ts +0 -5
- package/lib/components/spinner.js.map +1 -1
- package/lib/components/stages.d.ts +75 -28
- package/lib/components/stages.js +141 -61
- package/lib/components/stages.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -229,7 +229,7 @@ FLAG DESCRIPTIONS
|
|
|
229
229
|
sandbox.
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
-
_See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
232
|
+
_See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/create/sandbox.ts)_
|
|
233
233
|
|
|
234
234
|
## `sf org create scratch`
|
|
235
235
|
|
|
@@ -383,7 +383,7 @@ FLAG DESCRIPTIONS
|
|
|
383
383
|
Omit this flag to have Salesforce generate a unique username for your org.
|
|
384
384
|
```
|
|
385
385
|
|
|
386
|
-
_See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
386
|
+
_See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/create/scratch.ts)_
|
|
387
387
|
|
|
388
388
|
## `sf org delete sandbox`
|
|
389
389
|
|
|
@@ -429,7 +429,7 @@ EXAMPLES
|
|
|
429
429
|
$ sf org delete sandbox --target-org my-sandbox --no-prompt
|
|
430
430
|
```
|
|
431
431
|
|
|
432
|
-
_See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
432
|
+
_See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/delete/sandbox.ts)_
|
|
433
433
|
|
|
434
434
|
## `sf org delete scratch`
|
|
435
435
|
|
|
@@ -473,7 +473,7 @@ EXAMPLES
|
|
|
473
473
|
$ sf org delete scratch --target-org my-scratch-org --no-prompt
|
|
474
474
|
```
|
|
475
475
|
|
|
476
|
-
_See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
476
|
+
_See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/delete/scratch.ts)_
|
|
477
477
|
|
|
478
478
|
## `sf org disable tracking`
|
|
479
479
|
|
|
@@ -512,7 +512,7 @@ EXAMPLES
|
|
|
512
512
|
$ sf org disable tracking
|
|
513
513
|
```
|
|
514
514
|
|
|
515
|
-
_See code: [src/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
515
|
+
_See code: [src/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/disable/tracking.ts)_
|
|
516
516
|
|
|
517
517
|
## `sf org display`
|
|
518
518
|
|
|
@@ -557,7 +557,7 @@ EXAMPLES
|
|
|
557
557
|
$ sf org display --target-org TestOrg1 --verbose
|
|
558
558
|
```
|
|
559
559
|
|
|
560
|
-
_See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
560
|
+
_See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/display.ts)_
|
|
561
561
|
|
|
562
562
|
## `sf org enable tracking`
|
|
563
563
|
|
|
@@ -599,7 +599,7 @@ EXAMPLES
|
|
|
599
599
|
$ sf org enable tracking
|
|
600
600
|
```
|
|
601
601
|
|
|
602
|
-
_See code: [src/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
602
|
+
_See code: [src/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/enable/tracking.ts)_
|
|
603
603
|
|
|
604
604
|
## `sf org list`
|
|
605
605
|
|
|
@@ -638,7 +638,7 @@ EXAMPLES
|
|
|
638
638
|
$ sf org list --clean
|
|
639
639
|
```
|
|
640
640
|
|
|
641
|
-
_See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
641
|
+
_See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/list.ts)_
|
|
642
642
|
|
|
643
643
|
## `sf org list metadata`
|
|
644
644
|
|
|
@@ -705,7 +705,7 @@ FLAG DESCRIPTIONS
|
|
|
705
705
|
Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
|
|
706
706
|
```
|
|
707
707
|
|
|
708
|
-
_See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
708
|
+
_See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/list/metadata.ts)_
|
|
709
709
|
|
|
710
710
|
## `sf org list metadata-types`
|
|
711
711
|
|
|
@@ -760,7 +760,7 @@ FLAG DESCRIPTIONS
|
|
|
760
760
|
Override the api version used for api requests made by this command
|
|
761
761
|
```
|
|
762
762
|
|
|
763
|
-
_See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
763
|
+
_See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/list/metadata-types.ts)_
|
|
764
764
|
|
|
765
765
|
## `sf org open`
|
|
766
766
|
|
|
@@ -832,7 +832,7 @@ EXAMPLES
|
|
|
832
832
|
$ sf org open --source-file force-app/main/default/flows/Hello.flow-meta.xml
|
|
833
833
|
```
|
|
834
834
|
|
|
835
|
-
_See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
835
|
+
_See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/open.ts)_
|
|
836
836
|
|
|
837
837
|
## `sf org refresh sandbox`
|
|
838
838
|
|
|
@@ -909,7 +909,7 @@ FLAG DESCRIPTIONS
|
|
|
909
909
|
By default, a sandbox auto-activates after a refresh. Use this flag to control sandbox activation manually.
|
|
910
910
|
```
|
|
911
911
|
|
|
912
|
-
_See code: [src/commands/org/refresh/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
912
|
+
_See code: [src/commands/org/refresh/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/refresh/sandbox.ts)_
|
|
913
913
|
|
|
914
914
|
## `sf org resume sandbox`
|
|
915
915
|
|
|
@@ -972,7 +972,7 @@ FLAG DESCRIPTIONS
|
|
|
972
972
|
returns the job ID. To resume checking the sandbox creation, rerun this command.
|
|
973
973
|
```
|
|
974
974
|
|
|
975
|
-
_See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
975
|
+
_See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/resume/sandbox.ts)_
|
|
976
976
|
|
|
977
977
|
## `sf org resume scratch`
|
|
978
978
|
|
|
@@ -1019,6 +1019,6 @@ FLAG DESCRIPTIONS
|
|
|
1019
1019
|
The job ID is valid for 24 hours after you start the scratch org creation.
|
|
1020
1020
|
```
|
|
1021
1021
|
|
|
1022
|
-
_See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.
|
|
1022
|
+
_See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6-dev.2/src/commands/org/resume/scratch.ts)_
|
|
1023
1023
|
|
|
1024
1024
|
<!-- commandsstop -->
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
import { Lifecycle, Messages, Org, scratchOrgCreate, scratchOrgLifecycleEventName, SfError, } from '@salesforce/core';
|
|
7
|
+
import { Lifecycle, Messages, Org, scratchOrgCreate, scratchOrgLifecycleEventName, scratchOrgLifecycleStages, SfError, } from '@salesforce/core';
|
|
8
8
|
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
9
9
|
import { Duration } from '@salesforce/kit';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { Status } from '../../../components/stages.js';
|
|
10
|
+
import terminalLink from 'terminal-link';
|
|
11
|
+
import { MultiStageRenderer } from '../../../components/stages.js';
|
|
13
12
|
import { buildScratchOrgRequest } from '../../../shared/scratchOrgRequest.js';
|
|
14
13
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
15
14
|
const messages = Messages.loadMessages('@salesforce/plugin-org', 'create_scratch');
|
|
@@ -151,13 +150,41 @@ export default class OrgCreateScratch extends SfCommand {
|
|
|
151
150
|
throw new SfError('No instance URL found for the dev hub');
|
|
152
151
|
}
|
|
153
152
|
const createCommandOptions = await buildScratchOrgRequest(flags, flags['client-id'] ? await this.secretPrompt({ message: messages.getMessage('prompt.secret') }) : undefined);
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
const ms = new MultiStageRenderer({
|
|
154
|
+
stages: flags.async ? ['prepare request', 'send request', 'done'] : scratchOrgLifecycleStages,
|
|
155
|
+
title: flags.async ? 'Creating Scratch Org (async)' : 'Creating Scratch Org',
|
|
156
|
+
info: [
|
|
157
|
+
{
|
|
158
|
+
label: 'Request Id',
|
|
159
|
+
get: (data) => data.scratchOrgInfo?.Id && terminalLink(data.scratchOrgInfo.Id, `${baseUrl}/${data.scratchOrgInfo.Id}`),
|
|
160
|
+
bold: true,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: 'OrgId',
|
|
164
|
+
get: (data) => data.scratchOrgInfo?.ScratchOrg,
|
|
165
|
+
bold: true,
|
|
166
|
+
color: 'cyan',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: 'Username',
|
|
170
|
+
get: (data) => data.scratchOrgInfo?.SignupUsername,
|
|
171
|
+
bold: true,
|
|
172
|
+
color: 'cyan',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: 'Alias',
|
|
176
|
+
get: (data) => data.alias,
|
|
177
|
+
static: true,
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
});
|
|
181
|
+
if (!this.jsonEnabled()) {
|
|
182
|
+
ms.start({ alias: flags.alias });
|
|
183
|
+
}
|
|
156
184
|
lifecycle.on(scratchOrgLifecycleEventName, async (data) => {
|
|
157
|
-
|
|
158
|
-
instance?.rerender(React.createElement(Status, { isAsync: flags.async, data: data, baseUrl: baseUrl }));
|
|
185
|
+
ms.goto(data.stage, data);
|
|
159
186
|
if (data.stage === 'done') {
|
|
160
|
-
|
|
187
|
+
ms.stop();
|
|
161
188
|
}
|
|
162
189
|
return Promise.resolve();
|
|
163
190
|
});
|
|
@@ -167,8 +194,8 @@ export default class OrgCreateScratch extends SfCommand {
|
|
|
167
194
|
throw new SfError('The scratch org did not return with any information');
|
|
168
195
|
}
|
|
169
196
|
if (flags.async) {
|
|
170
|
-
|
|
171
|
-
|
|
197
|
+
ms.last({ scratchOrgInfo });
|
|
198
|
+
ms.stop();
|
|
172
199
|
this.log();
|
|
173
200
|
this.info(messages.getMessage('action.resume', [this.config.bin, scratchOrgInfo.Id]));
|
|
174
201
|
}
|
|
@@ -179,10 +206,7 @@ export default class OrgCreateScratch extends SfCommand {
|
|
|
179
206
|
return { username, scratchOrgInfo, authFields, warnings, orgId: authFields?.orgId };
|
|
180
207
|
}
|
|
181
208
|
catch (error) {
|
|
182
|
-
|
|
183
|
-
instance.rerender(React.createElement(Status, { isAsync: flags.async, data: scratchOrgLifecycleData, error: error, baseUrl: baseUrl }));
|
|
184
|
-
instance.unmount();
|
|
185
|
-
}
|
|
209
|
+
ms.stop(error);
|
|
186
210
|
if (error instanceof SfError && error.name === 'ScratchOrgInfoTimeoutError') {
|
|
187
211
|
const scratchOrgInfoId = error.data.scratchOrgInfoId;
|
|
188
212
|
const resumeMessage = messages.getMessage('action.resume', [this.config.bin, scratchOrgInfoId]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch.js","sourceRoot":"","sources":["../../../../src/commands/org/create/scratch.
|
|
1
|
+
{"version":3,"file":"scratch.js","sourceRoot":"","sources":["../../../../src/commands/org/create/scratch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,SAAS,EACT,QAAQ,EACR,GAAG,EACH,gBAAgB,EAEhB,4BAA4B,EAC5B,yBAAyB,EACzB,OAAO,GACR,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,CAAC;AAEnF,MAAM,2BAA2B,GAAG,0BAA0B,CAAC;AAE/D,MAAM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I,CAAC,KAAc,CAAC,CAAC;YACxB,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,4BAA4B,EAAE,CAAC;gBAC5E,MAAM,gBAAgB,GAAI,KAAK,CAAC,IAAqC,CAAC,gBAAgB,CAAC;gBACvF,MAAM,aAAa,GAAG,QAAQ,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC;gBAEhG,IAAI,CAAC,GAAG,EAAE,CAAC;gBACX,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBACzB,IAAI,CAAC,KAAK,CAAC,wDAAwD,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;YACjG,CAAC;iBAAM,CAAC;gBACN,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC"}
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { strict as assert } from 'node:assert';
|
|
8
8
|
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
9
|
-
import { Lifecycle, Messages, ScratchOrgCache, scratchOrgLifecycleEventName, scratchOrgResume, SfError, } from '@salesforce/core';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { Status } from '../../../components/stages.js';
|
|
9
|
+
import { Lifecycle, Messages, ScratchOrgCache, scratchOrgLifecycleEventName, scratchOrgLifecycleStages, scratchOrgResume, SfError, } from '@salesforce/core';
|
|
10
|
+
import terminalLink from 'terminal-link';
|
|
11
|
+
import { MultiStageRenderer } from '../../../components/stages.js';
|
|
13
12
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
14
13
|
const messages = Messages.loadMessages('@salesforce/plugin-org', 'resume_scratch');
|
|
15
14
|
export default class OrgResumeScratch extends SfCommand {
|
|
@@ -42,14 +41,43 @@ export default class OrgResumeScratch extends SfCommand {
|
|
|
42
41
|
throw messages.createError('error.NoRecentJobId');
|
|
43
42
|
// oclif doesn't know that the exactlyOne flag will ensure that one of these is set, and there we definitely have a jobID.
|
|
44
43
|
assert(jobId);
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const
|
|
44
|
+
const cached = cache.get(jobId);
|
|
45
|
+
const hubBaseUrl = cached?.hubBaseUrl;
|
|
46
|
+
const ms = new MultiStageRenderer({
|
|
47
|
+
stages: scratchOrgLifecycleStages,
|
|
48
|
+
title: 'Resuming Scratch Org',
|
|
49
|
+
info: [
|
|
50
|
+
{
|
|
51
|
+
label: 'Request Id',
|
|
52
|
+
get: (data) => data.scratchOrgInfo?.Id && terminalLink(data.scratchOrgInfo.Id, `${hubBaseUrl}/${data.scratchOrgInfo.Id}`),
|
|
53
|
+
bold: true,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: 'OrgId',
|
|
57
|
+
get: (data) => data.scratchOrgInfo?.ScratchOrg,
|
|
58
|
+
bold: true,
|
|
59
|
+
color: 'cyan',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Username',
|
|
63
|
+
get: (data) => data.scratchOrgInfo?.SignupUsername,
|
|
64
|
+
bold: true,
|
|
65
|
+
color: 'cyan',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: 'Alias',
|
|
69
|
+
get: (data) => data.alias,
|
|
70
|
+
static: true,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
});
|
|
74
|
+
if (!this.jsonEnabled()) {
|
|
75
|
+
ms.start({ alias: cached?.alias });
|
|
76
|
+
}
|
|
48
77
|
lifecycle.on(scratchOrgLifecycleEventName, async (data) => {
|
|
49
|
-
|
|
50
|
-
instance?.rerender(React.createElement(Status, { data: data, baseUrl: hubBaseUrl }));
|
|
78
|
+
ms.goto(data.stage, data);
|
|
51
79
|
if (data.stage === 'done') {
|
|
52
|
-
|
|
80
|
+
ms.stop();
|
|
53
81
|
}
|
|
54
82
|
return Promise.resolve();
|
|
55
83
|
});
|
|
@@ -60,10 +88,7 @@ export default class OrgResumeScratch extends SfCommand {
|
|
|
60
88
|
return { username, scratchOrgInfo, authFields, warnings, orgId: authFields?.orgId };
|
|
61
89
|
}
|
|
62
90
|
catch (e) {
|
|
63
|
-
|
|
64
|
-
instance.rerender(React.createElement(Status, { data: scratchOrgLifecycleData, error: e, baseUrl: hubBaseUrl }));
|
|
65
|
-
instance.unmount();
|
|
66
|
-
}
|
|
91
|
+
ms.stop(e);
|
|
67
92
|
if (cache.keys() && e instanceof Error && e.name === 'CacheMissError') {
|
|
68
93
|
// we have something in the cache, but it didn't match what the user passed in
|
|
69
94
|
throw messages.createError('error.jobIdMismatch', [jobId]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch.js","sourceRoot":"","sources":["../../../../src/commands/org/resume/scratch.
|
|
1
|
+
{"version":3,"file":"scratch.js","sourceRoot":"","sources":["../../../../src/commands/org/resume/scratch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,SAAS,EACT,QAAQ,EACR,eAAe,EAEf,4BAA4B,EAC5B,yBAAyB,EACzB,gBAAgB,EAChB,OAAO,GACR,MAAM,kBAAkB,CAAC;AAC1B,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,CAAC;AAEnF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,SAAgC;IACrE,MAAM,CAAU,OAAO,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rChildren({ children, error, ...props }: SpinnerProps & {
|
|
29
29
|
readonly children?: React.ReactNode;
|
|
30
|
-
readonly textStyle?: {
|
|
31
|
-
readonly color?: string;
|
|
32
|
-
readonly bold?: boolean;
|
|
33
|
-
};
|
|
34
|
-
readonly text?: string;
|
|
35
30
|
readonly error?: Error;
|
|
36
31
|
}): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../src/components/spinner.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,QAA8B,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAgBhC,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,EAAmB;IAC3D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;YAC7B,QAAQ,CAAC,CAAC,aAAa,EAAE,EAAE;gBACzB,MAAM,WAAW,GAAG,aAAa,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;gBAChE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAErB,OAAO,GAAS,EAAE;YAChB,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO;QACL,KAAK,EAAE,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I,oBAAC,IAAI,QAAE,KAAK,CAAC,KAAK,CAAQ,CACzE,CACP,CAAC;IACJ,CAAC;IAED,OAAO,oBAAC,cAAc,IAAC,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI,CAAC;AACrD,CAAC"}
|
|
@@ -1,29 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import { SfError } from '@salesforce/core';
|
|
3
|
+
type Info<T extends Record<string, unknown>> = {
|
|
4
|
+
/**
|
|
5
|
+
* Color of the value.
|
|
6
|
+
*/
|
|
7
|
+
color?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Get the value to display. Takes the data property on the MultiStageRenderer as an argument.
|
|
10
|
+
* Useful if you want to apply some logic (like rendering a link) to the data before displaying it.
|
|
11
|
+
*
|
|
12
|
+
* @param data The data property on the MultiStageRenderer.
|
|
13
|
+
* @returns {string | undefined}
|
|
14
|
+
*/
|
|
15
|
+
get?: (data: T) => string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the value should be bold.
|
|
18
|
+
*/
|
|
19
|
+
bold?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the value should be a static key-value pair (not a spinner component).
|
|
22
|
+
*/
|
|
23
|
+
static?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Label to display next to the value.
|
|
26
|
+
*/
|
|
27
|
+
label: string;
|
|
28
|
+
};
|
|
29
|
+
type MultiStageRendererOptions<T extends Record<string, unknown>> = {
|
|
30
|
+
/**
|
|
31
|
+
* Stages to render.
|
|
32
|
+
*/
|
|
33
|
+
readonly stages: readonly string[] | string[];
|
|
34
|
+
/**
|
|
35
|
+
* Title to display at the top of the stages component.
|
|
36
|
+
*/
|
|
21
37
|
readonly title: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
readonly
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Information to display at the bottom of the stages component.
|
|
40
|
+
*/
|
|
41
|
+
readonly info?: Array<Info<T>>;
|
|
42
|
+
/**
|
|
43
|
+
* Whether to show the total elapsed time. Defaults to true
|
|
44
|
+
*/
|
|
45
|
+
readonly showElapsedTime?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to show the time spent on each stage. Defaults to true
|
|
48
|
+
*/
|
|
49
|
+
readonly showStageTime?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The unit to use for the timer. Defaults to 'ms'
|
|
52
|
+
*/
|
|
53
|
+
readonly timerUnit?: 'ms' | 's';
|
|
54
|
+
};
|
|
55
|
+
export declare class MultiStageRenderer<T extends Record<string, unknown>> implements Disposable {
|
|
56
|
+
private currentStage;
|
|
57
|
+
private data?;
|
|
58
|
+
private instance;
|
|
59
|
+
private readonly info?;
|
|
60
|
+
private readonly stages;
|
|
61
|
+
private readonly title;
|
|
62
|
+
private readonly hasElapsedTime?;
|
|
63
|
+
private readonly hasStageTime?;
|
|
64
|
+
private readonly timerUnit?;
|
|
65
|
+
constructor({ info, stages, title, showElapsedTime, showStageTime, timerUnit: timerUnit, }: MultiStageRendererOptions<T>);
|
|
66
|
+
start(data?: Partial<T>): void;
|
|
67
|
+
next(data?: Partial<T>): void;
|
|
68
|
+
previous(data?: Partial<T>): void;
|
|
69
|
+
goto(stage: string, data?: Partial<T>): void;
|
|
70
|
+
last(data?: Partial<T>): void;
|
|
71
|
+
stop(error?: Error | SfError): void;
|
|
72
|
+
[Symbol.dispose](): void;
|
|
73
|
+
private update;
|
|
74
|
+
private formatInfo;
|
|
75
|
+
}
|
|
76
|
+
export {};
|
package/lib/components/stages.js
CHANGED
|
@@ -4,43 +4,45 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import { Box, Text } from 'ink';
|
|
7
|
+
import { Performance } from '@oclif/core';
|
|
8
|
+
import { Box, render, Text } from 'ink';
|
|
9
9
|
import { capitalCase } from 'change-case';
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import terminalLink from 'terminal-link';
|
|
12
11
|
import { SpinnerOrError, SpinnerOrErrorOrChildren } from './spinner.js';
|
|
13
12
|
function round(value, decimals = 2) {
|
|
14
|
-
|
|
13
|
+
const factor = Math.pow(10, decimals);
|
|
14
|
+
return (Math.round(value * factor) / factor).toFixed(decimals);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function msInMostReadableFormat(time, decimals = 2) {
|
|
17
17
|
// if time < 1000ms, return time in ms
|
|
18
18
|
if (time < 1000) {
|
|
19
19
|
return `${time}ms`;
|
|
20
20
|
}
|
|
21
|
+
return secondsInMostReadableFormat(time, decimals);
|
|
22
|
+
}
|
|
23
|
+
function secondsInMostReadableFormat(time, decimals = 2) {
|
|
24
|
+
if (time < 1000) {
|
|
25
|
+
return '< 1s';
|
|
26
|
+
}
|
|
21
27
|
// if time < 60s, return time in seconds
|
|
22
28
|
if (time < 60_000) {
|
|
23
|
-
return `${round(time / 1000)}s`;
|
|
29
|
+
return `${round(time / 1000, decimals)}s`;
|
|
24
30
|
}
|
|
25
|
-
// if time < 60m, return time in minutes
|
|
31
|
+
// if time < 60m, return time in minutes and seconds
|
|
26
32
|
if (time < 3_600_000) {
|
|
27
|
-
|
|
33
|
+
const minutes = Math.floor(time / 60_000);
|
|
34
|
+
const seconds = round((time % 60_000) / 1000, 0);
|
|
35
|
+
return `${minutes}m ${seconds}s`;
|
|
28
36
|
}
|
|
29
37
|
return time.toString();
|
|
30
38
|
}
|
|
31
|
-
|
|
32
|
-
if (!start || !end) {
|
|
33
|
-
return '0ms';
|
|
34
|
-
}
|
|
35
|
-
return timeInMostReadableFormat(end.getTime() - start.getTime());
|
|
36
|
-
}
|
|
39
|
+
const MARKERS = new Map();
|
|
37
40
|
const getSideDividerWidth = (width, titleWidth) => (width - titleWidth) / 2;
|
|
38
41
|
const getNumberOfCharsPerWidth = (char, width) => width / char.length;
|
|
39
42
|
const PAD = ' ';
|
|
40
|
-
|
|
43
|
+
function Divider({ title = '', width = 50, padding = 1, titlePadding = 1, titleColor = 'white', dividerChar = '─', dividerColor = 'dim', }) {
|
|
41
44
|
const titleString = title ? `${PAD.repeat(titlePadding) + title + PAD.repeat(titlePadding)}` : '';
|
|
42
45
|
const titleWidth = titleString.length;
|
|
43
|
-
// width ??= process.stdout.columns ? process.stdout.columns - titlePadding : 80;
|
|
44
46
|
const terminalWidth = process.stdout.columns ?? 80;
|
|
45
47
|
const widthToUse = width === 'full' ? terminalWidth - titlePadding : width > terminalWidth ? terminalWidth : width;
|
|
46
48
|
const dividerWidth = getSideDividerWidth(widthToUse, titleWidth);
|
|
@@ -55,68 +57,146 @@ export function Divider({ title = '', width = 50, padding = 1, titlePadding = 1,
|
|
|
55
57
|
React.createElement(Text, { color: dividerColor }, dividerSideString),
|
|
56
58
|
paddingString)));
|
|
57
59
|
}
|
|
58
|
-
|
|
60
|
+
function Timer({ color, isStopped, unit, }) {
|
|
59
61
|
const [time, setTime] = React.useState(0);
|
|
60
|
-
const
|
|
62
|
+
const [previousDate, setPreviousDate] = React.useState(Date.now());
|
|
61
63
|
React.useEffect(() => {
|
|
64
|
+
if (isStopped) {
|
|
65
|
+
setTime(time + (Date.now() - previousDate));
|
|
66
|
+
setPreviousDate(Date.now());
|
|
67
|
+
return () => { };
|
|
68
|
+
}
|
|
62
69
|
const intervalId = setInterval(() => {
|
|
63
|
-
setTime((
|
|
64
|
-
|
|
70
|
+
setTime(time + (Date.now() - previousDate));
|
|
71
|
+
setPreviousDate(Date.now());
|
|
72
|
+
}, unit === 'ms' ? 1 : 1000);
|
|
65
73
|
return () => {
|
|
66
74
|
clearInterval(intervalId);
|
|
67
75
|
};
|
|
68
|
-
}, [
|
|
69
|
-
return React.createElement(Text, {
|
|
76
|
+
}, [time, isStopped, previousDate, unit]);
|
|
77
|
+
return (React.createElement(Text, { color: color }, unit === 'ms' ? msInMostReadableFormat(time) : secondsInMostReadableFormat(time, 0)));
|
|
70
78
|
}
|
|
71
|
-
|
|
79
|
+
function Space({ repeat = 1 }) {
|
|
72
80
|
return React.createElement(Text, null, ' '.repeat(repeat));
|
|
73
81
|
}
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
function StaticKeyValue({ label, value, isBold, color, isStatic }) {
|
|
83
|
+
if (!value || !isStatic)
|
|
84
|
+
return;
|
|
85
|
+
return (React.createElement(Box, null,
|
|
86
|
+
React.createElement(Text, { bold: isBold },
|
|
87
|
+
label,
|
|
88
|
+
": "),
|
|
89
|
+
React.createElement(Text, { color: color }, value)));
|
|
90
|
+
}
|
|
91
|
+
function Stages({ currentStage, error, hasElapsedTime = true, hasFinished, hasStageTime = true, info, stages, timerUnit = 'ms', title, }) {
|
|
92
|
+
if (!currentStage)
|
|
93
|
+
return;
|
|
94
|
+
const spinnerType = process.platform === 'win32' ? 'line' : 'arc';
|
|
76
95
|
return (React.createElement(Box, { flexDirection: "column", paddingTop: 1 },
|
|
77
|
-
React.createElement(Divider, { title:
|
|
78
|
-
React.createElement(Box, { flexDirection: "column", paddingTop: 1, marginLeft: 1 },
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
return (React.createElement(Box, { key: stage },
|
|
86
|
-
React.createElement(SpinnerOrError, { error: props.error, type: "dots2", label: capitalCase(stage) }),
|
|
87
|
-
React.createElement(Space, null),
|
|
88
|
-
React.createElement(Timer, { color: "dim" })));
|
|
96
|
+
React.createElement(Divider, { title: title }),
|
|
97
|
+
React.createElement(Box, { flexDirection: "column", paddingTop: 1, marginLeft: 1 }, stages.map((stage, stageIndex) => {
|
|
98
|
+
const isCurrent = currentStage === stage && !hasFinished;
|
|
99
|
+
const isCompleted = hasFinished ?? (!isCurrent && stages.indexOf(currentStage) >= stageIndex);
|
|
100
|
+
const isFuture = !isCompleted && !isCurrent && stages.indexOf(currentStage) < stageIndex;
|
|
101
|
+
if (isCurrent && !MARKERS.has(stage)) {
|
|
102
|
+
MARKERS.set(stage, Performance.mark('MultiStageRenderer', stage.replaceAll(' ', '-').toLowerCase()));
|
|
89
103
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (!
|
|
93
|
-
|
|
94
|
-
setTimings({ ...timings });
|
|
104
|
+
if (isCompleted) {
|
|
105
|
+
const marker = MARKERS.get(stage);
|
|
106
|
+
if (marker && !marker.stopped) {
|
|
107
|
+
marker.stop();
|
|
95
108
|
}
|
|
96
|
-
|
|
109
|
+
}
|
|
110
|
+
return (React.createElement(Box, { key: stage },
|
|
111
|
+
isCurrent && React.createElement(SpinnerOrError, { error: error, type: "dots2", label: capitalCase(stage) }),
|
|
112
|
+
isCompleted && (React.createElement(Box, null,
|
|
97
113
|
React.createElement(Text, { color: "green" }, "\u2713 "),
|
|
98
114
|
React.createElement(Text, null,
|
|
99
115
|
capitalCase(stage),
|
|
100
|
-
" "),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
" "))),
|
|
117
|
+
isFuture && React.createElement(Text, { color: "dim" },
|
|
118
|
+
"\u25FC ",
|
|
119
|
+
capitalCase(stage)),
|
|
120
|
+
!isFuture && hasStageTime && (React.createElement(Box, null,
|
|
121
|
+
React.createElement(Space, null),
|
|
122
|
+
React.createElement(Timer, { color: "dim", isStopped: isCompleted, unit: timerUnit })))));
|
|
107
123
|
})),
|
|
108
|
-
React.createElement(Box, { paddingTop: 1, marginLeft: 1 },
|
|
124
|
+
hasElapsedTime && (React.createElement(Box, { paddingTop: 1, marginLeft: 1 },
|
|
109
125
|
React.createElement(Text, null, "Elapsed Time: "),
|
|
110
|
-
React.createElement(Timer,
|
|
126
|
+
React.createElement(Timer, { unit: timerUnit }))),
|
|
127
|
+
React.createElement(Box, { flexDirection: "column", paddingTop: 1, marginLeft: 1 }, info?.map((i) => i.isStatic ? (React.createElement(StaticKeyValue, { key: i.label, ...i })) : (React.createElement(SpinnerOrErrorOrChildren, { key: i.label, label: `${i.label}: `, labelPosition: "left", error: error, type: spinnerType }, i.value && (React.createElement(Text, { bold: i.isBold, color: i.color }, i.value))))))));
|
|
111
128
|
}
|
|
112
|
-
export
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
129
|
+
export class MultiStageRenderer {
|
|
130
|
+
currentStage;
|
|
131
|
+
data;
|
|
132
|
+
instance;
|
|
133
|
+
info;
|
|
134
|
+
stages;
|
|
135
|
+
title;
|
|
136
|
+
hasElapsedTime;
|
|
137
|
+
hasStageTime;
|
|
138
|
+
timerUnit;
|
|
139
|
+
constructor({ info, stages, title, showElapsedTime, showStageTime, timerUnit: timerUnit, }) {
|
|
140
|
+
this.stages = stages;
|
|
141
|
+
this.title = title;
|
|
142
|
+
this.info = info;
|
|
143
|
+
this.currentStage = stages[0];
|
|
144
|
+
this.hasElapsedTime = showElapsedTime ?? true;
|
|
145
|
+
this.hasStageTime = showStageTime ?? true;
|
|
146
|
+
this.timerUnit = timerUnit ?? 'ms';
|
|
147
|
+
}
|
|
148
|
+
start(data) {
|
|
149
|
+
this.data = { ...this.data, ...data };
|
|
150
|
+
this.instance = render(React.createElement(Stages, { hasElapsedTime: this.hasElapsedTime, hasStageTime: this.hasStageTime, timerUnit: this.timerUnit, info: this.formatInfo(), stages: this.stages, title: this.title }));
|
|
151
|
+
}
|
|
152
|
+
next(data) {
|
|
153
|
+
const nextStageIndex = this.stages.indexOf(this.currentStage) + 1;
|
|
154
|
+
if (nextStageIndex < this.stages.length) {
|
|
155
|
+
this.update(this.stages[nextStageIndex], data);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
previous(data) {
|
|
159
|
+
const previousStageIndex = this.stages.indexOf(this.currentStage) - 1;
|
|
160
|
+
if (previousStageIndex >= 0) {
|
|
161
|
+
this.update(this.stages[previousStageIndex], data);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
goto(stage, data) {
|
|
165
|
+
if (this.stages.includes(stage)) {
|
|
166
|
+
this.update(stage, data);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
last(data) {
|
|
170
|
+
this.update(this.stages[this.stages.length - 1], data);
|
|
171
|
+
}
|
|
172
|
+
stop(error) {
|
|
173
|
+
if (error) {
|
|
174
|
+
this.instance?.rerender(React.createElement(Stages, { currentStage: this.currentStage, info: this.formatInfo(), stages: this.stages, title: this.title, error: error, hasElapsedTime: this.hasElapsedTime, hasStageTime: this.hasStageTime, timerUnit: this.timerUnit }));
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
this.instance?.rerender(React.createElement(Stages, { hasFinished: true, currentStage: this.currentStage, info: this.formatInfo(), stages: this.stages, title: this.title, hasElapsedTime: this.hasElapsedTime, hasStageTime: this.hasStageTime, timerUnit: this.timerUnit }));
|
|
178
|
+
}
|
|
179
|
+
this.instance?.unmount();
|
|
180
|
+
}
|
|
181
|
+
[Symbol.dispose]() {
|
|
182
|
+
this.instance?.unmount();
|
|
183
|
+
}
|
|
184
|
+
update(stage, data) {
|
|
185
|
+
this.currentStage = stage;
|
|
186
|
+
this.data = { ...this.data, ...data };
|
|
187
|
+
this.instance?.rerender(React.createElement(Stages, { hasElapsedTime: this.hasElapsedTime, hasStageTime: this.hasStageTime, timerUnit: this.timerUnit, info: this.formatInfo(), currentStage: this.currentStage, stages: this.stages, title: this.title }));
|
|
188
|
+
}
|
|
189
|
+
formatInfo() {
|
|
190
|
+
return (this.info?.map((info) => {
|
|
191
|
+
const formattedData = info.get ? info.get(this.data) : undefined;
|
|
192
|
+
return {
|
|
193
|
+
value: formattedData,
|
|
194
|
+
label: info.label,
|
|
195
|
+
isBold: info.bold,
|
|
196
|
+
color: info.color,
|
|
197
|
+
isStatic: info.static,
|
|
198
|
+
};
|
|
199
|
+
}) ?? []);
|
|
200
|
+
}
|
|
121
201
|
}
|
|
122
202
|
//# sourceMappingURL=stages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages.js","sourceRoot":"","sources":["../../src/components/stages.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"stages.js","sourceRoot":"","sources":["../../src/components/stages.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAY,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AA4ExE,SAAS,KAAK,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY,EAAE,QAAQ,GAAG,CAAC;IACxD,sCAAsC;IACtC,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;QAChB,OAAO,GAAG,IAAI,IAAI,CAAC;IACrB,CAAC;IAED,OAAO,2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AAa,EAAE,IAAiB;QAC7C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,EAAO,CAAC;QAC3C,IAAI,CAAC,QAAQ,EAAE,QAAQ,CACrB,oBAAC,MAAM,IACL,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,EACvB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CAAC;IACJ,CAAC;IAEO,UAAU;QAChB,OAAO,CACL,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACtB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACtE,OAAO;gBACL,KAAK,EAAE,aAAa;gBACpB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,IAAI;gBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,QAAQ,EAAE,IAAI,CAAC,MAAM;aACtB,CAAC;QACJ,CAAC,CAAC,IAAI,EAAE,CACT,CAAC;IACJ,CAAC;CACF"}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-org",
|
|
3
3
|
"description": "Commands to interact with Salesforce orgs",
|
|
4
|
-
"version": "4.3.6-dev.
|
|
4
|
+
"version": "4.3.6-dev.2",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
"exports": "./lib/index.js",
|
|
243
243
|
"type": "module",
|
|
244
244
|
"sfdx": {
|
|
245
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.3.6-dev.
|
|
246
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.3.6-dev.
|
|
245
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.3.6-dev.2.crt",
|
|
246
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.3.6-dev.2.sig"
|
|
247
247
|
}
|
|
248
248
|
}
|