@orion-js/schema 3.0.0 → 3.0.32
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/LICENSE
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const dot_object_1 = __importDefault(require("dot-object"));
|
|
7
|
+
const dot = new dot_object_1.default('.', false, true, false);
|
|
7
8
|
function getValidationErrorsObject(validationErrors) {
|
|
8
9
|
if (validationErrors.length === 0)
|
|
9
10
|
return null;
|
|
@@ -11,6 +12,6 @@ function getValidationErrorsObject(validationErrors) {
|
|
|
11
12
|
for (const validationError of validationErrors) {
|
|
12
13
|
errors[validationError.key] = validationError.code;
|
|
13
14
|
}
|
|
14
|
-
return
|
|
15
|
+
return dot.dot(errors);
|
|
15
16
|
}
|
|
16
17
|
exports.default = getValidationErrorsObject;
|
package/lib/types/schema.d.ts
CHANGED
|
@@ -63,6 +63,26 @@ export interface SchemaNode {
|
|
|
63
63
|
* Used in GraphQL. Sets the key of the field in the GraphQL schema. You must set this value when building your schema.
|
|
64
64
|
*/
|
|
65
65
|
key?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The name that would be displayed in a front-end form
|
|
68
|
+
*/
|
|
69
|
+
label?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The description that would be displayed in a front-end form
|
|
72
|
+
*/
|
|
73
|
+
description?: string;
|
|
74
|
+
/**
|
|
75
|
+
* The placeholder that would be displayed in a front-end form
|
|
76
|
+
*/
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
/**
|
|
79
|
+
* The field type that would be used in a front-end form
|
|
80
|
+
*/
|
|
81
|
+
fieldType?: string;
|
|
82
|
+
/**
|
|
83
|
+
* The field options that will be passed as props to the front-end field
|
|
84
|
+
*/
|
|
85
|
+
fieldOptions?: any;
|
|
66
86
|
}
|
|
67
87
|
export interface CurrentNodeInfoOptions {
|
|
68
88
|
autoConvert?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/schema",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.32",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -12,33 +12,29 @@
|
|
|
12
12
|
"prepare": "yarn run build",
|
|
13
13
|
"clean": "rm -rf ./lib",
|
|
14
14
|
"build": "yarn run clean && tsc",
|
|
15
|
-
"watch": "
|
|
15
|
+
"watch": "tsc -w",
|
|
16
|
+
"upgrade-interactive": "yarn upgrade-interactive",
|
|
16
17
|
"test": "jest --config jest.config.js"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
|
-
"
|
|
20
|
-
"dot-object": "^1.9.0",
|
|
20
|
+
"dot-object": "^2.1.4",
|
|
21
21
|
"lodash": "^4.17.10"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@babel/core": "^7.5.5",
|
|
26
|
-
"@babel/plugin-transform-runtime": "^7.5.5",
|
|
27
|
-
"@babel/preset-env": "^7.5.5",
|
|
28
|
-
"@types/eslint": "^7.28.2",
|
|
24
|
+
"@types/eslint": "^7.29.0",
|
|
29
25
|
"@types/jest": "27.0.2",
|
|
30
26
|
"@types/lodash": "4.14.176",
|
|
31
|
-
"@types/node": "16.11.
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "5.1
|
|
33
|
-
"@typescript-eslint/parser": "5.1
|
|
34
|
-
"eslint": "8.0
|
|
35
|
-
"eslint-plugin-import": "2.25.
|
|
36
|
-
"jest": "
|
|
37
|
-
"ts-jest": "
|
|
27
|
+
"@types/node": "16.11.7",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "5.3.1",
|
|
29
|
+
"@typescript-eslint/parser": "5.3.1",
|
|
30
|
+
"eslint": "8.2.0",
|
|
31
|
+
"eslint-plugin-import": "2.25.3",
|
|
32
|
+
"jest": "27.3.1",
|
|
33
|
+
"ts-jest": "27.0.7",
|
|
38
34
|
"typescript": "^4.4.4"
|
|
39
35
|
},
|
|
40
36
|
"publishConfig": {
|
|
41
37
|
"access": "public"
|
|
42
38
|
},
|
|
43
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "8d6dfbbd6fbf5aed082e9d67df81d09db580b015"
|
|
44
40
|
}
|