@ngrok/app-server 0.2.0 → 0.3.1

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.
Files changed (108) hide show
  1. package/README.md +652 -77
  2. package/dist/build-id-C6sYO9Yp.js +126 -0
  3. package/dist/build-id-C6sYO9Yp.js.map +1 -0
  4. package/dist/{build-manifest-8NfD1wnO.js → build-manifest-UDNk81Ce.js} +24 -6
  5. package/dist/build-manifest-UDNk81Ce.js.map +1 -0
  6. package/dist/cli.js +45 -25
  7. package/dist/cli.js.map +1 -1
  8. package/dist/client-browser.d.ts +12 -0
  9. package/dist/client-browser.js +3 -0
  10. package/dist/client.d.ts +21 -0
  11. package/dist/client.js +27 -0
  12. package/dist/client.js.map +1 -0
  13. package/dist/compression-7_gToa8R.js +97 -0
  14. package/dist/compression-7_gToa8R.js.map +1 -0
  15. package/dist/create-server-DkTeIJ8L.js +1409 -0
  16. package/dist/create-server-DkTeIJ8L.js.map +1 -0
  17. package/dist/{deno-DNRgzHrk.js → deno-aqhikNMG.js} +2 -2
  18. package/dist/deno-aqhikNMG.js.map +1 -0
  19. package/dist/entry-CM6Ma-Tv.d.ts +626 -0
  20. package/dist/entry-CenmvESk.js +116 -0
  21. package/dist/entry-CenmvESk.js.map +1 -0
  22. package/dist/gzip-Doi4wqjX.js +294 -0
  23. package/dist/gzip-Doi4wqjX.js.map +1 -0
  24. package/dist/header-hook-Vzw9J9BY.js +159 -0
  25. package/dist/header-hook-Vzw9J9BY.js.map +1 -0
  26. package/dist/{index-oSE-tYRW.d.ts → index-Bo5G9LuQ.d.ts} +53 -14
  27. package/dist/index.d.ts +99 -269
  28. package/dist/index.js +47 -59
  29. package/dist/index.js.map +1 -1
  30. package/dist/listen-options-7TaXjyrk.js.map +1 -1
  31. package/dist/{load-entry-C03qqmhr.js → load-entry-CmkdlmDX.js} +8 -4
  32. package/dist/{load-entry-C03qqmhr.js.map → load-entry-CmkdlmDX.js.map} +1 -1
  33. package/dist/log-BP6xXXZl.js +122 -0
  34. package/dist/log-BP6xXXZl.js.map +1 -0
  35. package/dist/node-BFH82eeL.js +333 -0
  36. package/dist/node-BFH82eeL.js.map +1 -0
  37. package/dist/node-tBVQPjQv.js +41 -0
  38. package/dist/node-tBVQPjQv.js.map +1 -0
  39. package/dist/node-vite.d.ts +5 -4
  40. package/dist/node-vite.js +2 -17
  41. package/dist/node.d.ts +23 -4
  42. package/dist/node.js +2 -2
  43. package/dist/react-router-vite.d.ts +4 -3
  44. package/dist/react-router-vite.js +2 -20
  45. package/dist/react-router.d.ts +1 -1
  46. package/dist/react-router.js +8 -7
  47. package/dist/react-router.js.map +1 -1
  48. package/dist/request-context-BtQ87VYb.js +40 -0
  49. package/dist/request-context-BtQ87VYb.js.map +1 -0
  50. package/dist/response-edge-Bc1-C_Cx.js +327 -0
  51. package/dist/response-edge-Bc1-C_Cx.js.map +1 -0
  52. package/dist/response-writer-B7FoJjEE.js +289 -0
  53. package/dist/response-writer-B7FoJjEE.js.map +1 -0
  54. package/dist/script-hashes-hqUk6kG7.js +53 -0
  55. package/dist/script-hashes-hqUk6kG7.js.map +1 -0
  56. package/dist/{serve-Cleo8RMO.js → serve-Cc-ADdhZ.js} +3 -3
  57. package/dist/{serve-Cleo8RMO.js.map → serve-Cc-ADdhZ.js.map} +1 -1
  58. package/dist/stale-build-navigation-PnMLtTF8.js +339 -0
  59. package/dist/stale-build-navigation-PnMLtTF8.js.map +1 -0
  60. package/dist/stale-build-navigation-ypV7Ow4o.d.ts +141 -0
  61. package/dist/{start-CINALHxy.js → start-Cb3kknlF.js} +14 -19
  62. package/dist/start-Cb3kknlF.js.map +1 -0
  63. package/dist/static-files-Beju9riB.js +302 -0
  64. package/dist/static-files-Beju9riB.js.map +1 -0
  65. package/dist/tanstack-start-vite.d.ts +6 -5
  66. package/dist/tanstack-start-vite.js +2 -23
  67. package/dist/tanstack-start.d.ts +19 -2
  68. package/dist/tanstack-start.js +5 -14
  69. package/dist/tanstack-start.js.map +1 -1
  70. package/dist/{tcp-C-9AmFuM.js → tcp-Dd1Mt6sN.js} +6 -5
  71. package/dist/{tcp-C-9AmFuM.js.map → tcp-Dd1Mt6sN.js.map} +1 -1
  72. package/dist/trailing-slash-DX7NB88H.d.ts +36 -0
  73. package/dist/types-DLYxYS6M.d.ts +392 -0
  74. package/dist/vercel-vite.d.ts +35 -0
  75. package/dist/vercel-vite.js +142 -0
  76. package/dist/vercel-vite.js.map +1 -0
  77. package/dist/vercel.d.ts +35 -0
  78. package/dist/vercel.js +89 -0
  79. package/dist/vercel.js.map +1 -0
  80. package/dist/vite-B-GfswoH.js +22 -0
  81. package/dist/vite-B-GfswoH.js.map +1 -0
  82. package/dist/vite-D4hfj3ph.js +19 -0
  83. package/dist/vite-D4hfj3ph.js.map +1 -0
  84. package/dist/vite-DyrhyKEr.js +25 -0
  85. package/dist/vite-DyrhyKEr.js.map +1 -0
  86. package/dist/vite-iioAoxSt.js +752 -0
  87. package/dist/vite-iioAoxSt.js.map +1 -0
  88. package/dist/vite.d.ts +2 -2
  89. package/dist/vite.js +1 -1
  90. package/package.json +25 -4
  91. package/dist/build-manifest-8NfD1wnO.js.map +0 -1
  92. package/dist/deno-DNRgzHrk.js.map +0 -1
  93. package/dist/entry-BkdUub2S.js +0 -638
  94. package/dist/entry-BkdUub2S.js.map +0 -1
  95. package/dist/log-CsjaKM8U.js +0 -59
  96. package/dist/log-CsjaKM8U.js.map +0 -1
  97. package/dist/node-CG7qXuWZ.js +0 -58
  98. package/dist/node-CG7qXuWZ.js.map +0 -1
  99. package/dist/node-YWPGmzAk.js +0 -215
  100. package/dist/node-YWPGmzAk.js.map +0 -1
  101. package/dist/node-ZMowKZDB.js +0 -3
  102. package/dist/node-vite.js.map +0 -1
  103. package/dist/react-router-vite.js.map +0 -1
  104. package/dist/start-CINALHxy.js.map +0 -1
  105. package/dist/tanstack-start-vite.js.map +0 -1
  106. package/dist/types-BfCkS7kQ.d.ts +0 -203
  107. package/dist/vite-mYZ2Y69u.js +0 -144
  108. package/dist/vite-mYZ2Y69u.js.map +0 -1
