@salesforce/b2c-tooling-sdk 2.4.0 → 2.5.0

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.
Files changed (140) hide show
  1. package/data/schemas/dw.schema.json +14 -0
  2. package/data/tooling/index.json +5 -5
  3. package/dist/esm/cli/base-command.js +4 -3
  4. package/dist/esm/cli/base-command.js.map +1 -1
  5. package/dist/esm/cli/cartridge-command.js +2 -1
  6. package/dist/esm/cli/cartridge-command.js.map +1 -1
  7. package/dist/esm/cli/config.js +3 -1
  8. package/dist/esm/cli/config.js.map +1 -1
  9. package/dist/esm/cli/hooks.d.ts +13 -0
  10. package/dist/esm/cli/hooks.js +11 -0
  11. package/dist/esm/cli/hooks.js.map +1 -1
  12. package/dist/esm/cli/instance-command.js +2 -1
  13. package/dist/esm/cli/instance-command.js.map +1 -1
  14. package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
  15. package/dist/esm/clients/scapi-backend-utils.js +28 -1
  16. package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
  17. package/dist/esm/clients/scapi-fallback-backend.js +2 -2
  18. package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
  19. package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
  20. package/dist/esm/compat/dispatcher.js +2 -2
  21. package/dist/esm/compat/dispatcher.js.map +1 -1
  22. package/dist/esm/config/config-origins.d.ts +19 -0
  23. package/dist/esm/config/config-origins.js +11 -0
  24. package/dist/esm/config/config-origins.js.map +1 -0
  25. package/dist/esm/config/config-write.d.ts +86 -0
  26. package/dist/esm/config/config-write.js +296 -0
  27. package/dist/esm/config/config-write.js.map +1 -0
  28. package/dist/esm/config/dw-json-schema.js +4 -0
  29. package/dist/esm/config/dw-json-schema.js.map +1 -1
  30. package/dist/esm/config/dw-json.d.ts +2 -0
  31. package/dist/esm/config/dw-json.js +10 -6
  32. package/dist/esm/config/dw-json.js.map +1 -1
  33. package/dist/esm/config/index.d.ts +8 -3
  34. package/dist/esm/config/index.js +5 -2
  35. package/dist/esm/config/index.js.map +1 -1
  36. package/dist/esm/config/instance-manager.d.ts +64 -28
  37. package/dist/esm/config/instance-manager.js +145 -63
  38. package/dist/esm/config/instance-manager.js.map +1 -1
  39. package/dist/esm/config/mapping.js +6 -0
  40. package/dist/esm/config/mapping.js.map +1 -1
  41. package/dist/esm/config/resolver.d.ts +22 -0
  42. package/dist/esm/config/resolver.js +54 -29
  43. package/dist/esm/config/resolver.js.map +1 -1
  44. package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
  45. package/dist/esm/config/sources/dw-json-source.js +34 -20
  46. package/dist/esm/config/sources/dw-json-source.js.map +1 -1
  47. package/dist/esm/config/sources/env-source.d.ts +30 -3
  48. package/dist/esm/config/sources/env-source.js +126 -1
  49. package/dist/esm/config/sources/env-source.js.map +1 -1
  50. package/dist/esm/config/types.d.ts +46 -0
  51. package/dist/esm/operations/jobs/run-system-job.js +2 -2
  52. package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
  53. package/dist/esm/plugins/discovery.js +2 -1
  54. package/dist/esm/plugins/discovery.js.map +1 -1
  55. package/dist/esm/scapi/index.d.ts +5 -2
  56. package/dist/esm/scapi/index.js +3 -2
  57. package/dist/esm/scapi/index.js.map +1 -1
  58. package/dist/esm/scapi/live.d.ts +12 -1
  59. package/dist/esm/scapi/live.js +30 -2
  60. package/dist/esm/scapi/live.js.map +1 -1
  61. package/dist/esm/scapi/local.d.ts +17 -0
  62. package/dist/esm/scapi/local.js +68 -16
  63. package/dist/esm/scapi/local.js.map +1 -1
  64. package/dist/esm/scapi/request.d.ts +2 -2
  65. package/dist/esm/scapi/request.js +2 -1
  66. package/dist/esm/scapi/request.js.map +1 -1
  67. package/dist/esm/scapi/runtime.d.ts +5 -0
  68. package/dist/esm/scapi/runtime.js.map +1 -1
  69. package/dist/esm/scapi/schema-source.d.ts +90 -0
  70. package/dist/esm/scapi/schema-source.js +146 -0
  71. package/dist/esm/scapi/schema-source.js.map +1 -0
  72. package/dist/esm/scapi/worker-source.js +30 -6
  73. package/dist/esm/scapi/worker-source.js.map +1 -1
  74. package/dist/esm/test-utils/config-isolation.js +9 -2
  75. package/dist/esm/test-utils/config-isolation.js.map +1 -1
  76. package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
  77. package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
  78. package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
  79. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
  80. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
  81. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
  82. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
  83. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
  84. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
  85. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
  86. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
  87. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
  88. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
  89. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
  90. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
  91. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
  92. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
  93. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
  94. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
  95. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
  96. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
  97. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
  98. package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
  99. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
  100. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
  101. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
  102. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
  103. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
  104. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
  105. package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
  106. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
  107. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
  108. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
  109. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
  110. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
  111. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
  112. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
  113. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
  114. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
  115. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
  116. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
  117. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
  118. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
  119. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
  120. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
  121. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
  122. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
  123. package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
  124. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
  125. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
  126. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
  127. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
  128. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
  129. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
  130. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
  131. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
  132. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
  133. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
  134. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
  135. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
  136. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
  137. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
  138. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
  139. package/package.json +2 -2
  140. package/specs/scapi-schemas-v1.yaml +4 -1
