@adobe/aio-commerce-lib-app 1.8.0-beta-20260714082406 → 1.8.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 (50) hide show
  1. package/CHANGELOG.md +14 -42
  2. package/dist/cjs/actions/app-config/index.cjs +3 -3
  3. package/dist/cjs/actions/app-config/index.d.cts +1 -1
  4. package/dist/cjs/actions/association/index.cjs +4 -4
  5. package/dist/cjs/actions/installation/index.cjs +2 -2
  6. package/dist/cjs/actions/installation/index.d.cts +2 -2
  7. package/dist/cjs/{app-D3P-Z6uY.d.cts → app-BwehWeu1.d.cts} +168 -12
  8. package/dist/cjs/commands/index.cjs +21 -13
  9. package/dist/cjs/commands/templates/admin-ui/web-src/src/app.jsx +1 -2
  10. package/dist/cjs/commands/templates/admin-ui/web-src/src/components/welcome.jsx +6 -2
  11. package/dist/cjs/config/index.browser.d.cts +1 -1
  12. package/dist/cjs/config/index.node.cjs +3 -3
  13. package/dist/cjs/config/index.node.d.cts +114 -10
  14. package/dist/cjs/{define-DBxAlJfN.d.cts → define-DOqVyexT.d.cts} +1 -1
  15. package/dist/{es/index-D52xglhZ.d.mts → cjs/index-B3ISkC54.d.cts} +3 -3
  16. package/dist/cjs/index.cjs +105 -87
  17. package/dist/cjs/index.d.cts +84 -71
  18. package/dist/cjs/{index.node-Dz4lV4qe.cjs → index.node-BWZuZLgs.cjs} +26 -10
  19. package/dist/cjs/management/index.cjs +1 -1
  20. package/dist/cjs/management/index.d.cts +1 -1
  21. package/dist/cjs/{management-B9ItB80R.cjs → management-DEsRVP2L.cjs} +1 -1
  22. package/dist/cjs/{openapi-CwytYdWl.cjs → openapi-C36q3dCZ.cjs} +1 -1
  23. package/dist/cjs/{association-repository-BAs3-VkW.cjs → repository-CbceYZqc.cjs} +2 -2
  24. package/dist/cjs/{validate-BfxhZ5Wv.cjs → validate-C_eCKp21.cjs} +2 -2
  25. package/dist/cjs/{webhooks-B5tb9NeF.cjs → webhooks-L4DWHSOl.cjs} +2 -2
  26. package/dist/es/actions/app-config/index.d.mts +1 -1
  27. package/dist/es/actions/app-config/index.mjs +3 -3
  28. package/dist/es/actions/association/index.mjs +3 -3
  29. package/dist/es/actions/installation/index.d.mts +2 -2
  30. package/dist/es/actions/installation/index.mjs +2 -2
  31. package/dist/es/{app-D3P-Z6uY.d.mts → app-BwehWeu1.d.mts} +168 -12
  32. package/dist/es/commands/index.mjs +21 -13
  33. package/dist/es/commands/templates/admin-ui/web-src/src/app.jsx +1 -2
  34. package/dist/es/commands/templates/admin-ui/web-src/src/components/welcome.jsx +6 -2
  35. package/dist/es/config/index.browser.d.mts +1 -1
  36. package/dist/es/config/index.node.d.mts +114 -10
  37. package/dist/es/config/index.node.mjs +3 -3
  38. package/dist/es/{define-EoYRZbpe.d.mts → define-DxH1BFia.d.mts} +1 -1
  39. package/dist/{cjs/index-CzReNwbF.d.cts → es/index-DSk-RmwM.d.mts} +3 -3
  40. package/dist/es/index.d.mts +83 -70
  41. package/dist/es/index.mjs +104 -87
  42. package/dist/es/{index.node-CDH5gwJE.mjs → index.node-DuvW9Sha.mjs} +21 -11
  43. package/dist/es/management/index.d.mts +1 -1
  44. package/dist/es/management/index.mjs +1 -1
  45. package/dist/es/{management-B89ApQVY.mjs → management-D5pmBBec.mjs} +1 -1
  46. package/dist/es/{openapi-CXonvevE.mjs → openapi-BSc2NRd2.mjs} +1 -1
  47. package/dist/es/{association-repository-BbQv9WCl.mjs → repository-BGmy0YeZ.mjs} +2 -2
  48. package/dist/es/{validate-9cRZWGrA.mjs → validate-t0T0F2MF.mjs} +2 -2
  49. package/dist/es/{webhooks-BBPbY2mb.mjs → webhooks-D7DExIDM.mjs} +2 -2
  50. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,87 +1,59 @@
1
1
  # @adobe/aio-commerce-lib-app
2
2
 
3
- ## 1.8.0-beta-20260714082406
4
- ### Minor Changes
5
-
3
+ ## 1.8.0
6
4
 
5
+ ### Minor Changes
7
6
 
