@adobe/aio-commerce-lib-app 1.6.0 → 1.8.0-beta-20260714082406
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/CHANGELOG.md +106 -0
- package/dist/cjs/actions/app-config/index.cjs +205 -0
- package/dist/cjs/actions/{app-config.d.cts → app-config/index.d.cts} +10 -7
- package/dist/cjs/actions/association/index.cjs +85 -0
- package/dist/cjs/actions/association/index.d.cts +28 -0
- package/dist/cjs/actions/{config.cjs → config/index.cjs} +70 -53
- package/dist/{es/actions/config.d.mts → cjs/actions/config/index.d.cts} +10 -7
- package/dist/cjs/actions/{installation.cjs → installation/index.cjs} +106 -72
- package/dist/{es/actions/installation.d.mts → cjs/actions/installation/index.d.cts} +10 -8
- package/dist/cjs/actions/{scope-tree.cjs → scope-tree/index.cjs} +60 -22
- package/dist/cjs/actions/{scope-tree.d.cts → scope-tree/index.d.cts} +1 -1
- package/dist/cjs/app-D3P-Z6uY.d.cts +1679 -0
- package/dist/cjs/association-repository-BAs3-VkW.cjs +69 -0
- package/dist/cjs/commands/index.cjs +517 -309
- package/dist/cjs/commands/templates/admin-ui/tsconfig.json +14 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/index.css +5 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/index.html +17 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/src/app.jsx +13 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/src/components/welcome.jsx +12 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/src/pages/main-page.jsx +10 -0
- package/dist/cjs/commands/templates/{admin-ui-sdk/registration.js.template → admin-ui/web-src-template.d.ts} +11 -6
- package/dist/cjs/commands/templates/app-management/app-config.js.template +1 -14
- package/dist/cjs/commands/templates/app-management/association.js.template +6 -0
- package/dist/cjs/commands/templates/app-management/installation.js.template +1 -13
- package/dist/cjs/commands/templates/business-configuration/config.js.template +2 -15
- package/dist/cjs/commands/templates/business-configuration/scope-tree.js.template +0 -12
- package/dist/cjs/config/index.browser.cjs +18 -0
- package/dist/cjs/config/index.browser.d.cts +16 -0
- package/dist/cjs/config/{index.cjs → index.node.cjs} +9 -8
- package/dist/cjs/config/index.node.d.cts +1603 -0
- package/dist/cjs/define-DBxAlJfN.d.cts +34 -0
- package/dist/cjs/define-hlcQw7Cv.cjs +41 -0
- package/dist/cjs/environment-B7EnozSg.cjs +135 -0
- package/dist/cjs/index-BXm8UbK7.d.cts +16 -0
- package/dist/cjs/{index-Dw2NvVOY.d.cts → index-CzReNwbF.d.cts} +177 -3
- package/dist/cjs/index.cjs +250 -0
- package/dist/cjs/index.d.cts +217 -0
- package/dist/cjs/{config-FNMclIFO.cjs → index.node-Dz4lV4qe.cjs} +119 -35
- package/dist/cjs/{logging-BVz3weoC.cjs → logging-udPuAJPt.cjs} +2 -2
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/management/index.d.cts +1 -2
- package/dist/cjs/{management-Cvsz4VMf.cjs → management-B9ItB80R.cjs} +432 -591
- package/dist/cjs/openapi-CwytYdWl.cjs +2948 -0
- package/dist/cjs/{router-BOR7T6qR.cjs → router-hA_Y9gZ1.cjs} +42 -44
- package/dist/cjs/{schemas-FngDuIeo.cjs → schemas-mLxMh_ko.cjs} +2 -2
- package/dist/cjs/utils-DSCmZ_iJ.cjs +408 -0
- package/dist/cjs/{validate-DydOAZha.cjs → validate-BfxhZ5Wv.cjs} +63 -31
- package/dist/cjs/{webhooks-tbZy9G3p.cjs → webhooks-B5tb9NeF.cjs} +159 -151
- package/dist/es/actions/{app-config.d.mts → app-config/index.d.mts} +10 -7
- package/dist/es/actions/app-config/index.mjs +202 -0
- package/dist/es/actions/association/index.d.mts +28 -0
- package/dist/es/actions/association/index.mjs +82 -0
- package/dist/{cjs/actions/config.d.cts → es/actions/config/index.d.mts} +10 -7
- package/dist/es/actions/{config.mjs → config/index.mjs} +67 -50
- package/dist/{cjs/actions/installation.d.cts → es/actions/installation/index.d.mts} +10 -8
- package/dist/es/actions/{installation.mjs → installation/index.mjs} +104 -71
- package/dist/es/actions/{scope-tree.d.mts → scope-tree/index.d.mts} +1 -1
- package/dist/es/actions/{scope-tree.mjs → scope-tree/index.mjs} +58 -20
- package/dist/es/app-D3P-Z6uY.d.mts +1679 -0
- package/dist/es/association-repository-BbQv9WCl.mjs +52 -0
- package/dist/es/commands/index.mjs +550 -340
- package/dist/es/commands/templates/admin-ui/tsconfig.json +14 -0
- package/dist/es/commands/templates/admin-ui/web-src/index.css +5 -0
- package/dist/es/commands/templates/admin-ui/web-src/index.html +17 -0
- package/dist/es/commands/templates/admin-ui/web-src/src/app.jsx +13 -0
- package/dist/es/commands/templates/admin-ui/web-src/src/components/welcome.jsx +12 -0
- package/dist/es/commands/templates/admin-ui/web-src/src/pages/main-page.jsx +10 -0
- package/dist/es/commands/templates/{admin-ui-sdk/registration.js.template → admin-ui/web-src-template.d.ts} +11 -6
- package/dist/es/commands/templates/app-management/app-config.js.template +1 -14
- package/dist/es/commands/templates/app-management/association.js.template +6 -0
- package/dist/es/commands/templates/app-management/installation.js.template +1 -13
- package/dist/es/commands/templates/business-configuration/config.js.template +2 -15
- package/dist/es/commands/templates/business-configuration/scope-tree.js.template +0 -12
- package/dist/es/config/index.browser.d.mts +16 -0
- package/dist/es/config/index.browser.mjs +17 -0
- package/dist/es/config/index.node.d.mts +1604 -0
- package/dist/es/config/index.node.mjs +20 -0
- package/dist/es/define-EoYRZbpe.d.mts +34 -0
- package/dist/es/define-Z_Glf1-_.mjs +35 -0
- package/dist/es/environment-C84BPRJZ.mjs +104 -0
- package/dist/es/index-B0XqHwY5.d.mts +16 -0
- package/dist/es/{index-Bo0tQsVq.d.mts → index-D52xglhZ.d.mts} +177 -3
- package/dist/es/index.d.mts +217 -0
- package/dist/es/index.mjs +242 -0
- package/dist/es/{config-CcE0EBG7.mjs → index.node-CDH5gwJE.mjs} +94 -30
- package/dist/es/management/index.d.mts +1 -2
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-BZ4Y6lVp.mjs → management-B89ApQVY.mjs} +402 -562
- package/dist/es/openapi-CXonvevE.mjs +2900 -0
- package/dist/es/{router-D58JJHHA.mjs → router-B_h0cvjc.mjs} +40 -42
- package/dist/es/utils-_gj8L6eN.mjs +289 -0
- package/dist/es/{validate-Du3LhCre.mjs → validate-9cRZWGrA.mjs} +49 -29
- package/dist/es/{webhooks-B5oq9ULL.mjs → webhooks-BBPbY2mb.mjs} +150 -142
- package/package.json +52 -22
- package/dist/cjs/actions/app-config.cjs +0 -54
- package/dist/cjs/actions/registration.cjs +0 -40
- package/dist/cjs/actions/registration.d.cts +0 -32
- package/dist/cjs/admin-ui-sdk-DZZJCrdT.d.cts +0 -665
- package/dist/cjs/app-CakwxQvs.d.cts +0 -673
- package/dist/cjs/config/index.d.cts +0 -1975
- package/dist/cjs/step-CKVE0aJi.d.cts +0 -187
- package/dist/es/actions/app-config.mjs +0 -53
- package/dist/es/actions/registration.d.mts +0 -32
- package/dist/es/actions/registration.mjs +0 -39
- package/dist/es/admin-ui-sdk-hu6iWr0A.d.mts +0 -667
- package/dist/es/app-CakwxQvs.d.mts +0 -673
- package/dist/es/config/index.d.mts +0 -1975
- package/dist/es/config/index.mjs +0 -19
- package/dist/es/step-D64mMPrt.d.mts +0 -187
- /package/dist/cjs/{chunk-Cozy-1ZF.cjs → rolldown-runtime-Cozy-1ZF.cjs} +0 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
|
+
const require_association_repository = require('./association-repository-BAs3-VkW.cjs');
|
|
17
|
+
const require_utils = require('./utils-DSCmZ_iJ.cjs');
|
|
18
|
+
let _adobe_aio_commerce_lib_api = require("@adobe/aio-commerce-lib-api");
|
|
19
|
+
let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
|
|
20
|
+
let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
|
|
21
|
+
|
|
22
|
+
//#region source/errors/app-not-associated-error.ts
|
|
23
|
+
const DEFAULT_MESSAGE = "App is not associated with a Commerce instance. Re-associate the app to resolve this error.";
|
|
24
|
+
/**
|
|
25
|
+
* Thrown when a runtime action calls `getCommerceInstance` or `getCommerceClient`
|
|
26
|
+
* but the app has no stored association data — for example, when the app has
|
|
27
|
+
* never been associated, has been unassociated, or was associated by an older
|
|
28
|
+
* SDK that did not store this data.
|
|
29
|
+
*
|
|
30
|
+
* Re-associating the app resolves the error.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* import { getCommerceClient, AppNotAssociatedError } from "@adobe/aio-commerce-lib-app";
|
|
35
|
+
* import { resolveImsAuthParams } from "@adobe/aio-commerce-lib-auth";
|
|
36
|
+
*
|
|
37
|
+
* try {
|
|
38
|
+
* const client = await getCommerceClient(resolveImsAuthParams(params));
|
|
39
|
+
* // ... use client
|
|
40
|
+
* } catch (error) {
|
|
41
|
+
* if (error instanceof AppNotAssociatedError) {
|
|
42
|
+
* // handle the unassociated case (e.g. return a 400 response)
|
|
43
|
+
* }
|
|
44
|
+
* throw error;
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
var AppNotAssociatedError = class extends _adobe_aio_commerce_lib_core_error.CommerceSdkErrorBase {
|
|
49
|
+
constructor(message = DEFAULT_MESSAGE, options) {
|
|
50
|
+
super(message, options);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region source/access/commerce-instance.ts
|
|
56
|
+
/**
|
|
57
|
+
* Returns the Commerce instance this app is currently associated with.
|
|
58
|
+
*
|
|
59
|
+
* @throws {AppNotAssociatedError} If the app is not associated, was
|
|
60
|
+
* unassociated, or was associated by an older SDK that did not store this
|
|
61
|
+
* data. Re-associating the app resolves the error.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* import { getCommerceInstance } from "@adobe/aio-commerce-lib-app";
|
|
66
|
+
*
|
|
67
|
+
* export async function main() {
|
|
68
|
+
* const instance = await getCommerceInstance();
|
|
69
|
+
*
|
|
70
|
+
* // instance.baseUrl — e.g. "https://my-store.example.com"
|
|
71
|
+
* // instance.env — "saas" | "paas"
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
async function getCommerceInstance() {
|
|
76
|
+
const instance = await require_association_repository.getAssociationData();
|
|
77
|
+
if (instance === null) throw new AppNotAssociatedError();
|
|
78
|
+
return instance;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Returns an initialised `AdobeCommerceHttpClient` for the Commerce instance
|
|
82
|
+
* this app is currently associated with.
|
|
83
|
+
*
|
|
84
|
+
* The base URL and flavor come from the stored association data
|
|
85
|
+
* ({@link getCommerceInstance}); the caller supplies the resolved IMS auth.
|
|
86
|
+
*
|
|
87
|
+
* @param auth - Resolved IMS auth params or an IMS auth provider.
|
|
88
|
+
* @param fetchOptions - Optional global fetch options forwarded to the
|
|
89
|
+
* underlying `AdobeCommerceHttpClient` (e.g. `headers`, `timeout`, `retry`).
|
|
90
|
+
* @throws {AppNotAssociatedError} If the app is not associated, was
|
|
91
|
+
* unassociated, or was associated by an older SDK that did not store this
|
|
92
|
+
* data. Re-associating the app resolves the error.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* import { getCommerceClient } from "@adobe/aio-commerce-lib-app";
|
|
97
|
+
* import { resolveImsAuthParams } from "@adobe/aio-commerce-lib-auth";
|
|
98
|
+
*
|
|
99
|
+
* export async function main(params) {
|
|
100
|
+
* const client = await getCommerceClient(resolveImsAuthParams(params));
|
|
101
|
+
* const products = await client.get("products").json();
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
async function getCommerceClient(auth, fetchOptions) {
|
|
106
|
+
const instance = await getCommerceInstance();
|
|
107
|
+
return new _adobe_aio_commerce_lib_api.AdobeCommerceHttpClient({
|
|
108
|
+
auth,
|
|
109
|
+
config: {
|
|
110
|
+
baseUrl: instance.baseUrl,
|
|
111
|
+
flavor: instance.env
|
|
112
|
+
},
|
|
113
|
+
fetchOptions
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region source/errors/publish-event-errors.ts
|
|
119
|
+
/**
|
|
120
|
+
* Base error thrown by {@link publishEvent} when event resolution or publishing fails.
|
|
121
|
+
* Catch this to handle all publish-event failures in a single clause.
|
|
122
|
+
*/
|
|
123
|
+
var PublishEventError = class extends _adobe_aio_commerce_lib_core_error.CommerceSdkErrorBase {};
|
|
124
|
+
/**
|
|
125
|
+
* Thrown when {@link publishEvent} cannot find the eventing installation data in system storage.
|
|
126
|
+
*
|
|
127
|
+
* This typically means the app installation has not run yet, or ran with an older SDK version
|
|
128
|
+
* that did not write event provider metadata to storage. Re-running the installation resolves it.
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* try {
|
|
133
|
+
* await publishEvent({ client, provider: "order-events", event: "order.created", payload });
|
|
134
|
+
* } catch (error) {
|
|
135
|
+
* if (error instanceof EventsDataNotInitializedError) {
|
|
136
|
+
* // Prompt re-installation
|
|
137
|
+
* }
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
var EventsDataNotInitializedError = class extends PublishEventError {
|
|
142
|
+
constructor() {
|
|
143
|
+
super("No eventing installation data found. Re-run the app installation to initialize event provider metadata.");
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Thrown when the provider key passed to {@link publishEvent} does not match any provider
|
|
148
|
+
* declared in the app's eventing configuration.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```ts
|
|
152
|
+
* try {
|
|
153
|
+
* await publishEvent({ client, provider: "order-events", event: "order.created", payload });
|
|
154
|
+
* } catch (error) {
|
|
155
|
+
* if (error instanceof ProviderNotFoundError) {
|
|
156
|
+
* // "order-events" was not found — check app.commerce.config.ts
|
|
157
|
+
* }
|
|
158
|
+
* }
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
var ProviderNotFoundError = class extends PublishEventError {
|
|
162
|
+
constructor(providerKey) {
|
|
163
|
+
super(`No event provider with key '${providerKey}' found in the app eventing configuration.`);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Thrown when the event name passed to {@link publishEvent} does not match any event
|
|
168
|
+
* declared under the given provider in the app's eventing configuration.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* try {
|
|
173
|
+
* await publishEvent({ client, provider: "order-events", event: "order.created", payload });
|
|
174
|
+
* } catch (error) {
|
|
175
|
+
* if (error instanceof EventNotFoundError) {
|
|
176
|
+
* // "order.created" was not found under "order-events" — check app.commerce.config.ts
|
|
177
|
+
* }
|
|
178
|
+
* }
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
var EventNotFoundError = class extends PublishEventError {
|
|
182
|
+
constructor(eventName, providerKey) {
|
|
183
|
+
super(`No event named '${eventName}' found under provider '${providerKey}'.`);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region source/access/events.ts
|
|
189
|
+
/**
|
|
190
|
+
* Publishes an event declared in the app's eventing configuration.
|
|
191
|
+
*
|
|
192
|
+
* Resolves the provider key and event name to their respective I/O Events IDs from
|
|
193
|
+
* data written to system storage at installation time, then delegates the HTTP call
|
|
194
|
+
* to the given client. No management API round-trip is needed at runtime.
|
|
195
|
+
*
|
|
196
|
+
* @param params.client - An {@link AdobeIoEventsApiClient} configured with the correct IMS auth.
|
|
197
|
+
* @param params.provider - The `key` of an event provider declared in `app.commerce.config.ts`.
|
|
198
|
+
* @param params.event - The `name` of an event within that provider.
|
|
199
|
+
* @param params.payload - The event payload. Must be a JSON object.
|
|
200
|
+
*
|
|
201
|
+
* @throws {EventsDataNotInitializedError} If no eventing installation data is found in system storage.
|
|
202
|
+
* @throws {ProviderNotFoundError} If the provider key is not found in the stored data.
|
|
203
|
+
* @throws {EventNotFoundError} If the event name is not found under the given provider.
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```ts
|
|
207
|
+
* import { publishEvent } from "@adobe/aio-commerce-lib-app";
|
|
208
|
+
* import { createAdobeIoEventsApiClient } from "@adobe/aio-commerce-lib-events";
|
|
209
|
+
* import { resolveImsAuthParams } from "@adobe/aio-commerce-lib-auth";
|
|
210
|
+
*
|
|
211
|
+
* export async function main(params) {
|
|
212
|
+
* const client = createAdobeIoEventsApiClient({
|
|
213
|
+
* auth: resolveImsAuthParams(params),
|
|
214
|
+
* config: { ingressBaseUrl: params.AIO_EVENTS_INGRESS_BASE_URL },
|
|
215
|
+
* });
|
|
216
|
+
*
|
|
217
|
+
* await publishEvent({
|
|
218
|
+
* client,
|
|
219
|
+
* provider: "order-events",
|
|
220
|
+
* event: "order.created",
|
|
221
|
+
* payload: { orderId: "100000123", total: 149.99 },
|
|
222
|
+
* });
|
|
223
|
+
* }
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
async function publishEvent(params) {
|
|
227
|
+
const { client, provider: providerKey, event: eventName, payload } = params;
|
|
228
|
+
const data = await (0, _adobe_aio_commerce_lib_config.getSystemConfigByKey)(require_utils.EVENTS_STORAGE_KEY);
|
|
229
|
+
if (!data) throw new EventsDataNotInitializedError();
|
|
230
|
+
const providerEntry = data.providers[providerKey];
|
|
231
|
+
if (!providerEntry) throw new ProviderNotFoundError(providerKey);
|
|
232
|
+
const eventEntry = providerEntry.events[eventName];
|
|
233
|
+
if (!eventEntry) throw new EventNotFoundError(eventName, providerKey);
|
|
234
|
+
await client.publishEvent({
|
|
235
|
+
eventCode: eventEntry.code,
|
|
236
|
+
isPhiData: eventEntry.isPhiData,
|
|
237
|
+
payload,
|
|
238
|
+
providerId: providerEntry.id
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
//#endregion
|
|
243
|
+
exports.AppNotAssociatedError = AppNotAssociatedError;
|
|
244
|
+
exports.EventNotFoundError = EventNotFoundError;
|
|
245
|
+
exports.EventsDataNotInitializedError = EventsDataNotInitializedError;
|
|
246
|
+
exports.ProviderNotFoundError = ProviderNotFoundError;
|
|
247
|
+
exports.PublishEventError = PublishEventError;
|
|
248
|
+
exports.getCommerceClient = getCommerceClient;
|
|
249
|
+
exports.getCommerceInstance = getCommerceInstance;
|
|
250
|
+
exports.publishEvent = publishEvent;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { AdobeCommerceHttpClient, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
16
|
+
import { ImsAuthParams, ImsAuthProvider } from "@adobe/aio-commerce-lib-auth";
|
|
17
|
+
import { CommerceEnv } from "@adobe/aio-commerce-lib-core/commerce";
|
|
18
|
+
import { AdobeIoEventsApiClient } from "@adobe/aio-commerce-lib-events/io-events";
|
|
19
|
+
import { CommerceSdkErrorBase, CommerceSdkErrorBaseOptions } from "@adobe/aio-commerce-lib-core/error";
|
|
20
|
+
|
|
21
|
+
//#region source/management/association/types.d.ts
|
|
22
|
+
/**
|
|
23
|
+
* The Commerce instance an app is associated with.
|
|
24
|
+
*/
|
|
25
|
+
type AssociatedCommerceInstance = {
|
|
26
|
+
/** Commerce API base URL. */baseUrl: string; /** Deployment type of the Commerce instance. */
|
|
27
|
+
env: CommerceEnv;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region source/access/commerce-instance.d.ts
|
|
31
|
+
/**
|
|
32
|
+
* Returns the Commerce instance this app is currently associated with.
|
|
33
|
+
*
|
|
34
|
+
* @throws {AppNotAssociatedError} If the app is not associated, was
|
|
35
|
+
* unassociated, or was associated by an older SDK that did not store this
|
|
36
|
+
* data. Re-associating the app resolves the error.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { getCommerceInstance } from "@adobe/aio-commerce-lib-app";
|
|
41
|
+
*
|
|
42
|
+
* export async function main() {
|
|
43
|
+
* const instance = await getCommerceInstance();
|
|
44
|
+
*
|
|
45
|
+
* // instance.baseUrl — e.g. "https://my-store.example.com"
|
|
46
|
+
* // instance.env — "saas" | "paas"
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function getCommerceInstance(): Promise<AssociatedCommerceInstance>;
|
|
51
|
+
/**
|
|
52
|
+
* Returns an initialised `AdobeCommerceHttpClient` for the Commerce instance
|
|
53
|
+
* this app is currently associated with.
|
|
54
|
+
*
|
|
55
|
+
* The base URL and flavor come from the stored association data
|
|
56
|
+
* ({@link getCommerceInstance}); the caller supplies the resolved IMS auth.
|
|
57
|
+
*
|
|
58
|
+
* @param auth - Resolved IMS auth params or an IMS auth provider.
|
|
59
|
+
* @param fetchOptions - Optional global fetch options forwarded to the
|
|
60
|
+
* underlying `AdobeCommerceHttpClient` (e.g. `headers`, `timeout`, `retry`).
|
|
61
|
+
* @throws {AppNotAssociatedError} If the app is not associated, was
|
|
62
|
+
* unassociated, or was associated by an older SDK that did not store this
|
|
63
|
+
* data. Re-associating the app resolves the error.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* import { getCommerceClient } from "@adobe/aio-commerce-lib-app";
|
|
68
|
+
* import { resolveImsAuthParams } from "@adobe/aio-commerce-lib-auth";
|
|
69
|
+
*
|
|
70
|
+
* export async function main(params) {
|
|
71
|
+
* const client = await getCommerceClient(resolveImsAuthParams(params));
|
|
72
|
+
* const products = await client.get("products").json();
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
declare function getCommerceClient(auth: ImsAuthParams | ImsAuthProvider, fetchOptions?: CommerceHttpClientParams["fetchOptions"]): Promise<AdobeCommerceHttpClient>;
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region source/access/events.d.ts
|
|
79
|
+
/**
|
|
80
|
+
* Publishes an event declared in the app's eventing configuration.
|
|
81
|
+
*
|
|
82
|
+
* Resolves the provider key and event name to their respective I/O Events IDs from
|
|
83
|
+
* data written to system storage at installation time, then delegates the HTTP call
|
|
84
|
+
* to the given client. No management API round-trip is needed at runtime.
|
|
85
|
+
*
|
|
86
|
+
* @param params.client - An {@link AdobeIoEventsApiClient} configured with the correct IMS auth.
|
|
87
|
+
* @param params.provider - The `key` of an event provider declared in `app.commerce.config.ts`.
|
|
88
|
+
* @param params.event - The `name` of an event within that provider.
|
|
89
|
+
* @param params.payload - The event payload. Must be a JSON object.
|
|
90
|
+
*
|
|
91
|
+
* @throws {EventsDataNotInitializedError} If no eventing installation data is found in system storage.
|
|
92
|
+
* @throws {ProviderNotFoundError} If the provider key is not found in the stored data.
|
|
93
|
+
* @throws {EventNotFoundError} If the event name is not found under the given provider.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { publishEvent } from "@adobe/aio-commerce-lib-app";
|
|
98
|
+
* import { createAdobeIoEventsApiClient } from "@adobe/aio-commerce-lib-events";
|
|
99
|
+
* import { resolveImsAuthParams } from "@adobe/aio-commerce-lib-auth";
|
|
100
|
+
*
|
|
101
|
+
* export async function main(params) {
|
|
102
|
+
* const client = createAdobeIoEventsApiClient({
|
|
103
|
+
* auth: resolveImsAuthParams(params),
|
|
104
|
+
* config: { ingressBaseUrl: params.AIO_EVENTS_INGRESS_BASE_URL },
|
|
105
|
+
* });
|
|
106
|
+
*
|
|
107
|
+
* await publishEvent({
|
|
108
|
+
* client,
|
|
109
|
+
* provider: "order-events",
|
|
110
|
+
* event: "order.created",
|
|
111
|
+
* payload: { orderId: "100000123", total: 149.99 },
|
|
112
|
+
* });
|
|
113
|
+
* }
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
declare function publishEvent<TPayload extends Record<string, unknown> = Record<string, unknown>>(params: {
|
|
117
|
+
client: AdobeIoEventsApiClient;
|
|
118
|
+
provider: string;
|
|
119
|
+
event: string;
|
|
120
|
+
payload: TPayload;
|
|
121
|
+
}): Promise<void>;
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region source/errors/app-not-associated-error.d.ts
|
|
124
|
+
/** Options accepted by {@link AppNotAssociatedError}. */
|
|
125
|
+
type AppNotAssociatedErrorOptions = CommerceSdkErrorBaseOptions;
|
|
126
|
+
/**
|
|
127
|
+
* Thrown when a runtime action calls `getCommerceInstance` or `getCommerceClient`
|
|
128
|
+
* but the app has no stored association data — for example, when the app has
|
|
129
|
+
* never been associated, has been unassociated, or was associated by an older
|
|
130
|
+
* SDK that did not store this data.
|
|
131
|
+
*
|
|
132
|
+
* Re-associating the app resolves the error.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```ts
|
|
136
|
+
* import { getCommerceClient, AppNotAssociatedError } from "@adobe/aio-commerce-lib-app";
|
|
137
|
+
* import { resolveImsAuthParams } from "@adobe/aio-commerce-lib-auth";
|
|
138
|
+
*
|
|
139
|
+
* try {
|
|
140
|
+
* const client = await getCommerceClient(resolveImsAuthParams(params));
|
|
141
|
+
* // ... use client
|
|
142
|
+
* } catch (error) {
|
|
143
|
+
* if (error instanceof AppNotAssociatedError) {
|
|
144
|
+
* // handle the unassociated case (e.g. return a 400 response)
|
|
145
|
+
* }
|
|
146
|
+
* throw error;
|
|
147
|
+
* }
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
declare class AppNotAssociatedError extends CommerceSdkErrorBase {
|
|
151
|
+
constructor(message?: string, options?: AppNotAssociatedErrorOptions);
|
|
152
|
+
}
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region source/errors/publish-event-errors.d.ts
|
|
155
|
+
/**
|
|
156
|
+
* Base error thrown by {@link publishEvent} when event resolution or publishing fails.
|
|
157
|
+
* Catch this to handle all publish-event failures in a single clause.
|
|
158
|
+
*/
|
|
159
|
+
declare class PublishEventError extends CommerceSdkErrorBase {}
|
|
160
|
+
/**
|
|
161
|
+
* Thrown when {@link publishEvent} cannot find the eventing installation data in system storage.
|
|
162
|
+
*
|
|
163
|
+
* This typically means the app installation has not run yet, or ran with an older SDK version
|
|
164
|
+
* that did not write event provider metadata to storage. Re-running the installation resolves it.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```ts
|
|
168
|
+
* try {
|
|
169
|
+
* await publishEvent({ client, provider: "order-events", event: "order.created", payload });
|
|
170
|
+
* } catch (error) {
|
|
171
|
+
* if (error instanceof EventsDataNotInitializedError) {
|
|
172
|
+
* // Prompt re-installation
|
|
173
|
+
* }
|
|
174
|
+
* }
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
declare class EventsDataNotInitializedError extends PublishEventError {
|
|
178
|
+
constructor();
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Thrown when the provider key passed to {@link publishEvent} does not match any provider
|
|
182
|
+
* declared in the app's eventing configuration.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```ts
|
|
186
|
+
* try {
|
|
187
|
+
* await publishEvent({ client, provider: "order-events", event: "order.created", payload });
|
|
188
|
+
* } catch (error) {
|
|
189
|
+
* if (error instanceof ProviderNotFoundError) {
|
|
190
|
+
* // "order-events" was not found — check app.commerce.config.ts
|
|
191
|
+
* }
|
|
192
|
+
* }
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
declare class ProviderNotFoundError extends PublishEventError {
|
|
196
|
+
constructor(providerKey: string);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Thrown when the event name passed to {@link publishEvent} does not match any event
|
|
200
|
+
* declared under the given provider in the app's eventing configuration.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* try {
|
|
205
|
+
* await publishEvent({ client, provider: "order-events", event: "order.created", payload });
|
|
206
|
+
* } catch (error) {
|
|
207
|
+
* if (error instanceof EventNotFoundError) {
|
|
208
|
+
* // "order.created" was not found under "order-events" — check app.commerce.config.ts
|
|
209
|
+
* }
|
|
210
|
+
* }
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
declare class EventNotFoundError extends PublishEventError {
|
|
214
|
+
constructor(eventName: string, providerKey: string);
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
export { AppNotAssociatedError, type AssociatedCommerceInstance, EventNotFoundError, EventsDataNotInitializedError, ProviderNotFoundError, PublishEventError, getCommerceClient, getCommerceInstance, publishEvent };
|
|
@@ -12,34 +12,19 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const require_rolldown_runtime = require('./rolldown-runtime-Cozy-1ZF.cjs');
|
|
16
16
|
const require_error = require('./error-D-N0PKSl.cjs');
|
|
17
|
+
const require_validate = require('./validate-BfxhZ5Wv.cjs');
|
|
17
18
|
let path = require("path");
|
|
18
19
|
let fs = require("fs");
|
|
19
20
|
let fs_promises = require("fs/promises");
|
|
21
|
+
let _npmcli_package_json = require("@npmcli/package-json");
|
|
22
|
+
_npmcli_package_json = require_rolldown_runtime.__toESM(_npmcli_package_json, 1);
|
|
23
|
+
let local_pkg = require("local-pkg");
|
|
20
24
|
let package_manager_detector = require("package-manager-detector");
|
|
21
25
|
let package_manager_detector_detect = require("package-manager-detector/detect");
|
|
26
|
+
let semver = require("semver");
|
|
22
27
|
|
|
23
|
-
//#region source/config/lib/define.ts
|
|
24
|
-
/**
|
|
25
|
-
* Helper to type-safely define the app config.
|
|
26
|
-
* @param config - The app config to define.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```typescript
|
|
30
|
-
* import { defineConfig } from "@adobe/aio-commerce-lib-app";
|
|
31
|
-
*
|
|
32
|
-
* // In app.commerce.config.js
|
|
33
|
-
* export default defineConfig({
|
|
34
|
-
* // You get autocompletion and type-safety for the config object.
|
|
35
|
-
* businessConfig: { ... }
|
|
36
|
-
* });
|
|
37
|
-
*/
|
|
38
|
-
function defineConfig(config) {
|
|
39
|
-
return config;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
28
|
//#region ../../packages-private/scripting-utils/source/project.ts
|
|
44
29
|
/**
|
|
45
30
|
* This module exports shared project utilities for the AIO Commerce SDK.
|
|
@@ -57,7 +42,7 @@ async function findUp(name, options = {}) {
|
|
|
57
42
|
const { root } = (0, path.parse)(cwd);
|
|
58
43
|
const stopAt = options.stopAt || root;
|
|
59
44
|
let currentDir = cwd;
|
|
60
|
-
|
|
45
|
+
for (;;) {
|
|
61
46
|
for (const fileName of names) {
|
|
62
47
|
const filePath = (0, path.join)(currentDir, fileName);
|
|
63
48
|
try {
|
|
@@ -88,6 +73,72 @@ async function readPackageJson(cwd = process.cwd()) {
|
|
|
88
73
|
return JSON.parse(await (0, fs_promises.readFile)(packageJsonPath, "utf-8"));
|
|
89
74
|
}
|
|
90
75
|
/**
|
|
76
|
+
* Load the nearest package.json file with npmcli's package.json helper.
|
|
77
|
+
* @param cwd The current working directory
|
|
78
|
+
*/
|
|
79
|
+
async function loadPackageJson(cwd = process.cwd()) {
|
|
80
|
+
const packageJsonPath = await findNearestPackageJson(cwd);
|
|
81
|
+
if (!packageJsonPath) return null;
|
|
82
|
+
return _npmcli_package_json.default.load((0, path.dirname)(packageJsonPath));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Convert package.json dependencies into a dependency map that can be written back.
|
|
86
|
+
* @param dependencies - Dependency map read from package.json.
|
|
87
|
+
*/
|
|
88
|
+
function toWritablePackageJsonDependencies(dependencies) {
|
|
89
|
+
return Object.fromEntries(Object.entries(dependencies).filter((entry) => Boolean(entry[1])));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Resolve the installed package version from a project root.
|
|
93
|
+
* @param packageName - Package name to resolve.
|
|
94
|
+
* @param cwd - Project directory to resolve from.
|
|
95
|
+
*/
|
|
96
|
+
async function getInstalledPackageVersion(packageName, cwd = process.cwd()) {
|
|
97
|
+
return (await (0, local_pkg.getPackageInfo)(packageName, { paths: [cwd] }))?.version ?? null;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Resolve which dependencies are missing or installed with incompatible versions.
|
|
101
|
+
*
|
|
102
|
+
* Installed package versions are compared with `semver.satisfies`. Declared
|
|
103
|
+
* package.json ranges are not used as compatibility proof because they can
|
|
104
|
+
* differ from what is actually installed.
|
|
105
|
+
*
|
|
106
|
+
* @param requiredDependencies - Dependencies that should exist.
|
|
107
|
+
* @param cwd - Project directory to resolve installed packages from.
|
|
108
|
+
*/
|
|
109
|
+
async function getPackageDependencyInstallPlan(requiredDependencies, cwd = process.cwd()) {
|
|
110
|
+
const plan = {
|
|
111
|
+
incompatible: [],
|
|
112
|
+
missing: []
|
|
113
|
+
};
|
|
114
|
+
const installedVersions = await Promise.all(requiredDependencies.map((dependency) => getInstalledPackageVersion(dependency.name, cwd)));
|
|
115
|
+
requiredDependencies.forEach((dependency, index) => {
|
|
116
|
+
const installedVersion = installedVersions[index];
|
|
117
|
+
if (installedVersion === null) {
|
|
118
|
+
plan.missing.push(dependency);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if ((0, semver.validRange)(dependency.version) === null) return;
|
|
122
|
+
if (!(0, semver.satisfies)(installedVersion, dependency.version, { includePrerelease: true })) plan.incompatible.push({
|
|
123
|
+
...dependency,
|
|
124
|
+
installedVersion
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
return plan;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Merge required dependencies into a package.json dependency map when they are missing.
|
|
131
|
+
*
|
|
132
|
+
* @param dependencies - Dependency map to update.
|
|
133
|
+
* @param requiredDependencies - Dependencies that should exist.
|
|
134
|
+
* @param dependencyMaps - Package dependency maps to compare against.
|
|
135
|
+
*/
|
|
136
|
+
function mergePackageJsonDependencies(dependencies, requiredDependencies, dependencyMaps = [dependencies]) {
|
|
137
|
+
const nextDependencies = toWritablePackageJsonDependencies(dependencies);
|
|
138
|
+
for (const { name, version } of requiredDependencies) if (!dependencyMaps.some((dependencyMap) => name in dependencyMap)) nextDependencies[name] = version;
|
|
139
|
+
return nextDependencies;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
91
142
|
* Check if the current working directory is an ESM project.
|
|
92
143
|
* @param cwd The current working directory
|
|
93
144
|
*/
|
|
@@ -120,6 +171,12 @@ const VALID_PACKAGE_MANAGERS = [
|
|
|
120
171
|
"yarn",
|
|
121
172
|
"bun"
|
|
122
173
|
];
|
|
174
|
+
const DEV_DEPENDENCY_INSTALL_FLAGS = {
|
|
175
|
+
bun: "--dev",
|
|
176
|
+
npm: "--save-dev",
|
|
177
|
+
pnpm: "--save-dev",
|
|
178
|
+
yarn: "--dev"
|
|
179
|
+
};
|
|
123
180
|
/**
|
|
124
181
|
* Type guard asserting that a value is a supported `PackageManager`.
|
|
125
182
|
* @param value - The value to check
|
|
@@ -153,16 +210,25 @@ function getExecCommand(packageManager) {
|
|
|
153
210
|
* manager (e.g. `pnpm add foo bar`, `npm i foo bar`).
|
|
154
211
|
* @param packageManager - The detected package manager
|
|
155
212
|
* @param packages - Package specifiers to install (e.g. `["foo@^1.0"]`)
|
|
213
|
+
* @param options - Install command options.
|
|
156
214
|
*/
|
|
157
|
-
function getInstallCommand(packageManager, packages) {
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
args: ["install", ...
|
|
215
|
+
function getInstallCommand(packageManager, packages, options = {}) {
|
|
216
|
+
const installArgs = options.dev ? [DEV_DEPENDENCY_INSTALL_FLAGS[packageManager], ...packages] : packages;
|
|
217
|
+
const resolved = (0, package_manager_detector.resolveCommand)(packageManager, "add", installArgs);
|
|
218
|
+
return {
|
|
219
|
+
args: resolved?.args.filter(Boolean) ?? ["install", ...installArgs],
|
|
220
|
+
command: resolved?.command ?? "npm"
|
|
162
221
|
};
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Get the command that installs a project's declared dependencies.
|
|
225
|
+
* @param packageManager - The detected package manager
|
|
226
|
+
*/
|
|
227
|
+
function getProjectInstallCommand(packageManager) {
|
|
228
|
+
const resolved = (0, package_manager_detector.resolveCommand)(packageManager, "install", []);
|
|
163
229
|
return {
|
|
164
|
-
args: resolved
|
|
165
|
-
command: resolved
|
|
230
|
+
args: resolved?.args.filter(Boolean) ?? ["install"],
|
|
231
|
+
command: resolved?.command ?? "npm"
|
|
166
232
|
};
|
|
167
233
|
}
|
|
168
234
|
|
|
@@ -242,12 +308,6 @@ async function parseCommerceAppConfig(cwd = process.cwd()) {
|
|
|
242
308
|
}
|
|
243
309
|
|
|
244
310
|
//#endregion
|
|
245
|
-
Object.defineProperty(exports, 'defineConfig', {
|
|
246
|
-
enumerable: true,
|
|
247
|
-
get: function () {
|
|
248
|
-
return defineConfig;
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
311
|
Object.defineProperty(exports, 'detectPackageManager', {
|
|
252
312
|
enumerable: true,
|
|
253
313
|
get: function () {
|
|
@@ -266,6 +326,18 @@ Object.defineProperty(exports, 'getInstallCommand', {
|
|
|
266
326
|
return getInstallCommand;
|
|
267
327
|
}
|
|
268
328
|
});
|
|
329
|
+
Object.defineProperty(exports, 'getPackageDependencyInstallPlan', {
|
|
330
|
+
enumerable: true,
|
|
331
|
+
get: function () {
|
|
332
|
+
return getPackageDependencyInstallPlan;
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
Object.defineProperty(exports, 'getProjectInstallCommand', {
|
|
336
|
+
enumerable: true,
|
|
337
|
+
get: function () {
|
|
338
|
+
return getProjectInstallCommand;
|
|
339
|
+
}
|
|
340
|
+
});
|
|
269
341
|
Object.defineProperty(exports, 'getProjectRootDirectory', {
|
|
270
342
|
enumerable: true,
|
|
271
343
|
get: function () {
|
|
@@ -278,12 +350,24 @@ Object.defineProperty(exports, 'isESM', {
|
|
|
278
350
|
return isESM;
|
|
279
351
|
}
|
|
280
352
|
});
|
|
353
|
+
Object.defineProperty(exports, 'loadPackageJson', {
|
|
354
|
+
enumerable: true,
|
|
355
|
+
get: function () {
|
|
356
|
+
return loadPackageJson;
|
|
357
|
+
}
|
|
358
|
+
});
|
|
281
359
|
Object.defineProperty(exports, 'makeOutputDirFor', {
|
|
282
360
|
enumerable: true,
|
|
283
361
|
get: function () {
|
|
284
362
|
return makeOutputDirFor;
|
|
285
363
|
}
|
|
286
364
|
});
|
|
365
|
+
Object.defineProperty(exports, 'mergePackageJsonDependencies', {
|
|
366
|
+
enumerable: true,
|
|
367
|
+
get: function () {
|
|
368
|
+
return mergePackageJsonDependencies;
|
|
369
|
+
}
|
|
370
|
+
});
|
|
287
371
|
Object.defineProperty(exports, 'parseCommerceAppConfig', {
|
|
288
372
|
enumerable: true,
|
|
289
373
|
get: function () {
|