@salesforce/b2c-cli 1.19.1 → 1.20.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/{setup/ide/prophet.d.ts → docs/cache.d.ts} +12 -18
- package/dist/commands/docs/cache.js +55 -0
- package/dist/commands/docs/cache.js.map +1 -0
- package/dist/commands/docs/read.d.ts +3 -0
- package/dist/commands/docs/read.js +18 -2
- package/dist/commands/docs/read.js.map +1 -1
- package/dist/commands/docs/search.d.ts +3 -6
- package/dist/commands/docs/search.js +11 -48
- package/dist/commands/docs/search.js.map +1 -1
- package/dist/commands/preferences/global/get.d.ts +16 -0
- package/dist/commands/preferences/global/get.js +53 -0
- package/dist/commands/preferences/global/get.js.map +1 -0
- package/dist/commands/preferences/global/list.d.ts +15 -0
- package/dist/commands/preferences/global/list.js +80 -0
- package/dist/commands/preferences/global/list.js.map +1 -0
- package/dist/commands/preferences/global/update.d.ts +18 -0
- package/dist/commands/preferences/global/update.js +102 -0
- package/dist/commands/preferences/global/update.js.map +1 -0
- package/dist/commands/preferences/site/get.d.ts +16 -0
- package/dist/commands/preferences/site/get.js +53 -0
- package/dist/commands/preferences/site/get.js.map +1 -0
- package/dist/commands/preferences/site/list.d.ts +16 -0
- package/dist/commands/preferences/site/list.js +84 -0
- package/dist/commands/preferences/site/list.js.map +1 -0
- package/dist/commands/preferences/site/preference/get.d.ts +16 -0
- package/dist/commands/preferences/site/preference/get.js +52 -0
- package/dist/commands/preferences/site/preference/get.js.map +1 -0
- package/dist/commands/preferences/site/preference/update.d.ts +19 -0
- package/dist/commands/preferences/site/preference/update.js +107 -0
- package/dist/commands/preferences/site/preference/update.js.map +1 -0
- package/dist/commands/preferences/site/search.d.ts +28 -0
- package/dist/commands/preferences/site/search.js +177 -0
- package/dist/commands/preferences/site/search.js.map +1 -0
- package/dist/commands/preferences/site/update.d.ts +19 -0
- package/dist/commands/preferences/site/update.js +103 -0
- package/dist/commands/preferences/site/update.js.map +1 -0
- package/dist/commands/setup/ide/index.js +1 -1
- package/dist/commands/setup/ide/index.js.map +1 -1
- package/dist/commands/setup/index.js +1 -1
- package/dist/commands/setup/index.js.map +1 -1
- package/dist/utils/docs/workspace.d.ts +31 -0
- package/dist/utils/docs/workspace.js +68 -0
- package/dist/utils/docs/workspace.js.map +1 -0
- package/dist/utils/preferences.d.ts +48 -0
- package/dist/utils/preferences.js +125 -0
- package/dist/utils/preferences.js.map +1 -0
- package/oclif.manifest.json +15349 -12530
- package/package.json +18 -2
- package/dist/commands/setup/ide/prophet.js +0 -327
- package/dist/commands/setup/ide/prophet.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PreferencesCommand } from '../../../utils/preferences.js';
|
|
2
|
+
import { type SitePreferences } from '@salesforce/b2c-tooling-sdk';
|
|
3
|
+
export default class PreferencesSiteUpdate extends PreferencesCommand<typeof PreferencesSiteUpdate> {
|
|
4
|
+
static args: {
|
|
5
|
+
'group-id': import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static enableJsonFlag: boolean;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static flags: {
|
|
11
|
+
'instance-type': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'site-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
body: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'mask-passwords': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
};
|
|
17
|
+
static strict: boolean;
|
|
18
|
+
run(): Promise<SitePreferences>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 fs from 'node:fs';
|
|
7
|
+
import { Args, Flags, ux } from '@oclif/core';
|
|
8
|
+
import { PreferencesCommand, buildAssignmentMap, instanceTypeFlag, maskPasswordsFlag, } from '../../../utils/preferences.js';
|
|
9
|
+
import { getApiErrorMessage } from '@salesforce/b2c-tooling-sdk';
|
|
10
|
+
import { t, withDocs } from '../../../i18n/index.js';
|
|
11
|
+
export default class PreferencesSiteUpdate extends PreferencesCommand {
|
|
12
|
+
static args = {
|
|
13
|
+
'group-id': Args.string({
|
|
14
|
+
description: 'Preference group ID',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
};
|
|
18
|
+
static description = withDocs(t('commands.preferences.site.update.description', 'Update custom preferences in a site preference group. Pass attribute assignments (KEY=value, KEY:=json, KEY=@file, KEY:=@file, KEY=) or use --file/--body for bulk edits.'), '/cli/preferences.html#update-site');
|
|
19
|
+
static enableJsonFlag = true;
|
|
20
|
+
static examples = [
|
|
21
|
+
'<%= config.bin %> <%= command.id %> CustomGroupId --site-id RefArch c_name=hello c_count:=5 --tenant-id zzxy_prd',
|
|
22
|
+
'<%= config.bin %> <%= command.id %> CustomGroupId --site-id RefArch c_banner=@banner.html --tenant-id zzxy_prd',
|
|
23
|
+
'<%= config.bin %> <%= command.id %> CustomGroupId -I staging --site-id RefArch --file prefs.json --tenant-id zzxy_prd',
|
|
24
|
+
];
|
|
25
|
+
static flags = {
|
|
26
|
+
'instance-type': instanceTypeFlag,
|
|
27
|
+
'site-id': Flags.string({
|
|
28
|
+
char: 's',
|
|
29
|
+
description: 'Site ID',
|
|
30
|
+
required: true,
|
|
31
|
+
}),
|
|
32
|
+
file: Flags.string({
|
|
33
|
+
char: 'f',
|
|
34
|
+
description: 'JSON file with preferences body. Custom attributes use the "c_" prefix.',
|
|
35
|
+
exclusive: ['body'],
|
|
36
|
+
}),
|
|
37
|
+
body: Flags.string({
|
|
38
|
+
description: 'Inline JSON body with preferences. Custom attributes use the "c_" prefix.',
|
|
39
|
+
exclusive: ['file'],
|
|
40
|
+
}),
|
|
41
|
+
'mask-passwords': maskPasswordsFlag,
|
|
42
|
+
};
|
|
43
|
+
// Allow variadic KEY=value / KEY:=json assignments after <group-id>.
|
|
44
|
+
static strict = false;
|
|
45
|
+
async run() {
|
|
46
|
+
this.requireOAuthCredentials();
|
|
47
|
+
const { 'group-id': groupId } = this.args;
|
|
48
|
+
const { 'instance-type': instanceType, 'site-id': siteId, file, body, 'mask-passwords': maskPasswords } = this.flags;
|
|
49
|
+
const organizationId = this.getOrganizationId();
|
|
50
|
+
const { argv } = await this.parse(PreferencesSiteUpdate);
|
|
51
|
+
const assignments = argv.slice(1);
|
|
52
|
+
const haveAssignments = assignments.length > 0;
|
|
53
|
+
if (haveAssignments && (file || body)) {
|
|
54
|
+
this.error(t('commands.preferences.assignmentsAndBodyExclusive', 'Provide either KEY=value assignments or --file/--body, not both.'));
|
|
55
|
+
}
|
|
56
|
+
if (!haveAssignments && !file && !body) {
|
|
57
|
+
this.error(t('commands.preferences.bodyRequired', 'Provide KEY=value assignments or --file/--body with the preferences to update.'));
|
|
58
|
+
}
|
|
59
|
+
let requestBody;
|
|
60
|
+
if (haveAssignments) {
|
|
61
|
+
try {
|
|
62
|
+
requestBody = buildAssignmentMap(assignments);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
this.error(error.message);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
let raw;
|
|
70
|
+
if (file) {
|
|
71
|
+
if (!fs.existsSync(file)) {
|
|
72
|
+
this.error(t('commands.preferences.fileNotFound', 'File not found: {{file}}', { file }));
|
|
73
|
+
}
|
|
74
|
+
raw = fs.readFileSync(file, 'utf8');
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
raw = body;
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
requestBody = JSON.parse(raw);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
this.error(t('commands.preferences.parseError', 'Failed to parse JSON body'));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const result = await this.preferencesRwClient.PATCH('/organizations/{organizationId}/site-preference-groups/{groupId}/{instanceType}', {
|
|
87
|
+
params: {
|
|
88
|
+
path: { organizationId, groupId, instanceType: instanceType },
|
|
89
|
+
query: { siteId, maskPasswords },
|
|
90
|
+
},
|
|
91
|
+
body: requestBody,
|
|
92
|
+
});
|
|
93
|
+
if (!result.data) {
|
|
94
|
+
const message = getApiErrorMessage(result.error, result.response);
|
|
95
|
+
this.error(t('commands.preferences.site.update.error', 'Failed to update site preference group: {{message}}', { message }));
|
|
96
|
+
}
|
|
97
|
+
if (this.jsonEnabled())
|
|
98
|
+
return result.data;
|
|
99
|
+
ux.stdout(JSON.stringify(result.data, null, 2) + '\n');
|
|
100
|
+
return result.data;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/preferences/site/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAC,kBAAkB,EAAoD,MAAM,6BAA6B,CAAC;AAClH,OAAO,EAAC,CAAC,EAAE,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,k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WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAoB,CAAC;YACnD,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,iCAAiC,EAAE,2BAA2B,CAAC,CAAC,CAAC;YAChF,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,KAAK,CACjD,iFAAiF,EACjF;YACE,MAAM,EAAE;gBACN,IAAI,EAAE,EAAC,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,YAAsC,EAAC;gBACrF,KAAK,EAAE,EAAC,MAAM,EAAE,aAAa,EAAC;aAC/B;YACD,IAAI,EAAE,WAAW;SAClB,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;YAClE,IAAI,CAAC,KAAK,CACR,CAAC,CAAC,wCAAwC,EAAE,qDAAqD,EAAE,EAAC,OAAO,EAAC,CAAC,CAC9G,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,EAAE;YAAE,OAAO,MAAM,CAAC,IAAI,CAAC;QAE3C,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QACvD,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { withDocs } from '../../../i18n/index.js';
|
|
|
10
10
|
*/
|
|
11
11
|
export default class SetupIdeIndex extends BaseCommand {
|
|
12
12
|
static description = withDocs('Set up IDE integrations that consume B2C CLI configuration', '/cli/setup.html#b2c-setup-ide');
|
|
13
|
-
static examples = ['<%= config.bin %> setup ide
|
|
13
|
+
static examples = ['<%= config.bin %> setup ide tsserver-plugin'];
|
|
14
14
|
async run() {
|
|
15
15
|
await this.config.runCommand('help', ['setup', 'ide']);
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/setup/ide/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAC,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAiC;IAC1E,MAAM,CAAC,WAAW,GAAG,QAAQ,CAC3B,4DAA4D,EAC5D,+BAA+B,CAChC,CAAC;IAEF,MAAM,CAAC,QAAQ,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/setup/ide/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAC,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAiC;IAC1E,MAAM,CAAC,WAAW,GAAG,QAAQ,CAC3B,4DAA4D,EAC5D,+BAA+B,CAChC,CAAC;IAEF,MAAM,CAAC,QAAQ,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAElE,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IACzD,CAAC"}
|
|
@@ -17,7 +17,7 @@ export default class SetupIndex extends BaseCommand {
|
|
|
17
17
|
static examples = [
|
|
18
18
|
'<%= config.bin %> setup --help',
|
|
19
19
|
'<%= config.bin %> setup instance create',
|
|
20
|
-
'<%= config.bin %> setup ide
|
|
20
|
+
'<%= config.bin %> setup ide tsserver-plugin',
|
|
21
21
|
];
|
|
22
22
|
async run() {
|
|
23
23
|
const hasInstance = this.resolvedConfig.hasB2CInstanceConfig();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,OAAO,EAAC,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAA8B;IACpE,MAAM,CAAC,WAAW,GAAG,QAAQ,CAC3B,yFAAyF,EACzF,iBAAiB,CAClB,CAAC;IAEF,MAAM,CAAC,QAAQ,GAAG;QAChB,gCAAgC;QAChC,yCAAyC;QACzC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,OAAO,EAAC,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAA8B;IACpE,MAAM,CAAC,WAAW,GAAG,QAAQ,CAC3B,yFAAyF,EACzF,iBAAiB,CAClB,CAAC;IAEF,MAAM,CAAC,QAAQ,GAAG;QAChB,gCAAgC;QAChC,yCAAyC;QACzC,6CAA6C;KAC9C,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,oBAAoB,EAAE,CAAC;QAC/D,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEnE,IAAI,CAAC,WAAW,IAAI,KAAK,EAAE,CAAC;YAC1B,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,uDAAuD,EAAE,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;YAEhH,IAAI,YAAY,EAAE,CAAC;gBACjB,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;gBACtD,OAAO;YACT,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared `--workspace` resolution for the `docs search` and `docs read` commands
|
|
3
|
+
* so both apply the same workspace-aware ranking (parity: a fuzzy `docs read`
|
|
4
|
+
* should resolve the same top hit that `docs search` ranks first).
|
|
5
|
+
*/
|
|
6
|
+
import { type DetectionResult, type ProjectType } from '@salesforce/b2c-tooling-sdk/discovery';
|
|
7
|
+
/** Minimal logger surface used by {@link resolveDocsWorkspace}. */
|
|
8
|
+
interface WorkspaceLogger {
|
|
9
|
+
debug(objOrMsg: unknown, msg?: string): void;
|
|
10
|
+
}
|
|
11
|
+
/** Detector signature — matches the SDK's `detectWorkspaceType`; injected so commands can stub it in tests. */
|
|
12
|
+
type DetectWorkspaceType = (cwd: string) => Promise<DetectionResult>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolves the `--workspace` flag value to concrete project type(s).
|
|
15
|
+
*
|
|
16
|
+
* Workspace awareness is ON by default (matching the MCP docs tools): when the
|
|
17
|
+
* flag is unset — or explicitly `auto` — workspace detection runs and its result
|
|
18
|
+
* favors the detected workspace's docs. `all` opts out (no preference); an
|
|
19
|
+
* explicit type (or comma-separated list) is used verbatim without detection.
|
|
20
|
+
*
|
|
21
|
+
* Kept dependency-injected (detector/logger/warn) rather than a base-class method
|
|
22
|
+
* so both docs commands share one implementation and can stub detection in tests.
|
|
23
|
+
*
|
|
24
|
+
* @param value - The raw `--workspace` flag value (may be undefined)
|
|
25
|
+
* @param detect - Workspace detector (the command's stubbable `detectWorkspaceType`)
|
|
26
|
+
* @param logger - Command logger for debug tracing
|
|
27
|
+
* @param warn - Callback for surfacing unknown workspace types to the user
|
|
28
|
+
* @returns Concrete project types to favor, or `undefined` for no preference
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveDocsWorkspace(value: string | undefined, detect: DetectWorkspaceType, logger: WorkspaceLogger, warn: (message: string) => void): Promise<ProjectType[] | undefined>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Shared `--workspace` resolution for the `docs search` and `docs read` commands
|
|
8
|
+
* so both apply the same workspace-aware ranking (parity: a fuzzy `docs read`
|
|
9
|
+
* should resolve the same top hit that `docs search` ranks first).
|
|
10
|
+
*/
|
|
11
|
+
import { PROJECT_TYPES } from '@salesforce/b2c-tooling-sdk/discovery';
|
|
12
|
+
/**
|
|
13
|
+
* Resolves the `--workspace` flag value to concrete project type(s).
|
|
14
|
+
*
|
|
15
|
+
* Workspace awareness is ON by default (matching the MCP docs tools): when the
|
|
16
|
+
* flag is unset — or explicitly `auto` — workspace detection runs and its result
|
|
17
|
+
* favors the detected workspace's docs. `all` opts out (no preference); an
|
|
18
|
+
* explicit type (or comma-separated list) is used verbatim without detection.
|
|
19
|
+
*
|
|
20
|
+
* Kept dependency-injected (detector/logger/warn) rather than a base-class method
|
|
21
|
+
* so both docs commands share one implementation and can stub detection in tests.
|
|
22
|
+
*
|
|
23
|
+
* @param value - The raw `--workspace` flag value (may be undefined)
|
|
24
|
+
* @param detect - Workspace detector (the command's stubbable `detectWorkspaceType`)
|
|
25
|
+
* @param logger - Command logger for debug tracing
|
|
26
|
+
* @param warn - Callback for surfacing unknown workspace types to the user
|
|
27
|
+
* @returns Concrete project types to favor, or `undefined` for no preference
|
|
28
|
+
*/
|
|
29
|
+
export async function resolveDocsWorkspace(value, detect, logger, warn) {
|
|
30
|
+
if (value === 'all') {
|
|
31
|
+
logger.debug('Workspace preference disabled (--workspace all); no detection run');
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
if (!value || value === 'auto') {
|
|
35
|
+
const cwd = process.cwd();
|
|
36
|
+
const detection = await detect(cwd);
|
|
37
|
+
const resolved = detection.projectTypes.length > 0 ? detection.projectTypes : undefined;
|
|
38
|
+
logger.debug({
|
|
39
|
+
cwd,
|
|
40
|
+
workspaceFlag: value ?? '(unset, defaults to auto)',
|
|
41
|
+
matchedPatterns: detection.matchedPatterns,
|
|
42
|
+
projectTypes: detection.projectTypes,
|
|
43
|
+
resolved: resolved ?? null,
|
|
44
|
+
}, resolved
|
|
45
|
+
? `Auto-detected workspace: ${resolved.join(', ')}`
|
|
46
|
+
: 'No workspace detected; using no workspace preference');
|
|
47
|
+
return resolved;
|
|
48
|
+
}
|
|
49
|
+
// Handle one or more comma-separated explicit types. Validate against the
|
|
50
|
+
// canonical PROJECT_TYPES; warn on (and drop) anything unrecognized.
|
|
51
|
+
const known = new Set(PROJECT_TYPES);
|
|
52
|
+
const requested = value
|
|
53
|
+
.split(',')
|
|
54
|
+
.map((s) => s.trim().toLowerCase())
|
|
55
|
+
.filter((s) => s.length > 0);
|
|
56
|
+
const valid = requested.filter((s) => known.has(s));
|
|
57
|
+
const invalid = requested.filter((s) => !known.has(s));
|
|
58
|
+
if (invalid.length > 0) {
|
|
59
|
+
warn(`Ignoring unknown workspace type(s): ${invalid.join(', ')}`);
|
|
60
|
+
}
|
|
61
|
+
if (valid.length === 0) {
|
|
62
|
+
logger.debug({ requested }, 'No valid workspace types specified; using no workspace preference');
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
logger.debug({ workspace: valid }, 'Using explicitly specified workspace type(s)');
|
|
66
|
+
return [...new Set(valid)];
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../src/utils/docs/workspace.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;;;GAIG;AACH,OAAO,EAAC,aAAa,EAAyC,MAAM,uCAAuC,CAAC;AAU5G;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,KAAyB,EACzB,MAA2B,EAC3B,MAAuB,EACvB,IAA+B;IAE/B,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;QACpB,MAAM,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;QAClF,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAC1B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,SAAS,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;QACxF,MAAM,CAAC,KAAK,CACV;YACE,GAAG;YACH,aAAa,EAAE,KAAK,IAAI,2BAA2B;YACnD,eAAe,EAAE,SAAS,CAAC,eAAe;YAC1C,YAAY,EAAE,SAAS,CAAC,YAAY;YACpC,QAAQ,EAAE,QAAQ,IAAI,IAAI;SAC3B,EACD,QAAQ;YACN,CAAC,CAAC,4BAA4B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACnD,CAAC,CAAC,sDAAsD,CAC3D,CA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|
+
import { type PreferencesClient } from '@salesforce/b2c-tooling-sdk';
|
|
4
|
+
/**
|
|
5
|
+
* Flag for selecting the SCAPI Preferences instance type.
|
|
6
|
+
*
|
|
7
|
+
* Defaults to `development` — a real tier valid for both reads and writes.
|
|
8
|
+
* `current` is accepted (handy for reads) but the SCAPI Preferences API
|
|
9
|
+
* rejects it on writes, so it is never the default.
|
|
10
|
+
*/
|
|
11
|
+
export declare const instanceTypeFlag: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
/** Shared `--mask-passwords` (plural) flag used by all instance-scoped preferences commands. */
|
|
13
|
+
export declare const maskPasswordsFlag: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
export type PreferenceAssignmentValue = boolean | null | number | Record<string, unknown> | string | unknown[];
|
|
15
|
+
/**
|
|
16
|
+
* Parse a single assignment expression for the preferences write commands.
|
|
17
|
+
*
|
|
18
|
+
* Operators:
|
|
19
|
+
* - `key=value` string value
|
|
20
|
+
* - `key:=json` raw JSON (number, bool, array, object)
|
|
21
|
+
* - `key=@file` file contents as a string value
|
|
22
|
+
* - `key:=@file` file contents parsed as JSON
|
|
23
|
+
* - `key=` null (clears/unsets the attribute)
|
|
24
|
+
*
|
|
25
|
+
* The Preferences API does not coerce types, so callers must use `:=` to send
|
|
26
|
+
* non-string JSON types.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parsePreferenceAssignment(expr: string): {
|
|
29
|
+
key: string;
|
|
30
|
+
value: PreferenceAssignmentValue;
|
|
31
|
+
};
|
|
32
|
+
/** Build a flat `{ [key]: value }` object from assignment expressions. */
|
|
33
|
+
export declare function buildAssignmentMap(exprs: string[]): Record<string, PreferenceAssignmentValue>;
|
|
34
|
+
/**
|
|
35
|
+
* Base command class for SCAPI Configuration Preferences API commands.
|
|
36
|
+
*
|
|
37
|
+
* Provides lazy-initialized read-only and read-write clients with proper
|
|
38
|
+
* OAuth strategy and configuration.
|
|
39
|
+
*/
|
|
40
|
+
export declare abstract class PreferencesCommand<T extends typeof Command> extends OAuthCommand<T> {
|
|
41
|
+
private _preferencesClient?;
|
|
42
|
+
private _preferencesRwClient?;
|
|
43
|
+
/** Returns a read-only Preferences API client. */
|
|
44
|
+
protected get preferencesClient(): PreferencesClient;
|
|
45
|
+
/** Returns a read-write Preferences API client. */
|
|
46
|
+
protected get preferencesRwClient(): PreferencesClient;
|
|
47
|
+
private preferencesClientConfig;
|
|
48
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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 fs from 'node:fs';
|
|
7
|
+
import { Command, Flags } from '@oclif/core';
|
|
8
|
+
import { OAuthCommand } from '@salesforce/b2c-tooling-sdk/cli';
|
|
9
|
+
import { createPreferencesClient, } from '@salesforce/b2c-tooling-sdk';
|
|
10
|
+
import { t } from '../i18n/index.js';
|
|
11
|
+
const INSTANCE_TYPES = ['staging', 'development', 'sandbox', 'production'];
|
|
12
|
+
/**
|
|
13
|
+
* Flag for selecting the SCAPI Preferences instance type.
|
|
14
|
+
*
|
|
15
|
+
* Defaults to `development` — a real tier valid for both reads and writes.
|
|
16
|
+
* `current` is accepted (handy for reads) but the SCAPI Preferences API
|
|
17
|
+
* rejects it on writes, so it is never the default.
|
|
18
|
+
*/
|
|
19
|
+
export const instanceTypeFlag = Flags.string({
|
|
20
|
+
char: 'I',
|
|
21
|
+
description: 'Instance type. Use "current" (reads only) to target the instance handling the request.',
|
|
22
|
+
options: [...INSTANCE_TYPES, 'current'],
|
|
23
|
+
default: 'development',
|
|
24
|
+
});
|
|
25
|
+
/** Shared `--mask-passwords` (plural) flag used by all instance-scoped preferences commands. */
|
|
26
|
+
export const maskPasswordsFlag = Flags.boolean({
|
|
27
|
+
description: 'Mask values of type password',
|
|
28
|
+
default: false,
|
|
29
|
+
allowNo: true,
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Parse a single assignment expression for the preferences write commands.
|
|
33
|
+
*
|
|
34
|
+
* Operators:
|
|
35
|
+
* - `key=value` string value
|
|
36
|
+
* - `key:=json` raw JSON (number, bool, array, object)
|
|
37
|
+
* - `key=@file` file contents as a string value
|
|
38
|
+
* - `key:=@file` file contents parsed as JSON
|
|
39
|
+
* - `key=` null (clears/unsets the attribute)
|
|
40
|
+
*
|
|
41
|
+
* The Preferences API does not coerce types, so callers must use `:=` to send
|
|
42
|
+
* non-string JSON types.
|
|
43
|
+
*/
|
|
44
|
+
export function parsePreferenceAssignment(expr) {
|
|
45
|
+
const jsonIdx = expr.indexOf(':=');
|
|
46
|
+
const eqIdx = expr.indexOf('=');
|
|
47
|
+
// ":=" wins only if it appears before the first "="
|
|
48
|
+
if (jsonIdx !== -1 && (eqIdx === -1 || jsonIdx < eqIdx)) {
|
|
49
|
+
const key = expr.slice(0, jsonIdx);
|
|
50
|
+
const rest = expr.slice(jsonIdx + 2);
|
|
51
|
+
if (!key) {
|
|
52
|
+
throw new Error(t('commands.preferences.assignment.emptyKey', 'Empty key in assignment: {{expr}}', { expr }));
|
|
53
|
+
}
|
|
54
|
+
const raw = rest.startsWith('@') ? readPreferenceFile(rest.slice(1)) : rest;
|
|
55
|
+
try {
|
|
56
|
+
return { key, value: JSON.parse(raw) };
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
throw new Error(t('commands.preferences.assignment.invalidJson', 'Invalid JSON for {{key}} (use := for raw JSON)', { key }));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (eqIdx === -1) {
|
|
63
|
+
throw new Error(t('commands.preferences.assignment.invalidFormat', 'Invalid assignment: {{expr}}. Use KEY=value, KEY:=json, KEY=@file, or KEY:=@file.', { expr }));
|
|
64
|
+
}
|
|
65
|
+
const key = expr.slice(0, eqIdx);
|
|
66
|
+
const rest = expr.slice(eqIdx + 1);
|
|
67
|
+
if (!key) {
|
|
68
|
+
throw new Error(t('commands.preferences.assignment.emptyKey', 'Empty key in assignment: {{expr}}', { expr }));
|
|
69
|
+
}
|
|
70
|
+
if (rest === '')
|
|
71
|
+
return { key, value: null };
|
|
72
|
+
if (rest.startsWith('@'))
|
|
73
|
+
return { key, value: readPreferenceFile(rest.slice(1)) };
|
|
74
|
+
return { key, value: rest };
|
|
75
|
+
}
|
|
76
|
+
/** Build a flat `{ [key]: value }` object from assignment expressions. */
|
|
77
|
+
export function buildAssignmentMap(exprs) {
|
|
78
|
+
const map = {};
|
|
79
|
+
for (const expr of exprs) {
|
|
80
|
+
const { key, value } = parsePreferenceAssignment(expr);
|
|
81
|
+
map[key] = value;
|
|
82
|
+
}
|
|
83
|
+
return map;
|
|
84
|
+
}
|
|
85
|
+
function readPreferenceFile(filePath) {
|
|
86
|
+
if (!fs.existsSync(filePath)) {
|
|
87
|
+
throw new Error(t('commands.preferences.fileNotFound', 'File not found: {{file}}', { file: filePath }));
|
|
88
|
+
}
|
|
89
|
+
return fs.readFileSync(filePath, 'utf8');
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Base command class for SCAPI Configuration Preferences API commands.
|
|
93
|
+
*
|
|
94
|
+
* Provides lazy-initialized read-only and read-write clients with proper
|
|
95
|
+
* OAuth strategy and configuration.
|
|
96
|
+
*/
|
|
97
|
+
export class PreferencesCommand extends OAuthCommand {
|
|
98
|
+
_preferencesClient;
|
|
99
|
+
_preferencesRwClient;
|
|
100
|
+
/** Returns a read-only Preferences API client. */
|
|
101
|
+
get preferencesClient() {
|
|
102
|
+
if (!this._preferencesClient) {
|
|
103
|
+
this._preferencesClient = createPreferencesClient(this.preferencesClientConfig(), this.getOAuthStrategy());
|
|
104
|
+
}
|
|
105
|
+
return this._preferencesClient;
|
|
106
|
+
}
|
|
107
|
+
/** Returns a read-write Preferences API client. */
|
|
108
|
+
get preferencesRwClient() {
|
|
109
|
+
if (!this._preferencesRwClient) {
|
|
110
|
+
this._preferencesRwClient = createPreferencesClient(this.preferencesClientConfig(), this.getOAuthStrategy(), {
|
|
111
|
+
readWrite: true,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return this._preferencesRwClient;
|
|
115
|
+
}
|
|
116
|
+
preferencesClientConfig() {
|
|
117
|
+
const shortCode = this.resolvedConfig.values.shortCode;
|
|
118
|
+
const tenantId = this.requireTenantId();
|
|
119
|
+
if (!shortCode) {
|
|
120
|
+
this.error(t('error.shortCodeRequired', 'SCAPI short code required. Provide --short-code, set SFCC_SHORTCODE, or configure short-code in dw.json.'));
|
|
121
|
+
}
|
|
122
|
+
return { shortCode, tenantId };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=preferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../src/utils/preferences.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAC,OAAO,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EACL,uBAAuB,GAGxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAC,CAAC,EAAC,MAAM,kBAAkB,CAAC;AAEnC,MAAM,cAAc,GAA6B,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AAErG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,wFAAwF;IACrG,OAAO,EAAE,CAAC,GAAG,cAAc,EAAE,SAAS,CAAC;IACvC,OAAO,EAAE,aAAa;CACvB,CAAC,CAAC;AAEH,gGAAgG;AAChG,MAAM,CAAC,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