gemi 0.88.0 → 0.88.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ymgehegb.js → chunk-7awbkbbx.js} +3 -3
- package/dist/{chunk-ymgehegb.js.map → chunk-7awbkbbx.js.map} +4 -4
- package/dist/{chunk-j3y6pdqp.js → chunk-bhzb8e5r.js} +2 -2
- package/dist/{chunk-j3y6pdqp.js.map → chunk-bhzb8e5r.js.map} +1 -1
- package/dist/{chunk-86p57tjw.js → chunk-d1zt6sfj.js} +1 -1
- package/dist/{chunk-aqtf14yz.js → chunk-q77qf42t.js} +1 -1
- package/dist/{chunk-efzvxta5.js → chunk-x5ajfnrx.js} +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/ApiRouter.d.ts +12 -1
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/router/createFlatApiRoutes.d.ts.map +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-86p57tjw.js.map → chunk-d1zt6sfj.js.map} +0 -0
- /package/dist/{chunk-aqtf14yz.js.map → chunk-q77qf42t.js.map} +0 -0
- /package/dist/{chunk-efzvxta5.js.map → chunk-x5ajfnrx.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{va as j}from"./chunk-8z37k28d.js";import{createElement as x}from"react";function h(i,n){let s=Object.keys(n).sort((u,r)=>r.length-u.length).map((u)=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),b=new RegExp(s.join("|"),"g");return i.replace(b,(u)=>n[u])}async function J(i,n,s=[]){let b=[...s.map((t)=>`${i}/views/${t}.tsx`),`${i}/views/RootLayout.tsx`],u=new Set;for(let t of b){let e=n.moduleGraph.getModulesByFile(t);if(e)for(let g of e)u.add(g)}let r=[],p=[],l={};for(let t of u)if(t)for(let e of t.importedModules){if(e.file.includes("module.css"))l[e.file]=e.ssrTransformResult.map.sourcesContent.join("");if(e.file.includes(".css"))p.push(e.file)}for(let t of p){let e=await n.transformRequest(t+"?direct"),g=t.includes("module.css"),a="";if(g)a=h(l[t],e.default);r.push({isDev:!0,id:t,content:g?a:e.code})}return r.map((t,e)=>{return x("style",{key:e,type:"text/css","data-vite-dev-id":t.id,dangerouslySetInnerHTML:{__html:t.content}})})}async function L(i=[]){return i.map((n,s)=>{return x("style",{key:s,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as v}from"fs";import{basename as f}from"path";import{networkInterfaces as k}from"os";var y={name:"gemi",version:"0.88.
|
|
2
|
+
import{va as j}from"./chunk-8z37k28d.js";import{createElement as x}from"react";function h(i,n){let s=Object.keys(n).sort((u,r)=>r.length-u.length).map((u)=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),b=new RegExp(s.join("|"),"g");return i.replace(b,(u)=>n[u])}async function J(i,n,s=[]){let b=[...s.map((t)=>`${i}/views/${t}.tsx`),`${i}/views/RootLayout.tsx`],u=new Set;for(let t of b){let e=n.moduleGraph.getModulesByFile(t);if(e)for(let g of e)u.add(g)}let r=[],p=[],l={};for(let t of u)if(t)for(let e of t.importedModules){if(e.file.includes("module.css"))l[e.file]=e.ssrTransformResult.map.sourcesContent.join("");if(e.file.includes(".css"))p.push(e.file)}for(let t of p){let e=await n.transformRequest(t+"?direct"),g=t.includes("module.css"),a="";if(g)a=h(l[t],e.default);r.push({isDev:!0,id:t,content:g?a:e.code})}return r.map((t,e)=>{return x("style",{key:e,type:"text/css","data-vite-dev-id":t.id,dangerouslySetInnerHTML:{__html:t.content}})})}async function L(i=[]){return i.map((n,s)=>{return x("style",{key:s,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as v}from"fs";import{basename as f}from"path";import{networkInterfaces as k}from"os";var y={name:"gemi",version:"0.88.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","gemi-orm-generator":"./dist/bin/orm-generator.js"},files:["dist/**/*","ide/typescript-plugin/package.json","skills/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./ai":"./ai/index.ts","./ai/client":"./ai/client/index.ts","./testing":"./testing/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./i18n":"./i18n/index.ts","./dictionary":"./i18n/dictionaryRuntime.ts","./server":"./server/index.ts","./config":"./config/index.ts","./container":"./container/index.ts","./foundation":"./foundation/index.ts","./database":"./database/index.ts","./orm":"./orm/index.ts","./support":"./support/index.ts","./console/run":"./console/run.ts","./queue/work":"./services/queue/work.ts","./ide/typescript-plugin":"./ide/typescript-plugin/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts"},scripts:{lint:"oxlint",typecheck:"tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.browser.json && tsc --noEmit -p ide/typescript-plugin/tsconfig.json",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:ts-plugin && bun run build:client-types && bun run build:augmentation","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 --external=typescript --sourcemap ./bin/gemi.ts ./bin/orm-generator.ts && bun ./scripts/prepare-bin.ts","build:client":"rm -rf dist/client dist/testing dist/ai/client dist/chunks && vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:ts-plugin":"bun ./scripts/build-ts-plugin.ts","build:types":"tsc -p tsconfig.build.json","build:client-types":"tsc -p tsconfig.browser.json",test:"bun --bun vitest","test:types":"vitest run --typecheck.only","test:live":"bun --bun vitest run ai/live","test:packaging":"bun --bun vitest run --config vitest.packaging.config.ts","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","build:augmentation":"bun ./scripts/wire-augmentation.ts"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1","magic-string":"^0.30.17",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","@prisma/generator-helper":"^6.5.0","@repo/typescript-config":"*","@testing-library/react":"^16.3.2","@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",jsdom:"^30.0.1",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",typescript:">=5",vite:"^8.0.0"},peerDependenciesMeta:{"@azure/storage-blob":{optional:!0},typescript:{optional:!0}}};var q=[" \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"],z=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,c=(i,n)=>z?`\x1B[${i}m${n}\x1B[0m`:n,E=(i)=>c("1",i),d=(i)=>c("2",i),o=(i)=>c("36",i),O=(i)=>c("32",i),T=(i)=>c("35",i);function R(){return y.version??"?"}function _(i){for(let n of Object.values(k()))for(let s of n??[])if((s.family==="IPv4"||s.family===4)&&!s.internal)return`http://${s.address}:${i}`;return null}function G(i){return j(i).filter((n)=>v(n)).map((n)=>f(n))}function A(i){let{port:n,rootDir:s}=i,b=`http://localhost:${n}`,u=_(n),r=G(s),p=(t,e)=>` ${O("\u279C")} ${E(t.padEnd(9))}${e}`,l=["",...q.map((t)=>T(t)),"",` ${d("gemi")} ${o(`v${R()}`)}`,"",p("Local:",o(b)),p("Network:",u?o(u):d("unavailable")),p("Env:",r.length?r.join(", "):d("none")),""];console.log(l.join(`
|
|
3
3
|
`))}
|
|
4
4
|
export{J as h,L as i,A as j};
|
|
5
5
|
|
|
6
|
-
//# debugId=
|
|
6
|
+
//# debugId=D2B3AE218C90C61064756E2164756E21
|
|
@@ -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(\"\\n\"));\n}\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": ";yCAAA,wBAAS,cAGT,SAAS,CAAc,CAAC,EAAc,EAAwC,CAC5E,IAAM,EAAc,OAAO,KAAK,CAAM,EACnC,KAAK,CAAC,EAAG,IAAM,EAAE,OAAS,EAAE,MAAM,EAClC,IAAI,CAAC,IAAQ,EAAI,QAAQ,sBAAuB,MAAM,CAAC,EAGpD,EAAQ,IAAI,OAAO,EAAY,KAAK,GAAG,EAAG,GAAG,EAEnD,OAAO,EAAK,QAAQ,EAAO,CAAC,IAAU,EAAO,EAAM,EAGrD,eAAsB,CAAe,CACnC,EACA,EACA,EAAyB,CAAC,EAC1B,CACA,IAAM,EAAQ,CACZ,GAAG,EAAa,IAAI,CAAC,IAAS,GAAG,WAAgB,OAAU,EAC3D,GAAG,wBACL,EAEM,EAAU,IAAI,IACpB,QAAW,KAAQ,EAAO,CACxB,IAAM,EAAM,EAAK,YAAY,iBAAiB,CAAI,EAClD,GAAI,EACF,QAAW,KAAK,EAAK,EAAQ,IAAI,CAAC,EAItC,IAAM,EAAS,CAAC,EACV,EAAa,CAAC,EACd,EAA2C,CAAC,EAClD,QAAW,KAAO,EAChB,GAAI,EACF,QAAW,KAAY,EAAI,gBAAiB,CAC1C,GAAI,EAAS,KAAK,SAAS,YAAY,EACrC,EAAiB,EAAS,MAAQ,EAAS,mBAAmB,IAAI,eAAe,KAAK,EAAE,EAE1F,GAAI,EAAS,KAAK,SAAS,MAAM,EAC/B,EAAW,KAAK,EAAS,IAAI,EAMrC,QAAW,KAAiB,EAAY,CACtC,IAAM,EAAY,MAAM,EAAK,iBAAiB,EAAgB,SAAS,EAEjE,EAAc,EAAc,SAAS,YAAY,EAEnD,EAAuB,GAE3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Ac,CAAC,EAA2B,CACjD,OAAO,EAAS,CAAO,EACpB,OAAO,CAAC,IAAS,EAAW,CAAI,CAAC,EACjC,IAAI,CAAC,IAAS,EAAS,CAAI,CAAC,EAG1B,SAAS,CAAkB,CAAC,EAGhC,CACD,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": "
|
|
9
|
+
"debugId": "D2B3AE218C90C61064756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Fb as f,zb as qZ}from"./chunk-4v4v5wkh.js";import{Ob as m,Qb as M,Sb as XZ,Tb as e,Ub as HZ,Wb as KZ}from"./chunk-56p9a7nx.js";import{$b as J,Zb as o,_b as n,ac as t,bc as r,dc as a}from"./chunk-6dyt8w27.js";import{gc as K}from"./chunk-bsbn7qtd.js";import{$c as c,Bd as F,Cd as g,Dd as v,Ec as JZ,_c as WZ,dd as D,ld as d,md as w,qd as l,tc as IZ,xc as i,xd as T}from"./chunk-ymgehegb.js";import{Ld as GZ,Md as h}from"./chunk-6rc6yec4.js";import{of as u,qf as y,rf as k,sf as S}from"./chunk-rhe7s1fm.js";import{Gf as zZ}from"./chunk-6y62ccam.js";import{mg as U}from"./chunk-ttckhvew.js";import{rg as p}from"./chunk-yc3n6zhr.js";import{wg as j}from"./chunk-0efykzjy.js";import{xg as $Z}from"./chunk-8r7xhy1g.js";async function LZ(Z){try{if(!await Z.shouldRun.call(Z))return}catch($){console.error(`Error evaluating shouldRun for cron job ${Z.name}:`,$);return}try{await Z.onTick.call(Z)}catch($){console.error(`Error executing cron job ${Z.name}:`,$)}try{await Z.callback.call(Z)}catch($){console.error(`Error in cron job ${Z.name}:`,$)}try{await Z.onComplete.call(Z)}catch($){console.error(`Error completing cron job ${Z.name}:`,$)}}class L{static token="scheduler";handles=[];resolved;inFlight=new Map;stopped=!1;constructor(Z){this.resolved=Z.jobs}get jobs(){return[...this.resolved]}useJobs(Z){this.resolved=Z}start(Z=($)=>$()){if(this.stopped=!1,this.resolved.length===0)return;let $=globalThis.__gemiCronJobs??=new Map,H=new Map;for(let W of this.resolved){let G=new W;if(!G.name){console.error(`Cron job must have a name \u2014 ${W.name||"an anonymous class"} has none, so it is not scheduled. If this is a base class that other jobs extend, move it out of the discovered directory: \`abstract\` does not survive to runtime, so a class under app/cron is indistinguishable from a job.`);continue}if(!G.cron){console.error(`Cron job must have an expression. Job: ${G.name}`);continue}let V=H.get(G.name);if(V!==void 0){console.error(`Two cron jobs claim the name "${G.name}" \u2014 ${V} is scheduled and ${W.name||"an anonymous class"} is not. A name is the scheduler's key, so only one job can hold it. Rename one.`);continue}H.set(G.name,W.name||"an anonymous class"),$.get(G.name)?.stop();let X=Bun.cron(G.cron,()=>{if(this.stopped)return;return this.track(G.name,()=>Z(()=>LZ(G)))});$.set(G.name,X),this.handles.push(X)}}stop(){this.stopped=!0;for(let Z of this.handles)Z.stop();this.handles=[]}async drain(Z=1/0){this.stop();let $,H=new Promise((W)=>{if(Z!==1/0)$=setTimeout(W,Z)});return await Promise.race([Promise.allSettled([...this.inFlight.values()].map((W)=>W.done)),H]),clearTimeout($),{unfinished:[...this.inFlight.values()].map((W)=>({...W.tick}))}}get running(){return this.inFlight.size}track(Z,$){let H={},W=Promise.resolve().then($).finally(()=>this.inFlight.delete(H));return this.inFlight.set(H,{tick:{name:Z,startedAt:new Date},done:W}),W}}import{isMainThread as QZ}from"worker_threads";var NZ=100,FZ=(Z)=>Math.min(NZ,Math.floor(Z/10));class xZ extends K{register(){this.app.singleton(J,()=>new J(this.app.config.get("queue",{}),{application:this.app}))}async boot(){let Z=this.app.config.get("queue",{});if(Z.jobs!==void 0)return;let{jobsDir:$}=U(o(),Z);this.app.make(J).useJobs(await e($))}async shutdown(Z){if(!this.app.resolved(J))return;let $=this.app.make(J);if($.running>0)console.log(`[gemi] Shutting down: waiting for ${$.running} running queued job(s).`);let H=Z?.timeoutMs,{unfinished:W}=await $.drain(H===void 0?1/0:Math.max(0,H-FZ(H)));if(W.length>0)return console.error("[gemi] Queued jobs still running at shutdown: "+W.map((G)=>`${G.name} (${G.id})`).join(", ")),{abandoned:!0}}}function z3(Z){if(EZ(Z),Bun.env.NODE_ENV!=="production")return TZ(Z);if(ZZ(Z))return;if(!t())return;if(!Z.bound(J))return;Z.make(J).start()}function ZZ(Z){let $=Z.config.get("queue",{}).driver??"memory";return $==="memory"||$ instanceof n}function SZ(Z){if(ZZ(Z))return!0;if(typeof Z.config.get("queue",{}).driver!=="function"||!Z.bound(J))return!1;try{return!Z.make(J).durable}catch{return!1}}function EZ(Z){let $=process.env.GEMI_QUEUE_CLAIM;if($===void 0||a())return;if(process.env.ROOT_DIR===void 0||!QZ)return;if(r()){if(!SZ(Z))return;console.warn('[gemi] GEMI_QUEUE_CLAIM=off is ignored: the memory queue driver keeps jobs in the process that dispatched them, so no worker could run them. This server runs its own jobs. Use a driver other processes can read, such as "database", to hand jobs to `gemi queue:work`.')}else if($.trim().toLowerCase()!=="on")console.warn(`[gemi] GEMI_QUEUE_CLAIM="${$}" is not "off" or "on", so this server claims jobs. Set it to "off" to leave them to \`gemi queue:work\`.`)}function TZ(Z){let $=globalThis.__gemiDevQueue;if(!$)return;if(globalThis.__gemiDevQueue=void 0,$.stop(),Z.bound(J))Z.make(J).start()}class RZ extends K{register(){this.app.singleton(v,()=>new v(this.app.config.get("auth",{})))}}var kZ=100,DZ=(Z)=>Math.min(kZ,Math.floor(Z/10));class jZ extends K{register(){this.app.singleton(L,()=>new L(U(m(),this.app.config.get("schedule",{}))))}async boot(){let Z=this.app.make(L),$=this.app.config.get("schedule",{});if($.jobs===void 0){let{jobsDir:W}=U(m(),$);Z.useJobs(await HZ(W))}if(process.env.GEMI_NO_SCHEDULE==="1")return;let H=this.app;Z.start((W)=>$Z.run(H,W))}async shutdown(Z){if(!this.app.resolved(L))return;let $=this.app.make(L);if($.running>0)console.log(`[gemi] Shutting down: waiting for ${$.running} running cron tick(s).`);let H=Z?.timeoutMs,{unfinished:W}=await $.drain(H===void 0?1/0:Math.max(0,H-DZ(H)));if(W.length>0)return console.error("[gemi] Cron jobs still running at shutdown: "+W.map((G)=>`${G.name} (started ${G.startedAt.toISOString()})`).join(", ")),{abandoned:!0}}}class N extends WZ{modelName;constructor(Z="FeatureFlag"){super();this.modelName=Z}get available(){return GZ(this.modelName)}async load(){if(!this.available)throw new c(this.modelName);let Z=h(this.modelName);return await Z.asSystem(()=>Z.findMany())}async write(Z,$,H){if(!this.available)throw new c(this.modelName);let W=h(this.modelName),G=this.hasActorColumn(W),V={active:$};if(G)V.updatedBy=H.actor;return await W.asSystem(()=>W.upsert({where:{key:Z},create:{key:Z,...V},update:V})),{actorRecorded:G}}hasActorColumn(Z){let $=Z?.$schema?.fields?.updatedBy;return $!==void 0&&$.type==="String"}}function x3(Z){return Z}function VZ(){return{features:void 0,enabled:!0,source:new N,model:"FeatureFlag",ttl:30,context:void 0,onEvaluate:void 0,maxClientFlags:200}}class MZ extends K{register(){this.app.singleton(D,()=>{let Z=this.app.config.get("features",{}),$=U(VZ(),Z);if(Z?.model!==void 0&&Z?.source===void 0)$.source=new N(Z.model);else if(Z?.model!==void 0&&Z.source instanceof N&&Z.source.modelName!==Z.model)k.warning(`app/config/features.ts sets \`model: "${Z.model}"\` and a source reading "${Z.source.modelName}". The source wins; drop \`model\` to silence this.`);return new D($,(H)=>k.warning(H))})}async boot(){let Z=this.app.make(D);if(!Z.config.enabled)return;try{await Z.refresh()}catch($){k.error(`Could not warm the feature flag cache at boot. ${$ instanceof Error?$.message:String($)}`)}}}class yZ extends K{register(){this.app.singleton(p,()=>new p(this.app.config.get("mail",{})))}}function wZ(Z){return`listener:${Z}`}function YZ(Z,$){fZ(Z);let{maxAttempts:H,backoff:W,worker:G}=$,V=Z.event.name,X=class extends XZ{maxAttempts=H;backoff=W;worker=G;async run(...Y){let[C,B]=bZ(Y),I=j(Q).rehydrate(C,B);await new Z().handle(I)}onFail(Y){console.error(`The listener ${Z.name} threw while handling ${V} off the queue. The queue will retry it up to ${H} times in total; nothing the dispatcher did is waiting on it.`,Y)}onDeadletter(Y){console.error(`The listener ${Z.name} failed every one of its ${H} attempts at ${V} and has been dead-lettered, so this side effect did not happen and will not be retried.`,Y)}};return Object.defineProperty(X,"name",{value:wZ(Z.name),writable:!0}),X}function fZ(Z){if(Object.getOwnPropertyDescriptor(Z,"name")?.writable)return;throw Error(`The listener ${Z.name} sets \`queued = true\` but does not declare \`static name\`, so it would be registered with the queue `+"under its class name \u2014 which a production build renames while the "+`payload that names it does not. Add: static name = "${Z.name}";`)}function bZ(Z){return typeof Z[0]==="string"?Z:Z[0]}class Q{static token="events";listeners={};events={};warnedFor=new Set;warnedAboutWaiting=new Set;config;constructor(Z={}){this.config=U(M(),Z),this.useListeners(this.config.listeners)}useListeners(Z){this.config.listeners=Z,this.listeners={},this.events={};let $=new Set;for(let H of Z){if(!H.event){console.error(`Listener ${H.name} does not declare \`static event\`, so there is no event name to register it under and its handle will never run. Add: static event = SomeEvent;`);continue}if($.has(H.name)){console.error(`Two event listeners are named "${H.name}" \u2014 the first is `+"registered and this one is not. A listener's name identifies it across the framework, so only one class can hold it. Rename one.");continue}$.add(H.name);let W=H.event.name,G=new H;this.events[W]??=H.event,(this.listeners[W]??=[]).push({listener:H,job:G.queued?YZ(H,G):null})}}get queuedListenerJobs(){return Object.values(this.listeners).flat().flatMap(({job:Z})=>Z?[Z]:[])}get registeredListeners(){return[...this.config.listeners]}dispatch(Z,$){if(this.deferToCommit(Z,$,!1))return;this.runListeners(Z,$)}async dispatchAndWait(Z,$){if(this.deferToCommit(Z,$,!0))return;return this.runListeners(Z,$)}deferToCommit(Z,$,H){let{name:W,afterCommit:G}=Z.constructor;if(!G)return!1;let V=zZ(()=>this.runListeners(Z,$));if(V&&H)this.warnNothingIsWaitedFor(W);return V}async runListeners(Z,$){let H=Z.constructor.name,W=this.listeners[H];if(!W?.length){this.warnNothingIsListening(H);return}for(let{listener:G,job:V}of W){if(V){this.enqueue(V,G,H,$);continue}try{await new G().handle(Z)}catch(X){console.error(`The listener ${G.name} threw while handling ${H}. The `+"listeners after it still ran \u2014 a listener's failure is its own.",X)}}}rehydrate(Z,$=[]){let H=this.events[Z];if(!H)throw Error(`Cannot rebuild the event "${Z}" that came off the queue: no registered listener binds to an event of that name, so there is no class to construct. A queued listener runs in an application that `+"discovered its own listeners \u2014 check that this process sees the "+`same app/listeners as the one that dispatched, and that the event declares \`static name = "${Z}"\`.`);return new H(...$)}enqueue(Z,$,H,W){if(W===void 0){console.error(`The listener ${$.name} is queued, but ${H} reached the dispatcher without its constructor arguments, so there is nothing for the queue to rebuild it from and the listener was skipped. Dispatch through ${H}.dispatch(...) or ${H}.dispatchAndWait(...), which carry them.`);return}let G=(V)=>console.error(`The listener ${$.name} could not be queued for ${H}, so it did not run and will not be retried. The listeners after it still ran.`,V);try{j(J).push(Z,JSON.stringify([H,W]),{reportFailure:!1}).catch(G)}catch(V){G(V)}}warnNothingIsWaitedFor(Z){if(Bun.env.NODE_ENV==="production")return;if(this.warnedAboutWaiting.has(Z))return;this.warnedAboutWaiting.add(Z),console.warn(`[gemi] ${Z}.dispatchAndWait() was called inside a transaction and ${Z} declares \`static afterCommit = true\`, so it resolved `+"immediately with no listener having run \u2014 they run when the "+"transaction commits. Await the transaction instead, or drop afterCommit if the caller needs the side effects first. Development only.")}warnNothingIsListening(Z){if(Bun.env.NODE_ENV==="production")return;if(this.warnedFor.has(Z))return;this.warnedFor.add(Z),console.warn(`[gemi] ${Z} was dispatched and nothing is listening for it. A listener registers under the name its event declares, so check that app/listeners holds a Listener with \`static event = ${Z}\` and that ${Z} declares \`static name = "${Z}"\`. Development only.`)}}class gZ extends K{register(){this.app.singleton(Q,()=>new Q(this.app.config.get("events",{})))}async boot(){let Z=this.app.make(Q),$=this.app.config.get("events",{});if($.listeners===void 0){let{listenersDir:G}=U(M(),$);Z.useListeners(await KZ(G))}let H=Z.queuedListenerJobs;if(H.length===0)return;let W=this.app.make(J);for(let G of H)W.registerJob(G)}}class vZ extends K{register(){this.app.singleton(u,()=>new u(this.app.config.get("filesystem",{})))}}class mZ extends K{register(){this.app.singleton(d,()=>new d(this.app.config.get("image",{})))}}class hZ extends K{register(){this.app.instance(l,new l)}}function U4(Z){return Z}function UZ(){return{maxFileSize:10485760,onLogFileClosed:()=>{},onLogCreated:()=>{}}}class cZ extends K{register(){this.app.singleton(y,()=>new y(U(UZ(),this.app.config.get("log",{}))))}async boot(){if(!process.env.ROOT_DIR)return;await this.app.make(y).boot()}}class pZ extends K{register(){this.app.singleton(w,()=>new w(U(IZ(),this.app.config.get("middleware",{}))))}boot(){this.app.make(w).assertGlobalMiddleware()}}function F4(Z){return Z}function CZ(){return{driver:new JZ,limit:1000,window:60}}class uZ extends K{register(){this.app.singleton(i,()=>new i(U(CZ(),this.app.config.get("ratelimiter",{}))))}}function D4(Z){return Z}function BZ(){return{url:process.env.REDIS_URL,options:void 0}}class dZ extends K{register(){this.app.singleton(S,()=>new S(U(BZ(),this.app.config.get("redis",{}))))}shutdown(){if(!this.app.resolved(S))return;this.app.make(S).close()}}class P extends qZ{status;constructor(Z,$){super(Z);this.status=$;this.name="McpToolError"}}var lZ=/^[A-Za-z0-9_-]{1,64}$/,iZ=/:([A-Za-z_][A-Za-z0-9_]*)([?*+]?)/g,PZ=4000,s=1e5,sZ=/^(text\/|application\/([\w.+-]*\+)?(json|xml))/i;class E{dispatcher;static token="router.mcp";plans=new Map;constructor(Z,$){this.dispatcher=$;for(let[H,W]of Object.entries(Z.routes??{}))this.plans.set(H,this.plan(H,W))}list(Z,$){return _Z(Z),this.descriptors($)}descriptors(Z){let $=[];for(let{descriptor:H}of this.plans.values()){if(Z?.names&&!Z.names.includes(H.name))continue;if(Z?.tags&&!H.tags.some((W)=>Z.tags.includes(W)))continue;$.push(H)}return $}async execute(Z,$,H,W){_Z(Z);let G=this.plans.get($);if(!G)throw Error(`McpRegistry: there is no tool named "${$}".`);let{descriptor:V}=G,X=V.inputSchema.safeParse(H);if(X.ok===!1)throw new P(`Invalid arguments for "${$}": ${X.errors.join(", ")}`);let Y=X.value,C=await this.fillPath(G,Y,Z.req),{path:B}=this.dispatcher.getRouteHandlerAndParams(new Request(`http://gemi.internal/api${C}`));if(B!==V.url)throw new P(`"${$}" has nothing at ${C}.`,404);let I={};for(let A of G.jsonKeys)if(Y[A]!==void 0)I[A]=Y[A];let _,O="";if(G.fileFields.length>0)_=await this.formData(G,Y,I,W);else if(V.method==="GET")O=rZ(I);else if(G.jsonKeys.length>0)_=I;let x;try{x=await this.dispatcher.dispatchAs(Z.req,V.method,O?`${C}?${O}`:C,_)}catch(A){throw console.error(`[gemi/mcp] Dispatching "${$}" failed:`,A),new P(`"${$}" failed on the server.`,500)}return await aZ($,x)}plan(Z,$){if(!lZ.test(Z))throw Error(`McpRouter: "${Z}" is not a valid tool name. A routes key is the tool's name as a model and an MCP client see it, used verbatim \u2014 letters, digits, "_" and "-", at most 64.`);let H=`McpRouter: "${Z}" (${$?.method} ${$?.url})`;if(!($ instanceof Object)||$.__internal_brand!=="McpRoute")throw Error(`McpRouter: "${Z}" is not a route. Declare it with this.fromApiRoute(...).`);let{method:W,url:G,meta:V}=$;if(G.startsWith("/__gemi__"))throw Error(`${H} is a framework route, not an app route.`);let X=this.dispatcher.flatRoutes[G]?.[W];if(!X)throw Error(`${H} names no route of this app. Expose a route by the path and verb it is mounted at.`);let Y=[...G.matchAll(iZ)].map(([,z,q])=>({name:z,modifier:q})),C=V.params??{};for(let z of Y)if(!(z.name in C))throw Error(`${H}: the path param "${z.name}" must be bound or declared "input".`);for(let[z,q]of Object.entries(C)){if(!Y.some((R)=>R.name===z))throw Error(`${H}: "${z}" in params is not a param of the url.`);OZ(H,`params.${z}`,q)}let B=[],I;if(V.input){if(I=V.input.toJSONSchema(),I.type!=="object"||!I.properties)throw Error(`${H}: input must be an s.object(...), the fields of the request body.`);B=Object.keys(I.properties)}let _=Object.entries(V.files??{}).map(([z,q])=>({name:z,binder:q}));for(let z of _)OZ(H,`files.${z.name}`,z.binder);if(_.length>0&&W==="GET")throw Error(`${H}: a GET has no body to carry a file.`);let O={},x=new Map;for(let z of Y){let q=C[z.name];if(q==="input"){let R=f.string().describe(`The ":${z.name}" segment of the url.`);O[z.name]=z.modifier==="?"||z.modifier==="*"?R.optional():R}else x.set(z.name,q)}for(let z of _)if(z.binder==="input")O[z.name]=f.string().describe("The id of an attachment the user uploaded or a tool produced (gemi_att_\u2026), whose file is sent as this field.");let A=[...Object.keys(O),..._.map((z)=>z.name)];for(let z of new Set(A))if(B.includes(z))throw Error(`${H}: "${z}" is both an input field and a param or file, and the model can only send one.`);return{descriptor:Object.freeze({name:Z,description:V.description,method:W,url:G,inputSchema:nZ(V.input,I,f.object(O)),annotations:oZ(W),tags:Object.freeze([...V.tags??[]]),requiresApproval:V.requiresApproval===!0,...X.source?{source:X.source}:{}}),params:Y,paramBinders:x,fileFields:_,jsonKeys:B}}async fillPath(Z,$,H){let W=Z.descriptor.url;for(let G of Z.params){let V=Z.paramBinders.get(G.name),X;if(V){if(X=await this.bind(Z,`the param "${G.name}"`,()=>V(H)),X===void 0||X===null||X==="")throw console.error(`[gemi/mcp] The binder for "${G.name}" of "${Z.descriptor.name}" returned ${JSON.stringify(X)}.`),new P(`"${Z.descriptor.name}" failed on the server.`,500)}else X=$[G.name];let Y=`:${G.name}${G.modifier}`;if(X===void 0||X===null||X===""){if(G.modifier!=="?"&&G.modifier!=="*")throw new P(`"${G.name}" of "${Z.descriptor.name}" must not be empty.`);W=W.replace(`/${Y}`,"");continue}W=W.replace(Y,tZ(Z.descriptor.name,G,String(X)))}return W}async formData(Z,$,H,W){let G=Z.descriptor.name;if(!W)throw Error(`McpRegistry: "${G}" sends a file, which is resolved through the tool context's attachments, and none was passed to execute().`);let V=new FormData;for(let[X,Y]of Object.entries(H))AZ(V,X,Y);for(let X of Z.fileFields){let Y=X.binder==="input"?$[X.name]:await this.bind(Z,`the file "${X.name}"`,()=>X.binder(W));if(typeof Y!=="string"||Y==="")throw new P(`"${G}" needs a file for "${X.name}", and this turn has none. Ask the user to attach one.`);V.append(X.name,await W.attachments.file(Y))}return V}async bind(Z,$,H){try{return await H()}catch(W){throw console.error(`[gemi/mcp] Binding ${$} of "${Z.descriptor.name}" failed:`,W),new P(`"${Z.descriptor.name}" failed on the server.`,500)}}}function _Z(Z){if(Z?.kind!=="local")throw Error("McpRegistry: only local callers are implemented. A remote caller needs a bearer-token resolver, which v1 does not have \u2014 and until it does there is no remote surface to call from.")}function OZ(Z,$,H){if(H!=="input"&&typeof H!=="function")throw Error(`${Z}: ${$} must be a function or "input".`)}function oZ(Z){switch(Z){case"GET":return Object.freeze({readOnlyHint:!0});case"DELETE":return Object.freeze({destructiveHint:!0});case"PUT":return Object.freeze({idempotentHint:!0});default:return Object.freeze({})}}function nZ(Z,$,H){let W=H.toJSONSchema(),G={...$??{},type:"object",properties:{...$?.properties??{},...W.properties},required:[...$?.required??[],...W.required??[]],additionalProperties:!1},V=(X)=>{if(typeof X!=="object"||X===null||Array.isArray(X))return{ok:!1,errors:["expected an object"]};let Y=[],C={};if(Z){let I=Z.safeParse(X);if(I.ok===!1)Y.push(...I.errors);else C={...I.value}}let B=H.safeParse(X);if(B.ok===!1)Y.push(...B.errors);else C={...C,...B.value};return Y.length>0?{ok:!1,errors:Y}:{ok:!0,value:C}};return{toJSONSchema:()=>G,safeParse:V,parse(X){let Y=V(X);if(Y.ok===!1)throw Error(Y.errors.join(", "));return Y.value}}}function tZ(Z,$,H){let W=$.modifier==="*"||$.modifier==="+"?H.split("/"):[H];if(W.some((G)=>G==="."||G===".."))throw new P(`"${H}" is not a valid value for "${$.name}" of "${Z}".`);return W.map(encodeURIComponent).join("/")}function AZ(Z,$,H){if(H===void 0||H===null)return;if(Array.isArray(H)){for(let W of H)AZ(Z,$,W);return}Z.append($,typeof H==="object"?JSON.stringify(H):String(H))}function rZ(Z){let $=new URLSearchParams,H=(W,G)=>{if(G===void 0||G===null)return;if(Array.isArray(G)){for(let V of G)H(W,V);return}$.append(W,typeof G==="object"?JSON.stringify(G):String(G))};for(let[W,G]of Object.entries(Z))H(W,G);return $.toString()}async function aZ(Z,$){if($.status>=200&&$.status<300){let W=$.headers.get("Content-Type");if(W&&!sZ.test(W)){let V=(await $.arrayBuffer()).byteLength;return`"${Z}" answered with ${V} bytes of ${W}, which is not shown.`}let G=await $.text();if(G==="")return null;if(G.length>s)return`${G.slice(0,s)}\u2026 [cut at ${s} of ${G.length} characters]`;try{return JSON.parse(G)}catch{return G}}let H=await $.text();if($.status>=400&&$.status<500){let W=H.length>PZ?`${H.slice(0,PZ)}\u2026`:H;throw new P(`"${Z}" was refused with ${$.status}${W?`: ${W}`:"."}`,$.status)}if($.status<500)console.error(`[gemi/mcp] "${Z}" answered ${$.status}${$.headers.get("Location")?` to ${$.headers.get("Location")}`:""}, which a tool call cannot follow.`);throw new P(`"${Z}" failed on the server.`,$.status)}function b(Z,$){let H=Z.get($);if(!H)throw Error(`Missing "${$}" configuration. Route dispatching needs a root router \u2014 declare it in "app/config/route.ts".`);return H}class eZ extends K{register(){this.app.singleton(F,()=>new F(b(this.app.config,"route.api"))),this.app.singleton(T,()=>new T(b(this.app.config,"route.view"))),this.app.singleton(g,()=>new g({api:this.app.make(F),view:this.app.make(T)},{api:b(this.app.config,"route.api"),view:b(this.app.config,"route.view"),domains:this.app.config.get("route.domains")})),this.app.singleton(E,()=>{let Z=this.app.config.get("route.mcp");if(!Z?.router)throw Error('No MCP router is configured. Declare one as `mcp: { router }` in "app/config/route.ts".');return new E(new Z.router,this.app.make(F))})}boot(){if(this.app.make(F),this.app.make(T),this.app.make(g),this.app.config.get("route.mcp"))this.app.make(E)}}
|
|
2
|
+
import{Fb as f,zb as qZ}from"./chunk-4v4v5wkh.js";import{Ob as m,Qb as M,Sb as XZ,Tb as e,Ub as HZ,Wb as KZ}from"./chunk-56p9a7nx.js";import{$b as J,Zb as o,_b as n,ac as t,bc as r,dc as a}from"./chunk-6dyt8w27.js";import{gc as K}from"./chunk-bsbn7qtd.js";import{$c as c,Bd as F,Cd as g,Dd as v,Ec as JZ,_c as WZ,dd as D,ld as d,md as w,qd as l,tc as IZ,xc as i,xd as T}from"./chunk-7awbkbbx.js";import{Ld as GZ,Md as h}from"./chunk-6rc6yec4.js";import{of as u,qf as y,rf as k,sf as S}from"./chunk-rhe7s1fm.js";import{Gf as zZ}from"./chunk-6y62ccam.js";import{mg as U}from"./chunk-ttckhvew.js";import{rg as p}from"./chunk-yc3n6zhr.js";import{wg as j}from"./chunk-0efykzjy.js";import{xg as $Z}from"./chunk-8r7xhy1g.js";async function LZ(Z){try{if(!await Z.shouldRun.call(Z))return}catch($){console.error(`Error evaluating shouldRun for cron job ${Z.name}:`,$);return}try{await Z.onTick.call(Z)}catch($){console.error(`Error executing cron job ${Z.name}:`,$)}try{await Z.callback.call(Z)}catch($){console.error(`Error in cron job ${Z.name}:`,$)}try{await Z.onComplete.call(Z)}catch($){console.error(`Error completing cron job ${Z.name}:`,$)}}class L{static token="scheduler";handles=[];resolved;inFlight=new Map;stopped=!1;constructor(Z){this.resolved=Z.jobs}get jobs(){return[...this.resolved]}useJobs(Z){this.resolved=Z}start(Z=($)=>$()){if(this.stopped=!1,this.resolved.length===0)return;let $=globalThis.__gemiCronJobs??=new Map,H=new Map;for(let W of this.resolved){let G=new W;if(!G.name){console.error(`Cron job must have a name \u2014 ${W.name||"an anonymous class"} has none, so it is not scheduled. If this is a base class that other jobs extend, move it out of the discovered directory: \`abstract\` does not survive to runtime, so a class under app/cron is indistinguishable from a job.`);continue}if(!G.cron){console.error(`Cron job must have an expression. Job: ${G.name}`);continue}let V=H.get(G.name);if(V!==void 0){console.error(`Two cron jobs claim the name "${G.name}" \u2014 ${V} is scheduled and ${W.name||"an anonymous class"} is not. A name is the scheduler's key, so only one job can hold it. Rename one.`);continue}H.set(G.name,W.name||"an anonymous class"),$.get(G.name)?.stop();let X=Bun.cron(G.cron,()=>{if(this.stopped)return;return this.track(G.name,()=>Z(()=>LZ(G)))});$.set(G.name,X),this.handles.push(X)}}stop(){this.stopped=!0;for(let Z of this.handles)Z.stop();this.handles=[]}async drain(Z=1/0){this.stop();let $,H=new Promise((W)=>{if(Z!==1/0)$=setTimeout(W,Z)});return await Promise.race([Promise.allSettled([...this.inFlight.values()].map((W)=>W.done)),H]),clearTimeout($),{unfinished:[...this.inFlight.values()].map((W)=>({...W.tick}))}}get running(){return this.inFlight.size}track(Z,$){let H={},W=Promise.resolve().then($).finally(()=>this.inFlight.delete(H));return this.inFlight.set(H,{tick:{name:Z,startedAt:new Date},done:W}),W}}import{isMainThread as QZ}from"worker_threads";var NZ=100,FZ=(Z)=>Math.min(NZ,Math.floor(Z/10));class xZ extends K{register(){this.app.singleton(J,()=>new J(this.app.config.get("queue",{}),{application:this.app}))}async boot(){let Z=this.app.config.get("queue",{});if(Z.jobs!==void 0)return;let{jobsDir:$}=U(o(),Z);this.app.make(J).useJobs(await e($))}async shutdown(Z){if(!this.app.resolved(J))return;let $=this.app.make(J);if($.running>0)console.log(`[gemi] Shutting down: waiting for ${$.running} running queued job(s).`);let H=Z?.timeoutMs,{unfinished:W}=await $.drain(H===void 0?1/0:Math.max(0,H-FZ(H)));if(W.length>0)return console.error("[gemi] Queued jobs still running at shutdown: "+W.map((G)=>`${G.name} (${G.id})`).join(", ")),{abandoned:!0}}}function z3(Z){if(EZ(Z),Bun.env.NODE_ENV!=="production")return TZ(Z);if(ZZ(Z))return;if(!t())return;if(!Z.bound(J))return;Z.make(J).start()}function ZZ(Z){let $=Z.config.get("queue",{}).driver??"memory";return $==="memory"||$ instanceof n}function SZ(Z){if(ZZ(Z))return!0;if(typeof Z.config.get("queue",{}).driver!=="function"||!Z.bound(J))return!1;try{return!Z.make(J).durable}catch{return!1}}function EZ(Z){let $=process.env.GEMI_QUEUE_CLAIM;if($===void 0||a())return;if(process.env.ROOT_DIR===void 0||!QZ)return;if(r()){if(!SZ(Z))return;console.warn('[gemi] GEMI_QUEUE_CLAIM=off is ignored: the memory queue driver keeps jobs in the process that dispatched them, so no worker could run them. This server runs its own jobs. Use a driver other processes can read, such as "database", to hand jobs to `gemi queue:work`.')}else if($.trim().toLowerCase()!=="on")console.warn(`[gemi] GEMI_QUEUE_CLAIM="${$}" is not "off" or "on", so this server claims jobs. Set it to "off" to leave them to \`gemi queue:work\`.`)}function TZ(Z){let $=globalThis.__gemiDevQueue;if(!$)return;if(globalThis.__gemiDevQueue=void 0,$.stop(),Z.bound(J))Z.make(J).start()}class RZ extends K{register(){this.app.singleton(v,()=>new v(this.app.config.get("auth",{})))}}var kZ=100,DZ=(Z)=>Math.min(kZ,Math.floor(Z/10));class jZ extends K{register(){this.app.singleton(L,()=>new L(U(m(),this.app.config.get("schedule",{}))))}async boot(){let Z=this.app.make(L),$=this.app.config.get("schedule",{});if($.jobs===void 0){let{jobsDir:W}=U(m(),$);Z.useJobs(await HZ(W))}if(process.env.GEMI_NO_SCHEDULE==="1")return;let H=this.app;Z.start((W)=>$Z.run(H,W))}async shutdown(Z){if(!this.app.resolved(L))return;let $=this.app.make(L);if($.running>0)console.log(`[gemi] Shutting down: waiting for ${$.running} running cron tick(s).`);let H=Z?.timeoutMs,{unfinished:W}=await $.drain(H===void 0?1/0:Math.max(0,H-DZ(H)));if(W.length>0)return console.error("[gemi] Cron jobs still running at shutdown: "+W.map((G)=>`${G.name} (started ${G.startedAt.toISOString()})`).join(", ")),{abandoned:!0}}}class N extends WZ{modelName;constructor(Z="FeatureFlag"){super();this.modelName=Z}get available(){return GZ(this.modelName)}async load(){if(!this.available)throw new c(this.modelName);let Z=h(this.modelName);return await Z.asSystem(()=>Z.findMany())}async write(Z,$,H){if(!this.available)throw new c(this.modelName);let W=h(this.modelName),G=this.hasActorColumn(W),V={active:$};if(G)V.updatedBy=H.actor;return await W.asSystem(()=>W.upsert({where:{key:Z},create:{key:Z,...V},update:V})),{actorRecorded:G}}hasActorColumn(Z){let $=Z?.$schema?.fields?.updatedBy;return $!==void 0&&$.type==="String"}}function x3(Z){return Z}function VZ(){return{features:void 0,enabled:!0,source:new N,model:"FeatureFlag",ttl:30,context:void 0,onEvaluate:void 0,maxClientFlags:200}}class MZ extends K{register(){this.app.singleton(D,()=>{let Z=this.app.config.get("features",{}),$=U(VZ(),Z);if(Z?.model!==void 0&&Z?.source===void 0)$.source=new N(Z.model);else if(Z?.model!==void 0&&Z.source instanceof N&&Z.source.modelName!==Z.model)k.warning(`app/config/features.ts sets \`model: "${Z.model}"\` and a source reading "${Z.source.modelName}". The source wins; drop \`model\` to silence this.`);return new D($,(H)=>k.warning(H))})}async boot(){let Z=this.app.make(D);if(!Z.config.enabled)return;try{await Z.refresh()}catch($){k.error(`Could not warm the feature flag cache at boot. ${$ instanceof Error?$.message:String($)}`)}}}class yZ extends K{register(){this.app.singleton(p,()=>new p(this.app.config.get("mail",{})))}}function wZ(Z){return`listener:${Z}`}function YZ(Z,$){fZ(Z);let{maxAttempts:H,backoff:W,worker:G}=$,V=Z.event.name,X=class extends XZ{maxAttempts=H;backoff=W;worker=G;async run(...Y){let[C,B]=bZ(Y),I=j(Q).rehydrate(C,B);await new Z().handle(I)}onFail(Y){console.error(`The listener ${Z.name} threw while handling ${V} off the queue. The queue will retry it up to ${H} times in total; nothing the dispatcher did is waiting on it.`,Y)}onDeadletter(Y){console.error(`The listener ${Z.name} failed every one of its ${H} attempts at ${V} and has been dead-lettered, so this side effect did not happen and will not be retried.`,Y)}};return Object.defineProperty(X,"name",{value:wZ(Z.name),writable:!0}),X}function fZ(Z){if(Object.getOwnPropertyDescriptor(Z,"name")?.writable)return;throw Error(`The listener ${Z.name} sets \`queued = true\` but does not declare \`static name\`, so it would be registered with the queue `+"under its class name \u2014 which a production build renames while the "+`payload that names it does not. Add: static name = "${Z.name}";`)}function bZ(Z){return typeof Z[0]==="string"?Z:Z[0]}class Q{static token="events";listeners={};events={};warnedFor=new Set;warnedAboutWaiting=new Set;config;constructor(Z={}){this.config=U(M(),Z),this.useListeners(this.config.listeners)}useListeners(Z){this.config.listeners=Z,this.listeners={},this.events={};let $=new Set;for(let H of Z){if(!H.event){console.error(`Listener ${H.name} does not declare \`static event\`, so there is no event name to register it under and its handle will never run. Add: static event = SomeEvent;`);continue}if($.has(H.name)){console.error(`Two event listeners are named "${H.name}" \u2014 the first is `+"registered and this one is not. A listener's name identifies it across the framework, so only one class can hold it. Rename one.");continue}$.add(H.name);let W=H.event.name,G=new H;this.events[W]??=H.event,(this.listeners[W]??=[]).push({listener:H,job:G.queued?YZ(H,G):null})}}get queuedListenerJobs(){return Object.values(this.listeners).flat().flatMap(({job:Z})=>Z?[Z]:[])}get registeredListeners(){return[...this.config.listeners]}dispatch(Z,$){if(this.deferToCommit(Z,$,!1))return;this.runListeners(Z,$)}async dispatchAndWait(Z,$){if(this.deferToCommit(Z,$,!0))return;return this.runListeners(Z,$)}deferToCommit(Z,$,H){let{name:W,afterCommit:G}=Z.constructor;if(!G)return!1;let V=zZ(()=>this.runListeners(Z,$));if(V&&H)this.warnNothingIsWaitedFor(W);return V}async runListeners(Z,$){let H=Z.constructor.name,W=this.listeners[H];if(!W?.length){this.warnNothingIsListening(H);return}for(let{listener:G,job:V}of W){if(V){this.enqueue(V,G,H,$);continue}try{await new G().handle(Z)}catch(X){console.error(`The listener ${G.name} threw while handling ${H}. The `+"listeners after it still ran \u2014 a listener's failure is its own.",X)}}}rehydrate(Z,$=[]){let H=this.events[Z];if(!H)throw Error(`Cannot rebuild the event "${Z}" that came off the queue: no registered listener binds to an event of that name, so there is no class to construct. A queued listener runs in an application that `+"discovered its own listeners \u2014 check that this process sees the "+`same app/listeners as the one that dispatched, and that the event declares \`static name = "${Z}"\`.`);return new H(...$)}enqueue(Z,$,H,W){if(W===void 0){console.error(`The listener ${$.name} is queued, but ${H} reached the dispatcher without its constructor arguments, so there is nothing for the queue to rebuild it from and the listener was skipped. Dispatch through ${H}.dispatch(...) or ${H}.dispatchAndWait(...), which carry them.`);return}let G=(V)=>console.error(`The listener ${$.name} could not be queued for ${H}, so it did not run and will not be retried. The listeners after it still ran.`,V);try{j(J).push(Z,JSON.stringify([H,W]),{reportFailure:!1}).catch(G)}catch(V){G(V)}}warnNothingIsWaitedFor(Z){if(Bun.env.NODE_ENV==="production")return;if(this.warnedAboutWaiting.has(Z))return;this.warnedAboutWaiting.add(Z),console.warn(`[gemi] ${Z}.dispatchAndWait() was called inside a transaction and ${Z} declares \`static afterCommit = true\`, so it resolved `+"immediately with no listener having run \u2014 they run when the "+"transaction commits. Await the transaction instead, or drop afterCommit if the caller needs the side effects first. Development only.")}warnNothingIsListening(Z){if(Bun.env.NODE_ENV==="production")return;if(this.warnedFor.has(Z))return;this.warnedFor.add(Z),console.warn(`[gemi] ${Z} was dispatched and nothing is listening for it. A listener registers under the name its event declares, so check that app/listeners holds a Listener with \`static event = ${Z}\` and that ${Z} declares \`static name = "${Z}"\`. Development only.`)}}class gZ extends K{register(){this.app.singleton(Q,()=>new Q(this.app.config.get("events",{})))}async boot(){let Z=this.app.make(Q),$=this.app.config.get("events",{});if($.listeners===void 0){let{listenersDir:G}=U(M(),$);Z.useListeners(await KZ(G))}let H=Z.queuedListenerJobs;if(H.length===0)return;let W=this.app.make(J);for(let G of H)W.registerJob(G)}}class vZ extends K{register(){this.app.singleton(u,()=>new u(this.app.config.get("filesystem",{})))}}class mZ extends K{register(){this.app.singleton(d,()=>new d(this.app.config.get("image",{})))}}class hZ extends K{register(){this.app.instance(l,new l)}}function U4(Z){return Z}function UZ(){return{maxFileSize:10485760,onLogFileClosed:()=>{},onLogCreated:()=>{}}}class cZ extends K{register(){this.app.singleton(y,()=>new y(U(UZ(),this.app.config.get("log",{}))))}async boot(){if(!process.env.ROOT_DIR)return;await this.app.make(y).boot()}}class pZ extends K{register(){this.app.singleton(w,()=>new w(U(IZ(),this.app.config.get("middleware",{}))))}boot(){this.app.make(w).assertGlobalMiddleware()}}function F4(Z){return Z}function CZ(){return{driver:new JZ,limit:1000,window:60}}class uZ extends K{register(){this.app.singleton(i,()=>new i(U(CZ(),this.app.config.get("ratelimiter",{}))))}}function D4(Z){return Z}function BZ(){return{url:process.env.REDIS_URL,options:void 0}}class dZ extends K{register(){this.app.singleton(S,()=>new S(U(BZ(),this.app.config.get("redis",{}))))}shutdown(){if(!this.app.resolved(S))return;this.app.make(S).close()}}class P extends qZ{status;constructor(Z,$){super(Z);this.status=$;this.name="McpToolError"}}var lZ=/^[A-Za-z0-9_-]{1,64}$/,iZ=/:([A-Za-z_][A-Za-z0-9_]*)([?*+]?)/g,PZ=4000,s=1e5,sZ=/^(text\/|application\/([\w.+-]*\+)?(json|xml))/i;class E{dispatcher;static token="router.mcp";plans=new Map;constructor(Z,$){this.dispatcher=$;for(let[H,W]of Object.entries(Z.routes??{}))this.plans.set(H,this.plan(H,W))}list(Z,$){return _Z(Z),this.descriptors($)}descriptors(Z){let $=[];for(let{descriptor:H}of this.plans.values()){if(Z?.names&&!Z.names.includes(H.name))continue;if(Z?.tags&&!H.tags.some((W)=>Z.tags.includes(W)))continue;$.push(H)}return $}async execute(Z,$,H,W){_Z(Z);let G=this.plans.get($);if(!G)throw Error(`McpRegistry: there is no tool named "${$}".`);let{descriptor:V}=G,X=V.inputSchema.safeParse(H);if(X.ok===!1)throw new P(`Invalid arguments for "${$}": ${X.errors.join(", ")}`);let Y=X.value,C=await this.fillPath(G,Y,Z.req),{path:B}=this.dispatcher.getRouteHandlerAndParams(new Request(`http://gemi.internal/api${C}`));if(B!==V.url)throw new P(`"${$}" has nothing at ${C}.`,404);let I={};for(let A of G.jsonKeys)if(Y[A]!==void 0)I[A]=Y[A];let _,O="";if(G.fileFields.length>0)_=await this.formData(G,Y,I,W);else if(V.method==="GET")O=rZ(I);else if(G.jsonKeys.length>0)_=I;let x;try{x=await this.dispatcher.dispatchAs(Z.req,V.method,O?`${C}?${O}`:C,_)}catch(A){throw console.error(`[gemi/mcp] Dispatching "${$}" failed:`,A),new P(`"${$}" failed on the server.`,500)}return await aZ($,x)}plan(Z,$){if(!lZ.test(Z))throw Error(`McpRouter: "${Z}" is not a valid tool name. A routes key is the tool's name as a model and an MCP client see it, used verbatim \u2014 letters, digits, "_" and "-", at most 64.`);let H=`McpRouter: "${Z}" (${$?.method} ${$?.url})`;if(!($ instanceof Object)||$.__internal_brand!=="McpRoute")throw Error(`McpRouter: "${Z}" is not a route. Declare it with this.fromApiRoute(...).`);let{method:W,url:G,meta:V}=$;if(G.startsWith("/__gemi__"))throw Error(`${H} is a framework route, not an app route.`);let X=this.dispatcher.flatRoutes[G]?.[W];if(!X)throw Error(`${H} names no route of this app. Expose a route by the path and verb it is mounted at.`);let Y=[...G.matchAll(iZ)].map(([,z,q])=>({name:z,modifier:q})),C=V.params??{};for(let z of Y)if(!(z.name in C))throw Error(`${H}: the path param "${z.name}" must be bound or declared "input".`);for(let[z,q]of Object.entries(C)){if(!Y.some((R)=>R.name===z))throw Error(`${H}: "${z}" in params is not a param of the url.`);OZ(H,`params.${z}`,q)}let B=[],I;if(V.input){if(I=V.input.toJSONSchema(),I.type!=="object"||!I.properties)throw Error(`${H}: input must be an s.object(...), the fields of the request body.`);B=Object.keys(I.properties)}let _=Object.entries(V.files??{}).map(([z,q])=>({name:z,binder:q}));for(let z of _)OZ(H,`files.${z.name}`,z.binder);if(_.length>0&&W==="GET")throw Error(`${H}: a GET has no body to carry a file.`);let O={},x=new Map;for(let z of Y){let q=C[z.name];if(q==="input"){let R=f.string().describe(`The ":${z.name}" segment of the url.`);O[z.name]=z.modifier==="?"||z.modifier==="*"?R.optional():R}else x.set(z.name,q)}for(let z of _)if(z.binder==="input")O[z.name]=f.string().describe("The id of an attachment the user uploaded or a tool produced (gemi_att_\u2026), whose file is sent as this field.");let A=[...Object.keys(O),..._.map((z)=>z.name)];for(let z of new Set(A))if(B.includes(z))throw Error(`${H}: "${z}" is both an input field and a param or file, and the model can only send one.`);return{descriptor:Object.freeze({name:Z,description:V.description,method:W,url:G,inputSchema:nZ(V.input,I,f.object(O)),annotations:oZ(W),tags:Object.freeze([...V.tags??[]]),requiresApproval:V.requiresApproval===!0,...X.source?{source:X.source}:{}}),params:Y,paramBinders:x,fileFields:_,jsonKeys:B}}async fillPath(Z,$,H){let W=Z.descriptor.url;for(let G of Z.params){let V=Z.paramBinders.get(G.name),X;if(V){if(X=await this.bind(Z,`the param "${G.name}"`,()=>V(H)),X===void 0||X===null||X==="")throw console.error(`[gemi/mcp] The binder for "${G.name}" of "${Z.descriptor.name}" returned ${JSON.stringify(X)}.`),new P(`"${Z.descriptor.name}" failed on the server.`,500)}else X=$[G.name];let Y=`:${G.name}${G.modifier}`;if(X===void 0||X===null||X===""){if(G.modifier!=="?"&&G.modifier!=="*")throw new P(`"${G.name}" of "${Z.descriptor.name}" must not be empty.`);W=W.replace(`/${Y}`,"");continue}W=W.replace(Y,tZ(Z.descriptor.name,G,String(X)))}return W}async formData(Z,$,H,W){let G=Z.descriptor.name;if(!W)throw Error(`McpRegistry: "${G}" sends a file, which is resolved through the tool context's attachments, and none was passed to execute().`);let V=new FormData;for(let[X,Y]of Object.entries(H))AZ(V,X,Y);for(let X of Z.fileFields){let Y=X.binder==="input"?$[X.name]:await this.bind(Z,`the file "${X.name}"`,()=>X.binder(W));if(typeof Y!=="string"||Y==="")throw new P(`"${G}" needs a file for "${X.name}", and this turn has none. Ask the user to attach one.`);V.append(X.name,await W.attachments.file(Y))}return V}async bind(Z,$,H){try{return await H()}catch(W){throw console.error(`[gemi/mcp] Binding ${$} of "${Z.descriptor.name}" failed:`,W),new P(`"${Z.descriptor.name}" failed on the server.`,500)}}}function _Z(Z){if(Z?.kind!=="local")throw Error("McpRegistry: only local callers are implemented. A remote caller needs a bearer-token resolver, which v1 does not have \u2014 and until it does there is no remote surface to call from.")}function OZ(Z,$,H){if(H!=="input"&&typeof H!=="function")throw Error(`${Z}: ${$} must be a function or "input".`)}function oZ(Z){switch(Z){case"GET":return Object.freeze({readOnlyHint:!0});case"DELETE":return Object.freeze({destructiveHint:!0});case"PUT":return Object.freeze({idempotentHint:!0});default:return Object.freeze({})}}function nZ(Z,$,H){let W=H.toJSONSchema(),G={...$??{},type:"object",properties:{...$?.properties??{},...W.properties},required:[...$?.required??[],...W.required??[]],additionalProperties:!1},V=(X)=>{if(typeof X!=="object"||X===null||Array.isArray(X))return{ok:!1,errors:["expected an object"]};let Y=[],C={};if(Z){let I=Z.safeParse(X);if(I.ok===!1)Y.push(...I.errors);else C={...I.value}}let B=H.safeParse(X);if(B.ok===!1)Y.push(...B.errors);else C={...C,...B.value};return Y.length>0?{ok:!1,errors:Y}:{ok:!0,value:C}};return{toJSONSchema:()=>G,safeParse:V,parse(X){let Y=V(X);if(Y.ok===!1)throw Error(Y.errors.join(", "));return Y.value}}}function tZ(Z,$,H){let W=$.modifier==="*"||$.modifier==="+"?H.split("/"):[H];if(W.some((G)=>G==="."||G===".."))throw new P(`"${H}" is not a valid value for "${$.name}" of "${Z}".`);return W.map(encodeURIComponent).join("/")}function AZ(Z,$,H){if(H===void 0||H===null)return;if(Array.isArray(H)){for(let W of H)AZ(Z,$,W);return}Z.append($,typeof H==="object"?JSON.stringify(H):String(H))}function rZ(Z){let $=new URLSearchParams,H=(W,G)=>{if(G===void 0||G===null)return;if(Array.isArray(G)){for(let V of G)H(W,V);return}$.append(W,typeof G==="object"?JSON.stringify(G):String(G))};for(let[W,G]of Object.entries(Z))H(W,G);return $.toString()}async function aZ(Z,$){if($.status>=200&&$.status<300){let W=$.headers.get("Content-Type");if(W&&!sZ.test(W)){let V=(await $.arrayBuffer()).byteLength;return`"${Z}" answered with ${V} bytes of ${W}, which is not shown.`}let G=await $.text();if(G==="")return null;if(G.length>s)return`${G.slice(0,s)}\u2026 [cut at ${s} of ${G.length} characters]`;try{return JSON.parse(G)}catch{return G}}let H=await $.text();if($.status>=400&&$.status<500){let W=H.length>PZ?`${H.slice(0,PZ)}\u2026`:H;throw new P(`"${Z}" was refused with ${$.status}${W?`: ${W}`:"."}`,$.status)}if($.status<500)console.error(`[gemi/mcp] "${Z}" answered ${$.status}${$.headers.get("Location")?` to ${$.headers.get("Location")}`:""}, which a tool call cannot follow.`);throw new P(`"${Z}" failed on the server.`,$.status)}function b(Z,$){let H=Z.get($);if(!H)throw Error(`Missing "${$}" configuration. Route dispatching needs a root router \u2014 declare it in "app/config/route.ts".`);return H}class eZ extends K{register(){this.app.singleton(F,()=>new F(b(this.app.config,"route.api"))),this.app.singleton(T,()=>new T(b(this.app.config,"route.view"))),this.app.singleton(g,()=>new g({api:this.app.make(F),view:this.app.make(T)},{api:b(this.app.config,"route.api"),view:b(this.app.config,"route.view"),domains:this.app.config.get("route.domains")})),this.app.singleton(E,()=>{let Z=this.app.config.get("route.mcp");if(!Z?.router)throw Error('No MCP router is configured. Declare one as `mcp: { router }` in "app/config/route.ts".');return new E(new Z.router,this.app.make(F))})}boot(){if(this.app.make(F),this.app.make(T),this.app.make(g),this.app.config.get("route.mcp"))this.app.make(E)}}
|
|
3
3
|
export{L as Za,xZ as _a,z3 as $a,RZ as ab,jZ as bb,N as cb,x3 as db,VZ as eb,MZ as fb,yZ as gb,Q as hb,gZ as ib,vZ as jb,mZ as kb,hZ as lb,U4 as mb,UZ as nb,cZ as ob,pZ as pb,F4 as qb,CZ as rb,uZ as sb,D4 as tb,BZ as ub,dZ as vb,P as wb,E as xb,eZ as yb};
|
|
4
4
|
|
|
5
5
|
//# debugId=1A66A7243A44937164756E2164756E21
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{h as F,j as w}from"./chunk-
|
|
2
|
+
import{h as F,j as w}from"./chunk-bhzb8e5r.js";import{ia as T,ja as f}from"./chunk-53we503k.js";import"./chunk-zq5m4scz.js";import"./chunk-9a8qz3s7.js";import"./chunk-gvkydx8r.js";import"./chunk-8z37k28d.js";import"./chunk-j0fgc58k.js";import{xf as S}from"./chunk-xqyx8kzr.js";import{Kg as b}from"./chunk-7r78cdyd.js";import"./chunk-t93t317r.js";import{join as v}from"path";import{createServer as l}from"vite";import{join as E}from"path";import{IncomingMessage as k,ServerResponse as q}from"http";import{Socket as d}from"net";function P(J){return J.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
|
|
3
3
|
`).split(`
|
|
4
4
|
`).map((K)=>K.trim()).filter((K)=>K.length>0).join(`
|
|
5
5
|
`).trim()}function D(J){return`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{i as B,j as e}from"./chunk-
|
|
2
|
+
import{i as B,j as e}from"./chunk-bhzb8e5r.js";import{ka as D,oa as I,pa as r}from"./chunk-zq5m4scz.js";import"./chunk-8z37k28d.js";import{ic as c,td as o,ud as P}from"./chunk-7awbkbbx.js";import"./chunk-6rc6yec4.js";import"./chunk-ngq4n2b3.js";import{Re as f,Se as u,Ve as m}from"./chunk-rhe7s1fm.js";import{xf as n}from"./chunk-xqyx8kzr.js";import"./chunk-17nh5gfm.js";import"./chunk-6y62ccam.js";import"./chunk-gzfat1x1.js";import"./chunk-49v5xq8q.js";import"./chunk-ttckhvew.js";import"./chunk-e3fnjj0h.js";import"./chunk-0efykzjy.js";import"./chunk-8r7xhy1g.js";import"./chunk-0808z3mq.js";import{Jg as a}from"./chunk-64z2zt41.js";import{Kg as _}from"./chunk-7r78cdyd.js";import"./chunk-t93t317r.js";import{join as M,resolve as yJ,sep as vJ}from"path";import{Duplex as KJ}from"stream";import{constants as L,createBrotliCompress as OJ,createGzip as YJ}from"zlib";var UJ=["br","gzip"],xJ=1024,VJ=5,IJ=19,CJ=6;function LJ(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 AJ(J){if(J===null||J===void 0)return null;let $=new Map;for(let X of J.split(",")){let[Z,...Q]=X.split(";"),W=Z.trim().toLowerCase();if(W==="")continue;let j=1;for(let G of Q){let Y=G.indexOf("=");if(Y===-1)continue;if(G.slice(0,Y).trim().toLowerCase()==="q"){j=LJ(G.slice(Y+1));break}}$.set(W,j)}return $}function PJ(J,$=UJ){let X=AJ(J);if(!X)return null;let Z=X.get("*"),Q=null,W=0;for(let j of $){let G=X.get(j)??Z??0;if(G>W)Q=j,W=G}return Q}function _J(J,$){if(!J)return!1;return J.split(",").some((X)=>X.trim().toLowerCase().split("=")[0].trim()===$)}function SJ(J,$){if(J==="HEAD")return!1;if(!$.body)return!1;if($.status<200||$.status===204||$.status===206||$.status===304)return!1;if($.headers.has("Content-Range"))return!1;let X=$.headers.get("Content-Type");if(!X||!/^\s*text\/html\s*(;|$)/i.test(X))return!1;let Z=$.headers.get("Content-Encoding");if(Z&&Z.trim().toLowerCase()!=="identity")return!1;if(_J($.headers.get("Cache-Control"),"no-transform"))return!1;let Q=$.headers.get("Content-Length");if(Q!==null&&Number(Q)<xJ)return!1;return!0}function TJ(J){let $=J==="br"?OJ({params:{[L.BROTLI_PARAM_QUALITY]:VJ,[L.BROTLI_PARAM_LGWIN]:IJ},flush:L.BROTLI_OPERATION_FLUSH}):YJ({level:CJ,flush:L.Z_SYNC_FLUSH});return KJ.toWeb($)}function DJ(J){let $=J.get("Vary");if(!$){J.set("Vary","Accept-Encoding");return}let X=$.split(",").map((Z)=>Z.trim().toLowerCase());if(X.includes("*")||X.includes("accept-encoding"))return;J.append("Vary","Accept-Encoding")}function g(J,$){if(!SJ(J.method,$))return $;let X=new Headers($.headers);DJ(X);let Z=PJ(J.headers.get("Accept-Encoding"));if(!Z)return new Response($.body,{status:$.status,statusText:$.statusText,headers:X});let Q;try{Q=TJ(Z)}catch{return new Response($.body,{status:$.status,statusText:$.statusText,headers:X})}return X.set("Content-Encoding",Z),X.delete("Content-Length"),new Response($.body.pipeThrough(Q),{status:$.status,statusText:$.statusText,headers:X})}import{readdir as FJ,stat as NJ}from"fs/promises";import{join as BJ}from"path";function w(J){let $=J.toString(),X=new Bun.CryptoHasher("sha1");return X.update($),X.digest("hex")}async function h(J){let $=new Set;async function X(Z,Q){let W;try{W=await FJ(Z,{withFileTypes:!0})}catch{return}for(let j of W){if(j.name.startsWith("."))continue;if(Q&&j.name==="assets")continue;let G=BJ(Z,j.name),Y=j.isDirectory(),V=j.isFile();if(j.isSymbolicLink())try{let C=await NJ(G);Y=C.isDirectory(),V=C.isFile()}catch{continue}if(V)$.add(G);else if(Y&&!j.isSymbolicLink())await X(G,!1)}}return await X(J,!0),$}var bJ="public, max-age=31536000, must-revalidate";function p(J,$){let X=Bun.file($),Z=X.size,Q=w(X.lastModified),W={"Content-Type":X.type||"application/octet-stream","Cache-Control":bJ,"Accept-Ranges":"bytes",ETag:Q},j=f(J.headers.get("Range"));if(j){let G=u(j,Z);if(!G)return c(Z);return new Response(X.slice(G.start,G.end+1).stream(),{status:206,headers:{...W,"Content-Range":m(G.start,G.end,Z),"Content-Length":String(G.length)}})}return new Response(X.stream(),{headers:{...W,"Content-Length":String(Z)}})}import{stat as EJ}from"fs/promises";var A="app/client.tsx";function d(J,$=D){let X=J[A]?.file;if(!X)return;return{module:I(X,$),preload:F(J,A,$)}}function F(J,$,X=D){let Z=[],Q=new Set,W=(j)=>{if(Q.has(j))return;Q.add(j);let G=J[j];if(!G?.file)return;Z.push(I(G.file,X));for(let Y of G.imports??[])W(Y)};return W($),Z}function l(J,$=30000){let X=JSON.stringify("gemi:chunk-reload"),Z=JSON.stringify(`Failed to fetch dynamically imported module: ${J}`);return`var r=!1;try{var s=window.sessionStorage,m=JSON.parse(s.getItem(${X})||"null");var d=m?Date.now()-m.at:NaN;if(navigator.onLine!==!1&&!(d>=0&&d<${$})){s.setItem(${X},JSON.stringify({url:window.location.href,at:Date.now()}));r=!0}}catch(e){}if(r)window.location.reload();else throw new Error(${Z});export {}`}var MJ=new RegExp(`^${o}/.+\\.m?js$`);function qJ(J){return MJ.test(J)}function i(J){if(qJ(J))return new Response(l(J),{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store"}});if(P(J))return new Response("Not found",{status:404});return}var RJ=`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8" />
|
package/dist/facades/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Lc as c,Mc as d,Nc as f,Oc as g,Pc as i,Qc as j,Rc as k,Sc as l,ed as m,fd as n,gd as o,nc as a}from"../chunk-
|
|
2
|
+
import{Lc as c,Mc as d,Nc as f,Oc as g,Pc as i,Qc as j,Rc as k,Sc as l,ed as m,fd as n,gd as o,nc as a}from"../chunk-7awbkbbx.js";import"../chunk-6rc6yec4.js";import"../chunk-ngq4n2b3.js";import{hf as b,pf as e,rf as h}from"../chunk-rhe7s1fm.js";import"../chunk-xqyx8kzr.js";import"../chunk-17nh5gfm.js";import"../chunk-6y62ccam.js";import"../chunk-gzfat1x1.js";import"../chunk-49v5xq8q.js";import"../chunk-ttckhvew.js";import"../chunk-e3fnjj0h.js";import"../chunk-0efykzjy.js";import"../chunk-8r7xhy1g.js";import"../chunk-0808z3mq.js";import"../chunk-64z2zt41.js";import"../chunk-7r78cdyd.js";import"../chunk-t93t317r.js";export{g as Url,e as Storage,k as Redis,a as Redirect,l as RateLimiter,f as Query,i as Meta,h as Log,d as Lang,m as Features,b as Facade,o as DB,j as Cookie,n as ConnectionQueries,c as Auth};
|
|
3
3
|
|
|
4
4
|
//# debugId=171C98A5E8C767DE64756E2164756E21
|
package/dist/http/ApiRouter.d.ts
CHANGED
|
@@ -95,11 +95,22 @@ export declare class StreamHandler {
|
|
|
95
95
|
*/
|
|
96
96
|
middleware: (middlewareList: string[]) => StreamHandler;
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* A verb map: several methods on one path.
|
|
100
|
+
*
|
|
101
|
+
* `get` also takes `this.stream(...)` and `this.file(...)`, so a path can
|
|
102
|
+
* serve its bytes and accept writes — `{ get: this.stream(...), delete:
|
|
103
|
+
* this.delete(...) }` (#707). Neither is a `RouteHandler` at the type level,
|
|
104
|
+
* so `RouteHandlersParser` drops that `GET` from the RPC types and keeps the
|
|
105
|
+
* other verbs, the same way a stream or file route on its own path is left
|
|
106
|
+
* out. `createFlatApiRoutes` gives a stream `get` its `HEAD` as well.
|
|
107
|
+
*/
|
|
98
108
|
export type RouteHandlers = Partial<{
|
|
99
109
|
post: RouteHandler<"POST", any, any, any>;
|
|
100
|
-
get: RouteHandler<"GET", any, any, any
|
|
110
|
+
get: RouteHandler<"GET", any, any, any> | StreamHandler | FileHandler;
|
|
101
111
|
delete: RouteHandler<"DELETE", any, any, any>;
|
|
102
112
|
put: RouteHandler<"PUT", any, any, any>;
|
|
113
|
+
patch: RouteHandler<"PATCH", any, any, any>;
|
|
103
114
|
}>;
|
|
104
115
|
export type ApiRoutes = Record<string, RouteHandler<any, any, any, any> | FileHandler | StreamHandler | ProxyHandler | RouteHandlers | typeof ApiRouter | ResourceRoutes<any> | AgentRoute<any>>;
|
|
105
116
|
export type ResourceRoutes<T extends new () => ResourceController> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiRouter.d.ts","sourceRoot":"","sources":["../../http/ApiRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,i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,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,GAC3D,CAAC,CAAC,CAAC,CAAC,SAAS,cAAc,CAAC,GAAG,CAAC,GAC9B,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GACxD,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAC3C,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GACtD,CAAC,CAAC,CAAC,CAAC,SAAS,UAAU,SAAS,GAC9B,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GACxD,CAAC,CAAC,CAAC,CAAC,SAAS,aAAa,GACxB,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,GACjF,KAAK,GACf,KAAK,CAAC;AAEV,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,SAAS,WAAW,GAAG,EAAE,IAAI,mBAAmB,CAC/F,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CACjC,CAAC"}
|
package/dist/http/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ac as G,Ed as H,Fd as I,Gd as J,Hd as K,Id as L,Jd as M,hc as n,ic as o,jc as p,kc as v,lc as w,mc as x,oc as y,pc as z,qc as A,rc as B,sc as C,tc as D,yc as E,zc as F}from"../chunk-
|
|
2
|
+
import{Ac as G,Ed as H,Fd as I,Gd as J,Hd as K,Id as L,Jd as M,hc as n,ic as o,jc as p,kc as v,lc as w,mc as x,oc as y,pc as z,qc as A,rc as B,sc as C,tc as D,yc as E,zc as F}from"../chunk-7awbkbbx.js";import"../chunk-6rc6yec4.js";import"../chunk-ngq4n2b3.js";import{$e as k,Le as a,Me as b,Ne as d,Re as e,Se as f,Te as g,Ue as h,Ve as i,We as j,af as l,bf as m,cf as q,df as r,ef as s,ff as t,gf as u}from"../chunk-rhe7s1fm.js";import{vf as c}from"../chunk-xqyx8kzr.js";import"../chunk-17nh5gfm.js";import"../chunk-6y62ccam.js";import"../chunk-gzfat1x1.js";import"../chunk-49v5xq8q.js";import"../chunk-ttckhvew.js";import"../chunk-e3fnjj0h.js";import"../chunk-0efykzjy.js";import"../chunk-8r7xhy1g.js";import"../chunk-0808z3mq.js";import"../chunk-64z2zt41.js";import"../chunk-7r78cdyd.js";import"../chunk-t93t317r.js";export{g as toRangeHeaderValue,n as toMiddlewareList,f as resolveRange,e as parseRangeHeader,h as parseContentRange,D as middlewareConfigDefaults,d as getCookies,j as formatUnsatisfiedContentRange,i as formatContentRange,C as defineMiddlewareConfig,o as createUnsatisfiableResponse,p as createStreamResponse,z as createFileResponse,G as clientIp,A as ViewRouter,k as ValidationError,b as ResourceController,c as RequestBreakerError,F as RateLimitMiddleware,E as RateLimitExceededError,s as RangeNotSatisfiableError,L as PoliciesServiceProvider,M as Policies,B as Middleware,x as McpRouter,w as McpRouteDeclaration,l as InvalidValidationRuleError,r as InsufficientPermissionsError,y as HttpResponse,m as HttpRequest,t as FileNotFoundError,J as CorsMiddleware,a as Controller,I as CacheMiddleware,K as CSRFMiddleware,q as AuthorizationError,H as AuthenticationMiddleware,u as AuthenticationError,v as ApiRouter};
|
|
3
3
|
|
|
4
4
|
//# debugId=570373B8D6B7C75B64756E2164756E21
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{aa as R}from"../chunk-6tt3ynm7.js";import"../chunk-9a8qz3s7.js";import{Wa as L}from"../chunk-3w65ra1s.js";import{ec as E,fc as V}from"../chunk-q6ydpt33.js";import"../chunk-bsbn7qtd.js";import{Mc as j}from"../chunk-
|
|
2
|
+
import{aa as R}from"../chunk-6tt3ynm7.js";import"../chunk-9a8qz3s7.js";import{Wa as L}from"../chunk-3w65ra1s.js";import{ec as E,fc as V}from"../chunk-q6ydpt33.js";import"../chunk-bsbn7qtd.js";import{Mc as j}from"../chunk-7awbkbbx.js";import"../chunk-6rc6yec4.js";import"../chunk-ngq4n2b3.js";import"../chunk-rhe7s1fm.js";import"../chunk-xqyx8kzr.js";import"../chunk-17nh5gfm.js";import"../chunk-6y62ccam.js";import"../chunk-gzfat1x1.js";import"../chunk-49v5xq8q.js";import"../chunk-ttckhvew.js";import{tg as X}from"../chunk-e3fnjj0h.js";import"../chunk-0efykzjy.js";import"../chunk-8r7xhy1g.js";import"../chunk-0808z3mq.js";import"../chunk-64z2zt41.js";import"../chunk-7r78cdyd.js";import"../chunk-t93t317r.js";import{createElement as J,Fragment as M,isValidElement as U}from"react";function $(q,B){let G=Object.values(B).some((z)=>typeof z==="function"&&U(z(""))),Q=/{{([^{}]+?)(?::([^{}\[\]]+?))?(?:\[(.*?)\])?}}/g;if(!G)return q.replace(Q,(W,O,_,Z)=>{let C=O.includes(":")?O.split(":")[0]:O,H=B[C];if(H===void 0)return W;if(typeof H==="function"){let K=H(Z!==void 0?Z:"");if(U(K))throw Error("JSX returned in string context");return String(K)}if(_)switch(_.toLowerCase()){case"number":return Number(H).toString();case"string":return String(H);case"boolean":return Boolean(H).toString();default:return String(H)}return String(H)});else{let z=[],W=0,O=null;while((O=Q.exec(q))!==null){let[_,Z,C,H]=O,F=O.index,K=Z.includes(":")?Z.split(":")[0]:Z;if(F>W)z.push(q.substring(W,F));let Y=B[K];if(Y===void 0)z.push(_);else if(typeof Y==="function"){let A=Y(H!==void 0?H:"");z.push(A)}else if(C)switch(C.toLowerCase()){case"number":z.push(Number(Y).toString());break;case"string":z.push(String(Y));break;case"boolean":z.push(Boolean(Y).toString());break;default:z.push(String(Y))}else z.push(String(Y));W=F+_.length}if(W<q.length)z.push(q.substring(W));return J(M,{},...z)}}class P{name;dictionary;constructor(q,B){this.name=q;this.dictionary=B}reference(q){if(typeof window<"u")throw Error("Cannot use reference in the browser");if(!this.dictionary?.[q])throw Error(`Translation not found for ${String(q)}`);return this.dictionary[q]}render(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B[0]};if(typeof window<"u")throw Error("Cannot use render in the browser");if(!this.dictionary?.[q]?.[G])throw Error(`Translation not found for ${String(q)} in ${String(G)}`);return $(this.dictionary[q][G],Q??{})}static create(q,B){return new P(q,B)}static text(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B?.[0]};if(!q?.[G])throw Error(`Translation not found for ${String(G)}`);return $(q[G],Q??{})}}async function N(q,B,...G){let{locale:Q=j.locale(),params:z}={params:{},...G[0]},O=(await q.load(String(Q)))[B];if(typeof O!=="string")throw Error(`Translation not found for "${B}" in "${String(Q)}" (dictionary ${q.id})`);return $(O,z??{})}export{V as translationConfigDefaults,N as translate,E as defineTranslationConfig,R as defineDictionary,X as Translator,L as TranslationServiceProvider,P as Dictionary};
|
|
3
3
|
|
|
4
4
|
//# debugId=0BBC27BE04B30FAD64756E2164756E21
|
package/dist/kernel/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ya as y}from"../chunk-r1sj312m.js";import{Va as i}from"../chunk-ak3yy4za.js";import{Wa as g}from"../chunk-3w65ra1s.js";import{$a as e,Za as T,_a as D,ab as A,bb as w,fb as P,gb as S,ib as h,jb as R,kb as u,lb as l,ob as v,pb as d,sb as c,vb as p,yb as n}from"../chunk-
|
|
2
|
+
import{ya as y}from"../chunk-r1sj312m.js";import{Va as i}from"../chunk-ak3yy4za.js";import{Wa as g}from"../chunk-3w65ra1s.js";import{$a as e,Za as T,_a as D,ab as A,bb as w,fb as P,gb as S,ib as h,jb as R,kb as u,lb as l,ob as v,pb as d,sb as c,vb as p,yb as n}from"../chunk-d1zt6sfj.js";import"../chunk-4v4v5wkh.js";import"../chunk-56p9a7nx.js";import{$b as r}from"../chunk-6dyt8w27.js";import"../chunk-q6ydpt33.js";import"../chunk-bsbn7qtd.js";import{Ad as Q,Bd as t,Cd as o,Fc as Zj,Gc as $j,Jc as Gj,Kc as Hj,md as x,rd as I,sd as E,vd as K,wd as M,xd as s,yd as C,zd as m}from"../chunk-7awbkbbx.js";import{Nd as a}from"../chunk-6rc6yec4.js";import{_d as V,de as f}from"../chunk-ngq4n2b3.js";import{bf as F}from"../chunk-rhe7s1fm.js";import{uf as B}from"../chunk-xqyx8kzr.js";import{Af as L}from"../chunk-17nh5gfm.js";import"../chunk-6y62ccam.js";import"../chunk-gzfat1x1.js";import"../chunk-49v5xq8q.js";import"../chunk-ttckhvew.js";import"../chunk-yc3n6zhr.js";import"../chunk-e3fnjj0h.js";import{vg as N,wg as b}from"../chunk-0efykzjy.js";import{xg as _}from"../chunk-8r7xhy1g.js";import"../chunk-0808z3mq.js";import"../chunk-8y08amzz.js";import"../chunk-64z2zt41.js";import{Kg as q}from"../chunk-7r78cdyd.js";import"../chunk-t93t317r.js";function Jj(j){let X=j.headers.get("Cache-Control")?.toLowerCase()??"";return/(^|[\s,])(public|s-maxage)\b/.test(X)}var Wj=new Set,Xj={refusal:null,apply:(j)=>j,carried:null};async function k(j){let X=b(x);if(X.config.global.length===0)return Xj;let{pathname:Z}=new URL(j.url),W=q(Z),z=new F(j,{},W?"api":"view","");return await L.run(z,async()=>{let $=L.getStore(),{headers:H,cookies:zj}=$,Y=(J)=>{if(!Jj(J))return Q(J,H,zj);let G=new Headers(H);return G.delete("Set-Cookie"),Q(J,G,Wj)};try{return await X.runGlobalMiddleware(),{refusal:null,apply:Y,carried:{user:$.user}}}catch(J){let G=!W&&Z.endsWith(".json");if(J?.kind===B){let O=W?m(J.payload.api):G?M(J.payload.viewData??J.payload.api):K(J.payload.view);return{refusal:Y(O),apply:Y,carried:null}}if(V(J)&&(W||G))return{refusal:Y(C()),apply:Y,carried:null};if(f(J)){console.error(J);let O=W||G?I():K(E());return{refusal:Y(O),apply:Y,carried:null}}throw J}finally{$.destroy()}})}var U=[l,d,y,P,n,A,S,v,R,D,h,p,u,g,c,w];class jj{config={};providers=[];services=[];serviceInstances=[];serviceTokens=new Set;servicesBooted=!1;models=[];app=new N;boot(){if(this.models.length>0)i(...this.models);else Yj();this.app.config.merge(this.config),N.setInstance(this.app),this.app.registerMany([...U,...this.providers]),this.registerServices()}registerServices(){let j=this.serviceTokens;this.serviceInstances=[],this.serviceTokens=new Set,this.servicesBooted=!1;let X=new Map;for(let Z of this.services){let W=typeof Z==="function"?new Z:Z,z=W.constructor;if(!z.token)throw Error(`Service [${z.name}] is listed in \`services\` but does not declare a \`static token\`.`);let $=X.get(z.token);if($)throw Error(`Services [${$}] and [${z.name}] both declare the token "${z.token}". Tokens are the container's keys, so they must be unique.`);X.set(z.token,z.name);let H=z;if(!j.has(z.token)&&this.app.bound(H))throw Error(`Service [${z.name}] declares the token "${z.token}", which is already bound in the container by the framework or a provider. Binding it would replace that service everywhere, so pick a token nothing else owns.`);this.app.instance(H,W),this.serviceInstances.push(W),this.serviceTokens.add(z.token)}}async waitForBoot(){await this.app.boot(),await this.bootServices(),e(this.app)}async bootServices(){if(this.servicesBooted)return;for(let j of this.serviceInstances)await j.boot();this.servicesBooted=!0}shutdown(j){return this.run(()=>this.app.shutdown(j))}run(j){return _.run(this.app,j)}resolve(j){return this.app.make(j)}apiRoutes(){return this.app.make(t)}viewRoutes(){return this.app.make(s)}domains(){return this.app.make(o)}queue(){return this.app.make(r)}globalMiddleware(j){return k(j)}destroy(){if(this.app.resolved(T))this.app.make(T).stop();if(this.app.flush(),N.getInstance()===this.app)N.setInstance(void 0);_.disable()}}function Yj(){if(Bun.env.NODE_ENV==="production")return;let j=a();if(j.length===0)return;console.warn(`[gemi] ${j.length} model${j.length===1?" is":"s are"} registered, but Kernel.models is empty.
|
|
3
3
|
Nested relation reads resolve a model by name, so a policy on a subclass that does not own its
|
|
4
4
|
`+" name is skipped inside every include \u2014 scoped at the root, "+`unscoped in an include, with nothing
|
|
5
5
|
to notice it. Declaring the modules registers each class under its own name and audits the set:
|
package/dist/server/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{wa as I}from"../chunk-8z37k28d.js";import{xa as A}from"../chunk-j0fgc58k.js";import{Ag as b,Cg as V,Dg as H,Eg as O,Fg as W}from"../chunk-8y08amzz.js";import{Jg as k}from"../chunk-64z2zt41.js";import"../chunk-7r78cdyd.js";import{Qg as $}from"../chunk-t93t317r.js";var X=Symbol.for("gemi.server.devGeneration"),L={graceMs:1e4,providerTimeoutMs:5000};class Q{app;inFlight=0;waiters=new Set;constructor(z){this.app=z}track(z){return async(B,J)=>{this.inFlight++;try{return await z(B,J)}finally{if(this.inFlight--,this.inFlight===0)this.wake()}}}get pending(){return this.inFlight}async retire({graceMs:z,providerTimeoutMs:B}){try{await this.idle(z),await Promise.resolve().then(()=>this.app.shutdown({timeoutMs:B}))}catch(J){Z(J)}}idle(z){if(this.inFlight===0)return Promise.resolve();return new Promise((B)=>{let J=()=>{clearTimeout(K),this.waiters.delete(J),B()},K=setTimeout(J,z);this.waiters.add(J)})}wake(){for(let z of this.waiters)z()}}function Y(z,B=L){let J=globalThis,K=J[X];if(J[X]=z,!K||K===z||typeof K.retire!=="function")return Promise.resolve();let _=K.retire.bind(K);return Promise.resolve().then(()=>_(B)).catch(Z)}function Z(z){console.error("[gemi] Shutting down the application a reload replaced failed:",z)}class P{app;instrumentation;handleSignals;server;stopping;settings;constructor(z){this.app=new A({kernel:z.kernel}),this.handleSignals=z.handleSignals??!0,this.instrumentation=O(z.instrumentation??((B,J)=>J(B)))}async start(){process.env.ROOT_DIR=k();let z=Bun.env.NODE_ENV==="production";if(z){if(this.handleSignals)W(()=>this.stop());this.settings=V()}try{await this.app.waitForBoot()}catch(B){if(!z)this.app.shutdown({timeoutMs:L.providerTimeoutMs});throw B}if(z){let{httpProd:B}=await import("../chunk-
|
|
2
|
+
import{wa as I}from"../chunk-8z37k28d.js";import{xa as A}from"../chunk-j0fgc58k.js";import{Ag as b,Cg as V,Dg as H,Eg as O,Fg as W}from"../chunk-8y08amzz.js";import{Jg as k}from"../chunk-64z2zt41.js";import"../chunk-7r78cdyd.js";import{Qg as $}from"../chunk-t93t317r.js";var X=Symbol.for("gemi.server.devGeneration"),L={graceMs:1e4,providerTimeoutMs:5000};class Q{app;inFlight=0;waiters=new Set;constructor(z){this.app=z}track(z){return async(B,J)=>{this.inFlight++;try{return await z(B,J)}finally{if(this.inFlight--,this.inFlight===0)this.wake()}}}get pending(){return this.inFlight}async retire({graceMs:z,providerTimeoutMs:B}){try{await this.idle(z),await Promise.resolve().then(()=>this.app.shutdown({timeoutMs:B}))}catch(J){Z(J)}}idle(z){if(this.inFlight===0)return Promise.resolve();return new Promise((B)=>{let J=()=>{clearTimeout(K),this.waiters.delete(J),B()},K=setTimeout(J,z);this.waiters.add(J)})}wake(){for(let z of this.waiters)z()}}function Y(z,B=L){let J=globalThis,K=J[X];if(J[X]=z,!K||K===z||typeof K.retire!=="function")return Promise.resolve();let _=K.retire.bind(K);return Promise.resolve().then(()=>_(B)).catch(Z)}function Z(z){console.error("[gemi] Shutting down the application a reload replaced failed:",z)}class P{app;instrumentation;handleSignals;server;stopping;settings;constructor(z){this.app=new A({kernel:z.kernel}),this.handleSignals=z.handleSignals??!0,this.instrumentation=O(z.instrumentation??((B,J)=>J(B)))}async start(){process.env.ROOT_DIR=k();let z=Bun.env.NODE_ENV==="production";if(z){if(this.handleSignals)W(()=>this.stop());this.settings=V()}try{await this.app.waitForBoot()}catch(B){if(!z)this.app.shutdown({timeoutMs:L.providerTimeoutMs});throw B}if(z){let{httpProd:B}=await import("../chunk-x5ajfnrx.js");this.server=await B(this.app,this.instrumentation.bind(this))}else{I();let{httpDev:B}=await import("../chunk-q77qf42t.js"),J=new Q(this.app);this.server=await B(this.app,J.track(this.instrumentation.bind(this))),Y(J)}return this.server}stop(z={}){return this.stopping??=H({server:this.server,shutdownProviders:(B)=>this.app.shutdown(B),settings:{...this.settings??V(),...z}}),this.stopping}}export{b as isShuttingDown,P as Server};
|
|
3
3
|
|
|
4
4
|
//# debugId=022DFD6ABEEFE6C464756E2164756E21
|
package/dist/services/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ya as gW}from"../chunk-zytmxty5.js";import{Za as d6,_a as xW,ab as MW,bb as LW,cb as DW,db as FW,eb as OW,fb as HW,gb as UW,hb as U,ib as SW,jb as fW,kb as RW,lb as kW,mb as _W,nb as CW,ob as vW,pb as bW,qb as IW,rb as TW,sb as qW,tb as hW,ub as PW,vb as wW,wb as AW,xb as yW,yb as VW}from"../chunk-
|
|
2
|
+
import{Ya as gW}from"../chunk-zytmxty5.js";import{Za as d6,_a as xW,ab as MW,bb as LW,cb as DW,db as FW,eb as OW,fb as HW,gb as UW,hb as U,ib as SW,jb as fW,kb as RW,lb as kW,mb as _W,nb as CW,ob as vW,pb as bW,qb as IW,rb as TW,sb as qW,tb as hW,ub as PW,vb as wW,wb as AW,xb as yW,yb as VW}from"../chunk-d1zt6sfj.js";import"../chunk-4v4v5wkh.js";import{Hb as s6,Ib as a6,Jb as t6,Kb as r6,Lb as e6,Mb as WW,Nb as YW,Ob as JW,Pb as ZW,Qb as GW,Rb as $W,Sb as QW,Tb as KW,Ub as XW,Vb as zW,Wb as BW}from"../chunk-56p9a7nx.js";import{$b as o6,Xb as p6,Yb as l6,Zb as n6,_b as i6}from"../chunk-6dyt8w27.js";import{ec as jW,fc as NW}from"../chunk-q6ydpt33.js";import"../chunk-bsbn7qtd.js";import{$c as U6,Bc as s4,Bd as y6,Cc as a4,Dc as g1,Dd as V6,Ec as $6,Hc as Q6,Ic as K6,Tc as j6,Uc as N6,Vc as L6,Wc as D6,Xc as F6,Yc as O6,Zc as H6,_c as d4,ad as S6,bd as f6,cd as R6,dd as k6,hd as _6,id as C6,jd as v6,kd as b6,ld as I6,md as T6,nc as b0,nd as q6,od as h6,pd as P6,qd as w6,sc as e0,tc as W6,uc as Y6,vc as J6,wc as Z6,xc as G6,xd as A6}from"../chunk-7awbkbbx.js";import"../chunk-6rc6yec4.js";import"../chunk-ngq4n2b3.js";import{Se as V1,Te as A1,Ue as Y1,ef as g,ff as w,jf as J1,kf as L1,lf as X6,mf as z6,nf as B6,of as x6,qf as M6,sf as D1}from"../chunk-rhe7s1fm.js";import"../chunk-xqyx8kzr.js";import"../chunk-17nh5gfm.js";import"../chunk-6y62ccam.js";import"../chunk-gzfat1x1.js";import"../chunk-49v5xq8q.js";import"../chunk-ttckhvew.js";import{ng as g6,og as c6,pg as E6,qg as m6,rg as u6}from"../chunk-yc3n6zhr.js";import"../chunk-e3fnjj0h.js";import{wg as c}from"../chunk-0efykzjy.js";import"../chunk-8r7xhy1g.js";import"../chunk-0808z3mq.js";import"../chunk-8y08amzz.js";import"../chunk-64z2zt41.js";import"../chunk-7r78cdyd.js";import{Qg as l4}from"../chunk-t93t317r.js";import{Buffer as p4}from"buffer";class n4 extends J1{client;config;constructor(...W){super();this.config=W}async connect(){let W=await import("../chunk-523t3bcz.js");return this.client??=new W.S3Client(...this.config),{sdk:W,client:this.client}}async put(W,{signal:Y}={}){Y?.throwIfAborted();let J,Z,G,$=process.env.BUCKET_NAME;if(W instanceof Blob)J=W,G=`${Bun.randomUUIDv7()}.${W.type.split("/")[1].split(";")[0]}`,Z=W.type;else J=W.body,G=W.name,$=W.bucket??$,Z=W.contentType||(J instanceof Blob||J instanceof File?J.type:void 0);Z=Z||void 0;let Q=J instanceof p4?J:J instanceof Blob||J instanceof File?p4.from(await J.arrayBuffer()):"",{sdk:K,client:z}=await this.connect();return Y?.throwIfAborted(),await z.send(new K.PutObjectCommand({Bucket:$,Key:G,Body:Q,ContentType:Z}),{abortSignal:Y}),G}async delete(W){let Y=typeof W==="string"?W:W.name,J=(typeof W==="string"?void 0:W.bucket)??process.env.BUCKET_NAME;if(!Y)throw Error("Object name has to be specified");let{sdk:Z,client:G}=await this.connect();try{await G.send(new Z.DeleteObjectCommand({Bucket:J,Key:Y}))}catch($){if($?.name==="NoSuchKey"||$?.$metadata?.httpStatusCode===404)return;throw $}}async list(W){let{sdk:Y,client:J}=await this.connect();return await J.send(new Y.ListObjectsV2Command({Bucket:process.env.BUCKET_NAME,Prefix:W}))}async fetch(W,{signal:Y}={}){Y?.throwIfAborted();let J=process.env.BUCKET_NAME,Z;if(typeof W==="string")Z=W;else J=W.bucket??J,Z=W.name;if(!Z)throw Error("Object name has to be specified");let{sdk:G,client:$}=await this.connect();Y?.throwIfAborted();let Q=await $.send(new G.GetObjectCommand({Bucket:J,Key:Z}),{abortSignal:Y}),K=L1(Q.Body.transformToWebStream(),Y);return Y?.throwIfAborted(),new Response(K,{headers:{"Content-Type":Q.ContentType,"Content-Length":Q.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":Q.LastModified?.toUTCString()||"",ETag:Q.ETag||""}})}async read(W){let Y=typeof W==="string"?{name:W}:W,J=Y.bucket??process.env.BUCKET_NAME,{name:Z,range:G=null}=Y;if(!Z)throw Error("Object name has to be specified");let{sdk:$,client:Q}=await this.connect(),K;try{K=await Q.send(new $.GetObjectCommand({Bucket:J,Key:Z,Range:G?A1(G):void 0}))}catch(M){if(M?.name==="InvalidRange"||M?.$metadata?.httpStatusCode===416)throw new g(await this.size({name:Z,bucket:J}));if(M?.name==="NoSuchKey"||M?.$metadata?.httpStatusCode===404)throw new w(Z);throw M}let z=Y1(K.ContentRange),X=Boolean(z)&&K.$metadata?.httpStatusCode===206,x=z?.total??K.ContentLength??0;return{body:K.Body.transformToWebStream(),start:z?.start??0,end:z?.end??x-1,total:x,partial:X,type:K.ContentType??"application/octet-stream",etag:K.ETag||void 0,lastModified:K.LastModified,name:Z}}async size(W){let Y=typeof W==="string"?W:W.name,J=(typeof W==="string"?void 0:W.bucket)??process.env.BUCKET_NAME,{sdk:Z,client:G}=await this.connect();try{return(await G.send(new Z.HeadObjectCommand({Bucket:J,Key:Y}))).ContentLength??0}catch($){if($?.name==="NotFound"||$?.$metadata?.httpStatusCode===404)throw new w(Y);throw $}}}import{Buffer as i4}from"buffer";import{Readable as q0}from"stream";function y1(W){return W?.statusCode===404||W?.details?.errorCode==="BlobNotFound"||W?.code==="BlobNotFound"}function h0(W){return W?.statusCode===416||W?.details?.errorCode==="InvalidRange"||W?.code==="InvalidRange"}class o4 extends J1{config;serviceClientPromise=null;constructor(W={}){super();this.config=W}async serviceClient(){if(this.config.serviceClient)return this.config.serviceClient;return this.serviceClientPromise??=(async()=>{let W;try{W=await import("@azure/storage-blob")}catch{throw Error("AzureBlobDriver requires the '@azure/storage-blob' package. Install it with `bun add @azure/storage-blob`, or pass a pre-built `serviceClient`.")}let Y=this.config.connectionString??process.env.AZURE_STORAGE_CONNECTION_STRING;if(this.config.url)return new W.BlobServiceClient(this.config.url,this.config.credential);if(Y)return W.BlobServiceClient.fromConnectionString(Y);throw Error("AzureBlobDriver needs a connection string (AZURE_STORAGE_CONNECTION_STRING), a `url`, or a `serviceClient`.")})(),this.serviceClientPromise}async blob(W,Y){if(!W)throw Error("Object name has to be specified");let J=Y??this.config.container??process.env.BUCKET_NAME;if(!J)throw Error("AzureBlobDriver needs a container name, from `bucket`, the `container` config, or BUCKET_NAME.");return(await this.serviceClient()).getContainerClient(J).getBlockBlobClient(W)}async put(W,{signal:Y}={}){Y?.throwIfAborted();let J,Z,G,$;if(W instanceof Blob)J=W,G=`${Bun.randomUUIDv7()}.${W.type.split("/")[1].split(";")[0]}`,Z=W.type;else J=W.body,G=W.name,$=W.bucket,Z=W.contentType??(J instanceof Blob||J instanceof File?J.type:void 0);let Q=J instanceof i4?J:i4.from(await J.arrayBuffer()),K=await this.blob(G,$);return Y?.throwIfAborted(),await K.uploadData(Q,{blobHTTPHeaders:Z?{blobContentType:Z}:void 0,abortSignal:Y}),G}async list(W){let Y=this.config.container??process.env.BUCKET_NAME,Z=(await this.serviceClient()).getContainerClient(Y),G=[];for await(let $ of Z.listBlobsFlat({prefix:W}))G.push($.name);return G}async fetch(W,{signal:Y}={}){Y?.throwIfAborted();let J=await this.download(typeof W==="string"?{name:W}:{name:W.name,bucket:W.bucket},Y);return new Response(J.body,{headers:{"Content-Type":J.type,"Content-Length":String(J.total),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":J.lastModified?.toUTCString()??"",ETag:J.etag??""}})}async read(W){return this.download(typeof W==="string"?{name:W}:W)}async download(W,Y){let{name:J,bucket:Z,range:G=null}=W,$=await this.blob(J,Z);Y?.throwIfAborted();let Q,K,z=G?.kind==="suffix"||G?.kind==="offset"&&G.end===null&&G.start===0;if(G&&z){let b=await this.size({name:J,bucket:Z}),W1=V1(G,b);if(!W1)throw new g(b);Q=W1.start,K=W1.length}else if(G?.kind==="offset")Q=G.start,K=G.end===null?void 0:G.end-G.start+1;let X;try{X=await $.download(Q,K,Y?{abortSignal:Y}:void 0)}catch(b){if(h0(b))throw new g(await this.size({name:J,bucket:Z}));if(y1(b))throw new w(J);throw b}let x=Y1(X.contentRange),M=Boolean(x),R=x?.total??X.contentLength??0,v=await P0(X);if(v instanceof ReadableStream)v=L1(v,Y);return Y?.throwIfAborted(),{body:v,start:x?.start??0,end:x?.end??R-1,total:R,partial:M,type:X.contentType??"application/octet-stream",etag:X.etag||void 0,lastModified:X.lastModified,name:J}}async size(W){let Y=typeof W==="string"?W:W.name,J=typeof W==="string"?void 0:W.bucket,Z=await this.blob(Y,J);try{return(await Z.getProperties()).contentLength??0}catch(G){if(y1(G))throw new w(Y);throw G}}async delete(W){let Y=typeof W==="string"?W:W.name,J=typeof W==="string"?void 0:W.bucket,Z=await this.blob(Y,J);try{await Z.delete()}catch(G){if(y1(G))return;throw G}}}async function P0(W){if(W.blobBody)return await W.blobBody;if(W.readableStreamBody)return q0.toWeb(W.readableStreamBody);return null}var w0=`
|
|
3
3
|
local currentKey = KEYS[1]
|
|
4
4
|
local previousKey = KEYS[2]
|
|
5
5
|
local limit = tonumber(ARGV[1])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFlatApiRoutes.d.ts","sourceRoot":"","sources":["../../../services/router/createFlatApiRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EACL,KAAK,SAAS,EAMd,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,KAAK,YAAY,GAAG,GAAG,CAAC;AACxB,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,MAAM,EACN,MAAM,CACJ,MAAM,EACN;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,CAAC,MAAM,GAAG,CAAC,UAAU,UAAU,CAAC,GAAG,gBAAgB,CAAC,EAAE,CAAC;IAGnE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CACF,CACF,CAAC;
|
|
1
|
+
{"version":3,"file":"createFlatApiRoutes.d.ts","sourceRoot":"","sources":["../../../services/router/createFlatApiRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EACL,KAAK,SAAS,EAMd,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,KAAK,YAAY,GAAG,GAAG,CAAC;AACxB,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,MAAM,EACN,MAAM,CACJ,MAAM,EACN;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,CAAC,MAAM,GAAG,CAAC,UAAU,UAAU,CAAC,GAAG,gBAAgB,CAAC,EAAE,CAAC;IAGnE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CACF,CACF,CAAC;AA4CF,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,QAAQ,SAAK,EACb,cAAc,GAAE,gBAAgB,EAAE,GAAG,MAAM,EAAO;;cAtDxC,YAAY;oBACN,CAAC,MAAM,GAAG,CAAC,UAAU,UAAU,CAAC,GAAG,gBAAgB,CAAC,EAAE;iBAGzD,WAAW;;EA+JzB"}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|