@adobe/aio-commerce-lib-app 2.0.0 → 2.1.0-alpha-20260923164312
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 +10 -0
- package/README.md +4 -0
- package/dist/cjs/actions/app-config/index.cjs +3 -3
- package/dist/cjs/actions/association/index.cjs +1 -1
- package/dist/cjs/actions/config/index.cjs +1 -1
- package/dist/cjs/actions/installation/index.cjs +4 -4
- package/dist/cjs/actions/scope-tree/index.cjs +4 -3
- package/dist/cjs/cli/index.cjs +447 -0
- package/dist/cjs/cli/index.d.cts +40 -0
- package/dist/cjs/commands/index.cjs +73 -1717
- package/dist/cjs/{common-VSsQEHDv.cjs → common-B3KrOG-h.cjs} +1 -1
- package/dist/cjs/config/index.node.cjs +3 -3
- package/dist/{es/logging-CXesop3u.mjs → cjs/constants-tQUzmimN.cjs} +6 -18
- package/dist/cjs/{index.node-vcOo1rt0.cjs → index.node-De5ENMF8.cjs} +2 -2
- package/dist/cjs/{logging-Br3xfBNe.cjs → logging-QTsrSwPc.cjs} +0 -16
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/{management-Bki3hlxL.cjs → management-DplOGozL.cjs} +11 -10
- package/dist/cjs/{validate-CwWYtRsS.cjs → validate-DkmBVWFX.cjs} +1 -1
- package/dist/cjs/web-src-DvGBiJI5.cjs +1521 -0
- package/dist/cjs/{webhooks-Bcq2Qy7q.cjs → webhooks-zXjrg32x.cjs} +57 -57
- package/dist/es/actions/app-config/index.mjs +3 -3
- package/dist/es/actions/association/index.mjs +1 -1
- package/dist/es/actions/config/index.mjs +1 -1
- package/dist/es/actions/installation/index.mjs +4 -4
- package/dist/es/actions/scope-tree/index.mjs +3 -2
- package/dist/es/cli/index.d.mts +40 -0
- package/dist/es/cli/index.mjs +435 -0
- package/dist/es/commands/index.mjs +29 -1666
- package/dist/es/{common-dy6NrZt8.mjs → common-BWUDGasu.mjs} +1 -1
- package/dist/es/config/index.node.mjs +3 -3
- package/dist/es/constants-CSQsZaDP.mjs +25 -0
- package/dist/es/{index.node-CW46zuxW.mjs → index.node-C5D5IzSs.mjs} +2 -2
- package/dist/es/logging-DbJHXSKh.mjs +32 -0
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-DgwAhaaJ.mjs → management-YDkb15SJ.mjs} +6 -5
- package/dist/es/{validate-NzW1FQwL.mjs → validate-Pd7RIA_3.mjs} +1 -1
- package/dist/es/web-src-CLEUvMl7.mjs +1345 -0
- package/dist/es/{webhooks-CHZ1SXxw.mjs → webhooks-BMBfTqwi.mjs} +58 -58
- package/package.json +11 -1
- /package/dist/cjs/{commands/templates → templates}/admin-ui/tsconfig.json +0 -0
- /package/dist/cjs/{commands/templates → templates}/admin-ui/web-src/.babelrc +0 -0
- /package/dist/cjs/{commands/templates → templates}/admin-ui/web-src/index.css +0 -0
- /package/dist/cjs/{commands/templates → templates}/admin-ui/web-src/index.html +0 -0
- /package/dist/cjs/{commands/templates → templates}/admin-ui/web-src/src/app.jsx +0 -0
- /package/dist/cjs/{commands/templates → templates}/admin-ui/web-src/src/components/welcome.jsx +0 -0
- /package/dist/cjs/{commands/templates → templates}/admin-ui/web-src/src/pages/main-page.jsx +0 -0
- /package/dist/cjs/{commands/templates → templates}/admin-ui/web-src-template.d.ts +0 -0
- /package/dist/cjs/{commands/templates → templates}/app-management/app-config.js.template +0 -0
- /package/dist/cjs/{commands/templates → templates}/app-management/association.js.template +0 -0
- /package/dist/cjs/{commands/templates → templates}/app-management/custom-scripts.js.template +0 -0
- /package/dist/cjs/{commands/templates → templates}/app-management/installation.js.template +0 -0
- /package/dist/cjs/{commands/templates → templates}/business-configuration/config.js.template +0 -0
- /package/dist/cjs/{commands/templates → templates}/business-configuration/scope-tree.js.template +0 -0
- /package/dist/cjs/{commands/templates → templates}/typescript/webpack-config.cjs +0 -0
- /package/dist/es/{commands/templates → templates}/admin-ui/tsconfig.json +0 -0
- /package/dist/es/{commands/templates → templates}/admin-ui/web-src/.babelrc +0 -0
- /package/dist/es/{commands/templates → templates}/admin-ui/web-src/index.css +0 -0
- /package/dist/es/{commands/templates → templates}/admin-ui/web-src/index.html +0 -0
- /package/dist/es/{commands/templates → templates}/admin-ui/web-src/src/app.jsx +0 -0
- /package/dist/es/{commands/templates → templates}/admin-ui/web-src/src/components/welcome.jsx +0 -0
- /package/dist/es/{commands/templates → templates}/admin-ui/web-src/src/pages/main-page.jsx +0 -0
- /package/dist/es/{commands/templates → templates}/admin-ui/web-src-template.d.ts +0 -0
- /package/dist/es/{commands/templates → templates}/app-management/app-config.js.template +0 -0
- /package/dist/es/{commands/templates → templates}/app-management/association.js.template +0 -0
- /package/dist/es/{commands/templates → templates}/app-management/custom-scripts.js.template +0 -0
- /package/dist/es/{commands/templates → templates}/app-management/installation.js.template +0 -0
- /package/dist/es/{commands/templates → templates}/business-configuration/config.js.template +0 -0
- /package/dist/es/{commands/templates → templates}/business-configuration/scope-tree.js.template +0 -0
- /package/dist/es/{commands/templates → templates}/typescript/webpack-config.cjs +0 -0
|
@@ -20,6 +20,60 @@ let _adobe_aio_commerce_lib_admin_ui_api = require("@adobe/aio-commerce-lib-admi
|
|
|
20
20
|
let _adobe_aio_commerce_lib_admin_ui_menu = require("@adobe/aio-commerce-lib-admin-ui/menu");
|
|
21
21
|
let _adobe_aio_commerce_lib_core_commerce = require("@adobe/aio-commerce-lib-core/commerce");
|
|
22
22
|
|
|
23
|
+
//#region source/config/schema/installation.ts
|
|
24
|
+
const MAX_DESCRIPTION_LENGTH$1 = 255;
|
|
25
|
+
const MAX_NAME_LENGTH = 255;
|
|
26
|
+
const MAX_MESSAGE_LENGTH = 1e3;
|
|
27
|
+
/**
|
|
28
|
+
* Regex for script paths that can be relative or absolute.
|
|
29
|
+
* Must end with a .js or .ts extension
|
|
30
|
+
* Examples:
|
|
31
|
+
* - "./scripts/setup.js"
|
|
32
|
+
* - "./setup.ts"
|
|
33
|
+
* - "../../scripts/setup.js"
|
|
34
|
+
*/
|
|
35
|
+
const SCRIPT_PATH_REGEX = /^(?:\.{0,2}\/)*(?:[\w-]+\/)*[\w-]+\.(?:js|ts)$/;
|
|
36
|
+
/**
|
|
37
|
+
* Schema for custom installation step configuration
|
|
38
|
+
*/
|
|
39
|
+
const CustomInstallationStepSchema = valibot.object({
|
|
40
|
+
description: valibot.pipe(require_schemas.nonEmptyStringValueSchema("step description"), valibot.maxLength(MAX_DESCRIPTION_LENGTH$1, `The step description must not be longer than ${MAX_DESCRIPTION_LENGTH$1} characters`)),
|
|
41
|
+
name: valibot.pipe(require_schemas.nonEmptyStringValueSchema("step name"), valibot.maxLength(MAX_NAME_LENGTH, `The step name must not be longer than ${MAX_NAME_LENGTH} characters`)),
|
|
42
|
+
script: valibot.pipe(require_schemas.nonEmptyStringValueSchema("script path"), valibot.regex(SCRIPT_PATH_REGEX, "Script path must end with .js or .ts (e.g., \"./setup.js\", \"./scripts/setup.ts\", or \"../../scripts/setup.js\")"))
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Schema for installation messages configuration
|
|
46
|
+
*/
|
|
47
|
+
const MessagesSchema = valibot.object({
|
|
48
|
+
postInstallation: valibot.optional(valibot.pipe(require_schemas.nonEmptyStringValueSchema("postInstallation message"), valibot.maxLength(MAX_MESSAGE_LENGTH, `The postInstallation message must not be longer than ${MAX_MESSAGE_LENGTH} characters`))),
|
|
49
|
+
preInstallation: valibot.optional(valibot.pipe(require_schemas.nonEmptyStringValueSchema("preInstallation message"), valibot.maxLength(MAX_MESSAGE_LENGTH, `The preInstallation message must not be longer than ${MAX_MESSAGE_LENGTH} characters`)))
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Schema for installation configuration
|
|
53
|
+
*/
|
|
54
|
+
const InstallationSchema = valibot.object({
|
|
55
|
+
customInstallationSteps: valibot.pipe(valibot.optional(valibot.array(CustomInstallationStepSchema, "Expected an array of custom installation steps")), valibot.check((input) => {
|
|
56
|
+
const steps = input || [];
|
|
57
|
+
return new Set(steps.map((step) => step.name)).size === steps.length;
|
|
58
|
+
}, "Duplicate step names detected in custom installation steps. Each step must have a unique name.")),
|
|
59
|
+
messages: valibot.optional(MessagesSchema)
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Check if config has custom installation settings.
|
|
63
|
+
* @param config - The configuration to check.
|
|
64
|
+
*/
|
|
65
|
+
function hasCustomInstallation(config) {
|
|
66
|
+
return config.installation !== void 0;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if config has custom installation steps.
|
|
70
|
+
* @param config - The configuration to check.
|
|
71
|
+
*/
|
|
72
|
+
function hasCustomInstallationSteps(config) {
|
|
73
|
+
return Array.isArray(config?.installation?.customInstallationSteps) && config.installation.customInstallationSteps.length > 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
23
77
|
//#region source/config/schema/admin-ui.ts
|
|
24
78
|
/**
|
|
25
79
|
* Whether the given items have distinct ids once Commerce sanitizes them into resource ids.
|
|
@@ -229,7 +283,7 @@ function hasAdminUi(config) {
|
|
|
229
283
|
|
|
230
284
|
//#endregion
|
|
231
285
|
//#region source/config/schema/eventing.ts
|
|
232
|
-
const MAX_DESCRIPTION_LENGTH
|
|
286
|
+
const MAX_DESCRIPTION_LENGTH = 255;
|
|
233
287
|
const MAX_LABEL_LENGTH = 100;
|
|
234
288
|
const MAX_KEY_LENGTH = 50;
|
|
235
289
|
const MAX_EVENT_NAME_LENGTH = 180;
|
|
@@ -298,13 +352,13 @@ function commerceEventFieldSchema() {
|
|
|
298
352
|
}
|
|
299
353
|
/** Schema for event provider configuration */
|
|
300
354
|
const ProviderSchema = valibot.object({
|
|
301
|
-
description: valibot.pipe(require_schemas.nonEmptyStringValueSchema("provider description"), ioEventsTextSchema("Provider description"), valibot.maxLength(MAX_DESCRIPTION_LENGTH
|
|
355
|
+
description: valibot.pipe(require_schemas.nonEmptyStringValueSchema("provider description"), ioEventsTextSchema("Provider description"), valibot.maxLength(MAX_DESCRIPTION_LENGTH, `The provider description must not be longer than ${MAX_DESCRIPTION_LENGTH} characters`)),
|
|
302
356
|
key: valibot.optional(valibot.pipe(require_schemas.alphaNumericOrHyphenSchema("provider key"), valibot.maxLength(MAX_KEY_LENGTH, `The provider key must not be longer than ${MAX_KEY_LENGTH} characters`))),
|
|
303
357
|
label: valibot.pipe(require_schemas.nonEmptyStringValueSchema("provider label"), ioEventsTextSchema("Provider label"), valibot.maxLength(MAX_LABEL_LENGTH, `The provider label must not be longer than ${MAX_LABEL_LENGTH} characters`))
|
|
304
358
|
});
|
|
305
359
|
/** Schema for base shared properties between event types. */
|
|
306
360
|
const BaseEventSchema = valibot.object({
|
|
307
|
-
description: valibot.pipe(require_schemas.nonEmptyStringValueSchema("event description"), ioEventsTextSchema("Event description"), valibot.maxLength(MAX_DESCRIPTION_LENGTH
|
|
361
|
+
description: valibot.pipe(require_schemas.nonEmptyStringValueSchema("event description"), ioEventsTextSchema("Event description"), valibot.maxLength(MAX_DESCRIPTION_LENGTH, `The event description must not be longer than ${MAX_DESCRIPTION_LENGTH} characters`)),
|
|
308
362
|
env: valibot.optional(_adobe_aio_commerce_lib_core_commerce.CommerceEnvArraySchema),
|
|
309
363
|
label: valibot.pipe(require_schemas.nonEmptyStringValueSchema("event label"), ioEventsTextSchema("Event label"), valibot.maxLength(MAX_LABEL_LENGTH, `The event label must not be longer than ${MAX_LABEL_LENGTH} characters`)),
|
|
310
364
|
runtimeActions: valibot.array(valibot.pipe(require_schemas.nonEmptyStringValueSchema("runtime action"), valibot.regex(/^[a-z0-9-]+\/[a-z0-9-]+$/i, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")")), "Expected an array of runtime actions in the format <package>/<action>")
|
|
@@ -382,60 +436,6 @@ function hasEventing(config) {
|
|
|
382
436
|
return config.eventing !== void 0;
|
|
383
437
|
}
|
|
384
438
|
|
|
385
|
-
//#endregion
|
|
386
|
-
//#region source/config/schema/installation.ts
|
|
387
|
-
const MAX_DESCRIPTION_LENGTH = 255;
|
|
388
|
-
const MAX_NAME_LENGTH = 255;
|
|
389
|
-
const MAX_MESSAGE_LENGTH = 1e3;
|
|
390
|
-
/**
|
|
391
|
-
* Regex for script paths that can be relative or absolute.
|
|
392
|
-
* Must end with a .js or .ts extension
|
|
393
|
-
* Examples:
|
|
394
|
-
* - "./scripts/setup.js"
|
|
395
|
-
* - "./setup.ts"
|
|
396
|
-
* - "../../scripts/setup.js"
|
|
397
|
-
*/
|
|
398
|
-
const SCRIPT_PATH_REGEX = /^(?:\.{0,2}\/)*(?:[\w-]+\/)*[\w-]+\.(?:js|ts)$/;
|
|
399
|
-
/**
|
|
400
|
-
* Schema for custom installation step configuration
|
|
401
|
-
*/
|
|
402
|
-
const CustomInstallationStepSchema = valibot.object({
|
|
403
|
-
description: valibot.pipe(require_schemas.nonEmptyStringValueSchema("step description"), valibot.maxLength(MAX_DESCRIPTION_LENGTH, `The step description must not be longer than ${MAX_DESCRIPTION_LENGTH} characters`)),
|
|
404
|
-
name: valibot.pipe(require_schemas.nonEmptyStringValueSchema("step name"), valibot.maxLength(MAX_NAME_LENGTH, `The step name must not be longer than ${MAX_NAME_LENGTH} characters`)),
|
|
405
|
-
script: valibot.pipe(require_schemas.nonEmptyStringValueSchema("script path"), valibot.regex(SCRIPT_PATH_REGEX, "Script path must end with .js or .ts (e.g., \"./setup.js\", \"./scripts/setup.ts\", or \"../../scripts/setup.js\")"))
|
|
406
|
-
});
|
|
407
|
-
/**
|
|
408
|
-
* Schema for installation messages configuration
|
|
409
|
-
*/
|
|
410
|
-
const MessagesSchema = valibot.object({
|
|
411
|
-
postInstallation: valibot.optional(valibot.pipe(require_schemas.nonEmptyStringValueSchema("postInstallation message"), valibot.maxLength(MAX_MESSAGE_LENGTH, `The postInstallation message must not be longer than ${MAX_MESSAGE_LENGTH} characters`))),
|
|
412
|
-
preInstallation: valibot.optional(valibot.pipe(require_schemas.nonEmptyStringValueSchema("preInstallation message"), valibot.maxLength(MAX_MESSAGE_LENGTH, `The preInstallation message must not be longer than ${MAX_MESSAGE_LENGTH} characters`)))
|
|
413
|
-
});
|
|
414
|
-
/**
|
|
415
|
-
* Schema for installation configuration
|
|
416
|
-
*/
|
|
417
|
-
const InstallationSchema = valibot.object({
|
|
418
|
-
customInstallationSteps: valibot.pipe(valibot.optional(valibot.array(CustomInstallationStepSchema, "Expected an array of custom installation steps")), valibot.check((input) => {
|
|
419
|
-
const steps = input || [];
|
|
420
|
-
return new Set(steps.map((step) => step.name)).size === steps.length;
|
|
421
|
-
}, "Duplicate step names detected in custom installation steps. Each step must have a unique name.")),
|
|
422
|
-
messages: valibot.optional(MessagesSchema)
|
|
423
|
-
});
|
|
424
|
-
/**
|
|
425
|
-
* Check if config has custom installation settings.
|
|
426
|
-
* @param config - The configuration to check.
|
|
427
|
-
*/
|
|
428
|
-
function hasCustomInstallation(config) {
|
|
429
|
-
return config.installation !== void 0;
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* Check if config has custom installation steps.
|
|
433
|
-
* @param config - The configuration to check.
|
|
434
|
-
*/
|
|
435
|
-
function hasCustomInstallationSteps(config) {
|
|
436
|
-
return Array.isArray(config?.installation?.customInstallationSteps) && config.installation.customInstallationSteps.length > 0;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region source/config/schema/webhooks.ts
|
|
441
441
|
/** Schema for webhook field configuration (name and optional source). */
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { n as filterAppConfigByEnv } from "../../environment-C84BPRJZ.mjs";
|
|
16
|
-
import { i as requiresInstallationFromDomains, o as getConfigDomains, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../../validate-
|
|
16
|
+
import { i as requiresInstallationFromDomains, o as getConfigDomains, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../../validate-Pd7RIA_3.mjs";
|
|
17
17
|
import { n as logger, t as HttpActionRouter } from "../../router-BshIPAR1.mjs";
|
|
18
18
|
import { resolveBusinessConfigSchema } from "@adobe/aio-commerce-lib-config";
|
|
19
|
+
import { internalServerError, ok } from "@adobe/aio-commerce-lib-core/responses";
|
|
19
20
|
import * as v from "valibot";
|
|
20
21
|
import { CommerceEnvSchema } from "@adobe/aio-commerce-lib-core/commerce";
|
|
21
|
-
import { internalServerError, ok } from "@adobe/aio-commerce-lib-core/responses";
|
|
22
22
|
import { createHash } from "crypto";
|
|
23
23
|
|
|
24
24
|
//#region source/actions/app-config/openapi.ts
|
|
@@ -77,7 +77,7 @@ function pruneUnusedTags(spec) {
|
|
|
77
77
|
* @param domains - The active config domains.
|
|
78
78
|
*/
|
|
79
79
|
function getOpenApiCacheKey(domains) {
|
|
80
|
-
const input = `2.
|
|
80
|
+
const input = `2.1.0-alpha-20260923164312:${[...domains].sort().join(",")}:3.0.0`;
|
|
81
81
|
return createHash("sha256").update(input).digest("hex").slice(0, 8);
|
|
82
82
|
}
|
|
83
83
|
/** Returns the server URL to be set in the OpenAPI spec, based on the current namespace. */
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
import { r as setAssociationData, t as clearAssociationData } from "../../repository-BGmy0YeZ.mjs";
|
|
16
16
|
import { n as logger, t as HttpActionRouter } from "../../router-BshIPAR1.mjs";
|
|
17
|
+
import { noContent } from "@adobe/aio-commerce-lib-core/responses";
|
|
17
18
|
import * as v from "valibot";
|
|
18
19
|
import { CommerceEnvSchema } from "@adobe/aio-commerce-lib-core/commerce";
|
|
19
|
-
import { noContent } from "@adobe/aio-commerce-lib-core/responses";
|
|
20
20
|
|
|
21
21
|
//#region source/actions/association/schema.ts
|
|
22
22
|
/** Request body for POST / — store association data. */
|
|
@@ -16,9 +16,9 @@ import { r as nonEmptyStringValueSchema } from "../../schemas-hRovglBF.mjs";
|
|
|
16
16
|
import { r as filterSchemaByEnv } from "../../environment-C84BPRJZ.mjs";
|
|
17
17
|
import { n as logger, t as HttpActionRouter } from "../../router-BshIPAR1.mjs";
|
|
18
18
|
import { byScopeId, getConfiguration, initialize, setConfiguration } from "@adobe/aio-commerce-lib-config";
|
|
19
|
+
import { ok } from "@adobe/aio-commerce-lib-core/responses";
|
|
19
20
|
import * as v from "valibot";
|
|
20
21
|
import { CommerceEnvSchema } from "@adobe/aio-commerce-lib-core/commerce";
|
|
21
|
-
import { ok } from "@adobe/aio-commerce-lib-core/responses";
|
|
22
22
|
|
|
23
23
|
//#region source/actions/config/schema.ts
|
|
24
24
|
const AcceptedConfigurationValuesSchema = v.union([
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { n as getAssociationData } from "../../repository-BGmy0YeZ.mjs";
|
|
16
|
+
import { _ as CURRENT_STATE_KEY, a as buildWorkflowParams, b as requireCurrentAttempt, c as createLifecyclePersistence, d as getExecutedCustomInstallationSteps, f as getStorageKey, g as getCurrentLifecycleBaseline, h as createOrchestrationStateStore, i as buildLifecycleContext, l as createLifecycleRuntime, m as readStateFromStore, o as createInstallationHooks, p as isPostAppDeployInvocation, s as createInstallationStore, t as DEFAULT_ACTION_NAME, u as createUninstallationStore, v as normalizeExpiredAttempt, x as requireState, y as readOrInitializeState } from "../../common-BWUDGasu.mjs";
|
|
17
|
+
import { C as callHook, S as isLeafStep, _ as isStepConfigured, a as runValidation, b as setAtPath, d as isSucceededState, f as createRetryState, g as getAtPath, h as createWorkflowError, i as runUninstallation, l as isFailedState, m as createSucceededState, n as createInitialUninstallationState, p as createFailedState, r as runInstallation, t as createInitialInstallationState, u as isInProgressState, v as nowIsoString, x as isBranchStep, y as pathsEqual } from "../../management-YDkb15SJ.mjs";
|
|
16
18
|
import { r as nonEmptyStringValueSchema } from "../../schemas-hRovglBF.mjs";
|
|
17
|
-
import { r as validateRecordedCommerceAppConfig, t as validateCommerceAppConfig } from "../../validate-
|
|
18
|
-
import { _ as CURRENT_STATE_KEY, a as buildWorkflowParams, b as requireCurrentAttempt, c as createLifecyclePersistence, d as getExecutedCustomInstallationSteps, f as getStorageKey, g as getCurrentLifecycleBaseline, h as createOrchestrationStateStore, i as buildLifecycleContext, l as createLifecycleRuntime, m as readStateFromStore, o as createInstallationHooks, p as isPostAppDeployInvocation, s as createInstallationStore, t as DEFAULT_ACTION_NAME, u as createUninstallationStore, v as normalizeExpiredAttempt, x as requireState, y as readOrInitializeState } from "../../common-dy6NrZt8.mjs";
|
|
19
|
-
import { C as callHook, S as isLeafStep, _ as isStepConfigured, a as runValidation, b as setAtPath, d as isSucceededState, f as createRetryState, g as getAtPath, h as createWorkflowError, i as runUninstallation, l as isFailedState, m as createSucceededState, n as createInitialUninstallationState, p as createFailedState, r as runInstallation, t as createInitialInstallationState, u as isInProgressState, v as nowIsoString, x as isBranchStep, y as pathsEqual } from "../../management-DgwAhaaJ.mjs";
|
|
19
|
+
import { r as validateRecordedCommerceAppConfig, t as validateCommerceAppConfig } from "../../validate-Pd7RIA_3.mjs";
|
|
20
20
|
import { n as logger, t as HttpActionRouter } from "../../router-BshIPAR1.mjs";
|
|
21
|
+
import { accepted, badRequest, conflict, internalServerError, noContent, ok } from "@adobe/aio-commerce-lib-core/responses";
|
|
21
22
|
import * as v from "valibot";
|
|
22
23
|
import { CommerceEnvSchema } from "@adobe/aio-commerce-lib-core/commerce";
|
|
23
|
-
import { accepted, badRequest, conflict, internalServerError, noContent, ok } from "@adobe/aio-commerce-lib-core/responses";
|
|
24
24
|
import openwhisk from "openwhisk";
|
|
25
25
|
|
|
26
26
|
//#region source/management/common/workflow/execute.ts
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { r as nonEmptyStringValueSchema } from "../../schemas-hRovglBF.mjs";
|
|
16
|
-
import {
|
|
16
|
+
import { t as LIFECYCLE_HTTP_CLIENT_TIMEOUT_MS } from "../../constants-CSQsZaDP.mjs";
|
|
17
|
+
import { t as inspect } from "../../logging-DbJHXSKh.mjs";
|
|
17
18
|
import { n as logger, t as HttpActionRouter } from "../../router-BshIPAR1.mjs";
|
|
18
19
|
import { resolveCommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
19
20
|
import { getScopeTree, setCustomScopeTree, syncCommerceScopes, unsyncCommerceScopes } from "@adobe/aio-commerce-lib-config";
|
|
21
|
+
import { badRequest, internalServerError, nonAuthoritativeInformation, ok } from "@adobe/aio-commerce-lib-core/responses";
|
|
20
22
|
import * as v from "valibot";
|
|
21
23
|
import { CommerceEnvSchema } from "@adobe/aio-commerce-lib-core/commerce";
|
|
22
|
-
import { badRequest, internalServerError, nonAuthoritativeInformation, ok } from "@adobe/aio-commerce-lib-core/responses";
|
|
23
24
|
|
|
24
25
|
//#region source/actions/scope-tree/schema.ts
|
|
25
26
|
const CustomScopeInputSchema = v.object({
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
//#region source/commands/hooks/pre-app-build.d.ts
|
|
16
|
+
/** The extensions that register a `pre-app-build` hook. */
|
|
17
|
+
type Extension = "extensibility/1" | "configuration/1" | "backend-ui/2";
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region source/cli/index.d.ts
|
|
20
|
+
/**
|
|
21
|
+
* Creates the `pre-app-build` hook for the given extension.
|
|
22
|
+
* @param extension - The extension the hook is registered for.
|
|
23
|
+
*/
|
|
24
|
+
export declare function preAppBuild(extension: Extension): (hookArgs?: unknown) => Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates the `pre-app-run` hook for the given extension.
|
|
27
|
+
* @param extension - The extension the hook is registered for.
|
|
28
|
+
*/
|
|
29
|
+
export declare function preAppRun(extension: Extension): (hookArgs?: unknown) => Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates the `pre-app-dev` hook for the given extension.
|
|
32
|
+
* @param extension - The extension the hook is registered for.
|
|
33
|
+
*/
|
|
34
|
+
export declare function preAppDev(extension: Extension): (hookArgs?: unknown) => Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates the `post-app-deploy` hook for the given extension.
|
|
37
|
+
* @param extension - The extension the hook is registered for.
|
|
38
|
+
*/
|
|
39
|
+
export declare function postAppDeploy(extension: Extension): (hookArgs?: unknown) => Promise<void>;
|
|
40
|
+
//#endregion
|