@adobe/aio-commerce-lib-app 2.0.0-beta-20260820174436 → 2.0.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +31 -5
  2. package/dist/cjs/actions/app-config/index.cjs +3 -3
  3. package/dist/cjs/actions/app-config/index.d.cts +3 -4
  4. package/dist/cjs/actions/association/index.d.cts +2 -3
  5. package/dist/cjs/actions/config/index.d.cts +2 -3
  6. package/dist/cjs/actions/installation/index.cjs +14 -7
  7. package/dist/cjs/actions/installation/index.d.cts +5 -5
  8. package/dist/cjs/actions/scope-tree/index.d.cts +2 -3
  9. package/dist/cjs/{app-Cf3EmtUh.d.cts → app-DwSqUkJA.d.cts} +122 -16
  10. package/dist/cjs/commands/index.cjs +91 -51
  11. package/dist/cjs/commands/templates/admin-ui/web-src/.babelrc +14 -0
  12. package/dist/cjs/commands/templates/business-configuration/config.js.template +7 -1
  13. package/dist/cjs/{common-B70f39vI.cjs → common-VSsQEHDv.cjs} +15 -2
  14. package/dist/cjs/config/index.browser.d.cts +1 -1
  15. package/dist/cjs/config/index.node.cjs +4 -3
  16. package/dist/cjs/config/index.node.d.cts +104 -50
  17. package/dist/{es/define-DSU8Kgu0.d.mts → cjs/define-Cc3AaVmY.d.cts} +1 -1
  18. package/dist/{es/index-COLnI6Ok.d.mts → cjs/index-C7dqTDHu.d.cts} +25 -3
  19. package/dist/cjs/index.d.cts +10 -10
  20. package/dist/cjs/{index.node-CXeIG8SS.cjs → index.node-vcOo1rt0.cjs} +1 -1
  21. package/dist/cjs/installation-D72LoQ_1.d.cts +39 -0
  22. package/dist/cjs/management/index.cjs +1 -1
  23. package/dist/cjs/management/index.d.cts +1 -1
  24. package/dist/cjs/{management-BhMdRr8i.cjs → management-Bki3hlxL.cjs} +207 -27
  25. package/dist/cjs/{openapi-DVJUTOXY.cjs → openapi-CAXgKam0.cjs} +317 -390
  26. package/dist/cjs/{validate-Dff0nrqM.cjs → validate-CwWYtRsS.cjs} +33 -2
  27. package/dist/cjs/{webhooks-E1KDx3Yu.cjs → webhooks-Bcq2Qy7q.cjs} +69 -8
  28. package/dist/es/actions/app-config/index.d.mts +3 -4
  29. package/dist/es/actions/app-config/index.mjs +3 -3
  30. package/dist/es/actions/association/index.d.mts +2 -3
  31. package/dist/es/actions/config/index.d.mts +2 -3
  32. package/dist/es/actions/installation/index.d.mts +5 -5
  33. package/dist/es/actions/installation/index.mjs +14 -7
  34. package/dist/es/actions/scope-tree/index.d.mts +2 -3
  35. package/dist/es/{app-Cf3EmtUh.d.mts → app-DwSqUkJA.d.mts} +122 -16
  36. package/dist/es/commands/index.mjs +92 -52
  37. package/dist/es/commands/templates/admin-ui/web-src/.babelrc +14 -0
  38. package/dist/es/commands/templates/business-configuration/config.js.template +7 -1
  39. package/dist/es/{common-BVG9tiX0.mjs → common-dy6NrZt8.mjs} +10 -3
  40. package/dist/es/config/index.browser.d.mts +1 -1
  41. package/dist/es/config/index.node.d.mts +104 -50
  42. package/dist/es/config/index.node.mjs +4 -4
  43. package/dist/{cjs/define-B-_oKmCe.d.cts → es/define-Bq1zw9Lr.d.mts} +1 -1
  44. package/dist/{cjs/index-CkwCGvut.d.cts → es/index-BryddQId.d.mts} +25 -3
  45. package/dist/es/index.d.mts +10 -10
  46. package/dist/es/{index.node-DRTF5Hue.mjs → index.node-CW46zuxW.mjs} +1 -1
  47. package/dist/es/installation-DqVDJ1ur.d.mts +39 -0
  48. package/dist/es/management/index.d.mts +1 -1
  49. package/dist/es/management/index.mjs +1 -1
  50. package/dist/es/{management-BTWQdJNO.mjs → management-DgwAhaaJ.mjs} +207 -27
  51. package/dist/es/{openapi-D18LT0Wp.mjs → openapi-BnR9OUac.mjs} +317 -390
  52. package/dist/es/{validate-8AXMGEwr.mjs → validate-NzW1FQwL.mjs} +29 -4
  53. package/dist/es/{webhooks-BQ8kSN2Z.mjs → webhooks-CHZ1SXxw.mjs} +64 -9
  54. package/package.json +19 -19
@@ -17,6 +17,41 @@ import * as v from "valibot";
17
17
  /** The individual validatable domains of the app config. */