@@ -0,0 +1,90 @@
1
+ import type { SchemaListItem } from '../clients/scapi-schemas.js';
2
+ import { type ApiDocument, type ScapiSchemaDocument } from './catalog.js';
3
+ /**
4
+ * Sections the Schemas API can add to a contract through its `expand` query parameter.
5
+ *
6
+ * Without `expand` a contract has no operation summaries or descriptions, no examples, and no tenant custom
7
+ * properties. `all` is a superset of every other value.
8
+ */
9
+ export declare const SCAPI_SCHEMA_EXPANSIONS: readonly ["all", "custom_properties", "descriptions", "examples", "external_docs", "summaries", "tags", "titles"];
10
+ export type ScapiSchemaExpansion = (typeof SCAPI_SCHEMA_EXPANSIONS)[number];
11
+ /**
12
+ * Validate expansion names and join them the way the Schemas API expects: one `expand` value, separated by
13
+ * commas (semicolons are accepted when parsing). The API rejects a repeated `expand` parameter.
14
+ *
15
+ * @returns The canonical value, or undefined when nothing is requested.
16
+ * @throws When a name is not a known expansion.
17
+ */
18
+ export declare function normalizeScapiSchemaExpand(input: string | readonly string[] | undefined): string | undefined;
19
+ /**
20
+ * Every section except tenant custom properties. The distributable bundled corpus is built with this, so it
21
+ * carries the full prose and examples but nothing specific to one tenant.
22
+ */
23
+ export declare const SCAPI_STANDARD_SCHEMA_EXPAND = "descriptions,examples,external_docs,summaries,tags,titles";
24
+ /** Whether an `expand` value requests a section; `all` includes every section. */
25
+ export declare function scapiExpandIncludes(expand: string | undefined, section: ScapiSchemaExpansion): boolean;
26
+ /** Whether the contract carries tenant custom properties and operation prose, so it can serve code mode. */
27
+ export declare function isFullScapiExpand(expand: string | undefined): boolean;
28
+ /** What a caller will do with a contract; used to ask the server for only that much. */
29
+ export interface ScapiSchemaNeeds {
30
+ /** The whole contract: every section (`all`). Overrides the other needs. */
31
+ full?: boolean;
32
+ /** Operation, parameter and schema prose (`summaries`, `descriptions`, `titles`). */
33
+ prose?: boolean;
34
+ /** Request and response examples. */
35
+ examples?: boolean;
36
+ /** Tenant custom properties (`c_*` attributes). */
37
+ customProperties?: boolean;
38
+ }
39
+ /**
40
+ * Smallest `expand` value that satisfies what the caller will use, so outline-only reads stay small.
41
+ *
42
+ * @returns The `expand` value, or undefined when no section is needed.
43
+ */
44
+ export declare function scapiSchemaExpandFor(needs: ScapiSchemaNeeds): string | undefined;
45
+ export interface ScapiSchemaIdentity {
46
+ apiFamily: string;
47
+ apiName: string;
48
+ apiVersion: string;
49
+ }
50
+ /** Find a standard contract in the bundled corpus. */
51
+ export declare function findBundledScapiSchema(identity: ScapiSchemaIdentity): ScapiSchemaDocument | undefined;
52
+ export interface ScapiSchemaFilter {
53
+ apiFamily?: string;
54
+ apiName?: string;
55
+ apiVersion?: string;
56
+ status?: string;
57
+ }
58
+ /** List the bundled corpus in the Schemas API listing shape, applying the same filters. */
59
+ export declare function listBundledScapiSchemas(filter?: ScapiSchemaFilter): SchemaListItem[];
60
+ /** Where a contract or listing came from. */
61
+ export type ScapiSchemaSource = 'live' | 'bundled';
62
+ export interface ScapiSchemaFetchResult {
63
+ schema: ApiDocument;
64
+ source: ScapiSchemaSource;
65
+ /** Set when `source` is `bundled` because the live fetch failed. */
66
+ warning?: string;
67
+ }
68
+ export interface ScapiSchemaListFetchResult {
69
+ schemas: SchemaListItem[];
70
+ total: number;
71
+ source: ScapiSchemaSource;
72
+ warning?: string;
73
+ }
74
+ /**
75
+ * Fetch one contract live, falling back to the bundled corpus when the live fetch fails (missing
76
+ * configuration or credentials, no access, network or server errors).
77
+ *
78
+ * The bundled contract always carries the full prose and examples, regardless of the requested expansion.
79
+ * Custom APIs exist only on the tenant, so their failure is rethrown. Abort errors are never swallowed.
80
+ *
81
+ * @param identity - API family, name and version
82
+ * @param fetchLive - Fetches the contract, building the client lazily so configuration errors fall back too
83
+ * @param signal - Abort signal; an aborted request throws instead of falling back
84
+ */
85
+ export declare function fetchScapiSchemaWithFallback(identity: ScapiSchemaIdentity, fetchLive: () => Promise<ApiDocument>, signal?: AbortSignal): Promise<ScapiSchemaFetchResult>;
86
+ /** List schemas live, falling back to the bundled corpus (with the same filters) when the live listing fails. */
87
+ export declare function listScapiSchemasWithFallback(filter: ScapiSchemaFilter, fetchLive: () => Promise<{
88
+ schemas: SchemaListItem[];
89
+ total: number;
90
+ }>, signal?: AbortSignal): Promise<ScapiSchemaListFetchResult>;
@@ -0,0 +1,146 @@
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 { loadScapiSchemas } from './catalog.js';
7
+ /**
8
+ * Sections the Schemas API can add to a contract through its `expand` query parameter.
9
+ *
10
+ * Without `expand` a contract has no operation summaries or descriptions, no examples, and no tenant custom
11
+ * properties. `all` is a superset of every other value.
12
+ */
13
+ export const SCAPI_SCHEMA_EXPANSIONS = [
14
+ 'all',
15
+ 'custom_properties',
16
+ 'descriptions',
17
+ 'examples',
18
+ 'external_docs',
19
+ 'summaries',
20
+ 'tags',
21
+ 'titles',
22
+ ];
23
+ /**
24
+ * Validate expansion names and join them the way the Schemas API expects: one `expand` value, separated by
25
+ * commas (semicolons are accepted when parsing). The API rejects a repeated `expand` parameter.
26
+ *
27
+ * @returns The canonical value, or undefined when nothing is requested.
28
+ * @throws When a name is not a known expansion.
29
+ */
30
+ export function normalizeScapiSchemaExpand(input) {
31
+ const names = (Array.isArray(input) ? input : [input ?? ''])
32
+ .flatMap((value) => String(value).split(/[,;]/))
33
+ .map((value) => value.trim())
34
+ .filter(Boolean);
35
+ const unknown = names.filter((name) => !SCAPI_SCHEMA_EXPANSIONS.includes(name));
36
+ if (unknown.length > 0)
37
+ throw new Error(`Unknown schema expansion ${unknown.map((name) => `"${name}"`).join(', ')}. Valid values: ${SCAPI_SCHEMA_EXPANSIONS.join(', ')}.`);
38
+ if (names.includes('all'))
39
+ return 'all';
40
+ const unique = SCAPI_SCHEMA_EXPANSIONS.filter((name) => names.includes(name));
41
+ return unique.length > 0 ? unique.join(',') : undefined;
42
+ }
43
+ /**
44
+ * Every section except tenant custom properties. The distributable bundled corpus is built with this, so it
45
+ * carries the full prose and examples but nothing specific to one tenant.
46
+ */
47
+ export const SCAPI_STANDARD_SCHEMA_EXPAND = 'descriptions,examples,external_docs,summaries,tags,titles';
48
+ /** Whether an `expand` value requests a section; `all` includes every section. */
49
+ export function scapiExpandIncludes(expand, section) {
50
+ const names = (expand ?? '').split(/[,;]/).map((value) => value.trim());
51
+ return names.includes('all') || names.includes(section);
52
+ }
53
+ /** Whether the contract carries tenant custom properties and operation prose, so it can serve code mode. */
54
+ export function isFullScapiExpand(expand) {
55
+ return (scapiExpandIncludes(expand, 'custom_properties') &&
56
+ scapiExpandIncludes(expand, 'summaries') &&
57
+ scapiExpandIncludes(expand, 'descriptions'));
58
+ }
59
+ /**
60
+ * Smallest `expand` value that satisfies what the caller will use, so outline-only reads stay small.
61
+ *
62
+ * @returns The `expand` value, or undefined when no section is needed.
63
+ */
64
+ export function scapiSchemaExpandFor(needs) {
65
+ if (needs.full)
66
+ return 'all';
67
+ const names = [];
68
+ if (needs.customProperties)
69
+ names.push('custom_properties');
70
+ if (needs.prose)
71
+ names.push('summaries', 'descriptions', 'titles');
72
+ if (needs.examples)
73
+ names.push('examples');
74
+ return normalizeScapiSchemaExpand(names);
75
+ }
76
+ /** Find a standard contract in the bundled corpus. */
77
+ export function findBundledScapiSchema(identity) {
78
+ const id = `${identity.apiFamily}/${identity.apiName}/${identity.apiVersion}`;
79
+ return loadScapiSchemas().find((document) => document.entry.id === id);
80
+ }
81
+ /** List the bundled corpus in the Schemas API listing shape, applying the same filters. */
82
+ export function listBundledScapiSchemas(filter = {}) {
83
+ return loadScapiSchemas()
84
+ .filter(({ entry }) => (!filter.apiFamily || entry.apiFamily === filter.apiFamily) &&
85
+ (!filter.apiName || entry.apiName === filter.apiName) &&
86
+ (!filter.apiVersion || entry.apiVersion === filter.apiVersion) &&
87
+ (!filter.status || entry.status === filter.status))
88
+ .map(({ entry }) => ({
89
+ schemaVersion: entry.schemaVersion,
90
+ apiFamily: entry.apiFamily,
91
+ apiName: entry.apiName,
92
+ apiVersion: entry.apiVersion,
93
+ status: entry.status,
94
+ }));
95
+ }
96
+ function reason(error) {
97
+ return (error instanceof Error ? error.message : String(error)).replaceAll(/\s+/g, ' ').trim().slice(0, 300);
98
+ }
99
+ const BUNDLED_LIMITS = 'The bundled corpus has the standard SCAPI contracts only: no tenant custom properties or custom APIs, and it may be older than your tenant.';
100
+ /**
101
+ * Fetch one contract live, falling back to the bundled corpus when the live fetch fails (missing
102
+ * configuration or credentials, no access, network or server errors).
103
+ *
104
+ * The bundled contract always carries the full prose and examples, regardless of the requested expansion.
105
+ * Custom APIs exist only on the tenant, so their failure is rethrown. Abort errors are never swallowed.
106
+ *
107
+ * @param identity - API family, name and version
108
+ * @param fetchLive - Fetches the contract, building the client lazily so configuration errors fall back too
109
+ * @param signal - Abort signal; an aborted request throws instead of falling back
110
+ */
111
+ export async function fetchScapiSchemaWithFallback(identity, fetchLive, signal) {
112
+ try {
113
+ return { schema: await fetchLive(), source: 'live' };
114
+ }
115
+ catch (error) {
116
+ if (signal?.aborted)
117
+ throw error;
118
+ const bundled = findBundledScapiSchema(identity);
119
+ if (!bundled)
120
+ throw error;
121
+ return {
122
+ schema: bundled.schema,
123
+ source: 'bundled',
124
+ warning: `Live schema unavailable (${reason(error)}). Showing the bundled ${bundled.entry.id} contract ` +
125
+ `(schema ${bundled.entry.schemaVersion}). ${BUNDLED_LIMITS}`,
126
+ };
127
+ }
128
+ }
129
+ /** List schemas live, falling back to the bundled corpus (with the same filters) when the live listing fails. */
130
+ export async function listScapiSchemasWithFallback(filter, fetchLive, signal) {
131
+ try {
132
+ return { ...(await fetchLive()), source: 'live' };
133
+ }
134
+ catch (error) {
135
+ if (signal?.aborted)
136
+ throw error;
137
+ const schemas = listBundledScapiSchemas(filter);
138
+ return {
139
+ schemas,
140
+ total: schemas.length,
141
+ source: 'bundled',
142
+ warning: `Live schema listing unavailable (${reason(error)}). Listing the bundled corpus. ${BUNDLED_LIMITS}`,
143
+ };
144
+ }
145
+ }
146
+ //# sourceMappingURL=schema-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-source.js","sourceRoot":"","sources":["../../../src/scapi/schema-source.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAC,gBAAgB,EAA6C,MAAM,cAAc,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,KAAK;IACL,mBAAmB;IACnB,cAAc;IACd,UAAU;IACV,eAAe;IACf,WAAW;IACX,MAAM;IACN,QAAQ;CACA,CAAC;AAIX;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAA6C;IACtF,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;SACzD,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAC/C,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;SAC5B,MAAM,CAAC,OAAO,CAAC,CAAC;IACnB,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAE,uBAA6C,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACvG,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,4BAA4B,OAAO,CAAC,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ACH,CAAC;AAED,iHAAiH;AACjH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,MAAyB,EACzB,SAAoE,EACpE,MAAoB;IAEpB,IAAI,CAAC;QACH,OAAO,EAAC,GAAG,CAAC,MAAM,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC;IAClD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,MAAM,EAAE,OAAO;YAAE,MAAM,KAAK,CAAC;QACjC,MAAM,OAAO,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAChD,OAAO;YACL,OAAO;YACP,KAAK,EAAE,OAAO,CAAC,MAAM;YACrB,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,oCAAoC,MAAM,CAAC,KAAK,CAAC,kCAAkC,cAAc,EAAE;SAC7G,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -41,16 +41,40 @@ process.on('message', async message => {
41
41
  }
