@orpc/server 0.0.0-next.244297c → 0.0.0-next.253950b

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 CHANGED
@@ -49,6 +49,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
49
49
  - [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
50
50
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
51
51
  - [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
52
+ - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with NestJS.
52
53
  - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
53
54
  - [@orpc/react-query](https://www.npmjs.com/package/@orpc/react-query): Integration with [React Query](https://tanstack.com/query/latest/docs/framework/react/overview).
54
55
  - [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
@@ -2,8 +2,9 @@ import { resolveMaybeOptionalOptions } from '@orpc/shared';
2
2
  import { ServerPeer } from '@orpc/standard-server-peer';
3
3
  import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BVwwTHyO.mjs';
4
4
  import '@orpc/client';
5
+ import '@orpc/standard-server';
5
6
  import '@orpc/contract';
6
- import { b as StandardRPCHandler } from '../../shared/server.SxlTJfG2.mjs';
7
+ import { b as StandardRPCHandler } from '../../shared/server.4FnxLwwr.mjs';
7
8
  import '@orpc/client/standard';
8
9
  import '../../shared/server.DG7Tamti.mjs';
9
10
 
@@ -2,8 +2,9 @@ import { resolveMaybeOptionalOptions } from '@orpc/shared';
2
2
  import { ServerPeer } from '@orpc/standard-server-peer';
3
3
  import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BVwwTHyO.mjs';
4
4
  import '@orpc/client';
5
+ import '@orpc/standard-server';
5
6
  import '@orpc/contract';
6
- import { b as StandardRPCHandler } from '../../shared/server.SxlTJfG2.mjs';
7
+ import { b as StandardRPCHandler } from '../../shared/server.4FnxLwwr.mjs';
7
8
  import '@orpc/client/standard';
8
9
  import '../../shared/server.DG7Tamti.mjs';
9
10
 
@@ -2,11 +2,11 @@ import { ORPCError } from '@orpc/client';
2
2
  import { toArray, intercept, resolveMaybeOptionalOptions } from '@orpc/shared';
3
3
  import { toStandardLazyRequest, toFetchResponse } from '@orpc/standard-server-fetch';
4
4
  import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BVwwTHyO.mjs';
5
+ import '@orpc/standard-server';
5
6
  import '@orpc/contract';
6
- import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.SxlTJfG2.mjs';
7
+ import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.4FnxLwwr.mjs';
7
8
  import '@orpc/client/standard';
8
9
  import '@orpc/standard-server/batch';
9
- import '@orpc/standard-server';
10
10
  import { S as StrictGetMethodPlugin } from '../../shared/server.BW-nUGgA.mjs';
11
11
  import '../../shared/server.DG7Tamti.mjs';
12
12
 
@@ -2,11 +2,11 @@ import { ORPCError } from '@orpc/client';
2
2
  import { toArray, intercept, resolveMaybeOptionalOptions } from '@orpc/shared';
3
3
  import { toStandardLazyRequest, sendStandardResponse } from '@orpc/standard-server-node';
4
4
  import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BVwwTHyO.mjs';
5
+ import '@orpc/standard-server';
5
6
  import '@orpc/contract';
6
- import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.SxlTJfG2.mjs';
7
+ import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.4FnxLwwr.mjs';
7
8
  import '@orpc/client/standard';
8
9
  import '@orpc/standard-server/batch';
9
- import '@orpc/standard-server';
10
10
  import { S as StrictGetMethodPlugin } from '../../shared/server.BW-nUGgA.mjs';
11
11
  import '../../shared/server.DG7Tamti.mjs';
12
12
 
@@ -1,6 +1,7 @@
1
- export { C as CompositeStandardHandlerPlugin, S as StandardHandler, a as StandardRPCCodec, b as StandardRPCHandler, c as StandardRPCMatcher } from '../../shared/server.SxlTJfG2.mjs';
1
+ export { C as CompositeStandardHandlerPlugin, S as StandardHandler, a as StandardRPCCodec, b as StandardRPCHandler, c as StandardRPCMatcher } from '../../shared/server.4FnxLwwr.mjs';
2
2
  import '@orpc/client/standard';
3
3
  import '@orpc/client';
4
4
  import '@orpc/shared';
5
+ import '@orpc/standard-server';
5
6
  import '../../shared/server.DG7Tamti.mjs';
6
7
  import '@orpc/contract';
@@ -2,8 +2,9 @@ import { resolveMaybeOptionalOptions } from '@orpc/shared';
2
2
  import { ServerPeer } from '@orpc/standard-server-peer';
3
3
  import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BVwwTHyO.mjs';
4
4
  import '@orpc/client';
5
+ import '@orpc/standard-server';
5
6
  import '@orpc/contract';
6
- import { b as StandardRPCHandler } from '../../shared/server.SxlTJfG2.mjs';
7
+ import { b as StandardRPCHandler } from '../../shared/server.4FnxLwwr.mjs';
7
8
  import '@orpc/client/standard';
8
9
  import '../../shared/server.DG7Tamti.mjs';
9
10
 
@@ -2,8 +2,9 @@ import { resolveMaybeOptionalOptions } from '@orpc/shared';
2
2
  import { ServerPeer } from '@orpc/standard-server-peer';
3
3
  import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BVwwTHyO.mjs';
4
4
  import '@orpc/client';
5
+ import '@orpc/standard-server';
5
6
  import '@orpc/contract';
6
- import { b as StandardRPCHandler } from '../../shared/server.SxlTJfG2.mjs';
7
+ import { b as StandardRPCHandler } from '../../shared/server.4FnxLwwr.mjs';
7
8
  import '@orpc/client/standard';
8
9
  import '../../shared/server.DG7Tamti.mjs';
9
10
 
@@ -1,6 +1,7 @@
1
1
  import { toHttpPath, StandardRPCJsonSerializer, StandardRPCSerializer } from '@orpc/client/standard';
2
2
  import { ORPCError, toORPCError } from '@orpc/client';
3
3
  import { toArray, intercept, parseEmptyableJSON } from '@orpc/shared';
4
+ import { flattenHeader } from '@orpc/standard-server';
4
5
  import { c as createProcedureClient, t as traverseContractProcedures, i as isProcedure, u as unlazy, g as getRouter, a as createContractedProcedure } from './server.DG7Tamti.mjs';
5
6
 
6
7
  class CompositeStandardHandlerPlugin {
@@ -59,8 +60,10 @@ class StandardHandler {
59
60
  isDecoding = true;
60
61
  const input = await this.codec.decode(request2, match.params, match.procedure);
61
62
  isDecoding = false;
62
- const lastEventId = Array.isArray(request2.headers["last-event-id"]) ? request2.headers["last-event-id"].at(-1) : request2.headers["last-event-id"];
63
- const output = await client(input, { signal: request2.signal, lastEventId });
63
+ const output = await client(input, {
64
+ signal: request2.signal,
65
+ lastEventId: flattenHeader(request2.headers["last-event-id"])
66
+ });
64
67
  const response = this.codec.encode(output, match.procedure);
65
68
  return {
66
69
  matched: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/server",
3
3
  "type": "module",
4
- "version": "0.0.0-next.244297c",
4
+ "version": "0.0.0-next.253950b",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -67,14 +67,22 @@
67
67
  "crossws": ">=0.3.4",
68
68
  "ws": ">=8.18.1"
69
69
  },
70
+ "peerDependenciesMeta": {
71
+ "crossws": {
72
+ "optional": true
73
+ },
74
+ "ws": {
75
+ "optional": true
76
+ }
77
+ },
70
78
  "dependencies": {
71
- "@orpc/client": "0.0.0-next.244297c",
72
- "@orpc/contract": "0.0.0-next.244297c",
73
- "@orpc/shared": "0.0.0-next.244297c",
74
- "@orpc/standard-server": "0.0.0-next.244297c",
75
- "@orpc/standard-server-fetch": "0.0.0-next.244297c",
76
- "@orpc/standard-server-node": "0.0.0-next.244297c",
77
- "@orpc/standard-server-peer": "0.0.0-next.244297c"
79
+ "@orpc/client": "0.0.0-next.253950b",
80
+ "@orpc/contract": "0.0.0-next.253950b",
81
+ "@orpc/shared": "0.0.0-next.253950b",
82
+ "@orpc/standard-server": "0.0.0-next.253950b",
83
+ "@orpc/standard-server-fetch": "0.0.0-next.253950b",
84
+ "@orpc/standard-server-node": "0.0.0-next.253950b",
85
+ "@orpc/standard-server-peer": "0.0.0-next.253950b"
78
86
  },
79
87
  "devDependencies": {
80
88
  "@types/ws": "^8.18.1",