@orpc/client 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 +97 -0
- package/dist/adapters/fetch/index.d.mts +33 -0
- package/dist/adapters/fetch/index.d.ts +33 -0
- package/dist/adapters/fetch/index.mjs +29 -0
- package/dist/adapters/standard/index.d.mts +10 -0
- package/dist/adapters/standard/index.d.ts +10 -0
- package/dist/adapters/standard/index.mjs +4 -0
- package/dist/index.d.mts +169 -0
- package/dist/index.d.ts +169 -0
- package/dist/index.mjs +65 -0
- package/dist/plugins/index.d.mts +162 -0
- package/dist/plugins/index.d.ts +162 -0
- package/dist/plugins/index.mjs +291 -0
- package/dist/shared/client.8TjrVhkC.d.ts +91 -0
- package/dist/shared/client.BjJBZryq.d.mts +91 -0
- package/dist/shared/client.C9U9n1f3.d.ts +46 -0
- package/dist/shared/client.CRWEpqLB.mjs +175 -0
- package/dist/shared/client.CipPQkhk.d.mts +29 -0
- package/dist/shared/client.CipPQkhk.d.ts +29 -0
- package/dist/shared/client.DpICn1BD.mjs +355 -0
- package/dist/shared/client.FXep-a3a.d.mts +46 -0
- package/package.json +29 -28
- package/dist/index.js +0 -83
- package/dist/index.js.map +0 -1
- package/dist/src/index.d.ts +0 -7
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/procedure.d.ts +0 -27
- package/dist/src/procedure.d.ts.map +0 -1
- package/dist/src/router.d.ts +0 -34
- package/dist/src/router.d.ts.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/index.ts +0 -9
- package/src/procedure.test.ts +0 -245
- package/src/procedure.ts +0 -108
- package/src/router.test.ts +0 -148
- package/src/router.ts +0 -96
@@ -0,0 +1,355 @@
|
|
1
|
+
import { toArray, intercept, isObject, value, isAsyncIteratorObject, stringifyJSON } from '@orpc/shared';
|
2
|
+
import { mergeStandardHeaders, ErrorEvent } from '@orpc/standard-server';
|
3
|
+
import { C as COMMON_ORPC_ERROR_DEFS, b as isORPCErrorStatus, c as isORPCErrorJson, d as createORPCErrorFromJson, O as ORPCError, m as mapEventIterator, t as toORPCError } from './client.CRWEpqLB.mjs';
|
4
|
+
|
5
|
+
class CompositeStandardLinkPlugin {
|
6
|
+
plugins;
|
7
|
+
constructor(plugins = []) {
|
8
|
+
this.plugins = [...plugins].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
9
|
+
}
|
10
|
+
init(options) {
|
11
|
+
for (const plugin of this.plugins) {
|
12
|
+
plugin.init?.(options);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
class StandardLink {
|
18
|
+
constructor(codec, sender, options = {}) {
|
19
|
+
this.codec = codec;
|
20
|
+
this.sender = sender;
|
21
|
+
const plugin = new CompositeStandardLinkPlugin(options.plugins);
|
22
|
+
plugin.init(options);
|
23
|
+
this.interceptors = toArray(options.interceptors);
|
24
|
+
this.clientInterceptors = toArray(options.clientInterceptors);
|
25
|
+
}
|
26
|
+
interceptors;
|
27
|
+
clientInterceptors;
|
28
|
+
call(path, input, options) {
|
29
|
+
return intercept(this.interceptors, { ...options, path, input }, async ({ path: path2, input: input2, ...options2 }) => {
|
30
|
+
const output = await this.#call(path2, input2, options2);
|
31
|
+
return output;
|
32
|
+
});
|
33
|
+
}
|
34
|
+
async #call(path, input, options) {
|
35
|
+
const request = await this.codec.encode(path, input, options);
|
36
|
+
const response = await intercept(
|
37
|
+
this.clientInterceptors,
|
38
|
+
{ ...options, input, path, request },
|
39
|
+
({ input: input2, path: path2, request: request2, ...options2 }) => this.sender.call(request2, options2, path2, input2)
|
40
|
+
);
|
41
|
+
const output = await this.codec.decode(response, options, path, input);
|
42
|
+
return output;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
const STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES = {
|
47
|
+
BIGINT: 0,
|
48
|
+
DATE: 1,
|
49
|
+
NAN: 2,
|
50
|
+
UNDEFINED: 3,
|
51
|
+
URL: 4,
|
52
|
+
REGEXP: 5,
|
53
|
+
SET: 6,
|
54
|
+
MAP: 7
|
55
|
+
};
|
56
|
+
class StandardRPCJsonSerializer {
|
57
|
+
customSerializers;
|
58
|
+
constructor(options = {}) {
|
59
|
+
this.customSerializers = options.customJsonSerializers ?? [];
|
60
|
+
if (this.customSerializers.length !== new Set(this.customSerializers.map((custom) => custom.type)).size) {
|
61
|
+
throw new Error("Custom serializer type must be unique.");
|
62
|
+
}
|
63
|
+
}
|
64
|
+
serialize(data, segments = [], meta = [], maps = [], blobs = []) {
|
65
|
+
for (const custom of this.customSerializers) {
|
66
|
+
if (custom.condition(data)) {
|
67
|
+
const result = this.serialize(custom.serialize(data), segments, meta, maps, blobs);
|
68
|
+
meta.push([custom.type, ...segments]);
|
69
|
+
return result;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
if (data instanceof Blob) {
|
73
|
+
maps.push(segments);
|
74
|
+
blobs.push(data);
|
75
|
+
return [data, meta, maps, blobs];
|
76
|
+
}
|
77
|
+
if (typeof data === "bigint") {
|
78
|
+
meta.push([STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.BIGINT, ...segments]);
|
79
|
+
return [data.toString(), meta, maps, blobs];
|
80
|
+
}
|
81
|
+
if (data instanceof Date) {
|
82
|
+
meta.push([STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.DATE, ...segments]);
|
83
|
+
if (Number.isNaN(data.getTime())) {
|
84
|
+
return [null, meta, maps, blobs];
|
85
|
+
}
|
86
|
+
return [data.toISOString(), meta, maps, blobs];
|
87
|
+
}
|
88
|
+
if (Number.isNaN(data)) {
|
89
|
+
meta.push([STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.NAN, ...segments]);
|
90
|
+
return [null, meta, maps, blobs];
|
91
|
+
}
|
92
|
+
if (data instanceof URL) {
|
93
|
+
meta.push([STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.URL, ...segments]);
|
94
|
+
return [data.toString(), meta, maps, blobs];
|
95
|
+
}
|
96
|
+
if (data instanceof RegExp) {
|
97
|
+
meta.push([STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.REGEXP, ...segments]);
|
98
|
+
return [data.toString(), meta, maps, blobs];
|
99
|
+
}
|
100
|
+
if (data instanceof Set) {
|
101
|
+
const result = this.serialize(Array.from(data), segments, meta, maps, blobs);
|
102
|
+
meta.push([STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.SET, ...segments]);
|
103
|
+
return result;
|
104
|
+
}
|
105
|
+
if (data instanceof Map) {
|
106
|
+
const result = this.serialize(Array.from(data.entries()), segments, meta, maps, blobs);
|
107
|
+
meta.push([STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.MAP, ...segments]);
|
108
|
+
return result;
|
109
|
+
}
|
110
|
+
if (Array.isArray(data)) {
|
111
|
+
const json = data.map((v, i) => {
|
112
|
+
if (v === void 0) {
|
113
|
+
meta.push([STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.UNDEFINED, ...segments, i]);
|
114
|
+
return v;
|
115
|
+
}
|
116
|
+
return this.serialize(v, [...segments, i], meta, maps, blobs)[0];
|
117
|
+
});
|
118
|
+
return [json, meta, maps, blobs];
|
119
|
+
}
|
120
|
+
if (isObject(data)) {
|
121
|
+
const json = {};
|
122
|
+
for (const k in data) {
|
123
|
+
if (k === "toJSON" && typeof data[k] === "function") {
|
124
|
+
continue;
|
125
|
+
}
|
126
|
+
json[k] = this.serialize(data[k], [...segments, k], meta, maps, blobs)[0];
|
127
|
+
}
|
128
|
+
return [json, meta, maps, blobs];
|
129
|
+
}
|
130
|
+
return [data, meta, maps, blobs];
|
131
|
+
}
|
132
|
+
deserialize(json, meta, maps, getBlob) {
|
133
|
+
const ref = { data: json };
|
134
|
+
if (maps && getBlob) {
|
135
|
+
maps.forEach((segments, i) => {
|
136
|
+
let currentRef = ref;
|
137
|
+
let preSegment = "data";
|
138
|
+
segments.forEach((segment) => {
|
139
|
+
currentRef = currentRef[preSegment];
|
140
|
+
preSegment = segment;
|
141
|
+
});
|
142
|
+
currentRef[preSegment] = getBlob(i);
|
143
|
+
});
|
144
|
+
}
|
145
|
+
for (const item of meta) {
|
146
|
+
const type = item[0];
|
147
|
+
let currentRef = ref;
|
148
|
+
let preSegment = "data";
|
149
|
+
for (let i = 1; i < item.length; i++) {
|
150
|
+
currentRef = currentRef[preSegment];
|
151
|
+
preSegment = item[i];
|
152
|
+
}
|
153
|
+
for (const custom of this.customSerializers) {
|
154
|
+
if (custom.type === type) {
|
155
|
+
currentRef[preSegment] = custom.deserialize(currentRef[preSegment]);
|
156
|
+
break;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
switch (type) {
|
160
|
+
case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.BIGINT:
|
161
|
+
currentRef[preSegment] = BigInt(currentRef[preSegment]);
|
162
|
+
break;
|
163
|
+
case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.DATE:
|
164
|
+
currentRef[preSegment] = new Date(currentRef[preSegment] ?? "Invalid Date");
|
165
|
+
break;
|
166
|
+
case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.NAN:
|
167
|
+
currentRef[preSegment] = Number.NaN;
|
168
|
+
break;
|
169
|
+
case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.UNDEFINED:
|
170
|
+
currentRef[preSegment] = void 0;
|
171
|
+
break;
|
172
|
+
case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.URL:
|
173
|
+
currentRef[preSegment] = new URL(currentRef[preSegment]);
|
174
|
+
break;
|
175
|
+
case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.REGEXP: {
|
176
|
+
const [, pattern, flags] = currentRef[preSegment].match(/^\/(.*)\/([a-z]*)$/);
|
177
|
+
currentRef[preSegment] = new RegExp(pattern, flags);
|
178
|
+
break;
|
179
|
+
}
|
180
|
+
case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.SET:
|
181
|
+
currentRef[preSegment] = new Set(currentRef[preSegment]);
|
182
|
+
break;
|
183
|
+
case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.MAP:
|
184
|
+
currentRef[preSegment] = new Map(currentRef[preSegment]);
|
185
|
+
break;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
return ref.data;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
function toHttpPath(path) {
|
193
|
+
return `/${path.map(encodeURIComponent).join("/")}`;
|
194
|
+
}
|
195
|
+
function getMalformedResponseErrorCode(status) {
|
196
|
+
return Object.entries(COMMON_ORPC_ERROR_DEFS).find(([, def]) => def.status === status)?.[0] ?? "MALFORMED_ORPC_ERROR_RESPONSE";
|
197
|
+
}
|
198
|
+
|
199
|
+
class StandardRPCLinkCodec {
|
200
|
+
constructor(serializer, options) {
|
201
|
+
this.serializer = serializer;
|
202
|
+
this.baseUrl = options.url;
|
203
|
+
this.maxUrlLength = options.maxUrlLength ?? 2083;
|
204
|
+
this.fallbackMethod = options.fallbackMethod ?? "POST";
|
205
|
+
this.expectedMethod = options.method ?? this.fallbackMethod;
|
206
|
+
this.headers = options.headers ?? {};
|
207
|
+
}
|
208
|
+
baseUrl;
|
209
|
+
maxUrlLength;
|
210
|
+
fallbackMethod;
|
211
|
+
expectedMethod;
|
212
|
+
headers;
|
213
|
+
async encode(path, input, options) {
|
214
|
+
const expectedMethod = await value(this.expectedMethod, options, path, input);
|
215
|
+
let headers = await value(this.headers, options, path, input);
|
216
|
+
const baseUrl = await value(this.baseUrl, options, path, input);
|
217
|
+
const url = new URL(baseUrl);
|
218
|
+
url.pathname = `${url.pathname.replace(/\/$/, "")}${toHttpPath(path)}`;
|
219
|
+
if (options.lastEventId !== void 0) {
|
220
|
+
headers = mergeStandardHeaders(headers, { "last-event-id": options.lastEventId });
|
221
|
+
}
|
222
|
+
const serialized = this.serializer.serialize(input);
|
223
|
+
if (expectedMethod === "GET" && !(serialized instanceof FormData) && !isAsyncIteratorObject(serialized)) {
|
224
|
+
const maxUrlLength = await value(this.maxUrlLength, options, path, input);
|
225
|
+
const getUrl = new URL(url);
|
226
|
+
getUrl.searchParams.append("data", stringifyJSON(serialized));
|
227
|
+
if (getUrl.toString().length <= maxUrlLength) {
|
228
|
+
return {
|
229
|
+
body: void 0,
|
230
|
+
method: expectedMethod,
|
231
|
+
headers,
|
232
|
+
url: getUrl,
|
233
|
+
signal: options.signal
|
234
|
+
};
|
235
|
+
}
|
236
|
+
}
|
237
|
+
return {
|
238
|
+
url,
|
239
|
+
method: expectedMethod === "GET" ? this.fallbackMethod : expectedMethod,
|
240
|
+
headers,
|
241
|
+
body: serialized,
|
242
|
+
signal: options.signal
|
243
|
+
};
|
244
|
+
}
|
245
|
+
async decode(response) {
|
246
|
+
const isOk = !isORPCErrorStatus(response.status);
|
247
|
+
const deserialized = await (async () => {
|
248
|
+
let isBodyOk = false;
|
249
|
+
try {
|
250
|
+
const body = await response.body();
|
251
|
+
isBodyOk = true;
|
252
|
+
return this.serializer.deserialize(body);
|
253
|
+
} catch (error) {
|
254
|
+
if (!isBodyOk) {
|
255
|
+
throw new Error("Cannot parse response body, please check the response body and content-type.", {
|
256
|
+
cause: error
|
257
|
+
});
|
258
|
+
}
|
259
|
+
throw new Error("Invalid RPC response format.", {
|
260
|
+
cause: error
|
261
|
+
});
|
262
|
+
}
|
263
|
+
})();
|
264
|
+
if (!isOk) {
|
265
|
+
if (isORPCErrorJson(deserialized)) {
|
266
|
+
throw createORPCErrorFromJson(deserialized);
|
267
|
+
}
|
268
|
+
throw new ORPCError(getMalformedResponseErrorCode(response.status), {
|
269
|
+
status: response.status,
|
270
|
+
data: { ...response, body: deserialized }
|
271
|
+
});
|
272
|
+
}
|
273
|
+
return deserialized;
|
274
|
+
}
|
275
|
+
}
|
276
|
+
|
277
|
+
class StandardRPCSerializer {
|
278
|
+
constructor(jsonSerializer) {
|
279
|
+
this.jsonSerializer = jsonSerializer;
|
280
|
+
}
|
281
|
+
serialize(data) {
|
282
|
+
if (isAsyncIteratorObject(data)) {
|
283
|
+
return mapEventIterator(data, {
|
284
|
+
value: async (value) => this.#serialize(value, false),
|
285
|
+
error: async (e) => {
|
286
|
+
return new ErrorEvent({
|
287
|
+
data: this.#serialize(toORPCError(e).toJSON(), false),
|
288
|
+
cause: e
|
289
|
+
});
|
290
|
+
}
|
291
|
+
});
|
292
|
+
}
|
293
|
+
return this.#serialize(data, true);
|
294
|
+
}
|
295
|
+
#serialize(data, enableFormData) {
|
296
|
+
const [json, meta_, maps, blobs] = this.jsonSerializer.serialize(data);
|
297
|
+
const meta = meta_.length === 0 ? void 0 : meta_;
|
298
|
+
if (!enableFormData || blobs.length === 0) {
|
299
|
+
return {
|
300
|
+
json,
|
301
|
+
meta
|
302
|
+
};
|
303
|
+
}
|
304
|
+
const form = new FormData();
|
305
|
+
form.set("data", stringifyJSON({ json, meta, maps }));
|
306
|
+
blobs.forEach((blob, i) => {
|
307
|
+
form.set(i.toString(), blob);
|
308
|
+
});
|
309
|
+
return form;
|
310
|
+
}
|
311
|
+
deserialize(data) {
|
312
|
+
if (isAsyncIteratorObject(data)) {
|
313
|
+
return mapEventIterator(data, {
|
314
|
+
value: async (value) => this.#deserialize(value),
|
315
|
+
error: async (e) => {
|
316
|
+
if (!(e instanceof ErrorEvent)) {
|
317
|
+
return e;
|
318
|
+
}
|
319
|
+
const deserialized = this.#deserialize(e.data);
|
320
|
+
if (isORPCErrorJson(deserialized)) {
|
321
|
+
return createORPCErrorFromJson(deserialized, { cause: e });
|
322
|
+
}
|
323
|
+
return new ErrorEvent({
|
324
|
+
data: deserialized,
|
325
|
+
cause: e
|
326
|
+
});
|
327
|
+
}
|
328
|
+
});
|
329
|
+
}
|
330
|
+
return this.#deserialize(data);
|
331
|
+
}
|
332
|
+
#deserialize(data) {
|
333
|
+
if (!(data instanceof FormData)) {
|
334
|
+
return this.jsonSerializer.deserialize(data.json, data.meta ?? []);
|
335
|
+
}
|
336
|
+
const serialized = JSON.parse(data.get("data"));
|
337
|
+
return this.jsonSerializer.deserialize(
|
338
|
+
serialized.json,
|
339
|
+
serialized.meta ?? [],
|
340
|
+
serialized.maps,
|
341
|
+
(i) => data.get(i.toString())
|
342
|
+
);
|
343
|
+
}
|
344
|
+
}
|
345
|
+
|
346
|
+
class StandardRPCLink extends StandardLink {
|
347
|
+
constructor(linkClient, options) {
|
348
|
+
const jsonSerializer = new StandardRPCJsonSerializer(options);
|
349
|
+
const serializer = new StandardRPCSerializer(jsonSerializer);
|
350
|
+
const linkCodec = new StandardRPCLinkCodec(serializer, options);
|
351
|
+
super(linkCodec, linkClient, options);
|
352
|
+
}
|
353
|
+
}
|
354
|
+
|
355
|
+
export { CompositeStandardLinkPlugin as C, StandardLink as S, STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES as a, StandardRPCJsonSerializer as b, StandardRPCLink as c, StandardRPCLinkCodec as d, StandardRPCSerializer as e, getMalformedResponseErrorCode as g, toHttpPath as t };
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { Interceptor, ThrowableError } from '@orpc/shared';
|
2
|
+
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
3
|
+
import { a as ClientContext, b as ClientOptions, C as ClientLink } from './client.CipPQkhk.mjs';
|
4
|
+
|
5
|
+
interface StandardLinkPlugin<T extends ClientContext> {
|
6
|
+
order?: number;
|
7
|
+
init?(options: StandardLinkOptions<T>): void;
|
8
|
+
}
|
9
|
+
declare class CompositeStandardLinkPlugin<T extends ClientContext, TPlugin extends StandardLinkPlugin<T>> implements StandardLinkPlugin<T> {
|
10
|
+
protected readonly plugins: TPlugin[];
|
11
|
+
constructor(plugins?: readonly TPlugin[]);
|
12
|
+
init(options: StandardLinkOptions<T>): void;
|
13
|
+
}
|
14
|
+
|
15
|
+
interface StandardLinkCodec<T extends ClientContext> {
|
16
|
+
encode(path: readonly string[], input: unknown, options: ClientOptions<T>): Promise<StandardRequest>;
|
17
|
+
decode(response: StandardLazyResponse, options: ClientOptions<T>, path: readonly string[], input: unknown): Promise<unknown>;
|
18
|
+
}
|
19
|
+
interface StandardLinkClient<T extends ClientContext> {
|
20
|
+
call(request: StandardRequest, options: ClientOptions<T>, path: readonly string[], input: unknown): Promise<StandardLazyResponse>;
|
21
|
+
}
|
22
|
+
|
23
|
+
interface StandardLinkInterceptorOptions<T extends ClientContext> extends ClientOptions<T> {
|
24
|
+
path: readonly string[];
|
25
|
+
input: unknown;
|
26
|
+
}
|
27
|
+
interface StandardLinkClientInterceptorOptions<T extends ClientContext> extends StandardLinkInterceptorOptions<T> {
|
28
|
+
request: StandardRequest;
|
29
|
+
}
|
30
|
+
interface StandardLinkOptions<T extends ClientContext> {
|
31
|
+
interceptors?: Interceptor<StandardLinkInterceptorOptions<T>, unknown, ThrowableError>[];
|
32
|
+
clientInterceptors?: Interceptor<StandardLinkClientInterceptorOptions<T>, StandardLazyResponse, ThrowableError>[];
|
33
|
+
plugins?: StandardLinkPlugin<T>[];
|
34
|
+
}
|
35
|
+
declare class StandardLink<T extends ClientContext> implements ClientLink<T> {
|
36
|
+
#private;
|
37
|
+
readonly codec: StandardLinkCodec<T>;
|
38
|
+
readonly sender: StandardLinkClient<T>;
|
39
|
+
private readonly interceptors;
|
40
|
+
private readonly clientInterceptors;
|
41
|
+
constructor(codec: StandardLinkCodec<T>, sender: StandardLinkClient<T>, options?: StandardLinkOptions<T>);
|
42
|
+
call(path: readonly string[], input: unknown, options: ClientOptions<T>): Promise<unknown>;
|
43
|
+
}
|
44
|
+
|
45
|
+
export { CompositeStandardLinkPlugin as C, StandardLink as d };
|
46
|
+
export type { StandardLinkClientInterceptorOptions as S, StandardLinkPlugin as a, StandardLinkOptions as b, StandardLinkInterceptorOptions as c, StandardLinkCodec as e, StandardLinkClient as f };
|
package/package.json
CHANGED
@@ -1,52 +1,53 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/client",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.0.
|
5
|
-
"author": {
|
6
|
-
"name": "unnoq",
|
7
|
-
"email": "contact@unnoq.com",
|
8
|
-
"url": "https://unnoq.com"
|
9
|
-
},
|
4
|
+
"version": "1.0.3",
|
10
5
|
"license": "MIT",
|
11
|
-
"homepage": "https://
|
6
|
+
"homepage": "https://orpc.unnoq.com",
|
12
7
|
"repository": {
|
13
8
|
"type": "git",
|
14
|
-
"url": "https://github.com/unnoq/
|
15
|
-
"directory": "
|
9
|
+
"url": "git+https://github.com/unnoq/orpc.git",
|
10
|
+
"directory": "packages/client"
|
16
11
|
},
|
17
12
|
"keywords": [
|
18
|
-
"unnoq"
|
13
|
+
"unnoq",
|
14
|
+
"orpc"
|
19
15
|
],
|
20
|
-
"publishConfig": {
|
21
|
-
"access": "public"
|
22
|
-
},
|
23
16
|
"exports": {
|
24
17
|
".": {
|
25
|
-
"types": "./dist/
|
26
|
-
"import": "./dist/index.
|
27
|
-
"default": "./dist/index.
|
18
|
+
"types": "./dist/index.d.mts",
|
19
|
+
"import": "./dist/index.mjs",
|
20
|
+
"default": "./dist/index.mjs"
|
21
|
+
},
|
22
|
+
"./plugins": {
|
23
|
+
"types": "./dist/plugins/index.d.mts",
|
24
|
+
"import": "./dist/plugins/index.mjs",
|
25
|
+
"default": "./dist/plugins/index.mjs"
|
28
26
|
},
|
29
|
-
"
|
30
|
-
"types": "./dist/
|
27
|
+
"./standard": {
|
28
|
+
"types": "./dist/adapters/standard/index.d.mts",
|
29
|
+
"import": "./dist/adapters/standard/index.mjs",
|
30
|
+
"default": "./dist/adapters/standard/index.mjs"
|
31
|
+
},
|
32
|
+
"./fetch": {
|
33
|
+
"types": "./dist/adapters/fetch/index.d.mts",
|
34
|
+
"import": "./dist/adapters/fetch/index.mjs",
|
35
|
+
"default": "./dist/adapters/fetch/index.mjs"
|
31
36
|
}
|
32
37
|
},
|
33
38
|
"files": [
|
34
|
-
"dist"
|
35
|
-
"src"
|
39
|
+
"dist"
|
36
40
|
],
|
37
|
-
"peerDependencies": {
|
38
|
-
"@orpc/contract": "0.0.4",
|
39
|
-
"@orpc/server": "0.1.1"
|
40
|
-
},
|
41
41
|
"dependencies": {
|
42
|
-
"@orpc/shared": "
|
43
|
-
"@orpc/
|
42
|
+
"@orpc/shared": "1.0.3",
|
43
|
+
"@orpc/standard-server-fetch": "1.0.3",
|
44
|
+
"@orpc/standard-server": "1.0.3"
|
44
45
|
},
|
45
46
|
"devDependencies": {
|
46
|
-
"zod": "^3.
|
47
|
+
"zod": "^3.24.2"
|
47
48
|
},
|
48
49
|
"scripts": {
|
49
|
-
"build": "
|
50
|
+
"build": "unbuild",
|
50
51
|
"build:watch": "pnpm run build --watch",
|
51
52
|
"type:check": "tsc -b"
|
52
53
|
}
|
package/dist/index.js
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
// src/procedure.ts
|
2
|
-
import {
|
3
|
-
ORPC_HEADER,
|
4
|
-
ORPC_HEADER_VALUE
|
5
|
-
} from "@orpc/contract";
|
6
|
-
import { trim } from "@orpc/shared";
|
7
|
-
import { ORPCError } from "@orpc/shared/error";
|
8
|
-
import { ORPCDeserializer, ORPCSerializer } from "@orpc/transformer";
|
9
|
-
function createProcedureClient(options) {
|
10
|
-
const serializer = new ORPCSerializer();
|
11
|
-
const deserializer = new ORPCDeserializer();
|
12
|
-
const client = async (input) => {
|
13
|
-
const fetch_ = options.fetch ?? fetch;
|
14
|
-
const url = `${trim(options.baseURL, "/")}/${options.path.map(encodeURIComponent).join("/")}`;
|
15
|
-
let headers = await options.headers?.(input);
|
16
|
-
headers = headers instanceof Headers ? headers : new Headers(headers);
|
17
|
-
const { body, headers: headers_ } = serializer.serialize(input);
|
18
|
-
for (const [key, value] of headers_.entries()) {
|
19
|
-
headers.set(key, value);
|
20
|
-
}
|
21
|
-
headers.set(ORPC_HEADER, ORPC_HEADER_VALUE);
|
22
|
-
const response = await fetch_(url, {
|
23
|
-
method: "POST",
|
24
|
-
headers,
|
25
|
-
body
|
26
|
-
});
|
27
|
-
const json = await (async () => {
|
28
|
-
try {
|
29
|
-
return await deserializer.deserialize(response);
|
30
|
-
} catch (e) {
|
31
|
-
throw new ORPCError({
|
32
|
-
code: "INTERNAL_SERVER_ERROR",
|
33
|
-
message: "Cannot parse response.",
|
34
|
-
cause: e
|
35
|
-
});
|
36
|
-
}
|
37
|
-
})();
|
38
|
-
if (!response.ok) {
|
39
|
-
throw ORPCError.fromJSON(json) ?? new ORPCError({
|
40
|
-
status: response.status,
|
41
|
-
code: "INTERNAL_SERVER_ERROR",
|
42
|
-
message: "Internal server error"
|
43
|
-
});
|
44
|
-
}
|
45
|
-
return json;
|
46
|
-
};
|
47
|
-
return client;
|
48
|
-
}
|
49
|
-
|
50
|
-
// src/router.ts
|
51
|
-
function createRouterClient(options) {
|
52
|
-
const path = options?.path ?? [];
|
53
|
-
const client = new Proxy(
|
54
|
-
createProcedureClient({
|
55
|
-
baseURL: options.baseURL,
|
56
|
-
fetch: options.fetch,
|
57
|
-
headers: options.headers,
|
58
|
-
path
|
59
|
-
}),
|
60
|
-
{
|
61
|
-
get(target, key) {
|
62
|
-
if (typeof key !== "string") {
|
63
|
-
return Reflect.get(target, key);
|
64
|
-
}
|
65
|
-
return createRouterClient({
|
66
|
-
...options,
|
67
|
-
path: [...path, key]
|
68
|
-
});
|
69
|
-
}
|
70
|
-
}
|
71
|
-
);
|
72
|
-
return client;
|
73
|
-
}
|
74
|
-
|
75
|
-
// src/index.ts
|
76
|
-
export * from "@orpc/shared/error";
|
77
|
-
var createORPCClient = createRouterClient;
|
78
|
-
export {
|
79
|
-
createORPCClient,
|
80
|
-
createProcedureClient,
|
81
|
-
createRouterClient
|
82
|
-
};
|
83
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../src/procedure.ts","../src/router.ts","../src/index.ts"],"sourcesContent":["/// <reference lib=\"dom\" />\n/// <reference lib=\"dom.iterable\" />\n\nimport type { Promisable } from '@orpc/shared'\nimport {\n ORPC_HEADER,\n ORPC_HEADER_VALUE,\n type Schema,\n type SchemaInput,\n type SchemaOutput,\n} from '@orpc/contract'\nimport { trim } from '@orpc/shared'\nimport { ORPCError } from '@orpc/shared/error'\nimport { ORPCDeserializer, ORPCSerializer } from '@orpc/transformer'\n\nexport interface ProcedureClient<\n TInputSchema extends Schema,\n TOutputSchema extends Schema,\n THandlerOutput extends SchemaOutput<TOutputSchema>,\n> {\n (\n input: SchemaInput<TInputSchema>,\n ): Promise<SchemaOutput<TOutputSchema, THandlerOutput>>\n}\n\nexport interface CreateProcedureClientOptions {\n /**\n * The base url of the server.\n */\n baseURL: string\n\n /**\n * The fetch function used to make the request.\n * @default global fetch\n */\n fetch?: typeof fetch\n\n /**\n * The headers used to make the request.\n * Invoked before the request is made.\n */\n headers?: (input: unknown) => Promisable<Headers | Record<string, string>>\n\n /**\n * The path of the procedure on server.\n */\n path: string[]\n}\n\nexport function createProcedureClient<\n TInputSchema extends Schema,\n TOutputSchema extends Schema,\n THandlerOutput extends SchemaOutput<TOutputSchema>,\n>(\n options: CreateProcedureClientOptions,\n): ProcedureClient<TInputSchema, TOutputSchema, THandlerOutput> {\n const serializer = new ORPCSerializer()\n const deserializer = new ORPCDeserializer()\n\n const client = async (input: unknown): Promise<unknown> => {\n const fetch_ = options.fetch ?? fetch\n const url = `${trim(options.baseURL, '/')}/${options.path.map(encodeURIComponent).join('/')}`\n let headers = await options.headers?.(input)\n headers = headers instanceof Headers ? headers : new Headers(headers)\n\n const { body, headers: headers_ } = serializer.serialize(input)\n\n for (const [key, value] of headers_.entries()) {\n headers.set(key, value)\n }\n\n headers.set(ORPC_HEADER, ORPC_HEADER_VALUE)\n\n const response = await fetch_(url, {\n method: 'POST',\n headers,\n body,\n })\n\n const json = await (async () => {\n try {\n return await deserializer.deserialize(response)\n }\n catch (e) {\n throw new ORPCError({\n code: 'INTERNAL_SERVER_ERROR',\n message: 'Cannot parse response.',\n cause: e,\n })\n }\n })()\n\n if (!response.ok) {\n throw (\n ORPCError.fromJSON(json)\n ?? new ORPCError({\n status: response.status,\n code: 'INTERNAL_SERVER_ERROR',\n message: 'Internal server error',\n })\n )\n }\n\n return json\n }\n\n return client as any\n}\n","/// <reference lib=\"dom\" />\n\nimport type {\n ContractProcedure,\n ContractRouter,\n SchemaOutput,\n} from '@orpc/contract'\nimport type { Procedure, Router } from '@orpc/server'\nimport type { Promisable } from '@orpc/shared'\nimport { createProcedureClient, type ProcedureClient } from './procedure'\n\nexport type RouterClientWithContractRouter<TRouter extends ContractRouter> = {\n [K in keyof TRouter]: TRouter[K] extends ContractProcedure<\n infer UInputSchema,\n infer UOutputSchema\n >\n ? ProcedureClient<UInputSchema, UOutputSchema, SchemaOutput<UOutputSchema>>\n : TRouter[K] extends ContractRouter\n ? RouterClientWithContractRouter<TRouter[K]>\n : never\n}\n\nexport type RouterClientWithRouter<TRouter extends Router<any>> = {\n [K in keyof TRouter]: TRouter[K] extends Procedure<\n any,\n any,\n infer UInputSchema,\n infer UOutputSchema,\n infer UHandlerOutput\n >\n ? ProcedureClient<UInputSchema, UOutputSchema, UHandlerOutput>\n : TRouter[K] extends Router<any>\n ? RouterClientWithRouter<TRouter[K]>\n : never\n}\n\nexport interface CreateRouterClientOptions {\n /**\n * The base url of the server.\n */\n baseURL: string\n\n /**\n * The fetch function used to make the request.\n * @default global fetch\n */\n fetch?: typeof fetch\n\n /**\n * The headers used to make the request.\n * Invoked before the request is made.\n */\n headers?: (input: unknown) => Promisable<Headers | Record<string, string>>\n\n /**\n * This used for internal purpose only.\n *\n * @internal\n */\n path?: string[]\n}\n\nexport function createRouterClient<\n TRouter extends Router<any> | ContractRouter,\n>(\n options: CreateRouterClientOptions,\n): TRouter extends Router<any>\n ? RouterClientWithRouter<TRouter>\n : TRouter extends ContractRouter\n ? RouterClientWithContractRouter<TRouter>\n : never {\n const path = options?.path ?? []\n\n const client = new Proxy(\n createProcedureClient({\n baseURL: options.baseURL,\n fetch: options.fetch,\n headers: options.headers,\n path,\n }),\n {\n get(target, key) {\n if (typeof key !== 'string') {\n return Reflect.get(target, key)\n }\n\n return createRouterClient({\n ...options,\n path: [...path, key],\n })\n },\n },\n )\n\n return client as any\n}\n","/** unnoq */\n\nimport { createRouterClient } from './router'\n\nexport * from './procedure'\nexport * from './router'\nexport * from '@orpc/shared/error'\n\nexport const createORPCClient = createRouterClient\n"],"mappings":";AAIA;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AACP,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB,sBAAsB;AAoC1C,SAAS,sBAKd,SAC8D;AAC9D,QAAM,aAAa,IAAI,eAAe;AACtC,QAAM,eAAe,IAAI,iBAAiB;AAE1C,QAAM,SAAS,OAAO,UAAqC;AACzD,UAAM,SAAS,QAAQ,SAAS;AAChC,UAAM,MAAM,GAAG,KAAK,QAAQ,SAAS,GAAG,CAAC,IAAI,QAAQ,KAAK,IAAI,kBAAkB,EAAE,KAAK,GAAG,CAAC;AAC3F,QAAI,UAAU,MAAM,QAAQ,UAAU,KAAK;AAC3C,cAAU,mBAAmB,UAAU,UAAU,IAAI,QAAQ,OAAO;AAEpE,UAAM,EAAE,MAAM,SAAS,SAAS,IAAI,WAAW,UAAU,KAAK;AAE9D,eAAW,CAAC,KAAK,KAAK,KAAK,SAAS,QAAQ,GAAG;AAC7C,cAAQ,IAAI,KAAK,KAAK;AAAA,IACxB;AAEA,YAAQ,IAAI,aAAa,iBAAiB;AAE1C,UAAM,WAAW,MAAM,OAAO,KAAK;AAAA,MACjC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,IACF,CAAC;AAED,UAAM,OAAO,OAAO,YAAY;AAC9B,UAAI;AACF,eAAO,MAAM,aAAa,YAAY,QAAQ;AAAA,MAChD,SACO,GAAG;AACR,cAAM,IAAI,UAAU;AAAA,UAClB,MAAM;AAAA,UACN,SAAS;AAAA,UACT,OAAO;AAAA,QACT,CAAC;AAAA,MACH;AAAA,IACF,GAAG;AAEH,QAAI,CAAC,SAAS,IAAI;AAChB,YACE,UAAU,SAAS,IAAI,KACpB,IAAI,UAAU;AAAA,QACf,QAAQ,SAAS;AAAA,QACjB,MAAM;AAAA,QACN,SAAS;AAAA,MACX,CAAC;AAAA,IAEL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AC7CO,SAAS,mBAGd,SAKY;AACZ,QAAM,OAAO,SAAS,QAAQ,CAAC;AAE/B,QAAM,SAAS,IAAI;AAAA,IACjB,sBAAsB;AAAA,MACpB,SAAS,QAAQ;AAAA,MACjB,OAAO,QAAQ;AAAA,MACf,SAAS,QAAQ;AAAA,MACjB;AAAA,IACF,CAAC;AAAA,IACD;AAAA,MACE,IAAI,QAAQ,KAAK;AACf,YAAI,OAAO,QAAQ,UAAU;AAC3B,iBAAO,QAAQ,IAAI,QAAQ,GAAG;AAAA,QAChC;AAEA,eAAO,mBAAmB;AAAA,UACxB,GAAG;AAAA,UACH,MAAM,CAAC,GAAG,MAAM,GAAG;AAAA,QACrB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;;;ACzFA,cAAc;AAEP,IAAM,mBAAmB;","names":[]}
|
package/dist/src/index.d.ts
DELETED
package/dist/src/index.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY;AAEZ,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE7C,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAElC,eAAO,MAAM,gBAAgB,2BAAqB,CAAA"}
|
package/dist/src/procedure.d.ts
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import type { Promisable } from '@orpc/shared';
|
2
|
-
import { type Schema, type SchemaInput, type SchemaOutput } from '@orpc/contract';
|
3
|
-
export interface ProcedureClient<TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaOutput<TOutputSchema>> {
|
4
|
-
(input: SchemaInput<TInputSchema>): Promise<SchemaOutput<TOutputSchema, THandlerOutput>>;
|
5
|
-
}
|
6
|
-
export interface CreateProcedureClientOptions {
|
7
|
-
/**
|
8
|
-
* The base url of the server.
|
9
|
-
*/
|
10
|
-
baseURL: string;
|
11
|
-
/**
|
12
|
-
* The fetch function used to make the request.
|
13
|
-
* @default global fetch
|
14
|
-
*/
|
15
|
-
fetch?: typeof fetch;
|
16
|
-
/**
|
17
|
-
* The headers used to make the request.
|
18
|
-
* Invoked before the request is made.
|
19
|
-
*/
|
20
|
-
headers?: (input: unknown) => Promisable<Headers | Record<string, string>>;
|
21
|
-
/**
|
22
|
-
* The path of the procedure on server.
|
23
|
-
*/
|
24
|
-
path: string[];
|
25
|
-
}
|
26
|
-
export declare function createProcedureClient<TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaOutput<TOutputSchema>>(options: CreateProcedureClientOptions): ProcedureClient<TInputSchema, TOutputSchema, THandlerOutput>;
|
27
|
-
//# sourceMappingURL=procedure.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"procedure.d.ts","sourceRoot":"","sources":["../../src/procedure.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AAKvB,MAAM,WAAW,eAAe,CAC9B,YAAY,SAAS,MAAM,EAC3B,aAAa,SAAS,MAAM,EAC5B,cAAc,SAAS,YAAY,CAAC,aAAa,CAAC;IAElD,CACE,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAC/B,OAAO,CAAC,YAAY,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;CACxD;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAE1E;;OAEG;IACH,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,wBAAgB,qBAAqB,CACnC,YAAY,SAAS,MAAM,EAC3B,aAAa,SAAS,MAAM,EAC5B,cAAc,SAAS,YAAY,CAAC,aAAa,CAAC,EAElD,OAAO,EAAE,4BAA4B,GACpC,eAAe,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC,CAoD9D"}
|
package/dist/src/router.d.ts
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
import type { ContractProcedure, ContractRouter, SchemaOutput } from '@orpc/contract';
|
2
|
-
import type { Procedure, Router } from '@orpc/server';
|
3
|
-
import type { Promisable } from '@orpc/shared';
|
4
|
-
import { type ProcedureClient } from './procedure';
|
5
|
-
export type RouterClientWithContractRouter<TRouter extends ContractRouter> = {
|
6
|
-
[K in keyof TRouter]: TRouter[K] extends ContractProcedure<infer UInputSchema, infer UOutputSchema> ? ProcedureClient<UInputSchema, UOutputSchema, SchemaOutput<UOutputSchema>> : TRouter[K] extends ContractRouter ? RouterClientWithContractRouter<TRouter[K]> : never;
|
7
|
-
};
|
8
|
-
export type RouterClientWithRouter<TRouter extends Router<any>> = {
|
9
|
-
[K in keyof TRouter]: TRouter[K] extends Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UHandlerOutput> ? ProcedureClient<UInputSchema, UOutputSchema, UHandlerOutput> : TRouter[K] extends Router<any> ? RouterClientWithRouter<TRouter[K]> : never;
|
10
|
-
};
|
11
|
-
export interface CreateRouterClientOptions {
|
12
|
-
/**
|
13
|
-
* The base url of the server.
|
14
|
-
*/
|
15
|
-
baseURL: string;
|
16
|
-
/**
|
17
|
-
* The fetch function used to make the request.
|
18
|
-
* @default global fetch
|
19
|
-
*/
|
20
|
-
fetch?: typeof fetch;
|
21
|
-
/**
|
22
|
-
* The headers used to make the request.
|
23
|
-
* Invoked before the request is made.
|
24
|
-
*/
|
25
|
-
headers?: (input: unknown) => Promisable<Headers | Record<string, string>>;
|
26
|
-
/**
|
27
|
-
* This used for internal purpose only.
|
28
|
-
*
|
29
|
-
* @internal
|
30
|
-
*/
|
31
|
-
path?: string[];
|
32
|
-
}
|
33
|
-
export declare function createRouterClient<TRouter extends Router<any> | ContractRouter>(options: CreateRouterClientOptions): TRouter extends Router<any> ? RouterClientWithRouter<TRouter> : TRouter extends ContractRouter ? RouterClientWithContractRouter<TRouter> : never;
|
34
|
-
//# sourceMappingURL=router.d.ts.map
|
package/dist/src/router.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/router.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,YAAY,EACb,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAA;AAEzE,MAAM,MAAM,8BAA8B,CAAC,OAAO,SAAS,cAAc,IAAI;KAC1E,CAAC,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,iBAAiB,CACxD,MAAM,YAAY,EAClB,MAAM,aAAa,CACpB,GACG,eAAe,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC,GACzE,OAAO,CAAC,CAAC,CAAC,SAAS,cAAc,GAC/B,8BAA8B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC1C,KAAK;CACZ,CAAA;AAED,MAAM,MAAM,sBAAsB,CAAC,OAAO,SAAS,MAAM,CAAC,GAAG,CAAC,IAAI;KAC/D,CAAC,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,SAAS,CAChD,GAAG,EACH,GAAG,EACH,MAAM,YAAY,EAClB,MAAM,aAAa,EACnB,MAAM,cAAc,CACrB,GACG,eAAe,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC,GAC5D,OAAO,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAC5B,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAClC,KAAK;CACZ,CAAA;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAE1E;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,wBAAgB,kBAAkB,CAChC,OAAO,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,cAAc,EAE5C,OAAO,EAAE,yBAAyB,GACjC,OAAO,SAAS,MAAM,CAAC,GAAG,CAAC,GACxB,sBAAsB,CAAC,OAAO,CAAC,GAC/B,OAAO,SAAS,cAAc,GAC5B,8BAA8B,CAAC,OAAO,CAAC,GACvC,KAAK,CAyBZ"}
|