@orpc/server 0.20.0 → 0.22.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/dist/{chunk-YAVPFNPF.js → chunk-6A7XHEBH.js} +10 -3
- package/dist/fetch.js +43 -5
- package/dist/index.js +7 -7
- package/dist/src/builder.d.ts +1 -1
- package/dist/src/fetch/index.d.ts +1 -0
- package/dist/src/fetch/orpc-payload-codec.d.ts +9 -2
- package/dist/src/procedure-builder.d.ts +1 -1
- package/dist/src/procedure-client.d.ts +4 -4
- package/dist/src/procedure-decorated.d.ts +8 -8
- package/dist/src/procedure-implementer.d.ts +1 -1
- package/dist/src/procedure.d.ts +7 -7
- package/package.json +3 -3
@@ -1,3 +1,9 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __export = (target, all) => {
|
3
|
+
for (var name in all)
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
5
|
+
};
|
6
|
+
|
1
7
|
// src/utils.ts
|
2
8
|
function mergeContext(a, b) {
|
3
9
|
if (!a)
|
@@ -23,7 +29,7 @@ function isProcedure(item) {
|
|
23
29
|
if (item instanceof Procedure) {
|
24
30
|
return true;
|
25
31
|
}
|
26
|
-
return (typeof item === "object" || typeof item === "function") && item !== null && "~type" in item && item["~type"] === "Procedure" && "~orpc" in item && typeof item["~orpc"] === "object" && item["~orpc"] !== null && "contract" in item["~orpc"] && isContractProcedure(item["~orpc"].contract) && "
|
32
|
+
return (typeof item === "object" || typeof item === "function") && item !== null && "~type" in item && item["~type"] === "Procedure" && "~orpc" in item && typeof item["~orpc"] === "object" && item["~orpc"] !== null && "contract" in item["~orpc"] && isContractProcedure(item["~orpc"].contract) && "handler" in item["~orpc"] && typeof item["~orpc"].handler === "function";
|
27
33
|
}
|
28
34
|
|
29
35
|
// src/lazy.ts
|
@@ -129,7 +135,7 @@ async function executeMiddlewareChain(procedure, input, context, meta) {
|
|
129
135
|
});
|
130
136
|
}
|
131
137
|
const result = {
|
132
|
-
output: await procedure["~orpc"].
|
138
|
+
output: await procedure["~orpc"].handler(input, currentContext, meta),
|
133
139
|
context: currentContext
|
134
140
|
};
|
135
141
|
return result;
|
@@ -168,6 +174,7 @@ function getRouterChild(router, ...path) {
|
|
168
174
|
}
|
169
175
|
|
170
176
|
export {
|
177
|
+
__export,
|
171
178
|
mergeContext,
|
172
179
|
Procedure,
|
173
180
|
isProcedure,
|
@@ -179,4 +186,4 @@ export {
|
|
179
186
|
createProcedureClient,
|
180
187
|
getRouterChild
|
181
188
|
};
|
182
|
-
//# sourceMappingURL=chunk-
|
189
|
+
//# sourceMappingURL=chunk-6A7XHEBH.js.map
|
package/dist/fetch.js
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
import {
|
2
|
+
__export,
|
2
3
|
createProcedureClient,
|
3
4
|
getRouterChild,
|
4
5
|
isProcedure,
|
5
6
|
unlazy
|
6
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-6A7XHEBH.js";
|
7
8
|
|
8
9
|
// src/fetch/composite-handler.ts
|
9
10
|
var CompositeHandler = class {
|
@@ -30,6 +31,13 @@ import { ORPCError as ORPCError2 } from "@orpc/shared/error";
|
|
30
31
|
import { findDeepMatches, set } from "@orpc/shared";
|
31
32
|
import { ORPCError } from "@orpc/shared/error";
|
32
33
|
|
34
|
+
// src/fetch/super-json.ts
|
35
|
+
var super_json_exports = {};
|
36
|
+
__export(super_json_exports, {
|
37
|
+
deserialize: () => deserialize,
|
38
|
+
serialize: () => serialize
|
39
|
+
});
|
40
|
+
|
33
41
|
// ../../node_modules/.pnpm/is-what@5.0.2/node_modules/is-what/dist/getType.js
|
34
42
|
function getType(payload) {
|
35
43
|
return Object.prototype.toString.call(payload).slice(8, -1);
|
@@ -148,9 +156,24 @@ function deserialize({
|
|
148
156
|
|
149
157
|
// src/fetch/orpc-payload-codec.ts
|
150
158
|
var ORPCPayloadCodec = class {
|
151
|
-
|
159
|
+
/**
|
160
|
+
* If method is GET, the payload will be encoded as query string.
|
161
|
+
* If method is GET and payload contain file, the method will be fallback to fallbackMethod. (fallbackMethod = GET will force to use GET method)
|
162
|
+
*/
|
163
|
+
encode(payload, method = "POST", fallbackMethod = "POST") {
|
152
164
|
const { data, meta } = serialize(payload);
|
153
165
|
const { maps, values } = findDeepMatches((v) => v instanceof Blob, data);
|
166
|
+
if (method === "GET" && (values.length === 0 || fallbackMethod === "GET")) {
|
167
|
+
const query = new URLSearchParams({
|
168
|
+
data: JSON.stringify(data),
|
169
|
+
meta: JSON.stringify(meta)
|
170
|
+
});
|
171
|
+
return {
|
172
|
+
query,
|
173
|
+
method: "GET"
|
174
|
+
};
|
175
|
+
}
|
176
|
+
const nonGETMethod = method === "GET" ? fallbackMethod : method;
|
154
177
|
if (values.length > 0) {
|
155
178
|
const form = new FormData();
|
156
179
|
if (data !== void 0) {
|
@@ -162,17 +185,31 @@ var ORPCPayloadCodec = class {
|
|
162
185
|
const value = values[i];
|
163
186
|
form.append(i, value);
|
164
187
|
}
|
165
|
-
return {
|
188
|
+
return {
|
189
|
+
body: form,
|
190
|
+
method: nonGETMethod
|
191
|
+
};
|
166
192
|
}
|
167
193
|
return {
|
168
194
|
body: JSON.stringify({ data, meta }),
|
169
195
|
headers: new Headers({
|
170
196
|
"content-type": "application/json"
|
171
|
-
})
|
197
|
+
}),
|
198
|
+
method: nonGETMethod
|
172
199
|
};
|
173
200
|
}
|
174
201
|
async decode(re) {
|
175
202
|
try {
|
203
|
+
if ("method" in re && re.method === "GET") {
|
204
|
+
const url = new URL(re.url);
|
205
|
+
const query = url.searchParams;
|
206
|
+
const data = JSON.parse(query.getAll("data").at(-1));
|
207
|
+
const meta = JSON.parse(query.getAll("meta").at(-1));
|
208
|
+
return deserialize({
|
209
|
+
data,
|
210
|
+
meta
|
211
|
+
});
|
212
|
+
}
|
176
213
|
if (re.headers.get("content-type")?.startsWith("multipart/form-data")) {
|
177
214
|
const form = await re.formData();
|
178
215
|
const rawData = form.get("data");
|
@@ -281,6 +318,7 @@ export {
|
|
281
318
|
CompositeHandler,
|
282
319
|
ORPCHandler,
|
283
320
|
ORPCPayloadCodec,
|
284
|
-
ORPCProcedureMatcher
|
321
|
+
ORPCProcedureMatcher,
|
322
|
+
super_json_exports as SuperJSON
|
285
323
|
};
|
286
324
|
//# sourceMappingURL=fetch.js.map
|
package/dist/index.js
CHANGED
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
lazy,
|
10
10
|
mergeContext,
|
11
11
|
unlazy
|
12
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-6A7XHEBH.js";
|
13
13
|
|
14
14
|
// src/builder.ts
|
15
15
|
import { ContractProcedure } from "@orpc/contract";
|
@@ -110,11 +110,11 @@ var ProcedureImplementer = class _ProcedureImplementer {
|
|
110
110
|
middlewares: [...this["~orpc"].middlewares ?? [], mappedMiddleware]
|
111
111
|
});
|
112
112
|
}
|
113
|
-
|
113
|
+
handler(handler) {
|
114
114
|
return decorateProcedure(new Procedure({
|
115
115
|
middlewares: this["~orpc"].middlewares,
|
116
116
|
contract: this["~orpc"].contract,
|
117
|
-
|
117
|
+
handler
|
118
118
|
}));
|
119
119
|
}
|
120
120
|
};
|
@@ -358,11 +358,11 @@ var ProcedureBuilder = class _ProcedureBuilder {
|
|
358
358
|
middlewares: this["~orpc"].middlewares
|
359
359
|
}).use(middleware, mapInput);
|
360
360
|
}
|
361
|
-
|
361
|
+
handler(handler) {
|
362
362
|
return decorateProcedure(new Procedure({
|
363
363
|
middlewares: this["~orpc"].middlewares,
|
364
364
|
contract: this["~orpc"].contract,
|
365
|
-
|
365
|
+
handler
|
366
366
|
}));
|
367
367
|
}
|
368
368
|
};
|
@@ -416,14 +416,14 @@ var Builder = class _Builder {
|
|
416
416
|
})
|
417
417
|
});
|
418
418
|
}
|
419
|
-
|
419
|
+
handler(handler) {
|
420
420
|
return decorateProcedure(new Procedure({
|
421
421
|
middlewares: this["~orpc"].middlewares,
|
422
422
|
contract: new ContractProcedure({
|
423
423
|
InputSchema: void 0,
|
424
424
|
OutputSchema: void 0
|
425
425
|
}),
|
426
|
-
|
426
|
+
handler
|
427
427
|
}));
|
428
428
|
}
|
429
429
|
prefix(prefix) {
|
package/dist/src/builder.d.ts
CHANGED
@@ -23,7 +23,7 @@ export declare class Builder<TContext extends Context, TExtraContext extends Con
|
|
23
23
|
route(route: RouteOptions): ProcedureBuilder<TContext, TExtraContext, undefined, undefined>;
|
24
24
|
input<USchema extends Schema = undefined>(schema: USchema, example?: SchemaInput<USchema>): ProcedureBuilder<TContext, TExtraContext, USchema, undefined>;
|
25
25
|
output<USchema extends Schema = undefined>(schema: USchema, example?: SchemaOutput<USchema>): ProcedureBuilder<TContext, TExtraContext, undefined, USchema>;
|
26
|
-
|
26
|
+
handler<UFuncOutput = undefined>(handler: ProcedureFunc<TContext, TExtraContext, undefined, undefined, UFuncOutput>): DecoratedProcedure<TContext, TExtraContext, undefined, undefined, UFuncOutput>;
|
27
27
|
prefix(prefix: HTTPPath): RouterBuilder<TContext, TExtraContext>;
|
28
28
|
tag(...tags: string[]): RouterBuilder<TContext, TExtraContext>;
|
29
29
|
router<U extends Router<MergeContext<TContext, TExtraContext>, any>>(router: U): AdaptedRouter<TContext, U>;
|
@@ -1,7 +1,14 @@
|
|
1
|
+
import type { HTTPMethod } from '@orpc/contract';
|
1
2
|
export declare class ORPCPayloadCodec {
|
2
|
-
|
3
|
-
|
3
|
+
/**
|
4
|
+
* If method is GET, the payload will be encoded as query string.
|
5
|
+
* If method is GET and payload contain file, the method will be fallback to fallbackMethod. (fallbackMethod = GET will force to use GET method)
|
6
|
+
*/
|
7
|
+
encode(payload: unknown, method?: HTTPMethod, fallbackMethod?: HTTPMethod): {
|
8
|
+
query?: URLSearchParams;
|
9
|
+
body?: FormData | string;
|
4
10
|
headers?: Headers;
|
11
|
+
method: HTTPMethod;
|
5
12
|
};
|
6
13
|
decode(re: Request | Response): Promise<unknown>;
|
7
14
|
}
|
@@ -17,6 +17,6 @@ export declare class ProcedureBuilder<TContext extends Context, TExtraContext ex
|
|
17
17
|
output<U extends Schema = undefined>(schema: U, example?: SchemaOutput<U>): ProcedureBuilder<TContext, TExtraContext, TInputSchema, U>;
|
18
18
|
use<U extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined>(middleware: Middleware<MergeContext<TContext, TExtraContext>, U, SchemaOutput<TInputSchema>, SchemaInput<TOutputSchema>>): ProcedureImplementer<TContext, MergeContext<TExtraContext, U>, TInputSchema, TOutputSchema>;
|
19
19
|
use<UExtra extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined, UInput = unknown>(middleware: Middleware<MergeContext<TContext, TExtraContext>, UExtra, UInput, SchemaInput<TOutputSchema>>, mapInput: MapInputMiddleware<SchemaOutput<TInputSchema>, UInput>): ProcedureImplementer<TContext, MergeContext<TExtraContext, UExtra>, TInputSchema, TOutputSchema>;
|
20
|
-
|
20
|
+
handler<UFuncOutput extends SchemaInput<TOutputSchema>>(handler: ProcedureFunc<TContext, TExtraContext, TInputSchema, TOutputSchema, UFuncOutput>): DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema, UFuncOutput>;
|
21
21
|
}
|
22
22
|
//# sourceMappingURL=procedure-builder.d.ts.map
|
@@ -14,8 +14,8 @@ export interface ProcedureClient<TInput, TOutput, TClientContext> {
|
|
14
14
|
/**
|
15
15
|
* Options for creating a procedure caller with comprehensive type safety
|
16
16
|
*/
|
17
|
-
export type CreateProcedureClientOptions<TContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema,
|
18
|
-
procedure: Lazyable<Procedure<TContext, any, TInputSchema, TOutputSchema,
|
17
|
+
export type CreateProcedureClientOptions<TContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaInput<TOutputSchema>> = {
|
18
|
+
procedure: Lazyable<Procedure<TContext, any, TInputSchema, TOutputSchema, THandlerOutput>>;
|
19
19
|
/**
|
20
20
|
* This is helpful for logging and analytics.
|
21
21
|
*
|
@@ -29,6 +29,6 @@ export type CreateProcedureClientOptions<TContext extends Context, TInputSchema
|
|
29
29
|
context: Value<TContext>;
|
30
30
|
} | (undefined extends TContext ? {
|
31
31
|
context?: undefined;
|
32
|
-
} : never)) & Hooks<unknown, SchemaOutput<TOutputSchema,
|
33
|
-
export declare function createProcedureClient<TContext extends Context = WELL_CONTEXT, TInputSchema extends Schema = undefined, TOutputSchema extends Schema = undefined,
|
32
|
+
} : never)) & Hooks<unknown, SchemaOutput<TOutputSchema, THandlerOutput>, TContext, Meta>;
|
33
|
+
export declare function createProcedureClient<TContext extends Context = WELL_CONTEXT, TInputSchema extends Schema = undefined, TOutputSchema extends Schema = undefined, THandlerOutput extends SchemaInput<TOutputSchema> = SchemaInput<TOutputSchema>>(options: CreateProcedureClientOptions<TContext, TInputSchema, TOutputSchema, THandlerOutput>): ProcedureClient<SchemaInput<TInputSchema>, SchemaOutput<TOutputSchema, THandlerOutput>, unknown>;
|
34
34
|
//# sourceMappingURL=procedure-client.d.ts.map
|
@@ -3,12 +3,12 @@ import type { MapInputMiddleware, Middleware } from './middleware';
|
|
3
3
|
import type { ProcedureClient } from './procedure-client';
|
4
4
|
import type { Context, MergeContext } from './types';
|
5
5
|
import { Procedure } from './procedure';
|
6
|
-
export type DecoratedProcedure<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema,
|
7
|
-
prefix: (prefix: HTTPPath) => DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema,
|
8
|
-
route: (route: RouteOptions) => DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema,
|
9
|
-
use: (<U extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined>(middleware: Middleware<MergeContext<TContext, TExtraContext>, U, SchemaOutput<TInputSchema>, SchemaInput<TOutputSchema,
|
10
|
-
unshiftTag: (...tags: string[]) => DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema,
|
11
|
-
unshiftMiddleware: <U extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined>(...middlewares: Middleware<TContext, U, SchemaOutput<TInputSchema>, SchemaInput<TOutputSchema,
|
12
|
-
} & (undefined extends TContext ? ProcedureClient<SchemaInput<TInputSchema>, SchemaOutput<TOutputSchema,
|
13
|
-
export declare function decorateProcedure<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema,
|
6
|
+
export type DecoratedProcedure<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaInput<TOutputSchema>> = Procedure<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput> & {
|
7
|
+
prefix: (prefix: HTTPPath) => DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>;
|
8
|
+
route: (route: RouteOptions) => DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>;
|
9
|
+
use: (<U extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined>(middleware: Middleware<MergeContext<TContext, TExtraContext>, U, SchemaOutput<TInputSchema>, SchemaInput<TOutputSchema, THandlerOutput>>) => DecoratedProcedure<TContext, MergeContext<TExtraContext, U>, TInputSchema, TOutputSchema, THandlerOutput>) & (<UExtra extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined, UInput = unknown>(middleware: Middleware<MergeContext<TContext, TExtraContext>, UExtra, UInput, SchemaInput<TOutputSchema, THandlerOutput>>, mapInput: MapInputMiddleware<SchemaOutput<TInputSchema, THandlerOutput>, UInput>) => DecoratedProcedure<TContext, MergeContext<TExtraContext, UExtra>, TInputSchema, TOutputSchema, THandlerOutput>);
|
10
|
+
unshiftTag: (...tags: string[]) => DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>;
|
11
|
+
unshiftMiddleware: <U extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined>(...middlewares: Middleware<TContext, U, SchemaOutput<TInputSchema>, SchemaInput<TOutputSchema, THandlerOutput>>[]) => DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>;
|
12
|
+
} & (undefined extends TContext ? ProcedureClient<SchemaInput<TInputSchema>, SchemaOutput<TOutputSchema, THandlerOutput>, unknown> : unknown);
|
13
|
+
export declare function decorateProcedure<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaInput<TOutputSchema>>(procedure: Procedure<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>): DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>;
|
14
14
|
//# sourceMappingURL=procedure-decorated.d.ts.map
|
@@ -13,6 +13,6 @@ export declare class ProcedureImplementer<TContext extends Context, TExtraContex
|
|
13
13
|
constructor(def: ProcedureImplementerDef<TContext, TExtraContext, TInputSchema, TOutputSchema>);
|
14
14
|
use<U extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined>(middleware: Middleware<MergeContext<TContext, TExtraContext>, U, SchemaOutput<TInputSchema>, SchemaInput<TOutputSchema>>): ProcedureImplementer<TContext, MergeContext<TExtraContext, U>, TInputSchema, TOutputSchema>;
|
15
15
|
use<UExtra extends Context & Partial<MergeContext<TContext, TExtraContext>> | undefined = undefined, UInput = unknown>(middleware: Middleware<MergeContext<TContext, TExtraContext>, UExtra, UInput, SchemaInput<TOutputSchema>>, mapInput: MapInputMiddleware<SchemaOutput<TInputSchema>, UInput>): ProcedureImplementer<TContext, MergeContext<TExtraContext, UExtra>, TInputSchema, TOutputSchema>;
|
16
|
-
|
16
|
+
handler<UFuncOutput extends SchemaInput<TOutputSchema>>(handler: ProcedureFunc<TContext, TExtraContext, TInputSchema, TOutputSchema, UFuncOutput>): DecoratedProcedure<TContext, TExtraContext, TInputSchema, TOutputSchema, UFuncOutput>;
|
17
17
|
}
|
18
18
|
//# sourceMappingURL=procedure-implementer.d.ts.map
|
package/dist/src/procedure.d.ts
CHANGED
@@ -3,18 +3,18 @@ import type { Lazy } from './lazy';
|
|
3
3
|
import type { Middleware } from './middleware';
|
4
4
|
import type { Context, MergeContext, Meta } from './types';
|
5
5
|
import { type ContractProcedure, type Schema, type SchemaInput, type SchemaOutput } from '@orpc/contract';
|
6
|
-
export interface ProcedureFunc<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema,
|
7
|
-
(input: SchemaOutput<TInputSchema>, context: MergeContext<TContext, TExtraContext>, meta: Meta): Promisable<SchemaInput<TOutputSchema,
|
6
|
+
export interface ProcedureFunc<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaInput<TOutputSchema>> {
|
7
|
+
(input: SchemaOutput<TInputSchema>, context: MergeContext<TContext, TExtraContext>, meta: Meta): Promisable<SchemaInput<TOutputSchema, THandlerOutput>>;
|
8
8
|
}
|
9
|
-
export interface ProcedureDef<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema,
|
9
|
+
export interface ProcedureDef<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaInput<TOutputSchema>> {
|
10
10
|
middlewares?: Middleware<MergeContext<TContext, TExtraContext>, Partial<TExtraContext> | undefined, SchemaOutput<TInputSchema>, any>[];
|
11
11
|
contract: ContractProcedure<TInputSchema, TOutputSchema>;
|
12
|
-
|
12
|
+
handler: ProcedureFunc<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>;
|
13
13
|
}
|
14
|
-
export declare class Procedure<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema,
|
14
|
+
export declare class Procedure<TContext extends Context, TExtraContext extends Context, TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaInput<TOutputSchema>> {
|
15
15
|
'~type': "Procedure";
|
16
|
-
'~orpc': ProcedureDef<TContext, TExtraContext, TInputSchema, TOutputSchema,
|
17
|
-
constructor(def: ProcedureDef<TContext, TExtraContext, TInputSchema, TOutputSchema,
|
16
|
+
'~orpc': ProcedureDef<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>;
|
17
|
+
constructor(def: ProcedureDef<TContext, TExtraContext, TInputSchema, TOutputSchema, THandlerOutput>);
|
18
18
|
}
|
19
19
|
export type ANY_PROCEDURE = Procedure<any, any, any, any, any>;
|
20
20
|
export type WELL_PROCEDURE = Procedure<Context, Context, Schema, Schema, unknown>;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/server",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.22.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -34,8 +34,8 @@
|
|
34
34
|
"dist"
|
35
35
|
],
|
36
36
|
"dependencies": {
|
37
|
-
"@orpc/
|
38
|
-
"@orpc/
|
37
|
+
"@orpc/contract": "0.22.0",
|
38
|
+
"@orpc/shared": "0.22.0"
|
39
39
|
},
|
40
40
|
"devDependencies": {
|
41
41
|
"zod": "^3.24.1"
|