cruddl 3.0.2 → 3.0.3
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/SECURITY.md +15 -0
- package/dist/spec/dev/start.js +0 -2
- package/dist/spec/dev/start.js.map +1 -1
- package/dist/src/database/arangodb/aql-generator.js +64 -16
- package/dist/src/database/arangodb/aql-generator.js.map +1 -1
- package/dist/src/database/arangodb/aql.d.ts +3 -3
- package/dist/src/database/arangodb/aql.js.map +1 -1
- package/dist/src/database/arangodb/arangodb-adapter.js +2 -2
- package/dist/src/database/arangodb/arangodb-adapter.js.map +1 -1
- package/dist/src/schema/preparation/source-validation-modules/schema/schema.json +13 -2
- package/dist/src/schema/preparation/source-validation-modules/schema/validate-schema.d.ts +2 -2
- package/dist/src/schema/preparation/source-validation-modules/schema/validate-schema.js +1 -2707
- package/dist/src/schema/preparation/source-validation-modules/sidecar-schema.js +4 -4
- package/dist/src/schema/preparation/source-validation-modules/sidecar-schema.js.map +1 -1
- package/example/index.ts +2 -3
- package/example/package.json +4 -4
- package/package.json +2 -2
|
@@ -17,9 +17,9 @@ class SidecarSchemaValidator {
|
|
|
17
17
|
return [];
|
|
18
18
|
}
|
|
19
19
|
return validate_schema_1.default.errors.map((err) => {
|
|
20
|
-
const path = reformatPath(err.
|
|
20
|
+
const path = reformatPath(err.instancePath);
|
|
21
21
|
// we allow top-level additional properties because they indicate new features, so it might be ok to omit them
|
|
22
|
-
const isWarning = !err.
|
|
22
|
+
const isWarning = !err.instancePath.includes('.') &&
|
|
23
23
|
err.message === 'should NOT have additional properties';
|
|
24
24
|
if (isWarning) {
|
|
25
25
|
if (path in source.pathLocationMap) {
|
|
@@ -27,7 +27,7 @@ class SidecarSchemaValidator {
|
|
|
27
27
|
return model_1.ValidationMessage.warn(err.message, loc);
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
return model_1.ValidationMessage.warn(`${err.message} (at ${err.
|
|
30
|
+
return model_1.ValidationMessage.warn(`${err.message} (at ${err.instancePath})`, undefined);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
@@ -36,7 +36,7 @@ class SidecarSchemaValidator {
|
|
|
36
36
|
return model_1.ValidationMessage.error(err.message, loc);
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
|
-
return model_1.ValidationMessage.error(`${err.message} (at ${err.
|
|
39
|
+
return model_1.ValidationMessage.error(`${err.message} (at ${err.instancePath})`, undefined);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidecar-schema.js","sourceRoot":"","sources":["../../../../../src/schema/preparation/source-validation-modules/sidecar-schema.ts"],"names":[],"mappings":";;;;AAAA,mEAAkG;AAClG,0CAAmD;AAEnD,uFAAgD;AAEhD,MAAa,sBAAsB;IAC/B,QAAQ,CAAC,MAA2B;QAChC,IAAI,MAAM,CAAC,IAAI,IAAI,4CAA2B,CAAC,MAAM,EAAE;YACnD,OAAO,EAAE,CAAC;SACb;QAED,IAAI,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;QAEzB,8FAA8F;QAC9F,mGAAmG;QACnG,IAAI,IAAA,yBAAQ,EAAC,IAAI,CAAC,IAAI,CAAC,yBAAQ,CAAC,MAAM,EAAE;YACpC,OAAO,EAAE,CAAC;SACb;QAED,OAAO,yBAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAqB,EAAE;YAClD,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"sidecar-schema.js","sourceRoot":"","sources":["../../../../../src/schema/preparation/source-validation-modules/sidecar-schema.ts"],"names":[],"mappings":";;;;AAAA,mEAAkG;AAClG,0CAAmD;AAEnD,uFAAgD;AAEhD,MAAa,sBAAsB;IAC/B,QAAQ,CAAC,MAA2B;QAChC,IAAI,MAAM,CAAC,IAAI,IAAI,4CAA2B,CAAC,MAAM,EAAE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,CAAC,CAAC;IACP,CAAC;CACJ;AA5CD,wDA4CC;AAED,SAAS,YAAY,CAAC,IAAY;IAC9B,OAAO,IAAI;SACN,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;SAC5C,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;SACpD,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;AAC3D,CAAC"}
|
package/example/index.ts
CHANGED
|
@@ -59,8 +59,7 @@ const project = new Project({
|
|
|
59
59
|
},
|
|
60
60
|
],
|
|
61
61
|
getExecutionOptions: ({ context }) => ({ authContext: { authRoles: ['users'] } }),
|
|
62
|
-
|
|
63
|
-
getOperationIdentifier: ({ context }) => context as object, // each operation is executed with an unique context object
|
|
62
|
+
getOperationIdentifier: ({ context }) => context as object, // each operation is executed with a unique context object
|
|
64
63
|
});
|
|
65
64
|
|
|
66
65
|
try {
|
|
@@ -71,7 +70,7 @@ try {
|
|
|
71
70
|
context: ({ req }) => req, // pass request as context so we have a unique context object for each operation
|
|
72
71
|
});
|
|
73
72
|
server.listen(4000, () => console.log('Server is running on http://localhost:4000/'));
|
|
74
|
-
} catch (error) {
|
|
73
|
+
} catch (error: any) {
|
|
75
74
|
console.log("Did you create the 'test' database?");
|
|
76
75
|
console.log(error.stack);
|
|
77
76
|
}
|
package/example/package.json
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"apollo-server": "^
|
|
15
|
-
"cruddl": "^
|
|
16
|
-
"ts-node": "^
|
|
17
|
-
"typescript": "^
|
|
14
|
+
"apollo-server": "^3.10.2",
|
|
15
|
+
"cruddl": "^3.0.2",
|
|
16
|
+
"ts-node": "^10.9.1",
|
|
17
|
+
"typescript": "^4.8.4"
|
|
18
18
|
}
|
|
19
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cruddl",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@graphql-tools/schema": "^8.5.0",
|
|
75
75
|
"@js-joda/core": "^5.2.0",
|
|
76
|
-
"ajv": "^
|
|
76
|
+
"ajv": "^8.11.0",
|
|
77
77
|
"ansi-styles": "^5.2.0",
|
|
78
78
|
"arangojs": "^7.8.0",
|
|
79
79
|
"deep-equal": "^2.0.5",
|