@powerlines/deepkit 0.6.166 → 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,54 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { C as SimpleSerializedType$1, _ as SerializedTypePropertySignature$1, a as SerializedTypeClassType$1, b as SerializedTypeUnion$1, c as SerializedTypeInfer$1, d as SerializedTypeMethod$1, f as SerializedTypeMethodSignature$1, g as SerializedTypeProperty$1, h as SerializedTypeParameter$1, i as SerializedTypeArray$1, l as SerializedTypeIntersection$1, m as SerializedTypeOther, n as IndexAccessOrigin, o as SerializedTypeEnum$1, p as SerializedTypeObjectLiteral$1, r as SerializedType$1, s as SerializedTypeFunction$1, t as DefaultValueReflection, u as SerializedTypeLiteral$1, v as SerializedTypeTuple$1, w as TagsReflection$1, x as SerializedType_Type, y as SerializedTypeTupleMember$1 } from "./reflection-D9R8cdSo.mjs";
|
|
2
|
+
import { ReflectionKind, SerializedType, SerializedTypeArray, SerializedTypeClassType, SerializedTypeEnum, SerializedTypeFunction, SerializedTypeInfer, SerializedTypeIntersection, SerializedTypeLiteral, SerializedTypeMethod, SerializedTypeMethodSignature, SerializedTypeObjectLiteral, SerializedTypeParameter, SerializedTypeProperty, SerializedTypePropertySignature, SerializedTypeReference, SerializedTypeTuple, SerializedTypeTupleMember, SerializedTypeUnion, SerializedTypes, SimpleSerializedType, TagsReflection } from "@powerlines/deepkit/vendor/type";
|
|
3
|
+
import { List } from "@stryke/capnp";
|
|
4
4
|
|
|
5
|
+
//#region src/capnp.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
7
8
|
*
|
|
8
9
|
* @param serializedTypes - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert
|
|
9
10
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
10
11
|
*/
|
|
11
|
-
declare function convertToCapnp(serializedTypes: SerializedTypes, result: List<SerializedType>): List<SerializedType>;
|
|
12
|
+
declare function convertToCapnp(serializedTypes: SerializedTypes, result: List<SerializedType$1>): List<SerializedType$1>;
|
|
12
13
|
/**
|
|
13
14
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
14
15
|
*
|
|
15
16
|
* @param serializedTypes - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema
|
|
16
17
|
* @returns The [Deepkit](https://deepkit.io/) {@link SerializedTypes | serialized types} converted from the Cap'n Proto serialized type
|
|
17
18
|
*/
|
|
18
|
-
declare function convertFromCapnp(serializedTypes: List<SerializedType>): SerializedTypes;
|
|
19
|
+
declare function convertFromCapnp(serializedTypes: List<SerializedType$1>): SerializedTypes;
|
|
19
20
|
/**
|
|
20
21
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
21
22
|
*
|
|
22
23
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
23
24
|
* @param serializedType - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert
|
|
24
25
|
*/
|
|
25
|
-
declare function convertToCapnpTagsReflection(result: TagsReflection, serializedType?: TagsReflection
|
|
26
|
+
declare function convertToCapnpTagsReflection(result: TagsReflection$1, serializedType?: TagsReflection): TagsReflection$1;
|
|
26
27
|
interface WithTagsReflection {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
_hasTags: () => boolean;
|
|
29
|
+
tags?: {
|
|
30
|
+
alias: string[];
|
|
31
|
+
hidden: boolean;
|
|
32
|
+
domain: string;
|
|
33
|
+
title: string;
|
|
34
|
+
ignore: boolean;
|
|
35
|
+
internal: boolean;
|
|
36
|
+
readonly: boolean;
|
|
37
|
+
permission: string[];
|
|
38
|
+
};
|
|
38
39
|
}
|
|
39
40
|
declare function convertFromCapnpTagsReflection(serializedType: WithTagsReflection): {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
alias: string[] | undefined;
|
|
42
|
+
hidden: boolean | undefined;
|
|
43
|
+
domain: string | undefined;
|
|
44
|
+
title: string | undefined;
|
|
45
|
+
ignore: boolean | undefined;
|
|
46
|
+
internal: boolean | undefined;
|
|
47
|
+
readonly: boolean | undefined;
|
|
48
|
+
permission: string[] | undefined;
|
|
48
49
|
} | undefined;
|
|
49
50
|
interface CapnpIndexAccessOriginSerializedType {
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
container: SerializedTypeReference;
|
|
52
|
+
index: SerializedTypeReference;
|
|
52
53
|
}
|
|
53
54
|
/**
|
|
54
55
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
@@ -58,19 +59,19 @@ interface CapnpIndexAccessOriginSerializedType {
|
|
|
58
59
|
*/
|
|
59
60
|
declare function convertToCapnpIndexAccessOrigin(result: IndexAccessOrigin, serializedType?: CapnpIndexAccessOriginSerializedType): IndexAccessOrigin;
|
|
60
61
|
interface WithIndexAccessOrigin {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
62
|
+
_hasIndexAccessOrigin: () => boolean;
|
|
63
|
+
indexAccessOrigin?: {
|
|
64
|
+
container: {
|
|
65
|
+
id: number;
|
|
66
|
+
};
|
|
67
|
+
index: {
|
|
68
|
+
id: number;
|
|
69
69
|
};
|
|
70
|
+
};
|
|
70
71
|
}
|
|
71
72
|
declare function convertFromCapnpIndexAccessOrigin(serializedType: WithIndexAccessOrigin): {
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
container: number;
|
|
74
|
+
index: number;
|
|
74
75
|
} | undefined;
|
|
75
76
|
/**
|
|
76
77
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
@@ -78,58 +79,58 @@ declare function convertFromCapnpIndexAccessOrigin(serializedType: WithIndexAcce
|
|
|
78
79
|
* @param serializedType - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert
|
|
79
80
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
80
81
|
*/
|
|
81
|
-
declare function convertToCapnpBase(serializedType: SerializedType
|
|
82
|
-
declare function convertFromCapnpBase(serializedType: SerializedType_Type): SerializedType
|
|
83
|
-
declare function convertFromCapnpOther(serializedType: SerializedTypeOther): SerializedType
|
|
84
|
-
declare function convertFromCapnpSimple(serializedType: SimpleSerializedType): SimpleSerializedType
|
|
82
|
+
declare function convertToCapnpBase(serializedType: SerializedType, result: SerializedType_Type): SerializedType_Type;
|
|
83
|
+
declare function convertFromCapnpBase(serializedType: SerializedType_Type): SerializedType;
|
|
84
|
+
declare function convertFromCapnpOther(serializedType: SerializedTypeOther): SerializedType;
|
|
85
|
+
declare function convertFromCapnpSimple(serializedType: SimpleSerializedType$1): SimpleSerializedType;
|
|
85
86
|
declare function convertToCapnpOther(serializedType: {
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
kind: ReflectionKind;
|
|
88
|
+
typeName?: string;
|
|
88
89
|
}, result: SerializedTypeOther): SerializedTypeOther;
|
|
89
|
-
declare function convertToCapnpSimple(serializedType: SimpleSerializedType
|
|
90
|
-
declare function convertFromCapnpLiteral(serializedType: SerializedTypeLiteral): SerializedTypeLiteral
|
|
91
|
-
declare function convertToCapnpLiteral(serializedType: SerializedTypeLiteral
|
|
92
|
-
declare function convertFromCapnpMethodSignature(serializedType: SerializedTypeMethodSignature): SerializedTypeMethodSignature
|
|
93
|
-
declare function convertToCapnpMethodSignature(serializedType: SerializedTypeMethodSignature
|
|
94
|
-
declare function convertFromCapnpPropertySignature(serializedType: SerializedTypePropertySignature): SerializedTypePropertySignature
|
|
90
|
+
declare function convertToCapnpSimple(serializedType: SimpleSerializedType, result: SimpleSerializedType$1): SimpleSerializedType$1;
|
|
91
|
+
declare function convertFromCapnpLiteral(serializedType: SerializedTypeLiteral$1): SerializedTypeLiteral;
|
|
92
|
+
declare function convertToCapnpLiteral(serializedType: SerializedTypeLiteral, result: SerializedTypeLiteral$1): SerializedTypeLiteral$1;
|
|
93
|
+
declare function convertFromCapnpMethodSignature(serializedType: SerializedTypeMethodSignature$1): SerializedTypeMethodSignature;
|
|
94
|
+
declare function convertToCapnpMethodSignature(serializedType: SerializedTypeMethodSignature, result: SerializedTypeMethodSignature$1): SerializedTypeMethodSignature$1;
|
|
95
|
+
declare function convertFromCapnpPropertySignature(serializedType: SerializedTypePropertySignature$1): SerializedTypePropertySignature;
|
|
95
96
|
declare function convertToCapnpDefault(defaultValue: any, result: DefaultValueReflection): void;
|
|
96
97
|
declare function convertFromCapnpDefault(serializedType: DefaultValueReflection): any;
|
|
97
|
-
declare function convertToCapnpPropertySignature(serializedType: SerializedTypePropertySignature
|
|
98
|
-
declare function convertToCapnpTupleMember(serializedType: SerializedTypeTupleMember
|
|
99
|
-
declare function convertFromCapnpTupleMember(serializedType: SerializedTypeTupleMember): SerializedTypeTupleMember
|
|
100
|
-
declare function convertToCapnpTuple(serializedType: SerializedTypeTuple
|
|
101
|
-
declare function convertFromCapnpTuple(serializedType: SerializedTypeTuple): SerializedTypeTuple
|
|
102
|
-
declare function convertToCapnpProperty(serializedType: SerializedTypeProperty
|
|
103
|
-
declare function convertFromCapnpProperty(serializedType: SerializedTypeProperty): SerializedTypeProperty
|
|
104
|
-
declare function convertToCapnpEnum(serializedType: SerializedTypeEnum
|
|
105
|
-
declare function convertFromCapnpEnum(serializedType: SerializedTypeEnum): SerializedTypeEnum
|
|
106
|
-
declare function convertToCapnpIntersection(serializedType: SerializedTypeIntersection
|
|
107
|
-
declare function convertFromCapnpIntersection(serializedType: SerializedTypeIntersection): SerializedTypeIntersection
|
|
108
|
-
declare function convertToCapnpArray(serializedType: SerializedTypeArray
|
|
109
|
-
declare function convertFromCapnpArray(serializedType: SerializedTypeArray): SerializedTypeArray
|
|
98
|
+
declare function convertToCapnpPropertySignature(serializedType: SerializedTypePropertySignature, result: SerializedTypePropertySignature$1): SerializedTypePropertySignature$1;
|
|
99
|
+
declare function convertToCapnpTupleMember(serializedType: SerializedTypeTupleMember, result: SerializedTypeTupleMember$1): SerializedTypeTupleMember$1;
|
|
100
|
+
declare function convertFromCapnpTupleMember(serializedType: SerializedTypeTupleMember$1): SerializedTypeTupleMember;
|
|
101
|
+
declare function convertToCapnpTuple(serializedType: SerializedTypeTuple, result: SerializedTypeTuple$1): SerializedTypeTuple$1;
|
|
102
|
+
declare function convertFromCapnpTuple(serializedType: SerializedTypeTuple$1): SerializedTypeTuple;
|
|
103
|
+
declare function convertToCapnpProperty(serializedType: SerializedTypeProperty, result: SerializedTypeProperty$1): SerializedTypeProperty$1;
|
|
104
|
+
declare function convertFromCapnpProperty(serializedType: SerializedTypeProperty$1): SerializedTypeProperty;
|
|
105
|
+
declare function convertToCapnpEnum(serializedType: SerializedTypeEnum, result: SerializedTypeEnum$1): SerializedTypeEnum$1;
|
|
106
|
+
declare function convertFromCapnpEnum(serializedType: SerializedTypeEnum$1): SerializedTypeEnum;
|
|
107
|
+
declare function convertToCapnpIntersection(serializedType: SerializedTypeIntersection, result: SerializedTypeIntersection$1): SerializedTypeIntersection$1;
|
|
108
|
+
declare function convertFromCapnpIntersection(serializedType: SerializedTypeIntersection$1): SerializedTypeIntersection;
|
|
109
|
+
declare function convertToCapnpArray(serializedType: SerializedTypeArray, result: SerializedTypeArray$1): SerializedTypeArray$1;
|
|
110
|
+
declare function convertFromCapnpArray(serializedType: SerializedTypeArray$1): SerializedTypeArray;
|
|
110
111
|
/**
|
|
111
112
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
112
113
|
*
|
|
113
114
|
* @param serializedType - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert
|
|
114
115
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
115
116
|
*/
|
|
116
|
-
declare function convertToCapnpUnion(serializedType: SerializedTypeUnion
|
|
117
|
-
declare function convertFromCapnpUnion(serializedType: SerializedTypeUnion): SerializedTypeUnion
|
|
117
|
+
declare function convertToCapnpUnion(serializedType: SerializedTypeUnion, result: SerializedTypeUnion$1): SerializedTypeUnion$1;
|
|
118
|
+
declare function convertFromCapnpUnion(serializedType: SerializedTypeUnion$1): SerializedTypeUnion;
|
|
118
119
|
/**
|
|
119
120
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
120
121
|
*
|
|
121
122
|
* @param serializedType - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert.
|
|
122
123
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
123
124
|
*/
|
|
124
|
-
declare function convertToCapnpInfer(serializedType: SerializedTypeInfer
|
|
125
|
-
declare function convertFromCapnpInfer(serializedType: SerializedTypeInfer): SerializedTypeInfer
|
|
125
|
+
declare function convertToCapnpInfer(serializedType: SerializedTypeInfer, result: SerializedTypeInfer$1): SerializedTypeInfer$1;
|
|
126
|
+
declare function convertFromCapnpInfer(serializedType: SerializedTypeInfer$1): SerializedTypeInfer;
|
|
126
127
|
/**
|
|
127
128
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
128
129
|
*
|
|
129
130
|
* @param serializedType - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert
|
|
130
131
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
131
132
|
*/
|
|
132
|
-
declare function convertToCapnpFunction(serializedType: SerializedTypeFunction
|
|
133
|
+
declare function convertToCapnpFunction(serializedType: SerializedTypeFunction, result: SerializedTypeFunction$1): SerializedTypeFunction$1;
|
|
133
134
|
/**
|
|
134
135
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
135
136
|
*
|
|
@@ -137,33 +138,33 @@ declare function convertToCapnpFunction(serializedType: SerializedTypeFunction$1
|
|
|
137
138
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
138
139
|
*/
|
|
139
140
|
declare function convertToCapnpMethod(serializedType: SerializedTypeMethod, result: SerializedTypeMethod$1): SerializedTypeMethod$1;
|
|
140
|
-
declare function convertFromCapnpFunction(serializedType: SerializedTypeFunction): SerializedTypeFunction
|
|
141
|
+
declare function convertFromCapnpFunction(serializedType: SerializedTypeFunction$1): SerializedTypeFunction;
|
|
141
142
|
/**
|
|
142
143
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
143
144
|
*
|
|
144
145
|
* @param serializedType - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert
|
|
145
146
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
146
147
|
*/
|
|
147
|
-
declare function convertToCapnpClassType(serializedType: SerializedTypeClassType
|
|
148
|
-
declare function convertFromCapnpClassType(serializedType: SerializedTypeClassType): SerializedTypeClassType
|
|
148
|
+
declare function convertToCapnpClassType(serializedType: SerializedTypeClassType, result: SerializedTypeClassType$1): SerializedTypeClassType$1;
|
|
149
|
+
declare function convertFromCapnpClassType(serializedType: SerializedTypeClassType$1): SerializedTypeClassType;
|
|
149
150
|
/**
|
|
150
151
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
151
152
|
*
|
|
152
153
|
* @param serializedType - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert
|
|
153
154
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
154
155
|
*/
|
|
155
|
-
declare function convertToCapnpObjectLiteral(serializedType: SerializedTypeObjectLiteral
|
|
156
|
-
declare function convertFromCapnpObjectLiteral(serializedType: SerializedTypeObjectLiteral): SerializedTypeObjectLiteral
|
|
156
|
+
declare function convertToCapnpObjectLiteral(serializedType: SerializedTypeObjectLiteral, result: SerializedTypeObjectLiteral$1): SerializedTypeObjectLiteral$1;
|
|
157
|
+
declare function convertFromCapnpObjectLiteral(serializedType: SerializedTypeObjectLiteral$1): SerializedTypeObjectLiteral;
|
|
157
158
|
/**
|
|
158
159
|
* Converts a Deepkit serialized type to a Cap'n Proto serialized type.
|
|
159
160
|
*
|
|
160
161
|
* @param serializedType - The [Deepkit](https://deepkit.io/) {@link SerializedType | serialized type} to convert
|
|
161
162
|
* @param result - The {@link capnp.List | list} object defined in a [Cap'n Proto](https://capnproto.org/) schema to write the converted type to
|
|
162
163
|
*/
|
|
163
|
-
declare function convertToCapnpParameter(serializedType: SerializedTypeParameter
|
|
164
|
-
declare function convertFromCapnpParameter(serializedType: SerializedTypeParameter): SerializedTypeParameter
|
|
165
|
-
|
|
164
|
+
declare function convertToCapnpParameter(serializedType: SerializedTypeParameter, result: SerializedTypeParameter$1): SerializedTypeParameter$1;
|
|
165
|
+
declare function convertFromCapnpParameter(serializedType: SerializedTypeParameter$1): SerializedTypeParameter;
|
|
166
166
|
declare type __ΩWithTagsReflection = any[];
|
|
167
167
|
declare type __ΩWithIndexAccessOrigin = any[];
|
|
168
|
-
|
|
169
|
-
export {
|
|
168
|
+
//#endregion
|
|
169
|
+
export { WithIndexAccessOrigin, WithTagsReflection, __ΩWithIndexAccessOrigin, __ΩWithTagsReflection, convertFromCapnp, convertFromCapnpArray, convertFromCapnpBase, convertFromCapnpClassType, convertFromCapnpDefault, convertFromCapnpEnum, convertFromCapnpFunction, convertFromCapnpIndexAccessOrigin, convertFromCapnpInfer, convertFromCapnpIntersection, convertFromCapnpLiteral, convertFromCapnpMethodSignature, convertFromCapnpObjectLiteral, convertFromCapnpOther, convertFromCapnpParameter, convertFromCapnpProperty, convertFromCapnpPropertySignature, convertFromCapnpSimple, convertFromCapnpTagsReflection, convertFromCapnpTuple, convertFromCapnpTupleMember, convertFromCapnpUnion, convertToCapnp, convertToCapnpArray, convertToCapnpBase, convertToCapnpClassType, convertToCapnpDefault, convertToCapnpEnum, convertToCapnpFunction, convertToCapnpIndexAccessOrigin, convertToCapnpInfer, convertToCapnpIntersection, convertToCapnpLiteral, convertToCapnpMethod, convertToCapnpMethodSignature, convertToCapnpObjectLiteral, convertToCapnpOther, convertToCapnpParameter, convertToCapnpProperty, convertToCapnpPropertySignature, convertToCapnpSimple, convertToCapnpTagsReflection, convertToCapnpTuple, convertToCapnpTupleMember, convertToCapnpUnion };
|
|
170
|
+
//# sourceMappingURL=capnp.d.mts.map
|
package/dist/capnp.mjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { A as convertToCapnpIndexAccessOrigin, B as convertToCapnpPropertySignature, C as convertToCapnp, D as convertToCapnpDefault, E as convertToCapnpClassType, F as convertToCapnpMethodSignature, G as convertToCapnpUnion, H as convertToCapnpTagsReflection, I as convertToCapnpObjectLiteral, L as convertToCapnpOther, M as convertToCapnpIntersection, N as convertToCapnpLiteral, O as convertToCapnpEnum, P as convertToCapnpMethod, R as convertToCapnpParameter, S as convertFromCapnpUnion, T as convertToCapnpBase, U as convertToCapnpTuple, V as convertToCapnpSimple, W as convertToCapnpTupleMember, _ as convertFromCapnpPropertySignature, a as convertFromCapnpDefault, b as convertFromCapnpTuple, c as convertFromCapnpIndexAccessOrigin, d as convertFromCapnpLiteral, f as convertFromCapnpMethodSignature, g as convertFromCapnpProperty, h as convertFromCapnpParameter, i as convertFromCapnpClassType, j as convertToCapnpInfer, k as convertToCapnpFunction, l as convertFromCapnpInfer, m as convertFromCapnpOther, n as convertFromCapnpArray, o as convertFromCapnpEnum, p as convertFromCapnpObjectLiteral, r as convertFromCapnpBase, s as convertFromCapnpFunction, t as convertFromCapnp, u as convertFromCapnpIntersection, v as convertFromCapnpSimple, w as convertToCapnpArray, x as convertFromCapnpTupleMember, y as convertFromCapnpTagsReflection, z as convertToCapnpProperty } from "./capnp-BiGNkOmV.mjs";
|
|
2
|
+
|
|
3
|
+
export { convertFromCapnp, convertFromCapnpArray, convertFromCapnpBase, convertFromCapnpClassType, convertFromCapnpDefault, convertFromCapnpEnum, convertFromCapnpFunction, convertFromCapnpIndexAccessOrigin, convertFromCapnpInfer, convertFromCapnpIntersection, convertFromCapnpLiteral, convertFromCapnpMethodSignature, convertFromCapnpObjectLiteral, convertFromCapnpOther, convertFromCapnpParameter, convertFromCapnpProperty, convertFromCapnpPropertySignature, convertFromCapnpSimple, convertFromCapnpTagsReflection, convertFromCapnpTuple, convertFromCapnpTupleMember, convertFromCapnpUnion, convertToCapnp, convertToCapnpArray, convertToCapnpBase, convertToCapnpClassType, convertToCapnpDefault, convertToCapnpEnum, convertToCapnpFunction, convertToCapnpIndexAccessOrigin, convertToCapnpInfer, convertToCapnpIntersection, convertToCapnpLiteral, convertToCapnpMethod, convertToCapnpMethodSignature, convertToCapnpObjectLiteral, convertToCapnpOther, convertToCapnpParameter, convertToCapnpProperty, convertToCapnpPropertySignature, convertToCapnpSimple, convertToCapnpTagsReflection, convertToCapnpTuple, convertToCapnpTupleMember, convertToCapnpUnion };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
Object.defineProperty(exports, '__toESM', {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return __toESM;
|
|
33
|
+
}
|
|
34
|
+
});
|
package/dist/esbuild-plugin.cjs
CHANGED
|
@@ -1,13 +1,49 @@
|
|
|
1
|
-
'
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('./chunk-C0xms8kb.cjs');
|
|
3
|
+
const require_transpile = require('./transpile.cjs');
|
|
4
|
+
let _stryke_type_checks = require("@stryke/type-checks");
|
|
5
|
+
let _stryke_helpers_omit = require("@stryke/helpers/omit");
|
|
6
|
+
let typescript = require("typescript");
|
|
2
7
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
//#region src/esbuild-plugin.ts
|
|
9
|
+
/**
|
|
10
|
+
* Esbuild plugin for Deepkit Type reflections.
|
|
11
|
+
*
|
|
12
|
+
* @param context - The Powerlines context.
|
|
13
|
+
* @param options - Optional esbuild onLoad options and reflection configuration.
|
|
14
|
+
* @returns An esbuild plugin instance.
|
|
15
|
+
*/
|
|
16
|
+
const esbuildPlugin = (context, options = {}) => {
|
|
17
|
+
return {
|
|
18
|
+
name: "powerlines:deepkit",
|
|
19
|
+
setup(build) {
|
|
20
|
+
build.onLoad({
|
|
21
|
+
filter: /\.(m|c)?tsx?$/,
|
|
22
|
+
...options.onLoad ?? {}
|
|
23
|
+
}, async (args) => {
|
|
24
|
+
const contents = await context.fs.read(args.path);
|
|
25
|
+
if (!contents) return null;
|
|
26
|
+
if (args.pluginData?.isReflected) return {
|
|
27
|
+
contents,
|
|
28
|
+
loader: "ts",
|
|
29
|
+
pluginData: { isReflected: true }
|
|
30
|
+
};
|
|
31
|
+
const result = require_transpile.transpile(context, contents, args.path, (0, _stryke_helpers_omit.omit)(options, ["onLoad"]));
|
|
32
|
+
if (result.diagnostics && result.diagnostics.length > 0) if (result.diagnostics.some((d) => d.category === typescript.DiagnosticCategory.Error)) {
|
|
33
|
+
const errorMessage = `Deepkit Type reflection transpilation errors: ${args.path} \n ${result.diagnostics.filter((d) => d.category === typescript.DiagnosticCategory.Error).map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${(0, _stryke_type_checks.isString)(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`;
|
|
34
|
+
context.error(errorMessage);
|
|
35
|
+
throw new Error(errorMessage);
|
|
36
|
+
} else if (result.diagnostics.some((d) => d.category === typescript.DiagnosticCategory.Warning)) context.warn(`Deepkit Type reflection transpilation warnings: ${args.path} \n ${result.diagnostics.filter((d) => d.category === typescript.DiagnosticCategory.Warning).map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${(0, _stryke_type_checks.isString)(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`);
|
|
37
|
+
else context.debug(`Deepkit Type reflection transpilation diagnostics: ${args.path} \n ${result.diagnostics.map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${(0, _stryke_type_checks.isString)(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`);
|
|
38
|
+
return {
|
|
39
|
+
contents: result.outputText,
|
|
40
|
+
loader: "ts",
|
|
41
|
+
pluginData: { isReflected: true }
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
};
|
|
7
47
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, "esbuildPlugin", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () { return chunk34OFD7LS_cjs.esbuildPlugin; }
|
|
13
|
-
});
|
|
48
|
+
//#endregion
|
|
49
|
+
exports.esbuildPlugin = esbuildPlugin;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { PluginContext } from "@powerlines/core";
|
|
2
|
+
import { Level, Mode } from "@powerlines/deepkit/vendor/type-compiler/config";
|
|
3
|
+
import { OnLoadOptions, Plugin } from "esbuild";
|
|
4
4
|
|
|
5
|
+
//#region src/esbuild-plugin.d.ts
|
|
5
6
|
interface ReflectionConfig {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Allows to exclude type definitions/TS files from being included in the type compilation step. When a global .d.ts is matched, their types won't be embedded (useful to exclude DOM for example)
|
|
9
|
+
*/
|
|
10
|
+
exclude?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Either a boolean indication general reflection mode, or a list of globs to match against.
|
|
13
|
+
*/
|
|
14
|
+
reflection?: string[] | Mode;
|
|
15
|
+
/**
|
|
16
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
17
|
+
*/
|
|
18
|
+
reflectionLevel?: Level;
|
|
18
19
|
}
|
|
19
20
|
interface ESBuildPluginOptions extends Partial<ReflectionConfig> {
|
|
20
|
-
|
|
21
|
+
onLoad?: Partial<OnLoadOptions>;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* Esbuild plugin for Deepkit Type reflections.
|
|
@@ -29,5 +30,6 @@ interface ESBuildPluginOptions extends Partial<ReflectionConfig> {
|
|
|
29
30
|
declare const esbuildPlugin: <TContext extends PluginContext>(context: TContext, options?: ESBuildPluginOptions) => Plugin;
|
|
30
31
|
declare type __ΩReflectionConfig = any[];
|
|
31
32
|
declare type __ΩESBuildPluginOptions = any[];
|
|
32
|
-
|
|
33
|
-
export {
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ESBuildPluginOptions, ReflectionConfig, __ΩESBuildPluginOptions, __ΩReflectionConfig, esbuildPlugin };
|
|
35
|
+
//# sourceMappingURL=esbuild-plugin.d.cts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PluginContext } from "@powerlines/core";
|
|
2
|
+
import { Level, Mode } from "@powerlines/deepkit/vendor/type-compiler/config";
|
|
3
|
+
import { OnLoadOptions, Plugin } from "esbuild";
|
|
4
|
+
|
|
5
|
+
//#region src/esbuild-plugin.d.ts
|
|
6
|
+
interface ReflectionConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Allows to exclude type definitions/TS files from being included in the type compilation step. When a global .d.ts is matched, their types won't be embedded (useful to exclude DOM for example)
|
|
9
|
+
*/
|
|
10
|
+
exclude?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Either a boolean indication general reflection mode, or a list of globs to match against.
|
|
13
|
+
*/
|
|
14
|
+
reflection?: string[] | Mode;
|
|
15
|
+
/**
|
|
16
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
17
|
+
*/
|
|
18
|
+
reflectionLevel?: Level;
|
|
19
|
+
}
|
|
20
|
+
interface ESBuildPluginOptions extends Partial<ReflectionConfig> {
|
|
21
|
+
onLoad?: Partial<OnLoadOptions>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Esbuild plugin for Deepkit Type reflections.
|
|
25
|
+
*
|
|
26
|
+
* @param context - The Powerlines context.
|
|
27
|
+
* @param options - Optional esbuild onLoad options and reflection configuration.
|
|
28
|
+
* @returns An esbuild plugin instance.
|
|
29
|
+
*/
|
|
30
|
+
declare const esbuildPlugin: <TContext extends PluginContext>(context: TContext, options?: ESBuildPluginOptions) => Plugin;
|
|
31
|
+
declare type __ΩReflectionConfig = any[];
|
|
32
|
+
declare type __ΩESBuildPluginOptions = any[];
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ESBuildPluginOptions, ReflectionConfig, __ΩESBuildPluginOptions, __ΩReflectionConfig, esbuildPlugin };
|
|
35
|
+
//# sourceMappingURL=esbuild-plugin.d.mts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { transpile } from "./transpile.mjs";
|
|
2
|
+
import { isString } from "@stryke/type-checks";
|
|
3
|
+
import { omit } from "@stryke/helpers/omit";
|
|
4
|
+
import { DiagnosticCategory } from "typescript";
|
|
5
|
+
|
|
6
|
+
//#region src/esbuild-plugin.ts
|
|
7
|
+
/**
|
|
8
|
+
* Esbuild plugin for Deepkit Type reflections.
|
|
9
|
+
*
|
|
10
|
+
* @param context - The Powerlines context.
|
|
11
|
+
* @param options - Optional esbuild onLoad options and reflection configuration.
|
|
12
|
+
* @returns An esbuild plugin instance.
|
|
13
|
+
*/
|
|
14
|
+
const esbuildPlugin = (context, options = {}) => {
|
|
15
|
+
return {
|
|
16
|
+
name: "powerlines:deepkit",
|
|
17
|
+
setup(build) {
|
|
18
|
+
build.onLoad({
|
|
19
|
+
filter: /\.(m|c)?tsx?$/,
|
|
20
|
+
...options.onLoad ?? {}
|
|
21
|
+
}, async (args) => {
|
|
22
|
+
const contents = await context.fs.read(args.path);
|
|
23
|
+
if (!contents) return null;
|
|
24
|
+
if (args.pluginData?.isReflected) return {
|
|
25
|
+
contents,
|
|
26
|
+
loader: "ts",
|
|
27
|
+
pluginData: { isReflected: true }
|
|
28
|
+
};
|
|
29
|
+
const result = transpile(context, contents, args.path, omit(options, ["onLoad"]));
|
|
30
|
+
if (result.diagnostics && result.diagnostics.length > 0) if (result.diagnostics.some((d) => d.category === DiagnosticCategory.Error)) {
|
|
31
|
+
const errorMessage = `Deepkit Type reflection transpilation errors: ${args.path} \n ${result.diagnostics.filter((d) => d.category === DiagnosticCategory.Error).map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${isString(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`;
|
|
32
|
+
context.error(errorMessage);
|
|
33
|
+
throw new Error(errorMessage);
|
|
34
|
+
} else if (result.diagnostics.some((d) => d.category === DiagnosticCategory.Warning)) context.warn(`Deepkit Type reflection transpilation warnings: ${args.path} \n ${result.diagnostics.filter((d) => d.category === DiagnosticCategory.Warning).map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${isString(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`);
|
|
35
|
+
else context.debug(`Deepkit Type reflection transpilation diagnostics: ${args.path} \n ${result.diagnostics.map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${isString(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`);
|
|
36
|
+
return {
|
|
37
|
+
contents: result.outputText,
|
|
38
|
+
loader: "ts",
|
|
39
|
+
pluginData: { isReflected: true }
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { esbuildPlugin };
|
|
48
|
+
//# sourceMappingURL=esbuild-plugin.mjs.map
|