@adobe/aio-commerce-lib-app 1.9.0 → 1.10.0-alpha-20260731154804
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 +17 -0
- package/README.md +1 -1
- package/dist/cjs/actions/app-config/index.cjs +1 -1
- package/dist/cjs/actions/installation/index.cjs +8 -0
- package/dist/cjs/actions/installation/index.d.cts +7 -1
- package/dist/cjs/commands/index.cjs +349 -227
- package/dist/cjs/commands/templates/app-management/custom-scripts.js.template +10 -8
- package/dist/cjs/commands/templates/typescript/webpack-config.cjs +30 -0
- package/dist/cjs/config/index.node.cjs +2 -1
- package/dist/cjs/config/index.node.d.cts +9 -4
- package/dist/cjs/{index.node-Bv_FUgST.cjs → index.node-CVGURlxu.cjs} +77 -7
- package/dist/es/actions/app-config/index.mjs +1 -1
- package/dist/es/actions/installation/index.d.mts +7 -1
- package/dist/es/actions/installation/index.mjs +8 -1
- package/dist/es/commands/index.mjs +349 -227
- package/dist/es/commands/templates/app-management/custom-scripts.js.template +10 -8
- package/dist/es/commands/templates/typescript/webpack-config.cjs +30 -0
- package/dist/es/config/index.node.d.mts +9 -4
- package/dist/es/config/index.node.mjs +2 -2
- package/dist/es/{index.node-DsJ0QRGh.mjs → index.node-DF-tsr35.mjs} +54 -8
- package/package.json +21 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @adobe/aio-commerce-lib-app
|
|
2
2
|
|
|
3
|
+
## 1.10.0-alpha-20260731154804
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#606](https://github.com/adobe/aio-commerce-sdk/pull/606) [`3d2947e`](https://github.com/adobe/aio-commerce-sdk/commit/3d2947e78e90356316f5d1d090460581d3a2c3b9) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Add TypeScript project scaffolding and support TypeScript Commerce configuration in generated Runtime actions.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies []:
|
|
14
|
+
- @adobe/aio-commerce-lib-admin-ui@1.0.0
|
|
15
|
+
- @adobe/aio-commerce-lib-auth@1.1.2
|
|
16
|
+
- @adobe/aio-commerce-lib-config@1.6.0
|
|
17
|
+
- @adobe/aio-commerce-lib-events@1.3.0
|
|
18
|
+
- @adobe/aio-commerce-lib-webhooks@1.2.0
|
|
19
|
+
|
|
3
20
|
## 1.9.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
App configuration management library for Adobe Commerce applications.
|
|
4
4
|
|
|
5
|
-
This library provides tools for defining, validating, and managing configurations for Adobe Commerce applications. It defines the configuration schema, provides validation, and
|
|
5
|
+
This library provides tools for defining, validating, and managing configurations for Adobe Commerce applications. It defines the configuration schema, provides validation, and can scaffold App Builder projects with TypeScript configuration support, build configuration, and type checking.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -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.10.0-alpha-20260731154804:${[...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. */
|
|
@@ -628,6 +628,13 @@ async function getInstallationSnapshot() {
|
|
|
628
628
|
//#endregion
|
|
629
629
|
//#region source/actions/installation/index.ts
|
|
630
630
|
/**
|
|
631
|
+
* Defines a type-safe custom installation scripts loader.
|
|
632
|
+
* @param loader - The custom scripts loader implementation.
|
|
633
|
+
*/
|
|
634
|
+
function defineCustomScriptsLoader(loader) {
|
|
635
|
+
return loader;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
631
638
|
* Factory to create the route handler for the `installation` action.
|
|
632
639
|
* @param args - The arguments required to create the runtime action.
|
|
633
640
|
*/
|
|
@@ -642,4 +649,5 @@ const installationRuntimeAction = (args) => async (params) => {
|
|
|
642
649
|
};
|
|
643
650
|
|
|
644
651
|
//#endregion
|
|
652
|
+
exports.defineCustomScriptsLoader = defineCustomScriptsLoader;
|
|
645
653
|
exports.installationRuntimeAction = installationRuntimeAction;
|
|
@@ -17,6 +17,7 @@ import { n as CommerceAppConfig, r as CommerceAppConfigOutputModel } from "../..
|
|
|
17
17
|
import { Y as InstallationContext } from "../../index-Ds7AyoNv.cjs";
|
|
18
18
|
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
19
19
|
//#region source/actions/installation/router.d.ts
|
|
20
|
+
/** Loads generated custom installation script modules. */
|
|
20
21
|
type CustomScriptsLoader = (config: CommerceAppConfigOutputModel, logger: InstallationContext["logger"]) => Record<string, unknown>;
|
|
21
22
|
/** Arguments for the runtime action factory. */
|
|
22
23
|
type RuntimeActionFactoryArgs = {
|
|
@@ -25,10 +26,15 @@ type RuntimeActionFactoryArgs = {
|
|
|
25
26
|
};
|
|
26
27
|
//#endregion
|
|
27
28
|
//#region source/actions/installation/index.d.ts
|
|
29
|
+
/**
|
|
30
|
+
* Defines a type-safe custom installation scripts loader.
|
|
31
|
+
* @param loader - The custom scripts loader implementation.
|
|
32
|
+
*/
|
|
33
|
+
declare function defineCustomScriptsLoader(loader: CustomScriptsLoader): CustomScriptsLoader;
|
|
28
34
|
/**
|
|
29
35
|
* Factory to create the route handler for the `installation` action.
|
|
30
36
|
* @param args - The arguments required to create the runtime action.
|
|
31
37
|
*/
|
|
32
38
|
declare const installationRuntimeAction: (args: RuntimeActionFactoryArgs) => (params: RuntimeActionParams) => Promise<import("@adobe/aio-commerce-lib-core/responses").ActionResponse>;
|
|
33
39
|
//#endregion
|
|
34
|
-
export { installationRuntimeAction };
|
|
40
|
+
export { type CustomScriptsLoader, defineCustomScriptsLoader, installationRuntimeAction };
|