@qitqode/qitqode-android-arm64 0.1.31 → 0.1.32
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/bundle/{chunk-c14s0kxq.js → chunk-02jtpxe0.js} +1 -1
- package/bundle/{chunk-6t1ehq36.js → chunk-096pd6c4.js} +1 -1
- package/bundle/{chunk-jcjbr3q7.js → chunk-0c2p3a6v.js} +1 -1
- package/bundle/{chunk-53w4zqps.js → chunk-0c5rxty9.js} +1 -1
- package/bundle/{chunk-9mjz6e27.js → chunk-0e86gt9r.js} +1 -1
- package/bundle/{chunk-6bpe215q.js → chunk-15j5cn4t.js} +1 -1
- package/bundle/{chunk-0w0ctb90.js → chunk-1r95p0tp.js} +1 -1
- package/bundle/{chunk-mh0j6dzy.js → chunk-20702epe.js} +1 -1
- package/bundle/{chunk-04n2ycg5.js → chunk-257me4z3.js} +4 -4
- package/bundle/{chunk-83gqkmth.js → chunk-2phz0bn9.js} +1 -1
- package/bundle/{chunk-1fswr17z.js → chunk-2wajs9xv.js} +1 -1
- package/bundle/{chunk-3ytjm3az.js → chunk-3nx7112w.js} +1 -1
- package/bundle/{chunk-drvkj3xg.js → chunk-3wetyrjs.js} +1 -1
- package/bundle/{chunk-20f83ca0.js → chunk-4sc82a27.js} +1 -1
- package/bundle/{chunk-4gkk28xk.js → chunk-56z7x7h4.js} +1 -1
- package/bundle/{chunk-hnctaq8s.js → chunk-59yqvk48.js} +1 -1
- package/bundle/{chunk-0yt5njh7.js → chunk-5jx0yadh.js} +2 -2
- package/bundle/{chunk-6bphjajd.js → chunk-5pb551dx.js} +1 -1
- package/bundle/{chunk-anwnwfjf.js → chunk-634pnryq.js} +1 -1
- package/bundle/{chunk-cnmq5xtq.js → chunk-6aqyhfag.js} +2 -2
- package/bundle/{chunk-gcw4rn10.js → chunk-764fksh3.js} +1 -1
- package/bundle/{chunk-cmbh77cs.js → chunk-7tr9ejyk.js} +1 -1
- package/bundle/{chunk-ssajqv72.js → chunk-7z777y9k.js} +1 -1
- package/bundle/{chunk-qvnb3j71.js → chunk-85wcc1tp.js} +1 -1
- package/bundle/{chunk-csz0dgyp.js → chunk-89w3yhf8.js} +1 -1
- package/bundle/chunk-8dwq41q1.js +28 -0
- package/bundle/{chunk-11x3t2tt.js → chunk-8r6ht39z.js} +1 -1
- package/bundle/{chunk-d68fzyw7.js → chunk-9gazyynx.js} +1 -1
- package/bundle/{chunk-ehhas0ew.js → chunk-ad72gb5f.js} +1 -1
- package/bundle/{chunk-gbrnn2dk.js → chunk-avf8v3hb.js} +1 -1
- package/bundle/{chunk-fq0x3esz.js → chunk-caj1b9y7.js} +2 -2
- package/bundle/chunk-d0damw6y.js +2 -0
- package/bundle/{chunk-qbc36nbb.js → chunk-d3ermm6d.js} +1 -1
- package/bundle/{chunk-c1bdzxbx.js → chunk-d9hbhkbq.js} +1 -1
- package/bundle/{chunk-bgw4fvg2.js → chunk-e5mv5wnt.js} +1 -1
- package/bundle/{chunk-31mnd3ph.js → chunk-ew9pdrp9.js} +1 -1
- package/bundle/{chunk-redjxn13.js → chunk-ezfy0b6q.js} +1 -1
- package/bundle/{chunk-takew94z.js → chunk-gz8sz7z1.js} +1 -1
- package/bundle/{chunk-abd1cfpg.js → chunk-h6f3kbz2.js} +1 -1
- package/bundle/{chunk-r4ndwym0.js → chunk-hnvn2c25.js} +1 -1
- package/bundle/{chunk-pxvk3syj.js → chunk-jdynx7m6.js} +1 -1
- package/bundle/{chunk-ez8vkgfz.js → chunk-k1txw65h.js} +1 -1
- package/bundle/{chunk-mxzceza9.js → chunk-k5atbdbm.js} +1 -1
- package/bundle/{chunk-4d87mhwn.js → chunk-k75jqg60.js} +1 -1
- package/bundle/{chunk-pctt1qv8.js → chunk-k7aenxan.js} +1 -1
- package/bundle/{chunk-s9ntkjz3.js → chunk-m2q317gh.js} +1 -1
- package/bundle/{chunk-1f7ajq8s.js → chunk-mahgmbt9.js} +1 -1
- package/bundle/{chunk-68yw2hk9.js → chunk-mqd1jsg2.js} +1 -1
- package/bundle/{chunk-8ymffyep.js → chunk-nkkch4h7.js} +1 -1
- package/bundle/{chunk-z6pwkwdr.js → chunk-pje60pj2.js} +1 -1
- package/bundle/{chunk-c1vnp55z.js → chunk-pv67gwce.js} +1 -1
- package/bundle/{chunk-50sv6y2e.js → chunk-q7vasbxn.js} +1 -1
- package/bundle/chunk-qadw6j20.js +2 -0
- package/bundle/{chunk-n0dy98h2.js → chunk-qggcszs2.js} +1 -1
- package/bundle/{chunk-873skv7w.js → chunk-r7sqdfad.js} +1 -1
- package/bundle/{chunk-50tb3g5x.js → chunk-r8m7rtfc.js} +1 -1
- package/bundle/{chunk-7pfj4x1a.js → chunk-rkyf0cp8.js} +1 -1
- package/bundle/{chunk-f8eter69.js → chunk-rza530gm.js} +1 -1
- package/bundle/{chunk-mcg24gkb.js → chunk-s3mnrhbx.js} +1 -1
- package/bundle/{chunk-f2btnww9.js → chunk-s6ktx2sx.js} +1 -1
- package/bundle/{chunk-eh7e49k4.js → chunk-w7vh8cxt.js} +1 -1
- package/bundle/{chunk-pf9g671w.js → chunk-w8saweey.js} +1 -1
- package/bundle/{chunk-r78czx4d.js → chunk-we9cv8we.js} +1 -1
- package/bundle/{chunk-3h9rq2wq.js → chunk-wezarrvy.js} +1 -1
- package/bundle/{chunk-g9cjsfvg.js → chunk-whe7h2mj.js} +1 -1
- package/bundle/{chunk-phv9kdq6.js → chunk-wmqsdt2c.js} +1 -1
- package/bundle/{chunk-fjq3a347.js → chunk-wqj0xasg.js} +1 -1
- package/bundle/{chunk-vb286b31.js → chunk-wr42tphe.js} +1 -1
- package/bundle/{chunk-fyqjm5fv.js → chunk-x25zkrz7.js} +1 -1
- package/bundle/{chunk-m5m448mg.js → chunk-xj765svc.js} +1 -1
- package/bundle/{chunk-d65qs4d0.js → chunk-xrs18kzn.js} +1 -1
- package/bundle/{chunk-5v0xjs3x.js → chunk-y6123zvq.js} +1 -1
- package/bundle/{chunk-fxdtq2ed.js → chunk-y7sy3w6z.js} +1 -1
- package/bundle/{chunk-44a82dg0.js → chunk-ygs5pzk7.js} +2 -2
- package/bundle/{chunk-jxswwvr3.js → chunk-za7mwbye.js} +1 -1
- package/bundle/{chunk-vbeb74ny.js → chunk-zaks8cae.js} +1 -1
- package/bundle/{chunk-9x5232dw.js → chunk-zcsgqk9f.js} +1 -1
- package/bundle/{chunk-5eq1fft9.js → chunk-zqqx96jx.js} +1 -1
- package/bundle/index.js +3 -3
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-excnptfy.js +0 -2
- package/bundle/chunk-nsk8dkwp.js +0 -28
- package/bundle/chunk-ppjnqexm.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{Co as G$}from"./chunk-2hc5z7b5.js";import{dt as eZ,it as U$,jt as A$,lt as CZ,mt as KZ}from"./chunk-tqj69nh6.js";import{tt as k$}from"./chunk-ag8kz1e7.js";import{ut as SZ}from"./chunk-5tray1fw.js";import{AF as i,CN as fZ,DF as K$,DN as iZ,GF as o,HE as D$,HN as PZ,IF as l,IN as lZ,ME as RZ,MF as h,MN as cZ,Mz as a,NF as Q$,PA as kZ,PF as c,PG as EZ,QF as vZ,QN as v,SN as Y$,TA as rZ,TM as X$,UA as sZ,VH as YZ,WM as d,XD as $$,YM as m,_F as IZ,_N as F$,bG as zZ,bH as p,cE as q$,dA as L,dE as E,dN as DZ,eA as Z$,fE as WZ,gA as ZZ,gE as z$,hN as C,iA as oZ,mC as gZ,pH as P,pN as r,sF as $Z,tF as LZ,uF as qZ,uG as xZ,uN as B$,vF as f,vG as V$,xF as jZ,zF as J$,zN as JZ}from"./chunk-zs8kqdsf.js";import{BO as u$,DO as BZ,FO as h$}from"./chunk-7xm75w1e.js";var pZ={};BZ(pZ,{makeHandle:()=>AZ,make:()=>GZ,ProcessId:()=>UZ,ExitCode:()=>FZ,ChildProcessSpawner:()=>W});var FZ=YZ(),UZ=YZ(),hZ="~effect/ChildProcessSpawner/ChildProcessHandle",j$={[hZ]:hZ,...kZ,toJSON(){return{_id:"ChildProcessHandle",pid:this.pid}}},AZ=(Z)=>Object.assign(Object.create(j$),Z),GZ=(Z)=>{let q=(B,Q)=>Z(B).pipe(h((U)=>fZ(Q?.includeStderr===!0?U.all:U.stdout)),r),z=(B,Q)=>iZ(q(B,Q));return W.of({spawn:Z,exitCode:(B)=>xZ(o(Z(B),(Q)=>Q.exitCode)),streamString:q,streamLines:z,lines:(B,Q)=>lZ(z(B,Q)),string:(B,Q)=>cZ(q(B,Q))})};class W extends gZ()("effect/process/ChildProcessSpawner"){}var x={};BZ(x,{setEnv:()=>HZ,setCwd:()=>yZ,prefix:()=>C$,pipeTo:()=>P$,parseFdName:()=>g,make:()=>k,isStandardCommand:()=>I$,isPipedCommand:()=>E$,isCommand:()=>s,fdName:()=>NZ});var MZ="~effect/unstable/process/ChildProcess",aZ={...rZ,...sZ,[MZ]:MZ,asEffect(){return W.use((Z)=>Z.spawn(this))}},s=(Z)=>oZ(Z,MZ),I$=(Z)=>Z._tag==="StandardCommand",E$=(Z)=>Z._tag==="PipedCommand",I=(Z,q,z)=>Object.assign(Object.create(aZ),{_tag:"StandardCommand",command:Z,args:q,options:z}),e=(Z,q,z={})=>Object.assign(Object.create(aZ),{_tag:"PipedCommand",left:Z,right:q,options:z}),k=function(...q){if(OZ(q[0])){let[U,...A]=q,G=bZ(U,A);return I(G[0]??"",G.slice(1),{})}if(typeof q[0]==="object"&&!Array.isArray(q[0])&&!OZ(q[0])){let U=q[0];return function(A,...G){let b=bZ(A,G);return I(b[0]??"",b.slice(1),U)}}if(typeof q[0]==="string"&&!Array.isArray(q[1])){let[U,A={}]=q;return I(U,[],A)}let[z,B=[],Q={}]=q;return I(z,B,Q)},P$=a((Z)=>s(Z[0])&&s(Z[1]),(Z,q,z)=>e(Z,q,z??{})),C$=function(...q){if(s(q[0])&&q.length>1){let[B,...Q]=q,U=dZ(Q);return _Z(B,U)}let z=dZ(q);return(B)=>_Z(B,z)},dZ=(Z)=>{if(OZ(Z[0])){let[B,...Q]=Z,U=bZ(B,Q);return{command:U[0]??"",args:U.slice(1)}}let[q,z=[]]=Z;return{command:q,args:z}},_Z=(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(q.command,[...q.args,Z.command,...Z.args],Z.options);case"PipedCommand":return e(_Z(Z.left,q),Z.right,Z.options)}},yZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(Z.command,Z.args,{...Z.options,cwd:q});case"PipedCommand":return e(yZ(Z.left,q),yZ(Z.right,q),Z.options)}}),HZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":{let z=Z.options.env===void 0?q:{...Z.options.env,...q};return I(Z.command,Z.args,{...Z.options,env:z})}case"PipedCommand":return e(HZ(Z.left,q),HZ(Z.right,q),Z.options)}}),OZ=(Z)=>Array.isArray(Z)&&("raw"in Z)&&Array.isArray(Z.raw),g=(Z)=>{let q=/^fd(\d+)$/.exec(Z);if(q===null)return;let z=parseInt(q[1],10);return z>=3?z:void 0},NZ=(Z)=>`fd${Z}`,bZ=(Z,q)=>{let z=[];for(let[B,Q]of Z.entries())z=S$(Z,q,z,Q,B);return z},S$=(Z,q,z,B,Q)=>{let U=Z.raw[Q];if(U===void 0)throw Error(`Invalid backslash sequence: ${Z.raw[Q]}`);let{hasLeadingWhitespace:A,hasTrailingWhitespace:G,tokens:b}=w$(B,U),N=nZ(z,b,A);if(Q===q.length)return N;let S=q[Q],QZ=Array.isArray(S)?S.map((VZ)=>mZ(VZ)):[mZ(S)];return nZ(N,QZ,G)},mZ=(Z)=>{if(typeof Z==="string")return Z;return String(Z)},tZ=new Set([" ","\t","\r",`
|
|
3
3
|
`]),T$={x:3,u:5},w$=(Z,q)=>{if(q.length===0)return{tokens:[],hasLeadingWhitespace:!1,hasTrailingWhitespace:!1};let z=tZ.has(q[0]),B=[],Q=0;for(let A=0,G=0;A<Z.length;A+=1,G+=1){let b=q[G];if(tZ.has(b)){if(Q!==A)B.push(Z.slice(Q,A));Q=A+1}else if(b==="\\"){let N=q[G+1];if(N===`
|
|
4
|
-
`)A-=1,G+=1;else if(N==="u"&&q[G+2]==="{")G=q.indexOf("}",G+3);else G+=T$[N]??1}}let U=Q===Z.length;if(!U)B.push(Z.slice(Q));return{tokens:B,hasLeadingWhitespace:z,hasTrailingWhitespace:U}},nZ=(Z,q,z)=>z||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q.at(0)}`,...q.slice(1)];var _$=u$(k$(),1);import*as M$ from"child_process";import{PassThrough as g$}from"stream";var R=(Z)=>Z instanceof globalThis.Error?Z:new globalThis.Error(String(Z)),x$=(Z)=>{switch(Z.code){case"ENOENT":return"NotFound";case"EACCES":return"PermissionDenied";case"EEXIST":return"AlreadyExists";case"EISDIR":return"BadResource";case"ENOTDIR":return"BadResource";case"EBUSY":return"Busy";case"ELOOP":return"BadResource";default:return"Unknown"}},y$=(Z)=>{let q=[],z=[],B=(A)=>{switch(A._tag){case"StandardCommand":q.push(A);return;case"PipedCommand":B(A.left),z.push(A.options),B(A.right);return}};if(B(Z),q.length===0)throw Error("flatten produced empty commands array");let[Q,...U]=q;return{commands:[Q,...U],opts:z}},O=(Z,q,z)=>{let B=y$(z).commands.map((Q)=>`${Q.command} ${Q.args.join(" ")}`).join(" | ");return X$({_tag:x$(q),module:"ChildProcess",method:Z,pathOrDescriptor:B,syscall:q.syscall,cause:q})},f$=J$(function*(){let Z=yield*Y$,q=yield*F$,z=p(function*($){if(L($.cwd))return;return yield*Z.access($.cwd),q.resolve($.cwd)}),B=($)=>$.extendEnv?{...eZ(),...$.env}:$.env,Q=($)=>DZ($)?"pipe":$,U=($)=>d($)?"pipe":$,A=($)=>{let D={stream:"pipe",encoding:"utf-8",endOnDone:!0};if(L($.stdin))return D;if(typeof $.stdin==="string")return{...D,stream:$.stdin};if(DZ($.stdin))return{...D,stream:$.stdin};return{stream:$.stdin.stream,encoding:$.stdin.encoding??D.encoding,endOnDone:$.stdin.endOnDone??D.endOnDone}},G=($,D)=>{let J=$[D];if(L(J))return{stream:"pipe"};if(typeof J==="string")return{stream:J};if(d(J))return{stream:J};return{stream:J.stream}},b=($)=>{if(L($.additionalFds))return[];return Object.entries($.additionalFds).flatMap(([D,J])=>{let K=g(D);return L(K)?[]:[{fd:K,config:J}]}).toSorted((D,J)=>D.fd-J.fd)},N=($,D,J,K)=>{let X=(F)=>process.platform==="win32"&&F==="pipe"?"overlapped":F,Y=[X(Q($.stream)),X(U(D.stream)),X(U(J.stream))];if(K.length===0)return Y;let V=K.reduce((F,_)=>Math.max(F,_.fd),2);for(let F=3;F<=V;F++)Y[F]="ignore";for(let F of K)Y[F.fd]=X("pipe");return Y},S=p(function*($,D,J){if(J.length===0)return{getInputFd:()=>m,getOutputFd:()=>C};let K=new Map,X=new Map;for(let Y of J){let V=D.stdio[Y.fd];switch(Y.config.type){case"input":{let F=m;if(V&&"write"in V)F=CZ.fromWritable({evaluate:()=>V,onError:(_)=>O(`fromWritable(fd${Y.fd})`,R(_),$),endOnDone:!0});if(Y.config.stream)yield*EZ(PZ(Y.config.stream,F));K.set(Y.fd,F);break}case"output":{let F=C;if(V&&"read"in V){let _=new g$;V.on("error",(y)=>_.destroy(R(y))),V.pipe(_),F=KZ.fromReadable({evaluate:()=>_,onError:(y)=>O(`fromReadable(fd${Y.fd})`,R(y),$)})}if(Y.config.sink)F=JZ(F,Y.config.sink);X.set(Y.fd,F);break}}}return{getInputFd:(Y)=>K.get(Y)??m,getOutputFd:(Y)=>X.get(Y)??C}}),QZ=($,D,J)=>LZ(()=>{let K=m;if(ZZ(D.stdin))K=CZ.fromWritable({evaluate:()=>D.stdin,onError:(X)=>O("fromWritable(stdin)",R(X),$),endOnDone:J.endOnDone,encoding:J.encoding});if(DZ(J.stream))return Q$(EZ(PZ(J.stream,K)),K);return $Z(K)}),VZ=($,D,J,K)=>{let X=D.stdout?KZ.fromReadable({evaluate:()=>D.stdout,onError:(V)=>O("fromReadable(stdout)",R(V),$)}):C,Y=D.stderr?KZ.fromReadable({evaluate:()=>D.stderr,onError:(V)=>O("fromReadable(stderr)",R(V),$)}):C;if(d(J.stream))X=JZ(X,J.stream);if(d(K.stream))Y=JZ(Y,K.stream);return{stdout:X,stderr:Y,all:B$(X,Y)}},b$=($,D)=>jZ((J)=>{let K=q$(),X=_$.default($.command,$.args,D),Y=!1,V;return X.on("error",(F)=>{J(i(O("spawn",F,$)))}),X.on("exit",(...F)=>{V=F}),X.on("close",(...F)=>{if(Y)return;Y=!0,z$(K,$$(V??F))}),X.on("spawn",()=>{J($Z([X,K]))}),qZ(()=>{X.kill("SIGTERM")})}),XZ=($,D,J)=>{if(globalThis.process.platform==="win32")return jZ((K)=>{M$.exec(`taskkill /pid ${D.pid} /T /F`,{windowsHide:!0},(X)=>{if(X)return K(i(O("kill",R(X),$)));K(f)})});return K$({try:()=>{globalThis.process.kill(-D.pid,J)},catch:(K)=>O("kill",R(K),$)})},wZ=($,D,J)=>LZ(()=>{if(D.kill(J))return f;return i(O("kill",Error("Failed to kill child process"),$))}),N$=($,D,J)=>(K)=>{let X=J?.killSignal??"SIGTERM";if(L(J?.forceKillAfter))return K(D,$,X);return zZ(K(D,$,X),{duration:J.forceKillAfter,orElse:()=>K(D,$,"SIGKILL")})},W$=($,D)=>{let J=D??"stdout";switch(J){case"stdout":return $.stdout;case"stderr":return $.stderr;case"all":return $.all;default:{let K=g(J);return Z$(K)?$.getOutputFd(K):$.stdout}}},T=p(function*($){switch($._tag){case"StandardCommand":{let D=A($.options),J=G($.options,"stdout"),K=G($.options,"stderr"),X=b($.options),Y=yield*z($.options),[V,F]=yield*V$(b$($,{cwd:Y,env:B($.options),stdio:N(D,J,K,X),detached:$.options.detached??process.platform!=="win32",shell:$.options.shell,windowsHide:process.platform==="win32"}),p(function*([M,H]){let t=yield*WZ(H),n=N$(M,$,$.options);if(t){let[u]=yield*E(H);if(process.platform==="win32")return yield*f;if(u!==0&&ZZ(u))return yield*IZ(n(XZ));return yield*f}let w=(u)=>vZ(XZ($,M,u),()=>wZ($,M,u)),R$=$.options.killSignal??"SIGTERM",uZ=w(R$).pipe(l(E(H)),c),L$=$.options.forceKillAfter?zZ(uZ,{duration:$.options.forceKillAfter,orElse:()=>w("SIGKILL").pipe(l(E(H)),c)}):uZ;return yield*IZ(L$)})),_=yield*S($,V,X),y=VZ($,V,J,K),j=!0;return AZ({pid:UZ(V.pid),stdin:yield*QZ($,V,D),stdout:y.stdout,stderr:y.stderr,all:y.all,getInputFd:_.getInputFd,getOutputFd:_.getOutputFd,isRunning:h(WZ(F),(M)=>!M),exitCode:o(E(F),([M,H])=>{if(ZZ(M))return $Z(FZ(M));return i(O("exitCode",Error(`Process interrupted due to receipt of signal: '${H}'`),$))}),kill:(M)=>{let H=M?.killSignal??"SIGTERM",t=(w)=>vZ(XZ($,V,w),()=>wZ($,V,w)),n=t(H).pipe(l(E(F)),c);if(!M?.forceKillAfter)return n;return zZ(n,{duration:M.forceKillAfter,orElse:()=>t("SIGKILL").pipe(l(E(F)),c)})},unref:qZ(()=>{if(j)V.unref(),j=!1;return qZ(()=>{if(!j)V.ref(),j=!0})})})}case"PipedCommand":{let D=y$($),[J,...K]=D.commands,X=T(J);for(let Y=0;Y<K.length;Y++){let V=K[Y],F=D.opts[Y]??{},_=A(V.options),y=r(h(X,(H)=>W$(H,F.from))),j=F.to??"stdin";if(j==="stdin"){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}let M=g(j);if(L(M)){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}X=T(k(V.command,V.args,{...V.options,additionalFds:{...V.options.additionalFds,[NZ(M)]:{type:"input",stream:y}}}))}return yield*X}}});return GZ(T)}),i$=D$(W,f$),l$=i$.pipe(RZ(U$.layer),RZ(A$)),Bq=G$(async()=>{let{makeRuntime:Z}=await import("./chunk-
|
|
4
|
+
`)A-=1,G+=1;else if(N==="u"&&q[G+2]==="{")G=q.indexOf("}",G+3);else G+=T$[N]??1}}let U=Q===Z.length;if(!U)B.push(Z.slice(Q));return{tokens:B,hasLeadingWhitespace:z,hasTrailingWhitespace:U}},nZ=(Z,q,z)=>z||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q.at(0)}`,...q.slice(1)];var _$=u$(k$(),1);import*as M$ from"child_process";import{PassThrough as g$}from"stream";var R=(Z)=>Z instanceof globalThis.Error?Z:new globalThis.Error(String(Z)),x$=(Z)=>{switch(Z.code){case"ENOENT":return"NotFound";case"EACCES":return"PermissionDenied";case"EEXIST":return"AlreadyExists";case"EISDIR":return"BadResource";case"ENOTDIR":return"BadResource";case"EBUSY":return"Busy";case"ELOOP":return"BadResource";default:return"Unknown"}},y$=(Z)=>{let q=[],z=[],B=(A)=>{switch(A._tag){case"StandardCommand":q.push(A);return;case"PipedCommand":B(A.left),z.push(A.options),B(A.right);return}};if(B(Z),q.length===0)throw Error("flatten produced empty commands array");let[Q,...U]=q;return{commands:[Q,...U],opts:z}},O=(Z,q,z)=>{let B=y$(z).commands.map((Q)=>`${Q.command} ${Q.args.join(" ")}`).join(" | ");return X$({_tag:x$(q),module:"ChildProcess",method:Z,pathOrDescriptor:B,syscall:q.syscall,cause:q})},f$=J$(function*(){let Z=yield*Y$,q=yield*F$,z=p(function*($){if(L($.cwd))return;return yield*Z.access($.cwd),q.resolve($.cwd)}),B=($)=>$.extendEnv?{...eZ(),...$.env}:$.env,Q=($)=>DZ($)?"pipe":$,U=($)=>d($)?"pipe":$,A=($)=>{let D={stream:"pipe",encoding:"utf-8",endOnDone:!0};if(L($.stdin))return D;if(typeof $.stdin==="string")return{...D,stream:$.stdin};if(DZ($.stdin))return{...D,stream:$.stdin};return{stream:$.stdin.stream,encoding:$.stdin.encoding??D.encoding,endOnDone:$.stdin.endOnDone??D.endOnDone}},G=($,D)=>{let J=$[D];if(L(J))return{stream:"pipe"};if(typeof J==="string")return{stream:J};if(d(J))return{stream:J};return{stream:J.stream}},b=($)=>{if(L($.additionalFds))return[];return Object.entries($.additionalFds).flatMap(([D,J])=>{let K=g(D);return L(K)?[]:[{fd:K,config:J}]}).toSorted((D,J)=>D.fd-J.fd)},N=($,D,J,K)=>{let X=(F)=>process.platform==="win32"&&F==="pipe"?"overlapped":F,Y=[X(Q($.stream)),X(U(D.stream)),X(U(J.stream))];if(K.length===0)return Y;let V=K.reduce((F,_)=>Math.max(F,_.fd),2);for(let F=3;F<=V;F++)Y[F]="ignore";for(let F of K)Y[F.fd]=X("pipe");return Y},S=p(function*($,D,J){if(J.length===0)return{getInputFd:()=>m,getOutputFd:()=>C};let K=new Map,X=new Map;for(let Y of J){let V=D.stdio[Y.fd];switch(Y.config.type){case"input":{let F=m;if(V&&"write"in V)F=CZ.fromWritable({evaluate:()=>V,onError:(_)=>O(`fromWritable(fd${Y.fd})`,R(_),$),endOnDone:!0});if(Y.config.stream)yield*EZ(PZ(Y.config.stream,F));K.set(Y.fd,F);break}case"output":{let F=C;if(V&&"read"in V){let _=new g$;V.on("error",(y)=>_.destroy(R(y))),V.pipe(_),F=KZ.fromReadable({evaluate:()=>_,onError:(y)=>O(`fromReadable(fd${Y.fd})`,R(y),$)})}if(Y.config.sink)F=JZ(F,Y.config.sink);X.set(Y.fd,F);break}}}return{getInputFd:(Y)=>K.get(Y)??m,getOutputFd:(Y)=>X.get(Y)??C}}),QZ=($,D,J)=>LZ(()=>{let K=m;if(ZZ(D.stdin))K=CZ.fromWritable({evaluate:()=>D.stdin,onError:(X)=>O("fromWritable(stdin)",R(X),$),endOnDone:J.endOnDone,encoding:J.encoding});if(DZ(J.stream))return Q$(EZ(PZ(J.stream,K)),K);return $Z(K)}),VZ=($,D,J,K)=>{let X=D.stdout?KZ.fromReadable({evaluate:()=>D.stdout,onError:(V)=>O("fromReadable(stdout)",R(V),$)}):C,Y=D.stderr?KZ.fromReadable({evaluate:()=>D.stderr,onError:(V)=>O("fromReadable(stderr)",R(V),$)}):C;if(d(J.stream))X=JZ(X,J.stream);if(d(K.stream))Y=JZ(Y,K.stream);return{stdout:X,stderr:Y,all:B$(X,Y)}},b$=($,D)=>jZ((J)=>{let K=q$(),X=_$.default($.command,$.args,D),Y=!1,V;return X.on("error",(F)=>{J(i(O("spawn",F,$)))}),X.on("exit",(...F)=>{V=F}),X.on("close",(...F)=>{if(Y)return;Y=!0,z$(K,$$(V??F))}),X.on("spawn",()=>{J($Z([X,K]))}),qZ(()=>{X.kill("SIGTERM")})}),XZ=($,D,J)=>{if(globalThis.process.platform==="win32")return jZ((K)=>{M$.exec(`taskkill /pid ${D.pid} /T /F`,{windowsHide:!0},(X)=>{if(X)return K(i(O("kill",R(X),$)));K(f)})});return K$({try:()=>{globalThis.process.kill(-D.pid,J)},catch:(K)=>O("kill",R(K),$)})},wZ=($,D,J)=>LZ(()=>{if(D.kill(J))return f;return i(O("kill",Error("Failed to kill child process"),$))}),N$=($,D,J)=>(K)=>{let X=J?.killSignal??"SIGTERM";if(L(J?.forceKillAfter))return K(D,$,X);return zZ(K(D,$,X),{duration:J.forceKillAfter,orElse:()=>K(D,$,"SIGKILL")})},W$=($,D)=>{let J=D??"stdout";switch(J){case"stdout":return $.stdout;case"stderr":return $.stderr;case"all":return $.all;default:{let K=g(J);return Z$(K)?$.getOutputFd(K):$.stdout}}},T=p(function*($){switch($._tag){case"StandardCommand":{let D=A($.options),J=G($.options,"stdout"),K=G($.options,"stderr"),X=b($.options),Y=yield*z($.options),[V,F]=yield*V$(b$($,{cwd:Y,env:B($.options),stdio:N(D,J,K,X),detached:$.options.detached??process.platform!=="win32",shell:$.options.shell,windowsHide:process.platform==="win32"}),p(function*([M,H]){let t=yield*WZ(H),n=N$(M,$,$.options);if(t){let[u]=yield*E(H);if(process.platform==="win32")return yield*f;if(u!==0&&ZZ(u))return yield*IZ(n(XZ));return yield*f}let w=(u)=>vZ(XZ($,M,u),()=>wZ($,M,u)),R$=$.options.killSignal??"SIGTERM",uZ=w(R$).pipe(l(E(H)),c),L$=$.options.forceKillAfter?zZ(uZ,{duration:$.options.forceKillAfter,orElse:()=>w("SIGKILL").pipe(l(E(H)),c)}):uZ;return yield*IZ(L$)})),_=yield*S($,V,X),y=VZ($,V,J,K),j=!0;return AZ({pid:UZ(V.pid),stdin:yield*QZ($,V,D),stdout:y.stdout,stderr:y.stderr,all:y.all,getInputFd:_.getInputFd,getOutputFd:_.getOutputFd,isRunning:h(WZ(F),(M)=>!M),exitCode:o(E(F),([M,H])=>{if(ZZ(M))return $Z(FZ(M));return i(O("exitCode",Error(`Process interrupted due to receipt of signal: '${H}'`),$))}),kill:(M)=>{let H=M?.killSignal??"SIGTERM",t=(w)=>vZ(XZ($,V,w),()=>wZ($,V,w)),n=t(H).pipe(l(E(F)),c);if(!M?.forceKillAfter)return n;return zZ(n,{duration:M.forceKillAfter,orElse:()=>t("SIGKILL").pipe(l(E(F)),c)})},unref:qZ(()=>{if(j)V.unref(),j=!1;return qZ(()=>{if(!j)V.ref(),j=!0})})})}case"PipedCommand":{let D=y$($),[J,...K]=D.commands,X=T(J);for(let Y=0;Y<K.length;Y++){let V=K[Y],F=D.opts[Y]??{},_=A(V.options),y=r(h(X,(H)=>W$(H,F.from))),j=F.to??"stdin";if(j==="stdin"){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}let M=g(j);if(L(M)){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}X=T(k(V.command,V.args,{...V.options,additionalFds:{...V.options.additionalFds,[NZ(M)]:{type:"input",stream:y}}}))}return yield*X}}});return GZ(T)}),i$=D$(W,f$),l$=i$.pipe(RZ(U$.layer),RZ(A$)),Bq=G$(async()=>{let{makeRuntime:Z}=await import("./chunk-qggcszs2.js");return Z(W,l$)});var H$=(Z,q)=>P.gen(function*(){let z=yield*Z.spawn(q),[B,Q]=yield*P.all([v.mkString(v.decodeText(z.stdout)),v.mkString(v.decodeText(z.stderr))],{concurrency:2});return{code:yield*z.exitCode,text:B,stderr:Q}}).pipe(P.scoped),Mq=H$,_q=(Z,q,z)=>H$(Z,x.make("git",q,{cwd:z?.cwd,extendEnv:!0,stdin:"ignore"}));var TZ={};BZ(TZ,{payloads:()=>p$,define:()=>c$,BusEvent:()=>TZ});var O$=new Map;function c$(Z,q){let z={type:Z,properties:q};return O$.set(Z,z),z}function p$(){return O$.entries().map(([Z,q])=>{return SZ.object({type:SZ.literal(Z),properties:q.properties}).meta({ref:`Event.${q.type}`})}).toArray()}
|
|
5
5
|
export{W as qm,pZ as rm,x as sm,l$ as tm,H$ as um,Mq as vm,_q as wm,TZ as xm};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ai as O}from"./chunk-vxyy2dp3.js";import{Ao as T,wo as w}from"./chunk-
|
|
2
|
+
import{ai as O}from"./chunk-vxyy2dp3.js";import{Ao as T,wo as w}from"./chunk-we9cv8we.js";import{Rs as l,_s as _}from"./chunk-xj765svc.js";class x extends Error{cause;constructor(J,V){super(J);this.name="ForgewiseError",this.cause=V}}class K extends x{constructor(J="Device flow is not supported by this issuer."){super(J);this.name="DeviceFlowUnsupportedError"}}var n=_.create({service:"forgewise.config"}),t="https://accounts.forgewise.tech",o="forgewise-cli",F=!1,s={defaultFallbacks:0};function D(...J){return J.find((V)=>V!==void 0&&V.trim().length>0)}function r(){return!!process.env.REPLIT_DEV_DOMAIN}async function z(){let J=process.env.ACCOUNTS_ISSUER,V=process.env.FORGEWISE_CLIENT_ID;if(J&&V)return{issuer:J.replace(/\/+$/,""),clientId:V};let X,Y;try{X=await w()}catch(H){X=void 0,Y=H}let $=D(J,X?.issuer,t).replace(/\/+$/,""),Z=D(V,X?.clientId,o),W=D(J,X?.issuer)===void 0,G=D(V,X?.clientId)===void 0;if((W||G)&&!F)F=!0,s.defaultFallbacks++,n.warn("remote Forgewise coordinate lookup unavailable; falling back to baked-in defaults",{issuer:$,clientId:Z,usedDefaultIssuer:W,usedDefaultClientId:G,remoteError:Y instanceof Error?Y.message:Y?String(Y):void 0});return{issuer:$,clientId:Z}}function S(J,V,X){if(J>=200&&J<300)return{kind:"success"};let Y=V?.error??"";if(Y==="authorization_pending")return{kind:"wait",intervalMs:X};if(Y==="slow_down")return{kind:"wait",intervalMs:X+5000};if(Y==="access_denied")return{kind:"fatal",message:"Sign-in was denied in the browser."};if(Y==="expired_token")return{kind:"fatal",message:"The sign-in code expired before it was approved. Try again."};return{kind:"fatal",message:`Device sign-in failed: ${V?.error_description||Y||`HTTP ${J}`}`}}import k from"http";var E="/callback",I=[51737,51738],L=new Set;function h(J){return J.replace(/[&<>\"']/g,(V)=>{switch(V){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return"'"}})}function m(J){return`http://127.0.0.1:${J}${E}`}async function e(J){return new Promise((V,X)=>{let Y=k.createServer();Y.listen(J,"127.0.0.1",()=>{Y.close(()=>V(J))}),Y.on("error",X)})}async function b(){for(let J of I){if(L.has(J))continue;L.add(J);try{return await e(J)}catch{L.delete(J)}}throw new x(`Could not bind to any loopback port (tried ${I.join(", ")}). Free one of those ports and retry.`)}function P(J,V,X,Y){return new Promise(($,Z)=>{let W=()=>L.delete(J),G=k.createServer((N,Q)=>{try{let q=new URL(N.url??"/",`http://localhost:${J}`);if(q.pathname!==E){Q.writeHead(404),Q.end();return}let j=q.searchParams.get("code"),M=q.searchParams.get("state"),U=q.searchParams.get("error"),B=q.searchParams.get("error_description");if(U){let a=`${h(U)}${B?": "+h(B):""}`;Q.writeHead(200,{"Content-Type":"text/html"}),Q.end(`<html><body style="font-family:sans-serif;padding:2rem"><h2>Authorization failed</h2><p>${a}</p><p>You can close this tab.</p></body></html>`),G.close(),Z(new x(`Authorization error: ${U}${B?" \u2014 "+B:""}`));return}if(!j||M!==V){Q.writeHead(400),Q.end("Invalid request");return}Q.writeHead(200,{"Content-Type":"text/html"}),Q.end('<html><body style="font-family:sans-serif;padding:2rem"><h2>Signed in! You can close this tab.</h2><p>Return to your terminal to continue.</p></body></html>'),G.close(),$({code:j})}catch(q){G.close(),Z(q)}});if(X?.aborted){W(),Z(new x("Login cancelled"));return}let H=()=>{W(),G.close(()=>Z(new x("Login cancelled")))};if(X?.addEventListener("abort",H,{once:!0}),X?.aborted){H();return}G.listen(J,"127.0.0.1",()=>{W(),Y?.()}),G.on("error",(N)=>{W(),Z(N)})})}function v(J,V){return new Promise((X,Y)=>{if(V?.aborted){Y(new x("Login cancelled"));return}let $,Z=()=>{clearTimeout($),V?.removeEventListener("abort",Z),Y(new x("Login cancelled"))};if($=setTimeout(()=>{V?.removeEventListener("abort",Z),X()},J),V?.addEventListener("abort",Z,{once:!0}),V?.aborted)Z()})}function J0(J,V=300000){if(!J)return!1;return Date.now()>=J-V}async function V0(J){if(J.method==="api-key")return T({});let{issuer:V}=await z();return T({issuer:V,accessToken:J.key})}import f from"crypto";var g="openid profile email",A=(J)=>J.toString("base64url");function c(){let J=A(f.randomBytes(32)),V=A(f.createHash("sha256").update(J).digest()),X=A(f.randomBytes(16));return{verifier:J,challenge:V,state:X}}function d(J){let V=new URL(`${J.issuer}/api/oauth/authorize`);return V.searchParams.set("response_type","code"),V.searchParams.set("client_id",J.clientId),V.searchParams.set("redirect_uri",J.redirectUri),V.searchParams.set("scope",g),V.searchParams.set("state",J.state),V.searchParams.set("code_challenge",J.challenge),V.searchParams.set("code_challenge_method","S256"),V.toString()}async function C(J,V){let X=await fetch(`${J}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${V.access_token}`}});if(!X.ok)throw new x(`Failed to fetch user profile (${X.status})`);let Y=await X.json();if(!Y.sub)throw new x("Userinfo response is missing required 'sub' field \u2014 the server returned an invalid user profile.");return{sub:Y.sub,name:Y.name??"",email:Y.email??"",access_token:V.access_token,expires_at:Date.now()+(V.expires_in??3600)*1000,...V.refresh_token?{refresh_token:V.refresh_token}:{}}}async function y(J){let V=await fetch(`${J.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:J.code,redirect_uri:J.redirectUri,client_id:J.clientId,code_verifier:J.verifier}).toString(),signal:J.signal??null});if(!V.ok){let Y=await V.text().catch(()=>"");throw new x(`Token exchange failed (${V.status}): ${Y}`)}let X=await V.json();return C(J.issuer,X)}async function X0(J,V,X=5000){let Y=new AbortController,$=setTimeout(()=>Y.abort(),X);try{let Z=await fetch(`${J}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${V}`},signal:Y.signal});if(Z.status===401||Z.status===403)return!1;if(!Z.ok)return null;return!0}catch{return null}finally{clearTimeout($)}}async function Y0(J){let{issuer:V,clientId:X}=await z(),Y;try{Y=await fetch(`${V}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",client_id:X,refresh_token:J}).toString()})}catch(Z){throw new x(`Could not reach the sign-in server to refresh the session: ${Z instanceof Error?Z.message:String(Z)}`,Z)}if(!Y.ok){let Z=await Y.json().catch(()=>{return});if(Z?.error==="invalid_grant")return"invalid_grant";throw new x(`Token refresh failed (${Y.status}): ${Z?.error??""}`)}let $=await Y.json();return C(V,$)}async function u(J){let V;try{V=await fetch(`${J.issuer}/api/oauth/device_authorization`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:J.clientId,scope:g}).toString(),signal:J.signal??null})}catch{if(J.signal?.aborted)throw new x("Login cancelled");throw new K}if(V.status===404||V.status===405||V.status===501)throw new K;if(!V.ok){let Y=await V.text().catch(()=>"");throw new x(`Device authorization failed (${V.status}): ${Y}`)}let X;try{X=await V.json()}catch{throw new K}if(!X.device_code||!X.user_code||!X.verification_uri)throw new K;return{deviceCode:X.device_code,info:{userCode:X.user_code,verificationUri:X.verification_uri,verificationUriComplete:X.verification_uri_complete,expiresAt:Date.now()+(X.expires_in??900)*1000},intervalMs:Math.max(1,X.interval??5)*1000}}async function p(J){let V;try{V=await fetch(`${J.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:J.deviceCode,client_id:J.clientId}).toString(),signal:J.signal??null})}catch{if(J.signal?.aborted)throw new x("Login cancelled");return{kind:"wait",intervalMs:J.currentIntervalMs}}let X;try{X=await V.json()}catch{X=void 0}let Y=S(V.status,X,J.currentIntervalMs);if(Y.kind==="success"){if(!X?.access_token)throw new x("Token endpoint returned success without an access_token.");return{kind:"success",profile:await C(J.issuer,{access_token:X.access_token,expires_in:X.expires_in})}}if(Y.kind==="fatal")throw new x(Y.message);return{kind:"wait",intervalMs:Y.intervalMs}}var Z0=300000;async function i(){let{issuer:J,clientId:V}=await z(),{verifier:X,challenge:Y,state:$}=c(),Z=await b(),W=m(Z),G=d({issuer:J,clientId:V,redirectUri:W,challenge:Y,state:$});return{issuer:J,clientId:V,verifier:X,port:Z,redirectUri:W,authorizeStr:G,state:$}}async function $0(J){let{issuer:V,clientId:X}=await z(),{deviceCode:Y,info:$,intervalMs:Z}=await u({issuer:V,clientId:X,signal:J.signal});if(J.onCode($),J.tryOpen){let G=$.verificationUriComplete??$.verificationUri;O(G)}let W=Z;while(Date.now()<$.expiresAt){await v(W,J.signal);let G=await p({issuer:V,clientId:X,deviceCode:Y,currentIntervalMs:W,signal:J.signal});if(G.kind==="success")return G.profile;W=G.intervalMs}throw new x("The sign-in code expired before it was approved. Try again.")}async function x0(){let{issuer:J,clientId:V,verifier:X,port:Y,redirectUri:$,authorizeStr:Z,state:W}=await i();process.stdout.write(`
|
|
3
3
|
`),process.stdout.write(` Opening Forgewise sign-in in your browser...
|
|
4
4
|
`),process.stdout.write(" Sign-in URL: "+Z+`
|
|
5
5
|
`),process.stdout.write(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ud as a,vd as b}from"./chunk-
|
|
2
|
+
import{ud as a,vd as b}from"./chunk-w7vh8cxt.js";import"./chunk-2hc5z7b5.js";import"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-7xm75w1e.js";export{a as read,b as copy};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{In as w,Jn as A,Mn as U,Nn as O,Rn as R,Tn as s,Un as F}from"./chunk-
|
|
2
|
+
import{In as w,Jn as A,Mn as U,Nn as O,Rn as R,Tn as s,Un as F}from"./chunk-3nx7112w.js";import{ho as G,lo as L}from"./chunk-vcw00k0n.js";import{nt as M,st as k}from"./chunk-tqj69nh6.js";import{RM as y}from"./chunk-zs8kqdsf.js";import{DO as Y}from"./chunk-7xm75w1e.js";var _={};Y(_,{schema:()=>x,jsonc:()=>v,ConfigParse:()=>_});function v($,r){let E=[],J=w($,E,{allowTrailingComma:!0});if(E.length){let C=$.split(`
|
|
3
3
|
`),T=E.map((I)=>{let Z=$.substring(0,I.offset).split(`
|
|
4
4
|
`),H=Z.length,j=Z[Z.length-1].length+1,B=C[H-1],Q=`${A(I.error)} at line ${H}, column ${j}`;if(!B)return Q;return`${Q}
|
|
5
5
|
Line ${H}: ${B}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Sr as w}from"./chunk-4cnwn1rh.js";import{Ur as z}from"./chunk-
|
|
2
|
+
import{Sr as w}from"./chunk-4cnwn1rh.js";import{Ur as z}from"./chunk-764fksh3.js";import{at as J}from"./chunk-tqj69nh6.js";function H(j,v){return typeof j==="object"&&j!==null&&"_tag"in j&&j._tag===v}function V(j){if(w.hasName(j,"MCPFailed"))return`MCP server "${j.data?.name}" failed. Note, qitqode does not support MCP authentication yet.`;if(H(j,"AccountServiceError")||H(j,"AccountTransportError"))return j.message??"";if(w.hasName(j,"ProviderModelNotFoundError")){let k=j.data,A=Array.isArray(k?.suggestions)?k.suggestions:[];return[`Model not found: ${k?.providerID}/${k?.modelID}`,...A.length?["Did you mean: "+A.join(", ")]:[],"Try: `qitqode models` to list available models","Or check your config (qitqode.json) provider/model names"].join(`
|
|
3
3
|
`)}if(w.hasName(j,"ProviderInitError"))return`Failed to initialize provider "${j.data?.providerID}". Check credentials and configuration.`;if(w.hasName(j,"ConfigJsonError")){let k=j.data;return`Config file at ${k?.path} is not valid JSON(C)`+(k?.message?`: ${k.message}`:"")}if(w.hasName(j,"ConfigDirectoryTypoError")){let k=j.data;return`Directory "${k?.dir}" in ${k?.path} is not valid. Rename the directory to "${k?.suggestion}" or remove it. This is a common typo.`}if(w.hasName(j,"ConfigFrontmatterError"))return j.data?.message??"";if(w.hasName(j,"ConfigInvalidError")){let k=j.data,A=k?.path,B=k?.message,K=Array.isArray(k?.issues)?k.issues:[];return[`Configuration is invalid${A&&A!=="config"?` at ${A}`:""}`+(B?`: ${B}`:""),...K.map((G)=>"\u21B3 "+G.message+" "+G.path.join("."))].join(`
|
|
4
4
|
`)}if(w.hasName(j,"UICancelledError"))return"";let v=typeof j==="object"&&j!==null&&"name"in j?j.name:void 0;if(v==="QlexNotLoggedInError")return z.copy().notLoggedIn;if(v==="QlexInsufficientBalanceError")return(j.message??z.copy().insufficientBalanceFallback)+z.copy().insufficientBalanceCliSuffix;if(v==="QlexRateLimitError")return z.copy().rateLimit;if(v==="BackendInsufficientBalanceError")return(j.message??z.copy().insufficientBalanceFallback)+z.copy().insufficientBalanceCliSuffix;if(v==="BackendRateLimitError")return j.message??z.copy().rateLimit;if(v==="QlexInvalidCredentialsError")return j.message??z.copy().invalidCredentialsFallback}function W(j){return J(j)}function D({onlyFirst:j=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",j?void 0:"g")}var L=D();function M(j){if(typeof j!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof j}\``);return j.replace(L,"")}
|
|
5
5
|
export{M as Jf,V as Kf,W as Lf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$l as s,am as t,bm as u,dm as v,em as w}from"./chunk-
|
|
2
|
+
import{$l as s,am as t,bm as u,dm as v,em as w}from"./chunk-s3mnrhbx.js";import"./chunk-ezfy0b6q.js";import{$m as c,Nm as a,_m as b,an as d,bn as e,cn as f,dn as g,en as h,fn as i,gn as j,hn as k,jn as l,kn as m,ln as n,nn as o,pn as p,wn as q,xn as r}from"./chunk-bn0h9dny.js";import"./chunk-vcw00k0n.js";import"./chunk-2hc5z7b5.js";import"./chunk-9gazyynx.js";import"./chunk-d9hbhkbq.js";import"./chunk-ad72gb5f.js";import"./chunk-d6ry9418.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-xj765svc.js";import"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-7xm75w1e.js";export{a as sql,e as or,f as not,c as ne,j as lte,i as lt,p as like,l as isNull,m as isNotNull,k as inArray,h as gte,g as gt,n as exists,b as eq,r as desc,t as count,o as between,q as asc,d as and,w as Storage,v as NotFoundError,s as JsonMigration,u as Database};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{fh as a,gh as b}from"./chunk-
|
|
2
|
+
import{fh as a,gh as b}from"./chunk-caj1b9y7.js";import"./chunk-ygs5pzk7.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import"./chunk-257me4z3.js";import"./chunk-nkkch4h7.js";import"./chunk-s3mnrhbx.js";import"./chunk-ezfy0b6q.js";import"./chunk-bn0h9dny.js";import"./chunk-hnvn2c25.js";import"./chunk-3nx7112w.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import"./chunk-we9cv8we.js";import"./chunk-2hc5z7b5.js";import"./chunk-9gazyynx.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-d9hbhkbq.js";import"./chunk-ad72gb5f.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-764fksh3.js";import"./chunk-xj765svc.js";import"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import"./chunk-7xm75w1e.js";export{b as AppRuntime,a as AppLayer};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ag as E}from"./chunk-
|
|
2
|
+
import{ag as E}from"./chunk-k7aenxan.js";import"./chunk-8r6ht39z.js";import"./chunk-mqd1jsg2.js";import"./chunk-gz8sz7z1.js";import"./chunk-cjww2jmv.js";import"./chunk-nfg7nt13.js";import"./chunk-xvwvd4kq.js";import"./chunk-d3ermm6d.js";import"./chunk-caj1b9y7.js";import"./chunk-ygs5pzk7.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import"./chunk-257me4z3.js";import"./chunk-nkkch4h7.js";import"./chunk-s3mnrhbx.js";import"./chunk-ezfy0b6q.js";import"./chunk-bn0h9dny.js";import"./chunk-hnvn2c25.js";import"./chunk-3nx7112w.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import"./chunk-we9cv8we.js";import"./chunk-2hc5z7b5.js";import"./chunk-9gazyynx.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-d9hbhkbq.js";import"./chunk-ad72gb5f.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-764fksh3.js";import"./chunk-xj765svc.js";import"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import{FO as z}from"./chunk-7xm75w1e.js";var J={command:"generate",handler:async()=>{let A=await E.openapi();for(let q of Object.values(A.paths))for(let y of["get","post","put","delete","patch"]){let k=q[y];if(!k?.operationId)continue;k["x-codeSamples"]=[{lang:"js",source:['import { createQitQodeClient } from "@qitqode/sdk"',"","const client = createQitQodeClient()",`await client.${k.operationId}({`," ...","})"].join(`
|
|
3
3
|
`)}]}let F=JSON.stringify(A,null,2),B=await import("./chunk-6hpgb8h4.js"),C=await import("./chunk-0v0vqbn5.js"),D=await import("./chunk-24jg9d61.js"),G=await(B.format??B.default?.format)(F,{parser:"json",plugins:[C.default??C,D.default??D],printWidth:120});await new Promise((q,y)=>{process.stdout.write(G,(k)=>{if(k)y(k);else q()})})}};export{J as GenerateCommand};
|