@adobe/aio-cli-lib-app-config 4.0.2 → 4.1.0-pre.2026-01-09.sha-ecf7b0a0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/aio-cli-lib-app-config",
3
- "version": "4.0.2",
3
+ "version": "4.1.0-pre.2026-01-09.sha-ecf7b0a0",
4
4
  "description": "node lib to provide a consistent interface to various config files that make up Adobe Developer App Builder applications and extensions",
5
5
  "repository": "https://github.com/adobe/aio-cli-lib-app-config/",
6
6
  "license": "Apache-2.0",
@@ -18,9 +18,9 @@
18
18
  "generate-docs": "npm run typings && npm run jsdoc"
19
19
  },
20
20
  "dependencies": {
21
- "@adobe/aio-lib-core-config": "^5",
22
- "@adobe/aio-lib-core-logging": "^3",
23
- "@adobe/aio-lib-env": "^3",
21
+ "@adobe/aio-lib-core-config": "next",
22
+ "@adobe/aio-lib-core-logging": "next",
23
+ "@adobe/aio-lib-env": "next",
24
24
  "ajv": "^8.12.0",
25
25
  "ajv-formats": "^2.1.1",
26
26
  "fs-extra": "^9.0.1",
@@ -28,17 +28,17 @@
28
28
  "lodash.clonedeep": "^4.5.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@adobe/eslint-config-aio-lib-config": "^2",
31
+ "@adobe/eslint-config-aio-lib-config": "^4.0.0",
32
32
  "babel-runtime": "^6.26.0",
33
33
  "eol": "^0.9.1",
34
- "eslint": "^8",
35
- "eslint-config-standard": "^17",
36
- "eslint-plugin-import": "^2.25.3",
37
- "eslint-plugin-jest": "^27",
38
- "eslint-plugin-jsdoc": "^42",
34
+ "eslint": "^8.57.1",
35
+ "eslint-config-standard": "^17.1.0",
36
+ "eslint-plugin-import": "^2.31.0",
37
+ "eslint-plugin-jest": "^27.9.0",
38
+ "eslint-plugin-jsdoc": "^48.11.0",
39
39
  "eslint-plugin-n": "^15.7.0",
40
40
  "eslint-plugin-node": "^11.1.0",
41
- "eslint-plugin-promise": "^6",
41
+ "eslint-plugin-promise": "^6.6.0",
42
42
  "eslint-plugin-standard": "^4.0.0",
43
43
  "jest": "^29",
44
44
  "jest-junit": "^10.0.0",
@@ -74,5 +74,6 @@
74
74
  "setupFilesAfterEnv": [
75
75
  "./test/jest.setup.js"
76
76
  ]
77
- }
78
- }
77
+ },
78
+ "prereleaseSha": "ecf7b0a033814d2ff0ef69a5a3c04698b470d9da"
79
+ }
@@ -96,7 +96,8 @@
96
96
  "runtimeManifest": {
97
97
  "type": "object",
98
98
  "properties": {
99
- "packages": { "$ref": "#/definitions/packages" }
99
+ "packages": { "$ref": "#/definitions/packages" },
100
+ "database": { "$ref": "#/definitions/database" }
100
101
  },
101
102
  "required": ["packages"]
102
103
  },
@@ -109,6 +110,15 @@
109
110
  },
110
111
  "additionalProperties": false
111
112
  },
113
+ "database": {
114
+ "type": "object",
115
+ "properties": {
116
+ "auto-provision": { "type": "boolean"},
117
+ "region": { "type": "string"}
118
+ },
119
+ "required": ["auto-provision"],
120
+ "additionalProperties": false
121
+ },
112
122
  "package": {
113
123
  "type": "object",
114
124
  "properties": {
@@ -129,10 +139,17 @@
129
139
  "type": "object",
130
140
  "properties": {
131
141
  "function": { "type": "string" },
132
- "web": { "type": "string" },
142
+ "web": {
143
+ "anyOf" : [
144
+ {"type": "string" },
145
+ {"type": "boolean" }
146
+ ]
147
+ },
133
148
  "runtime": { "type": "string" },
134
149
  "inputs": { "$ref": "#/definitions/inputs" },
135
- "annotations": { "$ref": "#/definitions/annotations" }
150
+ "annotations": { "$ref": "#/definitions/annotations" },
151
+ "web-export": { "not": {} },
152
+ "raw-http": { "not": {} }
136
153
  },
137
154
  "required": []
138
155
  },
package/src/index.js CHANGED
@@ -21,16 +21,10 @@ const ajvAddFormats = require('ajv-formats')
21
21
  // eslint-disable-next-line node/no-unpublished-require
22
22
  const schema = require('../schema/app.config.yaml.schema.json')
23
23
 
24
- // give or take daylight savings, and leap seconds ...
25
- const AboutAWeekInSeconds = '604800'
26
24
  const defaults = {
27
25
  defaultAppHostname: 'adobeio-static.net',
28
26
  defaultTvmUrl: 'https://firefly-tvm.adobe.io',
29
27
  defaultOwApihost: 'https://adobeioruntime.net',
30
- defaultHTMLCacheDuration: '60',
31
- defaultJSCacheDuration: AboutAWeekInSeconds,
32
- defaultCSSCacheDuration: AboutAWeekInSeconds,
33
- defaultImageCacheDuration: AboutAWeekInSeconds,
34
28
  stageAppHostname: 'dev.runtime.adobe.io',
35
29
  USER_CONFIG_FILE: 'app.config.yaml',
36
30
  LEGACY_RUNTIME_MANIFEST: 'manifest.yml',
@@ -637,6 +631,9 @@ async function buildSingleConfig (configName, singleUserConfig, commonConfig, in
637
631
  if (singleUserConfig.events) {
638
632
  config.events = { ...singleUserConfig.events }
639
633
  }
634
+ if (manifest && manifest.database) {
635
+ config.database = { ...manifest.database }
636
+ }
640
637
  if (commonConfig?.aio?.project) {
641
638
  config.project = commonConfig.aio.project
642
639
  }
@@ -688,10 +685,10 @@ async function buildSingleConfig (configName, singleUserConfig, commonConfig, in
688
685
 
689
686
  config.app.defaultHostname = getCliEnv() === STAGE_ENV ? defaults.stageAppHostname : defaults.defaultAppHostname
690
687
  config.app.hostname = singleUserConfig.hostname || config.app.defaultHostname
691
- config.app.htmlCacheDuration = singleUserConfig.htmlcacheduration || defaults.defaultHTMLCacheDuration
692
- config.app.jsCacheDuration = singleUserConfig.jscacheduration || defaults.defaultJSCacheDuration
693
- config.app.cssCacheDuration = singleUserConfig.csscacheduration || defaults.defaultCSSCacheDuration
694
- config.app.imageCacheDuration = singleUserConfig.imagecacheduration || defaults.defaultImageCacheDuration
688
+ config.app.htmlCacheDuration = singleUserConfig.htmlcacheduration
689
+ config.app.jsCacheDuration = singleUserConfig.jscacheduration
690
+ config.app.cssCacheDuration = singleUserConfig.csscacheduration
691
+ config.app.imageCacheDuration = singleUserConfig.imagecacheduration
695
692
  config.hooks = singleUserConfig.hooks || {}
696
693
 
697
694
  config.imsOrgId = commonConfig.imsOrgId