18
18
  declare const CommerceAppConfigSchemas: {
19
19
  readonly adminUi: v.ObjectSchema<{
20
+ readonly acl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
21
+ readonly children: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
22
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "ACL resource ID may contain only lowercase letters, digits, and \"_\"">]>;
23
+ readonly label: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.MinLengthAction<string, 3, "acl resource label must be at least 3 characters">, v.MaxLengthAction<string, 50, "acl resource label must be at most 50 characters">]>;
24
+ }, undefined>, undefined>, v.MinLengthAction<{
25
+ id: string;
26
+ label: string;
27
+ }[], 1, "An ACL resource group must contain at least one child">, v.CheckAction<{
28
+ id: string;
29
+ label: string;
30
+ }[], "Child ACL resource ids must be unique within a group.">]>, undefined>;
31
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "ACL resource ID may contain only lowercase letters, digits, and \"_\"">]>;
32
+ readonly label: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.MinLengthAction<string, 3, "acl resource label must be at least 3 characters">, v.MaxLengthAction<string, 50, "acl resource label must be at most 50 characters">]>;
33
+ }, undefined>, undefined>, v.MinLengthAction<{
34
+ children?: {
35
+ id: string;
36
+ label: string;
37
+ }[] | undefined;
38
+ id: string;
39
+ label: string;
40
+ }[], 1, "At least one ACL resource is required when acl is defined">, v.CheckAction<{
41
+ children?: {
42
+ id: string;
43
+ label: string;
44
+ }[] | undefined;
45
+ id: string;
46
+ label: string;
47
+ }[], "Top-level ACL resource ids must be unique.">, v.CheckAction<{
48
+ children?: {
49
+ id: string;
50
+ label: string;
51
+ }[] | undefined;
52
+ id: string;
53
+ label: string;
54
+ }[], "Custom ACL resource ids must stay unique after Commerce derivation: a top-level resource id must not equal a group's \"<group>_<child>\" combination.">]>, undefined>;
20
55
  readonly customer: v.OptionalSchema<v.ObjectSchema<{
21
56
  readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
22
57
  readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
@@ -31,7 +66,13 @@ declare const CommerceAppConfigSchemas: {
31
66
  id: string;
32
67
  label: string;
33
68
  type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
34
- }[], 1, "At least one grid column is required">]>;
69
+ }[], 1, "At least one grid column is required">, v.CheckAction<{
70
+ aclProtected?: boolean | undefined;
71
+ align: "left" | "right" | "center";
72
+ id: string;
73
+ label: string;
74
+ type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
75
+ }[], "Grid column ids must be unique after Commerce id sanitization.">]>;
35
76
  readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
36
77
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
37
78
  readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
@@ -108,7 +149,7 @@ declare const CommerceAppConfigSchemas: {
108
149
  } | undefined;
109
150
  selectionLimit?: number | undefined;
110
151
  title?: string | undefined;
111
- })[], "Mass action ids must be unique.">]>, undefined>;
152
+ })[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
112
153
  }, undefined>, undefined>;
113
154
  readonly menu: v.OptionalSchema<v.ObjectSchema<{
114
155
  readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -133,7 +174,13 @@ declare const CommerceAppConfigSchemas: {
133
174
  id: string;
134
175
  label: string;
135
176
  type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
136
- }[], 1, "At least one grid column is required">]>;
177
+ }[], 1, "At least one grid column is required">, v.CheckAction<{
178
+ aclProtected?: boolean | undefined;
179
+ align: "left" | "right" | "center";
180
+ id: string;
181
+ label: string;
182
+ type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
183
+ }[], "Grid column ids must be unique after Commerce id sanitization.">]>;
137
184
  readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
138
185
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
139
186
  readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
@@ -210,7 +257,7 @@ declare const CommerceAppConfigSchemas: {
210
257
  } | undefined;
211
258
  selectionLimit?: number | undefined;
212
259
  title?: string | undefined;
213
- })[], "Mass action ids must be unique.">]>, undefined>;
260
+ })[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
214
261
  readonly viewButtons: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
215
262
  readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
216
263
  readonly confirm: v.OptionalSchema<v.ObjectSchema<{
@@ -283,7 +330,7 @@ declare const CommerceAppConfigSchemas: {
283
330
  sortOrder?: number | undefined;
284
331
  timeout?: number | undefined;
285
332
  type: "worker";
286
- })[], "Order view button ids must be unique.">]>, undefined>;
333
+ })[], "Order view button ids must be unique after Commerce id sanitization.">]>, undefined>;
287
334
  }, undefined>, undefined>;
288
335
  readonly product: v.OptionalSchema<v.ObjectSchema<{
289
336
  readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
@@ -299,7 +346,13 @@ declare const CommerceAppConfigSchemas: {
299
346
  id: string;
300
347
  label: string;
301
348
  type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
302
- }[], 1, "At least one grid column is required">]>;
349
+ }[], 1, "At least one grid column is required">, v.CheckAction<{
350
+ aclProtected?: boolean | undefined;
351
+ align: "left" | "right" | "center";
352
+ id: string;
353
+ label: string;
354
+ type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
355
+ }[], "Grid column ids must be unique after Commerce id sanitization.">]>;
303
356
  readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
304
357
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
305
358
  readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
@@ -376,7 +429,7 @@ declare const CommerceAppConfigSchemas: {
376
429
  } | undefined;
377
430
  selectionLimit?: number | undefined;
378
431
  title?: string | undefined;
379
- })[], "Mass action ids must be unique.">]>, undefined>;
432
+ })[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
380
433
  }, undefined>, undefined>;
381
434
  }, undefined>;
382
435
  readonly businessConfig: v.ObjectSchema<{
@@ -1091,7 +1144,7 @@ declare const CommerceAppConfigSchemas: {
1091
1144
  readonly description: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 255, "The metadata description must not be longer than 255 characters">]>;
1092
1145
  readonly displayName: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 50, "The application display name must not be longer than 50 characters">]>;
1093
1146
  readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>, v.MaxLengthAction<string, 100, "The application id must not be longer than 100 characters">]>;
