gemi 0.4.21 → 0.4.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"../http/index.js";import{f as D1,k as w6,m as $2} from"../chunk-e86269d01f94404c.js";import{p as _A,q as l1} from"../chunk-9350baa090b5a424.js";import{r as J2,s as G3} from"../chunk-06eebef7eb056baa.js";import{t as I1,v as i0,x as H6} from"../chunk-c8f1115d77efc1c0.js";var K3=l1((s5,Z3)=>{var I6=function(w){return typeof w=="function"?w:(H)=>H.$extends(w)},k6=function(w){return w},T6=function(...w){return(H)=>H},N=function(w,H){let X=new RegExp(`\\x1b\\[${H}m`,"g"),A=`\x1B[${w}m`,V=`\x1B[${H}m`;return function(W){return!L4.enabled||W==null?W:A+(~(""+W).indexOf(V)?W.replace(X,V+A):W)+V}},l6=function(w){let H={color:F3[u6++%F3.length],enabled:e0.enabled(w),namespace:w,log:e0.log,extend:()=>{}};return new Proxy((...A)=>{let{enabled:V,namespace:W,color:$,log:J}=H;if(A.length!==0&&t0.push([W,...A]),t0.length>p6&&t0.shift(),e0.enabled(W)||V){let Y=A.map((K)=>typeof K=="string"?K:s6(K)),Z=`+${Date.now()-O3}ms`;O3=Date.now(),globalThis.DEBUG_COLORS?J(F2[$](J0(W)),...Y,F2[$](Z)):J(W,...Y,Z)}},{get:(A,V)=>H[V],set:(A,V,W)=>H[V]=W})},s6=function(w,H=2){let X=new Set;return JSON.stringify(w,(A,V)=>{if(typeof V=="object"&&V!==null){if(X.has(V))return"[Circular *]";X.add(V)}else if(typeof V=="bigint")return V.toString();return V},H)},a6=function(w=7500){let H=t0.map(([X,...A])=>`${X} ${A.map((V)=>typeof V=="string"?V:JSON.stringify(V)).join(" ")}`).join(`
2
+ import"../http/index.js";import{f as D1,k as w6,m as $2} from"../chunk-8b3d411f441a43ce.js";import{p as _A,q as l1} from"../chunk-9350baa090b5a424.js";import{r as J2,s as G3} from"../chunk-06eebef7eb056baa.js";import{t as I1,v as i0,x as H6} from"../chunk-c8f1115d77efc1c0.js";var K3=l1((s5,Z3)=>{var I6=function(w){return typeof w=="function"?w:(H)=>H.$extends(w)},k6=function(w){return w},T6=function(...w){return(H)=>H},N=function(w,H){let X=new RegExp(`\\x1b\\[${H}m`,"g"),A=`\x1B[${w}m`,V=`\x1B[${H}m`;return function(W){return!L4.enabled||W==null?W:A+(~(""+W).indexOf(V)?W.replace(X,V+A):W)+V}},l6=function(w){let H={color:F3[u6++%F3.length],enabled:e0.enabled(w),namespace:w,log:e0.log,extend:()=>{}};return new Proxy((...A)=>{let{enabled:V,namespace:W,color:$,log:J}=H;if(A.length!==0&&t0.push([W,...A]),t0.length>p6&&t0.shift(),e0.enabled(W)||V){let Y=A.map((K)=>typeof K=="string"?K:s6(K)),Z=`+${Date.now()-O3}ms`;O3=Date.now(),globalThis.DEBUG_COLORS?J(F2[$](J0(W)),...Y,F2[$](Z)):J(W,...Y,Z)}},{get:(A,V)=>H[V],set:(A,V,W)=>H[V]=W})},s6=function(w,H=2){let X=new Set;return JSON.stringify(w,(A,V)=>{if(typeof V=="object"&&V!==null){if(X.has(V))return"[Circular *]";X.add(V)}else if(typeof V=="bigint")return V.toString();return V},H)},a6=function(w=7500){let H=t0.map(([X,...A])=>`${X} ${A.map((V)=>typeof V=="string"?V:JSON.stringify(V)).join(" ")}`).join(`
3
3
  `);return H.length<w?H:H.slice(-w)},o6=function(){t0.length=0},n6=function(){let w=process.env.PRISMA_QUERY_ENGINE_LIBRARY;if(!(w&&i6.default.existsSync(w))&&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".)')},t6=function(w,H){let X=H==="url";return w.includes("windows")?X?"query_engine.dll.node":`query_engine-${w}.dll.node`:w.includes("darwin")?X?`${k1}.dylib.node`:`${k1}-${w}.dylib.node`:X?`${k1}.so.node`:`${k1}-${w}.so.node`},A0=function(w){return Object.assign(w,{optional:()=>H7(w),and:(H)=>g(w,H),or:(H)=>X7(w,H),select:(H)=>H===void 0?L3(w):L3(H,w)})},H7=function(w){return A0({[x0]:()=>({match:(H)=>{let X={},A=(V,W)=>{X[V]=W};return H===void 0?(N0(w).forEach((V)=>A(V,void 0)),{matched:!0,selections:X}):{matched:G0(w,H,A),selections:X}},getSelectionKeys:()=>N0(w),matcherType:"optional"})})},g=function(...w){return A0({[x0]:()=>({match:(H)=>{let X={},A=(V,W)=>{X[V]=W};return{matched:w.every((V)=>G0(V,H,A)),selections:X}},getSelectionKeys:()=>V1(w,N0),matcherType:"and"})})},X7=function(...w){return A0({[x0]:()=>({match:(H)=>{let X={},A=(V,W)=>{X[V]=W};return V1(w,N0).forEach((V)=>A(V,void 0)),{matched:w.some((V)=>G0(V,H,A)),selections:X}},getSelectionKeys:()=>V1(w,N0),matcherType:"or"})})},S=function(w){return{[x0]:()=>({match:(H)=>({matched:!!w(H)})})}},L3=function(...w){let H=typeof w[0]=="string"?w[0]:void 0,X=w.length===2?w[1]:typeof w[0]=="string"?void 0:w[0];return A0({[x0]:()=>({match:(A)=>{let V={[H??g1]:A};return{matched:X===void 0||G0(X,A,(W,$)=>{V[W]=$}),selections:V}},getSelectionKeys:()=>[H??g1].concat(X===void 0?[]:N0(X))})})},K0=function(w){return typeof w=="number"},T0=function(w){return typeof w=="string"},C0=function(w){return typeof w=="bigint"},a1=function(w){return new A7(w,U2)},Y2=function(w,...H){$7.warn()&&console.warn(`${W7.warn} ${w}`,...H)};async function Z7(){let w=_2.default.platform(),H=process.arch;if(w==="freebsd"){let $=await E1("freebsd-version");if($&&$.trim().length>0){let J=/^(\d+)\.?/.exec($);if(J)return{platform:"freebsd",targetDistro:`freebsd${J[1]}`,arch:H}}}if(w!=="linux")return{platform:w,arch:H};let X=await z7(),A=await U7(),V=G7({arch:H,archFromUname:A,familyDistro:X.familyDistro}),{libssl:W}=await B7(V);return{platform:"linux",libssl:W,arch:H,archFromUname:A,...X}}var K7=function(w){let H=/^ID="?([^"\n]*)"?$/im,X=/^ID_LIKE="?([^"\n]*)"?$/im,A=H.exec(w),V=A&&A[1]&&A[1].toLowerCase()||"",W=X.exec(w),$=W&&W[1]&&W[1].toLowerCase()||"",J=a1({id:V,idLike:$}).with({id:"alpine"},({id:Y})=>({targetDistro:"musl",familyDistro:Y,originalDistro:Y})).with({id:"raspbian"},({id:Y})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:Y})).with({id:"nixos"},({id:Y})=>({targetDistro:"nixos",originalDistro:Y,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:Y})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:Y})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:Y})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:Y})).when(({idLike:Y})=>Y.includes("debian")||Y.includes("ubuntu"),({id:Y})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:Y})).when(({idLike:Y})=>V==="arch"||Y.includes("arch"),({id:Y})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:Y})).when(({idLike:Y})=>Y.includes("centos")||Y.includes("fedora")||Y.includes("rhel")||Y.includes("suse"),({id:Y})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:Y})).otherwise(({id:Y})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:Y}));return o(`Found distro info:
4
4
  ${JSON.stringify(J,null,2)}`),J};async function z7(){let w="/etc/os-release";try{let H=await Q4.default.readFile(w,{encoding:"utf-8"});return K7(H)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}var j7=function(w){let H=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(w);if(H){let X=`${H[1]}.x`;return U4(X)}},_3=function(w){let H=/libssl\.so\.(\d)(\.\d)?/.exec(w);if(H){let X=`${H[1]}${H[2]??".0"}.x`;return U4(X)}},U4=function(w){let H=(()=>{if(D4(w))return w;let X=w.split(".");return X[1]="0",X.join(".")})();if(Y7.includes(H))return H},G7=function(w){return a1(w).with({familyDistro:"musl"},()=>(o('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:H})=>(o('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${H}-linux-gnu`,`/lib/${H}-linux-gnu`])).with({familyDistro:"rhel"},()=>(o('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:H,arch:X,archFromUname:A})=>(o(`Don't know any platform-specific paths for "${H}" on ${X} (${A})`),[]))};async function B7(w){let H='grep -v "libssl.so.0"',X=await Q3(w);if(X){o(`Found libssl.so file using platform-specific paths: ${X}`);let W=_3(X);if(o(`The parsed libssl version is: ${W}`),W)return{libssl:W,strategy:"libssl-specific-path"}}o('Falling back to "ldconfig" and other generic paths');let A=await E1(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${H}`);if(A||(A=await Q3(["/lib64","/usr/lib64","/lib"])),A){o(`Found libssl.so file using "ldconfig" or other generic paths: ${A}`);let W=_3(A);if(o(`The parsed libssl version is: ${W}`),W)return{libssl:W,strategy:"ldconfig"}}let V=await E1("openssl version -v");if(V){o(`Found openssl binary with version: ${V}`);let W=j7(V);if(o(`The parsed openssl version is: ${W}`),W)return{libssl:W,strategy:"openssl-binary"}}return o("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Q3(w){for(let H of w){let X=await F7(H);if(X)return X}}async function F7(w){try{return(await Q4.default.readdir(w)).find((H)=>H.startsWith("libssl.so.")&&!H.startsWith("libssl.so.0"))}catch(H){if(H.code==="ENOENT")return;throw H}}async function u2(){let{binaryTarget:w}=await x4();return w}var O7=function(w){return w.binaryTarget!==void 0};async function L7(){let{memoized:w,...H}=await x4();return H}async function x4(){if(O7(T1))return Promise.resolve({...T1,memoized:!0});let w=await Z7(),H=_7(w);return T1={...w,binaryTarget:H},{...T1,memoized:!1}}var _7=function(w){let{platform:H,arch:X,archFromUname:A,libssl:V,targetDistro:W,familyDistro:$,originalDistro:J}=w;H==="linux"&&!["x64","arm64"].includes(X)&&Y2(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${X}" 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 "${A}".`);let Y="1.1.x";if(H==="linux"&&V===void 0){let K=a1({familyDistro:$}).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.");Y2(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${Y}".
5
5
  ${K}`)}let Z="debian";if(H==="linux"&&W===void 0&&o(`Distro is "${J}". Falling back to Prisma engines built for "${Z}".`),H==="darwin"&&X==="arm64")return"darwin-arm64";if(H==="darwin")return"darwin";if(H==="win32")return"windows";if(H==="freebsd")return W;if(H==="openbsd")return"openbsd";if(H==="netbsd")return"netbsd";if(H==="linux"&&W==="nixos")return"linux-nixos";if(H==="linux"&&X==="arm64")return`${W==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${V||Y}`;if(H==="linux"&&X==="arm")return`linux-arm-openssl-${V||Y}`;if(H==="linux"&&W==="musl"){let K="linux-musl";return!V||D4(V)?K:`${K}-openssl-${V}`}return H==="linux"&&W&&V?`${W}-openssl-${V}`:(H!=="linux"&&Y2(`Prisma detected unknown OS "${H}" and may not work as expected. Defaulting to "linux".`),V?`${Z}-openssl-${V}`:W?`${W}-openssl-${Y}`:`${Z}-openssl-${Y}`)};async function Q7(w){try{return await w()}catch{return}}var E1=function(w){return Q7(async()=>{let H=await J7(w);return o(`Command "${w}" successfully returned "${H.stdout}"`),H.stdout})};async function U7(){return typeof _2.default.machine=="function"?_2.default.machine():(await E1("uname -m"))?.trim()}var D4=function(w){return w.startsWith("1.")},D7=function(w){return x7.default(w,w,{fallback:H0})},I7=function(){return f.default.join(__dirname,"../")},k7=function(w){if(process.platform==="win32")return;let H=U3.default.statSync(w),X=H.mode|64|8|1;if(H.mode===X){x3(`Execution permissions of ${w} are fine`);return}let A=X.toString(8).slice(-3);x3(`Have to call chmodPlusX on ${w}`),U3.default.chmodSync(w,A)},T7=function(w){let H=w.e,X=(J)=>`Prisma cannot find the required \`${J}\` system library in your system`,A=H.message.includes("cannot open shared object file"),V=`Please refer to the documentation about Prisma's system requirements: ${D7("https://pris.ly/d/system-requirements")}`,W=`Unable to require(\`${z1(w.id)}\`).`,$=a1({message:H.message,code:H.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:J})=>A&&J.includes("libz"),()=>`${X("libz")}. Please install it and try again.`).when(({message:J})=>A&&J.includes("libgcc_s"),()=>`${X("libgcc_s")}. Please install it and try again.`).when(({message:J})=>A&&J.includes("libssl"),()=>{let J=w.platformInfo.libssl?`openssl-${w.platformInfo.libssl}`:"openssl";return`${X("libssl")}. Please install ${J} and try again.`}).when(({message:J})=>J.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${V}`).when(({message:J})=>w.platformInfo.platform==="linux"&&J.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${w.platformInfo.originalDistro} on (${w.platformInfo.archFromUname}) which uses the \`${w.platformInfo.binaryTarget}\` binaryTarget by default. ${V}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${V}`);return`${W}
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../auth/adapters/prisma.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,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