@adobe/aio-commerce-lib-app 2.2.0 → 2.3.0-alpha-20261203134759

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 (102) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/bin/cli.mjs +22 -1
  3. package/dist/cjs/actions/app-config/index.cjs +8 -8
  4. package/dist/cjs/actions/app-config/index.d.cts +2 -2
  5. package/dist/cjs/actions/association/index.cjs +4 -4
  6. package/dist/cjs/actions/config/index.cjs +19 -8
  7. package/dist/cjs/actions/config/index.d.cts +1 -1
  8. package/dist/cjs/actions/installation/index.cjs +39 -15
  9. package/dist/cjs/actions/installation/index.d.cts +3 -3
  10. package/dist/cjs/actions/scope-tree/index.cjs +6 -6
  11. package/dist/cjs/{app-B3bAEor-.d.cts → app-Cb6-5mKk.d.cts} +637 -45
  12. package/dist/cjs/config/index.browser.d.cts +1 -1
  13. package/dist/cjs/config/index.node.cjs +11 -7
  14. package/dist/cjs/config/index.node.d.cts +150 -14
  15. package/dist/cjs/{define-eBMdGAq6.d.cts → define-Dk0uzfO9.d.cts} +1 -1
  16. package/dist/cjs/{commands → deprecated/commands}/index.cjs +1828 -864
  17. package/dist/cjs/{environment-CW6M76gS.cjs → environment-CaV1hi2-.cjs} +1 -1
  18. package/dist/cjs/{index-BEeludy0.d.cts → index-Cmxlkzpm.d.cts} +2 -2
  19. package/dist/cjs/index.cjs +3 -3
  20. package/dist/cjs/index.d.cts +1 -1
  21. package/dist/cjs/index.node-QXhLROom.cjs +117 -0
  22. package/dist/cjs/{logging-Emi7P923.cjs → logging-r-r2bUWO.cjs} +1 -1
  23. package/dist/cjs/management/index.cjs +1 -1
  24. package/dist/cjs/management/index.d.cts +1 -1
  25. package/dist/cjs/{management-5Et1mEUp.cjs → management-BX9sUQw-.cjs} +123 -108
  26. package/dist/cjs/{openapi-DghfuM8S.cjs → openapi-BaKoO7GY.cjs} +177 -26
  27. package/dist/cjs/{index.node-9bfp79rs.cjs → parser-XcHKOYKN.cjs} +46 -16
  28. package/dist/cjs/project/index.cjs +637 -0
  29. package/dist/cjs/project/index.d.cts +212 -0
  30. package/dist/cjs/{rolldown-runtime-CoOt0iuZ.cjs → rolldown-runtime-BKfnhsn2.cjs} +4 -4
  31. package/dist/cjs/{schemas-B6ITl1bG.cjs → schemas-B-jCi6Oz.cjs} +1 -1
  32. package/dist/cjs/{utils-CoR_PBHz.cjs → utils-CuzJBLgo.cjs} +2 -2
  33. package/dist/cjs/{utils-DSS0XlXq.cjs → utils-bwFwJcPW.cjs} +1 -1
  34. package/dist/cjs/{validate-BC3rnRLc.cjs → validate-BumkVjJy.cjs} +22 -6
  35. package/dist/cjs/{version-5MonNzl5.cjs → version-Bczstmvz.cjs} +3 -3
  36. package/dist/{es/webhooks-DgaLfP36.d.mts → cjs/webhooks-BBuoVWq_.d.cts} +382 -43
  37. package/dist/cjs/{webhooks-ZPh2gVb3.cjs → webhooks-VZTBeI8L.cjs} +84 -23
  38. package/dist/es/actions/app-config/index.d.mts +2 -2
  39. package/dist/es/actions/app-config/index.mjs +6 -6
  40. package/dist/es/actions/association/index.mjs +3 -3
  41. package/dist/es/actions/config/index.d.mts +2 -2
  42. package/dist/es/actions/config/index.mjs +19 -8
  43. package/dist/es/actions/installation/index.d.mts +4 -4
  44. package/dist/es/actions/installation/index.mjs +38 -14
  45. package/dist/es/actions/scope-tree/index.mjs +5 -5
  46. package/dist/es/{app-B3bAEor-.d.mts → app-Cb6-5mKk.d.mts} +637 -45
  47. package/dist/es/config/index.browser.d.mts +1 -1
  48. package/dist/es/config/index.node.d.mts +151 -15
  49. package/dist/es/config/index.node.mjs +5 -4
  50. package/dist/es/{define-BdXyLAwb.d.mts → define-D7EjSr-Z.d.mts} +1 -1
  51. package/dist/es/{commands → deprecated/commands}/index.mjs +1773 -807
  52. package/dist/es/{environment-DUhU0_9z.mjs → environment-B1JJFHZw.mjs} +1 -1
  53. package/dist/es/{index-DE2KVXfH.d.mts → index-BkqV8WU_.d.mts} +4 -4
  54. package/dist/es/{index-DUJtT78x.d.mts → index-U7CXicoW.d.mts} +1 -1
  55. package/dist/es/index.d.mts +2 -2
  56. package/dist/es/index.mjs +3 -3
  57. package/dist/es/index.node-DipCrOq_.mjs +112 -0
  58. package/dist/es/management/index.d.mts +1 -1
  59. package/dist/es/management/index.mjs +1 -1
  60. package/dist/es/{management-BAQ64OyR.mjs → management-DSu69_ub.mjs} +128 -113
  61. package/dist/es/{openapi-BvPVTUMt.mjs → openapi-ChihLuvm.mjs} +177 -26
  62. package/dist/es/{index.node-CURztkP5.mjs → parser-DdhiGXVf.mjs} +33 -15
  63. package/dist/es/project/index.d.mts +212 -0
  64. package/dist/es/project/index.mjs +636 -0
  65. package/dist/es/{utils-DB8HaSj0.mjs → utils-Bg_LIAGV.mjs} +2 -2
  66. package/dist/es/{validate-xS9Dc-4m.mjs → validate-CYWj7Nzp.mjs} +10 -6
  67. package/dist/es/{version-BWgrh_QM.mjs → version-CVSRkbJP.mjs} +1 -1
  68. package/dist/es/{webhooks-HBe_DEKA.mjs → webhooks-Ba-OdU8e.mjs} +76 -21
  69. package/dist/{cjs/webhooks-DNLuuv9_.d.cts → es/webhooks-Deujdgcm.d.mts} +382 -43
  70. package/package.json +29 -24
  71. /package/dist/cjs/{commands → deprecated/commands}/index.d.cts +0 -0
  72. /package/dist/cjs/{commands → deprecated/commands}/templates/typescript/webpack-config.cjs +0 -0
  73. /package/dist/cjs/{commands → project}/templates/admin-ui/tsconfig.json +0 -0
  74. /package/dist/cjs/{commands → project}/templates/admin-ui/web-src/.babelrc +0 -0
  75. /package/dist/cjs/{commands → project}/templates/admin-ui/web-src/index.css +0 -0
  76. /package/dist/cjs/{commands → project}/templates/admin-ui/web-src/index.html +0 -0
  77. /package/dist/cjs/{commands → project}/templates/admin-ui/web-src/src/app.jsx +0 -0
  78. /package/dist/cjs/{commands → project}/templates/admin-ui/web-src/src/components/welcome.jsx +0 -0
  79. /package/dist/cjs/{commands → project}/templates/admin-ui/web-src/src/pages/main-page.jsx +0 -0
  80. /package/dist/cjs/{commands → project}/templates/admin-ui/web-src-template.d.ts +0 -0
  81. /package/dist/cjs/{commands → project}/templates/app-management/app-config.js.template +0 -0
  82. /package/dist/cjs/{commands → project}/templates/app-management/association.js.template +0 -0
  83. /package/dist/cjs/{commands → project}/templates/app-management/custom-scripts.js.template +0 -0
  84. /package/dist/cjs/{commands → project}/templates/app-management/installation.js.template +0 -0
  85. /package/dist/cjs/{commands → project}/templates/business-configuration/config.js.template +0 -0
  86. /package/dist/cjs/{commands → project}/templates/business-configuration/scope-tree.js.template +0 -0
  87. /package/dist/es/{commands → deprecated/commands}/index.d.mts +0 -0
  88. /package/dist/es/{commands → deprecated/commands}/templates/typescript/webpack-config.cjs +0 -0
  89. /package/dist/es/{commands → project}/templates/admin-ui/tsconfig.json +0 -0
  90. /package/dist/es/{commands → project}/templates/admin-ui/web-src/.babelrc +0 -0
  91. /package/dist/es/{commands → project}/templates/admin-ui/web-src/index.css +0 -0
  92. /package/dist/es/{commands → project}/templates/admin-ui/web-src/index.html +0 -0
  93. /package/dist/es/{commands → project}/templates/admin-ui/web-src/src/app.jsx +0 -0
  94. /package/dist/es/{commands → project}/templates/admin-ui/web-src/src/components/welcome.jsx +0 -0
  95. /package/dist/es/{commands → project}/templates/admin-ui/web-src/src/pages/main-page.jsx +0 -0
  96. /package/dist/es/{commands → project}/templates/admin-ui/web-src-template.d.ts +0 -0
  97. /package/dist/es/{commands → project}/templates/app-management/app-config.js.template +0 -0
  98. /package/dist/es/{commands → project}/templates/app-management/association.js.template +0 -0
  99. /package/dist/es/{commands → project}/templates/app-management/custom-scripts.js.template +0 -0
  100. /package/dist/es/{commands → project}/templates/app-management/installation.js.template +0 -0
  101. /package/dist/es/{commands → project}/templates/business-configuration/config.js.template +0 -0
  102. /package/dist/es/{commands → project}/templates/business-configuration/scope-tree.js.template +0 -0
