@adobe/helix-config 4.12.1 → 4.14.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 +14 -0
- package/package.json +5 -5
- package/src/config-legacy.js +14 -2
- package/src/config-merge.js +2 -0
- package/src/config-view.js +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [4.14.0](https://github.com/adobe/helix-config/compare/v4.13.0...v4.14.0) (2025-02-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* include features and limits to responses ([#242](https://github.com/adobe/helix-config/issues/242)) ([c7500b8](https://github.com/adobe/helix-config/commit/c7500b83a44f8479a9a70a43850fabc83294a60c)), closes [#9](https://github.com/adobe/helix-config/issues/9)
|
|
7
|
+
|
|
8
|
+
# [4.13.0](https://github.com/adobe/helix-config/compare/v4.12.1...v4.13.0) (2025-01-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* include metadata in legacy ([#234](https://github.com/adobe/helix-config/issues/234)) ([eebd5b6](https://github.com/adobe/helix-config/commit/eebd5b65a8e7d727b03b615ddf3a7f3021332c93))
|
|
14
|
+
|
|
1
15
|
## [4.12.1](https://github.com/adobe/helix-config/compare/v4.12.0...v4.12.1) (2025-01-21)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.0",
|
|
4
4
|
"description": "Helix Config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"reporter-options": "configFile=.mocha-multi.json"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@adobe/eslint-config-helix": "2.0.
|
|
38
|
+
"@adobe/eslint-config-helix": "2.0.9",
|
|
39
39
|
"@semantic-release/changelog": "6.0.3",
|
|
40
40
|
"@semantic-release/git": "10.0.1",
|
|
41
41
|
"@semantic-release/npm": "12.0.1",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"eslint": "8.57.1",
|
|
44
44
|
"husky": "9.1.7",
|
|
45
45
|
"junit-report-builder": "5.1.1",
|
|
46
|
-
"lint-staged": "15.4.
|
|
47
|
-
"mocha": "11.0
|
|
46
|
+
"lint-staged": "15.4.3",
|
|
47
|
+
"mocha": "11.1.0",
|
|
48
48
|
"mocha-multi-reporters": "1.5.1",
|
|
49
49
|
"mocha-suppress-logs": "0.5.1",
|
|
50
50
|
"nock": "13.5.6",
|
|
51
|
-
"semantic-release": "24.2.
|
|
51
|
+
"semantic-release": "24.2.2"
|
|
52
52
|
},
|
|
53
53
|
"lint-staged": {
|
|
54
54
|
"*.js": "eslint",
|
package/src/config-legacy.js
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
SCOPE_ADMIN, SCOPE_DELIVERY, SCOPE_PIPELINE, SCOPE_RAW,
|
|
14
|
+
} from './ConfigContext.js';
|
|
13
15
|
import { ConfigObject } from './config-object.js';
|
|
14
16
|
|
|
15
17
|
const HELIX_CODE_BUS = 'helix-code-bus';
|
|
@@ -187,10 +189,13 @@ export async function resolveLegacyConfig(ctx, rso, scope) {
|
|
|
187
189
|
}
|
|
188
190
|
}
|
|
189
191
|
|
|
192
|
+
if (scope !== SCOPE_DELIVERY && configAllPreview) {
|
|
193
|
+
config.headers = configAllPreview.headers?.data ?? {};
|
|
194
|
+
}
|
|
195
|
+
|
|
190
196
|
if (scope === SCOPE_PIPELINE) {
|
|
191
197
|
config.metadata = {};
|
|
192
198
|
if (configAllPreview) {
|
|
193
|
-
config.headers = configAllPreview.headers?.data ?? {};
|
|
194
199
|
config.metadata.preview = configAllPreview.metadata ?? {};
|
|
195
200
|
}
|
|
196
201
|
if (configAllLive?.metadata) {
|
|
@@ -201,6 +206,13 @@ export async function resolveLegacyConfig(ctx, rso, scope) {
|
|
|
201
206
|
delete config.robots;
|
|
202
207
|
}
|
|
203
208
|
}
|
|
209
|
+
if ((scope === SCOPE_ADMIN || scope === SCOPE_RAW) && configAllPreview?.config?.data?.metadata) {
|
|
210
|
+
if (!config.metadata) {
|
|
211
|
+
config.metadata = {};
|
|
212
|
+
}
|
|
213
|
+
config.metadata.source = configAllPreview?.config?.data?.metadata;
|
|
214
|
+
}
|
|
215
|
+
|
|
204
216
|
const obj = new ConfigObject();
|
|
205
217
|
obj.data = config;
|
|
206
218
|
return obj;
|
package/src/config-merge.js
CHANGED
package/src/config-view.js
CHANGED
|
@@ -582,6 +582,12 @@ export async function getConfigResponse(ctx, opts) {
|
|
|
582
582
|
legacy: config.legacy,
|
|
583
583
|
lastModified: siteConfig.lastModified,
|
|
584
584
|
};
|
|
585
|
+
if (config.features) {
|
|
586
|
+
pipelineConfig.features = config.features;
|
|
587
|
+
}
|
|
588
|
+
if (config.limits) {
|
|
589
|
+
pipelineConfig.limits = config.limits;
|
|
590
|
+
}
|
|
585
591
|
return new PipelineResponse(JSON.stringify(pipelineConfig, null, 2), {
|
|
586
592
|
headers: {
|
|
587
593
|
'content-type': 'application/json',
|