8
7
  - [#528](https://github.com/adobe/aio-commerce-sdk/pull/528) [`0bb7d15`](https://github.com/adobe/aio-commerce-sdk/commit/0bb7d150961f631116b1ac421124960b5b857896) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Add the optional `aclProtected` field to Admin UI grid columns, mass actions, and order view buttons. When `true`, Commerce auto-generates a per-app ACL resource for the component from `metadata.id` for role-based access control, matching the existing menu behaviour.
9
8
 
10
-
11
-
12
9
  - [#522](https://github.com/adobe/aio-commerce-sdk/pull/522) [`4396a64`](https://github.com/adobe/aio-commerce-sdk/commit/4396a647ad22dba063cdf03a16e04aef9387212f) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Add optional `aclProtected` field to Admin UI menu configuration. When `true`, Commerce auto-generates a per-app ACL resource from `metadata.id` for role-based menu access control.
13
10
 
14
-
15
-
16
11
  - [#561](https://github.com/adobe/aio-commerce-sdk/pull/561) [`e85bec4`](https://github.com/adobe/aio-commerce-sdk/commit/e85bec40f1eaa91dd6bb7bc6954b2ecfc3ea4029) Thanks [@jcuerdo](https://github.com/jcuerdo)! - New `publishEvent` export for publishing a configured I/O Event from a runtime action by provider key and event name as declared in `app.commerce.config.ts`. Provider and event resolution happens automatically from metadata stored at installation time.
17
12
 
18
-
19
-
20
13
  - [#511](https://github.com/adobe/aio-commerce-sdk/pull/511) [`caed6d5`](https://github.com/adobe/aio-commerce-sdk/commit/caed6d5cbc526bc980221a06a59542427752a1ab) Thanks [@vinayrao2000](https://github.com/vinayrao2000)! - Add helpers to retrieve the Commerce instance an app is associated with from any runtime action: `getCommerceInstance()` returns the stored instance data, and `getCommerceClient(auth)` returns a ready-to-use Commerce HTTP client built from that instance.
21
14
 
22
-
23
-
24
15
  - [#508](https://github.com/adobe/aio-commerce-sdk/pull/508) [`c36f825`](https://github.com/adobe/aio-commerce-sdk/commit/c36f825aff7329fc2831d8aaca032d17bbee373a) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Add support for Admin UI menus in `commerce/backend-ui/2` via `adminUi.menu`.
25
16
 
26
-
17
+ - [#577](https://github.com/adobe/aio-commerce-sdk/pull/577) [`c78eae9`](https://github.com/adobe/aio-commerce-sdk/commit/c78eae9bb656f1b9698703685619f7d7f922be75) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Added `resolveIoEventCode` to compute an event's I/O Events event code from an app ID, event name, and provider type.
27
18
 
28
19
  - [#551](https://github.com/adobe/aio-commerce-sdk/pull/551) [`a66f389`](https://github.com/adobe/aio-commerce-sdk/commit/a66f3892622584d27cd6b5d2fc633e15bf9942a8) Thanks [@asalloum5](https://github.com/asalloum5)! - The app installation flow now enables the Admin UI SDK in Commerce before registering the extension, so Admin UI extensions are served correctly after install.
29
20
 
30
-
31
-
32
21
  - [#510](https://github.com/adobe/aio-commerce-sdk/pull/510) [`ce7768e`](https://github.com/adobe/aio-commerce-sdk/commit/ce7768e0ddc6ca35ad6ccec60f584c8bb5a743f0) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Webhooks and events now accept an optional `env` array (`"paas"` / `"saas"`) to scope them to specific Commerce environments. Items without `env` apply everywhere; scoped items are only installed on matching environments, and an event provider left with no applicable events is skipped entirely. The `app-config` action also accepts an optional `commerceEnv` query param that returns business-config fields, webhooks, and events already filtered to that environment. The installation and `scope-tree` actions now validate `commerceEnv` against the supported values (`"paas"` / `"saas"`) instead of accepting any string; this only rejects values that were never valid in practice.
33
22
 
34
-
23
+ - [#578](https://github.com/adobe/aio-commerce-sdk/pull/578) [`bcc02f2`](https://github.com/adobe/aio-commerce-sdk/commit/bcc02f26e8e5a58c8618f6b1b94dee70dd86a1a7) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - The generated `#app.commerce.config` module now re-exports any named exports from your `app.commerce.config.*` file, in addition to its default export.
35
24
 
36
25
  - [#486](https://github.com/adobe/aio-commerce-sdk/pull/486) [`413da36`](https://github.com/adobe/aio-commerce-sdk/commit/413da36dcd83e5a41c194f5af50611097659e725) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Add support for Admin UI grid column extensions on `commerce/backend-ui/2`.
37
26
 
27
+ - [#512](https://github.com/adobe/aio-commerce-sdk/pull/512) [`b259e61`](https://github.com/adobe/aio-commerce-sdk/commit/b259e61c05bcb7a025486d1515ce644fb6f4265b) Thanks [@jcuerdo](https://github.com/jcuerdo)! - Remove `commerce/backend-ui/1` support and the `adminUiSdk` config key. Migrate to `adminUi` and `commerce/backend-ui/2`.
38
28
 
39
-
40
- - [#512](https://github.com/adobe/aio-commerce-sdk/pull/512) [`b259e61`](https://github.com/adobe/aio-commerce-sdk/commit/b259e61c05bcb7a025486d1515ce644fb6f4265b) Thanks [@jcuerdo](https://github.com/jcuerdo)! - > [!NOTE]
41
- > This is not causing a major bump because the `adminUiSdk` property was in an experimental phase, which wasn't stabilized yet. A manual migration is still needed.
42
-
43
- Remove `commerce/backend-ui/1` support and the `adminUiSdk` config key. Migrate to `adminUi` and `commerce/backend-ui/2`.
44
-
45
29
  **Migration:** Replace `adminUiSdk` in your `app.commerce.config.*` with the `adminUi` config key. See the updated `usage.md` for the new shape. The generated `src/commerce-backend-ui-1/` directory and its `pre-app-build` hook can be removed from your project.
46
30
 
47
-
48
31
  - [#492](https://github.com/adobe/aio-commerce-sdk/pull/492) [`ce63b2b`](https://github.com/adobe/aio-commerce-sdk/commit/ce63b2b46f7ef1f2f68780b13e52d1c13fd5fe6e) Thanks [@jcuerdo](https://github.com/jcuerdo)! - Support Admin UI SDK v2 mass actions. Declare mass actions under `adminUi` with explicit `type: "view"` (iframe) or `type: "worker"` (runtime action), support for notifications, and a unified `selectionLimit` across Order, Product, and Customer entities.
49
32
 
50
-
51
-
52
33
  - [#534](https://github.com/adobe/aio-commerce-sdk/pull/534) [`b33ad74`](https://github.com/adobe/aio-commerce-sdk/commit/b33ad741c30262279180496ab28a82516569a17f) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Uninstallation now removes exactly the resources that were created at install time, even when the app configuration has since changed. Installs created before this change fall back to the current request config. The installation/uninstallation status responses now include an optional `config` field recording what was applied.
53
34
 
54
-
55
-
56
35
  - [#548](https://github.com/adobe/aio-commerce-sdk/pull/548) [`7670e39`](https://github.com/adobe/aio-commerce-sdk/commit/7670e39ae3cdf1172d9d9f09f0f100c19966d5a0) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Implement initial web source scaffolding for projects with Admin UI view operations
57
36
 
58
-
59
-
60
37
  - [#506](https://github.com/adobe/aio-commerce-sdk/pull/506) [`a18d900`](https://github.com/adobe/aio-commerce-sdk/commit/a18d900771df65a025dde2146da8422f08c5e4ae) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Add `adminUi.order.viewButtons` support on `commerce/backend-ui/2`, with `type: "view"` (iframe) and `type: "worker"` (runtime action) variants.
61
38
 
62
-
63
39
  ### Patch Changes
64
40
 
65
-
41
+ - [#576](https://github.com/adobe/aio-commerce-sdk/pull/576) [`b0c86a5`](https://github.com/adobe/aio-commerce-sdk/commit/b0c86a512965a691b3497ff1c286249508297388) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Commerce and external event names are now validated to be non-empty and unique within each provider in `app.commerce.config.ts`.
66
42
 
67
43
  - [#525](https://github.com/adobe/aio-commerce-sdk/pull/525) [`2e40262`](https://github.com/adobe/aio-commerce-sdk/commit/2e402628f1cd21a85dfb7c8dc3660a454f1053c0) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Characters in `metadata.id` that are disallowed by the Commerce Eventing API, such as hyphens, are now normalized to underscores in the generated event code.
68
44
 
69
-
70
-
71
45
  - [#528](https://github.com/adobe/aio-commerce-sdk/pull/528) [`0bb7d15`](https://github.com/adobe/aio-commerce-sdk/commit/0bb7d150961f631116b1ac421124960b5b857896) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Grid column entries in `adminUi` config now reject unknown keys (strict validation), so a mistyped field such as `aclprotected` surfaces a validation error instead of being silently dropped — matching the existing behavior of mass actions and view buttons.
72
46
 
73
-
74
-
75
47
  - [#548](https://github.com/adobe/aio-commerce-sdk/pull/548) [`7670e39`](https://github.com/adobe/aio-commerce-sdk/commit/7670e39ae3cdf1172d9d9f09f0f100c19966d5a0) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - For static business configs, the `#app.commerce.config` alias now resolves to a generated ESM module that re-exports the app manifest, so generated runtime actions can import it directly without needing a JSON import attribute.
76
48
 
77
- - Updated dependencies [[`0bb7d15`](https://github.com/adobe/aio-commerce-sdk/commit/0bb7d150961f631116b1ac421124960b5b857896), [`4396a64`](https://github.com/adobe/aio-commerce-sdk/commit/4396a647ad22dba063cdf03a16e04aef9387212f), [`c15b50f`](https://github.com/adobe/aio-commerce-sdk/commit/c15b50f667e6d1288270dbd4192c150db0ff0914), [`c36f825`](https://github.com/adobe/aio-commerce-sdk/commit/c36f825aff7329fc2831d8aaca032d17bbee373a), [`bdcced9`](https://github.com/adobe/aio-commerce-sdk/commit/bdcced9297ae5e1b87ce86490a2b6fad76b2e341), [`19400fb`](https://github.com/adobe/aio-commerce-sdk/commit/19400fbdfc03c5bbfc30f995a2acdd4272c5e032), [`e85bec4`](https://github.com/adobe/aio-commerce-sdk/commit/e85bec40f1eaa91dd6bb7bc6954b2ecfc3ea4029), [`a66f389`](https://github.com/adobe/aio-commerce-sdk/commit/a66f3892622584d27cd6b5d2fc633e15bf9942a8), [`ce7768e`](https://github.com/adobe/aio-commerce-sdk/commit/ce7768e0ddc6ca35ad6ccec60f584c8bb5a743f0), [`4396a64`](https://github.com/adobe/aio-commerce-sdk/commit/4396a647ad22dba063cdf03a16e04aef9387212f), [`e85bec4`](https://github.com/adobe/aio-commerce-sdk/commit/e85bec40f1eaa91dd6bb7bc6954b2ecfc3ea4029), [`413da36`](https://github.com/adobe/aio-commerce-sdk/commit/413da36dcd83e5a41c194f5af50611097659e725), [`413da36`](https://github.com/adobe/aio-commerce-sdk/commit/413da36dcd83e5a41c194f5af50611097659e725), [`ca2c4fe`](https://github.com/adobe/aio-commerce-sdk/commit/ca2c4febcdfbe52b933775f08e9a53765fc306ab), [`ce63b2b`](https://github.com/adobe/aio-commerce-sdk/commit/ce63b2b46f7ef1f2f68780b13e52d1c13fd5fe6e), [`caed6d5`](https://github.com/adobe/aio-commerce-sdk/commit/caed6d5cbc526bc980221a06a59542427752a1ab), [`19400fb`](https://github.com/adobe/aio-commerce-sdk/commit/19400fbdfc03c5bbfc30f995a2acdd4272c5e032)]:
78
- - @adobe/aio-commerce-lib-admin-ui@0.2.0-beta-20260714082406
79
- - @adobe/aio-commerce-lib-core@1.2.0-beta-20260714082406
80
- - @adobe/aio-commerce-lib-events@1.3.0-beta-20260714082406
81
- - @adobe/aio-commerce-lib-api@1.3.0-beta-20260714082406
82
- - @adobe/aio-commerce-lib-config@1.6.0-beta-20260714082406
83
- - @adobe/aio-commerce-lib-webhooks@1.2.0-beta-20260714082406
84
- - @adobe/aio-commerce-lib-auth@1.1.2-beta-20260714082406
49
+ - Updated dependencies [[`0bb7d15`](https://github.com/adobe/aio-commerce-sdk/commit/0bb7d150961f631116b1ac421124960b5b857896), [`4396a64`](https://github.com/adobe/aio-commerce-sdk/commit/4396a647ad22dba063cdf03a16e04aef9387212f), [`c15b50f`](https://github.com/adobe/aio-commerce-sdk/commit/c15b50f667e6d1288270dbd4192c150db0ff0914), [`c36f825`](https://github.com/adobe/aio-commerce-sdk/commit/c36f825aff7329fc2831d8aaca032d17bbee373a), [`bdcced9`](https://github.com/adobe/aio-commerce-sdk/commit/bdcced9297ae5e1b87ce86490a2b6fad76b2e341), [`19400fb`](https://github.com/adobe/aio-commerce-sdk/commit/19400fbdfc03c5bbfc30f995a2acdd4272c5e032), [`e85bec4`](https://github.com/adobe/aio-commerce-sdk/commit/e85bec40f1eaa91dd6bb7bc6954b2ecfc3ea4029), [`a66f389`](https://github.com/adobe/aio-commerce-sdk/commit/a66f3892622584d27cd6b5d2fc633e15bf9942a8), [`ce7768e`](https://github.com/adobe/aio-commerce-sdk/commit/ce7768e0ddc6ca35ad6ccec60f584c8bb5a743f0), [`4396a64`](https://github.com/adobe/aio-commerce-sdk/commit/4396a647ad22dba063cdf03a16e04aef9387212f), [`e85bec4`](https://github.com/adobe/aio-commerce-sdk/commit/e85bec40f1eaa91dd6bb7bc6954b2ecfc3ea4029), [`413da36`](https://github.com/adobe/aio-commerce-sdk/commit/413da36dcd83e5a41c194f5af50611097659e725), [`a5b6d61`](https://github.com/adobe/aio-commerce-sdk/commit/a5b6d6138d5f048426ef655c4dc37f470aa74e2b), [`413da36`](https://github.com/adobe/aio-commerce-sdk/commit/413da36dcd83e5a41c194f5af50611097659e725), [`ca2c4fe`](https://github.com/adobe/aio-commerce-sdk/commit/ca2c4febcdfbe52b933775f08e9a53765fc306ab), [`ce63b2b`](https://github.com/adobe/aio-commerce-sdk/commit/ce63b2b46f7ef1f2f68780b13e52d1c13fd5fe6e), [`caed6d5`](https://github.com/adobe/aio-commerce-sdk/commit/caed6d5cbc526bc980221a06a59542427752a1ab), [`19400fb`](https://github.com/adobe/aio-commerce-sdk/commit/19400fbdfc03c5bbfc30f995a2acdd4272c5e032)]:
50
+ - @adobe/aio-commerce-lib-admin-ui@0.2.0
51
+ - @adobe/aio-commerce-lib-core@1.2.0
52
+ - @adobe/aio-commerce-lib-events@1.3.0
53
+ - @adobe/aio-commerce-lib-api@1.3.0
54
+ - @adobe/aio-commerce-lib-auth@1.1.2
55
+ - @adobe/aio-commerce-lib-config@1.6.0
56
+ - @adobe/aio-commerce-lib-webhooks@1.2.0
85
57
 
86
58
  ## 1.7.0
87
59
 
@@ -15,7 +15,7 @@
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
16
  const require_rolldown_runtime = require('../../rolldown-runtime-Cozy-1ZF.cjs');
17
17
  const require_environment = require('../../environment-B7EnozSg.cjs');
18
- const require_validate = require('../../validate-BfxhZ5Wv.cjs');
18
+ const require_validate = require('../../validate-C_eCKp21.cjs');
19
19
  const require_router = require('../../router-hA_Y9gZ1.cjs');
20
20
  let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
21
21
  let valibot = require("valibot");
@@ -29,7 +29,7 @@ let crypto = require("crypto");
29
29
  * Loads the committed OpenAPI spec via dynamic import so it
30
30
  * lands in its own chunk and is not parsed on every cold start.
31
31
  */
32
- const importOpenApi = () => Promise.resolve().then(() => require("../../openapi-CwytYdWl.cjs"));
32
+ const importOpenApi = () => Promise.resolve().then(() => require("../../openapi-C36q3dCZ.cjs"));
33
33
  /** Matches component schema `$ref` strings, capturing the schema name. */
34
34
  const SCHEMA_REF_PATTERN = /"#\/components\/schemas\/(\w+)"/g;
35
35
  /**
@@ -80,7 +80,7 @@ function pruneUnusedTags(spec) {
80
80
  * @param domains - The active config domains.
81
81
  */
82
82
  function getOpenApiCacheKey(domains) {
83
- const input = `1.8.0-beta-20260714082406:${[...domains].sort().join(",")}:2.0.0`;
83
+ const input = `1.8.0:${[...domains].sort().join(",")}:2.0.0`;
84
84
  return (0, crypto.createHash)("sha256").update(input).digest("hex").slice(0, 8);
85
85
  }
86
86
  /** Returns the server URL to be set in the OpenAPI spec, based on the current namespace. */
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as CommerceAppConfig } from "../../app-D3P-Z6uY.cjs";
15
+ import { n as CommerceAppConfig } from "../../app-BwehWeu1.cjs";
16
16
  import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
17
17
 
18
18
  //#region source/actions/app-config/router.d.ts
@@ -14,7 +14,7 @@
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
16
  const require_rolldown_runtime = require('../../rolldown-runtime-Cozy-1ZF.cjs');
17
- const require_association_repository = require('../../association-repository-BAs3-VkW.cjs');
17
+ const require_repository = require('../../repository-CbceYZqc.cjs');
18
18
  const require_router = require('../../router-hA_Y9gZ1.cjs');
19
19
  let valibot = require("valibot");
20
20
  valibot = require_rolldown_runtime.__toESM(valibot, 1);
@@ -49,10 +49,10 @@ router.post("/", {
49
49
  handler: async (req, { logger }) => {
50
50
  const { commerceBaseUrl, commerceEnv } = req.body;
51
51
  logger.debug(`Storing association data (baseUrl: "${commerceBaseUrl}", env: "${commerceEnv}")`);
52
- await require_association_repository.setAssociationData({
52
+ await require_repository.setAssociationData({ commerce: {
53
53
  baseUrl: commerceBaseUrl,
54
54
  env: commerceEnv
55
- });
55
+ } });
56
56
  return (0, _adobe_aio_commerce_lib_core_responses.noContent)();
57
57
  }
58
58
  });
@@ -63,7 +63,7 @@ router.post("/", {
63
63
  */
64
64
  router.delete("/", { handler: async (_req, { logger }) => {
65
65
  logger.debug("Clearing association data");
66
- await require_association_repository.clearAssociationData();
66
+ await require_repository.clearAssociationData();
67
67
  return (0, _adobe_aio_commerce_lib_core_responses.noContent)();
68
68
  } });
69
69
 
@@ -15,8 +15,8 @@
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
16
  const require_rolldown_runtime = require('../../rolldown-runtime-Cozy-1ZF.cjs');
17
17
  const require_schemas = require('../../schemas-mLxMh_ko.cjs');
18
- const require_validate = require('../../validate-BfxhZ5Wv.cjs');
19
- const require_management = require('../../management-B9ItB80R.cjs');
18
+ const require_validate = require('../../validate-C_eCKp21.cjs');
19
+ const require_management = require('../../management-DEsRVP2L.cjs');
20
20
  const require_router = require('../../router-hA_Y9gZ1.cjs');
21
21
  let _adobe_aio_lib_state = require("@adobe/aio-lib-state");
22
22
  let valibot = require("valibot");
@@ -12,8 +12,8 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as CommerceAppConfig, r as CommerceAppConfigOutputModel } from "../../app-D3P-Z6uY.cjs";
16
- import { Y as InstallationContext } from "../../index-CzReNwbF.cjs";
15
+ import { n as CommerceAppConfig, r as CommerceAppConfigOutputModel } from "../../app-BwehWeu1.cjs";
16
+ import { Y as InstallationContext } from "../../index-B3ISkC54.cjs";
17
17
  import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
18
18
 
19
19
  //#region source/actions/installation/router.d.ts
@@ -650,7 +650,7 @@ declare const CommerceAppConfigSchemas: {
650
650
  })[], 1, "At least one configuration parameter is required">]>;
651
651
  readonly eventing: v.ObjectSchema<{
652
652
  readonly commerce: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
653
- readonly events: v.ArraySchema<v.ObjectSchema<{
653
+ readonly events: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
654
654
  readonly destination: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, undefined>;
655
655
  readonly fields: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
656
656
  readonly name: 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, "Field name must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), dashes (-), dots (.), and square brackets ([, ]), or be exactly \"*\"">]>;
@@ -672,7 +672,45 @@ declare const CommerceAppConfigSchemas: {
672
672
  readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
673
673
  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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
674
674
  readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
675
- }, undefined>, "Expected an array of Commerce events">;
675
+ }, undefined>, "Expected an array of Commerce events">, v.MinLengthAction<{
676
+ destination?: string | undefined;
677
+ fields: {
678
+ name: string;
679
+ source?: string | undefined;
680
+ }[];
681
+ force?: boolean | undefined;
682
+ hipaa_audit_required?: boolean | undefined;
683
+ name: string;
684
+ priority?: boolean | undefined;
685
+ rules?: {
686
+ field: string;
687
+ operator: "regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange";
688
+ value: string;
689
+ }[] | undefined;
690
+ description: string;
691
+ env?: ("paas" | "saas")[] | undefined;
692
+ label: string;
693
+ runtimeActions: string[];
694
+ }[], 1, "The Commerce event source configuration must define at least one event">, v.CheckAction<{
695
+ destination?: string | undefined;
696
+ fields: {
697
+ name: string;
698
+ source?: string | undefined;
699
+ }[];
700
+ force?: boolean | undefined;
701
+ hipaa_audit_required?: boolean | undefined;
702
+ name: string;
703
+ priority?: boolean | undefined;
704
+ rules?: {
705
+ field: string;
706
+ operator: "regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange";
707
+ value: string;
708
+ }[] | undefined;
709
+ description: string;
710
+ env?: ("paas" | "saas")[] | undefined;
711
+ label: string;
712
+ runtimeActions: string[];
713
+ }[], "Commerce event names must be unique. There must not be two events with the same name under the same provider.">]>;
676
714
  readonly provider: v.ObjectSchema<{
677
715
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
678
716
  readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
@@ -706,14 +744,28 @@ declare const CommerceAppConfigSchemas: {
706
744
  };
707
745
  }[], "Commerce provider labels must be unique">]>, undefined>;
708
746
  readonly external: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
709
- readonly events: v.ArraySchema<v.ObjectSchema<{
747
+ readonly events: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
710
748
  readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
711
749
  readonly name: 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, "Event name must contain only letters, digits, underscores, hyphens, and dots (e.g., \"external_event\", \"webhook.received\", \"my-event_123\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
712
750
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
713
751
  readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
714
752
  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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
715
753
  readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
716
- }, undefined>, "Expected an array of external events">;
754
+ }, undefined>, "Expected an array of external events">, v.MinLengthAction<{
755
+ hipaa_audit_required?: boolean | undefined;
756
+ name: string;
757
+ description: string;
758
+ env?: ("paas" | "saas")[] | undefined;
759
+ label: string;
760
+ runtimeActions: string[];
761
+ }[], 1, "The external event source configuration must define at least one event">, v.CheckAction<{
762
+ hipaa_audit_required?: boolean | undefined;
763
+ name: string;
764
+ description: string;
765
+ env?: ("paas" | "saas")[] | undefined;
766
+ label: string;
767
+ runtimeActions: string[];
768
+ }[], "External event names must be unique. There must not be two events with the same name under the same provider.">]>;
717
769
  readonly provider: v.ObjectSchema<{
718
770
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
719
771
  readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
@@ -736,7 +788,7 @@ declare const CommerceAppConfigSchemas: {
736
788
  }[], "External provider labels must be unique">]>, undefined>;
737
789
  }, undefined>;
738
790
  readonly "eventing.commerce": v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
739
- readonly events: v.ArraySchema<v.ObjectSchema<{
791
+ readonly events: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
740
792
  readonly destination: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, undefined>;
741
793
  readonly fields: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
742
794
  readonly name: 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, "Field name must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), dashes (-), dots (.), and square brackets ([, ]), or be exactly \"*\"">]>;
@@ -758,7 +810,45 @@ declare const CommerceAppConfigSchemas: {
758
810
  readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
759
811
  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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
760
812
  readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
761
- }, undefined>, "Expected an array of Commerce events">;
813
+ }, undefined>, "Expected an array of Commerce events">, v.MinLengthAction<{
814
+ destination?: string | undefined;
815
+ fields: {
816
+ name: string;
817
+ source?: string | undefined;
818
+ }[];
819
+ force?: boolean | undefined;
820
+ hipaa_audit_required?: boolean | undefined;
821
+ name: string;
822
+ priority?: boolean | undefined;
823
+ rules?: {
824
+ field: string;
825
+ operator: "regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange";
826
+ value: string;
827
+ }[] | undefined;
828
+ description: string;
829
+ env?: ("paas" | "saas")[] | undefined;
830
+ label: string;
831
+ runtimeActions: string[];
832
+ }[], 1, "The Commerce event source configuration must define at least one event">, v.CheckAction<{
833
+ destination?: string | undefined;
834
+ fields: {
835
+ name: string;
836
+ source?: string | undefined;
837
+ }[];
838
+ force?: boolean | undefined;
839
+ hipaa_audit_required?: boolean | undefined;
840
+ name: string;
841
+ priority?: boolean | undefined;
842
+ rules?: {
843
+ field: string;
844
+ operator: "regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange";
845
+ value: string;
846
+ }[] | undefined;
847
+ description: string;
848
+ env?: ("paas" | "saas")[] | undefined;
849
+ label: string;
850
+ runtimeActions: string[];
851
+ }[], "Commerce event names must be unique. There must not be two events with the same name under the same provider.">]>;
762
852
  readonly provider: v.ObjectSchema<{
763
853
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
764
854
  readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
@@ -792,14 +882,28 @@ declare const CommerceAppConfigSchemas: {
792
882
  };
793
883
  }[], "Commerce provider labels must be unique">]>;
794
884
  readonly "eventing.external": v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
795
- readonly events: v.ArraySchema<v.ObjectSchema<{
885
+ readonly events: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
796
886
  readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
797
887
  readonly name: 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, "Event name must contain only letters, digits, underscores, hyphens, and dots (e.g., \"external_event\", \"webhook.received\", \"my-event_123\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
798
888
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
799
889
  readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
800
890
  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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
801
891
  readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
802
- }, undefined>, "Expected an array of external events">;
892
+ }, undefined>, "Expected an array of external events">, v.MinLengthAction<{
893
+ hipaa_audit_required?: boolean | undefined;
894
+ name: string;
895
+ description: string;
896
+ env?: ("paas" | "saas")[] | undefined;
897
+ label: string;
898
+ runtimeActions: string[];
899
+ }[], 1, "The external event source configuration must define at least one event">, v.CheckAction<{
900
+ hipaa_audit_required?: boolean | undefined;
901
+ name: string;
902
+ description: string;
903
+ env?: ("paas" | "saas")[] | undefined;
904
+ label: string;
905
+ runtimeActions: string[];
906
+ }[], "External event names must be unique. There must not be two events with the same name under the same provider.">]>;
803
907
  readonly provider: v.ObjectSchema<{
804
908
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
805
909
  readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
@@ -1427,7 +1531,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1427
1531
  }, undefined>, undefined>;
1428
1532
  readonly eventing: v.OptionalSchema<v.ObjectSchema<{
1429
1533
  readonly commerce: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1430
- readonly events: v.ArraySchema<v.ObjectSchema<{
1534
+ readonly events: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1431
1535
  readonly destination: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, undefined>;
1432
1536
  readonly fields: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1433
1537
  readonly name: 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, "Field name must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), dashes (-), dots (.), and square brackets ([, ]), or be exactly \"*\"">]>;
@@ -1449,7 +1553,45 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1449
1553
  readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
1450
1554
  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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
1451
1555
  readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
1452
- }, undefined>, "Expected an array of Commerce events">;
1556
+ }, undefined>, "Expected an array of Commerce events">, v.MinLengthAction<{
1557
+ destination?: string | undefined;
1558
+ fields: {
1559
+ name: string;
1560
+ source?: string | undefined;
1561
+ }[];
1562
+ force?: boolean | undefined;
1563
+ hipaa_audit_required?: boolean | undefined;
1564
+ name: string;
1565
+ priority?: boolean | undefined;
1566
+ rules?: {
1567
+ field: string;
1568
+ operator: "regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange";
1569
+ value: string;
1570
+ }[] | undefined;
1571
+ description: string;
1572
+ env?: ("paas" | "saas")[] | undefined;
1573
+ label: string;
1574
+ runtimeActions: string[];
1575
+ }[], 1, "The Commerce event source configuration must define at least one event">, v.CheckAction<{
1576
+ destination?: string | undefined;
1577
+ fields: {
1578
+ name: string;
1579
+ source?: string | undefined;
1580
+ }[];
1581
+ force?: boolean | undefined;
1582
+ hipaa_audit_required?: boolean | undefined;
1583
+ name: string;
1584
+ priority?: boolean | undefined;
1585
+ rules?: {
1586
+ field: string;
1587
+ operator: "regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange";
1588
+ value: string;
1589
+ }[] | undefined;
1590
+ description: string;
1591
+ env?: ("paas" | "saas")[] | undefined;
1592
+ label: string;
1593
+ runtimeActions: string[];
1594
+ }[], "Commerce event names must be unique. There must not be two events with the same name under the same provider.">]>;
1453
1595
  readonly provider: v.ObjectSchema<{
1454
1596
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
1455
1597
  readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
@@ -1483,14 +1625,28 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
1483
1625
  };
1484
1626
  }[], "Commerce provider labels must be unique">]>, undefined>;
1485
1627
  readonly external: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1486
- readonly events: v.ArraySchema<v.ObjectSchema<{
1628
+ readonly events: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1487
1629
  readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1488
1630
  readonly name: 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, "Event name must contain only letters, digits, underscores, hyphens, and dots (e.g., \"external_event\", \"webhook.received\", \"my-event_123\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
1489
1631
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
1490
1632
  readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
1491
1633
  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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
1492
1634
  readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
1493
- }, undefined>, "Expected an array of external events">;
1635
+ }, undefined>, "Expected an array of external events">, v.MinLengthAction<{
1636
+ hipaa_audit_required?: boolean | undefined;
1637
+ name: string;
1638
+ description: string;
1639
+ env?: ("paas" | "saas")[] | undefined;
1640
+ label: string;
1641
+ runtimeActions: string[];
1642
+ }[], 1, "The external event source configuration must define at least one event">, v.CheckAction<{
1643
+ hipaa_audit_required?: boolean | undefined;
1644
+ name: string;
1645
+ description: string;
1646
+ env?: ("paas" | "saas")[] | undefined;
1647
+ label: string;
1648
+ runtimeActions: string[];
1649
+ }[], "External event names must be unique. There must not be two events with the same name under the same provider.">]>;
1494
1650
  readonly provider: v.ObjectSchema<{
1495
1651
  readonly description: 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, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
1496
1652
  readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
@@ -15,12 +15,12 @@
15
15
 
16
16
  const require_rolldown_runtime = require('../rolldown-runtime-Cozy-1ZF.cjs');
17
17
  const require_error = require('../error-D-N0PKSl.cjs');
18
- const require_index_node = require('../index.node-Dz4lV4qe.cjs');
19
- const require_webhooks = require('../webhooks-B5tb9NeF.cjs');
20
- const require_validate = require('../validate-BfxhZ5Wv.cjs');
18
+ const require_index_node = require('../index.node-BWZuZLgs.cjs');
19
+ const require_webhooks = require('../webhooks-L4DWHSOl.cjs');
20
+ const require_validate = require('../validate-C_eCKp21.cjs');
21
21
  const require_logging = require('../logging-udPuAJPt.cjs');
22
- let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
23
22
  let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
23
+ let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
24
24
  let path = require("path");
25
25
  path = require_rolldown_runtime.__toESM(path, 1);
26
26
  let fs = require("fs");
@@ -147,6 +147,10 @@ function hasDynamicAppConfig(appConfig) {
147
147
  const schema = appConfig.businessConfig?.schema;
148
148
  return Array.isArray(schema) && (0, _adobe_aio_commerce_lib_config.hasDynamicSchema)(schema);
149
149
  }
150
+ /** Whether preserving the app config requires generating a JavaScript module. */
151
+ async function requiresJavaScriptAppConfig(appConfig) {
152
+ return hasDynamicAppConfig(appConfig) || await require_index_node.hasNamedCommerceAppConfigExports();
153
+ }
150
154
  /**
151
155
  * Path to an extension point's `.generated` directory, relative to the project root.
152
156
  * @param extensionPointId - The extension point ID, e.g. "commerce/extensibility/1"
@@ -226,7 +230,7 @@ const WEB_SOURCE_IMPORT_ALIAS = "#web/*";
226
230
  const WEB_SOURCE_DEPENDENCIES = [
227
231
  {
228
232
  name: "@adobe/aio-commerce-lib-admin-ui",
229
- version: "^0.2.0-beta-20260714082406"
233
+ version: "^0.2.0"
230
234
  },
231
235
  {
232
236
  name: "react",
@@ -721,15 +725,18 @@ async function updateAppConfigImportAlias(projectRoot, runtimeConfigPath) {
721
725
  }
722
726
  /** Write an ESM passthrough module that re-exports an app config file. */
723
727
  async function writeJavaScriptAppConfigModule(configFilePath, outputPath) {
728
+ const configImportPath = normalizeImportPath((0, path.relative)((0, path.dirname)(outputPath), configFilePath));
729
+ const isJson = (0, path.extname)(configFilePath) === ".json";
724
730
  await (0, fs_promises.writeFile)(outputPath, [
725
731
  "// This file has been auto-generated by `@adobe/aio-commerce-lib-app`",
726
732
  "// Do not modify this file directly",
727
733
  "",
728
- `import appConfig from "${normalizeImportPath((0, path.relative)((0, path.dirname)(outputPath), configFilePath))}"${(0, path.extname)(configFilePath) === ".json" ? " with { type: \"json\" }" : ""};`,
734
+ `import appConfig from "${configImportPath}"${isJson ? " with { type: \"json\" }" : ""};`,
729
735
  "",
736
+ isJson ? null : `export * from "${configImportPath}";`,
730
737
  "export default appConfig;",
731
738
  ""
732
- ].join("\n"), "utf-8");
739
+ ].filter((item) => item !== null).join("\n"), "utf-8");
733
740
  }
734
741
  /** Bundle a TypeScript app config file into runtime-safe ESM. */
735
742
  async function bundleTypeScriptAppConfigModule(configFilePath, outputPath) {
@@ -751,7 +758,7 @@ async function generateRuntimeAppConfigModule() {
751
758
  await require_index_node.makeOutputDirFor((0, path.dirname)(runtimeConfigPath));
752
759
  const outputPath = (0, path.join)(projectRoot, runtimeConfigPath);
753
760
  const configFilePath = await require_index_node.resolveCommerceAppConfig(projectRoot);
754
- if (!configFilePath) throw new Error("Dynamic list options require an app.commerce.config.* file so generated actions can import the option factories at runtime.");
761
+ if (!configFilePath) throw new Error("Generating a JavaScript app config module requires an app.commerce.config.* file.");
755
762
  consola.consola.info("Generating JS config module...");
756
763
  if (TYPESCRIPT_CONFIG_EXTENSIONS.has((0, path.extname)(configFilePath))) await bundleTypeScriptAppConfigModule(configFilePath, outputPath);
757
764
  else await writeJavaScriptAppConfigModule(configFilePath, outputPath);
@@ -774,10 +781,11 @@ async function prepareStaticAppConfigImportAlias() {
774
781
  * Prepare runtime-side config artifacts consumed by generated actions: the
775
782
  * bundled ESM module and its `#app.commerce.config` package import alias.
776
783
  *
777
- * Dynamic schemas use the source config file, while static schemas use the generated JSON manifest.
784
+ * Configs that require JavaScript use the source config file, while serializable
785
+ * default-only configs use the generated JSON manifest.
778
786
  */
779
787
  async function prepareRuntimeAppConfigModule(appManifest) {
780
- if (hasDynamicAppConfig(appManifest)) {
788
+ if (await requiresJavaScriptAppConfig(appManifest)) {
781
789
  await generateRuntimeAppConfigModule();
782
790
  return;
783
791
  }
@@ -1040,7 +1048,7 @@ async function exec$5() {
1040
1048
  //#endregion
1041
1049
  //#region source/commands/generate/manifest/main.ts
1042
1050
  async function run$4(appConfig) {
1043
- if (hasDynamicAppConfig(appConfig)) {
1051
+ if (await requiresJavaScriptAppConfig(appConfig)) {
1044
1052
  const stalePath = (0, path.join)(await require_index_node.getProjectRootDirectory(), getManifestPath());
1045
1053
  if (await (0, fs_promises.access)(stalePath).then(() => true, () => false)) {
1046
1054
  await (0, fs_promises.rm)(stalePath, { force: true });
@@ -1615,7 +1623,7 @@ async function ensureAppConfig(domains, cwd = process.cwd()) {
1615
1623
  */
1616
1624
  function installDependencies(packageManager, domains, cwd = process.cwd()) {
1617
1625
  const packages = [];
1618
- if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.6.0-beta-20260714082406`);
1626
+ if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.6.0`);
1619
1627
  if (packages.length === 0) {
1620
1628
  consola.consola.info("No additional domain dependencies to install.");
1621
1629
  return;
@@ -1642,7 +1650,7 @@ async function ensureInstallYaml(domains, cwd = process.cwd()) {
1642
1650
 
1643
1651
  //#endregion
1644
1652
  //#region source/commands/init/main.ts
1645
- const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.8.0-beta-20260714082406`];
1653
+ const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.8.0`];
1646
1654
  /** Initialize the project */
1647
1655
  async function run(flags, extraOptions) {
1648
1656
  consola.consola.start("Initializing app...");
@@ -5,9 +5,8 @@ import config from "#app.commerce.config";
5
5
  import { MainPage } from "#web/pages/main-page.jsx";
6
6
 
7
7
  createExtensionApp({
8
+ menu: <MainPage />,
8
9
  metadata: {
9
10
  extensionId: config.metadata.id,
10
11
  },
11
-
12
- routes: [{ element: <MainPage />, index: true }],
13
12
  });