diff --git a/src/index.js b/src/index.js index 40b98cd..fe9d300 100644 --- a/src/index.js +++ b/src/index.js @@ -21,16 +21,10 @@ const ajvAddFormats = require('ajv-formats') // eslint-disable-next-line node/no-unpublished-require const schema = require('../schema/app.config.yaml.schema.json') -// give or take daylight savings, and leap seconds ... -const AboutAWeekInSeconds = '604800' const defaults = { defaultAppHostname: 'adobeio-static.net', defaultTvmUrl: 'https://firefly-tvm.adobe.io', defaultOwApihost: 'https://adobeioruntime.net', - defaultHTMLCacheDuration: '60', - defaultJSCacheDuration: AboutAWeekInSeconds, - defaultCSSCacheDuration: AboutAWeekInSeconds, - defaultImageCacheDuration: AboutAWeekInSeconds, stageAppHostname: 'dev.runtime.adobe.io', USER_CONFIG_FILE: 'app.config.yaml', LEGACY_RUNTIME_MANIFEST: 'manifest.yml', @@ -688,10 +682,10 @@ async function buildSingleConfig (configName, singleUserConfig, commonConfig, in config.app.defaultHostname = getCliEnv() === STAGE_ENV ? defaults.stageAppHostname : defaults.defaultAppHostname config.app.hostname = singleUserConfig.hostname || config.app.defaultHostname - config.app.htmlCacheDuration = singleUserConfig.htmlcacheduration || defaults.defaultHTMLCacheDuration - config.app.jsCacheDuration = singleUserConfig.jscacheduration || defaults.defaultJSCacheDuration - config.app.cssCacheDuration = singleUserConfig.csscacheduration || defaults.defaultCSSCacheDuration - config.app.imageCacheDuration = singleUserConfig.imagecacheduration || defaults.defaultImageCacheDuration + config.app.htmlCacheDuration = singleUserConfig.htmlcacheduration + config.app.jsCacheDuration = singleUserConfig.jscacheduration + config.app.cssCacheDuration = singleUserConfig.csscacheduration + config.app.imageCacheDuration = singleUserConfig.imagecacheduration config.hooks = singleUserConfig.hooks || {} config.imsOrgId = commonConfig.imsOrgId diff --git a/test/data-mocks/config-loader.js b/test/data-mocks/config-loader.js index 6eb135c..1750ef4 100644 --- a/test/data-mocks/config-loader.js +++ b/test/data-mocks/config-loader.js @@ -146,10 +146,10 @@ const excSingleConfig = { dist: winCompat(`${root}dist/dx-excshell-1`), defaultHostname: 'adobeio-static.net', hostname: 'adobeio-static.net', - htmlCacheDuration: '60', - jsCacheDuration: '604800', - cssCacheDuration: '604800', - imageCacheDuration: '604800' + htmlCacheDuration: undefined, + jsCacheDuration: undefined, + cssCacheDuration: undefined, + imageCacheDuration: undefined }, ow, s3: { @@ -197,10 +197,10 @@ const nuiSingleConfig = { dist: winCompat(`${root}dist/dx-asset-compute-worker-1`), defaultHostname: 'adobeio-static.net', hostname: 'adobeio-static.net', - htmlCacheDuration: '60', - jsCacheDuration: '604800', - cssCacheDuration: '604800', - imageCacheDuration: '604800' + htmlCacheDuration: undefined, + jsCacheDuration: undefined, + cssCacheDuration: undefined, + imageCacheDuration: undefined }, ow, s3: {}, @@ -246,10 +246,10 @@ const applicationSingleConfig = { dist: winCompat(`${root}dist/application`), defaultHostname: 'adobeio-static.net', hostname: 'adobeio-static.net', - htmlCacheDuration: '60', - jsCacheDuration: '604800', - cssCacheDuration: '604800', - imageCacheDuration: '604800' + htmlCacheDuration: undefined, + jsCacheDuration: undefined, + cssCacheDuration: undefined, + imageCacheDuration: undefined }, ow, s3: { @@ -304,10 +304,10 @@ const applicationNoActionsSingleConfig = { dist: winCompat(`${root}dist/application`), defaultHostname: 'adobeio-static.net', hostname: 'adobeio-static.net', - htmlCacheDuration: '60', - jsCacheDuration: '604800', - cssCacheDuration: '604800', - imageCacheDuration: '604800' + htmlCacheDuration: undefined, + jsCacheDuration: undefined, + cssCacheDuration: undefined, + imageCacheDuration: undefined }, ow, s3: {