prisma 6.2.0-dev.12 → 6.2.0-dev.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/build/index.js +4 -4
- package/build/prisma_schema_build_bg.wasm +0 -0
- package/package.json +10 -10
- package/prisma-client/generator-build/index.js +9 -9
- package/prisma-client/package.json +3 -3
- package/prisma-client/runtime/binary.js +3 -3
- package/prisma-client/runtime/edge-esm.js +3 -3
- package/prisma-client/runtime/edge.js +3 -3
- package/prisma-client/runtime/library.js +3 -3
- package/prisma-client/runtime/react-native.js +2 -2
- package/prisma-client/scripts/default-index.js +3 -3
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "6.2.0-dev.
|
|
2
|
+
"version": "6.2.0-dev.13",
|
|
3
3
|
"name": "prisma",
|
|
4
4
|
"description": "Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit the data in your database. You can use Prisma in new projects or add it to an existing one.",
|
|
5
5
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=18.18"
|
|
42
42
|
},
|
|
43
43
|
"prisma": {
|
|
44
|
-
"prismaCommit": "
|
|
44
|
+
"prismaCommit": "6ea69912d229e9e3c99cc7563f200b066580ffd0"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
47
|
"README.md",
|
|
@@ -107,16 +107,16 @@
|
|
|
107
107
|
"typescript": "5.4.5",
|
|
108
108
|
"xdg-app-paths": "8.3.0",
|
|
109
109
|
"zx": "7.2.3",
|
|
110
|
-
"@prisma/
|
|
111
|
-
"@prisma/
|
|
112
|
-
"@prisma/
|
|
113
|
-
"@prisma/generator-helper": "6.2.0-dev.
|
|
114
|
-
"@prisma/get-platform": "6.2.0-dev.
|
|
115
|
-
"@prisma/internals": "6.2.0-dev.
|
|
116
|
-
"@prisma/migrate": "6.2.0-dev.
|
|
110
|
+
"@prisma/client": "6.2.0-dev.13",
|
|
111
|
+
"@prisma/debug": "6.2.0-dev.13",
|
|
112
|
+
"@prisma/fetch-engine": "6.2.0-dev.13",
|
|
113
|
+
"@prisma/generator-helper": "6.2.0-dev.13",
|
|
114
|
+
"@prisma/get-platform": "6.2.0-dev.13",
|
|
115
|
+
"@prisma/internals": "6.2.0-dev.13",
|
|
116
|
+
"@prisma/migrate": "6.2.0-dev.13"
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@prisma/engines": "6.2.0-dev.
|
|
119
|
+
"@prisma/engines": "6.2.0-dev.13"
|
|
120
120
|
},
|
|
121
121
|
"optionalDependencies": {
|
|
122
122
|
"fsevents": "2.3.3"
|
|
@@ -33,18 +33,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/@prisma+engines-version@6.2.0-
|
|
36
|
+
// ../../node_modules/.pnpm/@prisma+engines-version@6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d/node_modules/@prisma/engines-version/package.json
|
|
37
37
|
var require_package = __commonJS({
|
|
38
|
-
"../../node_modules/.pnpm/@prisma+engines-version@6.2.0-
|
|
38
|
+
"../../node_modules/.pnpm/@prisma+engines-version@6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d/node_modules/@prisma/engines-version/package.json"(exports2, module2) {
|
|
39
39
|
module2.exports = {
|
|
40
40
|
name: "@prisma/engines-version",
|
|
41
|
-
version: "6.2.0-
|
|
41
|
+
version: "6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d",
|
|
42
42
|
main: "index.js",
|
|
43
43
|
types: "index.d.ts",
|
|
44
44
|
license: "Apache-2.0",
|
|
45
45
|
author: "Tim Suchanek <suchanek@prisma.io>",
|
|
46
46
|
prisma: {
|
|
47
|
-
enginesVersion: "
|
|
47
|
+
enginesVersion: "51db5cf11ad393407e86084764bced274b48b27d"
|
|
48
48
|
},
|
|
49
49
|
repository: {
|
|
50
50
|
type: "git",
|
|
@@ -66,9 +66,9 @@ var require_package = __commonJS({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
// ../../node_modules/.pnpm/@prisma+engines-version@6.2.0-
|
|
69
|
+
// ../../node_modules/.pnpm/@prisma+engines-version@6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d/node_modules/@prisma/engines-version/index.js
|
|
70
70
|
var require_engines_version = __commonJS({
|
|
71
|
-
"../../node_modules/.pnpm/@prisma+engines-version@6.2.0-
|
|
71
|
+
"../../node_modules/.pnpm/@prisma+engines-version@6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d/node_modules/@prisma/engines-version/index.js"(exports2) {
|
|
72
72
|
"use strict";
|
|
73
73
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
74
74
|
exports2.enginesVersion = void 0;
|
|
@@ -3946,7 +3946,7 @@ var require_package2 = __commonJS({
|
|
|
3946
3946
|
"package.json"(exports2, module2) {
|
|
3947
3947
|
module2.exports = {
|
|
3948
3948
|
name: "@prisma/client",
|
|
3949
|
-
version: "6.2.0-dev.
|
|
3949
|
+
version: "6.2.0-dev.13",
|
|
3950
3950
|
description: "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
|
|
3951
3951
|
keywords: [
|
|
3952
3952
|
"ORM",
|
|
@@ -4145,7 +4145,7 @@ var require_package2 = __commonJS({
|
|
|
4145
4145
|
"@prisma/debug": "workspace:*",
|
|
4146
4146
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
4147
4147
|
"@prisma/engines": "workspace:*",
|
|
4148
|
-
"@prisma/engines-version": "6.2.0-
|
|
4148
|
+
"@prisma/engines-version": "6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d",
|
|
4149
4149
|
"@prisma/fetch-engine": "workspace:*",
|
|
4150
4150
|
"@prisma/generator-helper": "workspace:*",
|
|
4151
4151
|
"@prisma/get-platform": "workspace:*",
|
|
@@ -4154,7 +4154,7 @@ var require_package2 = __commonJS({
|
|
|
4154
4154
|
"@prisma/migrate": "workspace:*",
|
|
4155
4155
|
"@prisma/mini-proxy": "0.9.5",
|
|
4156
4156
|
"@prisma/pg-worker": "workspace:*",
|
|
4157
|
-
"@prisma/query-engine-wasm": "6.2.0-
|
|
4157
|
+
"@prisma/query-engine-wasm": "6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d",
|
|
4158
4158
|
"@snaplet/copycat": "0.17.3",
|
|
4159
4159
|
"@swc-node/register": "1.10.9",
|
|
4160
4160
|
"@swc/core": "1.10.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client",
|
|
3
|
-
"version": "6.2.0-dev.
|
|
3
|
+
"version": "6.2.0-dev.13",
|
|
4
4
|
"description": "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ORM",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"@prisma/debug": "workspace:*",
|
|
200
200
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
201
201
|
"@prisma/engines": "workspace:*",
|
|
202
|
-
"@prisma/engines-version": "6.2.0-
|
|
202
|
+
"@prisma/engines-version": "6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d",
|
|
203
203
|
"@prisma/fetch-engine": "workspace:*",
|
|
204
204
|
"@prisma/generator-helper": "workspace:*",
|
|
205
205
|
"@prisma/get-platform": "workspace:*",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"@prisma/migrate": "workspace:*",
|
|
209
209
|
"@prisma/mini-proxy": "0.9.5",
|
|
210
210
|
"@prisma/pg-worker": "workspace:*",
|
|
211
|
-
"@prisma/query-engine-wasm": "6.2.0-
|
|
211
|
+
"@prisma/query-engine-wasm": "6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d",
|
|
212
212
|
"@snaplet/copycat": "0.17.3",
|
|
213
213
|
"@swc-node/register": "1.10.9",
|
|
214
214
|
"@swc/core": "1.10.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";var FD=Object.create;var Oi=Object.defineProperty;var xD=Object.getOwnPropertyDescriptor;var LD=Object.getOwnPropertyNames;var UD=Object.getPrototypeOf,TD=Object.prototype.hasOwnProperty;var bd=e=>{throw TypeError(e)};var MD=(e,A,t)=>A in e?Oi(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t;var Q=(e,A)=>()=>(A||e((A={exports:{}}).exports,A),A.exports),Hi=(e,A)=>{for(var t in A)Oi(e,t,{get:A[t],enumerable:!0})},kd=(e,A,t,r)=>{if(A&&typeof A=="object"||typeof A=="function")for(let n of LD(A))!TD.call(e,n)&&n!==t&&Oi(e,n,{get:()=>A[n],enumerable:!(r=xD(A,n))||r.enumerable});return e};var Z=(e,A,t)=>(t=e!=null?FD(UD(e)):{},kd(A||!e||!e.__esModule?Oi(t,"default",{value:e,enumerable:!0}):t,e)),vD=e=>kd(Oi({},"__esModule",{value:!0}),e);var Sd=(e,A,t)=>MD(e,typeof A!="symbol"?A+"":A,t),_g=(e,A,t)=>A.has(e)||bd("Cannot "+t);var f=(e,A,t)=>(_g(e,A,"read from private field"),t?t.call(e):A.get(e)),Fe=(e,A,t)=>A.has(e)?bd("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(e):A.set(e,t),Ae=(e,A,t,r)=>(_g(e,A,"write to private field"),r?r.call(e,t):A.set(e,t),t),vA=(e,A,t)=>(_g(e,A,"access private method"),t);var eQ=Q((MV,$d)=>{"use strict";$d.exports=zd;zd.sync=wb;var Zd=require("fs");function yb(e,A){var t=A.pathExt!==void 0?A.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var r=0;r<t.length;r++){var n=t[r].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}function Xd(e,A,t){return!e.isSymbolicLink()&&!e.isFile()?!1:yb(A,t)}function zd(e,A,t){Zd.stat(e,function(r,n){t(r,r?!1:Xd(n,e,A))})}function wb(e,A){return Xd(Zd.statSync(e),e,A)}});var iQ=Q((vV,nQ)=>{"use strict";nQ.exports=tQ;tQ.sync=Rb;var AQ=require("fs");function tQ(e,A,t){AQ.stat(e,function(r,n){t(r,r?!1:rQ(n,A))})}function Rb(e,A){return rQ(AQ.statSync(e),A)}function rQ(e,A){return e.isFile()&&Db(e,A)}function Db(e,A){var t=e.mode,r=e.uid,n=e.gid,i=A.uid!==void 0?A.uid:process.getuid&&process.getuid(),s=A.gid!==void 0?A.gid:process.getgid&&process.getgid(),o=parseInt("100",8),a=parseInt("010",8),c=parseInt("001",8),g=o|a,l=t&c||t&a&&n===s||t&o&&r===i||t&g&&i===0;return l}});var oQ=Q((GV,sQ)=>{"use strict";var PV=require("fs"),_o;process.platform==="win32"||global.TESTING_WINDOWS?_o=eQ():_o=iQ();sQ.exports=il;il.sync=bb;function il(e,A,t){if(typeof A=="function"&&(t=A,A={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,n){il(e,A||{},function(i,s){i?n(i):r(s)})})}_o(e,A||{},function(r,n){r&&(r.code==="EACCES"||A&&A.ignoreErrors)&&(r=null,n=!1),t(r,n)})}function bb(e,A){try{return _o.sync(e,A||{})}catch(t){if(A&&A.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var hQ=Q((YV,EQ)=>{"use strict";var Cn=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",aQ=require("path"),kb=Cn?";":":",cQ=oQ(),gQ=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),lQ=(e,A)=>{let t=A.colon||kb,r=e.match(/\//)||Cn&&e.match(/\\/)?[""]:[...Cn?[process.cwd()]:[],...(A.path||process.env.PATH||"").split(t)],n=Cn?A.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=Cn?n.split(t):[""];return Cn&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:n}},uQ=(e,A,t)=>{typeof A=="function"&&(t=A,A={}),A||(A={});let{pathEnv:r,pathExt:n,pathExtExe:i}=lQ(e,A),s=[],o=c=>new Promise((g,l)=>{if(c===r.length)return A.all&&s.length?g(s):l(gQ(e));let u=r[c],E=/^".*"$/.test(u)?u.slice(1,-1):u,h=aQ.join(E,e),d=!E&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;g(a(d,c,0))}),a=(c,g,l)=>new Promise((u,E)=>{if(l===n.length)return u(o(g+1));let h=n[l];cQ(c+h,{pathExt:i},(d,C)=>{if(!d&&C)if(A.all)s.push(c+h);else return u(c+h);return u(a(c,g,l+1))})});return t?o(0).then(c=>t(null,c),t):o(0)},Sb=(e,A)=>{A=A||{};let{pathEnv:t,pathExt:r,pathExtExe:n}=lQ(e,A),i=[];for(let s=0;s<t.length;s++){let o=t[s],a=/^".*"$/.test(o)?o.slice(1,-1):o,c=aQ.join(a,e),g=!a&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let l=0;l<r.length;l++){let u=g+r[l];try{if(cQ.sync(u,{pathExt:n}))if(A.all)i.push(u);else return u}catch{}}}if(A.all&&i.length)return i;if(A.nothrow)return null;throw gQ(e)};EQ.exports=uQ;uQ.sync=Sb});var ol=Q((JV,sl)=>{"use strict";var dQ=(e={})=>{let A=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(A).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};sl.exports=dQ;sl.exports.default=dQ});var IQ=Q((VV,fQ)=>{"use strict";var QQ=require("path"),Nb=hQ(),Fb=ol();function CQ(e,A){let t=e.options.env||process.env,r=process.cwd(),n=e.options.cwd!=null,i=n&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=Nb.sync(e.command,{path:t[Fb({env:t})],pathExt:A?QQ.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=QQ.resolve(n?e.options.cwd:"",s)),s}function xb(e){return CQ(e)||CQ(e,!0)}fQ.exports=xb});var BQ=Q((qV,cl)=>{"use strict";var al=/([()\][%!^"`<>&|;, *?])/g;function Lb(e){return e=e.replace(al,"^$1"),e}function Ub(e,A){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(al,"^$1"),A&&(e=e.replace(al,"^$1")),e}cl.exports.command=Lb;cl.exports.argument=Ub});var mQ=Q((OV,pQ)=>{"use strict";pQ.exports=/^#!(.*)/});var wQ=Q((HV,yQ)=>{"use strict";var Tb=mQ();yQ.exports=(e="")=>{let A=e.match(Tb);if(!A)return null;let[t,r]=A[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?r:r?`${n} ${r}`:n}});var DQ=Q((WV,RQ)=>{"use strict";var gl=require("fs"),Mb=wQ();function vb(e){let t=Buffer.alloc(150),r;try{r=gl.openSync(e,"r"),gl.readSync(r,t,0,150,0),gl.closeSync(r)}catch{}return Mb(t.toString())}RQ.exports=vb});var NQ=Q((_V,SQ)=>{"use strict";var Pb=require("path"),bQ=IQ(),kQ=BQ(),Gb=DQ(),Yb=process.platform==="win32",Jb=/\.(?:com|exe)$/i,Vb=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function qb(e){e.file=bQ(e);let A=e.file&&Gb(e.file);return A?(e.args.unshift(e.file),e.command=A,bQ(e)):e.file}function Ob(e){if(!Yb)return e;let A=qb(e),t=!Jb.test(A);if(e.options.forceShell||t){let r=Vb.test(A);e.command=Pb.normalize(e.command),e.command=kQ.command(e.command),e.args=e.args.map(i=>kQ.argument(i,r));let n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Hb(e,A,t){A&&!Array.isArray(A)&&(t=A,A=null),A=A?A.slice(0):[],t=Object.assign({},t);let r={command:e,args:A,options:t,file:void 0,original:{command:e,args:A}};return t.shell?r:Ob(r)}SQ.exports=Hb});var LQ=Q((jV,xQ)=>{"use strict";var ll=process.platform==="win32";function ul(e,A){return Object.assign(new Error(`${A} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${A} ${e.command}`,path:e.command,spawnargs:e.args})}function Wb(e,A){if(!ll)return;let t=e.emit;e.emit=function(r,n){if(r==="exit"){let i=FQ(n,A,"spawn");if(i)return t.call(e,"error",i)}return t.apply(e,arguments)}}function FQ(e,A){return ll&&e===1&&!A.file?ul(A.original,"spawn"):null}function _b(e,A){return ll&&e===1&&!A.file?ul(A.original,"spawnSync"):null}xQ.exports={hookChildProcess:Wb,verifyENOENT:FQ,verifyENOENTSync:_b,notFoundError:ul}});var MQ=Q((KV,fn)=>{"use strict";var UQ=require("child_process"),El=NQ(),hl=LQ();function TQ(e,A,t){let r=El(e,A,t),n=UQ.spawn(r.command,r.args,r.options);return hl.hookChildProcess(n,r),n}function jb(e,A,t){let r=El(e,A,t),n=UQ.spawnSync(r.command,r.args,r.options);return n.error=n.error||hl.verifyENOENTSync(n.status,r),n}fn.exports=TQ;fn.exports.spawn=TQ;fn.exports.sync=jb;fn.exports._parse=El;fn.exports._enoent=hl});var PQ=Q((ZV,vQ)=>{"use strict";vQ.exports=e=>{let A=typeof e=="string"?`
|
|
2
2
|
`:10,t=typeof e=="string"?"\r":13;return e[e.length-1]===A&&(e=e.slice(0,e.length-1)),e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e}});var JQ=Q((XV,Xi)=>{"use strict";var Zi=require("path"),GQ=ol(),YQ=e=>{e={cwd:process.cwd(),path:process.env[GQ()],execPath:process.execPath,...e};let A,t=Zi.resolve(e.cwd),r=[];for(;A!==t;)r.push(Zi.join(t,"node_modules/.bin")),A=t,t=Zi.resolve(t,"..");let n=Zi.resolve(e.cwd,e.execPath,"..");return r.push(n),r.concat(e.path).join(Zi.delimiter)};Xi.exports=YQ;Xi.exports.default=YQ;Xi.exports.env=e=>{e={env:process.env,...e};let A={...e.env},t=GQ({env:A});return e.path=A[t],A[t]=Xi.exports(e),A}});var qQ=Q((zV,dl)=>{"use strict";var VQ=(e,A)=>{for(let t of Reflect.ownKeys(A))Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(A,t));return e};dl.exports=VQ;dl.exports.default=VQ});var HQ=Q(($V,Ko)=>{"use strict";var Kb=qQ(),jo=new WeakMap,OQ=(e,A={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let t,r=0,n=e.displayName||e.name||"<anonymous>",i=function(...s){if(jo.set(i,++r),r===1)t=e.apply(this,s),e=null;else if(A.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return t};return Kb(i,e),jo.set(i,r),i};Ko.exports=OQ;Ko.exports.default=OQ;Ko.exports.callCount=e=>{if(!jo.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return jo.get(e)}});var WQ=Q(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.SIGNALS=void 0;var Zb=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];Zo.SIGNALS=Zb});var Ql=Q(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.SIGRTMAX=In.getRealtimeSignals=void 0;var Xb=function(){let e=jQ-_Q+1;return Array.from({length:e},zb)};In.getRealtimeSignals=Xb;var zb=function(e,A){return{name:`SIGRT${A+1}`,number:_Q+A,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},_Q=34,jQ=64;In.SIGRTMAX=jQ});var KQ=Q(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.getSignals=void 0;var $b=require("os"),ek=WQ(),Ak=Ql(),tk=function(){let e=(0,Ak.getRealtimeSignals)();return[...ek.SIGNALS,...e].map(rk)};Xo.getSignals=tk;var rk=function({name:e,number:A,description:t,action:r,forced:n=!1,standard:i}){let{signals:{[e]:s}}=$b.constants,o=s!==void 0;return{name:e,number:o?s:A,description:t,supported:o,action:r,forced:n,standard:i}}});var XQ=Q(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.signalsByNumber=Bn.signalsByName=void 0;var nk=require("os"),ZQ=KQ(),ik=Ql(),sk=function(){return(0,ZQ.getSignals)().reduce(ok,{})},ok=function(e,{name:A,number:t,description:r,supported:n,action:i,forced:s,standard:o}){return{...e,[A]:{name:A,number:t,description:r,supported:n,action:i,forced:s,standard:o}}},ak=sk();Bn.signalsByName=ak;var ck=function(){let e=(0,ZQ.getSignals)(),A=ik.SIGRTMAX+1,t=Array.from({length:A},(r,n)=>gk(n,e));return Object.assign({},...t)},gk=function(e,A){let t=lk(e,A);if(t===void 0)return{};let{name:r,description:n,supported:i,action:s,forced:o,standard:a}=t;return{[e]:{name:r,number:e,description:n,supported:i,action:s,forced:o,standard:a}}},lk=function(e,A){let t=A.find(({name:r})=>nk.constants.signals[r]===e);return t!==void 0?t:A.find(r=>r.number===e)},uk=ck();Bn.signalsByNumber=uk});var $Q=Q((nq,zQ)=>{"use strict";var{signalsByName:Ek}=XQ(),hk=({timedOut:e,timeout:A,errorCode:t,signal:r,signalDescription:n,exitCode:i,isCanceled:s})=>e?`timed out after ${A} milliseconds`:s?"was canceled":t!==void 0?`failed with ${t}`:r!==void 0?`was killed with ${r} (${n})`:i!==void 0?`failed with exit code ${i}`:"failed",dk=({stdout:e,stderr:A,all:t,error:r,signal:n,exitCode:i,command:s,escapedCommand:o,timedOut:a,isCanceled:c,killed:g,parsed:{options:{timeout:l}}})=>{i=i===null?void 0:i,n=n===null?void 0:n;let u=n===void 0?void 0:Ek[n].description,E=r&&r.code,d=`Command ${hk({timedOut:a,timeout:l,errorCode:E,signal:n,signalDescription:u,exitCode:i,isCanceled:c})}: ${s}`,C=Object.prototype.toString.call(r)==="[object Error]",I=C?`${d}
|
|
3
3
|
${r.message}`:d,p=[I,A,e].filter(Boolean).join(`
|
|
4
|
-
`);return C?(r.originalMessage=r.message,r.message=p):r=new Error(p),r.shortMessage=I,r.command=s,r.escapedCommand=o,r.exitCode=i,r.signal=n,r.signalDescription=u,r.stdout=e,r.stderr=A,t!==void 0&&(r.all=t),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!a,r.isCanceled=c,r.killed=g&&!a,r};zQ.exports=dk});var AC=Q((iq,Cl)=>{"use strict";var zo=["stdin","stdout","stderr"],Qk=e=>zo.some(A=>e[A]!==void 0),eC=e=>{if(!e)return;let{stdio:A}=e;if(A===void 0)return zo.map(r=>e[r]);if(Qk(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${zo.map(r=>`\`${r}\``).join(", ")}`);if(typeof A=="string")return A;if(!Array.isArray(A))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof A}\``);let t=Math.max(A.length,zo.length);return Array.from({length:t},(r,n)=>A[n])};Cl.exports=eC;Cl.exports.node=e=>{let A=eC(e);return A==="ipc"?"ipc":A===void 0||typeof A=="string"?[A,A,A,"ipc"]:A.includes("ipc")?A:[...A,"ipc"]}});var tC=Q((sq,$o)=>{"use strict";$o.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&$o.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&$o.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var oC=Q((oq,yn)=>{"use strict";var we=global.process,Mr=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Mr(we)?(rC=require("assert"),pn=tC(),nC=/^win/i.test(we.platform),zi=require("events"),typeof zi!="function"&&(zi=zi.EventEmitter),we.__signal_exit_emitter__?Ve=we.__signal_exit_emitter__:(Ve=we.__signal_exit_emitter__=new zi,Ve.count=0,Ve.emitted={}),Ve.infinite||(Ve.setMaxListeners(1/0),Ve.infinite=!0),yn.exports=function(e,A){if(!Mr(global.process))return function(){};rC.equal(typeof e,"function","a callback must be provided for exit handler"),mn===!1&&fl();var t="exit";A&&A.alwaysLast&&(t="afterexit");var r=function(){Ve.removeListener(t,e),Ve.listeners("exit").length===0&&Ve.listeners("afterexit").length===0&&ea()};return Ve.on(t,e),r},ea=function(){!mn||!Mr(global.process)||(mn=!1,pn.forEach(function(A){try{we.removeListener(A,Aa[A])}catch{}}),we.emit=ta,we.reallyExit=Il,Ve.count-=1)},yn.exports.unload=ea,vr=function(A,t,r){Ve.emitted[A]||(Ve.emitted[A]=!0,Ve.emit(A,t,r))},Aa={},pn.forEach(function(e){Aa[e]=function(){if(Mr(global.process)){var t=we.listeners(e);t.length===Ve.count&&(ea(),vr("exit",null,e),vr("afterexit",null,e),nC&&e==="SIGHUP"&&(e="SIGINT"),we.kill(we.pid,e))}}}),yn.exports.signals=function(){return pn},mn=!1,fl=function(){mn||!Mr(global.process)||(mn=!0,Ve.count+=1,pn=pn.filter(function(A){try{return we.on(A,Aa[A]),!0}catch{return!1}}),we.emit=sC,we.reallyExit=iC)},yn.exports.load=fl,Il=we.reallyExit,iC=function(A){Mr(global.process)&&(we.exitCode=A||0,vr("exit",we.exitCode,null),vr("afterexit",we.exitCode,null),Il.call(we,we.exitCode))},ta=we.emit,sC=function(A,t){if(A==="exit"&&Mr(global.process)){t!==void 0&&(we.exitCode=t);var r=ta.apply(this,arguments);return vr("exit",we.exitCode,null),vr("afterexit",we.exitCode,null),r}else return ta.apply(this,arguments)}):yn.exports=function(){return function(){}};var rC,pn,nC,zi,Ve,ea,vr,Aa,mn,fl,Il,iC,ta,sC});var cC=Q((aq,aC)=>{"use strict";var Ck=require("os"),fk=oC(),Ik=1e3*5,Bk=(e,A="SIGTERM",t={})=>{let r=e(A);return pk(e,A,t,r),r},pk=(e,A,t,r)=>{if(!mk(A,t,r))return;let n=wk(t),i=setTimeout(()=>{e("SIGKILL")},n);i.unref&&i.unref()},mk=(e,{forceKillAfterTimeout:A},t)=>yk(e)&&A!==!1&&t,yk=e=>e===Ck.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",wk=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return Ik;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Rk=(e,A)=>{e.kill()&&(A.isCanceled=!0)},Dk=(e,A,t)=>{e.kill(A),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:A}))},bk=(e,{timeout:A,killSignal:t="SIGTERM"},r)=>{if(A===0||A===void 0)return r;let n,i=new Promise((o,a)=>{n=setTimeout(()=>{Dk(e,t,a)},A)}),s=r.finally(()=>{clearTimeout(n)});return Promise.race([i,s])},kk=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Sk=async(e,{cleanup:A,detached:t},r)=>{if(!A||t)return r;let n=fk(()=>{e.kill()});return r.finally(()=>{n()})};aC.exports={spawnedKill:Bk,spawnedCancel:Rk,setupTimeout:bk,validateTimeout:kk,setExitHandler:Sk}});var lC=Q((cq,gC)=>{"use strict";var lt=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";lt.writable=e=>lt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";lt.readable=e=>lt(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";lt.duplex=e=>lt.writable(e)&<.readable(e);lt.transform=e=>lt.duplex(e)&&typeof e._transform=="function";gC.exports=lt});var EC=Q((gq,uC)=>{"use strict";var{PassThrough:Nk}=require("stream");uC.exports=e=>{e={...e};let{array:A}=e,{encoding:t}=e,r=t==="buffer",n=!1;A?n=!(t||r):t=t||"utf8",r&&(t=null);let i=new Nk({objectMode:n});t&&i.setEncoding(t);let s=0,o=[];return i.on("data",a=>{o.push(a),n?s=o.length:s+=a.length}),i.getBufferedValue=()=>A?o:r?Buffer.concat(o,s):o.join(""),i.getBufferedLength=()=>s,i}});var pl=Q((lq,$i)=>{"use strict";var{constants:Fk}=require("buffer"),xk=require("stream"),{promisify:Lk}=require("util"),Uk=EC(),Tk=Lk(xk.pipeline),ra=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Bl(e,A){if(!e)throw new Error("Expected a stream");A={maxBuffer:1/0,...A};let{maxBuffer:t}=A,r=Uk(A);return await new Promise((n,i)=>{let s=o=>{o&&r.getBufferedLength()<=Fk.MAX_LENGTH&&(o.bufferedData=r.getBufferedValue()),i(o)};(async()=>{try{await Tk(e,r),n()}catch(o){s(o)}})(),r.on("data",()=>{r.getBufferedLength()>t&&s(new ra)})}),r.getBufferedValue()}$i.exports=Bl;$i.exports.buffer=(e,A)=>Bl(e,{...A,encoding:"buffer"});$i.exports.array=(e,A)=>Bl(e,{...A,array:!0});$i.exports.MaxBufferError=ra});var dC=Q((uq,hC)=>{"use strict";var{PassThrough:Mk}=require("stream");hC.exports=function(){var e=[],A=new Mk({objectMode:!0});return A.setMaxListeners(0),A.add=t,A.isEmpty=r,A.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(t),A;function t(i){return Array.isArray(i)?(i.forEach(t),this):(e.push(i),i.once("end",n.bind(null,i)),i.once("error",A.emit.bind(A,"error")),i.pipe(A,{end:!1}),this)}function r(){return e.length==0}function n(i){e=e.filter(function(s){return s!==i}),!e.length&&A.readable&&A.end()}}});var IC=Q((Eq,fC)=>{"use strict";var CC=lC(),QC=pl(),vk=dC(),Pk=(e,A)=>{A===void 0||e.stdin===void 0||(CC(A)?A.pipe(e.stdin):e.stdin.end(A))},Gk=(e,{all:A})=>{if(!A||!e.stdout&&!e.stderr)return;let t=vk();return e.stdout&&t.add(e.stdout),e.stderr&&t.add(e.stderr),t},ml=async(e,A)=>{if(e){e.destroy();try{return await A}catch(t){return t.bufferedData}}},yl=(e,{encoding:A,buffer:t,maxBuffer:r})=>{if(!(!e||!t))return A?QC(e,{encoding:A,maxBuffer:r}):QC.buffer(e,{maxBuffer:r})},Yk=async({stdout:e,stderr:A,all:t},{encoding:r,buffer:n,maxBuffer:i},s)=>{let o=yl(e,{encoding:r,buffer:n,maxBuffer:i}),a=yl(A,{encoding:r,buffer:n,maxBuffer:i}),c=yl(t,{encoding:r,buffer:n,maxBuffer:i*2});try{return await Promise.all([s,o,a,c])}catch(g){return Promise.all([{error:g,signal:g.signal,timedOut:g.timedOut},ml(e,o),ml(A,a),ml(t,c)])}},Jk=({input:e})=>{if(CC(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};fC.exports={handleInput:Pk,makeAllStream:Gk,getSpawnedResult:Yk,validateInputSync:Jk}});var pC=Q((hq,BC)=>{"use strict";var Vk=(async()=>{})().constructor.prototype,qk=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Vk,e)]),Ok=(e,A)=>{for(let[t,r]of qk){let n=typeof A=="function"?(...i)=>Reflect.apply(r.value,A(),i):r.value.bind(A);Reflect.defineProperty(e,t,{...r,value:n})}return e},Hk=e=>new Promise((A,t)=>{e.on("exit",(r,n)=>{A({exitCode:r,signal:n})}),e.on("error",r=>{t(r)}),e.stdin&&e.stdin.on("error",r=>{t(r)})});BC.exports={mergePromise:Ok,getSpawnedPromise:Hk}});var wC=Q((dq,yC)=>{"use strict";var mC=(e,A=[])=>Array.isArray(A)?[e,...A]:[e],Wk=/^[\w.-]+$/,_k=/"/g,jk=e=>typeof e!="string"||Wk.test(e)?e:`"${e.replace(_k,'\\"')}"`,Kk=(e,A)=>mC(e,A).join(" "),Zk=(e,A)=>mC(e,A).map(t=>jk(t)).join(" "),Xk=/ +/g,zk=e=>{let A=[];for(let t of e.trim().split(Xk)){let r=A[A.length-1];r&&r.endsWith("\\")?A[A.length-1]=`${r.slice(0,-1)} ${t}`:A.push(t)}return A};yC.exports={joinCommand:Kk,getEscapedCommand:Zk,parseCommand:zk}});var FC=Q((Qq,wn)=>{"use strict";var $k=require("path"),wl=require("child_process"),eS=MQ(),AS=PQ(),tS=JQ(),rS=HQ(),na=$Q(),DC=AC(),{spawnedKill:nS,spawnedCancel:iS,setupTimeout:sS,validateTimeout:oS,setExitHandler:aS}=cC(),{handleInput:cS,getSpawnedResult:gS,makeAllStream:lS,validateInputSync:uS}=IC(),{mergePromise:RC,getSpawnedPromise:ES}=pC(),{joinCommand:bC,parseCommand:kC,getEscapedCommand:SC}=wC(),hS=1e3*1e3*100,dS=({env:e,extendEnv:A,preferLocal:t,localDir:r,execPath:n})=>{let i=A?{...process.env,...e}:e;return t?tS.env({env:i,cwd:r,execPath:n}):i},NC=(e,A,t={})=>{let r=eS._parse(e,A,t);return e=r.command,A=r.args,t=r.options,t={maxBuffer:hS,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:t.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...t},t.env=dS(t),t.stdio=DC(t),process.platform==="win32"&&$k.basename(e,".exe")==="cmd"&&A.unshift("/q"),{file:e,args:A,options:t,parsed:r}},es=(e,A,t)=>typeof A!="string"&&!Buffer.isBuffer(A)?t===void 0?void 0:"":e.stripFinalNewline?AS(A):A,ia=(e,A,t)=>{let r=NC(e,A,t),n=bC(e,A),i=SC(e,A);oS(r.options);let s;try{s=wl.spawn(r.file,r.args,r.options)}catch(E){let h=new wl.ChildProcess,d=Promise.reject(na({error:E,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return RC(h,d)}let o=ES(s),a=sS(s,r.options,o),c=aS(s,r.options,a),g={isCanceled:!1};s.kill=nS.bind(null,s.kill.bind(s)),s.cancel=iS.bind(null,s,g);let u=rS(async()=>{let[{error:E,exitCode:h,signal:d,timedOut:C},I,p,y]=await gS(s,r.options,c),R=es(r.options,I),x=es(r.options,p),W=es(r.options,y);if(E||h!==0||d!==null){let ne=na({error:E,exitCode:h,signal:d,stdout:R,stderr:x,all:W,command:n,escapedCommand:i,parsed:r,timedOut:C,isCanceled:g.isCanceled,killed:s.killed});if(!r.options.reject)return ne;throw ne}return{command:n,escapedCommand:i,exitCode:0,stdout:R,stderr:x,all:W,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return cS(s,r.options.input),s.all=lS(s,r.options),RC(s,u)};wn.exports=ia;wn.exports.sync=(e,A,t)=>{let r=NC(e,A,t),n=bC(e,A),i=SC(e,A);uS(r.options);let s;try{s=wl.spawnSync(r.file,r.args,r.options)}catch(c){throw na({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let o=es(r.options,s.stdout,s.error),a=es(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let c=na({stdout:o,stderr:a,error:s.error,signal:s.signal,exitCode:s.status,command:n,escapedCommand:i,parsed:r,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return c;throw c}return{command:n,escapedCommand:i,exitCode:0,stdout:o,stderr:a,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};wn.exports.command=(e,A)=>{let[t,...r]=kC(e);return ia(t,r,A)};wn.exports.commandSync=(e,A)=>{let[t,...r]=kC(e);return ia.sync(t,r,A)};wn.exports.node=(e,A,t={})=>{A&&!Array.isArray(A)&&typeof A=="object"&&(t=A,A=[]);let r=DC.node(t),n=process.execArgv.filter(o=>!o.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=n}=t;return ia(i,[...s,e,...Array.isArray(A)?A:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var Rl=Q((yq,QS)=>{QS.exports={name:"@prisma/engines-version",version:"6.2.0-11.c49e56c20818c325095752dd0ae895b0dc7bad9f",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"c49e56c20818c325095752dd0ae895b0dc7bad9f"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Dl=Q(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.enginesVersion=void 0;sa.enginesVersion=Rl().prisma.enginesVersion});var LC=Q((Rq,xC)=>{"use strict";function YA(e,A){typeof A=="boolean"&&(A={forever:A}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=A||{},this._maxRetryTime=A&&A.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}xC.exports=YA;YA.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};YA.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};YA.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var A=new Date().getTime();if(e&&A-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};YA.prototype.attempt=function(e,A){this._fn=e,A&&(A.timeout&&(this._operationTimeout=A.timeout),A.cb&&(this._operationTimeoutCb=A.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};YA.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};YA.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};YA.prototype.start=YA.prototype.try;YA.prototype.errors=function(){return this._errors};YA.prototype.attempts=function(){return this._attempts};YA.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},A=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],i=n.message,s=(e[i]||0)+1;e[i]=s,s>=t&&(A=n,t=s)}return A}});var UC=Q(Pr=>{"use strict";var CS=LC();Pr.operation=function(e){var A=Pr.timeouts(e);return new CS(A,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Pr.timeouts=function(e){if(e instanceof Array)return[].concat(e);var A={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in e)A[t]=e[t];if(A.minTimeout>A.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n<A.retries;n++)r.push(this.createTimeout(n,A));return e&&e.forever&&!r.length&&r.push(this.createTimeout(n,A)),r.sort(function(i,s){return i-s}),r};Pr.createTimeout=function(e,A){var t=A.randomize?Math.random()+1:1,r=Math.round(t*Math.max(A.minTimeout,1)*Math.pow(A.factor,e));return r=Math.min(r,A.maxTimeout),r};Pr.wrap=function(e,A,t){if(A instanceof Array&&(t=A,A=null),!t){t=[];for(var r in e)typeof e[r]=="function"&&t.push(r)}for(var n=0;n<t.length;n++){var i=t[n],s=e[i];e[i]=function(a){var c=Pr.operation(A),g=Array.prototype.slice.call(arguments,1),l=g.pop();g.push(function(u){c.retry(u)||(u&&(arguments[0]=c.mainError()),l.apply(this,arguments))}),c.attempt(function(){a.apply(e,g)})}.bind(e,s),e[i].options=A}}});var MC=Q((bq,TC)=>{"use strict";TC.exports=UC()});var PC=Q((kq,aa)=>{"use strict";var fS=MC(),IS=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],oa=class extends Error{constructor(A){super(),A instanceof Error?(this.originalError=A,{message:A}=A):(this.originalError=new Error(A),this.originalError.stack=this.stack),this.name="AbortError",this.message=A}},BS=(e,A,t)=>{let r=t.retries-(A-1);return e.attemptNumber=A,e.retriesLeft=r,e},pS=e=>IS.includes(e),vC=(e,A)=>new Promise((t,r)=>{A={onFailedAttempt:()=>{},retries:10,...A};let n=fS.operation(A);n.attempt(async i=>{try{t(await e(i))}catch(s){if(!(s instanceof Error)){r(new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`));return}if(s instanceof oa)n.stop(),r(s.originalError);else if(s instanceof TypeError&&!pS(s.message))n.stop(),r(s);else{BS(s,i,A);try{await A.onFailedAttempt(s)}catch(o){r(o);return}n.retry(s)||r(n.mainError())}}})});aa.exports=vC;aa.exports.default=vC;aa.exports.AbortError=oa});var JC=Q((Vq,wS)=>{wS.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var HC=Q((qq,Pt)=>{"use strict";var Sl=require("fs"),Nl=require("path"),RS=require("os"),DS=require("crypto"),bS=JC(),Fl=bS.version,kS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function SS(e){let A={},t=e.toString();t=t.replace(/\r\n?/mg,`
|
|
4
|
+
`);return C?(r.originalMessage=r.message,r.message=p):r=new Error(p),r.shortMessage=I,r.command=s,r.escapedCommand=o,r.exitCode=i,r.signal=n,r.signalDescription=u,r.stdout=e,r.stderr=A,t!==void 0&&(r.all=t),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!a,r.isCanceled=c,r.killed=g&&!a,r};zQ.exports=dk});var AC=Q((iq,Cl)=>{"use strict";var zo=["stdin","stdout","stderr"],Qk=e=>zo.some(A=>e[A]!==void 0),eC=e=>{if(!e)return;let{stdio:A}=e;if(A===void 0)return zo.map(r=>e[r]);if(Qk(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${zo.map(r=>`\`${r}\``).join(", ")}`);if(typeof A=="string")return A;if(!Array.isArray(A))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof A}\``);let t=Math.max(A.length,zo.length);return Array.from({length:t},(r,n)=>A[n])};Cl.exports=eC;Cl.exports.node=e=>{let A=eC(e);return A==="ipc"?"ipc":A===void 0||typeof A=="string"?[A,A,A,"ipc"]:A.includes("ipc")?A:[...A,"ipc"]}});var tC=Q((sq,$o)=>{"use strict";$o.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&$o.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&$o.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var oC=Q((oq,yn)=>{"use strict";var we=global.process,Mr=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Mr(we)?(rC=require("assert"),pn=tC(),nC=/^win/i.test(we.platform),zi=require("events"),typeof zi!="function"&&(zi=zi.EventEmitter),we.__signal_exit_emitter__?Ve=we.__signal_exit_emitter__:(Ve=we.__signal_exit_emitter__=new zi,Ve.count=0,Ve.emitted={}),Ve.infinite||(Ve.setMaxListeners(1/0),Ve.infinite=!0),yn.exports=function(e,A){if(!Mr(global.process))return function(){};rC.equal(typeof e,"function","a callback must be provided for exit handler"),mn===!1&&fl();var t="exit";A&&A.alwaysLast&&(t="afterexit");var r=function(){Ve.removeListener(t,e),Ve.listeners("exit").length===0&&Ve.listeners("afterexit").length===0&&ea()};return Ve.on(t,e),r},ea=function(){!mn||!Mr(global.process)||(mn=!1,pn.forEach(function(A){try{we.removeListener(A,Aa[A])}catch{}}),we.emit=ta,we.reallyExit=Il,Ve.count-=1)},yn.exports.unload=ea,vr=function(A,t,r){Ve.emitted[A]||(Ve.emitted[A]=!0,Ve.emit(A,t,r))},Aa={},pn.forEach(function(e){Aa[e]=function(){if(Mr(global.process)){var t=we.listeners(e);t.length===Ve.count&&(ea(),vr("exit",null,e),vr("afterexit",null,e),nC&&e==="SIGHUP"&&(e="SIGINT"),we.kill(we.pid,e))}}}),yn.exports.signals=function(){return pn},mn=!1,fl=function(){mn||!Mr(global.process)||(mn=!0,Ve.count+=1,pn=pn.filter(function(A){try{return we.on(A,Aa[A]),!0}catch{return!1}}),we.emit=sC,we.reallyExit=iC)},yn.exports.load=fl,Il=we.reallyExit,iC=function(A){Mr(global.process)&&(we.exitCode=A||0,vr("exit",we.exitCode,null),vr("afterexit",we.exitCode,null),Il.call(we,we.exitCode))},ta=we.emit,sC=function(A,t){if(A==="exit"&&Mr(global.process)){t!==void 0&&(we.exitCode=t);var r=ta.apply(this,arguments);return vr("exit",we.exitCode,null),vr("afterexit",we.exitCode,null),r}else return ta.apply(this,arguments)}):yn.exports=function(){return function(){}};var rC,pn,nC,zi,Ve,ea,vr,Aa,mn,fl,Il,iC,ta,sC});var cC=Q((aq,aC)=>{"use strict";var Ck=require("os"),fk=oC(),Ik=1e3*5,Bk=(e,A="SIGTERM",t={})=>{let r=e(A);return pk(e,A,t,r),r},pk=(e,A,t,r)=>{if(!mk(A,t,r))return;let n=wk(t),i=setTimeout(()=>{e("SIGKILL")},n);i.unref&&i.unref()},mk=(e,{forceKillAfterTimeout:A},t)=>yk(e)&&A!==!1&&t,yk=e=>e===Ck.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",wk=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return Ik;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Rk=(e,A)=>{e.kill()&&(A.isCanceled=!0)},Dk=(e,A,t)=>{e.kill(A),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:A}))},bk=(e,{timeout:A,killSignal:t="SIGTERM"},r)=>{if(A===0||A===void 0)return r;let n,i=new Promise((o,a)=>{n=setTimeout(()=>{Dk(e,t,a)},A)}),s=r.finally(()=>{clearTimeout(n)});return Promise.race([i,s])},kk=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Sk=async(e,{cleanup:A,detached:t},r)=>{if(!A||t)return r;let n=fk(()=>{e.kill()});return r.finally(()=>{n()})};aC.exports={spawnedKill:Bk,spawnedCancel:Rk,setupTimeout:bk,validateTimeout:kk,setExitHandler:Sk}});var lC=Q((cq,gC)=>{"use strict";var lt=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";lt.writable=e=>lt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";lt.readable=e=>lt(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";lt.duplex=e=>lt.writable(e)&<.readable(e);lt.transform=e=>lt.duplex(e)&&typeof e._transform=="function";gC.exports=lt});var EC=Q((gq,uC)=>{"use strict";var{PassThrough:Nk}=require("stream");uC.exports=e=>{e={...e};let{array:A}=e,{encoding:t}=e,r=t==="buffer",n=!1;A?n=!(t||r):t=t||"utf8",r&&(t=null);let i=new Nk({objectMode:n});t&&i.setEncoding(t);let s=0,o=[];return i.on("data",a=>{o.push(a),n?s=o.length:s+=a.length}),i.getBufferedValue=()=>A?o:r?Buffer.concat(o,s):o.join(""),i.getBufferedLength=()=>s,i}});var pl=Q((lq,$i)=>{"use strict";var{constants:Fk}=require("buffer"),xk=require("stream"),{promisify:Lk}=require("util"),Uk=EC(),Tk=Lk(xk.pipeline),ra=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Bl(e,A){if(!e)throw new Error("Expected a stream");A={maxBuffer:1/0,...A};let{maxBuffer:t}=A,r=Uk(A);return await new Promise((n,i)=>{let s=o=>{o&&r.getBufferedLength()<=Fk.MAX_LENGTH&&(o.bufferedData=r.getBufferedValue()),i(o)};(async()=>{try{await Tk(e,r),n()}catch(o){s(o)}})(),r.on("data",()=>{r.getBufferedLength()>t&&s(new ra)})}),r.getBufferedValue()}$i.exports=Bl;$i.exports.buffer=(e,A)=>Bl(e,{...A,encoding:"buffer"});$i.exports.array=(e,A)=>Bl(e,{...A,array:!0});$i.exports.MaxBufferError=ra});var dC=Q((uq,hC)=>{"use strict";var{PassThrough:Mk}=require("stream");hC.exports=function(){var e=[],A=new Mk({objectMode:!0});return A.setMaxListeners(0),A.add=t,A.isEmpty=r,A.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(t),A;function t(i){return Array.isArray(i)?(i.forEach(t),this):(e.push(i),i.once("end",n.bind(null,i)),i.once("error",A.emit.bind(A,"error")),i.pipe(A,{end:!1}),this)}function r(){return e.length==0}function n(i){e=e.filter(function(s){return s!==i}),!e.length&&A.readable&&A.end()}}});var IC=Q((Eq,fC)=>{"use strict";var CC=lC(),QC=pl(),vk=dC(),Pk=(e,A)=>{A===void 0||e.stdin===void 0||(CC(A)?A.pipe(e.stdin):e.stdin.end(A))},Gk=(e,{all:A})=>{if(!A||!e.stdout&&!e.stderr)return;let t=vk();return e.stdout&&t.add(e.stdout),e.stderr&&t.add(e.stderr),t},ml=async(e,A)=>{if(e){e.destroy();try{return await A}catch(t){return t.bufferedData}}},yl=(e,{encoding:A,buffer:t,maxBuffer:r})=>{if(!(!e||!t))return A?QC(e,{encoding:A,maxBuffer:r}):QC.buffer(e,{maxBuffer:r})},Yk=async({stdout:e,stderr:A,all:t},{encoding:r,buffer:n,maxBuffer:i},s)=>{let o=yl(e,{encoding:r,buffer:n,maxBuffer:i}),a=yl(A,{encoding:r,buffer:n,maxBuffer:i}),c=yl(t,{encoding:r,buffer:n,maxBuffer:i*2});try{return await Promise.all([s,o,a,c])}catch(g){return Promise.all([{error:g,signal:g.signal,timedOut:g.timedOut},ml(e,o),ml(A,a),ml(t,c)])}},Jk=({input:e})=>{if(CC(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};fC.exports={handleInput:Pk,makeAllStream:Gk,getSpawnedResult:Yk,validateInputSync:Jk}});var pC=Q((hq,BC)=>{"use strict";var Vk=(async()=>{})().constructor.prototype,qk=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Vk,e)]),Ok=(e,A)=>{for(let[t,r]of qk){let n=typeof A=="function"?(...i)=>Reflect.apply(r.value,A(),i):r.value.bind(A);Reflect.defineProperty(e,t,{...r,value:n})}return e},Hk=e=>new Promise((A,t)=>{e.on("exit",(r,n)=>{A({exitCode:r,signal:n})}),e.on("error",r=>{t(r)}),e.stdin&&e.stdin.on("error",r=>{t(r)})});BC.exports={mergePromise:Ok,getSpawnedPromise:Hk}});var wC=Q((dq,yC)=>{"use strict";var mC=(e,A=[])=>Array.isArray(A)?[e,...A]:[e],Wk=/^[\w.-]+$/,_k=/"/g,jk=e=>typeof e!="string"||Wk.test(e)?e:`"${e.replace(_k,'\\"')}"`,Kk=(e,A)=>mC(e,A).join(" "),Zk=(e,A)=>mC(e,A).map(t=>jk(t)).join(" "),Xk=/ +/g,zk=e=>{let A=[];for(let t of e.trim().split(Xk)){let r=A[A.length-1];r&&r.endsWith("\\")?A[A.length-1]=`${r.slice(0,-1)} ${t}`:A.push(t)}return A};yC.exports={joinCommand:Kk,getEscapedCommand:Zk,parseCommand:zk}});var FC=Q((Qq,wn)=>{"use strict";var $k=require("path"),wl=require("child_process"),eS=MQ(),AS=PQ(),tS=JQ(),rS=HQ(),na=$Q(),DC=AC(),{spawnedKill:nS,spawnedCancel:iS,setupTimeout:sS,validateTimeout:oS,setExitHandler:aS}=cC(),{handleInput:cS,getSpawnedResult:gS,makeAllStream:lS,validateInputSync:uS}=IC(),{mergePromise:RC,getSpawnedPromise:ES}=pC(),{joinCommand:bC,parseCommand:kC,getEscapedCommand:SC}=wC(),hS=1e3*1e3*100,dS=({env:e,extendEnv:A,preferLocal:t,localDir:r,execPath:n})=>{let i=A?{...process.env,...e}:e;return t?tS.env({env:i,cwd:r,execPath:n}):i},NC=(e,A,t={})=>{let r=eS._parse(e,A,t);return e=r.command,A=r.args,t=r.options,t={maxBuffer:hS,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:t.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...t},t.env=dS(t),t.stdio=DC(t),process.platform==="win32"&&$k.basename(e,".exe")==="cmd"&&A.unshift("/q"),{file:e,args:A,options:t,parsed:r}},es=(e,A,t)=>typeof A!="string"&&!Buffer.isBuffer(A)?t===void 0?void 0:"":e.stripFinalNewline?AS(A):A,ia=(e,A,t)=>{let r=NC(e,A,t),n=bC(e,A),i=SC(e,A);oS(r.options);let s;try{s=wl.spawn(r.file,r.args,r.options)}catch(E){let h=new wl.ChildProcess,d=Promise.reject(na({error:E,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return RC(h,d)}let o=ES(s),a=sS(s,r.options,o),c=aS(s,r.options,a),g={isCanceled:!1};s.kill=nS.bind(null,s.kill.bind(s)),s.cancel=iS.bind(null,s,g);let u=rS(async()=>{let[{error:E,exitCode:h,signal:d,timedOut:C},I,p,y]=await gS(s,r.options,c),R=es(r.options,I),x=es(r.options,p),W=es(r.options,y);if(E||h!==0||d!==null){let ne=na({error:E,exitCode:h,signal:d,stdout:R,stderr:x,all:W,command:n,escapedCommand:i,parsed:r,timedOut:C,isCanceled:g.isCanceled,killed:s.killed});if(!r.options.reject)return ne;throw ne}return{command:n,escapedCommand:i,exitCode:0,stdout:R,stderr:x,all:W,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return cS(s,r.options.input),s.all=lS(s,r.options),RC(s,u)};wn.exports=ia;wn.exports.sync=(e,A,t)=>{let r=NC(e,A,t),n=bC(e,A),i=SC(e,A);uS(r.options);let s;try{s=wl.spawnSync(r.file,r.args,r.options)}catch(c){throw na({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let o=es(r.options,s.stdout,s.error),a=es(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let c=na({stdout:o,stderr:a,error:s.error,signal:s.signal,exitCode:s.status,command:n,escapedCommand:i,parsed:r,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return c;throw c}return{command:n,escapedCommand:i,exitCode:0,stdout:o,stderr:a,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};wn.exports.command=(e,A)=>{let[t,...r]=kC(e);return ia(t,r,A)};wn.exports.commandSync=(e,A)=>{let[t,...r]=kC(e);return ia.sync(t,r,A)};wn.exports.node=(e,A,t={})=>{A&&!Array.isArray(A)&&typeof A=="object"&&(t=A,A=[]);let r=DC.node(t),n=process.execArgv.filter(o=>!o.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=n}=t;return ia(i,[...s,e,...Array.isArray(A)?A:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var Rl=Q((yq,QS)=>{QS.exports={name:"@prisma/engines-version",version:"6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"51db5cf11ad393407e86084764bced274b48b27d"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Dl=Q(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.enginesVersion=void 0;sa.enginesVersion=Rl().prisma.enginesVersion});var LC=Q((Rq,xC)=>{"use strict";function YA(e,A){typeof A=="boolean"&&(A={forever:A}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=A||{},this._maxRetryTime=A&&A.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}xC.exports=YA;YA.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};YA.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};YA.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var A=new Date().getTime();if(e&&A-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};YA.prototype.attempt=function(e,A){this._fn=e,A&&(A.timeout&&(this._operationTimeout=A.timeout),A.cb&&(this._operationTimeoutCb=A.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};YA.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};YA.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};YA.prototype.start=YA.prototype.try;YA.prototype.errors=function(){return this._errors};YA.prototype.attempts=function(){return this._attempts};YA.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},A=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],i=n.message,s=(e[i]||0)+1;e[i]=s,s>=t&&(A=n,t=s)}return A}});var UC=Q(Pr=>{"use strict";var CS=LC();Pr.operation=function(e){var A=Pr.timeouts(e);return new CS(A,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Pr.timeouts=function(e){if(e instanceof Array)return[].concat(e);var A={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in e)A[t]=e[t];if(A.minTimeout>A.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n<A.retries;n++)r.push(this.createTimeout(n,A));return e&&e.forever&&!r.length&&r.push(this.createTimeout(n,A)),r.sort(function(i,s){return i-s}),r};Pr.createTimeout=function(e,A){var t=A.randomize?Math.random()+1:1,r=Math.round(t*Math.max(A.minTimeout,1)*Math.pow(A.factor,e));return r=Math.min(r,A.maxTimeout),r};Pr.wrap=function(e,A,t){if(A instanceof Array&&(t=A,A=null),!t){t=[];for(var r in e)typeof e[r]=="function"&&t.push(r)}for(var n=0;n<t.length;n++){var i=t[n],s=e[i];e[i]=function(a){var c=Pr.operation(A),g=Array.prototype.slice.call(arguments,1),l=g.pop();g.push(function(u){c.retry(u)||(u&&(arguments[0]=c.mainError()),l.apply(this,arguments))}),c.attempt(function(){a.apply(e,g)})}.bind(e,s),e[i].options=A}}});var MC=Q((bq,TC)=>{"use strict";TC.exports=UC()});var PC=Q((kq,aa)=>{"use strict";var fS=MC(),IS=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],oa=class extends Error{constructor(A){super(),A instanceof Error?(this.originalError=A,{message:A}=A):(this.originalError=new Error(A),this.originalError.stack=this.stack),this.name="AbortError",this.message=A}},BS=(e,A,t)=>{let r=t.retries-(A-1);return e.attemptNumber=A,e.retriesLeft=r,e},pS=e=>IS.includes(e),vC=(e,A)=>new Promise((t,r)=>{A={onFailedAttempt:()=>{},retries:10,...A};let n=fS.operation(A);n.attempt(async i=>{try{t(await e(i))}catch(s){if(!(s instanceof Error)){r(new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`));return}if(s instanceof oa)n.stop(),r(s.originalError);else if(s instanceof TypeError&&!pS(s.message))n.stop(),r(s);else{BS(s,i,A);try{await A.onFailedAttempt(s)}catch(o){r(o);return}n.retry(s)||r(n.mainError())}}})});aa.exports=vC;aa.exports.default=vC;aa.exports.AbortError=oa});var JC=Q((Vq,wS)=>{wS.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var HC=Q((qq,Pt)=>{"use strict";var Sl=require("fs"),Nl=require("path"),RS=require("os"),DS=require("crypto"),bS=JC(),Fl=bS.version,kS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function SS(e){let A={},t=e.toString();t=t.replace(/\r\n?/mg,`
|
|
5
5
|
`);let r;for(;(r=kS.exec(t))!=null;){let n=r[1],i=r[2]||"";i=i.trim();let s=i[0];i=i.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(i=i.replace(/\\n/g,`
|
|
6
6
|
`),i=i.replace(/\\r/g,"\r")),A[n]=i}return A}function NS(e){let A=OC(e),t=Me.configDotenv({path:A});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${A} for an unknown reason`);throw s.code="MISSING_DATA",s}let r=qC(e).split(","),n=r.length,i;for(let s=0;s<n;s++)try{let o=r[s].trim(),a=LS(t,o);i=Me.decrypt(a.ciphertext,a.key);break}catch(o){if(s+1>=n)throw o}return Me.parse(i)}function FS(e){console.log(`[dotenv@${Fl}][INFO] ${e}`)}function xS(e){console.log(`[dotenv@${Fl}][WARN] ${e}`)}function ca(e){console.log(`[dotenv@${Fl}][DEBUG] ${e}`)}function qC(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function LS(e,A){let t;try{t=new URL(A)}catch(o){if(o.code==="ERR_INVALID_URL"){let a=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw a.code="INVALID_DOTENV_KEY",a}throw o}let r=t.password;if(!r){let o=new Error("INVALID_DOTENV_KEY: Missing key part");throw o.code="INVALID_DOTENV_KEY",o}let n=t.searchParams.get("environment");if(!n){let o=new Error("INVALID_DOTENV_KEY: Missing environment part");throw o.code="INVALID_DOTENV_KEY",o}let i=`DOTENV_VAULT_${n.toUpperCase()}`,s=e.parsed[i];if(!s){let o=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${i} in your .env.vault file.`);throw o.code="NOT_FOUND_DOTENV_ENVIRONMENT",o}return{ciphertext:s,key:r}}function OC(e){let A=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)Sl.existsSync(t)&&(A=t.endsWith(".vault")?t:`${t}.vault`);else A=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else A=Nl.resolve(process.cwd(),".env.vault");return Sl.existsSync(A)?A:null}function VC(e){return e[0]==="~"?Nl.join(RS.homedir(),e.slice(1)):e}function US(e){FS("Loading env from encrypted .env.vault");let A=Me._parseVault(e),t=process.env;return e&&e.processEnv!=null&&(t=e.processEnv),Me.populate(t,A,e),{parsed:A}}function TS(e){let A=Nl.resolve(process.cwd(),".env"),t="utf8",r=!!(e&&e.debug);e&&e.encoding?t=e.encoding:r&&ca("No encoding is specified. UTF-8 is used by default");let n=[A];if(e&&e.path)if(!Array.isArray(e.path))n=[VC(e.path)];else{n=[];for(let a of e.path)n.push(VC(a))}let i,s={};for(let a of n)try{let c=Me.parse(Sl.readFileSync(a,{encoding:t}));Me.populate(s,c,e)}catch(c){r&&ca(`Failed to load ${a} ${c.message}`),i=c}let o=process.env;return e&&e.processEnv!=null&&(o=e.processEnv),Me.populate(o,s,e),i?{parsed:s,error:i}:{parsed:s}}function MS(e){if(qC(e).length===0)return Me.configDotenv(e);let A=OC(e);return A?Me._configVault(e):(xS(`You set DOTENV_KEY but you are missing a .env.vault file at ${A}. Did you forget to build it?`),Me.configDotenv(e))}function vS(e,A){let t=Buffer.from(A.slice(-64),"hex"),r=Buffer.from(e,"base64"),n=r.subarray(0,12),i=r.subarray(-16);r=r.subarray(12,-16);try{let s=DS.createDecipheriv("aes-256-gcm",t,n);return s.setAuthTag(i),`${s.update(r)}${s.final()}`}catch(s){let o=s instanceof RangeError,a=s.message==="Invalid key length",c=s.message==="Unsupported state or unable to authenticate data";if(o||a){let g=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw g.code="INVALID_DOTENV_KEY",g}else if(c){let g=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw g.code="DECRYPTION_FAILED",g}else throw s}}function PS(e,A,t={}){let r=!!(t&&t.debug),n=!!(t&&t.override);if(typeof A!="object"){let i=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw i.code="OBJECT_REQUIRED",i}for(let i of Object.keys(A))Object.prototype.hasOwnProperty.call(e,i)?(n===!0&&(e[i]=A[i]),r&&ca(n===!0?`"${i}" is already defined and WAS overwritten`:`"${i}" is already defined and was NOT overwritten`)):e[i]=A[i]}var Me={configDotenv:TS,_configVault:US,_parseVault:NS,config:MS,decrypt:vS,parse:SS,populate:PS};Pt.exports.configDotenv=Me.configDotenv;Pt.exports._configVault=Me._configVault;Pt.exports._parseVault=Me._parseVault;Pt.exports.config=Me.config;Pt.exports.decrypt=Me.decrypt;Pt.exports.parse=Me.parse;Pt.exports.populate=Me.populate;Pt.exports=Me});var XC=Q((Zq,ZC)=>{"use strict";ZC.exports=e=>{let A=e.match(/^[ \t]*(?=\S)/gm);return A?A.reduce((t,r)=>Math.min(t,r.length),1/0):0}});var $C=Q((Xq,zC)=>{"use strict";var VS=XC();zC.exports=e=>{let A=VS(e);if(A===0)return e;let t=new RegExp(`^[ \\t]{${A}}`,"gm");return e.replace(t,"")}});var Tl=Q((rO,ef)=>{"use strict";ef.exports=(e,A=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof A!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof A}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(A===0)return e;let r=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(r,t.indent.repeat(A))}});var nf=Q((sO,rf)=>{"use strict";rf.exports=({onlyFirst:e=!1}={})=>{let A=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(A,e?void 0:"g")}});var Gl=Q((oO,sf)=>{"use strict";var ZS=nf();sf.exports=e=>typeof e=="string"?e.replace(ZS(),""):e});var af=Q((gO,ua)=>{"use strict";ua.exports=(e={})=>{let A;if(e.repoUrl)A=e.repoUrl;else if(e.user&&e.repo)A=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${A}/issues/new`),r=["body","title","labels","template","milestone","assignee","projects"];for(let n of r){let i=e[n];if(i!==void 0){if(n==="labels"||n==="projects"){if(!Array.isArray(i))throw new TypeError(`The \`${n}\` option should be an array`);i=i.join(",")}t.searchParams.set(n,i)}}return t.toString()};ua.exports.default=ua.exports});var Kl=Q((fH,Nf)=>{"use strict";Nf.exports=function(){function e(A,t,r,n,i){return A<t||r<t?A>r?r+1:A+1:n===i?t:t+1}return function(A,t){if(A===t)return 0;if(A.length>t.length){var r=A;A=t,t=r}for(var n=A.length,i=t.length;n>0&&A.charCodeAt(n-1)===t.charCodeAt(i-1);)n--,i--;for(var s=0;s<n&&A.charCodeAt(s)===t.charCodeAt(s);)s++;if(n-=s,i-=s,n===0||i<3)return i;var o=0,a,c,g,l,u,E,h,d,C,I,p,y,R=[];for(a=0;a<n;a++)R.push(a+1),R.push(A.charCodeAt(s+a));for(var x=R.length-1;o<i-3;)for(C=t.charCodeAt(s+(c=o)),I=t.charCodeAt(s+(g=o+1)),p=t.charCodeAt(s+(l=o+2)),y=t.charCodeAt(s+(u=o+3)),E=o+=4,a=0;a<x;a+=2)h=R[a],d=R[a+1],c=e(h,c,g,C,d),g=e(c,g,l,I,d),l=e(g,l,u,p,d),E=e(l,u,E,y,d),R[a]=E,u=l,l=g,g=c,c=h;for(;o<i;)for(C=t.charCodeAt(s+(c=o)),E=++o,a=0;a<x;a+=2)h=R[a],R[a]=E=e(h,c,E,C,R[a+1]),c=h;return E}}()});var de=Q((J4,XI)=>{"use strict";XI.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var le=Q((V4,zI)=>{"use strict";var xe=class extends Error{constructor(A){super(A),this.name="UndiciError",this.code="UND_ERR"}},fu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},Iu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},Bu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},pu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},mu=class e extends xe{constructor(A,t,r,n){super(A),Error.captureStackTrace(this,e),this.name="ResponseStatusCodeError",this.message=A||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=n,this.status=t,this.statusCode=t,this.headers=r}},yu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InvalidArgumentError",this.message=A||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},wu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InvalidReturnValueError",this.message=A||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},Ru=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="AbortError",this.message=A||"Request aborted",this.code="UND_ERR_ABORTED"}},Du=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InformationalError",this.message=A||"Request information",this.code="UND_ERR_INFO"}},bu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="RequestContentLengthMismatchError",this.message=A||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}},ku=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ResponseContentLengthMismatchError",this.message=A||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}},Su=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ClientDestroyedError",this.message=A||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},Nu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ClientClosedError",this.message=A||"The client is closed",this.code="UND_ERR_CLOSED"}},Fu=class e extends xe{constructor(A,t){super(A),Error.captureStackTrace(this,e),this.name="SocketError",this.message=A||"Socket error",this.code="UND_ERR_SOCKET",this.socket=t}},Wa=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="NotSupportedError",this.message=A||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}},xu=class extends xe{constructor(A){super(A),Error.captureStackTrace(this,Wa),this.name="MissingUpstreamError",this.message=A||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}},Lu=class e extends Error{constructor(A,t,r){super(A),Error.captureStackTrace(this,e),this.name="HTTPParserError",this.code=t?`HPE_${t}`:void 0,this.data=r?r.toString():void 0}},Uu=class e extends xe{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ResponseExceededMaxSizeError",this.message=A||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}},Tu=class e extends xe{constructor(A,t,{headers:r,data:n}){super(A),Error.captureStackTrace(this,e),this.name="RequestRetryError",this.message=A||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=t,this.data=n,this.headers=r}};zI.exports={HTTPParserError:Lu,UndiciError:xe,HeadersTimeoutError:Iu,HeadersOverflowError:Bu,BodyTimeoutError:pu,RequestContentLengthMismatchError:bu,ConnectTimeoutError:fu,ResponseStatusCodeError:mu,InvalidArgumentError:yu,InvalidReturnValueError:wu,RequestAbortedError:Ru,ClientDestroyedError:Su,ClientClosedError:Nu,InformationalError:Du,SocketError:Fu,NotSupportedError:Wa,ResponseContentLengthMismatchError:ku,BalancedPoolMissingUpstreamError:xu,ResponseExceededMaxSizeError:Uu,RequestRetryError:Tu}});var eB=Q((q4,$I)=>{"use strict";var _a={},Mu=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let e=0;e<Mu.length;++e){let A=Mu[e],t=A.toLowerCase();_a[A]=_a[t]=t}Object.setPrototypeOf(_a,null);$I.exports={wellknownHeaderNames:Mu,headerNameLowerCasedRecord:_a}});var _=Q((O4,lB)=>{"use strict";var nB=require("assert"),{kDestroyed:iB,kBodyUsed:AB}=de(),{IncomingMessage:Tx}=require("http"),Hn=require("stream"),Mx=require("net"),{InvalidArgumentError:je}=le(),{Blob:tB}=require("buffer"),ja=require("util"),{stringify:vx}=require("querystring"),{headerNameLowerCasedRecord:Px}=eB(),[vu,rB]=process.versions.node.split(".").map(e=>Number(e));function Gx(){}function Pu(e){return e&&typeof e=="object"&&typeof e.pipe=="function"&&typeof e.on=="function"}function sB(e){return tB&&e instanceof tB||e&&typeof e=="object"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Yx(e,A){if(e.includes("?")||e.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let t=vx(A);return t&&(e+="?"+t),e}function oB(e){if(typeof e=="string"){if(e=new URL(e),!/^https?:/.test(e.origin||e.protocol))throw new je("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!="object")throw new je("Invalid URL: The URL argument must be a non-null object.");if(!/^https?:/.test(e.origin||e.protocol))throw new je("Invalid URL protocol: the URL must start with `http:` or `https:`.");if(!(e instanceof URL)){if(e.port!=null&&e.port!==""&&!Number.isFinite(parseInt(e.port)))throw new je("Invalid URL: port must be a valid integer or a string representation of an integer.");if(e.path!=null&&typeof e.path!="string")throw new je("Invalid URL path: the path must be a string or null/undefined.");if(e.pathname!=null&&typeof e.pathname!="string")throw new je("Invalid URL pathname: the pathname must be a string or null/undefined.");if(e.hostname!=null&&typeof e.hostname!="string")throw new je("Invalid URL hostname: the hostname must be a string or null/undefined.");if(e.origin!=null&&typeof e.origin!="string")throw new je("Invalid URL origin: the origin must be a string or null/undefined.");let A=e.port!=null?e.port:e.protocol==="https:"?443:80,t=e.origin!=null?e.origin:`${e.protocol}//${e.hostname}:${A}`,r=e.path!=null?e.path:`${e.pathname||""}${e.search||""}`;t.endsWith("/")&&(t=t.substring(0,t.length-1)),r&&!r.startsWith("/")&&(r=`/${r}`),e=new URL(t+r)}return e}function Jx(e){if(e=oB(e),e.pathname!=="/"||e.search||e.hash)throw new je("invalid url");return e}function Vx(e){if(e[0]==="["){let t=e.indexOf("]");return nB(t!==-1),e.substring(1,t)}let A=e.indexOf(":");return A===-1?e:e.substring(0,A)}function qx(e){if(!e)return null;nB.strictEqual(typeof e,"string");let A=Vx(e);return Mx.isIP(A)?"":A}function Ox(e){return JSON.parse(JSON.stringify(e))}function Hx(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}function Wx(e){return e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")}function _x(e){if(e==null)return 0;if(Pu(e)){let A=e._readableState;return A&&A.objectMode===!1&&A.ended===!0&&Number.isFinite(A.length)?A.length:null}else{if(sB(e))return e.size!=null?e.size:null;if(cB(e))return e.byteLength}return null}function Gu(e){return!e||!!(e.destroyed||e[iB])}function aB(e){let A=e&&e._readableState;return Gu(e)&&A&&!A.endEmitted}function jx(e,A){e==null||!Pu(e)||Gu(e)||(typeof e.destroy=="function"?(Object.getPrototypeOf(e).constructor===Tx&&(e.socket=null),e.destroy(A)):A&&process.nextTick((t,r)=>{t.emit("error",r)},e,A),e.destroyed!==!0&&(e[iB]=!0))}var Kx=/timeout=(\d+)/;function Zx(e){let A=e.toString().match(Kx);return A?parseInt(A[1],10)*1e3:null}function Xx(e){return Px[e]||e.toLowerCase()}function zx(e,A={}){if(!Array.isArray(e))return e;for(let t=0;t<e.length;t+=2){let r=e[t].toString().toLowerCase(),n=A[r];n?(Array.isArray(n)||(n=[n],A[r]=n),n.push(e[t+1].toString("utf8"))):Array.isArray(e[t+1])?A[r]=e[t+1].map(i=>i.toString("utf8")):A[r]=e[t+1].toString("utf8")}return"content-length"in A&&"content-disposition"in A&&(A["content-disposition"]=Buffer.from(A["content-disposition"]).toString("latin1")),A}function $x(e){let A=[],t=!1,r=-1;for(let n=0;n<e.length;n+=2){let i=e[n+0].toString(),s=e[n+1].toString("utf8");i.length===14&&(i==="content-length"||i.toLowerCase()==="content-length")?(A.push(i,s),t=!0):i.length===19&&(i==="content-disposition"||i.toLowerCase()==="content-disposition")?r=A.push(i,s)-1:A.push(i,s)}return t&&r!==-1&&(A[r]=Buffer.from(A[r]).toString("latin1")),A}function cB(e){return e instanceof Uint8Array||Buffer.isBuffer(e)}function eL(e,A,t){if(!e||typeof e!="object")throw new je("handler must be an object");if(typeof e.onConnect!="function")throw new je("invalid onConnect method");if(typeof e.onError!="function")throw new je("invalid onError method");if(typeof e.onBodySent!="function"&&e.onBodySent!==void 0)throw new je("invalid onBodySent method");if(t||A==="CONNECT"){if(typeof e.onUpgrade!="function")throw new je("invalid onUpgrade method")}else{if(typeof e.onHeaders!="function")throw new je("invalid onHeaders method");if(typeof e.onData!="function")throw new je("invalid onData method");if(typeof e.onComplete!="function")throw new je("invalid onComplete method")}}function AL(e){return!!(e&&(Hn.isDisturbed?Hn.isDisturbed(e)||e[AB]:e[AB]||e.readableDidRead||e._readableState&&e._readableState.dataEmitted||aB(e)))}function tL(e){return!!(e&&(Hn.isErrored?Hn.isErrored(e):/state: 'errored'/.test(ja.inspect(e))))}function rL(e){return!!(e&&(Hn.isReadable?Hn.isReadable(e):/state: 'readable'/.test(ja.inspect(e))))}function nL(e){return{localAddress:e.localAddress,localPort:e.localPort,remoteAddress:e.remoteAddress,remotePort:e.remotePort,remoteFamily:e.remoteFamily,timeout:e.timeout,bytesWritten:e.bytesWritten,bytesRead:e.bytesRead}}async function*iL(e){for await(let A of e)yield Buffer.isBuffer(A)?A:Buffer.from(A)}var ks;function sL(e){if(ks||(ks=require("stream/web").ReadableStream),ks.from)return ks.from(iL(e));let A;return new ks({async start(){A=e[Symbol.asyncIterator]()},async pull(t){let{done:r,value:n}=await A.next();if(r)queueMicrotask(()=>{t.close()});else{let i=Buffer.isBuffer(n)?n:Buffer.from(n);t.enqueue(new Uint8Array(i))}return t.desiredSize>0},async cancel(t){await A.return()}},0)}function oL(e){return e&&typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&e[Symbol.toStringTag]==="FormData"}function aL(e){if(e){if(typeof e.throwIfAborted=="function")e.throwIfAborted();else if(e.aborted){let A=new Error("The operation was aborted");throw A.name="AbortError",A}}}function cL(e,A){return"addEventListener"in e?(e.addEventListener("abort",A,{once:!0}),()=>e.removeEventListener("abort",A)):(e.addListener("abort",A),()=>e.removeListener("abort",A))}var gL=!!String.prototype.toWellFormed;function lL(e){return gL?`${e}`.toWellFormed():ja.toUSVString?ja.toUSVString(e):`${e}`}function uL(e){if(e==null||e==="")return{start:0,end:null,size:null};let A=e?e.match(/^bytes (\d+)-(\d+)\/(\d+)?$/):null;return A?{start:parseInt(A[1]),end:A[2]?parseInt(A[2]):null,size:A[3]?parseInt(A[3]):null}:null}var gB=Object.create(null);gB.enumerable=!0;lB.exports={kEnumerableProperty:gB,nop:Gx,isDisturbed:AL,isErrored:tL,isReadable:rL,toUSVString:lL,isReadableAborted:aB,isBlobLike:sB,parseOrigin:Jx,parseURL:oB,getServerName:qx,isStream:Pu,isIterable:Wx,isAsyncIterable:Hx,isDestroyed:Gu,headerNameToString:Xx,parseRawHeaders:$x,parseHeaders:zx,parseKeepAliveTimeout:Zx,destroy:jx,bodyLength:_x,deepClone:Ox,ReadableStreamFrom:sL,isBuffer:cB,validateHandler:eL,getSocketInfo:nL,isFormDataLike:oL,buildURL:Yx,throwIfAborted:aL,addAbortListener:cL,parseRangeHeader:uL,nodeMajor:vu,nodeMinor:rB,nodeHasAutoSelectFamily:vu>18||vu===18&&rB>=13,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"]}});var hB=Q((H4,EB)=>{"use strict";var Yu=Date.now(),Ir,Br=[];function EL(){Yu=Date.now();let e=Br.length,A=0;for(;A<e;){let t=Br[A];t.state===0?t.state=Yu+t.delay:t.state>0&&Yu>=t.state&&(t.state=-1,t.callback(t.opaque)),t.state===-1?(t.state=-2,A!==e-1?Br[A]=Br.pop():Br.pop(),e-=1):A+=1}Br.length>0&&uB()}function uB(){Ir&&Ir.refresh?Ir.refresh():(clearTimeout(Ir),Ir=setTimeout(EL,1e3),Ir.unref&&Ir.unref())}var Ka=class{constructor(A,t,r){this.callback=A,this.delay=t,this.opaque=r,this.state=-2,this.refresh()}refresh(){this.state===-2&&(Br.push(this),(!Ir||Br.length===1)&&uB()),this.state=0}clear(){this.state=-1}};EB.exports={setTimeout(e,A,t){return A<1e3?setTimeout(e,A,t):new Ka(e,A,t)},clearTimeout(e){e instanceof Ka?e.clear():clearTimeout(e)}}});var Ju=Q((W4,dB)=>{"use strict";var hL=require("node:events").EventEmitter,dL=require("node:util").inherits;function Vr(e){if(typeof e=="string"&&(e=Buffer.from(e)),!Buffer.isBuffer(e))throw new TypeError("The needle has to be a String or a Buffer.");let A=e.length;if(A===0)throw new Error("The needle cannot be an empty String/Buffer.");if(A>256)throw new Error("The needle cannot have a length bigger than 256.");this.maxMatches=1/0,this.matches=0,this._occ=new Array(256).fill(A),this._lookbehind_size=0,this._needle=e,this._bufpos=0,this._lookbehind=Buffer.alloc(A);for(var t=0;t<A-1;++t)this._occ[e[t]]=A-1-t}dL(Vr,hL);Vr.prototype.reset=function(){this._lookbehind_size=0,this.matches=0,this._bufpos=0};Vr.prototype.push=function(e,A){Buffer.isBuffer(e)||(e=Buffer.from(e,"binary"));let t=e.length;this._bufpos=A||0;let r;for(;r!==t&&this.matches<this.maxMatches;)r=this._sbmh_feed(e);return r};Vr.prototype._sbmh_feed=function(e){let A=e.length,t=this._needle,r=t.length,n=t[r-1],i=-this._lookbehind_size,s;if(i<0){for(;i<0&&i<=A-r;){if(s=this._sbmh_lookup_char(e,i+r-1),s===n&&this._sbmh_memcmp(e,i,r-1))return this._lookbehind_size=0,++this.matches,this.emit("info",!0),this._bufpos=i+r;i+=this._occ[s]}if(i<0)for(;i<0&&!this._sbmh_memcmp(e,i,A-i);)++i;if(i>=0)this.emit("info",!1,this._lookbehind,0,this._lookbehind_size),this._lookbehind_size=0;else{let o=this._lookbehind_size+i;return o>0&&this.emit("info",!1,this._lookbehind,0,o),this._lookbehind.copy(this._lookbehind,0,o,this._lookbehind_size-o),this._lookbehind_size-=o,e.copy(this._lookbehind,this._lookbehind_size),this._lookbehind_size+=A,this._bufpos=A,A}}if(i+=(i>=0)*this._bufpos,e.indexOf(t,i)!==-1)return i=e.indexOf(t,i),++this.matches,i>0?this.emit("info",!0,e,this._bufpos,i):this.emit("info",!0),this._bufpos=i+r;for(i=A-r;i<A&&(e[i]!==t[0]||Buffer.compare(e.subarray(i,i+A-i),t.subarray(0,A-i))!==0);)++i;return i<A&&(e.copy(this._lookbehind,0,i,i+(A-i)),this._lookbehind_size=A-i),i>0&&this.emit("info",!1,e,this._bufpos,i<A?i:A),this._bufpos=A,A};Vr.prototype._sbmh_lookup_char=function(e,A){return A<0?this._lookbehind[this._lookbehind_size+A]:e[A]};Vr.prototype._sbmh_memcmp=function(e,A,t){for(var r=0;r<t;++r)if(this._sbmh_lookup_char(e,A+r)!==this._needle[r])return!1;return!0};dB.exports=Vr});var fB=Q((_4,CB)=>{"use strict";var QL=require("node:util").inherits,QB=require("node:stream").Readable;function Vu(e){QB.call(this,e)}QL(Vu,QB);Vu.prototype._read=function(e){};CB.exports=Vu});var Za=Q((j4,IB)=>{"use strict";IB.exports=function(A,t,r){if(!A||A[t]===void 0||A[t]===null)return r;if(typeof A[t]!="number"||isNaN(A[t]))throw new TypeError("Limit "+t+" is not a valid number");return A[t]}});var yB=Q((K4,mB)=>{"use strict";var pB=require("node:events").EventEmitter,CL=require("node:util").inherits,BB=Za(),fL=Ju(),IL=Buffer.from(`\r
|
|
7
7
|
\r
|
|
@@ -170,7 +170,7 @@ You may have to run ${nr("prisma generate")} for your changes to take effect.`,t
|
|
|
170
170
|
`+c,this.clientVersion),a.retryable=!0):this.child?.signalCode?(a=new z(`Query engine process killed with signal ${this.child.signalCode} for unknown reason.
|
|
171
171
|
Make sure that the engine binary at ${r} is not corrupt.
|
|
172
172
|
`+c,this.clientVersion),a.retryable=!0):a=new z(c,this.clientVersion),this.engineStartDeferred.reject(a)}this.child&&(this.lastError||o===126&&this.setError({timestamp:new Date,target:"binary engine process exit",level:"error",fields:{message:`Couldn't start query engine as it's not executable on this operating system.
|
|
173
|
-
You very likely have the wrong "binaryTarget" defined in the schema.prisma file.`}}))}),this.child.on("error",o=>{this.setError({timestamp:new Date,target:"binary engine process error",level:"error",fields:{message:`Couldn't start query engine: ${o}`}}),t(o)}),this.child.on("close",(o,a)=>{this.connection.close();let c;o===null&&a==="SIGABRT"&&this.child?c=new JA(this.getErrorMessageWithLink("Panic in Query Engine with SIGABRT signal"),this.clientVersion):o===255&&a===null&&this.lastError&&(c=this.lastError),c&&this.logEmitter.emit("error",{message:c.message,timestamp:new Date,target:"binary engine process close"})}),this.lastError)return t(new z(On(this.lastError),this.clientVersion));try{await new Promise((o,a)=>{this.engineStartDeferred={resolve:o,reject:a}})}catch(o){throw this.child?.kill(),o}(async()=>{try{let o=await this.version(!0);rA(`Client Version: ${this.clientVersion}`),rA(`Engine Version: ${o}`),rA(`Active provider: ${this.activeProvider}`)}catch(o){rA(o)}})(),this.stopPromise=void 0,A()}catch(r){t(r)}})}async stop(){let A=async()=>(this.stopPromise||(this.stopPromise=this._stop()),this.stopPromise);return this.tracingHelper.runInChildSpan("disconnect",A)}async _stop(){if(this.startPromise&&await this.startPromise,await new Promise(t=>process.nextTick(t)),this.currentRequestPromise)try{await this.currentRequestPromise}catch{}let A;this.child&&(rA("Stopping Prisma engine"),this.startPromise&&(rA("Waiting for start promise"),await this.startPromise),rA("Done waiting for start promise"),this.child.exitCode===null?A=new Promise((t,r)=>{this.engineStopDeferred={resolve:t,reject:r}}):rA("Child already exited with code",this.child.exitCode),this.connection.close(),this.child.kill(),this.child=void 0),A&&await A,await new Promise(t=>process.nextTick(t)),this.startPromise=void 0,this.engineStopDeferred=void 0}kill(A){this.globalKillSignalReceived=A,this.child?.kill(),this.connection.close()}async version(A=!1){return this.versionPromise&&!A?this.versionPromise:(this.versionPromise=this.internalVersion(),this.versionPromise)}async internalVersion(){let A=await Qu("binary",this.config),t=await(0,GR.default)(A,["--version"]);return this.lastVersion=t.stdout,this.lastVersion}async request(A,{traceparent:t,numTry:r=1,isWrite:n,interactiveTransaction:i}){await this.start();let s={};t&&(s.traceparent=t),i&&(s["X-transaction-id"]=i.id);let o=JSON.stringify(A);this.currentRequestPromise=Lt.onHttpError(this.connection.post("/",o,s),a=>this.httpErrorHandler(a)),this.lastQuery=o;try{let{data:a}=await this.currentRequestPromise;if(a.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(a.extensions.traces),a.errors)throw a.errors.length===1?dr(a.errors[0],this.clientVersion,this.config.activeProvider):new ve(JSON.stringify(a.errors),{clientVersion:this.clientVersion});return this.startCount>0&&(this.startCount=0),this.currentRequestPromise=void 0,{data:a}}catch(a){fo("req - e",a);let{error:c,shouldRetry:g}=await this.handleRequestError(a);if(r<=MR&&g&&!n)return fo("trying a retry now"),this.request(A,{traceparent:t,numTry:r+1,isWrite:n,interactiveTransaction:i});throw c}}async requestBatch(A,{traceparent:t,transaction:r,numTry:n=1,containsWrite:i}){await this.start();let s={};t&&(s.traceparent=t);let o=r?.kind==="itx"?r.options:void 0;o&&(s["X-transaction-id"]=o.id);let a=Vn(A,r);return this.lastQuery=JSON.stringify(a),this.currentRequestPromise=Lt.onHttpError(this.connection.post("/",this.lastQuery,s),c=>this.httpErrorHandler(c)),this.currentRequestPromise.then(({data:c})=>{c.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(c.extensions.traces);let{batchResult:g}=c;if(Array.isArray(g))return g.map(l=>(l.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(l.extensions.traces),l.errors&&l.errors.length>0?dr(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l}));throw dr(c.errors[0],this.clientVersion,this.config.activeProvider)}).catch(async c=>{let{error:g,shouldRetry:l}=await this.handleRequestError(c);if(l&&!i&&n<=MR)return this.requestBatch(A,{traceparent:t,transaction:r,numTry:n+1,containsWrite:i});throw g})}async transaction(A,t,r){if(await this.start(),A==="start"){let n=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel}),i=await Lt.onHttpError(this.connection.post("/transaction/start",n,t),s=>this.httpErrorHandler(s));return i.data.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(i.data.extensions.traces),i.data}else if(A==="commit"){let n=await Lt.onHttpError(this.connection.post(`/transaction/${r.id}/commit`,void 0,t),i=>this.httpErrorHandler(i));n.data.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(n.data.extensions.traces)}else if(A==="rollback"){let n=await Lt.onHttpError(this.connection.post(`/transaction/${r.id}/rollback`,void 0,t),i=>this.httpErrorHandler(i));n.data.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(n.data.extensions.traces)}}get hasMaxRestarts(){return this.startCount>=TR}throwAsyncErrorIfExists(A=!1){if(fo("throwAsyncErrorIfExists",this.startCount,this.hasMaxRestarts),this.lastError&&(this.hasMaxRestarts||A)){let t=this.lastError;throw this.lastError=void 0,t.isPanic()?new JA(this.getErrorMessageWithLink(On(t)),this.clientVersion):new ve(this.getErrorMessageWithLink(On(t)),{clientVersion:this.clientVersion})}}getErrorMessageWithLink(A){return ZI({binaryTarget:this.binaryTarget,title:A,version:this.clientVersion,engineVersion:this.lastVersion,database:this.lastActiveProvider,query:this.lastQuery})}async metrics({format:A,globalLabels:t}){await this.start();let r=A==="json";return(await this.connection.post(`/metrics?format=${encodeURIComponent(A)}`,JSON.stringify(t),null,r)).data}httpErrorHandler(A){let t=A.data,r=t.extensions?.traces;throw r&&this.tracingHelper.dispatchEngineSpans(r),new We(t.message,{code:t.error_code,clientVersion:this.clientVersion,meta:t.meta})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Io(e,A=!1){process.once(e,async()=>{for(let t of Mg)await t.emitExit(),t.kill(e);Mg.splice(0,Mg.length),A&&process.listenerCount(e)===0&&process.exit()})}var vR=!1;function LJ(){vR||(Io("beforeExit"),Io("exit"),Io("SIGINT",!0),Io("SIGUSR2",!0),Io("SIGTERM",!0),vR=!0)}function UJ(e){return new Promise(A=>{e.once("exit",A),e.kill()})}function Mi({inlineDatasources:e,overrideDatasources:A,env:t,clientVersion:r}){let n,i=Object.keys(e)[0],s=e[i]?.url,o=A[i]?.url;if(i===void 0?n=void 0:o?n=o:s?.value?n=s.value:s?.fromEnvVar&&(n=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&n===void 0)throw new z(`error: Environment variable not found: ${s.fromEnvVar}.`,r);if(n===void 0)throw new z("error: Missing URL environment variable, value, or override.",r);return n}var vg=class extends Error{constructor(A,t){super(A),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var RA=class extends vg{constructor(A,t){super(A,t),this.isRetryable=t.isRetryable??!0}};function K(e,A){return{...e,isRetryable:A}}var vi=class extends RA{constructor(t){super("This request must be retried",K(t,!0));this.name="ForcedRetryError";this.code="P5001"}};T(vi,"ForcedRetryError");var un=class extends RA{constructor(t,r){super(t,K(r,!1));this.name="InvalidDatasourceError";this.code="P6001"}};T(un,"InvalidDatasourceError");var En=class extends RA{constructor(t,r){super(t,K(r,!1));this.name="NotImplementedYetError";this.code="P5004"}};T(En,"NotImplementedYetError");var Ce=class extends RA{constructor(A,t){super(A,t),this.response=t.response;let r=this.response.headers.get("prisma-request-id");if(r){let n=`(The request id was: ${r})`;this.message=this.message+" "+n}}};var hn=class extends Ce{constructor(t){super("Schema needs to be uploaded",K(t,!0));this.name="SchemaMissingError";this.code="P5005"}};T(hn,"SchemaMissingError");var Ed="This request could not be understood by the server",po=class extends Ce{constructor(t,r,n){super(r||Ed,K(t,!1));this.name="BadRequestError";this.code="P5000";n&&(this.code=n)}};T(po,"BadRequestError");var mo=class extends Ce{constructor(t,r){super("Engine not started: healthcheck timeout",K(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=r}};T(mo,"HealthcheckTimeoutError");var yo=class extends Ce{constructor(t,r,n){super(r,K(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=n}};T(yo,"EngineStartupError");var wo=class extends Ce{constructor(t){super("Engine version is not supported",K(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};T(wo,"EngineVersionNotSupportedError");var hd="Request timed out",Ro=class extends Ce{constructor(t,r=hd){super(r,K(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};T(Ro,"GatewayTimeoutError");var TJ="Interactive transaction error",Do=class extends Ce{constructor(t,r=TJ){super(r,K(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};T(Do,"InteractiveTransactionError");var MJ="Request parameters are invalid",bo=class extends Ce{constructor(t,r=MJ){super(r,K(t,!1));this.name="InvalidRequestError";this.code="P5011"}};T(bo,"InvalidRequestError");var dd="Requested resource does not exist",ko=class extends Ce{constructor(t,r=dd){super(r,K(t,!1));this.name="NotFoundError";this.code="P5003"}};T(ko,"NotFoundError");var Qd="Unknown server error",Pi=class extends Ce{constructor(t,r,n){super(r||Qd,K(t,!0));this.name="ServerError";this.code="P5006";this.logs=n}};T(Pi,"ServerError");var Cd="Unauthorized, check your connection string",So=class extends Ce{constructor(t,r=Cd){super(r,K(t,!1));this.name="UnauthorizedError";this.code="P5007"}};T(So,"UnauthorizedError");var fd="Usage exceeded, retry again later",No=class extends Ce{constructor(t,r=fd){super(r,K(t,!0));this.name="UsageExceededError";this.code="P5008"}};T(No,"UsageExceededError");async function vJ(e){let A;try{A=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(A);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let r=Object.values(t)[0].reason;return typeof r=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(r)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return A===""?{type:"EmptyError"}:{type:"UnknownTextError",body:A}}}async function Fo(e,A){if(e.ok)return;let t={clientVersion:A,response:e},r=await vJ(e);if(r.type==="QueryEngineError")throw new We(r.body.message,{code:r.body.error_code,clientVersion:A});if(r.type==="DataProxyError"){if(r.body==="InternalDataProxyError")throw new Pi(t,"Internal Data Proxy error");if("EngineNotStarted"in r.body){if(r.body.EngineNotStarted.reason==="SchemaMissing")return new hn(t);if(r.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new wo(t);if("EngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,logs:i}=r.body.EngineNotStarted.reason.EngineStartupError;throw new yo(t,n,i)}if("KnownEngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,error_code:i}=r.body.EngineNotStarted.reason.KnownEngineStartupError;throw new z(n,A,i)}if("HealthcheckTimeout"in r.body.EngineNotStarted.reason){let{logs:n}=r.body.EngineNotStarted.reason.HealthcheckTimeout;throw new mo(t,n)}}if("InteractiveTransactionMisrouted"in r.body){let n={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Do(t,n[r.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in r.body)throw new bo(t,r.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new So(t,Gi(Cd,r));if(e.status===404)return new ko(t,Gi(dd,r));if(e.status===429)throw new No(t,Gi(fd,r));if(e.status===504)throw new Ro(t,Gi(hd,r));if(e.status>=500)throw new Pi(t,Gi(Qd,r));if(e.status>=400)throw new po(t,Gi(Ed,r))}function Gi(e,A){return A.type==="EmptyError"?e:`${e}: ${JSON.stringify(A)}`}function JR(e){let A=Math.pow(2,e)*50,t=Math.ceil(Math.random()*A)-Math.ceil(A/2),r=A+t;return new Promise(n=>setTimeout(()=>n(r),r))}var rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function VR(e){let A=new TextEncoder().encode(e),t="",r=A.byteLength,n=r%3,i=r-n,s,o,a,c,g;for(let l=0;l<i;l=l+3)g=A[l]<<16|A[l+1]<<8|A[l+2],s=(g&16515072)>>18,o=(g&258048)>>12,a=(g&4032)>>6,c=g&63,t+=rr[s]+rr[o]+rr[a]+rr[c];return n==1?(g=A[i],s=(g&252)>>2,o=(g&3)<<4,t+=rr[s]+rr[o]+"=="):n==2&&(g=A[i]<<8|A[i+1],s=(g&64512)>>10,o=(g&1008)>>4,a=(g&15)<<2,t+=rr[s]+rr[o]+rr[a]+"="),t}function qR(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new z("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function PJ(e){return e[0]*1e3+e[1]/1e6}function Id(e){return new Date(PJ(e))}var OR={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.2.0-11.c49e56c20818c325095752dd0ae895b0dc7bad9f","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var xo=class extends RA{constructor(t,r){super(`Cannot fetch data from service:
|
|
173
|
+
You very likely have the wrong "binaryTarget" defined in the schema.prisma file.`}}))}),this.child.on("error",o=>{this.setError({timestamp:new Date,target:"binary engine process error",level:"error",fields:{message:`Couldn't start query engine: ${o}`}}),t(o)}),this.child.on("close",(o,a)=>{this.connection.close();let c;o===null&&a==="SIGABRT"&&this.child?c=new JA(this.getErrorMessageWithLink("Panic in Query Engine with SIGABRT signal"),this.clientVersion):o===255&&a===null&&this.lastError&&(c=this.lastError),c&&this.logEmitter.emit("error",{message:c.message,timestamp:new Date,target:"binary engine process close"})}),this.lastError)return t(new z(On(this.lastError),this.clientVersion));try{await new Promise((o,a)=>{this.engineStartDeferred={resolve:o,reject:a}})}catch(o){throw this.child?.kill(),o}(async()=>{try{let o=await this.version(!0);rA(`Client Version: ${this.clientVersion}`),rA(`Engine Version: ${o}`),rA(`Active provider: ${this.activeProvider}`)}catch(o){rA(o)}})(),this.stopPromise=void 0,A()}catch(r){t(r)}})}async stop(){let A=async()=>(this.stopPromise||(this.stopPromise=this._stop()),this.stopPromise);return this.tracingHelper.runInChildSpan("disconnect",A)}async _stop(){if(this.startPromise&&await this.startPromise,await new Promise(t=>process.nextTick(t)),this.currentRequestPromise)try{await this.currentRequestPromise}catch{}let A;this.child&&(rA("Stopping Prisma engine"),this.startPromise&&(rA("Waiting for start promise"),await this.startPromise),rA("Done waiting for start promise"),this.child.exitCode===null?A=new Promise((t,r)=>{this.engineStopDeferred={resolve:t,reject:r}}):rA("Child already exited with code",this.child.exitCode),this.connection.close(),this.child.kill(),this.child=void 0),A&&await A,await new Promise(t=>process.nextTick(t)),this.startPromise=void 0,this.engineStopDeferred=void 0}kill(A){this.globalKillSignalReceived=A,this.child?.kill(),this.connection.close()}async version(A=!1){return this.versionPromise&&!A?this.versionPromise:(this.versionPromise=this.internalVersion(),this.versionPromise)}async internalVersion(){let A=await Qu("binary",this.config),t=await(0,GR.default)(A,["--version"]);return this.lastVersion=t.stdout,this.lastVersion}async request(A,{traceparent:t,numTry:r=1,isWrite:n,interactiveTransaction:i}){await this.start();let s={};t&&(s.traceparent=t),i&&(s["X-transaction-id"]=i.id);let o=JSON.stringify(A);this.currentRequestPromise=Lt.onHttpError(this.connection.post("/",o,s),a=>this.httpErrorHandler(a)),this.lastQuery=o;try{let{data:a}=await this.currentRequestPromise;if(a.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(a.extensions.traces),a.errors)throw a.errors.length===1?dr(a.errors[0],this.clientVersion,this.config.activeProvider):new ve(JSON.stringify(a.errors),{clientVersion:this.clientVersion});return this.startCount>0&&(this.startCount=0),this.currentRequestPromise=void 0,{data:a}}catch(a){fo("req - e",a);let{error:c,shouldRetry:g}=await this.handleRequestError(a);if(r<=MR&&g&&!n)return fo("trying a retry now"),this.request(A,{traceparent:t,numTry:r+1,isWrite:n,interactiveTransaction:i});throw c}}async requestBatch(A,{traceparent:t,transaction:r,numTry:n=1,containsWrite:i}){await this.start();let s={};t&&(s.traceparent=t);let o=r?.kind==="itx"?r.options:void 0;o&&(s["X-transaction-id"]=o.id);let a=Vn(A,r);return this.lastQuery=JSON.stringify(a),this.currentRequestPromise=Lt.onHttpError(this.connection.post("/",this.lastQuery,s),c=>this.httpErrorHandler(c)),this.currentRequestPromise.then(({data:c})=>{c.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(c.extensions.traces);let{batchResult:g}=c;if(Array.isArray(g))return g.map(l=>(l.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(l.extensions.traces),l.errors&&l.errors.length>0?dr(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l}));throw dr(c.errors[0],this.clientVersion,this.config.activeProvider)}).catch(async c=>{let{error:g,shouldRetry:l}=await this.handleRequestError(c);if(l&&!i&&n<=MR)return this.requestBatch(A,{traceparent:t,transaction:r,numTry:n+1,containsWrite:i});throw g})}async transaction(A,t,r){if(await this.start(),A==="start"){let n=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel}),i=await Lt.onHttpError(this.connection.post("/transaction/start",n,t),s=>this.httpErrorHandler(s));return i.data.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(i.data.extensions.traces),i.data}else if(A==="commit"){let n=await Lt.onHttpError(this.connection.post(`/transaction/${r.id}/commit`,void 0,t),i=>this.httpErrorHandler(i));n.data.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(n.data.extensions.traces)}else if(A==="rollback"){let n=await Lt.onHttpError(this.connection.post(`/transaction/${r.id}/rollback`,void 0,t),i=>this.httpErrorHandler(i));n.data.extensions?.traces&&this.tracingHelper.dispatchEngineSpans(n.data.extensions.traces)}}get hasMaxRestarts(){return this.startCount>=TR}throwAsyncErrorIfExists(A=!1){if(fo("throwAsyncErrorIfExists",this.startCount,this.hasMaxRestarts),this.lastError&&(this.hasMaxRestarts||A)){let t=this.lastError;throw this.lastError=void 0,t.isPanic()?new JA(this.getErrorMessageWithLink(On(t)),this.clientVersion):new ve(this.getErrorMessageWithLink(On(t)),{clientVersion:this.clientVersion})}}getErrorMessageWithLink(A){return ZI({binaryTarget:this.binaryTarget,title:A,version:this.clientVersion,engineVersion:this.lastVersion,database:this.lastActiveProvider,query:this.lastQuery})}async metrics({format:A,globalLabels:t}){await this.start();let r=A==="json";return(await this.connection.post(`/metrics?format=${encodeURIComponent(A)}`,JSON.stringify(t),null,r)).data}httpErrorHandler(A){let t=A.data,r=t.extensions?.traces;throw r&&this.tracingHelper.dispatchEngineSpans(r),new We(t.message,{code:t.error_code,clientVersion:this.clientVersion,meta:t.meta})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Io(e,A=!1){process.once(e,async()=>{for(let t of Mg)await t.emitExit(),t.kill(e);Mg.splice(0,Mg.length),A&&process.listenerCount(e)===0&&process.exit()})}var vR=!1;function LJ(){vR||(Io("beforeExit"),Io("exit"),Io("SIGINT",!0),Io("SIGUSR2",!0),Io("SIGTERM",!0),vR=!0)}function UJ(e){return new Promise(A=>{e.once("exit",A),e.kill()})}function Mi({inlineDatasources:e,overrideDatasources:A,env:t,clientVersion:r}){let n,i=Object.keys(e)[0],s=e[i]?.url,o=A[i]?.url;if(i===void 0?n=void 0:o?n=o:s?.value?n=s.value:s?.fromEnvVar&&(n=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&n===void 0)throw new z(`error: Environment variable not found: ${s.fromEnvVar}.`,r);if(n===void 0)throw new z("error: Missing URL environment variable, value, or override.",r);return n}var vg=class extends Error{constructor(A,t){super(A),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var RA=class extends vg{constructor(A,t){super(A,t),this.isRetryable=t.isRetryable??!0}};function K(e,A){return{...e,isRetryable:A}}var vi=class extends RA{constructor(t){super("This request must be retried",K(t,!0));this.name="ForcedRetryError";this.code="P5001"}};T(vi,"ForcedRetryError");var un=class extends RA{constructor(t,r){super(t,K(r,!1));this.name="InvalidDatasourceError";this.code="P6001"}};T(un,"InvalidDatasourceError");var En=class extends RA{constructor(t,r){super(t,K(r,!1));this.name="NotImplementedYetError";this.code="P5004"}};T(En,"NotImplementedYetError");var Ce=class extends RA{constructor(A,t){super(A,t),this.response=t.response;let r=this.response.headers.get("prisma-request-id");if(r){let n=`(The request id was: ${r})`;this.message=this.message+" "+n}}};var hn=class extends Ce{constructor(t){super("Schema needs to be uploaded",K(t,!0));this.name="SchemaMissingError";this.code="P5005"}};T(hn,"SchemaMissingError");var Ed="This request could not be understood by the server",po=class extends Ce{constructor(t,r,n){super(r||Ed,K(t,!1));this.name="BadRequestError";this.code="P5000";n&&(this.code=n)}};T(po,"BadRequestError");var mo=class extends Ce{constructor(t,r){super("Engine not started: healthcheck timeout",K(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=r}};T(mo,"HealthcheckTimeoutError");var yo=class extends Ce{constructor(t,r,n){super(r,K(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=n}};T(yo,"EngineStartupError");var wo=class extends Ce{constructor(t){super("Engine version is not supported",K(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};T(wo,"EngineVersionNotSupportedError");var hd="Request timed out",Ro=class extends Ce{constructor(t,r=hd){super(r,K(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};T(Ro,"GatewayTimeoutError");var TJ="Interactive transaction error",Do=class extends Ce{constructor(t,r=TJ){super(r,K(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};T(Do,"InteractiveTransactionError");var MJ="Request parameters are invalid",bo=class extends Ce{constructor(t,r=MJ){super(r,K(t,!1));this.name="InvalidRequestError";this.code="P5011"}};T(bo,"InvalidRequestError");var dd="Requested resource does not exist",ko=class extends Ce{constructor(t,r=dd){super(r,K(t,!1));this.name="NotFoundError";this.code="P5003"}};T(ko,"NotFoundError");var Qd="Unknown server error",Pi=class extends Ce{constructor(t,r,n){super(r||Qd,K(t,!0));this.name="ServerError";this.code="P5006";this.logs=n}};T(Pi,"ServerError");var Cd="Unauthorized, check your connection string",So=class extends Ce{constructor(t,r=Cd){super(r,K(t,!1));this.name="UnauthorizedError";this.code="P5007"}};T(So,"UnauthorizedError");var fd="Usage exceeded, retry again later",No=class extends Ce{constructor(t,r=fd){super(r,K(t,!0));this.name="UsageExceededError";this.code="P5008"}};T(No,"UsageExceededError");async function vJ(e){let A;try{A=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(A);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let r=Object.values(t)[0].reason;return typeof r=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(r)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return A===""?{type:"EmptyError"}:{type:"UnknownTextError",body:A}}}async function Fo(e,A){if(e.ok)return;let t={clientVersion:A,response:e},r=await vJ(e);if(r.type==="QueryEngineError")throw new We(r.body.message,{code:r.body.error_code,clientVersion:A});if(r.type==="DataProxyError"){if(r.body==="InternalDataProxyError")throw new Pi(t,"Internal Data Proxy error");if("EngineNotStarted"in r.body){if(r.body.EngineNotStarted.reason==="SchemaMissing")return new hn(t);if(r.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new wo(t);if("EngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,logs:i}=r.body.EngineNotStarted.reason.EngineStartupError;throw new yo(t,n,i)}if("KnownEngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,error_code:i}=r.body.EngineNotStarted.reason.KnownEngineStartupError;throw new z(n,A,i)}if("HealthcheckTimeout"in r.body.EngineNotStarted.reason){let{logs:n}=r.body.EngineNotStarted.reason.HealthcheckTimeout;throw new mo(t,n)}}if("InteractiveTransactionMisrouted"in r.body){let n={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Do(t,n[r.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in r.body)throw new bo(t,r.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new So(t,Gi(Cd,r));if(e.status===404)return new ko(t,Gi(dd,r));if(e.status===429)throw new No(t,Gi(fd,r));if(e.status===504)throw new Ro(t,Gi(hd,r));if(e.status>=500)throw new Pi(t,Gi(Qd,r));if(e.status>=400)throw new po(t,Gi(Ed,r))}function Gi(e,A){return A.type==="EmptyError"?e:`${e}: ${JSON.stringify(A)}`}function JR(e){let A=Math.pow(2,e)*50,t=Math.ceil(Math.random()*A)-Math.ceil(A/2),r=A+t;return new Promise(n=>setTimeout(()=>n(r),r))}var rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function VR(e){let A=new TextEncoder().encode(e),t="",r=A.byteLength,n=r%3,i=r-n,s,o,a,c,g;for(let l=0;l<i;l=l+3)g=A[l]<<16|A[l+1]<<8|A[l+2],s=(g&16515072)>>18,o=(g&258048)>>12,a=(g&4032)>>6,c=g&63,t+=rr[s]+rr[o]+rr[a]+rr[c];return n==1?(g=A[i],s=(g&252)>>2,o=(g&3)<<4,t+=rr[s]+rr[o]+"=="):n==2&&(g=A[i]<<8|A[i+1],s=(g&64512)>>10,o=(g&1008)>>4,a=(g&15)<<2,t+=rr[s]+rr[o]+rr[a]+"="),t}function qR(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new z("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function PJ(e){return e[0]*1e3+e[1]/1e6}function Id(e){return new Date(PJ(e))}var OR={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.2.0-12.51db5cf11ad393407e86084764bced274b48b27d","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var xo=class extends RA{constructor(t,r){super(`Cannot fetch data from service:
|
|
174
174
|
${t}`,K(r,!0));this.name="RequestError";this.code="P5010"}};T(xo,"RequestError");async function dn(e,A,t=r=>r){let{clientVersion:r,...n}=A,i=t(fetch);try{return await i(e,n)}catch(s){let o=s.message??"Unknown error";throw new xo(o,{clientVersion:r,cause:s})}}var YJ=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,HR=ie("prisma:client:dataproxyEngine");async function JJ(e,A){let t=OR["@prisma/engines-version"],r=A.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&r!=="0.0.0"&&r!=="in-memory")return r;let[n,i]=r?.split("-")??[];if(i===void 0&&YJ.test(n))return n;if(i!==void 0||r==="0.0.0"||r==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=t.split("-")??[],[o,a,c]=s.split("."),g=VJ(`<=${o}.${a}.${c}`),l=await dn(g,{clientVersion:r});if(!l.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${l.status} ${l.statusText}, response body: ${await l.text()||"<empty body>"}`);let u=await l.text();HR("length of body fetched from unpkg.com",u.length);let E;try{E=JSON.parse(u)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",u),h}return E.version}throw new En("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:r})}async function WR(e,A){let t=await JJ(e,A);return HR("version",t),t}function VJ(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var _R=3,Pg=ie("prisma:client:dataproxyEngine"),Bd=class{constructor({apiKey:A,tracingHelper:t,logLevel:r,logQueries:n,engineHash:i}){this.apiKey=A,this.tracingHelper=t,this.logLevel=r,this.logQueries=n,this.engineHash=i}build({traceparent:A,interactiveTransaction:t}={}){let r={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(r.traceparent=A??this.tracingHelper.getTraceParent()),t&&(r["X-transaction-id"]=t.id);let n=this.buildCaptureSettings();return n.length>0&&(r["X-capture-telemetry"]=n.join(", ")),r}buildCaptureSettings(){let A=[];return this.tracingHelper.isEnabled()&&A.push("tracing"),this.logLevel&&A.push(this.logLevel),this.logQueries&&A.push("query"),A}},Lo=class{constructor(A){this.name="DataProxyEngine";qR(A),this.config=A,this.env={...A.env,...typeof process<"u"?process.env:{}},this.inlineSchema=VR(A.inlineSchema),this.inlineDatasources=A.inlineDatasources,this.inlineSchemaHash=A.inlineSchemaHash,this.clientVersion=A.clientVersion,this.engineHash=A.engineVersion,this.logEmitter=A.logEmitter,this.tracingHelper=A.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[A,t]=this.extractHostAndApiKey();this.host=A,this.headerBuilder=new Bd({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await WR(A,this.config),Pg("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(A){A?.logs?.length&&A.logs.forEach(t=>{switch(t.level){case"debug":case"trace":Pg(t);break;case"error":case"warn":case"info":{this.logEmitter.emit(t.level,{timestamp:Id(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.logEmitter.emit("query",{query:t.attributes.query??"",timestamp:Id(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:t.level}}),A?.traces?.length&&this.tracingHelper.dispatchEngineSpans(A.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(A){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${A}`}async uploadSchema(){let A={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(A,async()=>{let t=await dn(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Pg("schema response status",t.status);let r=await Fo(t,this.clientVersion);if(r)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${r.message}`,timestamp:new Date,target:""}),r;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(A,{traceparent:t,interactiveTransaction:r,customDataProxyFetch:n}){return this.requestInternal({body:A,traceparent:t,interactiveTransaction:r,customDataProxyFetch:n})}async requestBatch(A,{traceparent:t,transaction:r,customDataProxyFetch:n}){let i=r?.kind==="itx"?r.options:void 0,s=Vn(A,r);return(await this.requestInternal({body:s,customDataProxyFetch:n,interactiveTransaction:i,traceparent:t})).map(a=>(a.extensions&&this.propagateResponseExtensions(a.extensions),"errors"in a?this.convertProtocolErrorsToClientError(a.errors):a))}requestInternal({body:A,traceparent:t,customDataProxyFetch:r,interactiveTransaction:n}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:i})=>{let s=n?`${n.payload.endpoint}/graphql`:await this.url("graphql");i(s);let o=await dn(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:n}),body:JSON.stringify(A),clientVersion:this.clientVersion},r);o.ok||Pg("graphql response status",o.status),await this.handleError(await Fo(o,this.clientVersion));let a=await o.json();if(a.extensions&&this.propagateResponseExtensions(a.extensions),"errors"in a)throw this.convertProtocolErrorsToClientError(a.errors);return"batchResult"in a?a.batchResult:a}})}async transaction(A,t,r){let n={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${n[A]} transaction`,callback:async({logHttpCall:i})=>{if(A==="start"){let s=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel}),o=await this.url("transaction/start");i(o);let a=await dn(o,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Fo(a,this.clientVersion));let c=await a.json(),{extensions:g}=c;g&&this.propagateResponseExtensions(g);let l=c.id,u=c["data-proxy"].endpoint;return{id:l,payload:{endpoint:u}}}else{let s=`${r.payload.endpoint}/${A}`;i(s);let o=await dn(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Fo(o,this.clientVersion));let a=await o.json(),{extensions:c}=a;c&&this.propagateResponseExtensions(c);return}}})}extractHostAndApiKey(){let A={clientVersion:this.clientVersion},t=Object.keys(this.inlineDatasources)[0],r=Mi({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),n;try{n=new URL(r)}catch{throw new un(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,A)}let{protocol:i,host:s,searchParams:o}=n;if(i!=="prisma:"&&i!=="prisma+postgres:")throw new un(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,A);let a=o.get("api_key");if(a===null||a.length<1)throw new un(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,A);return[s,a]}metrics(){throw new En("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(A){for(let t=0;;t++){let r=n=>{this.logEmitter.emit("info",{message:`Calling ${n} (n=${t})`,timestamp:new Date,target:""})};try{return await A.callback({logHttpCall:r})}catch(n){if(!(n instanceof RA)||!n.isRetryable)throw n;if(t>=_R)throw n instanceof vi?n.cause:n;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${_R} failed for ${A.actionGerund}: ${n.message??"(unknown)"}`,timestamp:new Date,target:""});let i=await JR(t);this.logEmitter.emit("warn",{message:`Retrying after ${i}ms`,timestamp:new Date,target:""})}}}async handleError(A){if(A instanceof hn)throw await this.uploadSchema(),new vi({clientVersion:this.clientVersion,cause:A});if(A)throw A}convertProtocolErrorsToClientError(A){return A.length===1?dr(A[0],this.config.clientVersion,this.config.activeProvider):new ve(JSON.stringify(A),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function jR({copyEngine:e=!0},A){let t;try{t=Mi({inlineDatasources:A.inlineDatasources,overrideDatasources:A.overrideDatasources,env:{...A.env,...process.env},clientVersion:A.clientVersion})}catch{}let r=!!(t?.startsWith("prisma://")||t?.startsWith("prisma+postgres://"));e&&r&&as("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=ts(A.generator),i=r||!e,s=!!A.adapter,o=n==="library",a=n==="binary";if(i&&s||s&&!1){let c;throw e?t?.startsWith("prisma://")?c=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:c=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:c=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new ze(c.join(`
|
|
175
175
|
`),{clientVersion:A.clientVersion})}if(i)return new Lo(A);if(a)return new Bo(A);throw new ze("Invalid client engine type, please use `library` or `binary`",{clientVersion:A.clientVersion})}function Gg({generator:e}){return e?.previewFeatures??[]}var KR=e=>({command:e});var ZR=e=>e.strings.reduce((A,t,r)=>`${A}@P${r}${t}`);function Yi(e){try{return XR(e,"fast")}catch{return XR(e,"slow")}}function XR(e,A){return JSON.stringify(e.map(t=>$R(t,A)))}function $R(e,A){if(Array.isArray(e))return e.map(t=>$R(t,A));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Fn(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Et.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(qJ(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:r,byteLength:n}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(t,r,n).toString("base64")}}return typeof e=="object"&&A==="slow"?eD(e):e}function qJ(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function eD(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(zR);let A={};for(let t of Object.keys(e))A[t]=zR(e[t]);return A}function zR(e){return typeof e=="bigint"?e.toString():eD(e)}var OJ=["$connect","$disconnect","$on","$transaction","$use","$extends"],AD=OJ;var HJ=/^(\s*alter\s)/i,tD=ie("prisma:client");function pd(e,A,t,r){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&HJ.exec(A))throw new Error(`Running ALTER using ${r} is not supported
|
|
176
176
|
Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization.
|
|
@@ -179,7 +179,7 @@ Example:
|
|
|
179
179
|
await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`)
|
|
180
180
|
|
|
181
181
|
More Information: https://pris.ly/d/execute-raw
|
|
182
|
-
`)}var md=({clientMethod:e,activeProvider:A})=>t=>{let r="",n;if(rI(t))r=t.sql,n={values:Yi(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[i,...s]=t;r=i,n={values:Yi(s||[]),__prismaRawParameters__:!0}}else switch(A){case"sqlite":case"mysql":{r=t.sql,n={values:Yi(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{r=t.text,n={values:Yi(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{r=ZR(t),n={values:Yi(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${A} provider does not support ${e}`)}return n?.values?tD(`prisma.${e}(${r}, ${n.values})`):tD(`prisma.${e}(${r})`),{query:r,parameters:n}},rD={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[A,...t]=e;return new QA(A,t)}},nD={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function yd(e){return function(t){let r,n=(i=e)=>{try{return i===void 0||i?.kind==="itx"?r??=iD(t(i)):iD(t(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return n().then(i,s)},catch(i){return n().catch(i)},finally(i){return n().finally(i)},requestTransaction(i){let s=n(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function iD(e){return typeof e.then=="function"?e:Promise.resolve(e)}var WJ={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,A){return A()}},wd=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(A){return this.getGlobalTracingHelper().getTraceParent(A)}dispatchEngineSpans(A){return this.getGlobalTracingHelper().dispatchEngineSpans(A)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(A,t){return this.getGlobalTracingHelper().runInChildSpan(A,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??WJ}};function sD(){return new wd}function oD(e,A=()=>{}){let t,r=new Promise(n=>t=n);return{then(n){return--e===0&&t(A()),n?.(r)}}}function aD(e){return typeof e=="string"?e:e.reduce((A,t)=>{let r=typeof t=="string"?t:t.level;return r==="query"?A:A&&(t==="info"||A==="info")?"info":r},void 0)}var Yg=class{constructor(){this._middlewares=[]}use(A){this._middlewares.push(A)}get(A){return this._middlewares[A]}has(A){return!!this._middlewares[A]}length(){return this._middlewares.length}};var gD=Z(Gl());function Jg(e){return typeof e.batchRequestIdx=="number"}function cD(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let A=[];return e.modelName&&A.push(e.modelName),e.query.arguments&&A.push(Rd(e.query.arguments)),A.push(Rd(e.query.selection)),A.join("")}function Rd(e){return`(${Object.keys(e).sort().map(t=>{let r=e[t];return typeof r=="object"&&r!==null?`(${t} ${Rd(r)})`:t}).join(" ")})`}var _J={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Dd(e){return _J[e]}var Vg=class{constructor(A){this.options=A;this.tickActive=!1;this.batches={}}request(A){let t=this.options.batchBy(A);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((r,n)=>{this.batches[t].push({request:A,resolve:r,reject:n})})):this.options.singleLoader(A)}dispatchBatches(){for(let A in this.batches){let t=this.batches[A];delete this.batches[A],t.length===1?this.options.singleLoader(t[0].request).then(r=>{r instanceof Error?t[0].reject(r):t[0].resolve(r)}).catch(r=>{t[0].reject(r)}):(t.sort((r,n)=>this.options.batchOrder(r.request,n.request)),this.options.batchLoader(t.map(r=>r.request)).then(r=>{if(r instanceof Error)for(let n=0;n<t.length;n++)t[n].reject(r);else for(let n=0;n<t.length;n++){let i=r[n];i instanceof Error?t[n].reject(i):t[n].resolve(i)}}).catch(r=>{for(let n=0;n<t.length;n++)t[n].reject(r)}))}}get[Symbol.toStringTag](){return"DataLoader"}};function Qn(e,A){if(A===null)return A;switch(e){case"bigint":return BigInt(A);case"bytes":{let{buffer:t,byteOffset:r,byteLength:n}=Buffer.from(A,"base64");return new Uint8Array(t,r,n)}case"decimal":return new Et(A);case"datetime":case"date":return new Date(A);case"time":return new Date(`1970-01-01T${A}Z`);case"bigint-array":return A.map(t=>Qn("bigint",t));case"bytes-array":return A.map(t=>Qn("bytes",t));case"decimal-array":return A.map(t=>Qn("decimal",t));case"datetime-array":return A.map(t=>Qn("datetime",t));case"date-array":return A.map(t=>Qn("date",t));case"time-array":return A.map(t=>Qn("time",t));default:return A}}function qg(e){let A=[],t=jJ(e);for(let r=0;r<e.rows.length;r++){let n=e.rows[r],i={...t};for(let s=0;s<n.length;s++)i[e.columns[s]]=Qn(e.types[s],n[s]);A.push(i)}return A}function jJ(e){let A={};for(let t=0;t<e.columns.length;t++)A[e.columns[t]]=null;return A}var KJ=ie("prisma:client:request_handler"),Og=class{constructor(A,t){this.logEmitter=t,this.client=A,this.dataloader=new Vg({batchLoader:kI(async({requests:r,customDataProxyFetch:n})=>{let{transaction:i,otelParentCtx:s}=r[0],o=r.map(l=>l.protocolQuery),a=this.client._tracingHelper.getTraceParent(s),c=r.some(l=>Dd(l.protocolQuery.action));return(await this.client._engine.requestBatch(o,{traceparent:a,transaction:ZJ(i),containsWrite:c,customDataProxyFetch:n})).map((l,u)=>{if(l instanceof Error)return l;try{return this.mapQueryEngineResult(r[u],l)}catch(E){return E}})}),singleLoader:async r=>{let n=r.transaction?.kind==="itx"?lD(r.transaction):void 0,i=await this.client._engine.request(r.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:n,isWrite:Dd(r.protocolQuery.action),customDataProxyFetch:r.customDataProxyFetch});return this.mapQueryEngineResult(r,i)},batchBy:r=>r.transaction?.id?`transaction-${r.transaction.id}`:cD(r.protocolQuery),batchOrder(r,n){return r.transaction?.kind==="batch"&&n.transaction?.kind==="batch"?r.transaction.index-n.transaction.index:0}})}async request(A){try{return await this.dataloader.request(A)}catch(t){let{clientMethod:r,callsite:n,transaction:i,args:s,modelName:o}=A;this.handleAndLogRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:s,modelName:o,globalOmit:A.globalOmit})}}mapQueryEngineResult({dataPath:A,unpacker:t},r){let n=r?.data,i=this.unpack(n,A,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:i}:i}handleAndLogRequestError(A){try{this.handleRequestError(A)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:A.clientMethod,timestamp:new Date}),t}}handleRequestError({error:A,clientMethod:t,callsite:r,transaction:n,args:i,modelName:s,globalOmit:o}){if(KJ(A),XJ(A,n))throw A;if(A instanceof We&&zJ(A)){let c=uD(A.meta);Ua({args:i,errors:[c],callsite:r,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:o})}let a=A.message;if(r&&(a=wa({callsite:r,originalMethod:t,isPanic:A.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),A.code){let c=s?{modelName:s,...A.meta}:A.meta;throw new We(a,{code:A.code,clientVersion:this.client._clientVersion,meta:c,batchRequestIdx:A.batchRequestIdx})}else{if(A.isPanic)throw new JA(a,this.client._clientVersion);if(A instanceof ve)throw new ve(a,{clientVersion:this.client._clientVersion,batchRequestIdx:A.batchRequestIdx});if(A instanceof z)throw new z(a,this.client._clientVersion);if(A instanceof JA)throw new JA(a,this.client._clientVersion)}throw A.clientVersion=this.client._clientVersion,A}sanitizeMessage(A){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,gD.default)(A):A}unpack(A,t,r){if(!A||(A.data&&(A=A.data),!A))return A;let n=Object.keys(A)[0],i=Object.values(A)[0],s=t.filter(c=>c!=="select"&&c!=="include"),o=lu(i,s),a=n==="queryRaw"?qg(o):Sn(o);return r?r(a):a}get[Symbol.toStringTag](){return"RequestHandler"}};function ZJ(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:lD(e)};Gt(e,"Unknown transaction kind")}}function lD(e){return{id:e.id,payload:e.payload}}function XJ(e,A){return Jg(e)&&A?.kind==="batch"&&e.batchRequestIdx!==A.index}function zJ(e){return e.code==="P2009"||e.code==="P2012"}function uD(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(uD)};if(Array.isArray(e.selectionPath)){let[,...A]=e.selectionPath;return{...e,selectionPath:A}}return e}var ED="6.2.0-dev.
|
|
182
|
+
`)}var md=({clientMethod:e,activeProvider:A})=>t=>{let r="",n;if(rI(t))r=t.sql,n={values:Yi(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[i,...s]=t;r=i,n={values:Yi(s||[]),__prismaRawParameters__:!0}}else switch(A){case"sqlite":case"mysql":{r=t.sql,n={values:Yi(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{r=t.text,n={values:Yi(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{r=ZR(t),n={values:Yi(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${A} provider does not support ${e}`)}return n?.values?tD(`prisma.${e}(${r}, ${n.values})`):tD(`prisma.${e}(${r})`),{query:r,parameters:n}},rD={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[A,...t]=e;return new QA(A,t)}},nD={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function yd(e){return function(t){let r,n=(i=e)=>{try{return i===void 0||i?.kind==="itx"?r??=iD(t(i)):iD(t(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return n().then(i,s)},catch(i){return n().catch(i)},finally(i){return n().finally(i)},requestTransaction(i){let s=n(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function iD(e){return typeof e.then=="function"?e:Promise.resolve(e)}var WJ={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,A){return A()}},wd=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(A){return this.getGlobalTracingHelper().getTraceParent(A)}dispatchEngineSpans(A){return this.getGlobalTracingHelper().dispatchEngineSpans(A)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(A,t){return this.getGlobalTracingHelper().runInChildSpan(A,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??WJ}};function sD(){return new wd}function oD(e,A=()=>{}){let t,r=new Promise(n=>t=n);return{then(n){return--e===0&&t(A()),n?.(r)}}}function aD(e){return typeof e=="string"?e:e.reduce((A,t)=>{let r=typeof t=="string"?t:t.level;return r==="query"?A:A&&(t==="info"||A==="info")?"info":r},void 0)}var Yg=class{constructor(){this._middlewares=[]}use(A){this._middlewares.push(A)}get(A){return this._middlewares[A]}has(A){return!!this._middlewares[A]}length(){return this._middlewares.length}};var gD=Z(Gl());function Jg(e){return typeof e.batchRequestIdx=="number"}function cD(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let A=[];return e.modelName&&A.push(e.modelName),e.query.arguments&&A.push(Rd(e.query.arguments)),A.push(Rd(e.query.selection)),A.join("")}function Rd(e){return`(${Object.keys(e).sort().map(t=>{let r=e[t];return typeof r=="object"&&r!==null?`(${t} ${Rd(r)})`:t}).join(" ")})`}var _J={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Dd(e){return _J[e]}var Vg=class{constructor(A){this.options=A;this.tickActive=!1;this.batches={}}request(A){let t=this.options.batchBy(A);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((r,n)=>{this.batches[t].push({request:A,resolve:r,reject:n})})):this.options.singleLoader(A)}dispatchBatches(){for(let A in this.batches){let t=this.batches[A];delete this.batches[A],t.length===1?this.options.singleLoader(t[0].request).then(r=>{r instanceof Error?t[0].reject(r):t[0].resolve(r)}).catch(r=>{t[0].reject(r)}):(t.sort((r,n)=>this.options.batchOrder(r.request,n.request)),this.options.batchLoader(t.map(r=>r.request)).then(r=>{if(r instanceof Error)for(let n=0;n<t.length;n++)t[n].reject(r);else for(let n=0;n<t.length;n++){let i=r[n];i instanceof Error?t[n].reject(i):t[n].resolve(i)}}).catch(r=>{for(let n=0;n<t.length;n++)t[n].reject(r)}))}}get[Symbol.toStringTag](){return"DataLoader"}};function Qn(e,A){if(A===null)return A;switch(e){case"bigint":return BigInt(A);case"bytes":{let{buffer:t,byteOffset:r,byteLength:n}=Buffer.from(A,"base64");return new Uint8Array(t,r,n)}case"decimal":return new Et(A);case"datetime":case"date":return new Date(A);case"time":return new Date(`1970-01-01T${A}Z`);case"bigint-array":return A.map(t=>Qn("bigint",t));case"bytes-array":return A.map(t=>Qn("bytes",t));case"decimal-array":return A.map(t=>Qn("decimal",t));case"datetime-array":return A.map(t=>Qn("datetime",t));case"date-array":return A.map(t=>Qn("date",t));case"time-array":return A.map(t=>Qn("time",t));default:return A}}function qg(e){let A=[],t=jJ(e);for(let r=0;r<e.rows.length;r++){let n=e.rows[r],i={...t};for(let s=0;s<n.length;s++)i[e.columns[s]]=Qn(e.types[s],n[s]);A.push(i)}return A}function jJ(e){let A={};for(let t=0;t<e.columns.length;t++)A[e.columns[t]]=null;return A}var KJ=ie("prisma:client:request_handler"),Og=class{constructor(A,t){this.logEmitter=t,this.client=A,this.dataloader=new Vg({batchLoader:kI(async({requests:r,customDataProxyFetch:n})=>{let{transaction:i,otelParentCtx:s}=r[0],o=r.map(l=>l.protocolQuery),a=this.client._tracingHelper.getTraceParent(s),c=r.some(l=>Dd(l.protocolQuery.action));return(await this.client._engine.requestBatch(o,{traceparent:a,transaction:ZJ(i),containsWrite:c,customDataProxyFetch:n})).map((l,u)=>{if(l instanceof Error)return l;try{return this.mapQueryEngineResult(r[u],l)}catch(E){return E}})}),singleLoader:async r=>{let n=r.transaction?.kind==="itx"?lD(r.transaction):void 0,i=await this.client._engine.request(r.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:n,isWrite:Dd(r.protocolQuery.action),customDataProxyFetch:r.customDataProxyFetch});return this.mapQueryEngineResult(r,i)},batchBy:r=>r.transaction?.id?`transaction-${r.transaction.id}`:cD(r.protocolQuery),batchOrder(r,n){return r.transaction?.kind==="batch"&&n.transaction?.kind==="batch"?r.transaction.index-n.transaction.index:0}})}async request(A){try{return await this.dataloader.request(A)}catch(t){let{clientMethod:r,callsite:n,transaction:i,args:s,modelName:o}=A;this.handleAndLogRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:s,modelName:o,globalOmit:A.globalOmit})}}mapQueryEngineResult({dataPath:A,unpacker:t},r){let n=r?.data,i=this.unpack(n,A,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:i}:i}handleAndLogRequestError(A){try{this.handleRequestError(A)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:A.clientMethod,timestamp:new Date}),t}}handleRequestError({error:A,clientMethod:t,callsite:r,transaction:n,args:i,modelName:s,globalOmit:o}){if(KJ(A),XJ(A,n))throw A;if(A instanceof We&&zJ(A)){let c=uD(A.meta);Ua({args:i,errors:[c],callsite:r,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:o})}let a=A.message;if(r&&(a=wa({callsite:r,originalMethod:t,isPanic:A.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),A.code){let c=s?{modelName:s,...A.meta}:A.meta;throw new We(a,{code:A.code,clientVersion:this.client._clientVersion,meta:c,batchRequestIdx:A.batchRequestIdx})}else{if(A.isPanic)throw new JA(a,this.client._clientVersion);if(A instanceof ve)throw new ve(a,{clientVersion:this.client._clientVersion,batchRequestIdx:A.batchRequestIdx});if(A instanceof z)throw new z(a,this.client._clientVersion);if(A instanceof JA)throw new JA(a,this.client._clientVersion)}throw A.clientVersion=this.client._clientVersion,A}sanitizeMessage(A){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,gD.default)(A):A}unpack(A,t,r){if(!A||(A.data&&(A=A.data),!A))return A;let n=Object.keys(A)[0],i=Object.values(A)[0],s=t.filter(c=>c!=="select"&&c!=="include"),o=lu(i,s),a=n==="queryRaw"?qg(o):Sn(o);return r?r(a):a}get[Symbol.toStringTag](){return"RequestHandler"}};function ZJ(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:lD(e)};Gt(e,"Unknown transaction kind")}}function lD(e){return{id:e.id,payload:e.payload}}function XJ(e,A){return Jg(e)&&A?.kind==="batch"&&e.batchRequestIdx!==A.index}function zJ(e){return e.code==="P2009"||e.code==="P2012"}function uD(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(uD)};if(Array.isArray(e.selectionPath)){let[,...A]=e.selectionPath;return{...e,selectionPath:A}}return e}var ED="6.2.0-dev.13";var hD=ED;var ID=Z(Kl());var oe=class extends Error{constructor(A){super(A+`
|
|
183
183
|
Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};T(oe,"PrismaClientConstructorValidationError");var dD=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],QD=["pretty","colorless","minimal"],CD=["info","query","warn","error"],eV={datasources:(e,{datasourceNames:A})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,r]of Object.entries(e)){if(!A.includes(t)){let n=Ji(t,A)||` Available datasources: ${A.join(", ")}`;throw new oe(`Unknown datasource ${t} provided to PrismaClient constructor.${n}`)}if(typeof r!="object"||Array.isArray(r))throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor.
|
|
184
184
|
It should have this form: { url: "CONNECTION_STRING" }`);if(r&&typeof r=="object")for(let[n,i]of Object.entries(r)){if(n!=="url")throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor.
|
|
185
185
|
It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new oe(`Invalid value ${JSON.stringify(i)} for datasource "${t}" provided to PrismaClient constructor.
|