1094
- readonly upgradeMode: v.OptionalSchema<v.PicklistSchema<["auto", "manual"], undefined>, "auto">;
1147
+ readonly upgradeMode: v.OptionalSchema<v.PicklistSchema<["auto", "manual"], undefined>, "manual">;
1095
1148
  readonly version: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.RegexAction<string, "The version must follow semantic versioning (semver) format: Major.Minor.Patch (e.g., '1.0.0', '2.3.1')">]>;
1096
1149
  }, undefined>;
1097
1150
  readonly webhooks: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
@@ -1248,6 +1301,41 @@ declare function hasConfigDomain(config: AnyCommerceAppConfig, domain: CommerceA
1248
1301
  /** The schema used to validate the commerce app config file. */
1249
1302
  declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1250
1303
  readonly adminUi: v.OptionalSchema<v.ObjectSchema<{
1304
+ readonly acl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
1305
+ readonly children: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
1306
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "ACL resource ID may contain only lowercase letters, digits, and \"_\"">]>;
1307
+ readonly label: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.MinLengthAction<string, 3, "acl resource label must be at least 3 characters">, v.MaxLengthAction<string, 50, "acl resource label must be at most 50 characters">]>;
1308
+ }, undefined>, undefined>, v.MinLengthAction<{
1309
+ id: string;
1310
+ label: string;
1311
+ }[], 1, "An ACL resource group must contain at least one child">, v.CheckAction<{
1312
+ id: string;
1313
+ label: string;
1314
+ }[], "Child ACL resource ids must be unique within a group.">]>, undefined>;
1315
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "ACL resource ID may contain only lowercase letters, digits, and \"_\"">]>;
1316
+ readonly label: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.MinLengthAction<string, 3, "acl resource label must be at least 3 characters">, v.MaxLengthAction<string, 50, "acl resource label must be at most 50 characters">]>;
1317
+ }, undefined>, undefined>, v.MinLengthAction<{
1318
+ children?: {
1319
+ id: string;
1320
+ label: string;
1321
+ }[] | undefined;
1322
+ id: string;
1323
+ label: string;
1324
+ }[], 1, "At least one ACL resource is required when acl is defined">, v.CheckAction<{
1325
+ children?: {
1326
+ id: string;
1327
+ label: string;
1328
+ }[] | undefined;
1329
+ id: string;
1330
+ label: string;
1331
+ }[], "Top-level ACL resource ids must be unique.">, v.CheckAction<{
1332
+ children?: {
1333
+ id: string;
1334
+ label: string;
1335
+ }[] | undefined;
1336
+ id: string;
1337
+ label: string;
1338
+ }[], "Custom ACL resource ids must stay unique after Commerce derivation: a top-level resource id must not equal a group's \"<group>_<child>\" combination.">]>, undefined>;
1251
1339
  readonly customer: v.OptionalSchema<v.ObjectSchema<{
1252
1340
  readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
1253
1341
  readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
@@ -1262,7 +1350,13 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1262
1350
  id: string;
1263
1351
  label: string;
1264
1352
  type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
1265
- }[], 1, "At least one grid column is required">]>;
1353
+ }[], 1, "At least one grid column is required">, v.CheckAction<{
1354
+ aclProtected?: boolean | undefined;
1355
+ align: "left" | "right" | "center";
1356
+ id: string;
1357
+ label: string;
1358
+ type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
1359
+ }[], "Grid column ids must be unique after Commerce id sanitization.">]>;
1266
1360
  readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1267
1361
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1268
1362
  readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
@@ -1339,7 +1433,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1339
1433
  } | undefined;
1340
1434
  selectionLimit?: number | undefined;
1341
1435
  title?: string | undefined;
1342
- })[], "Mass action ids must be unique.">]>, undefined>;
1436
+ })[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
1343
1437
  }, undefined>, undefined>;
1344
1438
  readonly menu: v.OptionalSchema<v.ObjectSchema<{
1345
1439
  readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -1364,7 +1458,13 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1364
1458
  id: string;
1365
1459
  label: string;
1366
1460
  type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
1367
- }[], 1, "At least one grid column is required">]>;
1461
+ }[], 1, "At least one grid column is required">, v.CheckAction<{
1462
+ aclProtected?: boolean | undefined;
1463
+ align: "left" | "right" | "center";
1464
+ id: string;
1465
+ label: string;
1466
+ type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
1467
+ }[], "Grid column ids must be unique after Commerce id sanitization.">]>;
1368
1468
  readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1369
1469
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1370
1470
  readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
@@ -1441,7 +1541,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1441
1541
  } | undefined;
1442
1542
  selectionLimit?: number | undefined;
1443
1543
  title?: string | undefined;
1444
- })[], "Mass action ids must be unique.">]>, undefined>;
1544
+ })[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
1445
1545
  readonly viewButtons: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
1446
1546
  readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1447
1547
  readonly confirm: v.OptionalSchema<v.ObjectSchema<{
@@ -1514,7 +1614,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1514
1614
  sortOrder?: number | undefined;
1515
1615
  timeout?: number | undefined;
1516
1616
  type: "worker";
1517
- })[], "Order view button ids must be unique.">]>, undefined>;
1617
+ })[], "Order view button ids must be unique after Commerce id sanitization.">]>, undefined>;
1518
1618
  }, undefined>, undefined>;
1519
1619
  readonly product: v.OptionalSchema<v.ObjectSchema<{
1520
1620
  readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
@@ -1530,7 +1630,13 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1530
1630
  id: string;
1531
1631
  label: string;
1532
1632
  type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
1533
- }[], 1, "At least one grid column is required">]>;
1633
+ }[], 1, "At least one grid column is required">, v.CheckAction<{
1634
+ aclProtected?: boolean | undefined;
1635
+ align: "left" | "right" | "center";
1636
+ id: string;
1637
+ label: string;
1638
+ type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
1639
+ }[], "Grid column ids must be unique after Commerce id sanitization.">]>;
1534
1640
  readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1535
