@salesforce/plugin-org 4.3.6-dev.2 → 4.3.6
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 +14 -46
- package/lib/commands/org/create/scratch.js.map +1 -1
- package/lib/commands/org/resume/scratch.js +9 -41
- package/lib/commands/org/resume/scratch.js.map +1 -1
- package/lib/shared/scratchOrgOutput.d.ts +9 -0
- package/lib/shared/scratchOrgOutput.js +36 -0
- package/lib/shared/scratchOrgOutput.js.map +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +7 -16
- package/lib/components/spinner.d.ts +0 -31
- package/lib/components/spinner.js +0 -55
- package/lib/components/spinner.js.map +0 -1
- package/lib/components/stages.d.ts +0 -76
- package/lib/components/stages.js +0 -202
- package/lib/components/stages.js.map +0 -1
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
|
|
232
|
+
_See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
386
|
+
_See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
432
|
+
_See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
476
|
+
_See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
515
|
+
_See code: [src/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
560
|
+
_See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
602
|
+
_See code: [src/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
641
|
+
_See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
708
|
+
_See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
763
|
+
_See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
835
|
+
_See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
912
|
+
_See code: [src/commands/org/refresh/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
975
|
+
_See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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
|
|
1022
|
+
_See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/4.3.6/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,
|
|
7
|
+
import { Lifecycle, Messages, Org, scratchOrgCreate, scratchOrgLifecycleEventName, SfError, } from '@salesforce/core';
|
|
8
8
|
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
9
9
|
import { Duration } from '@salesforce/kit';
|
|
10
|
-
import terminalLink from 'terminal-link';
|
|
11
|
-
import { MultiStageRenderer } from '../../../components/stages.js';
|
|
12
10
|
import { buildScratchOrgRequest } from '../../../shared/scratchOrgRequest.js';
|
|
11
|
+
import { buildStatus } from '../../../shared/scratchOrgOutput.js';
|
|
13
12
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
14
13
|
const messages = Messages.loadMessages('@salesforce/plugin-org', 'create_scratch');
|
|
15
14
|
const definitionFileHelpGroupName = 'Definition File Override';
|
|
@@ -150,67 +149,36 @@ export default class OrgCreateScratch extends SfCommand {
|
|
|
150
149
|
throw new SfError('No instance URL found for the dev hub');
|
|
151
150
|
}
|
|
152
151
|
const createCommandOptions = await buildScratchOrgRequest(flags, flags['client-id'] ? await this.secretPrompt({ message: messages.getMessage('prompt.secret') }) : undefined);
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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 });
|
|
152
|
+
let lastStatus;
|
|
153
|
+
if (!flags.async) {
|
|
154
|
+
lifecycle.on(scratchOrgLifecycleEventName, async (data) => {
|
|
155
|
+
lastStatus = buildStatus(data, baseUrl);
|
|
156
|
+
this.spinner.status = lastStatus;
|
|
157
|
+
return Promise.resolve();
|
|
158
|
+
});
|
|
183
159
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
if (data.stage === 'done') {
|
|
187
|
-
ms.stop();
|
|
188
|
-
}
|
|
189
|
-
return Promise.resolve();
|
|
190
|
-
});
|
|
160
|
+
this.log();
|
|
161
|
+
this.spinner.start(flags.async ? 'Requesting Scratch Org (will not wait for completion because --async)' : 'Creating Scratch Org');
|
|
191
162
|
try {
|
|
192
163
|
const { username, scratchOrgInfo, authFields, warnings } = await scratchOrgCreate(createCommandOptions);
|
|
164
|
+
this.spinner.stop(lastStatus);
|
|
193
165
|
if (!scratchOrgInfo) {
|
|
194
166
|
throw new SfError('The scratch org did not return with any information');
|
|
195
167
|
}
|
|
168
|
+
this.log();
|
|
196
169
|
if (flags.async) {
|
|
197
|
-
ms.last({ scratchOrgInfo });
|
|
198
|
-
ms.stop();
|
|
199
|
-
this.log();
|
|
200
170
|
this.info(messages.getMessage('action.resume', [this.config.bin, scratchOrgInfo.Id]));
|
|
201
171
|
}
|
|
202
172
|
else {
|
|
203
|
-
this.log();
|
|
204
173
|
this.logSuccess(messages.getMessage('success'));
|
|
205
174
|
}
|
|
206
175
|
return { username, scratchOrgInfo, authFields, warnings, orgId: authFields?.orgId };
|
|
207
176
|
}
|
|
208
177
|
catch (error) {
|
|
209
|
-
ms.stop(error);
|
|
210
178
|
if (error instanceof SfError && error.name === 'ScratchOrgInfoTimeoutError') {
|
|
179
|
+
this.spinner.stop(lastStatus);
|
|
211
180
|
const scratchOrgInfoId = error.data.scratchOrgInfoId;
|
|
212
181
|
const resumeMessage = messages.getMessage('action.resume', [this.config.bin, scratchOrgInfoId]);
|
|
213
|
-
this.log();
|
|
214
182
|
this.info(resumeMessage);
|
|
215
183
|
this.error('The scratch org did not complete within your wait time', { code: '69', exit: 69 });
|
|
216
184
|
}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,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,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAGlE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,CAAC;AA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,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;YAClD,CAAC;YAED,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;QACtF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,4BAA4B,EAAE,CAAC;gBAC5E,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC9B,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,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,9 +6,8 @@
|
|
|
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,
|
|
10
|
-
import
|
|
11
|
-
import { MultiStageRenderer } from '../../../components/stages.js';
|
|
9
|
+
import { Lifecycle, Messages, ScratchOrgCache, scratchOrgLifecycleEventName, scratchOrgResume, SfError, } from '@salesforce/core';
|
|
10
|
+
import { buildStatus } from '../../../shared/scratchOrgOutput.js';
|
|
12
11
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
12
|
const messages = Messages.loadMessages('@salesforce/plugin-org', 'resume_scratch');
|
|
14
13
|
export default class OrgResumeScratch extends SfCommand {
|
|
@@ -41,54 +40,23 @@ export default class OrgResumeScratch extends SfCommand {
|
|
|
41
40
|
throw messages.createError('error.NoRecentJobId');
|
|
42
41
|
// oclif doesn't know that the exactlyOne flag will ensure that one of these is set, and there we definitely have a jobID.
|
|
43
42
|
assert(jobId);
|
|
44
|
-
const
|
|
45
|
-
|
|
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
|
-
}
|
|
43
|
+
const hubBaseUrl = cache.get(jobId)?.hubBaseUrl;
|
|
44
|
+
let lastStatus;
|
|
77
45
|
lifecycle.on(scratchOrgLifecycleEventName, async (data) => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
ms.stop();
|
|
81
|
-
}
|
|
46
|
+
lastStatus = buildStatus(data, hubBaseUrl);
|
|
47
|
+
this.spinner.status = lastStatus;
|
|
82
48
|
return Promise.resolve();
|
|
83
49
|
});
|
|
50
|
+
this.log();
|
|
51
|
+
this.spinner.start('Creating Scratch Org');
|
|
84
52
|
try {
|
|
85
53
|
const { username, scratchOrgInfo, authFields, warnings } = await scratchOrgResume(jobId);
|
|
54
|
+
this.spinner.stop(lastStatus);
|
|
86
55
|
this.log();
|
|
87
56
|
this.logSuccess(messages.getMessage('success'));
|
|
88
57
|
return { username, scratchOrgInfo, authFields, warnings, orgId: authFields?.orgId };
|
|
89
58
|
}
|
|
90
59
|
catch (e) {
|
|
91
|
-
ms.stop(e);
|
|
92
60
|
if (cache.keys() && e instanceof Error && e.name === 'CacheMissError') {
|
|
93
61
|
// we have something in the cache, but it didn't match what the user passed in
|
|
94
62
|
throw messages.createError('error.jobIdMismatch', [jobId]);
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,gBAAgB,EAChB,OAAO,GACR,MAAM,kBAAkB,CAAC;AAE1B,OAAO,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,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;QACtF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;gBACtE,8EAA8E;gBAC9E,MAAM,QAAQ,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;YAC7D,CAAC;iBAAM,CAAC;gBACN,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ScratchOrgLifecycleEvent } from '@salesforce/core';
|
|
2
|
+
export declare const buildStatus: (data: ScratchOrgLifecycleEvent, baseUrl: string) => string;
|
|
3
|
+
export declare const formatStage: (currentStage: ScratchOrgLifecycleEvent['stage']) => string;
|
|
4
|
+
export declare const formatRequest: (baseUrl: string, id?: string) => string;
|
|
5
|
+
export declare const formatUsername: (username?: string) => string;
|
|
6
|
+
export declare const formatOrgId: (id?: string) => string;
|
|
7
|
+
export declare const formatCurrentStage: (stage: string) => string;
|
|
8
|
+
export declare const formatCompletedStage: (stage: string) => string;
|
|
9
|
+
export declare const formatFutureStage: (stage: string) => string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import { scratchOrgLifecycleStages } from '@salesforce/core';
|
|
8
|
+
import ansis from 'ansis';
|
|
9
|
+
import { capitalCase } from 'change-case';
|
|
10
|
+
import { StandardColors } from '@salesforce/sf-plugins-core';
|
|
11
|
+
const boldBlue = (input) => ansis.rgb(81, 176, 235).bold(input);
|
|
12
|
+
const boldPurple = (input) => ansis.rgb(157, 129, 221).bold(input);
|
|
13
|
+
export const buildStatus = (data, baseUrl) => `
|
|
14
|
+
RequestId: ${formatRequest(baseUrl, data.scratchOrgInfo?.Id)}
|
|
15
|
+
OrgId: ${formatOrgId(data.scratchOrgInfo?.ScratchOrg)}
|
|
16
|
+
Username: ${formatUsername(data.scratchOrgInfo?.SignupUsername)}
|
|
17
|
+
${formatStage(data.stage)}`;
|
|
18
|
+
export const formatStage = (currentStage) => scratchOrgLifecycleStages
|
|
19
|
+
.map((stage, stageIndex) => {
|
|
20
|
+
// current stage
|
|
21
|
+
if (currentStage === stage)
|
|
22
|
+
return formatCurrentStage(stage);
|
|
23
|
+
// completed stages
|
|
24
|
+
if (scratchOrgLifecycleStages.indexOf(currentStage) > stageIndex)
|
|
25
|
+
return formatCompletedStage(stage);
|
|
26
|
+
// future stage
|
|
27
|
+
return formatFutureStage(stage);
|
|
28
|
+
})
|
|
29
|
+
.join('\n');
|
|
30
|
+
export const formatRequest = (baseUrl, id) => `${id ? `${ansis.bold(id)} (${baseUrl}/${id})` : ''}`;
|
|
31
|
+
export const formatUsername = (username) => `${username ? `${boldBlue(username)} ` : ''}`;
|
|
32
|
+
export const formatOrgId = (id) => `${id ? `${boldBlue(id)} ` : ''}`;
|
|
33
|
+
export const formatCurrentStage = (stage) => boldPurple(capitalCase(stage));
|
|
34
|
+
export const formatCompletedStage = (stage) => StandardColors.success.bold(`✓ ${capitalCase(stage)}`);
|
|
35
|
+
export const formatFutureStage = (stage) => StandardColors.info(capitalCase(stage));
|
|
36
|
+
//# sourceMappingURL=scratchOrgOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scratchOrgOutput.js","sourceRoot":"","sources":["../../src/shared/scratchOrgOutput.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAA4B,yBAAyB,EAAE,MAAM,kB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C,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,EAAW,EAAU,EAAE,CACpE,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,OAAO,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAExD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAiB,EAAU,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAC3G,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAW,EAAU,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAEtF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-org",
|
|
3
3
|
"description": "Commands to interact with Salesforce orgs",
|
|
4
|
-
"version": "4.3.6
|
|
4
|
+
"version": "4.3.6",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@oclif/core": "^4.0.12",
|
|
9
9
|
"@salesforce/core": "^8.1.0",
|
|
10
10
|
"@salesforce/kit": "^3.1.6",
|
|
11
|
-
"@salesforce/sf-plugins-core": "^11.1
|
|
11
|
+
"@salesforce/sf-plugins-core": "^11.2.1",
|
|
12
12
|
"@salesforce/source-deploy-retrieve": "^12.0.1",
|
|
13
13
|
"ansis": "^3.2.0",
|
|
14
14
|
"change-case": "^5.4.4",
|
|
15
|
-
"cli-spinners": "^2",
|
|
16
|
-
"ink": "^5.0.1",
|
|
17
15
|
"is-wsl": "^3.1.0",
|
|
18
|
-
"open": "^10.1.0"
|
|
19
|
-
"react": "^18.3.1",
|
|
20
|
-
"terminal-link": "^3.0.0"
|
|
16
|
+
"open": "^10.1.0"
|
|
21
17
|
},
|
|
22
18
|
"devDependencies": {
|
|
23
19
|
"@oclif/plugin-command-snapshot": "^5.2.6",
|
|
24
20
|
"@salesforce/cli-plugins-testkit": "^5.3.15",
|
|
25
21
|
"@salesforce/dev-scripts": "^10.2.2",
|
|
26
|
-
"@salesforce/plugin-command-reference": "^3.1.
|
|
22
|
+
"@salesforce/plugin-command-reference": "^3.1.11",
|
|
27
23
|
"@salesforce/ts-sinon": "1.4.22",
|
|
28
|
-
"@types/react": "^18.3.3",
|
|
29
|
-
"eslint-config-xo": "^0.45.0",
|
|
30
|
-
"eslint-config-xo-react": "^0.27.0",
|
|
31
|
-
"eslint-plugin-react": "^7.34.3",
|
|
32
|
-
"eslint-plugin-react-hooks": "^4.6.2",
|
|
33
24
|
"eslint-plugin-sf-plugin": "^1.18.11",
|
|
34
25
|
"moment": "^2.30.1",
|
|
35
|
-
"oclif": "^4.
|
|
26
|
+
"oclif": "^4.14.6",
|
|
36
27
|
"ts-node": "^10.9.2",
|
|
37
28
|
"typescript": "^5.4.5"
|
|
38
29
|
},
|
|
@@ -242,7 +233,7 @@
|
|
|
242
233
|
"exports": "./lib/index.js",
|
|
243
234
|
"type": "module",
|
|
244
235
|
"sfdx": {
|
|
245
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.3.6
|
|
246
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.3.6
|
|
236
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.3.6.crt",
|
|
237
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-org/4.3.6.sig"
|
|
247
238
|
}
|
|
248
239
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type SpinnerName } from 'cli-spinners';
|
|
3
|
-
export type UseSpinnerProps = {
|
|
4
|
-
/**
|
|
5
|
-
* Type of a spinner.
|
|
6
|
-
* See [cli-spinners](https://github.com/sindresorhus/cli-spinners) for available spinners.
|
|
7
|
-
*
|
|
8
|
-
* @default dots
|
|
9
|
-
*/
|
|
10
|
-
readonly type?: SpinnerName;
|
|
11
|
-
};
|
|
12
|
-
export type UseSpinnerResult = {
|
|
13
|
-
frame: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function useSpinner({ type }: UseSpinnerProps): UseSpinnerResult;
|
|
16
|
-
export type SpinnerProps = UseSpinnerProps & {
|
|
17
|
-
/**
|
|
18
|
-
* Label to show near the spinner.
|
|
19
|
-
*/
|
|
20
|
-
readonly label?: string;
|
|
21
|
-
readonly isBold?: boolean;
|
|
22
|
-
readonly labelPosition?: 'left' | 'right';
|
|
23
|
-
};
|
|
24
|
-
export declare function Spinner({ isBold, label, type, labelPosition }: SpinnerProps): React.ReactElement;
|
|
25
|
-
export declare function SpinnerOrError({ error, labelPosition, ...props }: SpinnerProps & {
|
|
26
|
-
readonly error?: Error;
|
|
27
|
-
}): React.ReactElement;
|
|
28
|
-
export declare function SpinnerOrErrorOrChildren({ children, error, ...props }: SpinnerProps & {
|
|
29
|
-
readonly children?: React.ReactNode;
|
|
30
|
-
readonly error?: Error;
|
|
31
|
-
}): React.ReactElement;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024, salesforce.com, inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import React, { useEffect, useState } from 'react';
|
|
8
|
-
import spinners from 'cli-spinners';
|
|
9
|
-
import { Box, Text } from 'ink';
|
|
10
|
-
export function useSpinner({ type = 'dots' }) {
|
|
11
|
-
const [frame, setFrame] = useState(0);
|
|
12
|
-
const spinner = spinners[type];
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
const timer = setInterval(() => {
|
|
15
|
-
setFrame((previousFrame) => {
|
|
16
|
-
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
17
|
-
return isLastFrame ? 0 : previousFrame + 1;
|
|
18
|
-
});
|
|
19
|
-
}, spinner.interval);
|
|
20
|
-
return () => {
|
|
21
|
-
clearInterval(timer);
|
|
22
|
-
};
|
|
23
|
-
}, [spinner]);
|
|
24
|
-
return {
|
|
25
|
-
frame: spinner.frames[frame] ?? '',
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export function Spinner({ isBold, label, type, labelPosition = 'right' }) {
|
|
29
|
-
const { frame } = useSpinner({ type });
|
|
30
|
-
return (React.createElement(Box, null,
|
|
31
|
-
label && labelPosition === 'left' && React.createElement(Text, null, label),
|
|
32
|
-
isBold ? (React.createElement(Text, { bold: true, color: "magenta" }, frame)) : (React.createElement(Text, { color: "magenta" },
|
|
33
|
-
frame,
|
|
34
|
-
" ")),
|
|
35
|
-
label && labelPosition === 'right' && React.createElement(Text, null, label)));
|
|
36
|
-
}
|
|
37
|
-
export function SpinnerOrError({ error, labelPosition = 'right', ...props }) {
|
|
38
|
-
if (error) {
|
|
39
|
-
return (React.createElement(Box, null,
|
|
40
|
-
props.label && labelPosition === 'left' && React.createElement(Text, null, props.label),
|
|
41
|
-
React.createElement(Text, { color: "red" }, "\u2716"),
|
|
42
|
-
props.label && labelPosition === 'right' && React.createElement(Text, null, props.label)));
|
|
43
|
-
}
|
|
44
|
-
return React.createElement(Spinner, { labelPosition: labelPosition, ...props });
|
|
45
|
-
}
|
|
46
|
-
export function SpinnerOrErrorOrChildren({ children, error, ...props }) {
|
|
47
|
-
if (children) {
|
|
48
|
-
return (React.createElement(Box, null,
|
|
49
|
-
props.label && props.labelPosition === 'left' && React.createElement(Text, null, props.label),
|
|
50
|
-
children,
|
|
51
|
-
props.label && props.labelPosition === 'right' && React.createElement(Text, null, props.label)));
|
|
52
|
-
}
|
|
53
|
-
return React.createElement(SpinnerOrError, { error: error, ...props });
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=spinner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,C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AAI,IAAC,KAAK,EAAC,KAAK,aAAS;YACzB,KAAK,CAAC,KAAK,IAAI,aAAa,KAAK,OAAO,IAAI,oBAAC,IAAI,QAAE,KAAK,CAAC,KAAK,CAAQ,CACnE,CACP,CAAC;IACJ,CAAC;IAED,OAAO,oBAAC,OAAO,IAAC,aAAa,EAAE,aAAa,KAAM,KAAK,GAAI,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,EACvC,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EAIT;IACC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CACL,oBAAC,GAAG;YACD,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,aAAa,KAAK,MAAM,IAAI,oBAAC,IAAI,QAAE,KAAK,CAAC,KAAK,CAAQ;YAC3E,QAAQ;YACR,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,aAAa,KAAK,OAAO,IAAI,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,76 +0,0 @@
|
|
|
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
|
-
*/
|
|
37
|
-
readonly title: string;
|
|
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
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024, salesforce.com, inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import { Performance } from '@oclif/core';
|
|
8
|
-
import { Box, render, Text } from 'ink';
|
|
9
|
-
import { capitalCase } from 'change-case';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { SpinnerOrError, SpinnerOrErrorOrChildren } from './spinner.js';
|
|
12
|
-
function round(value, decimals = 2) {
|
|
13
|
-
const factor = Math.pow(10, decimals);
|
|
14
|
-
return (Math.round(value * factor) / factor).toFixed(decimals);
|
|
15
|
-
}
|
|
16
|
-
function msInMostReadableFormat(time, decimals = 2) {
|
|
17
|
-
// if time < 1000ms, return time in ms
|
|
18
|
-
if (time < 1000) {
|
|
19
|
-
return `${time}ms`;
|
|
20
|
-
}
|
|
21
|
-
return secondsInMostReadableFormat(time, decimals);
|
|
22
|
-
}
|
|
23
|
-
function secondsInMostReadableFormat(time, decimals = 2) {
|
|
24
|
-
if (time < 1000) {
|
|
25
|
-
return '< 1s';
|
|
26
|
-
}
|
|
27
|
-
// if time < 60s, return time in seconds
|
|
28
|
-
if (time < 60_000) {
|
|
29
|
-
return `${round(time / 1000, decimals)}s`;
|
|
30
|
-
}
|
|
31
|
-
// if time < 60m, return time in minutes and seconds
|
|
32
|
-
if (time < 3_600_000) {
|
|
33
|
-
const minutes = Math.floor(time / 60_000);
|
|
34
|
-
const seconds = round((time % 60_000) / 1000, 0);
|
|
35
|
-
return `${minutes}m ${seconds}s`;
|
|
36
|
-
}
|
|
37
|
-
return time.toString();
|
|
38
|
-
}
|
|
39
|
-
const MARKERS = new Map();
|
|
40
|
-
const getSideDividerWidth = (width, titleWidth) => (width - titleWidth) / 2;
|
|
41
|
-
const getNumberOfCharsPerWidth = (char, width) => width / char.length;
|
|
42
|
-
const PAD = ' ';
|
|
43
|
-
function Divider({ title = '', width = 50, padding = 1, titlePadding = 1, titleColor = 'white', dividerChar = '─', dividerColor = 'dim', }) {
|
|
44
|
-
const titleString = title ? `${PAD.repeat(titlePadding) + title + PAD.repeat(titlePadding)}` : '';
|
|
45
|
-
const titleWidth = titleString.length;
|
|
46
|
-
const terminalWidth = process.stdout.columns ?? 80;
|
|
47
|
-
const widthToUse = width === 'full' ? terminalWidth - titlePadding : width > terminalWidth ? terminalWidth : width;
|
|
48
|
-
const dividerWidth = getSideDividerWidth(widthToUse, titleWidth);
|
|
49
|
-
const numberOfCharsPerSide = getNumberOfCharsPerWidth(dividerChar, dividerWidth);
|
|
50
|
-
const dividerSideString = dividerChar.repeat(numberOfCharsPerSide);
|
|
51
|
-
const paddingString = PAD.repeat(padding);
|
|
52
|
-
return (React.createElement(Box, { flexDirection: "row" },
|
|
53
|
-
React.createElement(Text, null,
|
|
54
|
-
paddingString,
|
|
55
|
-
React.createElement(Text, { color: dividerColor }, dividerSideString),
|
|
56
|
-
React.createElement(Text, { color: titleColor }, titleString),
|
|
57
|
-
React.createElement(Text, { color: dividerColor }, dividerSideString),
|
|
58
|
-
paddingString)));
|
|
59
|
-
}
|
|
60
|
-
function Timer({ color, isStopped, unit, }) {
|
|
61
|
-
const [time, setTime] = React.useState(0);
|
|
62
|
-
const [previousDate, setPreviousDate] = React.useState(Date.now());
|
|
63
|
-
React.useEffect(() => {
|
|
64
|
-
if (isStopped) {
|
|
65
|
-
setTime(time + (Date.now() - previousDate));
|
|
66
|
-
setPreviousDate(Date.now());
|
|
67
|
-
return () => { };
|
|
68
|
-
}
|
|
69
|
-
const intervalId = setInterval(() => {
|
|
70
|
-
setTime(time + (Date.now() - previousDate));
|
|
71
|
-
setPreviousDate(Date.now());
|
|
72
|
-
}, unit === 'ms' ? 1 : 1000);
|
|
73
|
-
return () => {
|
|
74
|
-
clearInterval(intervalId);
|
|
75
|
-
};
|
|
76
|
-
}, [time, isStopped, previousDate, unit]);
|
|
77
|
-
return (React.createElement(Text, { color: color }, unit === 'ms' ? msInMostReadableFormat(time) : secondsInMostReadableFormat(time, 0)));
|
|
78
|
-
}
|
|
79
|
-
function Space({ repeat = 1 }) {
|
|
80
|
-
return React.createElement(Text, null, ' '.repeat(repeat));
|
|
81
|
-
}
|
|
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';
|
|
95
|
-
return (React.createElement(Box, { flexDirection: "column", paddingTop: 1 },
|
|
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()));
|
|
103
|
-
}
|
|
104
|
-
if (isCompleted) {
|
|
105
|
-
const marker = MARKERS.get(stage);
|
|
106
|
-
if (marker && !marker.stopped) {
|
|
107
|
-
marker.stop();
|
|
108
|
-
}
|
|
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,
|
|
113
|
-
React.createElement(Text, { color: "green" }, "\u2713 "),
|
|
114
|
-
React.createElement(Text, null,
|
|
115
|
-
capitalCase(stage),
|
|
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 })))));
|
|
123
|
-
})),
|
|
124
|
-
hasElapsedTime && (React.createElement(Box, { paddingTop: 1, marginLeft: 1 },
|
|
125
|
-
React.createElement(Text, null, "Elapsed Time: "),
|
|
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))))))));
|
|
128
|
-
}
|
|
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
|
-
}
|
|
201
|
-
}
|
|
202
|
-
//# sourceMappingURL=stages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,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