ts-runtime-validation 1.4.0 → 1.4.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/README.md CHANGED
@@ -54,7 +54,7 @@ The intended use for ts-runtime-validation is as a npm script. Here it can also
54
54
  "generate-types": "ts-runtime-validation"
55
55
  },
56
56
  "devDependencies": {
57
- "ts-runtime-validation": "^1.2.0"
57
+ "ts-runtime-validation": "^1.4.1"
58
58
  }
59
59
  }
60
60
  ```
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "ts-runtime-validation",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "author": "Matthew Duong <thegalah@gmail.com>",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
- "commander": "^9.5.0",
8
- "fdir": "^5.3.0",
7
+ "commander": "^9.3.0",
8
+ "fdir": "^5.2.0",
9
9
  "picomatch": "^2.3.1",
10
- "ts-json-schema-generator": "^1.2.0",
11
- "ts-morph": "^17.0.1"
10
+ "ts-json-schema-generator": "^1.0.0",
11
+ "ts-morph": "^15.1.0"
12
12
  },
13
13
  "bin": {
14
14
  "ts-runtime-validation": "dist/index.js"
@@ -19,14 +19,14 @@
19
19
  "test": "jest --silent --collectCoverage false"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/jest": "^29.2.5",
23
- "@types/node": "^18.11.18",
22
+ "@types/jest": "^28.1.2",
23
+ "@types/node": "^18.0.0",
24
24
  "@types/picomatch": "^2.3.0",
25
- "jest": "^29.3.1",
26
- "prettier": "^2.8.2",
27
- "ts-jest": "^29.0.3",
28
- "ts-node": "^10.9.1",
29
- "typescript": "^4.9.4"
25
+ "jest": "^28.1.1",
26
+ "prettier": "^2.7.1",
27
+ "ts-jest": "^28.0.5",
28
+ "ts-node": "^10.8.1",
29
+ "typescript": "^4.7.4"
30
30
  },
31
31
  "description": "A set of tools to generate json-schema validations from typescript interface(s) and methods to validate unknown data at runtime against them",
32
32
  "main": "index.js",
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ValidationType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ValidationType.js","sourceRoot":"","sources":["../../../../src/test/output/basic-scenario/ValidationType.ts"],"names":[],"mappings":""}
@@ -1,39 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.isValidSchema = exports.validator = void 0;
30
- const schema = __importStar(require("./validation.schema.json"));
31
- const ajv_1 = __importDefault(require("ajv"));
32
- exports.validator = new ajv_1.default({ allErrors: true });
33
- exports.validator.compile(schema);
34
- const isValidSchema = (data, schemaKeyRef) => {
35
- exports.validator.validate(schemaKeyRef, data);
36
- return Boolean(exports.validator.errors) === false;
37
- };
38
- exports.isValidSchema = isValidSchema;
39
- //# sourceMappingURL=isValidSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isValidSchema.js","sourceRoot":"","sources":["../../../../src/test/output/basic-scenario/isValidSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AACnD,8CAAsB;AAGT,QAAA,SAAS,GAAG,IAAI,aAAG,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAClD,iBAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAC5B;AAEM,MAAM,aAAa,GAAG,CAAiC,IAAa,EAAE,YAAe,EAAsB,EAAE;IAChH,iBAAS,CAAC,QAAQ,CAAC,YAAsB,EAAE,IAAI,CAAC,CAAC;IACjD,OAAO,OAAO,CAAC,iBAAS,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC;AAC3C,CAAC,CACJ;AAJY,QAAA,aAAa,iBAIzB"}