@trpc/server 10.24.0 → 10.25.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.
|
@@ -7,7 +7,7 @@ export declare type CreateHTTPContextOptions = NodeHTTPCreateContextFnOptions<ht
|
|
|
7
7
|
export declare function createHTTPHandler<TRouter extends AnyRouter>(opts: CreateHTTPHandlerOptions<TRouter>): (req: http.IncomingMessage, res: http.ServerResponse) => Promise<void>;
|
|
8
8
|
export declare function createHTTPServer<TRouter extends AnyRouter>(opts: CreateHTTPHandlerOptions<TRouter>): {
|
|
9
9
|
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
|
10
|
-
listen: (port?: number) => {
|
|
10
|
+
listen: (port?: number, hostname?: string) => {
|
|
11
11
|
port: number | undefined;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../src/adapters/standalone.ts"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AAErB,oBAAY,wBAAwB,CAAC,OAAO,SAAS,SAAS,IAC5D,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;AAE7E,oBAAY,wBAAwB,GAAG,8BAA8B,CACnE,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,cAAc,CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,SAAS,EACzD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,SAEpB,KAAK,eAAe,OAAO,KAAK,cAAc,mBAiBlE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,SAAS,EACxD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC;;oBAOrB,MAAM;;;
|
|
1
|
+
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../src/adapters/standalone.ts"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AAErB,oBAAY,wBAAwB,CAAC,OAAO,SAAS,SAAS,IAC5D,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;AAE7E,oBAAY,wBAAwB,GAAG,8BAA8B,CACnE,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,cAAc,CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,SAAS,EACzD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,SAEpB,KAAK,eAAe,OAAO,KAAK,cAAc,mBAiBlE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,SAAS,EACxD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC;;oBAOrB,MAAM,aAAa,MAAM;;;EAU5C"}
|
|
@@ -38,8 +38,8 @@ function createHTTPServer(opts) {
|
|
|
38
38
|
const server = http__default["default"].createServer((req, res)=>handler(req, res));
|
|
39
39
|
return {
|
|
40
40
|
server,
|
|
41
|
-
listen: (port)=>{
|
|
42
|
-
server.listen(port);
|
|
41
|
+
listen: (port, hostname)=>{
|
|
42
|
+
server.listen(port, hostname);
|
|
43
43
|
const actualPort = port === 0 ? server.address().port : port;
|
|
44
44
|
return {
|
|
45
45
|
port: actualPort
|
|
@@ -30,8 +30,8 @@ function createHTTPServer(opts) {
|
|
|
30
30
|
const server = http.createServer((req, res)=>handler(req, res));
|
|
31
31
|
return {
|
|
32
32
|
server,
|
|
33
|
-
listen: (port)=>{
|
|
34
|
-
server.listen(port);
|
|
33
|
+
listen: (port, hostname)=>{
|
|
34
|
+
server.listen(port, hostname);
|
|
35
35
|
const actualPort = port === 0 ? server.address().port : port;
|
|
36
36
|
return {
|
|
37
37
|
port: actualPort
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.25.0",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -169,5 +169,5 @@
|
|
|
169
169
|
"yup": "^1.0.0",
|
|
170
170
|
"zod": "^3.0.0"
|
|
171
171
|
},
|
|
172
|
-
"gitHead": "
|
|
172
|
+
"gitHead": "58764a39f45299cd1b99af47d4a27ace46698555"
|
|
173
173
|
}
|
|
@@ -45,8 +45,8 @@ export function createHTTPServer<TRouter extends AnyRouter>(
|
|
|
45
45
|
|
|
46
46
|
return {
|
|
47
47
|
server,
|
|
48
|
-
listen: (port?: number) => {
|
|
49
|
-
server.listen(port);
|
|
48
|
+
listen: (port?: number, hostname?: string) => {
|
|
49
|
+
server.listen(port, hostname);
|
|
50
50
|
const actualPort =
|
|
51
51
|
port === 0 ? ((server.address() as any).port as number) : port;
|
|
52
52
|
|