@adobe/aio-commerce-lib-app 1.4.0 → 1.6.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.
- package/CHANGELOG.md +42 -0
- package/dist/cjs/actions/app-config.cjs +17 -4
- package/dist/cjs/actions/app-config.d.cts +3 -4
- package/dist/cjs/actions/config.cjs +21 -16
- package/dist/cjs/actions/config.d.cts +1 -2
- package/dist/cjs/actions/installation.cjs +20 -14
- package/dist/cjs/actions/installation.d.cts +4 -5
- package/dist/cjs/actions/registration.cjs +1 -2
- package/dist/cjs/actions/registration.d.cts +2 -3
- package/dist/cjs/actions/scope-tree.cjs +5 -5
- package/dist/cjs/actions/scope-tree.d.cts +1 -4
- package/dist/cjs/{admin-ui-sdk-BiSopnKI.d.cts → admin-ui-sdk-DZZJCrdT.d.cts} +1 -1
- package/dist/cjs/{app-C6kImBl7.d.cts → app-CakwxQvs.d.cts} +129 -20
- package/dist/cjs/commands/index.cjs +236 -45
- package/dist/cjs/commands/templates/app-management/app-config.js.template +2 -2
- package/dist/cjs/config/index.cjs +3 -3
- package/dist/cjs/config/index.d.cts +354 -391
- package/dist/cjs/{config-ct-qMOGj.cjs → config-FNMclIFO.cjs} +4 -6
- package/dist/cjs/{error-C5LNOZ4f.cjs → error-D-N0PKSl.cjs} +0 -1
- package/dist/cjs/{index-B5WKJ3hJ.d.cts → index-Dw2NvVOY.d.cts} +2 -2
- package/dist/cjs/{logging-BTevALnL.cjs → logging-BVz3weoC.cjs} +1 -1
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/management/index.d.cts +3 -3
- package/dist/cjs/{management-D1QXg4YU.cjs → management-Cvsz4VMf.cjs} +34 -9
- package/dist/cjs/{router-CFErodHU.cjs → router-BOR7T6qR.cjs} +1 -1
- package/dist/cjs/{schemas-CukVpc19.cjs → schemas-FngDuIeo.cjs} +1 -1
- package/dist/{es/step-0eI2x4C9.d.mts → cjs/step-CKVE0aJi.d.cts} +3 -3
- package/dist/cjs/{validate-b_bI4mDb.cjs → validate-DydOAZha.cjs} +4 -4
- package/dist/cjs/{webhooks-DS1BtgED.cjs → webhooks-tbZy9G3p.cjs} +4 -4
- package/dist/es/actions/app-config.d.mts +3 -4
- package/dist/es/actions/app-config.mjs +18 -4
- package/dist/es/actions/config.d.mts +1 -2
- package/dist/es/actions/config.mjs +20 -15
- package/dist/es/actions/installation.d.mts +4 -5
- package/dist/es/actions/installation.mjs +19 -13
- package/dist/es/actions/registration.d.mts +2 -3
- package/dist/es/actions/registration.mjs +1 -1
- package/dist/es/actions/scope-tree.d.mts +1 -4
- package/dist/es/actions/scope-tree.mjs +4 -4
- package/dist/es/{admin-ui-sdk-CCo2SWiL.d.mts → admin-ui-sdk-hu6iWr0A.d.mts} +1 -1
- package/dist/es/{app-DcY6dJiQ.d.mts → app-CakwxQvs.d.mts} +129 -20
- package/dist/es/commands/index.mjs +218 -27
- package/dist/es/commands/templates/app-management/app-config.js.template +2 -2
- package/dist/es/config/index.d.mts +354 -391
- package/dist/es/config/index.mjs +3 -3
- package/dist/es/{config-DGPFTk6w.mjs → config-CcE0EBG7.mjs} +4 -5
- package/dist/es/{index-CCov0odd.d.mts → index-Bo0tQsVq.d.mts} +2 -2
- package/dist/es/management/index.d.mts +3 -3
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-CCsOfniv.mjs → management-BZ4Y6lVp.mjs} +33 -8
- package/dist/{cjs/step-CWYnKbga.d.cts → es/step-D64mMPrt.d.mts} +3 -3
- package/dist/es/{validate-Dn3lLTGj.mjs → validate-Du3LhCre.mjs} +3 -3
- package/dist/es/{webhooks-Dhrkkip7.mjs → webhooks-B5oq9ULL.mjs} +3 -3
- package/package.json +16 -11
- /package/dist/cjs/{chunk-DS2yp5vX.cjs → chunk-Cozy-1ZF.cjs} +0 -0
- /package/dist/es/{error-DHlYzkbb.mjs → error-_RMwtrUA.mjs} +0 -0
- /package/dist/es/{logging-XIUXDK5T.mjs → logging-DbJHXSKh.mjs} +0 -0
- /package/dist/es/{router-BxaxEEu3.mjs → router-D58JJHHA.mjs} +0 -0
- /package/dist/es/{schemas-DOcnD16x.mjs → schemas-hRovglBF.mjs} +0 -0
package/dist/es/config/index.mjs
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUiSdk, i as hasCustomInstallation, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "../webhooks-
|
|
16
|
-
import { a as hasConfigDomain, c as hasBusinessConfigSchema, i as getConfigDomains, n as validateCommerceAppConfigDomain, o as hasMetadata, r as CommerceAppConfigSchemas, s as hasBusinessConfig, t as validateCommerceAppConfig } from "../validate-
|
|
17
|
-
import { d as defineConfig, n as readCommerceAppConfig, r as resolveCommerceAppConfig, t as parseCommerceAppConfig } from "../config-
|
|
15
|
+
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUiSdk, i as hasCustomInstallation, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "../webhooks-B5oq9ULL.mjs";
|
|
16
|
+
import { a as hasConfigDomain, c as hasBusinessConfigSchema, i as getConfigDomains, n as validateCommerceAppConfigDomain, o as hasMetadata, r as CommerceAppConfigSchemas, s as hasBusinessConfig, t as validateCommerceAppConfig } from "../validate-Du3LhCre.mjs";
|
|
17
|
+
import { d as defineConfig, n as readCommerceAppConfig, r as resolveCommerceAppConfig, t as parseCommerceAppConfig } from "../config-CcE0EBG7.mjs";
|
|
18
18
|
|
|
19
19
|
export { CommerceAppConfigSchemas, defineConfig, getConfigDomains, hasAdminUiSdk, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, hasWebhooks, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|
|
@@ -12,14 +12,13 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { t as validateCommerceAppConfig } from "./validate-
|
|
16
|
-
import { t as stringifyError } from "./error-
|
|
15
|
+
import { t as validateCommerceAppConfig } from "./validate-Du3LhCre.mjs";
|
|
16
|
+
import { t as stringifyError } from "./error-_RMwtrUA.mjs";
|
|
17
17
|
import { dirname, join, parse } from "path";
|
|
18
18
|
import { existsSync } from "fs";
|
|
19
19
|
import { access, mkdir, readFile } from "fs/promises";
|
|
20
20
|
import { resolveCommand } from "package-manager-detector";
|
|
21
21
|
import { detect, getUserAgent } from "package-manager-detector/detect";
|
|
22
|
-
import { createJiti } from "jiti";
|
|
23
22
|
|
|
24
23
|
//#region source/config/lib/define.ts
|
|
25
24
|
/**
|
|
@@ -169,7 +168,6 @@ function getInstallCommand(packageManager, packages) {
|
|
|
169
168
|
|
|
170
169
|
//#endregion
|
|
171
170
|
//#region source/config/lib/parser.ts
|
|
172
|
-
const jiti = createJiti(import.meta.url);
|
|
173
171
|
const configPaths = Object.freeze([
|
|
174
172
|
"app.commerce.config.js",
|
|
175
173
|
"app.commerce.config.ts",
|
|
@@ -220,7 +218,8 @@ async function readCommerceAppConfig(cwd = process.cwd()) {
|
|
|
220
218
|
if (!configFilePath) throw new Error("Could not find a commerce app config file in the current working directory or its parents.");
|
|
221
219
|
let config = null;
|
|
222
220
|
try {
|
|
223
|
-
|
|
221
|
+
const { createJiti } = await import("jiti");
|
|
222
|
+
config = await createJiti(import.meta.url).import(configFilePath);
|
|
224
223
|
} catch (error) {
|
|
225
224
|
const message = stringifyError(error);
|
|
226
225
|
throw new Error(`Failed to read commerce app config file at ${configFilePath}: ${message}`, { cause: error });
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { n as CommerceAppConfigOutputModel } from "./app-
|
|
16
|
-
import { f as StepMetaInfo, h as ValidationIssue, i as ExecutionContext, n as BranchStep, o as InstallationContext, p as ValidationContext } from "./step-
|
|
15
|
+
import { n as CommerceAppConfigOutputModel } from "./app-CakwxQvs.mjs";
|
|
16
|
+
import { f as StepMetaInfo, h as ValidationIssue, i as ExecutionContext, n as BranchStep, o as InstallationContext, p as ValidationContext } from "./step-D64mMPrt.mjs";
|
|
17
17
|
|
|
18
18
|
//#region source/management/installation/workflow/types.d.ts
|
|
19
19
|
/** Status of a step execution. */
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { _ as defineBranchStep, a as InferStepOutput, b as isLeafStep, c as LeafStepOptions, d as StepMeta, f as StepMetaInfo, g as ValidationIssueSeverity, h as ValidationIssue, i as ExecutionContext, l as Step, m as ValidationExecutionContext, n as BranchStep, o as InstallationContext, p as ValidationContext, r as BranchStepOptions, s as LeafStep, t as AnyStep, u as StepContextFactory, v as defineLeafStep, y as isBranchStep } from "../step-
|
|
16
|
-
import { A as ExecutionStatus, B as isCompletedState, C as executeUninstallWorkflow, D as StepFailedEvent, E as StepEvent, F as InstallationRetryMetadata, H as isInProgressState, I as InstallationState, L as InstallationStatus, M as InProgressInstallationState, N as InstallationData, O as StepStartedEvent, P as InstallationError, R as StepStatus, S as createRetryState, T as InstallationHooks, U as isSucceededState, V as isFailedState, _ as ValidationSummary, a as RunValidationOptions, b as ExecuteWorkflowOptions, c as runInstallation, d as CustomInstallationStepDefinition, f as CustomInstallationStepHandler, g as ValidationResult, h as ValidateStepTreeOptions, i as RunUninstallationOptions, j as FailedInstallationState, k as StepSucceededEvent, l as runUninstallation, m as StepValidationResult, n as CreateInitialUninstallationStateOptions, o as createInitialInstallationState, p as defineCustomInstallationStep, r as RunInstallationOptions, s as createInitialUninstallationState, t as CreateInitialInstallationStateOptions, u as runValidation, v as validateStepTree, w as executeWorkflow, x as createInitialState, y as CreateInitialStateOptions, z as SucceededInstallationState } from "../index-
|
|
17
|
-
export { AnyStep, BranchStep, BranchStepOptions, CreateInitialInstallationStateOptions, CreateInitialStateOptions, CreateInitialUninstallationStateOptions, CustomInstallationStepDefinition, CustomInstallationStepHandler, ExecuteWorkflowOptions, ExecutionContext, ExecutionStatus, FailedInstallationState, InProgressInstallationState, InferStepOutput, InstallationContext, InstallationData, InstallationError, InstallationHooks, InstallationRetryMetadata, InstallationState, InstallationStatus, LeafStep, LeafStepOptions, RunInstallationOptions, RunUninstallationOptions, RunValidationOptions, Step, StepContextFactory, StepEvent, StepFailedEvent, StepMeta, StepMetaInfo, StepStartedEvent, StepStatus, StepSucceededEvent, StepValidationResult, SucceededInstallationState, ValidateStepTreeOptions, ValidationContext, ValidationExecutionContext, ValidationIssue, ValidationIssueSeverity, ValidationResult, ValidationSummary, createInitialInstallationState, createInitialState, createInitialUninstallationState, createRetryState, defineBranchStep, defineCustomInstallationStep, defineLeafStep, executeUninstallWorkflow, executeWorkflow, isBranchStep, isCompletedState, isFailedState, isInProgressState, isLeafStep, isSucceededState, runInstallation, runUninstallation, runValidation, validateStepTree };
|
|
15
|
+
import { _ as defineBranchStep, a as InferStepOutput, b as isLeafStep, c as LeafStepOptions, d as StepMeta, f as StepMetaInfo, g as ValidationIssueSeverity, h as ValidationIssue, i as ExecutionContext, l as Step, m as ValidationExecutionContext, n as BranchStep, o as InstallationContext, p as ValidationContext, r as BranchStepOptions, s as LeafStep, t as AnyStep, u as StepContextFactory, v as defineLeafStep, y as isBranchStep } from "../step-D64mMPrt.mjs";
|
|
16
|
+
import { A as ExecutionStatus, B as isCompletedState, C as executeUninstallWorkflow, D as StepFailedEvent, E as StepEvent, F as InstallationRetryMetadata, H as isInProgressState, I as InstallationState, L as InstallationStatus, M as InProgressInstallationState, N as InstallationData, O as StepStartedEvent, P as InstallationError, R as StepStatus, S as createRetryState, T as InstallationHooks, U as isSucceededState, V as isFailedState, _ as ValidationSummary, a as RunValidationOptions, b as ExecuteWorkflowOptions, c as runInstallation, d as CustomInstallationStepDefinition, f as CustomInstallationStepHandler, g as ValidationResult, h as ValidateStepTreeOptions, i as RunUninstallationOptions, j as FailedInstallationState, k as StepSucceededEvent, l as runUninstallation, m as StepValidationResult, n as CreateInitialUninstallationStateOptions, o as createInitialInstallationState, p as defineCustomInstallationStep, r as RunInstallationOptions, s as createInitialUninstallationState, t as CreateInitialInstallationStateOptions, u as runValidation, v as validateStepTree, w as executeWorkflow, x as createInitialState, y as CreateInitialStateOptions, z as SucceededInstallationState } from "../index-Bo0tQsVq.mjs";
|
|
17
|
+
export { type AnyStep, type BranchStep, type BranchStepOptions, type CreateInitialInstallationStateOptions, type CreateInitialStateOptions, type CreateInitialUninstallationStateOptions, type CustomInstallationStepDefinition, type CustomInstallationStepHandler, type ExecuteWorkflowOptions, type ExecutionContext, type ExecutionStatus, type FailedInstallationState, type InProgressInstallationState, type InferStepOutput, type InstallationContext, type InstallationData, type InstallationError, type InstallationHooks, type InstallationRetryMetadata, type InstallationState, type InstallationStatus, type LeafStep, type LeafStepOptions, type RunInstallationOptions, type RunUninstallationOptions, type RunValidationOptions, type Step, type StepContextFactory, type StepEvent, type StepFailedEvent, type StepMeta, type StepMetaInfo, type StepStartedEvent, type StepStatus, type StepSucceededEvent, type StepValidationResult, type SucceededInstallationState, type ValidateStepTreeOptions, type ValidationContext, type ValidationExecutionContext, type ValidationIssue, type ValidationIssueSeverity, type ValidationResult, type ValidationSummary, createInitialInstallationState, type createInitialState, createInitialUninstallationState, type createRetryState, type defineBranchStep, defineCustomInstallationStep, type defineLeafStep, type executeUninstallWorkflow, type executeWorkflow, type isBranchStep, isCompletedState, isFailedState, isInProgressState, type isLeafStep, isSucceededState, runInstallation, runUninstallation, runValidation, type validateStepTree };
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as runValidation, c as isFailedState, i as runUninstallation, l as isInProgressState, n as createInitialUninstallationState, o as defineCustomInstallationStep, r as runInstallation, s as isCompletedState, t as createInitialInstallationState, u as isSucceededState } from "../management-
|
|
15
|
+
import { a as runValidation, c as isFailedState, i as runUninstallation, l as isInProgressState, n as createInitialUninstallationState, o as defineCustomInstallationStep, r as runInstallation, s as isCompletedState, t as createInitialInstallationState, u as isSucceededState } from "../management-BZ4Y6lVp.mjs";
|
|
16
16
|
|
|
17
17
|
export { createInitialInstallationState, createInitialUninstallationState, defineCustomInstallationStep, isCompletedState, isFailedState, isInProgressState, isSucceededState, runInstallation, runUninstallation, runValidation };
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUiSdk, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "./webhooks-
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
15
|
+
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUiSdk, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "./webhooks-B5oq9ULL.mjs";
|
|
16
|
+
import { t as inspect } from "./logging-DbJHXSKh.mjs";
|
|
17
|
+
import { t as stringifyError } from "./error-_RMwtrUA.mjs";
|
|
18
18
|
import { unwrapHttpError } from "@adobe/aio-commerce-lib-api/utils";
|
|
19
|
-
import
|
|
19
|
+
import * as camelcaseModule from "camelcase";
|
|
20
20
|
import { AdobeCommerceHttpClient, resolveCommerceHttpClientParams, resolveIoEventsHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
21
21
|
import { resolveAuthParams, resolveImsAuthParams } from "@adobe/aio-commerce-lib-auth";
|
|
22
22
|
import { createCustomCommerceEventsApiClient, createEventProvider, createEventSubscription, deleteEventProvider, deleteEventSubscription, getAllEventProviders, getAllEventSubscriptions, updateEventingConfiguration } from "@adobe/aio-commerce-lib-events/commerce";
|
|
@@ -453,6 +453,7 @@ function aggregateSummary(result) {
|
|
|
453
453
|
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region source/management/installation/custom-installation/custom-scripts.ts
|
|
456
|
+
const camelcase = camelcaseModule.default.default ?? camelcaseModule.default;
|
|
456
457
|
function isCustomInstallationStepDefinition(obj) {
|
|
457
458
|
return typeof obj === "object" && obj !== null && "install" in obj && typeof obj.install === "function";
|
|
458
459
|
}
|
|
@@ -766,15 +767,37 @@ function getNamespacedEvent(metadata, name) {
|
|
|
766
767
|
function getIoEventCode(name, providerType) {
|
|
767
768
|
return providerType === "dx_commerce_events" ? `com.adobe.commerce.${name}` : name;
|
|
768
769
|
}
|
|
770
|
+
/** Maps a provider's metadata type to its human-readable label ("Commerce" or "External"). */
|
|
771
|
+
function getProviderTypeLabel(provider) {
|
|
772
|
+
return PROVIDER_TYPE_TO_LABEL[provider.provider_metadata];
|
|
773
|
+
}
|
|
769
774
|
/**
|
|
770
|
-
* Generates a registration name
|
|
775
|
+
* Generates a registration name based on the provider type, provider label, and runtime action.
|
|
776
|
+
*
|
|
777
|
+
* Prefixes with the provider type label ("Commerce" or "External") for readability, then the
|
|
778
|
+
* provider's own label to ensure uniqueness when multiple providers of the same type route
|
|
779
|
+
* events to the same runtime action.
|
|
780
|
+
*
|
|
771
781
|
* @param provider - The provider this registration is associated to.
|
|
772
782
|
* @param runtimeAction - The runtime action this registration points to.
|
|
773
783
|
*/
|
|
774
784
|
function getRegistrationName(provider, runtimeAction) {
|
|
775
|
-
const providerLabel = PROVIDER_TYPE_TO_LABEL[provider.provider_metadata];
|
|
776
785
|
const [packageName, actionName] = runtimeAction.split("/").map(kebabToTitleCase);
|
|
777
|
-
return `${
|
|
786
|
+
return `${getProviderTypeLabel(provider)} Event Registration: ${provider.label} - ${actionName} (${packageName})`;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Returns the registration name in the legacy format used by SDK versions that built
|
|
790
|
+
* the name from the generic provider type label ("Commerce" / "External") rather than
|
|
791
|
+
* the provider's own label. Used during uninstall to match registrations that were
|
|
792
|
+
* created before the naming change.
|
|
793
|
+
*
|
|
794
|
+
* @param provider - The provider this registration is associated to.
|
|
795
|
+
* @param runtimeAction - The runtime action this registration points to.
|
|
796
|
+
* @deprecated Use {@link getRegistrationName} for all new registrations.
|
|
797
|
+
*/
|
|
798
|
+
function getLegacyRegistrationName(provider, runtimeAction) {
|
|
799
|
+
const [packageName, actionName] = runtimeAction.split("/").map(kebabToTitleCase);
|
|
800
|
+
return `${getProviderTypeLabel(provider)} Event Registration: ${actionName} (${packageName})`;
|
|
778
801
|
}
|
|
779
802
|
/**
|
|
780
803
|
* Generates a registration name and description based on the provider, events, and runtime action.
|
|
@@ -1149,6 +1172,7 @@ async function createCommerceEventSubscription(params) {
|
|
|
1149
1172
|
name: eventName,
|
|
1150
1173
|
parent: event.config.name,
|
|
1151
1174
|
fields: event.config.fields,
|
|
1175
|
+
rules: event.config.rules,
|
|
1152
1176
|
provider_id: provider.id,
|
|
1153
1177
|
destination: event.config.destination,
|
|
1154
1178
|
hipaa_audit_required: event.config.hipaa_audit_required,
|
|
@@ -1273,7 +1297,8 @@ async function deleteIoEventRegistrations(providerData, provider, events, regist
|
|
|
1273
1297
|
workspaceId: appData.workspaceId
|
|
1274
1298
|
};
|
|
1275
1299
|
const actionEventsMap = groupEventsByRuntimeActions(events);
|
|
1276
|
-
const
|
|
1300
|
+
const runtimeActions = Array.from(actionEventsMap.keys());
|
|
1301
|
+
const registrationNames = new Set([...runtimeActions.map((runtimeAction) => getRegistrationName(providerData, runtimeAction)), ...runtimeActions.map((runtimeAction) => getLegacyRegistrationName(providerData, runtimeAction))]);
|
|
1277
1302
|
const providerRegistrations = registrations.filter((reg) => reg.client_id === runtimeParams.AIO_COMMERCE_AUTH_IMS_CLIENT_ID && registrationNames.has(reg.name));
|
|
1278
1303
|
if (providerRegistrations.length === 0) {
|
|
1279
1304
|
logger.info(`No I/O Events registrations found for provider "${provider.label}" (instance ID: "${providerData.instance_id}").`);
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { n as CommerceAppConfigOutputModel } from "./app-
|
|
16
|
-
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
17
|
-
import * as v from "valibot";
|
|
15
|
+
import { n as CommerceAppConfigOutputModel } from "./app-CakwxQvs.mjs";
|
|
18
16
|
import AioLogger from "@adobe/aio-lib-core-logging";
|
|
17
|
+
import * as v from "valibot";
|
|
18
|
+
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
19
19
|
|
|
20
20
|
//#region source/management/installation/schema.d.ts
|
|
21
21
|
/** Schema for validating Adobe I/O app credentials required for installation. */
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { t as alphaNumericOrHyphenSchema } from "./schemas-
|
|
16
|
-
import { a as hasCustomInstallationSteps, d as hasAdminUiSdk, i as hasCustomInstallation, l as hasExternalEvents, n as hasWebhooks, o as EventingSchema, r as InstallationSchema, s as hasCommerceEvents, t as WebhooksSchema, u as AdminUiSdkSchema } from "./webhooks-
|
|
15
|
+
import { t as alphaNumericOrHyphenSchema } from "./schemas-hRovglBF.mjs";
|
|
16
|
+
import { a as hasCustomInstallationSteps, d as hasAdminUiSdk, i as hasCustomInstallation, l as hasExternalEvents, n as hasWebhooks, o as EventingSchema, r as InstallationSchema, s as hasCommerceEvents, t as WebhooksSchema, u as AdminUiSdkSchema } from "./webhooks-B5oq9ULL.mjs";
|
|
17
|
+
import { SchemaBusinessConfig } from "@adobe/aio-commerce-lib-config";
|
|
17
18
|
import { CommerceSdkValidationError } from "@adobe/aio-commerce-lib-core/error";
|
|
18
19
|
import * as v from "valibot";
|
|
19
|
-
import { SchemaBusinessConfig } from "@adobe/aio-commerce-lib-config";
|
|
20
20
|
|
|
21
21
|
//#region source/config/schema/business-configuration.ts
|
|
22
22
|
/**
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as stringValueSchema, i as positiveNumberValueSchema, n as booleanValueSchema, r as nonEmptyStringValueSchema, t as alphaNumericOrHyphenSchema } from "./schemas-
|
|
15
|
+
import { a as stringValueSchema, i as positiveNumberValueSchema, n as booleanValueSchema, r as nonEmptyStringValueSchema, t as alphaNumericOrHyphenSchema } from "./schemas-hRovglBF.mjs";
|
|
16
16
|
import * as v from "valibot";
|
|
17
17
|
|
|
18
18
|
//#region source/config/schema/admin-ui-sdk.ts
|
|
@@ -292,8 +292,8 @@ const ExternalEventSourceSchema = v.object({
|
|
|
292
292
|
});
|
|
293
293
|
/** Schema for eventing configuration with separate commerce and external arrays */
|
|
294
294
|
const EventingSchema = v.object({
|
|
295
|
-
commerce: v.optional(v.array(CommerceEventSourceSchema, "Expected an array of Commerce event sources")),
|
|
296
|
-
external: v.optional(v.array(ExternalEventSourceSchema, "Expected an array of external event sources"))
|
|
295
|
+
commerce: v.optional(v.pipe(v.array(CommerceEventSourceSchema, "Expected an array of Commerce event sources"), v.check((sources) => new Set(sources.map((s) => s.provider.label)).size === sources.length, "Commerce provider labels must be unique"))),
|
|
296
|
+
external: v.optional(v.pipe(v.array(ExternalEventSourceSchema, "Expected an array of external event sources"), v.check((sources) => new Set(sources.map((s) => s.provider.label)).size === sources.length, "External provider labels must be unique")))
|
|
297
297
|
});
|
|
298
298
|
/**
|
|
299
299
|
* Check if config has commerce event sources.
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "@adobe/aio-commerce-lib-app",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"author": "Adobe Inc.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.6.0",
|
|
6
6
|
"private": false,
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=22 <=24"
|
|
9
9
|
},
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"description": "App configuration management library for Adobe Commerce applications",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"bin": {
|
|
32
32
|
"aio-commerce-lib-app": "./bin/cli.mjs"
|
|
33
33
|
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"registry": "https://registry.npmjs.org",
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
34
38
|
"exports": {
|
|
35
39
|
"./actions/*": {
|
|
36
40
|
"import": {
|
|
@@ -82,10 +86,11 @@
|
|
|
82
86
|
"@adobe/aio-lib-files": "^4.1.2",
|
|
83
87
|
"@adobe/aio-lib-ims": "^8.1.1",
|
|
84
88
|
"@adobe/aio-lib-state": "^5.3.1",
|
|
85
|
-
"@npmcli/package-json": "^
|
|
89
|
+
"@npmcli/package-json": "^8.0.0",
|
|
86
90
|
"camelcase": "^9.0.0",
|
|
87
91
|
"consola": "^3.4.2",
|
|
88
92
|
"dotenv": "^17.2.3",
|
|
93
|
+
"esbuild": "^0.28.0",
|
|
89
94
|
"jiti": "^2.6.1",
|
|
90
95
|
"ky": "^1.9.0",
|
|
91
96
|
"openwhisk": "^3.21.8",
|
|
@@ -96,23 +101,23 @@
|
|
|
96
101
|
"type-fest": "^5.0.0",
|
|
97
102
|
"valibot": "^1.1.0",
|
|
98
103
|
"yaml": "^2.8.1",
|
|
99
|
-
"@adobe/aio-commerce-lib-api": "1.1
|
|
100
|
-
"@adobe/aio-commerce-lib-auth": "1.
|
|
101
|
-
"@adobe/aio-commerce-lib-config": "1.
|
|
102
|
-
"@adobe/aio-commerce-lib-core": "1.
|
|
103
|
-
"@adobe/aio-commerce-lib-events": "1.
|
|
104
|
-
"@adobe/aio-commerce-lib-webhooks": "1.
|
|
104
|
+
"@adobe/aio-commerce-lib-api": "1.2.1",
|
|
105
|
+
"@adobe/aio-commerce-lib-auth": "1.1.1",
|
|
106
|
+
"@adobe/aio-commerce-lib-config": "1.5.0",
|
|
107
|
+
"@adobe/aio-commerce-lib-core": "1.1.1",
|
|
108
|
+
"@adobe/aio-commerce-lib-events": "1.2.1",
|
|
109
|
+
"@adobe/aio-commerce-lib-webhooks": "1.1.1"
|
|
105
110
|
},
|
|
106
111
|
"devDependencies": {
|
|
107
112
|
"@types/npmcli__package-json": "^4.0.4",
|
|
108
113
|
"msw": "^2.11.1",
|
|
109
114
|
"typescript": "^6.0.0",
|
|
110
|
-
"@aio-commerce-sdk/common-utils": "0.2.
|
|
115
|
+
"@aio-commerce-sdk/common-utils": "0.2.5",
|
|
111
116
|
"@aio-commerce-sdk/config-tsdown": "1.0.1",
|
|
112
117
|
"@aio-commerce-sdk/config-typedoc": "1.0.0",
|
|
113
118
|
"@aio-commerce-sdk/config-typescript": "1.0.0",
|
|
114
119
|
"@aio-commerce-sdk/config-vitest": "1.0.0",
|
|
115
|
-
"@aio-commerce-sdk/scripting-utils": "0.3.
|
|
120
|
+
"@aio-commerce-sdk/scripting-utils": "0.3.3",
|
|
116
121
|
"@aio-commerce-sdk/scripts": "0.1.0"
|
|
117
122
|
},
|
|
118
123
|
"sideEffects": false,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|