42
42
  return Object.fromEntries(Object.entries(value).map(([key, v]) => [key, resolve(v, api, seen, depth + 1)]));
43
43
  }
44
- const spec = {apis: documents.map(d => d.entry), paths: {}, resolve};
44
+ // Keys of these objects are names chosen by the API, not schema keywords, so a property called description survives.
45
+ const NAME_MAPS = new Set(['properties', 'patternProperties', 'headers', 'content', 'responses', 'schemas', 'scopes', 'links', 'callbacks', 'securitySchemes']);
46
+ const VALUE_KEYS = new Set(['default', 'enum', 'const']);
47
+ function outline(value, nameMap = false) {
48
+ if (!value || typeof value !== 'object') return value;
49
+ if (Array.isArray(value)) return value.map(v => outline(v));
50
+ const out = {};
51
+ for (const [key, v] of Object.entries(value)) {
52
+ if (!nameMap && (key === 'description' || key === 'example' || key === 'examples')) continue;
53
+ out[key] = !nameMap && VALUE_KEYS.has(key) ? v : outline(v, !nameMap && NAME_MAPS.has(key));
54
+ }
55
+ return out;
56
+ }
57
+ const outlined = message.detail === 'outline';
58
+ const resolveDetail = (value, api) => outlined ? outline(resolve(value, api)) : resolve(value, api);
59
+ const specData = {apis: documents.map(d => d.entry), paths: {}, resolve: resolveDetail};
60
+ const spec = new Proxy(specData, {get(target, key, receiver) {
61
+ if (typeof key === 'symbol' || key in target || key === 'then' || key === 'toJSON') return Reflect.get(target, key, receiver);
62
+ throw new Error('SCAPI_SPEC_UNKNOWN_MEMBER: spec.' + key + ' does not exist. spec has only apis (array of API entries), paths ({[fullPath]: {[method]: operation}}) and resolve(value, apiId). List operations with Object.entries(spec.paths).');
63
+ }});
45
64
  for (const {entry, schema} of documents) {
46
65
  for (const [path, item] of Object.entries(schema.paths || {})) {
47
66
  const methods = {};
48
67
  for (const method of ['get','head','post','put','patch','delete','options']) {
49
- if (item[method]) methods[method] = resolve({...item[method], api: entry.id,
50
- parameters: [...(item.parameters || []), ...(item[method].parameters || [])],
51
- security: item[method].security ?? schema.security ?? []}, entry.id);
68
+ if (item[method]) {
69
+ const operation = {...item[method], api: entry.id,
70
+ parameters: [...(item.parameters || []), ...(item[method].parameters || [])],
71
+ security: item[method].security ?? schema.security ?? []};
72
+ // Keep the operation's own prose; only what it references is trimmed.
73
+ const {summary, description, ...rest} = operation;
74
+ methods[method] = {...(summary === undefined ? {} : {summary}), ...(description === undefined ? {} : {description}), ...resolveDetail(rest, entry.id)};
75
+ }
52
76
  }
53
- spec.paths['/' + entry.id + (entry.apiFamily === 'custom' ? '/organizations/{organizationId}' : '') + path] = methods;
77
+ specData.paths['/' + entry.id + (entry.apiFamily === 'custom' ? '/organizations/{organizationId}' : '') + path] = methods;
54
78
  }
55
79
  }
