ts-runtime-validation 1.6.12 → 1.6.14
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/dist/lib.js +6 -0
- package/package.json +2 -2
- package/src/lib.ts +2 -0
- package/tsconfig.json +1 -1
- package/dist/index.js +0 -20
package/dist/lib.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaGenerator = void 0;
|
|
4
|
+
var SchemaGenerator_1 = require("./SchemaGenerator");
|
|
5
|
+
Object.defineProperty(exports, "SchemaGenerator", { enumerable: true, get: function () { return SchemaGenerator_1.SchemaGenerator; } });
|
|
6
|
+
//# sourceMappingURL=lib.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-runtime-validation",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.14",
|
|
4
4
|
"author": "Matthew Duong <thegalah@gmail.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"typescript": "^5.1.6"
|
|
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
|
-
"main": "dist/
|
|
32
|
+
"main": "dist/lib.js",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
35
|
"url": "git+https://github.com/thegalah/ts-runtime-validation.git"
|
package/src/lib.ts
ADDED
package/tsconfig.json
CHANGED
package/dist/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const SchemaGenerator_1 = require("./SchemaGenerator");
|
|
5
|
-
const commander_1 = require("commander");
|
|
6
|
-
const defaultGlobPattern = "*.jsonschema.{ts,tsx}";
|
|
7
|
-
const defaultRootPath = "./src";
|
|
8
|
-
const defaultOutputFolder = "./.ts-runtime-validation";
|
|
9
|
-
const defaultTsconfig = "";
|
|
10
|
-
commander_1.program.option("--glob", `Glob file path of typescript files to generate ts-interface -> json-schema validations - default: ${defaultGlobPattern}`, defaultGlobPattern);
|
|
11
|
-
commander_1.program.option("--rootPath <rootFolder>", `RootPath of source`, defaultRootPath);
|
|
12
|
-
commander_1.program.option("--output <outputFolder>", `Code generation output directory (relative to root path)`, defaultOutputFolder);
|
|
13
|
-
commander_1.program.option("--tsconfigPath <tsconfigPath>", `Path to customt tsconfig (relative to root path)`, defaultTsconfig);
|
|
14
|
-
commander_1.program.option("--generate-helpers", "Only generate JSON schema without typescript helper files", true);
|
|
15
|
-
commander_1.program.option("--additionalProperties", "Allow additional properties to pass validation", false);
|
|
16
|
-
commander_1.program.parse();
|
|
17
|
-
const options = commander_1.program.opts();
|
|
18
|
-
const generator = new SchemaGenerator_1.SchemaGenerator(options);
|
|
19
|
-
generator.Generate();
|
|
20
|
-
//# sourceMappingURL=index.js.map
|