@prisma/client 7.3.0-integration-parameterization.6 → 7.3.0-integration-aqrln-upskmmvouusz.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ "use strict";var m=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var u=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of c(r))!d.call(e,i)&&i!==o&&m(e,i,{get:()=>r[i],enumerable:!(n=l(r,i))||n.enumerable});return e};var y=e=>u(m({},"__esModule",{value:!0}),e);var M={};module.exports=y(M);var s=require("node:worker_threads"),a=s.workerData,p,t;globalThis.PRISMA_WASM_PANIC_REGISTRY={set_message(e){t=e}};async function g(){let e=await import(a.runtimePath),r={[a.importName]:e},o=new WebAssembly.Instance(a.wasmModule,r),n=o.exports.__wbindgen_start;e.__wbg_set_wasm(o.exports),n(),p=new e.QueryCompiler(a.compilerOptions)}function f(e){t=void 0;try{let r;e.type==="compile"?r=p.compile(e.request):r=p.compileBatch(e.request),t!==void 0?s.parentPort.postMessage({type:"panic",id:e.id,message:t}):s.parentPort.postMessage({type:"result",id:e.id,result:r})}catch(r){t!==void 0?s.parentPort.postMessage({type:"panic",id:e.id,message:t}):s.parentPort.postMessage({type:"error",id:e.id,error:r instanceof Error?r.message:String(r)})}}g().then(()=>{s.parentPort.on("message",f),s.parentPort.postMessage({type:"ready"})}).catch(e=>{let r=e instanceof Error?e.message:String(e);s.parentPort.postMessage({type:"error",id:-1,error:`Failed to initialize query compiler in worker: ${r}`})});
2
+ //# sourceMappingURL=query-compiler-worker.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/runtime/core/engines/client/query-compiler-worker.ts"],
4
+ "sourcesContent": ["import { parentPort, workerData } from 'node:worker_threads'\n\nimport type { QueryCompiler, QueryCompilerOptions } from '@prisma/client-common'\nimport type { BatchResponse, QueryPlanNode } from '@prisma/client-engine-runtime'\n\ntype WorkerMessage =\n | { type: 'compile'; id: number; request: string }\n | { type: 'compileBatch'; id: number; request: string }\n\ntype WorkerResponse =\n | { type: 'result'; id: number; result: QueryPlanNode | BatchResponse }\n | { type: 'error'; id: number; error: string }\n | { type: 'panic'; id: number; message: string }\n | { type: 'ready' }\n\ninterface QueryCompilerWorkerData {\n compilerOptions: QueryCompilerOptions\n wasmModule: WebAssembly.Module\n runtimePath: string\n importName: string\n}\n\nconst data = workerData as QueryCompilerWorkerData\n\nlet compiler: QueryCompiler\nlet panicMessage: string | undefined\n\n // Set up the panic handler for this worker\n;(globalThis as any).PRISMA_WASM_PANIC_REGISTRY = {\n set_message(message: string) {\n panicMessage = message\n },\n}\n\nasync function initializeCompiler(): Promise<void> {\n // Dynamically import the wasm-bindgen runtime module\n const runtime = await import(data.runtimePath)\n\n const options = { [data.importName]: runtime }\n const instance = new WebAssembly.Instance(data.wasmModule, options)\n const wbindgen_start = instance.exports.__wbindgen_start as () => void\n runtime.__wbg_set_wasm(instance.exports)\n wbindgen_start()\n\n compiler = new runtime.QueryCompiler(data.compilerOptions)\n}\n\nfunction handleMessage(message: WorkerMessage): void {\n panicMessage = undefined\n\n try {\n let result: QueryPlanNode | BatchResponse\n\n if (message.type === 'compile') {\n result = compiler.compile(message.request) as QueryPlanNode\n } else {\n result = compiler.compileBatch(message.request)\n }\n\n if (panicMessage !== undefined) {\n parentPort!.postMessage({\n type: 'panic',\n id: message.id,\n message: panicMessage,\n } satisfies WorkerResponse)\n } else {\n parentPort!.postMessage({\n type: 'result',\n id: message.id,\n result,\n } satisfies WorkerResponse)\n }\n } catch (error) {\n if (panicMessage !== undefined) {\n parentPort!.postMessage({\n type: 'panic',\n id: message.id,\n message: panicMessage,\n } satisfies WorkerResponse)\n } else {\n parentPort!.postMessage({\n type: 'error',\n id: message.id,\n error: error instanceof Error ? error.message : String(error),\n } satisfies WorkerResponse)\n }\n }\n}\n\ninitializeCompiler()\n .then(() => {\n parentPort!.on('message', handleMessage)\n parentPort!.postMessage({ type: 'ready' } satisfies WorkerResponse)\n })\n .catch((error) => {\n const errorMessage = error instanceof Error ? error.message : String(error)\n parentPort!.postMessage({\n type: 'error',\n id: -1,\n error: `Failed to initialize query compiler in worker: ${errorMessage}`,\n } satisfies WorkerResponse)\n })\n\nexport type { QueryCompilerWorkerData, WorkerMessage, WorkerResponse }\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAA,IAAAE,EAAuC,+BAsBjCC,EAAO,aAETC,EACAC,EAGF,WAAmB,2BAA6B,CAChD,YAAYC,EAAiB,CAC3BD,EAAeC,CACjB,CACF,EAEA,eAAeC,GAAoC,CAEjD,IAAMC,EAAU,MAAM,OAAOL,EAAK,aAE5BM,EAAU,CAAE,CAACN,EAAK,UAAU,EAAGK,CAAQ,EACvCE,EAAW,IAAI,YAAY,SAASP,EAAK,WAAYM,CAAO,EAC5DE,EAAiBD,EAAS,QAAQ,iBACxCF,EAAQ,eAAeE,EAAS,OAAO,EACvCC,EAAe,EAEfP,EAAW,IAAII,EAAQ,cAAcL,EAAK,eAAe,CAC3D,CAEA,SAASS,EAAcN,EAA8B,CACnDD,EAAe,OAEf,GAAI,CACF,IAAIQ,EAEAP,EAAQ,OAAS,UACnBO,EAAST,EAAS,QAAQE,EAAQ,OAAO,EAEzCO,EAAST,EAAS,aAAaE,EAAQ,OAAO,EAG5CD,IAAiB,OACnB,aAAY,YAAY,CACtB,KAAM,QACN,GAAIC,EAAQ,GACZ,QAASD,CACX,CAA0B,EAE1B,aAAY,YAAY,CACtB,KAAM,SACN,GAAIC,EAAQ,GACZ,OAAAO,CACF,CAA0B,CAE9B,OAASC,EAAO,CACVT,IAAiB,OACnB,aAAY,YAAY,CACtB,KAAM,QACN,GAAIC,EAAQ,GACZ,QAASD,CACX,CAA0B,EAE1B,aAAY,YAAY,CACtB,KAAM,QACN,GAAIC,EAAQ,GACZ,MAAOQ,aAAiB,MAAQA,EAAM,QAAU,OAAOA,CAAK,CAC9D,CAA0B,CAE9B,CACF,CAEAP,EAAmB,EAChB,KAAK,IAAM,CACV,aAAY,GAAG,UAAWK,CAAa,EACvC,aAAY,YAAY,CAAE,KAAM,OAAQ,CAA0B,CACpE,CAAC,EACA,MAAOE,GAAU,CAChB,IAAMC,EAAeD,aAAiB,MAAQA,EAAM,QAAU,OAAOA,CAAK,EAC1E,aAAY,YAAY,CACtB,KAAM,QACN,GAAI,GACJ,MAAO,kDAAkDC,CAAY,EACvE,CAA0B,CAC5B,CAAC",
6
+ "names": ["query_compiler_worker_exports", "__toCommonJS", "import_node_worker_threads", "data", "compiler", "panicMessage", "message", "initializeCompiler", "runtime", "options", "instance", "wbindgen_start", "handleMessage", "result", "error", "errorMessage"]
7
+ }
@@ -0,0 +1,9 @@
1
+ import * as __banner_node_module from "node:module";
2
+ import * as __banner_node_path from "node:path";
3
+ import * as process from "node:process";
4
+ import * as __banner_node_url from "node:url";
5
+ const __filename = __banner_node_url.fileURLToPath(import.meta.url);
6
+ globalThis['__dirname'] = __banner_node_path.dirname(__filename);
7
+ const require = __banner_node_module.createRequire(import.meta.url);
8
+ import{parentPort as s,workerData as p}from"node:worker_threads";var i=p,o,t;globalThis.PRISMA_WASM_PANIC_REGISTRY={set_message(e){t=e}};async function m(){let e=await import(i.runtimePath),r={[i.importName]:e},n=new WebAssembly.Instance(i.wasmModule,r),a=n.exports.__wbindgen_start;e.__wbg_set_wasm(n.exports),a(),o=new e.QueryCompiler(i.compilerOptions)}function l(e){t=void 0;try{let r;e.type==="compile"?r=o.compile(e.request):r=o.compileBatch(e.request),t!==void 0?s.postMessage({type:"panic",id:e.id,message:t}):s.postMessage({type:"result",id:e.id,result:r})}catch(r){t!==void 0?s.postMessage({type:"panic",id:e.id,message:t}):s.postMessage({type:"error",id:e.id,error:r instanceof Error?r.message:String(r)})}}m().then(()=>{s.on("message",l),s.postMessage({type:"ready"})}).catch(e=>{let r=e instanceof Error?e.message:String(e);s.postMessage({type:"error",id:-1,error:`Failed to initialize query compiler in worker: ${r}`})});
9
+ //# sourceMappingURL=query-compiler-worker.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/runtime/core/engines/client/query-compiler-worker.ts"],
4
+ "sourcesContent": ["import { parentPort, workerData } from 'node:worker_threads'\n\nimport type { QueryCompiler, QueryCompilerOptions } from '@prisma/client-common'\nimport type { BatchResponse, QueryPlanNode } from '@prisma/client-engine-runtime'\n\ntype WorkerMessage =\n | { type: 'compile'; id: number; request: string }\n | { type: 'compileBatch'; id: number; request: string }\n\ntype WorkerResponse =\n | { type: 'result'; id: number; result: QueryPlanNode | BatchResponse }\n | { type: 'error'; id: number; error: string }\n | { type: 'panic'; id: number; message: string }\n | { type: 'ready' }\n\ninterface QueryCompilerWorkerData {\n compilerOptions: QueryCompilerOptions\n wasmModule: WebAssembly.Module\n runtimePath: string\n importName: string\n}\n\nconst data = workerData as QueryCompilerWorkerData\n\nlet compiler: QueryCompiler\nlet panicMessage: string | undefined\n\n // Set up the panic handler for this worker\n;(globalThis as any).PRISMA_WASM_PANIC_REGISTRY = {\n set_message(message: string) {\n panicMessage = message\n },\n}\n\nasync function initializeCompiler(): Promise<void> {\n // Dynamically import the wasm-bindgen runtime module\n const runtime = await import(data.runtimePath)\n\n const options = { [data.importName]: runtime }\n const instance = new WebAssembly.Instance(data.wasmModule, options)\n const wbindgen_start = instance.exports.__wbindgen_start as () => void\n runtime.__wbg_set_wasm(instance.exports)\n wbindgen_start()\n\n compiler = new runtime.QueryCompiler(data.compilerOptions)\n}\n\nfunction handleMessage(message: WorkerMessage): void {\n panicMessage = undefined\n\n try {\n let result: QueryPlanNode | BatchResponse\n\n if (message.type === 'compile') {\n result = compiler.compile(message.request) as QueryPlanNode\n } else {\n result = compiler.compileBatch(message.request)\n }\n\n if (panicMessage !== undefined) {\n parentPort!.postMessage({\n type: 'panic',\n id: message.id,\n message: panicMessage,\n } satisfies WorkerResponse)\n } else {\n parentPort!.postMessage({\n type: 'result',\n id: message.id,\n result,\n } satisfies WorkerResponse)\n }\n } catch (error) {\n if (panicMessage !== undefined) {\n parentPort!.postMessage({\n type: 'panic',\n id: message.id,\n message: panicMessage,\n } satisfies WorkerResponse)\n } else {\n parentPort!.postMessage({\n type: 'error',\n id: message.id,\n error: error instanceof Error ? error.message : String(error),\n } satisfies WorkerResponse)\n }\n }\n}\n\ninitializeCompiler()\n .then(() => {\n parentPort!.on('message', handleMessage)\n parentPort!.postMessage({ type: 'ready' } satisfies WorkerResponse)\n })\n .catch((error) => {\n const errorMessage = error instanceof Error ? error.message : String(error)\n parentPort!.postMessage({\n type: 'error',\n id: -1,\n error: `Failed to initialize query compiler in worker: ${errorMessage}`,\n } satisfies WorkerResponse)\n })\n\nexport type { QueryCompilerWorkerData, WorkerMessage, WorkerResponse }\n"],
5
+ "mappings": ";;;;;;;AAAA,OAAS,cAAAA,EAAY,cAAAC,MAAkB,sBAsBvC,IAAMC,EAAOD,EAETE,EACAC,EAGF,WAAmB,2BAA6B,CAChD,YAAYC,EAAiB,CAC3BD,EAAeC,CACjB,CACF,EAEA,eAAeC,GAAoC,CAEjD,IAAMC,EAAU,MAAM,OAAOL,EAAK,aAE5BM,EAAU,CAAE,CAACN,EAAK,UAAU,EAAGK,CAAQ,EACvCE,EAAW,IAAI,YAAY,SAASP,EAAK,WAAYM,CAAO,EAC5DE,EAAiBD,EAAS,QAAQ,iBACxCF,EAAQ,eAAeE,EAAS,OAAO,EACvCC,EAAe,EAEfP,EAAW,IAAII,EAAQ,cAAcL,EAAK,eAAe,CAC3D,CAEA,SAASS,EAAcN,EAA8B,CACnDD,EAAe,OAEf,GAAI,CACF,IAAIQ,EAEAP,EAAQ,OAAS,UACnBO,EAAST,EAAS,QAAQE,EAAQ,OAAO,EAEzCO,EAAST,EAAS,aAAaE,EAAQ,OAAO,EAG5CD,IAAiB,OACnBJ,EAAY,YAAY,CACtB,KAAM,QACN,GAAIK,EAAQ,GACZ,QAASD,CACX,CAA0B,EAE1BJ,EAAY,YAAY,CACtB,KAAM,SACN,GAAIK,EAAQ,GACZ,OAAAO,CACF,CAA0B,CAE9B,OAASC,EAAO,CACVT,IAAiB,OACnBJ,EAAY,YAAY,CACtB,KAAM,QACN,GAAIK,EAAQ,GACZ,QAASD,CACX,CAA0B,EAE1BJ,EAAY,YAAY,CACtB,KAAM,QACN,GAAIK,EAAQ,GACZ,MAAOQ,aAAiB,MAAQA,EAAM,QAAU,OAAOA,CAAK,CAC9D,CAA0B,CAE9B,CACF,CAEAP,EAAmB,EAChB,KAAK,IAAM,CACVN,EAAY,GAAG,UAAWW,CAAa,EACvCX,EAAY,YAAY,CAAE,KAAM,OAAQ,CAA0B,CACpE,CAAC,EACA,MAAOa,GAAU,CAChB,IAAMC,EAAeD,aAAiB,MAAQA,EAAM,QAAU,OAAOA,CAAK,EAC1Eb,EAAY,YAAY,CACtB,KAAM,QACN,GAAI,GACJ,MAAO,kDAAkDc,CAAY,EACvE,CAA0B,CAC5B,CAAC",
6
+ "names": ["parentPort", "workerData", "data", "compiler", "panicMessage", "message", "initializeCompiler", "runtime", "options", "instance", "wbindgen_start", "handleMessage", "result", "error", "errorMessage"]
7
+ }