@orpc/standard-server-node 0.0.0-next.fa8d145 → 0.0.0-next.fc1437c

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
@@ -17,6 +17,9 @@
17
17
  <a href="https://discord.gg/TXEbwRBvQn">
18
18
  <img alt="Discord" src="https://img.shields.io/discord/1308966753044398161?color=7389D8&label&logo=discord&logoColor=ffffff" />
19
19
  </a>
20
+ <a href="https://deepwiki.com/unnoq/orpc">
21
+ <img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki">
22
+ </a>
20
23
  </div>
21
24
 
22
25
  <h3 align="center">Typesafe APIs Made Simple 🪄</h3>
@@ -30,7 +33,8 @@
30
33
  - **🔗 End-to-End Type Safety**: Ensure type-safe inputs, outputs, and errors from client to server.
31
34
  - **📘 First-Class OpenAPI**: Built-in support that fully adheres to the OpenAPI standard.
32
35
  - **📝 Contract-First Development**: Optionally define your API contract before implementation.
33
- - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte), Pinia Colada, and more.
36
+ - **🔍 First-Class OpenTelemetry**: Seamlessly integrate with OpenTelemetry for observability.
37
+ - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), SWR, Pinia Colada, and more.
34
38
  - **🚀 Server Actions**: Fully compatible with React Server Actions on Next.js, TanStack Start, and other platforms.
35
39
  - **🔠 Standard Schema Support**: Works out of the box with Zod, Valibot, ArkType, and other schema validators.
36
40
  - **🗃️ Native Types**: Supports native types like Date, File, Blob, BigInt, URL, and more.
@@ -38,7 +42,6 @@
38
42
  - **📡 SSE & Streaming**: Enjoy full type-safe support for SSE and streaming.
39
43
  - **🌍 Multi-Runtime Support**: Fast and lightweight on Cloudflare, Deno, Bun, Node.js, and beyond.
40
44
  - **🔌 Extendability**: Easily extend functionality with plugins, middleware, and interceptors.
41
- - **🛡️ Reliability**: Well-tested, TypeScript-based, production-ready, and MIT licensed.
42
45
 
43
46
  ## Documentation
44
47
 
