@adobe/aio-cli-lib-app-config 1.0.0 → 1.0.1
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 +1 -1
- package/src/index.js +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aio-cli-lib-app-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
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",
|
package/src/index.js
CHANGED
|
@@ -467,11 +467,18 @@ function buildSingleConfig (configName, singleUserConfig, commonConfig, includeI
|
|
|
467
467
|
|
|
468
468
|
// absolute paths
|
|
469
469
|
const actions = pathConfigValueToAbs(singleUserConfig.actions, fullKeyPrefix + '.actions', includeIndex) || defaultActionPath
|
|
470
|
-
const web = pathConfigValueToAbs(singleUserConfig.web, fullKeyPrefix + '.web', includeIndex) || defaultWebPath
|
|
471
470
|
const unitTest = pathConfigValueToAbs(singleUserConfig.unitTest, fullKeyPrefix + '.web', includeIndex) || defaultUnitTestPath
|
|
472
471
|
const e2eTest = pathConfigValueToAbs(singleUserConfig.e2eTest, fullKeyPrefix + '.web', includeIndex) || defaultE2eTestPath
|
|
473
472
|
const dist = pathConfigValueToAbs(singleUserConfig.dist, fullKeyPrefix + '.dist', includeIndex) || defaultDistPath
|
|
474
473
|
|
|
474
|
+
let web
|
|
475
|
+
if (!singleUserConfig.web || typeof singleUserConfig.web === 'string') {
|
|
476
|
+
// keep backward compatibility - web src is directly defined as string web: web-src
|
|
477
|
+
web = pathConfigValueToAbs(singleUserConfig.web, fullKeyPrefix + '.web', includeIndex) || defaultWebPath
|
|
478
|
+
} else {
|
|
479
|
+
web = pathConfigValueToAbs(singleUserConfig.web.src, fullKeyPrefix + '.web', includeIndex) || defaultWebPath
|
|
480
|
+
}
|
|
481
|
+
|
|
475
482
|
config.tests.unit = path.resolve(unitTest)
|
|
476
483
|
config.tests.e2e = path.resolve(e2eTest)
|
|
477
484
|
|
|
@@ -497,6 +504,9 @@ function buildSingleConfig (configName, singleUserConfig, commonConfig, includeI
|
|
|
497
504
|
|
|
498
505
|
// web
|
|
499
506
|
config.web.src = path.resolve(web) // needed for app add first web-assets
|
|
507
|
+
if (singleUserConfig.web && singleUserConfig.web['response-headers']) {
|
|
508
|
+
config.web['response-headers'] = singleUserConfig.web['response-headers']
|
|
509
|
+
}
|
|
500
510
|
if (config.app.hasFrontend) {
|
|
501
511
|
config.web.injectedConfig = path.resolve(path.join(web, 'src', 'config.json'))
|
|
502
512
|
// only add subfolder name if dist is default value
|