gemi 0.46.1 → 0.48.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.
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{g as I,i as f}from"./chunk-2ahct6kg.js";import{j as b,k as y}from"./chunk-ghes36xj.js";import"./chunk-vv72kw74.js";import"./chunk-ppt296ye.js";import"./chunk-r64ba1pf.js";import"./chunk-d9k245jt.js";import"./chunk-evkv0xa7.js";import"./chunk-p5r0t9jh.js";import"./chunk-xkrthw08.js";import"./chunk-4z53shav.js";import"./chunk-m0earq80.js";import"./chunk-f18weffa.js";import{IncomingMessage as w,ServerResponse as N}from"http";import{Socket as T}from"net";import{join as g}from"path";import{createServer as E}from"vite";function S(H){return H.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
2
+ import{g as I,i as f}from"./chunk-c705601x.js";import{j as b,k as y}from"./chunk-ghes36xj.js";import"./chunk-vv72kw74.js";import"./chunk-ppt296ye.js";import"./chunk-r64ba1pf.js";import"./chunk-d9k245jt.js";import"./chunk-evkv0xa7.js";import"./chunk-p5r0t9jh.js";import"./chunk-xkrthw08.js";import"./chunk-4z53shav.js";import"./chunk-m0earq80.js";import"./chunk-f18weffa.js";import{IncomingMessage as w,ServerResponse as N}from"http";import{Socket as T}from"net";import{join as g}from"path";import{createServer as E}from"vite";function S(H){return H.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
3
3
  `).split(`
4
4
  `).map((J)=>J.trim()).filter((J)=>J.length>0).join(`
5
5
  `).trim()}function P(H){return`
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{m as y}from"./chunk-ppt296ye.js";import{createElement as j}from"react";function z(i,n){let t=Object.keys(n).sort((e,s)=>s.length-e.length).map((e)=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),p=new RegExp(t.join("|"),"g");return i.replace(p,(e)=>n[e])}async function W(i,n,t=[]){let p=[...t.map((b)=>`${i}/views/${b}.tsx`),`${i}/views/RootLayout.tsx`],e=new Set;for(let b of p){let u=n.moduleGraph.getModulesByFile(b);if(u)for(let g of u)e.add(g)}let s=[],r=[],c={};for(let b of e)if(b)for(let u of b.importedModules){if(u.file.includes("module.css"))c[u.file]=u.ssrTransformResult.map.sourcesContent.join("");if(u.file.includes(".css"))r.push(u.file)}for(let b of r){let u=await n.transformRequest(b+"?direct"),g=b.includes("module.css"),h="";if(g)h=z(c[b],u.default);s.push({isDev:!0,id:b,content:g?h:u.code})}return s.map((b,u)=>{return j("style",{key:u,type:"text/css","data-vite-dev-id":b.id,dangerouslySetInnerHTML:{__html:b.content}})})}async function X(i=[]){return i.map((n,t)=>{return j("style",{key:t,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as T}from"fs";import{basename as a}from"path";import{networkInterfaces as q}from"os";var v={name:"gemi",version:"0.46.1",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js"},files:["dist/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./runtime":"./client/runtime.ts","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./broadcasting":"./broadcasting/index.ts","./i18n":"./i18n/index.ts","./server":"./server/index.ts","./config":"./config/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts"},scripts:{lint:"oxlint",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:client-types","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --sourcemap ./bin/gemi.ts && bun ./scripts/prepare-bin.ts","build:client":"vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:types":"tsc","build:client-types":"tsc -p tsconfig.browser.json",test:"vitest","test:types":"vitest run --typecheck.only","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","@prisma/client":"^6.4.1","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@repo/typescript-config":"*","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0",oxlint:"^1.39.0",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",vite:"^8.0.0"},peerDependenciesMeta:{"@azure/storage-blob":{optional:!0}}};var _=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],k=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,l=(i,n)=>k?`\x1B[${i}m${n}\x1B[0m`:n,G=(i)=>l("1",i),d=(i)=>l("2",i),x=(i)=>l("36",i),H=(i)=>l("32",i),J=(i)=>l("35",i);function L(){return v.version??"?"}function N(i){for(let n of Object.values(q()))for(let t of n??[])if((t.family==="IPv4"||t.family===4)&&!t.internal)return`http://${t.address}:${i}`;return null}function Q(i){return y(i).filter((n)=>T(n)).map((n)=>a(n))}function I(i){let{port:n,rootDir:t}=i,p=`http://localhost:${n}`,e=N(n),s=Q(t),r=(b,u)=>` ${H("\u279C")} ${G(b.padEnd(9))}${u}`,c=["",..._.map((b)=>J(b)),"",` ${d("gemi")} ${x(`v${L()}`)}`,"",r("Local:",x(p)),r("Network:",e?x(e):d("unavailable")),r("Env:",s.length?s.join(", "):d("none")),""];console.log(c.join(`
2
+ import{m as y}from"./chunk-ppt296ye.js";import{createElement as j}from"react";function z(i,n){let t=Object.keys(n).sort((e,s)=>s.length-e.length).map((e)=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),p=new RegExp(t.join("|"),"g");return i.replace(p,(e)=>n[e])}async function W(i,n,t=[]){let p=[...t.map((b)=>`${i}/views/${b}.tsx`),`${i}/views/RootLayout.tsx`],e=new Set;for(let b of p){let u=n.moduleGraph.getModulesByFile(b);if(u)for(let g of u)e.add(g)}let s=[],r=[],c={};for(let b of e)if(b)for(let u of b.importedModules){if(u.file.includes("module.css"))c[u.file]=u.ssrTransformResult.map.sourcesContent.join("");if(u.file.includes(".css"))r.push(u.file)}for(let b of r){let u=await n.transformRequest(b+"?direct"),g=b.includes("module.css"),h="";if(g)h=z(c[b],u.default);s.push({isDev:!0,id:b,content:g?h:u.code})}return s.map((b,u)=>{return j("style",{key:u,type:"text/css","data-vite-dev-id":b.id,dangerouslySetInnerHTML:{__html:b.content}})})}async function X(i=[]){return i.map((n,t)=>{return j("style",{key:t,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as T}from"fs";import{basename as a}from"path";import{networkInterfaces as q}from"os";var v={name:"gemi",version:"0.48.0",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js"},files:["dist/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./runtime":"./client/runtime.ts","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./broadcasting":"./broadcasting/index.ts","./i18n":"./i18n/index.ts","./server":"./server/index.ts","./config":"./config/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts"},scripts:{lint:"oxlint",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:client-types","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --sourcemap ./bin/gemi.ts && bun ./scripts/prepare-bin.ts","build:client":"vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:types":"tsc","build:client-types":"tsc -p tsconfig.browser.json",test:"vitest","test:types":"vitest run --typecheck.only","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","@prisma/client":"^6.4.1","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@repo/typescript-config":"*","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0",oxlint:"^1.39.0",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",vite:"^8.0.0"},peerDependenciesMeta:{"@azure/storage-blob":{optional:!0}}};var _=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],k=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,l=(i,n)=>k?`\x1B[${i}m${n}\x1B[0m`:n,G=(i)=>l("1",i),d=(i)=>l("2",i),x=(i)=>l("36",i),H=(i)=>l("32",i),J=(i)=>l("35",i);function L(){return v.version??"?"}function N(i){for(let n of Object.values(q()))for(let t of n??[])if((t.family==="IPv4"||t.family===4)&&!t.internal)return`http://${t.address}:${i}`;return null}function Q(i){return y(i).filter((n)=>T(n)).map((n)=>a(n))}function I(i){let{port:n,rootDir:t}=i,p=`http://localhost:${n}`,e=N(n),s=Q(t),r=(b,u)=>` ${H("\u279C")} ${G(b.padEnd(9))}${u}`,c=["",..._.map((b)=>J(b)),"",` ${d("gemi")} ${x(`v${L()}`)}`,"",r("Local:",x(p)),r("Network:",e?x(e):d("unavailable")),r("Env:",s.length?s.join(", "):d("none")),""];console.log(c.join(`
3
3
  `))}
4
4
  export{W as g,X as h,I as i};
5
5
 
6
- //# debugId=098801581653D73A64756E2164756E21
6
+ //# debugId=6FA499CE8220FA9264756E2164756E21
@@ -6,6 +6,6 @@
6
6
  "import { existsSync } from \"node:fs\";\nimport { basename } from \"node:path\";\nimport { networkInterfaces } from \"node:os\";\nimport { envFiles } from \"./watchEnv\";\nimport pkg from \"../package.json\";\n\n// \"GEMI\" — ANSI Shadow figlet font.\nconst ART = [\n \" ██████╗ ███████╗███╗ ███╗██╗\",\n \"██╔════╝ ██╔════╝████╗ ████║██║\",\n \"██║ ███╗█████╗ ██╔████╔██║██║\",\n \"██║ ██║██╔══╝ ██║╚██╔╝██║██║\",\n \"╚██████╔╝███████╗██║ ╚═╝ ██║██║\",\n \" ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝\",\n];\n\nconst useColor = Boolean(process.stdout.isTTY) && !process.env.NO_COLOR;\nconst paint = (code: string, text: string) =>\n useColor ? `\\x1b[${code}m${text}\\x1b[0m` : text;\nconst bold = (t: string) => paint(\"1\", t);\nconst dim = (t: string) => paint(\"2\", t);\nconst cyan = (t: string) => paint(\"36\", t);\nconst green = (t: string) => paint(\"32\", t);\nconst magenta = (t: string) => paint(\"35\", t);\n\nfunction gemiVersion(): string {\n return (pkg as { version?: string }).version ?? \"?\";\n}\n\nfunction networkUrl(port: number | string): string | null {\n for (const ifaces of Object.values(networkInterfaces())) {\n for (const iface of ifaces ?? []) {\n // Node <18 reported `family` as the number 4; newer Bun/Node use \"IPv4\".\n const isV4 = iface.family === \"IPv4\" || (iface.family as unknown) === 4;\n if (isV4 && !iface.internal) return `http://${iface.address}:${port}`;\n }\n }\n return null;\n}\n\nfunction loadedEnvFiles(rootDir: string): string[] {\n return envFiles(rootDir)\n .filter((file) => existsSync(file))\n .map((file) => basename(file));\n}\n\nexport function printStartupBanner(params: {\n port: number | string;\n rootDir: string;\n}) {\n const { port, rootDir } = params;\n const local = `http://localhost:${port}`;\n const network = networkUrl(port);\n const env = loadedEnvFiles(rootDir);\n\n const row = (label: string, value: string) =>\n ` ${green(\"➜\")} ${bold(label.padEnd(9))}${value}`;\n\n const out = [\n \"\",\n ...ART.map((line) => magenta(line)),\n \"\",\n ` ${dim(\"gemi\")} ${cyan(`v${gemiVersion()}`)}`,\n \"\",\n row(\"Local:\", cyan(local)),\n row(\"Network:\", network ? cyan(network) : dim(\"unavailable\")),\n row(\"Env:\", env.length ? env.join(\", \") : dim(\"none\")),\n \"\",\n ];\n\n console.log(out.join(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IAAQ,OAAM,WAAY,EACpB,EAAQ,oBAAoB,IAC5B,EAAU,EAAW,CAAI,EACzB,EAAM,EAAe,CAAO,EAE5B,EAAM,CAAC,EAAe,IAC1B,KAAK,EAAM,QAAE,MAAM,EAAK,EAAM,OAAO,CAAC,CAAC,IAAI,IAEvC,EAAM,CACV,GACA,GAAG,EAAI,IAAI,CAAC,IAAS,EAAQ,CAAI,CAAC,EAClC,GACA,KAAK,EAAI,MAAM,KAAK,EAAK,IAAI,EAAY,GAAG,IAC5C,GACA,EAAI,SAAU,EAAK,CAAK,CAAC,EACzB,EAAI,WAAY,EAAU,EAAK,CAAO,EAAI,EAAI,aAAa,CAAC,EAC5D,EAAI,OAAQ,EAAI,OAAS,EAAI,KAAK,IAAI,EAAI,EAAI,MAAM,CAAC,EACrD,EACF,EAEA,QAAQ,IAAI,EAAI,KAAK;AAAA,CAAI,CAAC",
9
- "debugId": "098801581653D73A64756E2164756E21",
9
+ "debugId": "6FA499CE8220FA9264756E2164756E21",
10
10
  "names": []
11
11
  }
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{h as I,i as R}from"./chunk-c705601x.js";import"./chunk-ppt296ye.js";import{K as T,M as _}from"./chunk-d9k245jt.js";import"./chunk-evkv0xa7.js";import"./chunk-p5r0t9jh.js";import"./chunk-4z53shav.js";import"./chunk-m0earq80.js";import"./chunk-f18weffa.js";import{join as M}from"path";import{Duplex as E}from"stream";import{constants as P,createBrotliCompress as q,createGzip as m}from"zlib";var h=["br","gzip"],c=1024,l=5,o=19,d=6;function p($){if($===void 0)return 1;if(!/^\d+(\.\d{0,3})?$/.test($.trim()))return 1;let J=Number($.trim());return Number.isFinite(J)?Math.min(J,1):1}function n($){if($===null||$===void 0)return null;let J=new Map;for(let H of $.split(",")){let[z,...G]=H.split(";"),x=z.trim().toLowerCase();if(x==="")continue;let j=1;for(let Q of G){let k=Q.indexOf("=");if(k===-1)continue;if(Q.slice(0,k).trim().toLowerCase()==="q"){j=p(Q.slice(k+1));break}}J.set(x,j)}return J}function i($,J=h){let H=n($);if(!H)return null;let z=H.get("*"),G=null,x=0;for(let j of J){let Q=H.get(j)??z??0;if(Q>x)G=j,x=Q}return G}function t($,J){if(!$)return!1;return $.split(",").some((H)=>H.trim().toLowerCase().split("=")[0].trim()===J)}function a($,J){if($==="HEAD")return!1;if(!J.body)return!1;if(J.status<200||J.status===204||J.status===206||J.status===304)return!1;if(J.headers.has("Content-Range"))return!1;let H=J.headers.get("Content-Type");if(!H||!/^\s*text\/html\s*(;|$)/i.test(H))return!1;let z=J.headers.get("Content-Encoding");if(z&&z.trim().toLowerCase()!=="identity")return!1;if(t(J.headers.get("Cache-Control"),"no-transform"))return!1;let G=J.headers.get("Content-Length");if(G!==null&&Number(G)<c)return!1;return!0}function s($){let J=$==="br"?q({params:{[P.BROTLI_PARAM_QUALITY]:l,[P.BROTLI_PARAM_LGWIN]:o},flush:P.BROTLI_OPERATION_FLUSH}):m({level:d,flush:P.Z_SYNC_FLUSH});return E.toWeb(J)}function r($){let J=$.get("Vary");if(!J){$.set("Vary","Accept-Encoding");return}let H=J.split(",").map((z)=>z.trim().toLowerCase());if(H.includes("*")||H.includes("accept-encoding"))return;$.append("Vary","Accept-Encoding")}function V($,J){if(!a($.method,J))return J;let H=new Headers(J.headers);r(H);let z=i($.headers.get("Accept-Encoding"));if(!z)return new Response(J.body,{status:J.status,statusText:J.statusText,headers:H});let G;try{G=s(z)}catch{return new Response(J.body,{status:J.status,statusText:J.statusText,headers:H})}return H.set("Content-Encoding",z),H.delete("Content-Length"),new Response(J.body.pipeThrough(G),{status:J.status,statusText:J.statusText,headers:H})}function D($){let J=$.toString(),H=new Bun.CryptoHasher("sha1");return H.update(J),H.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=T;import{exists as e}from"fs/promises";var JJ=process.env.GEMI_PROJECT_DIR??"",C=M(process.cwd(),JJ),$J=M(C,"app"),A=M(C,"dist");async function OJ($,J){let H=await import(`${A}/client/.vite/manifest.json`),z=await import(`${A}/server/.vite/manifest.json`);process.env.ROOT_DIR=C,process.env.APP_DIR=$J,process.env.DIST_DIR=A;let G={},x={},j={},Q=(K,Z)=>`"${K}": () => import("${Z}")`,k=[];for(let K of["404",...$.getFlatComponentTree.call($)]){let Z=z[`app/views/${K}.tsx`];if(!Z?.file){console.log(`Server file not found for ${K}`),console.log(Z);let W=Object.keys(z),L=`app/views/${K}.tsx`;console.log(`${L} not found in server manifest`),console.log(W)}let X=await import(`${process.env.DIST_DIR}/server/${Z?.file}`);G[K]=X.default,x[K]=X.OpenGraph;let U=H[`app/views/${K}.tsx`];if(U?.css&&U?.css.length>0)j[K]=U?.css;if(U)k.push(Q(K,`/${U?.file}`))}let F=`{${k.join(",")}}`,w=H["app/client.tsx"]?.css??[],g=(await Promise.all(w.map((K)=>Bun.file(`${A}/client/${K}`).text()))).join(`
3
+ `),f=new T({pathname:"/*.:filetype(png|txt|js|css|jpg|svg|jpeg|avif|webp|ico|ttf|map)"});async function v(K){let{pathname:Z}=new URL(K.url),X=Z.startsWith("/.well-known"),U=f.test({pathname:Z})||X,W=Z.startsWith("/api");if(U&&!W){let L=new URL(K.url),B=K.url.replace(L.origin,"").split("?")[0],O=`${A}/client${B.replace("/assets/assets","/assets")}`,b=await e(O);if(!b&&L.pathname.includes(".js"))return new Response(`if(caches){caches?.delete("${O}")}window.location.reload();export {}`,{headers:{"Content-Type":"application/javascript"}});if(!b){if(Z===_||Z.startsWith(`${_}/`))return new Response("Not found",{status:404});return await N(K,Z)}try{let Y=Bun.file(O),y=D(Y.lastModified);return new Response(Y.stream(),{headers:{"Content-Type":Y.type,"Cache-Control":"public, max-age=31536000, must-revalidate","Content-Length":String(Y.size),ETag:y}})}catch(Y){return $.onException?.(Y),new Response("Not found",{status:404})}}return await N(K,Z)}async function N(K,Z){let X=$.fetch.bind($);try{let U=await X(K);if(U instanceof Response)return U;else{let W=[];return W.push({content:g}),await U({getStyles:async(B)=>{if(!B)return I([]);for(let O of B){let b=H[`app/views/${O}.tsx`];for(let Y of b?.css??[]){let y=Bun.file(`${process.env.DIST_DIR}/client/${Y}`);W.push({id:Y,content:await y.text()})}}return I(W)},bootstrapModules:[`/${H["app/client.tsx"].file}`],loaders:F,viewImportMap:G,ogMap:x,cssManifest:j})}}catch(U){if(console.error(U),Z.startsWith("/api"))return new Response(JSON.stringify({error:U.message}),{status:500,headers:{"Content-Type":"application/json"}});return $.onException?.(U),new Response(U.stack,{status:500})}}let u=(process.env.GEMI_COMPRESSION??"auto").toLowerCase()!=="off",S=Bun.serve({maxRequestBodySize:10737418240,fetch:async(K,Z)=>{if(!K.headers.get("x-forwarded-for")){let U=Z.requestIP(K);if(U)K.headers.set("x-forwarded-for",U.address)}let X=await J(K,v);return u?V(K,X):X},idleTimeout:Number(process.env.SERVER_IDLE_TIMEOUT??10),port:process.env.PORT||5173});return R({port:S.port,rootDir:C}),S}export{OJ as httpProd};
4
+
5
+ //# debugId=45C6664548EA439D64756E2164756E21
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../server/httpProd.ts", "../server/compression.ts", "../server/generateEtag.ts", "../../../node_modules/.bun/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/index.js"],
4
+ "sourcesContent": [
5
+ "import { join } from \"node:path\";\nimport { compressResponse } from \"./compression\";\nimport { generateETag } from \"./generateEtag\";\nimport { URLPattern } from \"urlpattern-polyfill\";\nimport { exists } from \"node:fs/promises\";\nimport { createStyles } from \"./styles\";\nimport type { App } from \"../app\";\nimport { Instrumentation } from \"./types\";\nimport { printStartupBanner } from \"./banner\";\nimport { RESERVED_ROUTE_PREFIX } from \"../services/router/ViewRouterServiceContainer\";\n\nconst projectDir = process.env.GEMI_PROJECT_DIR ?? \"\";\nconst rootDir = join(process.cwd(), projectDir);\n\nconst appDir = join(rootDir, \"app\");\nconst distDir = join(rootDir, \"dist\");\n\n// `app` is built by `Server.start` (from the kernel) and passed in — same as\n// `httpDev` — so prod and dev share one construction path. What differs here is\n// that views/styles are served from the built `dist/` manifests instead of\n// Vite's dev SSR graph.\nexport async function httpProd(app: App, instrumentation: Instrumentation) {\n const manifest = await import(`${distDir}/client/.vite/manifest.json`);\n const serverManifest = await import(`${distDir}/server/.vite/manifest.json`);\n\n process.env.ROOT_DIR = rootDir;\n process.env.APP_DIR = appDir;\n process.env.DIST_DIR = distDir;\n\n const viewImportMap = {};\n const ogMap = {};\n const cssManifest = {};\n const template = (viewName: string, path: string) => `\"${viewName}\": () => import(\"${path}\")`;\n const templates = [];\n\n for (const fileName of [\"404\", ...app.getFlatComponentTree.call(app)]) {\n const serverFile = serverManifest[`app/views/${fileName}.tsx`];\n if (!serverFile?.file) {\n console.log(`Server file not found for ${fileName}`);\n console.log(serverFile);\n const files = Object.keys(serverManifest);\n const path = `app/views/${fileName}.tsx`;\n console.log(`${path} not found in server manifest`);\n console.log(files);\n }\n const mod = await import(`${process.env.DIST_DIR}/server/${serverFile?.file}`);\n viewImportMap[fileName] = mod.default;\n ogMap[fileName] = mod.OpenGraph;\n const clientFile = manifest[`app/views/${fileName}.tsx`];\n\n if (clientFile?.css && clientFile?.css.length > 0) {\n cssManifest[fileName] = clientFile?.css;\n }\n if (clientFile) {\n templates.push(template(fileName, `/${clientFile?.file}`));\n }\n }\n\n const loaders = `{${templates.join(\",\")}}`;\n\n // Vite's manifest `css` field is a `string[]` — a client entry can emit more\n // than one CSS chunk. Read and concatenate them all instead of interpolating\n // the array into a single path (which only works for a one-element array).\n const appCssFiles: string[] = manifest[\"app/client.tsx\"]?.css ?? [];\n const appCSSContent = (\n await Promise.all(appCssFiles.map((cssFile) => Bun.file(`${distDir}/client/${cssFile}`).text()))\n ).join(\"\\n\");\n\n const staticFilePattern = new URLPattern({\n pathname: \"/*.:filetype(png|txt|js|css|jpg|svg|jpeg|avif|webp|ico|ttf|map)\",\n });\n\n async function requestHandler(req: Request) {\n const { pathname } = new URL(req.url);\n\n const isWellKnownFile = pathname.startsWith(\"/.well-known\");\n const isFileRequest = staticFilePattern.test({ pathname }) || isWellKnownFile;\n\n const isApi = pathname.startsWith(\"/api\");\n\n if (isFileRequest && !isApi) {\n const url = new URL(req.url);\n const filePath = req.url.replace(url.origin, \"\").split(\"?\")[0];\n const distPath = `${distDir}/client${filePath.replace(\"/assets/assets\", \"/assets\")}`;\n const doesExist = await exists(distPath);\n\n if (!doesExist && url.pathname.includes(\".js\")) {\n return new Response(\n `if(caches){caches?.delete(\"${distPath}\")}window.location.reload();export {}`,\n {\n headers: { \"Content-Type\": \"application/javascript\" },\n },\n );\n }\n\n if (!doesExist) {\n // `/assets` is reserved for build output (the router rejects routes\n // there at boot), so a miss is a miss — 404 without paying for an SSR\n // render.\n if (\n pathname === RESERVED_ROUTE_PREFIX ||\n pathname.startsWith(`${RESERVED_ROUTE_PREFIX}/`)\n ) {\n return new Response(\"Not found\", { status: 404 });\n }\n\n // Anywhere else the pattern above 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\n // here too. Hand it to the app rather than 404ing on its behalf.\n return await handleWithApp(req, pathname);\n }\n\n // `Bun.file(path).stream()` is lazy — a missing file only throws ENOENT\n // once the body is streamed, which is *after* this handler has returned,\n // so the `try/catch` below can't catch it (it surfaces as an unhandled\n // rejection with the response already committed as 200). Never build the\n // streaming Response without checking existence first.\n\n try {\n const file = Bun.file(distPath);\n\n const etag = generateETag(file.lastModified);\n return new Response(file.stream(), {\n headers: {\n \"Content-Type\": file.type,\n \"Cache-Control\": \"public, max-age=31536000, must-revalidate\",\n \"Content-Length\": String(file.size),\n ETag: etag,\n },\n });\n } catch (error) {\n app.onException?.(error);\n return new Response(\"Not found\", { status: 404 });\n }\n }\n\n return await handleWithApp(req, pathname);\n }\n\n async function handleWithApp(req: Request, pathname: string) {\n const handler = app.fetch.bind(app);\n\n try {\n const result = await handler(req);\n if (result instanceof Response) {\n return result;\n } else {\n const styles = [];\n\n styles.push({\n content: appCSSContent,\n });\n\n const getStyles = async (currentViews: string[]) => {\n if (!currentViews) {\n return createStyles([]);\n }\n for (const view of currentViews) {\n const clientFile = manifest[`app/views/${view}.tsx`];\n for (const cssFile of clientFile?.css ?? []) {\n const css = Bun.file(`${process.env.DIST_DIR}/client/${cssFile}`);\n styles.push({\n id: cssFile,\n content: await css.text(),\n });\n }\n }\n return createStyles(styles);\n };\n\n return await result({\n getStyles,\n bootstrapModules: [`/${manifest[\"app/client.tsx\"].file}`],\n loaders,\n viewImportMap,\n ogMap,\n cssManifest,\n });\n }\n } catch (err) {\n console.error(err);\n if (pathname.startsWith(\"/api\")) {\n return new Response(JSON.stringify({ error: err.message }), {\n status: 500,\n headers: { \"Content-Type\": \"application/json\" },\n });\n }\n app.onException?.(err);\n return new Response(err.stack, { status: 500 });\n }\n }\n\n // Compression is on unless the deployment opts out — set `GEMI_COMPRESSION=off`\n // when a layer in front of the origin already compresses HTML and you would\n // rather not spend origin CPU on it.\n const compressionEnabled = (process.env.GEMI_COMPRESSION ?? \"auto\").toLowerCase() !== \"off\";\n\n const server = Bun.serve({\n maxRequestBodySize: 10 * 1024 * 1024 * 1024, // 10 GB\n fetch: async (req, server) => {\n if (!req.headers.get(\"x-forwarded-for\")) {\n // `requestIP` is null for closed/unix sockets — guard so it never\n // throws before the request is handled.\n const ip = server.requestIP(req);\n if (ip) req.headers.set(\"x-forwarded-for\", ip.address);\n }\n const res = await instrumentation(req, requestHandler);\n // Applied at the very edge, after instrumentation, so every HTML response\n // goes through the same negotiation — including the ones an app's\n // instrumentation produced itself. Anything that isn't HTML comes back\n // untouched.\n return compressionEnabled ? compressResponse(req, res) : res;\n },\n idleTimeout: Number(process.env.SERVER_IDLE_TIMEOUT ?? 10),\n port: process.env.PORT || 5173,\n });\n\n printStartupBanner({ port: server.port, rootDir });\n\n return server;\n}\n",
6
+ "/**\n * Transport-level compression for SSR HTML responses.\n *\n * This lives in the runtime rather than in an app, because every gemi app\n * serves the same shape of response: a streamed `text/html` document whose\n * bulk is critical CSS, markup and the `window.__GEMI_DATA__` hydration\n * payload. Compressing it here means the win is portable across deployments —\n * it does not depend on a CDN being configured to compress on the origin's\n * behalf — and it also cuts origin→edge bandwidth, which edge compression\n * cannot.\n *\n * Compression stays strictly at the transport layer: what the client decodes\n * is byte-for-byte the HTML React rendered, so hydration is unaffected.\n *\n * Deliberately dependency-free apart from `node:zlib`/`node:stream` so it can\n * be unit tested without booting a server.\n */\n\nimport { Duplex } from \"node:stream\";\nimport { constants, createBrotliCompress, createGzip } from \"node:zlib\";\n\n/** The content codings we can produce, in the order we prefer them. */\nexport type ContentEncoding = \"br\" | \"gzip\";\n\n/**\n * Server preference, used to break q-value ties. Brotli comes first: at the\n * quality we use it is both smaller *and* no more expensive than gzip on a\n * representative SSR document (~177 kB → 28.0 kB in ~2.0 ms, versus 31.6 kB in\n * ~2.0 ms for gzip).\n */\nconst SERVER_PREFERENCE: ContentEncoding[] = [\"br\", \"gzip\"];\n\n/**\n * Below this, an encoded body plus its framing overhead is not worth the CPU.\n * Only applied when the response declares a `Content-Length` — a streamed SSR\n * response does not, and buffering one just to measure it would defeat the\n * streaming render.\n */\nconst MIN_COMPRESSIBLE_BYTES = 1024;\n\n/**\n * Brotli quality 5 (of 11). The default, 11, is meant for static assets\n * compressed once at build time — on a streamed document it costs ~175 ms,\n * two orders of magnitude more than quality 5 for ~12% more savings. Quality 5\n * is the usual choice for dynamic content.\n *\n * `LGWIN` 19 caps the window at 512 kB rather than the default 16 MB. An SSR\n * document is far smaller than that, so the ratio is unchanged, and the bound\n * matters under concurrency: the window is allocated per in-flight response.\n */\nconst BROTLI_QUALITY = 5;\nconst BROTLI_WINDOW_BITS = 19;\n\n/** zlib's default level. Level 9 costs measurably more for ~1% on HTML. */\nconst GZIP_LEVEL = 6;\n\nfunction parseQValue(raw: string | undefined): number {\n if (raw === undefined) {\n return 1;\n }\n // `q` is a fixed-point number with at most three decimals (RFC 9110 §12.4.2).\n // Anything else is malformed; treat it as an unqualified \"acceptable\" rather\n // than dropping the encoding, matching what tolerant servers do.\n if (!/^\\d+(\\.\\d{0,3})?$/.test(raw.trim())) {\n return 1;\n }\n const value = Number(raw.trim());\n return Number.isFinite(value) ? Math.min(value, 1) : 1;\n}\n\n/**\n * Parses a request `Accept-Encoding` into `coding -> qvalue`.\n *\n * Returns `null` when the header is *absent*, which is distinct from an empty\n * one. RFC 9110 §12.5.3 says an absent header means any coding is acceptable,\n * but a client that cannot decode and forgets to say so is a broken page, not\n * a slow one — so we treat \"absent\" as \"identity\" and only encode when a\n * client has explicitly opted in. An empty header (`Accept-Encoding:`) is a\n * deliberate \"identity only\" and parses to an empty map.\n */\nexport function parseAcceptEncoding(header: string | null | undefined): Map<string, number> | null {\n if (header === null || header === undefined) {\n return null;\n }\n\n const accepted = new Map<string, number>();\n for (const part of header.split(\",\")) {\n const [rawCoding, ...params] = part.split(\";\");\n const coding = rawCoding.trim().toLowerCase();\n if (coding === \"\") {\n continue;\n }\n\n let q = 1;\n for (const param of params) {\n const separator = param.indexOf(\"=\");\n if (separator === -1) {\n continue;\n }\n if (param.slice(0, separator).trim().toLowerCase() === \"q\") {\n q = parseQValue(param.slice(separator + 1));\n break;\n }\n }\n\n accepted.set(coding, q);\n }\n\n return accepted;\n}\n\n/**\n * Picks the coding to use, or `null` for identity.\n *\n * A `q=0` is a refusal, `*` covers codings the client did not name, and ties\n * fall back to `available`'s order — so a plain `Accept-Encoding: gzip, br`\n * (equal q of 1) resolves to our preference rather than the client's.\n */\nexport function negotiateEncoding(\n header: string | null | undefined,\n available: ContentEncoding[] = SERVER_PREFERENCE,\n): ContentEncoding | null {\n const accepted = parseAcceptEncoding(header);\n if (!accepted) {\n return null;\n }\n\n const wildcard = accepted.get(\"*\");\n let best: ContentEncoding | null = null;\n let bestQ = 0;\n\n for (const coding of available) {\n const q = accepted.get(coding) ?? wildcard ?? 0;\n if (q > bestQ) {\n best = coding;\n bestQ = q;\n }\n }\n\n return best;\n}\n\nfunction hasDirective(headerValue: string | null, directive: string): boolean {\n if (!headerValue) {\n return false;\n }\n // Token match, not substring: `no-transform` must not be found inside\n // something like `x-no-transform`.\n return headerValue\n .split(\",\")\n .some((token) => token.trim().toLowerCase().split(\"=\")[0].trim() === directive);\n}\n\n/**\n * Whether this response's representation is one we may encode — and therefore\n * one that varies by `Accept-Encoding`, even on the requests where we end up\n * sending identity.\n *\n * HTML only, on purpose. JSON view-data and API responses are left alone so\n * that this change cannot alter how they are produced, framed or cached;\n * widening the set is a separate decision.\n */\nexport function isCompressible(method: string, res: Response): boolean {\n // A HEAD response carries no body to encode, and emitting `Content-Encoding`\n // without one would describe a body the client never receives.\n if (method === \"HEAD\") {\n return false;\n }\n\n if (!res.body) {\n return false;\n }\n\n // 204/304 are bodyless; 206 is a byte range of an already-committed\n // representation and re-encoding it would invalidate its `Content-Range`.\n if (res.status < 200 || res.status === 204 || res.status === 206 || res.status === 304) {\n return false;\n }\n\n if (res.headers.has(\"Content-Range\")) {\n return false;\n }\n\n const contentType = res.headers.get(\"Content-Type\");\n if (!contentType || !/^\\s*text\\/html\\s*(;|$)/i.test(contentType)) {\n return false;\n }\n\n // Already encoded upstream — `identity` is the one value that means \"not\n // encoded\" and is safe to replace.\n const contentEncoding = res.headers.get(\"Content-Encoding\");\n if (contentEncoding && contentEncoding.trim().toLowerCase() !== \"identity\") {\n return false;\n }\n\n // RFC 9110 §5.2.2.6: `no-transform` forbids intermediaries *and* us from\n // changing the representation's encoding.\n if (hasDirective(res.headers.get(\"Cache-Control\"), \"no-transform\")) {\n return false;\n }\n\n const contentLength = res.headers.get(\"Content-Length\");\n if (contentLength !== null && Number(contentLength) < MIN_COMPRESSIBLE_BYTES) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Builds the encoder as a web `TransformStream`-shaped pair.\n *\n * Both codings are driven through `node:zlib` with an explicit per-write flush.\n * Without it the compressor holds output until its internal buffer fills,\n * which would sit on React's shell flush and turn a streamed render into a\n * buffered one — the compression win would be paid for in time to first byte.\n */\nexport function createEncoderStream(encoding: ContentEncoding) {\n const compressor =\n encoding === \"br\"\n ? createBrotliCompress({\n params: {\n [constants.BROTLI_PARAM_QUALITY]: BROTLI_QUALITY,\n [constants.BROTLI_PARAM_LGWIN]: BROTLI_WINDOW_BITS,\n },\n flush: constants.BROTLI_OPERATION_FLUSH,\n })\n : createGzip({ level: GZIP_LEVEL, flush: constants.Z_SYNC_FLUSH });\n\n return Duplex.toWeb(compressor) as unknown as ReadableWritablePair<Uint8Array, Uint8Array>;\n}\n\nfunction withVaryAcceptEncoding(headers: Headers) {\n const vary = headers.get(\"Vary\");\n if (!vary) {\n headers.set(\"Vary\", \"Accept-Encoding\");\n return;\n }\n const tokens = vary.split(\",\").map((token) => token.trim().toLowerCase());\n // `Vary: *` already means \"never reuse for another request\"; narrowing it\n // would be a downgrade.\n if (tokens.includes(\"*\") || tokens.includes(\"accept-encoding\")) {\n return;\n }\n headers.append(\"Vary\", \"Accept-Encoding\");\n}\n\n/**\n * Compresses an SSR HTML response when the client asked for it.\n *\n * Non-HTML responses are returned untouched — same object, same body, so this\n * is safe to apply at the edge of the server for every request.\n *\n * HTML responses always gain `Vary: Accept-Encoding`, whether or not this\n * particular request got an encoded body: without it a shared cache could\n * serve a stored encoded variant to a client that cannot decode it.\n */\nexport function compressResponse(req: Request, res: Response): Response {\n if (!isCompressible(req.method, res)) {\n return res;\n }\n\n const headers = new Headers(res.headers);\n withVaryAcceptEncoding(headers);\n\n const encoding = negotiateEncoding(req.headers.get(\"Accept-Encoding\"));\n if (!encoding) {\n return new Response(res.body, {\n status: res.status,\n statusText: res.statusText,\n headers,\n });\n }\n\n let encoder: ReadableWritablePair<Uint8Array, Uint8Array>;\n try {\n encoder = createEncoderStream(encoding);\n } catch {\n // A compressor we cannot construct is not worth failing a page render\n // over. Serve identity — with the `Vary` we already added.\n return new Response(res.body, {\n status: res.status,\n statusText: res.statusText,\n headers,\n });\n }\n\n headers.set(\"Content-Encoding\", encoding);\n // The length of the identity representation says nothing about the encoded\n // body, and a stale one would truncate the response.\n headers.delete(\"Content-Length\");\n\n return new Response(res.body!.pipeThrough(encoder), {\n status: res.status,\n statusText: res.statusText,\n headers,\n });\n}\n",
7
+ "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",
8
+ "import { URLPattern } from \"./dist/urlpattern.js\";\n\nexport { URLPattern };\n\nif (!globalThis.URLPattern) {\n globalThis.URLPattern = URLPattern;\n}\n"
9
+ ],
10
+ "mappings": ";gTAAA,SAAS,OCkBT,WAAS,SACT,cAAS,oBAAW,UAAsB,aAW1C,IAAM,EAAuC,CAAC,KAAM,MAAM,EAQpD,EAAyB,KAYzB,EAAiB,EACjB,EAAqB,GAGrB,EAAa,EAEnB,SAAS,CAAW,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,CAAmB,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,CAC1D,EAAI,EAAY,EAAM,MAAM,EAAY,CAAC,CAAC,EAC1C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AAM,EAAK,EAAO,UAAU,CAAG,EAC/B,GAAI,EAAI,EAAI,QAAQ,IAAI,kBAAmB,EAAG,OAAO,EAEvD,IAAM,EAAM,MAAM,EAAgB,EAAK,CAAc,EAKrD,OAAO,EAAqB,EAAiB,EAAK,CAAG,EAAI,GAE3D,YAAa,OAAO,QAAQ,IAAI,qBAAuB,EAAE,EACzD,KAAM,QAAQ,IAAI,MAAQ,IAC5B,CAAC,EAID,OAFA,EAAmB,CAAE,KAAM,EAAO,KAAM,SAAQ,CAAC,EAE1C",
11
+ "debugId": "45C6664548EA439D64756E2164756E21",
12
+ "names": []
13
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ClientRouter.d.ts","sourceRoot":"","sources":["../../client/ClientRouter.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAqB,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAkC/E,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;KACrC;CACF;AAuSD,eAAO,MAAM,YAAY,GAAI,OAAO;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;IACxD,UAAU,EAAE,aAAa,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpE,4CA2CA,CAAC"}
1
+ {"version":3,"file":"ClientRouter.d.ts","sourceRoot":"","sources":["../../client/ClientRouter.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAqB,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAgC/E,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;KACrC;CACF;AAgRD,eAAO,MAAM,YAAY,GAAI,OAAO;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;IACxD,UAAU,EAAE,aAAa,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpE,4CA2CA,CAAC"}
@@ -4,6 +4,14 @@ import { Subject } from "../utils/Subject";
4
4
  import { ProgressManager } from "./ProgressManager";
5
5
  import type { Breadcrumb } from "./useBreadcrumbs";
6
6
  import type { RouteState } from "./RouteStateContext";
7
+ export interface PrefetchTarget {
8
+ /** Concrete pathname, without the locale segment. */
9
+ pathname: string;
10
+ /** Query string including the leading `?`, or empty. */
11
+ search?: string;
12
+ /** `/tr-TR` style prefix, or empty for the default locale. */
13
+ localeSegment?: string;
14
+ }
7
15
  declare global {
8
16
  interface Window {
9
17
  scrollHistory: Map<string, number>;
@@ -21,6 +29,9 @@ interface ClientRouterContextValue {
21
29
  setNavigationAbortController: (controller: AbortController) => void;
22
30
  progressManager: ProgressManager;
23
31
  fetchRouteCSS: (routePath: string) => Promise<void>;
32
+ prefetchRoute: (target: PrefetchTarget) => Promise<void>;
33
+ takePrefetched: (url: string) => Promise<unknown> | null;
34
+ clearPrefetchCache: () => void;
24
35
  breadcrumbsCache: Map<string, Breadcrumb>;
25
36
  routerSubject: Subject<RouteState>;
26
37
  urlLocaleSegment: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"ClientRouterContext.d.ts","sourceRoot":"","sources":["../../client/ClientRouterContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,OAAO,EAAwB,MAAM,SAAS,CAAC;AAC1E,OAAO,EAOL,KAAK,iBAAiB,EACvB,MA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CAAC;IAC/B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC1C,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACnC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,mBAAmB,mDAE/B,CAAC;AAEF,UAAU,yBAAyB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,oBAAoB,GAC/B,OAAO,iBAAiB,CAAC,yBAAyB,CAAC,4CAqRpD,CAAC"}
@@ -6,10 +6,29 @@ type Views = {
6
6
  [K in keyof ViewRPC as K extends `view:${infer P}` ? P : never]: ViewResult<K>;
7
7
  };
8
8
  type Search = Record<string, string | number | boolean | undefined | null>;
9
+ /**
10
+ * When to warm the target route's data, styles and chunks.
11
+ *
12
+ * - `hover` — the moment the pointer arrives, or on touch or keyboard focus.
13
+ * - `intent` — hover held long enough to read as intent, so a cursor sweeping
14
+ * across a nav bar does not fire a request per link it crosses.
15
+ * - `viewport` — as the link comes into view.
16
+ * - `render` — as soon as the link renders.
17
+ *
18
+ * Several can be combined. The useful pairing is a bulk strategy with an
19
+ * interactive one — `["viewport", "intent"]` warms the link on the way past and
20
+ * warms it again on approach if the cached payload has since gone stale.
21
+ * `hover` and `intent` together is just `hover`, since it fires first.
22
+ *
23
+ * Every strategy stands down on metered or very slow connections.
24
+ */
25
+ export type PrefetchStrategy = "hover" | "intent" | "viewport" | "render";
9
26
  type LinkBaseProps<T extends keyof Views> = Omit<ComponentProps<"a">, "href"> & {
10
27
  active?: boolean;
11
28
  href: T;
12
29
  hash?: string;
30
+ /** Off unless set. `false` is accepted so it can be driven by a variable. */
31
+ prefetch?: PrefetchStrategy | readonly PrefetchStrategy[] | false;
13
32
  params: UrlParser<T>;
14
33
  search?: T extends keyof Views ? Views[T]["input"] extends Record<string, never> ? Search : Prettify<Partial<Views[T]["input"]> & Search> : Search;
15
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../client/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK9C,KAAK,KAAK,GAAG;KACV,CAAC,IAAI,MAAM,OAAO,IAAI,CAAC,SAAS,QAAQ,MAAM,CAAC,EAAE,GAC9C,CAAC,GACD,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;CAC1B,CAAC;AAEF,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;AAE3E,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,KAAK,IAAI,IAAI,CAC9C,cAAc,CAAC,GAAG,CAAC,EACnB,MAAM,CACP,GAAG;IACF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,CAAC,CAAC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that a navigation is
4
+ * not served a snapshot the visitor would notice as out of date.
5
+ *
6
+ * A payload cached here is committed wholesale on navigation — including into
7
+ * the query cache via `hydrate` — so anything that invalidates page data has to
8
+ * `clear()` this too. `useMutation` does exactly that on every successful
9
+ * write; locale needs no such call, since the locale segment is part of the key.
10
+ */
11
+ export declare const PREFETCH_TTL = 10000;
12
+ /**
13
+ * Ceiling on retained payloads. Entries only leave on their own when a
14
+ * navigation consumes them, and `viewport`/`render` on a long list warms links
15
+ * that are mostly never clicked — each one a full page payload. Oldest goes
16
+ * first, which is also the one closest to expiry.
17
+ */
18
+ export declare const PREFETCH_MAX_ENTRIES = 12;
19
+ /**
20
+ * Payloads fetched ahead of a navigation, keyed by the `.json` URL that
21
+ * navigation would request. Entries are handed over once — a navigation that
22
+ * consumes one becomes the live route data, so keeping a copy around would only
23
+ * let a later visit render from a stale snapshot.
24
+ */
25
+ export declare class PrefetchCache {
26
+ private entries;
27
+ private isFresh;
28
+ /** Drops what has expired, then the oldest of whatever is still over budget. */
29
+ private evict;
30
+ /**
31
+ * Runs `load` unless the same URL is already in flight or freshly cached, so
32
+ * a link hovered repeatedly — or a screenful of eagerly prefetched links
33
+ * pointing at one route — costs a single request.
34
+ */
35
+ prime(url: string, load: () => Promise<unknown>): Promise<unknown>;
36
+ /**
37
+ * Hands the payload for `url` to a navigation, if one was prefetched and is
38
+ * still fresh. Resolves to `null` when the prefetch failed, which callers
39
+ * must treat as a miss.
40
+ */
41
+ take(url: string): Promise<unknown> | null;
42
+ /**
43
+ * Drops everything, for when the data behind these payloads may have moved
44
+ * on. In-flight loads still settle; their entries are simply gone by then.
45
+ */
46
+ clear(): void;
47
+ /** Retained entries, fresh or not. Exposed for tests. */
48
+ get size(): number;
49
+ }
50
+ //# sourceMappingURL=PrefetchCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrefetchCache.d.ts","sourceRoot":"","sources":["../../client/PrefetchCache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,QAAS,CAAC;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAOvC;;;;;GAKG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAA4B;IAE3C,OAAO,CAAC,OAAO;IAIf,gFAAgF;IAChF,OAAO,CAAC,KAAK;IAeb;;;;OAIG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAwBlE;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI;IAS1C;;;OAGG;IACH,KAAK;IAIL,yDAAyD;IACzD,IAAI,IAAI,WAEP;CACF"}
@@ -0,0 +1,28 @@
1
+ interface LoadRoutePayloadOptions {
2
+ /** The `.json` URL for the route being navigated to. */
3
+ url: string;
4
+ /** `x-gemi-from` value for the route currently on screen. */
5
+ from: string;
6
+ /** Hands over a payload warmed ahead of this navigation, if there is one. */
7
+ takePrefetched?: (url: string) => Promise<unknown> | null;
8
+ /**
9
+ * The route that is on screen *now*, re-read at the moment a response lands.
10
+ * A navigation that committed while this one was in flight invalidates the
11
+ * partial-render plan the server computed.
12
+ */
13
+ renderedRoute: () => string;
14
+ }
15
+ /**
16
+ * The page data for a navigation, from whichever source can produce it.
17
+ *
18
+ * A prefetched payload is always a full render, so it can be committed as-is
19
+ * and the `x-gemi-from` round trip skipped entirely. Everything else — no
20
+ * prefetch, a prefetch that failed, a partial response computed against a route
21
+ * that has since been navigated away from — falls through to a request.
22
+ *
23
+ * Returns `null` when nothing usable came back; the caller leaves the current
24
+ * route on screen.
25
+ */
26
+ export declare function loadRoutePayload(options: LoadRoutePayloadOptions): Promise<any>;
27
+ export {};
28
+ //# sourceMappingURL=loadRoutePayload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadRoutePayload.d.ts","sourceRoot":"","sources":["../../../client/helpers/loadRoutePayload.ts"],"names":[],"mappings":"AAKA,UAAU,uBAAuB;IAC/B,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1D;;;;OAIG;IACH,aAAa,EAAE,MAAM,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,GAAG,CAAC,CAyCd"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The `.json` URL a route's page data is served from.
3
+ *
4
+ * Prefetching and navigation have to agree on this string exactly — the
5
+ * prefetch cache is keyed by it, and any disagreement silently turns every
6
+ * prefetch into a wasted request plus a full fetch on click.
7
+ */
8
+ export declare function routeDataUrl(options: {
9
+ /** Concrete pathname, without the locale segment. */
10
+ pathname: string;
11
+ /** Query string including the leading `?`, or empty. */
12
+ search?: string;
13
+ /** `/tr-TR` style prefix, or empty for the default locale. */
14
+ localeSegment?: string;
15
+ }): string;
16
+ //# sourceMappingURL=routeDataUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routeDataUrl.d.ts","sourceRoot":"","sources":["../../../client/helpers/routeDataUrl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE;IACpC,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,UAKA"}
@@ -11,9 +11,11 @@ export { useRoute } from "./useRoute";
11
11
  export { useIsNavigationPending } from "./useIsNavigationPending";
12
12
  export { useNavigationProgress } from "./useNavigationProgress";
13
13
  export { useNavigate } from "./useNavigate";
14
+ export { usePrefetch } from "./usePrefetch";
14
15
  export { useBreadcrumbs } from "./useBreadcrumbs";
15
16
  export { useRouteTransition } from "./RouteTransitionProvider";
16
17
  export { Link } from "./Link";
18
+ export type { PrefetchStrategy } from "./Link";
17
19
  export { Redirect } from "./Redirect";
18
20
  export { init, create } from "./init";
19
21
  export { createRoot } from "./createRoot";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EACL,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,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