veloce-ts 0.4.12 → 0.4.13
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/cjs/src/adapters/hono.js +2 -2
- package/dist/cjs/src/adapters/hono.js.map +3 -3
- package/dist/cjs/src/index.js +2 -2
- package/dist/cjs/src/index.js.map +3 -3
- package/dist/cjs/src/testing/index.js +10 -10
- package/dist/cjs/src/testing/index.js.map +3 -3
- package/dist/esm/src/adapters/hono.js +2 -2
- package/dist/esm/src/adapters/hono.js.map +3 -3
- package/dist/esm/src/index.js +2 -2
- package/dist/esm/src/index.js.map +3 -3
- package/dist/esm/src/testing/index.js +9 -9
- package/dist/esm/src/testing/index.js.map +3 -3
- package/dist/types/adapters/hono.d.ts +2 -0
- package/dist/types/adapters/hono.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var P=Object.create;var{getPrototypeOf:Q,defineProperty:H,getOwnPropertyNames:K,getOwnPropertyDescriptor:U}=Object,L=Object.prototype.hasOwnProperty;function M(x){return this[x]}var V,W,N=(x,z,A)=>{var C=x!=null&&typeof x==="object";if(C){var B=z?V??=new WeakMap:W??=new WeakMap,D=B.get(x);if(D)return D}A=x!=null?P(Q(x)):{};let E=z||!x||!x.__esModule?H(A,"default",{value:x,enumerable:!0}):A;for(let F of K(x))if(!L.call(E,F))H(E,F,{get:M.bind(x,F),enumerable:!0});if(C)B.set(x,E);return E},R=(x)=>{var z=(J??=new WeakMap).get(x),A;if(z)return z;if(z=H({},"__esModule",{value:!0}),x&&typeof x==="object"||typeof x==="function"){for(var C of K(x))if(!L.call(z,C))H(z,C,{get:M.bind(x,C),enumerable:!(A=U(x,C))||A.enumerable})}return J.set(x,z),z},J,T=(x,z)=>()=>(z||x((z={exports:{}}).exports,z),z.exports);var X=(x)=>x;function Y(x,z){this[x]=X.bind(null,z)}var Z=(x,z)=>{for(var A in z)H(x,A,{get:z[A],enumerable:!0,configurable:!0,set:Y.bind(z,A)})};var q=(x,z)=>()=>(x&&(z=x(x=0)),z);var $=import.meta.require;var y={};Z(y,{HonoAdapter:()=>O});class O{hono;name="hono";runtime;constructor(x){this.hono=x;this.runtime=j()}listen(x,z){switch(this.runtime){case"bun":return this.listenBun(x,z);case"deno":return this.listenDeno(x,z);case"node":return this.listenNode(x,z);case"workerd":throw Error("Cloudflare Workers do not support listen(). Deploy using wrangler or export the handler with getHandler().");default:throw Error(`Unsupported runtime: ${this.runtime}. FastAPI-TS supports Bun, Node.js, Deno, and Cloudflare Workers.`)}}getHandler(){return this.hono.fetch}getRuntime(){return this.runtime}listenBun(x,z){let A=this.hono,C=Bun.serve({port:x,fetch(B,D){return A.fetch(B,{upgrade:D.upgrade.bind(D)})},websocket:{open(B){let{manager:D,metadata:E}=B.data??{};if(!D||!E)return;let F=D.handleConnectionBun(B,E);B.data._connection=F},message(B,D){let{manager:E,metadata:F,_connection:G}=B.data??{};if(!E||!F||!G)return;E.handleMessageBun(D,G,F)},close(B,D,E){let{manager:F,metadata:G,_connection:I}=B.data??{};if(!F||!G||!I)return;F.handleDisconnectBun(I,G)},error(B,D){console.error("[WS] Bun WebSocket error:",D)}}});if(z)z();return{port:x,close:async()=>{C.stop()},...C}}listenDeno(x,z){let A=new AbortController;return Deno.serve({port:x,signal:A.signal,onListen:z},this.hono.fetch),{port:x,close:async()=>{A.abort()}}}listenNode(x,z){try{let{serve:A}=(()=>{throw new Error("Cannot require module "+"@hono/node-server");})(),C=A({fetch:this.hono.fetch,port:x},z);return{port:x,close:async()=>{return new Promise((B)=>{C.close(()=>B())})},...C}}catch(A){throw Error("Node.js adapter requires @hono/node-server package. Install it with: npm install @hono/node-server")}}}var j=()=>{if(typeof Bun<"u")return"bun";if(typeof Deno<"u")return"deno";if(typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers")return"workerd";if(typeof process<"u"&&process.versions&&process.versions.node)return"node";return"unknown"};export{O as HonoAdapter};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=8E18A05CFB5393AA64756E2164756E21
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["..\\..\\src\\adapters\\hono.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\r\n * @module veloce-ts/adapters/hono\r\n * @description {@link HonoAdapter}: detecta runtime (Bun/Node/Deno/Workers) y expone `listen` sobre la instancia Hono.\r\n */\r\nimport type { Hono } from 'hono';\r\nimport type { Adapter, ServerInstance } from './base';\r\n\r\n// Type declarations for runtime globals\r\ndeclare const Deno: any;\r\ndeclare const Bun: any;\r\n\r\n/**\r\n * Runtime detection utilities\r\n */\r\nconst detectRuntime = (): 'bun' | 'deno' | 'node' | 'workerd' | 'unknown' => {\r\n // Check for Bun\r\n if (typeof Bun !== 'undefined') {\r\n return 'bun';\r\n }\r\n\r\n // Check for Deno\r\n if (typeof Deno !== 'undefined') {\r\n return 'deno';\r\n }\r\n\r\n // Check for Cloudflare Workers\r\n if (typeof navigator !== 'undefined' && navigator.userAgent === 'Cloudflare-Workers') {\r\n return 'workerd';\r\n }\r\n\r\n // Check for Node.js\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node) {\r\n return 'node';\r\n }\r\n\r\n return 'unknown';\r\n};\r\n\r\n/**\r\n * HonoAdapter - Adapts Hono.js to work across multiple runtimes\r\n * Automatically detects the runtime and uses the appropriate server implementation\r\n */\r\nexport class HonoAdapter implements Adapter {\r\n name = 'hono';\r\n private runtime: ReturnType<typeof detectRuntime>;\r\n\r\n constructor(private hono: Hono) {\r\n this.runtime = detectRuntime();\r\n }\r\n\r\n /**\r\n * Start the server on the specified port\r\n * Automatically uses the appropriate server for the detected runtime\r\n */\r\n listen(port: number, callback?: () => void): ServerInstance {\r\n switch (this.runtime) {\r\n case 'bun':\r\n return this.listenBun(port, callback);\r\n \r\n case 'deno':\r\n return this.listenDeno(port, callback);\r\n \r\n case 'node':\r\n return this.listenNode(port, callback);\r\n \r\n case 'workerd':\r\n throw new Error(\r\n 'Cloudflare Workers do not support listen(). Deploy using wrangler or export the handler with getHandler().'\r\n );\r\n \r\n default:\r\n throw new Error(\r\n `Unsupported runtime: ${this.runtime}. FastAPI-TS supports Bun, Node.js, Deno, and Cloudflare Workers.`\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Get the Hono fetch handler\r\n * This can be used directly in serverless environments or for custom server setups\r\n */\r\n getHandler() {\r\n return this.hono.fetch;\r\n }\r\n\r\n /**\r\n * Get the detected runtime\r\n */\r\n getRuntime(): string {\r\n return this.runtime;\r\n }\r\n\r\n /**\r\n * Start server using Bun's native server\r\n */\r\n private listenBun(port: number, callback?: () => void): ServerInstance {\r\n const server = Bun.serve({\r\n port,\r\n fetch:
|
|
5
|
+
"/**\r\n * @module veloce-ts/adapters/hono\r\n * @description {@link HonoAdapter}: detecta runtime (Bun/Node/Deno/Workers) y expone `listen` sobre la instancia Hono.\r\n */\r\nimport type { Hono } from 'hono';\r\nimport type { Adapter, ServerInstance } from './base';\r\n\r\n// Type declarations for runtime globals\r\ndeclare const Deno: any;\r\ndeclare const Bun: any;\r\n\r\n/**\r\n * Runtime detection utilities\r\n */\r\nconst detectRuntime = (): 'bun' | 'deno' | 'node' | 'workerd' | 'unknown' => {\r\n // Check for Bun\r\n if (typeof Bun !== 'undefined') {\r\n return 'bun';\r\n }\r\n\r\n // Check for Deno\r\n if (typeof Deno !== 'undefined') {\r\n return 'deno';\r\n }\r\n\r\n // Check for Cloudflare Workers\r\n if (typeof navigator !== 'undefined' && navigator.userAgent === 'Cloudflare-Workers') {\r\n return 'workerd';\r\n }\r\n\r\n // Check for Node.js\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node) {\r\n return 'node';\r\n }\r\n\r\n return 'unknown';\r\n};\r\n\r\n/**\r\n * HonoAdapter - Adapts Hono.js to work across multiple runtimes\r\n * Automatically detects the runtime and uses the appropriate server implementation\r\n */\r\nexport class HonoAdapter implements Adapter {\r\n name = 'hono';\r\n private runtime: ReturnType<typeof detectRuntime>;\r\n\r\n constructor(private hono: Hono) {\r\n this.runtime = detectRuntime();\r\n }\r\n\r\n /**\r\n * Start the server on the specified port\r\n * Automatically uses the appropriate server for the detected runtime\r\n */\r\n listen(port: number, callback?: () => void): ServerInstance {\r\n switch (this.runtime) {\r\n case 'bun':\r\n return this.listenBun(port, callback);\r\n \r\n case 'deno':\r\n return this.listenDeno(port, callback);\r\n \r\n case 'node':\r\n return this.listenNode(port, callback);\r\n \r\n case 'workerd':\r\n throw new Error(\r\n 'Cloudflare Workers do not support listen(). Deploy using wrangler or export the handler with getHandler().'\r\n );\r\n \r\n default:\r\n throw new Error(\r\n `Unsupported runtime: ${this.runtime}. FastAPI-TS supports Bun, Node.js, Deno, and Cloudflare Workers.`\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Get the Hono fetch handler\r\n * This can be used directly in serverless environments or for custom server setups\r\n */\r\n getHandler() {\r\n return this.hono.fetch;\r\n }\r\n\r\n /**\r\n * Get the detected runtime\r\n */\r\n getRuntime(): string {\r\n return this.runtime;\r\n }\r\n\r\n /**\r\n * Start server using Bun's native server\r\n * Passes the Bun server instance as `env` to Hono so WebSocketPlugin\r\n * can call server.upgrade() from within route handlers.\r\n */\r\n private listenBun(port: number, callback?: () => void): ServerInstance {\r\n const hono = this.hono;\r\n const server = Bun.serve({\r\n port,\r\n fetch(req: Request, bunServer: any) {\r\n // Pass the Bun server as `env` so c.env.upgrade() works in handlers\r\n return hono.fetch(req, { upgrade: bunServer.upgrade.bind(bunServer) });\r\n },\r\n websocket: {\r\n open(ws: any) {\r\n const { manager, metadata } = ws.data ?? {};\r\n if (!manager || !metadata) return;\r\n const connection = manager.handleConnectionBun(ws, metadata);\r\n ws.data._connection = connection;\r\n },\r\n message(ws: any, message: string | Buffer) {\r\n const { manager, metadata, _connection } = ws.data ?? {};\r\n if (!manager || !metadata || !_connection) return;\r\n manager.handleMessageBun(message, _connection, metadata);\r\n },\r\n close(ws: any, code: number, reason: string) {\r\n const { manager, metadata, _connection } = ws.data ?? {};\r\n if (!manager || !metadata || !_connection) return;\r\n manager.handleDisconnectBun(_connection, metadata);\r\n },\r\n error(ws: any, error: Error) {\r\n console.error('[WS] Bun WebSocket error:', error);\r\n },\r\n },\r\n });\r\n\r\n if (callback) {\r\n callback();\r\n }\r\n\r\n return {\r\n port,\r\n close: async () => {\r\n server.stop();\r\n },\r\n ...server\r\n };\r\n }\r\n\r\n /**\r\n * Start server using Deno's native server\r\n */\r\n private listenDeno(port: number, callback?: () => void): ServerInstance {\r\n // Deno.serve returns a promise, so we handle it appropriately\r\n const ac = new AbortController();\r\n \r\n Deno.serve(\r\n {\r\n port,\r\n signal: ac.signal,\r\n onListen: callback\r\n },\r\n this.hono.fetch\r\n );\r\n\r\n // Return an object with a close method for consistency\r\n return {\r\n port,\r\n close: async () => {\r\n ac.abort();\r\n },\r\n };\r\n }\r\n\r\n /**\r\n * Start server using Node.js adapter\r\n * Requires @hono/node-server package\r\n */\r\n private listenNode(port: number, callback?: () => void): ServerInstance {\r\n try {\r\n // Dynamically import @hono/node-server\r\n // This is a peer dependency that users need to install for Node.js support\r\n const { serve } = require('@hono/node-server');\r\n \r\n const server = serve(\r\n {\r\n fetch: this.hono.fetch,\r\n port,\r\n },\r\n callback\r\n );\r\n\r\n return {\r\n port,\r\n close: async () => {\r\n return new Promise<void>((resolve) => {\r\n server.close(() => resolve());\r\n });\r\n },\r\n ...server\r\n };\r\n } catch (error) {\r\n throw new Error(\r\n 'Node.js adapter requires @hono/node-server package. Install it with: npm install @hono/node-server'\r\n );\r\n }\r\n }\r\n}\r\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";uhCA0CO,MAAM,CAA+B,CAItB,KAHpB,KAAO,OACC,QAER,WAAW,CAAS,EAAY,CAAZ,YAClB,KAAK,QAAU,EAAc,EAO/B,MAAM,CAAC,EAAc,EAAuC,CAC1D,OAAQ,KAAK,aACN,MACH,OAAO,KAAK,UAAU,EAAM,CAAQ,MAEjC,OACH,OAAO,KAAK,WAAW,EAAM,CAAQ,MAElC,OACH,OAAO,KAAK,WAAW,EAAM,CAAQ,MAElC,UACH,MAAU,MACR,4GACF,UAGA,MAAU,MACR,wBAAwB,KAAK,0EAC/B,GAQN,UAAU,EAAG,CACX,OAAO,KAAK,KAAK,MAMnB,UAAU,EAAW,CACnB,OAAO,KAAK,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";uhCA0CO,MAAM,CAA+B,CAItB,KAHpB,KAAO,OACC,QAER,WAAW,CAAS,EAAY,CAAZ,YAClB,KAAK,QAAU,EAAc,EAO/B,MAAM,CAAC,EAAc,EAAuC,CAC1D,OAAQ,KAAK,aACN,MACH,OAAO,KAAK,UAAU,EAAM,CAAQ,MAEjC,OACH,OAAO,KAAK,WAAW,EAAM,CAAQ,MAElC,OACH,OAAO,KAAK,WAAW,EAAM,CAAQ,MAElC,UACH,MAAU,MACR,4GACF,UAGA,MAAU,MACR,wBAAwB,KAAK,0EAC/B,GAQN,UAAU,EAAG,CACX,OAAO,KAAK,KAAK,MAMnB,UAAU,EAAW,CACnB,OAAO,KAAK,QAQN,SAAS,CAAC,EAAc,EAAuC,CACrE,IAAM,EAAO,KAAK,KACZ,EAAS,IAAI,MAAM,CACvB,OACA,KAAK,CAAC,EAAc,EAAgB,CAElC,OAAO,EAAK,MAAM,EAAK,CAAE,QAAS,EAAU,QAAQ,KAAK,CAAS,CAAE,CAAC,GAEvE,UAAW,CACT,IAAI,CAAC,EAAS,CACZ,IAAQ,UAAS,YAAa,EAAG,MAAQ,CAAC,EAC1C,GAAI,CAAC,GAAW,CAAC,EAAU,OAC3B,IAAM,EAAa,EAAQ,oBAAoB,EAAI,CAAQ,EAC3D,EAAG,KAAK,YAAc,GAExB,OAAO,CAAC,EAAS,EAA0B,CACzC,IAAQ,UAAS,WAAU,eAAgB,EAAG,MAAQ,CAAC,EACvD,GAAI,CAAC,GAAW,CAAC,GAAY,CAAC,EAAa,OAC3C,EAAQ,iBAAiB,EAAS,EAAa,CAAQ,GAEzD,KAAK,CAAC,EAAS,EAAc,EAAgB,CAC3C,IAAQ,UAAS,WAAU,eAAgB,EAAG,MAAQ,CAAC,EACvD,GAAI,CAAC,GAAW,CAAC,GAAY,CAAC,EAAa,OAC3C,EAAQ,oBAAoB,EAAa,CAAQ,GAEnD,KAAK,CAAC,EAAS,EAAc,CAC3B,QAAQ,MAAM,4BAA6B,CAAK,EAEpD,CACF,CAAC,EAED,GAAI,EACF,EAAS,EAGX,MAAO,CACL,OACA,MAAO,SAAY,CACjB,EAAO,KAAK,MAEX,CACL,EAMM,UAAU,CAAC,EAAc,EAAuC,CAEtE,IAAM,EAAK,IAAI,gBAYf,OAVA,KAAK,MACH,CACE,OACA,OAAQ,EAAG,OACX,SAAU,CACZ,EACA,KAAK,KAAK,KACZ,EAGO,CACL,OACA,MAAO,SAAY,CACjB,EAAG,MAAM,EAEb,EAOM,UAAU,CAAC,EAAc,EAAuC,CACtE,GAAI,CAGF,IAAQ,kFAEF,EAAS,EACb,CACE,MAAO,KAAK,KAAK,MACjB,MACF,EACA,CACF,EAEA,MAAO,CACL,OACA,MAAO,SAAY,CACjB,OAAO,IAAI,QAAc,CAAC,IAAY,CACpC,EAAO,MAAM,IAAM,EAAQ,CAAC,EAC7B,MAEA,CACL,EACA,MAAO,EAAO,CACd,MAAU,MACR,oGACF,GAGN,KAzLM,EAAgB,IAAuD,CAE3E,GAAI,OAAO,IAAQ,IACjB,MAAO,MAIT,GAAI,OAAO,KAAS,IAClB,MAAO,OAIT,GAAI,OAAO,UAAc,KAAe,UAAU,YAAc,qBAC9D,MAAO,UAIT,GAAI,OAAO,QAAY,KAAe,QAAQ,UAAY,QAAQ,SAAS,KACzE,MAAO,OAGT,MAAO",
|
|
8
|
+
"debugId": "8E18A05CFB5393AA64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/esm/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var pH=Object.create;var{getPrototypeOf:iH,defineProperty:e$,getOwnPropertyNames:K5,getOwnPropertyDescriptor:nH}=Object,I5=Object.prototype.hasOwnProperty;function T5($){return this[$]}var sH,oH,v1=($,J,Q)=>{var X=$!=null&&typeof $==="object";if(X){var Y=J?sH??=new WeakMap:oH??=new WeakMap,W=Y.get($);if(W)return W}Q=$!=null?pH(iH($)):{};let H=J||!$||!$.__esModule?e$(Q,"default",{value:$,enumerable:!0}):Q;for(let G of K5($))if(!I5.call(H,G))e$(H,G,{get:T5.bind($,G),enumerable:!0});if(X)Y.set($,H);return H},T4=($)=>{var J=(P5??=new WeakMap).get($),Q;if(J)return J;if(J=e$({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function"){for(var X of K5($))if(!I5.call(J,X))e$(J,X,{get:T5.bind($,X),enumerable:!(Q=nH($,X))||Q.enumerable})}return P5.set($,J),J},P5,L=($,J)=>()=>(J||$((J={exports:{}}).exports,J),J.exports);var rH=($)=>$;function aH($,J){this[$]=rH.bind(null,J)}var A1=($,J)=>{for(var Q in J)e$($,Q,{get:J[Q],enumerable:!0,configurable:!0,set:aH.bind(J,Q)})};var X0=($,J)=>()=>($&&(J=$($=0)),J);var o=import.meta.require;var f4={};A1(f4,{HonoAdapter:()=>b4});class b4{hono;name="hono";runtime;constructor($){this.hono=$;this.runtime=tH()}listen($,J){switch(this.runtime){case"bun":return this.listenBun($,J);case"deno":return this.listenDeno($,J);case"node":return this.listenNode($,J);case"workerd":throw Error("Cloudflare Workers do not support listen(). Deploy using wrangler or export the handler with getHandler().");default:throw Error(`Unsupported runtime: ${this.runtime}. FastAPI-TS supports Bun, Node.js, Deno, and Cloudflare Workers.`)}}getHandler(){return this.hono.fetch}getRuntime(){return this.runtime}listenBun($,J){let Q=Bun.serve({port:$,fetch:
|
|
2
|
+
var pH=Object.create;var{getPrototypeOf:iH,defineProperty:e$,getOwnPropertyNames:K5,getOwnPropertyDescriptor:nH}=Object,I5=Object.prototype.hasOwnProperty;function T5($){return this[$]}var sH,oH,v1=($,J,Q)=>{var X=$!=null&&typeof $==="object";if(X){var Y=J?sH??=new WeakMap:oH??=new WeakMap,W=Y.get($);if(W)return W}Q=$!=null?pH(iH($)):{};let H=J||!$||!$.__esModule?e$(Q,"default",{value:$,enumerable:!0}):Q;for(let G of K5($))if(!I5.call(H,G))e$(H,G,{get:T5.bind($,G),enumerable:!0});if(X)Y.set($,H);return H},T4=($)=>{var J=(P5??=new WeakMap).get($),Q;if(J)return J;if(J=e$({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function"){for(var X of K5($))if(!I5.call(J,X))e$(J,X,{get:T5.bind($,X),enumerable:!(Q=nH($,X))||Q.enumerable})}return P5.set($,J),J},P5,L=($,J)=>()=>(J||$((J={exports:{}}).exports,J),J.exports);var rH=($)=>$;function aH($,J){this[$]=rH.bind(null,J)}var A1=($,J)=>{for(var Q in J)e$($,Q,{get:J[Q],enumerable:!0,configurable:!0,set:aH.bind(J,Q)})};var X0=($,J)=>()=>($&&(J=$($=0)),J);var o=import.meta.require;var f4={};A1(f4,{HonoAdapter:()=>b4});class b4{hono;name="hono";runtime;constructor($){this.hono=$;this.runtime=tH()}listen($,J){switch(this.runtime){case"bun":return this.listenBun($,J);case"deno":return this.listenDeno($,J);case"node":return this.listenNode($,J);case"workerd":throw Error("Cloudflare Workers do not support listen(). Deploy using wrangler or export the handler with getHandler().");default:throw Error(`Unsupported runtime: ${this.runtime}. FastAPI-TS supports Bun, Node.js, Deno, and Cloudflare Workers.`)}}getHandler(){return this.hono.fetch}getRuntime(){return this.runtime}listenBun($,J){let Q=this.hono,X=Bun.serve({port:$,fetch(Y,W){return Q.fetch(Y,{upgrade:W.upgrade.bind(W)})},websocket:{open(Y){let{manager:W,metadata:H}=Y.data??{};if(!W||!H)return;let G=W.handleConnectionBun(Y,H);Y.data._connection=G},message(Y,W){let{manager:H,metadata:G,_connection:V}=Y.data??{};if(!H||!G||!V)return;H.handleMessageBun(W,V,G)},close(Y,W,H){let{manager:G,metadata:V,_connection:U}=Y.data??{};if(!G||!V||!U)return;G.handleDisconnectBun(U,V)},error(Y,W){console.error("[WS] Bun WebSocket error:",W)}}});if(J)J();return{port:$,close:async()=>{X.stop()},...X}}listenDeno($,J){let Q=new AbortController;return Deno.serve({port:$,signal:Q.signal,onListen:J},this.hono.fetch),{port:$,close:async()=>{Q.abort()}}}listenNode($,J){try{let{serve:Q}=(()=>{throw new Error("Cannot require module "+"@hono/node-server");})(),X=Q({fetch:this.hono.fetch,port:$},J);return{port:$,close:async()=>{return new Promise((Y)=>{X.close(()=>Y())})},...X}}catch(Q){throw Error("Node.js adapter requires @hono/node-server package. Install it with: npm install @hono/node-server")}}}var tH=()=>{if(typeof Bun<"u")return"bun";if(typeof Deno<"u")return"deno";if(typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers")return"workerd";if(typeof process<"u"&&process.versions&&process.versions.node)return"node";return"unknown"};var b5={};A1(b5,{ExpressAdapter:()=>s2});class s2{veloceApp;name="express";expressApp;constructor($,J){this.veloceApp=$;this.expressApp=J??s2.createExpressApp(),this.setupBridge()}listen($,J){return this.expressApp.listen($,J)}getHandler(){return this.expressApp}getExpressApp(){return this.expressApp}static createExpressApp(){let $=o,J;try{J=$("express")}catch{throw Error(`[ExpressAdapter] Could not load the "express" package.
|
|
3
3
|
Install it as a peer dependency: npm install express`)}return J()}setupBridge(){let $=this.veloceApp.getHono();this.expressApp.use(async(J,Q,X)=>{try{let Y=this.toWebRequest(J),W=await $.fetch(Y);await this.writeExpressResponse(Q,W)}catch(Y){X(Y)}})}toWebRequest($){let J=$.protocol??"http",Q=$.get?.("host")??$.headers?.host??"localhost",X=`${J}://${Q}${$.originalUrl??$.url}`,Y=new Headers;for(let[H,G]of Object.entries($.headers??{}))if(typeof G==="string")Y.set(H,G);else if(Array.isArray(G))G.forEach((V)=>Y.append(H,V));let W={method:$.method,headers:Y};if($.method!=="GET"&&$.method!=="HEAD"){if(Buffer.isBuffer($.body))W.body=$.body;else if($.body!==void 0&&$.body!==null){if(W.body=JSON.stringify($.body),!Y.has("content-type"))Y.set("content-type","application/json")}}return new Request(X,W)}async writeExpressResponse($,J){if($.status(J.status),J.headers.forEach((X,Y)=>{if(Y.toLowerCase()!=="transfer-encoding")$.setHeader(Y,X)}),!J.body){$.end();return}let Q=J.headers.get("content-type")??"";if(Q.includes("application/json")){let X=await J.json();$.json(X)}else if(Q.startsWith("text/")){let X=await J.text();$.send(X)}else{let X=await J.arrayBuffer();$.send(Buffer.from(X))}}}var k4=()=>{};var h4={};A1(h4,{setRequestMetadata:()=>XG,setRequestContext:()=>k5,initializeRequestContext:()=>o2,getRequestMetadata:()=>YG,getRequestId:()=>$G,getRequestDuration:()=>r2,getRequestContext:()=>j1,getAbortSignal:()=>JG,generateRequestId:()=>f5,cleanupRequestContext:()=>a2,abortRequest:()=>QG});function f5(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();return`${Date.now()}-${Math.random().toString(36).substring(2,15)}-${Math.random().toString(36).substring(2,15)}`}function j1($){return $.get("veloce:request-context")||null}function k5($,J){$.set("veloce:request-context",J)}function o2($,J){let Q=J?.requestId||f5(),X=new AbortController,Y={requestId:Q,startTime:Date.now(),abortSignal:X.signal,abortController:X,timeout:J?.timeout,metadata:{}};if(J?.timeout&&J.timeout>0)Y.timeoutId=setTimeout(()=>{X.abort()},J.timeout);return k5($,Y),Y}function $G($){return j1($)?.requestId||null}function JG($){return j1($)?.abortSignal||null}function QG($){let J=j1($);if(J?.abortController&&!J.abortSignal.aborted)J.abortController.abort()}function XG($,J,Q){let X=j1($);if(X)X.metadata[J]=Q}function YG($,J){return j1($)?.metadata[J]}function r2($){let J=j1($);if(!J)return null;return Date.now()-J.startTime}function a2($){let J=j1($);if(J?.timeoutId)clearTimeout(J.timeoutId)}var y4=L((ZL,h5)=>{var J2=($)=>{return $&&typeof $.message==="string"},g4=($)=>{if(!$)return;let J=$.cause;if(typeof J==="function"){let Q=$.cause();return J2(Q)?Q:void 0}else return J2(J)?J:void 0},x5=($,J)=>{if(!J2($))return"";let Q=$.stack||"";if(J.has($))return Q+`
|
|
4
4
|
causes have become circular...`;let X=g4($);if(X)return J.add($),Q+`
|
|
5
5
|
caused by: `+x5(X,J);else return Q},WG=($)=>x5($,new Set),v5=($,J,Q)=>{if(!J2($))return"";let X=Q?"":$.message||"";if(J.has($))return X+": ...";let Y=g4($);if(Y){J.add($);let W=typeof $.cause==="function";return X+(W?"":": ")+v5(Y,J,W)}else return X},HG=($)=>v5($,new Set);h5.exports={isErrorLike:J2,getErrorCause:g4,stackWithCauses:WG,messageWithCauses:HG}});var u4=L((SL,y5)=>{var GG=Symbol("circular-ref-tag"),t2=Symbol("pino-raw-err-ref"),g5=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[t2]},set:function($){this[t2]=$}}});Object.defineProperty(g5,t2,{writable:!0,value:{}});y5.exports={pinoErrProto:g5,pinoErrorSymbols:{seen:GG,rawSymbol:t2}}});var l5=L((CL,m5)=>{m5.exports=l4;var{messageWithCauses:VG,stackWithCauses:UG,isErrorLike:u5}=y4(),{pinoErrProto:qG,pinoErrorSymbols:_G}=u4(),{seen:m4}=_G,{toString:DG}=Object.prototype;function l4($){if(!u5($))return $;$[m4]=void 0;let J=Object.create(qG);if(J.type=DG.call($.constructor)==="[object Function]"?$.constructor.name:$.name,J.message=VG($),J.stack=UG($),Array.isArray($.errors))J.aggregateErrors=$.errors.map((Q)=>l4(Q));for(let Q in $)if(J[Q]===void 0){let X=$[Q];if(u5(X)){if(Q!=="cause"&&!Object.prototype.hasOwnProperty.call(X,m4))J[Q]=l4(X)}else J[Q]=X}return delete $[m4],J.raw=$,J}});var d5=L((ML,c5)=>{c5.exports=$6;var{isErrorLike:c4}=y4(),{pinoErrProto:BG,pinoErrorSymbols:FG}=u4(),{seen:e2}=FG,{toString:zG}=Object.prototype;function $6($){if(!c4($))return $;$[e2]=void 0;let J=Object.create(BG);if(J.type=zG.call($.constructor)==="[object Function]"?$.constructor.name:$.name,J.message=$.message,J.stack=$.stack,Array.isArray($.errors))J.aggregateErrors=$.errors.map((Q)=>$6(Q));if(c4($.cause)&&!Object.prototype.hasOwnProperty.call($.cause,e2))J.cause=$6($.cause);for(let Q in $)if(J[Q]===void 0){let X=$[Q];if(c4(X)){if(!Object.prototype.hasOwnProperty.call(X,e2))J[Q]=$6(X)}else J[Q]=X}return delete $[e2],J.raw=$,J}});var s5=L((PL,n5)=>{n5.exports={mapHttpRequest:NG,reqSerializer:i5};var d4=Symbol("pino-raw-req-ref"),p5=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[d4]},set:function($){this[d4]=$}}});Object.defineProperty(p5,d4,{writable:!0,value:{}});function i5($){let J=$.info||$.socket,Q=Object.create(p5);if(Q.id=typeof $.id==="function"?$.id():$.id||($.info?$.info.id:void 0),Q.method=$.method,$.originalUrl)Q.url=$.originalUrl;else{let X=$.path;Q.url=typeof X==="string"?X:$.url?$.url.path||$.url:void 0}if($.query)Q.query=$.query;if($.params)Q.params=$.params;return Q.headers=$.headers,Q.remoteAddress=J&&J.remoteAddress,Q.remotePort=J&&J.remotePort,Q.raw=$.raw||$,Q}function NG($){return{req:i5($)}}});var t5=L((KL,a5)=>{a5.exports={mapHttpResponse:wG,resSerializer:r5};var p4=Symbol("pino-raw-res-ref"),o5=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[p4]},set:function($){this[p4]=$}}});Object.defineProperty(o5,p4,{writable:!0,value:{}});function r5($){let J=Object.create(o5);return J.statusCode=$.headersSent?$.statusCode:null,J.headers=$.getHeaders?$.getHeaders():$._headers,J.raw=$,J}function wG($){return{res:r5($)}}});var n4=L((IL,e5)=>{var i4=l5(),AG=d5(),J6=s5(),Q6=t5();e5.exports={err:i4,errWithCause:AG,mapHttpRequest:J6.mapHttpRequest,mapHttpResponse:Q6.mapHttpResponse,req:J6.reqSerializer,res:Q6.resSerializer,wrapErrorSerializer:function(J){if(J===i4)return J;return function(X){return J(i4(X))}},wrapRequestSerializer:function(J){if(J===J6.reqSerializer)return J;return function(X){return J(J6.reqSerializer(X))}},wrapResponseSerializer:function(J){if(J===Q6.resSerializer)return J;return function(X){return J(Q6.resSerializer(X))}}}});var s4=L((TL,$7)=>{function jG($,J){return J}$7.exports=function(){let J=Error.prepareStackTrace;Error.prepareStackTrace=jG;let Q=Error().stack;if(Error.prepareStackTrace=J,!Array.isArray(Q))return;let X=Q.slice(2),Y=[];for(let W of X){if(!W)continue;Y.push(W.getFileName())}return Y}});var H7=L((bL,W7)=>{function o4($){if($===null||typeof $!=="object")return $;if($ instanceof Date)return new Date($.getTime());if($ instanceof Array){let J=[];for(let Q=0;Q<$.length;Q++)J[Q]=o4($[Q]);return J}if(typeof $==="object"){let J=Object.create(Object.getPrototypeOf($));for(let Q in $)if(Object.prototype.hasOwnProperty.call($,Q))J[Q]=o4($[Q]);return J}return $}function J7($){let J=[],Q="",X=!1,Y=!1,W="";for(let H=0;H<$.length;H++){let G=$[H];if(!X&&G==="."){if(Q)J.push(Q),Q=""}else if(G==="["){if(Q)J.push(Q),Q="";X=!0}else if(G==="]"&&X)J.push(Q),Q="",X=!1,Y=!1;else if((G==='"'||G==="'")&&X)if(!Y)Y=!0,W=G;else if(G===W)Y=!1,W="";else Q+=G;else Q+=G}if(Q)J.push(Q);return J}function Q7($,J,Q){let X=$;for(let W=0;W<J.length-1;W++){let H=J[W];if(typeof X!=="object"||X===null||!(H in X))return!1;if(typeof X[H]!=="object"||X[H]===null)return!1;X=X[H]}let Y=J[J.length-1];if(Y==="*"){if(Array.isArray(X))for(let W=0;W<X.length;W++)X[W]=Q;else if(typeof X==="object"&&X!==null){for(let W in X)if(Object.prototype.hasOwnProperty.call(X,W))X[W]=Q}}else if(typeof X==="object"&&X!==null&&Y in X&&Object.prototype.hasOwnProperty.call(X,Y))X[Y]=Q;return!0}function X7($,J){let Q=$;for(let Y=0;Y<J.length-1;Y++){let W=J[Y];if(typeof Q!=="object"||Q===null||!(W in Q))return!1;if(typeof Q[W]!=="object"||Q[W]===null)return!1;Q=Q[W]}let X=J[J.length-1];if(X==="*"){if(Array.isArray(Q))for(let Y=0;Y<Q.length;Y++)Q[Y]=void 0;else if(typeof Q==="object"&&Q!==null){for(let Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))delete Q[Y]}}else if(typeof Q==="object"&&Q!==null&&X in Q&&Object.prototype.hasOwnProperty.call(Q,X))delete Q[X];return!0}var X6=Symbol("PATH_NOT_FOUND");function EG($,J){let Q=$;for(let X of J){if(Q===null||Q===void 0)return X6;if(typeof Q!=="object"||Q===null)return X6;if(!(X in Q))return X6;Q=Q[X]}return Q}function LG($,J){let Q=$;for(let X of J){if(Q===null||Q===void 0)return;if(typeof Q!=="object"||Q===null)return;Q=Q[X]}return Q}function OG($,J,Q,X=!1){for(let Y of J){let W=J7(Y);if(W.includes("*"))Y7($,W,Q,Y,X);else if(X)X7($,W);else{let H=EG($,W);if(H===X6)continue;let G=typeof Q==="function"?Q(H,W):Q;Q7($,W,G)}}}function Y7($,J,Q,X,Y=!1){let W=J.indexOf("*");if(W===J.length-1){let H=J.slice(0,-1),G=$;for(let V of H){if(G===null||G===void 0)return;if(typeof G!=="object"||G===null)return;G=G[V]}if(Array.isArray(G))if(Y)for(let V=0;V<G.length;V++)G[V]=void 0;else for(let V=0;V<G.length;V++){let U=[...H,V.toString()],q=typeof Q==="function"?Q(G[V],U):Q;G[V]=q}else if(typeof G==="object"&&G!==null)if(Y){let V=[];for(let U in G)if(Object.prototype.hasOwnProperty.call(G,U))V.push(U);for(let U of V)delete G[U]}else for(let V in G){let U=[...H,V],q=typeof Q==="function"?Q(G[V],U):Q;G[V]=q}}else RG($,J,Q,W,X,Y)}function RG($,J,Q,X,Y,W=!1){let H=J.slice(0,X),G=J.slice(X+1),V=[];function U(q,_){if(_===H.length){if(Array.isArray(q))for(let F=0;F<q.length;F++)V[_]=F.toString(),U(q[F],_+1);else if(typeof q==="object"&&q!==null)for(let F in q)V[_]=F,U(q[F],_+1)}else if(_<H.length){let F=H[_];if(q&&typeof q==="object"&&q!==null&&F in q)V[_]=F,U(q[F],_+1)}else if(G.includes("*"))Y7(q,G,typeof Q==="function"?(B,D)=>{let A=[...V.slice(0,_),...D];return Q(B,A)}:Q,Y,W);else if(W)X7(q,G);else{let F=typeof Q==="function"?Q(LG(q,G),[...V.slice(0,_),...G]):Q;Q7(q,G,F)}}if(H.length===0)U($,0);else{let q=$;for(let _=0;_<H.length;_++){let F=H[_];if(q===null||q===void 0)return;if(typeof q!=="object"||q===null)return;q=q[F],V[_]=F}if(q!==null&&q!==void 0)U(q,H.length)}}function ZG($){if($.length===0)return null;let J=new Map;for(let Q of $){let X=J7(Q),Y=J;for(let W=0;W<X.length;W++){let H=X[W];if(!Y.has(H))Y.set(H,new Map);Y=Y.get(H)}}return J}function SG($,J){if(!J)return $;function Q(X,Y,W=0){if(!Y||Y.size===0)return X;if(X===null||typeof X!=="object")return X;if(X instanceof Date)return new Date(X.getTime());if(Array.isArray(X)){let G=[];for(let V=0;V<X.length;V++){let U=V.toString();if(Y.has(U)||Y.has("*"))G[V]=Q(X[V],Y.get(U)||Y.get("*"));else G[V]=X[V]}return G}let H=Object.create(Object.getPrototypeOf(X));for(let G in X)if(Object.prototype.hasOwnProperty.call(X,G))if(Y.has(G)||Y.has("*"))H[G]=Q(X[G],Y.get(G)||Y.get("*"));else H[G]=X[G];return H}return Q($,J)}function CG($){if(typeof $!=="string")throw Error("Paths must be (non-empty) strings");if($==="")throw Error("Invalid redaction path ()");if($.includes(".."))throw Error(`Invalid redaction path (${$})`);if($.includes(","))throw Error(`Invalid redaction path (${$})`);let J=0,Q=!1,X="";for(let Y=0;Y<$.length;Y++){let W=$[Y];if((W==='"'||W==="'")&&J>0){if(!Q)Q=!0,X=W;else if(W===X)Q=!1,X=""}else if(W==="["&&!Q)J++;else if(W==="]"&&!Q){if(J--,J<0)throw Error(`Invalid redaction path (${$})`)}}if(J!==0)throw Error(`Invalid redaction path (${$})`)}function MG($){if(!Array.isArray($))throw TypeError("paths must be an array");for(let J of $)CG(J)}function PG($={}){let{paths:J=[],censor:Q="[REDACTED]",serialize:X=JSON.stringify,strict:Y=!0,remove:W=!1}=$;MG(J);let H=ZG(J);return function(V){if(Y&&(V===null||typeof V!=="object")){if(V===null||V===void 0)return X?X(V):V;if(typeof V!=="object")return X?X(V):V}let U=SG(V,H),q=V,_=Q;if(typeof Q==="function")_=Q;if(OG(U,J,_,W),X===!1)return U.restore=function(){return o4(q)},U;if(typeof X==="function")return X(U);return JSON.stringify(U)}}W7.exports=PG});var U$=L((fL,G7)=>{var KG=Symbol("pino.setLevel"),IG=Symbol("pino.getLevel"),TG=Symbol("pino.levelVal"),bG=Symbol("pino.levelComp"),fG=Symbol("pino.useLevelLabels"),kG=Symbol("pino.useOnlyCustomLevels"),xG=Symbol("pino.mixin"),vG=Symbol("pino.lsCache"),hG=Symbol("pino.chindings"),gG=Symbol("pino.asJson"),yG=Symbol("pino.write"),uG=Symbol("pino.redactFmt"),mG=Symbol("pino.time"),lG=Symbol("pino.timeSliceIndex"),cG=Symbol("pino.stream"),dG=Symbol("pino.stringify"),pG=Symbol("pino.stringifySafe"),iG=Symbol("pino.stringifiers"),nG=Symbol("pino.end"),sG=Symbol("pino.formatOpts"),oG=Symbol("pino.messageKey"),rG=Symbol("pino.errorKey"),aG=Symbol("pino.nestedKey"),tG=Symbol("pino.nestedKeyStr"),eG=Symbol("pino.mixinMergeStrategy"),$V=Symbol("pino.msgPrefix"),JV=Symbol("pino.wildcardFirst"),QV=Symbol.for("pino.serializers"),XV=Symbol.for("pino.formatters"),YV=Symbol.for("pino.hooks"),WV=Symbol.for("pino.metadata");G7.exports={setLevelSym:KG,getLevelSym:IG,levelValSym:TG,levelCompSym:bG,useLevelLabelsSym:fG,mixinSym:xG,lsCacheSym:vG,chindingsSym:hG,asJsonSym:gG,writeSym:yG,serializersSym:QV,redactFmtSym:uG,timeSym:mG,timeSliceIndexSym:lG,streamSym:cG,stringifySym:dG,stringifySafeSym:pG,stringifiersSym:iG,endSym:nG,formatOptsSym:sG,messageKeySym:oG,errorKeySym:rG,nestedKeySym:aG,wildcardFirstSym:JV,needsMetadataGsym:WV,useOnlyCustomLevelsSym:kG,formattersSym:XV,hooksSym:YV,nestedKeyStrSym:tG,mixinMergeStrategySym:eG,msgPrefixSym:$V}});var a4=L((kL,U7)=>{var V7=H7(),{redactFmtSym:HV,wildcardFirstSym:Y6}=U$(),r4=/[^.[\]]+|\[([^[\]]*?)\]/g;function GV($,J){let{paths:Q,censor:X,remove:Y}=VV($),W=Q.reduce((V,U)=>{r4.lastIndex=0;let q=r4.exec(U),_=r4.exec(U),F=q[1]!==void 0?q[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):q[0];if(F==="*")F=Y6;if(_===null)return V[F]=null,V;if(V[F]===null)return V;let{index:B}=_,D=`${U.substr(B,U.length-1)}`;if(V[F]=V[F]||[],F!==Y6&&V[F].length===0)V[F].push(...V[Y6]||[]);if(F===Y6)Object.keys(V).forEach(function(A){if(V[A])V[A].push(D)});return V[F].push(D),V},{}),H={[HV]:V7({paths:Q,censor:X,serialize:J,strict:!1,remove:Y})},G=(...V)=>{return typeof X==="function"?J(X(...V)):J(X)};return[...Object.keys(W),...Object.getOwnPropertySymbols(W)].reduce((V,U)=>{if(W[U]===null)V[U]=(q)=>G(q,[U]);else{let q=typeof X==="function"?(_,F)=>{return X(_,[U,...F])}:X;V[U]=V7({paths:W[U],censor:q,serialize:J,strict:!1,remove:Y})}return V},H)}function VV($){if(Array.isArray($))return $={paths:$,censor:"[Redacted]"},$;let{paths:J,censor:Q="[Redacted]",remove:X}=$;if(Array.isArray(J)===!1)throw Error("pino \u2013 redact must contain an array of strings");if(X===!0)Q=void 0;return{paths:J,censor:Q,remove:X}}U7.exports=GV});var D7=L((xL,_7)=>{var UV=()=>"",qV=()=>`,"time":${Date.now()}`,_V=()=>`,"time":${Math.round(Date.now()/1000)}`,DV=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,BV=1000000n,q7=1000000000n,FV=BigInt(Date.now())*BV,zV=process.hrtime.bigint(),NV=()=>{let $=process.hrtime.bigint()-zV,J=FV+$,Q=J/q7,X=J%q7,Y=Number(Q*1000n+X/1000000n),W=new Date(Y),H=W.getUTCFullYear(),G=(W.getUTCMonth()+1).toString().padStart(2,"0"),V=W.getUTCDate().toString().padStart(2,"0"),U=W.getUTCHours().toString().padStart(2,"0"),q=W.getUTCMinutes().toString().padStart(2,"0"),_=W.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${H}-${G}-${V}T${U}:${q}:${_}.${X.toString().padStart(9,"0")}Z"`};_7.exports={nullTime:UV,epochTime:qV,unixTime:_V,isoTime:DV,isoTimeNano:NV}});var F7=L((vL,B7)=>{function wV($){try{return JSON.stringify($)}catch(J){return'"[Circular]"'}}B7.exports=AV;function AV($,J,Q){var X=Q&&Q.stringify||wV,Y=1;if(typeof $==="object"&&$!==null){var W=J.length+Y;if(W===1)return $;var H=Array(W);H[0]=X($);for(var G=1;G<W;G++)H[G]=X(J[G]);return H.join(" ")}if(typeof $!=="string")return $;var V=J.length;if(V===0)return $;var U="",q=1-Y,_=-1,F=$&&$.length||0;for(var B=0;B<F;){if($.charCodeAt(B)===37&&B+1<F){switch(_=_>-1?_:0,$.charCodeAt(B+1)){case 100:case 102:if(q>=V)break;if(J[q]==null)break;if(_<B)U+=$.slice(_,B);U+=Number(J[q]),_=B+2,B++;break;case 105:if(q>=V)break;if(J[q]==null)break;if(_<B)U+=$.slice(_,B);U+=Math.floor(Number(J[q])),_=B+2,B++;break;case 79:case 111:case 106:if(q>=V)break;if(J[q]===void 0)break;if(_<B)U+=$.slice(_,B);var D=typeof J[q];if(D==="string"){U+="'"+J[q]+"'",_=B+2,B++;break}if(D==="function"){U+=J[q].name||"<anonymous>",_=B+2,B++;break}U+=X(J[q]),_=B+2,B++;break;case 115:if(q>=V)break;if(_<B)U+=$.slice(_,B);U+=String(J[q]),_=B+2,B++;break;case 37:if(_<B)U+=$.slice(_,B);U+="%",_=B+2,B++,q--;break}++q}++B}if(_===-1)return $;else if(_<F)U+=$.slice(_);return U}});var e4=L((hL,t4)=>{if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let J=function(Q){if((Q>0&&Q<1/0)===!1){if(typeof Q!=="number"&&typeof Q!=="bigint")throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}Atomics.wait($,0,0,Number(Q))},$=new Int32Array(new SharedArrayBuffer(4));t4.exports=J}else{let $=function(J){if((J>0&&J<1/0)===!1){if(typeof J!=="number"&&typeof J!=="bigint")throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}let X=Date.now()+Number(J);while(X>Date.now());};t4.exports=$}});var E7=L((gL,j7)=>{var w0=o("fs"),jV=o("events"),EV=o("util").inherits,z7=o("path"),J8=e4(),LV=o("assert"),W6=Buffer.allocUnsafe(0),[OV,RV]=(process.versions.node||"0.0").split(".").map(Number),ZV=OV>=22&&RV>=7;function N7($,J){J._opening=!0,J._writing=!0,J._asyncDrainScheduled=!1;function Q(W,H){if(W){if(J._reopening=!1,J._writing=!1,J._opening=!1,J.sync)process.nextTick(()=>{if(J.listenerCount("error")>0)J.emit("error",W)});else J.emit("error",W);return}let G=J._reopening;if(J.fd=H,J.file=$,J._reopening=!1,J._opening=!1,J._writing=!1,J.sync)process.nextTick(()=>J.emit("ready"));else J.emit("ready");if(J.destroyed)return;if(!J._writing&&J._len>J.minLength||J._flushPending)J._actualWrite();else if(G)process.nextTick(()=>J.emit("drain"))}let X=J.append?"a":"w",Y=J.mode;if(J.sync)try{if(J.mkdir)w0.mkdirSync(z7.dirname($),{recursive:!0});let W=w0.openSync($,X,Y);Q(null,W)}catch(W){throw Q(W),W}else if(J.mkdir)w0.mkdir(z7.dirname($),{recursive:!0},(W)=>{if(W)return Q(W);w0.open($,X,Y,Q)});else w0.open($,X,Y,Q)}function m0($){if(!(this instanceof m0))return new m0($);let{fd:J,dest:Q,minLength:X,maxLength:Y,maxWrite:W,periodicFlush:H,sync:G,append:V=!0,mkdir:U,retryEAGAIN:q,fsync:_,contentMode:F,mode:B}=$||{};J=J||Q,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(X||0,16387),this.file=null,this.destroyed=!1,this.minLength=X||0,this.maxLength=Y||0,this.maxWrite=W||16384,this._periodicFlush=H||0,this._periodicFlushTimer=void 0,this.sync=G||!1,this.writable=!0,this._fsync=_||!1,this.append=V||!1,this.mode=B,this.retryEAGAIN=q||(()=>!0),this.mkdir=U||!1;let D,A;if(F==="buffer")this._writingBuf=W6,this.write=MV,this.flush=KV,this.flushSync=TV,this._actualWrite=fV,D=()=>w0.writeSync(this.fd,this._writingBuf),A=()=>w0.write(this.fd,this._writingBuf,this.release);else if(F===void 0||F==="utf8")this._writingBuf="",this.write=CV,this.flush=PV,this.flushSync=IV,this._actualWrite=bV,D=()=>w0.writeSync(this.fd,this._writingBuf,"utf8"),A=()=>w0.write(this.fd,this._writingBuf,"utf8",this.release);else throw Error(`SonicBoom supports "utf8" and "buffer", but passed ${F}`);if(typeof J==="number")this.fd=J,process.nextTick(()=>this.emit("ready"));else if(typeof J==="string")N7(J,this);else throw Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);if(this.release=(Z,C)=>{if(Z){if((Z.code==="EAGAIN"||Z.code==="EBUSY")&&this.retryEAGAIN(Z,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{J8(100),this.release(void 0,0)}catch(y){this.release(y)}else setTimeout(A,100);else this._writing=!1,this.emit("error",Z);return}this.emit("write",C);let T=$8(this._writingBuf,this._len,C);if(this._len=T.len,this._writingBuf=T.writingBuf,this._writingBuf.length){if(!this.sync){A();return}try{do{let y=D(),s=$8(this._writingBuf,this._len,y);this._len=s.len,this._writingBuf=s.writingBuf}while(this._writingBuf.length)}catch(y){this.release(y);return}}if(this._fsync)w0.fsyncSync(this.fd);let K=this._len;if(this._reopening)this._writing=!1,this._reopening=!1,this.reopen();else if(K>this.minLength)this._actualWrite();else if(this._ending)if(K>0)this._actualWrite();else this._writing=!1,H6(this);else if(this._writing=!1,this.sync){if(!this._asyncDrainScheduled)this._asyncDrainScheduled=!0,process.nextTick(SV,this)}else this.emit("drain")},this.on("newListener",function(Z){if(Z==="drain")this._asyncDrainScheduled=!1}),this._periodicFlush!==0)this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref()}function $8($,J,Q){if(typeof $==="string"&&Buffer.byteLength($)!==Q)Q=Buffer.from($).subarray(0,Q).toString().length;return J=Math.max(J-Q,0),$=$.slice(Q),{writingBuf:$,len:J}}function SV($){if(!($.listenerCount("drain")>0))return;$._asyncDrainScheduled=!1,$.emit("drain")}EV(m0,jV);function w7($,J){if($.length===0)return W6;if($.length===1)return $[0];return Buffer.concat($,J)}function CV($){if(this.destroyed)throw Error("SonicBoom destroyed");let J=this._len+$.length,Q=this._bufs;if(this.maxLength&&J>this.maxLength)return this.emit("drop",$),this._len<this._hwm;if(Q.length===0||Q[Q.length-1].length+$.length>this.maxWrite)Q.push(""+$);else Q[Q.length-1]+=$;if(this._len=J,!this._writing&&this._len>=this.minLength)this._actualWrite();return this._len<this._hwm}function MV($){if(this.destroyed)throw Error("SonicBoom destroyed");let J=this._len+$.length,Q=this._bufs,X=this._lens;if(this.maxLength&&J>this.maxLength)return this.emit("drop",$),this._len<this._hwm;if(Q.length===0||X[X.length-1]+$.length>this.maxWrite)Q.push([$]),X.push($.length);else Q[Q.length-1].push($),X[X.length-1]+=$.length;if(this._len=J,!this._writing&&this._len>=this.minLength)this._actualWrite();return this._len<this._hwm}function A7($){this._flushPending=!0;let J=()=>{if(!this._fsync)try{w0.fsync(this.fd,(X)=>{this._flushPending=!1,$(X)})}catch(X){$(X)}else this._flushPending=!1,$();this.off("error",Q)},Q=(X)=>{this._flushPending=!1,$(X),this.off("drain",J)};this.once("drain",J),this.once("error",Q)}function PV($){if($!=null&&typeof $!=="function")throw Error("flush cb must be a function");if(this.destroyed){let J=Error("SonicBoom destroyed");if($){$(J);return}throw J}if(this.minLength<=0){$?.();return}if($)A7.call(this,$);if(this._writing)return;if(this._bufs.length===0)this._bufs.push("");this._actualWrite()}function KV($){if($!=null&&typeof $!=="function")throw Error("flush cb must be a function");if(this.destroyed){let J=Error("SonicBoom destroyed");if($){$(J);return}throw J}if(this.minLength<=0){$?.();return}if($)A7.call(this,$);if(this._writing)return;if(this._bufs.length===0)this._bufs.push([]),this._lens.push(0);this._actualWrite()}m0.prototype.reopen=function($){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen($)});return}if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if($)this.file=$;if(this._reopening=!0,this._writing)return;let J=this.fd;this.once("ready",()=>{if(J!==this.fd)w0.close(J,(Q)=>{if(Q)return this.emit("error",Q)})}),N7(this.file,this)};m0.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}if(this._ending)return;if(this._ending=!0,this._writing)return;if(this._len>0&&this.fd>=0)this._actualWrite();else H6(this)};function IV(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");if(!this._writing&&this._writingBuf.length>0)this._bufs.unshift(this._writingBuf),this._writingBuf="";let $="";while(this._bufs.length||$){if($.length<=0)$=this._bufs[0];try{let J=w0.writeSync(this.fd,$,"utf8"),Q=$8($,this._len,J);if($=Q.writingBuf,this._len=Q.len,$.length<=0)this._bufs.shift()}catch(J){if((J.code==="EAGAIN"||J.code==="EBUSY")&&!this.retryEAGAIN(J,$.length,this._len-$.length))throw J;J8(100)}}try{w0.fsyncSync(this.fd)}catch{}}function TV(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");if(!this._writing&&this._writingBuf.length>0)this._bufs.unshift([this._writingBuf]),this._writingBuf=W6;let $=W6;while(this._bufs.length||$.length){if($.length<=0)$=w7(this._bufs[0],this._lens[0]);try{let J=w0.writeSync(this.fd,$);if($=$.subarray(J),this._len=Math.max(this._len-J,0),$.length<=0)this._bufs.shift(),this._lens.shift()}catch(J){if((J.code==="EAGAIN"||J.code==="EBUSY")&&!this.retryEAGAIN(J,$.length,this._len-$.length))throw J;J8(100)}}}m0.prototype.destroy=function(){if(this.destroyed)return;H6(this)};function bV(){let $=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let J=w0.writeSync(this.fd,this._writingBuf,"utf8");$(null,J)}catch(J){$(J)}else w0.write(this.fd,this._writingBuf,"utf8",$)}function fV(){let $=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:w7(this._bufs.shift(),this._lens.shift()),this.sync)try{let J=w0.writeSync(this.fd,this._writingBuf);$(null,J)}catch(J){$(J)}else{if(ZV)this._writingBuf=Buffer.from(this._writingBuf);w0.write(this.fd,this._writingBuf,$)}}function H6($){if($.fd===-1){$.once("ready",H6.bind(null,$));return}if($._periodicFlushTimer!==void 0)clearInterval($._periodicFlushTimer);$.destroyed=!0,$._bufs=[],$._lens=[],LV(typeof $.fd==="number",`sonic.fd must be a number, got ${typeof $.fd}`);try{w0.fsync($.fd,J)}catch{}function J(){if($.fd!==1&&$.fd!==2)w0.close($.fd,Q);else Q()}function Q(X){if(X){$.emit("error",X);return}if($._ending&&!$._writing)$.emit("finish");$.emit("close")}}m0.SonicBoom=m0;m0.default=m0;j7.exports=m0});var Q8=L((yL,S7)=>{var l0={exit:[],beforeExit:[]},L7={exit:vV,beforeExit:hV},q$;function kV(){if(q$===void 0)q$=new FinalizationRegistry(gV)}function xV($){if(l0[$].length>0)return;process.on($,L7[$])}function O7($){if(l0[$].length>0)return;if(process.removeListener($,L7[$]),l0.exit.length===0&&l0.beforeExit.length===0)q$=void 0}function vV(){R7("exit")}function hV(){R7("beforeExit")}function R7($){for(let J of l0[$]){let Q=J.deref(),X=J.fn;if(Q!==void 0)X(Q,$)}l0[$]=[]}function gV($){for(let J of["exit","beforeExit"]){let Q=l0[J].indexOf($);l0[J].splice(Q,Q+1),O7(J)}}function Z7($,J,Q){if(J===void 0)throw Error("the object can't be undefined");xV($);let X=new WeakRef(J);X.fn=Q,kV(),q$.register(J,X),l0[$].push(X)}function yV($,J){Z7("exit",$,J)}function uV($,J){Z7("beforeExit",$,J)}function mV($){if(q$===void 0)return;q$.unregister($);for(let J of["exit","beforeExit"])l0[J]=l0[J].filter((Q)=>{let X=Q.deref();return X&&X!==$}),O7(J)}S7.exports={register:yV,registerBeforeExit:uV,unregister:mV}});var C7=L((uL,lV)=>{lV.exports={name:"thread-stream",version:"4.0.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",engines:{node:">=20"},dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^22.0.0","@yao-pkg/pkg":"^6.0.0",borp:"^0.21.0",desm:"^1.3.0",eslint:"^9.39.1",fastbench:"^1.0.1",husky:"^9.0.6",neostandard:"^0.12.2","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1","ts-node":"^10.8.0",typescript:"~5.7.3"},scripts:{build:"tsc --noEmit",lint:"eslint",test:"npm run lint && npm run build && npm run transpile && borp --pattern 'test/*.test.{js,mjs}'","test:ci":"npm run lint && npm run transpile && borp --pattern 'test/*.test.{js,mjs}'","test:yarn":"npm run transpile && borp --pattern 'test/*.test.js'",transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var P7=L((mL,M7)=>{function cV($,J,Q,X,Y){let W=X===1/0?1/0:Date.now()+X,H=()=>{let G=Atomics.load($,J);if(G===Q){Y(null,"ok");return}if(W!==1/0&&Date.now()>W){Y(null,"timed-out");return}let V=W===1/0?1e4:Math.min(1e4,Math.max(1,W-Date.now())),U=Atomics.waitAsync($,J,G,V);if(U.async)U.value.then(H);else setImmediate(H)};H()}function dV($,J,Q,X,Y){let W=X===1/0?1/0:Date.now()+X,H=()=>{if(Atomics.load($,J)!==Q){Y(null,"ok");return}if(W!==1/0&&Date.now()>W){Y(null,"timed-out");return}let V=W===1/0?1e4:Math.min(1e4,Math.max(1,W-Date.now())),U=Atomics.waitAsync($,J,Q,V);if(U.async)U.value.then(H);else setImmediate(H)};H()}M7.exports={wait:cV,waitDiff:dV}});var I7=L((lL,K7)=>{K7.exports={WRITE_INDEX:4,READ_INDEX:8}});var v7=L((cL,x7)=>{var __dirname="C:\\Users\\mejia\\Documents\\ts\\Veloce-TS\\node_modules\\thread-stream",{version:pV}=C7(),{EventEmitter:iV}=o("events"),{Worker:nV}=o("worker_threads"),{join:sV}=o("path"),{pathToFileURL:oV}=o("url"),{wait:rV}=P7(),{WRITE_INDEX:b0,READ_INDEX:T0}=I7(),aV=o("buffer"),tV=o("assert"),E=Symbol("kImpl"),eV=aV.constants.MAX_STRING_LENGTH;class V6{constructor($){this._value=$}deref(){return this._value}}class Y8{register(){}unregister(){}}var $U=process.env.NODE_V8_COVERAGE?Y8:global.FinalizationRegistry||Y8,JU=process.env.NODE_V8_COVERAGE?V6:global.WeakRef||V6,T7=new $U(($)=>{if($.exited)return;$.terminate()});function QU($,J){let{filename:Q,workerData:X}=J,W=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||sV(__dirname,"lib","worker.js"),H=new nV(W,{...J.workerOpts,trackUnmanagedFds:!1,workerData:{filename:Q.indexOf("file://")===0?Q:oV(Q).href,dataBuf:$[E].dataBuf,stateBuf:$[E].stateBuf,workerData:{$context:{threadStreamVersion:pV},...X}}});return H.stream=new V6($),H.on("message",XU),H.on("exit",f7),T7.register($,H),H}function b7($){if(tV(!$[E].sync),$[E].needDrain)$[E].needDrain=!1,$.emit("drain")}function G6($){let J=Atomics.load($[E].state,b0),Q=$[E].data.length-J;if(Q>0){if($[E].buf.length===0){if($[E].flushing=!1,$[E].ending)G8($);else if($[E].needDrain)process.nextTick(b7,$);return}let X=$[E].buf.slice(0,Q),Y=Buffer.byteLength(X);if(Y<=Q)$[E].buf=$[E].buf.slice(Q),U6($,X,G6.bind(null,$));else $.flush(()=>{if($.destroyed)return;Atomics.store($[E].state,T0,0),Atomics.store($[E].state,b0,0),Atomics.notify($[E].state,T0);while(Y>$[E].data.length)Q=Q/2,X=$[E].buf.slice(0,Q),Y=Buffer.byteLength(X);$[E].buf=$[E].buf.slice(Q),U6($,X,G6.bind(null,$))})}else if(Q===0){if(J===0&&$[E].buf.length===0)return;$.flush(()=>{Atomics.store($[E].state,T0,0),Atomics.store($[E].state,b0,0),Atomics.notify($[E].state,T0),G6($)})}else X1($,Error("overwritten"))}function XU($){let J=this.stream.deref();if(J===void 0){this.exited=!0,this.terminate();return}switch($.code){case"READY":this.stream=new JU(J),J.flush(()=>{J[E].ready=!0,J.emit("ready")});break;case"ERROR":X1(J,$.err);break;case"EVENT":if(Array.isArray($.args))J.emit($.name,...$.args);else J.emit($.name,$.args);break;case"WARNING":process.emitWarning($.err);break;default:X1(J,Error("this should not happen: "+$.code))}}function f7($){let J=this.stream.deref();if(J===void 0)return;T7.unregister(J),J.worker.exited=!0,J.worker.off("exit",f7),X1(J,$!==0?Error("the worker thread exited"):null)}class k7 extends iV{constructor($={}){super();if($.bufferSize<4)throw Error("bufferSize must at least fit a 4-byte utf-8 char");this[E]={},this[E].stateBuf=new SharedArrayBuffer(128),this[E].state=new Int32Array(this[E].stateBuf),this[E].dataBuf=new SharedArrayBuffer($.bufferSize||4194304),this[E].data=Buffer.from(this[E].dataBuf),this[E].sync=$.sync||!1,this[E].ending=!1,this[E].ended=!1,this[E].needDrain=!1,this[E].destroyed=!1,this[E].flushing=!1,this[E].ready=!1,this[E].finished=!1,this[E].errored=null,this[E].closed=!1,this[E].buf="",this.worker=QU(this,$),this.on("message",(J,Q)=>{this.worker.postMessage(J,Q)})}write($){if(this[E].destroyed)return W8(this,Error("the worker has exited")),!1;if(this[E].ending)return W8(this,Error("the worker is ending")),!1;if(this[E].flushing&&this[E].buf.length+$.length>=eV)try{X8(this),this[E].flushing=!0}catch(J){return X1(this,J),!1}if(this[E].buf+=$,this[E].sync)try{return X8(this),!0}catch(J){return X1(this,J),!1}if(!this[E].flushing)this[E].flushing=!0,setImmediate(G6,this);return this[E].needDrain=this[E].data.length-this[E].buf.length-Atomics.load(this[E].state,b0)<=0,!this[E].needDrain}end(){if(this[E].destroyed)return;this[E].ending=!0,G8(this)}flush($){if(this[E].destroyed){if(typeof $==="function")process.nextTick($,Error("the worker has exited"));return}let J=Atomics.load(this[E].state,b0);rV(this[E].state,T0,J,1/0,(Q,X)=>{if(Q){X1(this,Q),process.nextTick($,Q);return}if(X==="not-equal"){this.flush($);return}process.nextTick($)})}flushSync(){if(this[E].destroyed)return;X8(this),H8(this)}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[E].ready}get destroyed(){return this[E].destroyed}get closed(){return this[E].closed}get writable(){return!this[E].destroyed&&!this[E].ending}get writableEnded(){return this[E].ending}get writableFinished(){return this[E].finished}get writableNeedDrain(){return this[E].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[E].errored}}function W8($,J){setImmediate(()=>{$.emit("error",J)})}function X1($,J){if($[E].destroyed)return;if($[E].destroyed=!0,J)$[E].errored=J,W8($,J);if(!$.worker.exited)$.worker.terminate().catch(()=>{}).then(()=>{$[E].closed=!0,$.emit("close")});else setImmediate(()=>{$[E].closed=!0,$.emit("close")})}function U6($,J,Q){let X=Atomics.load($[E].state,b0),Y=Buffer.byteLength(J);return $[E].data.write(J,X),Atomics.store($[E].state,b0,X+Y),Atomics.notify($[E].state,b0),Q(),!0}function G8($){if($[E].ended||!$[E].ending||$[E].flushing)return;$[E].ended=!0;try{$.flushSync();let J=Atomics.load($[E].state,T0);Atomics.store($[E].state,b0,-1),Atomics.notify($[E].state,b0);let Q=0;while(J!==-1){if(Atomics.wait($[E].state,T0,J,1000),J=Atomics.load($[E].state,T0),J===-2){X1($,Error("end() failed"));return}if(++Q===10){X1($,Error("end() took too long (10s)"));return}}process.nextTick(()=>{$[E].finished=!0,$.emit("finish")})}catch(J){X1($,J)}}function X8($){let J=()=>{if($[E].ending)G8($);else if($[E].needDrain)process.nextTick(b7,$)};$[E].flushing=!1;while($[E].buf.length!==0){let Q=Atomics.load($[E].state,b0),X=$[E].data.length-Q;if(X===0){H8($),Atomics.store($[E].state,T0,0),Atomics.store($[E].state,b0,0),Atomics.notify($[E].state,T0);continue}else if(X<0)throw Error("overwritten");let Y=$[E].buf.slice(0,X),W=Buffer.byteLength(Y);if(W<=X)$[E].buf=$[E].buf.slice(X),U6($,Y,J);else{H8($),Atomics.store($[E].state,T0,0),Atomics.store($[E].state,b0,0),Atomics.notify($[E].state,T0);while(W>$[E].buf.length)X=X/2,Y=$[E].buf.slice(0,X),W=Buffer.byteLength(Y);$[E].buf=$[E].buf.slice(X),U6($,Y,J)}}}function H8($){if($[E].flushing)throw Error("unable to flush while flushing");let J=Atomics.load($[E].state,b0),Q=0;while(!0){let X=Atomics.load($[E].state,T0);if(X===-2)throw Error("_flushSync failed");if(X!==J)Atomics.wait($[E].state,T0,X,1000);else break;if(++Q===10)throw Error("_flushSync took too long (10s)")}}x7.exports=k7});var q8=L((dL,y7)=>{var __dirname="C:\\Users\\mejia\\Documents\\ts\\Veloce-TS\\node_modules\\pino\\lib",{createRequire:YU}=o("module"),{existsSync:WU}=o("fs"),HU=s4(),{join:V8,isAbsolute:g7,sep:GU}=o("path"),{fileURLToPath:VU}=o("url"),UU=e4(),U8=Q8(),qU=v7();function _U($){U8.register($,NU),U8.registerBeforeExit($,wU),$.on("close",function(){U8.unregister($)})}function DU(){let $=process.execArgv;for(let J=0;J<$.length;J++){let Q=$[J];if(Q==="--import"||Q==="--require"||Q==="-r")return!0;if(Q.startsWith("--import=")||Q.startsWith("--require=")||Q.startsWith("-r="))return!0}return!1}function BU($){let J=$.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);if(!J)return $;let Q=[],X=!1;for(let Y=0;Y<J.length;Y++){let W=J[Y];if(W==="--require"||W==="-r"||W==="--import"){let H=J[Y+1];if(H&&h7(H)){X=!0,Y++;continue}if(Q.push(W),H)Q.push(H),Y++;continue}if(W.startsWith("--require=")||W.startsWith("-r=")||W.startsWith("--import=")){let H=W.slice(W.indexOf("=")+1);if(h7(H)){X=!0;continue}}Q.push(W)}return X?Q.join(" "):$}function h7($){let J=FU($);if(!J)return!1;let Q=J;if(Q.startsWith("file://"))try{Q=VU(Q)}catch{return!1}return g7(Q)&&!WU(Q)}function FU($){let J=$[0],Q=$[$.length-1];if(J==='"'&&Q==='"'||J==="'"&&Q==="'")return $.slice(1,-1);return $}function zU($,J,Q,X,Y){if(!Q.execArgv&&DU()&&o.main===void 0)Q={...Q,execArgv:[]};if(!Q.env&&process.env.NODE_OPTIONS){let V=BU(process.env.NODE_OPTIONS);if(V!==process.env.NODE_OPTIONS)Q={...Q,env:{...process.env,NODE_OPTIONS:V}}}Q={...Q,name:Y};let W=new qU({filename:$,workerData:J,workerOpts:Q,sync:X});W.on("ready",H),W.on("close",function(){process.removeListener("exit",G)}),process.on("exit",G);function H(){if(process.removeListener("exit",G),W.unref(),Q.autoEnd!==!1)_U(W)}function G(){if(W.closed)return;W.flushSync(),UU(100),W.end()}return W}function NU($){$.ref(),$.flushSync(),$.end(),$.once("close",function(){$.unref()})}function wU($){$.flushSync()}function AU($){let{pipeline:J,targets:Q,levels:X,dedupe:Y,worker:W={},caller:H=HU(),sync:G=!1}=$,V={...$.options},U=typeof H==="string"?[H]:H,q=typeof globalThis==="object"&&Object.prototype.hasOwnProperty.call(globalThis,"__bundlerPathsOverrides")&&globalThis.__bundlerPathsOverrides&&typeof globalThis.__bundlerPathsOverrides==="object"?globalThis.__bundlerPathsOverrides:Object.create(null),_=$.target;if(_&&Q)throw Error("only one of target or targets can be specified");if(Q)_=q["pino-worker"]||V8(__dirname,"worker.js"),V.targets=Q.filter((D)=>D.target).map((D)=>{return{...D,target:B(D.target)}}),V.pipelines=Q.filter((D)=>D.pipeline).map((D)=>{return D.pipeline.map((A)=>{return{...A,level:D.level,target:B(A.target)}})});else if(J)_=q["pino-worker"]||V8(__dirname,"worker.js"),V.pipelines=[J.map((D)=>{return{...D,target:B(D.target)}})];if(X)V.levels=X;if(Y)V.dedupe=Y;V.pinoWillSendConfig=!0;let F=Q||J?"pino.transport":_;return zU(B(_),V,W,G,F);function B(D){if(D=q[D]||D,g7(D)||D.indexOf("file://")===0)return D;if(D==="pino/file")return V8(__dirname,"..","file.js");let A;for(let Z of U)try{let C=Z==="node:repl"?process.cwd()+GU:Z;A=YU(C).resolve(D);break}catch(C){continue}if(!A)throw Error(`unable to determine transport target for "${D}"`);return A}}y7.exports=AU});var D6=L((iL,t7)=>{var jU=o("diagnostics_channel"),u7=F7(),{mapHttpRequest:EU,mapHttpResponse:LU}=n4(),D8=E7(),m7=Q8(),{lsCacheSym:OU,chindingsSym:i7,writeSym:l7,serializersSym:n7,formatOptsSym:c7,endSym:RU,stringifiersSym:s7,stringifySym:o7,stringifySafeSym:B8,wildcardFirstSym:r7,nestedKeySym:ZU,formattersSym:a7,messageKeySym:SU,errorKeySym:CU,nestedKeyStrSym:MU,msgPrefixSym:q6}=U$(),{isMainThread:PU}=o("worker_threads"),KU=q8(),[IU]=process.versions.node.split(".").map(($)=>Number($)),d7=jU.tracingChannel("pino_asJson"),_8=IU>=25?($)=>JSON.stringify($):bU;function _$(){}function TU($,J){if(!J)return Q;return function(...Y){J.call(this,Y,Q,$)};function Q(X,...Y){if(typeof X==="object"){let W=X;if(X!==null){if(X.method&&X.headers&&X.socket)X=EU(X);else if(typeof X.setHeader==="function")X=LU(X)}let H;if(W===null&&Y.length===0)H=[null];else W=Y.shift(),H=Y;if(typeof this[q6]==="string"&&W!==void 0&&W!==null)W=this[q6]+W;this[l7](X,u7(W,H,this[c7]),$)}else{let W=X===void 0?Y.shift():X;if(typeof this[q6]==="string"&&W!==void 0&&W!==null)W=this[q6]+W;this[l7](null,u7(W,Y,this[c7]),$)}}}function bU($){let J="",Q=0,X=!1,Y=255,W=$.length;if(W>100)return JSON.stringify($);for(var H=0;H<W&&Y>=32;H++)if(Y=$.charCodeAt(H),Y===34||Y===92)J+=$.slice(Q,H)+"\\",Q=H,X=!0;if(!X)J=$;else J+=$.slice(Q);return Y<32?JSON.stringify($):'"'+J+'"'}function fU($,J,Q,X){if(d7.hasSubscribers===!1)return p7.call(this,$,J,Q,X);let Y={instance:this,arguments};return d7.traceSync(p7,Y,this,$,J,Q,X)}function p7($,J,Q,X){let Y=this[o7],W=this[B8],H=this[s7],G=this[RU],V=this[i7],U=this[n7],q=this[a7],_=this[SU],F=this[CU],B=this[OU][Q]+X;B=B+V;let D;if(q.log)$=q.log($);let A=H[r7],Z="";for(let T in $)if(D=$[T],Object.prototype.hasOwnProperty.call($,T)&&D!==void 0){if(U[T])D=U[T](D);else if(T===F&&U.err)D=U.err(D);let K=H[T]||A;switch(typeof D){case"undefined":case"function":continue;case"number":if(Number.isFinite(D)===!1)D=null;case"boolean":if(K)D=K(D);break;case"string":D=(K||_8)(D);break;default:D=(K||Y)(D,W)}if(D===void 0)continue;let y=_8(T);Z+=","+y+":"+D}let C="";if(J!==void 0){D=U[_]?U[_](J):J;let T=H[_]||A;switch(typeof D){case"function":break;case"number":if(Number.isFinite(D)===!1)D=null;case"boolean":if(T)D=T(D);C=',"'+_+'":'+D;break;case"string":D=(T||_8)(D),C=',"'+_+'":'+D;break;default:D=(T||Y)(D,W),C=',"'+_+'":'+D}}if(this[ZU]&&Z)return B+this[MU]+Z.slice(1)+"}"+C+G;else return B+Z+C+G}function kU($,J){let Q,X=$[i7],Y=$[o7],W=$[B8],H=$[s7],G=H[r7],V=$[n7],U=$[a7].bindings;J=U(J);for(let q in J)if(Q=J[q],((q.length<5||q!=="level"&&q!=="serializers"&&q!=="formatters"&&q!=="customLevels")&&J.hasOwnProperty(q)&&Q!==void 0)===!0){if(Q=V[q]?V[q](Q):Q,Q=(H[q]||G||Y)(Q,W),Q===void 0)continue;X+=',"'+q+'":'+Q}return X}function xU($){return $.write!==$.constructor.prototype.write}function _6($){let J=new D8($);if(J.on("error",Q),!$.sync&&PU)m7.register(J,vU),J.on("close",function(){m7.unregister(J)});return J;function Q(X){if(X.code==="EPIPE"){J.write=_$,J.end=_$,J.flushSync=_$,J.destroy=_$;return}J.removeListener("error",Q),J.emit("error",X)}}function vU($,J){if($.destroyed)return;if(J==="beforeExit")$.flush(),$.on("drain",function(){$.end()});else $.flushSync()}function hU($){return function(Q,X,Y={},W){if(typeof Y==="string")W=_6({dest:Y}),Y={};else if(typeof W==="string"){if(Y&&Y.transport)throw Error("only one of option.transport or stream can be specified");W=_6({dest:W})}else if(Y instanceof D8||Y.writable||Y._writableState)W=Y,Y={};else if(Y.transport){if(Y.transport instanceof D8||Y.transport.writable||Y.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(Y.transport.targets&&Y.transport.targets.length&&Y.formatters&&typeof Y.formatters.level==="function")throw Error("option.transport.targets do not allow custom level formatters");let V;if(Y.customLevels)V=Y.useOnlyCustomLevels?Y.customLevels:Object.assign({},Y.levels,Y.customLevels);W=KU({caller:X,...Y.transport,levels:V})}if(Y=Object.assign({},$,Y),Y.serializers=Object.assign({},$.serializers,Y.serializers),Y.formatters=Object.assign({},$.formatters,Y.formatters),Y.prettyPrint)throw Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:H,onChild:G}=Y;if(H===!1)Y.level="silent";if(!G)Y.onChild=_$;if(!W)if(!xU(process.stdout))W=_6({fd:process.stdout.fd||1});else W=process.stdout;return{opts:Y,stream:W}}}function gU($,J){try{return JSON.stringify($)}catch(Q){try{return(J||this[B8])($)}catch(X){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function yU($,J,Q){return{level:$,bindings:J,log:Q}}function uU($){let J=Number($);if(typeof $==="string"&&Number.isFinite(J))return J;if($===void 0)return 1;return $}t7.exports={noop:_$,buildSafeSonicBoom:_6,asChindings:kU,asJson:fU,genLog:TU,createArgsNormalizer:hU,stringify:gU,buildFormatters:yU,normalizeDestFileDescriptor:uU}});var B6=L((nL,e7)=>{var mU={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},lU={ASC:"ASC",DESC:"DESC"};e7.exports={DEFAULT_LEVELS:mU,SORTING_ORDER:lU}});var N8=L((sL,XJ)=>{var{lsCacheSym:cU,levelValSym:F8,useOnlyCustomLevelsSym:dU,streamSym:pU,formattersSym:iU,hooksSym:nU,levelCompSym:$J}=U$(),{noop:sU,genLog:y1}=D6(),{DEFAULT_LEVELS:Y1,SORTING_ORDER:JJ}=B6(),QJ={fatal:($)=>{let J=y1(Y1.fatal,$);return function(...Q){let X=this[pU];if(J.call(this,...Q),typeof X.flushSync==="function")try{X.flushSync()}catch(Y){}}},error:($)=>y1(Y1.error,$),warn:($)=>y1(Y1.warn,$),info:($)=>y1(Y1.info,$),debug:($)=>y1(Y1.debug,$),trace:($)=>y1(Y1.trace,$)},z8=Object.keys(Y1).reduce(($,J)=>{return $[Y1[J]]=J,$},{}),oU=Object.keys(z8).reduce(($,J)=>{return $[J]='{"level":'+Number(J),$},{});function rU($){let J=$[iU].level,{labels:Q}=$.levels,X={};for(let Y in Q){let W=J(Q[Y],Number(Y));X[Y]=JSON.stringify(W).slice(0,-1)}return $[cU]=X,$}function aU($,J){if(J)return!1;switch($){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function tU($){let{labels:J,values:Q}=this.levels;if(typeof $==="number"){if(J[$]===void 0)throw Error("unknown level value"+$);$=J[$]}if(Q[$]===void 0)throw Error("unknown level "+$);let X=this[F8],Y=this[F8]=Q[$],W=this[dU],H=this[$J],G=this[nU].logMethod;for(let V in Q){if(H(Q[V],Y)===!1){this[V]=sU;continue}this[V]=aU(V,W)?QJ[V](G):y1(Q[V],G)}this.emit("level-change",$,Y,J[X],X,this)}function eU($){let{levels:J,levelVal:Q}=this;return J&&J.labels?J.labels[Q]:""}function $q($){let{values:J}=this.levels,Q=J[$];return Q!==void 0&&this[$J](Q,this[F8])}function Jq($,J,Q){if($===JJ.DESC)return J<=Q;return J>=Q}function Qq($){if(typeof $==="string")return Jq.bind(null,$);return $}function Xq($=null,J=!1){let Q=$?Object.keys($).reduce((W,H)=>{return W[$[H]]=H,W},{}):null,X=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),J?null:z8,Q),Y=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),J?null:Y1,$);return{labels:X,values:Y}}function Yq($,J,Q){if(typeof $==="number"){if(![].concat(Object.keys(J||{}).map((W)=>J[W]),Q?[]:Object.keys(z8).map((W)=>+W),1/0).includes($))throw Error(`default level:${$} must be included in custom levels`);return}let X=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),Q?null:Y1,J);if(!($ in X))throw Error(`default level:${$} must be included in custom levels`)}function Wq($,J){let{labels:Q,values:X}=$;for(let Y in J){if(Y in X)throw Error("levels cannot be overridden");if(J[Y]in Q)throw Error("pre-existing level values cannot be used for new levels")}}function Hq($){if(typeof $==="function")return;if(typeof $==="string"&&Object.values(JJ).includes($))return;throw Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}XJ.exports={initialLsCache:oU,genLsCache:rU,levelMethods:QJ,getLevel:eU,setLevel:tU,isLevelEnabled:$q,mappings:Xq,assertNoLevelCollisions:Wq,assertDefaultLevelFound:Yq,genLevelComparison:Qq,assertLevelComparison:Hq}});var w8=L((oL,YJ)=>{YJ.exports={version:"10.3.1"}});var DJ=L((rL,_J)=>{var{EventEmitter:Gq}=o("events"),{lsCacheSym:Vq,levelValSym:Uq,setLevelSym:j8,getLevelSym:WJ,chindingsSym:z6,mixinSym:qq,asJsonSym:GJ,writeSym:_q,mixinMergeStrategySym:Dq,timeSym:Bq,timeSliceIndexSym:Fq,streamSym:VJ,serializersSym:u1,formattersSym:Q2,errorKeySym:zq,messageKeySym:Nq,useOnlyCustomLevelsSym:wq,needsMetadataGsym:Aq,redactFmtSym:jq,stringifySym:Eq,formatOptsSym:Lq,stringifiersSym:Oq,msgPrefixSym:E8,hooksSym:Rq}=U$(),{getLevel:Zq,setLevel:Sq,isLevelEnabled:Cq,mappings:Mq,initialLsCache:Pq,genLsCache:Kq,assertNoLevelCollisions:Iq}=N8(),{asChindings:L8,asJson:Tq,buildFormatters:A8,stringify:HJ,noop:UJ}=D6(),{version:bq}=w8(),fq=a4(),kq=class{},qJ={constructor:kq,child:xq,bindings:vq,setBindings:hq,flush:uq,isLevelEnabled:Cq,version:bq,get level(){return this[WJ]()},set level($){this[j8]($)},get levelVal(){return this[Uq]},set levelVal($){throw Error("levelVal is read-only")},get msgPrefix(){return this[E8]},get[Symbol.toStringTag](){return"Pino"},[Vq]:Pq,[_q]:yq,[GJ]:Tq,[WJ]:Zq,[j8]:Sq};Object.setPrototypeOf(qJ,Gq.prototype);_J.exports=function(){return Object.create(qJ)};var F6=($)=>$;function xq($,J){if(!$)throw Error("missing bindings for child Pino");let Q=this[u1],X=this[Q2],Y=Object.create(this);if(J==null){if(Y[Q2].bindings!==F6)Y[Q2]=A8(X.level,F6,X.log);if(Y[z6]=L8(Y,$),this.onChild!==UJ)this.onChild(Y);return Y}if(J.hasOwnProperty("serializers")===!0){Y[u1]=Object.create(null);for(let U in Q)Y[u1][U]=Q[U];let G=Object.getOwnPropertySymbols(Q);for(var W=0;W<G.length;W++){let U=G[W];Y[u1][U]=Q[U]}for(let U in J.serializers)Y[u1][U]=J.serializers[U];let V=Object.getOwnPropertySymbols(J.serializers);for(var H=0;H<V.length;H++){let U=V[H];Y[u1][U]=J.serializers[U]}}else Y[u1]=Q;if(J.hasOwnProperty("formatters")){let{level:G,bindings:V,log:U}=J.formatters;Y[Q2]=A8(G||X.level,V||F6,U||X.log)}else Y[Q2]=A8(X.level,F6,X.log);if(J.hasOwnProperty("customLevels")===!0)Iq(this.levels,J.customLevels),Y.levels=Mq(J.customLevels,Y[wq]),Kq(Y);if(typeof J.redact==="object"&&J.redact!==null||Array.isArray(J.redact)){Y.redact=J.redact;let G=fq(Y.redact,HJ),V={stringify:G[jq]};Y[Eq]=HJ,Y[Oq]=G,Y[Lq]=V}if(typeof J.msgPrefix==="string")Y[E8]=(this[E8]||"")+J.msgPrefix;if(Y[z6]=L8(Y,$),J.level!==void 0&&J.level!==this.level||J.hasOwnProperty("customLevels")){let G=J.level||this.level;Y[j8](G)}return this.onChild(Y),Y}function vq(){let J=`{${this[z6].substr(1)}}`,Q=JSON.parse(J);return delete Q.pid,delete Q.hostname,Q}function hq($){let J=L8(this,$);this[z6]=J}function gq($,J){return Object.assign(J,$)}function yq($,J,Q){let X=this[Bq](),Y=this[qq],W=this[zq],H=this[Nq],G=this[Dq]||gq,V,U=this[Rq].streamWrite;if($===void 0||$===null)V={};else if($ instanceof Error){if(V={[W]:$},J===void 0)J=$.message}else if(V=$,J===void 0&&$[H]===void 0&&$[W])J=$[W].message;if(Y)V=G(V,Y(V,Q,this));let q=this[GJ](V,J,Q,X),_=this[VJ];if(_[Aq]===!0)_.lastLevel=Q,_.lastObj=V,_.lastMsg=J,_.lastTime=X.slice(this[Fq]),_.lastLogger=this;_.write(U?U(q):q)}function uq($){if($!=null&&typeof $!=="function")throw Error("callback must be a function");let J=this[VJ];if(typeof J.flush==="function")J.flush($||UJ);else if($)$()}});var NJ=L((aL,zJ)=>{var{hasOwnProperty:X2}=Object.prototype,l1=Z8();l1.configure=Z8;l1.stringify=l1;l1.default=l1;aL.stringify=l1;aL.configure=Z8;zJ.exports=l1;var mq=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function E1($){if($.length<5000&&!mq.test($))return`"${$}"`;return JSON.stringify($)}function O8($,J){if($.length>200||J)return $.sort(J);for(let Q=1;Q<$.length;Q++){let X=$[Q],Y=Q;while(Y!==0&&$[Y-1]>X)$[Y]=$[Y-1],Y--;$[Y]=X}return $}var lq=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function R8($){return lq.call($)!==void 0&&$.length!==0}function BJ($,J,Q){if($.length<Q)Q=$.length;let X=J===","?"":" ",Y=`"0":${X}${$[0]}`;for(let W=1;W<Q;W++)Y+=`${J}"${W}":${X}${$[W]}`;return Y}function cq($){if(X2.call($,"circularValue")){let J=$.circularValue;if(typeof J==="string")return`"${J}"`;if(J==null)return J;if(J===Error||J===TypeError)return{toString(){throw TypeError("Converting circular structure to JSON")}};throw TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function dq($){let J;if(X2.call($,"deterministic")){if(J=$.deterministic,typeof J!=="boolean"&&typeof J!=="function")throw TypeError('The "deterministic" argument must be of type boolean or comparator function')}return J===void 0?!0:J}function pq($,J){let Q;if(X2.call($,J)){if(Q=$[J],typeof Q!=="boolean")throw TypeError(`The "${J}" argument must be of type boolean`)}return Q===void 0?!0:Q}function FJ($,J){let Q;if(X2.call($,J)){if(Q=$[J],typeof Q!=="number")throw TypeError(`The "${J}" argument must be of type number`);if(!Number.isInteger(Q))throw TypeError(`The "${J}" argument must be an integer`);if(Q<1)throw RangeError(`The "${J}" argument must be >= 1`)}return Q===void 0?1/0:Q}function m1($){if($===1)return"1 item";return`${$} items`}function iq($){let J=new Set;for(let Q of $)if(typeof Q==="string"||typeof Q==="number")J.add(String(Q));return J}function nq($){if(X2.call($,"strict")){let J=$.strict;if(typeof J!=="boolean")throw TypeError('The "strict" argument must be of type boolean');if(J)return(Q)=>{let X=`Object can not safely be stringified. Received type ${typeof Q}`;if(typeof Q!=="function")X+=` (${Q.toString()})`;throw Error(X)}}}function Z8($){$={...$};let J=nq($);if(J){if($.bigint===void 0)$.bigint=!1;if(!("circularValue"in $))$.circularValue=Error}let Q=cq($),X=pq($,"bigint"),Y=dq($),W=typeof Y==="function"?Y:void 0,H=FJ($,"maximumDepth"),G=FJ($,"maximumBreadth");function V(B,D,A,Z,C,T){let K=D[B];if(typeof K==="object"&&K!==null&&typeof K.toJSON==="function")K=K.toJSON(B);switch(K=Z.call(D,B,K),typeof K){case"string":return E1(K);case"object":{if(K===null)return"null";if(A.indexOf(K)!==-1)return Q;let y="",s=",",d=T;if(Array.isArray(K)){if(K.length===0)return"[]";if(H<A.length+1)return'"[Array]"';if(A.push(K),C!=="")T+=C,y+=`
|
|
@@ -168,4 +168,4 @@ Body: ${Y.text}`);let W={};if($.username)W.username=$.username;if($.email)W.emai
|
|
|
168
168
|
|
|
169
169
|
`}p2.writeFileSync(this.config.outputPath,J)}zodSchemaToString($){return"z.object({})"}registerRepositoryFactory($){let J=$.getContainer();class Q{}class X{}J.register(Q,{scope:"singleton",factory:()=>({create:(Y,W)=>{let H=this.client[Y.toLowerCase()];if(!H)throw Error(`Model ${Y} not found in Prisma client`);return new f1({client:this.client,delegate:H,model:Y,zodSchema:W})}})}),J.register(X,{scope:"singleton",factory:()=>this.transactionManager})}registerShutdownHook($){process.on("SIGINT",async()=>{console.log("\uD83D\uDD0C Disconnecting from database..."),await this.client.$disconnect(),process.exit(0)}),process.on("SIGTERM",async()=>{console.log("\uD83D\uDD0C Disconnecting from database..."),await this.client.$disconnect(),process.exit(0)})}getModel($){return this.models.get($)}getModels(){return this.models}createRepository($,J){let Q=this.client[$.toLowerCase()];if(!Q)throw Error(`Model ${$} not found in Prisma client`);return new f1({client:this.client,delegate:Q,model:$,zodSchema:J})}getClient(){return this.client}getTransactionManager(){return this.transactionManager}}function zL($,J){return new F5($,J)}g0();class C4 extends _1{dataSource;activeQueryRunners=new Map;constructor($){super();this.dataSource=$}async begin($){let J=this.createTransactionContext($),Q=this.dataSource.createQueryRunner();return await Q.connect(),await Q.startTransaction(),this.activeQueryRunners.set(J.id,Q),J}async commit($){let J=this.activeQueryRunners.get($.id);if(!J)throw Error(`Transaction ${$.id} not found`);try{if($.rollbackOnly)await J.rollbackTransaction();else await J.commitTransaction()}finally{await J.release(),this.activeQueryRunners.delete($.id),this.removeTransactionContext($)}}async rollback($){let J=this.activeQueryRunners.get($.id);if(!J)throw Error(`Transaction ${$.id} not found`);try{if(J.isTransactionActive)await J.rollbackTransaction()}finally{await J.release(),this.activeQueryRunners.delete($.id),this.removeTransactionContext($)}}async savepoint($,J){let Q=this.activeQueryRunners.get($.id);if(!Q)throw Error(`Transaction ${$.id} not found`);await Q.manager.query(`SAVEPOINT ${J}`),$.savepoints.push(J)}async rollbackToSavepoint($,J){let Q=this.activeQueryRunners.get($.id);if(!Q)throw Error(`Transaction ${$.id} not found`);let X=$.savepoints.indexOf(J);if(X===-1)throw Error(`Savepoint ${J} not found`);await Q.manager.query(`ROLLBACK TO SAVEPOINT ${J}`),$.savepoints=$.savepoints.slice(0,X+1)}async executeInTransaction($,J){return await this.dataSource.transaction(async(Q)=>{return await $(Q)})}async handleTransactional($,J,Q,X,Y){let W=Reflect.getMetadata("transactional",$,J);if(!W)return X.apply($,Q);let H=Y?this.getRequestTransaction(Y):null;if(H)return this.handleNestedTransaction(H,$,Q,X);return await this.executeInTransaction(async(G)=>{let V=await this.begin(W);if(Y)this.setRequestTransaction(Y,V);try{let U=await this.injectTransactionManager($,Q,X,G);if(V.rollbackOnly)throw Error("Transaction marked for rollback");return U}catch(U){throw this.setRollbackOnly(V),U}finally{if(Y)this.clearRequestTransaction(Y);this.removeTransactionContext(V)}},W)}async handleNestedTransaction($,J,Q,X){let Y=`sp_${Date.now()}_${Math.random().toString(36).substring(2,11)}`;try{return await this.savepoint($,Y),await X.apply(J,Q)}catch(W){throw await this.rollbackToSavepoint($,Y),W}}async injectTransactionManager($,J,Q,X){if($.repositories){let Y={...$.repositories};try{for(let[W,H]of Object.entries($.repositories))if(H&&typeof H==="object"&&"dataSource"in H){let G=H.entity,V=X.getRepository?X.getRepository(G):H.repository;$.repositories[W]=new H.constructor({dataSource:H.dataSource,repository:V,entity:G,zodSchema:H.schema})}return await Q.apply($,J)}finally{$.repositories=Y}}return await Q.apply($,J)}createTransactionalRepository($,J){let Q=new $(J);if(Q&&typeof Q==="object"&&"withTransaction"in Q){let X=Q.withTransaction;Q.withTransaction=async(Y)=>{return await this.executeInTransaction(async(W)=>{let H=W.getRepository?W.getRepository(J.entity):J.repository,G=new $({...J,repository:H});return await Y(G)})}}return Q}getQueryRunner($){return this.activeQueryRunners.get($.id)}isTransactionActive($){let J=this.activeQueryRunners.get($.id);return J?J.isTransactionActive:!1}getDataSource(){return this.dataSource}}g0();class z5{name="typeorm";version="1.0.0";dataSource;config;transactionManager;entities=new Map;constructor($,J){this.dataSource=$,this.config={synchronize:!1,logging:!1,migrationsRun:!1,dropSchema:!1,cache:!1,...J},this.transactionManager=new C4($)}async install($){if(!this.dataSource.isInitialized)await this.dataSource.initialize();J1(this.transactionManager),this.extractEntityMetadata(),this.registerRepositoryFactory($),this.registerMigrationUtilities($),this.registerShutdownHook($),console.log("\u2705 TypeORM plugin installed successfully")}extractEntityMetadata(){try{let $=this.dataSource.entityMetadatas||this.dataSource.manager.connection?.entityMetadatas||[];for(let J of $){let Q={name:J.name,tableName:J.tableName,columns:J.columns?.map((X)=>({propertyName:X.propertyName,type:X.type,isPrimary:X.isPrimary,isGenerated:X.isGenerated,isNullable:X.isNullable,isUnique:X.isUnique,length:X.length,default:X.default}))||[],relations:J.relations?.map((X)=>({propertyName:X.propertyName,type:X.relationType,target:X.inverseEntityMetadata?.name||"unknown",inverseSide:X.inverseSidePropertyPath,joinColumn:X.joinColumns?.[0]?.databaseName,joinTable:X.joinTableName}))||[]};this.entities.set(J.name,Q)}console.log(`\uD83D\uDCDD Extracted metadata for ${this.entities.size} entities`)}catch($){console.error("\u274C Failed to extract entity metadata:",$)}}registerRepositoryFactory($){let J=$.getContainer();class Q{}class X{}class Y{}class W{}J.register(Q,{scope:"singleton",factory:()=>({create:(H,G)=>{let V=this.dataSource.getRepository(H);return new k1({dataSource:this.dataSource,repository:V,entity:H,zodSchema:G})}})}),J.register(X,{scope:"singleton",factory:()=>this.dataSource}),J.register(Y,{scope:"request",factory:()=>this.dataSource.manager}),J.register(W,{scope:"singleton",factory:()=>this.transactionManager})}registerMigrationUtilities($){let J=$.getContainer();class Q{}class X{}J.register(Q,{scope:"singleton",factory:()=>({run:async()=>{if(this.config.migrationsRun&&this.dataSource.runMigrations)await this.dataSource.runMigrations(),console.log("\u2705 Migrations executed successfully")},revert:async()=>{if(this.dataSource.undoLastMigration)await this.dataSource.undoLastMigration(),console.log("\u2705 Last migration reverted successfully")},generate:async(Y)=>{console.log(`\uD83D\uDCDD Generate migration: ${Y}`)}})}),J.register(X,{scope:"singleton",factory:()=>({seed:async(Y)=>{for(let W of Y)if(typeof W.run==="function")await W.run(this.dataSource);console.log("\u2705 Database seeded successfully")}})})}registerShutdownHook($){process.on("SIGINT",async()=>{if(console.log("\uD83D\uDD0C Closing database connection..."),this.dataSource.isInitialized)await this.dataSource.destroy();process.exit(0)}),process.on("SIGTERM",async()=>{if(console.log("\uD83D\uDD0C Closing database connection..."),this.dataSource.isInitialized)await this.dataSource.destroy();process.exit(0)})}getEntity($){return this.entities.get($)}getEntities(){return this.entities}createRepository($,J){let Q=this.dataSource.getRepository($);return new k1({dataSource:this.dataSource,repository:Q,entity:$,zodSchema:J})}getDataSource(){return this.dataSource}getTransactionManager(){return this.transactionManager}async runMigrations(){if(this.dataSource.runMigrations)await this.dataSource.runMigrations(),console.log("\u2705 Migrations executed successfully");else console.warn("\u26A0\uFE0F Migration support not available")}async revertMigration(){if(this.dataSource.undoLastMigration)await this.dataSource.undoLastMigration(),console.log("\u2705 Last migration reverted successfully");else console.warn("\u26A0\uFE0F Migration revert not available")}async synchronize(){if(this.config.synchronize&&this.dataSource.synchronize)await this.dataSource.synchronize(),console.log("\u2705 Database schema synchronized");else console.warn("\u26A0\uFE0F Schema synchronization is disabled or not available")}async dropSchema(){if(this.config.dropSchema&&this.dataSource.dropDatabase)await this.dataSource.dropDatabase(),console.log("\u2705 Database schema dropped");else console.warn("\u26A0\uFE0F Schema dropping is disabled or not available")}}function NL($,J){return new z5($,J)}class KH{}var Wk=v1(o1(),1);function wL($){return(J)=>{let Q={name:$?.name||J.name,tableName:$?.tableName||J.name.toLowerCase(),schema:$?.schema,database:$?.database,synchronize:$?.synchronize};Reflect.defineMetadata("typeorm:entity",Q,J)}}g0();class M4 extends _1{database;drizzleTransactions=new Map;constructor($){super();this.database=$}async begin($){let J=this.createTransactionContext($);return this.drizzleTransactions.set(J.id,{options:$,startTime:J.startTime}),J}async commit($){this.drizzleTransactions.delete($.id),this.removeTransactionContext($)}async rollback($){this.drizzleTransactions.delete($.id),this.removeTransactionContext($)}async savepoint($,J){$.savepoints.push(J);let Q=this.drizzleTransactions.get($.id);if(Q)Q.savepoints=Q.savepoints||[],Q.savepoints.push(J)}async rollbackToSavepoint($,J){let Q=$.savepoints.indexOf(J);if(Q===-1)throw Error(`Savepoint ${J} not found`);$.savepoints=$.savepoints.slice(0,Q+1);let X=this.drizzleTransactions.get($.id);if(X&&X.savepoints)X.savepoints=X.savepoints.slice(0,Q+1)}async executeInTransaction($,J){return await this.database.transaction(async(Q)=>{return await $(Q)})}async handleTransactional($,J,Q,X,Y){let W=Reflect.getMetadata("transactional",$,J);if(!W)return X.apply($,Q);if(Y?this.getRequestTransaction(Y):null)return X.apply($,Q);return await this.executeInTransaction(async(G)=>{let V=await this.begin(W);if(Y)this.setRequestTransaction(Y,V);try{let U=await this.injectTransactionDatabase($,Q,X,G);if(V.rollbackOnly)throw Error("Transaction marked for rollback");return U}catch(U){throw this.setRollbackOnly(V),U}finally{if(Y)this.clearRequestTransaction(Y);await this.commit(V)}},W)}async injectTransactionDatabase($,J,Q,X){if($.repositories){let Y={...$.repositories};try{for(let[W,H]of Object.entries($.repositories))if(H&&typeof H==="object"&&"database"in H){let{table:G,schema:V}=H;$.repositories[W]=new H.constructor({database:X,table:G,zodSchema:V})}return await Q.apply($,J)}finally{$.repositories=Y}}return await Q.apply($,J)}createTransactionalRepository($,J){let Q=new $(J);if(Q&&typeof Q==="object"&&"withTransaction"in Q){let X=Q.withTransaction;Q.withTransaction=async(Y)=>{return await this.executeInTransaction(async(W)=>{let H=new $({...J,database:W});return await Y(H)})}}return Q}async batch($){return await this.executeInTransaction(async(J)=>{let Q=[];for(let X of $){let Y=await X();Q.push(Y)}return Q})}async executeWithRetry($,J={}){let{maxRetries:Q=3,retryDelay:X=1000,retryCondition:Y=(H)=>H.code==="SERIALIZATION_FAILURE"||H.code==="DEADLOCK_DETECTED"}=J,W;for(let H=0;H<=Q;H++)try{return await this.executeInTransaction($)}catch(G){if(W=G,H===Q||!Y(G))throw G;await new Promise((V)=>setTimeout(V,X*Math.pow(2,H)))}throw W}getDatabase(){return this.database}isInTransaction(){return this.drizzleTransactions.size>0}getActiveTransactionCount(){return this.drizzleTransactions.size}}g0();class N5{tableSchemas=new Map;convertTableToZod($){let J=$._.name;if(this.tableSchemas.has(J))return this.tableSchemas.get(J);let Q={};for(let[Y,W]of Object.entries($._.columns))Q[Y]=this.convertColumnToZod(W);let X=w.object(Q);return this.tableSchemas.set(J,X),X}convertColumnToZod($){let J=this.getBaseZodSchema($);if(!$._.notNull)J=J.nullable();if($._.hasDefault||!$._.notNull)J=J.optional();return J}getBaseZodSchema($){let J=$._.dataType.toLowerCase(),Q=$._.columnType.toLowerCase();if($._.enumValues&&$._.enumValues.length>0)return w.enum($._.enumValues);switch(Q){case"serial":case"bigserial":return w.number().int().positive();case"boolean":return w.boolean();case"date":return w.date();case"timestamp":case"timestamptz":return w.date();case"json":case"jsonb":return w.record(w.any());case"uuid":return w.string().uuid();case"text":case"varchar":case"char":return w.string();case"integer":case"int":case"int4":return w.number().int();case"bigint":case"int8":return w.bigint();case"smallint":case"int2":return w.number().int().min(-32768).max(32767);case"real":case"float4":return w.number();case"double precision":case"float8":return w.number();case"decimal":case"numeric":return w.number();case"bytea":return w.instanceof(Buffer);default:return this.getBaseZodSchemaByDataType(J)}}getBaseZodSchemaByDataType($){switch($){case"string":case"text":return w.string();case"number":case"integer":return w.number();case"boolean":return w.boolean();case"date":return w.date();case"json":return w.record(w.any());case"buffer":return w.instanceof(Buffer);case"bigint":return w.bigint();default:return w.string()}}generateCreateSchema($){let J={};for(let[Q,X]of Object.entries($._.columns)){if(X._.isPrimaryKey&&X._.hasDefault)continue;if(X._.columnType.includes("serial"))continue;J[Q]=this.convertColumnToZod(X)}return w.object(J)}generateUpdateSchema($){let J={};for(let[Q,X]of Object.entries($._.columns)){if(X._.isPrimaryKey)continue;let Y=this.convertColumnToZod(X);if(!Y.isOptional())Y=Y.optional();J[Q]=Y}return w.object(J)}extractTableMetadata($){let J=[];for(let[Q,X]of Object.entries($._.columns))J.push({name:Q,dataType:X._.dataType,isPrimaryKey:X._.isPrimaryKey,isNotNull:X._.notNull,hasDefault:X._.hasDefault,isUnique:X._.isUnique,isAutoIncrement:X._.columnType.includes("serial"),enumValues:X._.enumValues});return{name:$._.name,schema:$._.schema,columns:J,relations:[],zodSchema:this.convertTableToZod($)}}generateAllSchemas($){return{base:this.convertTableToZod($),create:this.generateCreateSchema($),update:this.generateUpdateSchema($)}}clearCache(){this.tableSchemas.clear()}getCachedSchema($){return this.tableSchemas.get($)}}class IH{name="drizzle";version="1.0.0";database;config;transactionManager;schemaConverter;tables=new Map;tableMetadata=new Map;logger=D$({component:"DrizzlePlugin"});constructor($,J){this.database=$,this.config={logger:!1,mode:"default",...J},this.transactionManager=new M4($),this.schemaConverter=new N5}async install($){try{if(this.logger.info("Installing Drizzle ORM plugin..."),J1(this.transactionManager),this.logger.debug("Global transaction manager configured"),this.config.schema)this.registerSchema(this.config.schema);this.registerRepositoryFactory($),this.registerDatabaseUtilities($),this.logger.info("\u2705 Drizzle plugin installed successfully")}catch(J){let Q=J instanceof Error?J:Error(String(J));throw this.logger.error("Failed to install Drizzle plugin",Q),Error(`Drizzle plugin installation failed: ${Q.message}`)}}registerSchema($){let J=0,Q=0;for(let[X,Y]of Object.entries($))if(this.isValidDrizzleTable(Y))try{this.tables.set(X,Y);let W=this.schemaConverter.extractTableMetadata(Y);this.tableMetadata.set(X,W),J++,this.logger.debug(`Registered table: ${X}`)}catch(W){let H=W instanceof Error?W:Error(String(W));this.logger.error(`Failed to register table ${X}`,H,{tableName:X}),Q++}else this.logger.debug(`Skipped invalid table: ${X}`),Q++;this.logger.info(`\uD83D\uDCDD Registered ${J} Drizzle table(s)${Q>0?` (${Q} skipped)`:""}`)}isValidDrizzleTable($){if(!$||typeof $!=="object")return!1;let J=$;if(!J._||typeof J._!=="object")return!1;if(typeof J._.name!=="string"||J._.name.trim().length===0)return!1;if(!J._.columns||typeof J._.columns!=="object")return!1;if(Object.keys(J._.columns).length===0)return this.logger.warn(`Table ${J._.name} has no columns defined`),!1;return!0}registerRepositoryFactory($){let J=$.getContainer();J.register("DrizzleRepositoryFactory",{scope:"singleton",factory:()=>({create:(Q,X)=>{let Y=this.tables.get(Q);if(!Y)throw Error(`Table ${Q} not found in Drizzle schema`);return new $1({database:this.database,table:Y,zodSchema:X||this.tableMetadata.get(Q)?.zodSchema})},createFromTable:(Q,X)=>{return new $1({database:this.database,table:Q,zodSchema:X})}})}),J.register("DrizzleDatabase",{scope:"singleton",factory:()=>this.database}),J.register("TransactionManager",{scope:"singleton",factory:()=>this.transactionManager}),J.register("DrizzleSchemaConverter",{scope:"singleton",factory:()=>this.schemaConverter})}registerDatabaseUtilities($){let J=$.getContainer();J.register("QueryBuilder",{scope:"request",factory:()=>({select:(Q)=>this.database.select(Q),insert:(Q)=>this.database.insert(Q),update:(Q)=>this.database.update(Q),delete:(Q)=>this.database.delete(Q),raw:(Q,X)=>this.database.execute({sql:Q,params:X})})}),J.register("Seeder",{scope:"singleton",factory:()=>({seed:async(Q)=>{let X=D$({component:"Seeder"});try{X.info(`Running ${Q.length} seeder(s)...`),await this.transactionManager.executeInTransaction(async(Y)=>{for(let W of Q)if(typeof W.run==="function")X.debug(`Running seeder: ${W.constructor.name}`),await W.run(Y);else X.warn(`Skipping invalid seeder (no run method): ${W.constructor.name}`)}),X.info("\u2705 Database seeded successfully")}catch(Y){let W=Y instanceof Error?Y:Error(String(Y));throw X.error("Failed to seed database",W),Error(`Database seeding failed: ${W.message}`)}}})})}getTable($){return this.tables.get($)}getTables(){return this.tables}getTableMetadata($){return this.tableMetadata.get($)}getAllTableMetadata(){return this.tableMetadata}createRepository($,J){let Q=this.tables.get($);if(!Q)throw Error(`Table ${$} not found in Drizzle schema`);return new $1({database:this.database,table:Q,zodSchema:J||this.tableMetadata.get($)?.zodSchema})}createRepositoryFromTable($,J){return new $1({database:this.database,table:$,zodSchema:J})}getDatabase(){return this.database}getTransactionManager(){return this.transactionManager}getSchemaConverter(){return this.schemaConverter}addTable($,J){if(!this.isValidDrizzleTable(J))throw Error(`Invalid Drizzle table: ${$}`);this.tables.set($,J);let Q=this.schemaConverter.extractTableMetadata(J);this.tableMetadata.set($,Q),this.logger.debug(`Added table dynamically: ${$}`)}removeTable($){let J=this.tables.has($);if(this.tables.delete($),this.tableMetadata.delete($),J)this.logger.debug(`Removed table: ${$}`);return J}generateZodSchemas(){let $={};for(let[J,Q]of this.tables){let X=this.schemaConverter.generateAllSchemas(Q);$[J]=X}return $}async executeRaw($,J){try{return this.logger.debug("Executing raw SQL query"),await this.database.execute({sql:$,params:J})}catch(Q){let X=Q instanceof Error?Q:Error(String(Q));throw this.logger.error("Raw SQL query failed",X),Error(`SQL execution failed: ${X.message}`)}}async executeInTransaction($){try{return await this.transactionManager.executeInTransaction($)}catch(J){let Q=J instanceof Error?J:Error(String(J));throw this.logger.error("Transaction failed",Q),J}}}class w5{client;prefix;constructor($,J={}){this.client=$,this.prefix=J.prefix||"cache:"}async get($){let J=this.getFullKey($),Q=await this.client.get(J);if(!Q)return null;try{return JSON.parse(Q)}catch{return Q}}async set($,J,Q=0){let X=this.getFullKey($),Y=JSON.stringify(J);if(Q>0)await this.client.setex(X,Q,Y);else await this.client.set(X,Y)}async delete($){let J=this.getFullKey($);return await this.client.del(J)>0}async has($){let J=this.getFullKey($);return await this.client.exists(J)>0}async clear(){let $=await this.keys("*");if($.length>0)await Promise.all($.map((J)=>this.delete(J)))}async deletePattern($){let J=await this.keys($);if(J.length===0)return 0;return await Promise.all(J.map((Q)=>this.delete(Q))),J.length}async keys($="*"){let J=this.getFullKey($);return(await this.client.keys(J)).map((X)=>X.substring(this.prefix.length))}getFullKey($){return`${this.prefix}${$}`}}function AL($,J){return new w5($,J)}H2();export{f3 as zodToJsonSchema,z1 as zodToGraphQLType,NC as zodObjectToGraphQLType,wC as zodObjectToGraphQLInput,w as z,eb as withRepositoryMixin,CH as transactionMiddleware,g3 as toLegacyErrorBody,oB as setupTestApp,tE as setSessionData,XG as setRequestMetadata,k5 as setRequestContext,J1 as setGlobalTransactionManager,gJ as setCache,j2 as sendErrorResponse,A2 as resolveProblemType,M1 as resolveProblemTitle,XO as requestLoggingMiddleware,eE as removeSessionData,VF as registerDrizzle,N1 as problemTypeUri,B$ as parseTTL,Hf as parseCursorQuery,Wf as paginate,sB as mockDependency,g1 as mergeVeloceCorsHeaders,rE as isSessionAuthenticated,hE as isOAuthAuthenticated,w2 as isNullable,xT as isAuthenticated,uJ as invalidateCache,o2 as initializeRequestContext,$O as initializeLogger,BC as hasResolverMetadata,FC as hasFieldMetadata,o$ as globalTransactionEventManager,$f as globalRepositoryRegistry,EH as getUserRoles,RE as getUserPermissions,VL as getTransactionInterceptor,wH as getToken,aE as getSessionUserId,c2 as getSessionManager,oE as getSessionData,qC as getResolverMetadata,YG as getRequestMetadata,$G as getRequestId,r2 as getRequestDuration,j1 as getRequestContext,OE as getRBACManager,xE as getOAuthUser,vE as getOAuthToken,gE as getOAuthProvider,c0 as getLogger,x1 as getGlobalTransactionManager,_C as getFieldsMetadata,DC as getFieldMetadata,v3 as getDefaultValue,w1 as getCurrentUser,e0 as getCurrentSession,hJ as getCache,sE as getCSRFProtection,vT as getAuthError,l8 as getArgumentsMetadata,JG as getAbortSignal,f5 as generateRequestId,YO as errorLoggingMiddleware,yJ as deleteCache,NL as createTypeORMPlugin,Bf as createTransactionalProxy,Kf as createTransactionPlugin,hQ as createTestClient,vQ as createTestApp,l_ as createSimpleRequestIdMiddleware,nE as createSessionMiddleware,m_ as createRequestContextMiddleware,AL as createRedisCacheStore,$2 as createRateLimitMiddleware,jH as createRBACMiddleware,zL as createPrismaPlugin,vJ as createLogger,zH as createDefaultRBAC,x4 as createCorsMiddleware,v4 as createCompressionMiddleware,D$ as createChildLogger,c_ as createCacheMiddleware,d_ as createCacheInvalidationMiddleware,NH as createAuthMiddleware,rB as clearMocks,mJ as clearCache,a2 as cleanupRequestContext,nT as checkUserRole,sT as checkUserPermission,h3 as buildProblemInstance,QG as abortRequest,s1 as ZodToJsonSchemaConverter,y8 as WebSocketPlugin,C6 as WebSocketManager,z2 as WebSocketConnection,ZB as WebSocket,v$ as VeloceTS,v$ as Veloce,P1 as ValidationException,b$ as ValidationEngine,eH as VELOCE_CORS_HEADERS_KEY,xK as UseMiddleware,jB as UnprocessableEntityException,FB as UnauthorizedException,C4 as TypeORMTransactionManager,k1 as TypeORMRepository,z5 as TypeORMPlugin,wL as TypeORMEntity,s$ as TransactionalWithPropagation,WL as Transactional,BL as TransactionTemplate,DL as TransactionService,qL as TransactionPropagationManager,UL as TransactionPropagation,PH as TransactionPlugin,B5 as TransactionMetricsListener,D5 as TransactionLoggingListener,W$ as TransactionInterceptor,_L as TransactionEventType,MH as TransactionEventManager,EB as TooManyRequestsException,bQ as TokenRevokedException,NT as TokenPayloadSchema,y6 as TokenExpiredException,kT as Token,SK as Timeout,Y9 as TestResponse,O2 as TestClient,mK as Tags,uK as Tag,wf as Supports,pT as SuperAdminOnly,gK as Summary,GC as Subscription,R9 as StreamResponse,LH as SessionManager,OH as SessionGuard,lE as SessionDataSchema,cE as Session,LB as ServiceUnavailableException,u6 as RouterCompiler,EE as Roles,MT as RoleSchema,PT as RoleAssignmentSchema,Z9 as ResponseSerializer,ZK as ResponseSchema,TQ as Response,YC as Resolver,Nf as RequiresNew,zf as Required,AH as RequireRole,cT as RequirePermission,iE as RequireCSRF,YF as RequestId,QF as Req,$L as RepositoryService,R4 as RepositoryRegistry,i$ as RepositoryFactory,YL as Repository,AT as RefreshRequestSchema,w5 as RedisCacheStore,L9 as RedirectResponse,CK as RateLimit,ZE as RBACPlugin,m2 as RBACManager,L4 as RBACGuard,JL as QueryBuilderFactory,_5 as QueryBuilder,tB as Query,jK as Put,d2 as PrismaZodSchemaGenerator,S4 as PrismaTransactionManager,f1 as PrismaRepository,F5 as PrismaPlugin,AK as Post,l6 as PluginManager,LE as Permissions,l2 as PermissionMatcher,KT as PermissionCheckSchema,AB as PayloadTooLargeException,LK as Patch,eB as Param,XL as PaginationTransformer,Y$ as PaginationHelper,QL as PaginationBuilder,Yf as Paginated,UB as PROBLEM_JSON_MEDIA_TYPE,k3 as OpenAPIPlugin,C1 as OpenAPIGenerator,Zf as OnTransactionRollback,Rf as OnTransactionCommit,Of as OnTransactionBegin,CB as OnMessage,MB as OnDisconnect,SB as OnConnect,TE as OAuthUserSchema,fE as OAuthUser,kE as OAuthToken,bE as OAuth,Af as NotSupported,BB as NotFoundException,Ef as Never,HC as Mutation,iT as MinimumRole,KH as Migration,S as MetadataRegistry,K1 as MetadataCompiler,N6 as MemoryCacheStore,jf as Mandatory,wT as LoginRequestSchema,q5 as JWTProvider,j9 as JSONResponse,x$ as InvalidTokenException,UF as InjectDB,bK as Inject,jE as InMemoryUserProvider,n$ as InMemoryTransactionManager,RK as HttpCode,b4 as HonoAdapter,RB as HealthCheckers,u3 as HealthCheckPlugin,$F as Header,E0 as HTTPException,E9 as HTMLResponse,GC as GraphQLSubscription,d8 as GraphQLSchemaBuilder,WC as GraphQLQuery,y3 as GraphQLPlugin,HC as GraphQLMutation,UC as GraphQLCtx,wB as GoneException,wK as Get,tb as GenericRepository,GC as GQLSubscription,WC as GQLQuery,HC as GQLMutation,UC as GQLContext,zB as ForbiddenException,O9 as FileResponse,v$ as FastAPITS,s2 as ExpressAdapter,m6 as ErrorHandler,HL as Entity,N5 as DrizzleZodSchemaConverter,M4 as DrizzleTransactionManager,$1 as DrizzleRepository,IH as DrizzlePlugin,yK as Description,lK as Deprecated,TK as Depends,EK as Delete,RH as DefaultQueryOperators,x6 as DIContainer,qB as DEFAULT_PROBLEM_TYPE_BASE,S9 as DB_TOKEN,ZH as CursorPaginationHelper,fT as CurrentUser,dE as CurrentSession,XF as Ctx,JF as Cookie,NK as Controller,NB as ConflictException,GL as Column,k0 as CacheManager,GF as CacheInvalidate,HF as Cache,pE as CSRFToken,aB as Body,_1 as BaseTransactionManager,X$ as BaseRepository,c8 as BadRequestException,R0 as AuthorizationException,S0 as AuthenticationException,E4 as AuthService,SE as AuthPlugin,bT as Auth,VC as Arg,dK as ApiResponse,cK as ApiDoc,OK as All,dT as AdminOnly,WF as AbortSignal};
|
|
170
170
|
|
|
171
|
-
//# debugId=
|
|
171
|
+
//# debugId=477A5359B872BD4964756E2164756E21
|