@tanstack/react-router 1.159.4 → 1.159.5

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.
@@ -4,7 +4,6 @@ const node_stream = require("node:stream");
4
4
  const ReactDOMServer = require("react-dom/server");
5
5
  const isbot = require("isbot");
6
6
  const server = require("@tanstack/router-core/ssr/server");
7
- const srvx = require("srvx");
8
7
  const renderRouterToStream = async ({
9
8
  request,
10
9
  router,
@@ -24,7 +23,7 @@ const renderRouterToStream = async ({
24
23
  router,
25
24
  stream
26
25
  );
27
- return new srvx.FastResponse(responseStream, {
26
+ return new Response(responseStream, {
28
27
  status: router.state.statusCode,
29
28
  headers: responseHeaders
30
29
  });
@@ -61,7 +60,7 @@ const renderRouterToStream = async ({
61
60
  router,
62
61
  reactAppPassthrough
63
62
  );
64
- return new srvx.FastResponse(responseStream, {
63
+ return new Response(responseStream, {
65
64
  status: router.state.statusCode,
66
65
  headers: responseHeaders
67
66
  });
@@ -1 +1 @@
1
- {"version":3,"file":"renderRouterToStream.cjs","sources":["../../../src/ssr/renderRouterToStream.tsx"],"sourcesContent":["import { PassThrough } from 'node:stream'\nimport ReactDOMServer from 'react-dom/server'\nimport { isbot } from 'isbot'\nimport {\n transformPipeableStreamWithRouter,\n transformReadableStreamWithRouter,\n} from '@tanstack/router-core/ssr/server'\nimport { FastResponse } from 'srvx'\nimport type { AnyRouter } from '@tanstack/router-core'\nimport type { ReadableStream } from 'node:stream/web'\nimport type { ReactNode } from 'react'\n\nexport const renderRouterToStream = async ({\n request,\n router,\n responseHeaders,\n children,\n}: {\n request: Request\n router: AnyRouter\n responseHeaders: Headers\n children: ReactNode\n}) => {\n if (typeof ReactDOMServer.renderToReadableStream === 'function') {\n const stream = await ReactDOMServer.renderToReadableStream(children, {\n signal: request.signal,\n nonce: router.options.ssr?.nonce,\n progressiveChunkSize: Number.POSITIVE_INFINITY,\n })\n\n if (isbot(request.headers.get('User-Agent'))) {\n await stream.allReady\n }\n\n const responseStream = transformReadableStreamWithRouter(\n router,\n stream as unknown as ReadableStream,\n )\n return new FastResponse(responseStream as any, {\n status: router.state.statusCode,\n headers: responseHeaders,\n })\n }\n\n if (typeof ReactDOMServer.renderToPipeableStream === 'function') {\n const reactAppPassthrough = new PassThrough()\n\n try {\n const pipeable = ReactDOMServer.renderToPipeableStream(children, {\n nonce: router.options.ssr?.nonce,\n progressiveChunkSize: Number.POSITIVE_INFINITY,\n ...(isbot(request.headers.get('User-Agent'))\n ? {\n onAllReady() {\n pipeable.pipe(reactAppPassthrough)\n },\n }\n : {\n onShellReady() {\n pipeable.pipe(reactAppPassthrough)\n },\n }),\n onError: (error, info) => {\n console.error('Error in renderToPipeableStream:', error, info)\n // Destroy the passthrough stream on error\n if (!reactAppPassthrough.destroyed) {\n reactAppPassthrough.destroy(\n error instanceof Error ? error : new Error(String(error)),\n )\n }\n },\n })\n } catch (e) {\n console.error('Error in renderToPipeableStream:', e)\n reactAppPassthrough.destroy(e instanceof Error ? e : new Error(String(e)))\n }\n\n const responseStream = transformPipeableStreamWithRouter(\n router,\n reactAppPassthrough,\n )\n return new FastResponse(responseStream as any, {\n status: router.state.statusCode,\n headers: responseHeaders,\n })\n }\n\n throw new Error(\n 'No renderToReadableStream or renderToPipeableStream found in react-dom/server. Ensure you are using a version of react-dom that supports streaming.',\n )\n}\n"],"names":["isbot","transformReadableStreamWithRouter","FastResponse","PassThrough","transformPipeableStreamWithRouter"],"mappings":";;;;;;;AAYO,MAAM,uBAAuB,OAAO;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAKM;AACJ,MAAI,OAAO,eAAe,2BAA2B,YAAY;AAC/D,UAAM,SAAS,MAAM,eAAe,uBAAuB,UAAU;AAAA,MACnE,QAAQ,QAAQ;AAAA,MAChB,OAAO,OAAO,QAAQ,KAAK;AAAA,MAC3B,sBAAsB,OAAO;AAAA,IAAA,CAC9B;AAED,QAAIA,MAAAA,MAAM,QAAQ,QAAQ,IAAI,YAAY,CAAC,GAAG;AAC5C,YAAM,OAAO;AAAA,IACf;AAEA,UAAM,iBAAiBC,OAAAA;AAAAA,MACrB;AAAA,MACA;AAAA,IAAA;AAEF,WAAO,IAAIC,KAAAA,aAAa,gBAAuB;AAAA,MAC7C,QAAQ,OAAO,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA,CACV;AAAA,EACH;AAEA,MAAI,OAAO,eAAe,2BAA2B,YAAY;AAC/D,UAAM,sBAAsB,IAAIC,wBAAA;AAEhC,QAAI;AACF,YAAM,WAAW,eAAe,uBAAuB,UAAU;AAAA,QAC/D,OAAO,OAAO,QAAQ,KAAK;AAAA,QAC3B,sBAAsB,OAAO;AAAA,QAC7B,GAAIH,MAAAA,MAAM,QAAQ,QAAQ,IAAI,YAAY,CAAC,IACvC;AAAA,UACE,aAAa;AACX,qBAAS,KAAK,mBAAmB;AAAA,UACnC;AAAA,QAAA,IAEF;AAAA,UACE,eAAe;AACb,qBAAS,KAAK,mBAAmB;AAAA,UACnC;AAAA,QAAA;AAAA,QAEN,SAAS,CAAC,OAAO,SAAS;AACxB,kBAAQ,MAAM,oCAAoC,OAAO,IAAI;AAE7D,cAAI,CAAC,oBAAoB,WAAW;AAClC,gCAAoB;AAAA,cAClB,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;AAAA,YAAA;AAAA,UAE5D;AAAA,QACF;AAAA,MAAA,CACD;AAAA,IACH,SAAS,GAAG;AACV,cAAQ,MAAM,oCAAoC,CAAC;AACnD,0BAAoB,QAAQ,aAAa,QAAQ,IAAI,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC;AAAA,IAC3E;AAEA,UAAM,iBAAiBI,OAAAA;AAAAA,MACrB;AAAA,MACA;AAAA,IAAA;AAEF,WAAO,IAAIF,KAAAA,aAAa,gBAAuB;AAAA,MAC7C,QAAQ,OAAO,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA,CACV;AAAA,EACH;AAEA,QAAM,IAAI;AAAA,IACR;AAAA,EAAA;AAEJ;;"}
1
+ {"version":3,"file":"renderRouterToStream.cjs","sources":["../../../src/ssr/renderRouterToStream.tsx"],"sourcesContent":["import { PassThrough } from 'node:stream'\nimport ReactDOMServer from 'react-dom/server'\nimport { isbot } from 'isbot'\nimport {\n transformPipeableStreamWithRouter,\n transformReadableStreamWithRouter,\n} from '@tanstack/router-core/ssr/server'\nimport type { AnyRouter } from '@tanstack/router-core'\nimport type { ReadableStream } from 'node:stream/web'\nimport type { ReactNode } from 'react'\n\nexport const renderRouterToStream = async ({\n request,\n router,\n responseHeaders,\n children,\n}: {\n request: Request\n router: AnyRouter\n responseHeaders: Headers\n children: ReactNode\n}) => {\n if (typeof ReactDOMServer.renderToReadableStream === 'function') {\n const stream = await ReactDOMServer.renderToReadableStream(children, {\n signal: request.signal,\n nonce: router.options.ssr?.nonce,\n progressiveChunkSize: Number.POSITIVE_INFINITY,\n })\n\n if (isbot(request.headers.get('User-Agent'))) {\n await stream.allReady\n }\n\n const responseStream = transformReadableStreamWithRouter(\n router,\n stream as unknown as ReadableStream,\n )\n return new Response(responseStream as any, {\n status: router.state.statusCode,\n headers: responseHeaders,\n })\n }\n\n if (typeof ReactDOMServer.renderToPipeableStream === 'function') {\n const reactAppPassthrough = new PassThrough()\n\n try {\n const pipeable = ReactDOMServer.renderToPipeableStream(children, {\n nonce: router.options.ssr?.nonce,\n progressiveChunkSize: Number.POSITIVE_INFINITY,\n ...(isbot(request.headers.get('User-Agent'))\n ? {\n onAllReady() {\n pipeable.pipe(reactAppPassthrough)\n },\n }\n : {\n onShellReady() {\n pipeable.pipe(reactAppPassthrough)\n },\n }),\n onError: (error, info) => {\n console.error('Error in renderToPipeableStream:', error, info)\n // Destroy the passthrough stream on error\n if (!reactAppPassthrough.destroyed) {\n reactAppPassthrough.destroy(\n error instanceof Error ? error : new Error(String(error)),\n )\n }\n },\n })\n } catch (e) {\n console.error('Error in renderToPipeableStream:', e)\n reactAppPassthrough.destroy(e instanceof Error ? e : new Error(String(e)))\n }\n\n const responseStream = transformPipeableStreamWithRouter(\n router,\n reactAppPassthrough,\n )\n return new Response(responseStream as any, {\n status: router.state.statusCode,\n headers: responseHeaders,\n })\n }\n\n throw new Error(\n 'No renderToReadableStream or renderToPipeableStream found in react-dom/server. Ensure you are using a version of react-dom that supports streaming.',\n )\n}\n"],"names":["isbot","transformReadableStreamWithRouter","PassThrough","transformPipeableStreamWithRouter"],"mappings":";;;;;;AAWO,MAAM,uBAAuB,OAAO;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAKM;AACJ,MAAI,OAAO,eAAe,2BAA2B,YAAY;AAC/D,UAAM,SAAS,MAAM,eAAe,uBAAuB,UAAU;AAAA,MACnE,QAAQ,QAAQ;AAAA,MAChB,OAAO,OAAO,QAAQ,KAAK;AAAA,MAC3B,sBAAsB,OAAO;AAAA,IAAA,CAC9B;AAED,QAAIA,MAAAA,MAAM,QAAQ,QAAQ,IAAI,YAAY,CAAC,GAAG;AAC5C,YAAM,OAAO;AAAA,IACf;AAEA,UAAM,iBAAiBC,OAAAA;AAAAA,MACrB;AAAA,MACA;AAAA,IAAA;AAEF,WAAO,IAAI,SAAS,gBAAuB;AAAA,MACzC,QAAQ,OAAO,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA,CACV;AAAA,EACH;AAEA,MAAI,OAAO,eAAe,2BAA2B,YAAY;AAC/D,UAAM,sBAAsB,IAAIC,wBAAA;AAEhC,QAAI;AACF,YAAM,WAAW,eAAe,uBAAuB,UAAU;AAAA,QAC/D,OAAO,OAAO,QAAQ,KAAK;AAAA,QAC3B,sBAAsB,OAAO;AAAA,QAC7B,GAAIF,MAAAA,MAAM,QAAQ,QAAQ,IAAI,YAAY,CAAC,IACvC;AAAA,UACE,aAAa;AACX,qBAAS,KAAK,mBAAmB;AAAA,UACnC;AAAA,QAAA,IAEF;AAAA,UACE,eAAe;AACb,qBAAS,KAAK,mBAAmB;AAAA,UACnC;AAAA,QAAA;AAAA,QAEN,SAAS,CAAC,OAAO,SAAS;AACxB,kBAAQ,MAAM,oCAAoC,OAAO,IAAI;AAE7D,cAAI,CAAC,oBAAoB,WAAW;AAClC,gCAAoB;AAAA,cAClB,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;AAAA,YAAA;AAAA,UAE5D;AAAA,QACF;AAAA,MAAA,CACD;AAAA,IACH,SAAS,GAAG;AACV,cAAQ,MAAM,oCAAoC,CAAC;AACnD,0BAAoB,QAAQ,aAAa,QAAQ,IAAI,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC;AAAA,IAC3E;AAEA,UAAM,iBAAiBG,OAAAA;AAAAA,MACrB;AAAA,MACA;AAAA,IAAA;AAEF,WAAO,IAAI,SAAS,gBAAuB;AAAA,MACzC,QAAQ,OAAO,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA,CACV;AAAA,EACH;AAEA,QAAM,IAAI;AAAA,IACR;AAAA,EAAA;AAEJ;;"}
@@ -2,7 +2,6 @@ import { PassThrough } from "node:stream";
2
2
  import ReactDOMServer from "react-dom/server";
3
3
  import { isbot } from "isbot";
4
4
  import { transformReadableStreamWithRouter, transformPipeableStreamWithRouter } from "@tanstack/router-core/ssr/server";
5
- import { FastResponse } from "srvx";
6
5
  const renderRouterToStream = async ({
7
6
  request,
8
7
  router,
@@ -22,7 +21,7 @@ const renderRouterToStream = async ({
22
21
  router,
23
22
  stream
24
23
  );
25
- return new FastResponse(responseStream, {
24
+ return new Response(responseStream, {
26
25
  status: router.state.statusCode,
27
26
  headers: responseHeaders
28
27
  });
@@ -59,7 +58,7 @@ const renderRouterToStream = async ({
59
58
  router,
60
59
  reactAppPassthrough
61
60
  );
62
- return new FastResponse(responseStream, {
61
+ return new Response(responseStream, {
63
62
  status: router.state.statusCode,
64
63
  headers: responseHeaders
65
64
  });
@@ -1 +1 @@
1
- {"version":3,"file":"renderRouterToStream.js","sources":["../../../src/ssr/renderRouterToStream.tsx"],"sourcesContent":["import { PassThrough } from 'node:stream'\nimport ReactDOMServer from 'react-dom/server'\nimport { isbot } from 'isbot'\nimport {\n transformPipeableStreamWithRouter,\n transformReadableStreamWithRouter,\n} from '@tanstack/router-core/ssr/server'\nimport { FastResponse } from 'srvx'\nimport type { AnyRouter } from '@tanstack/router-core'\nimport type { ReadableStream } from 'node:stream/web'\nimport type { ReactNode } from 'react'\n\nexport const renderRouterToStream = async ({\n request,\n router,\n responseHeaders,\n children,\n}: {\n request: Request\n router: AnyRouter\n responseHeaders: Headers\n children: ReactNode\n}) => {\n if (typeof ReactDOMServer.renderToReadableStream === 'function') {\n const stream = await ReactDOMServer.renderToReadableStream(children, {\n signal: request.signal,\n nonce: router.options.ssr?.nonce,\n progressiveChunkSize: Number.POSITIVE_INFINITY,\n })\n\n if (isbot(request.headers.get('User-Agent'))) {\n await stream.allReady\n }\n\n const responseStream = transformReadableStreamWithRouter(\n router,\n stream as unknown as ReadableStream,\n )\n return new FastResponse(responseStream as any, {\n status: router.state.statusCode,\n headers: responseHeaders,\n })\n }\n\n if (typeof ReactDOMServer.renderToPipeableStream === 'function') {\n const reactAppPassthrough = new PassThrough()\n\n try {\n const pipeable = ReactDOMServer.renderToPipeableStream(children, {\n nonce: router.options.ssr?.nonce,\n progressiveChunkSize: Number.POSITIVE_INFINITY,\n ...(isbot(request.headers.get('User-Agent'))\n ? {\n onAllReady() {\n pipeable.pipe(reactAppPassthrough)\n },\n }\n : {\n onShellReady() {\n pipeable.pipe(reactAppPassthrough)\n },\n }),\n onError: (error, info) => {\n console.error('Error in renderToPipeableStream:', error, info)\n // Destroy the passthrough stream on error\n if (!reactAppPassthrough.destroyed) {\n reactAppPassthrough.destroy(\n error instanceof Error ? error : new Error(String(error)),\n )\n }\n },\n })\n } catch (e) {\n console.error('Error in renderToPipeableStream:', e)\n reactAppPassthrough.destroy(e instanceof Error ? e : new Error(String(e)))\n }\n\n const responseStream = transformPipeableStreamWithRouter(\n router,\n reactAppPassthrough,\n )\n return new FastResponse(responseStream as any, {\n status: router.state.statusCode,\n headers: responseHeaders,\n })\n }\n\n throw new Error(\n 'No renderToReadableStream or renderToPipeableStream found in react-dom/server. Ensure you are using a version of react-dom that supports streaming.',\n )\n}\n"],"names":[],"mappings":";;;;;AAYO,MAAM,uBAAuB,OAAO;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAKM;AACJ,MAAI,OAAO,eAAe,2BAA2B,YAAY;AAC/D,UAAM,SAAS,MAAM,eAAe,uBAAuB,UAAU;AAAA,MACnE,QAAQ,QAAQ;AAAA,MAChB,OAAO,OAAO,QAAQ,KAAK;AAAA,MAC3B,sBAAsB,OAAO;AAAA,IAAA,CAC9B;AAED,QAAI,MAAM,QAAQ,QAAQ,IAAI,YAAY,CAAC,GAAG;AAC5C,YAAM,OAAO;AAAA,IACf;AAEA,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,IAAA;AAEF,WAAO,IAAI,aAAa,gBAAuB;AAAA,MAC7C,QAAQ,OAAO,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA,CACV;AAAA,EACH;AAEA,MAAI,OAAO,eAAe,2BAA2B,YAAY;AAC/D,UAAM,sBAAsB,IAAI,YAAA;AAEhC,QAAI;AACF,YAAM,WAAW,eAAe,uBAAuB,UAAU;AAAA,QAC/D,OAAO,OAAO,QAAQ,KAAK;AAAA,QAC3B,sBAAsB,OAAO;AAAA,QAC7B,GAAI,MAAM,QAAQ,QAAQ,IAAI,YAAY,CAAC,IACvC;AAAA,UACE,aAAa;AACX,qBAAS,KAAK,mBAAmB;AAAA,UACnC;AAAA,QAAA,IAEF;AAAA,UACE,eAAe;AACb,qBAAS,KAAK,mBAAmB;AAAA,UACnC;AAAA,QAAA;AAAA,QAEN,SAAS,CAAC,OAAO,SAAS;AACxB,kBAAQ,MAAM,oCAAoC,OAAO,IAAI;AAE7D,cAAI,CAAC,oBAAoB,WAAW;AAClC,gCAAoB;AAAA,cAClB,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;AAAA,YAAA;AAAA,UAE5D;AAAA,QACF;AAAA,MAAA,CACD;AAAA,IACH,SAAS,GAAG;AACV,cAAQ,MAAM,oCAAoC,CAAC;AACnD,0BAAoB,QAAQ,aAAa,QAAQ,IAAI,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC;AAAA,IAC3E;AAEA,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,IAAA;AAEF,WAAO,IAAI,aAAa,gBAAuB;AAAA,MAC7C,QAAQ,OAAO,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA,CACV;AAAA,EACH;AAEA,QAAM,IAAI;AAAA,IACR;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"renderRouterToStream.js","sources":["../../../src/ssr/renderRouterToStream.tsx"],"sourcesContent":["import { PassThrough } from 'node:stream'\nimport ReactDOMServer from 'react-dom/server'\nimport { isbot } from 'isbot'\nimport {\n transformPipeableStreamWithRouter,\n transformReadableStreamWithRouter,\n} from '@tanstack/router-core/ssr/server'\nimport type { AnyRouter } from '@tanstack/router-core'\nimport type { ReadableStream } from 'node:stream/web'\nimport type { ReactNode } from 'react'\n\nexport const renderRouterToStream = async ({\n request,\n router,\n responseHeaders,\n children,\n}: {\n request: Request\n router: AnyRouter\n responseHeaders: Headers\n children: ReactNode\n}) => {\n if (typeof ReactDOMServer.renderToReadableStream === 'function') {\n const stream = await ReactDOMServer.renderToReadableStream(children, {\n signal: request.signal,\n nonce: router.options.ssr?.nonce,\n progressiveChunkSize: Number.POSITIVE_INFINITY,\n })\n\n if (isbot(request.headers.get('User-Agent'))) {\n await stream.allReady\n }\n\n const responseStream = transformReadableStreamWithRouter(\n router,\n stream as unknown as ReadableStream,\n )\n return new Response(responseStream as any, {\n status: router.state.statusCode,\n headers: responseHeaders,\n })\n }\n\n if (typeof ReactDOMServer.renderToPipeableStream === 'function') {\n const reactAppPassthrough = new PassThrough()\n\n try {\n const pipeable = ReactDOMServer.renderToPipeableStream(children, {\n nonce: router.options.ssr?.nonce,\n progressiveChunkSize: Number.POSITIVE_INFINITY,\n ...(isbot(request.headers.get('User-Agent'))\n ? {\n onAllReady() {\n pipeable.pipe(reactAppPassthrough)\n },\n }\n : {\n onShellReady() {\n pipeable.pipe(reactAppPassthrough)\n },\n }),\n onError: (error, info) => {\n console.error('Error in renderToPipeableStream:', error, info)\n // Destroy the passthrough stream on error\n if (!reactAppPassthrough.destroyed) {\n reactAppPassthrough.destroy(\n error instanceof Error ? error : new Error(String(error)),\n )\n }\n },\n })\n } catch (e) {\n console.error('Error in renderToPipeableStream:', e)\n reactAppPassthrough.destroy(e instanceof Error ? e : new Error(String(e)))\n }\n\n const responseStream = transformPipeableStreamWithRouter(\n router,\n reactAppPassthrough,\n )\n return new Response(responseStream as any, {\n status: router.state.statusCode,\n headers: responseHeaders,\n })\n }\n\n throw new Error(\n 'No renderToReadableStream or renderToPipeableStream found in react-dom/server. Ensure you are using a version of react-dom that supports streaming.',\n )\n}\n"],"names":[],"mappings":";;;;AAWO,MAAM,uBAAuB,OAAO;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAKM;AACJ,MAAI,OAAO,eAAe,2BAA2B,YAAY;AAC/D,UAAM,SAAS,MAAM,eAAe,uBAAuB,UAAU;AAAA,MACnE,QAAQ,QAAQ;AAAA,MAChB,OAAO,OAAO,QAAQ,KAAK;AAAA,MAC3B,sBAAsB,OAAO;AAAA,IAAA,CAC9B;AAED,QAAI,MAAM,QAAQ,QAAQ,IAAI,YAAY,CAAC,GAAG;AAC5C,YAAM,OAAO;AAAA,IACf;AAEA,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,IAAA;AAEF,WAAO,IAAI,SAAS,gBAAuB;AAAA,MACzC,QAAQ,OAAO,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA,CACV;AAAA,EACH;AAEA,MAAI,OAAO,eAAe,2BAA2B,YAAY;AAC/D,UAAM,sBAAsB,IAAI,YAAA;AAEhC,QAAI;AACF,YAAM,WAAW,eAAe,uBAAuB,UAAU;AAAA,QAC/D,OAAO,OAAO,QAAQ,KAAK;AAAA,QAC3B,sBAAsB,OAAO;AAAA,QAC7B,GAAI,MAAM,QAAQ,QAAQ,IAAI,YAAY,CAAC,IACvC;AAAA,UACE,aAAa;AACX,qBAAS,KAAK,mBAAmB;AAAA,UACnC;AAAA,QAAA,IAEF;AAAA,UACE,eAAe;AACb,qBAAS,KAAK,mBAAmB;AAAA,UACnC;AAAA,QAAA;AAAA,QAEN,SAAS,CAAC,OAAO,SAAS;AACxB,kBAAQ,MAAM,oCAAoC,OAAO,IAAI;AAE7D,cAAI,CAAC,oBAAoB,WAAW;AAClC,gCAAoB;AAAA,cAClB,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;AAAA,YAAA;AAAA,UAE5D;AAAA,QACF;AAAA,MAAA,CACD;AAAA,IACH,SAAS,GAAG;AACV,cAAQ,MAAM,oCAAoC,CAAC;AACnD,0BAAoB,QAAQ,aAAa,QAAQ,IAAI,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC;AAAA,IAC3E;AAEA,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,IAAA;AAEF,WAAO,IAAI,SAAS,gBAAuB;AAAA,MACzC,QAAQ,OAAO,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA,CACV;AAAA,EACH;AAEA,QAAM,IAAI;AAAA,IACR;AAAA,EAAA;AAEJ;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.159.4",
3
+ "version": "1.159.5",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -79,7 +79,6 @@
79
79
  "dependencies": {
80
80
  "@tanstack/react-store": "^0.8.0",
81
81
  "isbot": "^5.1.22",
82
- "srvx": "^0.11.2",
83
82
  "tiny-invariant": "^1.3.3",
84
83
  "tiny-warning": "^1.0.3",
85
84
  "@tanstack/history": "1.154.14",
@@ -5,7 +5,6 @@ import {
5
5
  transformPipeableStreamWithRouter,
6
6
  transformReadableStreamWithRouter,
7
7
  } from '@tanstack/router-core/ssr/server'
8
- import { FastResponse } from 'srvx'
9
8
  import type { AnyRouter } from '@tanstack/router-core'
10
9
  import type { ReadableStream } from 'node:stream/web'
11
10
  import type { ReactNode } from 'react'
@@ -36,7 +35,7 @@ export const renderRouterToStream = async ({
36
35
  router,
37
36
  stream as unknown as ReadableStream,
38
37
  )
39
- return new FastResponse(responseStream as any, {
38
+ return new Response(responseStream as any, {
40
39
  status: router.state.statusCode,
41
40
  headers: responseHeaders,
42
41
  })
@@ -79,7 +78,7 @@ export const renderRouterToStream = async ({
79
78
  router,
80
79
  reactAppPassthrough,
81
80
  )
82
- return new FastResponse(responseStream as any, {
81
+ return new Response(responseStream as any, {
83
82
  status: router.state.statusCode,
84
83
  headers: responseHeaders,
85
84
  })