tsgonest 0.16.0 → 0.17.0
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/bin/migrate.cjs +1124 -1064
- package/dist/index.cjs +26 -0
- package/dist/index.d.cts +17 -0
- package/dist/index.d.mts +17 -0
- package/dist/index.mjs +21 -0
- package/package.json +23 -15
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
function is(input) {
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
function validate(input) {
|
|
7
|
+
return {
|
|
8
|
+
success: true,
|
|
9
|
+
data: input
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function assert(input) {
|
|
13
|
+
return input;
|
|
14
|
+
}
|
|
15
|
+
function stringify(input) {
|
|
16
|
+
return JSON.stringify(input);
|
|
17
|
+
}
|
|
18
|
+
function serialize(input) {
|
|
19
|
+
return JSON.stringify(input);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.assert = assert;
|
|
23
|
+
exports.is = is;
|
|
24
|
+
exports.serialize = serialize;
|
|
25
|
+
exports.stringify = stringify;
|
|
26
|
+
exports.validate = validate;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
interface ValidationResult<T> {
|
|
3
|
+
success: boolean;
|
|
4
|
+
data?: T;
|
|
5
|
+
errors?: Array<{
|
|
6
|
+
path: string;
|
|
7
|
+
expected: string;
|
|
8
|
+
received: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
declare function is<T>(input: unknown): input is T;
|
|
12
|
+
declare function validate<T>(input: unknown): ValidationResult<T>;
|
|
13
|
+
declare function assert<T>(input: unknown): T;
|
|
14
|
+
declare function stringify<T>(input: T): string;
|
|
15
|
+
declare function serialize<T>(input: T): string;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ValidationResult, assert, is, serialize, stringify, validate };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
interface ValidationResult<T> {
|
|
3
|
+
success: boolean;
|
|
4
|
+
data?: T;
|
|
5
|
+
errors?: Array<{
|
|
6
|
+
path: string;
|
|
7
|
+
expected: string;
|
|
8
|
+
received: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
declare function is<T>(input: unknown): input is T;
|
|
12
|
+
declare function validate<T>(input: unknown): ValidationResult<T>;
|
|
13
|
+
declare function assert<T>(input: unknown): T;
|
|
14
|
+
declare function stringify<T>(input: T): string;
|
|
15
|
+
declare function serialize<T>(input: T): string;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ValidationResult, assert, is, serialize, stringify, validate };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
function is(input) {
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
5
|
+
function validate(input) {
|
|
6
|
+
return {
|
|
7
|
+
success: true,
|
|
8
|
+
data: input
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function assert(input) {
|
|
12
|
+
return input;
|
|
13
|
+
}
|
|
14
|
+
function stringify(input) {
|
|
15
|
+
return JSON.stringify(input);
|
|
16
|
+
}
|
|
17
|
+
function serialize(input) {
|
|
18
|
+
return JSON.stringify(input);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { assert, is, serialize, stringify, validate };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsgonest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "TypeScript compiler with runtime validation, serialization, and OpenAPI generation for NestJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -18,13 +18,21 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"bin/",
|
|
21
|
+
"!bin/tsgonest-native",
|
|
21
22
|
"dist/"
|
|
22
23
|
],
|
|
24
|
+
"main": "./dist/index.cjs",
|
|
25
|
+
"types": "./dist/index.d.cts",
|
|
23
26
|
"exports": {
|
|
24
27
|
".": {
|
|
25
|
-
"import":
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/index.d.mts",
|
|
30
|
+
"default": "./dist/index.mjs"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/index.d.cts",
|
|
34
|
+
"default": "./dist/index.cjs"
|
|
35
|
+
}
|
|
28
36
|
}
|
|
29
37
|
},
|
|
30
38
|
"bin": {
|
|
@@ -32,22 +40,22 @@
|
|
|
32
40
|
},
|
|
33
41
|
"dependencies": {
|
|
34
42
|
"jsonc-parser": "^3.3.1",
|
|
35
|
-
"@tsgonest/
|
|
36
|
-
"@tsgonest/
|
|
43
|
+
"@tsgonest/types": "0.17.0",
|
|
44
|
+
"@tsgonest/runtime": "0.17.0"
|
|
37
45
|
},
|
|
38
46
|
"devDependencies": {
|
|
39
47
|
"ts-morph": "^27.0.2",
|
|
40
|
-
"tsdown": "^0.
|
|
41
|
-
"typescript": "^
|
|
42
|
-
"vitest": "^4.1.
|
|
48
|
+
"tsdown": "^0.22.12",
|
|
49
|
+
"typescript": "^6.0.3",
|
|
50
|
+
"vitest": "^4.1.10"
|
|
43
51
|
},
|
|
44
52
|
"optionalDependencies": {
|
|
45
|
-
"@tsgonest/cli-
|
|
46
|
-
"@tsgonest/cli-
|
|
47
|
-
"@tsgonest/cli-
|
|
48
|
-
"@tsgonest/cli-
|
|
49
|
-
"@tsgonest/cli-win32-
|
|
50
|
-
"@tsgonest/cli-
|
|
53
|
+
"@tsgonest/cli-linux-x64": "0.17.0",
|
|
54
|
+
"@tsgonest/cli-darwin-x64": "0.17.0",
|
|
55
|
+
"@tsgonest/cli-darwin-arm64": "0.17.0",
|
|
56
|
+
"@tsgonest/cli-linux-arm64": "0.17.0",
|
|
57
|
+
"@tsgonest/cli-win32-arm64": "0.17.0",
|
|
58
|
+
"@tsgonest/cli-win32-x64": "0.17.0"
|
|
51
59
|
},
|
|
52
60
|
"scripts": {
|
|
53
61
|
"build": "tsdown",
|