@@ -12,8 +12,8 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- const require_utils = require("./utils-DSS0XlXq.cjs");
16
15
  let _adobe_aio_commerce_lib_core_commerce = require("@adobe/aio-commerce-lib-core/commerce");
16
+ const require_utils = require("./utils-bwFwJcPW.cjs");
17
17
 
18
18
  // source/config/lib/environment.ts
19
19
  /**
@@ -12,9 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { r as CommerceAppConfigOutputModel } from "./app-B3bAEor-.cjs";
16
- import { k as AdminUiComponentConfig, n as WebhookEntry, p as AppEvent, u as CustomInstallationStep } from "./webhooks-DNLuuv9_.cjs";
17
15
  import * as v from "valibot";
16
+ import { r as CommerceAppConfigOutputModel } from "./app-Cb6-5mKk.cjs";
17
+ import { k as AdminUiComponentConfig, n as WebhookEntry, p as AppEvent, u as CustomInstallationStep } from "./webhooks-BBuoVWq_.cjs";
18
18
  import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
19
19
  import AioLogger from "@adobe/aio-lib-core-logging";
20
20
  /** Severity level of a validation issue. */
@@ -13,11 +13,11 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_repository = require("./repository-C3nn0Mon.cjs");
17
- const require_utils = require("./utils-CoR_PBHz.cjs");
18
16
  let _adobe_aio_commerce_lib_api = require("@adobe/aio-commerce-lib-api");
