@adobe/aio-commerce-lib-app 1.0.2 → 1.2.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 +38 -0
- package/dist/cjs/actions/app-config.cjs +18 -4
- package/dist/cjs/actions/app-config.d.cts +17 -3
- package/dist/cjs/actions/config.cjs +17 -3
- package/dist/cjs/actions/config.d.cts +16 -2
- package/dist/cjs/actions/installation.cjs +70 -16
- package/dist/cjs/actions/installation.d.cts +18 -4
- package/dist/cjs/actions/scope-tree.cjs +17 -3
- package/dist/cjs/actions/scope-tree.d.cts +17 -3
- package/dist/cjs/{app-DWX5-Hsf.d.cts → app-DcQMhW2N.d.cts} +159 -2
- package/dist/cjs/commands/index.cjs +41 -27
- package/dist/cjs/commands/index.d.cts +14 -0
- package/dist/cjs/config/index.cjs +27 -12
- package/dist/cjs/config/index.d.cts +614 -6
- package/dist/cjs/{parser-BPpg_9QB.cjs → config-BppBKCFj.cjs} +17 -3
- package/dist/cjs/error-Dn7ool6k.cjs +38 -0
- package/dist/{es/runner-BD-lItnK.d.mts → cjs/index-DZxladgt.d.cts} +122 -9
- package/dist/cjs/logging-4s36JTiN.cjs +39 -0
- package/dist/cjs/management/index.cjs +23 -8
- package/dist/cjs/management/index.d.cts +16 -2
- package/dist/cjs/{runner-NHMvoMO2.cjs → management-iLQubQ7K.cjs} +462 -48
- package/dist/cjs/{router-DCw7oEQ9.cjs → router-KeQRduO3.cjs} +15 -1
- package/dist/cjs/{schemas-CZ6c8Id9.cjs → schemas-nkIxa8sL.cjs} +34 -0
- package/dist/cjs/{validate-Btzn9ilZ.cjs → validate-CeUCT_7k.cjs} +36 -15
- package/dist/cjs/{installation-CLbceU9F.cjs → webhooks-CLtDxwMa.cjs} +138 -1
- package/dist/es/actions/app-config.d.mts +17 -3
- package/dist/es/actions/app-config.mjs +17 -3
- package/dist/es/actions/config.d.mts +16 -2
- package/dist/es/actions/config.mjs +17 -3
- package/dist/es/actions/installation.d.mts +18 -4
- package/dist/es/actions/installation.mjs +64 -10
- package/dist/es/actions/scope-tree.d.mts +17 -3
- package/dist/es/actions/scope-tree.mjs +17 -3
- package/dist/es/{app-BAiyvNo2.d.mts → app-DJr-mN9d.d.mts} +159 -2
- package/dist/es/commands/index.d.mts +14 -0
- package/dist/es/commands/index.mjs +21 -7
- package/dist/es/config/index.d.mts +614 -6
- package/dist/es/config/index.mjs +18 -4
- package/dist/es/{parser-CQZTVG6i.mjs → config-BohwKkQS.mjs} +16 -2
- package/dist/es/error-DHlYzkbb.mjs +32 -0
- package/dist/{cjs/runner-DemKouFJ.d.cts → es/index-BmYXe7kp.d.mts} +122 -9
- package/dist/es/logging-XIUXDK5T.mjs +32 -0
- package/dist/es/management/index.d.mts +16 -2
- package/dist/es/management/index.mjs +16 -2
- package/dist/es/{runner-vwAhjD5r.mjs → management-DSexEPTW.mjs} +451 -43
- package/dist/es/{router-CJ4VWoCt.mjs → router-BxaxEEu3.mjs} +14 -0
- package/dist/es/{schemas-B8yIv0_b.mjs → schemas-CVXHgUhv.mjs} +29 -1
- package/dist/es/{validate-DKnju9-R.mjs → validate-CqJdGzyZ.mjs} +27 -6
- package/dist/es/{installation-BTL9X7iv.mjs → webhooks-CYo-pqbR.mjs} +115 -2
- package/package.json +12 -8
- package/dist/cjs/error-DJ2UAPH2.cjs +0 -24
- package/dist/cjs/logging-IDRQG0as.cjs +0 -25
- package/dist/es/error-CMV3IjBz.mjs +0 -18
- package/dist/es/logging-CzmXDzxI.mjs +0 -18
package/dist/es/config/index.mjs
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
*/
|
|
4
14
|
|
|
5
|
-
|
|
15
|
+
import { a as hasCustomInstallationSteps, c as hasEventing, i as hasCustomInstallation, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "../webhooks-CYo-pqbR.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-CqJdGzyZ.mjs";
|
|
17
|
+
import { d as defineConfig, n as readCommerceAppConfig, r as resolveCommerceAppConfig, t as parseCommerceAppConfig } from "../config-BohwKkQS.mjs";
|
|
18
|
+
|
|
19
|
+
export { CommerceAppConfigSchemas, defineConfig, getConfigDomains, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, hasWebhooks, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { t as validateCommerceAppConfig } from "./validate-CqJdGzyZ.mjs";
|
|
16
|
+
import { t as stringifyError } from "./error-DHlYzkbb.mjs";
|
|
3
17
|
import { dirname, join, parse } from "path";
|
|
4
18
|
import { existsSync } from "fs";
|
|
5
19
|
import { access, mkdir, readFile } from "fs/promises";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { CommerceSdkValidationError } from "@adobe/aio-commerce-lib-core/error";
|
|
16
|
+
|
|
17
|
+
//#region ../../packages-private/scripting-utils/source/error.ts
|
|
18
|
+
/**
|
|
19
|
+
* This module exports shared error utilities for the AIO Commerce SDK.
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Stringify an error to a human-friendly string.
|
|
24
|
+
* @param error - The error to stringify.
|
|
25
|
+
*/
|
|
26
|
+
function stringifyError(error) {
|
|
27
|
+
if (error instanceof CommerceSdkValidationError) return error.display();
|
|
28
|
+
return error instanceof Error ? error.message : String(error);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { stringifyError as t };
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { n as CommerceAppConfigOutputModel } from "./app-DJr-mN9d.mjs";
|
|
4
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";
|
|
5
19
|
|
|
6
20
|
//#region source/management/installation/schema.d.ts
|
|
7
21
|
/** Schema for validating Adobe I/O app credentials required for installation. */
|
|
@@ -19,6 +33,15 @@ declare const AppDataSchema: v.ObjectSchema<{
|
|
|
19
33
|
type AppData = v.InferOutput<typeof AppDataSchema>;
|
|
20
34
|
//#endregion
|
|
21
35
|
//#region source/management/installation/workflow/step.d.ts
|
|
36
|
+
/** Severity level of a validation issue. */
|
|
37
|
+
type ValidationIssueSeverity = "error" | "warning" | "info";
|
|
38
|
+
/** A single validation issue reported by a step's validate handler. */
|
|
39
|
+
type ValidationIssue = {
|
|
40
|
+
/** Machine-readable code identifying the issue type. */code: string; /** Human-readable description of the issue. */
|
|
41
|
+
message: string; /** Severity of the issue. Only "error" severity blocks installation. */
|
|
42
|
+
severity: ValidationIssueSeverity; /** Optional additional context about the issue. */
|
|
43
|
+
details?: Record<string, unknown>;
|
|
44
|
+
};
|
|
22
45
|
/** Shared context available to all steps during installation. */
|
|
23
46
|
type InstallationContext = {
|
|
24
47
|
/** The credentials of the app being installed */appData: AppData; /** The raw action parameters from the App Builder runtime action. */
|
|
@@ -37,6 +60,13 @@ type InstallationContext = {
|
|
|
37
60
|
type StepContextFactory<TStepCtx extends Record<string, unknown> = Record<string, unknown>> = (context: InstallationContext) => TStepCtx | Promise<TStepCtx>;
|
|
38
61
|
/** The execution context passed to leaf step run handlers. */
|
|
39
62
|
type ExecutionContext<TStepCtx extends Record<string, unknown> = Record<string, unknown>> = InstallationContext & TStepCtx;
|
|
63
|
+
/**
|
|
64
|
+
* A narrowed context available to step `validate` handlers.
|
|
65
|
+
* Excludes `customScripts` — those only apply during installation `run`, not pre-flight validation.
|
|
66
|
+
*/
|
|
67
|
+
type ValidationContext = Omit<InstallationContext, "customScripts">;
|
|
68
|
+
/** The context passed to step `validate` handlers (base validation context merged with step-level context). */
|
|
69
|
+
type ValidationExecutionContext<TStepCtx extends Record<string, unknown> = Record<string, unknown>> = ValidationContext & TStepCtx;
|
|
40
70
|
/** Metadata for a step (used for UI display). */
|
|
41
71
|
type StepMeta = {
|
|
42
72
|
label: string;
|
|
@@ -52,12 +82,24 @@ type StepBase<TName extends string = string, TConfig extends CommerceAppConfigOu
|
|
|
52
82
|
type LeafStep<TName extends string = string, TConfig extends CommerceAppConfigOutputModel = CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> = StepBase<TName, TConfig> & {
|
|
53
83
|
type: "leaf"; /** The execution handler for the step. */
|
|
54
84
|
run: (config: TConfig, context: ExecutionContext<TStepCtx>) => TOutput | Promise<TOutput>;
|
|
85
|
+
/**
|
|
86
|
+
* Optional pre-installation validation handler.
|
|
87
|
+
* Called before installation begins to surface issues (errors or warnings).
|
|
88
|
+
* Returning an empty array means the step has no issues.
|
|
89
|
+
*/
|
|
90
|
+
validate?: (config: TConfig, context: ValidationExecutionContext<TStepCtx>) => ValidationIssue[] | Promise<ValidationIssue[]>;
|
|
55
91
|
};
|
|
56
92
|
/** A branch step that contains children (no execution). */
|
|
57
|
-
type BranchStep<TName extends string = string, TConfig extends CommerceAppConfigOutputModel = CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown
|
|
93
|
+
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> & {
|
|
58
94
|
type: "branch"; /** An optional factory function to setup shared context for the children steps. */
|
|
59
95
|
context?: StepContextFactory<TStepCtx>; /** The children steps of this branch. */
|
|
60
|
-
children:
|
|
96
|
+
children: TChildren;
|
|
97
|
+
/**
|
|
98
|
+
* Optional pre-installation validation handler for the branch itself.
|
|
99
|
+
* Called before children are validated. Returning an empty array means
|
|
100
|
+
* the branch has no issues at this level.
|
|
101
|
+
*/
|
|
102
|
+
validate?: (config: TConfig, context: ValidationExecutionContext<TStepCtx>) => ValidationIssue[] | Promise<ValidationIssue[]>;
|
|
61
103
|
};
|
|
62
104
|
/** A step in the installation tree (discriminated union by `type`). */
|
|
63
105
|
type Step<TName extends string = string, TConfig extends CommerceAppConfigOutputModel = CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> = LeafStep<TName, TConfig, TStepCtx, TOutput> | BranchStep<TName, TConfig, TStepCtx>;
|
|
@@ -69,6 +111,7 @@ interface AnyStep {
|
|
|
69
111
|
name: string;
|
|
70
112
|
run?: (config: any, context: any) => unknown | Promise<unknown>;
|
|
71
113
|
type: "leaf" | "branch";
|
|
114
|
+
validate?: (config: any, context: any) => ValidationIssue[] | Promise<ValidationIssue[]>;
|
|
72
115
|
when?: (config: CommerceAppConfigOutputModel) => boolean;
|
|
73
116
|
}
|
|
74
117
|
/** Check if a step is a leaf step. */
|
|
@@ -78,7 +121,7 @@ declare function isBranchStep(step: AnyStep): step is BranchStep;
|
|
|
78
121
|
/** Options for defining a leaf step. */
|
|
79
122
|
type LeafStepOptions<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> = Omit<LeafStep<TName, TConfig, TStepCtx, TOutput>, "type">;
|
|
80
123
|
/** Options for defining a branch step. */
|
|
81
|
-
type BranchStepOptions<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown
|
|
124
|
+
type BranchStepOptions<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TChildren extends AnyStep[] = AnyStep[]> = Omit<BranchStep<TName, TConfig, TStepCtx, TChildren>, "type">;
|
|
82
125
|
/**
|
|
83
126
|
* Define a leaf step (executable, no children).
|
|
84
127
|
*
|
|
@@ -94,7 +137,14 @@ type BranchStepOptions<TName extends string, TConfig extends CommerceAppConfigOu
|
|
|
94
137
|
* });
|
|
95
138
|
* ```
|
|
96
139
|
*/
|
|
97
|
-
declare function defineLeafStep<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown>(options: LeafStepOptions<TName, TConfig, TStepCtx, TOutput>):
|
|
140
|
+
declare function defineLeafStep<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown>(options: LeafStepOptions<TName, TConfig, TStepCtx, TOutput>): {
|
|
141
|
+
type: "leaf";
|
|
142
|
+
name: TName;
|
|
143
|
+
meta: StepMeta;
|
|
144
|
+
when: ((config: CommerceAppConfigOutputModel) => config is TConfig) | undefined;
|
|
145
|
+
run: (config: TConfig, context: ExecutionContext<TStepCtx>) => TOutput | Promise<TOutput>;
|
|
146
|
+
validate: ((config: TConfig, context: ValidationExecutionContext<TStepCtx>) => ValidationIssue[] | Promise<ValidationIssue[]>) | undefined;
|
|
147
|
+
};
|
|
98
148
|
/**
|
|
99
149
|
* Define a branch step (container with children, no runner).
|
|
100
150
|
*
|
|
@@ -109,7 +159,15 @@ declare function defineLeafStep<TName extends string, TConfig extends CommerceAp
|
|
|
109
159
|
* });
|
|
110
160
|
* ```
|
|
111
161
|
*/
|
|
112
|
-
declare function defineBranchStep<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown
|
|
162
|
+
declare function defineBranchStep<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, const TChildren extends AnyStep[] = AnyStep[]>(options: BranchStepOptions<TName, TConfig, TStepCtx, TChildren>): {
|
|
163
|
+
type: "branch";
|
|
164
|
+
name: TName;
|
|
165
|
+
meta: StepMeta;
|
|
166
|
+
when: ((config: CommerceAppConfigOutputModel) => config is TConfig) | undefined;
|
|
167
|
+
context: StepContextFactory<TStepCtx> | undefined;
|
|
168
|
+
children: TChildren;
|
|
169
|
+
validate: ((config: TConfig, context: ValidationExecutionContext<TStepCtx>) => ValidationIssue[] | Promise<ValidationIssue[]>) | undefined;
|
|
170
|
+
};
|
|
113
171
|
/** Infer the output type from a leaf step. */
|
|
114
172
|
type InferStepOutput<TStep> = TStep extends LeafStep<infer _TName, infer _TConfig, infer _TStepCtx, infer TOutput> ? Awaited<TOutput> : never;
|
|
115
173
|
//#endregion
|
|
@@ -234,6 +292,47 @@ declare function createInitialState(options: CreateInitialStateOptions): InProgr
|
|
|
234
292
|
*/
|
|
235
293
|
declare function executeWorkflow(options: ExecuteWorkflowOptions): Promise<SucceededInstallationState | FailedInstallationState>;
|
|
236
294
|
//#endregion
|
|
295
|
+
//#region source/management/installation/workflow/validation.d.ts
|
|
296
|
+
/** Validation result for a single step, mirroring the step hierarchy. */
|
|
297
|
+
type StepValidationResult = {
|
|
298
|
+
/** Step name (unique among siblings). */name: string; /** Full path from root to this step. */
|
|
299
|
+
path: string[]; /** Step metadata (for display purposes). */
|
|
300
|
+
meta: StepMeta; /** Issues found for this specific step (not including children). */
|
|
301
|
+
issues: ValidationIssue[]; /** Validation results for child steps (empty for leaf steps). */
|
|
302
|
+
children: StepValidationResult[];
|
|
303
|
+
};
|
|
304
|
+
/** Aggregated summary counts across the entire validation tree. */
|
|
305
|
+
type ValidationSummary = {
|
|
306
|
+
/** Total number of issues across all steps. */totalIssues: number; /** Number of error-severity issues (these block installation). */
|
|
307
|
+
errors: number; /** Number of warning-severity issues (allow proceeding with confirmation). */
|
|
308
|
+
warnings: number;
|
|
309
|
+
};
|
|
310
|
+
/** The complete validation result returned by the validation endpoint. */
|
|
311
|
+
type ValidationResult = {
|
|
312
|
+
/**
|
|
313
|
+
* Whether installation can proceed without any confirmation.
|
|
314
|
+
* False if there are any error or warning severity issues.
|
|
315
|
+
*/
|
|
316
|
+
valid: boolean; /** The full validation tree mirroring the step structure. */
|
|
317
|
+
result: StepValidationResult; /** Flat summary of issue counts for quick frontend decisions. */
|
|
318
|
+
summary: ValidationSummary;
|
|
319
|
+
};
|
|
320
|
+
/** Options for running validation over the step tree. */
|
|
321
|
+
type ValidateStepTreeOptions = {
|
|
322
|
+
/** The root branch step to validate. */rootStep: BranchStep; /** Validation context (params, logger, appData). */
|
|
323
|
+
validationContext: ValidationContext; /** The app configuration used to determine applicable steps. */
|
|
324
|
+
config: CommerceAppConfigOutputModel;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* Runs validation over the full step tree, returning a structured result.
|
|
328
|
+
*
|
|
329
|
+
* - Respects `when` conditions (skips steps that don't apply to the config)
|
|
330
|
+
* - Calls each step's optional `validate` handler
|
|
331
|
+
* - Sets up branch context factories before validating children
|
|
332
|
+
* - Never throws; all errors from validate handlers are caught and reported as issues
|
|
333
|
+
*/
|
|
334
|
+
declare function validateStepTree(options: ValidateStepTreeOptions): Promise<ValidationResult>;
|
|
335
|
+
//#endregion
|
|
237
336
|
//#region source/management/installation/custom-installation/define.d.ts
|
|
238
337
|
/**
|
|
239
338
|
* Handler function type for custom installation steps.
|
|
@@ -295,5 +394,19 @@ declare function createInitialInstallationState(options: CreateInitialInstallati
|
|
|
295
394
|
* Runs the full installation workflow. Returns the final state (never throws).
|
|
296
395
|
*/
|
|
297
396
|
declare function runInstallation(options: RunInstallationOptions): Promise<SucceededInstallationState | FailedInstallationState>;
|
|
397
|
+
/** Options for running pre-installation validation. */
|
|
398
|
+
type RunValidationOptions = {
|
|
399
|
+
/** Validation context (params, logger, appData — no customScripts). */validationContext: ValidationContext; /** The app configuration. */
|
|
400
|
+
config: CommerceAppConfigOutputModel;
|
|
401
|
+
};
|
|
402
|
+
/**
|
|
403
|
+
* Runs pre-installation validation over the full step tree.
|
|
404
|
+
*
|
|
405
|
+
* Traverses the same step hierarchy used during installation but only calls
|
|
406
|
+
* each step's optional `validate` handler rather than executing side effects.
|
|
407
|
+
* Always resolves (never throws). Returns a structured result with per-step
|
|
408
|
+
* issues and an aggregated summary.
|
|
409
|
+
*/
|
|
410
|
+
declare function runValidation(options: RunValidationOptions): Promise<ValidationResult>;
|
|
298
411
|
//#endregion
|
|
299
|
-
export {
|
|
412
|
+
export { isBranchStep as $, StepStatus as A, InferStepOutput as B, ExecutionStatus as C, InstallationError as D, InstallationData as E, isSucceededState as F, StepContextFactory as G, LeafStep as H, AnyStep as I, ValidationExecutionContext as J, StepMeta as K, BranchStep as L, isCompletedState as M, isFailedState as N, InstallationState as O, isInProgressState as P, defineLeafStep as Q, BranchStepOptions as R, StepSucceededEvent as S, InProgressInstallationState as T, LeafStepOptions as U, InstallationContext as V, Step as W, ValidationIssueSeverity as X, ValidationIssue as Y, defineBranchStep as Z, executeWorkflow as _, runInstallation as a, StepFailedEvent as b, defineCustomInstallationStep as c, ValidationResult as d, isLeafStep as et, ValidationSummary as f, createInitialState as g, ExecuteWorkflowOptions as h, createInitialInstallationState as i, SucceededInstallationState as j, InstallationStatus as k, StepValidationResult as l, CreateInitialStateOptions as m, RunInstallationOptions as n, runValidation as o, validateStepTree as p, ValidationContext as q, RunValidationOptions as r, CustomInstallationStepHandler as s, CreateInitialInstallationStateOptions as t, ValidateStepTreeOptions as u, InstallationHooks as v, FailedInstallationState as w, StepStartedEvent as x, StepEvent as y, ExecutionContext as z };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import util from "util";
|
|
16
|
+
|
|
17
|
+
//#region ../../packages-private/common-utils/source/logging.ts
|
|
18
|
+
/**
|
|
19
|
+
* Shorthand to inspect an object.
|
|
20
|
+
*
|
|
21
|
+
* @param obj - The object to inspect.
|
|
22
|
+
* @returns A string representation of the object.
|
|
23
|
+
*/
|
|
24
|
+
function inspect(obj, params = {}) {
|
|
25
|
+
return util.inspect(obj, {
|
|
26
|
+
depth: null,
|
|
27
|
+
...params
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { inspect as t };
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { $ as isBranchStep, A as StepStatus, B as InferStepOutput, C as ExecutionStatus, D as InstallationError, E as InstallationData, F as isSucceededState, G as StepContextFactory, H as LeafStep, I as AnyStep, J as ValidationExecutionContext, K as StepMeta, L as BranchStep, M as isCompletedState, N as isFailedState, O as InstallationState, P as isInProgressState, Q as defineLeafStep, R as BranchStepOptions, S as StepSucceededEvent, T as InProgressInstallationState, U as LeafStepOptions, V as InstallationContext, W as Step, X as ValidationIssueSeverity, Y as ValidationIssue, Z as defineBranchStep, _ as executeWorkflow, a as runInstallation, b as StepFailedEvent, c as defineCustomInstallationStep, d as ValidationResult, et as isLeafStep, f as ValidationSummary, g as createInitialState, h as ExecuteWorkflowOptions, i as createInitialInstallationState, j as SucceededInstallationState, k as InstallationStatus, l as StepValidationResult, m as CreateInitialStateOptions, n as RunInstallationOptions, o as runValidation, p as validateStepTree, q as ValidationContext, r as RunValidationOptions, s as CustomInstallationStepHandler, t as CreateInitialInstallationStateOptions, u as ValidateStepTreeOptions, v as InstallationHooks, w as FailedInstallationState, x as StepStartedEvent, y as StepEvent, z as ExecutionContext } from "../index-BmYXe7kp.mjs";
|
|
16
|
+
export { AnyStep, BranchStep, BranchStepOptions, CreateInitialInstallationStateOptions, CreateInitialStateOptions, CustomInstallationStepHandler, ExecuteWorkflowOptions, ExecutionContext, ExecutionStatus, FailedInstallationState, InProgressInstallationState, InferStepOutput, InstallationContext, InstallationData, InstallationError, InstallationHooks, InstallationState, InstallationStatus, LeafStep, LeafStepOptions, RunInstallationOptions, RunValidationOptions, Step, StepContextFactory, StepEvent, StepFailedEvent, StepMeta, StepStartedEvent, StepStatus, StepSucceededEvent, StepValidationResult, SucceededInstallationState, ValidateStepTreeOptions, ValidationContext, ValidationExecutionContext, ValidationIssue, ValidationIssueSeverity, ValidationResult, ValidationSummary, createInitialInstallationState, createInitialState, defineBranchStep, defineCustomInstallationStep, defineLeafStep, executeWorkflow, isBranchStep, isCompletedState, isFailedState, isInProgressState, isLeafStep, isSucceededState, runInstallation, runValidation, validateStepTree };
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
|
|
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
|
+
*/
|
|
2
14
|
|
|
3
|
-
|
|
15
|
+
import { a as isCompletedState, c as isSucceededState, i as defineCustomInstallationStep, n as runInstallation, o as isFailedState, r as runValidation, s as isInProgressState, t as createInitialInstallationState } from "../management-DSexEPTW.mjs";
|
|
16
|
+
|
|
17
|
+
export { createInitialInstallationState, defineCustomInstallationStep, isCompletedState, isFailedState, isInProgressState, isSucceededState, runInstallation, runValidation };
|