@adobe/aio-cli-lib-app-config 4.0.2 → 4.1.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/package.json +8 -8
- package/schema/app.config.yaml.schema.json +9 -2
- package/src/index.js +4 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aio-cli-lib-app-config",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
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",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"lodash.clonedeep": "^4.5.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@adobe/eslint-config-aio-lib-config": "^
|
|
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.
|
|
37
|
-
"eslint-plugin-jest": "^27",
|
|
38
|
-
"eslint-plugin-jsdoc": "^
|
|
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",
|
|
@@ -129,10 +129,17 @@
|
|
|
129
129
|
"type": "object",
|
|
130
130
|
"properties": {
|
|
131
131
|
"function": { "type": "string" },
|
|
132
|
-
"web": {
|
|
132
|
+
"web": {
|
|
133
|
+
"anyOf" : [
|
|
134
|
+
{"type": "string" },
|
|
135
|
+
{"type": "boolean" }
|
|
136
|
+
]
|
|
137
|
+
},
|
|
133
138
|
"runtime": { "type": "string" },
|
|
134
139
|
"inputs": { "$ref": "#/definitions/inputs" },
|
|
135
|
-
"annotations": { "$ref": "#/definitions/annotations" }
|
|
140
|
+
"annotations": { "$ref": "#/definitions/annotations" },
|
|
141
|
+
"web-export": { "not": {} },
|
|
142
|
+
"raw-http": { "not": {} }
|
|
136
143
|
},
|
|
137
144
|
"required": []
|
|
138
145
|
},
|
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',
|
|
@@ -688,10 +682,10 @@ async function buildSingleConfig (configName, singleUserConfig, commonConfig, in
|
|
|
688
682
|
|
|
689
683
|
config.app.defaultHostname = getCliEnv() === STAGE_ENV ? defaults.stageAppHostname : defaults.defaultAppHostname
|
|
690
684
|
config.app.hostname = singleUserConfig.hostname || config.app.defaultHostname
|
|
691
|
-
config.app.htmlCacheDuration = singleUserConfig.htmlcacheduration
|
|
692
|
-
config.app.jsCacheDuration = singleUserConfig.jscacheduration
|
|
693
|
-
config.app.cssCacheDuration = singleUserConfig.csscacheduration
|
|
694
|
-
config.app.imageCacheDuration = singleUserConfig.imagecacheduration
|
|
685
|
+
config.app.htmlCacheDuration = singleUserConfig.htmlcacheduration
|
|
686
|
+
config.app.jsCacheDuration = singleUserConfig.jscacheduration
|
|
687
|
+
config.app.cssCacheDuration = singleUserConfig.csscacheduration
|
|
688
|
+
config.app.imageCacheDuration = singleUserConfig.imagecacheduration
|
|
695
689
|
config.hooks = singleUserConfig.hooks || {}
|
|
696
690
|
|
|
697
691
|
config.imsOrgId = commonConfig.imsOrgId
|