@powerlines/deepkit 0.6.167 → 0.7.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/deepkit-install.cjs +55 -90
- package/dist/capnp-BLx1WTBU.cjs +5175 -0
- package/dist/capnp-BiGNkOmV.mjs +4905 -0
- package/dist/capnp.cjs +47 -186
- package/dist/capnp.d.cts +78 -77
- package/dist/{capnp.d.ts → capnp.d.mts} +78 -77
- package/dist/capnp.mjs +3 -0
- package/dist/chunk-C0xms8kb.cjs +34 -0
- package/dist/esbuild-plugin.cjs +47 -11
- package/dist/esbuild-plugin.d.cts +20 -18
- package/dist/esbuild-plugin.d.mts +35 -0
- package/dist/esbuild-plugin.mjs +48 -0
- package/dist/index.cjs +69 -250
- package/dist/index.d.cts +10 -19
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +11 -0
- package/dist/reflect-type.cjs +24 -12
- package/dist/reflect-type.d.cts +7 -5
- package/dist/{reflect-type.d.ts → reflect-type.d.mts} +7 -5
- package/dist/reflect-type.mjs +24 -0
- package/dist/{reflection-9KUpjPqV.d.cts → reflection-BwdnCwaK.d.cts} +11 -17
- package/dist/{reflection-9KUpjPqV.d.ts → reflection-D9R8cdSo.d.mts} +26 -32
- package/dist/resolve-reflections.cjs +15 -9
- package/dist/resolve-reflections.d.cts +4 -2
- package/dist/{resolve-reflections.d.ts → resolve-reflections.d.mts} +4 -2
- package/dist/resolve-reflections.mjs +16 -0
- package/dist/rolldown-plugin.cjs +44 -11
- package/dist/rolldown-plugin.d.cts +5 -3
- package/dist/{rolldown-plugin.d.ts → rolldown-plugin.d.mts} +5 -3
- package/dist/rolldown-plugin.mjs +45 -0
- package/dist/transformer.cjs +52 -13
- package/dist/transformer.d.cts +6 -4
- package/dist/{transformer.d.ts → transformer.d.mts} +6 -4
- package/dist/transformer.mjs +51 -0
- package/dist/transpile.cjs +29 -10
- package/dist/transpile.d.cts +6 -4
- package/dist/{transpile.d.ts → transpile.d.mts} +6 -4
- package/dist/transpile.mjs +29 -0
- package/dist/types.cjs +0 -4
- package/dist/types.d.cts +9 -9
- package/dist/{types.d.ts → types.d.mts} +9 -9
- package/dist/types.mjs +1 -0
- package/dist/utilities.cjs +116 -33
- package/dist/utilities.d.cts +4 -2
- package/dist/{utilities.d.ts → utilities.d.mts} +4 -2
- package/dist/utilities.mjs +111 -0
- package/dist/vendor/core.cjs +1240 -513
- package/dist/vendor/core.mjs +1116 -0
- package/dist/vendor/string-BoXo0wS7.cjs +2983 -0
- package/dist/vendor/string-BuMgdahD.mjs +2467 -0
- package/dist/vendor/type-BMLjRtLY.cjs +202 -0
- package/dist/vendor/type-Dgeqs-rL.mjs +190 -0
- package/dist/vendor/type-compiler/compiler-BUrWMhGi.cjs +6792 -0
- package/dist/vendor/type-compiler/compiler-Bg8jX6qU.mjs +6739 -0
- package/dist/vendor/type-compiler/compiler-D1z5h1MK.d.cts +578 -0
- package/dist/vendor/type-compiler/compiler-Nkxc4PLJ.d.mts +578 -0
- package/dist/vendor/type-compiler/compiler.cjs +11 -43
- package/dist/vendor/type-compiler/compiler.d.cts +2 -3
- package/dist/vendor/type-compiler/compiler.d.mts +2 -0
- package/dist/vendor/type-compiler/compiler.mjs +3 -0
- package/dist/vendor/type-compiler/config-BEX924PC.cjs +3709 -0
- package/dist/vendor/type-compiler/config-B_cKkYZm.d.cts +116 -0
- package/dist/vendor/type-compiler/config-D9DM7Du_.d.mts +116 -0
- package/dist/vendor/type-compiler/config-y0HNkbCH.mjs +3640 -0
- package/dist/vendor/type-compiler/config.cjs +9 -34
- package/dist/vendor/type-compiler/config.d.cts +2 -1
- package/dist/vendor/type-compiler/config.d.mts +2 -0
- package/dist/vendor/type-compiler/config.mjs +3 -0
- package/dist/vendor/type-compiler/index.cjs +56 -129
- package/dist/vendor/type-compiler/index.d.cts +22 -3
- package/dist/vendor/type-compiler/index.d.mts +22 -0
- package/dist/vendor/type-compiler/index.mjs +50 -0
- package/dist/vendor/type-spec.cjs +11 -12
- package/dist/vendor/type-spec.mjs +3 -0
- package/dist/vendor/type.cjs +8407 -17892
- package/dist/vendor/type.d.cts +10 -196
- package/dist/vendor/{type.d.ts → type.d.mts} +10 -196
- package/dist/vendor/type.mjs +9109 -0
- package/package.json +43 -31
- package/schemas/reflection.cjs +4018 -4129
- package/schemas/reflection.d.cts +30 -38
- package/schemas/{reflection.d.ts → reflection.d.mts} +30 -38
- package/schemas/reflection.mjs +4036 -0
- package/dist/capnp.js +0 -2
- package/dist/chunk-23YNDVRG.js +0 -34
- package/dist/chunk-27RKMKSF.cjs +0 -50
- package/dist/chunk-2XDQUCXZ.js +0 -2392
- package/dist/chunk-34OFD7LS.cjs +0 -68
- package/dist/chunk-7FXYDYVQ.cjs +0 -5246
- package/dist/chunk-7QZGCBH7.cjs +0 -11
- package/dist/chunk-ALM6UMVU.js +0 -9
- package/dist/chunk-BLLXF42T.cjs +0 -41
- package/dist/chunk-H3Q3XL3D.js +0 -19
- package/dist/chunk-HPVJ6OV3.cjs +0 -31
- package/dist/chunk-JQUKKAFM.js +0 -48
- package/dist/chunk-KK7TQA7L.cjs +0 -25
- package/dist/chunk-NPV2346T.js +0 -25
- package/dist/chunk-ORA4UQMU.cjs +0 -2
- package/dist/chunk-OUGDFUKJ.cjs +0 -2400
- package/dist/chunk-OULCUN6I.js +0 -1
- package/dist/chunk-SHUYVCID.js +0 -4
- package/dist/chunk-TDYIUJGY.js +0 -5180
- package/dist/chunk-USNT2KNT.cjs +0 -6
- package/dist/chunk-WYEFKIRL.js +0 -66
- package/dist/esbuild-plugin.d.ts +0 -33
- package/dist/esbuild-plugin.js +0 -4
- package/dist/index.d.ts +0 -19
- package/dist/index.js +0 -10
- package/dist/reflect-type.js +0 -5
- package/dist/resolve-reflections.js +0 -2
- package/dist/rolldown-plugin.js +0 -4
- package/dist/transformer.js +0 -2
- package/dist/transpile.js +0 -3
- package/dist/types.js +0 -1
- package/dist/utilities.js +0 -2
- package/dist/vendor/chunk-5BKT4CS5.js +0 -28
- package/dist/vendor/chunk-BLN7QVCP.js +0 -3704
- package/dist/vendor/chunk-BR2FK5K7.js +0 -109
- package/dist/vendor/chunk-EPQZMVJO.cjs +0 -3859
- package/dist/vendor/chunk-IFK6AU6M.cjs +0 -42
- package/dist/vendor/chunk-SHDAXCXF.cjs +0 -115
- package/dist/vendor/core.js +0 -2
- package/dist/vendor/type-compiler/chunk-3LL3TSRJ.js +0 -3762
- package/dist/vendor/type-compiler/chunk-CUTGHVNY.js +0 -7100
- package/dist/vendor/type-compiler/chunk-IAWCLVUK.cjs +0 -3780
- package/dist/vendor/type-compiler/chunk-UIWPG352.cjs +0 -7114
- package/dist/vendor/type-compiler/compiler.d.ts +0 -3
- package/dist/vendor/type-compiler/compiler.js +0 -5
- package/dist/vendor/type-compiler/config.d.ts +0 -1
- package/dist/vendor/type-compiler/config.js +0 -5
- package/dist/vendor/type-compiler/index.d.ts +0 -3
- package/dist/vendor/type-compiler/index.js +0 -66
- package/dist/vendor/type-spec.js +0 -2
- package/dist/vendor/type.js +0 -18359
- package/schemas/reflection.js +0 -4153
- /package/dist/vendor/{core.d.ts → core.d.mts} +0 -0
- /package/dist/vendor/{type-spec.d.ts → type-spec.d.mts} +0 -0
|
@@ -1,35 +1,10 @@
|
|
|
1
|
-
'
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_config = require('./config-BEX924PC.cjs');
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
get: function () { return chunkIAWCLVUK_cjs.defaultExcluded; }
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "getConfigResolver", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return chunkIAWCLVUK_cjs.getConfigResolver; }
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(exports, "isObject", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return chunkIAWCLVUK_cjs.isObject; }
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "parseRawMode", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return chunkIAWCLVUK_cjs.parseRawMode; }
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "reflectionLevel", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () { return chunkIAWCLVUK_cjs.reflectionLevel; }
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(exports, "reflectionModeMatcher", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function () { return chunkIAWCLVUK_cjs.reflectionModeMatcher; }
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports, "reflectionModes", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () { return chunkIAWCLVUK_cjs.reflectionModes; }
|
|
35
|
-
});
|
|
4
|
+
exports.defaultExcluded = require_config.defaultExcluded;
|
|
5
|
+
exports.getConfigResolver = require_config.getConfigResolver;
|
|
6
|
+
exports.isObject = require_config.isObject;
|
|
7
|
+
exports.parseRawMode = require_config.parseRawMode;
|
|
8
|
+
exports.reflectionLevel = require_config.reflectionLevel;
|
|
9
|
+
exports.reflectionModeMatcher = require_config.reflectionModeMatcher;
|
|
10
|
+
exports.reflectionModes = require_config.reflectionModes;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { _ as reflectionModeMatcher, a as Matcher, c as ReflectionConfig, d as TsConfigJson, f as defaultExcluded, g as reflectionLevel, h as parseRawMode, i as MatchResult, l as ReflectionConfigCache, m as isObject, n as CurrentConfig, o as Mode, p as getConfigResolver, r as Level, s as RawMode, t as ConfigResolver, u as ResolvedConfig, v as reflectionModes } from "./config-B_cKkYZm.cjs";
|
|
2
|
+
export { ConfigResolver, CurrentConfig, Level, MatchResult, Matcher, Mode, RawMode, ReflectionConfig, ReflectionConfigCache, ResolvedConfig, TsConfigJson, defaultExcluded, getConfigResolver, isObject, parseRawMode, reflectionLevel, reflectionModeMatcher, reflectionModes };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { _ as reflectionModeMatcher, a as Matcher, c as ReflectionConfig, d as TsConfigJson, f as defaultExcluded, g as reflectionLevel, h as parseRawMode, i as MatchResult, l as ReflectionConfigCache, m as isObject, n as CurrentConfig, o as Mode, p as getConfigResolver, r as Level, s as RawMode, t as ConfigResolver, u as ResolvedConfig, v as reflectionModes } from "./config-D9DM7Du_.mjs";
|
|
2
|
+
export { ConfigResolver, CurrentConfig, Level, MatchResult, Matcher, Mode, RawMode, ReflectionConfig, ReflectionConfigCache, ResolvedConfig, TsConfigJson, defaultExcluded, getConfigResolver, isObject, parseRawMode, reflectionLevel, reflectionModeMatcher, reflectionModes };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as reflectionLevel, i as parseRawMode, n as getConfigResolver, o as reflectionModeMatcher, r as isObject, s as reflectionModes, t as defaultExcluded } from "./config-y0HNkbCH.mjs";
|
|
2
|
+
|
|
3
|
+
export { defaultExcluded, getConfigResolver, isObject, parseRawMode, reflectionLevel, reflectionModeMatcher, reflectionModes };
|
|
@@ -1,134 +1,61 @@
|
|
|
1
|
-
'
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_config = require('./config-BEX924PC.cjs');
|
|
3
|
+
const require_compiler = require('./compiler-BUrWMhGi.cjs');
|
|
4
|
+
let typescript = require("typescript");
|
|
5
|
+
typescript = require_config.__toESM(typescript);
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
var chunkIAWCLVUK_cjs = require('./chunk-IAWCLVUK.cjs');
|
|
5
|
-
var ts = require('typescript');
|
|
6
|
-
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var ts__default = /*#__PURE__*/_interopDefault(ts);
|
|
10
|
-
|
|
11
|
-
// src/vendor/type-compiler/index.ts
|
|
12
|
-
chunkIAWCLVUK_cjs.init_cjs_shims();
|
|
13
|
-
|
|
14
|
-
// ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=2011488ea7d6bd63266ba61c0f89d16f9db840d58a9ba80_d52c3332bc2b1620fcb98585a3b45708/node_modules/@deepkit/type-compiler/dist/esm/index.js
|
|
15
|
-
chunkIAWCLVUK_cjs.init_cjs_shims();
|
|
16
|
-
|
|
17
|
-
// ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=2011488ea7d6bd63266ba61c0f89d16f9db840d58a9ba80_d52c3332bc2b1620fcb98585a3b45708/node_modules/@deepkit/type-compiler/dist/esm/src/loader.js
|
|
18
|
-
chunkIAWCLVUK_cjs.init_cjs_shims();
|
|
7
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=439aa6e683a9a48c3ebbf3529be5811680c45c22d6a265d_be73b50bc43bac944747b8ca0498113a/node_modules/@deepkit/type-compiler/dist/esm/src/loader.js
|
|
19
8
|
var DeepkitLoader = class {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const sourceFile2 = transformer2.transformSourceFile(node);
|
|
61
|
-
newSource = this.printer.printNode(ts__default.default.EmitHint.SourceFile, sourceFile2, sourceFile2);
|
|
62
|
-
return sourceFile2;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
], this.options);
|
|
66
|
-
return newSource;
|
|
67
|
-
}
|
|
9
|
+
constructor() {
|
|
10
|
+
this.options = {
|
|
11
|
+
allowJs: true,
|
|
12
|
+
declaration: false
|
|
13
|
+
};
|
|
14
|
+
this.host = typescript.default.createCompilerHost(this.options);
|
|
15
|
+
this.program = typescript.default.createProgram([], this.options, this.host);
|
|
16
|
+
this.printer = typescript.default.createPrinter({ newLine: typescript.default.NewLineKind.LineFeed });
|
|
17
|
+
this.cache = new require_compiler.Cache();
|
|
18
|
+
this.knownFiles = {};
|
|
19
|
+
this.sourceFiles = {};
|
|
20
|
+
const originReadFile = this.host.readFile;
|
|
21
|
+
this.host.readFile = (fileName) => {
|
|
22
|
+
if (this.knownFiles[fileName]) return this.knownFiles[fileName];
|
|
23
|
+
return originReadFile.call(this.host, fileName);
|
|
24
|
+
};
|
|
25
|
+
this.host.writeFile = () => {};
|
|
26
|
+
const originalGetSourceFile = this.host.getSourceFile;
|
|
27
|
+
this.host.getSourceFile = (fileName, languageVersion, onError, shouldCreateNewSourceFile) => {
|
|
28
|
+
if (this.sourceFiles[fileName]) return this.sourceFiles[fileName];
|
|
29
|
+
return originalGetSourceFile.call(this.host, fileName, languageVersion, onError, shouldCreateNewSourceFile);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
transform(source, path) {
|
|
33
|
+
this.knownFiles[path] = source;
|
|
34
|
+
const sourceFile = typescript.default.createSourceFile(path, source, typescript.default.ScriptTarget.ESNext, true, path.endsWith(".tsx") ? typescript.default.ScriptKind.TSX : typescript.default.ScriptKind.TS);
|
|
35
|
+
let newSource = source;
|
|
36
|
+
typescript.default.transform(sourceFile, [(context) => {
|
|
37
|
+
const transformer = new require_compiler.ReflectionTransformer(context, this.cache).forHost(this.host).withReflection({
|
|
38
|
+
reflection: "default",
|
|
39
|
+
reflectionLevel: "normal"
|
|
40
|
+
});
|
|
41
|
+
return (node) => {
|
|
42
|
+
const sourceFile = transformer.transformSourceFile(node);
|
|
43
|
+
newSource = this.printer.printNode(typescript.default.EmitHint.SourceFile, sourceFile, sourceFile);
|
|
44
|
+
return sourceFile;
|
|
45
|
+
};
|
|
46
|
+
}], this.options);
|
|
47
|
+
return newSource;
|
|
48
|
+
}
|
|
68
49
|
};
|
|
69
50
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(exports, "DeclarationTransformer", {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
get: function () { return chunkUIWPG352_cjs.DeclarationTransformer; }
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "ReflectionTransformer", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () { return chunkUIWPG352_cjs.ReflectionTransformer; }
|
|
81
|
-
});
|
|
82
|
-
Object.defineProperty(exports, "debugPackStruct", {
|
|
83
|
-
enumerable: true,
|
|
84
|
-
get: function () { return chunkUIWPG352_cjs.debugPackStruct; }
|
|
85
|
-
});
|
|
86
|
-
Object.defineProperty(exports, "declarationTransformer", {
|
|
87
|
-
enumerable: true,
|
|
88
|
-
get: function () { return chunkUIWPG352_cjs.declarationTransformer; }
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "encodeOps", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () { return chunkUIWPG352_cjs.encodeOps; }
|
|
93
|
-
});
|
|
94
|
-
Object.defineProperty(exports, "packSize", {
|
|
95
|
-
enumerable: true,
|
|
96
|
-
get: function () { return chunkUIWPG352_cjs.packSize; }
|
|
97
|
-
});
|
|
98
|
-
Object.defineProperty(exports, "packSizeByte", {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () { return chunkUIWPG352_cjs.packSizeByte; }
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "transformer", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () { return chunkUIWPG352_cjs.transformer; }
|
|
105
|
-
});
|
|
106
|
-
Object.defineProperty(exports, "defaultExcluded", {
|
|
107
|
-
enumerable: true,
|
|
108
|
-
get: function () { return chunkIAWCLVUK_cjs.defaultExcluded; }
|
|
109
|
-
});
|
|
110
|
-
Object.defineProperty(exports, "getConfigResolver", {
|
|
111
|
-
enumerable: true,
|
|
112
|
-
get: function () { return chunkIAWCLVUK_cjs.getConfigResolver; }
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "isObject", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () { return chunkIAWCLVUK_cjs.isObject; }
|
|
117
|
-
});
|
|
118
|
-
Object.defineProperty(exports, "parseRawMode", {
|
|
119
|
-
enumerable: true,
|
|
120
|
-
get: function () { return chunkIAWCLVUK_cjs.parseRawMode; }
|
|
121
|
-
});
|
|
122
|
-
Object.defineProperty(exports, "reflectionLevel", {
|
|
123
|
-
enumerable: true,
|
|
124
|
-
get: function () { return chunkIAWCLVUK_cjs.reflectionLevel; }
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(exports, "reflectionModeMatcher", {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
get: function () { return chunkIAWCLVUK_cjs.reflectionModeMatcher; }
|
|
129
|
-
});
|
|
130
|
-
Object.defineProperty(exports, "reflectionModes", {
|
|
131
|
-
enumerable: true,
|
|
132
|
-
get: function () { return chunkIAWCLVUK_cjs.reflectionModes; }
|
|
133
|
-
});
|
|
51
|
+
//#endregion
|
|
52
|
+
exports.Cache = require_compiler.Cache;
|
|
53
|
+
exports.DeclarationTransformer = require_compiler.DeclarationTransformer;
|
|
134
54
|
exports.DeepkitLoader = DeepkitLoader;
|
|
55
|
+
exports.ReflectionTransformer = require_compiler.ReflectionTransformer;
|
|
56
|
+
exports.debugPackStruct = require_compiler.debugPackStruct;
|
|
57
|
+
exports.declarationTransformer = require_compiler.declarationTransformer;
|
|
58
|
+
exports.encodeOps = require_compiler.encodeOps;
|
|
59
|
+
exports.packSize = require_compiler.packSize;
|
|
60
|
+
exports.packSizeByte = require_compiler.packSizeByte;
|
|
61
|
+
exports.transformer = require_compiler.transformer;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { a as debugPackStruct, c as packSize, i as TagsReflectionStruct, l as packSizeByte, n as DeclarationTransformer, o as declarationTransformer, r as ReflectionTransformer, s as encodeOps, t as Cache, u as transformer } from "./compiler-D1z5h1MK.cjs";
|
|
2
|
+
import ts, { CompilerOptions, SourceFile } from "typescript";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=439aa6e683a9a48c3ebbf3529be5811680c45c22d6a265d_be73b50bc43bac944747b8ca0498113a/node_modules/@deepkit/type-compiler/dist/cjs/src/loader.d.ts
|
|
5
|
+
declare class DeepkitLoader {
|
|
6
|
+
protected options: CompilerOptions;
|
|
7
|
+
protected host: ts.CompilerHost;
|
|
8
|
+
protected program: ts.Program;
|
|
9
|
+
protected printer: ts.Printer;
|
|
10
|
+
protected cache: Cache;
|
|
11
|
+
protected knownFiles: {
|
|
12
|
+
[path: string]: string;
|
|
13
|
+
};
|
|
14
|
+
protected sourceFiles: {
|
|
15
|
+
[path: string]: SourceFile;
|
|
16
|
+
};
|
|
17
|
+
constructor();
|
|
18
|
+
transform(source: string, path: string): string;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Cache, DeclarationTransformer, DeepkitLoader, ReflectionTransformer, TagsReflectionStruct, debugPackStruct, declarationTransformer, encodeOps, packSize, packSizeByte, transformer };
|
|
22
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { a as debugPackStruct, c as packSize, i as TagsReflectionStruct, l as packSizeByte, n as DeclarationTransformer, o as declarationTransformer, r as ReflectionTransformer, s as encodeOps, t as Cache, u as transformer } from "./compiler-Nkxc4PLJ.mjs";
|
|
2
|
+
import ts, { CompilerOptions, SourceFile } from "typescript";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=439aa6e683a9a48c3ebbf3529be5811680c45c22d6a265d_be73b50bc43bac944747b8ca0498113a/node_modules/@deepkit/type-compiler/dist/cjs/src/loader.d.ts
|
|
5
|
+
declare class DeepkitLoader {
|
|
6
|
+
protected options: CompilerOptions;
|
|
7
|
+
protected host: ts.CompilerHost;
|
|
8
|
+
protected program: ts.Program;
|
|
9
|
+
protected printer: ts.Printer;
|
|
10
|
+
protected cache: Cache;
|
|
11
|
+
protected knownFiles: {
|
|
12
|
+
[path: string]: string;
|
|
13
|
+
};
|
|
14
|
+
protected sourceFiles: {
|
|
15
|
+
[path: string]: SourceFile;
|
|
16
|
+
};
|
|
17
|
+
constructor();
|
|
18
|
+
transform(source: string, path: string): string;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Cache, DeclarationTransformer, DeepkitLoader, ReflectionTransformer, TagsReflectionStruct, debugPackStruct, declarationTransformer, encodeOps, packSize, packSizeByte, transformer };
|
|
22
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { a as declarationTransformer, c as packSizeByte, i as debugPackStruct, l as transformer, n as DeclarationTransformer, o as encodeOps, r as ReflectionTransformer, s as packSize, t as Cache } from "./compiler-Bg8jX6qU.mjs";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=439aa6e683a9a48c3ebbf3529be5811680c45c22d6a265d_be73b50bc43bac944747b8ca0498113a/node_modules/@deepkit/type-compiler/dist/esm/src/loader.js
|
|
5
|
+
var DeepkitLoader = class {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.options = {
|
|
8
|
+
allowJs: true,
|
|
9
|
+
declaration: false
|
|
10
|
+
};
|
|
11
|
+
this.host = ts.createCompilerHost(this.options);
|
|
12
|
+
this.program = ts.createProgram([], this.options, this.host);
|
|
13
|
+
this.printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
|
|
14
|
+
this.cache = new Cache();
|
|
15
|
+
this.knownFiles = {};
|
|
16
|
+
this.sourceFiles = {};
|
|
17
|
+
const originReadFile = this.host.readFile;
|
|
18
|
+
this.host.readFile = (fileName) => {
|
|
19
|
+
if (this.knownFiles[fileName]) return this.knownFiles[fileName];
|
|
20
|
+
return originReadFile.call(this.host, fileName);
|
|
21
|
+
};
|
|
22
|
+
this.host.writeFile = () => {};
|
|
23
|
+
const originalGetSourceFile = this.host.getSourceFile;
|
|
24
|
+
this.host.getSourceFile = (fileName, languageVersion, onError, shouldCreateNewSourceFile) => {
|
|
25
|
+
if (this.sourceFiles[fileName]) return this.sourceFiles[fileName];
|
|
26
|
+
return originalGetSourceFile.call(this.host, fileName, languageVersion, onError, shouldCreateNewSourceFile);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
transform(source, path) {
|
|
30
|
+
this.knownFiles[path] = source;
|
|
31
|
+
const sourceFile = ts.createSourceFile(path, source, ts.ScriptTarget.ESNext, true, path.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
|
|
32
|
+
let newSource = source;
|
|
33
|
+
ts.transform(sourceFile, [(context) => {
|
|
34
|
+
const transformer = new ReflectionTransformer(context, this.cache).forHost(this.host).withReflection({
|
|
35
|
+
reflection: "default",
|
|
36
|
+
reflectionLevel: "normal"
|
|
37
|
+
});
|
|
38
|
+
return (node) => {
|
|
39
|
+
const sourceFile = transformer.transformSourceFile(node);
|
|
40
|
+
newSource = this.printer.printNode(ts.EmitHint.SourceFile, sourceFile, sourceFile);
|
|
41
|
+
return sourceFile;
|
|
42
|
+
};
|
|
43
|
+
}], this.options);
|
|
44
|
+
return newSource;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { Cache, DeclarationTransformer, DeepkitLoader, ReflectionTransformer, debugPackStruct, declarationTransformer, encodeOps, packSize, packSizeByte, transformer };
|
|
50
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
'
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_type = require('./type-BMLjRtLY.cjs');
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
var chunkIFK6AU6M_cjs = require('./chunk-IFK6AU6M.cjs');
|
|
5
|
-
|
|
6
|
-
// src/vendor/type-spec.ts
|
|
7
|
-
chunkIFK6AU6M_cjs.init_cjs_shims();
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "ReflectionOp", {
|
|
4
|
+
Object.defineProperty(exports, 'ReflectionOp', {
|
|
10
5
|
enumerable: true,
|
|
11
|
-
get: function () {
|
|
6
|
+
get: function () {
|
|
7
|
+
return require_type.ReflectionOp;
|
|
8
|
+
}
|
|
12
9
|
});
|
|
13
|
-
Object.defineProperty(exports,
|
|
10
|
+
Object.defineProperty(exports, 'TypeNumberBrand', {
|
|
14
11
|
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
|
|
12
|
+
get: function () {
|
|
13
|
+
return require_type.TypeNumberBrand;
|
|
14
|
+
}
|
|
15
|
+
});
|