@adobe/helix-config-storage 1.14.7 → 1.15.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 CHANGED
@@ -1,3 +1,15 @@
1
+ # [1.15.0](https://github.com/adobe/helix-config-storage/compare/v1.14.7...v1.15.0) (2025-02-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update adobe fixes ([#88](https://github.com/adobe/helix-config-storage/issues/88)) ([da9ea07](https://github.com/adobe/helix-config-storage/commit/da9ea071b91e05a97a7b71d71c9019c195102ae8))
7
+
8
+
9
+ ### Features
10
+
11
+ * implements features and limits ([#87](https://github.com/adobe/helix-config-storage/issues/87)) ([3812b9d](https://github.com/adobe/helix-config-storage/commit/3812b9d11e3f83b65e40507eea2b4b8ad5f197da))
12
+
1
13
  ## [1.14.7](https://github.com/adobe/helix-config-storage/compare/v1.14.6...v1.14.7) (2025-01-29)
2
14
 
3
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config-storage",
3
- "version": "1.14.7",
3
+ "version": "1.15.0",
4
4
  "description": "Helix Config Storage",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "reporter-options": "configFile=.mocha-multi.json"
37
37
  },
38
38
  "devDependencies": {
39
- "@adobe/eslint-config-helix": "2.0.8",
39
+ "@adobe/eslint-config-helix": "2.0.9",
40
40
  "@semantic-release/changelog": "6.0.3",
41
41
  "@semantic-release/git": "10.0.1",
42
42
  "@semantic-release/npm": "12.0.1",
@@ -62,7 +62,7 @@
62
62
  "@adobe/fetch": "4.1.11",
63
63
  "@adobe/helix-shared-config": "11.0.15",
64
64
  "@adobe/helix-shared-git": "3.0.17",
65
- "@adobe/helix-shared-storage": "1.1.2",
65
+ "@adobe/helix-shared-storage": "1.2.0",
66
66
  "@adobe/helix-shared-utils": "3.0.2",
67
67
  "ajv": "8.17.1",
68
68
  "ajv-formats": "3.0.1",
@@ -37,6 +37,8 @@ const ROOT_PROPERTIES = {
37
37
  secrets: {},
38
38
  public: {},
39
39
  groups: {},
40
+ features: {},
41
+ limits: {},
40
42
  };
41
43
 
42
44
  const FORCED_TYPES = {
@@ -79,6 +79,8 @@ const FRAGMENTS_COMMON = {
79
79
  },
80
80
  },
81
81
  public: '*',
82
+ features: '*',
83
+ limits: '*',
82
84
  robots: 'object',
83
85
  events: {
84
86
  github: 'object',
@@ -433,7 +435,7 @@ export class ConfigStore {
433
435
  }
434
436
  if (frag) {
435
437
  if (!old) {
436
- if (this.type === 'profiles' && (frag.type === 'tokens' || frag.type === 'secrets')) {
438
+ if (this.type === 'profiles' && (frag.type === 'tokens' || frag.type === 'secrets' || frag.name === 'features' || frag.name === 'limits')) {
437
439
  old = {};
438
440
  } else {
439
441
  throw new StatusCodeError(404, 'config not found.');
@@ -542,6 +544,13 @@ export class ConfigStore {
542
544
  }
543
545
  }
544
546
  config = deepPut(old, frag.relPath, data);
547
+ } else if (config) {
548
+ if (!config.features && old?.features) {
549
+ config.features = old.features;
550
+ }
551
+ if (!config.limits && old?.limits) {
552
+ config.limits = old.limits;
553
+ }
545
554
  }
546
555
 
547
556
  if (this.type !== 'org') {
@@ -26,10 +26,12 @@ import commonSchema from './schemas/common.schema.cjs';
26
26
  import codeSchema from './schemas/code.schema.cjs';
27
27
  import contentSchema from './schemas/content.schema.cjs';
28
28
  import eventsSchema from './schemas/events.schema.cjs';
29
+ import featuresSchema from './schemas/features.schema.cjs';
29
30
  import foldersSchema from './schemas/folders.schema.cjs';
30
31
  import groupsSchema from './schemas/groups.schema.cjs';
31
32
  import googleSchema from './schemas/content-source-google.schema.cjs';
32
33
  import headersSchema from './schemas/headers.schema.cjs';
34
+ import limitsSchema from './schemas/limits.schema.cjs';
33
35
  import markupSchema from './schemas/content-source-markup.schema.cjs';
34
36
  import metadataSchema from './schemas/metadata-source.schema.cjs';
35
37
  import orgAccessSchema from './schemas/org-access.schema.cjs';
@@ -61,10 +63,12 @@ export const SCHEMAS = [
61
63
  commonSchema,
62
64
  contentSchema,
63
65
  eventsSchema,
66
+ featuresSchema,
64
67
  foldersSchema,
65
68
  googleSchema,
66
69
  groupsSchema,
67
70
  headersSchema,
71
+ limitsSchema,
68
72
  markupSchema,
69
73
  metadataSchema,
70
74
  onedriveSchema,
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Copyright 2025 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('./features.schema.json');
@@ -0,0 +1,25 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/features",
5
+ "type": "object",
6
+ "title": "features",
7
+ "description": "Features configuration",
8
+ "patternProperties": {
9
+ "^[a-zA-Z0-9-_=]+$": {
10
+ "type": "object",
11
+ "properties": {
12
+ "enabled": {
13
+ "type": "boolean"
14
+ },
15
+ "description": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "required": [
20
+ "enabled"
21
+ ],
22
+ "additionalProperties": true
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Copyright 2025 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('./limits.schema.json');
@@ -0,0 +1,20 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/limits",
5
+ "type": "object",
6
+ "title": "features",
7
+ "description": "Features configuration",
8
+ "patternProperties": {
9
+ "^[a-zA-Z0-9-_=]+$": {
10
+ "type": "object",
11
+ "properties": {
12
+ "description": {
13
+ "type": "string"
14
+ }
15
+ },
16
+ "additionalProperties": true
17
+ }
18
+ }
19
+
20
+ }
@@ -55,6 +55,12 @@
55
55
  },
56
56
  "events": {
57
57
  "$ref": "https://ns.adobe.com/helix/config/events"
58
+ },
59
+ "features": {
60
+ "$ref": "https://ns.adobe.com/helix/config/features"
61
+ },
62
+ "limits": {
63
+ "$ref": "https://ns.adobe.com/helix/config/limits"
58
64
  }
59
65
  },
60
66
  "required": [
@@ -62,6 +62,12 @@
62
62
  "events": {
63
63
  "$ref": "https://ns.adobe.com/helix/config/events"
64
64
  },
65
+ "features": {
66
+ "$ref": "https://ns.adobe.com/helix/config/features"
67
+ },
68
+ "limits": {
69
+ "$ref": "https://ns.adobe.com/helix/config/limits"
70
+ },
65
71
  "extends": {
66
72
  "type": "object",
67
73
  "properties": {
@@ -29,6 +29,8 @@ npx ajv-cli --spec=draft2019 -c ajv-formats compile \
29
29
  -s src/schemas/sidekick.schema.json \
30
30
  -s src/schemas/robots.schema.json \
31
31
  -s src/schemas/public.schema.json \
32
+ -s src/schemas/limits.schema.json \
33
+ -s src/schemas/features.schema.json \
32
34
  -s src/schemas/profile.schema.json \
33
35
  -s src/schemas/profiles.schema.json \
34
36
  -s src/schemas/site.schema.json \