@adobe/aio-commerce-lib-app 1.6.0 → 1.7.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 +23 -0
- package/dist/cjs/actions/app-config/index.cjs +202 -0
- package/dist/cjs/actions/app-config/index.d.cts +31 -0
- package/dist/cjs/actions/{config.cjs → config/index.cjs} +61 -33
- package/dist/{es/actions/config.d.mts → cjs/actions/config/index.d.cts} +10 -7
- package/dist/cjs/actions/{installation.cjs → installation/index.cjs} +43 -30
- package/dist/{es/actions/installation.d.mts → cjs/actions/installation/index.d.cts} +10 -8
- package/dist/cjs/actions/{registration.cjs → registration/index.cjs} +16 -6
- package/dist/cjs/actions/{registration.d.cts → registration/index.d.cts} +8 -8
- package/dist/cjs/actions/{scope-tree.cjs → scope-tree/index.cjs} +51 -14
- package/dist/cjs/actions/{scope-tree.d.cts → scope-tree/index.d.cts} +1 -1
- package/dist/cjs/{admin-ui-sdk-DZZJCrdT.d.cts → admin-ui-sdk-EU915zlR.d.cts} +7 -8
- package/dist/cjs/app-DrYHK-z1.d.cts +1629 -0
- package/dist/cjs/commands/index.cjs +12 -18
- package/dist/cjs/config/index.cjs +2 -2
- package/dist/cjs/config/index.d.cts +36 -976
- package/dist/cjs/{config-FNMclIFO.cjs → config-D-s0GSep.cjs} +1 -1
- package/dist/cjs/{index-Dw2NvVOY.d.cts → index-B5gJ-q4U.d.cts} +172 -3
- package/dist/{es/actions/app-config.d.mts → cjs/index-BXm8UbK7.d.cts} +1 -13
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/management/index.d.cts +1 -2
- package/dist/cjs/{management-Cvsz4VMf.cjs → management-Dehz9qSJ.cjs} +81 -43
- package/dist/cjs/openapi-Cux6K4ZD.cjs +3072 -0
- package/dist/cjs/{validate-DydOAZha.cjs → validate-oAOpyFyb.cjs} +46 -14
- package/dist/es/actions/app-config/index.d.mts +31 -0
- package/dist/es/actions/app-config/index.mjs +199 -0
- package/dist/{cjs/actions/config.d.cts → es/actions/config/index.d.mts} +10 -7
- package/dist/es/actions/{config.mjs → config/index.mjs} +60 -32
- package/dist/{cjs/actions/installation.d.cts → es/actions/installation/index.d.mts} +10 -8
- package/dist/es/actions/{installation.mjs → installation/index.mjs} +42 -30
- package/dist/es/actions/{registration.d.mts → registration/index.d.mts} +8 -8
- package/dist/es/actions/{registration.mjs → registration/index.mjs} +16 -6
- package/dist/es/actions/{scope-tree.d.mts → scope-tree/index.d.mts} +1 -1
- package/dist/es/actions/{scope-tree.mjs → scope-tree/index.mjs} +50 -13
- package/dist/es/{admin-ui-sdk-hu6iWr0A.d.mts → admin-ui-sdk-BwnD0xjK.d.mts} +6 -9
- package/dist/es/app-DrYHK-z1.d.mts +1629 -0
- package/dist/es/commands/index.mjs +12 -18
- package/dist/es/config/index.d.mts +36 -975
- package/dist/es/config/index.mjs +2 -2
- package/dist/es/{config-CcE0EBG7.mjs → config-3I4eLyyR.mjs} +1 -1
- package/dist/{cjs/actions/app-config.d.cts → es/index-B0XqHwY5.d.mts} +2 -14
- package/dist/es/{index-Bo0tQsVq.d.mts → index-DLMbTtKS.d.mts} +172 -3
- package/dist/es/management/index.d.mts +1 -2
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-BZ4Y6lVp.mjs → management-BUX-w2Ji.mjs} +81 -44
- package/dist/es/openapi-B6uP0SRn.mjs +3024 -0
- package/dist/es/{validate-Du3LhCre.mjs → validate-Dfajrp99.mjs} +35 -15
- package/package.json +17 -10
- package/dist/cjs/actions/app-config.cjs +0 -54
- package/dist/cjs/app-CakwxQvs.d.cts +0 -673
- package/dist/cjs/step-CKVE0aJi.d.cts +0 -187
- package/dist/es/actions/app-config.mjs +0 -53
- package/dist/es/app-CakwxQvs.d.mts +0 -673
- package/dist/es/step-D64mMPrt.d.mts +0 -187
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
* governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import { t as stringifyError } from "../error-_RMwtrUA.mjs";
|
|
17
|
+
import { a as getExecCommand, c as isESM, i as detectPackageManager, l as makeOutputDirFor, n as readCommerceAppConfig, o as getInstallCommand, r as resolveCommerceAppConfig, s as getProjectRootDirectory, t as parseCommerceAppConfig, u as readPackageJson } from "../config-3I4eLyyR.mjs";
|
|
16
18
|
import { a as hasCustomInstallationSteps, d as hasAdminUiSdk } from "../webhooks-B5oq9ULL.mjs";
|
|
17
|
-
import {
|
|
19
|
+
import { o as getConfigDomains, r as requiresInstallation, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../validate-Dfajrp99.mjs";
|
|
18
20
|
import { t as inspect } from "../logging-DbJHXSKh.mjs";
|
|
19
|
-
import { t as stringifyError } from "../error-_RMwtrUA.mjs";
|
|
20
|
-
import { a as getExecCommand, c as isESM, i as detectPackageManager, l as makeOutputDirFor, n as readCommerceAppConfig, o as getInstallCommand, r as resolveCommerceAppConfig, s as getProjectRootDirectory, t as parseCommerceAppConfig, u as readPackageJson } from "../config-CcE0EBG7.mjs";
|
|
21
|
-
import { hasDynamicSchema } from "@adobe/aio-commerce-lib-config";
|
|
22
21
|
import { CommerceSdkValidationError } from "@adobe/aio-commerce-lib-core/error";
|
|
23
22
|
import consola, { consola as consola$1 } from "consola";
|
|
24
23
|
import path, { basename, dirname, extname, join, relative, resolve, sep } from "path";
|
|
24
|
+
import { hasDynamicSchema } from "@adobe/aio-commerce-lib-config";
|
|
25
25
|
import * as prettier from "prettier";
|
|
26
26
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
27
27
|
import { access, readFile, rm, writeFile } from "fs/promises";
|
|
@@ -193,7 +193,7 @@ function createActionDefinition(actionName, config = {}, options = {}) {
|
|
|
193
193
|
...options,
|
|
194
194
|
function: `${GENERATED_ACTIONS_PATH}/${actionName}.js`,
|
|
195
195
|
web: options.web ?? "yes",
|
|
196
|
-
runtime: "nodejs:
|
|
196
|
+
runtime: "nodejs:24",
|
|
197
197
|
annotations: {
|
|
198
198
|
"require-adobe-auth": true,
|
|
199
199
|
final: true
|
|
@@ -220,8 +220,6 @@ function getRuntimeActions(extConfig, dir) {
|
|
|
220
220
|
* @param features - The features that are enabled for the app.
|
|
221
221
|
*/
|
|
222
222
|
function buildAppManagementExtConfig(appConfig) {
|
|
223
|
-
const features = getConfigDomains(appConfig);
|
|
224
|
-
const hasPasswordFieldsInSchema = hasBusinessConfigSchema(appConfig) && appConfig.businessConfig.schema.some((field) => field.type === "password");
|
|
225
223
|
const extConfig = {
|
|
226
224
|
hooks: { "pre-app-build": "EXTENSION=extensibility/1 $packageExec aio-commerce-lib-app hooks pre-app-build" },
|
|
227
225
|
operations: { workerProcess: [{
|
|
@@ -233,13 +231,9 @@ function buildAppManagementExtConfig(appConfig) {
|
|
|
233
231
|
actions: { "app-config": createActionDefinition("app-config") }
|
|
234
232
|
} } }
|
|
235
233
|
};
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
"eventing.external",
|
|
240
|
-
"webhooks",
|
|
241
|
-
"adminUiSdk"
|
|
242
|
-
].some((feature) => features.has(feature))) {
|
|
234
|
+
const needsInstallAction = requiresInstallation(appConfig);
|
|
235
|
+
const hasPasswordFieldsInSchema = hasBusinessConfigSchema(appConfig) && appConfig.businessConfig.schema.some((field) => field.type === "password");
|
|
236
|
+
if (needsInstallAction) {
|
|
243
237
|
extConfig.operations.workerProcess.push({
|
|
244
238
|
type: "action",
|
|
245
239
|
impl: `${PACKAGE_NAME}/installation`
|
|
@@ -292,7 +286,7 @@ function buildAdminUiSdkExtConfig() {
|
|
|
292
286
|
actions: { registration: {
|
|
293
287
|
function: `${ADMIN_UI_SDK_ACTIONS_PATH}/index.js`,
|
|
294
288
|
web: "yes",
|
|
295
|
-
runtime: "nodejs:
|
|
289
|
+
runtime: "nodejs:24",
|
|
296
290
|
annotations: {
|
|
297
291
|
"require-adobe-auth": true,
|
|
298
292
|
final: true
|
|
@@ -441,7 +435,7 @@ function buildActionDefinition(action, existingAction) {
|
|
|
441
435
|
const managedInputs = { LOG_LEVEL: "$LOG_LEVEL" };
|
|
442
436
|
actionDef.set("function", action.function);
|
|
443
437
|
actionDef.set("web", action.web ?? "yes");
|
|
444
|
-
actionDef.set("runtime", existingRuntime ?? action.runtime ?? "nodejs:
|
|
438
|
+
actionDef.set("runtime", existingRuntime ?? action.runtime ?? "nodejs:24");
|
|
445
439
|
actionDef.set("inputs", {
|
|
446
440
|
...existingInputs,
|
|
447
441
|
...managedInputs,
|
|
@@ -1399,7 +1393,7 @@ function runInstall(packageManager, dependencies, cwd = process.cwd()) {
|
|
|
1399
1393
|
*/
|
|
1400
1394
|
function installDependencies(packageManager, domains, cwd = process.cwd()) {
|
|
1401
1395
|
const packages = [];
|
|
1402
|
-
if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.5.
|
|
1396
|
+
if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.5.1`);
|
|
1403
1397
|
if (packages.length === 0) {
|
|
1404
1398
|
consola$1.info("No additional domain dependencies to install.");
|
|
1405
1399
|
return;
|
|
@@ -1426,7 +1420,7 @@ async function ensureInstallYaml(domains, cwd = process.cwd()) {
|
|
|
1426
1420
|
|
|
1427
1421
|
//#endregion
|
|
1428
1422
|
//#region source/commands/init/main.ts
|
|
1429
|
-
const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.
|
|
1423
|
+
const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.7.0`];
|
|
1430
1424
|
/** Initialize the project */
|
|
1431
1425
|
async function run(flags, extraOptions) {
|
|
1432
1426
|
consola$1.start("Initializing app...");
|