gemi 0.133.0 → 0.135.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.
Files changed (47) hide show
  1. package/dist/ai/index.d.ts +2 -2
  2. package/dist/ai/index.d.ts.map +1 -1
  3. package/dist/ai/index.js +9 -9
  4. package/dist/ai/index.js.map +4 -4
  5. package/dist/ai/providers/realtime.d.ts +75 -4
  6. package/dist/ai/providers/realtime.d.ts.map +1 -1
  7. package/dist/ai/providers/sideband.d.ts +7 -2
  8. package/dist/ai/providers/sideband.d.ts.map +1 -1
  9. package/dist/ai/voice/energyVad.d.ts +42 -0
  10. package/dist/ai/voice/energyVad.d.ts.map +1 -0
  11. package/dist/ai/voice/index.d.ts +7 -0
  12. package/dist/ai/voice/index.d.ts.map +1 -1
  13. package/dist/ai/voice/index.js +601 -1
  14. package/dist/ai/voice/index.js.map +1 -1
  15. package/dist/ai/voice/liveTranscription.d.ts +99 -0
  16. package/dist/ai/voice/liveTranscription.d.ts.map +1 -0
  17. package/dist/ai/voice/transcriptionState.d.ts +52 -0
  18. package/dist/ai/voice/transcriptionState.d.ts.map +1 -0
  19. package/dist/ai/voice/useLiveTranscription.d.ts +86 -0
  20. package/dist/ai/voice/useLiveTranscription.d.ts.map +1 -0
  21. package/dist/bin/gemi.js.map +1 -1
  22. package/dist/chunk-6hstj70n.js +24 -0
  23. package/dist/{chunk-s21kn0x8.js.map → chunk-6hstj70n.js.map} +3 -3
  24. package/dist/{chunk-wevj4981.js → chunk-e2tjw0qx.js} +7 -7
  25. package/dist/{chunk-wevj4981.js.map → chunk-e2tjw0qx.js.map} +4 -4
  26. package/dist/{chunk-s55t7rxw.js → chunk-n68a4r72.js} +1 -1
  27. package/dist/{chunk-b6yb3svm.js → chunk-rhjh79np.js} +2 -2
  28. package/dist/{chunk-b6yb3svm.js.map → chunk-rhjh79np.js.map} +1 -1
  29. package/dist/{chunk-4pvv8qs0.js → chunk-sxcxmwbt.js} +1 -1
  30. package/dist/client/index.js +8 -2
  31. package/dist/client/index.js.map +1 -1
  32. package/dist/client/islands.d.ts +10 -0
  33. package/dist/client/islands.d.ts.map +1 -1
  34. package/dist/facades/index.js +1 -1
  35. package/dist/http/index.js +1 -1
  36. package/dist/i18n/index.js +1 -1
  37. package/dist/kernel/index.js +1 -1
  38. package/dist/server/index.js +1 -1
  39. package/dist/server/modulePreloads.d.ts +14 -2
  40. package/dist/server/modulePreloads.d.ts.map +1 -1
  41. package/dist/services/index.js +1 -1
  42. package/dist/services/router/staticDocument.d.ts +6 -3
  43. package/dist/services/router/staticDocument.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/dist/chunk-s21kn0x8.js +0 -24
  46. /package/dist/{chunk-s55t7rxw.js.map → chunk-n68a4r72.js.map} +0 -0
  47. /package/dist/{chunk-4pvv8qs0.js.map → chunk-sxcxmwbt.js.map} +0 -0
