@adobe/helix-config 4.12.0 → 4.13.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 +3 -3
- package/src/config-legacy.js +14 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [4.13.0](https://github.com/adobe/helix-config/compare/v4.12.1...v4.13.0) (2025-01-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* include metadata in legacy ([#234](https://github.com/adobe/helix-config/issues/234)) ([eebd5b6](https://github.com/adobe/helix-config/commit/eebd5b65a8e7d727b03b615ddf3a7f3021332c93))
|
|
7
|
+
|
|
8
|
+
## [4.12.1](https://github.com/adobe/helix-config/compare/v4.12.0...v4.12.1) (2025-01-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/helix-shared-config to v11.0.15 ([#236](https://github.com/adobe/helix-config/issues/236)) ([92c5305](https://github.com/adobe/helix-config/commit/92c530559c34e881c53053de524886e90379c9da))
|
|
14
|
+
|
|
1
15
|
# [4.12.0](https://github.com/adobe/helix-config/compare/v4.11.2...v4.12.0) (2025-01-16)
|
|
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.13.0",
|
|
4
4
|
"description": "Helix Config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"eslint": "8.57.1",
|
|
44
44
|
"husky": "9.1.7",
|
|
45
45
|
"junit-report-builder": "5.1.1",
|
|
46
|
-
"lint-staged": "15.
|
|
46
|
+
"lint-staged": "15.4.1",
|
|
47
47
|
"mocha": "11.0.1",
|
|
48
48
|
"mocha-multi-reporters": "1.5.1",
|
|
49
49
|
"mocha-suppress-logs": "0.5.1",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@adobe/fetch": "4.1.11",
|
|
59
|
-
"@adobe/helix-shared-config": "11.0.
|
|
59
|
+
"@adobe/helix-shared-config": "11.0.15",
|
|
60
60
|
"@adobe/helix-shared-utils": "3.0.2"
|
|
61
61
|
}
|
|
62
62
|
}
|
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;
|