gemi 0.78.0 → 0.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/ai/Agent.d.ts.map +1 -1
  2. package/dist/ai/Schema.d.ts.map +1 -1
  3. package/dist/ai/index.js +8 -8
  4. package/dist/ai/index.js.map +3 -3
  5. package/dist/{chunk-sw0kvtpt.js → chunk-0vkd0v3b.js} +1 -1
  6. package/dist/chunk-9hbwvcxn.js.map +2 -2
  7. package/dist/{chunk-e8z3nyd5.js → chunk-azebyh90.js} +4 -4
  8. package/dist/{chunk-e8z3nyd5.js.map → chunk-azebyh90.js.map} +3 -3
  9. package/dist/chunk-cg469vsg.js +5 -0
  10. package/dist/{chunk-9z3y20ms.js.map → chunk-cg469vsg.js.map} +3 -3
  11. package/dist/{chunk-tnx6jt4r.js → chunk-hjbe3jn2.js} +2 -2
  12. package/dist/{chunk-tnx6jt4r.js.map → chunk-hjbe3jn2.js.map} +1 -1
  13. package/dist/{chunk-971a8v3v.js → chunk-jvyj4hxd.js} +1 -1
  14. package/dist/chunk-yedycsnk.js +6 -0
  15. package/dist/chunk-yedycsnk.js.map +10 -0
  16. package/dist/chunk-zbhqa2z7.js.map +2 -2
  17. package/dist/database/DatabaseServiceProvider.d.ts +12 -0
  18. package/dist/database/DatabaseServiceProvider.d.ts.map +1 -1
  19. package/dist/database/index.js +1 -1
  20. package/dist/facades/index.js +1 -1
  21. package/dist/http/index.js +1 -1
  22. package/dist/i18n/index.js +1 -1
  23. package/dist/kernel/index.js +1 -1
  24. package/dist/server/Server.d.ts.map +1 -1
  25. package/dist/server/devReload.d.ts +68 -0
  26. package/dist/server/devReload.d.ts.map +1 -0
  27. package/dist/server/index.js +2 -2
  28. package/dist/server/index.js.map +5 -4
  29. package/dist/services/index.js +1 -1
  30. package/dist/services/redis/RedisManager.d.ts +5 -0
  31. package/dist/services/redis/RedisManager.d.ts.map +1 -1
  32. package/dist/services/redis/RedisServiceProvider.d.ts +6 -0
  33. package/dist/services/redis/RedisServiceProvider.d.ts.map +1 -1
  34. package/dist/support/ServiceProvider.d.ts +6 -0
  35. package/dist/support/ServiceProvider.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-3jyz4378.js +0 -6
  38. package/dist/chunk-3jyz4378.js.map +0 -10
  39. package/dist/chunk-9z3y20ms.js +0 -5
  40. /package/dist/{chunk-sw0kvtpt.js.map → chunk-0vkd0v3b.js.map} +0 -0
  41. /package/dist/{chunk-971a8v3v.js.map → chunk-jvyj4hxd.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{i as k,j as l}from"./chunk-tnx6jt4r.js";import{ka as F,oa as L,pa as c}from"./chunk-zq5m4scz.js";import"./chunk-8z37k28d.js";import{nd as I,rd as E,sd as T}from"./chunk-e8z3nyd5.js";import"./chunk-34s3tfgk.js";import"./chunk-q0nqypca.js";import"./chunk-4h7z32zp.js";import"./chunk-gzs2y282.js";import"./chunk-1712rv0r.js";import"./chunk-bdfdjnht.js";import"./chunk-jcq0tbdv.js";import"./chunk-axxbkm30.js";import"./chunk-qjgfrsw7.js";import"./chunk-989rzqd6.js";import"./chunk-0da5t7vs.js";import"./chunk-fvn78g6k.js";import{Dg as h}from"./chunk-yaz93haz.js";import{Eg as P}from"./chunk-7yhsy039.js";import"./chunk-xzp2ptj5.js";import{join as A,resolve as CJ,sep as IJ}from"path";import{Duplex as JJ}from"stream";import{constants as C,createBrotliCompress as $J,createGzip as XJ}from"zlib";var ZJ=["br","gzip"],zJ=1024,GJ=5,jJ=19,xJ=6;function HJ(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 QJ(J){if(J===null||J===void 0)return null;let $=new Map;for(let X of J.split(",")){let[z,...x]=X.split(";"),W=z.trim().toLowerCase();if(W==="")continue;let Q=1;for(let H of x){let Y=H.indexOf("=");if(Y===-1)continue;if(H.slice(0,Y).trim().toLowerCase()==="q"){Q=HJ(H.slice(Y+1));break}}$.set(W,Q)}return $}function WJ(J,$=ZJ){let X=QJ(J);if(!X)return null;let z=X.get("*"),x=null,W=0;for(let Q of $){let H=X.get(Q)??z??0;if(H>W)x=Q,W=H}return x}function OJ(J,$){if(!J)return!1;return J.split(",").some((X)=>X.trim().toLowerCase().split("=")[0].trim()===$)}function KJ(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(OJ($.headers.get("Cache-Control"),"no-transform"))return!1;let x=$.headers.get("Content-Length");if(x!==null&&Number(x)<zJ)return!1;return!0}function UJ(J){let $=J==="br"?$J({params:{[C.BROTLI_PARAM_QUALITY]:GJ,[C.BROTLI_PARAM_LGWIN]:jJ},flush:C.BROTLI_OPERATION_FLUSH}):XJ({level:xJ,flush:C.Z_SYNC_FLUSH});return JJ.toWeb($)}function YJ(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 q(J,$){if(!KJ(J.method,$))return $;let X=new Headers($.headers);YJ(X);let z=WJ(J.headers.get("Accept-Encoding"));if(!z)return new Response($.body,{status:$.status,statusText:$.statusText,headers:X});let x;try{x=UJ(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(x),{status:$.status,statusText:$.statusText,headers:X})}function v(J){let $=J.toString(),X=new Bun.CryptoHasher("sha1");return X.update($),X.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=I;import{stat as SJ}from"fs/promises";var S="app/client.tsx";function f(J,$=F){let X=J[S]?.file;if(!X)return;return{module:L(X,$),preload:R(J,S,$)}}function R(J,$,X=F){let z=[],x=new Set,W=(Q)=>{if(x.has(Q))return;x.add(Q);let H=J[Q];if(!H?.file)return;z.push(L(H.file,X));for(let Y of H.imports??[])W(Y)};return W($),z}var bJ=new RegExp(`^${E}/.+\\.m?js$`);function LJ(J){return bJ.test(J)}function u(J){if(LJ(J))return new Response("window.location.reload();export {}",{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store"}});if(T(J))return new Response("Not found",{status:404});return}var VJ=`<!DOCTYPE html>
2
+ import{i as k,j as l}from"./chunk-hjbe3jn2.js";import{ka as F,oa as L,pa as c}from"./chunk-zq5m4scz.js";import"./chunk-8z37k28d.js";import{nd as I,rd as E,sd as T}from"./chunk-azebyh90.js";import"./chunk-34s3tfgk.js";import"./chunk-q0nqypca.js";import"./chunk-4h7z32zp.js";import"./chunk-gzs2y282.js";import"./chunk-1712rv0r.js";import"./chunk-bdfdjnht.js";import"./chunk-jcq0tbdv.js";import"./chunk-axxbkm30.js";import"./chunk-qjgfrsw7.js";import"./chunk-989rzqd6.js";import"./chunk-0da5t7vs.js";import"./chunk-fvn78g6k.js";import{Dg as h}from"./chunk-yaz93haz.js";import{Eg as P}from"./chunk-7yhsy039.js";import"./chunk-xzp2ptj5.js";import{join as A,resolve as CJ,sep as IJ}from"path";import{Duplex as JJ}from"stream";import{constants as C,createBrotliCompress as $J,createGzip as XJ}from"zlib";var ZJ=["br","gzip"],zJ=1024,GJ=5,jJ=19,xJ=6;function HJ(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 QJ(J){if(J===null||J===void 0)return null;let $=new Map;for(let X of J.split(",")){let[z,...x]=X.split(";"),W=z.trim().toLowerCase();if(W==="")continue;let Q=1;for(let H of x){let Y=H.indexOf("=");if(Y===-1)continue;if(H.slice(0,Y).trim().toLowerCase()==="q"){Q=HJ(H.slice(Y+1));break}}$.set(W,Q)}return $}function WJ(J,$=ZJ){let X=QJ(J);if(!X)return null;let z=X.get("*"),x=null,W=0;for(let Q of $){let H=X.get(Q)??z??0;if(H>W)x=Q,W=H}return x}function OJ(J,$){if(!J)return!1;return J.split(",").some((X)=>X.trim().toLowerCase().split("=")[0].trim()===$)}function KJ(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(OJ($.headers.get("Cache-Control"),"no-transform"))return!1;let x=$.headers.get("Content-Length");if(x!==null&&Number(x)<zJ)return!1;return!0}function UJ(J){let $=J==="br"?$J({params:{[C.BROTLI_PARAM_QUALITY]:GJ,[C.BROTLI_PARAM_LGWIN]:jJ},flush:C.BROTLI_OPERATION_FLUSH}):XJ({level:xJ,flush:C.Z_SYNC_FLUSH});return JJ.toWeb($)}function YJ(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 q(J,$){if(!KJ(J.method,$))return $;let X=new Headers($.headers);YJ(X);let z=WJ(J.headers.get("Accept-Encoding"));if(!z)return new Response($.body,{status:$.status,statusText:$.statusText,headers:X});let x;try{x=UJ(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(x),{status:$.status,statusText:$.statusText,headers:X})}function v(J){let $=J.toString(),X=new Bun.CryptoHasher("sha1");return X.update($),X.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=I;import{stat as SJ}from"fs/promises";var S="app/client.tsx";function f(J,$=F){let X=J[S]?.file;if(!X)return;return{module:L(X,$),preload:R(J,S,$)}}function R(J,$,X=F){let z=[],x=new Set,W=(Q)=>{if(x.has(Q))return;x.add(Q);let H=J[Q];if(!H?.file)return;z.push(L(H.file,X));for(let Y of H.imports??[])W(Y)};return W($),z}var bJ=new RegExp(`^${E}/.+\\.m?js$`);function LJ(J){return bJ.test(J)}function u(J){if(LJ(J))return new Response("window.location.reload();export {}",{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store"}});if(T(J))return new Response("Not found",{status:404});return}var VJ=`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8" />
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../support/ServiceProvider.ts"],
4
4
  "sourcesContent": [
5
- "import type { Application } from \"../foundation/Application\";\n\n/**\n * Every hook defaults to a no-op. `register()` binds services into the\n * container and must not resolve any of them; `boot()` runs after every\n * provider has registered, so it may resolve freely.\n *\n * `shutdown()` runs once when a production server is told to stop (`SIGTERM`\n * or `SIGINT`), after it has stopped accepting requests and the in-flight ones\n * have finished or run out of grace — so nothing a request needs is torn down\n * under it. Providers shut down in reverse registration order, so one\n * registered after another may still use it. Each is awaited, but under a\n * shared deadline (`GEMI_SHUTDOWN_PROVIDER_TIMEOUT`): one that overruns is\n * abandoned and the next begins, and one that throws is logged and does not\n * stop the rest. See `Application.shutdown`.\n *\n * `timeoutMs` is what is left of that shared deadline when this provider is\n * reached. A provider that waits for something — jobs finishing, a queue\n * draining — should bound its own wait by a little less than this, so that it\n * is still the one to report what it gave up on. Ignoring it is fine; the\n * provider is then simply abandoned at the deadline, with only a generic line\n * from `Application` to say so.\n */\nexport abstract class ServiceProvider {\n constructor(protected app: Application) {}\n\n register(): void {}\n\n boot(): void | Promise<void> {}\n\n shutdown(options?: { timeoutMs: number }): void | Promise<void> {}\n}\n"
5
+ "import type { Application } from \"../foundation/Application\";\n\n/**\n * Every hook defaults to a no-op. `register()` binds services into the\n * container and must not resolve any of them; `boot()` runs after every\n * provider has registered, so it may resolve freely.\n *\n * `shutdown()` runs once when a production server is told to stop (`SIGTERM`\n * or `SIGINT`), after it has stopped accepting requests and the in-flight ones\n * have finished or run out of grace — so nothing a request needs is torn down\n * under it. Providers shut down in reverse registration order, so one\n * registered after another may still use it. Each is awaited, but under a\n * shared deadline (`GEMI_SHUTDOWN_PROVIDER_TIMEOUT`): one that overruns is\n * abandoned and the next begins, and one that throws is logged and does not\n * stop the rest. See `Application.shutdown`.\n *\n * Under `gemi dev` it also runs on every `bun --hot` reload, for the\n * application the reload replaced, once the new one is serving and the old\n * one's requests have finished (see `server/devReload.ts`). A hook that closes\n * something kept on `globalThis` across reloads would close it for the new\n * application too.\n *\n * `timeoutMs` is what is left of that shared deadline when this provider is\n * reached. A provider that waits for something — jobs finishing, a queue\n * draining — should bound its own wait by a little less than this, so that it\n * is still the one to report what it gave up on. Ignoring it is fine; the\n * provider is then simply abandoned at the deadline, with only a generic line\n * from `Application` to say so.\n */\nexport abstract class ServiceProvider {\n constructor(protected app: Application) {}\n\n register(): void {}\n\n boot(): void | Promise<void> {}\n\n shutdown(options?: { timeoutMs: number }): void | Promise<void> {}\n}\n"
6
6
  ],
7
- "mappings": ";AAuBO,MAAe,CAAgB,CACd,IAAtB,WAAW,CAAW,EAAkB,CAAlB,WAEtB,QAAQ,EAAS,EAEjB,IAAI,EAAyB,EAE7B,QAAQ,CAAC,EAAuD,EAClE",
7
+ "mappings": ";AA6BO,MAAe,CAAgB,CACd,IAAtB,WAAW,CAAW,EAAkB,CAAlB,WAEtB,QAAQ,EAAS,EAEjB,IAAI,EAAyB,EAE7B,QAAQ,CAAC,EAAuD,EAClE",
8
8
  "debugId": "E85534E036CAEBF564756E2164756E21",
9
9
  "names": []
10
10
  }