1641
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1536
1642
  readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
@@ -1607,7 +1713,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1607
1713
  } | undefined;
1608
1714
  selectionLimit?: number | undefined;
1609
1715
  title?: string | undefined;
1610
- })[], "Mass action ids must be unique.">]>, undefined>;
1716
+ })[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
1611
1717
  }, undefined>, undefined>;
1612
1718
  }, undefined>, undefined>;
1613
1719
  readonly businessConfig: v.OptionalSchema<v.ObjectSchema<{
@@ -1975,7 +2081,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1975
2081
  readonly description: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 255, "The metadata description must not be longer than 255 characters">]>;
1976
2082
  readonly displayName: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 50, "The application display name must not be longer than 50 characters">]>;
1977
2083
  readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>, v.MaxLengthAction<string, 100, "The application id must not be longer than 100 characters">]>;
1978
- readonly upgradeMode: v.OptionalSchema<v.PicklistSchema<["auto", "manual"], undefined>, "auto">;
2084
+ readonly upgradeMode: v.OptionalSchema<v.PicklistSchema<["auto", "manual"], undefined>, "manual">;
1979
2085
  readonly version: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.RegexAction<string, "The version must follow semantic versioning (semver) format: Major.Minor.Patch (e.g., '1.0.0', '2.3.1')">]>;
1980
2086
  }, undefined>;
1981
2087
  readonly webhooks: v.OptionalSchema<v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
@@ -14,16 +14,16 @@
14
14
  */
15
15
 
16
16
  import { t as stringifyError } from "../error-_RMwtrUA.mjs";
