@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.
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-MHVECKBC.js";
10
10
  import {
11
11
  CompositePlugin
12
- } from "./chunk-WQNNSBXW.js";
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" ? 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-TV5DRAST.js.map
@@ -117,4 +117,4 @@ export {
117
117
  CORSPlugin,
118
118
  ResponseHeadersPlugin
119
119
  };
120
- //# sourceMappingURL=chunk-WQNNSBXW.js.map
120
+ //# sourceMappingURL=chunk-TXHKQO7N.js.map
@@ -2,10 +2,10 @@ import {
2
2
  RPCCodec,
3
3
  RPCMatcher,
4
4
  StandardHandler
5
- } from "./chunk-77FU7QSO.js";
5
+ } from "./chunk-TV5DRAST.js";
6
6
 
7
7
  // src/adapters/fetch/rpc-handler.ts
8
- import { toFetchResponse, toStandardRequest } from "@orpc/server-standard-fetch";
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-47YYO5JS.js.map
32
+ //# sourceMappingURL=chunk-WDY5PTME.js.map
package/dist/fetch.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  RPCHandler
3
- } from "./chunk-47YYO5JS.js";
4
- import "./chunk-77FU7QSO.js";
3
+ } from "./chunk-WDY5PTME.js";
4
+ import "./chunk-TV5DRAST.js";
5
5
  import "./chunk-MHVECKBC.js";
6
- import "./chunk-WQNNSBXW.js";
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-47YYO5JS.js";
4
- import "./chunk-77FU7QSO.js";
3
+ } from "./chunk-WDY5PTME.js";
4
+ import "./chunk-TV5DRAST.js";
5
5
  import "./chunk-MHVECKBC.js";
6
- import "./chunk-WQNNSBXW.js";
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-47YYO5JS.js";
4
- import "./chunk-77FU7QSO.js";
3
+ } from "./chunk-WDY5PTME.js";
4
+ import "./chunk-TV5DRAST.js";
5
5
  import "./chunk-MHVECKBC.js";
6
- import "./chunk-WQNNSBXW.js";
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-77FU7QSO.js";
5
+ } from "./chunk-TV5DRAST.js";
6
6
  import "./chunk-MHVECKBC.js";
7
- import "./chunk-WQNNSBXW.js";
7
+ import "./chunk-TXHKQO7N.js";
8
8
 
9
9
  // src/adapters/node/rpc-handler.ts
10
- import { sendStandardResponse, toStandardRequest } from "@orpc/server-standard-node";
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
@@ -2,7 +2,7 @@ import {
2
2
  CORSPlugin,
3
3
  CompositePlugin,
4
4
  ResponseHeadersPlugin
5
- } from "./chunk-WQNNSBXW.js";
5
+ } from "./chunk-TXHKQO7N.js";
6
6
  export {
7
7
  CORSPlugin,
8
8
  CompositePlugin,
@@ -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-standard';
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>;
@@ -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
@@ -2,9 +2,9 @@ import {
2
2
  RPCCodec,
3
3
  RPCMatcher,
4
4
  StandardHandler
5
- } from "./chunk-77FU7QSO.js";
5
+ } from "./chunk-TV5DRAST.js";
6
6
  import "./chunk-MHVECKBC.js";
7
- import "./chunk-WQNNSBXW.js";
7
+ import "./chunk-TXHKQO7N.js";
8
8
  export {
9
9
  RPCCodec,
10
10
  RPCMatcher,
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.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/server-standard": "^0.4.0",
67
- "@orpc/server-standard-fetch": "^0.4.0",
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"
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"