@adobe/helix-config 3.2.0 → 3.2.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.2.1](https://github.com/adobe/helix-config/compare/v3.2.0...v3.2.1) (2024-05-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * return created user ([#93](https://github.com/adobe/helix-config/issues/93)) ([adc2079](https://github.com/adobe/helix-config/commit/adc20791b1e55b3650cd9d873193077af4c50a7f))
7
+
1
8
  # [3.2.0](https://github.com/adobe/helix-config/compare/v3.1.2...v3.2.0) (2024-05-29)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Helix Config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -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('./user.schema.json');
@@ -0,0 +1,47 @@
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/user",
15
+ "type": "object",
16
+ "properties": {
17
+ "id": {
18
+ "type": "string",
19
+ "pattern": "^[a-zA-Z0-9-_=]+$"
20
+ },
21
+ "email": {
22
+ "type": "string",
23
+ "format": "email"
24
+ },
25
+ "name": {
26
+ "type": "string"
27
+ },
28
+ "roles": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "string",
32
+ "enum": [
33
+ "admin",
34
+ "author",
35
+ "publish",
36
+ "config"
37
+ ]
38
+ }
39
+ }
40
+ },
41
+ "required": [
42
+ "id",
43
+ "email",
44
+ "roles"
45
+ ],
46
+ "additionalProperties": false
47
+ }
@@ -15,38 +15,7 @@
15
15
  "title": "users",
16
16
  "type": "array",
17
17
  "items": {
18
- "type": "object",
19
- "properties": {
20
- "id": {
21
- "type": "string",
22
- "pattern": "^[a-zA-Z0-9-_=]+$"
23
- },
24
- "email": {
25
- "type": "string",
26
- "format": "email"
27
- },
28
- "name": {
29
- "type": "string"
30
- },
31
- "roles": {
32
- "type": "array",
33
- "items": {
34
- "type": "string",
35
- "enum": [
36
- "admin",
37
- "author",
38
- "publish",
39
- "config"
40
- ]
41
- }
42
- }
43
- },
44
- "required": [
45
- "id",
46
- "email",
47
- "roles"
48
- ],
49
- "additionalProperties": false
18
+ "$ref": "https://ns.adobe.com/helix/config/user"
50
19
  },
51
20
  "additionalProperties": false
52
21
  }
@@ -259,7 +259,6 @@ export class ConfigStore {
259
259
  };
260
260
  relPath = ['users', user.id];
261
261
  frag.type = 'user';
262
- ret = user;
263
262
  // todo: define via "schema"
264
263
  if (!old.users) {
265
264
  old.users = [];
@@ -32,6 +32,7 @@ import robotsSchema from '../schemas/robots.schema.cjs';
32
32
  import sidekickSchema from '../schemas/sidekick.schema.cjs';
33
33
  import siteSchema from '../schemas/site.schema.cjs';
34
34
  import tokensSchema from '../schemas/tokens.schema.cjs';
35
+ import userSchema from '../schemas/user.schema.cjs';
35
36
  import usersSchema from '../schemas/users.schema.cjs';
36
37
 
37
38
  export const SCHEMAS = [
@@ -54,6 +55,7 @@ export const SCHEMAS = [
54
55
  sidekickSchema,
55
56
  siteSchema,
56
57
  tokensSchema,
58
+ userSchema,
57
59
  usersSchema,
58
60
  ];
59
61