@trpc-panel/core 1.0.1 → 1.0.3
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/README.md +17 -7
- package/lib/index.js +19059 -372
- package/lib/index.mjs +19026 -369
- package/lib/react-app/bundle.js +759 -81
- package/lib/react-app/index.css +266 -54
- package/lib/scripts/build-react.d.ts +1 -0
- package/lib/src/meta.d.ts +1 -5
- package/lib/src/parse/__tests__/utils/router.d.ts +13 -53
- package/lib/src/parse/input-mappers/zod/parsers/parseZodArrayDef.d.ts +13 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodBigIntDef.d.ts +7 -3
- package/lib/src/parse/input-mappers/zod/parsers/parseZodBooleanFieldDef.d.ts +6 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodBrandedDef.d.ts +13 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodDefaultDef.d.ts +14 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodDiscriminatedUnionDef.d.ts +7 -14
- package/lib/src/parse/input-mappers/zod/parsers/parseZodEffectsDef.d.ts +27 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodEnumDef.d.ts +8 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodLiteralDef.d.ts +8 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodNullDef.d.ts +7 -3
- package/lib/src/parse/input-mappers/zod/parsers/parseZodNullableDef.d.ts +13 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodNumberDef.d.ts +6 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodObjectDef.d.ts +14 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodOptionalDef.d.ts +14 -3
- package/lib/src/parse/input-mappers/zod/parsers/parseZodPromiseDef.d.ts +13 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodStringDef.d.ts +6 -2
- package/lib/src/parse/input-mappers/zod/parsers/parseZodUndefinedDef.d.ts +7 -3
- package/lib/src/parse/input-mappers/zod/parsers/parseZodVoidDef.d.ts +7 -3
- package/lib/src/parse/input-mappers/zod/selector.d.ts +2 -1
- package/lib/src/parse/input-mappers/zod/zod-types.d.ts +5 -3
- package/lib/src/parse/parseNodeTypes.d.ts +2 -2
- package/lib/src/parse/routerType.d.ts +56 -400
- package/package.json +13 -18
|
@@ -1,243 +1,83 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
declare const ZodObjectSchema: z.ZodObject<{},
|
|
2
|
+
declare const ZodObjectSchema: z.ZodObject<{}, z.core.$strip>;
|
|
3
3
|
export declare function isZodObject(obj: unknown): obj is z.infer<typeof ZodObjectSchema>;
|
|
4
4
|
declare const SharedProcedureDefPropertiesSchema: z.ZodObject<{
|
|
5
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
5
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
6
6
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
7
7
|
meta: z.ZodOptional<z.ZodObject<{
|
|
8
8
|
description: z.ZodOptional<z.ZodString>;
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
}, {
|
|
12
|
-
description?: string | undefined;
|
|
13
|
-
}>>;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
inputs?: unknown[] | undefined;
|
|
16
|
-
input?: unknown;
|
|
17
|
-
meta?: {
|
|
18
|
-
description?: string | undefined;
|
|
19
|
-
} | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
inputs?: unknown[] | undefined;
|
|
22
|
-
input?: unknown;
|
|
23
|
-
meta?: {
|
|
24
|
-
description?: string | undefined;
|
|
25
|
-
} | undefined;
|
|
26
|
-
}>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
27
11
|
declare const QueryDefSchema: z.ZodIntersection<z.ZodObject<{
|
|
28
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
12
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
29
13
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
30
14
|
meta: z.ZodOptional<z.ZodObject<{
|
|
31
15
|
description: z.ZodOptional<z.ZodString>;
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
}, {
|
|
35
|
-
description?: string | undefined;
|
|
36
|
-
}>>;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
inputs?: unknown[] | undefined;
|
|
39
|
-
input?: unknown;
|
|
40
|
-
meta?: {
|
|
41
|
-
description?: string | undefined;
|
|
42
|
-
} | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
inputs?: unknown[] | undefined;
|
|
45
|
-
input?: unknown;
|
|
46
|
-
meta?: {
|
|
47
|
-
description?: string | undefined;
|
|
48
|
-
} | undefined;
|
|
49
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
50
18
|
query: z.ZodLiteral<true>;
|
|
51
|
-
},
|
|
52
|
-
query: true;
|
|
53
|
-
}, {
|
|
54
|
-
query: true;
|
|
55
|
-
}>, z.ZodObject<{
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
20
|
type: z.ZodLiteral<"query">;
|
|
57
|
-
},
|
|
58
|
-
type: "query";
|
|
59
|
-
}, {
|
|
60
|
-
type: "query";
|
|
61
|
-
}>]>>;
|
|
21
|
+
}, z.core.$strip>]>>;
|
|
62
22
|
export declare function isQueryDef(obj: unknown): obj is QueryDef;
|
|
63
23
|
type QueryDef = z.infer<typeof QueryDefSchema>;
|
|
64
24
|
declare const MutationDefSchema: z.ZodIntersection<z.ZodObject<{
|
|
65
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
25
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
66
26
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
67
27
|
meta: z.ZodOptional<z.ZodObject<{
|
|
68
28
|
description: z.ZodOptional<z.ZodString>;
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
}, {
|
|
72
|
-
description?: string | undefined;
|
|
73
|
-
}>>;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
inputs?: unknown[] | undefined;
|
|
76
|
-
input?: unknown;
|
|
77
|
-
meta?: {
|
|
78
|
-
description?: string | undefined;
|
|
79
|
-
} | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
inputs?: unknown[] | undefined;
|
|
82
|
-
input?: unknown;
|
|
83
|
-
meta?: {
|
|
84
|
-
description?: string | undefined;
|
|
85
|
-
} | undefined;
|
|
86
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
87
31
|
mutation: z.ZodLiteral<true>;
|
|
88
|
-
},
|
|
89
|
-
mutation: true;
|
|
90
|
-
}, {
|
|
91
|
-
mutation: true;
|
|
92
|
-
}>, z.ZodObject<{
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
33
|
type: z.ZodLiteral<"mutation">;
|
|
94
|
-
},
|
|
95
|
-
type: "mutation";
|
|
96
|
-
}, {
|
|
97
|
-
type: "mutation";
|
|
98
|
-
}>]>>;
|
|
34
|
+
}, z.core.$strip>]>>;
|
|
99
35
|
export declare function isMutationDef(obj: unknown): obj is MutationDef;
|
|
100
36
|
export type MutationDef = z.infer<typeof MutationDefSchema>;
|
|
101
37
|
declare const SubscriptionDefSchema: z.ZodIntersection<z.ZodObject<{
|
|
102
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
38
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
103
39
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
104
40
|
meta: z.ZodOptional<z.ZodObject<{
|
|
105
41
|
description: z.ZodOptional<z.ZodString>;
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
}, {
|
|
109
|
-
description?: string | undefined;
|
|
110
|
-
}>>;
|
|
111
|
-
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
inputs?: unknown[] | undefined;
|
|
113
|
-
input?: unknown;
|
|
114
|
-
meta?: {
|
|
115
|
-
description?: string | undefined;
|
|
116
|
-
} | undefined;
|
|
117
|
-
}, {
|
|
118
|
-
inputs?: unknown[] | undefined;
|
|
119
|
-
input?: unknown;
|
|
120
|
-
meta?: {
|
|
121
|
-
description?: string | undefined;
|
|
122
|
-
} | undefined;
|
|
123
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
124
44
|
subscription: z.ZodLiteral<true>;
|
|
125
|
-
},
|
|
126
|
-
subscription: true;
|
|
127
|
-
}, {
|
|
128
|
-
subscription: true;
|
|
129
|
-
}>, z.ZodObject<{
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
130
46
|
type: z.ZodLiteral<"subscription">;
|
|
131
|
-
},
|
|
132
|
-
type: "subscription";
|
|
133
|
-
}, {
|
|
134
|
-
type: "subscription";
|
|
135
|
-
}>]>>;
|
|
47
|
+
}, z.core.$strip>]>>;
|
|
136
48
|
type SubscriptionDef = z.infer<typeof SubscriptionDefSchema>;
|
|
137
49
|
export declare function isSubscriptionDef(obj: unknown): obj is SubscriptionDef;
|
|
138
50
|
export declare const ProcedureDefSchema: z.ZodUnion<[z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
|
|
139
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
51
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
140
52
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
141
53
|
meta: z.ZodOptional<z.ZodObject<{
|
|
142
54
|
description: z.ZodOptional<z.ZodString>;
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
}, {
|
|
146
|
-
description?: string | undefined;
|
|
147
|
-
}>>;
|
|
148
|
-
}, "strip", z.ZodTypeAny, {
|
|
149
|
-
inputs?: unknown[] | undefined;
|
|
150
|
-
input?: unknown;
|
|
151
|
-
meta?: {
|
|
152
|
-
description?: string | undefined;
|
|
153
|
-
} | undefined;
|
|
154
|
-
}, {
|
|
155
|
-
inputs?: unknown[] | undefined;
|
|
156
|
-
input?: unknown;
|
|
157
|
-
meta?: {
|
|
158
|
-
description?: string | undefined;
|
|
159
|
-
} | undefined;
|
|
160
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
161
57
|
query: z.ZodLiteral<true>;
|
|
162
|
-
},
|
|
163
|
-
query: true;
|
|
164
|
-
}, {
|
|
165
|
-
query: true;
|
|
166
|
-
}>, z.ZodObject<{
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
59
|
type: z.ZodLiteral<"query">;
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
}, {
|
|
171
|
-
type: "query";
|
|
172
|
-
}>]>>, z.ZodIntersection<z.ZodObject<{
|
|
173
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
60
|
+
}, z.core.$strip>]>>, z.ZodIntersection<z.ZodObject<{
|
|
61
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
174
62
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
175
63
|
meta: z.ZodOptional<z.ZodObject<{
|
|
176
64
|
description: z.ZodOptional<z.ZodString>;
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
}, {
|
|
180
|
-
description?: string | undefined;
|
|
181
|
-
}>>;
|
|
182
|
-
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
inputs?: unknown[] | undefined;
|
|
184
|
-
input?: unknown;
|
|
185
|
-
meta?: {
|
|
186
|
-
description?: string | undefined;
|
|
187
|
-
} | undefined;
|
|
188
|
-
}, {
|
|
189
|
-
inputs?: unknown[] | undefined;
|
|
190
|
-
input?: unknown;
|
|
191
|
-
meta?: {
|
|
192
|
-
description?: string | undefined;
|
|
193
|
-
} | undefined;
|
|
194
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
195
67
|
mutation: z.ZodLiteral<true>;
|
|
196
|
-
},
|
|
197
|
-
mutation: true;
|
|
198
|
-
}, {
|
|
199
|
-
mutation: true;
|
|
200
|
-
}>, z.ZodObject<{
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
201
69
|
type: z.ZodLiteral<"mutation">;
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
}, {
|
|
205
|
-
type: "mutation";
|
|
206
|
-
}>]>>]>, z.ZodIntersection<z.ZodObject<{
|
|
207
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
70
|
+
}, z.core.$strip>]>>]>, z.ZodIntersection<z.ZodObject<{
|
|
71
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
208
72
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
209
73
|
meta: z.ZodOptional<z.ZodObject<{
|
|
210
74
|
description: z.ZodOptional<z.ZodString>;
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
}, {
|
|
214
|
-
description?: string | undefined;
|
|
215
|
-
}>>;
|
|
216
|
-
}, "strip", z.ZodTypeAny, {
|
|
217
|
-
inputs?: unknown[] | undefined;
|
|
218
|
-
input?: unknown;
|
|
219
|
-
meta?: {
|
|
220
|
-
description?: string | undefined;
|
|
221
|
-
} | undefined;
|
|
222
|
-
}, {
|
|
223
|
-
inputs?: unknown[] | undefined;
|
|
224
|
-
input?: unknown;
|
|
225
|
-
meta?: {
|
|
226
|
-
description?: string | undefined;
|
|
227
|
-
} | undefined;
|
|
228
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
229
77
|
subscription: z.ZodLiteral<true>;
|
|
230
|
-
},
|
|
231
|
-
subscription: true;
|
|
232
|
-
}, {
|
|
233
|
-
subscription: true;
|
|
234
|
-
}>, z.ZodObject<{
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
79
|
type: z.ZodLiteral<"subscription">;
|
|
236
|
-
},
|
|
237
|
-
type: "subscription";
|
|
238
|
-
}, {
|
|
239
|
-
type: "subscription";
|
|
240
|
-
}>]>>]>;
|
|
80
|
+
}, z.core.$strip>]>>]>;
|
|
241
81
|
export type ProcedureDefSharedProperties = z.infer<typeof SharedProcedureDefPropertiesSchema>;
|
|
242
82
|
export type RouterDef = {
|
|
243
83
|
router: true;
|
|
@@ -251,236 +91,52 @@ export type Router = {
|
|
|
251
91
|
export declare function isRouter(obj: unknown): obj is Router;
|
|
252
92
|
declare const ProcedureSchema: z.ZodObject<{
|
|
253
93
|
_def: z.ZodUnion<[z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
|
|
254
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
94
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
255
95
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
256
96
|
meta: z.ZodOptional<z.ZodObject<{
|
|
257
97
|
description: z.ZodOptional<z.ZodString>;
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
}, {
|
|
261
|
-
description?: string | undefined;
|
|
262
|
-
}>>;
|
|
263
|
-
}, "strip", z.ZodTypeAny, {
|
|
264
|
-
inputs?: unknown[] | undefined;
|
|
265
|
-
input?: unknown;
|
|
266
|
-
meta?: {
|
|
267
|
-
description?: string | undefined;
|
|
268
|
-
} | undefined;
|
|
269
|
-
}, {
|
|
270
|
-
inputs?: unknown[] | undefined;
|
|
271
|
-
input?: unknown;
|
|
272
|
-
meta?: {
|
|
273
|
-
description?: string | undefined;
|
|
274
|
-
} | undefined;
|
|
275
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
276
100
|
query: z.ZodLiteral<true>;
|
|
277
|
-
},
|
|
278
|
-
query: true;
|
|
279
|
-
}, {
|
|
280
|
-
query: true;
|
|
281
|
-
}>, z.ZodObject<{
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
282
102
|
type: z.ZodLiteral<"query">;
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
}, {
|
|
286
|
-
type: "query";
|
|
287
|
-
}>]>>, z.ZodIntersection<z.ZodObject<{
|
|
288
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
103
|
+
}, z.core.$strip>]>>, z.ZodIntersection<z.ZodObject<{
|
|
104
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
289
105
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
290
106
|
meta: z.ZodOptional<z.ZodObject<{
|
|
291
107
|
description: z.ZodOptional<z.ZodString>;
|
|
292
|
-
},
|
|
293
|
-
|
|
294
|
-
}, {
|
|
295
|
-
description?: string | undefined;
|
|
296
|
-
}>>;
|
|
297
|
-
}, "strip", z.ZodTypeAny, {
|
|
298
|
-
inputs?: unknown[] | undefined;
|
|
299
|
-
input?: unknown;
|
|
300
|
-
meta?: {
|
|
301
|
-
description?: string | undefined;
|
|
302
|
-
} | undefined;
|
|
303
|
-
}, {
|
|
304
|
-
inputs?: unknown[] | undefined;
|
|
305
|
-
input?: unknown;
|
|
306
|
-
meta?: {
|
|
307
|
-
description?: string | undefined;
|
|
308
|
-
} | undefined;
|
|
309
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
310
110
|
mutation: z.ZodLiteral<true>;
|
|
311
|
-
},
|
|
312
|
-
mutation: true;
|
|
313
|
-
}, {
|
|
314
|
-
mutation: true;
|
|
315
|
-
}>, z.ZodObject<{
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
316
112
|
type: z.ZodLiteral<"mutation">;
|
|
317
|
-
},
|
|
318
|
-
|
|
319
|
-
}, {
|
|
320
|
-
type: "mutation";
|
|
321
|
-
}>]>>]>, z.ZodIntersection<z.ZodObject<{
|
|
322
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
113
|
+
}, z.core.$strip>]>>]>, z.ZodIntersection<z.ZodObject<{
|
|
114
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
323
115
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
324
116
|
meta: z.ZodOptional<z.ZodObject<{
|
|
325
117
|
description: z.ZodOptional<z.ZodString>;
|
|
326
|
-
},
|
|
327
|
-
|
|
328
|
-
}, {
|
|
329
|
-
description?: string | undefined;
|
|
330
|
-
}>>;
|
|
331
|
-
}, "strip", z.ZodTypeAny, {
|
|
332
|
-
inputs?: unknown[] | undefined;
|
|
333
|
-
input?: unknown;
|
|
334
|
-
meta?: {
|
|
335
|
-
description?: string | undefined;
|
|
336
|
-
} | undefined;
|
|
337
|
-
}, {
|
|
338
|
-
inputs?: unknown[] | undefined;
|
|
339
|
-
input?: unknown;
|
|
340
|
-
meta?: {
|
|
341
|
-
description?: string | undefined;
|
|
342
|
-
} | undefined;
|
|
343
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
344
120
|
subscription: z.ZodLiteral<true>;
|
|
345
|
-
},
|
|
346
|
-
subscription: true;
|
|
347
|
-
}, {
|
|
348
|
-
subscription: true;
|
|
349
|
-
}>, z.ZodObject<{
|
|
121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
350
122
|
type: z.ZodLiteral<"subscription">;
|
|
351
|
-
},
|
|
352
|
-
|
|
353
|
-
}, {
|
|
354
|
-
type: "subscription";
|
|
355
|
-
}>]>>]>;
|
|
356
|
-
}, "strip", z.ZodTypeAny, {
|
|
357
|
-
_def: ({
|
|
358
|
-
inputs?: unknown[] | undefined;
|
|
359
|
-
input?: unknown;
|
|
360
|
-
meta?: {
|
|
361
|
-
description?: string | undefined;
|
|
362
|
-
} | undefined;
|
|
363
|
-
} & ({
|
|
364
|
-
query: true;
|
|
365
|
-
} | {
|
|
366
|
-
type: "query";
|
|
367
|
-
})) | ({
|
|
368
|
-
inputs?: unknown[] | undefined;
|
|
369
|
-
input?: unknown;
|
|
370
|
-
meta?: {
|
|
371
|
-
description?: string | undefined;
|
|
372
|
-
} | undefined;
|
|
373
|
-
} & ({
|
|
374
|
-
mutation: true;
|
|
375
|
-
} | {
|
|
376
|
-
type: "mutation";
|
|
377
|
-
})) | ({
|
|
378
|
-
inputs?: unknown[] | undefined;
|
|
379
|
-
input?: unknown;
|
|
380
|
-
meta?: {
|
|
381
|
-
description?: string | undefined;
|
|
382
|
-
} | undefined;
|
|
383
|
-
} & ({
|
|
384
|
-
subscription: true;
|
|
385
|
-
} | {
|
|
386
|
-
type: "subscription";
|
|
387
|
-
}));
|
|
388
|
-
}, {
|
|
389
|
-
_def: ({
|
|
390
|
-
inputs?: unknown[] | undefined;
|
|
391
|
-
input?: unknown;
|
|
392
|
-
meta?: {
|
|
393
|
-
description?: string | undefined;
|
|
394
|
-
} | undefined;
|
|
395
|
-
} & ({
|
|
396
|
-
query: true;
|
|
397
|
-
} | {
|
|
398
|
-
type: "query";
|
|
399
|
-
})) | ({
|
|
400
|
-
inputs?: unknown[] | undefined;
|
|
401
|
-
input?: unknown;
|
|
402
|
-
meta?: {
|
|
403
|
-
description?: string | undefined;
|
|
404
|
-
} | undefined;
|
|
405
|
-
} & ({
|
|
406
|
-
mutation: true;
|
|
407
|
-
} | {
|
|
408
|
-
type: "mutation";
|
|
409
|
-
})) | ({
|
|
410
|
-
inputs?: unknown[] | undefined;
|
|
411
|
-
input?: unknown;
|
|
412
|
-
meta?: {
|
|
413
|
-
description?: string | undefined;
|
|
414
|
-
} | undefined;
|
|
415
|
-
} & ({
|
|
416
|
-
subscription: true;
|
|
417
|
-
} | {
|
|
418
|
-
type: "subscription";
|
|
419
|
-
}));
|
|
420
|
-
}>;
|
|
123
|
+
}, z.core.$strip>]>>]>;
|
|
124
|
+
}, z.core.$strip>;
|
|
421
125
|
export type Procedure = z.infer<typeof ProcedureSchema>;
|
|
422
126
|
export declare function isProcedure(obj: unknown | Function): obj is Procedure;
|
|
423
127
|
declare const QuerySchema: z.ZodObject<{
|
|
424
128
|
_def: z.ZodIntersection<z.ZodObject<{
|
|
425
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
129
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
426
130
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
427
131
|
meta: z.ZodOptional<z.ZodObject<{
|
|
428
132
|
description: z.ZodOptional<z.ZodString>;
|
|
429
|
-
},
|
|
430
|
-
|
|
431
|
-
}, {
|
|
432
|
-
description?: string | undefined;
|
|
433
|
-
}>>;
|
|
434
|
-
}, "strip", z.ZodTypeAny, {
|
|
435
|
-
inputs?: unknown[] | undefined;
|
|
436
|
-
input?: unknown;
|
|
437
|
-
meta?: {
|
|
438
|
-
description?: string | undefined;
|
|
439
|
-
} | undefined;
|
|
440
|
-
}, {
|
|
441
|
-
inputs?: unknown[] | undefined;
|
|
442
|
-
input?: unknown;
|
|
443
|
-
meta?: {
|
|
444
|
-
description?: string | undefined;
|
|
445
|
-
} | undefined;
|
|
446
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
447
135
|
query: z.ZodLiteral<true>;
|
|
448
|
-
},
|
|
449
|
-
query: true;
|
|
450
|
-
}, {
|
|
451
|
-
query: true;
|
|
452
|
-
}>, z.ZodObject<{
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
453
137
|
type: z.ZodLiteral<"query">;
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
}, {
|
|
457
|
-
type: "query";
|
|
458
|
-
}>]>>;
|
|
459
|
-
}, "strip", z.ZodTypeAny, {
|
|
460
|
-
_def: {
|
|
461
|
-
inputs?: unknown[] | undefined;
|
|
462
|
-
input?: unknown;
|
|
463
|
-
meta?: {
|
|
464
|
-
description?: string | undefined;
|
|
465
|
-
} | undefined;
|
|
466
|
-
} & ({
|
|
467
|
-
query: true;
|
|
468
|
-
} | {
|
|
469
|
-
type: "query";
|
|
470
|
-
});
|
|
471
|
-
}, {
|
|
472
|
-
_def: {
|
|
473
|
-
inputs?: unknown[] | undefined;
|
|
474
|
-
input?: unknown;
|
|
475
|
-
meta?: {
|
|
476
|
-
description?: string | undefined;
|
|
477
|
-
} | undefined;
|
|
478
|
-
} & ({
|
|
479
|
-
query: true;
|
|
480
|
-
} | {
|
|
481
|
-
type: "query";
|
|
482
|
-
});
|
|
483
|
-
}>;
|
|
138
|
+
}, z.core.$strip>]>>;
|
|
139
|
+
}, z.core.$strip>;
|
|
484
140
|
export type Query = z.infer<typeof QuerySchema>;
|
|
485
141
|
export type RouterOrProcedure = Router | Procedure;
|
|
486
142
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc-panel/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "UI for testing tRPC backends",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -8,8 +8,15 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"test": "jest",
|
|
10
10
|
"test:watch": "jest --watchAll",
|
|
11
|
-
"build": "bun
|
|
12
|
-
"
|
|
11
|
+
"build:lib:cjs": "bun build ./src/index.ts --outfile ./lib/index.js --format cjs --target node",
|
|
12
|
+
"build:lib:esm": "bun build ./src/index.ts --outfile ./lib/index.mjs --format esm --target node",
|
|
13
|
+
"build:react:js": "bun run scripts/build-react.ts",
|
|
14
|
+
"build:react:css": "bun x tailwindcss -i ./src/react-app/index.css -o ./lib/react-app/index.css",
|
|
15
|
+
"build:react": "bun run build:react:js && bun run build:react:css",
|
|
16
|
+
"build:types": "bun x tsc --emitDeclarationOnly --project tsconfig.buildPanel.json",
|
|
17
|
+
"build:assets": "cp src/react-app/index.html lib/react-app/",
|
|
18
|
+
"build": "bun run build:lib:cjs && bun run build:lib:esm && bun run build:react && bun run build:types && bun run build:assets",
|
|
19
|
+
"dev": "bun build --watch ./src/index.ts --outfile ./lib/index.js --format cjs --target node"
|
|
13
20
|
},
|
|
14
21
|
"author": "",
|
|
15
22
|
"license": "ISC",
|
|
@@ -32,7 +39,7 @@
|
|
|
32
39
|
},
|
|
33
40
|
"peerDependencies": {
|
|
34
41
|
"@trpc/server": "^11.7.2",
|
|
35
|
-
"zod": "^
|
|
42
|
+
"zod": "^4.2.1"
|
|
36
43
|
},
|
|
37
44
|
"devDependencies": {
|
|
38
45
|
"@babel/core": "^7.20.2",
|
|
@@ -42,13 +49,6 @@
|
|
|
42
49
|
"@hookform/resolvers": "^2.9.10",
|
|
43
50
|
"@mui/icons-material": "^5.10.16",
|
|
44
51
|
"@mui/material": "^5.10.16",
|
|
45
|
-
"@rollup/plugin-babel": "^6.0.3",
|
|
46
|
-
"@rollup/plugin-commonjs": "^23.0.2",
|
|
47
|
-
"@rollup/plugin-json": "^5.0.1",
|
|
48
|
-
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
49
|
-
"@rollup/plugin-replace": "^5.0.1",
|
|
50
|
-
"@rollup/plugin-terser": "^0.2.0",
|
|
51
|
-
"@rollup/plugin-typescript": "^10.0.1",
|
|
52
52
|
"@tanstack/react-query": "^5.0.0",
|
|
53
53
|
"@testing-library/jest-dom": "^5.16.5",
|
|
54
54
|
"@testing-library/react": "^13.4.0",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"@trpc/client": "11.7.2",
|
|
57
57
|
"@trpc/react-query": "11.7.2",
|
|
58
58
|
"@trpc/server": "11.7.2",
|
|
59
|
+
"@types/bun": "^1.3.3",
|
|
59
60
|
"@types/jest": "^29.2.4",
|
|
60
61
|
"@types/json-bigint": "^1.0.1",
|
|
61
62
|
"@types/node": "^20.10.0",
|
|
@@ -76,19 +77,13 @@
|
|
|
76
77
|
"react-hook-form": "^7.39.5",
|
|
77
78
|
"react-hot-toast": "^2.4.0",
|
|
78
79
|
"react-hotkeys-hook": "^4.0.6",
|
|
79
|
-
"rollup": "^3.7.4",
|
|
80
|
-
"rollup-plugin-copy": "^3.4.0",
|
|
81
|
-
"rollup-plugin-livereload": "^2.0.5",
|
|
82
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
83
|
-
"rollup-plugin-serve": "^2.0.1",
|
|
84
|
-
"rollup-plugin-visualizer": "^5.8.3",
|
|
85
80
|
"superjson": "^1.12.0",
|
|
86
81
|
"tailwindcss": "^3.2.4",
|
|
87
82
|
"ts-jest": "^29.0.3",
|
|
88
83
|
"tslib": "^2.4.1",
|
|
89
84
|
"typescript": "^5.3.3",
|
|
90
85
|
"url": "^0.11.0",
|
|
91
|
-
"zod": "^
|
|
86
|
+
"zod": "^4.2.1",
|
|
92
87
|
"zustand": "^4.1.5"
|
|
93
88
|
},
|
|
94
89
|
"dependencies": {
|