@orpc/standard-server-node 0.0.0-next.b83dcee → 0.0.0-next.b9060f2
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 +3 -0
- package/dist/index.mjs +4 -4
- package/package.json +4 -4
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>
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
|
-
import { runWithSpan, parseEmptyableJSON, isAsyncIteratorObject, stringifyJSON, AbortError, once } from '@orpc/shared';
|
|
2
|
+
import { runWithSpan, parseEmptyableJSON, isAsyncIteratorObject, stringifyJSON, AbortError, guard, once } from '@orpc/shared';
|
|
3
3
|
import { getFilenameFromContentDisposition, flattenHeader, generateContentDisposition } from '@orpc/standard-server';
|
|
4
4
|
import { toEventIterator as toEventIterator$1, toEventStream as toEventStream$1 } from '@orpc/standard-server-fetch';
|
|
5
5
|
|
|
@@ -107,9 +107,9 @@ function toAbortSignal(stream) {
|
|
|
107
107
|
|
|
108
108
|
function toStandardUrl(req) {
|
|
109
109
|
const protocol = "encrypted" in req.socket && req.socket.encrypted ? "https:" : "http:";
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
return
|
|
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
113
|
}
|
|
114
114
|
|
|
115
115
|
function toStandardLazyRequest(req, res) {
|
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.
|
|
4
|
+
"version": "0.0.0-next.b9060f2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@orpc/
|
|
27
|
-
"@orpc/standard-server": "0.0.0-next.
|
|
28
|
-
"@orpc/
|
|
26
|
+
"@orpc/standard-server": "0.0.0-next.b9060f2",
|
|
27
|
+
"@orpc/standard-server-fetch": "0.0.0-next.b9060f2",
|
|
28
|
+
"@orpc/shared": "0.0.0-next.b9060f2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.15.30",
|