@orpc/server 0.41.2 → 0.42.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.
@@ -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/server-standard";
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" ? JSON.parse(request.url.searchParams.getAll("data").at(-1)) : await request.body();
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-77FU7QSO.js.map
182
+ //# sourceMappingURL=chunk-7A2ZRAPK.js.map
@@ -2,7 +2,7 @@ import {
2
2
  RPCCodec,
3
3
  RPCMatcher,
4
4
  StandardHandler
5
- } from "./chunk-77FU7QSO.js";
5
+ } from "./chunk-7A2ZRAPK.js";
6
6
 
7
7
  // src/adapters/fetch/rpc-handler.ts
8
8
  import { toFetchResponse, toStandardRequest } from "@orpc/server-standard-fetch";
@@ -29,4 +29,4 @@ var RPCHandler = class {
29
29
  export {
30
30
  RPCHandler
31
31
  };
32
- //# sourceMappingURL=chunk-47YYO5JS.js.map
32
+ //# sourceMappingURL=chunk-MEBJNUSY.js.map
package/dist/fetch.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RPCHandler
3
- } from "./chunk-47YYO5JS.js";
4
- import "./chunk-77FU7QSO.js";
3
+ } from "./chunk-MEBJNUSY.js";
4
+ import "./chunk-7A2ZRAPK.js";
5
5
  import "./chunk-MHVECKBC.js";
6
6
  import "./chunk-WQNNSBXW.js";
7
7
  export {
package/dist/hono.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RPCHandler
3
- } from "./chunk-47YYO5JS.js";
4
- import "./chunk-77FU7QSO.js";
3
+ } from "./chunk-MEBJNUSY.js";
4
+ import "./chunk-7A2ZRAPK.js";
5
5
  import "./chunk-MHVECKBC.js";
6
6
  import "./chunk-WQNNSBXW.js";
7
7
 
package/dist/next.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RPCHandler
3
- } from "./chunk-47YYO5JS.js";
4
- import "./chunk-77FU7QSO.js";
3
+ } from "./chunk-MEBJNUSY.js";
4
+ import "./chunk-7A2ZRAPK.js";
5
5
  import "./chunk-MHVECKBC.js";
6
6
  import "./chunk-WQNNSBXW.js";
7
7
 
package/dist/node.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  RPCCodec,
3
3
  RPCMatcher,
4
4
  StandardHandler
5
- } from "./chunk-77FU7QSO.js";
5
+ } from "./chunk-7A2ZRAPK.js";
6
6
  import "./chunk-MHVECKBC.js";
7
7
  import "./chunk-WQNNSBXW.js";
8
8
 
@@ -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/server-standard';
6
6
  export interface StandardCodecOptions {
7
7
  serializer?: RPCSerializer;
8
8
  }
package/dist/standard.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  RPCCodec,
3
3
  RPCMatcher,
4
4
  StandardHandler
5
- } from "./chunk-77FU7QSO.js";
5
+ } from "./chunk-7A2ZRAPK.js";
6
6
  import "./chunk-MHVECKBC.js";
7
7
  import "./chunk-WQNNSBXW.js";
8
8
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/server",
3
3
  "type": "module",
4
- "version": "0.41.2",
4
+ "version": "0.42.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -66,9 +66,9 @@
66
66
  "@orpc/server-standard": "^0.4.0",
67
67
  "@orpc/server-standard-fetch": "^0.4.0",
68
68
  "@orpc/server-standard-node": "^0.4.0",
69
- "@orpc/contract": "0.41.2",
70
- "@orpc/client": "0.41.2",
71
- "@orpc/shared": "0.41.2"
69
+ "@orpc/client": "0.42.0",
70
+ "@orpc/shared": "0.42.0",
71
+ "@orpc/contract": "0.42.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "light-my-request": "^6.5.1"