@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
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
const require_chunk = require('../chunk-Cozy-1ZF.cjs');
|
|
17
|
+
const require_error = require('../error-D-N0PKSl.cjs');
|
|
18
|
+
const require_config = require('../config-D-s0GSep.cjs');
|
|
17
19
|
const require_webhooks = require('../webhooks-tbZy9G3p.cjs');
|
|
18
|
-
const require_validate = require('../validate-
|
|
20
|
+
const require_validate = require('../validate-oAOpyFyb.cjs');
|
|
19
21
|
const require_logging = require('../logging-BVz3weoC.cjs');
|
|
20
|
-
const require_error = require('../error-D-N0PKSl.cjs');
|
|
21
|
-
const require_config = require('../config-FNMclIFO.cjs');
|
|
22
|
-
let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
|
|
23
22
|
let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
|
|
24
23
|
let consola = require("consola");
|
|
25
24
|
consola = require_chunk.__toESM(consola, 1);
|
|
26
25
|
let path = require("path");
|
|
27
26
|
path = require_chunk.__toESM(path, 1);
|
|
27
|
+
let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
|
|
28
28
|
let prettier = require("prettier");
|
|
29
29
|
prettier = require_chunk.__toESM(prettier, 1);
|
|
30
30
|
let fs = require("fs");
|
|
@@ -202,7 +202,7 @@ function createActionDefinition(actionName, config = {}, options = {}) {
|
|
|
202
202
|
...options,
|
|
203
203
|
function: `${GENERATED_ACTIONS_PATH}/${actionName}.js`,
|
|
204
204
|
web: options.web ?? "yes",
|
|
205
|
-
runtime: "nodejs:
|
|
205
|
+
runtime: "nodejs:24",
|
|
206
206
|
annotations: {
|
|
207
207
|
"require-adobe-auth": true,
|
|
208
208
|
final: true
|
|
@@ -229,8 +229,6 @@ function getRuntimeActions(extConfig, dir) {
|
|
|
229
229
|
* @param features - The features that are enabled for the app.
|
|
230
230
|
*/
|
|
231
231
|
function buildAppManagementExtConfig(appConfig) {
|
|
232
|
-
const features = require_validate.getConfigDomains(appConfig);
|
|
233
|
-
const hasPasswordFieldsInSchema = require_validate.hasBusinessConfigSchema(appConfig) && appConfig.businessConfig.schema.some((field) => field.type === "password");
|
|
234
232
|
const extConfig = {
|
|
235
233
|
hooks: { "pre-app-build": "EXTENSION=extensibility/1 $packageExec aio-commerce-lib-app hooks pre-app-build" },
|
|
236
234
|
operations: { workerProcess: [{
|
|
@@ -242,13 +240,9 @@ function buildAppManagementExtConfig(appConfig) {
|
|
|
242
240
|
actions: { "app-config": createActionDefinition("app-config") }
|
|
243
241
|
} } }
|
|
244
242
|
};
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
"eventing.external",
|
|
249
|
-
"webhooks",
|
|
250
|
-
"adminUiSdk"
|
|
251
|
-
].some((feature) => features.has(feature))) {
|
|
243
|
+
const needsInstallAction = require_validate.requiresInstallation(appConfig);
|
|
244
|
+
const hasPasswordFieldsInSchema = require_validate.hasBusinessConfigSchema(appConfig) && appConfig.businessConfig.schema.some((field) => field.type === "password");
|
|
245
|
+
if (needsInstallAction) {
|
|
252
246
|
extConfig.operations.workerProcess.push({
|
|
253
247
|
type: "action",
|
|
254
248
|
impl: `${PACKAGE_NAME}/installation`
|
|
@@ -301,7 +295,7 @@ function buildAdminUiSdkExtConfig() {
|
|
|
301
295
|
actions: { registration: {
|
|
302
296
|
function: `${ADMIN_UI_SDK_ACTIONS_PATH}/index.js`,
|
|
303
297
|
web: "yes",
|
|
304
|
-
runtime: "nodejs:
|
|
298
|
+
runtime: "nodejs:24",
|
|
305
299
|
annotations: {
|
|
306
300
|
"require-adobe-auth": true,
|
|
307
301
|
final: true
|
|
@@ -450,7 +444,7 @@ function buildActionDefinition(action, existingAction) {
|
|
|
450
444
|
const managedInputs = { LOG_LEVEL: "$LOG_LEVEL" };
|
|
451
445
|
actionDef.set("function", action.function);
|
|
452
446
|
actionDef.set("web", action.web ?? "yes");
|
|
453
|
-
actionDef.set("runtime", existingRuntime ?? action.runtime ?? "nodejs:
|
|
447
|
+
actionDef.set("runtime", existingRuntime ?? action.runtime ?? "nodejs:24");
|
|
454
448
|
actionDef.set("inputs", {
|
|
455
449
|
...existingInputs,
|
|
456
450
|
...managedInputs,
|
|
@@ -1408,7 +1402,7 @@ function runInstall(packageManager, dependencies, cwd = process.cwd()) {
|
|
|
1408
1402
|
*/
|
|
1409
1403
|
function installDependencies(packageManager, domains, cwd = process.cwd()) {
|
|
1410
1404
|
const packages = [];
|
|
1411
|
-
if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.5.
|
|
1405
|
+
if (domains.has("businessConfig.schema")) packages.push(`@adobe/aio-commerce-lib-config@^1.5.1`);
|
|
1412
1406
|
if (packages.length === 0) {
|
|
1413
1407
|
consola.consola.info("No additional domain dependencies to install.");
|
|
1414
1408
|
return;
|
|
@@ -1435,7 +1429,7 @@ async function ensureInstallYaml(domains, cwd = process.cwd()) {
|
|
|
1435
1429
|
|
|
1436
1430
|
//#endregion
|
|
1437
1431
|
//#region source/commands/init/main.ts
|
|
1438
|
-
const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.
|
|
1432
|
+
const REQUIRED_DEPENDENCIES = ["@adobe/aio-commerce-sdk", `@adobe/aio-commerce-lib-app@1.7.0`];
|
|
1439
1433
|
/** Initialize the project */
|
|
1440
1434
|
async function run(flags, extraOptions) {
|
|
1441
1435
|
consola.consola.start("Initializing app...");
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
|
+
const require_config = require('../config-D-s0GSep.cjs');
|
|
16
17
|
const require_webhooks = require('../webhooks-tbZy9G3p.cjs');
|
|
17
|
-
const require_validate = require('../validate-
|
|
18
|
-
const require_config = require('../config-FNMclIFO.cjs');
|
|
18
|
+
const require_validate = require('../validate-oAOpyFyb.cjs');
|
|
19
19
|
|
|
20
20
|
exports.CommerceAppConfigSchemas = require_validate.CommerceAppConfigSchemas;
|
|
21
21
|
exports.defineConfig = require_config.defineConfig;
|