56
80
  const scapi = {request: options => new Promise((resolve, reject) => {
@@ -88,7 +112,7 @@ process.on('message', async message => {
88
112
  const value = await evaluate(message.code, message.input);
89
113
  if (pending.size || runningSnippets) throw new Error('Await every scapi.request, auth, and codemode call before returning. Requests may already have taken effect.');
90
114
  const json = JSON.stringify(value === undefined ? null : value);
91
- if (Buffer.byteLength(json) > message.maxOutputBytes) throw new Error('SCAPI_RESULT_TOO_LARGE: return fewer fields or a smaller page.');
115
+ if (Buffer.byteLength(json) > message.maxOutputBytes) throw new Error('SCAPI_RESULT_TOO_LARGE: return fewer fields or a smaller page. Whole operations include every parameter and schema description; return operationId, method, path and summary to list candidates, and only the parts you need (parameters, requestBody) for one.');
92
116
  send({type:'result', value: JSON.parse(json)});
93
117
  } catch (error) {
94
118
  const message = error.code === 'ERR_ACCESS_DENIED'
@@ -1 +1 @@
1
- {"version":3,"file":"worker-source.js","sourceRoot":"","sources":["../../../src/scapi/worker-source.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qGAAqG;AACrG,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6F5C,CAAC"}
1
+ {"version":3,"file":"worker-source.js","sourceRoot":"","sources":["../../../src/scapi/worker-source.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qGAAqG;AACrG,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqH5C,CAAC"}
@@ -3,8 +3,11 @@
3
3
  * SPDX-License-Identifier: Apache-2
4
4
  * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
+ import { mkdtempSync, rmSync } from 'node:fs';
7
+ import { tmpdir } from 'node:os';
8
+ import path from 'node:path';
6
9
  import { resetLogger } from '../logging/index.js';
7
- const ADDITIONAL_ENV_VARS = ['COMMERCE_API_SLAS_SECRET', 'LANGUAGE', 'NO_COLOR'];
10
+ const ADDITIONAL_ENV_VARS = ['B2C_CONFIG_DIR', 'COMMERCE_API_SLAS_SECRET', 'LANGUAGE', 'NO_COLOR'];
8
11
  function isIsolatedEnvVar(key) {
9
12
  return (key.startsWith('SFCC_') || key.startsWith('MRT_') || key.startsWith('PUBLIC__') || ADDITIONAL_ENV_VARS.includes(key));
10
13
  }
@@ -24,9 +27,12 @@ export function isolateConfig() {
24
27
  process.env.SFCC_DOTENV_FILE = '';
25
28
  process.env.MRT_CREDENTIALS_FILE = '/dev/null';
26
29
  process.env.SFCC_LOG_LEVEL = 'silent';
30
+ // An empty settings directory, so the user's global default dw.json is never read or written
31
+ const configDirectory = mkdtempSync(path.join(tmpdir(), 'b2c-test-config-'));
32
+ process.env.B2C_CONFIG_DIR = configDirectory;
27
33
  // Reset global logger so it picks up the new SFCC_LOG_LEVEL
28
34
  resetLogger();
29
- state = { savedEnvVars };
35
+ state = { configDirectory, savedEnvVars };
30
36
  }
31
37
  export function restoreConfig() {
32
38
  if (!state)
@@ -42,6 +48,7 @@ export function restoreConfig() {
42
48
  if (value !== undefined)
43
49
  process.env[key] = value;
44
50
  }
51
+ rmSync(state.configDirectory, { recursive: true, force: true });
45
52
  state = null;
46
53
  }
47
54
  //# sourceMappingURL=config-isolation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-isolation.js","sourceRoot":"","sources":["../../../src/test-utils/config-isolation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAEhD,MAAM,mBAAmB,GAAG,CAAC,0BAA0B,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAEjF,SAAS,gBAAgB,CAAC,GAAW;IACnC,OAAO,CACL,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,CACrH,CAAC;AACJ,CAAC;AAMD,IAAI,KAAK,GAA0B,IAAI,CAAC;AAExC,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