@salesforce/b2c-cli 0.6.0 → 0.7.1
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/dist/commands/sandbox/clone/create.d.ts +3 -0
- package/dist/commands/sandbox/clone/create.js +60 -7
- package/dist/commands/sandbox/clone/create.js.map +1 -1
- package/dist/commands/sandbox/update.d.ts +24 -0
- package/dist/commands/sandbox/update.js +111 -0
- package/dist/commands/sandbox/update.js.map +1 -0
- package/oclif.manifest.json +321 -15
- package/package.json +2 -2
|
@@ -14,6 +14,9 @@ export default class CloneCreate extends OdsCommand<typeof CloneCreate> {
|
|
|
14
14
|
'target-profile': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
emails: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
ttl: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
wait: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
'poll-interval': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
20
|
};
|
|
18
21
|
run(): Promise<{
|
|
19
22
|
cloneId?: string;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Args, Flags, Errors } from '@oclif/core';
|
|
7
7
|
import { OdsCommand } from '@salesforce/b2c-tooling-sdk/cli';
|
|
8
|
-
import { getApiErrorMessage } from '@salesforce/b2c-tooling-sdk';
|
|
8
|
+
import { getApiErrorMessage, waitForClone, ClonePollingTimeoutError, ClonePollingError, CloneFailedError, } from '@salesforce/b2c-tooling-sdk';
|
|
9
9
|
import { t } from '../../../i18n/index.js';
|
|
10
10
|
/**
|
|
11
11
|
* Command to create a sandbox clone.
|
|
@@ -25,6 +25,8 @@ export default class CloneCreate extends OdsCommand {
|
|
|
25
25
|
'<%= config.bin %> <%= command.id %> <sandboxId> --target-profile large',
|
|
26
26
|
'<%= config.bin %> <%= command.id %> <sandboxId> --ttl 48',
|
|
27
27
|
'<%= config.bin %> <%= command.id %> <sandboxId> --target-profile large --ttl 48 --emails dev@example.com,qa@example.com',
|
|
28
|
+
'<%= config.bin %> <%= command.id %> <sandboxId> --wait',
|
|
29
|
+
'<%= config.bin %> <%= command.id %> <sandboxId> --wait --poll-interval 15',
|
|
28
30
|
];
|
|
29
31
|
static flags = {
|
|
30
32
|
'target-profile': Flags.string({
|
|
@@ -42,10 +44,25 @@ export default class CloneCreate extends OdsCommand {
|
|
|
42
44
|
required: false,
|
|
43
45
|
default: 24,
|
|
44
46
|
}),
|
|
47
|
+
wait: Flags.boolean({
|
|
48
|
+
char: 'w',
|
|
49
|
+
description: 'Wait for the clone to complete before returning',
|
|
50
|
+
default: false,
|
|
51
|
+
}),
|
|
52
|
+
'poll-interval': Flags.integer({
|
|
53
|
+
description: 'Polling interval in seconds when using --wait',
|
|
54
|
+
default: 10,
|
|
55
|
+
dependsOn: ['wait'],
|
|
56
|
+
}),
|
|
57
|
+
timeout: Flags.integer({
|
|
58
|
+
description: 'Maximum time to wait in seconds when using --wait (0 for no timeout)',
|
|
59
|
+
default: 1800,
|
|
60
|
+
dependsOn: ['wait'],
|
|
61
|
+
}),
|
|
45
62
|
};
|
|
46
63
|
async run() {
|
|
47
64
|
const { sandboxId: rawSandboxId } = this.args;
|
|
48
|
-
const { 'target-profile': targetProfile, emails, ttl } = this.flags;
|
|
65
|
+
const { 'target-profile': targetProfile, emails, ttl, wait, 'poll-interval': pollInterval, timeout } = this.flags;
|
|
49
66
|
// Validate TTL
|
|
50
67
|
if (ttl > 0 && ttl < 24) {
|
|
51
68
|
throw new Errors.CLIError(t('commands.clone.create.invalidTTL', 'TTL must be 0 or negative (infinite), or 24 hours or greater. Values between 1-23 are not allowed. Received: {{ttl}}', { ttl }));
|
|
@@ -75,12 +92,48 @@ export default class CloneCreate extends OdsCommand {
|
|
|
75
92
|
this.error(t('commands.clone.create.error', 'Failed to create sandbox clone: {{message}}', { message }));
|
|
76
93
|
}
|
|
77
94
|
const cloneId = result.data.data?.cloneId;
|
|
78
|
-
if (this.jsonEnabled()) {
|
|
79
|
-
|
|
95
|
+
if (!this.jsonEnabled()) {
|
|
96
|
+
this.log(t('commands.clone.create.success', '✓ Sandbox clone creation started successfully'));
|
|
97
|
+
this.log(t('commands.clone.create.cloneId', 'Clone ID: {{cloneId}}', { cloneId }));
|
|
98
|
+
}
|
|
99
|
+
if (wait && cloneId) {
|
|
100
|
+
this.log(t('commands.clone.create.waiting', 'Waiting for clone to complete...'));
|
|
101
|
+
try {
|
|
102
|
+
await waitForClone(this.odsClient, {
|
|
103
|
+
sandboxId,
|
|
104
|
+
cloneId,
|
|
105
|
+
pollIntervalSeconds: pollInterval,
|
|
106
|
+
timeoutSeconds: timeout,
|
|
107
|
+
onPoll: ({ elapsedSeconds, status, progressPercentage }) => {
|
|
108
|
+
const progress = progressPercentage === undefined ? '' : ` (${progressPercentage}%)`;
|
|
109
|
+
this.logger.info({ sandboxId, cloneId, elapsed: elapsedSeconds, status }, `[${elapsedSeconds}s] Status: ${status}${progress}`);
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
if (error instanceof ClonePollingTimeoutError) {
|
|
115
|
+
this.error(t('commands.clone.create.timeout', 'Timeout waiting for clone after {{seconds}} seconds', {
|
|
116
|
+
seconds: String(error.timeoutSeconds),
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
if (error instanceof CloneFailedError) {
|
|
120
|
+
this.error(t('commands.clone.create.failed', 'Clone operation failed'));
|
|
121
|
+
}
|
|
122
|
+
if (error instanceof ClonePollingError) {
|
|
123
|
+
this.error(t('commands.clone.create.pollError', 'Failed to fetch clone status: {{message}}', {
|
|
124
|
+
message: error.message,
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
throw error;
|
|
128
|
+
}
|
|
129
|
+
if (!this.jsonEnabled()) {
|
|
130
|
+
this.log(t('commands.clone.create.completed', '✓ Clone completed successfully'));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else if (!this.jsonEnabled()) {
|
|
134
|
+
const bin = this.config.bin;
|
|
135
|
+
this.log(t('commands.clone.create.checkStatus', '\nTo check the clone status, run:\n {{bin}} sandbox clone get {{sandboxId}} {{cloneId}}', { bin, sandboxId, cloneId }));
|
|
80
136
|
}
|
|
81
|
-
this.log(t('commands.clone.create.success', '✓ Sandbox clone creation started successfully'));
|
|
82
|
-
this.log(t('commands.clone.create.cloneId', 'Clone ID: {{cloneId}}', { cloneId }));
|
|
83
|
-
this.log(t('commands.clone.create.checkStatus', '\nTo check the clone status, run:\n <%= config.bin %> ods clone get {{sandboxId}} {{cloneId}}', { sandboxId, cloneId }));
|
|
84
137
|
return { cloneId };
|
|
85
138
|
}
|
|
86
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/sandbox/clone/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/sandbox/clone/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,GAC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AAmC,EACnC,0FAA0F,EAC1F,EAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAC,CAC1B,CACF,CAAC;QACJ,CAAC;QAED,OAAO,EAAC,OAAO,EAAC,CAAC;IACnB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OdsCommand } from '@salesforce/b2c-tooling-sdk/cli';
|
|
2
|
+
import { type OdsComponents } from '@salesforce/b2c-tooling-sdk';
|
|
3
|
+
type SandboxModel = OdsComponents['schemas']['SandboxModel'];
|
|
4
|
+
/**
|
|
5
|
+
* Command to update an on-demand sandbox.
|
|
6
|
+
*/
|
|
7
|
+
export default class SandboxUpdate extends OdsCommand<typeof SandboxUpdate> {
|
|
8
|
+
static aliases: string[];
|
|
9
|
+
static args: {
|
|
10
|
+
sandboxId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
static description: string;
|
|
13
|
+
static enableJsonFlag: boolean;
|
|
14
|
+
static examples: string[];
|
|
15
|
+
static flags: {
|
|
16
|
+
ttl: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'auto-scheduled': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
tags: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
emails: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<SandboxModel>;
|
|
22
|
+
private printSandboxSummary;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025, Salesforce, Inc.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2
|
|
4
|
+
* For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Args, Flags, ux } from '@oclif/core';
|
|
7
|
+
import cliui from 'cliui';
|
|
8
|
+
import { OdsCommand } from '@salesforce/b2c-tooling-sdk/cli';
|
|
9
|
+
import { getApiErrorMessage } from '@salesforce/b2c-tooling-sdk';
|
|
10
|
+
import { t, withDocs } from '../../i18n/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* Command to update an on-demand sandbox.
|
|
13
|
+
*/
|
|
14
|
+
export default class SandboxUpdate extends OdsCommand {
|
|
15
|
+
static aliases = ['ods:update'];
|
|
16
|
+
static args = {
|
|
17
|
+
sandboxId: Args.string({
|
|
18
|
+
description: 'Sandbox ID (UUID or realm-instance, e.g., abcd-123)',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
static description = withDocs(t('commands.sandbox.update.description', 'Update a sandbox (extend TTL, change scheduling, update tags or emails)'), '/cli/sandbox.html#b2c-sandbox-update');
|
|
23
|
+
static enableJsonFlag = true;
|
|
24
|
+
static examples = [
|
|
25
|
+
'<%= config.bin %> <%= command.id %> zzzv-123 --ttl 48',
|
|
26
|
+
'<%= config.bin %> <%= command.id %> zzzv-123 --ttl 0',
|
|
27
|
+
'<%= config.bin %> <%= command.id %> zzzv-123 --auto-scheduled',
|
|
28
|
+
'<%= config.bin %> <%= command.id %> zzzv-123 --no-auto-scheduled',
|
|
29
|
+
'<%= config.bin %> <%= command.id %> zzzv-123 --tags tag1,tag2',
|
|
30
|
+
'<%= config.bin %> <%= command.id %> zzzv-123 --emails user@example.com,dev@example.com',
|
|
31
|
+
'<%= config.bin %> <%= command.id %> zzzv-123 --ttl 48 --tags ci,nightly --json',
|
|
32
|
+
];
|
|
33
|
+
static flags = {
|
|
34
|
+
ttl: Flags.integer({
|
|
35
|
+
description: 'Number of hours to add to sandbox lifetime (0 or less for infinite)',
|
|
36
|
+
}),
|
|
37
|
+
'auto-scheduled': Flags.boolean({
|
|
38
|
+
description: 'Enable or disable automatic start/stop scheduling',
|
|
39
|
+
allowNo: true,
|
|
40
|
+
}),
|
|
41
|
+
tags: Flags.string({
|
|
42
|
+
description: 'Comma-separated list of tags',
|
|
43
|
+
}),
|
|
44
|
+
emails: Flags.string({
|
|
45
|
+
description: 'Comma-separated list of notification email addresses',
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
48
|
+
async run() {
|
|
49
|
+
const sandboxId = await this.resolveSandboxId(this.args.sandboxId);
|
|
50
|
+
const { ttl, 'auto-scheduled': autoScheduled, tags, emails } = this.flags;
|
|
51
|
+
// Require at least one update flag
|
|
52
|
+
if (ttl === undefined && autoScheduled === undefined && tags === undefined && emails === undefined) {
|
|
53
|
+
this.error('At least one update flag is required. Use --ttl, --auto-scheduled, --tags, or --emails.');
|
|
54
|
+
}
|
|
55
|
+
const body = {};
|
|
56
|
+
if (ttl !== undefined) {
|
|
57
|
+
body.ttl = ttl;
|
|
58
|
+
}
|
|
59
|
+
if (autoScheduled !== undefined) {
|
|
60
|
+
body.autoScheduled = autoScheduled;
|
|
61
|
+
}
|
|
62
|
+
if (tags !== undefined) {
|
|
63
|
+
body.tags = tags.split(',').map((tag) => tag.trim());
|
|
64
|
+
}
|
|
65
|
+
if (emails !== undefined) {
|
|
66
|
+
body.emails = emails.split(',').map((email) => email.trim());
|
|
67
|
+
}
|
|
68
|
+
this.log(t('commands.sandbox.update.updating', 'Updating sandbox {{sandboxId}}...', { sandboxId }));
|
|
69
|
+
const result = await this.odsClient.PATCH('/sandboxes/{sandboxId}', {
|
|
70
|
+
params: {
|
|
71
|
+
path: { sandboxId },
|
|
72
|
+
},
|
|
73
|
+
body,
|
|
74
|
+
});
|
|
75
|
+
if (!result.data?.data) {
|
|
76
|
+
const message = getApiErrorMessage(result.error, result.response);
|
|
77
|
+
this.error(`Failed to update sandbox: ${message}`);
|
|
78
|
+
}
|
|
79
|
+
const sandbox = result.data.data;
|
|
80
|
+
this.log(t('commands.sandbox.update.success', 'Sandbox updated successfully'));
|
|
81
|
+
if (this.jsonEnabled()) {
|
|
82
|
+
return sandbox;
|
|
83
|
+
}
|
|
84
|
+
this.printSandboxSummary(sandbox);
|
|
85
|
+
return sandbox;
|
|
86
|
+
}
|
|
87
|
+
printSandboxSummary(sandbox) {
|
|
88
|
+
const ui = cliui({ width: process.stdout.columns || 80 });
|
|
89
|
+
const fields = [
|
|
90
|
+
['ID', sandbox.id],
|
|
91
|
+
['Realm', sandbox.realm],
|
|
92
|
+
['Instance', sandbox.instance],
|
|
93
|
+
['State', sandbox.state],
|
|
94
|
+
['Auto Scheduled', sandbox.autoScheduled?.toString()],
|
|
95
|
+
['EOL', sandbox.eol ? new Date(sandbox.eol).toLocaleString() : undefined],
|
|
96
|
+
];
|
|
97
|
+
if (sandbox.tags && sandbox.tags.length > 0) {
|
|
98
|
+
fields.push(['Tags', sandbox.tags.join(', ')]);
|
|
99
|
+
}
|
|
100
|
+
if (sandbox.emails && sandbox.emails.length > 0) {
|
|
101
|
+
fields.push(['Emails', sandbox.emails.join(', ')]);
|
|
102
|
+
}
|
|
103
|
+
for (const [label, value] of fields) {
|
|
104
|
+
if (value !== undefined) {
|
|
105
|
+
ui.div({ text: `${label}:`, width: 20, padding: [0, 2, 0, 0] }, { text: value, padding: [0, 0, 0, 0] });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
ux.stdout(ui.toString());
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/sandbox/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAqB,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAC,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IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChD,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;YACpC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,EAAE,CAAC,GAAG,CAAC,EAAC,IAAI,EAAE,GAAG,KAAK,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAC,CAAC,CAAC;YACtG,CAAC;QACH,CAAC;QAED,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3B,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -607,7 +607,7 @@
|
|
|
607
607
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
608
608
|
"helpGroup": "QUERY",
|
|
609
609
|
"name": "to",
|
|
610
|
-
"default": "2026-03-
|
|
610
|
+
"default": "2026-03-11",
|
|
611
611
|
"hasDynamicHelp": false,
|
|
612
612
|
"multiple": false,
|
|
613
613
|
"type": "option"
|
|
@@ -903,7 +903,7 @@
|
|
|
903
903
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
904
904
|
"helpGroup": "QUERY",
|
|
905
905
|
"name": "to",
|
|
906
|
-
"default": "2026-03-
|
|
906
|
+
"default": "2026-03-11",
|
|
907
907
|
"hasDynamicHelp": false,
|
|
908
908
|
"multiple": false,
|
|
909
909
|
"type": "option"
|
|
@@ -1334,7 +1334,7 @@
|
|
|
1334
1334
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
1335
1335
|
"helpGroup": "QUERY",
|
|
1336
1336
|
"name": "to",
|
|
1337
|
-
"default": "2026-03-
|
|
1337
|
+
"default": "2026-03-11",
|
|
1338
1338
|
"hasDynamicHelp": false,
|
|
1339
1339
|
"multiple": false,
|
|
1340
1340
|
"type": "option"
|
|
@@ -10567,6 +10567,281 @@
|
|
|
10567
10567
|
"stop.js"
|
|
10568
10568
|
]
|
|
10569
10569
|
},
|
|
10570
|
+
"sandbox:update": {
|
|
10571
|
+
"aliases": [
|
|
10572
|
+
"ods:update"
|
|
10573
|
+
],
|
|
10574
|
+
"args": {
|
|
10575
|
+
"sandboxId": {
|
|
10576
|
+
"description": "Sandbox ID (UUID or realm-instance, e.g., abcd-123)",
|
|
10577
|
+
"name": "sandboxId",
|
|
10578
|
+
"required": true
|
|
10579
|
+
}
|
|
10580
|
+
},
|
|
10581
|
+
"description": "Update a sandbox (extend TTL, change scheduling, update tags or emails)\n\nDocs: https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/sandbox.html#b2c-sandbox-update",
|
|
10582
|
+
"examples": [
|
|
10583
|
+
"<%= config.bin %> <%= command.id %> zzzv-123 --ttl 48",
|
|
10584
|
+
"<%= config.bin %> <%= command.id %> zzzv-123 --ttl 0",
|
|
10585
|
+
"<%= config.bin %> <%= command.id %> zzzv-123 --auto-scheduled",
|
|
10586
|
+
"<%= config.bin %> <%= command.id %> zzzv-123 --no-auto-scheduled",
|
|
10587
|
+
"<%= config.bin %> <%= command.id %> zzzv-123 --tags tag1,tag2",
|
|
10588
|
+
"<%= config.bin %> <%= command.id %> zzzv-123 --emails user@example.com,dev@example.com",
|
|
10589
|
+
"<%= config.bin %> <%= command.id %> zzzv-123 --ttl 48 --tags ci,nightly --json"
|
|
10590
|
+
],
|
|
10591
|
+
"flags": {
|
|
10592
|
+
"json": {
|
|
10593
|
+
"description": "Output result as JSON",
|
|
10594
|
+
"helpGroup": "GLOBAL",
|
|
10595
|
+
"name": "json",
|
|
10596
|
+
"allowNo": false,
|
|
10597
|
+
"type": "boolean"
|
|
10598
|
+
},
|
|
10599
|
+
"log-level": {
|
|
10600
|
+
"description": "Set logging verbosity level",
|
|
10601
|
+
"env": "SFCC_LOG_LEVEL",
|
|
10602
|
+
"helpGroup": "GLOBAL",
|
|
10603
|
+
"name": "log-level",
|
|
10604
|
+
"hasDynamicHelp": false,
|
|
10605
|
+
"multiple": false,
|
|
10606
|
+
"options": [
|
|
10607
|
+
"trace",
|
|
10608
|
+
"debug",
|
|
10609
|
+
"info",
|
|
10610
|
+
"warn",
|
|
10611
|
+
"error",
|
|
10612
|
+
"silent"
|
|
10613
|
+
],
|
|
10614
|
+
"type": "option"
|
|
10615
|
+
},
|
|
10616
|
+
"debug": {
|
|
10617
|
+
"char": "D",
|
|
10618
|
+
"description": "Enable debug logging (shorthand for --log-level debug)",
|
|
10619
|
+
"env": "SFCC_DEBUG",
|
|
10620
|
+
"helpGroup": "GLOBAL",
|
|
10621
|
+
"name": "debug",
|
|
10622
|
+
"allowNo": false,
|
|
10623
|
+
"type": "boolean"
|
|
10624
|
+
},
|
|
10625
|
+
"jsonl": {
|
|
10626
|
+
"aliases": [
|
|
10627
|
+
"json-logs"
|
|
10628
|
+
],
|
|
10629
|
+
"description": "Output log messages as JSON lines",
|
|
10630
|
+
"env": "SFCC_JSON_LOGS",
|
|
10631
|
+
"helpGroup": "GLOBAL",
|
|
10632
|
+
"name": "jsonl",
|
|
10633
|
+
"allowNo": false,
|
|
10634
|
+
"type": "boolean"
|
|
10635
|
+
},
|
|
10636
|
+
"lang": {
|
|
10637
|
+
"char": "L",
|
|
10638
|
+
"description": "Language for messages (e.g., en, de). Also respects LANGUAGE env var.",
|
|
10639
|
+
"helpGroup": "GLOBAL",
|
|
10640
|
+
"name": "lang",
|
|
10641
|
+
"hasDynamicHelp": false,
|
|
10642
|
+
"multiple": false,
|
|
10643
|
+
"type": "option"
|
|
10644
|
+
},
|
|
10645
|
+
"config": {
|
|
10646
|
+
"description": "Path to config file (in dw.json format; defaults to ./dw.json)",
|
|
10647
|
+
"env": "SFCC_CONFIG",
|
|
10648
|
+
"helpGroup": "GLOBAL",
|
|
10649
|
+
"name": "config",
|
|
10650
|
+
"hasDynamicHelp": false,
|
|
10651
|
+
"multiple": false,
|
|
10652
|
+
"type": "option"
|
|
10653
|
+
},
|
|
10654
|
+
"instance": {
|
|
10655
|
+
"char": "i",
|
|
10656
|
+
"description": "Instance name from configuration file (i.e. dw.json, etc)",
|
|
10657
|
+
"env": "SFCC_INSTANCE",
|
|
10658
|
+
"helpGroup": "GLOBAL",
|
|
10659
|
+
"name": "instance",
|
|
10660
|
+
"hasDynamicHelp": false,
|
|
10661
|
+
"multiple": false,
|
|
10662
|
+
"type": "option"
|
|
10663
|
+
},
|
|
10664
|
+
"project-directory": {
|
|
10665
|
+
"aliases": [
|
|
10666
|
+
"working-directory"
|
|
10667
|
+
],
|
|
10668
|
+
"description": "Project directory",
|
|
10669
|
+
"env": "SFCC_PROJECT_DIRECTORY",
|
|
10670
|
+
"helpGroup": "GLOBAL",
|
|
10671
|
+
"name": "project-directory",
|
|
10672
|
+
"hasDynamicHelp": false,
|
|
10673
|
+
"multiple": false,
|
|
10674
|
+
"type": "option"
|
|
10675
|
+
},
|
|
10676
|
+
"extra-query": {
|
|
10677
|
+
"description": "Extra query parameters as JSON (e.g., '{\"debug\":\"true\"}')",
|
|
10678
|
+
"env": "SFCC_EXTRA_QUERY",
|
|
10679
|
+
"helpGroup": "GLOBAL",
|
|
10680
|
+
"hidden": true,
|
|
10681
|
+
"name": "extra-query",
|
|
10682
|
+
"hasDynamicHelp": false,
|
|
10683
|
+
"multiple": false,
|
|
10684
|
+
"type": "option"
|
|
10685
|
+
},
|
|
10686
|
+
"extra-body": {
|
|
10687
|
+
"description": "Extra body fields to merge as JSON (e.g., '{\"_internal\":true}')",
|
|
10688
|
+
"env": "SFCC_EXTRA_BODY",
|
|
10689
|
+
"helpGroup": "GLOBAL",
|
|
10690
|
+
"hidden": true,
|
|
10691
|
+
"name": "extra-body",
|
|
10692
|
+
"hasDynamicHelp": false,
|
|
10693
|
+
"multiple": false,
|
|
10694
|
+
"type": "option"
|
|
10695
|
+
},
|
|
10696
|
+
"extra-headers": {
|
|
10697
|
+
"description": "Extra HTTP headers as JSON (e.g., '{\"X-Custom-Header\": \"value\"}')",
|
|
10698
|
+
"env": "SFCC_EXTRA_HEADERS",
|
|
10699
|
+
"helpGroup": "GLOBAL",
|
|
10700
|
+
"hidden": true,
|
|
10701
|
+
"name": "extra-headers",
|
|
10702
|
+
"hasDynamicHelp": false,
|
|
10703
|
+
"multiple": false,
|
|
10704
|
+
"type": "option"
|
|
10705
|
+
},
|
|
10706
|
+
"client-id": {
|
|
10707
|
+
"description": "Client ID for OAuth",
|
|
10708
|
+
"env": "SFCC_CLIENT_ID",
|
|
10709
|
+
"helpGroup": "AUTH",
|
|
10710
|
+
"name": "client-id",
|
|
10711
|
+
"hasDynamicHelp": false,
|
|
10712
|
+
"multiple": false,
|
|
10713
|
+
"type": "option"
|
|
10714
|
+
},
|
|
10715
|
+
"client-secret": {
|
|
10716
|
+
"description": "Client Secret for OAuth",
|
|
10717
|
+
"env": "SFCC_CLIENT_SECRET",
|
|
10718
|
+
"helpGroup": "AUTH",
|
|
10719
|
+
"name": "client-secret",
|
|
10720
|
+
"hasDynamicHelp": false,
|
|
10721
|
+
"multiple": false,
|
|
10722
|
+
"type": "option"
|
|
10723
|
+
},
|
|
10724
|
+
"auth-scope": {
|
|
10725
|
+
"description": "OAuth scopes to request (comma-separated)",
|
|
10726
|
+
"env": "SFCC_OAUTH_SCOPES",
|
|
10727
|
+
"helpGroup": "AUTH",
|
|
10728
|
+
"name": "auth-scope",
|
|
10729
|
+
"delimiter": ",",
|
|
10730
|
+
"hasDynamicHelp": false,
|
|
10731
|
+
"multiple": true,
|
|
10732
|
+
"type": "option"
|
|
10733
|
+
},
|
|
10734
|
+
"short-code": {
|
|
10735
|
+
"description": "SCAPI short code",
|
|
10736
|
+
"env": "SFCC_SHORTCODE",
|
|
10737
|
+
"helpGroup": "AUTH",
|
|
10738
|
+
"name": "short-code",
|
|
10739
|
+
"hasDynamicHelp": false,
|
|
10740
|
+
"multiple": false,
|
|
10741
|
+
"type": "option"
|
|
10742
|
+
},
|
|
10743
|
+
"tenant-id": {
|
|
10744
|
+
"aliases": [
|
|
10745
|
+
"tenant"
|
|
10746
|
+
],
|
|
10747
|
+
"description": "Organization/tenant ID",
|
|
10748
|
+
"env": "SFCC_TENANT_ID",
|
|
10749
|
+
"helpGroup": "AUTH",
|
|
10750
|
+
"name": "tenant-id",
|
|
10751
|
+
"hasDynamicHelp": false,
|
|
10752
|
+
"multiple": false,
|
|
10753
|
+
"type": "option"
|
|
10754
|
+
},
|
|
10755
|
+
"auth-methods": {
|
|
10756
|
+
"description": "Allowed auth methods in priority order (comma-separated)",
|
|
10757
|
+
"env": "SFCC_AUTH_METHODS",
|
|
10758
|
+
"exclusive": [
|
|
10759
|
+
"user-auth"
|
|
10760
|
+
],
|
|
10761
|
+
"helpGroup": "AUTH",
|
|
10762
|
+
"name": "auth-methods",
|
|
10763
|
+
"delimiter": ",",
|
|
10764
|
+
"hasDynamicHelp": false,
|
|
10765
|
+
"multiple": true,
|
|
10766
|
+
"options": [
|
|
10767
|
+
"client-credentials",
|
|
10768
|
+
"implicit",
|
|
10769
|
+
"basic",
|
|
10770
|
+
"api-key"
|
|
10771
|
+
],
|
|
10772
|
+
"type": "option"
|
|
10773
|
+
},
|
|
10774
|
+
"user-auth": {
|
|
10775
|
+
"description": "Use browser-based user authentication (implicit OAuth flow)",
|
|
10776
|
+
"exclusive": [
|
|
10777
|
+
"auth-methods"
|
|
10778
|
+
],
|
|
10779
|
+
"helpGroup": "AUTH",
|
|
10780
|
+
"name": "user-auth",
|
|
10781
|
+
"allowNo": false,
|
|
10782
|
+
"type": "boolean"
|
|
10783
|
+
},
|
|
10784
|
+
"account-manager-host": {
|
|
10785
|
+
"description": "Account Manager hostname for OAuth (default: account.demandware.com)",
|
|
10786
|
+
"env": "SFCC_ACCOUNT_MANAGER_HOST",
|
|
10787
|
+
"helpGroup": "AUTH",
|
|
10788
|
+
"name": "account-manager-host",
|
|
10789
|
+
"hasDynamicHelp": false,
|
|
10790
|
+
"multiple": false,
|
|
10791
|
+
"type": "option"
|
|
10792
|
+
},
|
|
10793
|
+
"sandbox-api-host": {
|
|
10794
|
+
"description": "ODS API hostname (default: admin.dx.commercecloud.salesforce.com)",
|
|
10795
|
+
"env": "SFCC_SANDBOX_API_HOST",
|
|
10796
|
+
"name": "sandbox-api-host",
|
|
10797
|
+
"hasDynamicHelp": false,
|
|
10798
|
+
"multiple": false,
|
|
10799
|
+
"type": "option"
|
|
10800
|
+
},
|
|
10801
|
+
"ttl": {
|
|
10802
|
+
"description": "Number of hours to add to sandbox lifetime (0 or less for infinite)",
|
|
10803
|
+
"name": "ttl",
|
|
10804
|
+
"hasDynamicHelp": false,
|
|
10805
|
+
"multiple": false,
|
|
10806
|
+
"type": "option"
|
|
10807
|
+
},
|
|
10808
|
+
"auto-scheduled": {
|
|
10809
|
+
"description": "Enable or disable automatic start/stop scheduling",
|
|
10810
|
+
"name": "auto-scheduled",
|
|
10811
|
+
"allowNo": true,
|
|
10812
|
+
"type": "boolean"
|
|
10813
|
+
},
|
|
10814
|
+
"tags": {
|
|
10815
|
+
"description": "Comma-separated list of tags",
|
|
10816
|
+
"name": "tags",
|
|
10817
|
+
"hasDynamicHelp": false,
|
|
10818
|
+
"multiple": false,
|
|
10819
|
+
"type": "option"
|
|
10820
|
+
},
|
|
10821
|
+
"emails": {
|
|
10822
|
+
"description": "Comma-separated list of notification email addresses",
|
|
10823
|
+
"name": "emails",
|
|
10824
|
+
"hasDynamicHelp": false,
|
|
10825
|
+
"multiple": false,
|
|
10826
|
+
"type": "option"
|
|
10827
|
+
}
|
|
10828
|
+
},
|
|
10829
|
+
"hasDynamicHelp": false,
|
|
10830
|
+
"hiddenAliases": [],
|
|
10831
|
+
"id": "sandbox:update",
|
|
10832
|
+
"pluginAlias": "@salesforce/b2c-cli",
|
|
10833
|
+
"pluginName": "@salesforce/b2c-cli",
|
|
10834
|
+
"pluginType": "core",
|
|
10835
|
+
"strict": true,
|
|
10836
|
+
"enableJsonFlag": true,
|
|
10837
|
+
"isESM": true,
|
|
10838
|
+
"relativePath": [
|
|
10839
|
+
"dist",
|
|
10840
|
+
"commands",
|
|
10841
|
+
"sandbox",
|
|
10842
|
+
"update.js"
|
|
10843
|
+
]
|
|
10844
|
+
},
|
|
10570
10845
|
"sandbox:usage": {
|
|
10571
10846
|
"aliases": [
|
|
10572
10847
|
"ods:usage"
|
|
@@ -20366,7 +20641,7 @@
|
|
|
20366
20641
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
20367
20642
|
"helpGroup": "QUERY",
|
|
20368
20643
|
"name": "to",
|
|
20369
|
-
"default": "2026-03-
|
|
20644
|
+
"default": "2026-03-11",
|
|
20370
20645
|
"hasDynamicHelp": false,
|
|
20371
20646
|
"multiple": false,
|
|
20372
20647
|
"type": "option"
|
|
@@ -20697,7 +20972,7 @@
|
|
|
20697
20972
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
20698
20973
|
"helpGroup": "QUERY",
|
|
20699
20974
|
"name": "to",
|
|
20700
|
-
"default": "2026-03-
|
|
20975
|
+
"default": "2026-03-11",
|
|
20701
20976
|
"hasDynamicHelp": false,
|
|
20702
20977
|
"multiple": false,
|
|
20703
20978
|
"type": "option"
|
|
@@ -21028,7 +21303,7 @@
|
|
|
21028
21303
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
21029
21304
|
"helpGroup": "QUERY",
|
|
21030
21305
|
"name": "to",
|
|
21031
|
-
"default": "2026-03-
|
|
21306
|
+
"default": "2026-03-11",
|
|
21032
21307
|
"hasDynamicHelp": false,
|
|
21033
21308
|
"multiple": false,
|
|
21034
21309
|
"type": "option"
|
|
@@ -21359,7 +21634,7 @@
|
|
|
21359
21634
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
21360
21635
|
"helpGroup": "QUERY",
|
|
21361
21636
|
"name": "to",
|
|
21362
|
-
"default": "2026-03-
|
|
21637
|
+
"default": "2026-03-11",
|
|
21363
21638
|
"hasDynamicHelp": false,
|
|
21364
21639
|
"multiple": false,
|
|
21365
21640
|
"type": "option"
|
|
@@ -21690,7 +21965,7 @@
|
|
|
21690
21965
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
21691
21966
|
"helpGroup": "QUERY",
|
|
21692
21967
|
"name": "to",
|
|
21693
|
-
"default": "2026-03-
|
|
21968
|
+
"default": "2026-03-11",
|
|
21694
21969
|
"hasDynamicHelp": false,
|
|
21695
21970
|
"multiple": false,
|
|
21696
21971
|
"type": "option"
|
|
@@ -22012,7 +22287,7 @@
|
|
|
22012
22287
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
22013
22288
|
"helpGroup": "QUERY",
|
|
22014
22289
|
"name": "to",
|
|
22015
|
-
"default": "2026-03-
|
|
22290
|
+
"default": "2026-03-11",
|
|
22016
22291
|
"hasDynamicHelp": false,
|
|
22017
22292
|
"multiple": false,
|
|
22018
22293
|
"type": "option"
|
|
@@ -22343,7 +22618,7 @@
|
|
|
22343
22618
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
22344
22619
|
"helpGroup": "QUERY",
|
|
22345
22620
|
"name": "to",
|
|
22346
|
-
"default": "2026-03-
|
|
22621
|
+
"default": "2026-03-11",
|
|
22347
22622
|
"hasDynamicHelp": false,
|
|
22348
22623
|
"multiple": false,
|
|
22349
22624
|
"type": "option"
|
|
@@ -22674,7 +22949,7 @@
|
|
|
22674
22949
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
22675
22950
|
"helpGroup": "QUERY",
|
|
22676
22951
|
"name": "to",
|
|
22677
|
-
"default": "2026-03-
|
|
22952
|
+
"default": "2026-03-11",
|
|
22678
22953
|
"hasDynamicHelp": false,
|
|
22679
22954
|
"multiple": false,
|
|
22680
22955
|
"type": "option"
|
|
@@ -23018,7 +23293,7 @@
|
|
|
23018
23293
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
23019
23294
|
"helpGroup": "QUERY",
|
|
23020
23295
|
"name": "to",
|
|
23021
|
-
"default": "2026-03-
|
|
23296
|
+
"default": "2026-03-11",
|
|
23022
23297
|
"hasDynamicHelp": false,
|
|
23023
23298
|
"multiple": false,
|
|
23024
23299
|
"type": "option"
|
|
@@ -23358,7 +23633,7 @@
|
|
|
23358
23633
|
"description": "Inclusive end date (YYYY-MM-DD)",
|
|
23359
23634
|
"helpGroup": "QUERY",
|
|
23360
23635
|
"name": "to",
|
|
23361
|
-
"default": "2026-03-
|
|
23636
|
+
"default": "2026-03-11",
|
|
23362
23637
|
"hasDynamicHelp": false,
|
|
23363
23638
|
"multiple": false,
|
|
23364
23639
|
"type": "option"
|
|
@@ -35487,7 +35762,9 @@
|
|
|
35487
35762
|
"<%= config.bin %> <%= command.id %> <sandboxId>",
|
|
35488
35763
|
"<%= config.bin %> <%= command.id %> <sandboxId> --target-profile large",
|
|
35489
35764
|
"<%= config.bin %> <%= command.id %> <sandboxId> --ttl 48",
|
|
35490
|
-
"<%= config.bin %> <%= command.id %> <sandboxId> --target-profile large --ttl 48 --emails dev@example.com,qa@example.com"
|
|
35765
|
+
"<%= config.bin %> <%= command.id %> <sandboxId> --target-profile large --ttl 48 --emails dev@example.com,qa@example.com",
|
|
35766
|
+
"<%= config.bin %> <%= command.id %> <sandboxId> --wait",
|
|
35767
|
+
"<%= config.bin %> <%= command.id %> <sandboxId> --wait --poll-interval 15"
|
|
35491
35768
|
],
|
|
35492
35769
|
"flags": {
|
|
35493
35770
|
"json": {
|
|
@@ -35729,6 +36006,35 @@
|
|
|
35729
36006
|
"hasDynamicHelp": false,
|
|
35730
36007
|
"multiple": false,
|
|
35731
36008
|
"type": "option"
|
|
36009
|
+
},
|
|
36010
|
+
"wait": {
|
|
36011
|
+
"char": "w",
|
|
36012
|
+
"description": "Wait for the clone to complete before returning",
|
|
36013
|
+
"name": "wait",
|
|
36014
|
+
"allowNo": false,
|
|
36015
|
+
"type": "boolean"
|
|
36016
|
+
},
|
|
36017
|
+
"poll-interval": {
|
|
36018
|
+
"dependsOn": [
|
|
36019
|
+
"wait"
|
|
36020
|
+
],
|
|
36021
|
+
"description": "Polling interval in seconds when using --wait",
|
|
36022
|
+
"name": "poll-interval",
|
|
36023
|
+
"default": 10,
|
|
36024
|
+
"hasDynamicHelp": false,
|
|
36025
|
+
"multiple": false,
|
|
36026
|
+
"type": "option"
|
|
36027
|
+
},
|
|
36028
|
+
"timeout": {
|
|
36029
|
+
"dependsOn": [
|
|
36030
|
+
"wait"
|
|
36031
|
+
],
|
|
36032
|
+
"description": "Maximum time to wait in seconds when using --wait (0 for no timeout)",
|
|
36033
|
+
"name": "timeout",
|
|
36034
|
+
"default": 1800,
|
|
36035
|
+
"hasDynamicHelp": false,
|
|
36036
|
+
"multiple": false,
|
|
36037
|
+
"type": "option"
|
|
35732
36038
|
}
|
|
35733
36039
|
},
|
|
35734
36040
|
"hasDynamicHelp": false,
|
|
@@ -51652,5 +51958,5 @@
|
|
|
51652
51958
|
]
|
|
51653
51959
|
}
|
|
51654
51960
|
},
|
|
51655
|
-
"version": "0.
|
|
51961
|
+
"version": "0.7.1"
|
|
51656
51962
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/b2c-cli",
|
|
3
3
|
"description": "A Salesforce B2C Commerce CLI",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"author": "Charles Lavery",
|
|
6
6
|
"bin": {
|
|
7
7
|
"b2c": "./bin/run.js"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"marked": "15.0.12",
|
|
26
26
|
"marked-terminal": "7.3.0",
|
|
27
27
|
"open": "11.0.0",
|
|
28
|
-
"@salesforce/b2c-tooling-sdk": "0.
|
|
28
|
+
"@salesforce/b2c-tooling-sdk": "0.8.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/compat": "^1",
|