@powerlines/deepkit 0.4.89 → 0.4.90
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/capnp.cjs +187 -0
- package/dist/capnp.d.cts +169 -0
- package/dist/capnp.d.ts +169 -0
- package/dist/capnp.js +2 -0
- package/dist/chunk-2V4ET57D.js +6954 -0
- package/dist/chunk-4WJJKR53.js +3731 -0
- package/dist/chunk-55HOZO7D.cjs +33 -0
- package/dist/chunk-6ETLMANX.js +3472 -0
- package/dist/chunk-6OXPIOZY.cjs +43 -0
- package/dist/chunk-7WAH4JD3.js +115 -0
- package/dist/chunk-B4PTD5KQ.js +4 -0
- package/dist/chunk-BTXPY3B4.js +27 -0
- package/dist/chunk-DGXATHAN.js +5185 -0
- package/dist/chunk-FEBG7WWO.js +11 -0
- package/dist/chunk-FX2P4HL7.cjs +14 -0
- package/dist/chunk-ITQKPDCW.cjs +3859 -0
- package/dist/chunk-JHEBLHYK.cjs +13 -0
- package/dist/chunk-LBHO5BRF.js +2251 -0
- package/dist/chunk-MERFAWZE.js +12 -0
- package/dist/chunk-OYRIJX67.cjs +3487 -0
- package/dist/chunk-PANPZ6S6.cjs +6 -0
- package/dist/chunk-QPSZUUB6.cjs +2259 -0
- package/dist/chunk-QQ7GKXIS.js +43 -0
- package/dist/chunk-SA3DCC4M.cjs +6968 -0
- package/dist/chunk-SKYW5GV2.cjs +5251 -0
- package/dist/chunk-U4JSDAXK.js +36 -0
- package/dist/chunk-WVKPC33H.cjs +49 -0
- package/dist/{vendor/chunk-KC74I2LN.cjs → chunk-YKFG2BZQ.cjs} +3 -5
- package/dist/index.cjs +242 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +11 -0
- package/dist/reflect-type.cjs +11 -0
- package/dist/reflect-type.d.cts +16 -0
- package/dist/reflect-type.d.ts +16 -0
- package/dist/reflect-type.js +2 -0
- package/dist/reflection-DTM1oT21.d.cts +1559 -0
- package/dist/reflection-DTM1oT21.d.ts +1559 -0
- package/dist/resolve-reflections.cjs +11 -0
- package/dist/resolve-reflections.d.cts +11 -0
- package/dist/resolve-reflections.d.ts +11 -0
- package/dist/resolve-reflections.js +2 -0
- package/dist/transformer.cjs +15 -0
- package/dist/transformer.d.cts +22 -0
- package/dist/transformer.d.ts +22 -0
- package/dist/transformer.js +2 -0
- package/dist/transpile.cjs +12 -0
- package/dist/transpile.d.cts +14 -0
- package/dist/transpile.d.ts +14 -0
- package/dist/transpile.js +3 -0
- package/dist/types.cjs +5 -0
- package/dist/types.d.cts +16 -0
- package/dist/types.d.ts +16 -0
- package/dist/types.js +2 -0
- package/dist/utilities.cjs +35 -0
- package/dist/utilities.d.cts +49 -0
- package/dist/utilities.d.ts +49 -0
- package/dist/utilities.js +2 -0
- package/dist/vendor/{chunk-6PEHRAEP.js → chunk-5BKT4CS5.js} +0 -2
- package/dist/vendor/{chunk-W6QNYN5U.cjs → chunk-BDXVTHBY.cjs} +176 -178
- package/dist/vendor/{chunk-AXYJRGEC.js → chunk-BLN7QVCP.js} +1 -3
- package/dist/vendor/{chunk-ORGCWC7F.js → chunk-BR2FK5K7.js} +0 -2
- package/dist/vendor/chunk-EQXMWOHO.cjs +115 -0
- package/dist/vendor/{chunk-6ARUMLA5.js → chunk-MCNMRQDT.js} +0 -2
- package/dist/vendor/{chunk-3QJYIKMR.cjs → chunk-MO4O4UYI.cjs} +0 -2
- package/dist/vendor/{chunk-M6ZTTT3A.js → chunk-RH4YMONA.js} +1 -3
- package/dist/vendor/{chunk-VUVWVXGY.cjs → chunk-RZKB5IQZ.cjs} +0 -2
- package/dist/vendor/{chunk-WZXSRPYO.cjs → chunk-WOXMCJJU.cjs} +505 -507
- package/dist/vendor/compiler.cjs +12 -14
- package/dist/vendor/compiler.js +2 -4
- package/dist/vendor/config.cjs +9 -11
- package/dist/vendor/config.js +2 -4
- package/dist/vendor/core.cjs +130 -132
- package/dist/vendor/core.d.cts +0 -2
- package/dist/vendor/core.d.ts +0 -2
- package/dist/vendor/core.js +5 -4
- package/dist/vendor/index.cjs +17 -19
- package/dist/vendor/index.js +3 -5
- package/dist/vendor/type-compiler/compiler.cjs +46 -0
- package/dist/vendor/type-compiler/compiler.d.cts +1 -0
- package/dist/vendor/type-compiler/compiler.d.ts +1 -0
- package/dist/vendor/type-compiler/compiler.js +7 -0
- package/dist/vendor/type-compiler/config.cjs +36 -0
- package/dist/vendor/type-compiler/config.d.cts +6 -0
- package/dist/vendor/type-compiler/config.d.ts +6 -0
- package/dist/vendor/type-compiler/config.js +5 -0
- package/dist/vendor/type-compiler/index.cjs +108 -0
- package/dist/vendor/type-compiler/index.d.cts +1 -0
- package/dist/vendor/type-compiler/index.d.ts +1 -0
- package/dist/vendor/type-compiler/index.js +67 -0
- package/dist/vendor/type-spec.cjs +5 -7
- package/dist/vendor/type-spec.js +5 -4
- package/dist/vendor/type.cjs +691 -2271
- package/dist/vendor/type.js +92 -1609
- package/package.json +4 -4
- package/dist/vendor/chunk-3QJYIKMR.cjs.map +0 -1
- package/dist/vendor/chunk-6ARUMLA5.js.map +0 -1
- package/dist/vendor/chunk-6PEHRAEP.js.map +0 -1
- package/dist/vendor/chunk-AXYJRGEC.js.map +0 -1
- package/dist/vendor/chunk-KC74I2LN.cjs.map +0 -1
- package/dist/vendor/chunk-M6ZTTT3A.js.map +0 -1
- package/dist/vendor/chunk-ORGCWC7F.js.map +0 -1
- package/dist/vendor/chunk-VUVWVXGY.cjs.map +0 -1
- package/dist/vendor/chunk-W6QNYN5U.cjs.map +0 -1
- package/dist/vendor/chunk-WZXSRPYO.cjs.map +0 -1
- package/dist/vendor/compiler.cjs.map +0 -1
- package/dist/vendor/compiler.js.map +0 -1
- package/dist/vendor/config.cjs.map +0 -1
- package/dist/vendor/config.js.map +0 -1
- package/dist/vendor/core.cjs.map +0 -1
- package/dist/vendor/core.js.map +0 -1
- package/dist/vendor/index.cjs.map +0 -1
- package/dist/vendor/index.js.map +0 -1
- package/dist/vendor/type-spec.cjs.map +0 -1
- package/dist/vendor/type-spec.js.map +0 -1
- package/dist/vendor/type.cjs.map +0 -1
- package/dist/vendor/type.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkWVKPC33H_cjs = require('./chunk-WVKPC33H.cjs');
|
|
4
|
+
var typeCompiler = require('@powerlines/deepkit/vendor/type-compiler');
|
|
5
|
+
var defu = require('defu');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
10
|
+
|
|
11
|
+
// src/transformer.ts
|
|
12
|
+
chunkWVKPC33H_cjs.init_cjs_shims();
|
|
13
|
+
var cache = new typeCompiler.Cache();
|
|
14
|
+
function createTransformer(context, options = {}) {
|
|
15
|
+
return /* @__PURE__ */ chunkWVKPC33H_cjs.__name(function transformer(ctx) {
|
|
16
|
+
cache.tick();
|
|
17
|
+
return new typeCompiler.ReflectionTransformer(ctx, cache).withReflection(defu__default.default(options, {
|
|
18
|
+
reflection: context.tsconfig.tsconfigJson.compilerOptions?.reflection || context.tsconfig.tsconfigJson.reflection,
|
|
19
|
+
reflectionLevel: context.tsconfig.tsconfigJson.compilerOptions?.reflectionLevel || context.tsconfig.tsconfigJson.reflectionLevel
|
|
20
|
+
}, {
|
|
21
|
+
exclude: [],
|
|
22
|
+
reflection: "default",
|
|
23
|
+
reflectionLevel: "minimal"
|
|
24
|
+
}));
|
|
25
|
+
}, "transformer");
|
|
26
|
+
}
|
|
27
|
+
chunkWVKPC33H_cjs.__name(createTransformer, "createTransformer");
|
|
28
|
+
function createDeclarationTransformer(context, options = {}) {
|
|
29
|
+
return /* @__PURE__ */ chunkWVKPC33H_cjs.__name(function declarationTransformer(ctx) {
|
|
30
|
+
return new typeCompiler.DeclarationTransformer(ctx, cache).withReflection(defu__default.default(options, {
|
|
31
|
+
reflection: context.tsconfig.tsconfigJson.compilerOptions?.reflection || context.tsconfig.tsconfigJson.reflection,
|
|
32
|
+
reflectionLevel: context.tsconfig.tsconfigJson.compilerOptions?.reflectionLevel || context.tsconfig.tsconfigJson.reflectionLevel
|
|
33
|
+
}, {
|
|
34
|
+
exclude: [],
|
|
35
|
+
reflection: "default",
|
|
36
|
+
reflectionLevel: "minimal"
|
|
37
|
+
}));
|
|
38
|
+
}, "declarationTransformer");
|
|
39
|
+
}
|
|
40
|
+
chunkWVKPC33H_cjs.__name(createDeclarationTransformer, "createDeclarationTransformer");
|
|
41
|
+
|
|
42
|
+
exports.createDeclarationTransformer = createDeclarationTransformer;
|
|
43
|
+
exports.createTransformer = createTransformer;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { init_esm_shims } from './chunk-QQ7GKXIS.js';
|
|
2
|
+
|
|
3
|
+
// ../../node_modules/.pnpm/@deepkit+type-spec@1.0.1_patch_hash=f3c3a4fd486751022d78f17d39a5a79f493bca20b185964ca1aba41fbfc93244/node_modules/@deepkit/type-spec/dist/esm/src/type.js
|
|
4
|
+
init_esm_shims();
|
|
5
|
+
var TypeNumberBrand;
|
|
6
|
+
(function(TypeNumberBrand2) {
|
|
7
|
+
TypeNumberBrand2[TypeNumberBrand2["integer"] = 0] = "integer";
|
|
8
|
+
TypeNumberBrand2[TypeNumberBrand2["int8"] = 1] = "int8";
|
|
9
|
+
TypeNumberBrand2[TypeNumberBrand2["int16"] = 2] = "int16";
|
|
10
|
+
TypeNumberBrand2[TypeNumberBrand2["int32"] = 3] = "int32";
|
|
11
|
+
TypeNumberBrand2[TypeNumberBrand2["uint8"] = 4] = "uint8";
|
|
12
|
+
TypeNumberBrand2[TypeNumberBrand2["uint16"] = 5] = "uint16";
|
|
13
|
+
TypeNumberBrand2[TypeNumberBrand2["uint32"] = 6] = "uint32";
|
|
14
|
+
TypeNumberBrand2[TypeNumberBrand2["float"] = 7] = "float";
|
|
15
|
+
TypeNumberBrand2[TypeNumberBrand2["float32"] = 8] = "float32";
|
|
16
|
+
TypeNumberBrand2[TypeNumberBrand2["float64"] = 9] = "float64";
|
|
17
|
+
})(TypeNumberBrand || (TypeNumberBrand = {}));
|
|
18
|
+
var ReflectionOp;
|
|
19
|
+
(function(ReflectionOp2) {
|
|
20
|
+
ReflectionOp2[ReflectionOp2["never"] = 0] = "never";
|
|
21
|
+
ReflectionOp2[ReflectionOp2["any"] = 1] = "any";
|
|
22
|
+
ReflectionOp2[ReflectionOp2["unknown"] = 2] = "unknown";
|
|
23
|
+
ReflectionOp2[ReflectionOp2["void"] = 3] = "void";
|
|
24
|
+
ReflectionOp2[ReflectionOp2["object"] = 4] = "object";
|
|
25
|
+
ReflectionOp2[ReflectionOp2["string"] = 5] = "string";
|
|
26
|
+
ReflectionOp2[ReflectionOp2["number"] = 6] = "number";
|
|
27
|
+
ReflectionOp2[ReflectionOp2["numberBrand"] = 7] = "numberBrand";
|
|
28
|
+
ReflectionOp2[ReflectionOp2["boolean"] = 8] = "boolean";
|
|
29
|
+
ReflectionOp2[ReflectionOp2["bigint"] = 9] = "bigint";
|
|
30
|
+
ReflectionOp2[ReflectionOp2["symbol"] = 10] = "symbol";
|
|
31
|
+
ReflectionOp2[ReflectionOp2["null"] = 11] = "null";
|
|
32
|
+
ReflectionOp2[ReflectionOp2["undefined"] = 12] = "undefined";
|
|
33
|
+
ReflectionOp2[ReflectionOp2["literal"] = 13] = "literal";
|
|
34
|
+
ReflectionOp2[ReflectionOp2["function"] = 14] = "function";
|
|
35
|
+
ReflectionOp2[ReflectionOp2["method"] = 15] = "method";
|
|
36
|
+
ReflectionOp2[ReflectionOp2["methodSignature"] = 16] = "methodSignature";
|
|
37
|
+
ReflectionOp2[ReflectionOp2["parameter"] = 17] = "parameter";
|
|
38
|
+
ReflectionOp2[ReflectionOp2["property"] = 18] = "property";
|
|
39
|
+
ReflectionOp2[ReflectionOp2["propertySignature"] = 19] = "propertySignature";
|
|
40
|
+
ReflectionOp2[ReflectionOp2["class"] = 20] = "class";
|
|
41
|
+
ReflectionOp2[ReflectionOp2["classExtends"] = 21] = "classExtends";
|
|
42
|
+
ReflectionOp2[ReflectionOp2["classReference"] = 22] = "classReference";
|
|
43
|
+
ReflectionOp2[ReflectionOp2["optional"] = 23] = "optional";
|
|
44
|
+
ReflectionOp2[ReflectionOp2["readonly"] = 24] = "readonly";
|
|
45
|
+
ReflectionOp2[ReflectionOp2["public"] = 25] = "public";
|
|
46
|
+
ReflectionOp2[ReflectionOp2["private"] = 26] = "private";
|
|
47
|
+
ReflectionOp2[ReflectionOp2["protected"] = 27] = "protected";
|
|
48
|
+
ReflectionOp2[ReflectionOp2["abstract"] = 28] = "abstract";
|
|
49
|
+
ReflectionOp2[ReflectionOp2["defaultValue"] = 29] = "defaultValue";
|
|
50
|
+
ReflectionOp2[ReflectionOp2["description"] = 30] = "description";
|
|
51
|
+
ReflectionOp2[ReflectionOp2["rest"] = 31] = "rest";
|
|
52
|
+
ReflectionOp2[ReflectionOp2["regexp"] = 32] = "regexp";
|
|
53
|
+
ReflectionOp2[ReflectionOp2["enum"] = 33] = "enum";
|
|
54
|
+
ReflectionOp2[ReflectionOp2["enumMember"] = 34] = "enumMember";
|
|
55
|
+
ReflectionOp2[ReflectionOp2["set"] = 35] = "set";
|
|
56
|
+
ReflectionOp2[ReflectionOp2["map"] = 36] = "map";
|
|
57
|
+
ReflectionOp2[ReflectionOp2["array"] = 37] = "array";
|
|
58
|
+
ReflectionOp2[ReflectionOp2["tuple"] = 38] = "tuple";
|
|
59
|
+
ReflectionOp2[ReflectionOp2["tupleMember"] = 39] = "tupleMember";
|
|
60
|
+
ReflectionOp2[ReflectionOp2["namedTupleMember"] = 40] = "namedTupleMember";
|
|
61
|
+
ReflectionOp2[ReflectionOp2["union"] = 41] = "union";
|
|
62
|
+
ReflectionOp2[ReflectionOp2["intersection"] = 42] = "intersection";
|
|
63
|
+
ReflectionOp2[ReflectionOp2["indexSignature"] = 43] = "indexSignature";
|
|
64
|
+
ReflectionOp2[ReflectionOp2["objectLiteral"] = 44] = "objectLiteral";
|
|
65
|
+
ReflectionOp2[ReflectionOp2["mappedType"] = 45] = "mappedType";
|
|
66
|
+
ReflectionOp2[ReflectionOp2["in"] = 46] = "in";
|
|
67
|
+
ReflectionOp2[ReflectionOp2["frame"] = 47] = "frame";
|
|
68
|
+
ReflectionOp2[ReflectionOp2["moveFrame"] = 48] = "moveFrame";
|
|
69
|
+
ReflectionOp2[ReflectionOp2["return"] = 49] = "return";
|
|
70
|
+
ReflectionOp2[ReflectionOp2["templateLiteral"] = 50] = "templateLiteral";
|
|
71
|
+
ReflectionOp2[ReflectionOp2["date"] = 51] = "date";
|
|
72
|
+
ReflectionOp2[ReflectionOp2["int8Array"] = 52] = "int8Array";
|
|
73
|
+
ReflectionOp2[ReflectionOp2["uint8ClampedArray"] = 53] = "uint8ClampedArray";
|
|
74
|
+
ReflectionOp2[ReflectionOp2["uint8Array"] = 54] = "uint8Array";
|
|
75
|
+
ReflectionOp2[ReflectionOp2["int16Array"] = 55] = "int16Array";
|
|
76
|
+
ReflectionOp2[ReflectionOp2["uint16Array"] = 56] = "uint16Array";
|
|
77
|
+
ReflectionOp2[ReflectionOp2["int32Array"] = 57] = "int32Array";
|
|
78
|
+
ReflectionOp2[ReflectionOp2["uint32Array"] = 58] = "uint32Array";
|
|
79
|
+
ReflectionOp2[ReflectionOp2["float32Array"] = 59] = "float32Array";
|
|
80
|
+
ReflectionOp2[ReflectionOp2["float64Array"] = 60] = "float64Array";
|
|
81
|
+
ReflectionOp2[ReflectionOp2["bigInt64Array"] = 61] = "bigInt64Array";
|
|
82
|
+
ReflectionOp2[ReflectionOp2["arrayBuffer"] = 62] = "arrayBuffer";
|
|
83
|
+
ReflectionOp2[ReflectionOp2["promise"] = 63] = "promise";
|
|
84
|
+
ReflectionOp2[ReflectionOp2["arg"] = 64] = "arg";
|
|
85
|
+
ReflectionOp2[ReflectionOp2["typeParameter"] = 65] = "typeParameter";
|
|
86
|
+
ReflectionOp2[ReflectionOp2["typeParameterDefault"] = 66] = "typeParameterDefault";
|
|
87
|
+
ReflectionOp2[ReflectionOp2["var"] = 67] = "var";
|
|
88
|
+
ReflectionOp2[ReflectionOp2["loads"] = 68] = "loads";
|
|
89
|
+
ReflectionOp2[ReflectionOp2["indexAccess"] = 69] = "indexAccess";
|
|
90
|
+
ReflectionOp2[ReflectionOp2["keyof"] = 70] = "keyof";
|
|
91
|
+
ReflectionOp2[ReflectionOp2["infer"] = 71] = "infer";
|
|
92
|
+
ReflectionOp2[ReflectionOp2["typeof"] = 72] = "typeof";
|
|
93
|
+
ReflectionOp2[ReflectionOp2["condition"] = 73] = "condition";
|
|
94
|
+
ReflectionOp2[ReflectionOp2["jumpCondition"] = 74] = "jumpCondition";
|
|
95
|
+
ReflectionOp2[ReflectionOp2["jump"] = 75] = "jump";
|
|
96
|
+
ReflectionOp2[ReflectionOp2["call"] = 76] = "call";
|
|
97
|
+
ReflectionOp2[ReflectionOp2["inline"] = 77] = "inline";
|
|
98
|
+
ReflectionOp2[ReflectionOp2["inlineCall"] = 78] = "inlineCall";
|
|
99
|
+
ReflectionOp2[ReflectionOp2["distribute"] = 79] = "distribute";
|
|
100
|
+
ReflectionOp2[ReflectionOp2["extends"] = 80] = "extends";
|
|
101
|
+
ReflectionOp2[ReflectionOp2["widen"] = 81] = "widen";
|
|
102
|
+
ReflectionOp2[ReflectionOp2["static"] = 82] = "static";
|
|
103
|
+
ReflectionOp2[ReflectionOp2["mappedType2"] = 83] = "mappedType2";
|
|
104
|
+
ReflectionOp2[ReflectionOp2["functionReference"] = 84] = "functionReference";
|
|
105
|
+
ReflectionOp2[ReflectionOp2["callSignature"] = 85] = "callSignature";
|
|
106
|
+
ReflectionOp2[ReflectionOp2["typeName"] = 86] = "typeName";
|
|
107
|
+
ReflectionOp2[ReflectionOp2["implements"] = 87] = "implements";
|
|
108
|
+
ReflectionOp2[ReflectionOp2["nominal"] = 88] = "nominal";
|
|
109
|
+
ReflectionOp2[ReflectionOp2["tags"] = 89] = "tags";
|
|
110
|
+
})(ReflectionOp || (ReflectionOp = {}));
|
|
111
|
+
|
|
112
|
+
// ../../node_modules/.pnpm/@deepkit+type-spec@1.0.1_patch_hash=f3c3a4fd486751022d78f17d39a5a79f493bca20b185964ca1aba41fbfc93244/node_modules/@deepkit/type-spec/dist/esm/index.js
|
|
113
|
+
init_esm_shims();
|
|
114
|
+
|
|
115
|
+
export { ReflectionOp, TypeNumberBrand };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createTransformer, createDeclarationTransformer } from './chunk-U4JSDAXK.js';
|
|
2
|
+
import { init_esm_shims, __name } from './chunk-QQ7GKXIS.js';
|
|
3
|
+
import ts from 'typescript';
|
|
4
|
+
|
|
5
|
+
// src/transpile.ts
|
|
6
|
+
init_esm_shims();
|
|
7
|
+
function transpile(context, code, id) {
|
|
8
|
+
const transformer = createTransformer(context);
|
|
9
|
+
const declarationTransformer = createDeclarationTransformer(context);
|
|
10
|
+
return ts.transpileModule(code, {
|
|
11
|
+
compilerOptions: {
|
|
12
|
+
...context.tsconfig.options
|
|
13
|
+
},
|
|
14
|
+
fileName: id,
|
|
15
|
+
transformers: {
|
|
16
|
+
before: [
|
|
17
|
+
transformer
|
|
18
|
+
],
|
|
19
|
+
after: [
|
|
20
|
+
declarationTransformer
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
__name(transpile, "transpile");
|
|
26
|
+
|
|
27
|
+
export { transpile };
|