@@ -49,14 +52,14 @@ You can find the full documentation [here](https://orpc.unnoq.com).
49
52
  - [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
50
53
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
51
54
  - [@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.
55
+ - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
56
+ - [@orpc/otel](https://www.npmjs.com/package/@orpc/otel): [OpenTelemetry](https://opentelemetry.io/) integration for observability.
57
+ - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with [NestJS](https://nestjs.com/).
53
58
  - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
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).
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).
56
- - [@orpc/solid-query](https://www.npmjs.com/package/@orpc/solid-query): Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview).
57
- - [@orpc/svelte-query](https://www.npmjs.com/package/@orpc/svelte-query): Integration with [Svelte Query](https://tanstack.com/query/latest/docs/framework/svelte/overview).
59
+ - [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): [TanStack Query](https://tanstack.com/query/latest) integration.
60
+ - [@orpc/experimental-react-swr](https://www.npmjs.com/package/@orpc/experimental-react-swr): [SWR](https://swr.vercel.app/) integration.
58
61
  - [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
59
- - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
62
+ - [@orpc/hey-api](https://www.npmjs.com/package/@orpc/hey-api): [Hey API](https://heyapi.dev/) integration.
60
63
  - [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
61
64
  - [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot): OpenAPI spec generation from [Valibot](https://valibot.dev/).
62
65
  - [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype): OpenAPI spec generation from [ArkType](https://arktype.io/).
package/dist/index.d.mts CHANGED
@@ -1,28 +1,13 @@
1
1
  import { StandardBody, StandardHeaders, StandardLazyRequest, StandardResponse } from '@orpc/standard-server';
2
- import { Readable } from 'node:stream';
2
+ import { ToEventIteratorOptions as ToEventIteratorOptions$1, ToEventStreamOptions as ToEventStreamOptions$1 } from '@orpc/standard-server-fetch';
3
+ import Stream, { Readable } from 'node:stream';
3
4
  import { IncomingMessage, ServerResponse } from 'node:http';
4
5
  import { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
5
6
 
6
- declare function toEventIterator(stream: Readable): AsyncIteratorObject<unknown | void, unknown | void, void> & AsyncGenerator<unknown | void, unknown | void, void>;
7
- interface ToEventStreamOptions {
8
- /**
9
- * If true, a ping comment is sent periodically to keep the connection alive.
10
- *
11
- * @default true
12
- */
13
- eventIteratorKeepAliveEnabled?: boolean;
14
- /**
15
- * Interval (in milliseconds) between ping comments sent after the last event.
16
- *
17
- * @default 5000
18
- */
19
- eventIteratorKeepAliveInterval?: number;
20
- /**
21
- * The content of the ping comment. Must not include newline characters.
22
- *
23
- * @default ''
24
- */
25
- eventIteratorKeepAliveComment?: string;
7
+ interface ToEventIteratorOptions extends ToEventIteratorOptions$1 {
8
+ }
9
+ declare function toEventIterator(stream: Readable, options?: ToEventIteratorOptions): AsyncIteratorObject<unknown | void, unknown | void, void> & AsyncGenerator<unknown | void, unknown | void, void>;
10
+ interface ToEventStreamOptions extends ToEventStreamOptions$1 {
26
11
  }
27
12
  declare function toEventStream(iterator: AsyncIterator<unknown | void, unknown | void, void>, options?: ToEventStreamOptions): Readable;
28
13
 
@@ -35,7 +20,9 @@ type NodeHttpRequest = (IncomingMessage | Http2ServerRequest) & {
35
20
  };
36
21
  type NodeHttpResponse = ServerResponse | Http2ServerResponse;
37
22
 
38
- declare function toStandardBody(req: NodeHttpRequest): Promise<StandardBody>;
23
+ interface ToStandardBodyOptions extends ToEventIteratorOptions {
24
+ }
25
+ declare function toStandardBody(req: NodeHttpRequest, options?: ToStandardBodyOptions): Promise<StandardBody>;
39
26
  interface ToNodeHttpBodyOptions extends ToEventStreamOptions {
40
27
  }
41
28
  /**
@@ -45,13 +32,17 @@ interface ToNodeHttpBodyOptions extends ToEventStreamOptions {
45
32
  */
46
33
  declare function toNodeHttpBody(body: StandardBody, headers: StandardHeaders, options?: ToNodeHttpBodyOptions): Readable | undefined | string;
47
34
 
35
+ declare function toStandardMethod(method: string | undefined): string;
36
+
48
37
  declare function toStandardLazyRequest(req: NodeHttpRequest, res: NodeHttpResponse): StandardLazyRequest;
49
38
 
50
39
  interface SendStandardResponseOptions extends ToNodeHttpBodyOptions {
51
40
  }
52
41
  declare function sendStandardResponse(res: NodeHttpResponse, standardResponse: StandardResponse, options?: SendStandardResponseOptions): Promise<void>;
53
42
 
54
- declare function toAbortSignal(res: NodeHttpResponse): AbortSignal;
43
+ declare function toAbortSignal(stream: Stream.Writable): AbortSignal;
44
+
45
+ declare function toStandardUrl(req: NodeHttpRequest): URL;
55
46
 
56
- export { sendStandardResponse, toAbortSignal, toEventIterator, toEventStream, toNodeHttpBody, toStandardBody, toStandardLazyRequest };
57
- export type { NodeHttpRequest, NodeHttpResponse, SendStandardResponseOptions, ToEventStreamOptions, ToNodeHttpBodyOptions };
47
+ export { sendStandardResponse, toAbortSignal, toEventIterator, toEventStream, toNodeHttpBody, toStandardBody, toStandardLazyRequest, toStandardMethod, toStandardUrl };
48
+ export type { NodeHttpRequest, NodeHttpResponse, SendStandardResponseOptions, ToEventIteratorOptions, ToEventStreamOptions, ToNodeHttpBodyOptions, ToStandardBodyOptions };
package/dist/index.d.ts CHANGED
@@ -1,28 +1,13 @@
1
1
  import { StandardBody, StandardHeaders, StandardLazyRequest, StandardResponse } from '@orpc/standard-server';
2
- import { Readable } from 'node:stream';
2
+ import { ToEventIteratorOptions as ToEventIteratorOptions$1, ToEventStreamOptions as ToEventStreamOptions$1 } from '@orpc/standard-server-fetch';
3
+ import Stream, { Readable } from 'node:stream';
3
4
  import { IncomingMessage, ServerResponse } from 'node:http';
4
5
  import { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
5
6
 
6
- declare function toEventIterator(stream: Readable): AsyncIteratorObject<unknown | void, unknown | void, void> & AsyncGenerator<unknown | void, unknown | void, void>;
7
- interface ToEventStreamOptions {
8
- /**
9
- * If true, a ping comment is sent periodically to keep the connection alive.
10
- *
11
- * @default true
12
- */
13
- eventIteratorKeepAliveEnabled?: boolean;
14
- /**
15
- * Interval (in milliseconds) between ping comments sent after the last event.
16
- *
17
- * @default 5000
18
- */
19
- eventIteratorKeepAliveInterval?: number;
20
- /**
21
- * The content of the ping comment. Must not include newline characters.
22
- *
23
- * @default ''
24
- */
25
- eventIteratorKeepAliveComment?: string;
7
+ interface ToEventIteratorOptions extends ToEventIteratorOptions$1 {
8
+ }
9
+ declare function toEventIterator(stream: Readable, options?: ToEventIteratorOptions): AsyncIteratorObject<unknown | void, unknown | void, void> & AsyncGenerator<unknown | void, unknown | void, void>;
10
+ interface ToEventStreamOptions extends ToEventStreamOptions$1 {
26
11
  }
27
12
  declare function toEventStream(iterator: AsyncIterator<unknown | void, unknown | void, void>, options?: ToEventStreamOptions): Readable;
28
13
 
@@ -35,7 +20,9 @@ type NodeHttpRequest = (IncomingMessage | Http2ServerRequest) & {
35
20
  };
36
21
  type NodeHttpResponse = ServerResponse | Http2ServerResponse;
37
22
 
38
- declare function toStandardBody(req: NodeHttpRequest): Promise<StandardBody>;
23
+ interface ToStandardBodyOptions extends ToEventIteratorOptions {
24
+ }
25
+ declare function toStandardBody(req: NodeHttpRequest, options?: ToStandardBodyOptions): Promise<StandardBody>;
39
26
  interface ToNodeHttpBodyOptions extends ToEventStreamOptions {
40
27
  }
41
28
  /**
@@ -45,13 +32,17 @@ interface ToNodeHttpBodyOptions extends ToEventStreamOptions {
45
32
  */
46
33
  declare function toNodeHttpBody(body: StandardBody, headers: StandardHeaders, options?: ToNodeHttpBodyOptions): Readable | undefined | string;
47
34
 
35
+ declare function toStandardMethod(method: string | undefined): string;
36
+
48
37
  declare function toStandardLazyRequest(req: NodeHttpRequest, res: NodeHttpResponse): StandardLazyRequest;
49
38
 
50
39
  interface SendStandardResponseOptions extends ToNodeHttpBodyOptions {
51
40
  }
52
41
  declare function sendStandardResponse(res: NodeHttpResponse, standardResponse: StandardResponse, options?: SendStandardResponseOptions): Promise<void>;
53
42
 
54
- declare function toAbortSignal(res: NodeHttpResponse): AbortSignal;
43
+ declare function toAbortSignal(stream: Stream.Writable): AbortSignal;
44
+
45
+ declare function toStandardUrl(req: NodeHttpRequest): URL;
55
46
 
56
- export { sendStandardResponse, toAbortSignal, toEventIterator, toEventStream, toNodeHttpBody, toStandardBody, toStandardLazyRequest };
57
- export type { NodeHttpRequest, NodeHttpResponse, SendStandardResponseOptions, ToEventStreamOptions, ToNodeHttpBodyOptions };
47
+ export { sendStandardResponse, toAbortSignal, toEventIterator, toEventStream, toNodeHttpBody, toStandardBody, toStandardLazyRequest, toStandardMethod, toStandardUrl };
48
+ export type { NodeHttpRequest, NodeHttpResponse, SendStandardResponseOptions, ToEventIteratorOptions, ToEventStreamOptions, ToNodeHttpBodyOptions, ToStandardBodyOptions };
package/dist/index.mjs CHANGED
@@ -1,127 +1,42 @@
1
1
  import { Readable } from 'node:stream';
2
- import { createAsyncIteratorObject, parseEmptyableJSON, isTypescriptObject, stringifyJSON, isAsyncIteratorObject, once } from '@orpc/shared';
3
- import { EventDecoderStream, withEventMeta, ErrorEvent, encodeEventMessage, getEventMeta, getFilenameFromContentDisposition, flattenHeader, generateContentDisposition } from '@orpc/standard-server';
2
+ import { runWithSpan, parseEmptyableJSON, isAsyncIteratorObject, stringifyJSON, AbortError, guard, once } from '@orpc/shared';
3
+ import { getFilenameFromContentDisposition, flattenHeader, generateContentDisposition } from '@orpc/standard-server';
4
+ import { toEventIterator as toEventIterator$1, toEventStream as toEventStream$1 } from '@orpc/standard-server-fetch';
4
5
 
5
- function toEventIterator(stream) {
6
- const eventStream = Readable.toWeb(stream).pipeThrough(new TextDecoderStream()).pipeThrough(new EventDecoderStream());
7
- const reader = eventStream.getReader();
8
- return createAsyncIteratorObject(async () => {
9
- while (true) {
10
- const { done, value } = await reader.read();
11
- if (done) {
12
- return { done: true, value: void 0 };
13
- }
14
- switch (value.event) {
15
- case "message": {
16
- let message = parseEmptyableJSON(value.data);
17
- if (isTypescriptObject(message)) {
18
- message = withEventMeta(message, value);
19
- }
20
- return { done: false, value: message };
21
- }
22
- case "error": {
23
- let error = new ErrorEvent({
24
- data: parseEmptyableJSON(value.data)
25
- });
26
- error = withEventMeta(error, value);
27
- throw error;
28
- }
29
- case "done": {
30
- let done2 = parseEmptyableJSON(value.data);
31
- if (isTypescriptObject(done2)) {
32
- done2 = withEventMeta(done2, value);
33
- }
34
- return { done: true, value: done2 };
35
- }
36
- }
37
- }
38
- }, async () => {
39
- await reader.cancel();
40
- });
6
+ function toEventIterator(stream, options = {}) {
7
+ return toEventIterator$1(Readable.toWeb(stream), options);
41
8
  }
42
9
  function toEventStream(iterator, options = {}) {
43
- const keepAliveEnabled = options.eventIteratorKeepAliveEnabled ?? true;
44
- const keepAliveInterval = options.eventIteratorKeepAliveInterval ?? 5e3;
45
- const keepAliveComment = options.eventIteratorKeepAliveComment ?? "";
46
- let cancelled = false;
47
- let timeout;
48
- const stream = new ReadableStream({
49
- async pull(controller) {
50
- try {
51
- if (keepAliveEnabled) {
52
- timeout = setInterval(() => {
53
- controller.enqueue(encodeEventMessage({
54
- comments: [keepAliveComment]
55
- }));
56
- }, keepAliveInterval);
57
- }
58
- const value = await iterator.next();
59
- clearInterval(timeout);
60
- if (cancelled) {
61
- return;
62
- }
63
- const meta = getEventMeta(value.value);
64
- if (!value.done || value.value !== void 0 || meta !== void 0) {
65
- controller.enqueue(encodeEventMessage({
66
- ...meta,
67
- event: value.done ? "done" : "message",
68
- data: stringifyJSON(value.value)
69
- }));
70
- }
71
- if (value.done) {
72
- controller.close();
73
- }
74
- } catch (err) {
75
- clearInterval(timeout);
76
- if (cancelled) {
77
- return;
78
- }
79
- controller.enqueue(encodeEventMessage({
80
- ...getEventMeta(err),
81
- event: "error",
82
- data: err instanceof ErrorEvent ? stringifyJSON(err.data) : void 0
83
- }));
84
- controller.close();
85
- }
86
- },
87
- async cancel() {
88
- cancelled = true;
89
- clearInterval(timeout);
90
- await iterator.return?.();
91
- }
92
- });
93
- return Readable.fromWeb(stream);
10
+ return Readable.fromWeb(toEventStream$1(iterator, options));
94
11
  }
95
12
 
96
- async function toStandardBody(req) {
97
- const method = req.method ?? "GET";
98
- if (method === "GET" || method === "HEAD") {
99
- return void 0;
100
- }
101
- const contentDisposition = req.headers["content-disposition"];
102
- const contentType = req.headers["content-type"];
103
- if (typeof contentDisposition === "string") {
104
- const fileName = getFilenameFromContentDisposition(contentDisposition) ?? "blob";
105
- return _streamToFile(req, fileName, contentType ?? "");
106
- }
107
- if (!contentType || contentType.startsWith("application/json")) {
108
- const text = await _streamToString(req);
109
- return parseEmptyableJSON(text);
110
- }
111
- if (contentType.startsWith("multipart/form-data")) {
112
- return _streamToFormData(req, contentType);
113
- }
114
- if (contentType.startsWith("application/x-www-form-urlencoded")) {
115
- const text = await _streamToString(req);
116
- return new URLSearchParams(text);
117
- }
118
- if (contentType.startsWith("text/event-stream")) {
119
- return toEventIterator(req);
120
- }
121
- if (contentType.startsWith("text/plain")) {
122
- return _streamToString(req);
123
- }
124
- return _streamToFile(req, "blob", contentType);
13
+ function toStandardBody(req, options = {}) {
14
+ return runWithSpan({ name: "parse_standard_body", signal: options.signal }, async () => {
15
+ const contentDisposition = req.headers["content-disposition"];
16
+ const contentType = req.headers["content-type"];
17
+ if (typeof contentDisposition === "string") {
18
+ const fileName = getFilenameFromContentDisposition(contentDisposition) ?? "blob";
19
+ return _streamToFile(req, fileName, contentType ?? "");
20
+ }
21
+ if (!contentType || contentType.startsWith("application/json")) {
22
+ const text = await _streamToString(req);
23
+ return parseEmptyableJSON(text);
24
+ }
25
+ if (contentType.startsWith("multipart/form-data")) {
26
+ return _streamToFormData(req, contentType);
27
+ }
28
+ if (contentType.startsWith("application/x-www-form-urlencoded")) {
29
+ const text = await _streamToString(req);
30
+ return new URLSearchParams(text);
31
+ }
32
+ if (contentType.startsWith("text/event-stream")) {
33
+ return toEventIterator(req, options);
34
+ }
35
+ if (contentType.startsWith("text/plain")) {
36
+ return _streamToString(req);
37
+ }
38
+ return _streamToFile(req, "blob", contentType);
39
+ });
125
40
  }
126
41
  function toNodeHttpBody(body, headers, options = {}) {
127
42
  const currentContentDisposition = flattenHeader(headers["content-disposition"]);
@@ -147,8 +62,6 @@ function toNodeHttpBody(body, headers, options = {}) {
147
62
  }
148
63
  if (isAsyncIteratorObject(body)) {
149
64
  headers["content-type"] = "text/event-stream";
150
- headers["cache-control"] = "no-cache";
151
- headers.connection = "keep-alive";
152
65
  return toEventStream(body, options);
153
66
  }
154
67
  headers["content-type"] = "application/json";
@@ -177,54 +90,60 @@ async function _streamToFile(stream, fileName, contentType) {
177
90
  return new File(chunks, fileName, { type: contentType });
178
91
  }
179
92
 
180
- function toAbortSignal(res) {
93
+ function toStandardMethod(method) {
94
+ return method ?? "GET";
95
+ }
96
+
97
+ function toAbortSignal(stream) {
181
98
  const controller = new AbortController();
182
- res.on("close", () => {
183
- if (res.errored) {
184
- controller.abort(res.errored.toString());
185
- } else if (!res.writableFinished) {
186
- controller.abort("Client connection prematurely closed.");
187
- } else {
188
- controller.abort("Server closed the connection.");
99
+ stream.once("error", (error) => controller.abort(error));
100
+ stream.once("close", () => {
101
+ if (!stream.writableFinished) {
102
+ controller.abort(new AbortError("Writable stream closed before it finished writing"));
189
103
  }
190
104
  });
191
105
  return controller.signal;
192
106
  }
193
107
 
194
- function toStandardLazyRequest(req, res) {
195
- const method = req.method ?? "GET";
108
+ function toStandardUrl(req) {
196
109
  const protocol = "encrypted" in req.socket && req.socket.encrypted ? "https:" : "http:";
197
- const host = req.headers.host ?? "localhost";
198
- const url = new URL(req.originalUrl ?? req.url ?? "/", `${protocol}//${host}`);
110
+ const origin = guard(() => new URL(`${protocol}//${req.headers.host ?? "localhost"}`).origin) ?? `${protocol}//localhost`;
111
+ const path = req.originalUrl ?? req.url ?? "/";
112
+ return new URL(`${origin}${path.startsWith("/") ? "" : "/"}${path}`);
113
+ }
114
+
115
+ function toStandardLazyRequest(req, res) {
116
+ const signal = toAbortSignal(res);
199
117
  return {
200
- method,
201
- url,
118
+ method: toStandardMethod(req.method),
119
+ url: toStandardUrl(req),
202
120
  headers: req.headers,
203
- body: once(() => toStandardBody(req)),
204
- signal: toAbortSignal(res)
121
+ body: once(() => toStandardBody(req, { signal })),
122
+ signal
205
123
  };
206
124
  }
207
125
 
208
126
  function sendStandardResponse(res, standardResponse, options = {}) {
209
127
  return new Promise((resolve, reject) => {
210
- res.on("error", reject);
211
- res.on("finish", resolve);
128
+ res.once("error", reject);
129
+ res.once("close", resolve);
212
130
  const resHeaders = { ...standardResponse.headers };
213
131
  const resBody = toNodeHttpBody(standardResponse.body, resHeaders, options);
214
132
  res.writeHead(standardResponse.status, resHeaders);
215
133
  if (resBody === void 0) {
216
- res.end(resBody);
134
+ res.end();
217
135
  } else if (typeof resBody === "string") {
218
136
  res.end(resBody);
219
137
  } else {
220
- res.on("close", () => {
138
+ res.once("close", () => {
221
139
  if (!resBody.closed) {
222
140
  resBody.destroy(res.errored ?? void 0);
223
141
  }
224
142
  });
143
+ resBody.once("error", (error) => res.destroy(error));
225
144
  resBody.pipe(res);
226
145
  }
227
146
  });
228
147
  }
229
148
 
230
- export { sendStandardResponse, toAbortSignal, toEventIterator, toEventStream, toNodeHttpBody, toStandardBody, toStandardLazyRequest };
149
+ export { sendStandardResponse, toAbortSignal, toEventIterator, toEventStream, toNodeHttpBody, toStandardBody, toStandardLazyRequest, toStandardMethod, toStandardUrl };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/standard-server-node",
3
3
  "type": "module",
4
- "version": "0.0.0-next.fa8d145",
4
+ "version": "0.0.0-next.fc1437c",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -23,13 +23,14 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@orpc/shared": "0.0.0-next.fa8d145",
27
- "@orpc/standard-server": "0.0.0-next.fa8d145"
26
+ "@orpc/shared": "0.0.0-next.fc1437c",
27
+ "@orpc/standard-server": "0.0.0-next.fc1437c",
28
+ "@orpc/standard-server-fetch": "0.0.0-next.fc1437c"
28
29
  },
29
30
  "devDependencies": {
30
- "@types/node": "^22.15.17",
31
+ "@types/node": "^22.15.30",
31
32
  "@types/supertest": "^6.0.3",
32
- "supertest": "^7.1.0"
33
+ "supertest": "^7.1.4"
33
34
  },
34
35
  "scripts": {
35
36
  "build": "unbuild",