UNPKG

prisma

Version:

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.

7 lines • 2.68 MB
#!/usr/bin/env node "use strict";var jVe=Object.create;var vw=Object.defineProperty;var UVe=Object.getOwnPropertyDescriptor;var GVe=Object.getOwnPropertyNames;var WVe=Object.getPrototypeOf,HVe=Object.prototype.hasOwnProperty;var gJ=e=>{throw TypeError(e)};var VVe=(e,r,n)=>r in e?vw(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var W=(e,r)=>()=>(e&&(r=e(e=0)),r);var C=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Us=(e,r)=>{for(var n in r)vw(e,n,{get:r[n],enumerable:!0})},sC=(e,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of GVe(r))!HVe.call(e,a)&&a!==n&&vw(e,a,{get:()=>r[a],enumerable:!(i=UVe(r,a))||i.enumerable});return e},xw=(e,r,n)=>(sC(e,r,"default"),n&&sC(n,r,"default")),Y=(e,r,n)=>(n=e!=null?jVe(WVe(e)):{},sC(r||!e||!e.__esModule?vw(n,"default",{value:e,enumerable:!0}):n,e)),zVe=e=>sC(vw({},"__esModule",{value:!0}),e);var H=(e,r,n)=>VVe(e,typeof r!="symbol"?r+"":r,n),i8=(e,r,n)=>r.has(e)||gJ("Cannot "+n);var S=(e,r,n)=>(i8(e,r,"read from private field"),n?n.call(e):r.get(e)),ae=(e,r,n)=>r.has(e)?gJ("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,n),X=(e,r,n,i)=>(i8(e,r,"write to private field"),i?i.call(e,n):r.set(e,n),n),te=(e,r,n)=>(i8(e,r,"access private method"),n);var Su=(e,r,n,i)=>({set _(a){X(e,r,a,n)},get _(){return S(e,r,i)}});var aC={};Us(aC,{$:()=>wJ,bgBlack:()=>ZVe,bgBlue:()=>rze,bgCyan:()=>ize,bgGreen:()=>eze,bgMagenta:()=>nze,bgRed:()=>o8,bgWhite:()=>sze,bgYellow:()=>tze,black:()=>XVe,blue:()=>Ma,bold:()=>V,cyan:()=>Po,dim:()=>me,gray:()=>Mh,green:()=>xe,grey:()=>Ul,hidden:()=>YVe,inverse:()=>KVe,italic:()=>Co,magenta:()=>JVe,red:()=>Ce,reset:()=>bw,strikethrough:()=>QVe,underline:()=>Nt,white:()=>a8,yellow:()=>Ct});function Ir(e,r){let n=new RegExp(`\\x1b\\[${r}m`,"g"),i=`\x1B[${e}m`,a=`\x1B[${r}m`;return function(o){return!wJ.enabled||o==null?o:i+(~(""+o).indexOf(a)?o.replace(n,a+i):o)+a}}var s8,yJ,vJ,xJ,bJ,wJ,bw,V,me,Co,Nt,KVe,YVe,QVe,XVe,Ce,xe,Ct,Ma,JVe,Po,a8,Mh,Ul,ZVe,o8,eze,tze,rze,nze,ize,sze,Ie=W(()=>{"use strict";bJ=!0;typeof process<"u"&&({FORCE_COLOR:s8,NODE_DISABLE_COLORS:yJ,NO_COLOR:vJ,TERM:xJ}=process.env||{},bJ=process.stdout&&process.stdout.isTTY);wJ={enabled:!yJ&&vJ==null&&xJ!=="dumb"&&(s8!=null&&s8!=="0"||bJ)};bw=Ir(0,0),V=Ir(1,22),me=Ir(2,22),Co=Ir(3,23),Nt=Ir(4,24),KVe=Ir(7,27),YVe=Ir(8,28),QVe=Ir(9,29),XVe=Ir(30,39),Ce=Ir(31,39),xe=Ir(32,39),Ct=Ir(33,39),Ma=Ir(34,39),JVe=Ir(35,39),Po=Ir(36,39),a8=Ir(37,39),Mh=Ir(90,39),Ul=Ir(90,39),ZVe=Ir(40,49),o8=Ir(41,49),eze=Ir(42,49),tze=Ir(43,49),rze=Ir(44,49),nze=Ir(45,49),ize=Ir(46,49),sze=Ir(47,49)});function uze(e){let r={color:EJ[oze++%EJ.length],enabled:ww.enabled(e),namespace:e,log:ww.log,extend:()=>{}},n=(...i)=>{let{enabled:a,namespace:o,color:u,log:c}=r;if(i.length!==0&&u8.push([o,...i]),u8.length>aze&&u8.shift(),ww.enabled(o)||a){let l=i.map(p=>typeof p=="string"?p:cze(p)),f=`+${Date.now()-_J}ms`;_J=Date.now(),globalThis.DEBUG_COLORS?c(aC[u](V(o)),...l,aC[u](f)):c(o,...l,f)}};return new Proxy(n,{get:(i,a)=>r[a],set:(i,a,o)=>r[a]=o})}function cze(e,r=2){let n=new Set;return JSON.stringify(e,(i,a)=>{if(typeof a=="object"&&a!==null){if(n.has(a))return"[Circular *]";n.add(a)}else if(typeof a=="bigint")return a.toString();return a},r)}var aze,EJ,u8,_J,oze,c8,ww,Ew,ke,$t=W(()=>{"use strict";Ie();Ie();aze=100,EJ=["green","yellow","blue","magenta","cyan","red"],u8=[],_J=Date.now(),oze=0,c8=typeof process<"u"?process.env:{};globalThis.DEBUG??=c8.DEBUG??"";globalThis.DEBUG_COLORS??=c8.DEBUG_COLORS?c8.DEBUG_COLORS==="true":!0;ww={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(a=>a.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),n=r.some(a=>a===""||a[0]==="-"?!1:e.match(RegExp(a.split("*").join(".*")+"$"))),i=r.some(a=>a===""||a[0]!=="-"?!1:e.match(RegExp(a.slice(1).split("*").join(".*")+"$")));return n&&!i},log:(...e)=>{let[r,n,...i]=e;(console.warn??console.log)(`${r} ${n}`,...i)},formatters:{}};Ew=new Proxy(uze,{get:(e,r)=>ww[r],set:(e,r,n)=>ww[r]=n});ke=Ew});function Cg(){let e=process.env.PRISMA_QUERY_ENGINE_LIBRARY;if(!(e&&DJ.default.existsSync(e))&&process.arch==="ia32")throw new Error('The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set `engineType = "binary"` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)')}var DJ,SJ=W(()=>{"use strict";DJ=Y(require("fs"))});var _w,CJ=W(()=>{"use strict";_w=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"]});function Tc(e,r){let n=r==="url";return e.includes("windows")?n?"query_engine.dll.node":`query_engine-${e}.dll.node`:e.includes("darwin")?n?`${oC}.dylib.node`:`${oC}-${e}.dylib.node`:n?`${oC}.so.node`:`${oC}-${e}.so.node`}var oC,PJ=W(()=>{"use strict";oC="libquery_engine"});function lze(...e){if(e.length===1){let[r]=e;return n=>Ki(r,n,()=>{})}if(e.length===2){let[r,n]=e;return Ki(r,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function Yi(e){return Object.assign(e,{optional:()=>m8(e),and:r=>Hr(e,r),or:r=>TJ(e,r),select:r=>r===void 0?Sw(e):Sw(r,e)})}function f8(e){return Object.assign((r=>Object.assign(r,{[Symbol.iterator](){let n=0,i=[{value:Object.assign(r,{[FJ]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=i[n++])!=null?a:i.at(-1)}}}}))(e),{optional:()=>f8(m8(e)),select:r=>f8(r===void 0?Sw(e):Sw(r,e))})}function m8(e){return Yi({[pa]:()=>({match:r=>{let n={},i=(a,o)=>{n[a]=o};return r===void 0?(Ba(e).forEach(a=>i(a,void 0)),{matched:!0,selections:n}):{matched:Ki(e,r,i),selections:n}},getSelectionKeys:()=>Ba(e),matcherType:"optional"})})}function Hr(...e){return Yi({[pa]:()=>({match:r=>{let n={},i=(a,o)=>{n[a]=o};return{matched:e.every(a=>Ki(a,r,i)),selections:n}},getSelectionKeys:()=>Dw(e,Ba),matcherType:"and"})})}function TJ(...e){return Yi({[pa]:()=>({match:r=>{let n={},i=(a,o)=>{n[a]=o};return Dw(e,Ba).forEach(a=>i(a,void 0)),{matched:e.some(a=>Ki(a,r,i)),selections:n}},getSelectionKeys:()=>Dw(e,Ba),matcherType:"or"})})}function Ht(e){return{[pa]:()=>({match:r=>({matched:!!e(r)})})}}function Sw(...e){let r=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return Yi({[pa]:()=>({match:i=>{let a={[r??cC]:i};return{matched:n===void 0||Ki(n,i,(o,u)=>{a[o]=u}),selections:a}},getSelectionKeys:()=>[r??cC].concat(n===void 0?[]:Ba(n))})})}function Ac(e){return typeof e=="number"}function cp(e){return typeof e=="string"}function lp(e){return typeof e=="bigint"}function _t(e){return new h8(e,d8)}var pa,FJ,cC,l8,uC,Ki,Ba,Dw,fze,pze,AJ,dze,fp,hze,Rc,mze,pp,gze,yze,vze,xze,bze,_n,p8,d8,h8,xs=W(()=>{"use strict";pa=Symbol.for("@ts-pattern/matcher"),FJ=Symbol.for("@ts-pattern/isVariadic"),cC="@ts-pattern/anonymous-select-key",l8=e=>!!(e&&typeof e=="object"),uC=e=>e&&!!e[pa],Ki=(e,r,n)=>{if(uC(e)){let i=e[pa](),{matched:a,selections:o}=i.match(r);return a&&o&&Object.keys(o).forEach(u=>n(u,o[u])),a}if(l8(e)){if(!l8(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let i=[],a=[],o=[];for(let u of e.keys()){let c=e[u];uC(c)&&c[FJ]?o.push(c):o.length?a.push(c):i.push(c)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.length<i.length+a.length)return!1;let u=r.slice(0,i.length),c=a.length===0?[]:r.slice(-a.length),l=r.slice(i.length,a.length===0?1/0:-a.length);return i.every((f,p)=>Ki(f,u[p],n))&&a.every((f,p)=>Ki(f,c[p],n))&&(o.length===0||Ki(o[0],l,n))}return e.length===r.length&&e.every((u,c)=>Ki(u,r[c],n))}return Reflect.ownKeys(e).every(i=>{let a=e[i];return(i in r||uC(o=a)&&o[pa]().matcherType==="optional")&&Ki(a,r[i],n);var o})}return Object.is(r,e)},Ba=e=>{var r,n,i;return l8(e)?uC(e)?(r=(n=(i=e[pa]()).getSelectionKeys)==null?void 0:n.call(i))!=null?r:[]:Array.isArray(e)?Dw(e,Ba):Dw(Object.values(e),Ba):[]},Dw=(e,r)=>e.reduce((n,i)=>n.concat(r(i)),[]);fze=(e,r)=>{for(let n of e)if(!r(n))return!1;return!0},pze=(e,r)=>{for(let[n,i]of e.entries())if(!r(i,n))return!1;return!0};AJ=Yi(Ht(function(e){return!0})),dze=AJ,fp=e=>Object.assign(Yi(e),{startsWith:r=>{return fp(Hr(e,(n=r,Ht(i=>cp(i)&&i.startsWith(n)))));var n},endsWith:r=>{return fp(Hr(e,(n=r,Ht(i=>cp(i)&&i.endsWith(n)))));var n},minLength:r=>fp(Hr(e,(n=>Ht(i=>cp(i)&&i.length>=n))(r))),length:r=>fp(Hr(e,(n=>Ht(i=>cp(i)&&i.length===n))(r))),maxLength:r=>fp(Hr(e,(n=>Ht(i=>cp(i)&&i.length<=n))(r))),includes:r=>{return fp(Hr(e,(n=r,Ht(i=>cp(i)&&i.includes(n)))));var n},regex:r=>{return fp(Hr(e,(n=r,Ht(i=>cp(i)&&!!i.match(n)))));var n}}),hze=fp(Ht(cp)),Rc=e=>Object.assign(Yi(e),{between:(r,n)=>Rc(Hr(e,((i,a)=>Ht(o=>Ac(o)&&i<=o&&a>=o))(r,n))),lt:r=>Rc(Hr(e,(n=>Ht(i=>Ac(i)&&i<n))(r))),gt:r=>Rc(Hr(e,(n=>Ht(i=>Ac(i)&&i>n))(r))),lte:r=>Rc(Hr(e,(n=>Ht(i=>Ac(i)&&i<=n))(r))),gte:r=>Rc(Hr(e,(n=>Ht(i=>Ac(i)&&i>=n))(r))),int:()=>Rc(Hr(e,Ht(r=>Ac(r)&&Number.isInteger(r)))),finite:()=>Rc(Hr(e,Ht(r=>Ac(r)&&Number.isFinite(r)))),positive:()=>Rc(Hr(e,Ht(r=>Ac(r)&&r>0))),negative:()=>Rc(Hr(e,Ht(r=>Ac(r)&&r<0)))}),mze=Rc(Ht(Ac)),pp=e=>Object.assign(Yi(e),{between:(r,n)=>pp(Hr(e,((i,a)=>Ht(o=>lp(o)&&i<=o&&a>=o))(r,n))),lt:r=>pp(Hr(e,(n=>Ht(i=>lp(i)&&i<n))(r))),gt:r=>pp(Hr(e,(n=>Ht(i=>lp(i)&&i>n))(r))),lte:r=>pp(Hr(e,(n=>Ht(i=>lp(i)&&i<=n))(r))),gte:r=>pp(Hr(e,(n=>Ht(i=>lp(i)&&i>=n))(r))),positive:()=>pp(Hr(e,Ht(r=>lp(r)&&r>0))),negative:()=>pp(Hr(e,Ht(r=>lp(r)&&r<0)))}),gze=pp(Ht(lp)),yze=Yi(Ht(function(e){return typeof e=="boolean"})),vze=Yi(Ht(function(e){return typeof e=="symbol"})),xze=Yi(Ht(function(e){return e==null})),bze=Yi(Ht(function(e){return e!=null})),_n={__proto__:null,matcher:pa,optional:m8,array:function(...e){return f8({[pa]:()=>({match:r=>{if(!Array.isArray(r))return{matched:!1};if(e.length===0)return{matched:!0};let n=e[0],i={};if(r.length===0)return Ba(n).forEach(o=>{i[o]=[]}),{matched:!0,selections:i};let a=(o,u)=>{i[o]=(i[o]||[]).concat([u])};return{matched:r.every(o=>Ki(n,o,a)),selections:i}},getSelectionKeys:()=>e.length===0?[]:Ba(e[0])})})},set:function(...e){return Yi({[pa]:()=>({match:r=>{if(!(r instanceof Set))return{matched:!1};let n={};if(r.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};let i=(o,u)=>{n[o]=(n[o]||[]).concat([u])},a=e[0];return{matched:fze(r,o=>Ki(a,o,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ba(e[0])})})},map:function(...e){return Yi({[pa]:()=>({match:r=>{if(!(r instanceof Map))return{matched:!1};let n={};if(r.size===0)return{matched:!0,selections:n};let i=(c,l)=>{n[c]=(n[c]||[]).concat([l])};if(e.length===0)return{matched:!0};var a;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=e[0])==null?void 0:a.toString()}`);let[o,u]=e;return{matched:pze(r,(c,l)=>{let f=Ki(o,l,i),p=Ki(u,c,i);return f&&p}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ba(e[0]),...Ba(e[1])]})})},intersection:Hr,union:TJ,not:function(e){return Yi({[pa]:()=>({match:r=>({matched:!Ki(e,r,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:Ht,select:Sw,any:AJ,_:dze,string:hze,number:mze,bigint:gze,boolean:yze,symbol:vze,nullish:xze,nonNullable:bze,instanceOf:function(e){return Yi(Ht(function(r){return n=>n instanceof r}(e)))},shape:function(e){return Yi(Ht(lze(e)))}},p8=class extends Error{constructor(r){let n;try{n=JSON.stringify(r)}catch{n=r}super(`Pattern matching error: no pattern matches value ${n}`),this.input=void 0,this.input=r}},d8={matched:!1,value:void 0};h8=class e{constructor(r,n){this.input=void 0,this.state=void 0,this.input=r,this.state=n}with(...r){if(this.state.matched)return this;let n=r[r.length-1],i=[r[0]],a;r.length===3&&typeof r[1]=="function"?a=r[1]:r.length>2&&i.push(...r.slice(1,r.length-1));let o=!1,u={},c=(f,p)=>{o=!0,u[f]=p},l=!i.some(f=>Ki(f,this.input,c))||a&&!a(this.input)?d8:{matched:!0,value:n(o?cC in u?u[cC]:u:this.input,this.input)};return new e(this.input,l)}when(r,n){if(this.state.matched)return this;let i=!!r(this.input);return new e(this.input,i?{matched:!0,value:n(this.input,this.input)}:d8)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new p8(this.input)}run(){return this.exhaustive()}returnType(){return this}}});function lC(e,...r){Eze.warn()&&console.warn(`${wze.warn} ${e}`,...r)}var wze,Eze,RJ=W(()=>{"use strict";Ie();wze={warn:Ct("prisma:warn")},Eze={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS}});async function $J(){let e=pC.default.platform(),r=process.arch;if(e==="freebsd"){let u=await dC("freebsd-version");if(u&&u.trim().length>0){let l=/^(\d+)\.?/.exec(u);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let n=await Cze(),i=await kze(),a=Fze({arch:r,archFromUname:i,familyDistro:n.familyDistro}),{libssl:o}=await Tze(a);return{platform:"linux",libssl:o,arch:r,archFromUname:i,...n}}function Sze(e){let r=/^ID="?([^"\n]*)"?$/im,n=/^ID_LIKE="?([^"\n]*)"?$/im,i=r.exec(e),a=i&&i[1]&&i[1].toLowerCase()||"",o=n.exec(e),u=o&&o[1]&&o[1].toLowerCase()||"",c=_t({id:a,idLike:u}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>a==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return Gs(`Found distro info: ${JSON.stringify(c,null,2)}`),c}async function Cze(){let e="/etc/os-release";try{let r=await g8.default.readFile(e,{encoding:"utf-8"});return Sze(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Pze(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let n=`${r[1]}.x`;return LJ(n)}}function OJ(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let n=`${r[1]}${r[2]??".0"}.x`;return LJ(n)}}function LJ(e){let r=(()=>{if(BJ(e))return e;let n=e.split(".");return n[1]="0",n.join(".")})();if(Dze.includes(r))return r}function Fze(e){return _t(e).with({familyDistro:"musl"},()=>(Gs('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(Gs('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(Gs('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:n,archFromUname:i})=>(Gs(`Don't know any platform-specific paths for "${r}" on ${n} (${i})`),[]))}async function Tze(e){let r='grep -v "libssl.so.0"',n=await IJ(e);if(n){Gs(`Found libssl.so file using platform-specific paths: ${n}`);let o=OJ(n);if(Gs(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}Gs('Falling back to "ldconfig" and other generic paths');let i=await dC(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(i||(i=await IJ(["/lib64","/usr/lib64","/lib","/usr/lib"])),i){Gs(`Found libssl.so file using "ldconfig" or other generic paths: ${i}`);let o=OJ(i);if(Gs(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let a=await dC("openssl version -v");if(a){Gs(`Found openssl binary with version: ${a}`);let o=Pze(a);if(Gs(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return Gs("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function IJ(e){for(let r of e){let n=await Aze(r);if(n)return n}}async function Aze(e){try{return(await g8.default.readdir(e)).find(n=>n.startsWith("libssl.so.")&&!n.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function ei(){let{binaryTarget:e}=await MJ();return e}function Rze(e){return e.binaryTarget!==void 0}async function Cw(){let{memoized:e,...r}=await MJ();return r}async function MJ(){if(Rze(fC))return Promise.resolve({...fC,memoized:!0});let e=await $J(),r=Oze(e);return fC={...e,binaryTarget:r},{...fC,memoized:!1}}function Oze(e){let{platform:r,arch:n,archFromUname:i,libssl:a,targetDistro:o,familyDistro:u,originalDistro:c}=e;r==="linux"&&!["x64","arm64"].includes(n)&&lC(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${n}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${i}".`);let l="1.1.x";if(r==="linux"&&a===void 0){let p=_t({familyDistro:u}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");lC(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". ${p}`)}let f="debian";if(r==="linux"&&o===void 0&&Gs(`Distro is "${c}". Falling back to Prisma engines built for "${f}".`),r==="darwin"&&n==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&n==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${a||l}`;if(r==="linux"&&n==="arm")return`linux-arm-openssl-${a||l}`;if(r==="linux"&&o==="musl"){let p="linux-musl";return!a||BJ(a)?p:`${p}-openssl-${a}`}return r==="linux"&&o&&a?`${o}-openssl-${a}`:(r!=="linux"&&lC(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),a?`${f}-openssl-${a}`:o?`${o}-openssl-${l}`:`${f}-openssl-${l}`)}async function Ize(e){try{return await e()}catch{return}}function dC(e){return Ize(async()=>{let r=await _ze(e);return Gs(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function kze(){return typeof pC.default.machine=="function"?pC.default.machine():(await dC("uname -m"))?.trim()}function BJ(e){return e.startsWith("1.")}var kJ,g8,pC,NJ,_ze,Gs,Dze,fC,qJ=W(()=>{"use strict";$t();kJ=Y(require("child_process")),g8=Y(require("fs/promises")),pC=Y(require("os"));xs();NJ=require("util");RJ();_ze=(0,NJ.promisify)(kJ.default.exec),Gs=ke("prisma:get-platform"),Dze=["1.0.x","1.1.x","3.0.x"];fC={}});var Bh=C((ktr,y8)=>{"use strict";var jt=y8.exports;y8.exports.default=jt;var vr="\x1B[",Pw="\x1B]",Pg="\x07",hC=";",jJ=process.env.TERM_PROGRAM==="Apple_Terminal";jt.cursorTo=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?vr+(e+1)+"G":vr+(r+1)+";"+(e+1)+"H"};jt.cursorMove=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let n="";return e<0?n+=vr+-e+"D":e>0&&(n+=vr+e+"C"),r<0?n+=vr+-r+"A":r>0&&(n+=vr+r+"B"),n};jt.cursorUp=(e=1)=>vr+e+"A";jt.cursorDown=(e=1)=>vr+e+"B";jt.cursorForward=(e=1)=>vr+e+"C";jt.cursorBackward=(e=1)=>vr+e+"D";jt.cursorLeft=vr+"G";jt.cursorSavePosition=jJ?"\x1B7":vr+"s";jt.cursorRestorePosition=jJ?"\x1B8":vr+"u";jt.cursorGetPosition=vr+"6n";jt.cursorNextLine=vr+"E";jt.cursorPrevLine=vr+"F";jt.cursorHide=vr+"?25l";jt.cursorShow=vr+"?25h";jt.eraseLines=e=>{let r="";for(let n=0;n<e;n++)r+=jt.eraseLine+(n<e-1?jt.cursorUp():"");return e&&(r+=jt.cursorLeft),r};jt.eraseEndLine=vr+"K";jt.eraseStartLine=vr+"1K";jt.eraseLine=vr+"2K";jt.eraseDown=vr+"J";jt.eraseUp=vr+"1J";jt.eraseScreen=vr+"2J";jt.scrollUp=vr+"S";jt.scrollDown=vr+"T";jt.clearScreen="\x1Bc";jt.clearTerminal=process.platform==="win32"?`${jt.eraseScreen}${vr}0f`:`${jt.eraseScreen}${vr}3J${vr}H`;jt.beep=Pg;jt.link=(e,r)=>[Pw,"8",hC,hC,r,Pg,e,Pw,"8",hC,hC,Pg].join("");jt.image=(e,r={})=>{let n=`${Pw}1337;File=inline=1`;return r.width&&(n+=`;width=${r.width}`),r.height&&(n+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(n+=";preserveAspectRatio=0"),n+":"+e.toString("base64")+Pg};jt.iTerm={setCwd:(e=process.cwd())=>`${Pw}50;CurrentDir=${e}${Pg}`,annotation:(e,r={})=>{let n=`${Pw}1337;`,i=typeof r.x<"u",a=typeof r.y<"u";if((i||a)&&!(i&&a&&typeof r.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),n+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?n+=(i?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):n+=e,n+Pg}}});var mC=C((Ntr,UJ)=>{"use strict";UJ.exports=(e,r=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",i=r.indexOf(n+e),a=r.indexOf("--");return i!==-1&&(a===-1||i<a)}});var b8=C(($tr,WJ)=>{"use strict";var Nze=require("os"),GJ=require("tty"),Fo=mC(),{env:yi}=process,dp;Fo("no-color")||Fo("no-colors")||Fo("color=false")||Fo("color=never")?dp=0:(Fo("color")||Fo("colors")||Fo("color=true")||Fo("color=always"))&&(dp=1);"FORCE_COLOR"in yi&&(yi.FORCE_COLOR==="true"?dp=1:yi.FORCE_COLOR==="false"?dp=0:dp=yi.FORCE_COLOR.length===0?1:Math.min(parseInt(yi.FORCE_COLOR,10),3));function v8(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function x8(e,r){if(dp===0)return 0;if(Fo("color=16m")||Fo("color=full")||Fo("color=truecolor"))return 3;if(Fo("color=256"))return 2;if(e&&!r&&dp===void 0)return 0;let n=dp||0;if(yi.TERM==="dumb")return n;if(process.platform==="win32"){let i=Nze.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in yi)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in yi)||yi.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in yi)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(yi.TEAMCITY_VERSION)?1:0;if(yi.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in yi){let i=parseInt((yi.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(yi.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(yi.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(yi.TERM)||"COLORTERM"in yi?1:n}function $ze(e){let r=x8(e,e&&e.isTTY);return v8(r)}WJ.exports={supportsColor:$ze,stdout:v8(x8(!0,GJ.isatty(1))),stderr:v8(x8(!0,GJ.isatty(2)))}});var zJ=C((Ltr,VJ)=>{"use strict";var Lze=b8(),Fg=mC();function HJ(e){if(/^\d{3,4}$/.test(e)){let n=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(n[1],10),patch:parseInt(n[2],10)}}let r=(e||"").split(".").map(n=>parseInt(n,10));return{major:r[0],minor:r[1],patch:r[2]}}function w8(e){let{env:r}=process;if("FORCE_HYPERLINK"in r)return!(r.FORCE_HYPERLINK.length>0&&parseInt(r.FORCE_HYPERLINK,10)===0);if(Fg("no-hyperlink")||Fg("no-hyperlinks")||Fg("hyperlink=false")||Fg("hyperlink=never"))return!1;if(Fg("hyperlink=true")||Fg("hyperlink=always")||"NETLIFY"in r)return!0;if(!Lze.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in r||"TEAMCITY_VERSION"in r)return!1;if("TERM_PROGRAM"in r){let n=HJ(r.TERM_PROGRAM_VERSION);switch(r.TERM_PROGRAM){case"iTerm.app":return n.major===3?n.minor>=1:n.major>3;case"WezTerm":return n.major>=20200620;case"vscode":return n.major>1||n.major===1&&n.minor>=72}}if("VTE_VERSION"in r){if(r.VTE_VERSION==="0.50.0")return!1;let n=HJ(r.VTE_VERSION);return n.major>0||n.minor>=50}return!1}VJ.exports={supportsHyperlink:w8,stdout:w8(process.stdout),stderr:w8(process.stderr)}});var _8=C((Mtr,Fw)=>{"use strict";var Mze=Bh(),E8=zJ(),KJ=(e,r,{target:n="stdout",...i}={})=>E8[n]?Mze.link(e,r):i.fallback===!1?e:typeof i.fallback=="function"?i.fallback(e,r):`${e} (\u200B${r}\u200B)`;Fw.exports=(e,r,n={})=>KJ(e,r,n);Fw.exports.stderr=(e,r,n={})=>KJ(e,r,{target:"stderr",...n});Fw.exports.isSupported=E8.stdout;Fw.exports.stderr.isSupported=E8.stderr});function D8(e){return(0,YJ.default)(e,e,{fallback:Nt})}var YJ,QJ=W(()=>{"use strict";Ie();YJ=Y(_8())});var tZ=C((jtr,eZ)=>{"use strict";eZ.exports=ZJ;ZJ.sync=qze;var XJ=require("fs");function Bze(e,r){var n=r.pathExt!==void 0?r.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var i=0;i<n.length;i++){var a=n[i].toLowerCase();if(a&&e.substr(-a.length).toLowerCase()===a)return!0}return!1}function JJ(e,r,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Bze(r,n)}function ZJ(e,r,n){XJ.stat(e,function(i,a){n(i,i?!1:JJ(a,e,r))})}function qze(e,r){return JJ(XJ.statSync(e),e,r)}});var aZ=C((Utr,sZ)=>{"use strict";sZ.exports=nZ;nZ.sync=jze;var rZ=require("fs");function nZ(e,r,n){rZ.stat(e,function(i,a){n(i,i?!1:iZ(a,r))})}function jze(e,r){return iZ(rZ.statSync(e),r)}function iZ(e,r){return e.isFile()&&Uze(e,r)}function Uze(e,r){var n=e.mode,i=e.uid,a=e.gid,o=r.uid!==void 0?r.uid:process.getuid&&process.getuid(),u=r.gid!==void 0?r.gid:process.getgid&&process.getgid(),c=parseInt("100",8),l=parseInt("010",8),f=parseInt("001",8),p=c|l,g=n&f||n&l&&a===u||n&c&&i===o||n&p&&o===0;return g}});var uZ=C((Wtr,oZ)=>{"use strict";var Gtr=require("fs"),gC;process.platform==="win32"||global.TESTING_WINDOWS?gC=tZ():gC=aZ();oZ.exports=S8;S8.sync=Gze;function S8(e,r,n){if(typeof r=="function"&&(n=r,r={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,a){S8(e,r||{},function(o,u){o?a(o):i(u)})})}gC(e,r||{},function(i,a){i&&(i.code==="EACCES"||r&&r.ignoreErrors)&&(i=null,a=!1),n(i,a)})}function Gze(e,r){try{return gC.sync(e,r||{})}catch(n){if(r&&r.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var C8=C((Htr,hZ)=>{"use strict";var Tg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",cZ=require("path"),Wze=Tg?";":":",lZ=uZ(),fZ=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),pZ=(e,r)=>{let n=r.colon||Wze,i=e.match(/\//)||Tg&&e.match(/\\/)?[""]:[...Tg?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(n)],a=Tg?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Tg?a.split(n):[""];return Tg&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:a}},dZ=(e,r,n)=>{typeof r=="function"&&(n=r,r={}),r||(r={});let{pathEnv:i,pathExt:a,pathExtExe:o}=pZ(e,r),u=[],c=f=>new Promise((p,g)=>{if(f===i.length)return r.all&&u.length?p(u):g(fZ(e));let v=i[f],x=/^".*"$/.test(v)?v.slice(1,-1):v,b=cZ.join(x,e),D=!x&&/^\.[\\\/]/.test(e)?e.slice(0,2)+b:b;p(l(D,f,0))}),l=(f,p,g)=>new Promise((v,x)=>{if(g===a.length)return v(c(p+1));let b=a[g];lZ(f+b,{pathExt:o},(D,F)=>{if(!D&&F)if(r.all)u.push(f+b);else return v(f+b);return v(l(f,p,g+1))})});return n?c(0).then(f=>n(null,f),n):c(0)},Hze=(e,r)=>{r=r||{};let{pathEnv:n,pathExt:i,pathExtExe:a}=pZ(e,r),o=[];for(let u=0;u<n.length;u++){let c=n[u],l=/^".*"$/.test(c)?c.slice(1,-1):c,f=cZ.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;for(let g=0;g<i.length;g++){let v=p+i[g];try{if(lZ.sync(v,{pathExt:a}))if(r.all)o.push(v);else return v}catch{}}}if(r.all&&o.length)return o;if(r.nothrow)return null;throw fZ(e)};hZ.exports=dZ;dZ.sync=Hze});var yC=C((Vtr,P8)=>{"use strict";var mZ=(e={})=>{let r=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(r).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};P8.exports=mZ;P8.exports.default=mZ});var xZ=C((ztr,vZ)=>{"use strict";var gZ=require("path"),Vze=C8(),zze=yC();function yZ(e,r){let n=e.options.env||process.env,i=process.cwd(),a=e.options.cwd!=null,o=a&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let u;try{u=Vze.sync(e.command,{path:n[zze({env:n})],pathExt:r?gZ.delimiter:void 0})}catch{}finally{o&&process.chdir(i)}return u&&(u=gZ.resolve(a?e.options.cwd:"",u)),u}function Kze(e){return yZ(e)||yZ(e,!0)}vZ.exports=Kze});var bZ=C((Ktr,T8)=>{"use strict";var F8=/([()\][%!^"`<>&|;, *?])/g;function Yze(e){return e=e.replace(F8,"^$1"),e}function Qze(e,r){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(F8,"^$1"),r&&(e=e.replace(F8,"^$1")),e}T8.exports.command=Yze;T8.exports.argument=Qze});var EZ=C((Ytr,wZ)=>{"use strict";wZ.exports=/^#!(.*)/});var A8=C((Qtr,_Z)=>{"use strict";var Xze=EZ();_Z.exports=(e="")=>{let r=e.match(Xze);if(!r)return null;let[n,i]=r[0].replace(/#! ?/,"").split(" "),a=n.split("/").pop();return a==="env"?i:i?`${a} ${i}`:a}});var SZ=C((Xtr,DZ)=>{"use strict";var R8=require("fs"),Jze=A8();function Zze(e){let n=Buffer.alloc(150),i;try{i=R8.openSync(e,"r"),R8.readSync(i,n,0,150,0),R8.closeSync(i)}catch{}return Jze(n.toString())}DZ.exports=Zze});var TZ=C((Jtr,FZ)=>{"use strict";var eKe=require("path"),CZ=xZ(),PZ=bZ(),tKe=SZ(),rKe=process.platform==="win32",nKe=/\.(?:com|exe)$/i,iKe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function sKe(e){e.file=CZ(e);let r=e.file&&tKe(e.file);return r?(e.args.unshift(e.file),e.command=r,CZ(e)):e.file}function aKe(e){if(!rKe)return e;let r=sKe(e),n=!nKe.test(r);if(e.options.forceShell||n){let i=iKe.test(r);e.command=eKe.normalize(e.command),e.command=PZ.command(e.command),e.args=e.args.map(o=>PZ.argument(o,i));let a=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${a}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function oKe(e,r,n){r&&!Array.isArray(r)&&(n=r,r=null),r=r?r.slice(0):[],n=Object.assign({},n);let i={command:e,args:r,options:n,file:void 0,original:{command:e,args:r}};return n.shell?i:aKe(i)}FZ.exports=oKe});var OZ=C((Ztr,RZ)=>{"use strict";var O8=process.platform==="win32";function I8(e,r){return Object.assign(new Error(`${r} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${e.command}`,path:e.command,spawnargs:e.args})}function uKe(e,r){if(!O8)return;let n=e.emit;e.emit=function(i,a){if(i==="exit"){let o=AZ(a,r,"spawn");if(o)return n.call(e,"error",o)}return n.apply(e,arguments)}}function AZ(e,r){return O8&&e===1&&!r.file?I8(r.original,"spawn"):null}function cKe(e,r){return O8&&e===1&&!r.file?I8(r.original,"spawnSync"):null}RZ.exports={hookChildProcess:uKe,verifyENOENT:AZ,verifyENOENTSync:cKe,notFoundError:I8}});var NZ=C((err,Ag)=>{"use strict";var IZ=require("child_process"),k8=TZ(),N8=OZ();function kZ(e,r,n){let i=k8(e,r,n),a=IZ.spawn(i.command,i.args,i.options);return N8.hookChildProcess(a,i),a}function lKe(e,r,n){let i=k8(e,r,n),a=IZ.spawnSync(i.command,i.args,i.options);return a.error=a.error||N8.verifyENOENTSync(a.status,i),a}Ag.exports=kZ;Ag.exports.spawn=kZ;Ag.exports.sync=lKe;Ag.exports._parse=k8;Ag.exports._enoent=N8});var LZ=C((trr,$Z)=>{"use strict";$Z.exports=e=>{let r=typeof e=="string"?` `:10,n=typeof e=="string"?"\r":13;return e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e}});var qZ=C((rrr,Aw)=>{"use strict";var Tw=require("path"),MZ=yC(),BZ=e=>{e={cwd:process.cwd(),path:process.env[MZ()],execPath:process.execPath,...e};let r,n=Tw.resolve(e.cwd),i=[];for(;r!==n;)i.push(Tw.join(n,"node_modules/.bin")),r=n,n=Tw.resolve(n,"..");let a=Tw.resolve(e.cwd,e.execPath,"..");return i.push(a),i.concat(e.path).join(Tw.delimiter)};Aw.exports=BZ;Aw.exports.default=BZ;Aw.exports.env=e=>{e={env:process.env,...e};let r={...e.env},n=MZ({env:r});return e.path=r[n],r[n]=Aw.exports(e),r}});var UZ=C((nrr,$8)=>{"use strict";var jZ=(e,r)=>{for(let n of Reflect.ownKeys(r))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n));return e};$8.exports=jZ;$8.exports.default=jZ});var L8=C((irr,xC)=>{"use strict";var fKe=UZ(),vC=new WeakMap,GZ=(e,r={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,i=0,a=e.displayName||e.name||"<anonymous>",o=function(...u){if(vC.set(o,++i),i===1)n=e.apply(this,u),e=null;else if(r.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return n};return fKe(o,e),vC.set(o,i),o};xC.exports=GZ;xC.exports.default=GZ;xC.exports.callCount=e=>{if(!vC.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return vC.get(e)}});var WZ=C(bC=>{"use strict";Object.defineProperty(bC,"__esModule",{value:!0});bC.SIGNALS=void 0;var pKe=[{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"}];bC.SIGNALS=pKe});var M8=C(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});Rg.SIGRTMAX=Rg.getRealtimeSignals=void 0;var dKe=function(){let e=VZ-HZ+1;return Array.from({length:e},hKe)};Rg.getRealtimeSignals=dKe;var hKe=function(e,r){return{name:`SIGRT${r+1}`,number:HZ+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},HZ=34,VZ=64;Rg.SIGRTMAX=VZ});var zZ=C(wC=>{"use strict";Object.defineProperty(wC,"__esModule",{value:!0});wC.getSignals=void 0;var mKe=require("os"),gKe=WZ(),yKe=M8(),vKe=function(){let e=(0,yKe.getRealtimeSignals)();return[...gKe.SIGNALS,...e].map(xKe)};wC.getSignals=vKe;var xKe=function({name:e,number:r,description:n,action:i,forced:a=!1,standard:o}){let{signals:{[e]:u}}=mKe.constants,c=u!==void 0;return{name:e,number:c?u:r,description:n,supported:c,action:i,forced:a,standard:o}}});var YZ=C(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});Og.signalsByNumber=Og.signalsByName=void 0;var bKe=require("os"),KZ=zZ(),wKe=M8(),EKe=function(){return(0,KZ.getSignals)().reduce(_Ke,{})},_Ke=function(e,{name:r,number:n,description:i,supported:a,action:o,forced:u,standard:c}){return{...e,[r]:{name:r,number:n,description:i,supported:a,action:o,forced:u,standard:c}}},DKe=EKe();Og.signalsByName=DKe;var SKe=function(){let e=(0,KZ.getSignals)(),r=wKe.SIGRTMAX+1,n=Array.from({length:r},(i,a)=>CKe(a,e));return Object.assign({},...n)},CKe=function(e,r){let n=PKe(e,r);if(n===void 0)return{};let{name:i,description:a,supported:o,action:u,forced:c,standard:l}=n;return{[e]:{name:i,number:e,description:a,supported:o,action:u,forced:c,standard:l}}},PKe=function(e,r){let n=r.find(({name:i})=>bKe.constants.signals[i]===e);return n!==void 0?n:r.find(i=>i.number===e)},FKe=SKe();Og.signalsByNumber=FKe});var XZ=C((crr,QZ)=>{"use strict";var{signalsByName:TKe}=YZ(),AKe=({timedOut:e,timeout:r,errorCode:n,signal:i,signalDescription:a,exitCode:o,isCanceled:u})=>e?`timed out after ${r} milliseconds`:u?"was canceled":n!==void 0?`failed with ${n}`:i!==void 0?`was killed with ${i} (${a})`:o!==void 0?`failed with exit code ${o}`:"failed",RKe=({stdout:e,stderr:r,all:n,error:i,signal:a,exitCode:o,command:u,escapedCommand:c,timedOut:l,isCanceled:f,killed:p,parsed:{options:{timeout:g}}})=>{o=o===null?void 0:o,a=a===null?void 0:a;let v=a===void 0?void 0:TKe[a].description,x=i&&i.code,D=`Command ${AKe({timedOut:l,timeout:g,errorCode:x,signal:a,signalDescription:v,exitCode:o,isCanceled:f})}: ${u}`,F=Object.prototype.toString.call(i)==="[object Error]",A=F?`${D} ${i.message}`:D,O=[A,r,e].filter(Boolean).join(` `);return F?(i.originalMessage=i.message,i.message=O):i=new Error(O),i.shortMessage=A,i.command=u,i.escapedCommand=c,i.exitCode=o,i.signal=a,i.signalDescription=v,i.stdout=e,i.stderr=r,n!==void 0&&(i.all=n),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=!!l,i.isCanceled=f,i.killed=p&&!l,i};QZ.exports=RKe});var ZZ=C((lrr,B8)=>{"use strict";var EC=["stdin","stdout","stderr"],OKe=e=>EC.some(r=>e[r]!==void 0),JZ=e=>{if(!e)return;let{stdio:r}=e;if(r===void 0)return EC.map(i=>e[i]);if(OKe(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${EC.map(i=>`\`${i}\``).join(", ")}`);if(typeof r=="string")return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);let n=Math.max(r.length,EC.length);return Array.from({length:n},(i,a)=>r[a])};B8.exports=JZ;B8.exports.node=e=>{let r=JZ(e);return r==="ipc"?"ipc":r===void 0||typeof r=="string"?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]}});var eee=C((frr,_C)=>{"use strict";_C.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&_C.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&_C.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var U8=C((prr,Ng)=>{"use strict";var Zr=global.process,qh=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"};qh(Zr)?(tee=require("assert"),Ig=eee(),ree=/^win/i.test(Zr.platform),Rw=require("events"),typeof Rw!="function"&&(Rw=Rw.EventEmitter),Zr.__signal_exit_emitter__?vi=Zr.__signal_exit_emitter__:(vi=Zr.__signal_exit_emitter__=new Rw,vi.count=0,vi.emitted={}),vi.infinite||(vi.setMaxListeners(1/0),vi.infinite=!0),Ng.exports=function(e,r){if(!qh(global.process))return function(){};tee.equal(typeof e,"function","a callback must be provided for exit handler"),kg===!1&&q8();var n="exit";r&&r.alwaysLast&&(n="afterexit");var i=function(){vi.removeListener(n,e),vi.listeners("exit").length===0&&vi.listeners("afterexit").length===0&&DC()};return vi.on(n,e),i},DC=function(){!kg||!qh(global.process)||(kg=!1,Ig.forEach(function(r){try{Zr.removeListener(r,SC[r])}catch{}}),Zr.emit=CC,Zr.reallyExit=j8,vi.count-=1)},Ng.exports.unload=DC,jh=function(r,n,i){vi.emitted[r]||(vi.emitted[r]=!0,vi.emit(r,n,i))},SC={},Ig.forEach(function(e){SC[e]=function(){if(qh(global.process)){var n=Zr.listeners(e);n.length===vi.count&&(DC(),jh("exit",null,e),jh("afterexit",null,e),ree&&e==="SIGHUP"&&(e="SIGINT"),Zr.kill(Zr.pid,e))}}}),Ng.exports.signals=function(){return Ig},kg=!1,q8=function(){kg||!qh(global.process)||(kg=!0,vi.count+=1,Ig=Ig.filter(function(r){try{return Zr.on(r,SC[r]),!0}catch{return!1}}),Zr.emit=iee,Zr.reallyExit=nee)},Ng.exports.load=q8,j8=Zr.reallyExit,nee=function(r){qh(global.process)&&(Zr.exitCode=r||0,jh("exit",Zr.exitCode,null),jh("afterexit",Zr.exitCode,null),j8.call(Zr,Zr.exitCode))},CC=Zr.emit,iee=function(r,n){if(r==="exit"&&qh(global.process)){n!==void 0&&(Zr.exitCode=n);var i=CC.apply(this,arguments);return jh("exit",Zr.exitCode,null),jh("afterexit",Zr.exitCode,null),i}else return CC.apply(this,arguments)}):Ng.exports=function(){return function(){}};var tee,Ig,ree,Rw,vi,DC,jh,SC,kg,q8,j8,nee,CC,iee});var aee=C((drr,see)=>{"use strict";var IKe=require("os"),kKe=U8(),NKe=1e3*5,$Ke=(e,r="SIGTERM",n={})=>{let i=e(r);return LKe(e,r,n,i),i},LKe=(e,r,n,i)=>{if(!MKe(r,n,i))return;let a=qKe(n),o=setTimeout(()=>{e("SIGKILL")},a);o.unref&&o.unref()},MKe=(e,{forceKillAfterTimeout:r},n)=>BKe(e)&&r!==!1&&n,BKe=e=>e===IKe.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",qKe=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return NKe;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},jKe=(e,r)=>{e.kill()&&(r.isCanceled=!0)},UKe=(e,r,n)=>{e.kill(r),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:r}))},GKe=(e,{timeout:r,killSignal:n="SIGTERM"},i)=>{if(r===0||r===void 0)return i;let a,o=new Promise((c,l)=>{a=setTimeout(()=>{UKe(e,n,l)},r)}),u=i.finally(()=>{clearTimeout(a)});return Promise.race([o,u])},WKe=({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})`)},HKe=async(e,{cleanup:r,detached:n},i)=>{if(!r||n)return i;let a=kKe(()=>{e.kill()});return i.finally(()=>{a()})};see.exports={spawnedKill:$Ke,spawnedCancel:jKe,setupTimeout:GKe,validateTimeout:WKe,setExitHandler:HKe}});var PC=C((hrr,oee)=>{"use strict";var Oc=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";Oc.writable=e=>Oc(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";Oc.readable=e=>Oc(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";Oc.duplex=e=>Oc.writable(e)&&Oc.readable(e);Oc.transform=e=>Oc.duplex(e)&&typeof e._transform=="function";oee.exports=Oc});var cee=C((mrr,uee)=>{"use strict";var{PassThrough:VKe}=require("stream");uee.exports=e=>{e={...e};let{array:r}=e,{encoding:n}=e,i=n==="buffer",a=!1;r?a=!(n||i):n=n||"utf8",i&&(n=null);let o=new VKe({objectMode:a});n&&o.setEncoding(n);let u=0,c=[];return o.on("data",l=>{c.push(l),a?u=c.length:u+=l.length}),o.getBufferedValue=()=>r?c:i?Buffer.concat(c,u):c.join(""),o.getBufferedLength=()=>u,o}});var lee=C((grr,Ow)=>{"use strict";var{constants:zKe}=require("buffer"),KKe=require("stream"),{promisify:YKe}=require("util"),QKe=cee(),XKe=YKe(KKe.pipeline),FC=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function G8(e,r){if(!e)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};let{maxBuffer:n}=r,i=QKe(r);return await new Promise((a,o)=>{let u=c=>{c&&i.getBufferedLength()<=zKe.MAX_LENGTH&&(c.bufferedData=i.getBufferedValue()),o(c)};(async()=>{try{await XKe(e,i),a()}catch(c){u(c)}})(),i.on("data",()=>{i.getBufferedLength()>n&&u(new FC)})}),i.getBufferedValue()}Ow.exports=G8;Ow.exports.buffer=(e,r)=>G8(e,{...r,encoding:"buffer"});Ow.exports.array=(e,r)=>G8(e,{...r,array:!0});Ow.exports.MaxBufferError=FC});var pee=C((yrr,fee)=>{"use strict";var{PassThrough:JKe}=require("stream");fee.exports=function(){var e=[],r=new JKe({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=i,r.on("unpipe",a),Array.prototype.slice.call(arguments).forEach(n),r;function n(o){return Array.isArray(o)?(o.forEach(n),this):(e.push(o),o.once("end",a.bind(null,o)),o.once("error",r.emit.bind(r,"error")),o.pipe(r,{end:!1}),this)}function i(){return e.length==0}function a(o){e=e.filter(function(u){return u!==o}),!e.length&&r.readable&&r.end()}}});var gee=C((vrr,mee)=>{"use strict";var hee=PC(),dee=lee(),ZKe=pee(),eYe=(e,r)=>{r===void 0||e.stdin===void 0||(hee(r)?r.pipe(e.stdin):e.stdin.end(r))},tYe=(e,{all:r})=>{if(!r||!e.stdout&&!e.stderr)return;let n=ZKe();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},W8=async(e,r)=>{if(e){e.destroy();try{return await r}catch(n){return n.bufferedData}}},H8=(e,{encoding:r,buffer:n,maxBuffer:i})=>{if(!(!e||!n))return r?dee(e,{encoding:r,maxBuffer:i}):dee.buffer(e,{maxBuffer:i})},rYe=async({stdout:e,stderr:r,all:n},{encoding:i,buffer:a,maxBuffer:o},u)=>{let c=H8(e,{encoding:i,buffer:a,maxBuffer:o}),l=H8(r,{encoding:i,buffer:a,maxBuffer:o}),f=H8(n,{encoding:i,buffer:a,maxBuffer:o*2});try{return await Promise.all([u,c,l,f])}catch(p){return Promise.all([{error:p,signal:p.signal,timedOut:p.timedOut},W8(e,c),W8(r,l),W8(n,f)])}},nYe=({input:e})=>{if(hee(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};mee.exports={handleInput:eYe,makeAllStream:tYe,getSpawnedResult:rYe,validateInputSync:nYe}});var vee=C((xrr,yee)=>{"use strict";var iYe=(async()=>{})().constructor.prototype,sYe=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(iYe,e)]),aYe=(e,r)=>{for(let[n,i]of sYe){let a=typeof r=="function"?(...o)=>Reflect.apply(i.value,r(),o):i.value.bind(r);Reflect.defineProperty(e,n,{...i,value:a})}return e},oYe=e=>new Promise((r,n)=>{e.on("exit",(i,a)=>{r({exitCode:i,signal:a})}),e.on("error",i=>{n(i)}),e.stdin&&e.stdin.on("error",i=>{n(i)})});yee.exports={mergePromise:aYe,getSpawnedPromise:oYe}});var wee=C((brr,bee)=>{"use strict";var xee=(e,r=[])=>Array.isArray(r)?[e,...r]:[e],uYe=/^[\w.-]+$/,cYe=/"/g,lYe=e=>typeof e!="string"||uYe.test(e)?e:`"${e.replace(cYe,'\\"')}"`,fYe=(e,r)=>xee(e,r).join(" "),pYe=(e,r)=>xee(e,r).map(n=>lYe(n)).join(" "),dYe=/ +/g,hYe=e=>{let r=[];for(let n of e.trim().split(dYe)){let i=r[r.length-1];i&&i.endsWith("\\")?r[r.length-1]=`${i.slice(0,-1)} ${n}`:r.push(n)}return r};bee.exports={joinCommand:fYe,getEscapedCommand:pYe,parseCommand:hYe}});var Uh=C((wrr,$g)=>{"use strict";var mYe=require("path"),V8=require("child_process"),gYe=NZ(),yYe=LZ(),vYe=qZ(),xYe=L8(),TC=XZ(),_ee=ZZ(),{spawnedKill:bYe,spawnedCancel:wYe,setupTimeout:EYe,validateTimeout:_Ye,setExitHandler:DYe}=aee(),{handleInput:SYe,getSpawnedResult:CYe,makeAllStream:PYe,validateInputSync:FYe}=gee(),{mergePromise:Eee,getSpawnedPromise:TYe}=vee(),{joinCommand:Dee,parseCommand:See,getEscapedCommand:Cee}=wee(),AYe=1e3*1e3*100,RYe=({env:e,extendEnv:r,preferLocal:n,localDir:i,execPath:a})=>{let o=r?{...process.env,...e}:e;return n?vYe.env({env:o,cwd:i,execPath:a}):o},Pee=(e,r,n={})=>{let i=gYe._parse(e,r,n);return e=i.command,r=i.args,n=i.options,n={maxBuffer:AYe,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=RYe(n),n.stdio=_ee(n),process.platform==="win32"&&mYe.basename(e,".exe")==="cmd"&&r.unshift("/q"),{file:e,args:r,options:n,parsed:i}},Iw=(e,r,n)=>typeof r!="string"&&!Buffer.isBuffer(r)?n===void 0?void 0:"":e.stripFinalNewline?yYe(r):r,AC=(e,r,n)=>{let i=Pee(e,r,n),a=Dee(e,r),o=Cee(e,r);_Ye(i.options);let u;try{u=V8.spawn(i.file,i.args,i.options)}catch(x){let b=new V8.ChildProcess,D=Promise.reject(TC({error:x,stdout:"",std