19
- let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
17
+ const require_repository = require("./repository-C3nn0Mon.cjs");
20
18
  let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
19
+ let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
20
+ const require_utils = require("./utils-CuzJBLgo.cjs");
21
21
 
22
22
  // source/lib/errors.ts
23
23
  /**
@@ -19,9 +19,9 @@
19
19
  *
20
20
  * @packageDocumentation
21
21
  */
22
- import { t as AssociatedCommerceData } from "./types-DslZGym8.cjs";
23
22
  import { AdobeCommerceHttpClient, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
24
23
  import { ImsAuthParams, ImsAuthProvider } from "@adobe/aio-commerce-lib-auth";
24
+ import { t as AssociatedCommerceData } from "./types-DslZGym8.cjs";
25
25
  import { CommerceSdkErrorBase, CommerceSdkErrorBaseOptions } from "@adobe/aio-commerce-lib-core/error";
26
26
  import { AdobeIoEventsApiClient } from "@adobe/aio-commerce-lib-events/io-events";
27
27
  /**
@@ -0,0 +1,117 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright 2026 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+
15
+ // source/config/schema/domain-defaults.ts
16
+ /**
17
+ * The starting value and the label of the config domains that `init` offers, in the order it
18
+ * offers them.
19
+ */
20
+ const COMMERCE_APP_CONFIG_DOMAIN_DEFAULTS = {
21
+ "businessConfig.schema": {
22
+ label: "Business Configuration",
23
+ value: [{
24
+ default: ["a"],
25
+ label: "Sample List",
26
+ name: "sampleList",
27
+ options: [{
28
+ label: "Option A",
29
+ value: "a"
30
+ }, {
31
+ label: "Option B",
32
+ value: "b"
33
+ }],
34
+ selectionMode: "multiple",
35
+ type: "list"
36
+ }, {
37
+ default: "Hello, world!",
38
+ label: "Sample Text",
39
+ name: "sampleText",
40
+ type: "text"
41
+ }]
42
+ },
43
+ "eventing.commerce": {
44
+ label: "Commerce Events",
45
+ value: [{
46
+ events: [{
47
+ description: "Use case description for the event.",
48
+ fields: [{ name: "*" }],
49
+ label: "Sample Event",
50
+ name: "plugin.sample_event",
51
+ runtimeActions: ["my-package/handle-sample-event"]
52
+ }],
53
+ provider: {
54
+ description: "A description for your Commerce Events provider.",
55
+ label: "Commerce Events Provider"
56
+ }
57
+ }]
58
+ },
59
+ webhooks: {
60
+ label: "Commerce Webhooks",
61
+ value: [{
62
+ category: "modification",
63
+ description: "A sample Commerce Webhook handler.",
64
+ label: "Sample Webhook",
65
+ runtimeAction: "my-package/handle-webhook",
66
+ webhook: {
67
+ batch_name: "my_app",
68
+ hook_name: "sample_hook",
69
+ method: "POST",
70
+ webhook_method: "plugin.sample.event",
71
+ webhook_type: "after"
72
+ }
73
+ }, {
74
+ category: "modification",
75
+ description: "A sample Commerce Webhook handler using an explicit URL.",
76
+ label: "Sample Webhook with URL",
77
+ webhook: {
78
+ batch_name: "my_app",
79
+ hook_name: "sample_hook_url",
80
+ method: "POST",
81
+ url: "https://example.com/webhook",
82
+ webhook_method: "plugin.sample.event",
83
+ webhook_type: "after"
84
+ }
85
+ }]
86
+ },
87
+ "eventing.external": {
88
+ label: "External Events",
89
+ value: [{
90
+ events: [{
91
+ description: "Use case description for the event.",
92
+ label: "Sample Event",
93
+ name: "be-observer.sample_event",
94
+ runtimeActions: ["my-package/handle-sample-event"]
95
+ }],
96
+ provider: {
97
+ description: "A description for your External Events provider.",
98
+ label: "External Events Provider"
99
+ }
100
+ }]
101
+ },
102
+ "installation.customInstallationSteps": {
103
+ label: "Custom Installation Steps",
104
+ value: [{
105
+ description: "Use case description for the step.",
106
+ name: "sample-step",
107
+ script: "./path/to/script.js"
108
+ }]
109
+ }
110
+ };
111
+
112
+ Object.defineProperty(exports, "COMMERCE_APP_CONFIG_DOMAIN_DEFAULTS", {
113
+ enumerable: true,
114
+ get: function () {
115
+ return COMMERCE_APP_CONFIG_DOMAIN_DEFAULTS;
116
+ }
117
+ });
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- const require_rolldown_runtime = require("./rolldown-runtime-CoOt0iuZ.cjs");
15
+ const require_rolldown_runtime = require("./rolldown-runtime-BKfnhsn2.cjs");
16
16
  let util = require("util");
17
17
  util = require_rolldown_runtime.__toESM(util, 1);
18
18
 
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_management = require("../management-5Et1mEUp.cjs");
16
+ const require_management = require("../management-BX9sUQw-.cjs");
17
17
 
18
18
  exports.createInitialInstallationState = require_management.createInitialInstallationState;
19
19
  exports.createInitialUninstallationState = require_management.createInitialUninstallationState;
@@ -17,5 +17,5 @@
17
17
  * This module exports shared application management utilities for the AIO Commerce SDK.
18
18
  * @packageDocumentation
19
19
  */
20
- import { $ as BranchStepOptions, A as createInitialState, B as InProgressWorkflowState, C as defineCustomInstallationStep, D as executePlannedWorkflow, E as createInitialPlanExecutionState, F as StepStartedEvent, G as WorkflowRunState, H as SucceededWorkflowState, I as StepSucceededEvent, J as isFailedState, K as WorkflowStateMetadata, L as WorkflowHooks, M as executeWorkflow, N as StepEvent, O as ValidateStepTreeOptions, P as StepFailedEvent, Q as BranchStep, R as ExecutionStatus, S as CustomInstallationStepHandler, T as planWorkflow, U as WorkflowData, V as StepStatus, W as WorkflowError, X as isSucceededState, Y as isInProgressState, Z as AnyStep, _ as createInitialUninstallationState, _t as ValidationIssueSeverity, a as InstallationError, at as Step, b as runValidation, c as InstallationStatus, ct as StepMetaInfo, d as CreateInitialUninstallationStateOptions, dt as defineBranchStep, et as ExecutionContext, f as InstallationHooks, ft as defineLeafStep, g as createInitialInstallationState, gt as ValidationIssue, h as RunValidationOptions, ht as StepValidationResult, i as InstallationData, it as LifecycleContext, j as executeUninstallWorkflow, k as validateStepTree, l as SucceededInstallationState, lt as ValidationContext, m as RunUninstallationOptions, mt as isLeafStep, n as InProgressInstallationState, nt as LeafStep, o as InstallationRetryMetadata, ot as StepContextFactory, p as RunInstallationOptions, pt as isBranchStep, q as isCompletedState, r as InstallationContext, rt as LeafStepOptions, s as InstallationState, st as StepMeta, t as FailedInstallationState, tt as InferStepOutput, u as CreateInitialInstallationStateOptions, ut as ValidationExecutionContext, v as runInstallation, vt as ValidationResult, w as createRetryState, x as CustomInstallationStepDefinition, y as runUninstallation, yt as ValidationSummary, z as FailedWorkflowState } from "../index-BEeludy0.cjs";
20
+ import { $ as BranchStepOptions, A as createInitialState, B as InProgressWorkflowState, C as defineCustomInstallationStep, D as executePlannedWorkflow, E as createInitialPlanExecutionState, F as StepStartedEvent, G as WorkflowRunState, H as SucceededWorkflowState, I as StepSucceededEvent, J as isFailedState, K as WorkflowStateMetadata, L as WorkflowHooks, M as executeWorkflow, N as StepEvent, O as ValidateStepTreeOptions, P as StepFailedEvent, Q as BranchStep, R as ExecutionStatus, S as CustomInstallationStepHandler, T as planWorkflow, U as WorkflowData, V as StepStatus, W as WorkflowError, X as isSucceededState, Y as isInProgressState, Z as AnyStep, _ as createInitialUninstallationState, _t as ValidationIssueSeverity, a as InstallationError, at as Step, b as runValidation, c as InstallationStatus, ct as StepMetaInfo, d as CreateInitialUninstallationStateOptions, dt as defineBranchStep, et as ExecutionContext, f as InstallationHooks, ft as defineLeafStep, g as createInitialInstallationState, gt as ValidationIssue, h as RunValidationOptions, ht as StepValidationResult, i as InstallationData, it as LifecycleContext, j as executeUninstallWorkflow, k as validateStepTree, l as SucceededInstallationState, lt as ValidationContext, m as RunUninstallationOptions, mt as isLeafStep, n as InProgressInstallationState, nt as LeafStep, o as InstallationRetryMetadata, ot as StepContextFactory, p as RunInstallationOptions, pt as isBranchStep, q as isCompletedState, r as InstallationContext, rt as LeafStepOptions, s as InstallationState, st as StepMeta, t as FailedInstallationState, tt as InferStepOutput, u as CreateInitialInstallationStateOptions, ut as ValidationExecutionContext, v as runInstallation, vt as ValidationResult, w as createRetryState, x as CustomInstallationStepDefinition, y as runUninstallation, yt as ValidationSummary, z as FailedWorkflowState } from "../index-Cmxlkzpm.cjs";
21
21
  export { type AnyStep, type BranchStep, type BranchStepOptions, type CreateInitialInstallationStateOptions, type CreateInitialUninstallationStateOptions, type CustomInstallationStepDefinition, type CustomInstallationStepHandler, type ExecutionContext, type ExecutionStatus, type FailedInstallationState, type FailedWorkflowState, type InProgressInstallationState, type InProgressWorkflowState, type InferStepOutput, type InstallationContext, type InstallationData, type InstallationError, type InstallationHooks, type InstallationRetryMetadata, type InstallationState, type InstallationStatus, type LeafStep, type LeafStepOptions, type LifecycleContext, type RunInstallationOptions, type RunUninstallationOptions, type RunValidationOptions, type Step, type StepContextFactory, type StepEvent, type StepFailedEvent, type StepMeta, type StepMetaInfo, type StepStartedEvent, type StepStatus, type StepSucceededEvent, type StepValidationResult, type SucceededInstallationState, type SucceededWorkflowState, type ValidateStepTreeOptions, type ValidationContext, type ValidationExecutionContext, type ValidationIssue, type ValidationIssueSeverity, type ValidationResult, type ValidationSummary, type WorkflowData, type WorkflowError, type WorkflowHooks, type WorkflowRunState, type WorkflowStateMetadata, createInitialInstallationState, type createInitialPlanExecutionState, type createInitialState, createInitialUninstallationState, type createRetryState, type defineBranchStep, defineCustomInstallationStep, type defineLeafStep, type executePlannedWorkflow, type executeUninstallWorkflow, type executeWorkflow, type isBranchStep, isCompletedState, isFailedState, isInProgressState, type isLeafStep, isSucceededState, type planWorkflow, runInstallation, runUninstallation, runValidation, type validateStepTree };
@@ -12,29 +12,29 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- const require_rolldown_runtime = require("./rolldown-runtime-CoOt0iuZ.cjs");
16
- const require_webhooks = require("./webhooks-ZPh2gVb3.cjs");
17
- const require_constants = require("./constants-CgeVvu6f.cjs");
18
- const require_utils = require("./utils-DSS0XlXq.cjs");
19
- const require_environment = require("./environment-CW6M76gS.cjs");
20
- const require_utils$1 = require("./utils-CoR_PBHz.cjs");
21
- const require_logging = require("./logging-Emi7P923.cjs");
15
+ const require_rolldown_runtime = require("./rolldown-runtime-BKfnhsn2.cjs");
16
+ let _adobe_aio_commerce_lib_api_utils = require("@adobe/aio-commerce-lib-api/utils");
17
+ const require_webhooks = require("./webhooks-VZTBeI8L.cjs");
18
+ let ky = require("ky");
19
+ let safe_stable_stringify = require("safe-stable-stringify");
20
+ let _adobe_aio_commerce_lib_admin_ui_api = require("@adobe/aio-commerce-lib-admin-ui/api");
22
21
  let _adobe_aio_commerce_lib_api = require("@adobe/aio-commerce-lib-api");
23
- let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
24
- let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
25
- let _adobe_aio_commerce_lib_auth = require("@adobe/aio-commerce-lib-auth");
22
+ const require_constants = require("./constants-CgeVvu6f.cjs");
23
+ const require_utils = require("./utils-bwFwJcPW.cjs");
26
24
  let valibot = require("valibot");
27
- valibot = require_rolldown_runtime.__toESM(valibot, 1);
28
- let _adobe_aio_commerce_lib_admin_ui_api = require("@adobe/aio-commerce-lib-admin-ui/api");
29
- let safe_stable_stringify = require("safe-stable-stringify");
30
- safe_stable_stringify = require_rolldown_runtime.__toESM(safe_stable_stringify, 1);
31
- let ky = require("ky");
32
- let _adobe_aio_commerce_lib_api_utils = require("@adobe/aio-commerce-lib-api/utils");
33
25
  let camelcase = require("camelcase");
34
- camelcase = require_rolldown_runtime.__toESM(camelcase, 1);
26
+ let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
27
+ const require_environment = require("./environment-CaV1hi2-.cjs");
28
+ let _adobe_aio_commerce_lib_auth = require("@adobe/aio-commerce-lib-auth");
29
+ const require_utils$1 = require("./utils-CuzJBLgo.cjs");
30
+ const require_logging = require("./logging-r-r2bUWO.cjs");
35
31
  let _adobe_aio_commerce_lib_events_commerce = require("@adobe/aio-commerce-lib-events/commerce");
36
32
  let _adobe_aio_commerce_lib_events_io_events = require("@adobe/aio-commerce-lib-events/io-events");
33
+ let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
37
34
  let _adobe_aio_commerce_lib_webhooks_api = require("@adobe/aio-commerce-lib-webhooks/api");
35
+ safe_stable_stringify = require_rolldown_runtime.__toESM(safe_stable_stringify, 1);
36
+ valibot = require_rolldown_runtime.__toESM(valibot, 1);
37
+ camelcase = require_rolldown_runtime.__toESM(camelcase, 1);
38
38
 
39
39
  // source/management/common/workflow/hooks.ts
40
40
  /** Helper to call a hook if it exists. */
@@ -757,6 +757,19 @@ function enumerateComponents(adminUi) {
757
757
  });
