runtypex 0.1.4 → 0.1.7
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/esm/core/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { emitPrimitive } from "./emitPrimitive";
|
|
2
|
-
import { emitLiteralOrEnum } from "./emitLiteralOrEnum";
|
|
3
|
-
import { emitUnionOrIntersection } from "./emitUnionOrIntersection";
|
|
4
|
-
import { emitArrayOrTuple } from "./emitArrayOrTuple";
|
|
5
|
-
import { emitObject } from "./emitObject";
|
|
1
|
+
import { emitPrimitive } from "./emitPrimitive.js";
|
|
2
|
+
import { emitLiteralOrEnum } from "./emitLiteralOrEnum.js";
|
|
3
|
+
import { emitUnionOrIntersection } from "./emitUnionOrIntersection.js";
|
|
4
|
+
import { emitArrayOrTuple } from "./emitArrayOrTuple.js";
|
|
5
|
+
import { emitObject } from "./emitObject.js";
|
|
6
6
|
/**
|
|
7
7
|
* ✅ emitGuardFromType
|
|
8
8
|
* Converts a TypeScript type to a JavaScript runtime validation function string.
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { makeValidate, makeAssert } from "./runtime/validate";
|
|
2
|
-
export { default as vitePlugin } from "./transformer/vite-plugin";
|
|
3
|
-
export { default as tsTransformer } from "./transformer/ts-transformer";
|
|
1
|
+
export { makeValidate, makeAssert } from "./runtime/validate.js";
|
|
2
|
+
export { default as vitePlugin } from "./transformer/vite-plugin.js";
|
|
3
|
+
export { default as tsTransformer } from "./transformer/ts-transformer.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { emitGuardFromType } from "../core";
|
|
3
|
+
import { emitGuardFromType } from "../core/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* 🧩 vitePluginRuntypex
|
|
6
6
|
* A Vite plugin that performs build-time type → runtime validation transformation.
|
package/package.json
CHANGED
|
@@ -1,63 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runtypex",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Runtime type guards compiled from TypeScript types.
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"description": "Runtime type guards compiled from TypeScript types.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"author": "
|
|
6
|
+
"author": "KumJungMin",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"sideEffects": false,
|
|
9
8
|
"main": "./dist/cjs/index.js",
|
|
10
9
|
"module": "./dist/esm/index.js",
|
|
11
10
|
"types": "./dist/esm/index.d.ts",
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://example.com/runtypex.git"
|
|
15
|
-
},
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/KumJungMin/runtypex/issues"
|
|
18
|
-
},
|
|
19
11
|
"exports": {
|
|
20
12
|
".": {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"runtime",
|
|
36
|
-
"type-check",
|
|
37
|
-
"validation",
|
|
38
|
-
"vite-plugin",
|
|
39
|
-
"transformer",
|
|
40
|
-
"typia"
|
|
41
|
-
],
|
|
42
|
-
"files": [
|
|
43
|
-
"dist"
|
|
44
|
-
],
|
|
45
|
-
"publishConfig": {
|
|
46
|
-
"access": "public"
|
|
47
|
-
},
|
|
13
|
+
"import": "./dist/esm/index.js",
|
|
14
|
+
"require": "./dist/cjs/index.js",
|
|
15
|
+
"types": "./dist/esm/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./transformer": {
|
|
18
|
+
"import": "./dist/esm/transformer/index.js",
|
|
19
|
+
"types": "./dist/esm/transformer/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./runtime": {
|
|
22
|
+
"import": "./dist/esm/runtime/index.js",
|
|
23
|
+
"types": "./dist/esm/runtime/index.d.ts"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": ["dist"],
|
|
48
27
|
"scripts": {
|
|
49
|
-
"
|
|
50
|
-
"build": "tsc -p tsconfig.build.json",
|
|
51
|
-
"test": "jest --passWithNoTests"
|
|
52
|
-
},
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"typescript": ">=5.3"
|
|
28
|
+
"build": "tsc -p tsconfig.build.json"
|
|
55
29
|
},
|
|
56
30
|
"devDependencies": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"ts-jest": "^29.2.5",
|
|
61
|
-
"typescript": "^5.6.3"
|
|
31
|
+
"typescript": "^5.6.3",
|
|
32
|
+
"ts-patch": "^3.3.0",
|
|
33
|
+
"ts-node": "^10.9.2"
|
|
62
34
|
}
|
|
63
35
|
}
|