@adobe/aio-commerce-lib-app 1.8.0-beta-20260721105643 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -43
- package/dist/cjs/actions/app-config/index.cjs +3 -3
- package/dist/cjs/actions/app-config/index.d.cts +2 -2
- package/dist/cjs/actions/association/index.d.cts +0 -1
- package/dist/cjs/actions/config/index.d.cts +1 -1
- package/dist/cjs/actions/installation/index.cjs +2 -2
- package/dist/cjs/actions/installation/index.d.cts +3 -3
- package/dist/cjs/{app-BwehWeu1.d.cts → app-e4bCHpek.d.cts} +0 -1
- package/dist/cjs/commands/index.cjs +15 -10
- package/dist/cjs/commands/index.d.cts +1 -1
- package/dist/cjs/config/index.browser.d.cts +1 -1
- package/dist/cjs/config/index.node.cjs +3 -3
- package/dist/cjs/config/index.node.d.cts +3 -13
- package/dist/{es/define-DxH1BFia.d.mts → cjs/define-B__VyRtO.d.cts} +1 -2
- package/dist/{es/index-B0XqHwY5.d.mts → cjs/index-DWEigxhy.d.cts} +3 -1
- package/dist/{es/index-DSk-RmwM.d.mts → cjs/index-Ds7AyoNv.d.cts} +139 -64
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.cts +3 -2
- package/dist/cjs/{index.node-gWAIhXSG.cjs → index.node-Bv_FUgST.cjs} +26 -10
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/management/index.d.cts +1 -1
- package/dist/cjs/{management-DEsRVP2L.cjs → management-DmH7fVxy.cjs} +4 -2
- package/dist/cjs/{openapi-CwytYdWl.cjs → openapi-BzRN5Lc6.cjs} +1 -1
- package/dist/cjs/{utils-DSCmZ_iJ.cjs → utils-CGZGfXuy.cjs} +25 -0
- package/dist/cjs/{validate-C_eCKp21.cjs → validate-Dt0Fdj1L.cjs} +1 -1
- package/dist/cjs/{webhooks-L4DWHSOl.cjs → webhooks-CrHGA-sO.cjs} +0 -2
- package/dist/es/actions/app-config/index.d.mts +2 -2
- package/dist/es/actions/app-config/index.mjs +3 -3
- package/dist/es/actions/association/index.d.mts +0 -1
- package/dist/es/actions/config/index.d.mts +1 -1
- package/dist/es/actions/installation/index.d.mts +3 -3
- package/dist/es/actions/installation/index.mjs +2 -2
- package/dist/es/{app-BwehWeu1.d.mts → app-e4bCHpek.d.mts} +0 -1
- package/dist/es/commands/index.d.mts +1 -1
- package/dist/es/commands/index.mjs +15 -10
- package/dist/es/config/index.browser.d.mts +1 -1
- package/dist/es/config/index.node.d.mts +3 -14
- package/dist/es/config/index.node.mjs +3 -3
- package/dist/{cjs/define-DOqVyexT.d.cts → es/define-BEY_Q6rS.d.mts} +1 -2
- package/dist/{cjs/index-BXm8UbK7.d.cts → es/index-CgsSXApi.d.mts} +4 -1
- package/dist/{cjs/index-B3ISkC54.d.cts → es/index-Dsg4LZde.d.mts} +139 -64
- package/dist/es/index.d.mts +3 -2
- package/dist/es/index.mjs +1 -1
- package/dist/es/{index.node-BkSA7XIO.mjs → index.node-DsJ0QRGh.mjs} +21 -11
- package/dist/es/management/index.d.mts +1 -1
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-D5pmBBec.mjs → management-BpFkwoig.mjs} +4 -2
- package/dist/es/{openapi-CXonvevE.mjs → openapi-QEV7W6DH.mjs} +1 -1
- package/dist/es/{utils-_gj8L6eN.mjs → utils-D0O4r9jr.mjs} +20 -1
- package/dist/es/{validate-t0T0F2MF.mjs → validate-yqa8uIyb.mjs} +1 -1
- package/dist/es/{webhooks-D7DExIDM.mjs → webhooks-CVbZOxYS.mjs} +0 -2
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,96 +1,72 @@
|
|
|
1
1
|
# @adobe/aio-commerce-lib-app
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.9.0
|
|
4
|
+
|
|
4
5
|
### Minor Changes
|
|
5
6
|
|
|
7
|
+
- [#599](https://github.com/adobe/aio-commerce-sdk/pull/599) [`ac6c13b`](https://github.com/adobe/aio-commerce-sdk/commit/ac6c13b4124677820f8946c92e4cd63ab228eeae) Thanks [@obarcelonap](https://github.com/obarcelonap)! - The `adminUi` config schema (menu, grid columns, mass actions, order view buttons) is now stable. Breaking changes to these types will follow standard semver going forward.
|
|
6
8
|
|
|
9
|
+
### Patch Changes
|
|
7
10
|
|
|
8
|
-
- [#
|
|
11
|
+
- [#592](https://github.com/adobe/aio-commerce-sdk/pull/592) [`14f285f`](https://github.com/adobe/aio-commerce-sdk/commit/14f285f6ad9e3eaa3a0eb81b72bf071a94d99532) Thanks [@jcuerdo](https://github.com/jcuerdo)! - Clear stored event provider data during uninstall.
|
|
9
12
|
|
|
13
|
+
- Updated dependencies [[`ac6c13b`](https://github.com/adobe/aio-commerce-sdk/commit/ac6c13b4124677820f8946c92e4cd63ab228eeae)]:
|
|
14
|
+
- @adobe/aio-commerce-lib-admin-ui@1.0.0
|
|
10
15
|
|
|
16
|
+
## 1.8.0
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
### Minor Changes
|
|
13
19
|
|
|
20
|
+
- [#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.
|
|
14
21
|
|
|
22
|
+
- [#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.
|
|
15
23
|
|
|
16
24
|
- [#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
25
|
|
|
18
|
-
|
|
19
|
-
|
|
20
26
|
- [#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
27
|
|
|
22
|
-
|
|
23
|
-
|
|
24
28
|
- [#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
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
30
|
- [#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.
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
32
|
- [#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.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
34
|
- [#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.
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
36
|
- [#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.
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
38
|
- [#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`.
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
|
|
48
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)! - Remove `commerce/backend-ui/1` support and the `adminUiSdk` config key. Migrate to `adminUi` and `commerce/backend-ui/2`.
|
|
49
|
-
|
|
50
|
-
**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.
|
|
51
41
|
|
|
42
|
+
**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.
|
|
52
43
|
|
|
53
44
|
- [#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.
|
|
54
45
|
|
|
55
|
-
|
|
56
|
-
|
|
57
46
|
- [#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.
|
|
58
47
|
|
|
59
|
-
|
|
60
|
-
|
|
61
48
|
- [#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
|
|
62
49
|
|
|
63
|
-
|
|
64
|
-
|
|
65
50
|
- [#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.
|
|
66
51
|
|
|
67
|
-
|
|
68
52
|
### Patch Changes
|
|
69
53
|
|
|
70
|
-
|
|
71
|
-
|
|
72
54
|
- [#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`.
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
|
|
76
56
|
- [#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.
|
|
77
57
|
|
|
78
|
-
|
|
79
|
-
|
|
80
58
|
- [#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.
|
|
81
59
|
|
|
82
|
-
|
|
83
|
-
|
|
84
60
|
- [#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.
|
|
85
61
|
|
|
86
62
|
- 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)]:
|
|
87
|
-
- @adobe/aio-commerce-lib-admin-ui@0.2.0
|
|
88
|
-
- @adobe/aio-commerce-lib-core@1.2.0
|
|
89
|
-
- @adobe/aio-commerce-lib-events@1.3.0
|
|
90
|
-
- @adobe/aio-commerce-lib-api@1.3.0
|
|
91
|
-
- @adobe/aio-commerce-lib-auth@1.1.2
|
|
92
|
-
- @adobe/aio-commerce-lib-config@1.6.0
|
|
93
|
-
- @adobe/aio-commerce-lib-webhooks@1.2.0
|
|
63
|
+
- @adobe/aio-commerce-lib-admin-ui@0.2.0
|
|
64
|
+
- @adobe/aio-commerce-lib-core@1.2.0
|
|
65
|
+
- @adobe/aio-commerce-lib-events@1.3.0
|
|
66
|
+
- @adobe/aio-commerce-lib-api@1.3.0
|
|
67
|
+
- @adobe/aio-commerce-lib-auth@1.1.2
|
|
68
|
+
- @adobe/aio-commerce-lib-config@1.6.0
|
|
69
|
+
- @adobe/aio-commerce-lib-webhooks@1.2.0
|
|
94
70
|
|
|
95
71
|
## 1.7.0
|
|
96
72
|
|
|
@@ -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-
|
|
18
|
+
const require_validate = require('../../validate-Dt0Fdj1L.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-
|
|
32
|
+
const importOpenApi = () => Promise.resolve().then(() => require("../../openapi-BzRN5Lc6.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.
|
|
83
|
+
const input = `1.9.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,9 +12,9 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import
|
|
15
|
+
import "../../index-DWEigxhy.cjs";
|
|
16
|
+
import { n as CommerceAppConfig } from "../../app-e4bCHpek.cjs";
|
|
16
17
|
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
17
|
-
|
|
18
18
|
//#region source/actions/app-config/router.d.ts
|
|
19
19
|
/** The arguments required to create the runtime action for the app-config action. */
|
|
20
20
|
type RuntimeActionFactoryArgs = {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import "../../index-DWEigxhy.cjs";
|
|
15
16
|
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
16
17
|
import { BusinessConfigSchema } from "@adobe/aio-commerce-lib-config";
|
|
17
|
-
|
|
18
18
|
//#region source/actions/config/router.d.ts
|
|
19
19
|
/** The arguments required to create the runtime action for the config action. */
|
|
20
20
|
type ConfigActionFactoryArgs = {
|
|
@@ -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-
|
|
19
|
-
const require_management = require('../../management-
|
|
18
|
+
const require_validate = require('../../validate-Dt0Fdj1L.cjs');
|
|
19
|
+
const require_management = require('../../management-DmH7fVxy.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,10 +12,10 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
15
|
+
import "../../index-DWEigxhy.cjs";
|
|
16
|
+
import { n as CommerceAppConfig, r as CommerceAppConfigOutputModel } from "../../app-e4bCHpek.cjs";
|
|
17
|
+
import { Y as InstallationContext } from "../../index-Ds7AyoNv.cjs";
|
|
17
18
|
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
18
|
-
|
|
19
19
|
//#region source/actions/installation/router.d.ts
|
|
20
20
|
type CustomScriptsLoader = (config: CommerceAppConfigOutputModel, logger: InstallationContext["logger"]) => Record<string, unknown>;
|
|
21
21
|
/** Arguments for the runtime action factory. */
|
|
@@ -15,9 +15,9 @@
|
|
|
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-
|
|
19
|
-
const require_webhooks = require('../webhooks-
|
|
20
|
-
const require_validate = require('../validate-
|
|
18
|
+
const require_index_node = require('../index.node-Bv_FUgST.cjs');
|
|
19
|
+
const require_webhooks = require('../webhooks-CrHGA-sO.cjs');
|
|
20
|
+
const require_validate = require('../validate-Dt0Fdj1L.cjs');
|
|
21
21
|
const require_logging = require('../logging-udPuAJPt.cjs');
|
|
22
22
|
let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
|
|
23
23
|
let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
|
|
@@ -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.
|
|
233
|
+
version: "^1.0.0"
|
|
230
234
|
},
|
|
231
235
|
{
|
|
232
236
|
name: "react",
|
|
@@ -754,7 +758,7 @@ async function generateRuntimeAppConfigModule() {
|
|
|
754
758
|
await require_index_node.makeOutputDirFor((0, path.dirname)(runtimeConfigPath));
|
|
755
759
|
const outputPath = (0, path.join)(projectRoot, runtimeConfigPath);
|
|
756
760
|
const configFilePath = await require_index_node.resolveCommerceAppConfig(projectRoot);
|
|
757
|
-
if (!configFilePath) throw new Error("
|
|
761
|
+
if (!configFilePath) throw new Error("Generating a JavaScript app config module requires an app.commerce.config.* file.");
|
|
758
762
|
consola.consola.info("Generating JS config module...");
|
|
759
763
|
if (TYPESCRIPT_CONFIG_EXTENSIONS.has((0, path.extname)(configFilePath))) await bundleTypeScriptAppConfigModule(configFilePath, outputPath);
|
|
760
764
|
else await writeJavaScriptAppConfigModule(configFilePath, outputPath);
|
|
@@ -777,10 +781,11 @@ async function prepareStaticAppConfigImportAlias() {
|
|
|
777
781
|
* Prepare runtime-side config artifacts consumed by generated actions: the
|
|
778
782
|
* bundled ESM module and its `#app.commerce.config` package import alias.
|
|
779
783
|
*
|
|
780
|
-
*
|
|
784
|
+
* Configs that require JavaScript use the source config file, while serializable
|
|
785
|
+
* default-only configs use the generated JSON manifest.
|
|
781
786
|
*/
|
|
782
787
|
async function prepareRuntimeAppConfigModule(appManifest) {
|
|
783
|
-
if (
|
|
788
|
+
if (await requiresJavaScriptAppConfig(appManifest)) {
|
|
784
789
|
await generateRuntimeAppConfigModule();
|
|
785
790
|
return;
|
|
786
791
|
}
|
|
@@ -1043,7 +1048,7 @@ async function exec$5() {
|
|
|
1043
1048
|
//#endregion
|
|
1044
1049
|
//#region source/commands/generate/manifest/main.ts
|
|
1045
1050
|
async function run$4(appConfig) {
|
|
1046
|
-
if (
|
|
1051
|
+
if (await requiresJavaScriptAppConfig(appConfig)) {
|
|
1047
1052
|
const stalePath = (0, path.join)(await require_index_node.getProjectRootDirectory(), getManifestPath());
|
|
1048
1053
|
if (await (0, fs_promises.access)(stalePath).then(() => true, () => false)) {
|
|
1049
1054
|
await (0, fs_promises.rm)(stalePath, { force: true });
|
|
@@ -1618,7 +1623,7 @@ async function ensureAppConfig(domains, cwd = process.cwd()) {
|
|
|
1618
1623
|
*/
|
|
1619
1624
|
function installDependencies(packageManager, domains, cwd = process.cwd()) {
|
|
1620
1625
|
const packages = [];
|
|
1621
|
-
if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.6.0
|
|
1626
|
+
if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.6.0`);
|
|
1622
1627
|
if (packages.length === 0) {
|
|
1623
1628
|
consola.consola.info("No additional domain dependencies to install.");
|
|
1624
1629
|
return;
|
|
@@ -1645,7 +1650,7 @@ async function ensureInstallYaml(domains, cwd = process.cwd()) {
|
|
|
1645
1650
|
|
|
1646
1651
|
//#endregion
|
|
1647
1652
|
//#region source/commands/init/main.ts
|
|
1648
|
-
const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.
|
|
1653
|
+
const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.9.0`];
|
|
1649
1654
|
/** Initialize the project */
|
|
1650
1655
|
async function run(flags, extraOptions) {
|
|
1651
1656
|
consola.consola.start("Initializing app...");
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
|
-
const require_index_node = require('../index.node-
|
|
16
|
+
const require_index_node = require('../index.node-Bv_FUgST.cjs');
|
|
17
17
|
const require_define = require('../define-hlcQw7Cv.cjs');
|
|
18
|
-
const require_webhooks = require('../webhooks-
|
|
19
|
-
const require_validate = require('../validate-
|
|
18
|
+
const require_webhooks = require('../webhooks-CrHGA-sO.cjs');
|
|
19
|
+
const require_validate = require('../validate-Dt0Fdj1L.cjs');
|
|
20
20
|
|
|
21
21
|
exports.CommerceAppConfigSchemas = require_validate.CommerceAppConfigSchemas;
|
|
22
22
|
exports.defineConfig = require_define.defineConfig;
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as CommerceAppConfigSchemas, i as CommerceAppConfigDomain, n as CommerceAppConfig, o as getConfigDomains, r as CommerceAppConfigOutputModel, s as hasConfigDomain, t as AnyCommerceAppConfig } from "../app-
|
|
16
|
-
import { t as defineConfig } from "../define-
|
|
15
|
+
import { a as CommerceAppConfigSchemas, i as CommerceAppConfigDomain, n as CommerceAppConfig, o as getConfigDomains, r as CommerceAppConfigOutputModel, s as hasConfigDomain, t as AnyCommerceAppConfig } from "../app-e4bCHpek.cjs";
|
|
16
|
+
import { t as defineConfig } from "../define-B__VyRtO.cjs";
|
|
17
17
|
import { Get } from "type-fest";
|
|
18
18
|
import * as v from "valibot";
|
|
19
|
+
import "@adobe/aio-commerce-lib-config";
|
|
19
20
|
//#region source/config/lib/parser.d.ts
|
|
20
21
|
/**
|
|
21
22
|
* Try to find (up to the nearest package.json file) the app config file.
|
|
@@ -731,7 +732,6 @@ declare const MenuSchema: v.ObjectSchema<{
|
|
|
731
732
|
/**
|
|
732
733
|
* Schema for the `adminUi` config section.
|
|
733
734
|
* Supports grid column extensions, mass actions, order view buttons, and menu on `commerce/backend-ui/2`.
|
|
734
|
-
* @experimental
|
|
735
735
|
*/
|
|
736
736
|
declare const AdminUiSchema: v.ObjectSchema<{
|
|
737
737
|
readonly customer: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -959,49 +959,40 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
959
959
|
}, undefined>;
|
|
960
960
|
/**
|
|
961
961
|
* The Admin UI configuration for an Adobe Commerce application.
|
|
962
|
-
* @experimental
|
|
963
962
|
*/
|
|
964
963
|
type AdminUiConfiguration = v.InferInput<typeof AdminUiSchema>;
|
|
965
964
|
/**
|
|
966
965
|
* Grid columns registration configuration.
|
|
967
|
-
* @experimental
|
|
968
966
|
*/
|
|
969
967
|
type GridColumns = v.InferInput<typeof GridColumnsSchema>;
|
|
970
968
|
/**
|
|
971
969
|
* A single grid column definition.
|
|
972
|
-
* @experimental
|
|
973
970
|
*/
|
|
974
971
|
type GridColumn = v.InferInput<typeof GridColumnSchema>;
|
|
975
972
|
/**
|
|
976
973
|
* A mass action registration entry (view or worker variant).
|
|
977
|
-
* @experimental
|
|
978
974
|
*/
|
|
979
975
|
type MassAction = v.InferInput<typeof MassActionSchema>;
|
|
980
976
|
/**
|
|
981
977
|
* A view-type mass action.
|
|
982
|
-
* @experimental
|
|
983
978
|
*/
|
|
984
979
|
type ViewMassAction = v.InferInput<typeof ViewMassActionSchema>;
|
|
985
980
|
/**
|
|
986
981
|
* A worker-type mass action.
|
|
987
|
-
* @experimental
|
|
988
982
|
*/
|
|
989
983
|
type WorkerMassAction = v.InferInput<typeof WorkerMassActionSchema>;
|
|
990
984
|
/**
|
|
991
985
|
* An order view button registration entry (v2, `adminUi`).
|
|
992
|
-
* @experimental
|
|
993
986
|
*/
|
|
994
987
|
type OrderViewButton = v.InferInput<typeof OrderViewButtonSchema>;
|
|
995
988
|
/**
|
|
996
989
|
* Inlined notification strings on an `adminUi` registration entry.
|
|
997
|
-
* @experimental
|
|
998
990
|
*/
|
|
999
991
|
type Notifications = v.InferInput<typeof NotificationsSchema>;
|
|
1000
992
|
/**
|
|
1001
993
|
* Admin UI menu registration configuration.
|
|
1002
994
|
* Includes the optional `aclProtected` flag — when `true`, Commerce auto-generates
|
|
1003
995
|
* a per-app ACL resource from `metadata.id` for role-based menu access control.
|
|
1004
|
-
* @experimental
|
|
1005
996
|
*/
|
|
1006
997
|
type Menu = v.InferInput<typeof MenuSchema>;
|
|
1007
998
|
/** Config type when `adminUi` configuration is present. */
|
|
@@ -1010,7 +1001,6 @@ type AdminUiConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel
|
|
|
1010
1001
|
};
|
|
1011
1002
|
/**
|
|
1012
1003
|
* Check if config has Admin UI configuration.
|
|
1013
|
-
* @experimental
|
|
1014
1004
|
*/
|
|
1015
1005
|
declare function hasAdminUi<T extends AnyCommerceAppConfig>(config: T): config is AdminUiConfig<T>;
|
|
1016
1006
|
//#endregion
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { n as CommerceAppConfig } from "./app-
|
|
16
|
-
|
|
15
|
+
import { n as CommerceAppConfig } from "./app-e4bCHpek.cjs";
|
|
17
16
|
//#region source/config/lib/define.d.ts
|
|
18
17
|
/**
|
|
19
18
|
* Helper to type-safely define the app config.
|
|
@@ -12,5 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
15
16
|
import AioLogger from "@adobe/aio-lib-core-logging";
|
|
16
|
-
import
|
|
17
|
+
import "@adobe/aio-commerce-lib-core/responses";
|
|
18
|
+
import "type-fest";
|