@@ -0,0 +1,24 @@
1
+ // @bun
2
+ import{S as T,T as zJ,U as KJ}from"./chunk-rhjh79np.js";import{oa as M,sa as I,ta as VJ}from"./chunk-a22h5cby.js";import"./chunk-kk18xqgc.js";import{Pd as t,ag as HJ,bg as B}from"./chunk-e2tjw0qx.js";import"./chunk-ff60bzvf.js";import"./chunk-feajsgns.js";import{nh as i,oh as a,rh as r}from"./chunk-0rhf4g12.js";import{ti as GJ}from"./chunk-zv5qyrqg.js";import"./chunk-4t41m5f1.js";import"./chunk-hj88dcss.js";import"./chunk-z61dj480.js";import"./chunk-vnw91fe1.js";import"./chunk-jy9dkgt0.js";import"./chunk-ysc7ykss.js";import"./chunk-jx5zx48j.js";import"./chunk-z9xxthp1.js";import"./chunk-65j32dtn.js";import"./chunk-beb265c9.js";import"./chunk-zypmy8yq.js";import"./chunk-jx2mgvvt.js";import"./chunk-ha15x5ns.js";import{Lk as $J}from"./chunk-x9bk5s21.js";import"./chunk-gqgpwb88.js";import{Zk as OJ}from"./chunk-cxsvzqd4.js";import{_k as R}from"./chunk-99a4e6zf.js";import"./chunk-rnp5k8m3.js";import{createHash as W2}from"crypto";import{join as E,resolve as xJ,sep as LJ}from"path";import{Duplex as qJ}from"stream";import{constants as N,createBrotliCompress as bJ,createGzip as SJ}from"zlib";var kJ=["br","gzip"],wJ=1024,vJ=5,EJ=19,gJ=6;function yJ(J){if(J===void 0)return 1;if(!/^\d+(\.\d{0,3})?$/.test(J.trim()))return 1;let $=Number(J.trim());return Number.isFinite($)?Math.min($,1):1}function fJ(J){if(J===null||J===void 0)return null;let $=new Map;for(let Z of J.split(",")){let[X,...Q]=Z.split(";"),H=X.trim().toLowerCase();if(H==="")continue;let j=1;for(let Y of Q){let U=Y.indexOf("=");if(U===-1)continue;if(Y.slice(0,U).trim().toLowerCase()==="q"){j=yJ(Y.slice(U+1));break}}$.set(H,j)}return $}function k(J,$=kJ){let Z=fJ(J);if(!Z)return null;let X=Z.get("*"),Q=null,H=0;for(let j of $){let Y=Z.get(j)??X??0;if(Y>H)Q=j,H=Y}return Q}function mJ(J,$){if(!J)return!1;return J.split(",").some((Z)=>Z.trim().toLowerCase().split("=")[0].trim()===$)}function uJ(J,$){if(J==="HEAD")return!1;if($.status<200||$.status===204||$.status===206||$.status===304)return!1;if($.headers.has("Content-Range"))return!1;let Z=$.headers.get("Content-Type");if(!Z||!/^\s*text\/html\s*(;|$)/i.test(Z))return!1;if(!$.body)return!1;let X=$.headers.get("Content-Encoding");if(X&&X.trim().toLowerCase()!=="identity")return!1;if(mJ($.headers.get("Cache-Control"),"no-transform"))return!1;let Q=$.headers.get("Content-Length");if(Q!==null&&Number(Q)<wJ)return!1;return!0}function hJ(J){let $=J==="br"?bJ({params:{[N.BROTLI_PARAM_QUALITY]:vJ,[N.BROTLI_PARAM_LGWIN]:EJ},flush:N.BROTLI_OPERATION_FLUSH}):SJ({level:gJ,flush:N.Z_SYNC_FLUSH});return qJ.toWeb($)}function pJ(J){let $=J.get("Vary");if(!$){J.set("Vary","Accept-Encoding");return}let Z=$.split(",").map((X)=>X.trim().toLowerCase());if(Z.includes("*")||Z.includes("accept-encoding"))return;J.append("Vary","Accept-Encoding")}function d(J,$){if(!uJ(J.method,$))return $;let Z=new Headers($.headers);pJ(Z);let X=k(J.headers.get("Accept-Encoding"));if(!X)return new Response($.body,{status:$.status,statusText:$.statusText,headers:Z});let Q;try{Q=hJ(X)}catch{return new Response($.body,{status:$.status,statusText:$.statusText,headers:Z})}return Z.set("Content-Encoding",X),Z.delete("Content-Length"),new Response($.body.pipeThrough(Q),{status:$.status,statusText:$.statusText,headers:Z})}import{readdir as aJ,stat as s}from"fs/promises";import{join as rJ}from"path";import{mkdir as K2,readFile as cJ,stat as x2,writeFile as L2}from"fs/promises";import{dirname as I2,join as dJ}from"path";import{promisify as l}from"util";import{brotliCompress as lJ,constants as M2,gzip as oJ}from"zlib";var nJ=".vite/static-assets.json";var o={br:".br",gzip:".gz"},iJ=["br","gzip"],P2=l(lJ),N2=l(oJ);async function n(J){let $;try{$=await cJ(dJ(J,nJ),"utf8")}catch{return null}let Z;try{Z=JSON.parse($)?.files}catch{return null}if(!Z||typeof Z!=="object")return null;let X={files:{}};for(let[Q,H]of Object.entries(Z)){if(!Array.isArray(H))continue;X.files[Q]=iJ.filter((j)=>H.includes(j))}return X}function w(J){let $=J.toString(),Z=new Bun.CryptoHasher("sha1");return Z.update($),Z.digest("hex")}async function e(J){let $=new Set;async function Z(X,Q){let H;try{H=await aJ(X,{withFileTypes:!0})}catch{return}for(let j of H){if(j.name.startsWith("."))continue;if(Q&&j.name==="assets")continue;let Y=rJ(X,j.name),U=j.isDirectory(),O=j.isFile();if(j.isSymbolicLink())try{let x=await s(Y);U=x.isDirectory(),O=x.isFile()}catch{continue}if(O)$.add(Y);else if(U&&!j.isSymbolicLink())await Z(Y,!1)}}return await Z(J,!0),$}var tJ="public, max-age=31536000, must-revalidate",sJ="public, max-age=31536000, immutable";async function eJ(J,$,Z){if(Z.length===0||J.headers.has("Range"))return null;let X=k(J.headers.get("Accept-Encoding"),Z);if(!X)return null;let Q=$+o[X];try{let H=await s(Q);return H.isFile()?{encoding:X,path:Q,size:H.size}:null}catch{return null}}async function JJ(J,$,Z={}){let X=Bun.file($),Q=Z.encodings??[],H={"Content-Type":X.type||"application/octet-stream","Cache-Control":Z.immutable?sJ:tJ,"Accept-Ranges":"bytes"};if(Q.length>0)H.Vary="Accept-Encoding";let j=await eJ(J,$,Q);if(j){let O=Bun.file(j.path);return new Response(O.stream(),{headers:{...H,"Content-Encoding":j.encoding,"Content-Length":String(j.size),ETag:`${w(O.lastModified)}-${j.encoding}`}})}let Y=X.size;H.ETag=w(X.lastModified);let U=i(J.headers.get("Range"));if(U){let O=a(U,Y);if(!O)return t(Y);return new Response(X.slice(O.start,O.end+1).stream(),{status:206,headers:{...H,"Content-Range":r(O.start,O.end,Y),"Content-Length":String(O.length)}})}return new Response(X.stream(),{headers:{...H,"Content-Length":String(Y)}})}import{stat as H2}from"fs/promises";var A="app/client.tsx";function ZJ(J,$=M){let Z=J[A]?.file;if(!Z)return;return{module:I(Z,$),preload:C(J,A,$)}}function C(J,$,Z=M){let X=[],Q=new Set,H=(j)=>{if(Q.has(j))return;Q.add(j);let Y=J[j];if(!Y?.file)return;X.push(I(Y.file,Z));for(let U of Y.imports??[])H(U)};return H($),X}function J2(J,$,Z=M){let X=new Set(C(J,$,Z)),Q=[],H=new Set,j=(U)=>{if(H.has(U))return;H.add(U);let O=J[U];if(!O)return;for(let x of O.dynamicImports??[])if(!/(^|\/)node_modules\//.test(x)&&!Q.includes(x))Q.push(x);for(let x of O.imports??[])j(x)};j($);let Y=[];for(let U of Q)for(let O of C(J,U,Z))if(!X.has(O))X.add(O),Y.push(O);return Y}function XJ(J,$){let Z=[],X=new Set,Q=new Set,H=(j)=>{if(Q.has(j))return;Q.add(j);let Y=J[j];if(!Y)return;for(let U of Y.imports??[])H(U);for(let U of Y.css??[])if(!X.has(U))X.add(U),Z.push(U)};return H($),Z}function QJ(J,$=M){let Z=new Map;return(X)=>{if(!Z.has(X)){let Q=`${X}${$J}`,H=J[Q]?.file;Z.set(X,H?{src:I(H,$),preload:C(J,Q,$),dynamicPreload:J2(J,Q,$)}:void 0)}return Z.get(X)}}function WJ(J,$=30000){let Z=JSON.stringify("gemi:chunk-reload"),X=JSON.stringify(`Failed to fetch dynamically imported module: ${J}`);return`var r=!1;try{var s=window.sessionStorage,m=JSON.parse(s.getItem(${Z})||"null");var d=m?Date.now()-m.at:NaN;if(navigator.onLine!==!1&&!(d>=0&&d<${$})){s.setItem(${Z},JSON.stringify({url:window.location.href,at:Date.now()}));r=!0}}catch(e){}if(r)window.location.reload();else throw new Error(${X});export {}`}var $2=new RegExp(`^${HJ}/.+\\.m?js$`);function Z2(J){return $2.test(J)}function jJ(J){if(Z2(J))return new Response(WJ(J),{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store"}});if(B(J))return new Response("Not found",{status:404});return}var X2=`<!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Internal Server Error</title>
8
+ <style>
9
+ body { font-family: system-ui, sans-serif; margin: 0; min-height: 100vh; display: grid; place-items: center; }
10
+ main { text-align: center; padding: 16px; }
11
+ h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
12
+ p { margin: 0; opacity: 0.7; }
13
+ </style>
14
+ </head>
15
+ <body>
16
+ <main>
17
+ <h1>Something went wrong</h1>
18
+ <p>Please try again later.</p>
19
+ </main>
20
+ </body>
21
+ </html>`;function v(J,$,Z){if(!Z)console.error(J);else try{Z(J instanceof Error?J:Error(String(J),{cause:J}))}catch(X){console.error(J),console.error(X)}if(R($))return new Response(JSON.stringify({error:GJ("server_error","Internal Server Error",500)}),{status:500,headers:{"Content-Type":"application/json"}});return new Response(X2,{status:500,headers:{"Content-Type":"text/html; charset=utf-8"}})}var Q2={kind:"none"};function YJ(J){let $=(J??"").trim().toLowerCase();if($===""||$==="false"||$==="off"||$==="0")return Q2;if($==="true")return{kind:"all"};if(/^[1-9]\d*$/.test($))return{kind:"hops",hops:Number($)};throw Error(`GEMI_TRUST_PROXY must be "false", "true" or the number of proxies in front of the app (e.g. 1). Got ${JSON.stringify(J)}.`)}function UJ(J,$,Z){if(Z.kind==="all"){if(!J.get("x-forwarded-for")&&$)J.set("x-forwarded-for",$);return}J.delete("x-real-ip");let X=$;if(Z.kind==="hops"){let Q=(J.get("x-forwarded-for")??"").split(",").map((j)=>j.trim()).filter(Boolean),H=Q.length-Z.hops;X=H>=0?Q[H]:Q[0]??$}if(X)J.set("x-forwarded-for",X);else J.delete("x-forwarded-for")}var D=OJ(),j2=E(D,"app"),L=E(D,"dist"),F=E(L,"client");function G2(J){let $;try{$=decodeURIComponent(J)}catch{return null}let Z=xJ(F,"."+$.replace("/assets/assets","/assets"));return Z.startsWith(F+LJ)?Z:null}async function Y2(J){try{return(await H2(J)).isFile()}catch{return!1}}async function j3(J,$){let Z=await import(`${L}/client/.vite/manifest.json`),X=await import(`${L}/server/.vite/manifest.json`),Q=await VJ(`${L}/client`);process.env.ROOT_DIR=D,process.env.APP_DIR=j2,process.env.DIST_DIR=L;let H={},j={},Y={},U={},O={},x=(W,G)=>`"${W}": () => import("${G}")`,g=[];for(let W of["404",...J.getFlatComponentTree.call(J)]){let G=X[`app/views/${W}.tsx`];if(!G?.file){console.log(`Server file not found for ${W}`),console.log(G);let K=Object.keys(X),P=`app/views/${W}.tsx`;console.log(`${P} not found in server manifest`),console.log(K)}let V=await import(`${process.env.DIST_DIR}/server/${G?.file}`);H[W]=V.default,j[W]=V.OpenGraph,Y[W]=V;let z=Z[`app/views/${W}.tsx`];if(z?.css&&z?.css.length>0)U[W]=z?.css;if(z)g.push(x(W,I(z?.file,Q))),O[W]=C(Z,`app/views/${W}.tsx`,Q)}let CJ=`{${g.join(",")}}`,y=ZJ(Z,Q);if(!y)console.error(`Client manifest has no "${A}" entry \u2014 dist/client is incomplete, so documents will render but never hydrate.`);let IJ=Z["app/client.tsx"]?.css??[],f=(await Promise.all(IJ.map((W)=>Bun.file(`${L}/client/${W}`).text()))).join(`
22
+ `),FJ=QJ(Z,Q),_J=W2("sha256").update(await Bun.file(`${L}/client/.vite/manifest.json`).text()).digest("base64url").slice(0,12),m=new Map,MJ=(W)=>{let G=m.get(W);if(!G)G=Bun.file(`${L}/client/${W}`).text(),m.set(W,G);return G},PJ=async(W,G)=>{let V=new Set;for(let K of G?[G,...W]:W)for(let P of XJ(Z,`app/views/${K}.tsx`))V.add(P);let z=await Promise.all([...V].map(async(K)=>({id:K,content:await MJ(K)})));return T(G?z:[{content:f},...z])},NJ=await e(F),u=new Map;for(let[W,G]of Object.entries((await n(F))?.files??{})){let V=xJ(F,W);if(V.startsWith(F+LJ))u.set(V,{immutable:!0,encodings:G})}async function AJ(W){let{pathname:G}=new URL(W.url);if(R(G))return await q(W,G);let V=G2(G);if(B(G)||G.startsWith("/.well-known")||V!==null&&NJ.has(V)){if(!V||!await Y2(V))return jJ(G)??await q(W,G);try{return await JJ(W,V,u.get(V))}catch(K){return J.onException?.(K),new Response("Not found",{status:404})}}return await q(W,G)}async function q(W,G){let V=J.fetch.bind(J);try{let z=await V(W);if(z instanceof Response)return z;else{let K=[];return K.push({content:f}),await z({getStyles:async(S,p)=>{if(!S)return T([]);if(p?.static)return PJ(S,p.layout);for(let RJ of S){let TJ=Z[`app/views/${RJ}.tsx`];for(let c of TJ?.css??[]){let DJ=Bun.file(`${process.env.DIST_DIR}/client/${c}`);K.push({id:c,content:await DJ.text()})}}return T(K)},clientEntry:y,modulePreloadManifest:O,loaders:CJ,viewImportMap:H,viewModules:Y,ogMap:j,cssManifest:U,assetBase:Q,resolveIsland:FJ,buildId:_J})}}catch(z){return v(z,G,J.onException)}}let BJ=(process.env.GEMI_COMPRESSION??"auto").toLowerCase()!=="off",h=YJ(process.env.GEMI_TRUST_PROXY),_=J.sockets();if(_&&h.kind==="none")console.warn("[gemi] Broadcast sockets: GEMI_TRUST_PROXY is not set, so a socket's address is its TCP peer. Behind a proxy or load balancer every client shares the proxy's address, and broadcast.maxConnectionsPerIp caps the whole app per process. Set GEMI_TRUST_PROXY (see forwardedFor) or raise that limit.");let b=Bun.serve({maxRequestBodySize:10737418240,fetch:async(W,G)=>{if(UJ(W.headers,G.requestIP(W)?.address??null,h),J.applyTrustedClientIp(W),_?.matches(W))return _.upgrade(W,G);let V=await $(W,(z)=>J.withGlobalMiddleware(z,AJ,(K)=>v(K,new URL(z.url).pathname,J.onException)));return BJ?d(W,V):V},idleTimeout:KJ(),port:process.env.PORT||5173,websocket:_?.websocket});return await _?.start(b),zJ({port:b.port,rootDir:D}),b}export{j3 as httpProd};
23
+
24
+ //# debugId=962AC95D4CCC33FC64756E2164756E21
@@ -7,13 +7,13 @@
7
7
  "import { readdir, stat } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { createUnsatisfiableResponse } from \"../http/createStreamResponse\";\nimport { formatContentRange, parseRangeHeader, resolveRange } from \"../http/range\";\nimport { SIBLING_EXTENSION } from \"../vite/precompressAssets\";\nimport { type ContentEncoding, negotiateEncoding } from \"./compression\";\nimport { generateETag } from \"./generateEtag\";\n\n/**\n * Every file in `dist/client` outside `/assets`, as absolute paths — what\n * Vite copied out of `public/` (#583).\n *\n * A root-level path may be an app route, so the static handler may only take\n * one that names a file the app really ships. This used to be guessed from the\n * extension, and every extension the list missed (`.mp4` on 0.58, `.wasm`,\n * `.csv` …) was answered by the router with a rendered 404 page. The build\n * output is fixed for the life of the process, so the exact set is read once\n * at boot instead.\n *\n * `assets/` is left out because the static handler takes everything under it\n * anyway. A name starting with a dot is left out at any depth: `.vite/` is\n * build metadata (both manifests and the asset base record), and a stray\n * `.DS_Store` or `.env` copied in from `public/` is nothing a request should\n * reach. `/.well-known` is served by its own rule.\n */\nexport async function listPublicFiles(clientDir: string): Promise<Set<string>> {\n const files = new Set<string>();\n\n async function walk(dir: string, topLevel: boolean) {\n let entries;\n try {\n entries = await readdir(dir, { withFileTypes: true });\n } catch {\n return;\n }\n for (const entry of entries) {\n if (entry.name.startsWith(\".\")) continue;\n if (topLevel && entry.name === \"assets\") continue;\n const path = join(dir, entry.name);\n let isDir = entry.isDirectory();\n let isFile = entry.isFile();\n if (entry.isSymbolicLink()) {\n try {\n const target = await stat(path);\n isDir = target.isDirectory();\n isFile = target.isFile();\n } catch {\n continue;\n }\n }\n if (isFile) files.add(path);\n // A symlinked directory is not followed: a link back up the tree would\n // never end, and `clientFilePath` only names paths inside `dist/client`.\n else if (isDir && !entry.isSymbolicLink()) await walk(path, false);\n }\n }\n\n await walk(clientDir, true);\n return files;\n}\n\nconst LONG_LIVED = \"public, max-age=31536000, must-revalidate\";\n\n/**\n * A content-hashed build asset never changes under its name: a new build\n * writes a new name. So a browser or edge may keep it a year without asking\n * again (#789).\n */\nconst IMMUTABLE = \"public, max-age=31536000, immutable\";\n\nexport interface StaticFileOptions {\n /**\n * The file is a content-hashed build asset (it is in the build's\n * `static-assets.json`), so it is sent as `immutable`.\n */\n immutable?: boolean;\n /**\n * The precompressed siblings the build wrote for it (`file.br`,\n * `file.gz`), in preference order. Offering any makes the response vary by\n * `Accept-Encoding`, so it says so even when it sends identity.\n */\n encodings?: ContentEncoding[];\n}\n\nasync function encodedSibling(\n req: Request,\n path: string,\n encodings: ContentEncoding[],\n): Promise<{ encoding: ContentEncoding; path: string; size: number } | null> {\n // A range is a byte range of the identity representation: an encoded\n // variant has no stable offsets to slice, so a range request gets identity.\n if (encodings.length === 0 || req.headers.has(\"Range\")) {\n return null;\n }\n const encoding = negotiateEncoding(req.headers.get(\"Accept-Encoding\"), encodings);\n if (!encoding) {\n return null;\n }\n const siblingPath = path + SIBLING_EXTENSION[encoding];\n try {\n // Checked per request, like the file itself: a sibling deleted under a\n // running server would otherwise fail mid-body after a committed 200.\n const info = await stat(siblingPath);\n return info.isFile() ? { encoding, path: siblingPath, size: info.size } : null;\n } catch {\n return null;\n }\n}\n\n/**\n * The response for a file in `dist/client` that is known to exist.\n *\n * Honours a single byte `Range`, so a `<video>` pointed at a public `.mp4`\n * can seek — Safari will not play one at all from a server that answers its\n * `bytes=0-1` probe with the whole file. Recent Bun releases slice a\n * file-backed 200 themselves; doing it here keeps that from depending on the\n * Bun version a deployment runs, and answers an unsatisfiable range with the\n * same 416 the `stream()` responses use.\n *\n * A build asset with precompressed siblings is sent as the one\n * `Accept-Encoding` prefers (brotli, then gzip, then identity), with the\n * original's `Content-Type`. Nothing is compressed here: a file without a\n * sibling is sent as is.\n *\n * `Bun.file().type` is the mime lookup, and is `application/octet-stream` for\n * an extension it does not know.\n */\nexport async function staticFileResponse(\n req: Request,\n path: string,\n options: StaticFileOptions = {},\n): Promise<Response> {\n const file = Bun.file(path);\n const encodings = options.encodings ?? [];\n\n const headers: Record<string, string> = {\n \"Content-Type\": file.type || \"application/octet-stream\",\n \"Cache-Control\": options.immutable ? IMMUTABLE : LONG_LIVED,\n \"Accept-Ranges\": \"bytes\",\n };\n if (encodings.length > 0) {\n headers.Vary = \"Accept-Encoding\";\n }\n\n const sibling = await encodedSibling(req, path, encodings);\n if (sibling) {\n const encoded = Bun.file(sibling.path);\n return new Response(encoded.stream(), {\n headers: {\n ...headers,\n \"Content-Encoding\": sibling.encoding,\n \"Content-Length\": String(sibling.size),\n // A different representation, so a different validator.\n ETag: `${generateETag(encoded.lastModified)}-${sibling.encoding}`,\n },\n });\n }\n\n const total = file.size;\n headers.ETag = generateETag(file.lastModified);\n\n const range = parseRangeHeader(req.headers.get(\"Range\"));\n\n if (range) {\n const resolved = resolveRange(range, total);\n if (!resolved) {\n return createUnsatisfiableResponse(total);\n }\n return new Response(file.slice(resolved.start, resolved.end + 1).stream(), {\n status: 206,\n headers: {\n ...headers,\n \"Content-Range\": formatContentRange(resolved.start, resolved.end, total),\n \"Content-Length\": String(resolved.length),\n },\n });\n }\n\n return new Response(file.stream(), {\n headers: { ...headers, \"Content-Length\": String(total) },\n });\n}\n",
8
8
  "import { mkdir, readFile, stat, writeFile } from \"node:fs/promises\";\nimport { availableParallelism } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport { promisify } from \"node:util\";\nimport { brotliCompress, constants, gzip } from \"node:zlib\";\n\nimport type { ContentEncoding } from \"../server/compression\";\n\n/**\n * Build-time compression of the client bundle (#789).\n *\n * `gemi start` compresses SSR HTML per request, but a hashed chunk is the same\n * bytes for the life of a release, so compressing it per request would spend\n * origin CPU on every visitor for a result that never changes. `gemi build`\n * writes `file.br` (brotli quality 11) and `file.gz` (gzip level 9) next to\n * every compressible build asset instead, once, and the server picks one by\n * `Accept-Encoding`.\n *\n * What the build emitted (and what it carried over from earlier releases, see\n * `previousAssets.ts`) is recorded in `dist/client/.vite/static-assets.json`,\n * with the encodings each file has. The server reads it at boot: a file in the\n * record is a content-hashed build asset, so it is sent as `immutable`, and\n * only the encodings listed for it are offered. A file not in the record (one\n * copied from `public/assets/`, or anything in a build made before this\n * existed) is served as before.\n */\n\n/** Relative to `dist/client`; beside Vite's own manifest, so never served. */\nexport const STATIC_ASSETS_RECORD = \".vite/static-assets.json\";\n\n/**\n * Below this, the encoded body plus its header is not worth a second request\n * representation: a 600-byte chunk saves a few hundred bytes at most, and\n * every file with siblings adds a `stat` per request.\n */\nexport const PRECOMPRESS_MIN_BYTES = 1024;\n\n/**\n * Text-like formats that compress well. Already-compressed formats (images,\n * `woff`/`woff2`, video) are left out: brotli shaves a percent or two off\n * them at best. Source maps are left out because a page never loads one, and\n * only devtools would gain from the extra build time.\n */\nconst COMPRESSIBLE = /\\.(?:m?js|cjs|css|svg|json|webmanifest|wasm|txt|xml|ttf|otf|eot)$/i;\n\nconst TEXT = /\\.(?:m?js|cjs|css|svg|json|webmanifest|txt|xml)$/i;\nconst FONT = /\\.(?:ttf|otf|eot)$/i;\n\nexport const SIBLING_EXTENSION: Record<ContentEncoding, string> = {\n br: \".br\",\n gzip: \".gz\",\n};\n\n/** Server preference: brotli is ~15% smaller than gzip -9 on a JS chunk. */\nconst ENCODINGS: ContentEncoding[] = [\"br\", \"gzip\"];\n\nexport interface StaticAssetsRecord {\n /**\n * Path relative to `dist/client` (`assets/client-DJhrQPW5.js`) → the\n * precompressed siblings it has, in preference order. An empty list is a\n * build asset that is served as identity only (an image, a small file).\n */\n files: Record<string, ContentEncoding[]>;\n}\n\nexport interface PrecompressStats {\n files: number;\n identityBytes: number;\n brBytes: number;\n gzipBytes: number;\n}\n\nconst brotli = promisify(brotliCompress);\nconst gzipAsync = promisify(gzip);\n\nexport function isPrecompressible(file: string): boolean {\n return COMPRESSIBLE.test(file);\n}\n\n/** `true` for `x.js.br` / `x.js.gz`: a sibling, not an asset of its own. */\nexport function isEncodedSibling(file: string): boolean {\n return file.endsWith(\".br\") || file.endsWith(\".gz\");\n}\n\nasync function encode(encoding: ContentEncoding, file: string, input: Buffer): Promise<Buffer> {\n if (encoding === \"gzip\") {\n return gzipAsync(input, { level: 9 });\n }\n return brotli(input, {\n params: {\n [constants.BROTLI_PARAM_QUALITY]: constants.BROTLI_MAX_QUALITY,\n [constants.BROTLI_PARAM_MODE]: TEXT.test(file)\n ? constants.BROTLI_MODE_TEXT\n : FONT.test(file)\n ? constants.BROTLI_MODE_FONT\n : constants.BROTLI_MODE_GENERIC,\n [constants.BROTLI_PARAM_SIZE_HINT]: input.length,\n },\n });\n}\n\nasync function fileSize(path: string): Promise<number | null> {\n try {\n const info = await stat(path);\n return info.isFile() ? info.size : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Writes the `.br`/`.gz` siblings of `files` (paths relative to `clientDir`)\n * and returns the encodings each one ended up with.\n *\n * A sibling is only kept when it is smaller than the file itself; one that is\n * not would cost bytes on the wire, so the file is served as identity for\n * that encoding. With `reuseExisting`, a sibling already on disk is trusted\n * rather than rebuilt — for files carried from an earlier release, whose\n * siblings were copied with them and match by content hash.\n */\nexport async function precompressAssets(\n clientDir: string,\n files: Iterable<string>,\n options: {\n reuseExisting?: boolean;\n minBytes?: number;\n concurrency?: number;\n } = {},\n): Promise<{ record: StaticAssetsRecord; stats: PrecompressStats }> {\n const minBytes = options.minBytes ?? PRECOMPRESS_MIN_BYTES;\n const record: StaticAssetsRecord = { files: {} };\n const stats: PrecompressStats = {\n files: 0,\n identityBytes: 0,\n brBytes: 0,\n gzipBytes: 0,\n };\n\n const queue = [...new Set(files)];\n for (const file of queue) {\n record.files[file] = [];\n }\n\n async function work(file: string) {\n if (!isPrecompressible(file)) {\n return;\n }\n const path = join(clientDir, file);\n const size = await fileSize(path);\n if (size === null || size < minBytes) {\n return;\n }\n\n let input: Buffer | null = null;\n const available: ContentEncoding[] = [];\n const sizes: Partial<Record<ContentEncoding, number>> = {};\n for (const encoding of ENCODINGS) {\n const siblingPath = path + SIBLING_EXTENSION[encoding];\n const existing = options.reuseExisting ? await fileSize(siblingPath) : null;\n if (existing !== null) {\n if (existing < size) {\n available.push(encoding);\n sizes[encoding] = existing;\n }\n continue;\n }\n input ??= await readFile(path);\n const output = await encode(encoding, file, input);\n if (output.length < size) {\n await writeFile(siblingPath, output);\n available.push(encoding);\n sizes[encoding] = output.length;\n }\n }\n\n record.files[file] = available;\n if (available.length > 0) {\n stats.files += 1;\n stats.identityBytes += size;\n stats.brBytes += sizes.br ?? size;\n stats.gzipBytes += sizes.gzip ?? size;\n }\n }\n\n // zlib's async calls run on the libuv thread pool; a few files in flight\n // keep it busy without reading the whole bundle into memory at once.\n const concurrency = Math.max(1, options.concurrency ?? Math.min(8, availableParallelism()));\n let next = 0;\n await Promise.all(\n Array.from({ length: Math.min(concurrency, queue.length) }, async () => {\n while (next < queue.length) {\n await work(queue[next++]);\n }\n }),\n );\n\n return { record, stats };\n}\n\nexport async function writeStaticAssetsRecord(clientDir: string, record: StaticAssetsRecord) {\n const path = join(clientDir, STATIC_ASSETS_RECORD);\n await mkdir(dirname(path), { recursive: true });\n // Sorted, so two builds of the same tree write the same file.\n const files = Object.fromEntries(\n Object.entries(record.files).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)),\n );\n await writeFile(path, `${JSON.stringify({ files }, null, 2)}\\n`);\n}\n\n/**\n * The record a build wrote, or `null` when there is none (a build made before\n * precompression, or an incomplete `dist/`): the server then serves every file\n * as before. A malformed entry is dropped rather than trusted.\n */\nexport async function readStaticAssetsRecord(\n clientDir: string,\n): Promise<StaticAssetsRecord | null> {\n let raw: string;\n try {\n raw = await readFile(join(clientDir, STATIC_ASSETS_RECORD), \"utf8\");\n } catch {\n return null;\n }\n let files: unknown;\n try {\n files = JSON.parse(raw)?.files;\n } catch {\n return null;\n }\n if (!files || typeof files !== \"object\") {\n return null;\n }\n const record: StaticAssetsRecord = { files: {} };\n for (const [file, encodings] of Object.entries(files)) {\n if (!Array.isArray(encodings)) continue;\n record.files[file] = ENCODINGS.filter((encoding) => encodings.includes(encoding));\n }\n return record;\n}\n",
9
9
  "export function generateETag(lastModified: number): string {\n // Assuming the last modified timestamp is in milliseconds\n const lastModifiedStr = lastModified.toString();\n\n const hasher = new Bun.CryptoHasher(\"sha1\");\n hasher.update(lastModifiedStr);\n const hash = hasher.digest(\"hex\");\n\n return hash;\n}\n",
10
- "import { DEFAULT_ASSET_BASE, assetUrl } from \"../config/assetBase\";\nimport { ISLAND_ENTRY_QUERY } from \"../internal/islandRuntime\";\n\n/** The subset of a Vite manifest entry this module reads. */\nexport interface ViteManifestChunk {\n file: string;\n imports?: string[];\n dynamicImports?: string[];\n}\n\nexport type ViteManifest = Record<string, ViteManifestChunk>;\n\n/** Vite's manifest key for the module that boots hydration. */\nexport const CLIENT_ENTRY_KEY = \"app/client.tsx\";\n\n/**\n * How the shell boots hydration in production: `module` is imported from the\n * bootstrap script, `preload` is every chunk that import pulls in — see\n * `clientEntry` in `ViewRouteDispatcher` for why the entry does not go through\n * React's `bootstrapModules`.\n *\n * `undefined` when the manifest has no client entry, which means a `dist/`\n * interrupted between the server and client build passes. Degrading beats\n * throwing here: this runs at boot, so a deref would take down API routes,\n * static assets and health checks over what is only a document concern, and\n * the dispatcher already renders a shell that simply does not hydrate.\n *\n * `assetBase` is the base the client build recorded — see `readBuiltAssetBase`.\n */\nexport function createClientEntry(\n manifest: ViteManifest,\n assetBase: string = DEFAULT_ASSET_BASE,\n): { module: string; preload: string[] } | undefined {\n const file = manifest[CLIENT_ENTRY_KEY]?.file;\n if (!file) {\n return undefined;\n }\n return {\n module: assetUrl(file, assetBase),\n preload: collectModulePreloads(manifest, CLIENT_ENTRY_KEY, assetBase),\n };\n}\n\n/**\n * Every chunk URL that importing `entryKey` pulls in, itself first.\n *\n * The browser can only discover these one parse at a time — it learns about a\n * chunk's static imports after the chunk has arrived and been parsed — so a\n * `layout -> view -> child component` graph costs one round trip per level.\n * Handing the whole list to the shell as `modulepreload` hints turns that\n * chain into one parallel fetch (#352).\n *\n * `dynamicImports` are deliberately left out: those are the pieces the app\n * asked to load lazily, and preloading them would download code the current\n * route may never render.\n */\nexport function collectModulePreloads(\n manifest: ViteManifest,\n entryKey: string,\n assetBase: string = DEFAULT_ASSET_BASE,\n): string[] {\n const urls: string[] = [];\n // Chunk graphs are cyclic often enough (two chunks importing each other\n // through a shared module) that walking them without a visited set hangs.\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key];\n if (!chunk?.file) return;\n urls.push(assetUrl(chunk.file, assetBase));\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n };\n\n walk(entryKey);\n\n return urls;\n}\n\n/**\n * Every CSS file the static import closure of `entryKey` carries, in import\n * order and without repeats. Vite lists a chunk's CSS on that chunk only, not\n * on the entries that import it, so a page with no client router to load the\n * rest (a static view) has to walk the graph for it.\n */\nexport function collectCss(manifest: ViteManifest, entryKey: string): string[] {\n const files: string[] = [];\n const seen = new Set<string>();\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key] as ViteManifestChunk & { css?: string[] };\n if (!chunk) return;\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n for (const file of chunk.css ?? []) {\n if (!seen.has(file)) {\n seen.add(file);\n files.push(file);\n }\n }\n };\n\n walk(entryKey);\n return files;\n}\n\n/**\n * Where a static page's islands load from: each island module's entry\n * (`<key>?gemi-island`, the module plus the hydrate function), with the\n * chunks importing it pulls in, itself first. React and `react-dom/client`\n * are among those. `undefined` for a module the client build has no island\n * entry for.\n */\nexport function createIslandResolver(\n manifest: ViteManifest,\n assetBase: string = DEFAULT_ASSET_BASE,\n): (moduleKey: string) => { src: string; preload: string[] } | undefined {\n const cache = new Map<string, { src: string; preload: string[] } | undefined>();\n return (moduleKey) => {\n if (!cache.has(moduleKey)) {\n const key = `${moduleKey}${ISLAND_ENTRY_QUERY}`;\n const file = manifest[key]?.file;\n cache.set(\n moduleKey,\n file\n ? { src: assetUrl(file, assetBase), preload: collectModulePreloads(manifest, key, assetBase) }\n : undefined,\n );\n }\n return cache.get(moduleKey);\n };\n}\n",
10
+ "import { DEFAULT_ASSET_BASE, assetUrl } from \"../config/assetBase\";\nimport { ISLAND_ENTRY_QUERY } from \"../internal/islandRuntime\";\n\n/** The subset of a Vite manifest entry this module reads. */\nexport interface ViteManifestChunk {\n file: string;\n imports?: string[];\n dynamicImports?: string[];\n}\n\nexport type ViteManifest = Record<string, ViteManifestChunk>;\n\n/** Vite's manifest key for the module that boots hydration. */\nexport const CLIENT_ENTRY_KEY = \"app/client.tsx\";\n\n/**\n * How the shell boots hydration in production: `module` is imported from the\n * bootstrap script, `preload` is every chunk that import pulls in — see\n * `clientEntry` in `ViewRouteDispatcher` for why the entry does not go through\n * React's `bootstrapModules`.\n *\n * `undefined` when the manifest has no client entry, which means a `dist/`\n * interrupted between the server and client build passes. Degrading beats\n * throwing here: this runs at boot, so a deref would take down API routes,\n * static assets and health checks over what is only a document concern, and\n * the dispatcher already renders a shell that simply does not hydrate.\n *\n * `assetBase` is the base the client build recorded — see `readBuiltAssetBase`.\n */\nexport function createClientEntry(\n manifest: ViteManifest,\n assetBase: string = DEFAULT_ASSET_BASE,\n): { module: string; preload: string[] } | undefined {\n const file = manifest[CLIENT_ENTRY_KEY]?.file;\n if (!file) {\n return undefined;\n }\n return {\n module: assetUrl(file, assetBase),\n preload: collectModulePreloads(manifest, CLIENT_ENTRY_KEY, assetBase),\n };\n}\n\n/**\n * Every chunk URL that importing `entryKey` pulls in, itself first.\n *\n * The browser can only discover these one parse at a time — it learns about a\n * chunk's static imports after the chunk has arrived and been parsed — so a\n * `layout -> view -> child component` graph costs one round trip per level.\n * Handing the whole list to the shell as `modulepreload` hints turns that\n * chain into one parallel fetch (#352).\n *\n * `dynamicImports` are deliberately left out: those are the pieces the app\n * asked to load lazily, and preloading them would download code the current\n * route may never render.\n */\nexport function collectModulePreloads(\n manifest: ViteManifest,\n entryKey: string,\n assetBase: string = DEFAULT_ASSET_BASE,\n): string[] {\n const urls: string[] = [];\n // Chunk graphs are cyclic often enough (two chunks importing each other\n // through a shared module) that walking them without a visited set hangs.\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key];\n if (!chunk?.file) return;\n urls.push(assetUrl(chunk.file, assetBase));\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n };\n\n walk(entryKey);\n\n return urls;\n}\n\n/**\n * The chunks the static import closure of `entryKey` loads lazily, each with\n * its own static closure, minus what that closure already has: every\n * `import()` in the entry's code (and its static dependencies'), one level\n * deep. An island with `preloadDynamic` gets these preloaded too (#932).\n *\n * Dynamic imports into `node_modules` are left out: those are a library's own\n * lazy pieces (gemi's client loads a few on first use), not the app's.\n */\nexport function collectDynamicPreloads(\n manifest: ViteManifest,\n entryKey: string,\n assetBase: string = DEFAULT_ASSET_BASE,\n): string[] {\n const seen = new Set(collectModulePreloads(manifest, entryKey, assetBase));\n const targets: string[] = [];\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key];\n if (!chunk) return;\n for (const target of chunk.dynamicImports ?? []) {\n if (!/(^|\\/)node_modules\\//.test(target) && !targets.includes(target)) {\n targets.push(target);\n }\n }\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n };\n walk(entryKey);\n\n const urls: string[] = [];\n for (const target of targets) {\n for (const url of collectModulePreloads(manifest, target, assetBase)) {\n if (!seen.has(url)) {\n seen.add(url);\n urls.push(url);\n }\n }\n }\n return urls;\n}\n\n/**\n * Every CSS file the static import closure of `entryKey` carries, in import\n * order and without repeats. Vite lists a chunk's CSS on that chunk only, not\n * on the entries that import it, so a page with no client router to load the\n * rest (a static view) has to walk the graph for it.\n */\nexport function collectCss(manifest: ViteManifest, entryKey: string): string[] {\n const files: string[] = [];\n const seen = new Set<string>();\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key] as ViteManifestChunk & { css?: string[] };\n if (!chunk) return;\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n for (const file of chunk.css ?? []) {\n if (!seen.has(file)) {\n seen.add(file);\n files.push(file);\n }\n }\n };\n\n walk(entryKey);\n return files;\n}\n\n/**\n * Where a static page's islands load from: each island module's entry\n * (`<key>?gemi-island`, the module plus the hydrate function), with the\n * chunks importing it pulls in, itself first. React and `react-dom/client`\n * are among those. `dynamicPreload` is what the entry loads lazily (see\n * `collectDynamicPreloads`), for an island with `preloadDynamic`.\n * `undefined` for a module the client build has no island entry for.\n */\nexport function createIslandResolver(\n manifest: ViteManifest,\n assetBase: string = DEFAULT_ASSET_BASE,\n): (moduleKey: string) => { src: string; preload: string[]; dynamicPreload: string[] } | undefined {\n const cache = new Map<\n string,\n { src: string; preload: string[]; dynamicPreload: string[] } | undefined\n >();\n return (moduleKey) => {\n if (!cache.has(moduleKey)) {\n const key = `${moduleKey}${ISLAND_ENTRY_QUERY}`;\n const file = manifest[key]?.file;\n cache.set(\n moduleKey,\n file\n ? {\n src: assetUrl(file, assetBase),\n preload: collectModulePreloads(manifest, key, assetBase),\n dynamicPreload: collectDynamicPreloads(manifest, key, assetBase),\n }\n : undefined,\n );\n }\n return cache.get(moduleKey);\n };\n}\n",
11
11
  "/**\n * Recovery from a chunk that will not load — almost always a document from an\n * earlier release asking for a chunk the server it reached no longer has\n * (#548). The page cannot continue with the module it wanted, and a full load\n * of the URL it was heading to gets it the current release's document.\n *\n * One reload, guarded: a reload that lands on the same failure (a chunk that is\n * genuinely missing, a proxy that keeps refusing it) must not become a loop. A\n * `sessionStorage` marker with a timestamp survives the reload it guards, so a\n * second failure inside the cooldown is left to the route's error boundary.\n *\n * No DOM or React import at module scope: the server's reload stub\n * (`server/staticAssetMiss.ts`) embeds the same guard as a script.\n */\n\n/** The `sessionStorage` key the guard lives under, shared with the reload stub. */\nexport const CHUNK_RELOAD_MARKER = \"gemi:chunk-reload\";\n\n/** How long after one recovery reload another is refused. */\nexport const DEFAULT_CHUNK_RELOAD_COOLDOWN_MS = 30_000;\n\n/**\n * Where the failure surfaced: a route's view chunk during a client-side\n * navigation or hydration, a `vite:preloadError` (a lazy `import()` in app\n * code, through Vite's preload helper), or an app calling\n * `recoverFromChunkLoadError` from its own error boundary.\n */\nexport type ChunkLoadErrorSource = \"navigation\" | \"hydration\" | \"preload\" | \"app\";\n\n/**\n * Why gemi will not reload, or `null` when it will:\n * - `cooldown`: it already reloaded for a chunk failure within `cooldownMs`.\n * - `offline`: `navigator.onLine` is false — a reload would only fail harder.\n * - `storage`: `sessionStorage` cannot be read or written, so the guard cannot\n * survive the reload and the loop it prevents could not be ruled out.\n */\nexport type ChunkReloadBlock = \"cooldown\" | \"offline\" | \"storage\" | null;\n\nexport interface ChunkLoadErrorContext {\n error: unknown;\n /** The URL the reload goes to: the page being navigated to. */\n url: string;\n source: ChunkLoadErrorSource;\n /** Why gemi will not reload, or `null` when it is about to. */\n blocked: ChunkReloadBlock;\n}\n\nexport interface ChunkLoadRecoveryOptions {\n /** Default 30 000 ms. */\n cooldownMs?: number;\n /**\n * Called for every chunk load failure gemi sees, before it reloads — the\n * place to report it, or to veto the reload (unsaved input, a page that\n * would rather show its own \"a new version is available\" prompt). Return\n * `false` to skip the reload; anything else lets gemi proceed. It is called\n * when the reload is blocked too, with `blocked` saying why.\n */\n onChunkLoadError?: (context: ChunkLoadErrorContext) => boolean | void;\n}\n\nlet enabled = true;\nlet options: ChunkLoadRecoveryOptions = {};\nlet reloading = false;\n\n/**\n * Sets how gemi recovers from a failed chunk. `false` turns recovery off: the\n * failure goes to the route's error boundary as it did before. `init` calls\n * this with its `chunkLoadRecovery` option.\n */\nexport function configureChunkLoadRecovery(next: ChunkLoadRecoveryOptions | false | undefined) {\n enabled = next !== false;\n options = next || {};\n}\n\n/** For tests: back to the defaults, with no reload in flight. */\nexport function __resetChunkLoadRecovery() {\n enabled = true;\n options = {};\n reloading = false;\n}\n\n/**\n * Whether `error` is a module that failed to load rather than one that loaded\n * and threw. Each engine words it differently:\n *\n * - Chromium: `Failed to fetch dynamically imported module: <url>`\n * - Firefox: `error loading dynamically imported module: <url>`\n * - Safari: `Importing a module script failed.`, and on iOS 16\n * `Importing module '<specifier>' is not found.` (folio#2117)\n * - Vite's preload helper: `Unable to preload CSS for <url>`\n *\n * A view that throws while evaluating is not one of these, and reloading\n * would only hide it.\n */\nexport function isChunkLoadError(error: unknown): boolean {\n if (!error || typeof error !== \"object\") {\n return false;\n }\n const { name, message } = error as { name?: unknown; message?: unknown };\n if (name === \"ChunkLoadError\") {\n return true;\n }\n if (typeof message !== \"string\") {\n return false;\n }\n return CHUNK_LOAD_MESSAGES.some((pattern) => pattern.test(message));\n}\n\nconst CHUNK_LOAD_MESSAGES = [\n /failed to fetch dynamically imported module/i,\n /error loading dynamically imported module/i,\n /importing a module script failed/i,\n /importing module .* is not found/i,\n /unable to preload css/i,\n /failed to load module script/i,\n];\n\n/**\n * Reloads the page onto `url` once for a chunk that failed to load, unless the\n * guard or the app's `onChunkLoadError` says not to. Returns whether a reload\n * was started.\n *\n * Errors that are not chunk failures are ignored (`false`), so an app's error\n * boundary can pass everything it catches here.\n */\nexport function recoverFromChunkLoadError(\n error: unknown,\n { source = \"app\", url }: { source?: ChunkLoadErrorSource; url?: string } = {},\n): boolean {\n if (typeof window === \"undefined\" || !enabled || !isChunkLoadError(error)) {\n return false;\n }\n if (reloading) {\n // A route with several views fails once per view; the first one reloads.\n return true;\n }\n const target = url ?? window.location.href;\n const cooldownMs = options.cooldownMs ?? DEFAULT_CHUNK_RELOAD_COOLDOWN_MS;\n const blocked = reloadBlock(cooldownMs);\n\n if (options.onChunkLoadError?.({ error, url: target, source, blocked }) === false) {\n return false;\n }\n if (blocked !== null || !markReload(target)) {\n return false;\n }\n\n reloading = true;\n if (target === window.location.href) {\n window.location.reload();\n } else {\n window.location.assign(target);\n }\n return true;\n}\n\nfunction reloadBlock(cooldownMs: number): ChunkReloadBlock {\n if (typeof navigator !== \"undefined\" && navigator.onLine === false) {\n return \"offline\";\n }\n let raw: string | null;\n try {\n raw = window.sessionStorage.getItem(CHUNK_RELOAD_MARKER);\n } catch {\n return \"storage\";\n }\n const at = parseMarker(raw);\n return at !== null && withinCooldown(Date.now() - at, cooldownMs) ? \"cooldown\" : null;\n}\n\n// A marker from the future (the clock was set back since it was written) is\n// stale rather than a cooldown that lasts until the clock catches up.\nfunction withinCooldown(elapsed: number, cooldownMs: number): boolean {\n return elapsed >= 0 && elapsed < cooldownMs;\n}\n\nfunction parseMarker(raw: string | null): number | null {\n if (!raw) {\n return null;\n }\n try {\n const at = JSON.parse(raw)?.at;\n return typeof at === \"number\" ? at : null;\n } catch {\n return null;\n }\n}\n\nfunction markReload(url: string): boolean {\n try {\n window.sessionStorage.setItem(CHUNK_RELOAD_MARKER, JSON.stringify({ url, at: Date.now() }));\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * The same guard as a classic script body, for the module the server sends in\n * place of a chunk it does not have. It reloads once per cooldown; inside the\n * cooldown (or with no storage) it throws an error `isChunkLoadError`\n * recognises, so the importing page's own recovery and error boundary see the\n * failure instead of a module that silently has no exports.\n */\nexport function chunkReloadStubScript(\n pathname: string,\n cooldownMs: number = DEFAULT_CHUNK_RELOAD_COOLDOWN_MS,\n): string {\n const key = JSON.stringify(CHUNK_RELOAD_MARKER);\n const error = JSON.stringify(`Failed to fetch dynamically imported module: ${pathname}`);\n return (\n `var r=!1;try{var s=window.sessionStorage,m=JSON.parse(s.getItem(${key})||\"null\");` +\n `var d=m?Date.now()-m.at:NaN;` +\n `if(navigator.onLine!==!1&&!(d>=0&&d<${cooldownMs})){` +\n `s.setItem(${key},JSON.stringify({url:window.location.href,at:Date.now()}));r=!0}}catch(e){}` +\n `if(r)window.location.reload();else throw new Error(${error});export {}`\n );\n}\n",
12
12
  "import { isReservedAssetPath, RESERVED_ROUTE_PREFIX } from \"../services/router/ViewRouteDispatcher\";\nimport { chunkReloadStubScript } from \"../client/chunkLoadRecovery\";\n\n/**\n * A JavaScript module under `/assets/` — the only shape a client build chunk\n * has. Vite writes every chunk into `assets/` with a `.js` extension (`.mjs`\n * is accepted for a build configured to emit it).\n *\n * The extension is matched at the end of the path, not anywhere in it:\n * `includes(\".js\")` also matched `app.js.map` and `data.json`, so a missing\n * source map was answered with a script that reloads the page.\n */\nconst BUILD_CHUNK = new RegExp(`^${RESERVED_ROUTE_PREFIX}/.+\\\\.m?js$`);\n\nexport function isBuildChunkPath(pathname: string): boolean {\n return BUILD_CHUNK.test(pathname);\n}\n\n/**\n * `/assets` or anything under it — the prefix the router refuses to mount a\n * route on at boot, so nothing there is ever the app's to answer. Defined\n * beside that check so the two cannot drift apart.\n */\nexport { isReservedAssetPath };\n\n/**\n * The answer to a static-looking request with no file behind it in\n * `dist/client`, or `undefined` to hand the request to the app.\n *\n * A missing build chunk is almost always a document rendered by another\n * release asking for its own chunks — a deploy between page load and a lazy\n * `import()`, or two releases serving at once. The page cannot continue with\n * the chunk it wanted, so it gets a module that reloads it onto this release's\n * document. Only for build chunks: outside `/assets/` a `.js` path may be an\n * app route, and a classic `<script src>` answered with a reload reloads\n * forever.\n *\n * `no-store` because the stub is a stand-in for one release's chunk, served\n * under that chunk's URL. Cached — by the browser or by an edge in front of\n * the origin — it would outlive the deploy that caused it and answer the\n * request after the real chunk is back.\n *\n * The body is only the reload. An earlier version opened with\n * `if(caches){caches?.delete(distPath)}`, which was wrong three times over:\n * `CacheStorage.delete` takes a cache *name*, not a URL, so a filesystem path\n * matched nothing; that path told anyone who asked for a missing chunk where\n * the server keeps its files; and `caches` is `[SecureContext]`, so on a\n * plain-http origin the bare identifier is not defined at all and reading it\n * threw a `ReferenceError` before the reload below could run — the recovery\n * failing exactly where it was needed.\n *\n * The reload is guarded by the same `sessionStorage` marker the client\n * router's chunk recovery uses (`client/chunkLoadRecovery.ts`), so the stub\n * and the router together reload once per cooldown. A chunk that is still\n * missing after that reload makes the stub throw a chunk-load error instead —\n * the importing `import()` rejects and the route's error boundary shows,\n * where an unguarded reload used to loop.\n */\nexport function staticAssetMiss(pathname: string): Response | undefined {\n if (isBuildChunkPath(pathname)) {\n return new Response(chunkReloadStubScript(pathname), {\n headers: {\n \"Content-Type\": \"application/javascript\",\n \"Cache-Control\": \"no-store\",\n },\n });\n }\n\n // `/assets` is reserved for build output (the router rejects routes there\n // at boot), so a miss is a miss — 404 without paying for an SSR render.\n if (isReservedAssetPath(pathname)) {\n return new Response(\"Not found\", { status: 404 });\n }\n\n // Anywhere else the public-file pattern matched on extension alone, so this\n // may well be an app route — a file route like\n // `this.file(() => Bun.file(...))` mounted at `/files/logo.svg` lands here\n // too. The app answers it rather than a 404 on its behalf.\n return undefined;\n}\n",
13
13
  "import { stringEraRefusal } from \"../http/Error\";\nimport { isApiPath } from \"../services/router/apiPath\";\n\n// The production server's last resort: an error nothing on the way here turned\n// into a response. Request breakers (auth, 404s, 416s) are answered by the\n// dispatchers before this, so what arrives is a genuine failure — and its\n// message and stack are for the developer, not for whoever triggered it. They\n// can carry absolute paths, dependency versions, SQL fragments and column\n// names. The dev server renders them on purpose (`httpDev.ts`); this does not.\n\nconst GENERIC_500_HTML = `<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Internal Server Error</title>\n <style>\n body { font-family: system-ui, sans-serif; margin: 0; min-height: 100vh; display: grid; place-items: center; }\n main { text-align: center; padding: 16px; }\n h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }\n p { margin: 0; opacity: 0.7; }\n </style>\n </head>\n <body>\n <main>\n <h1>Something went wrong</h1>\n <p>Please try again later.</p>\n </main>\n </body>\n</html>`;\n\nexport function unhandledErrorResponse(\n err: unknown,\n pathname: string,\n onException?: (error: Error) => void,\n): Response {\n // `onException` is the report, and the default one `App` installs is a\n // `console.error`, so logging here as well printed every failure twice\n // (three times for `/api`, whose dispatcher logs before rethrowing). Only\n // without a reporter does this log itself.\n //\n // Reported for `/api` too: an app's error tracking should see an API failure\n // that got this far, not only a page one. `onRequestFail` is a different\n // hook (route config, called by the dispatchers), so this is not a second\n // report through the same channel.\n if (!onException) {\n console.error(err);\n } else {\n try {\n // The hook is typed to receive an `Error`; a thrown string or object is\n // wrapped so a reporter reading `.stack` or `.name` gets one.\n onException(err instanceof Error ? err : new Error(String(err), { cause: err }));\n } catch (reportError) {\n // A broken reporter must not turn a 500 into a leaked stack either.\n console.error(err);\n console.error(reportError);\n }\n }\n\n if (isApiPath(pathname)) {\n return new Response(\n JSON.stringify({ error: stringEraRefusal(\"server_error\", \"Internal Server Error\", 500) }),\n {\n status: 500,\n headers: { \"Content-Type\": \"application/json\" },\n },\n );\n }\n\n return new Response(GENERIC_500_HTML, {\n status: 500,\n headers: { \"Content-Type\": \"text/html; charset=utf-8\" },\n });\n}\n",
14
14
  "/**\n * Which `X-Forwarded-For` entries the production server believes (#8).\n *\n * `X-Forwarded-For` is written by whoever sends the request. A client talking\n * to the app directly — or through a proxy that appends to the header rather\n * than replacing it — picks any address it likes, and `clientIp` (the rate\n * limiter's default key) used to read the left-most entry, which is exactly\n * the one the client wrote. So the server decides here, once, at the edge,\n * and hands the app a single address it can rely on:\n *\n * - `none` (the default): no proxy is trusted. The header is replaced with the\n * socket's peer address, and `X-Real-IP` is dropped.\n * - `hops` (`GEMI_TRUST_PROXY=<n>`): the `n` proxies nearest the app are\n * trusted. Each appends the address it was reached from, so the client is\n * the `n`-th entry from the right of `X-Forwarded-For`. Anything\n * further left was written by someone the app does not trust and is dropped.\n * - `all` (`GEMI_TRUST_PROXY=true`): the inbound header is passed through\n * unchanged, as before 0.88. Only sound behind a proxy that overwrites\n * `X-Forwarded-For` (and `X-Real-IP`) rather than appending to it.\n */\nexport type ForwardedTrust =\n | { kind: \"none\" }\n | { kind: \"all\" }\n | { kind: \"hops\"; hops: number };\n\nconst NONE: ForwardedTrust = { kind: \"none\" };\n\n/**\n * `GEMI_TRUST_PROXY` as a policy. Unset, empty, `false`, `off` and `0` trust\n * nothing; `true` trusts everything; a positive integer is a hop count.\n * Anything else throws, so a typo fails the boot instead of silently trusting\n * nothing (every client sharing the proxy's address) or everything.\n */\nexport function parseTrustProxy(value: string | undefined): ForwardedTrust {\n const raw = (value ?? \"\").trim().toLowerCase();\n if (raw === \"\" || raw === \"false\" || raw === \"off\" || raw === \"0\") {\n return NONE;\n }\n if (raw === \"true\") {\n return { kind: \"all\" };\n }\n if (/^[1-9]\\d*$/.test(raw)) {\n return { kind: \"hops\", hops: Number(raw) };\n }\n throw new Error(\n `GEMI_TRUST_PROXY must be \"false\", \"true\" or the number of proxies in front of the app (e.g. 1). Got ${JSON.stringify(value)}.`,\n );\n}\n\n/**\n * Rewrites `headers` so `X-Forwarded-For` holds what `trust` says the client\n * address is. `peer` is the socket's remote address — `null` for a unix\n * socket, where the immediate hop is still counted as one proxy.\n */\nexport function applyForwardedTrust(\n headers: Headers,\n peer: string | null,\n trust: ForwardedTrust,\n): void {\n if (trust.kind === \"all\") {\n if (!headers.get(\"x-forwarded-for\") && peer) {\n headers.set(\"x-forwarded-for\", peer);\n }\n return;\n }\n\n // Under any other policy `X-Real-IP` is as client-written as the rest; the\n // address the app should use is the one left in `X-Forwarded-For`.\n headers.delete(\"x-real-ip\");\n\n let client: string | null = peer;\n if (trust.kind === \"hops\") {\n const entries = (headers.get(\"x-forwarded-for\") ?? \"\")\n .split(\",\")\n .map((entry) => entry.trim())\n .filter(Boolean);\n // The chain is `entries` + `peer`; the client sits `hops` places left of\n // its end, i.e. `entries[entries.length - hops]`. A shorter chain than\n // expected means the request skipped a proxy, so its left-most hop is the\n // furthest thing seen — never anything further left than that.\n const index = entries.length - trust.hops;\n client = index >= 0 ? entries[index]! : (entries[0] ?? peer);\n }\n\n if (client) {\n headers.set(\"x-forwarded-for\", client);\n } else {\n headers.delete(\"x-forwarded-for\");\n }\n}\n"
15
15
  ],
16
- "mappings": ";0hCAAA,eAAS,UAET,SAAS,OAAM,IAAS,QCgBxB,WAAS,UACT,cAAS,oBAAW,WAAsB,QAW1C,FAAM,HAAuC,LAAC,DAAM,AAAM,JAQpD,HAAyB,DAYzB,HAAiB,JACjB,HAAqB,HAGrB,HAAa,EAEnB,SAAS,EAAW,CAAC,EAAiC,CACpD,GAAI,IAAQ,OACV,MAAO,GAKT,GAAI,CAAC,oBAAoB,KAAK,EAAI,KAAK,CAAC,EACtC,MAAO,GAET,IAAM,EAAQ,OAAO,EAAI,KAAK,CAAC,EAC/B,OAAO,OAAO,SAAS,CAAK,EAAI,KAAK,IAAI,EAAO,CAAC,EAAI,EAahD,SAAS,EAAmB,CAAC,EAA+D,CACjG,GAAI,IAAW,MAAQ,IAAW,OAChC,OAAO,KAGT,IAAM,EAAW,IAAI,IACrB,QAAW,KAAQ,EAAO,MAAM,GAAG,EAAG,CACpC,IAAO,KAAc,GAAU,EAAK,MAAM,GAAG,EACvC,EAAS,EAAU,KAAK,EAAE,YAAY,EAC5C,GAAI,IAAW,GACb,SAGF,IAAI,EAAI,EACR,QAAW,KAAS,EAAQ,CAC1B,IAAM,EAAY,EAAM,QAAQ,GAAG,EACnC,GAAI,IAAc,GAChB,SAEF,GAAI,EAAM,MAAM,EAAG,CAAS,EAAE,KAAK,EAAE,YAAY,IAAM,IAAK,CAC1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