@powerlines/deepkit 0.4.89 → 0.4.91

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,11 @@
1
+ 'use strict';
2
+
3
+ var chunkJHEBLHYK_cjs = require('./chunk-JHEBLHYK.cjs');
4
+ require('./chunk-WVKPC33H.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "getReflectionsPath", {
9
+ enumerable: true,
10
+ get: function () { return chunkJHEBLHYK_cjs.getReflectionsPath; }
11
+ });
@@ -0,0 +1,11 @@
1
+ import { Context } from 'powerlines/types/context';
2
+
3
+ /**
4
+ * Returns the path to the reflections artifact directory.
5
+ *
6
+ * @param context - The context object containing the environment paths.
7
+ * @returns The path to the reflections artifact directory.
8
+ */
9
+ declare function getReflectionsPath(context: Context): string;
10
+
11
+ export { getReflectionsPath };
@@ -0,0 +1,11 @@
1
+ import { Context } from 'powerlines/types/context';
2
+
3
+ /**
4
+ * Returns the path to the reflections artifact directory.
5
+ *
6
+ * @param context - The context object containing the environment paths.
7
+ * @returns The path to the reflections artifact directory.
8
+ */
9
+ declare function getReflectionsPath(context: Context): string;
10
+
11
+ export { getReflectionsPath };
@@ -0,0 +1,2 @@
1
+ export { getReflectionsPath } from './chunk-FEBG7WWO.js';
2
+ import './chunk-QQ7GKXIS.js';
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var chunk6OXPIOZY_cjs = require('./chunk-6OXPIOZY.cjs');
4
+ require('./chunk-WVKPC33H.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "createDeclarationTransformer", {
9
+ enumerable: true,
10
+ get: function () { return chunk6OXPIOZY_cjs.createDeclarationTransformer; }
11
+ });
12
+ Object.defineProperty(exports, "createTransformer", {
13
+ enumerable: true,
14
+ get: function () { return chunk6OXPIOZY_cjs.createTransformer; }
15
+ });
@@ -0,0 +1,22 @@
1
+ import { ReflectionConfig } from '@deepkit/type-compiler/config';
2
+ import { Context } from 'powerlines/types/context';
3
+ import ts from 'typescript';
4
+
5
+ /**
6
+ * Creates a Deepkit TypeScript transformer.
7
+ *
8
+ * @param context - The Powerlines plugin context.
9
+ * @param options - The transformation options.
10
+ * @returns A Deepkit TypeScript custom transformer factory.
11
+ */
12
+ declare function createTransformer(context: Context, options?: Partial<ReflectionConfig>): ts.CustomTransformerFactory;
13
+ /**
14
+ * Creates a Deepkit TypeScript declaration transformer.
15
+ *
16
+ * @param context - The Powerlines plugin context.
17
+ * @param options - The transformation options.
18
+ * @returns A Deepkit TypeScript custom declaration transformer factory.
19
+ */
20
+ declare function createDeclarationTransformer(context: Context, options?: Partial<ReflectionConfig>): ts.CustomTransformerFactory;
21
+
22
+ export { createDeclarationTransformer, createTransformer };
@@ -0,0 +1,22 @@
1
+ import { ReflectionConfig } from '@deepkit/type-compiler/config';
2
+ import { Context } from 'powerlines/types/context';
3
+ import ts from 'typescript';
4
+
5
+ /**
6
+ * Creates a Deepkit TypeScript transformer.
7
+ *
8
+ * @param context - The Powerlines plugin context.
9
+ * @param options - The transformation options.
10
+ * @returns A Deepkit TypeScript custom transformer factory.
11
+ */
12
+ declare function createTransformer(context: Context, options?: Partial<ReflectionConfig>): ts.CustomTransformerFactory;
13
+ /**
14
+ * Creates a Deepkit TypeScript declaration transformer.
15
+ *
16
+ * @param context - The Powerlines plugin context.
17
+ * @param options - The transformation options.
18
+ * @returns A Deepkit TypeScript custom declaration transformer factory.
19
+ */
20
+ declare function createDeclarationTransformer(context: Context, options?: Partial<ReflectionConfig>): ts.CustomTransformerFactory;
21
+
22
+ export { createDeclarationTransformer, createTransformer };
@@ -0,0 +1,2 @@
1
+ export { createDeclarationTransformer, createTransformer } from './chunk-U4JSDAXK.js';
2
+ import './chunk-QQ7GKXIS.js';
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunk55HOZO7D_cjs = require('./chunk-55HOZO7D.cjs');
4
+ require('./chunk-6OXPIOZY.cjs');
5
+ require('./chunk-WVKPC33H.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "transpile", {
10
+ enumerable: true,
11
+ get: function () { return chunk55HOZO7D_cjs.transpile; }
12
+ });
@@ -0,0 +1,14 @@
1
+ import { Context } from 'powerlines/types/context';
2
+ import ts from 'typescript';
3
+
4
+ /**
5
+ * Transpile TypeScript code using the provided context and options.
6
+ *
7
+ * @param context - The base context containing TypeScript configuration and options.
8
+ * @param code - The TypeScript code to be transpiled.
9
+ * @param id - The identifier for the TypeScript file being transpiled.
10
+ * @returns The transpiled output.
11
+ */
12
+ declare function transpile(context: Context, code: string, id: string): ts.TranspileOutput;
13
+
14
+ export { transpile };
@@ -0,0 +1,14 @@
1
+ import { Context } from 'powerlines/types/context';
2
+ import ts from 'typescript';
3
+
4
+ /**
5
+ * Transpile TypeScript code using the provided context and options.
6
+ *
7
+ * @param context - The base context containing TypeScript configuration and options.
8
+ * @param code - The TypeScript code to be transpiled.
9
+ * @param id - The identifier for the TypeScript file being transpiled.
10
+ * @returns The transpiled output.
11
+ */
12
+ declare function transpile(context: Context, code: string, id: string): ts.TranspileOutput;
13
+
14
+ export { transpile };
@@ -0,0 +1,3 @@
1
+ export { transpile } from './chunk-BTXPY3B4.js';
2
+ import './chunk-U4JSDAXK.js';
3
+ import './chunk-QQ7GKXIS.js';
package/dist/types.cjs ADDED
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ require('./chunk-PANPZ6S6.cjs');
4
+ require('./chunk-WVKPC33H.cjs');
5
+
@@ -0,0 +1,16 @@
1
+ import { ReflectionClass } from '@powerlines/deepkit/vendor/type';
2
+ import { t as SerializedTypes } from './reflection-DTM1oT21.cjs';
3
+ import '@stryke/capnp';
4
+
5
+ type Reflection<T extends Record<string, any> = Record<string, any>> = ReflectionClass<T> & {
6
+ dataBuffer?: ArrayBuffer;
7
+ messageRoot?: SerializedTypes;
8
+ };
9
+ type ReflectionRecord<T extends Record<string, any> = Record<string, any>> = Record<string, Reflection<T>>;
10
+ interface ContextReflectionRecord<T extends Record<string, any> = Record<string, any>> extends Record<string, Reflection<T> | ContextReflectionRecord<T>> {
11
+ }
12
+ declare type __ΩReflection = any[];
13
+ declare type __ΩReflectionRecord = any[];
14
+ declare type __ΩContextReflectionRecord = any[];
15
+
16
+ export type { ContextReflectionRecord, Reflection, ReflectionRecord, __ΩContextReflectionRecord, __ΩReflection, __ΩReflectionRecord };
@@ -0,0 +1,16 @@
1
+ import { ReflectionClass } from '@powerlines/deepkit/vendor/type';
2
+ import { t as SerializedTypes } from './reflection-DTM1oT21.js';
3
+ import '@stryke/capnp';
4
+
5
+ type Reflection<T extends Record<string, any> = Record<string, any>> = ReflectionClass<T> & {
6
+ dataBuffer?: ArrayBuffer;
7
+ messageRoot?: SerializedTypes;
8
+ };
9
+ type ReflectionRecord<T extends Record<string, any> = Record<string, any>> = Record<string, Reflection<T>>;
10
+ interface ContextReflectionRecord<T extends Record<string, any> = Record<string, any>> extends Record<string, Reflection<T> | ContextReflectionRecord<T>> {
11
+ }
12
+ declare type __ΩReflection = any[];
13
+ declare type __ΩReflectionRecord = any[];
14
+ declare type __ΩContextReflectionRecord = any[];
15
+
16
+ export type { ContextReflectionRecord, Reflection, ReflectionRecord, __ΩContextReflectionRecord, __ΩReflection, __ΩReflectionRecord };
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ import './chunk-B4PTD5KQ.js';
2
+ import './chunk-QQ7GKXIS.js';
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var chunkQPSZUUB6_cjs = require('./chunk-QPSZUUB6.cjs');
4
+ require('./chunk-WVKPC33H.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "getEnumReflectionType", {
9
+ enumerable: true,
10
+ get: function () { return chunkQPSZUUB6_cjs.getEnumReflectionType; }
11
+ });
12
+ Object.defineProperty(exports, "getUnionTypes", {
13
+ enumerable: true,
14
+ get: function () { return chunkQPSZUUB6_cjs.getUnionTypes; }
15
+ });
16
+ Object.defineProperty(exports, "isStringUnion", {
17
+ enumerable: true,
18
+ get: function () { return chunkQPSZUUB6_cjs.isStringUnion; }
19
+ });
20
+ Object.defineProperty(exports, "kindToName", {
21
+ enumerable: true,
22
+ get: function () { return chunkQPSZUUB6_cjs.kindToName; }
23
+ });
24
+ Object.defineProperty(exports, "stringifyDefaultValue", {
25
+ enumerable: true,
26
+ get: function () { return chunkQPSZUUB6_cjs.stringifyDefaultValue; }
27
+ });
28
+ Object.defineProperty(exports, "stringifyStringValue", {
29
+ enumerable: true,
30
+ get: function () { return chunkQPSZUUB6_cjs.stringifyStringValue; }
31
+ });
32
+ Object.defineProperty(exports, "stringifyValue", {
33
+ enumerable: true,
34
+ get: function () { return chunkQPSZUUB6_cjs.stringifyValue; }
35
+ });
@@ -0,0 +1,49 @@
1
+ import { ReflectionProperty, ReflectionParameter, Type, TypeString, TypeNumber, ReflectionKind } from '@powerlines/deepkit/vendor/type';
2
+
3
+ /**
4
+ * Converts any {@link ReflectionProperty} or {@link ReflectionParameter}'s value to string representation.
5
+ *
6
+ * @param property - The {@link ReflectionProperty} or {@link ReflectionParameter} containing the value to stringify.
7
+ * @param value - The value to stringify.
8
+ * @returns A string representation of the value.
9
+ */
10
+ declare function stringifyDefaultValue(property: ReflectionProperty | ReflectionParameter, value?: any): string;
11
+ /**
12
+ * Stringifies a value as a string.
13
+ *
14
+ * @param value - The value to stringify.
15
+ * @returns A string representation of the value.
16
+ */
17
+ declare function stringifyStringValue(value?: any): string;
18
+ /**
19
+ * Converts any {@link Type}'s actual value to string representation.
20
+ *
21
+ * @param type - The {@link Type} of the value to stringify.
22
+ * @param value - The value to stringify.
23
+ * @returns A string representation of the value.
24
+ */
25
+ declare function stringifyValue(type: Type, value: any): string;
26
+ /**
27
+ * Converts a {@link TypeEnum} to its underlying primitive type representation.
28
+ *
29
+ * @param type - The {@link TypeEnum} to evaluate.
30
+ * @returns A string representation of the primitive type.
31
+ */
32
+ declare function getEnumReflectionType(type: Type): TypeString | TypeNumber;
33
+ /**
34
+ * Converts a {@link TypeUnion} to its underlying primitive type representation.
35
+ *
36
+ * @param type - The {@link TypeUnion} to evaluate.
37
+ * @returns A string representation of the primitive type.
38
+ */
39
+ declare function getUnionTypes(type: Type): Type[];
40
+ declare function isStringUnion(type: Type): boolean;
41
+ /**
42
+ * Converts a ReflectionKind to its string representation.
43
+ *
44
+ * @param kind - The {@link ReflectionKind} to convert.
45
+ * @returns A string representation of the kind.
46
+ */
47
+ declare function kindToName(kind: ReflectionKind): string;
48
+
49
+ export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue };
@@ -0,0 +1,49 @@
1
+ import { ReflectionProperty, ReflectionParameter, Type, TypeString, TypeNumber, ReflectionKind } from '@powerlines/deepkit/vendor/type';
2
+
3
+ /**
4
+ * Converts any {@link ReflectionProperty} or {@link ReflectionParameter}'s value to string representation.
5
+ *
6
+ * @param property - The {@link ReflectionProperty} or {@link ReflectionParameter} containing the value to stringify.
7
+ * @param value - The value to stringify.
8
+ * @returns A string representation of the value.
9
+ */
10
+ declare function stringifyDefaultValue(property: ReflectionProperty | ReflectionParameter, value?: any): string;
11
+ /**
12
+ * Stringifies a value as a string.
13
+ *
14
+ * @param value - The value to stringify.
15
+ * @returns A string representation of the value.
16
+ */
17
+ declare function stringifyStringValue(value?: any): string;
18
+ /**
19
+ * Converts any {@link Type}'s actual value to string representation.
20
+ *
21
+ * @param type - The {@link Type} of the value to stringify.
22
+ * @param value - The value to stringify.
23
+ * @returns A string representation of the value.
24
+ */
25
+ declare function stringifyValue(type: Type, value: any): string;
26
+ /**
27
+ * Converts a {@link TypeEnum} to its underlying primitive type representation.
28
+ *
29
+ * @param type - The {@link TypeEnum} to evaluate.
30
+ * @returns A string representation of the primitive type.
31
+ */
32
+ declare function getEnumReflectionType(type: Type): TypeString | TypeNumber;
33
+ /**
34
+ * Converts a {@link TypeUnion} to its underlying primitive type representation.
35
+ *
36
+ * @param type - The {@link TypeUnion} to evaluate.
37
+ * @returns A string representation of the primitive type.
38
+ */
39
+ declare function getUnionTypes(type: Type): Type[];
40
+ declare function isStringUnion(type: Type): boolean;
41
+ /**
42
+ * Converts a ReflectionKind to its string representation.
43
+ *
44
+ * @param kind - The {@link ReflectionKind} to convert.
45
+ * @returns A string representation of the kind.
46
+ */
47
+ declare function kindToName(kind: ReflectionKind): string;
48
+
49
+ export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue };
@@ -0,0 +1,2 @@
1
+ export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-LBHO5BRF.js';
2
+ import './chunk-QQ7GKXIS.js';
@@ -26,5 +26,3 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
 
28
28
  export { __commonJS, __name, __toESM };
29
- //# sourceMappingURL=chunk-6PEHRAEP.js.map
30
- //# sourceMappingURL=chunk-6PEHRAEP.js.map