@adobe/aio-commerce-lib-app 1.8.0 → 1.9.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 +13 -0
- package/dist/cjs/actions/app-config/index.cjs +3 -3
- package/dist/cjs/actions/app-config/index.d.cts +2 -2
- package/dist/cjs/actions/association/index.d.cts +0 -1
- package/dist/cjs/actions/config/index.d.cts +1 -1
- package/dist/cjs/actions/installation/index.cjs +2 -2
- package/dist/cjs/actions/installation/index.d.cts +3 -3
- package/dist/cjs/{app-BwehWeu1.d.cts → app-e4bCHpek.d.cts} +0 -1
- package/dist/cjs/commands/index.cjs +8 -8
- package/dist/cjs/commands/index.d.cts +1 -1
- package/dist/cjs/config/index.browser.d.cts +1 -1
- package/dist/cjs/config/index.node.cjs +3 -3
- package/dist/cjs/config/index.node.d.cts +3 -13
- package/dist/{es/define-DxH1BFia.d.mts → cjs/define-B__VyRtO.d.cts} +1 -2
- package/dist/{es/index-B0XqHwY5.d.mts → cjs/index-DWEigxhy.d.cts} +3 -1
- package/dist/{es/index-DSk-RmwM.d.mts → cjs/index-Ds7AyoNv.d.cts} +139 -64
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.cts +3 -2
- package/dist/cjs/{index.node-BWZuZLgs.cjs → index.node-Bv_FUgST.cjs} +1 -1
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/management/index.d.cts +1 -1
- package/dist/cjs/{management-DEsRVP2L.cjs → management-DmH7fVxy.cjs} +4 -2
- package/dist/cjs/{openapi-C36q3dCZ.cjs → openapi-BzRN5Lc6.cjs} +1 -1
- package/dist/cjs/{utils-DSCmZ_iJ.cjs → utils-CGZGfXuy.cjs} +25 -0
- package/dist/cjs/{validate-C_eCKp21.cjs → validate-Dt0Fdj1L.cjs} +1 -1
- package/dist/cjs/{webhooks-L4DWHSOl.cjs → webhooks-CrHGA-sO.cjs} +0 -2
- package/dist/es/actions/app-config/index.d.mts +2 -2
- package/dist/es/actions/app-config/index.mjs +3 -3
- package/dist/es/actions/association/index.d.mts +0 -1
- package/dist/es/actions/config/index.d.mts +1 -1
- package/dist/es/actions/installation/index.d.mts +3 -3
- package/dist/es/actions/installation/index.mjs +2 -2
- package/dist/es/{app-BwehWeu1.d.mts → app-e4bCHpek.d.mts} +0 -1
- package/dist/es/commands/index.d.mts +1 -1
- package/dist/es/commands/index.mjs +7 -7
- package/dist/es/config/index.browser.d.mts +1 -1
- package/dist/es/config/index.node.d.mts +3 -14
- package/dist/es/config/index.node.mjs +3 -3
- package/dist/{cjs/define-DOqVyexT.d.cts → es/define-BEY_Q6rS.d.mts} +1 -2
- package/dist/{cjs/index-BXm8UbK7.d.cts → es/index-CgsSXApi.d.mts} +4 -1
- package/dist/{cjs/index-B3ISkC54.d.cts → es/index-Dsg4LZde.d.mts} +139 -64
- package/dist/es/index.d.mts +3 -2
- package/dist/es/index.mjs +1 -1
- package/dist/es/{index.node-DuvW9Sha.mjs → index.node-DsJ0QRGh.mjs} +1 -1
- package/dist/es/management/index.d.mts +1 -1
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-D5pmBBec.mjs → management-BpFkwoig.mjs} +4 -2
- package/dist/es/{openapi-BSc2NRd2.mjs → openapi-QEV7W6DH.mjs} +1 -1
- package/dist/es/{utils-_gj8L6eN.mjs → utils-D0O4r9jr.mjs} +20 -1
- package/dist/es/{validate-t0T0F2MF.mjs → validate-yqa8uIyb.mjs} +1 -1
- package/dist/es/{webhooks-D7DExIDM.mjs → webhooks-CVbZOxYS.mjs} +0 -2
- package/package.json +3 -3
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { t as stringifyError } from "../error-_RMwtrUA.mjs";
|
|
17
|
-
import { a as detectPackageManager, c as getPackageDependencyInstallPlan, d as isESM, f as loadPackageJson, h as readPackageJson, i as resolveCommerceAppConfig, l as getProjectInstallCommand, m as mergePackageJsonDependencies, n as parseCommerceAppConfig, o as getExecCommand, p as makeOutputDirFor, r as readCommerceAppConfig, s as getInstallCommand, t as hasNamedCommerceAppConfigExports, u as getProjectRootDirectory } from "../index.node-
|
|
18
|
-
import { a as hasCustomInstallationSteps, d as hasAdminUi } from "../webhooks-
|
|
19
|
-
import { o as getConfigDomains, r as requiresInstallation, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../validate-
|
|
17
|
+
import { a as detectPackageManager, c as getPackageDependencyInstallPlan, d as isESM, f as loadPackageJson, h as readPackageJson, i as resolveCommerceAppConfig, l as getProjectInstallCommand, m as mergePackageJsonDependencies, n as parseCommerceAppConfig, o as getExecCommand, p as makeOutputDirFor, r as readCommerceAppConfig, s as getInstallCommand, t as hasNamedCommerceAppConfigExports, u as getProjectRootDirectory } from "../index.node-DsJ0QRGh.mjs";
|
|
18
|
+
import { a as hasCustomInstallationSteps, d as hasAdminUi } from "../webhooks-CVbZOxYS.mjs";
|
|
19
|
+
import { o as getConfigDomains, r as requiresInstallation, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../validate-yqa8uIyb.mjs";
|
|
20
20
|
import { t as inspect } from "../logging-DbJHXSKh.mjs";
|
|
21
21
|
import { hasDynamicSchema } from "@adobe/aio-commerce-lib-config";
|
|
22
22
|
import { CommerceSdkValidationError } from "@adobe/aio-commerce-lib-core/error";
|
|
23
|
+
import consola$1, { consola } from "consola";
|
|
24
|
+
import { execSync, spawnSync } from "child_process";
|
|
23
25
|
import path, { basename, dirname, extname, join, relative, resolve, sep } from "path";
|
|
24
26
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
25
27
|
import { access, mkdir, readFile, readdir, rm, writeFile } from "fs/promises";
|
|
26
|
-
import consola$1, { consola } from "consola";
|
|
27
|
-
import { execSync, spawnSync } from "child_process";
|
|
28
28
|
import * as prettier from "prettier";
|
|
29
29
|
import { fileURLToPath } from "url";
|
|
30
30
|
import { Document, YAMLMap, YAMLSeq, isMap, isPair, isSeq, parseDocument } from "yaml";
|
|
@@ -223,7 +223,7 @@ const WEB_SOURCE_IMPORT_ALIAS = "#web/*";
|
|
|
223
223
|
const WEB_SOURCE_DEPENDENCIES = [
|
|
224
224
|
{
|
|
225
225
|
name: "@adobe/aio-commerce-lib-admin-ui",
|
|
226
|
-
version: "^0.
|
|
226
|
+
version: "^1.0.0"
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
name: "react",
|
|
@@ -1643,7 +1643,7 @@ async function ensureInstallYaml(domains, cwd = process.cwd()) {
|
|
|
1643
1643
|
|
|
1644
1644
|
//#endregion
|
|
1645
1645
|
//#region source/commands/init/main.ts
|
|
1646
|
-
const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.
|
|
1646
|
+
const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.9.0`];
|
|
1647
1647
|
/** Initialize the project */
|
|
1648
1648
|
async function run(flags, extraOptions) {
|
|
1649
1649
|
consola.start("Initializing app...");
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as CommerceAppConfigSchemas, i as CommerceAppConfigDomain, n as CommerceAppConfig, o as getConfigDomains, r as CommerceAppConfigOutputModel, s as hasConfigDomain, t as AnyCommerceAppConfig } from "../app-
|
|
16
|
-
import { t as defineConfig } from "../define-
|
|
15
|
+
import { a as CommerceAppConfigSchemas, i as CommerceAppConfigDomain, n as CommerceAppConfig, o as getConfigDomains, r as CommerceAppConfigOutputModel, s as hasConfigDomain, t as AnyCommerceAppConfig } from "../app-e4bCHpek.mjs";
|
|
16
|
+
import { t as defineConfig } from "../define-BEY_Q6rS.mjs";
|
|
17
|
+
import "@adobe/aio-commerce-lib-config";
|
|
17
18
|
import * as v from "valibot";
|
|
18
19
|
import { Get } from "type-fest";
|
|
19
|
-
|
|
20
20
|
//#region source/config/lib/parser.d.ts
|
|
21
21
|
/**
|
|
22
22
|
* Try to find (up to the nearest package.json file) the app config file.
|
|
@@ -732,7 +732,6 @@ declare const MenuSchema: v.ObjectSchema<{
|
|
|
732
732
|
/**
|
|
733
733
|
* Schema for the `adminUi` config section.
|
|
734
734
|
* Supports grid column extensions, mass actions, order view buttons, and menu on `commerce/backend-ui/2`.
|
|
735
|
-
* @experimental
|
|
736
735
|
*/
|
|
737
736
|
declare const AdminUiSchema: v.ObjectSchema<{
|
|
738
737
|
readonly customer: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -960,49 +959,40 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
960
959
|
}, undefined>;
|
|
961
960
|
/**
|
|
962
961
|
* The Admin UI configuration for an Adobe Commerce application.
|
|
963
|
-
* @experimental
|
|
964
962
|
*/
|
|
965
963
|
type AdminUiConfiguration = v.InferInput<typeof AdminUiSchema>;
|
|
966
964
|
/**
|
|
967
965
|
* Grid columns registration configuration.
|
|
968
|
-
* @experimental
|
|
969
966
|
*/
|
|
970
967
|
type GridColumns = v.InferInput<typeof GridColumnsSchema>;
|
|
971
968
|
/**
|
|
972
969
|
* A single grid column definition.
|
|
973
|
-
* @experimental
|
|
974
970
|
*/
|
|
975
971
|
type GridColumn = v.InferInput<typeof GridColumnSchema>;
|
|
976
972
|
/**
|
|
977
973
|
* A mass action registration entry (view or worker variant).
|
|
978
|
-
* @experimental
|
|
979
974
|
*/
|
|
980
975
|
type MassAction = v.InferInput<typeof MassActionSchema>;
|
|
981
976
|
/**
|
|
982
977
|
* A view-type mass action.
|
|
983
|
-
* @experimental
|
|
984
978
|
*/
|
|
985
979
|
type ViewMassAction = v.InferInput<typeof ViewMassActionSchema>;
|
|
986
980
|
/**
|
|
987
981
|
* A worker-type mass action.
|
|
988
|
-
* @experimental
|
|
989
982
|
*/
|
|
990
983
|
type WorkerMassAction = v.InferInput<typeof WorkerMassActionSchema>;
|
|
991
984
|
/**
|
|
992
985
|
* An order view button registration entry (v2, `adminUi`).
|
|
993
|
-
* @experimental
|
|
994
986
|
*/
|
|
995
987
|
type OrderViewButton = v.InferInput<typeof OrderViewButtonSchema>;
|
|
996
988
|
/**
|
|
997
989
|
* Inlined notification strings on an `adminUi` registration entry.
|
|
998
|
-
* @experimental
|
|
999
990
|
*/
|
|
1000
991
|
type Notifications = v.InferInput<typeof NotificationsSchema>;
|
|
1001
992
|
/**
|
|
1002
993
|
* Admin UI menu registration configuration.
|
|
1003
994
|
* Includes the optional `aclProtected` flag — when `true`, Commerce auto-generates
|
|
1004
995
|
* a per-app ACL resource from `metadata.id` for role-based menu access control.
|
|
1005
|
-
* @experimental
|
|
1006
996
|
*/
|
|
1007
997
|
type Menu = v.InferInput<typeof MenuSchema>;
|
|
1008
998
|
/** Config type when `adminUi` configuration is present. */
|
|
@@ -1011,7 +1001,6 @@ type AdminUiConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel
|
|
|
1011
1001
|
};
|
|
1012
1002
|
/**
|
|
1013
1003
|
* Check if config has Admin UI configuration.
|
|
1014
|
-
* @experimental
|
|
1015
1004
|
*/
|
|
1016
1005
|
declare function hasAdminUi<T extends AnyCommerceAppConfig>(config: T): config is AdminUiConfig<T>;
|
|
1017
1006
|
//#endregion
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import { i as resolveCommerceAppConfig, n as parseCommerceAppConfig, r as readCommerceAppConfig } from "../index.node-DsJ0QRGh.mjs";
|
|
15
16
|
import { t as defineConfig } from "../define-Z_Glf1-_.mjs";
|
|
16
|
-
import { i as
|
|
17
|
-
import { a as
|
|
18
|
-
import { a as CommerceAppConfigSchemas, c as hasMetadata, l as hasBusinessConfig, n as validateCommerceAppConfigDomain, o as getConfigDomains, s as hasConfigDomain, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../validate-t0T0F2MF.mjs";
|
|
17
|
+
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUi, i as hasCustomInstallation, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "../webhooks-CVbZOxYS.mjs";
|
|
18
|
+
import { a as CommerceAppConfigSchemas, c as hasMetadata, l as hasBusinessConfig, n as validateCommerceAppConfigDomain, o as getConfigDomains, s as hasConfigDomain, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../validate-yqa8uIyb.mjs";
|
|
19
19
|
|
|
20
20
|
export { CommerceAppConfigSchemas, defineConfig, getConfigDomains, hasAdminUi, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, hasWebhooks, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { n as CommerceAppConfig } from "./app-
|
|
16
|
-
|
|
15
|
+
import { n as CommerceAppConfig } from "./app-e4bCHpek.mjs";
|
|
17
16
|
//#region source/config/lib/define.d.ts
|
|
18
17
|
/**
|
|
19
18
|
* Helper to type-safely define the app config.
|
|
@@ -12,5 +12,8 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import "@adobe/aio-commerce-lib-core/responses";
|
|
16
|
+
import AioLogger from "@adobe/aio-lib-core-logging";
|
|
15
17
|
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
16
|
-
import
|
|
18
|
+
import "@standard-schema/spec";
|
|
19
|
+
import "type-fest";
|
|
@@ -12,11 +12,10 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { r as CommerceAppConfigOutputModel } from "./app-
|
|
16
|
-
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
17
|
-
import AioLogger from "@adobe/aio-lib-core-logging";
|
|
15
|
+
import { r as CommerceAppConfigOutputModel } from "./app-e4bCHpek.mjs";
|
|
18
16
|
import * as v from "valibot";
|
|
19
|
-
|
|
17
|
+
import AioLogger from "@adobe/aio-lib-core-logging";
|
|
18
|
+
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
20
19
|
//#region source/management/installation/schema.d.ts
|
|
21
20
|
/** Schema for validating Adobe I/O app credentials required for installation. */
|
|
22
21
|
declare const AppDataSchema: v.ObjectSchema<{
|
|
@@ -37,14 +36,20 @@ type AppData = v.InferOutput<typeof AppDataSchema>;
|
|
|
37
36
|
type ValidationIssueSeverity = "error" | "warning" | "info";
|
|
38
37
|
/** A single validation issue reported by a step's validate handler. */
|
|
39
38
|
type ValidationIssue = {
|
|
40
|
-
/** Machine-readable code identifying the issue type. */
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
/** Machine-readable code identifying the issue type. */
|
|
40
|
+
code: string;
|
|
41
|
+
/** Human-readable description of the issue. */
|
|
42
|
+
message: string;
|
|
43
|
+
/** Severity of the issue. Only "error" severity blocks installation. */
|
|
44
|
+
severity: ValidationIssueSeverity;
|
|
45
|
+
/** Optional additional context about the issue. */
|
|
43
46
|
details?: Record<string, unknown>;
|
|
44
47
|
};
|
|
45
48
|
/** Shared context available to all steps during installation. */
|
|
46
49
|
type InstallationContext = {
|
|
47
|
-
/** The credentials of the app being installed */
|
|
50
|
+
/** The credentials of the app being installed */
|
|
51
|
+
appData: AppData;
|
|
52
|
+
/** The raw action parameters from the App Builder runtime action. */
|
|
48
53
|
params: RuntimeActionParams & {
|
|
49
54
|
AIO_COMMERCE_AUTH_IMS_CLIENT_ID: string;
|
|
50
55
|
AIO_COMMERCE_AUTH_IMS_CLIENT_SECRETS: string | string[];
|
|
@@ -52,8 +57,10 @@ type InstallationContext = {
|
|
|
52
57
|
AIO_COMMERCE_AUTH_IMS_TECHNICAL_ACCOUNT_EMAIL: string;
|
|
53
58
|
AIO_COMMERCE_AUTH_IMS_ORG_ID: string;
|
|
54
59
|
AIO_COMMERCE_AUTH_IMS_SCOPES: string | string[];
|
|
55
|
-
};
|
|
56
|
-
|
|
60
|
+
};
|
|
61
|
+
/** Logger instance for installation logging. */
|
|
62
|
+
logger: ReturnType<typeof AioLogger>;
|
|
63
|
+
/** Custom scripts defined in the configuration (if any). */
|
|
57
64
|
customScripts?: Record<string, unknown>;
|
|
58
65
|
};
|
|
59
66
|
/** Factory function type for creating step-specific context. */
|
|
@@ -79,13 +86,17 @@ type StepMeta = {
|
|
|
79
86
|
};
|
|
80
87
|
/** Defines the base properties of a step. */
|
|
81
88
|
type StepBase<TName extends string = string, TConfig extends CommerceAppConfigOutputModel = CommerceAppConfigOutputModel> = {
|
|
82
|
-
/** The name of this step. */
|
|
83
|
-
|
|
89
|
+
/** The name of this step. */
|
|
90
|
+
name: TName;
|
|
91
|
+
/** Metadata associated with the step, keyed by execution mode. */
|
|
92
|
+
meta: StepMeta;
|
|
93
|
+
/** Whether the step should be taken into consideration. */
|
|
84
94
|
when?: (config: CommerceAppConfigOutputModel) => config is TConfig;
|
|
85
95
|
};
|
|
86
96
|
/** A leaf step that executes work (no children). */
|
|
87
97
|
type LeafStep<TName extends string = string, TConfig extends CommerceAppConfigOutputModel = CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> = StepBase<TName, TConfig> & {
|
|
88
|
-
type: "leaf";
|
|
98
|
+
type: "leaf";
|
|
99
|
+
/** The execution handler for the step. */
|
|
89
100
|
install: (config: TConfig, context: ExecutionContext<TStepCtx>) => TOutput | Promise<TOutput>;
|
|
90
101
|
/**
|
|
91
102
|
* Optional pre-installation validation handler.
|
|
@@ -102,8 +113,10 @@ type LeafStep<TName extends string = string, TConfig extends CommerceAppConfigOu
|
|
|
102
113
|
};
|
|
103
114
|
/** A branch step that contains children (no execution). */
|
|
104
115
|
type BranchStep<TName extends string = string, TConfig extends CommerceAppConfigOutputModel = CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TChildren extends AnyStep[] = AnyStep[]> = StepBase<TName, TConfig> & {
|
|
105
|
-
type: "branch";
|
|
106
|
-
|
|
116
|
+
type: "branch";
|
|
117
|
+
/** An optional factory function to setup shared context for the children steps. */
|
|
118
|
+
context?: StepContextFactory<TStepCtx>;
|
|
119
|
+
/** The children steps of this branch. */
|
|
107
120
|
children: TChildren;
|
|
108
121
|
/**
|
|
109
122
|
* Optional pre-installation validation handler for the branch itself.
|
|
@@ -191,18 +204,28 @@ type ExecutionStatus = "pending" | "in-progress" | "succeeded" | "failed";
|
|
|
191
204
|
type InstallationStatus = "pending" | "in-progress" | "succeeded" | "failed";
|
|
192
205
|
/** A structured error with path to the failing step. */
|
|
193
206
|
type InstallationError<TPayload = unknown> = {
|
|
194
|
-
/** Path to the step that failed (e.g., ["eventing", "commerce", "providers"]). */
|
|
195
|
-
|
|
196
|
-
|
|
207
|
+
/** Path to the step that failed (e.g., ["eventing", "commerce", "providers"]). */
|
|
208
|
+
path: string[];
|
|
209
|
+
/** Error key for easy identification. */
|
|
210
|
+
key: string;
|
|
211
|
+
/** Human-readable error message. */
|
|
212
|
+
message?: string;
|
|
213
|
+
/** Additional error payload. */
|
|
197
214
|
payload?: TPayload;
|
|
198
215
|
};
|
|
199
216
|
/** Status of a step in the installation tree. */
|
|
200
217
|
type StepStatus = {
|
|
201
|
-
/** Step name (unique among siblings). */
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
218
|
+
/** Step name (unique among siblings). */
|
|
219
|
+
name: string;
|
|
220
|
+
/** Unique step identifier (e.g., UUID). */
|
|
221
|
+
id: string;
|
|
222
|
+
/** Full path from root to this step. */
|
|
223
|
+
path: string[];
|
|
224
|
+
/** Step metadata (for display purposes). */
|
|
225
|
+
meta: StepMetaInfo;
|
|
226
|
+
/** Current execution status. */
|
|
227
|
+
status: ExecutionStatus;
|
|
228
|
+
/** Child step statuses (empty for leaf steps). */
|
|
206
229
|
children: StepStatus[];
|
|
207
230
|
};
|
|
208
231
|
/** Data collected during installation as a nested structure following step paths. */
|
|
@@ -211,8 +234,11 @@ type InstallationData = {
|
|
|
211
234
|
};
|
|
212
235
|
/** Base properties shared by all installation states. */
|
|
213
236
|
type InstallationStateBase = {
|
|
214
|
-
/** Unique installation identifier. */
|
|
215
|
-
|
|
237
|
+
/** Unique installation identifier. */
|
|
238
|
+
id: string;
|
|
239
|
+
/** Root step status. */
|
|
240
|
+
step: StepStatus;
|
|
241
|
+
/** Results from executed leaf steps, keyed by path. */
|
|
216
242
|
data: InstallationData | null;
|
|
217
243
|
/**
|
|
218
244
|
* The validated app configuration that drove this workflow. May be
|
|
@@ -222,26 +248,35 @@ type InstallationStateBase = {
|
|
|
222
248
|
};
|
|
223
249
|
/** Installation state when in progress. */
|
|
224
250
|
type InProgressInstallationState = InstallationStateBase & {
|
|
225
|
-
status: "in-progress";
|
|
251
|
+
status: "in-progress";
|
|
252
|
+
/** ISO timestamp when installation started. */
|
|
226
253
|
startedAt: string;
|
|
227
254
|
};
|
|
228
255
|
/** Metadata set when a retry was attempted, regardless of outcome. */
|
|
229
256
|
type InstallationRetryMetadata = {
|
|
230
|
-
/** True when installation was attempted more than once. */
|
|
257
|
+
/** True when installation was attempted more than once. */
|
|
258
|
+
isRetry: boolean;
|
|
231
259
|
};
|
|
232
260
|
/** Installation state when completed successfully. */
|
|
233
261
|
type SucceededInstallationState = InstallationStateBase & {
|
|
234
|
-
status: "succeeded";
|
|
235
|
-
|
|
236
|
-
|
|
262
|
+
status: "succeeded";
|
|
263
|
+
/** ISO timestamp when installation started. */
|
|
264
|
+
startedAt: string;
|
|
265
|
+
/** ISO timestamp when installation completed. */
|
|
266
|
+
completedAt: string;
|
|
267
|
+
/** Retry metadata, present when a retry was attempted. */
|
|
237
268
|
metadata?: InstallationRetryMetadata;
|
|
238
269
|
};
|
|
239
270
|
/** Installation state when failed. */
|
|
240
271
|
type FailedInstallationState = InstallationStateBase & {
|
|
241
|
-
status: "failed";
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
272
|
+
status: "failed";
|
|
273
|
+
/** ISO timestamp when installation started. */
|
|
274
|
+
startedAt: string;
|
|
275
|
+
/** ISO timestamp when installation failed. */
|
|
276
|
+
completedAt: string;
|
|
277
|
+
/** Error information about the failure. */
|
|
278
|
+
error: InstallationError;
|
|
279
|
+
/** Retry metadata, present when a retry was attempted. */
|
|
245
280
|
metadata?: InstallationRetryMetadata;
|
|
246
281
|
};
|
|
247
282
|
/**
|
|
@@ -266,19 +301,24 @@ type HookFunction<TEvent> = (event: TEvent, state: InstallationState) => void |
|
|
|
266
301
|
type InstallationHook = (state: InstallationState) => void | Promise<void>;
|
|
267
302
|
/** Base event payload for step events. */
|
|
268
303
|
type StepEvent = {
|
|
269
|
-
/** Full path to the step (e.g., ["eventing", "commerce", "providers"]). */
|
|
270
|
-
|
|
304
|
+
/** Full path to the step (e.g., ["eventing", "commerce", "providers"]). */
|
|
305
|
+
path: string[];
|
|
306
|
+
/** Step name (last element of path, for convenience). */
|
|
307
|
+
stepName: string;
|
|
308
|
+
/** Whether this is a leaf step (executable) or branch step (container). */
|
|
271
309
|
isLeaf: boolean;
|
|
272
310
|
};
|
|
273
311
|
/** Event payload when a step starts execution. */
|
|
274
312
|
type StepStartedEvent = StepEvent;
|
|
275
313
|
/** Event payload when a step succeeds. */
|
|
276
314
|
type StepSucceededEvent = StepEvent & {
|
|
277
|
-
/** Result returned by the step (only for leaf steps). */
|
|
315
|
+
/** Result returned by the step (only for leaf steps). */
|
|
316
|
+
result: unknown;
|
|
278
317
|
};
|
|
279
318
|
/** Event payload when a step fails. */
|
|
280
319
|
type StepFailedEvent = StepEvent & {
|
|
281
|
-
/** Error information. */
|
|
320
|
+
/** Error information. */
|
|
321
|
+
error: InstallationError;
|
|
282
322
|
};
|
|
283
323
|
/** Lifecycle hooks for installation execution. */
|
|
284
324
|
type InstallationHooks = {
|
|
@@ -293,16 +333,24 @@ type InstallationHooks = {
|
|
|
293
333
|
//#region source/management/installation/workflow/runner.d.ts
|
|
294
334
|
/** Options for creating an initial installation state. */
|
|
295
335
|
type CreateInitialStateOptions = {
|
|
296
|
-
/** The root branch step to build the state from. */
|
|
297
|
-
|
|
336
|
+
/** The root branch step to build the state from. */
|
|
337
|
+
rootStep: BranchStep;
|
|
338
|
+
/** The app configuration used to determine applicable steps. */
|
|
339
|
+
config: CommerceAppConfigOutputModel;
|
|
340
|
+
/** The execution mode. When "uninstall", steps use `meta.uninstall` if defined; defaults to "install". */
|
|
298
341
|
mode?: ExecutionMode;
|
|
299
342
|
};
|
|
300
343
|
/** Options for executing a workflow. */
|
|
301
344
|
type ExecuteWorkflowOptions = {
|
|
302
|
-
/** The root branch step to execute. */
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
345
|
+
/** The root branch step to execute. */
|
|
346
|
+
rootStep: BranchStep;
|
|
347
|
+
/** Shared installation context (params, logger, etc.). */
|
|
348
|
+
installationContext: InstallationContext;
|
|
349
|
+
/** The app configuration. */
|
|
350
|
+
config: CommerceAppConfigOutputModel;
|
|
351
|
+
/** The initial installation state (with all steps pending). */
|
|
352
|
+
initialState: InProgressInstallationState;
|
|
353
|
+
/** Lifecycle hooks for status change notifications. */
|
|
306
354
|
hooks?: InstallationHooks;
|
|
307
355
|
};
|
|
308
356
|
/** Execution mode: "install" or "uninstall". */
|
|
@@ -333,16 +381,24 @@ declare function executeUninstallWorkflow(options: ExecuteWorkflowOptions): Prom
|
|
|
333
381
|
//#region source/management/installation/workflow/validation.d.ts
|
|
334
382
|
/** Validation result for a single step, mirroring the step hierarchy. */
|
|
335
383
|
type StepValidationResult = {
|
|
336
|
-
/** Step name (unique among siblings). */
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
384
|
+
/** Step name (unique among siblings). */
|
|
385
|
+
name: string;
|
|
386
|
+
/** Full path from root to this step. */
|
|
387
|
+
path: string[];
|
|
388
|
+
/** Step metadata (for display purposes). */
|
|
389
|
+
meta: StepMetaInfo;
|
|
390
|
+
/** Issues found for this specific step (not including children). */
|
|
391
|
+
issues: ValidationIssue[];
|
|
392
|
+
/** Validation results for child steps (empty for leaf steps). */
|
|
340
393
|
children: StepValidationResult[];
|
|
341
394
|
};
|
|
342
395
|
/** Aggregated summary counts across the entire validation tree. */
|
|
343
396
|
type ValidationSummary = {
|
|
344
|
-
/** Total number of issues across all steps. */
|
|
345
|
-
|
|
397
|
+
/** Total number of issues across all steps. */
|
|
398
|
+
totalIssues: number;
|
|
399
|
+
/** Number of error-severity issues (these block installation). */
|
|
400
|
+
errors: number;
|
|
401
|
+
/** Number of warning-severity issues (allow proceeding with confirmation). */
|
|
346
402
|
warnings: number;
|
|
347
403
|
};
|
|
348
404
|
/** The complete validation result returned by the validation endpoint. */
|
|
@@ -351,14 +407,19 @@ type ValidationResult = {
|
|
|
351
407
|
* Whether installation can proceed without any confirmation.
|
|
352
408
|
* False if there are any error or warning severity issues.
|
|
353
409
|
*/
|
|
354
|
-
valid: boolean;
|
|
355
|
-
|
|
410
|
+
valid: boolean;
|
|
411
|
+
/** The full validation tree mirroring the step structure. */
|
|
412
|
+
result: StepValidationResult;
|
|
413
|
+
/** Flat summary of issue counts for quick frontend decisions. */
|
|
356
414
|
summary: ValidationSummary;
|
|
357
415
|
};
|
|
358
416
|
/** Options for running validation over the step tree. */
|
|
359
417
|
type ValidateStepTreeOptions = {
|
|
360
|
-
/** The root branch step to validate. */
|
|
361
|
-
|
|
418
|
+
/** The root branch step to validate. */
|
|
419
|
+
rootStep: BranchStep;
|
|
420
|
+
/** Validation context (params, logger, appData). */
|
|
421
|
+
validationContext: ValidationContext;
|
|
422
|
+
/** The app configuration used to determine applicable steps. */
|
|
362
423
|
config: CommerceAppConfigOutputModel;
|
|
363
424
|
};
|
|
364
425
|
/**
|
|
@@ -386,7 +447,9 @@ type CustomInstallationStepHandler<TResult = unknown> = (config: CommerceAppConf
|
|
|
386
447
|
* @template TResult - The return type of the install handler
|
|
387
448
|
*/
|
|
388
449
|
type CustomInstallationStepDefinition<TResult = unknown> = {
|
|
389
|
-
/** The installation handler, called when the app is installed. */
|
|
450
|
+
/** The installation handler, called when the app is installed. */
|
|
451
|
+
install: CustomInstallationStepHandler<TResult>;
|
|
452
|
+
/** The optional uninstall handler, called when the app is uninstalled. */
|
|
390
453
|
uninstall?: CustomInstallationStepHandler<void>;
|
|
391
454
|
};
|
|
392
455
|
/**
|
|
@@ -427,13 +490,18 @@ declare function defineCustomInstallationStep<TResult = unknown>(handlerOrDefini
|
|
|
427
490
|
//#region source/management/installation/runner.d.ts
|
|
428
491
|
/** Options for creating an initial installation state. */
|
|
429
492
|
type CreateInitialInstallationStateOptions = {
|
|
430
|
-
/** The app configuration used to determine applicable steps. */
|
|
493
|
+
/** The app configuration used to determine applicable steps. */
|
|
494
|
+
config: CommerceAppConfigOutputModel;
|
|
431
495
|
};
|
|
432
496
|
/** Options for running an installation. */
|
|
433
497
|
type RunInstallationOptions = {
|
|
434
|
-
/** Shared installation context (params, logger, etc.). */
|
|
435
|
-
|
|
436
|
-
|
|
498
|
+
/** Shared installation context (params, logger, etc.). */
|
|
499
|
+
installationContext: InstallationContext;
|
|
500
|
+
/** The app configuration. */
|
|
501
|
+
config: CommerceAppConfigOutputModel;
|
|
502
|
+
/** The initial installation state (with all steps pending). */
|
|
503
|
+
initialState: InProgressInstallationState;
|
|
504
|
+
/** Lifecycle hooks for status change notifications. */
|
|
437
505
|
hooks?: InstallationHooks;
|
|
438
506
|
};
|
|
439
507
|
/**
|
|
@@ -451,13 +519,18 @@ declare function createInitialInstallationState(options: CreateInitialInstallati
|
|
|
451
519
|
declare function runInstallation(options: RunInstallationOptions): Promise<SucceededInstallationState | FailedInstallationState>;
|
|
452
520
|
/** Options for creating an initial uninstallation state. */
|
|
453
521
|
type CreateInitialUninstallationStateOptions = {
|
|
454
|
-
/** The app configuration used to determine applicable steps. */
|
|
522
|
+
/** The app configuration used to determine applicable steps. */
|
|
523
|
+
config: CommerceAppConfigOutputModel;
|
|
455
524
|
};
|
|
456
525
|
/** Options for running an uninstallation. */
|
|
457
526
|
type RunUninstallationOptions = {
|
|
458
|
-
/** Shared installation context (params, logger, etc.). */
|
|
459
|
-
|
|
460
|
-
|
|
527
|
+
/** Shared installation context (params, logger, etc.). */
|
|
528
|
+
installationContext: InstallationContext;
|
|
529
|
+
/** The app configuration. */
|
|
530
|
+
config: CommerceAppConfigOutputModel;
|
|
531
|
+
/** The initial uninstallation state (with all steps pending). */
|
|
532
|
+
initialState: InProgressInstallationState;
|
|
533
|
+
/** Lifecycle hooks for status change notifications. */
|
|
461
534
|
hooks?: InstallationHooks;
|
|
462
535
|
};
|
|
463
536
|
/**
|
|
@@ -470,7 +543,9 @@ declare function createInitialUninstallationState(options: CreateInitialUninstal
|
|
|
470
543
|
declare function runUninstallation(options: RunUninstallationOptions): Promise<SucceededInstallationState | FailedInstallationState>;
|
|
471
544
|
/** Options for running pre-installation validation. */
|
|
472
545
|
type RunValidationOptions = {
|
|
473
|
-
/** Validation context (params, logger, appData — no customScripts). */
|
|
546
|
+
/** Validation context (params, logger, appData — no customScripts). */
|
|
547
|
+
validationContext: ValidationContext;
|
|
548
|
+
/** The app configuration. */
|
|
474
549
|
config: CommerceAppConfigOutputModel;
|
|
475
550
|
};
|
|
476
551
|
/**
|
package/dist/es/index.d.mts
CHANGED
|
@@ -17,11 +17,12 @@ import { CommerceSdkErrorBase, CommerceSdkErrorBaseOptions } from "@adobe/aio-co
|
|
|
17
17
|
import { ImsAuthParams, ImsAuthProvider } from "@adobe/aio-commerce-lib-auth";
|
|
18
18
|
import { CommerceEnv } from "@adobe/aio-commerce-lib-core/commerce";
|
|
19
19
|
import { AdobeIoEventsApiClient } from "@adobe/aio-commerce-lib-events/io-events";
|
|
20
|
-
|
|
21
20
|
//#region source/management/association/types.d.ts
|
|
22
21
|
/** The Commerce instance data an app is associated with. */
|
|
23
22
|
type AssociatedCommerceData = {
|
|
24
|
-
/** Commerce API base URL. */
|
|
23
|
+
/** Commerce API base URL. */
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
/** Deployment type of the Commerce instance. */
|
|
25
26
|
env: CommerceEnv;
|
|
26
27
|
};
|
|
27
28
|
//#endregion
|
package/dist/es/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { n as getAssociationData } from "./repository-BGmy0YeZ.mjs";
|
|
16
|
-
import { f as getIoEventCode, h as getNamespacedEvent, n as EVENTS_STORAGE_KEY, r as EXTERNAL_PROVIDER_TYPE, t as COMMERCE_PROVIDER_TYPE } from "./utils-
|
|
16
|
+
import { f as getIoEventCode, h as getNamespacedEvent, n as EVENTS_STORAGE_KEY, r as EXTERNAL_PROVIDER_TYPE, t as COMMERCE_PROVIDER_TYPE } from "./utils-D0O4r9jr.mjs";
|
|
17
17
|
import { AdobeCommerceHttpClient } from "@adobe/aio-commerce-lib-api";
|
|
18
18
|
import { getSystemConfigByKey } from "@adobe/aio-commerce-lib-config";
|
|
19
19
|
import { CommerceSdkErrorBase } from "@adobe/aio-commerce-lib-core/error";
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { t as stringifyError } from "./error-_RMwtrUA.mjs";
|
|
16
|
-
import { t as validateCommerceAppConfig } from "./validate-
|
|
16
|
+
import { t as validateCommerceAppConfig } from "./validate-yqa8uIyb.mjs";
|
|
17
17
|
import { dirname, join, parse } from "path";
|
|
18
18
|
import { existsSync } from "fs";
|
|
19
19
|
import { access, mkdir, readFile } from "fs/promises";
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { $ as StepContextFactory, A as ExecutionStatus, B as isCompletedState, C as executeUninstallWorkflow, D as StepFailedEvent, E as StepEvent, F as InstallationRetryMetadata, G as BranchStep, H as isInProgressState, I as InstallationState, J as InferStepOutput, K as BranchStepOptions, L as InstallationStatus, M as InProgressInstallationState, N as InstallationData, O as StepStartedEvent, P as InstallationError, Q as Step, R as StepStatus, S as createRetryState, T as InstallationHooks, U as isSucceededState, V as isFailedState, W as AnyStep, X as LeafStep, Y as InstallationContext, Z as LeafStepOptions, _ as ValidationSummary, a as RunValidationOptions, at as ValidationIssueSeverity, b as ExecuteWorkflowOptions, c as runInstallation, ct as isBranchStep, d as CustomInstallationStepDefinition, et as StepMeta, f as CustomInstallationStepHandler, g as ValidationResult, h as ValidateStepTreeOptions, i as RunUninstallationOptions, it as ValidationIssue, j as FailedInstallationState, k as StepSucceededEvent, l as runUninstallation, lt as isLeafStep, m as StepValidationResult, n as CreateInitialUninstallationStateOptions, nt as ValidationContext, o as createInitialInstallationState, ot as defineBranchStep, p as defineCustomInstallationStep, q as ExecutionContext, r as RunInstallationOptions, rt as ValidationExecutionContext, s as createInitialUninstallationState, st as defineLeafStep, t as CreateInitialInstallationStateOptions, tt as StepMetaInfo, u as runValidation, v as validateStepTree, w as executeWorkflow, x as createInitialState, y as CreateInitialStateOptions, z as SucceededInstallationState } from "../index-
|
|
15
|
+
import { $ as StepContextFactory, A as ExecutionStatus, B as isCompletedState, C as executeUninstallWorkflow, D as StepFailedEvent, E as StepEvent, F as InstallationRetryMetadata, G as BranchStep, H as isInProgressState, I as InstallationState, J as InferStepOutput, K as BranchStepOptions, L as InstallationStatus, M as InProgressInstallationState, N as InstallationData, O as StepStartedEvent, P as InstallationError, Q as Step, R as StepStatus, S as createRetryState, T as InstallationHooks, U as isSucceededState, V as isFailedState, W as AnyStep, X as LeafStep, Y as InstallationContext, Z as LeafStepOptions, _ as ValidationSummary, a as RunValidationOptions, at as ValidationIssueSeverity, b as ExecuteWorkflowOptions, c as runInstallation, ct as isBranchStep, d as CustomInstallationStepDefinition, et as StepMeta, f as CustomInstallationStepHandler, g as ValidationResult, h as ValidateStepTreeOptions, i as RunUninstallationOptions, it as ValidationIssue, j as FailedInstallationState, k as StepSucceededEvent, l as runUninstallation, lt as isLeafStep, m as StepValidationResult, n as CreateInitialUninstallationStateOptions, nt as ValidationContext, o as createInitialInstallationState, ot as defineBranchStep, p as defineCustomInstallationStep, q as ExecutionContext, r as RunInstallationOptions, rt as ValidationExecutionContext, s as createInitialUninstallationState, st as defineLeafStep, t as CreateInitialInstallationStateOptions, tt as StepMetaInfo, u as runValidation, v as validateStepTree, w as executeWorkflow, x as createInitialState, y as CreateInitialStateOptions, z as SucceededInstallationState } from "../index-Dsg4LZde.mjs";
|
|
16
16
|
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-BpFkwoig.mjs";
|
|
16
16
|
|
|
17
17
|
export { createInitialInstallationState, createInitialUninstallationState, defineCustomInstallationStep, isCompletedState, isFailedState, isInProgressState, isSucceededState, runInstallation, runUninstallation, runValidation };
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { _ as getRegistrationName, a as findExistingProviderMetadata, b as
|
|
15
|
+
import { _ as getRegistrationName, a as findExistingProviderMetadata, b as removeStoredEventProviders, c as generateInstanceId, d as getCommerceEventingExistingData, f as getIoEventCode, g as getRegistrationDescription, h as getNamespacedEvent, i as findExistingProvider, l as generateInstanceIdDeprecated, m as getLegacyRegistrationName, n as EVENTS_STORAGE_KEY, o as findExistingRegistrations, p as getIoEventsExistingData, r as EXTERNAL_PROVIDER_TYPE, s as findExistingSubscription, t as COMMERCE_PROVIDER_TYPE, u as getCommerceEventingConfigurationUpdateParams, v as groupEventsByRuntimeActions, x as sanitizeEventingIdentifier, y as makeWorkspaceConfig } from "./utils-D0O4r9jr.mjs";
|
|
16
16
|
import { t as stringifyError } from "./error-_RMwtrUA.mjs";
|
|
17
17
|
import { a as parseOrThrow, i as getInstallCommerceEnv, t as appliesToEnv } from "./environment-C84BPRJZ.mjs";
|
|
18
|
-
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUi, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "./webhooks-
|
|
18
|
+
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUi, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "./webhooks-CVbZOxYS.mjs";
|
|
19
19
|
import { t as inspect } from "./logging-DbJHXSKh.mjs";
|
|
20
20
|
import { resolveCommerceHttpClientParams, resolveIoEventsHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
21
21
|
import { getSystemConfigByKey, setSystemConfigByKey } from "@adobe/aio-commerce-lib-config";
|
|
@@ -1382,6 +1382,7 @@ async function removeCommerceEvents(config, context) {
|
|
|
1382
1382
|
provider
|
|
1383
1383
|
}, existingIoEventsData);
|
|
1384
1384
|
}
|
|
1385
|
+
await removeStoredEventProviders(config.eventing.commerce.map(({ provider }) => provider.key).filter((key) => typeof key === "string"));
|
|
1385
1386
|
logger.debug("Completed Commerce Events uninstall step.");
|
|
1386
1387
|
}
|
|
1387
1388
|
|
|
@@ -1526,6 +1527,7 @@ async function removeExternalEvents(config, context) {
|
|
|
1526
1527
|
metadata: config.metadata,
|
|
1527
1528
|
provider
|
|
1528
1529
|
}, existingIoEventsData);
|
|
1530
|
+
await removeStoredEventProviders(config.eventing.external.map(({ provider }) => provider.key).filter((key) => typeof key === "string"));
|
|
1529
1531
|
logger.debug("Completed External Events uninstall step.");
|
|
1530
1532
|
}
|
|
1531
1533
|
|