@adobe/aio-commerce-lib-app 1.8.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/actions/app-config/index.cjs +3 -3
  4. package/dist/cjs/actions/app-config/index.d.cts +2 -2
  5. package/dist/cjs/actions/association/index.d.cts +0 -1
  6. package/dist/cjs/actions/config/index.d.cts +1 -1
  7. package/dist/cjs/actions/installation/index.cjs +10 -2
  8. package/dist/cjs/actions/installation/index.d.cts +10 -4
  9. package/dist/cjs/{app-BwehWeu1.d.cts → app-e4bCHpek.d.cts} +0 -1
  10. package/dist/cjs/commands/index.cjs +353 -231
  11. package/dist/cjs/commands/index.d.cts +1 -1
  12. package/dist/cjs/commands/templates/app-management/custom-scripts.js.template +10 -8
  13. package/dist/cjs/commands/templates/typescript/webpack-config.cjs +30 -0
  14. package/dist/cjs/config/index.browser.d.cts +1 -1
  15. package/dist/cjs/config/index.node.cjs +4 -3
  16. package/dist/cjs/config/index.node.d.cts +12 -17
  17. package/dist/{es/define-DxH1BFia.d.mts → cjs/define-B__VyRtO.d.cts} +1 -2
  18. package/dist/{es/index-B0XqHwY5.d.mts → cjs/index-DWEigxhy.d.cts} +3 -1
  19. package/dist/{es/index-DSk-RmwM.d.mts → cjs/index-Ds7AyoNv.d.cts} +139 -64
  20. package/dist/cjs/index.cjs +1 -1
  21. package/dist/cjs/index.d.cts +3 -2
  22. package/dist/cjs/{index.node-BWZuZLgs.cjs → index.node-CVGURlxu.cjs} +78 -8
  23. package/dist/cjs/management/index.cjs +1 -1
  24. package/dist/cjs/management/index.d.cts +1 -1
  25. package/dist/cjs/{management-DEsRVP2L.cjs → management-DmH7fVxy.cjs} +4 -2
  26. package/dist/cjs/{openapi-C36q3dCZ.cjs → openapi-BzRN5Lc6.cjs} +1 -1
  27. package/dist/cjs/{utils-DSCmZ_iJ.cjs → utils-CGZGfXuy.cjs} +25 -0
  28. package/dist/cjs/{validate-C_eCKp21.cjs → validate-Dt0Fdj1L.cjs} +1 -1
  29. package/dist/cjs/{webhooks-L4DWHSOl.cjs → webhooks-CrHGA-sO.cjs} +0 -2
  30. package/dist/es/actions/app-config/index.d.mts +2 -2
  31. package/dist/es/actions/app-config/index.mjs +3 -3
  32. package/dist/es/actions/association/index.d.mts +0 -1
  33. package/dist/es/actions/config/index.d.mts +1 -1
  34. package/dist/es/actions/installation/index.d.mts +10 -4
  35. package/dist/es/actions/installation/index.mjs +10 -3
  36. package/dist/es/{app-BwehWeu1.d.mts → app-e4bCHpek.d.mts} +0 -1
  37. package/dist/es/commands/index.d.mts +1 -1
  38. package/dist/es/commands/index.mjs +352 -230
  39. package/dist/es/commands/templates/app-management/custom-scripts.js.template +10 -8
  40. package/dist/es/commands/templates/typescript/webpack-config.cjs +30 -0
  41. package/dist/es/config/index.browser.d.mts +1 -1
  42. package/dist/es/config/index.node.d.mts +12 -18
  43. package/dist/es/config/index.node.mjs +4 -4
  44. package/dist/{cjs/define-DOqVyexT.d.cts → es/define-BEY_Q6rS.d.mts} +1 -2
  45. package/dist/{cjs/index-BXm8UbK7.d.cts → es/index-CgsSXApi.d.mts} +4 -1
  46. package/dist/{cjs/index-B3ISkC54.d.cts → es/index-Dsg4LZde.d.mts} +139 -64
  47. package/dist/es/index.d.mts +3 -2
  48. package/dist/es/index.mjs +1 -1
  49. package/dist/es/{index.node-DuvW9Sha.mjs → index.node-DF-tsr35.mjs} +55 -9
  50. package/dist/es/management/index.d.mts +1 -1
  51. package/dist/es/management/index.mjs +1 -1
  52. package/dist/es/{management-D5pmBBec.mjs → management-BpFkwoig.mjs} +4 -2
  53. package/dist/es/{openapi-BSc2NRd2.mjs → openapi-QEV7W6DH.mjs} +1 -1
  54. package/dist/es/{utils-_gj8L6eN.mjs → utils-D0O4r9jr.mjs} +20 -1
  55. package/dist/es/{validate-t0T0F2MF.mjs → validate-yqa8uIyb.mjs} +1 -1
  56. package/dist/es/{webhooks-D7DExIDM.mjs → webhooks-CVbZOxYS.mjs} +0 -2
  57. package/package.json +21 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
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
+
20
+ ## 1.9.0
21
+
22
+ ### Minor Changes
23
+
24
+ - [#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.
25
+
26
+ ### Patch Changes
27
+
28
+ - [#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.
29
+
30
+ - Updated dependencies [[`ac6c13b`](https://github.com/adobe/aio-commerce-sdk/commit/ac6c13b4124677820f8946c92e4cd63ab228eeae)]:
31
+ - @adobe/aio-commerce-lib-admin-ui@1.0.0
32
+
3
33
  ## 1.8.0
4
34
 
5
35
  ### 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 supports multiple configuration file formats with built-in TypeScript support.
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
 
@@ -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-C_eCKp21.cjs');
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-C36q3dCZ.cjs"));
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.8.0:${[...domains].sort().join(",")}:2.0.0`;
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. */
@@ -12,9 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as CommerceAppConfig } from "../../app-BwehWeu1.cjs";
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 = {
@@ -13,7 +13,6 @@
13
13
  */
14
14
 
15
15
  import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
16
-
17
16
  //#region source/actions/association/index.d.ts
18
17
  /**
19
18
  * Factory to create the route handler for the `association` action.
@@ -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-C_eCKp21.cjs');
19
- const require_management = require('../../management-DEsRVP2L.cjs');
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");
@@ -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;
@@ -12,11 +12,12 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as CommerceAppConfig, r as CommerceAppConfigOutputModel } from "../../app-BwehWeu1.cjs";
16
- import { Y as InstallationContext } from "../../index-B3ISkC54.cjs";
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
+ /** 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 };
@@ -13,7 +13,6 @@
13
13
  */
14
14
 
15
15
  import * as v from "valibot";
16
-
17
16
  //#region source/config/schema/domains.d.ts
18
17
  /** The individual validatable domains of the app config. */
19
18
  declare const CommerceAppConfigSchemas: {