17
- import { _ as makeOutputDirFor, a as resolveCommerceAppConfig, c as getExecCommand, d as getPackageExecutionCommand, f as getProjectInstallCommand, g as loadPackageJson, h as isESM, i as readCommerceAppConfig, l as getInstallCommand, m as getRunScriptCommand, n as isTypeScriptConfig, o as appendCommand, p as getProjectRootDirectory, r as parseCommerceAppConfig, s as detectPackageManager, t as hasNamedCommerceAppConfigExports, u as getPackageDependencyInstallPlan, v as mergePackageJsonDependencies, y as readPackageJson } from "../index.node-DRTF5Hue.mjs";
18
- import { a as hasCustomInstallationSteps, d as hasAdminUi } from "../webhooks-BQ8kSN2Z.mjs";
19
- import { a as getConfigDomains, l as hasBusinessConfigSchema, t as validateCommerceAppConfig } from "../validate-8AXMGEwr.mjs";
20
- import { n as INSTALLATION_INVOCATION_SOURCE_HEADER, r as POST_APP_DEPLOY_INVOCATION_SOURCE } from "../common-BVG9tiX0.mjs";
17
+ import { _ as makeOutputDirFor, a as resolveCommerceAppConfig, c as getExecCommand, d as getPackageExecutionCommand, f as getProjectInstallCommand, g as loadPackageJson, h as isESM, i as readCommerceAppConfig, l as getInstallCommand, m as getRunScriptCommand, n as isTypeScriptConfig, o as appendCommand, p as getProjectRootDirectory, r as parseCommerceAppConfig, s as detectPackageManager, t as hasNamedCommerceAppConfigExports, u as getPackageDependencyInstallPlan, v as mergePackageJsonDependencies, y as readPackageJson } from "../index.node-CW46zuxW.mjs";
18
+ import { a as hasCustomInstallationSteps, f as hasBackendUiV2Components } from "../webhooks-CHZ1SXxw.mjs";
19
+ import { o as getConfigDomains, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../validate-NzW1FQwL.mjs";
20
+ import { n as INSTALLATION_INVOCATION_SOURCE_HEADER, r as POST_APP_DEPLOY_INVOCATION_SOURCE } from "../common-dy6NrZt8.mjs";
21
21
  import { t as inspect } from "../logging-CXesop3u.mjs";
22
22
  import { hasDynamicSchema } from "@adobe/aio-commerce-lib-config";
23
23
  import { CommerceSdkValidationError } from "@adobe/aio-commerce-lib-core/error";
24
24
  import { stringify as stringify$1 } from "safe-stable-stringify";
25
25
  import consola$1, { consola } from "consola";
26
- import { existsSync, readFileSync, writeFileSync } from "fs";
26
+ import { constants, existsSync, readFileSync, writeFileSync } from "fs";
27
27
  import { access, copyFile, mkdir, readFile, readdir, rm, writeFile } from "fs/promises";
28
28
  import path, { basename, dirname, extname, join, relative, resolve, sep } from "path";
29
29
  import { colorize, colors, formatTree } from "consola/utils";
@@ -362,13 +362,14 @@ const TSX_FILE_EXTENSION = ".tsx";
362
362
  const APP_TITLE_PLACEHOLDER = "APP_TITLE";
363
363
  const WEB_SOURCE_ENTRYPOINT_FILE = "index.html";
364
364
  const WEB_SOURCE_IMPORT_ALIAS = "#web/*";
365
+ const WEB_SOURCE_REQUIRED_FILES = [".babelrc"];
365
366
  const WEB_SOURCE_TSCONFIG_FILE = "tsconfig.json";
366
367
  const LEADING_DOT_SLASH_PATTERN$1 = /^\.\//u;
367
368
  /** Runtime dependencies required by the generated web-src app. */
368
369
  const WEB_SOURCE_DEPENDENCIES = [
369
370
  {
370
371
  name: "@adobe/aio-commerce-lib-admin-ui",
371
- version: "^1.1.0-beta-20260820174436"
372
+ version: "^1.1.0"
372
373
  },
373
374
  {
374
375
  name: "react",
@@ -383,14 +384,26 @@ const WEB_SOURCE_DEPENDENCIES = [
383
384
  version: "^1.5.1"
384
385
  }
385
386
  ];
386
- /** Development dependencies required by the generated web-src app. */
387
- const WEB_SOURCE_DEV_DEPENDENCIES = [{
388
- name: "@types/react",
389
- version: "^19.2.17"
387
+ const WEB_SOURCE_BABEL_DEV_DEPENDENCIES = [{
388
+ name: "@babel/core",
389
+ version: "^7.29.7"
390
390
  }, {
391
- name: "@types/react-dom",
392
- version: "^19.2.3"
391
+ name: "@babel/preset-react",
392
+ version: "^7.29.7"
393
393
  }];
394
+ /** Development dependencies required by the generated web-src app. */
395
+ const WEB_SOURCE_DEV_DEPENDENCIES = [
396
+ ...WEB_SOURCE_BABEL_DEV_DEPENDENCIES,
397
+ {
398
+ name: "@types/react",
399
+ version: "^19.2.17"
400
+ },
401
+ {
402
+ name: "@types/react-dom",
403
+ version: "^19.2.3"
404
+ }
405
+ ];
406
+ const WEB_SOURCE_REQUIRED_DEV_DEPENDENCIES = WEB_SOURCE_BABEL_DEV_DEPENDENCIES;
394
407
  const WEB_SOURCE_SHARED_BUNDLES = [{
395
408
  assets: ["**/@react-spectrum/s2/**", "src/commerce-backend-ui-2/web-src/*.{js,jsx,ts,tsx}"],
396
409
  name: "s2-styles",
@@ -435,34 +448,37 @@ function getWebSourceEntrypoint(extConfig) {
435
448
  * @param projectRoot - Resolved project root containing package.json.
436
449
  * @param extension - Web source extension whose tooling is configured.
437
450
  */
438
- async function prepareWebSourcePackage(projectRoot, extension) {
451
+ async function prepareWebSourcePackage(projectRoot, extension, scaffoldRequired) {
439
452
  const pkg = await loadPackageJson(projectRoot);
440
453
  if (pkg === null) throw new Error("Could not find package.json.");
441
- const requiredDevDependencies = [...WEB_SOURCE_DEV_DEPENDENCIES, ...extension === "tsx" ? SHARED_TYPESCRIPT_DEV_DEPENDENCIES : []];
442
- const installPlan = await getPackageDependencyInstallPlan([...WEB_SOURCE_DEPENDENCIES, ...requiredDevDependencies], projectRoot);
454
+ const dependencies = scaffoldRequired ? WEB_SOURCE_DEPENDENCIES : [];
455
+ const requiredDevDependencies = scaffoldRequired ? [...WEB_SOURCE_DEV_DEPENDENCIES, ...extension === "tsx" ? SHARED_TYPESCRIPT_DEV_DEPENDENCIES : []] : WEB_SOURCE_REQUIRED_DEV_DEPENDENCIES;
456
+ const installPlan = await getPackageDependencyInstallPlan([...dependencies, ...requiredDevDependencies], projectRoot);
443
457
  if (installPlan.incompatible.length > 0) {
444
458
  const incompatibleDependencies = installPlan.incompatible.map(({ name, version, installedVersion }) => `${name}@${installedVersion} does not satisfy ${version}`).join("\n");
445
459
  throw new Error(`Cannot scaffold web-src because installed dependencies are incompatible:\n${incompatibleDependencies}`);
446
460
  }
447
- const dependencies = pkg.content.dependencies ?? {};
461
+ const existingDependencies = pkg.content.dependencies ?? {};
448
462
  const devDependencies = pkg.content.devDependencies ?? {};
449
- const dependencyMaps = [dependencies, devDependencies];
463
+ const dependencyMaps = [existingDependencies, devDependencies];
450
464
  const declaredDependencyNames = new Set(dependencyMaps.flatMap((depMap) => Object.keys(depMap)));
451
- const dependenciesToDeclare = [...WEB_SOURCE_DEPENDENCIES, ...requiredDevDependencies].filter(({ name }) => !declaredDependencyNames.has(name));
465
+ const dependenciesToDeclare = [...dependencies, ...requiredDevDependencies].filter(({ name }) => !declaredDependencyNames.has(name));
452
466
  if (dependenciesToDeclare.length > 0) {
453
467
  consola.info("Adding web-src dependencies in package.json:");
454
468
  consola.log.raw(formatTree(dependenciesToDeclare.map(({ name, version }) => ` ${name}@${version}`)));
455
469
  } else consola.info("web-src dependencies are already declared in package.json.");
456
470
  pkg.update({
457
- "@parcel/bundler-default": {
458
- ...pkg.content["@parcel/bundler-default"],
459
- manualSharedBundles: WEB_SOURCE_SHARED_BUNDLES
460
- },
461
- "@parcel/resolver-default": {
462
- ...pkg.content["@parcel/resolver-default"],
463
- packageExports: true
471
+ ...scaffoldRequired && {
472
+ "@parcel/bundler-default": {
473
+ ...pkg.content["@parcel/bundler-default"],
474
+ manualSharedBundles: WEB_SOURCE_SHARED_BUNDLES
475
+ },
476
+ "@parcel/resolver-default": {
477
+ ...pkg.content["@parcel/resolver-default"],
478
+ packageExports: true
479
+ },
480
+ dependencies: mergePackageJsonDependencies(existingDependencies, WEB_SOURCE_DEPENDENCIES, dependencyMaps)
464
481
  },
465
- dependencies: mergePackageJsonDependencies(dependencies, WEB_SOURCE_DEPENDENCIES, dependencyMaps),
466
482
  devDependencies: mergePackageJsonDependencies(devDependencies, requiredDevDependencies, dependencyMaps)
467
483
  });
468
484
  await pkg.save();
@@ -476,6 +492,20 @@ async function prepareWebSourcePackage(projectRoot, extension) {
476
492
  runProjectInstall(packageManager, projectRoot);
477
493
  }
478
494
  /**
495
+ * Copies required web-src support files that are not already present.
496
+ * @param sourceDir - Directory containing required web source files.
497
+ * @param targetDir - Generated or existing web source directory.
498
+ * @param projectRoot - Resolved project root used to format output paths.
499
+ */
500
+ async function copyMissingWebSourceFiles(sourceDir, targetDir, projectRoot) {
501
+ return (await Promise.all(WEB_SOURCE_REQUIRED_FILES.map(async (file) => {
502
+ const targetPath = join(targetDir, file);
503
+ if (existsSync(targetPath)) return null;
504
+ await copyFile(join(sourceDir, file), targetPath, constants.COPYFILE_EXCL);
505
+ return ` ${relative(projectRoot, targetPath)}`;
506
+ }))).filter((path) => path !== null);
507
+ }
508
+ /**
479
509
  * Add the package import alias for an existing or generated web-src.
480
510
  * @param extConfig - Extension config containing the view operation.
481
511
  * @param projectRoot - Resolved project root containing package.json.
@@ -548,23 +578,29 @@ async function generateWebSrc(extConfig, appName, projectRoot, templatesDir = TE
548
578
  const entrypoint = getWebSourceEntrypoint(extConfig);
549
579
  if (entrypoint === null) return;
550
580
  const entrypointPath = join(projectRoot, entrypoint);
551
- if (existsSync(entrypointPath)) {
552
- consola.info(`web-src entrypoint already exists, skipping scaffold: ${relative(projectRoot, entrypointPath)}`);
553
- return;
554
- }
555
- consola.start(`Scaffolding web-src for ${BACKEND_UI_V2_EXTENSION_POINT_ID}...`);
556
- const sourceDir = join(templatesDir, "admin-ui", "web-src");
581
+ const scaffoldRequired = !existsSync(entrypointPath);
557
582
  const targetDir = dirname(entrypointPath);
558
583
  const extension = await resolveWebSourceExtension(projectRoot);
559
- const outputFiles = await copyWebSourceTemplates(sourceDir, targetDir, extension, appName, projectRoot);
560
- if (extension === "tsx") {
561
- const tsconfigPath = await writeWebSourceTypeScriptConfig(targetDir);
562
- outputFiles.push(` ${relative(projectRoot, tsconfigPath)}`);
563
- await syncWebSourceTypecheckScript(projectRoot);
584
+ const sourceDir = join(templatesDir, "admin-ui", "web-src");
585
+ let outputFiles = [];
586
+ if (scaffoldRequired) {
587
+ consola.start(`Scaffolding web-src for ${BACKEND_UI_V2_EXTENSION_POINT_ID}...`);
588
+ outputFiles = await copyWebSourceTemplates(sourceDir, targetDir, extension, appName, projectRoot);
589
+ if (extension === "tsx") {
590
+ const tsconfigPath = await writeWebSourceTypeScriptConfig(targetDir);
591
+ outputFiles.push(` ${relative(projectRoot, tsconfigPath)}`);
592
+ await syncWebSourceTypecheckScript(projectRoot);
593
+ }
594
+ } else consola.info(`web-src entrypoint already exists, skipping scaffold: ${relative(projectRoot, entrypointPath)}`);
595
+ const requiredFiles = await copyMissingWebSourceFiles(sourceDir, targetDir, projectRoot);
596
+ if (scaffoldRequired || requiredFiles.length > 0) await prepareWebSourcePackage(projectRoot, extension, scaffoldRequired);
597
+ if (scaffoldRequired) {
598
+ consola.success(`Scaffolded ${relative(projectRoot, targetDir)}`);
599
+ consola.log.raw(formatTree([...outputFiles, ...requiredFiles]));
600
+ } else if (requiredFiles.length > 0) {
601
+ consola.success(`Added required files to ${relative(projectRoot, targetDir)}`);
602
+ consola.log.raw(formatTree(requiredFiles));
564
603
  }
565
- await prepareWebSourcePackage(projectRoot, extension);
566
- consola.success(`Scaffolded ${relative(projectRoot, targetDir)}`);
567
- consola.log.raw(formatTree(outputFiles));
568
604
  }
569
605
 
570
606
  //#endregion
@@ -1012,14 +1048,16 @@ async function updateAppConfigImportAlias(projectRoot, runtimeConfigPath) {
1012
1048
  async function writeJavaScriptAppConfigModule(configFilePath, outputPath) {
1013
1049
  const configImportPath = normalizeImportPath(relative(dirname(outputPath), configFilePath));
1014
1050
  const isJson = extname(configFilePath) === ".json";
1051
+ const importAttributes = isJson ? " with { type: \"json\" }" : "";
1052
+ const defaultExport = isJson ? `export default /** @type {import("@adobe/aio-commerce-lib-app/config").CommerceAppConfig} */ (appConfig);` : "export default appConfig;";
1015
1053
  await writeFile(outputPath, [
1016
1054
  "// This file has been auto-generated by `@adobe/aio-commerce-lib-app`",
1017
1055
  "// Do not modify this file directly",
1018
1056
  "",
1019
- `import appConfig from "${configImportPath}"${isJson ? " with { type: \"json\" }" : ""};`,
1057
+ `import appConfig from "${configImportPath}"${importAttributes};`,
1020
1058
  "",
1021
1059
  isJson ? null : `export * from "${configImportPath}";`,
1022
- "export default appConfig;",
1060
+ defaultExport,
1023
1061
  ""
1024
1062
  ].filter((item) => item !== null).join("\n"), "utf-8");
1025
1063
  }
@@ -1203,7 +1241,7 @@ async function run$8(appManifest, projectRoot, templatesDir = TEMPLATES_DIR) {
1203
1241
  const businessConfigExtConfig = await updateExtConfig(appManifest, CONFIGURATION_EXTENSION_POINT_ID, projectRoot);
1204
1242
  await generateActionFiles(appManifest, getRuntimeActions(businessConfigExtConfig, "business-configuration"), CONFIGURATION_EXTENSION_POINT_ID, templatesDir, projectRoot);
1205
1243
  }
1206
- if (hasAdminUi(appManifest)) {
1244
+ if (hasBackendUiV2Components(appManifest)) {
1207
1245
  const extConfig = await updateExtConfig(appManifest, BACKEND_UI_V2_EXTENSION_POINT_ID, projectRoot);
1208
1246
  if (extConfig.operations?.view) {
1209
1247
  await prepareWebSourceImportAlias(extConfig, projectRoot);
@@ -1612,7 +1650,7 @@ async function run$3(extension, projectRoot, templatesDir = TEMPLATES_DIR) {
1612
1650
  return;
1613
1651
  }
1614
1652
  if (extension === "backend-ui/2") {
1615
- if (hasAdminUi(appManifest)) {
1653
+ if (hasBackendUiV2Components(appManifest)) {
1616
1654
  const extConfig = await updateExtConfig(appManifest, BACKEND_UI_V2_EXTENSION_POINT_ID, projectRoot);
1617
1655
  if (extConfig.operations?.view) {
1618
1656
  await prepareWebSourceImportAlias(extConfig, projectRoot);
@@ -2032,11 +2070,12 @@ async function writePostinstallHook(execCommand, projectRoot) {
2032
2070
  /**
2033
2071
  * Ensures app.config.yaml references the enabled domain extensions.
2034
2072
  * @param domains - Domains enabled in the app configuration.
2073
+ * @param config - The validated app configuration.
2035
2074
  * @param projectRoot - Resolved project root containing app.config.yaml.
2036
2075
  */
2037
- async function ensureAppConfig(domains, projectRoot) {
2076
+ async function ensureAppConfig(domains, config, projectRoot) {
2038
2077
  if (domains.has("businessConfig.schema")) await addExtensionPointToAppConfig(CONFIGURATION_EXTENSION_POINT_ID, projectRoot, " This extension is required for business configuration. Do not remove.");
2039
- if (domains.has("adminUi")) await addExtensionPointToAppConfig(BACKEND_UI_V2_EXTENSION_POINT_ID, projectRoot, " This extension is required for Admin UI. Do not remove.");
2078
+ if (hasBackendUiV2Components(config)) await addExtensionPointToAppConfig(BACKEND_UI_V2_EXTENSION_POINT_ID, projectRoot, " This extension is required for Admin UI. Do not remove.");
2040
2079
  await addExtensionPointToAppConfig(EXTENSIBILITY_EXTENSION_POINT_ID, projectRoot, " This extension is required for app management. Do not remove.");
2041
2080
  }
2042
2081
  /**
@@ -2047,7 +2086,7 @@ async function ensureAppConfig(domains, projectRoot) {
2047
2086
  */
2048
2087
  function installDependencies(packageManager, domains, projectRoot) {
2049
2088
  const packages = [];
2050
- if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.6.1`);
2089
+ if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.8.0`);
2051
2090
  if (packages.length === 0) {
2052
2091
  consola.info("No additional domain dependencies to install.");
2053
2092
  return;
@@ -2072,17 +2111,18 @@ async function runGeneration(appConfig, execCommand, projectRoot) {
2072
2111
  /**
2073
2112
  * Ensures install.yaml references the enabled domain extensions.
2074
2113
  * @param domains - Domains enabled in the app configuration.
2114
+ * @param config - The validated app configuration.
2075
2115
  * @param projectRoot - Resolved project root containing install.yaml.
2076
2116
  */
2077
- async function ensureInstallYaml(domains, projectRoot) {
2117
+ async function ensureInstallYaml(domains, config, projectRoot) {
2078
2118
  if (domains.has("businessConfig.schema")) await addExtensionPointToInstallYaml(CONFIGURATION_EXTENSION_POINT_ID, projectRoot, " This extension is required for business configuration. Do not remove.");
2079
- if (domains.has("adminUi")) await addExtensionPointToInstallYaml(BACKEND_UI_V2_EXTENSION_POINT_ID, projectRoot, " This extension is required for Admin UI. Do not remove.");
2119
+ if (hasBackendUiV2Components(config)) await addExtensionPointToInstallYaml(BACKEND_UI_V2_EXTENSION_POINT_ID, projectRoot, " This extension is required for Admin UI. Do not remove.");
2080
2120
  await addExtensionPointToInstallYaml(EXTENSIBILITY_EXTENSION_POINT_ID, projectRoot, " This extension is required for app management. Do not remove.");
2081
2121
  }
2082
2122
 
2083
2123
  //#endregion
2084
2124
  //#region source/commands/init/main.ts
2085
- const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@2.0.0-beta-20260820174436`];
2125
+ const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@2.0.0`];
2086
2126
  /**
2087
2127
  * Initializes a Commerce App project.
2088
2128
  * @param flags - Non-interactive initialization answers.
@@ -2107,8 +2147,8 @@ async function run(flags, extraOptions) {
2107
2147
  await pkg.save();
2108
2148
  if (isTypeScriptProject) await syncActionsTypecheckScript(projectRoot);
2109
2149
  await runGeneration(config, execCommand, projectRoot);
2110
- await ensureAppConfig(domains, projectRoot);
2111
- await ensureInstallYaml(domains, projectRoot);
2150
+ await ensureAppConfig(domains, config, projectRoot);
2151
+ await ensureInstallYaml(domains, config, projectRoot);
2112
2152
  await writePostinstallHook(execCommand, projectRoot);
2113
2153
  consola.success("Initialization complete!");
2114
2154
  consola.box([
@@ -0,0 +1,14 @@
1
+ {
2
+ "env": {
3
+ "development": {
4
+ "presets": [
5
+ ["@babel/preset-react", { "runtime": "automatic", "development": true }]
6
+ ]
7
+ },
8
+ "production": {
9
+ "presets": [
10
+ ["@babel/preset-react", { "runtime": "automatic", "development": false }]
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -5,5 +5,11 @@ import { configRuntimeAction } from "@adobe/aio-commerce-lib-app/actions/config"
5
5
 
6
6
  import config from "#app.commerce.config";
7
7
 
8
- const args = { configSchema: config.businessConfig.schema };
8
+ const businessConfig = /** @type {NonNullable<typeof config.businessConfig>} */ (
9
+ config.businessConfig
10
+ );
11
+ const configSchema = /** @type {NonNullable<typeof businessConfig.schema>} */ (
12
+ businessConfig.schema
13
+ );
14
+ const args = { configSchema };
9
15
  export const main = configRuntimeAction(args);
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { c as isCompletedState, d as isSucceededState, o as createRootInstallationStep } from "./management-BTWQdJNO.mjs";
15
+ import { c as isCompletedState, d as isSucceededState, o as createRootInstallationStep } from "./management-DgwAhaaJ.mjs";
16
16
  import { init } from "@adobe/aio-lib-state";
17
17
  import { getHeader } from "@adobe/aio-commerce-lib-core/headers";
18
18
  import { noContent, ok } from "@adobe/aio-commerce-lib-core/responses";
@@ -469,6 +469,13 @@ async function getInstallationSnapshot() {
469
469
  id: installSnapshot.id
470
470
  };
471
471
  }
472
+ /**
473
+ * Reads the persisted custom installation step history from a lifecycle snapshot's data. Returns
474
+ * `[]` when there's no snapshot or none was recorded (e.g. an install from before this feature).
475
+ */
476
+ function getExecutedCustomInstallationSteps(data) {
477
+ return (data?.installation?.customInstallationSteps?.reconciliation)?.executedSteps ?? [];
478
+ }
472
479
  /** Creates the shared storage read/write dependencies used by lifecycle orchestration. */
473
480
  async function createLifecyclePersistence() {
474
481
  const [stateStore, snapshotStore] = await Promise.all([createOrchestrationStateStore(), createAppStateSnapshotStore()]);
@@ -483,9 +490,9 @@ async function createLifecycleRuntime(params, appConfig, logger) {
483
490
  return {
484
491
  ...await createLifecyclePersistence(),
485
492
  lifecycleContext: buildLifecycleContext(params, appConfig, logger),
486
- rootStep: createRootInstallationStep(appConfig)
493
+ rootStep: createRootInstallationStep(appConfig, { forUpgrade: true })
487
494
  };
488
495
  }
489
496
 
490
497
  //#endregion
491
- export { normalizeExpiredAttempt as _, buildWorkflowParams as a, requireState as b, createLifecyclePersistence as c, getStorageKey as d, isPostAppDeployInvocation as f, CURRENT_STATE_KEY as g, getCurrentLifecycleBaseline as h, buildLifecycleContext as i, createLifecycleRuntime as l, createOrchestrationStateStore as m, INSTALLATION_INVOCATION_SOURCE_HEADER as n, createInstallationHooks as o, readStateFromStore as p, POST_APP_DEPLOY_INVOCATION_SOURCE as r, createInstallationStore as s, DEFAULT_ACTION_NAME as t, createUninstallationStore as u, readOrInitializeState as v, requireCurrentAttempt as y };
498
+ export { CURRENT_STATE_KEY as _, buildWorkflowParams as a, requireCurrentAttempt as b, createLifecyclePersistence as c, getExecutedCustomInstallationSteps as d, getStorageKey as f, getCurrentLifecycleBaseline as g, createOrchestrationStateStore as h, buildLifecycleContext as i, createLifecycleRuntime as l, readStateFromStore as m, INSTALLATION_INVOCATION_SOURCE_HEADER as n, createInstallationHooks as o, isPostAppDeployInvocation as p, POST_APP_DEPLOY_INVOCATION_SOURCE as r, createInstallationStore as s, DEFAULT_ACTION_NAME as t, createUninstallationStore as u, normalizeExpiredAttempt as v, requireState as x, readOrInitializeState as y };
@@ -12,5 +12,5 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { t as defineConfig } from "../define-DSU8Kgu0.mjs";
15
+ import { t as defineConfig } from "../define-Bq1zw9Lr.mjs";
16
16
  export { defineConfig };