@orpc/server 0.41.2 → 0.43.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-77FU7QSO.js → chunk-TV5DRAST.js} +4 -3
- package/dist/{chunk-WQNNSBXW.js → chunk-TXHKQO7N.js} +1 -1
- package/dist/{chunk-47YYO5JS.js → chunk-WDY5PTME.js} +3 -3
- package/dist/fetch.js +3 -3
- package/dist/hono.js +3 -3
- package/dist/index.js +1 -1
- package/dist/next.js +3 -3
- package/dist/node.js +3 -3
- package/dist/plugins.js +1 -1
- package/dist/src/adapters/standard/handler.d.ts +1 -1
- package/dist/src/adapters/standard/rpc-codec.d.ts +1 -1
- package/dist/src/adapters/standard/types.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/standard.js +2 -2
- package/package.json +7 -7
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
} from "./chunk-MHVECKBC.js";
|
10
10
|
import {
|
11
11
|
CompositePlugin
|
12
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-TXHKQO7N.js";
|
13
13
|
|
14
14
|
// src/adapters/standard/handler.ts
|
15
15
|
import { ORPCError, toORPCError } from "@orpc/client";
|
@@ -82,13 +82,14 @@ var StandardHandler = class {
|
|
82
82
|
|
83
83
|
// src/adapters/standard/rpc-codec.ts
|
84
84
|
import { RPCSerializer } from "@orpc/client/rpc";
|
85
|
+
import { parseEmptyableJSON } from "@orpc/standard-server";
|
85
86
|
var RPCCodec = class {
|
86
87
|
serializer;
|
87
88
|
constructor(options = {}) {
|
88
89
|
this.serializer = options.serializer ?? new RPCSerializer();
|
89
90
|
}
|
90
91
|
async decode(request, _params, _procedure) {
|
91
|
-
const serialized = request.method === "GET" ?
|
92
|
+
const serialized = request.method === "GET" ? parseEmptyableJSON(request.url.searchParams.getAll("data").at(-1)) : await request.body();
|
92
93
|
return this.serializer.deserialize(serialized);
|
93
94
|
}
|
94
95
|
encode(output, _procedure) {
|
@@ -178,4 +179,4 @@ export {
|
|
178
179
|
RPCCodec,
|
179
180
|
RPCMatcher
|
180
181
|
};
|
181
|
-
//# sourceMappingURL=chunk-
|
182
|
+
//# sourceMappingURL=chunk-TV5DRAST.js.map
|
@@ -2,10 +2,10 @@ import {
|
|
2
2
|
RPCCodec,
|
3
3
|
RPCMatcher,
|
4
4
|
StandardHandler
|
5
|
-
} from "./chunk-
|
5
|
+
} from "./chunk-TV5DRAST.js";
|
6
6
|
|
7
7
|
// src/adapters/fetch/rpc-handler.ts
|
8
|
-
import { toFetchResponse, toStandardRequest } from "@orpc/server-
|
8
|
+
import { toFetchResponse, toStandardRequest } from "@orpc/standard-server-fetch";
|
9
9
|
var RPCHandler = class {
|
10
10
|
standardHandler;
|
11
11
|
constructor(router, options) {
|
@@ -29,4 +29,4 @@ var RPCHandler = class {
|
|
29
29
|
export {
|
30
30
|
RPCHandler
|
31
31
|
};
|
32
|
-
//# sourceMappingURL=chunk-
|
32
|
+
//# sourceMappingURL=chunk-WDY5PTME.js.map
|
package/dist/fetch.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
RPCHandler
|
3
|
-
} from "./chunk-
|
4
|
-
import "./chunk-
|
3
|
+
} from "./chunk-WDY5PTME.js";
|
4
|
+
import "./chunk-TV5DRAST.js";
|
5
5
|
import "./chunk-MHVECKBC.js";
|
6
|
-
import "./chunk-
|
6
|
+
import "./chunk-TXHKQO7N.js";
|
7
7
|
export {
|
8
8
|
RPCHandler
|
9
9
|
};
|
package/dist/hono.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
RPCHandler
|
3
|
-
} from "./chunk-
|
4
|
-
import "./chunk-
|
3
|
+
} from "./chunk-WDY5PTME.js";
|
4
|
+
import "./chunk-TV5DRAST.js";
|
5
5
|
import "./chunk-MHVECKBC.js";
|
6
|
-
import "./chunk-
|
6
|
+
import "./chunk-TXHKQO7N.js";
|
7
7
|
|
8
8
|
// src/adapters/hono/middleware.ts
|
9
9
|
import { value } from "@orpc/shared";
|
package/dist/index.js
CHANGED
@@ -363,8 +363,8 @@ function createRouterClient(router, ...rest) {
|
|
363
363
|
// src/index.ts
|
364
364
|
import { isDefinedError, ORPCError, safe } from "@orpc/client";
|
365
365
|
import { eventIterator, type, ValidationError } from "@orpc/contract";
|
366
|
-
import { getEventMeta, withEventMeta } from "@orpc/server-standard";
|
367
366
|
import { onError, onFinish, onStart, onSuccess } from "@orpc/shared";
|
367
|
+
import { getEventMeta, withEventMeta } from "@orpc/standard-server";
|
368
368
|
export {
|
369
369
|
Builder,
|
370
370
|
DecoratedProcedure,
|
package/dist/next.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
RPCHandler
|
3
|
-
} from "./chunk-
|
4
|
-
import "./chunk-
|
3
|
+
} from "./chunk-WDY5PTME.js";
|
4
|
+
import "./chunk-TV5DRAST.js";
|
5
5
|
import "./chunk-MHVECKBC.js";
|
6
|
-
import "./chunk-
|
6
|
+
import "./chunk-TXHKQO7N.js";
|
7
7
|
|
8
8
|
// src/adapters/next/serve.ts
|
9
9
|
import { value } from "@orpc/shared";
|
package/dist/node.js
CHANGED
@@ -2,12 +2,12 @@ import {
|
|
2
2
|
RPCCodec,
|
3
3
|
RPCMatcher,
|
4
4
|
StandardHandler
|
5
|
-
} from "./chunk-
|
5
|
+
} from "./chunk-TV5DRAST.js";
|
6
6
|
import "./chunk-MHVECKBC.js";
|
7
|
-
import "./chunk-
|
7
|
+
import "./chunk-TXHKQO7N.js";
|
8
8
|
|
9
9
|
// src/adapters/node/rpc-handler.ts
|
10
|
-
import { sendStandardResponse, toStandardRequest } from "@orpc/server-
|
10
|
+
import { sendStandardResponse, toStandardRequest } from "@orpc/standard-server-node";
|
11
11
|
var RPCHandler = class {
|
12
12
|
standardHandler;
|
13
13
|
constructor(router, options) {
|
package/dist/plugins.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ErrorFromErrorMap, HTTPPath, Meta, Schema, SchemaOutput } from '@orpc/contract';
|
2
|
-
import type { StandardRequest, StandardResponse } from '@orpc/server-standard';
|
3
2
|
import type { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
3
|
+
import type { StandardRequest, StandardResponse } from '@orpc/standard-server';
|
4
4
|
import type { Context } from '../../context';
|
5
5
|
import type { Plugin } from '../../plugins';
|
6
6
|
import type { ProcedureClientInterceptorOptions } from '../../procedure-client';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import type { ORPCError } from '@orpc/client';
|
2
|
-
import type { StandardRequest, StandardResponse } from '@orpc/server-standard';
|
3
2
|
import type { AnyProcedure } from '../../procedure';
|
4
3
|
import type { StandardCodec, StandardParams } from './types';
|
5
4
|
import { RPCSerializer } from '@orpc/client/rpc';
|
5
|
+
import { type StandardRequest, type StandardResponse } from '@orpc/standard-server';
|
6
6
|
export interface StandardCodecOptions {
|
7
7
|
serializer?: RPCSerializer;
|
8
8
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ORPCError } from '@orpc/client';
|
2
2
|
import type { HTTPPath } from '@orpc/contract';
|
3
|
-
import type { StandardRequest, StandardResponse } from '@orpc/server
|
3
|
+
import type { StandardRequest, StandardResponse } from '@orpc/standard-server';
|
4
4
|
import type { AnyProcedure } from '../../procedure';
|
5
5
|
import type { AnyRouter } from '../../router';
|
6
6
|
export type StandardParams = Record<string, string>;
|
package/dist/src/index.d.ts
CHANGED
@@ -20,6 +20,6 @@ export * from './router-client';
|
|
20
20
|
export * from './utils';
|
21
21
|
export { isDefinedError, ORPCError, safe } from '@orpc/client';
|
22
22
|
export { eventIterator, type, ValidationError } from '@orpc/contract';
|
23
|
-
export { getEventMeta, withEventMeta } from '@orpc/server-standard';
|
24
23
|
export { onError, onFinish, onStart, onSuccess } from '@orpc/shared';
|
24
|
+
export { getEventMeta, withEventMeta } from '@orpc/standard-server';
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/standard.js
CHANGED
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.43.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -63,12 +63,12 @@
|
|
63
63
|
"next": ">=14.0.0"
|
64
64
|
},
|
65
65
|
"dependencies": {
|
66
|
-
"@orpc/
|
67
|
-
"@orpc/
|
68
|
-
"@orpc/
|
69
|
-
"@orpc/
|
70
|
-
"@orpc/
|
71
|
-
"@orpc/
|
66
|
+
"@orpc/client": "0.43.0",
|
67
|
+
"@orpc/shared": "0.43.0",
|
68
|
+
"@orpc/contract": "0.43.0",
|
69
|
+
"@orpc/standard-server-fetch": "0.43.0",
|
70
|
+
"@orpc/standard-server-node": "0.43.0",
|
71
|
+
"@orpc/standard-server": "0.43.0"
|
72
72
|
},
|
73
73
|
"devDependencies": {
|
74
74
|
"light-my-request": "^6.5.1"
|