prisma 5.23.0-dev.17 → 5.23.0-dev.18
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 +14 -14
- package/prisma-client/runtime/edge.js +14 -14
- package/prisma-client/runtime/library.d.ts +1 -1
- package/prisma-client/runtime/library.js +3 -3
- package/prisma-client/runtime/query_engine_bg.mysql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.postgresql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.sqlite.js +2 -2
- package/prisma-client/runtime/react-native.d.ts +1 -1
- 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": "5.23.0-dev.
|
|
2
|
+
"version": "5.23.0-dev.18",
|
|
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": "5b01d405f30e1b43696d7592a09e3d605b18527d"
|
|
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/client": "5.23.0-dev.
|
|
111
|
-
"@prisma/
|
|
112
|
-
"@prisma/
|
|
113
|
-
"@prisma/
|
|
114
|
-
"@prisma/
|
|
115
|
-
"@prisma/internals": "5.23.0-dev.
|
|
116
|
-
"@prisma/migrate": "5.23.0-dev.
|
|
110
|
+
"@prisma/client": "5.23.0-dev.18",
|
|
111
|
+
"@prisma/fetch-engine": "5.23.0-dev.18",
|
|
112
|
+
"@prisma/debug": "5.23.0-dev.18",
|
|
113
|
+
"@prisma/generator-helper": "5.23.0-dev.18",
|
|
114
|
+
"@prisma/get-platform": "5.23.0-dev.18",
|
|
115
|
+
"@prisma/internals": "5.23.0-dev.18",
|
|
116
|
+
"@prisma/migrate": "5.23.0-dev.18"
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@prisma/engines": "5.23.0-dev.
|
|
119
|
+
"@prisma/engines": "5.23.0-dev.18"
|
|
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@5.23.0-
|
|
36
|
+
// ../../node_modules/.pnpm/@prisma+engines-version@5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c/node_modules/@prisma/engines-version/package.json
|
|
37
37
|
var require_package = __commonJS({
|
|
38
|
-
"../../node_modules/.pnpm/@prisma+engines-version@5.23.0-
|
|
38
|
+
"../../node_modules/.pnpm/@prisma+engines-version@5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c/node_modules/@prisma/engines-version/package.json"(exports2, module2) {
|
|
39
39
|
module2.exports = {
|
|
40
40
|
name: "@prisma/engines-version",
|
|
41
|
-
version: "5.23.0-
|
|
41
|
+
version: "5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c",
|
|
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: "06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c"
|
|
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@5.23.0-
|
|
69
|
+
// ../../node_modules/.pnpm/@prisma+engines-version@5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c/node_modules/@prisma/engines-version/index.js
|
|
70
70
|
var require_engines_version = __commonJS({
|
|
71
|
-
"../../node_modules/.pnpm/@prisma+engines-version@5.23.0-
|
|
71
|
+
"../../node_modules/.pnpm/@prisma+engines-version@5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c/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;
|
|
@@ -3166,7 +3166,7 @@ var require_package2 = __commonJS({
|
|
|
3166
3166
|
"package.json"(exports2, module2) {
|
|
3167
3167
|
module2.exports = {
|
|
3168
3168
|
name: "@prisma/client",
|
|
3169
|
-
version: "5.23.0-dev.
|
|
3169
|
+
version: "5.23.0-dev.18",
|
|
3170
3170
|
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.",
|
|
3171
3171
|
keywords: [
|
|
3172
3172
|
"ORM",
|
|
@@ -3365,7 +3365,7 @@ var require_package2 = __commonJS({
|
|
|
3365
3365
|
"@prisma/debug": "workspace:*",
|
|
3366
3366
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
3367
3367
|
"@prisma/engines": "workspace:*",
|
|
3368
|
-
"@prisma/engines-version": "5.23.0-
|
|
3368
|
+
"@prisma/engines-version": "5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c",
|
|
3369
3369
|
"@prisma/fetch-engine": "workspace:*",
|
|
3370
3370
|
"@prisma/generator-helper": "workspace:*",
|
|
3371
3371
|
"@prisma/get-platform": "workspace:*",
|
|
@@ -3374,7 +3374,7 @@ var require_package2 = __commonJS({
|
|
|
3374
3374
|
"@prisma/migrate": "workspace:*",
|
|
3375
3375
|
"@prisma/mini-proxy": "0.9.5",
|
|
3376
3376
|
"@prisma/pg-worker": "workspace:*",
|
|
3377
|
-
"@prisma/query-engine-wasm": "5.23.0-
|
|
3377
|
+
"@prisma/query-engine-wasm": "5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c",
|
|
3378
3378
|
"@snaplet/copycat": "0.17.3",
|
|
3379
3379
|
"@swc-node/register": "1.10.9",
|
|
3380
3380
|
"@swc/core": "1.6.13",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client",
|
|
3
|
-
"version": "5.23.0-dev.
|
|
3
|
+
"version": "5.23.0-dev.18",
|
|
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": "5.23.0-
|
|
202
|
+
"@prisma/engines-version": "5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c",
|
|
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": "5.23.0-
|
|
211
|
+
"@prisma/query-engine-wasm": "5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c",
|
|
212
212
|
"@snaplet/copycat": "0.17.3",
|
|
213
213
|
"@swc-node/register": "1.10.9",
|
|
214
214
|
"@swc/core": "1.6.13",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";var DD=Object.create;var Vi=Object.defineProperty;var bD=Object.getOwnPropertyDescriptor;var kD=Object.getOwnPropertyNames;var SD=Object.getPrototypeOf,FD=Object.prototype.hasOwnProperty;var pd=e=>{throw TypeError(e)};var ND=(e,A,t)=>A in e?Vi(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),qi=(e,A)=>{for(var t in A)Vi(e,t,{get:A[t],enumerable:!0})},md=(e,A,t,r)=>{if(A&&typeof A=="object"||typeof A=="function")for(let n of kD(A))!FD.call(e,n)&&n!==t&&Vi(e,n,{get:()=>A[n],enumerable:!(r=bD(A,n))||r.enumerable});return e};var Z=(e,A,t)=>(t=e!=null?DD(SD(e)):{},md(A||!e||!e.__esModule?Vi(t,"default",{value:e,enumerable:!0}):t,e)),xD=e=>md(Vi({},"__esModule",{value:!0}),e);var yd=(e,A,t)=>ND(e,typeof A!="symbol"?A+"":A,t),Og=(e,A,t)=>A.has(e)||pd("Cannot "+t);var f=(e,A,t)=>(Og(e,A,"read from private field"),t?t.call(e):A.get(e)),Ne=(e,A,t)=>A.has(e)?pd("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(e):A.set(e,t),Ae=(e,A,t,r)=>(Og(e,A,"write to private field"),r?r.call(e,t):A.set(e,t),t),MA=(e,A,t)=>(Og(e,A,"access private method"),t);var jd=Q((wV,_d)=>{"use strict";_d.exports=Wd;Wd.sync=Ib;var Od=require("fs");function fb(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 Hd(e,A,t){return!e.isSymbolicLink()&&!e.isFile()?!1:fb(A,t)}function Wd(e,A,t){Od.stat(e,function(r,n){t(r,r?!1:Hd(n,e,A))})}function Ib(e,A){return Hd(Od.statSync(e),e,A)}});var $d=Q((RV,zd)=>{"use strict";zd.exports=Zd;Zd.sync=Bb;var Kd=require("fs");function Zd(e,A,t){Kd.stat(e,function(r,n){t(r,r?!1:Xd(n,A))})}function Bb(e,A){return Xd(Kd.statSync(e),A)}function Xd(e,A){return e.isFile()&&pb(e,A)}function pb(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 AQ=Q((bV,eQ)=>{"use strict";var DV=require("fs"),Ho;process.platform==="win32"||global.TESTING_WINDOWS?Ho=jd():Ho=$d();eQ.exports=Al;Al.sync=mb;function Al(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){Al(e,A||{},function(i,s){i?n(i):r(s)})})}Ho(e,A||{},function(r,n){r&&(r.code==="EACCES"||A&&A.ignoreErrors)&&(r=null,n=!1),t(r,n)})}function mb(e,A){try{return Ho.sync(e,A||{})}catch(t){if(A&&A.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var aQ=Q((kV,oQ)=>{"use strict";var dn=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",tQ=require("path"),yb=dn?";":":",rQ=AQ(),nQ=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),iQ=(e,A)=>{let t=A.colon||yb,r=e.match(/\//)||dn&&e.match(/\\/)?[""]:[...dn?[process.cwd()]:[],...(A.path||process.env.PATH||"").split(t)],n=dn?A.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=dn?n.split(t):[""];return dn&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:n}},sQ=(e,A,t)=>{typeof A=="function"&&(t=A,A={}),A||(A={});let{pathEnv:r,pathExt:n,pathExtExe:i}=iQ(e,A),s=[],o=c=>new Promise((g,l)=>{if(c===r.length)return A.all&&s.length?g(s):l(nQ(e));let u=r[c],E=/^".*"$/.test(u)?u.slice(1,-1):u,h=tQ.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];rQ(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)},wb=(e,A)=>{A=A||{};let{pathEnv:t,pathExt:r,pathExtExe:n}=iQ(e,A),i=[];for(let s=0;s<t.length;s++){let o=t[s],a=/^".*"$/.test(o)?o.slice(1,-1):o,c=tQ.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(rQ.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 nQ(e)};oQ.exports=sQ;sQ.sync=wb});var rl=Q((SV,tl)=>{"use strict";var cQ=(e={})=>{let A=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(A).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};tl.exports=cQ;tl.exports.default=cQ});var EQ=Q((FV,uQ)=>{"use strict";var gQ=require("path"),Rb=aQ(),Db=rl();function lQ(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=Rb.sync(e.command,{path:t[Db({env:t})],pathExt:A?gQ.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=gQ.resolve(n?e.options.cwd:"",s)),s}function bb(e){return lQ(e)||lQ(e,!0)}uQ.exports=bb});var hQ=Q((NV,il)=>{"use strict";var nl=/([()\][%!^"`<>&|;, *?])/g;function kb(e){return e=e.replace(nl,"^$1"),e}function Sb(e,A){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(nl,"^$1"),A&&(e=e.replace(nl,"^$1")),e}il.exports.command=kb;il.exports.argument=Sb});var QQ=Q((xV,dQ)=>{"use strict";dQ.exports=/^#!(.*)/});var fQ=Q((LV,CQ)=>{"use strict";var Fb=QQ();CQ.exports=(e="")=>{let A=e.match(Fb);if(!A)return null;let[t,r]=A[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?r:r?`${n} ${r}`:n}});var BQ=Q((UV,IQ)=>{"use strict";var sl=require("fs"),Nb=fQ();function xb(e){let t=Buffer.alloc(150),r;try{r=sl.openSync(e,"r"),sl.readSync(r,t,0,150,0),sl.closeSync(r)}catch{}return Nb(t.toString())}IQ.exports=xb});var wQ=Q((TV,yQ)=>{"use strict";var Lb=require("path"),pQ=EQ(),mQ=hQ(),Ub=BQ(),Tb=process.platform==="win32",Mb=/\.(?:com|exe)$/i,vb=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Pb(e){e.file=pQ(e);let A=e.file&&Ub(e.file);return A?(e.args.unshift(e.file),e.command=A,pQ(e)):e.file}function Gb(e){if(!Tb)return e;let A=Pb(e),t=!Mb.test(A);if(e.options.forceShell||t){let r=vb.test(A);e.command=Lb.normalize(e.command),e.command=mQ.command(e.command),e.args=e.args.map(i=>mQ.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 Jb(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:Gb(r)}yQ.exports=Jb});var bQ=Q((MV,DQ)=>{"use strict";var ol=process.platform==="win32";function al(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 Yb(e,A){if(!ol)return;let t=e.emit;e.emit=function(r,n){if(r==="exit"){let i=RQ(n,A,"spawn");if(i)return t.call(e,"error",i)}return t.apply(e,arguments)}}function RQ(e,A){return ol&&e===1&&!A.file?al(A.original,"spawn"):null}function Vb(e,A){return ol&&e===1&&!A.file?al(A.original,"spawnSync"):null}DQ.exports={hookChildProcess:Yb,verifyENOENT:RQ,verifyENOENTSync:Vb,notFoundError:al}});var FQ=Q((vV,Qn)=>{"use strict";var kQ=require("child_process"),cl=wQ(),gl=bQ();function SQ(e,A,t){let r=cl(e,A,t),n=kQ.spawn(r.command,r.args,r.options);return gl.hookChildProcess(n,r),n}function qb(e,A,t){let r=cl(e,A,t),n=kQ.spawnSync(r.command,r.args,r.options);return n.error=n.error||gl.verifyENOENTSync(n.status,r),n}Qn.exports=SQ;Qn.exports.spawn=SQ;Qn.exports.sync=qb;Qn.exports._parse=cl;Qn.exports._enoent=gl});var xQ=Q((PV,NQ)=>{"use strict";NQ.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 TQ=Q((GV,Ki)=>{"use strict";var ji=require("path"),LQ=rl(),UQ=e=>{e={cwd:process.cwd(),path:process.env[LQ()],execPath:process.execPath,...e};let A,t=ji.resolve(e.cwd),r=[];for(;A!==t;)r.push(ji.join(t,"node_modules/.bin")),A=t,t=ji.resolve(t,"..");let n=ji.resolve(e.cwd,e.execPath,"..");return r.push(n),r.concat(e.path).join(ji.delimiter)};Ki.exports=UQ;Ki.exports.default=UQ;Ki.exports.env=e=>{e={env:process.env,...e};let A={...e.env},t=LQ({env:A});return e.path=A[t],A[t]=Ki.exports(e),A}});var vQ=Q((JV,ll)=>{"use strict";var MQ=(e,A)=>{for(let t of Reflect.ownKeys(A))Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(A,t));return e};ll.exports=MQ;ll.exports.default=MQ});var GQ=Q((YV,_o)=>{"use strict";var Ob=vQ(),Wo=new WeakMap,PQ=(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(Wo.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 Ob(i,e),Wo.set(i,r),i};_o.exports=PQ;_o.exports.default=PQ;_o.exports.callCount=e=>{if(!Wo.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Wo.get(e)}});var JQ=Q(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.SIGNALS=void 0;var Hb=[{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"}];jo.SIGNALS=Hb});var ul=Q(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.SIGRTMAX=Cn.getRealtimeSignals=void 0;var Wb=function(){let e=VQ-YQ+1;return Array.from({length:e},_b)};Cn.getRealtimeSignals=Wb;var _b=function(e,A){return{name:`SIGRT${A+1}`,number:YQ+A,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},YQ=34,VQ=64;Cn.SIGRTMAX=VQ});var qQ=Q(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.getSignals=void 0;var jb=require("os"),Kb=JQ(),Zb=ul(),Xb=function(){let e=(0,Zb.getRealtimeSignals)();return[...Kb.SIGNALS,...e].map(zb)};Ko.getSignals=Xb;var zb=function({name:e,number:A,description:t,action:r,forced:n=!1,standard:i}){let{signals:{[e]:s}}=jb.constants,o=s!==void 0;return{name:e,number:o?s:A,description:t,supported:o,action:r,forced:n,standard:i}}});var HQ=Q(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.signalsByNumber=fn.signalsByName=void 0;var $b=require("os"),OQ=qQ(),ek=ul(),Ak=function(){return(0,OQ.getSignals)().reduce(tk,{})},tk=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}}},rk=Ak();fn.signalsByName=rk;var nk=function(){let e=(0,OQ.getSignals)(),A=ek.SIGRTMAX+1,t=Array.from({length:A},(r,n)=>ik(n,e));return Object.assign({},...t)},ik=function(e,A){let t=sk(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}}},sk=function(e,A){let t=A.find(({name:r})=>$b.constants.signals[r]===e);return t!==void 0?t:A.find(r=>r.number===e)},ok=nk();fn.signalsByNumber=ok});var _Q=Q((WV,WQ)=>{"use strict";var{signalsByName:ak}=HQ(),ck=({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",gk=({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:ak[n].description,E=r&&r.code,d=`Command ${ck({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};WQ.exports=gk});var KQ=Q((_V,El)=>{"use strict";var Zo=["stdin","stdout","stderr"],lk=e=>Zo.some(A=>e[A]!==void 0),jQ=e=>{if(!e)return;let{stdio:A}=e;if(A===void 0)return Zo.map(r=>e[r]);if(lk(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])};El.exports=jQ;El.exports.node=e=>{let A=jQ(e);return A==="ipc"?"ipc":A===void 0||typeof A=="string"?[A,A,A,"ipc"]:A.includes("ipc")?A:[...A,"ipc"]}});var ZQ=Q((jV,Xo)=>{"use strict";Xo.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Xo.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Xo.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var AC=Q((KV,pn)=>{"use strict";var we=global.process,Ur=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"};Ur(we)?(XQ=require("assert"),In=ZQ(),zQ=/^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),pn.exports=function(e,A){if(!Ur(global.process))return function(){};XQ.equal(typeof e,"function","a callback must be provided for exit handler"),Bn===!1&&hl();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&&zo()};return Ve.on(t,e),r},zo=function(){!Bn||!Ur(global.process)||(Bn=!1,In.forEach(function(A){try{we.removeListener(A,$o[A])}catch{}}),we.emit=ea,we.reallyExit=dl,Ve.count-=1)},pn.exports.unload=zo,Tr=function(A,t,r){Ve.emitted[A]||(Ve.emitted[A]=!0,Ve.emit(A,t,r))},$o={},In.forEach(function(e){$o[e]=function(){if(Ur(global.process)){var t=we.listeners(e);t.length===Ve.count&&(zo(),Tr("exit",null,e),Tr("afterexit",null,e),zQ&&e==="SIGHUP"&&(e="SIGINT"),we.kill(we.pid,e))}}}),pn.exports.signals=function(){return In},Bn=!1,hl=function(){Bn||!Ur(global.process)||(Bn=!0,Ve.count+=1,In=In.filter(function(A){try{return we.on(A,$o[A]),!0}catch{return!1}}),we.emit=eC,we.reallyExit=$Q)},pn.exports.load=hl,dl=we.reallyExit,$Q=function(A){Ur(global.process)&&(we.exitCode=A||0,Tr("exit",we.exitCode,null),Tr("afterexit",we.exitCode,null),dl.call(we,we.exitCode))},ea=we.emit,eC=function(A,t){if(A==="exit"&&Ur(global.process)){t!==void 0&&(we.exitCode=t);var r=ea.apply(this,arguments);return Tr("exit",we.exitCode,null),Tr("afterexit",we.exitCode,null),r}else return ea.apply(this,arguments)}):pn.exports=function(){return function(){}};var XQ,In,zQ,Zi,Ve,zo,Tr,$o,Bn,hl,dl,$Q,ea,eC});var rC=Q((ZV,tC)=>{"use strict";var uk=require("os"),Ek=AC(),hk=1e3*5,dk=(e,A="SIGTERM",t={})=>{let r=e(A);return Qk(e,A,t,r),r},Qk=(e,A,t,r)=>{if(!Ck(A,t,r))return;let n=Ik(t),i=setTimeout(()=>{e("SIGKILL")},n);i.unref&&i.unref()},Ck=(e,{forceKillAfterTimeout:A},t)=>fk(e)&&A!==!1&&t,fk=e=>e===uk.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Ik=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return hk;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},Bk=(e,A)=>{e.kill()&&(A.isCanceled=!0)},pk=(e,A,t)=>{e.kill(A),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:A}))},mk=(e,{timeout:A,killSignal:t="SIGTERM"},r)=>{if(A===0||A===void 0)return r;let n,i=new Promise((o,a)=>{n=setTimeout(()=>{pk(e,t,a)},A)}),s=r.finally(()=>{clearTimeout(n)});return Promise.race([i,s])},yk=({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})`)},wk=async(e,{cleanup:A,detached:t},r)=>{if(!A||t)return r;let n=Ek(()=>{e.kill()});return r.finally(()=>{n()})};tC.exports={spawnedKill:dk,spawnedCancel:Bk,setupTimeout:mk,validateTimeout:yk,setExitHandler:wk}});var iC=Q((XV,nC)=>{"use strict";var gt=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";gt.writable=e=>gt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";gt.readable=e=>gt(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";gt.duplex=e=>gt.writable(e)&>.readable(e);gt.transform=e=>gt.duplex(e)&&typeof e._transform=="function";nC.exports=gt});var oC=Q((zV,sC)=>{"use strict";var{PassThrough:Rk}=require("stream");sC.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 Rk({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 Cl=Q(($V,Xi)=>{"use strict";var{constants:Dk}=require("buffer"),bk=require("stream"),{promisify:kk}=require("util"),Sk=oC(),Fk=kk(bk.pipeline),Aa=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Ql(e,A){if(!e)throw new Error("Expected a stream");A={maxBuffer:1/0,...A};let{maxBuffer:t}=A,r=Sk(A);return await new Promise((n,i)=>{let s=o=>{o&&r.getBufferedLength()<=Dk.MAX_LENGTH&&(o.bufferedData=r.getBufferedValue()),i(o)};(async()=>{try{await Fk(e,r),n()}catch(o){s(o)}})(),r.on("data",()=>{r.getBufferedLength()>t&&s(new Aa)})}),r.getBufferedValue()}Xi.exports=Ql;Xi.exports.buffer=(e,A)=>Ql(e,{...A,encoding:"buffer"});Xi.exports.array=(e,A)=>Ql(e,{...A,array:!0});Xi.exports.MaxBufferError=Aa});var cC=Q((eq,aC)=>{"use strict";var{PassThrough:Nk}=require("stream");aC.exports=function(){var e=[],A=new Nk({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 EC=Q((Aq,uC)=>{"use strict";var lC=iC(),gC=Cl(),xk=cC(),Lk=(e,A)=>{A===void 0||e.stdin===void 0||(lC(A)?A.pipe(e.stdin):e.stdin.end(A))},Uk=(e,{all:A})=>{if(!A||!e.stdout&&!e.stderr)return;let t=xk();return e.stdout&&t.add(e.stdout),e.stderr&&t.add(e.stderr),t},fl=async(e,A)=>{if(e){e.destroy();try{return await A}catch(t){return t.bufferedData}}},Il=(e,{encoding:A,buffer:t,maxBuffer:r})=>{if(!(!e||!t))return A?gC(e,{encoding:A,maxBuffer:r}):gC.buffer(e,{maxBuffer:r})},Tk=async({stdout:e,stderr:A,all:t},{encoding:r,buffer:n,maxBuffer:i},s)=>{let o=Il(e,{encoding:r,buffer:n,maxBuffer:i}),a=Il(A,{encoding:r,buffer:n,maxBuffer:i}),c=Il(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},fl(e,o),fl(A,a),fl(t,c)])}},Mk=({input:e})=>{if(lC(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};uC.exports={handleInput:Lk,makeAllStream:Uk,getSpawnedResult:Tk,validateInputSync:Mk}});var dC=Q((tq,hC)=>{"use strict";var vk=(async()=>{})().constructor.prototype,Pk=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(vk,e)]),Gk=(e,A)=>{for(let[t,r]of Pk){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},Jk=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)})});hC.exports={mergePromise:Gk,getSpawnedPromise:Jk}});var fC=Q((rq,CC)=>{"use strict";var QC=(e,A=[])=>Array.isArray(A)?[e,...A]:[e],Yk=/^[\w.-]+$/,Vk=/"/g,qk=e=>typeof e!="string"||Yk.test(e)?e:`"${e.replace(Vk,'\\"')}"`,Ok=(e,A)=>QC(e,A).join(" "),Hk=(e,A)=>QC(e,A).map(t=>qk(t)).join(" "),Wk=/ +/g,_k=e=>{let A=[];for(let t of e.trim().split(Wk)){let r=A[A.length-1];r&&r.endsWith("\\")?A[A.length-1]=`${r.slice(0,-1)} ${t}`:A.push(t)}return A};CC.exports={joinCommand:Ok,getEscapedCommand:Hk,parseCommand:_k}});var RC=Q((nq,mn)=>{"use strict";var jk=require("path"),Bl=require("child_process"),Kk=FQ(),Zk=xQ(),Xk=TQ(),zk=GQ(),ta=_Q(),BC=KQ(),{spawnedKill:$k,spawnedCancel:eS,setupTimeout:AS,validateTimeout:tS,setExitHandler:rS}=rC(),{handleInput:nS,getSpawnedResult:iS,makeAllStream:sS,validateInputSync:oS}=EC(),{mergePromise:IC,getSpawnedPromise:aS}=dC(),{joinCommand:pC,parseCommand:mC,getEscapedCommand:yC}=fC(),cS=1e3*1e3*100,gS=({env:e,extendEnv:A,preferLocal:t,localDir:r,execPath:n})=>{let i=A?{...process.env,...e}:e;return t?Xk.env({env:i,cwd:r,execPath:n}):i},wC=(e,A,t={})=>{let r=Kk._parse(e,A,t);return e=r.command,A=r.args,t=r.options,t={maxBuffer:cS,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=gS(t),t.stdio=BC(t),process.platform==="win32"&&jk.basename(e,".exe")==="cmd"&&A.unshift("/q"),{file:e,args:A,options:t,parsed:r}},zi=(e,A,t)=>typeof A!="string"&&!Buffer.isBuffer(A)?t===void 0?void 0:"":e.stripFinalNewline?Zk(A):A,ra=(e,A,t)=>{let r=wC(e,A,t),n=pC(e,A),i=yC(e,A);tS(r.options);let s;try{s=Bl.spawn(r.file,r.args,r.options)}catch(E){let h=new Bl.ChildProcess,d=Promise.reject(ta({error:E,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return IC(h,d)}let o=aS(s),a=AS(s,r.options,o),c=rS(s,r.options,a),g={isCanceled:!1};s.kill=$k.bind(null,s.kill.bind(s)),s.cancel=eS.bind(null,s,g);let u=zk(async()=>{let[{error:E,exitCode:h,signal:d,timedOut:C},I,p,w]=await iS(s,r.options,c),m=zi(r.options,I),K=zi(r.options,p),H=zi(r.options,w);if(E||h!==0||d!==null){let ne=ta({error:E,exitCode:h,signal:d,stdout:m,stderr:K,all:H,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:m,stderr:K,all:H,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return nS(s,r.options.input),s.all=sS(s,r.options),IC(s,u)};mn.exports=ra;mn.exports.sync=(e,A,t)=>{let r=wC(e,A,t),n=pC(e,A),i=yC(e,A);oS(r.options);let s;try{s=Bl.spawnSync(r.file,r.args,r.options)}catch(c){throw ta({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let o=zi(r.options,s.stdout,s.error),a=zi(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let c=ta({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}};mn.exports.command=(e,A)=>{let[t,...r]=mC(e);return ra(t,r,A)};mn.exports.commandSync=(e,A)=>{let[t,...r]=mC(e);return ra.sync(t,r,A)};mn.exports.node=(e,A,t={})=>{A&&!Array.isArray(A)&&typeof A=="object"&&(t=A,A=[]);let r=BC.node(t),n=process.execArgv.filter(o=>!o.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=n}=t;return ra(i,[...s,e,...Array.isArray(A)?A:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var pl=Q((lq,lS)=>{lS.exports={name:"@prisma/engines-version",version:"5.23.0-11.90c6eb338aab4ebc379a3dfb6d0130b1535db96c",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"90c6eb338aab4ebc379a3dfb6d0130b1535db96c"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var ml=Q(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.enginesVersion=void 0;na.enginesVersion=pl().prisma.enginesVersion});var bC=Q((Eq,DC)=>{"use strict";function GA(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))}DC.exports=GA;GA.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};GA.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};GA.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};GA.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)};GA.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};GA.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};GA.prototype.start=GA.prototype.try;GA.prototype.errors=function(){return this._errors};GA.prototype.attempts=function(){return this._attempts};GA.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 kC=Q(Mr=>{"use strict";var uS=bC();Mr.operation=function(e){var A=Mr.timeouts(e);return new uS(A,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Mr.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};Mr.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};Mr.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=Mr.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 FC=Q((dq,SC)=>{"use strict";SC.exports=kC()});var xC=Q((Qq,sa)=>{"use strict";var ES=FC(),hS=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],ia=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}},dS=(e,A,t)=>{let r=t.retries-(A-1);return e.attemptNumber=A,e.retriesLeft=r,e},QS=e=>hS.includes(e),NC=(e,A)=>new Promise((t,r)=>{A={onFailedAttempt:()=>{},retries:10,...A};let n=ES.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 ia)n.stop(),r(s.originalError);else if(s instanceof TypeError&&!QS(s.message))n.stop(),r(s);else{dS(s,i,A);try{await A.onFailedAttempt(s)}catch(o){r(o);return}n.retry(s)||r(n.mainError())}}})});sa.exports=NC;sa.exports.default=NC;sa.exports.AbortError=ia});var TC=Q((Fq,IS)=>{IS.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",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","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var vC=Q((Nq,aa)=>{"use strict";var BS=require("fs"),MC=require("path"),pS=require("os"),mS=TC(),yS=mS.version,wS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function RS(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};WQ.exports=gk});var KQ=Q((_V,El)=>{"use strict";var Zo=["stdin","stdout","stderr"],lk=e=>Zo.some(A=>e[A]!==void 0),jQ=e=>{if(!e)return;let{stdio:A}=e;if(A===void 0)return Zo.map(r=>e[r]);if(lk(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])};El.exports=jQ;El.exports.node=e=>{let A=jQ(e);return A==="ipc"?"ipc":A===void 0||typeof A=="string"?[A,A,A,"ipc"]:A.includes("ipc")?A:[...A,"ipc"]}});var ZQ=Q((jV,Xo)=>{"use strict";Xo.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Xo.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Xo.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var AC=Q((KV,pn)=>{"use strict";var we=global.process,Ur=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"};Ur(we)?(XQ=require("assert"),In=ZQ(),zQ=/^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),pn.exports=function(e,A){if(!Ur(global.process))return function(){};XQ.equal(typeof e,"function","a callback must be provided for exit handler"),Bn===!1&&hl();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&&zo()};return Ve.on(t,e),r},zo=function(){!Bn||!Ur(global.process)||(Bn=!1,In.forEach(function(A){try{we.removeListener(A,$o[A])}catch{}}),we.emit=ea,we.reallyExit=dl,Ve.count-=1)},pn.exports.unload=zo,Tr=function(A,t,r){Ve.emitted[A]||(Ve.emitted[A]=!0,Ve.emit(A,t,r))},$o={},In.forEach(function(e){$o[e]=function(){if(Ur(global.process)){var t=we.listeners(e);t.length===Ve.count&&(zo(),Tr("exit",null,e),Tr("afterexit",null,e),zQ&&e==="SIGHUP"&&(e="SIGINT"),we.kill(we.pid,e))}}}),pn.exports.signals=function(){return In},Bn=!1,hl=function(){Bn||!Ur(global.process)||(Bn=!0,Ve.count+=1,In=In.filter(function(A){try{return we.on(A,$o[A]),!0}catch{return!1}}),we.emit=eC,we.reallyExit=$Q)},pn.exports.load=hl,dl=we.reallyExit,$Q=function(A){Ur(global.process)&&(we.exitCode=A||0,Tr("exit",we.exitCode,null),Tr("afterexit",we.exitCode,null),dl.call(we,we.exitCode))},ea=we.emit,eC=function(A,t){if(A==="exit"&&Ur(global.process)){t!==void 0&&(we.exitCode=t);var r=ea.apply(this,arguments);return Tr("exit",we.exitCode,null),Tr("afterexit",we.exitCode,null),r}else return ea.apply(this,arguments)}):pn.exports=function(){return function(){}};var XQ,In,zQ,Zi,Ve,zo,Tr,$o,Bn,hl,dl,$Q,ea,eC});var rC=Q((ZV,tC)=>{"use strict";var uk=require("os"),Ek=AC(),hk=1e3*5,dk=(e,A="SIGTERM",t={})=>{let r=e(A);return Qk(e,A,t,r),r},Qk=(e,A,t,r)=>{if(!Ck(A,t,r))return;let n=Ik(t),i=setTimeout(()=>{e("SIGKILL")},n);i.unref&&i.unref()},Ck=(e,{forceKillAfterTimeout:A},t)=>fk(e)&&A!==!1&&t,fk=e=>e===uk.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Ik=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return hk;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},Bk=(e,A)=>{e.kill()&&(A.isCanceled=!0)},pk=(e,A,t)=>{e.kill(A),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:A}))},mk=(e,{timeout:A,killSignal:t="SIGTERM"},r)=>{if(A===0||A===void 0)return r;let n,i=new Promise((o,a)=>{n=setTimeout(()=>{pk(e,t,a)},A)}),s=r.finally(()=>{clearTimeout(n)});return Promise.race([i,s])},yk=({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})`)},wk=async(e,{cleanup:A,detached:t},r)=>{if(!A||t)return r;let n=Ek(()=>{e.kill()});return r.finally(()=>{n()})};tC.exports={spawnedKill:dk,spawnedCancel:Bk,setupTimeout:mk,validateTimeout:yk,setExitHandler:wk}});var iC=Q((XV,nC)=>{"use strict";var gt=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";gt.writable=e=>gt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";gt.readable=e=>gt(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";gt.duplex=e=>gt.writable(e)&>.readable(e);gt.transform=e=>gt.duplex(e)&&typeof e._transform=="function";nC.exports=gt});var oC=Q((zV,sC)=>{"use strict";var{PassThrough:Rk}=require("stream");sC.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 Rk({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 Cl=Q(($V,Xi)=>{"use strict";var{constants:Dk}=require("buffer"),bk=require("stream"),{promisify:kk}=require("util"),Sk=oC(),Fk=kk(bk.pipeline),Aa=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Ql(e,A){if(!e)throw new Error("Expected a stream");A={maxBuffer:1/0,...A};let{maxBuffer:t}=A,r=Sk(A);return await new Promise((n,i)=>{let s=o=>{o&&r.getBufferedLength()<=Dk.MAX_LENGTH&&(o.bufferedData=r.getBufferedValue()),i(o)};(async()=>{try{await Fk(e,r),n()}catch(o){s(o)}})(),r.on("data",()=>{r.getBufferedLength()>t&&s(new Aa)})}),r.getBufferedValue()}Xi.exports=Ql;Xi.exports.buffer=(e,A)=>Ql(e,{...A,encoding:"buffer"});Xi.exports.array=(e,A)=>Ql(e,{...A,array:!0});Xi.exports.MaxBufferError=Aa});var cC=Q((eq,aC)=>{"use strict";var{PassThrough:Nk}=require("stream");aC.exports=function(){var e=[],A=new Nk({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 EC=Q((Aq,uC)=>{"use strict";var lC=iC(),gC=Cl(),xk=cC(),Lk=(e,A)=>{A===void 0||e.stdin===void 0||(lC(A)?A.pipe(e.stdin):e.stdin.end(A))},Uk=(e,{all:A})=>{if(!A||!e.stdout&&!e.stderr)return;let t=xk();return e.stdout&&t.add(e.stdout),e.stderr&&t.add(e.stderr),t},fl=async(e,A)=>{if(e){e.destroy();try{return await A}catch(t){return t.bufferedData}}},Il=(e,{encoding:A,buffer:t,maxBuffer:r})=>{if(!(!e||!t))return A?gC(e,{encoding:A,maxBuffer:r}):gC.buffer(e,{maxBuffer:r})},Tk=async({stdout:e,stderr:A,all:t},{encoding:r,buffer:n,maxBuffer:i},s)=>{let o=Il(e,{encoding:r,buffer:n,maxBuffer:i}),a=Il(A,{encoding:r,buffer:n,maxBuffer:i}),c=Il(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},fl(e,o),fl(A,a),fl(t,c)])}},Mk=({input:e})=>{if(lC(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};uC.exports={handleInput:Lk,makeAllStream:Uk,getSpawnedResult:Tk,validateInputSync:Mk}});var dC=Q((tq,hC)=>{"use strict";var vk=(async()=>{})().constructor.prototype,Pk=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(vk,e)]),Gk=(e,A)=>{for(let[t,r]of Pk){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},Jk=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)})});hC.exports={mergePromise:Gk,getSpawnedPromise:Jk}});var fC=Q((rq,CC)=>{"use strict";var QC=(e,A=[])=>Array.isArray(A)?[e,...A]:[e],Yk=/^[\w.-]+$/,Vk=/"/g,qk=e=>typeof e!="string"||Yk.test(e)?e:`"${e.replace(Vk,'\\"')}"`,Ok=(e,A)=>QC(e,A).join(" "),Hk=(e,A)=>QC(e,A).map(t=>qk(t)).join(" "),Wk=/ +/g,_k=e=>{let A=[];for(let t of e.trim().split(Wk)){let r=A[A.length-1];r&&r.endsWith("\\")?A[A.length-1]=`${r.slice(0,-1)} ${t}`:A.push(t)}return A};CC.exports={joinCommand:Ok,getEscapedCommand:Hk,parseCommand:_k}});var RC=Q((nq,mn)=>{"use strict";var jk=require("path"),Bl=require("child_process"),Kk=FQ(),Zk=xQ(),Xk=TQ(),zk=GQ(),ta=_Q(),BC=KQ(),{spawnedKill:$k,spawnedCancel:eS,setupTimeout:AS,validateTimeout:tS,setExitHandler:rS}=rC(),{handleInput:nS,getSpawnedResult:iS,makeAllStream:sS,validateInputSync:oS}=EC(),{mergePromise:IC,getSpawnedPromise:aS}=dC(),{joinCommand:pC,parseCommand:mC,getEscapedCommand:yC}=fC(),cS=1e3*1e3*100,gS=({env:e,extendEnv:A,preferLocal:t,localDir:r,execPath:n})=>{let i=A?{...process.env,...e}:e;return t?Xk.env({env:i,cwd:r,execPath:n}):i},wC=(e,A,t={})=>{let r=Kk._parse(e,A,t);return e=r.command,A=r.args,t=r.options,t={maxBuffer:cS,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=gS(t),t.stdio=BC(t),process.platform==="win32"&&jk.basename(e,".exe")==="cmd"&&A.unshift("/q"),{file:e,args:A,options:t,parsed:r}},zi=(e,A,t)=>typeof A!="string"&&!Buffer.isBuffer(A)?t===void 0?void 0:"":e.stripFinalNewline?Zk(A):A,ra=(e,A,t)=>{let r=wC(e,A,t),n=pC(e,A),i=yC(e,A);tS(r.options);let s;try{s=Bl.spawn(r.file,r.args,r.options)}catch(E){let h=new Bl.ChildProcess,d=Promise.reject(ta({error:E,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return IC(h,d)}let o=aS(s),a=AS(s,r.options,o),c=rS(s,r.options,a),g={isCanceled:!1};s.kill=$k.bind(null,s.kill.bind(s)),s.cancel=eS.bind(null,s,g);let u=zk(async()=>{let[{error:E,exitCode:h,signal:d,timedOut:C},I,p,w]=await iS(s,r.options,c),m=zi(r.options,I),K=zi(r.options,p),H=zi(r.options,w);if(E||h!==0||d!==null){let ne=ta({error:E,exitCode:h,signal:d,stdout:m,stderr:K,all:H,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:m,stderr:K,all:H,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return nS(s,r.options.input),s.all=sS(s,r.options),IC(s,u)};mn.exports=ra;mn.exports.sync=(e,A,t)=>{let r=wC(e,A,t),n=pC(e,A),i=yC(e,A);oS(r.options);let s;try{s=Bl.spawnSync(r.file,r.args,r.options)}catch(c){throw ta({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let o=zi(r.options,s.stdout,s.error),a=zi(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let c=ta({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}};mn.exports.command=(e,A)=>{let[t,...r]=mC(e);return ra(t,r,A)};mn.exports.commandSync=(e,A)=>{let[t,...r]=mC(e);return ra.sync(t,r,A)};mn.exports.node=(e,A,t={})=>{A&&!Array.isArray(A)&&typeof A=="object"&&(t=A,A=[]);let r=BC.node(t),n=process.execArgv.filter(o=>!o.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=n}=t;return ra(i,[...s,e,...Array.isArray(A)?A:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var pl=Q((lq,lS)=>{lS.exports={name:"@prisma/engines-version",version:"5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var ml=Q(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.enginesVersion=void 0;na.enginesVersion=pl().prisma.enginesVersion});var bC=Q((Eq,DC)=>{"use strict";function GA(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))}DC.exports=GA;GA.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};GA.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};GA.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};GA.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)};GA.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};GA.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};GA.prototype.start=GA.prototype.try;GA.prototype.errors=function(){return this._errors};GA.prototype.attempts=function(){return this._attempts};GA.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 kC=Q(Mr=>{"use strict";var uS=bC();Mr.operation=function(e){var A=Mr.timeouts(e);return new uS(A,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Mr.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};Mr.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};Mr.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=Mr.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 FC=Q((dq,SC)=>{"use strict";SC.exports=kC()});var xC=Q((Qq,sa)=>{"use strict";var ES=FC(),hS=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],ia=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}},dS=(e,A,t)=>{let r=t.retries-(A-1);return e.attemptNumber=A,e.retriesLeft=r,e},QS=e=>hS.includes(e),NC=(e,A)=>new Promise((t,r)=>{A={onFailedAttempt:()=>{},retries:10,...A};let n=ES.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 ia)n.stop(),r(s.originalError);else if(s instanceof TypeError&&!QS(s.message))n.stop(),r(s);else{dS(s,i,A);try{await A.onFailedAttempt(s)}catch(o){r(o);return}n.retry(s)||r(n.mainError())}}})});sa.exports=NC;sa.exports.default=NC;sa.exports.AbortError=ia});var TC=Q((Fq,IS)=>{IS.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",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","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var vC=Q((Nq,aa)=>{"use strict";var BS=require("fs"),MC=require("path"),pS=require("os"),mS=TC(),yS=mS.version,wS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function RS(e){let A={},t=e.toString();t=t.replace(/\r\n?/mg,`
|
|
5
5
|
`);let r;for(;(r=wS.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 Rl(e){console.log(`[dotenv@${yS}][DEBUG] ${e}`)}function DS(e){return e[0]==="~"?MC.join(pS.homedir(),e.slice(1)):e}function bS(e){let A=MC.resolve(process.cwd(),".env"),t="utf8",r=!!(e&&e.debug),n=!!(e&&e.override);e&&(e.path!=null&&(A=DS(e.path)),e.encoding!=null&&(t=e.encoding));try{let i=oa.parse(BS.readFileSync(A,{encoding:t}));return Object.keys(i).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(n===!0&&(process.env[s]=i[s]),r&&Rl(n===!0?`"${s}" is already defined in \`process.env\` and WAS overwritten`:`"${s}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[s]=i[s]}),{parsed:i}}catch(i){return r&&Rl(`Failed to load ${A} ${i.message}`),{error:i}}}var oa={config:bS,parse:RS};aa.exports.config=oa.config;aa.exports.parse=oa.parse;aa.exports=oa});var qC=Q((Pq,VC)=>{"use strict";VC.exports=e=>{let A=e.match(/^[ \t]*(?=\S)/gm);return A?A.reduce((t,r)=>Math.min(t,r.length),1/0):0}});var HC=Q((Gq,OC)=>{"use strict";var NS=qC();OC.exports=e=>{let A=NS(e);if(A===0)return e;let t=new RegExp(`^[ \\t]{${A}}`,"gm");return e.replace(t,"")}});var Sl=Q((Hq,WC)=>{"use strict";WC.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 ZC=Q((jq,KC)=>{"use strict";KC.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 Ll=Q((Kq,XC)=>{"use strict";var GS=ZC();XC.exports=e=>typeof e=="string"?e.replace(GS(),""):e});var $C=Q((zq,la)=>{"use strict";la.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()};la.exports.default=la.exports});var ql=Q((sH,mf)=>{"use strict";mf.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,w,m=[];for(a=0;a<n;a++)m.push(a+1),m.push(A.charCodeAt(s+a));for(var K=m.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)),w=t.charCodeAt(s+(u=o+3)),E=o+=4,a=0;a<K;a+=2)h=m[a],d=m[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,w,d),m[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<K;a+=2)h=m[a],m[a]=E=e(h,c,E,C,m[a+1]),c=h;return E}}()});var de=Q((S4,qI)=>{"use strict";qI.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((F4,OI)=>{"use strict";var xe=class extends Error{constructor(A){super(A),this.name="UndiciError",this.code="UND_ERR"}},uu=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"}},Eu=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"}},hu=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"}},du=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"}},Qu=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}},Cu=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"}},fu=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"}},Iu=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"}},Bu=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"}},pu=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"}},mu=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"}},yu=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"}},wu=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"}},Ru=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}},Ha=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"}},Du=class extends xe{constructor(A){super(A),Error.captureStackTrace(this,Ha),this.name="MissingUpstreamError",this.message=A||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}},bu=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}},ku=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"}},Su=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}};OI.exports={HTTPParserError:bu,UndiciError:xe,HeadersTimeoutError:Eu,HeadersOverflowError:hu,BodyTimeoutError:du,RequestContentLengthMismatchError:pu,ConnectTimeoutError:uu,ResponseStatusCodeError:Qu,InvalidArgumentError:Cu,InvalidReturnValueError:fu,RequestAbortedError:Iu,ClientDestroyedError:yu,ClientClosedError:wu,InformationalError:Bu,SocketError:Ru,NotSupportedError:Ha,ResponseContentLengthMismatchError:mu,BalancedPoolMissingUpstreamError:Du,ResponseExceededMaxSizeError:ku,RequestRetryError:Su}});var WI=Q((N4,HI)=>{"use strict";var Wa={},Fu=["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<Fu.length;++e){let A=Fu[e],t=A.toLowerCase();Wa[A]=Wa[t]=t}Object.setPrototypeOf(Wa,null);HI.exports={wellknownHeaderNames:Fu,headerNameLowerCasedRecord:Wa}});var W=Q((x4,rB)=>{"use strict";var ZI=require("assert"),{kDestroyed:XI,kBodyUsed:_I}=de(),{IncomingMessage:wx}=require("http"),qn=require("stream"),Rx=require("net"),{InvalidArgumentError:_e}=le(),{Blob:jI}=require("buffer"),_a=require("util"),{stringify:Dx}=require("querystring"),{headerNameLowerCasedRecord:bx}=WI(),[Nu,KI]=process.versions.node.split(".").map(e=>Number(e));function kx(){}function xu(e){return e&&typeof e=="object"&&typeof e.pipe=="function"&&typeof e.on=="function"}function zI(e){return jI&&e instanceof jI||e&&typeof e=="object"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Sx(e,A){if(e.includes("?")||e.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let t=Dx(A);return t&&(e+="?"+t),e}function $I(e){if(typeof e=="string"){if(e=new URL(e),!/^https?:/.test(e.origin||e.protocol))throw new _e("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!="object")throw new _e("Invalid URL: The URL argument must be a non-null object.");if(!/^https?:/.test(e.origin||e.protocol))throw new _e("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 _e("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 _e("Invalid URL path: the path must be a string or null/undefined.");if(e.pathname!=null&&typeof e.pathname!="string")throw new _e("Invalid URL pathname: the pathname must be a string or null/undefined.");if(e.hostname!=null&&typeof e.hostname!="string")throw new _e("Invalid URL hostname: the hostname must be a string or null/undefined.");if(e.origin!=null&&typeof e.origin!="string")throw new _e("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 Fx(e){if(e=$I(e),e.pathname!=="/"||e.search||e.hash)throw new _e("invalid url");return e}function Nx(e){if(e[0]==="["){let t=e.indexOf("]");return ZI(t!==-1),e.substring(1,t)}let A=e.indexOf(":");return A===-1?e:e.substring(0,A)}function xx(e){if(!e)return null;ZI.strictEqual(typeof e,"string");let A=Nx(e);return Rx.isIP(A)?"":A}function Lx(e){return JSON.parse(JSON.stringify(e))}function Ux(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}function Tx(e){return e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")}function Mx(e){if(e==null)return 0;if(xu(e)){let A=e._readableState;return A&&A.objectMode===!1&&A.ended===!0&&Number.isFinite(A.length)?A.length:null}else{if(zI(e))return e.size!=null?e.size:null;if(AB(e))return e.byteLength}return null}function Lu(e){return!e||!!(e.destroyed||e[XI])}function eB(e){let A=e&&e._readableState;return Lu(e)&&A&&!A.endEmitted}function vx(e,A){e==null||!xu(e)||Lu(e)||(typeof e.destroy=="function"?(Object.getPrototypeOf(e).constructor===wx&&(e.socket=null),e.destroy(A)):A&&process.nextTick((t,r)=>{t.emit("error",r)},e,A),e.destroyed!==!0&&(e[XI]=!0))}var Px=/timeout=(\d+)/;function Gx(e){let A=e.toString().match(Px);return A?parseInt(A[1],10)*1e3:null}function Jx(e){return bx[e]||e.toLowerCase()}function Yx(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 Vx(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 AB(e){return e instanceof Uint8Array||Buffer.isBuffer(e)}function qx(e,A,t){if(!e||typeof e!="object")throw new _e("handler must be an object");if(typeof e.onConnect!="function")throw new _e("invalid onConnect method");if(typeof e.onError!="function")throw new _e("invalid onError method");if(typeof e.onBodySent!="function"&&e.onBodySent!==void 0)throw new _e("invalid onBodySent method");if(t||A==="CONNECT"){if(typeof e.onUpgrade!="function")throw new _e("invalid onUpgrade method")}else{if(typeof e.onHeaders!="function")throw new _e("invalid onHeaders method");if(typeof e.onData!="function")throw new _e("invalid onData method");if(typeof e.onComplete!="function")throw new _e("invalid onComplete method")}}function Ox(e){return!!(e&&(qn.isDisturbed?qn.isDisturbed(e)||e[_I]:e[_I]||e.readableDidRead||e._readableState&&e._readableState.dataEmitted||eB(e)))}function Hx(e){return!!(e&&(qn.isErrored?qn.isErrored(e):/state: 'errored'/.test(_a.inspect(e))))}function Wx(e){return!!(e&&(qn.isReadable?qn.isReadable(e):/state: 'readable'/.test(_a.inspect(e))))}function _x(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*jx(e){for await(let A of e)yield Buffer.isBuffer(A)?A:Buffer.from(A)}var Ds;function Kx(e){if(Ds||(Ds=require("stream/web").ReadableStream),Ds.from)return Ds.from(jx(e));let A;return new Ds({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 Zx(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 Xx(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 zx(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 $x=!!String.prototype.toWellFormed;function eL(e){return $x?`${e}`.toWellFormed():_a.toUSVString?_a.toUSVString(e):`${e}`}function AL(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 tB=Object.create(null);tB.enumerable=!0;rB.exports={kEnumerableProperty:tB,nop:kx,isDisturbed:Ox,isErrored:Hx,isReadable:Wx,toUSVString:eL,isReadableAborted:eB,isBlobLike:zI,parseOrigin:Fx,parseURL:$I,getServerName:xx,isStream:xu,isIterable:Tx,isAsyncIterable:Ux,isDestroyed:Lu,headerNameToString:Jx,parseRawHeaders:Vx,parseHeaders:Yx,parseKeepAliveTimeout:Gx,destroy:vx,bodyLength:Mx,deepClone:Lx,ReadableStreamFrom:Kx,isBuffer:AB,validateHandler:qx,getSocketInfo:_x,isFormDataLike:Zx,buildURL:Sx,throwIfAborted:Xx,addAbortListener:zx,parseRangeHeader:AL,nodeMajor:Nu,nodeMinor:KI,nodeHasAutoSelectFamily:Nu>18||Nu===18&&KI>=13,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"]}});var sB=Q((L4,iB)=>{"use strict";var Uu=Date.now(),fr,Ir=[];function tL(){Uu=Date.now();let e=Ir.length,A=0;for(;A<e;){let t=Ir[A];t.state===0?t.state=Uu+t.delay:t.state>0&&Uu>=t.state&&(t.state=-1,t.callback(t.opaque)),t.state===-1?(t.state=-2,A!==e-1?Ir[A]=Ir.pop():Ir.pop(),e-=1):A+=1}Ir.length>0&&nB()}function nB(){fr&&fr.refresh?fr.refresh():(clearTimeout(fr),fr=setTimeout(tL,1e3),fr.unref&&fr.unref())}var ja=class{constructor(A,t,r){this.callback=A,this.delay=t,this.opaque=r,this.state=-2,this.refresh()}refresh(){this.state===-2&&(Ir.push(this),(!fr||Ir.length===1)&&nB()),this.state=0}clear(){this.state=-1}};iB.exports={setTimeout(e,A,t){return A<1e3?setTimeout(e,A,t):new ja(e,A,t)},clearTimeout(e){e instanceof ja?e.clear():clearTimeout(e)}}});var Tu=Q((U4,oB)=>{"use strict";var rL=require("events").EventEmitter,nL=require("util").inherits;function Jr(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}nL(Jr,rL);Jr.prototype.reset=function(){this._lookbehind_size=0,this.matches=0,this._bufpos=0};Jr.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};Jr.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};Jr.prototype._sbmh_lookup_char=function(e,A){return A<0?this._lookbehind[this._lookbehind_size+A]:e[A]};Jr.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};oB.exports=Jr});var gB=Q((T4,cB)=>{"use strict";var iL=require("util").inherits,aB=require("stream").Readable;function Mu(e){aB.call(this,e)}iL(Mu,aB);Mu.prototype._read=function(e){};cB.exports=Mu});var Ka=Q((M4,lB)=>{"use strict";lB.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 dB=Q((v4,hB)=>{"use strict";var EB=require("events").EventEmitter,sL=require("util").inherits,uB=Ka(),oL=Tu(),aL=Buffer.from(`\r
|
|
7
7
|
\r
|
|
@@ -170,7 +170,7 @@ You may have to run ${rr("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(Vn(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);tA(`Client Version: ${this.clientVersion}`),tA(`Engine Version: ${o}`),tA(`Active provider: ${this.activeProvider}`)}catch(o){tA(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&&(tA("Stopping Prisma engine"),this.startPromise&&(tA("Waiting for start promise"),await this.startPromise),tA("Done waiting for start promise"),this.child.exitCode===null?A=new Promise((t,r)=>{this.engineStopDeferred={resolve:t,reject:r}}):tA("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 gu("binary",this.config),t=await(0,NR.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=Ar.onHttpError(this.connection.post("/",o,s),a=>this.httpErrorHandler(a)),this.lastQuery=o;try{let{data:a}=await this.currentRequestPromise;if(a.errors)throw a.errors.length===1?hr(a.errors[0],this.clientVersion,this.config.activeProvider):new Me(JSON.stringify(a.errors),{clientVersion:this.clientVersion});return this.startCount>0&&(this.startCount=0),this.currentRequestPromise=void 0,{data:a}}catch(a){Qo("req - e",a);let{error:c,shouldRetry:g}=await this.handleRequestError(a);if(r<=kR&&g&&!n)return Qo("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=Jn(A,r);return this.lastQuery=JSON.stringify(a),this.currentRequestPromise=Ar.onHttpError(this.connection.post("/",this.lastQuery,s),c=>this.httpErrorHandler(c)),this.currentRequestPromise.then(({data:c})=>{let{batchResult:g}=c;if(Array.isArray(g))return g.map(l=>l.errors&&l.errors.length>0?hr(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l});throw hr(c.errors[0],this.clientVersion,this.config.activeProvider)}).catch(async c=>{let{error:g,shouldRetry:l}=await this.handleRequestError(c);if(l&&!i&&n<=kR)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});return(await Ar.onHttpError(this.connection.post("/transaction/start",n,t),s=>this.httpErrorHandler(s))).data}else A==="commit"?await Ar.onHttpError(this.connection.post(`/transaction/${r.id}/commit`,void 0,t),n=>this.httpErrorHandler(n)):A==="rollback"&&await Ar.onHttpError(this.connection.post(`/transaction/${r.id}/rollback`,void 0,t),n=>this.httpErrorHandler(n))}get hasMaxRestarts(){return this.startCount>=bR}throwAsyncErrorIfExists(A=!1){if(Qo("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(Vn(t)),this.clientVersion):new Me(this.getErrorMessageWithLink(Vn(t)),{clientVersion:this.clientVersion})}}getErrorMessageWithLink(A){return VI({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;throw new He(t.message,{code:t.error_code,clientVersion:this.clientVersion,meta:t.meta})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Co(e,A=!1){process.once(e,async()=>{for(let t of Tg)await t.emitExit(),t.kill(e);Tg.splice(0,Tg.length),A&&process.listenerCount(e)===0&&process.exit()})}var SR=!1;function mY(){SR||(Co("beforeExit"),Co("exit"),Co("SIGINT",!0),Co("SIGUSR2",!0),Co("SIGTERM",!0),SR=!0)}function yY(e){return new Promise(A=>{e.once("exit",A),e.kill()})}function Ui({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 Mg=class extends Error{constructor(A,t){super(A),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var wA=class extends Mg{constructor(A,t){super(A,t),this.isRetryable=t.isRetryable??!0}};function j(e,A){return{...e,isRetryable:A}}var Ti=class extends wA{constructor(t){super("This request must be retried",j(t,!0));this.name="ForcedRetryError";this.code="P5001"}};U(Ti,"ForcedRetryError");var gn=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="InvalidDatasourceError";this.code="P6001"}};U(gn,"InvalidDatasourceError");var ln=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="NotImplementedYetError";this.code="P5004"}};U(ln,"NotImplementedYetError");var Ce=class extends wA{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 un=class extends Ce{constructor(t){super("Schema needs to be uploaded",j(t,!0));this.name="SchemaMissingError";this.code="P5005"}};U(un,"SchemaMissingError");var od="This request could not be understood by the server",Io=class extends Ce{constructor(t,r,n){super(r||od,j(t,!1));this.name="BadRequestError";this.code="P5000";n&&(this.code=n)}};U(Io,"BadRequestError");var Bo=class extends Ce{constructor(t,r){super("Engine not started: healthcheck timeout",j(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=r}};U(Bo,"HealthcheckTimeoutError");var po=class extends Ce{constructor(t,r,n){super(r,j(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=n}};U(po,"EngineStartupError");var mo=class extends Ce{constructor(t){super("Engine version is not supported",j(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};U(mo,"EngineVersionNotSupportedError");var ad="Request timed out",yo=class extends Ce{constructor(t,r=ad){super(r,j(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};U(yo,"GatewayTimeoutError");var wY="Interactive transaction error",wo=class extends Ce{constructor(t,r=wY){super(r,j(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};U(wo,"InteractiveTransactionError");var RY="Request parameters are invalid",Ro=class extends Ce{constructor(t,r=RY){super(r,j(t,!1));this.name="InvalidRequestError";this.code="P5011"}};U(Ro,"InvalidRequestError");var cd="Requested resource does not exist",Do=class extends Ce{constructor(t,r=cd){super(r,j(t,!1));this.name="NotFoundError";this.code="P5003"}};U(Do,"NotFoundError");var gd="Unknown server error",Mi=class extends Ce{constructor(t,r,n){super(r||gd,j(t,!0));this.name="ServerError";this.code="P5006";this.logs=n}};U(Mi,"ServerError");var ld="Unauthorized, check your connection string",bo=class extends Ce{constructor(t,r=ld){super(r,j(t,!1));this.name="UnauthorizedError";this.code="P5007"}};U(bo,"UnauthorizedError");var ud="Usage exceeded, retry again later",ko=class extends Ce{constructor(t,r=ud){super(r,j(t,!0));this.name="UsageExceededError";this.code="P5008"}};U(ko,"UsageExceededError");async function DY(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 So(e,A){if(e.ok)return;let t={clientVersion:A,response:e},r=await DY(e);if(r.type==="QueryEngineError")throw new He(r.body.message,{code:r.body.error_code,clientVersion:A});if(r.type==="DataProxyError"){if(r.body==="InternalDataProxyError")throw new Mi(t,"Internal Data Proxy error");if("EngineNotStarted"in r.body){if(r.body.EngineNotStarted.reason==="SchemaMissing")return new un(t);if(r.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new mo(t);if("EngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,logs:i}=r.body.EngineNotStarted.reason.EngineStartupError;throw new po(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 Bo(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 wo(t,n[r.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in r.body)throw new Ro(t,r.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new bo(t,vi(ld,r));if(e.status===404)return new Do(t,vi(cd,r));if(e.status===429)throw new ko(t,vi(ud,r));if(e.status===504)throw new yo(t,vi(ad,r));if(e.status>=500)throw new Mi(t,vi(gd,r));if(e.status>=400)throw new Io(t,vi(od,r))}function vi(e,A){return A.type==="EmptyError"?e:`${e}: ${JSON.stringify(A)}`}function LR(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 tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function UR(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+=tr[s]+tr[o]+tr[a]+tr[c];return n==1?(g=A[i],s=(g&252)>>2,o=(g&3)<<4,t+=tr[s]+tr[o]+"=="):n==2&&(g=A[i]<<8|A[i+1],s=(g&64512)>>10,o=(g&1008)>>4,a=(g&15)<<2,t+=tr[s]+tr[o]+tr[a]+"="),t}function TR(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 bY(e){return e[0]*1e3+e[1]/1e6}function MR(e){return new Date(bY(e))}var vR={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.23.0-11.90c6eb338aab4ebc379a3dfb6d0130b1535db96c","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Fo=class extends wA{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(Vn(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);tA(`Client Version: ${this.clientVersion}`),tA(`Engine Version: ${o}`),tA(`Active provider: ${this.activeProvider}`)}catch(o){tA(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&&(tA("Stopping Prisma engine"),this.startPromise&&(tA("Waiting for start promise"),await this.startPromise),tA("Done waiting for start promise"),this.child.exitCode===null?A=new Promise((t,r)=>{this.engineStopDeferred={resolve:t,reject:r}}):tA("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 gu("binary",this.config),t=await(0,NR.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=Ar.onHttpError(this.connection.post("/",o,s),a=>this.httpErrorHandler(a)),this.lastQuery=o;try{let{data:a}=await this.currentRequestPromise;if(a.errors)throw a.errors.length===1?hr(a.errors[0],this.clientVersion,this.config.activeProvider):new Me(JSON.stringify(a.errors),{clientVersion:this.clientVersion});return this.startCount>0&&(this.startCount=0),this.currentRequestPromise=void 0,{data:a}}catch(a){Qo("req - e",a);let{error:c,shouldRetry:g}=await this.handleRequestError(a);if(r<=kR&&g&&!n)return Qo("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=Jn(A,r);return this.lastQuery=JSON.stringify(a),this.currentRequestPromise=Ar.onHttpError(this.connection.post("/",this.lastQuery,s),c=>this.httpErrorHandler(c)),this.currentRequestPromise.then(({data:c})=>{let{batchResult:g}=c;if(Array.isArray(g))return g.map(l=>l.errors&&l.errors.length>0?hr(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l});throw hr(c.errors[0],this.clientVersion,this.config.activeProvider)}).catch(async c=>{let{error:g,shouldRetry:l}=await this.handleRequestError(c);if(l&&!i&&n<=kR)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});return(await Ar.onHttpError(this.connection.post("/transaction/start",n,t),s=>this.httpErrorHandler(s))).data}else A==="commit"?await Ar.onHttpError(this.connection.post(`/transaction/${r.id}/commit`,void 0,t),n=>this.httpErrorHandler(n)):A==="rollback"&&await Ar.onHttpError(this.connection.post(`/transaction/${r.id}/rollback`,void 0,t),n=>this.httpErrorHandler(n))}get hasMaxRestarts(){return this.startCount>=bR}throwAsyncErrorIfExists(A=!1){if(Qo("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(Vn(t)),this.clientVersion):new Me(this.getErrorMessageWithLink(Vn(t)),{clientVersion:this.clientVersion})}}getErrorMessageWithLink(A){return VI({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;throw new He(t.message,{code:t.error_code,clientVersion:this.clientVersion,meta:t.meta})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Co(e,A=!1){process.once(e,async()=>{for(let t of Tg)await t.emitExit(),t.kill(e);Tg.splice(0,Tg.length),A&&process.listenerCount(e)===0&&process.exit()})}var SR=!1;function mY(){SR||(Co("beforeExit"),Co("exit"),Co("SIGINT",!0),Co("SIGUSR2",!0),Co("SIGTERM",!0),SR=!0)}function yY(e){return new Promise(A=>{e.once("exit",A),e.kill()})}function Ui({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 Mg=class extends Error{constructor(A,t){super(A),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var wA=class extends Mg{constructor(A,t){super(A,t),this.isRetryable=t.isRetryable??!0}};function j(e,A){return{...e,isRetryable:A}}var Ti=class extends wA{constructor(t){super("This request must be retried",j(t,!0));this.name="ForcedRetryError";this.code="P5001"}};U(Ti,"ForcedRetryError");var gn=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="InvalidDatasourceError";this.code="P6001"}};U(gn,"InvalidDatasourceError");var ln=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="NotImplementedYetError";this.code="P5004"}};U(ln,"NotImplementedYetError");var Ce=class extends wA{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 un=class extends Ce{constructor(t){super("Schema needs to be uploaded",j(t,!0));this.name="SchemaMissingError";this.code="P5005"}};U(un,"SchemaMissingError");var od="This request could not be understood by the server",Io=class extends Ce{constructor(t,r,n){super(r||od,j(t,!1));this.name="BadRequestError";this.code="P5000";n&&(this.code=n)}};U(Io,"BadRequestError");var Bo=class extends Ce{constructor(t,r){super("Engine not started: healthcheck timeout",j(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=r}};U(Bo,"HealthcheckTimeoutError");var po=class extends Ce{constructor(t,r,n){super(r,j(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=n}};U(po,"EngineStartupError");var mo=class extends Ce{constructor(t){super("Engine version is not supported",j(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};U(mo,"EngineVersionNotSupportedError");var ad="Request timed out",yo=class extends Ce{constructor(t,r=ad){super(r,j(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};U(yo,"GatewayTimeoutError");var wY="Interactive transaction error",wo=class extends Ce{constructor(t,r=wY){super(r,j(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};U(wo,"InteractiveTransactionError");var RY="Request parameters are invalid",Ro=class extends Ce{constructor(t,r=RY){super(r,j(t,!1));this.name="InvalidRequestError";this.code="P5011"}};U(Ro,"InvalidRequestError");var cd="Requested resource does not exist",Do=class extends Ce{constructor(t,r=cd){super(r,j(t,!1));this.name="NotFoundError";this.code="P5003"}};U(Do,"NotFoundError");var gd="Unknown server error",Mi=class extends Ce{constructor(t,r,n){super(r||gd,j(t,!0));this.name="ServerError";this.code="P5006";this.logs=n}};U(Mi,"ServerError");var ld="Unauthorized, check your connection string",bo=class extends Ce{constructor(t,r=ld){super(r,j(t,!1));this.name="UnauthorizedError";this.code="P5007"}};U(bo,"UnauthorizedError");var ud="Usage exceeded, retry again later",ko=class extends Ce{constructor(t,r=ud){super(r,j(t,!0));this.name="UsageExceededError";this.code="P5008"}};U(ko,"UsageExceededError");async function DY(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 So(e,A){if(e.ok)return;let t={clientVersion:A,response:e},r=await DY(e);if(r.type==="QueryEngineError")throw new He(r.body.message,{code:r.body.error_code,clientVersion:A});if(r.type==="DataProxyError"){if(r.body==="InternalDataProxyError")throw new Mi(t,"Internal Data Proxy error");if("EngineNotStarted"in r.body){if(r.body.EngineNotStarted.reason==="SchemaMissing")return new un(t);if(r.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new mo(t);if("EngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,logs:i}=r.body.EngineNotStarted.reason.EngineStartupError;throw new po(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 Bo(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 wo(t,n[r.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in r.body)throw new Ro(t,r.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new bo(t,vi(ld,r));if(e.status===404)return new Do(t,vi(cd,r));if(e.status===429)throw new ko(t,vi(ud,r));if(e.status===504)throw new yo(t,vi(ad,r));if(e.status>=500)throw new Mi(t,vi(gd,r));if(e.status>=400)throw new Io(t,vi(od,r))}function vi(e,A){return A.type==="EmptyError"?e:`${e}: ${JSON.stringify(A)}`}function LR(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 tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function UR(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+=tr[s]+tr[o]+tr[a]+tr[c];return n==1?(g=A[i],s=(g&252)>>2,o=(g&3)<<4,t+=tr[s]+tr[o]+"=="):n==2&&(g=A[i]<<8|A[i+1],s=(g&64512)>>10,o=(g&1008)>>4,a=(g&15)<<2,t+=tr[s]+tr[o]+tr[a]+"="),t}function TR(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 bY(e){return e[0]*1e3+e[1]/1e6}function MR(e){return new Date(bY(e))}var vR={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Fo=class extends wA{constructor(t,r){super(`Cannot fetch data from service:
|
|
174
174
|
${t}`,j(r,!0));this.name="RequestError";this.code="P5010"}};U(Fo,"RequestError");async function En(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 Fo(o,{clientVersion:r,cause:s})}}var SY=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,PR=ie("prisma:client:dataproxyEngine");async function FY(e,A){let t=vR["@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&&SY.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=NY(`<=${o}.${a}.${c}`),l=await En(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();PR("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 ln("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:r})}async function GR(e,A){let t=await FY(e,A);return PR("version",t),t}function NY(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var JR=3,Ed=ie("prisma:client:dataproxyEngine"),hd=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}},No=class{constructor(A){this.name="DataProxyEngine";TR(A),this.config=A,this.env={...A.env,...typeof process<"u"?process.env:{}},this.inlineSchema=UR(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 hd({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await GR(A,this.config),Ed("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(A){A?.logs?.length&&A.logs.forEach(t=>{switch(t.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let r=typeof t.attributes.query=="string"?t.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[n]=r.split("/* traceparent");r=n}this.logEmitter.emit("query",{query:r,timestamp:MR(t.timestamp),duration:Number(t.attributes.duration_ms),params:t.attributes.params,target:t.attributes.target})}}}),A?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans: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 En(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Ed("schema response status",t.status);let r=await So(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=Jn(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 En(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:n}),body:JSON.stringify(A),clientVersion:this.clientVersion},r);o.ok||Ed("graphql response status",o.status),await this.handleError(await So(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 En(o,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await So(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 En(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await So(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=Ui({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),n;try{n=new URL(r)}catch{throw new gn(`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 gn(`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 gn(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,A);return[s,a]}metrics(){throw new ln("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 wA)||!n.isRetryable)throw n;if(t>=JR)throw n instanceof Ti?n.cause:n;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${JR} failed for ${A.actionGerund}: ${n.message??"(unknown)"}`,timestamp:new Date,target:""});let i=await LR(t);this.logEmitter.emit("warn",{message:`Retrying after ${i}ms`,timestamp:new Date,target:""})}}}async handleError(A){if(A instanceof un)throw await this.uploadSchema(),new Ti({clientVersion:this.clientVersion,cause:A});if(A)throw A}convertProtocolErrorsToClientError(A){return A.length===1?hr(A[0],this.config.clientVersion,this.config.activeProvider):new Me(JSON.stringify(A),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function YR({copyEngine:e=!0},A){let t;try{t=Ui({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&&ss("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=es(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 Xe(c.join(`
|
|
175
175
|
`),{clientVersion:A.clientVersion})}if(i)return new No(A);if(a)return new fo(A);throw new Xe("Invalid client engine type, please use `library` or `binary`",{clientVersion:A.clientVersion})}function vg({generator:e}){return e?.previewFeatures??[]}var VR=e=>({command:e});var qR=e=>e.strings.reduce((A,t,r)=>`${A}@P${r}${t}`);function Pi(e){try{return OR(e,"fast")}catch{return OR(e,"slow")}}function OR(e,A){return JSON.stringify(e.map(t=>WR(t,A)))}function WR(e,A){if(Array.isArray(e))return e.map(t=>WR(t,A));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Sn(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ut.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(xY(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"?_R(e):e}function xY(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function _R(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(HR);let A={};for(let t of Object.keys(e))A[t]=HR(e[t]);return A}function HR(e){return typeof e=="bigint"?e.toString():_R(e)}var LY=["$connect","$disconnect","$on","$transaction","$use","$extends"],jR=LY;var UY=/^(\s*alter\s)/i,KR=ie("prisma:client");function dd(e,A,t,r){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&UY.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 Qd=({clientMethod:e,activeProvider:A})=>t=>{let r="",n;if(Kf(t))r=t.sql,n={values:Pi(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[i,...s]=t;r=i,n={values:Pi(s||[]),__prismaRawParameters__:!0}}else switch(A){case"sqlite":case"mysql":{r=t.sql,n={values:Pi(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{r=t.text,n={values:Pi(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{r=qR(t),n={values:Pi(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${A} provider does not support ${e}`)}return n?.values?KR(`prisma.${e}(${r}, ${n.values})`):KR(`prisma.${e}(${r})`),{query:r,parameters:n}},ZR={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[A,...t]=e;return new dA(A,t)}},XR={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Cd(e){return function(t){let r,n=(i=e)=>{try{return i===void 0||i?.kind==="itx"?r??=zR(t(i)):zR(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 zR(e){return typeof e.then=="function"?e:Promise.resolve(e)}var $R={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,A){return A()}},fd=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(A){return this.getGlobalTracingHelper().getTraceParent(A)}createEngineSpan(A){return this.getGlobalTracingHelper().createEngineSpan(A)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(A,t){return this.getGlobalTracingHelper().runInChildSpan(A,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??$R}};function eD(e){return e.includes("tracing")?new fd:$R}function AD(e,A=()=>{}){let t,r=new Promise(n=>t=n);return{then(n){return--e===0&&t(A()),n?.(r)}}}function tD(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 Pg=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 iD=Z(Ll());function Gg(e){return typeof e.batchRequestIdx=="number"}function rD(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let A=[];return e.modelName&&A.push(e.modelName),e.query.arguments&&A.push(Id(e.query.arguments)),A.push(Id(e.query.selection)),A.join("")}function Id(e){return`(${Object.keys(e).sort().map(t=>{let r=e[t];return typeof r=="object"&&r!==null?`(${t} ${Id(r)})`:t}).join(" ")})`}var TY={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,updateOne:!0,upsertOne:!0};function Bd(e){return TY[e]}var Jg=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 hn(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 ut(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=>hn("bigint",t));case"bytes-array":return A.map(t=>hn("bytes",t));case"decimal-array":return A.map(t=>hn("decimal",t));case"datetime-array":return A.map(t=>hn("datetime",t));case"date-array":return A.map(t=>hn("date",t));case"time-array":return A.map(t=>hn("time",t));default:return A}}function nD(e){let A=[],t=MY(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]]=hn(e.types[s],n[s]);A.push(i)}return A}function MY(e){let A={};for(let t=0;t<e.columns.length;t++)A[e.columns[t]]=null;return A}var vY=ie("prisma:client:request_handler"),Yg=class{constructor(A,t){this.logEmitter=t,this.client=A,this.dataloader=new Jg({batchLoader:BI(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=>Bd(l.protocolQuery.action));return(await this.client._engine.requestBatch(o,{traceparent:a,transaction:PY(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"?sD(r.transaction):void 0,i=await this.client._engine.request(r.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:n,isWrite:Bd(r.protocolQuery.action),customDataProxyFetch:r.customDataProxyFetch});return this.mapQueryEngineResult(r,i)},batchBy:r=>r.transaction?.id?`transaction-${r.transaction.id}`:rD(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(vY(A),GY(A,n))throw A;if(A instanceof He&&JY(A)){let c=oD(A.meta);La({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=ya({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 He(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 Me)throw new Me(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,iD.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=iu(i,s),a=n==="queryRaw"?nD(o):bn(o);return r?r(a):a}get[Symbol.toStringTag](){return"RequestHandler"}};function PY(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:sD(e)};vt(e,"Unknown transaction kind")}}function sD(e){return{id:e.id,payload:e.payload}}function GY(e,A){return Gg(e)&&A?.kind==="batch"&&e.batchRequestIdx!==A.index}function JY(e){return e.code==="P2009"||e.code==="P2012"}function oD(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(oD)};if(Array.isArray(e.selectionPath)){let[,...A]=e.selectionPath;return{...e,selectionPath:A}}return e}var aD="5.23.0-dev.
|
|
182
|
+
`)}var Qd=({clientMethod:e,activeProvider:A})=>t=>{let r="",n;if(Kf(t))r=t.sql,n={values:Pi(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[i,...s]=t;r=i,n={values:Pi(s||[]),__prismaRawParameters__:!0}}else switch(A){case"sqlite":case"mysql":{r=t.sql,n={values:Pi(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{r=t.text,n={values:Pi(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{r=qR(t),n={values:Pi(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${A} provider does not support ${e}`)}return n?.values?KR(`prisma.${e}(${r}, ${n.values})`):KR(`prisma.${e}(${r})`),{query:r,parameters:n}},ZR={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[A,...t]=e;return new dA(A,t)}},XR={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Cd(e){return function(t){let r,n=(i=e)=>{try{return i===void 0||i?.kind==="itx"?r??=zR(t(i)):zR(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 zR(e){return typeof e.then=="function"?e:Promise.resolve(e)}var $R={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,A){return A()}},fd=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(A){return this.getGlobalTracingHelper().getTraceParent(A)}createEngineSpan(A){return this.getGlobalTracingHelper().createEngineSpan(A)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(A,t){return this.getGlobalTracingHelper().runInChildSpan(A,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??$R}};function eD(e){return e.includes("tracing")?new fd:$R}function AD(e,A=()=>{}){let t,r=new Promise(n=>t=n);return{then(n){return--e===0&&t(A()),n?.(r)}}}function tD(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 Pg=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 iD=Z(Ll());function Gg(e){return typeof e.batchRequestIdx=="number"}function rD(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let A=[];return e.modelName&&A.push(e.modelName),e.query.arguments&&A.push(Id(e.query.arguments)),A.push(Id(e.query.selection)),A.join("")}function Id(e){return`(${Object.keys(e).sort().map(t=>{let r=e[t];return typeof r=="object"&&r!==null?`(${t} ${Id(r)})`:t}).join(" ")})`}var TY={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,updateOne:!0,upsertOne:!0};function Bd(e){return TY[e]}var Jg=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 hn(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 ut(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=>hn("bigint",t));case"bytes-array":return A.map(t=>hn("bytes",t));case"decimal-array":return A.map(t=>hn("decimal",t));case"datetime-array":return A.map(t=>hn("datetime",t));case"date-array":return A.map(t=>hn("date",t));case"time-array":return A.map(t=>hn("time",t));default:return A}}function nD(e){let A=[],t=MY(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]]=hn(e.types[s],n[s]);A.push(i)}return A}function MY(e){let A={};for(let t=0;t<e.columns.length;t++)A[e.columns[t]]=null;return A}var vY=ie("prisma:client:request_handler"),Yg=class{constructor(A,t){this.logEmitter=t,this.client=A,this.dataloader=new Jg({batchLoader:BI(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=>Bd(l.protocolQuery.action));return(await this.client._engine.requestBatch(o,{traceparent:a,transaction:PY(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"?sD(r.transaction):void 0,i=await this.client._engine.request(r.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:n,isWrite:Bd(r.protocolQuery.action),customDataProxyFetch:r.customDataProxyFetch});return this.mapQueryEngineResult(r,i)},batchBy:r=>r.transaction?.id?`transaction-${r.transaction.id}`:rD(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(vY(A),GY(A,n))throw A;if(A instanceof He&&JY(A)){let c=oD(A.meta);La({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=ya({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 He(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 Me)throw new Me(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,iD.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=iu(i,s),a=n==="queryRaw"?nD(o):bn(o);return r?r(a):a}get[Symbol.toStringTag](){return"RequestHandler"}};function PY(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:sD(e)};vt(e,"Unknown transaction kind")}}function sD(e){return{id:e.id,payload:e.payload}}function GY(e,A){return Gg(e)&&A?.kind==="batch"&&e.batchRequestIdx!==A.index}function JY(e){return e.code==="P2009"||e.code==="P2012"}function oD(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(oD)};if(Array.isArray(e.selectionPath)){let[,...A]=e.selectionPath;return{...e,selectionPath:A}}return e}var aD="5.23.0-dev.18";var cD=aD;var hD=Z(ql());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"}};U(oe,"PrismaClientConstructorValidationError");var gD=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],lD=["pretty","colorless","minimal"],uD=["info","query","warn","error"],VY={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=Gi(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.
|