@adobe/helix-config 2.17.0 → 2.18.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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/config-merge.js +1 -0
- package/src/config-view.js +9 -3
- package/src/schemas/profile.schema.json +3 -0
- package/src/schemas/public.schema.cjs +12 -0
- package/src/schemas/public.schema.json +18 -0
- package/src/schemas/site.schema.json +3 -0
- package/src/storage/config-validator.js +2 -0
- package/types/profile-config.d.ts +7 -0
- package/types/site-config.d.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.18.1](https://github.com/adobe/helix-config/compare/v2.18.0...v2.18.1) (2024-05-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* allow to set public configuration ([#80](https://github.com/adobe/helix-config/issues/80)) ([3a5b175](https://github.com/adobe/helix-config/commit/3a5b175f1afc074edd398f5a75a0c271c91ddc72))
|
|
7
|
+
|
|
8
|
+
# [2.18.0](https://github.com/adobe/helix-config/compare/v2.17.0...v2.18.0) (2024-05-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* delivery token hashes for pipeline scope ([#79](https://github.com/adobe/helix-config/issues/79)) ([371c771](https://github.com/adobe/helix-config/commit/371c7718fb9592e526fcef2f76efbd0ed6a209f6))
|
|
14
|
+
|
|
1
15
|
# [2.17.0](https://github.com/adobe/helix-config/compare/v2.16.1...v2.17.0) (2024-05-08)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/config-merge.js
CHANGED
package/src/config-view.js
CHANGED
|
@@ -314,10 +314,15 @@ export async function getConfigResponse(ctx, opts) {
|
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
// delete token hashes
|
|
317
|
+
// delete token hashes but keep for pipeline because the cloudflare worker still needs them
|
|
318
318
|
delete config.tokens;
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
if (opts.scope !== SCOPE_PIPELINE) {
|
|
320
|
+
delete config.access?.preview?.tokenHash;
|
|
321
|
+
delete config.access?.live?.tokenHash;
|
|
322
|
+
} else {
|
|
323
|
+
delete config.access?.preview?.apiKeyId;
|
|
324
|
+
delete config.access?.live?.apiKeyId;
|
|
325
|
+
}
|
|
321
326
|
|
|
322
327
|
if (opts.scope === SCOPE_ADMIN) {
|
|
323
328
|
const adminConfig = {
|
|
@@ -364,6 +369,7 @@ export async function getConfigResponse(ctx, opts) {
|
|
|
364
369
|
folders: config.folders,
|
|
365
370
|
public: config.public,
|
|
366
371
|
robots: config.robots,
|
|
372
|
+
access: config.access,
|
|
367
373
|
};
|
|
368
374
|
return new PipelineResponse(JSON.stringify(pipelineConfig, null, 2), {
|
|
369
375
|
headers: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
module.exports = require('./public.schema.json');
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta:license": [
|
|
3
|
+
"Copyright 2024 Adobe. All rights reserved.",
|
|
4
|
+
"This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
|
|
5
|
+
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
+
"of the License at http://www.apache.org/licenses/LICENSE-2.0",
|
|
7
|
+
"",
|
|
8
|
+
"Unless required by applicable law or agreed to in writing, software distributed under",
|
|
9
|
+
"the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
|
|
10
|
+
"OF ANY KIND, either express or implied. See the License for the specific language",
|
|
11
|
+
"governing permissions and limitations under the License."
|
|
12
|
+
],
|
|
13
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
14
|
+
"$id": "https://ns.adobe.com/helix/config/public",
|
|
15
|
+
"type": "object",
|
|
16
|
+
"title": "public",
|
|
17
|
+
"description": "Public configuration"
|
|
18
|
+
}
|
|
@@ -26,6 +26,7 @@ import markupSchema from '../schemas/content-source-markup.schema.cjs';
|
|
|
26
26
|
import metadataSchema from '../schemas/metadata-source.schema.cjs';
|
|
27
27
|
import orgSchema from '../schemas/org.schema.cjs';
|
|
28
28
|
import onedriveSchema from '../schemas/content-source-onedrive.schema.cjs';
|
|
29
|
+
import publicSchema from '../schemas/public.schema.cjs';
|
|
29
30
|
import profileSchema from '../schemas/profile.schema.cjs';
|
|
30
31
|
import robotsSchema from '../schemas/robots.schema.cjs';
|
|
31
32
|
import sidekickSchema from '../schemas/sidekick.schema.cjs';
|
|
@@ -46,6 +47,7 @@ const SCHEMAS = [
|
|
|
46
47
|
metadataSchema,
|
|
47
48
|
orgSchema,
|
|
48
49
|
onedriveSchema,
|
|
50
|
+
publicSchema,
|
|
49
51
|
profileSchema,
|
|
50
52
|
robotsSchema,
|
|
51
53
|
sidekickSchema,
|
|
@@ -31,6 +31,7 @@ export interface HelixProfileConfig {
|
|
|
31
31
|
sidekick?: SidekickConfig;
|
|
32
32
|
metadata?: Metadata;
|
|
33
33
|
robots?: Robots;
|
|
34
|
+
public?: Public;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
37
|
* Defines the content bus location and source.
|
|
@@ -246,3 +247,9 @@ export interface Metadata {
|
|
|
246
247
|
export interface Robots {
|
|
247
248
|
txt?: string;
|
|
248
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* Public configuration
|
|
252
|
+
*/
|
|
253
|
+
export interface Public {
|
|
254
|
+
[k: string]: unknown;
|
|
255
|
+
}
|
package/types/site-config.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export interface HelixSiteConfig {
|
|
|
35
35
|
sidekick?: SidekickConfig;
|
|
36
36
|
metadata?: Metadata;
|
|
37
37
|
robots?: Robots;
|
|
38
|
+
public?: Public;
|
|
38
39
|
extends?: {
|
|
39
40
|
[k: string]: unknown;
|
|
40
41
|
};
|
|
@@ -253,3 +254,9 @@ export interface Metadata {
|
|
|
253
254
|
export interface Robots {
|
|
254
255
|
txt?: string;
|
|
255
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Public configuration
|
|
259
|
+
*/
|
|
260
|
+
export interface Public {
|
|
261
|
+
[k: string]: unknown;
|
|
262
|
+
}
|