@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.
Files changed (117) hide show
  1. package/dist/capnp.cjs +187 -0
  2. package/dist/capnp.d.cts +169 -0
  3. package/dist/capnp.d.ts +169 -0
  4. package/dist/capnp.js +2 -0
  5. package/dist/chunk-2V4ET57D.js +6954 -0
  6. package/dist/chunk-4WJJKR53.js +3731 -0
  7. package/dist/chunk-55HOZO7D.cjs +33 -0
  8. package/dist/chunk-6ETLMANX.js +3472 -0
  9. package/dist/chunk-6OXPIOZY.cjs +43 -0
  10. package/dist/chunk-7WAH4JD3.js +115 -0
  11. package/dist/chunk-B4PTD5KQ.js +4 -0
  12. package/dist/chunk-BTXPY3B4.js +27 -0
  13. package/dist/chunk-DGXATHAN.js +5185 -0
  14. package/dist/chunk-FEBG7WWO.js +11 -0
  15. package/dist/chunk-FX2P4HL7.cjs +14 -0
  16. package/dist/chunk-ITQKPDCW.cjs +3859 -0
  17. package/dist/chunk-JHEBLHYK.cjs +13 -0
  18. package/dist/chunk-LBHO5BRF.js +2251 -0
  19. package/dist/chunk-MERFAWZE.js +12 -0
  20. package/dist/chunk-OYRIJX67.cjs +3487 -0
  21. package/dist/chunk-PANPZ6S6.cjs +6 -0
  22. package/dist/chunk-QPSZUUB6.cjs +2259 -0
  23. package/dist/chunk-QQ7GKXIS.js +43 -0
  24. package/dist/chunk-SA3DCC4M.cjs +6968 -0
  25. package/dist/chunk-SKYW5GV2.cjs +5251 -0
  26. package/dist/chunk-U4JSDAXK.js +36 -0
  27. package/dist/chunk-WVKPC33H.cjs +49 -0
  28. package/dist/{vendor/chunk-KC74I2LN.cjs → chunk-YKFG2BZQ.cjs} +3 -5
  29. package/dist/index.cjs +242 -0
  30. package/dist/index.d.cts +15 -0
  31. package/dist/index.d.ts +15 -0
  32. package/dist/index.js +11 -0
  33. package/dist/reflect-type.cjs +11 -0
  34. package/dist/reflect-type.d.cts +16 -0
  35. package/dist/reflect-type.d.ts +16 -0
  36. package/dist/reflect-type.js +2 -0
  37. package/dist/reflection-DTM1oT21.d.cts +1559 -0
  38. package/dist/reflection-DTM1oT21.d.ts +1559 -0
  39. package/dist/resolve-reflections.cjs +11 -0
  40. package/dist/resolve-reflections.d.cts +11 -0
  41. package/dist/resolve-reflections.d.ts +11 -0
  42. package/dist/resolve-reflections.js +2 -0
  43. package/dist/transformer.cjs +15 -0
  44. package/dist/transformer.d.cts +22 -0
  45. package/dist/transformer.d.ts +22 -0
  46. package/dist/transformer.js +2 -0
  47. package/dist/transpile.cjs +12 -0
  48. package/dist/transpile.d.cts +14 -0
  49. package/dist/transpile.d.ts +14 -0
  50. package/dist/transpile.js +3 -0
  51. package/dist/types.cjs +5 -0
  52. package/dist/types.d.cts +16 -0
  53. package/dist/types.d.ts +16 -0
  54. package/dist/types.js +2 -0
  55. package/dist/utilities.cjs +35 -0
  56. package/dist/utilities.d.cts +49 -0
  57. package/dist/utilities.d.ts +49 -0
  58. package/dist/utilities.js +2 -0
  59. package/dist/vendor/{chunk-6PEHRAEP.js → chunk-5BKT4CS5.js} +0 -2
  60. package/dist/vendor/{chunk-W6QNYN5U.cjs → chunk-BDXVTHBY.cjs} +176 -178
  61. package/dist/vendor/{chunk-AXYJRGEC.js → chunk-BLN7QVCP.js} +1 -3
  62. package/dist/vendor/{chunk-ORGCWC7F.js → chunk-BR2FK5K7.js} +0 -2
  63. package/dist/vendor/chunk-EQXMWOHO.cjs +115 -0
  64. package/dist/vendor/{chunk-6ARUMLA5.js → chunk-MCNMRQDT.js} +0 -2
  65. package/dist/vendor/{chunk-3QJYIKMR.cjs → chunk-MO4O4UYI.cjs} +0 -2
  66. package/dist/vendor/{chunk-M6ZTTT3A.js → chunk-RH4YMONA.js} +1 -3
  67. package/dist/vendor/{chunk-VUVWVXGY.cjs → chunk-RZKB5IQZ.cjs} +0 -2
  68. package/dist/vendor/{chunk-WZXSRPYO.cjs → chunk-WOXMCJJU.cjs} +505 -507
  69. package/dist/vendor/compiler.cjs +12 -14
  70. package/dist/vendor/compiler.js +2 -4
  71. package/dist/vendor/config.cjs +9 -11
  72. package/dist/vendor/config.js +2 -4
  73. package/dist/vendor/core.cjs +130 -132
  74. package/dist/vendor/core.d.cts +0 -2
  75. package/dist/vendor/core.d.ts +0 -2
  76. package/dist/vendor/core.js +5 -4
  77. package/dist/vendor/index.cjs +17 -19
  78. package/dist/vendor/index.js +3 -5
  79. package/dist/vendor/type-compiler/compiler.cjs +46 -0
  80. package/dist/vendor/type-compiler/compiler.d.cts +1 -0
  81. package/dist/vendor/type-compiler/compiler.d.ts +1 -0
  82. package/dist/vendor/type-compiler/compiler.js +7 -0
  83. package/dist/vendor/type-compiler/config.cjs +36 -0
  84. package/dist/vendor/type-compiler/config.d.cts +6 -0
  85. package/dist/vendor/type-compiler/config.d.ts +6 -0
  86. package/dist/vendor/type-compiler/config.js +5 -0
  87. package/dist/vendor/type-compiler/index.cjs +108 -0
  88. package/dist/vendor/type-compiler/index.d.cts +1 -0
  89. package/dist/vendor/type-compiler/index.d.ts +1 -0
  90. package/dist/vendor/type-compiler/index.js +67 -0
  91. package/dist/vendor/type-spec.cjs +5 -7
  92. package/dist/vendor/type-spec.js +5 -4
  93. package/dist/vendor/type.cjs +691 -2271
  94. package/dist/vendor/type.js +92 -1609
  95. package/package.json +4 -4
  96. package/dist/vendor/chunk-3QJYIKMR.cjs.map +0 -1
  97. package/dist/vendor/chunk-6ARUMLA5.js.map +0 -1
  98. package/dist/vendor/chunk-6PEHRAEP.js.map +0 -1
  99. package/dist/vendor/chunk-AXYJRGEC.js.map +0 -1
  100. package/dist/vendor/chunk-KC74I2LN.cjs.map +0 -1
  101. package/dist/vendor/chunk-M6ZTTT3A.js.map +0 -1
  102. package/dist/vendor/chunk-ORGCWC7F.js.map +0 -1
  103. package/dist/vendor/chunk-VUVWVXGY.cjs.map +0 -1
  104. package/dist/vendor/chunk-W6QNYN5U.cjs.map +0 -1
  105. package/dist/vendor/chunk-WZXSRPYO.cjs.map +0 -1
  106. package/dist/vendor/compiler.cjs.map +0 -1
  107. package/dist/vendor/compiler.js.map +0 -1
  108. package/dist/vendor/config.cjs.map +0 -1
  109. package/dist/vendor/config.js.map +0 -1
  110. package/dist/vendor/core.cjs.map +0 -1
  111. package/dist/vendor/core.js.map +0 -1
  112. package/dist/vendor/index.cjs.map +0 -1
  113. package/dist/vendor/index.js.map +0 -1
  114. package/dist/vendor/type-spec.cjs.map +0 -1
  115. package/dist/vendor/type-spec.js.map +0 -1
  116. package/dist/vendor/type.cjs.map +0 -1
  117. 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,4 @@
1
+ import { init_esm_shims } from './chunk-QQ7GKXIS.js';
2
+
3
+ // src/types.ts
4
+ init_esm_shims();
@@ -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 };