@orpc/standard-server-node 0.49.0 → 0.51.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/README.md CHANGED
@@ -67,6 +67,14 @@ You can find the full documentation [here](https://orpc.unnoq.com).
67
67
 
68
68
  [Node.js](https://nodejs.org) server adapter for oRPC.
69
69
 
70
+ ## Sponsors
71
+
72
+ <p align="center">
73
+ <a href="https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg">
74
+ <img src='https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg'/>
75
+ </a>
76
+ </p>
77
+
70
78
  ## License
71
79
 
72
80
  Distributed under the MIT License. See [LICENSE](https://github.com/unnoq/orpc/blob/main/LICENSE) for more information.
package/dist/index.mjs CHANGED
@@ -192,16 +192,17 @@ function toAbortSignal(res) {
192
192
  }
193
193
 
194
194
  function toStandardLazyRequest(req, res) {
195
+ const raw = { adapter: "node", request: req, response: res };
195
196
  const method = req.method ?? "GET";
196
197
  const protocol = "encrypted" in req.socket && req.socket.encrypted ? "https:" : "http:";
197
198
  const host = req.headers.host ?? "localhost";
198
199
  const url = new URL(req.originalUrl ?? req.url ?? "/", `${protocol}//${host}`);
199
200
  return {
200
- raw: { request: req, response: res },
201
+ raw,
201
202
  method,
202
203
  url,
203
204
  headers: req.headers,
204
- body: once(() => toStandardBody(req)),
205
+ body: once(() => toStandardBody(raw.request)),
205
206
  signal: toAbortSignal(res)
206
207
  };
207
208
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/standard-server-node",
3
3
  "type": "module",
4
- "version": "0.49.0",
4
+ "version": "0.51.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -23,8 +23,8 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@orpc/shared": "0.49.0",
27
- "@orpc/standard-server": "0.49.0"
26
+ "@orpc/shared": "0.51.0",
27
+ "@orpc/standard-server": "0.51.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^22.13.1",