758
758
  }
759
759
  }
760
+ const customAttributeGridColumns = adminUi.creditMemo?.customAttributeGridColumns;
761
+ if (customAttributeGridColumns) {
762
+ const key = "creditMemo.custom-attribute-grid-columns";
763
+ components.set(key, {
764
+ config: customAttributeGridColumns,
765
+ key,
766
+ label: "Credit Memo custom attribute grid columns",
767
+ ref: {
768
+ entity: "creditMemo",
769
+ kind: "customAttributeGridColumns"
770
+ }
771
+ });
772
+ }
760
773
  for (const entity of require_webhooks.ADMIN_UI_MASS_ACTION_ENTITIES) {
761
774
  const entityConfig = adminUi[entity];
762
775
  for (const massAction of entityConfig?.massActions ?? []) {
@@ -974,51 +987,7 @@ const adminUiStep = defineBranchStep({
974
987
  name: "admin-ui"
975
988
  });
976
989
 
977
- // source/management/deprecated/domains/custom-installation.ts
978
- /**
979
- * Creates the legacy install/uninstall handlers of a custom installation script leaf.
980
- * Deleted in the next major.
981
- *
982
- * @param scriptConfig - The custom installation step the handlers belong to.
983
- */
984
- function createDeprecatedCustomScriptHandlers(scriptConfig) {
985
- const { script, name } = scriptConfig;
986
- return {
987
- install: async (config, context) => {
988
- const { logger } = context;
989
- const customScripts = context.customScripts || {};
990
- logger.info(`Executing custom installation script: ${name}`);
991
- logger.debug(`Script path: ${script}`);
992
- const scriptModule = getScriptModuleOrThrow(customScripts, script);
993
- const scriptResult = await resolveCustomScriptHandler(scriptModule, "install")(config, context);
994
- logger.info(`Successfully executed script: ${name}`);
995
- return {
996
- data: scriptResult,
997
- script
998
- };
999
- },
1000
- uninstall: async (config, context) => {
1001
- const { logger } = context;
1002
- const customScripts = context.customScripts || {};
1003
- logger.debug(`Uninstalling custom script: ${name}`);
1004
- const scriptModule = getScriptModule(customScripts, script);
1005
- if (!scriptModule) {
1006
- logger.warn(`Script ${script} not found in customScripts context, skipping uninstall. It may have been removed from the project after being configured.`);
1007
- return;
1008
- }
1009
- const uninstall = resolveCustomScriptHandler(scriptModule, "uninstall");
1010
- if (!uninstall) {
1011
- logger.debug(`Script ${script} does not export an uninstall function, skipping uninstall.`);
1012
- return;
1013
- }
1014
- await uninstall(config, context);
1015
- logger.info(`Successfully uninstalled script: ${name}`);
1016
- }
1017
- };
1018
- }
1019
-
1020
- // source/management/domains/custom-installation/custom-scripts.ts
1021
- const camelcase$1 = camelcase.default.default ?? camelcase.default;
990
+ // source/management/domains/custom-installation/script-module.ts
1022
991
  const ScriptModuleSchema = valibot.union([valibot.function(), valibot.object({
1023
992
  install: valibot.function(),
1024
993
  uninstall: valibot.optional(valibot.function())
@@ -1064,6 +1033,98 @@ function getScriptModuleOrThrow(customScripts, script) {
1064
1033
  if (!scriptModule) throw new Error(`Script ${script} not found in customScripts context. Make sure the script is defined in the configuration and the action was generated with custom scripts support.`);
1065
1034
  return scriptModule;
1066
1035
  }
1036
+
1037
+ // source/management/domains/custom-installation/apply.ts
1038
+ /** Runs a newly-added step's `install` handler and returns its persisted identity. */
1039
+ async function runAddedStep(step, targetConfig, context) {
1040
+ const { logger } = context;
1041
+ const scriptModule = getScriptModuleOrThrow(context.customScripts ?? {}, step.script);
1042
+ logger.info(`Executing custom installation script: ${step.name}`);
1043
+ await resolveCustomScriptHandler(scriptModule, "install")(targetConfig, context);
1044
+ logger.info(`Successfully executed script: ${step.name}`);
1045
+ return {
1046
+ name: step.name,
1047
+ script: step.script
1048
+ };
1049
+ }
1050
+ /**
1051
+ * Runs the `uninstall` of a step that ran before. Returns whether it ran: a step whose script is
1052
+ * not deployed, or that exports no `uninstall`, is skipped with a warning.
1053
+ */
1054
+ async function runRemovedStep(step, baselineConfig, context) {
1055
+ const { logger } = context;
1056
+ const scriptModule = getScriptModule(context.customScripts ?? {}, step.script);
1057
+ if (!scriptModule) {
1058
+ logger.warn(`Skipping the uninstall of custom installation step "${step.name}": its script "${step.script}" is not deployed.`);
1059
+ return false;
1060
+ }
1061
+ const uninstall = resolveCustomScriptHandler(scriptModule, "uninstall");
1062
+ if (!uninstall) {
1063
+ logger.warn(`Skipping the uninstall of custom installation step "${step.name}": its script exports no uninstall function.`);
1064
+ return false;
1065
+ }
1066
+ logger.info(`Executing custom uninstallation script: ${step.name}`);
1067
+ await uninstall(baselineConfig, context);
1068
+ logger.info(`Successfully executed script: ${step.name}`);
1069
+ return true;
1070
+ }
1071
+ /**
1072
+ * Applies the plan of a single custom installation step. An `add` runs its `install` and records
1073
+ * the step. A `remove` runs its `uninstall` and records `null`, or keeps the step's record when its
1074
+ * `uninstall` could not run.
1075
+ */
1076
+ async function applyCustomScript(plan, context) {
1077
+ const operation = plan.operations.at(0);
1078
+ if (operation?.kind === "add" && context.targetConfig) return { snapshotData: await runAddedStep(operation.after, context.targetConfig, context) };
1079
+ if (operation?.kind === "remove") return { snapshotData: plan.baselineConfig !== null && await runRemovedStep(operation.before, plan.baselineConfig, context) ? null : operation.before };
1080
+ throw new Error(`The plan of custom installation step "${plan.path.at(-1)}" has nothing to apply`);
1081
+ }
1082
+
1083
+ // source/management/deprecated/domains/custom-installation.ts
1084
+ /**
1085
+ * Creates the legacy install/uninstall handlers of a custom installation script leaf.
1086
+ * Deleted in the next major.
1087
+ *
1088
+ * @param scriptConfig - The custom installation step the handlers belong to.
1089
+ */
1090
+ function createDeprecatedCustomScriptHandlers(scriptConfig) {
1091
+ const { script, name } = scriptConfig;
1092
+ return {
1093
+ install: async (config, context) => {
1094
+ const { logger } = context;
1095
+ const customScripts = context.customScripts || {};
1096
+ logger.info(`Executing custom installation script: ${name}`);
1097
+ logger.debug(`Script path: ${script}`);
1098
+ const scriptModule = getScriptModuleOrThrow(customScripts, script);
1099
+ const scriptResult = await resolveCustomScriptHandler(scriptModule, "install")(config, context);
1100
+ logger.info(`Successfully executed script: ${name}`);
1101
+ return {
1102
+ data: scriptResult,
1103
+ script
1104
+ };
1105
+ },
1106
+ uninstall: async (config, context) => {
1107
+ const { logger } = context;
1108
+ const customScripts = context.customScripts || {};
1109
+ logger.debug(`Uninstalling custom script: ${name}`);
1110
+ const scriptModule = getScriptModule(customScripts, script);
1111
+ if (!scriptModule) {
1112
+ logger.warn(`Script ${script} not found in customScripts context, skipping uninstall. It may have been removed from the project after being configured.`);
1113
+ return;
1114
+ }
1115
+ const uninstall = resolveCustomScriptHandler(scriptModule, "uninstall");
1116
+ if (!uninstall) {
1117
+ logger.debug(`Script ${script} does not export an uninstall function, skipping uninstall.`);
1118
+ return;
1119
+ }
1120
+ await uninstall(config, context);
1121
+ logger.info(`Successfully uninstalled script: ${name}`);
1122
+ }
1123
+ };
1124
+ }
1125
+
1126
+ // source/management/domains/custom-installation/custom-scripts.ts
1127
+ const camelcase$1 = camelcase.default.default ?? camelcase.default;
1067
1128
  /** The custom installation step the config declares with the given name, if any. */
1068
1129
  function findDeclaredStep(config, name) {
1069
1130
  return require_webhooks.hasCustomInstallationSteps(config) ? config.installation.customInstallationSteps.find((step) => step.name === name) : void 0;
@@ -1112,52 +1173,6 @@ function createCustomScriptSteps(config) {
1112
1173
  return steps.map((scriptConfig) => createCustomScriptStep(scriptConfig));
1113
1174
  }
1114
1175
 
1115
- // source/management/domains/custom-installation/apply.ts
1116
- /** Runs a newly-added step's `install` handler and returns its persisted identity. */
1117
- async function runAddedStep(step, targetConfig, context) {
1118
- const { logger } = context;
1119
- const scriptModule = getScriptModuleOrThrow(context.customScripts ?? {}, step.script);
1120
- logger.info(`Executing custom installation script: ${step.name}`);
1121
- await resolveCustomScriptHandler(scriptModule, "install")(targetConfig, context);
1122
- logger.info(`Successfully executed script: ${step.name}`);
1123
- return {
1124
- name: step.name,
1125
- script: step.script
1126
- };
1127
- }
1128
- /**
1129
- * Runs the `uninstall` of a step that ran before. Returns whether it ran: a step whose script is
1130
- * not deployed, or that exports no `uninstall`, is skipped with a warning.
1131
- */
1132
- async function runRemovedStep(step, baselineConfig, context) {
1133
- const { logger } = context;
1134
- const scriptModule = getScriptModule(context.customScripts ?? {}, step.script);
1135
- if (!scriptModule) {
1136
- logger.warn(`Skipping the uninstall of custom installation step "${step.name}": its script "${step.script}" is not deployed.`);
1137
- return false;
1138
- }
1139
- const uninstall = resolveCustomScriptHandler(scriptModule, "uninstall");
1140
- if (!uninstall) {
1141
- logger.warn(`Skipping the uninstall of custom installation step "${step.name}": its script exports no uninstall function.`);
1142
- return false;
1143
- }
1144
- logger.info(`Executing custom uninstallation script: ${step.name}`);
1145
- await uninstall(baselineConfig, context);
1146
- logger.info(`Successfully executed script: ${step.name}`);
1147
- return true;
1148
- }
1149
- /**
1150
- * Applies the plan of a single custom installation step. An `add` runs its `install` and records
1151
- * the step. A `remove` runs its `uninstall` and records `null`, or keeps the step's record when its
1152
- * `uninstall` could not run.
1153
- */
1154
- async function applyCustomScript(plan, context) {
1155
- const operation = plan.operations.at(0);
1156
- if (operation?.kind === "add" && context.targetConfig) return { snapshotData: await runAddedStep(operation.after, context.targetConfig, context) };
1157
- if (operation?.kind === "remove") return { snapshotData: plan.baselineConfig !== null && await runRemovedStep(operation.before, plan.baselineConfig, context) ? null : operation.before };
1158
- throw new Error(`The plan of custom installation step "${plan.path.at(-1)}" has nothing to apply`);
1159
- }
1160
-
1161
1176
  // source/management/domains/custom-installation/changes.ts
1162
1177
  /**
1163
1178
  * The change of one custom installation step between the baseline and the target config: `add` when