package/dist/vercel.js ADDED
@@ -0,0 +1,89 @@
1
+ import { n as flushLogs } from "./log-BP6xXXZl.js";
2
+ import { i as withForwardedProto } from "./create-server-DkTeIJ8L.js";
3
+ import { t as host$1 } from "./node-BFH82eeL.js";
4
+ import { t as requestListener } from "./response-writer-B7FoJjEE.js";
5
+
6
+ // src/vercel/index.ts
7
+ /**
8
+ * `files` that give each file and directory the modification time
9
+ * `mtimeMs`. Why: the deploy gives each file of the function one fixed time,
10
+ * so a file that changes and keeps its size would keep its ETag. `vercel()`
11
+ * sets `APP_SERVER_BUILT_AT` to the time of the build.
12
+ */
13
+ function withModifiedTime(files, mtimeMs) {
14
+ const { snapshot } = files;
15
+ return {
16
+ stat: async (path) => {
17
+ const info = await files.stat(path);
18
+ return info == null ? void 0 : {
19
+ ...info,
20
+ mtimeMs
21
+ };
22
+ },
23
+ open: files.open,
24
+ ...snapshot == null ? {} : { snapshot: async () => withModifiedTime(await snapshot(), mtimeMs) }
25
+ };
26
+ }
27
+ /**
28
+ * The vercel host: one Vercel Function on Node.js. It reads the client build
29
+ * from the function's files and keeps `requestContext()` in
30
+ * `AsyncLocalStorage`, as the node host does. It has no listeners and no
31
+ * lifecycle: Vercel starts and stops the function, and {@link handler} calls
32
+ * the entry's `fetch`.
33
+ *
34
+ * Why no gzip: Vercel's CDN compresses each response, with Brotli when the
35
+ * client accepts it.
36
+ *
37
+ * @example
38
+ * export const appServer = createEntry({ app, host, framework: (mode) => runtime(build, { mode }) });
39
+ */
40
+ const host = {
41
+ name: "vercel",
42
+ files: (clientDirectory) => {
43
+ const files = host$1.files(clientDirectory);
44
+ const builtAt = Number(process.env.APP_SERVER_BUILT_AT);
45
+ return Number.isFinite(builtAt) ? withModifiedTime(files, builtAt) : files;
46
+ },
47
+ ...host$1.storage == null ? {} : { storage: host$1.storage }
48
+ };
49
+ /**
50
+ * The function handler for the entry of a server build. The function file
51
+ * that `vercel()` writes exports it.
52
+ *
53
+ * - The scheme comes from `X-Forwarded-Proto`, and the client address from
54
+ * `X-Real-IP`. Why trust them: Vercel sets both headers on each request,
55
+ * and replaces a value that the client sends.
56
+ * - The node response writer sends each response, as the node host's
57
+ * listener does.
58
+ * - The log lines of the request reach stdout before the handler returns.
59
+ * Why: Vercel can freeze the function after the response, before the next
60
+ * turn of the event loop writes them.
61
+ *
62
+ * @example
63
+ * export default hostModule.handler(appServer);
64
+ */
65
+ function handler(entry) {
66
+ const listener = requestListener(async (request, bindings) => {
67
+ const realIp = bindings.incoming?.headers["x-real-ip"];
68
+ return entry.fetch(withForwardedProto(request), {
69
+ ...bindings,
70
+ ...typeof realIp === "string" ? { remoteAddress: realIp } : {}
71
+ });
72
+ }, { trustForwardedProto: true });
73
+ return async (incoming, outgoing) => {
74
+ try {
75
+ await listener(incoming, outgoing);
76
+ if (!outgoing.closed) await new Promise((resolve) => {
77
+ outgoing.once("close", resolve);
78
+ });
79
+ } finally {
80
+ flushLogs();
81
+ if (process.stdout.writableLength > 0) await new Promise((resolve) => {
82
+ process.stdout.write("", resolve);
83
+ });
84
+ }
85
+ };
86
+ }
87
+
88
+ export { handler, host };
89
+ //# sourceMappingURL=vercel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vercel.js","names":["nodeHost"],"sources":["../src/vercel/index.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from \"node:http\";\nimport { withForwardedProto } from \"../core/create-server.js\";\nimport type { AppServerEntry } from \"../core/entry.js\";\nimport { flushLogs } from \"../core/log.js\";\nimport type { FileInfo, HostRuntime, StaticFiles } from \"../core/types.js\";\nimport { host as nodeHost } from \"../node/index.js\";\nimport { requestListener } from \"../node/response-writer.js\";\n\n/**\n * `files` that give each file and directory the modification time\n * `mtimeMs`. Why: the deploy gives each file of the function one fixed time,\n * so a file that changes and keeps its size would keep its ETag. `vercel()`\n * sets `APP_SERVER_BUILT_AT` to the time of the build.\n */\nfunction withModifiedTime(files: StaticFiles, mtimeMs: number): StaticFiles {\n\tconst { snapshot } = files;\n\treturn {\n\t\tstat: async (path) => {\n\t\t\tconst info: FileInfo | undefined = await files.stat(path);\n\t\t\treturn info == null ? undefined : { ...info, mtimeMs };\n\t\t},\n\t\topen: files.open,\n\t\t...(snapshot == null\n\t\t\t? {}\n\t\t\t: { snapshot: async () => withModifiedTime(await snapshot(), mtimeMs) }),\n\t};\n}\n\n/**\n * The vercel host: one Vercel Function on Node.js. It reads the client build\n * from the function's files and keeps `requestContext()` in\n * `AsyncLocalStorage`, as the node host does. It has no listeners and no\n * lifecycle: Vercel starts and stops the function, and {@link handler} calls\n * the entry's `fetch`.\n *\n * Why no gzip: Vercel's CDN compresses each response, with Brotli when the\n * client accepts it.\n *\n * @example\n * export const appServer = createEntry({ app, host, framework: (mode) => runtime(build, { mode }) });\n */\nexport const host: HostRuntime = {\n\tname: \"vercel\",\n\tfiles: (clientDirectory) => {\n\t\tconst files = nodeHost.files(clientDirectory);\n\t\tconst builtAt = Number(process.env.APP_SERVER_BUILT_AT);\n\t\treturn Number.isFinite(builtAt) ? withModifiedTime(files, builtAt) : files;\n\t},\n\t...(nodeHost.storage == null ? {} : { storage: nodeHost.storage }),\n};\n\n/**\n * The function handler for the entry of a server build. The function file\n * that `vercel()` writes exports it.\n *\n * - The scheme comes from `X-Forwarded-Proto`, and the client address from\n * `X-Real-IP`. Why trust them: Vercel sets both headers on each request,\n * and replaces a value that the client sends.\n * - The node response writer sends each response, as the node host's\n * listener does.\n * - The log lines of the request reach stdout before the handler returns.\n * Why: Vercel can freeze the function after the response, before the next\n * turn of the event loop writes them.\n *\n * @example\n * export default hostModule.handler(appServer);\n */\nexport function handler(\n\tentry: AppServerEntry,\n): (incoming: IncomingMessage, outgoing: ServerResponse) => Promise<void> {\n\tconst listener = requestListener(\n\t\tasync (request, bindings) => {\n\t\t\tconst realIp = bindings.incoming?.headers[\"x-real-ip\"];\n\t\t\treturn entry.fetch(withForwardedProto(request), {\n\t\t\t\t...bindings,\n\t\t\t\t...(typeof realIp === \"string\" ? { remoteAddress: realIp } : {}),\n\t\t\t});\n\t\t},\n\t\t{ trustForwardedProto: true },\n\t);\n\treturn async (incoming, outgoing) => {\n\t\ttry {\n\t\t\tawait listener(incoming, outgoing);\n\t\t\t// Why wait: the access log writes its line when the response closes, after the listener returns.\n\t\t\tif (!outgoing.closed) {\n\t\t\t\tawait new Promise((resolve) => {\n\t\t\t\t\toutgoing.once(\"close\", resolve);\n\t\t\t\t});\n\t\t\t}\n\t\t} finally {\n\t\t\tflushLogs();\n\t\t\t// Why wait: a full pipe keeps the rest of a write in a queue, and a frozen function does not send it.\n\t\t\tif (process.stdout.writableLength > 0) {\n\t\t\t\tawait new Promise((resolve) => {\n\t\t\t\t\tprocess.stdout.write(\"\", resolve);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n}\n"],"mappings":";;;;;;;;;;;;AAcA,SAAS,iBAAiB,OAAoB,SAA8B;CAC3E,MAAM,EAAE,aAAa;CACrB,OAAO;EACN,MAAM,OAAO,SAAS;GACrB,MAAM,OAA6B,MAAM,MAAM,KAAK,IAAI;GACxD,OAAO,QAAQ,OAAO,SAAY;IAAE,GAAG;IAAM;GAAQ;EACtD;EACA,MAAM,MAAM;EACZ,GAAI,YAAY,OACb,CAAC,IACD,EAAE,UAAU,YAAY,iBAAiB,MAAM,SAAS,GAAG,OAAO,EAAE;CACxE;AACD;;;;;;;;;;;;;;AAeA,MAAa,OAAoB;CAChC,MAAM;CACN,QAAQ,oBAAoB;EAC3B,MAAM,QAAQA,OAAS,MAAM,eAAe;EAC5C,MAAM,UAAU,OAAO,QAAQ,IAAI,mBAAmB;EACtD,OAAO,OAAO,SAAS,OAAO,IAAI,iBAAiB,OAAO,OAAO,IAAI;CACtE;CACA,GAAIA,OAAS,WAAW,OAAO,CAAC,IAAI,EAAE,SAASA,OAAS,QAAQ;AACjE;;;;;;;;;;;;;;;;;AAkBA,SAAgB,QACf,OACyE;CACzE,MAAM,WAAW,gBAChB,OAAO,SAAS,aAAa;EAC5B,MAAM,SAAS,SAAS,UAAU,QAAQ;EAC1C,OAAO,MAAM,MAAM,mBAAmB,OAAO,GAAG;GAC/C,GAAG;GACH,GAAI,OAAO,WAAW,WAAW,EAAE,eAAe,OAAO,IAAI,CAAC;EAC/D,CAAC;CACF,GACA,EAAE,qBAAqB,KAAK,CAC7B;CACA,OAAO,OAAO,UAAU,aAAa;EACpC,IAAI;GACH,MAAM,SAAS,UAAU,QAAQ;GAEjC,IAAI,CAAC,SAAS,QACb,MAAM,IAAI,SAAS,YAAY;IAC9B,SAAS,KAAK,SAAS,OAAO;GAC/B,CAAC;EAEH,UAAU;GACT,UAAU;GAEV,IAAI,QAAQ,OAAO,iBAAiB,GACnC,MAAM,IAAI,SAAS,YAAY;IAC9B,QAAQ,OAAO,MAAM,IAAI,OAAO;GACjC,CAAC;EAEH;CACD;AACD"}
@@ -0,0 +1,22 @@
1
+ // src/react-router/vite.ts
2
+ /**
3
+ * The build side of the React Router adapter. `appServer` uses it when the
4
+ * Vite config has the React Router plugin, so pass it only to override that.
5
+ *
6
+ * @example
7
+ * appServer({ framework: reactRouterAdapter() });
8
+ */
9
+ function reactRouterAdapter() {
10
+ return {
11
+ name: "react-router",
12
+ serverModule: "virtual:react-router/server-build",
13
+ runtimeModule: "@ngrok/app-server/react-router",
14
+ isPrerenderPass: () => process.env.IS_RR_BUILD_REQUEST === "yes",
15
+ validate: (config) => {
16
+ if (config.base !== "/") throw new Error(`@ngrok/app-server serves a build at "/" only, and this config has the base "${config.base}".`);
17
+ }
18
+ };
19
+ }
20
+
21
+ export { reactRouterAdapter as t };
22
+ //# sourceMappingURL=vite-B-GfswoH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-B-GfswoH.js","names":[],"sources":["../src/react-router/vite.ts"],"sourcesContent":["import type { FrameworkBuild } from \"../vite/index.js\";\n\n/**\n * The build side of the React Router adapter. `appServer` uses it when the\n * Vite config has the React Router plugin, so pass it only to override that.\n *\n * @example\n * appServer({ framework: reactRouterAdapter() });\n */\nexport function reactRouterAdapter(): FrameworkBuild {\n\treturn {\n\t\tname: \"react-router\",\n\t\tserverModule: \"virtual:react-router/server-build\",\n\t\truntimeModule: \"@ngrok/app-server/react-router\",\n\t\t// Why this flag: React Router sets it for the preview server of its prerender pass only.\n\t\tisPrerenderPass: () => process.env.IS_RR_BUILD_REQUEST === \"yes\",\n\t\tvalidate: (config) => {\n\t\t\tif (config.base !== \"/\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`@ngrok/app-server serves a build at \"/\" only, and this config has the base \"${config.base}\".`,\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,qBAAqC;CACpD,OAAO;EACN,MAAM;EACN,cAAc;EACd,eAAe;EAEf,uBAAuB,QAAQ,IAAI,wBAAwB;EAC3D,WAAW,WAAW;GACrB,IAAI,OAAO,SAAS,KACnB,MAAM,IAAI,MACT,+EAA+E,OAAO,KAAK,GAC5F;EAEF;CACD;AACD"}
@@ -0,0 +1,19 @@
1
+ // src/node/vite.ts
2
+ /**
3
+ * The build side of the node host, the default host of `appServer`. The
4
+ * server build gets `server/app-server.js`. Run it with `node`, `bun`, or
5
+ * `deno run`, or load it with `app-server serve`.
6
+ *
7
+ * @example
8
+ * appServer({ host: node() });
9
+ */
10
+ function node() {
11
+ return {
12
+ name: "node",
13
+ runtimeModule: "@ngrok/app-server/node",
14
+ entryFileName: "app-server.js"
15
+ };
16
+ }
17
+
18
+ export { node as t };
19
+ //# sourceMappingURL=vite-D4hfj3ph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-D4hfj3ph.js","names":[],"sources":["../src/node/vite.ts"],"sourcesContent":["import type { HostBuild } from \"../vite/index.js\";\n\n/**\n * The build side of the node host, the default host of `appServer`. The\n * server build gets `server/app-server.js`. Run it with `node`, `bun`, or\n * `deno run`, or load it with `app-server serve`.\n *\n * @example\n * appServer({ host: node() });\n */\nexport function node(): HostBuild {\n\treturn {\n\t\tname: \"node\",\n\t\truntimeModule: \"@ngrok/app-server/node\",\n\t\tentryFileName: \"app-server.js\",\n\t};\n}\n"],"mappings":";;;;;;;;;AAUA,SAAgB,OAAkB;CACjC,OAAO;EACN,MAAM;EACN,eAAe;EACf,eAAe;CAChB;AACD"}
@@ -0,0 +1,25 @@
1
+ // src/tanstack-start/vite.ts
2
+ /**
3
+ * The build side of the TanStack Start adapter. `appServer` uses it when the
4
+ * Vite config has the TanStack Start plugin, so pass it only to override that.
5
+ * In `app-server start`, Vite runs in middleware mode, so Start skips its own
6
+ * SSR middleware, and the pipeline renders each page.
7
+ *
8
+ * @example
9
+ * appServer({ framework: tanstackStartAdapter() });
10
+ */
11
+ function tanstackStartAdapter() {
12
+ return {
13
+ name: "tanstack-start",
14
+ serverModule: "virtual:tanstack-start-server-entry",
15
+ runtimeModule: "@ngrok/app-server/tanstack-start",
16
+ runtimeOptions: "{ serverFnBase: process.env.TSS_SERVER_FN_BASE }",
17
+ isPrerenderPass: () => process.env.TSS_PRERENDERING === "true",
18
+ validate: (config) => {
19
+ if (config.base !== "/") throw new Error(`@ngrok/app-server serves a build at "/" only, and this config has the base "${config.base}".`);
20
+ }
21
+ };
22
+ }
23
+
24
+ export { tanstackStartAdapter as t };
25
+ //# sourceMappingURL=vite-DyrhyKEr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-DyrhyKEr.js","names":[],"sources":["../src/tanstack-start/vite.ts"],"sourcesContent":["import type { FrameworkBuild } from \"../vite/index.js\";\n\n/**\n * The build side of the TanStack Start adapter. `appServer` uses it when the\n * Vite config has the TanStack Start plugin, so pass it only to override that.\n * In `app-server start`, Vite runs in middleware mode, so Start skips its own\n * SSR middleware, and the pipeline renders each page.\n *\n * @example\n * appServer({ framework: tanstackStartAdapter() });\n */\nexport function tanstackStartAdapter(): FrameworkBuild {\n\treturn {\n\t\tname: \"tanstack-start\",\n\t\tserverModule: \"virtual:tanstack-start-server-entry\",\n\t\truntimeModule: \"@ngrok/app-server/tanstack-start\",\n\t\t// Why in the entry: Start defines `TSS_SERVER_FN_BASE` at build time, so only bundled code sees it.\n\t\truntimeOptions: \"{ serverFnBase: process.env.TSS_SERVER_FN_BASE }\",\n\t\t// Why this flag: Start sets it in the build process before it starts the preview server\n\t\t// of its prerender pass.\n\t\tisPrerenderPass: () => process.env.TSS_PRERENDERING === \"true\",\n\t\tvalidate: (config) => {\n\t\t\tif (config.base !== \"/\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`@ngrok/app-server serves a build at \"/\" only, and this config has the base \"${config.base}\".`,\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,uBAAuC;CACtD,OAAO;EACN,MAAM;EACN,cAAc;EACd,eAAe;EAEf,gBAAgB;EAGhB,uBAAuB,QAAQ,IAAI,qBAAqB;EACxD,WAAW,WAAW;GACrB,IAAI,OAAO,SAAS,KACnB,MAAM,IAAI,MACT,+EAA+E,OAAO,KAAK,GAC5F;EAEF;CACD;AACD"}