@capgo/cli 8.71.0 → 8.72.0

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.
@@ -86,7 +86,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
86
86
  `)}),$.__defineSetter__("stack",function(U){return[U].concat($.stack).join(`
87
87
 
88
88
  `)}),$}});var wE=T((iMD,ME)=>{var V6=s("constants"),ja=process.cwd,HU=null,Ta=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!HU)HU=ja.call(process);return HU};try{process.cwd()}catch(D){}if(typeof process.chdir==="function"){if(LU=process.chdir,process.chdir=function(D){HU=null,LU.call(process,D)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,LU)}var LU;ME.exports=Sa;function Sa(D){if(V6.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))$(D);if(!D.lutimes)U(D);if(D.chown=F(D.chown),D.fchown=F(D.fchown),D.lchown=F(D.lchown),D.chmod=Q(D.chmod),D.fchmod=Q(D.fchmod),D.lchmod=Q(D.lchmod),D.chownSync=Y(D.chownSync),D.fchownSync=Y(D.fchownSync),D.lchownSync=Y(D.lchownSync),D.chmodSync=X(D.chmodSync),D.fchmodSync=X(D.fchmodSync),D.lchmodSync=X(D.lchmodSync),D.stat=J(D.stat),D.fstat=J(D.fstat),D.lstat=J(D.lstat),D.statSync=I(D.statSync),D.fstatSync=I(D.fstatSync),D.lstatSync=I(D.lstatSync),D.chmod&&!D.lchmod)D.lchmod=function(W,B,G){if(G)process.nextTick(G)},D.lchmodSync=function(){};if(D.chown&&!D.lchown)D.lchown=function(W,B,G,Z){if(Z)process.nextTick(Z)},D.lchownSync=function(){};if(Ta==="win32")D.rename=typeof D.rename!=="function"?D.rename:function(W){function B(G,Z,z){var K=Date.now(),H=0;W(G,Z,function M(N){if(N&&(N.code==="EACCES"||N.code==="EPERM"||N.code==="EBUSY")&&Date.now()-K<60000){if(setTimeout(function(){D.stat(Z,function(L,O){if(L&&L.code==="ENOENT")W(G,Z,M);else z(N)})},H),H<100)H+=10;return}if(z)z(N)})}if(Object.setPrototypeOf)Object.setPrototypeOf(B,W);return B}(D.rename);D.read=typeof D.read!=="function"?D.read:function(W){function B(G,Z,z,K,H,M){var N;if(M&&typeof M==="function"){var L=0;N=function(O,j,E){if(O&&O.code==="EAGAIN"&&L<10)return L++,W.call(D,G,Z,z,K,H,N);M.apply(this,arguments)}}return W.call(D,G,Z,z,K,H,N)}if(Object.setPrototypeOf)Object.setPrototypeOf(B,W);return B}(D.read),D.readSync=typeof D.readSync!=="function"?D.readSync:function(W){return function(B,G,Z,z,K){var H=0;while(!0)try{return W.call(D,B,G,Z,z,K)}catch(M){if(M.code==="EAGAIN"&&H<10){H++;continue}throw M}}}(D.readSync);function $(W){W.lchmod=function(B,G,Z){W.open(B,V6.O_WRONLY|V6.O_SYMLINK,G,function(z,K){if(z){if(Z)Z(z);return}W.fchmod(K,G,function(H){W.close(K,function(M){if(Z)Z(H||M)})})})},W.lchmodSync=function(B,G){var Z=W.openSync(B,V6.O_WRONLY|V6.O_SYMLINK,G),z=!0,K;try{K=W.fchmodSync(Z,G),z=!1}finally{if(z)try{W.closeSync(Z)}catch(H){}else W.closeSync(Z)}return K}}function U(W){if(V6.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(B,G,Z,z){W.open(B,V6.O_SYMLINK,function(K,H){if(K){if(z)z(K);return}W.futimes(H,G,Z,function(M){W.close(H,function(N){if(z)z(M||N)})})})},W.lutimesSync=function(B,G,Z){var z=W.openSync(B,V6.O_SYMLINK),K,H=!0;try{K=W.futimesSync(z,G,Z),H=!1}finally{if(H)try{W.closeSync(z)}catch(M){}else W.closeSync(z)}return K};else if(W.futimes)W.lutimes=function(B,G,Z,z){if(z)process.nextTick(z)},W.lutimesSync=function(){}}function Q(W){if(!W)return W;return function(B,G,Z){return W.call(D,B,G,function(z){if(q(z))z=null;if(Z)Z.apply(this,arguments)})}}function X(W){if(!W)return W;return function(B,G){try{return W.call(D,B,G)}catch(Z){if(!q(Z))throw Z}}}function F(W){if(!W)return W;return function(B,G,Z,z){return W.call(D,B,G,Z,function(K){if(q(K))K=null;if(z)z.apply(this,arguments)})}}function Y(W){if(!W)return W;return function(B,G,Z){try{return W.call(D,B,G,Z)}catch(z){if(!q(z))throw z}}}function J(W){if(!W)return W;return function(B,G,Z){if(typeof G==="function")Z=G,G=null;function z(K,H){if(H){if(H.uid<0)H.uid+=4294967296;if(H.gid<0)H.gid+=4294967296}if(Z)Z.apply(this,arguments)}return G?W.call(D,B,G,z):W.call(D,B,z)}}function I(W){if(!W)return W;return function(B,G){var Z=G?W.call(D,B,G):W.call(D,B);if(Z){if(Z.uid<0)Z.uid+=4294967296;if(Z.gid<0)Z.gid+=4294967296}return Z}}function q(W){if(!W)return!0;if(W.code==="ENOSYS")return!0;var B=!process.getuid||process.getuid()!==0;if(B){if(W.code==="EINVAL"||W.code==="EPERM")return!0}return!1}}});var RE=T((cMD,VE)=>{var OE=s("stream").Stream;VE.exports=Pa;function Pa(D){return{ReadStream:$,WriteStream:U};function $(Q,X){if(!(this instanceof $))return new $(Q,X);OE.call(this);var F=this;this.path=Q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,X=X||{};var Y=Object.keys(X);for(var J=0,I=Y.length;J<I;J++){var q=Y[J];this[q]=X[q]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){F._read()});return}D.open(this.path,this.flags,this.mode,function(W,B){if(W){F.emit("error",W),F.readable=!1;return}F.fd=B,F.emit("open",B),F._read()})}function U(Q,X){if(!(this instanceof U))return new U(Q,X);OE.call(this),this.path=Q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,X=X||{};var F=Object.keys(X);for(var Y=0,J=F.length;Y<J;Y++){var I=F[Y];this[I]=X[I]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=D.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var EE=T((pMD,AE)=>{AE.exports=ba;var Ca=Object.getPrototypeOf||function(D){return D.__proto__};function ba(D){if(D===null||typeof D!=="object")return D;if(D instanceof Object)var $={__proto__:Ca(D)};else var $=Object.create(null);return Object.getOwnPropertyNames(D).forEach(function(U){Object.defineProperty($,U,Object.getOwnPropertyDescriptor(D,U))}),$}});var R6=T((rMD,qI)=>{var cD=s("fs"),va=wE(),_a=RE(),ka=EE(),NU=s("util"),z0,wU;if(typeof Symbol==="function"&&typeof Symbol.for==="function")z0=Symbol.for("graceful-fs.queue"),wU=Symbol.for("graceful-fs.previous");else z0="___graceful-fs.queue",wU="___graceful-fs.previous";function xa(){}function TE(D,$){Object.defineProperty(D,z0,{get:function(){return $}})}var S1=xa;if(NU.debuglog)S1=NU.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))S1=function(){var D=NU.format.apply(NU,arguments);D="GFS4: "+D.split(/\n/).join(`
89
- GFS4: `),console.error(D)};if(!cD[z0]){if(YI=global[z0]||[],TE(cD,YI),cD.close=function(D){function $(U,Q){return D.call(cD,U,function(X){if(!X)jE();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty($,wU,{value:D}),$}(cD.close),cD.closeSync=function(D){function $(U){D.apply(cD,arguments),jE()}return Object.defineProperty($,wU,{value:D}),$}(cD.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){S1(cD[z0]),s("assert").equal(cD[z0].length,0)})}var YI;if(!global[z0])TE(global,cD[z0]);qI.exports=JI(ka(cD));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!cD.__patched)qI.exports=JI(cD),cD.__patched=!0;function JI(D){va(D),D.gracefulify=JI,D.createReadStream=j,D.createWriteStream=E;var $=D.readFile;D.readFile=U;function U(b,R,P){if(typeof R==="function")P=R,R=null;return h(b,R,P);function h(i,v,k,A){return $(i,v,function(w){if(w&&(w.code==="EMFILE"||w.code==="ENFILE"))W8([h,[i,v,k],w,A||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var Q=D.writeFile;D.writeFile=X;function X(b,R,P,h){if(typeof P==="function")h=P,P=null;return i(b,R,P,h);function i(v,k,A,w,V){return Q(v,k,A,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))W8([i,[v,k,A,w],_,V||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}var F=D.appendFile;if(F)D.appendFile=Y;function Y(b,R,P,h){if(typeof P==="function")h=P,P=null;return i(b,R,P,h);function i(v,k,A,w,V){return F(v,k,A,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))W8([i,[v,k,A,w],_,V||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}var J=D.copyFile;if(J)D.copyFile=I;function I(b,R,P,h){if(typeof P==="function")h=P,P=0;return i(b,R,P,h);function i(v,k,A,w,V){return J(v,k,A,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))W8([i,[v,k,A,w],_,V||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}var q=D.readdir;D.readdir=B;var W=/^v[0-5]\./;function B(b,R,P){if(typeof R==="function")P=R,R=null;var h=W.test(process.version)?function(k,A,w,V){return q(k,i(k,A,w,V))}:function(k,A,w,V){return q(k,A,i(k,A,w,V))};return h(b,R,P);function i(v,k,A,w){return function(V,_){if(V&&(V.code==="EMFILE"||V.code==="ENFILE"))W8([h,[v,k,A],V,w||Date.now(),Date.now()]);else{if(_&&_.sort)_.sort();if(typeof A==="function")A.call(this,V,_)}}}}if(process.version.substr(0,4)==="v0.8"){var G=_a(D);M=G.ReadStream,L=G.WriteStream}var Z=D.ReadStream;if(Z)M.prototype=Object.create(Z.prototype),M.prototype.open=N;var z=D.WriteStream;if(z)L.prototype=Object.create(z.prototype),L.prototype.open=O;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(b){M=b},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return L},set:function(b){L=b},enumerable:!0,configurable:!0});var K=M;Object.defineProperty(D,"FileReadStream",{get:function(){return K},set:function(b){K=b},enumerable:!0,configurable:!0});var H=L;Object.defineProperty(D,"FileWriteStream",{get:function(){return H},set:function(b){H=b},enumerable:!0,configurable:!0});function M(b,R){if(this instanceof M)return Z.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function N(){var b=this;S(b.path,b.flags,b.mode,function(R,P){if(R){if(b.autoClose)b.destroy();b.emit("error",R)}else b.fd=P,b.emit("open",P),b.read()})}function L(b,R){if(this instanceof L)return z.apply(this,arguments),this;else return L.apply(Object.create(L.prototype),arguments)}function O(){var b=this;S(b.path,b.flags,b.mode,function(R,P){if(R)b.destroy(),b.emit("error",R);else b.fd=P,b.emit("open",P)})}function j(b,R){return new D.ReadStream(b,R)}function E(b,R){return new D.WriteStream(b,R)}var C=D.open;D.open=S;function S(b,R,P,h){if(typeof P==="function")h=P,P=null;return i(b,R,P,h);function i(v,k,A,w,V){return C(v,k,A,function(_,m){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))W8([i,[v,k,A,w],_,V||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}return D}function W8(D){S1("ENQUEUE",D[0].name,D[1]),cD[z0].push(D),II()}var MU;function jE(){var D=Date.now();for(var $=0;$<cD[z0].length;++$)if(cD[z0][$].length>2)cD[z0][$][3]=D,cD[z0][$][4]=D;II()}function II(){if(clearTimeout(MU),MU=void 0,cD[z0].length===0)return;var D=cD[z0].shift(),$=D[0],U=D[1],Q=D[2],X=D[3],F=D[4];if(X===void 0)S1("RETRY",$.name,U),$.apply(null,U);else if(Date.now()-X>=60000){S1("TIMEOUT",$.name,U);var Y=U.pop();if(typeof Y==="function")Y.call(null,Q)}else{var J=Date.now()-F,I=Math.max(F-X,1),q=Math.min(I*1.2,100);if(J>=q)S1("RETRY",$.name,U),$.apply(null,U.concat([X]));else cD[z0].push(D)}if(MU===void 0)MU=setTimeout(II,0)}});var PE=T((oMD,SE)=>{function Y$(D,$){if(typeof $==="boolean")$={forever:$};if(this._originalTimeouts=JSON.parse(JSON.stringify(D)),this._timeouts=D,this._options=$||{},this._maxRetryTime=$&&$.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}SE.exports=Y$;Y$.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};Y$.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};Y$.prototype.retry=function(D){if(this._timeout)clearTimeout(this._timeout);if(!D)return!1;var $=new Date().getTime();if(D&&$-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(D);var U=this._timeouts.shift();if(U===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),U=this._timeouts.shift();else return!1;var Q=this,X=setTimeout(function(){if(Q._attempts++,Q._operationTimeoutCb){if(Q._timeout=setTimeout(function(){Q._operationTimeoutCb(Q._attempts)},Q._operationTimeout),Q._options.unref)Q._timeout.unref()}Q._fn(Q._attempts)},U);if(this._options.unref)X.unref();return!0};Y$.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var U=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){U._operationTimeoutCb()},U._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};Y$.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};Y$.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};Y$.prototype.start=Y$.prototype.try;Y$.prototype.errors=function(){return this._errors};Y$.prototype.attempts=function(){return this._attempts};Y$.prototype.mainError=function(){if(this._errors.length===0)return null;var D={},$=null,U=0;for(var Q=0;Q<this._errors.length;Q++){var X=this._errors[Q],F=X.message,Y=(D[F]||0)+1;if(D[F]=Y,Y>=U)$=X,U=Y}return $}});var bE=T((ua)=>{var ga=PE();ua.operation=function(D){var $=ua.timeouts(D);return new ga($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};ua.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var U in D)$[U]=D[U];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Q=[];for(var X=0;X<$.retries;X++)Q.push(this.createTimeout(X,$));if(D&&D.forever&&!Q.length)Q.push(this.createTimeout(X,$));return Q.sort(function(F,Y){return F-Y}),Q};ua.createTimeout=function(D,$){var U=$.randomize?Math.random()+1:1,Q=Math.round(U*$.minTimeout*Math.pow($.factor,D));return Q=Math.min(Q,$.maxTimeout),Q};ua.wrap=function(D,$,U){if($ instanceof Array)U=$,$=null;if(!U){U=[];for(var Q in D)if(typeof D[Q]==="function")U.push(Q)}for(var X=0;X<U.length;X++){var F=U[X],Y=D[F];D[F]=function(I){var q=ua.operation($),W=Array.prototype.slice.call(arguments,1),B=W.pop();W.push(function(G){if(q.retry(G))return;if(G)arguments[0]=q.mainError();B.apply(this,arguments)}),q.attempt(function(){I.apply(D,W)})}.bind(D,Y),D[F].options=$}}});var vE=T((tMD,OU)=>{OU.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")OU.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")OU.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var ZI=T((sMD,G8)=>{var dD=global.process,P1=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!P1(dD))G8.exports=function(){return function(){}};else{if(WI=s("assert"),C1=vE(),BI=/^win/i.test(dD.platform),B8=s("events"),typeof B8!=="function")B8=B8.EventEmitter;if(dD.__signal_exit_emitter__)Q0=dD.__signal_exit_emitter__;else Q0=dD.__signal_exit_emitter__=new B8,Q0.count=0,Q0.emitted={};if(!Q0.infinite)Q0.setMaxListeners(1/0),Q0.infinite=!0;G8.exports=function(D,$){if(!P1(global.process))return function(){};if(WI.equal(typeof D,"function","a callback must be provided for exit handler"),b1===!1)VU();var U="exit";if($&&$.alwaysLast)U="afterexit";var Q=function(){if(Q0.removeListener(U,D),Q0.listeners("exit").length===0&&Q0.listeners("afterexit").length===0)h9()};return Q0.on(U,D),Q},h9=function(){if(!b1||!P1(global.process))return;b1=!1,C1.forEach(function($){try{dD.removeListener($,d9[$])}catch(U){}}),dD.emit=l9,dD.reallyExit=RU,Q0.count-=1},G8.exports.unload=h9,A6=function($,U,Q){if(Q0.emitted[$])return;Q0.emitted[$]=!0,Q0.emit($,U,Q)},d9={},C1.forEach(function(D){d9[D]=function(){if(!P1(global.process))return;var U=dD.listeners(D);if(U.length===Q0.count){if(h9(),A6("exit",null,D),A6("afterexit",null,D),BI&&D==="SIGHUP")D="SIGINT";dD.kill(dD.pid,D)}}}),G8.exports.signals=function(){return C1},b1=!1,VU=function(){if(b1||!P1(global.process))return;b1=!0,Q0.count+=1,C1=C1.filter(function($){try{return dD.on($,d9[$]),!0}catch(U){return!1}}),dD.emit=zI,dD.reallyExit=GI},G8.exports.load=VU,RU=dD.reallyExit,GI=function($){if(!P1(global.process))return;dD.exitCode=$||0,A6("exit",dD.exitCode,null),A6("afterexit",dD.exitCode,null),RU.call(dD,dD.exitCode)},l9=dD.emit,zI=function($,U){if($==="exit"&&P1(global.process)){if(U!==void 0)dD.exitCode=U;var Q=l9.apply(this,arguments);return A6("exit",dD.exitCode,null),A6("afterexit",dD.exitCode,null),Q}else return l9.apply(this,arguments)}}var WI,C1,BI,B8,Q0,h9,A6,d9,b1,VU,RU,GI,l9,zI});var kE=T((la,KI)=>{var _E=Symbol();function ha(D,$,U){let Q=$[_E];if(Q)return $.stat(D,(F,Y)=>{if(F)return U(F);U(null,Y.mtime,Q)});let X=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,X,X,(F)=>{if(F)return U(F);$.stat(D,(Y,J)=>{if(Y)return U(Y);let I=J.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,_E,{value:I}),U(null,J.mtime,I)})})}function da(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}la.probe=ha;la.getMtime=da});var yE=T((sa,i9)=>{var ca=s("path"),NI=R6(),pa=bE(),ra=ZI(),xE=kE(),e$={};function n9(D,$){return $.lockfilePath||`${D}.lock`}function MI(D,$,U){if(!$.realpath)return U(null,ca.resolve(D));$.fs.realpath(D,U)}function LI(D,$,U){let Q=n9(D,$);$.fs.mkdir(Q,(X)=>{if(!X)return xE.probe(Q,$.fs,(F,Y,J)=>{if(F)return $.fs.rmdir(Q,()=>{}),U(F);U(null,Y,J)});if(X.code!=="EEXIST")return U(X);if($.stale<=0)return U(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(Q,(F,Y)=>{if(F){if(F.code==="ENOENT")return LI(D,{...$,stale:0},U);return U(F)}if(!gE(Y,$))return U(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));uE(D,$,(J)=>{if(J)return U(J);LI(D,{...$,stale:0},U)})})})}function gE(D,$){return D.mtime.getTime()<Date.now()-$.stale}function uE(D,$,U){$.fs.rmdir(n9(D,$),(Q)=>{if(Q&&Q.code!=="ENOENT")return U(Q);U()})}function AU(D,$){let U=e$[D];if(U.updateTimeout)return;if(U.updateDelay=U.updateDelay||$.update,U.updateTimeout=setTimeout(()=>{U.updateTimeout=null,$.fs.stat(U.lockfilePath,(Q,X)=>{let F=U.lastUpdate+$.stale<Date.now();if(Q){if(Q.code==="ENOENT"||F)return HI(D,U,Object.assign(Q,{code:"ECOMPROMISED"}));return U.updateDelay=1000,AU(D,$)}if(U.mtime.getTime()!==X.mtime.getTime())return HI(D,U,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let J=xE.getMtime(U.mtimePrecision);$.fs.utimes(U.lockfilePath,J,J,(I)=>{let q=U.lastUpdate+$.stale<Date.now();if(U.released)return;if(I){if(I.code==="ENOENT"||q)return HI(D,U,Object.assign(I,{code:"ECOMPROMISED"}));return U.updateDelay=1000,AU(D,$)}U.mtime=J,U.lastUpdate=Date.now(),U.updateDelay=null,AU(D,$)})})},U.updateDelay),U.updateTimeout.unref)U.updateTimeout.unref()}function HI(D,$,U){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(e$[D]===$)delete e$[D];$.options.onCompromised(U)}function oa(D,$,U){$={stale:1e4,update:null,realpath:!0,retries:0,fs:NI,onCompromised:(Q)=>{throw Q},...$},$.retries=$.retries||0,$.retries=typeof $.retries==="number"?{retries:$.retries}:$.retries,$.stale=Math.max($.stale||0,2000),$.update=$.update==null?$.stale/2:$.update||0,$.update=Math.max(Math.min($.update,$.stale/2),1000),MI(D,$,(Q,X)=>{if(Q)return U(Q);let F=pa.operation($.retries);F.attempt(()=>{LI(X,$,(Y,J,I)=>{if(F.retry(Y))return;if(Y)return U(F.mainError());let q=e$[X]={lockfilePath:n9(X,$),mtime:J,mtimePrecision:I,options:$,lastUpdate:Date.now()};AU(X,$),U(null,(W)=>{if(q.released)return W&&W(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));fE(X,{...$,realpath:!1},W)})})})})}function fE(D,$,U){$={fs:NI,realpath:!0,...$},MI(D,$,(Q,X)=>{if(Q)return U(Q);let F=e$[X];if(!F)return U(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));F.updateTimeout&&clearTimeout(F.updateTimeout),F.released=!0,delete e$[X],uE(X,$,U)})}function aa(D,$,U){$={stale:1e4,realpath:!0,fs:NI,...$},$.stale=Math.max($.stale||0,2000),MI(D,$,(Q,X)=>{if(Q)return U(Q);$.fs.stat(n9(X,$),(F,Y)=>{if(F)return F.code==="ENOENT"?U(null,!1):U(F);return U(null,!gE(Y,$))})})}function ta(){return e$}ra(()=>{for(let D in e$){let $=e$[D].options;try{$.fs.rmdirSync(n9(D,$))}catch(U){}}});sa.lock=oa;sa.unlock=fE;sa.check=aa;sa.getLocks=ta});var hE=T((eMD,mE)=>{var Xt=R6();function Qt(D){let $=["mkdir","realpath","stat","rmdir","utimes"],U={...D};return $.forEach((Q)=>{U[Q]=(...X)=>{let F=X.pop(),Y;try{Y=D[`${Q}Sync`](...X)}catch(J){return F(J)}F(null,Y)}}),U}function Ft(D){return(...$)=>new Promise((U,Q)=>{$.push((X,F)=>{if(X)Q(X);else U(F)}),D(...$)})}function Yt(D){return(...$)=>{let U,Q;if($.push((X,F)=>{U=X,Q=F}),D(...$),U)throw U;return Q}}function Jt(D){if(D={...D},D.fs=Qt(D.fs||Xt),typeof D.retries==="number"&&D.retries>0||D.retries&&typeof D.retries.retries==="number"&&D.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return D}mE.exports={toPromise:Ft,toSync:Yt,toSyncOptions:Jt}});var lE=T((DwD,E6)=>{var z8=yE(),{toPromise:EU,toSync:jU,toSyncOptions:wI}=hE();async function dE(D,$){let U=await EU(z8.lock)(D,$);return EU(U)}function It(D,$){let U=jU(z8.lock)(D,wI($));return jU(U)}function qt(D,$){return EU(z8.unlock)(D,$)}function Wt(D,$){return jU(z8.unlock)(D,wI($))}function Bt(D,$){return EU(z8.check)(D,$)}function Gt(D,$){return jU(z8.check)(D,wI($))}E6.exports=dE;E6.exports.lock=dE;E6.exports.unlock=qt;E6.exports.lockSync=It;E6.exports.unlockSync=Wt;E6.exports.check=Bt;E6.exports.checkSync=Gt});var aE=T((rE)=>{Object.defineProperty(rE,"__esModule",{value:!0});rE.canStoreURLs=rE.FileUrlStorage=void 0;var nE=s("fs"),zt=Kt(NE()),iE=Zt(lE());function pE(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,U=new WeakMap;return(pE=function(Q){return Q?U:$})(D)}function Zt(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var U=pE($);if(U&&U.has(D))return U.get(D);var Q={__proto__:null},X=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in D)if(F!=="default"&&{}.hasOwnProperty.call(D,F)){var Y=X?Object.getOwnPropertyDescriptor(D,F):null;Y&&(Y.get||Y.set)?Object.defineProperty(Q,F,Y):Q[F]=D[F]}return Q.default=D,U&&U.set(D,Q),Q}function Kt(D){return D&&D.__esModule?D:{default:D}}function c9(D){return c9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},c9(D)}function Ht(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function cE(D,$){for(var U=0;U<$.length;U++){var Q=$[U];if(Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q)Q.writable=!0;Object.defineProperty(D,Nt(Q.key),Q)}}function Lt(D,$,U){if($)cE(D.prototype,$);if(U)cE(D,U);return Object.defineProperty(D,"prototype",{writable:!1}),D}function Nt(D){var $=Mt(D,"string");return c9($)=="symbol"?$:$+""}function Mt(D,$){if(c9(D)!="object"||!D)return D;var U=D[Symbol.toPrimitive];if(U!==void 0){var Q=U.call(D,$||"default");if(c9(Q)!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var $wD=rE.canStoreURLs=!0,UwD=rE.FileUrlStorage=function(){function D($){Ht(this,D),this.path=$}return Lt(D,[{key:"findAllUploads",value:function(){var U=this;return new Promise(function(Q,X){U._getItems("tus::",function(F,Y){if(F)X(F);else Q(Y)})})}},{key:"findUploadsByFingerprint",value:function(U){var Q=this;return new Promise(function(X,F){Q._getItems("tus::".concat(U),function(Y,J){if(Y)F(Y);else X(J)})})}},{key:"removeUpload",value:function(U){var Q=this;return new Promise(function(X,F){Q._removeItem(U,function(Y){if(Y)F(Y);else X()})})}},{key:"addUpload",value:function(U,Q){var X=this,F=Math.round(Math.random()*1000000000000),Y="tus::".concat(U,"::").concat(F);return new Promise(function(J,I){X._setItem(Y,Q,function(q){if(q)I(q);else J(Y)})})}},{key:"_setItem",value:function(U,Q,X){var F=this;iE.lock(this.path,this._lockfileOptions()).then(function(Y){X=F._releaseAndCb(Y,X),F._getData(function(J,I){if(J){X(J);return}I[U]=Q,F._writeData(I,function(q){return X(q)})})}).catch(X)}},{key:"_getItems",value:function(U,Q){this._getData(function(X,F){if(X){Q(X);return}var Y=Object.keys(F).filter(function(J){return J.startsWith(U)}).map(function(J){var I=F[J];return I.urlStorageKey=J,I});Q(null,Y)})}},{key:"_removeItem",value:function(U,Q){var X=this;iE.lock(this.path,this._lockfileOptions()).then(function(F){Q=X._releaseAndCb(F,Q),X._getData(function(Y,J){if(Y){Q(Y);return}delete J[U],X._writeData(J,function(I){return Q(I)})})}).catch(Q)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(U,Q){return function(X){if(X){U().then(function(){return Q(X)}).catch(function(F){return Q((0,zt.default)([X,F]))});return}U().then(Q).catch(Q)}}},{key:"_writeData",value:function(U,Q){var X={encoding:"utf8",mode:432,flag:"w"};(0,nE.writeFile)(this.path,JSON.stringify(U),X,function(F){return Q(F)})}},{key:"_getData",value:function(U){(0,nE.readFile)(this.path,"utf8",function(Q,X){if(Q){if(Q.code==="ENOENT")U(null,{});else U(Q);return}try{X=!X.trim().length?{}:JSON.parse(X)}catch(F){U(F);return}U(null,X)})}}])}()});var Jj=T((j6)=>{Object.defineProperty(j6,"__esModule",{value:!0});Object.defineProperty(j6,"DefaultHttpStack",{enumerable:!0,get:function(){return Dj.default}});Object.defineProperty(j6,"DetailedError",{enumerable:!0,get:function(){return Ot.default}});Object.defineProperty(j6,"FileUrlStorage",{enumerable:!0,get:function(){return $j.FileUrlStorage}});Object.defineProperty(j6,"StreamSource",{enumerable:!0,get:function(){return jt.default}});j6.Upload=void 0;Object.defineProperty(j6,"canStoreURLs",{enumerable:!0,get:function(){return $j.canStoreURLs}});j6.defaultOptions=void 0;Object.defineProperty(j6,"enableDebugLog",{enumerable:!0,get:function(){return Vt.enableDebugLog}});j6.isSupported=void 0;var Ot=v1(MJ()),Vt=wJ(),Rt=v1(lV()),OI=v1(VR()),At=v1(dR()),Et=v1(pR()),Dj=v1(qA()),jt=v1(bJ()),$j=aE();function v1(D){return D&&D.__esModule?D:{default:D}}function K8(D){return K8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},K8(D)}function Tt(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function tE(D,$){for(var U=0;U<$.length;U++){var Q=$[U];if(Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q)Q.writable=!0;Object.defineProperty(D,Xj(Q.key),Q)}}function St(D,$,U){if($)tE(D.prototype,$);if(U)tE(D,U);return Object.defineProperty(D,"prototype",{writable:!1}),D}function Pt(D,$,U){return $=TU($),Ct(D,Uj()?Reflect.construct($,U||[],TU(D).constructor):$.apply(D,U))}function Ct(D,$){if($&&(K8($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return bt(D)}function bt(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function Uj(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(Uj=function(){return!!D})()}function TU(D){return TU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(U){return U.__proto__||Object.getPrototypeOf(U)},TU(D)}function vt(D,$){if(typeof $!=="function"&&$!==null)throw TypeError("Super expression must either be null or a function");if(D.prototype=Object.create($&&$.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),Object.defineProperty(D,"prototype",{writable:!1}),$)VI(D,$)}function VI(D,$){return VI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,X){return Q.__proto__=X,Q},VI(D,$)}function sE(D,$){var U=Object.keys(D);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(D);$&&(Q=Q.filter(function(X){return Object.getOwnPropertyDescriptor(D,X).enumerable})),U.push.apply(U,Q)}return U}function Z8(D){for(var $=1;$<arguments.length;$++){var U=arguments[$]!=null?arguments[$]:{};$%2?sE(Object(U),!0).forEach(function(Q){_t(D,Q,U[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(U)):sE(Object(U)).forEach(function(Q){Object.defineProperty(D,Q,Object.getOwnPropertyDescriptor(U,Q))})}return D}function _t(D,$,U){if($=Xj($),$ in D)Object.defineProperty(D,$,{value:U,enumerable:!0,configurable:!0,writable:!0});else D[$]=U;return D}function Xj(D){var $=kt(D,"string");return K8($)=="symbol"?$:$+""}function kt(D,$){if(K8(D)!="object"||!D)return D;var U=D[Symbol.toPrimitive];if(U!==void 0){var Q=U.call(D,$||"default");if(K8(Q)!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var eE=j6.defaultOptions=Z8(Z8({},OI.default.defaultOptions),{},{httpStack:new Dj.default,fileReader:new At.default,urlStorage:new Rt.default,fingerprint:Et.default}),QwD=j6.Upload=function(D){function $(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Tt(this,$),Q=Z8(Z8({},eE),Q),Pt(this,$,[U,Q])}return vt($,D),St($,null,[{key:"terminate",value:function(Q){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return X=Z8(Z8({},eE),X),OI.default.terminate(Q,X)}}])}(OI.default),FwD=j6.isSupported=!0});var N$;var H8=u(()=>{N$={name:"@capgo/cli",type:"module",version:"8.71.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","test:bundle":"bun test/test-bundle.mjs","test:bundle-validation":"bun test test/bundle/","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs && bun test/test-get-remote-dependencies.mjs","test:package-json-guard":"bun test/test-package-json-guard.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-export":"bun test/test-credentials-export.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:cli-help":"bun test/test-cli-help.mjs","test:build-cache-payload":"bun test/test-build-cache-payload.mjs","test:build-cancellation":"bun test/test-build-cancellation.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:cli-headers":"bun test/test-cli-headers.mjs","test:min-cli-version":"bun test/test-min-cli-version.mjs","test:authenticated-command-invocation":"bun test/test-authenticated-command-invocation.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:app-add-exists":"bun test/test-app-add-exists.mjs","test:app-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:app-todo":"bun test/test-app-todo.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:cli-recovery":"bun test/test-cli-recovery.mjs","test:create-supabase-client":"bun test/test-create-supabase-client.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:channel-add-exists":"bun test/test-channel-add-exists.mjs","test:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-upload-recovery":"bun test/test-init-upload-error-gate.mjs && bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-telemetry":"bun test/test-init-telemetry.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:android-version":"bun test/test-android-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && bun run test:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:cordova-upload-mode && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:cli-headers && bun run test:min-cli-version && bun run test:authenticated-command-invocation && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:app-add-exists && bun run test:app-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-supabase-client && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && bun run test:builder-login-gate && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:channel-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:android-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-gcp && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:2fa-compliance-network && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.mjs","test:builder-login-gate":"bun test/test-builder-login-gate.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs && bun test/test-app-list-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-gcp":"bun test/test-android-gcp.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:2fa-compliance-network":"bun test/test-2fa-compliance-network.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs","test:ios-provisioning-map":"bun test/test-ios-provisioning-map.mjs","test:ios-provisioning-command":"bun test/test-ios-provisioning-command.mjs","test:channel-list":"bun test/test-channel-list.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@manypkg/tools":"^2.1.2","@rrweb/types":"^2.1.1","@standard-schema/spec":"^1.1.0","@xmldom/xmldom":"^0.9.10","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","agent-cli-detector":"^0.1.6","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",typescript:"6.0.3",zod:"^4.5.4"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@vue/compiler-dom":"3.5.40","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.2",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",ws:"^8.21.1"}}});var AD;var _1=u(()=>{AD=class AD extends Error{context;constructor(D,$){super(D);this.name="CliUserError",this.context=$}}});import{platform as gt}from"node:os";import{version as ut}from"node:process";function zwD(D){qj=D}function yt(D){for(let $=0;$<D.length;$++)if(D.charCodeAt($)>255)return!1;return!0}function Ij(D){if(D.toLowerCase()==="x-capgo-log-token")return"Build log token is missing. Re-run the build command or pass a valid log token.";return"Capgo API key is missing. Run `npx -y @capgo/cli@latest login` or pass `--apikey`."}function mt(D){if(D.toLowerCase()==="x-capgo-log-token")return"Build log token contains invalid characters (only ASCII is allowed). Re-run the build command to get a fresh token.";if(D.toLowerCase()==="authorization")return"Authorization header contains invalid characters (only ASCII is allowed). Check your Capgo API key or Supabase anon key configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function AI(D,$){if($===void 0||$===null){if(RI.has(D.toLowerCase()))throw new AD(Ij(D));throw new AD(`HTTP header "${D}" is missing or invalid.`)}if(typeof $!=="string"){if(RI.has(D.toLowerCase()))throw new AD(Ij(D));throw new AD(`HTTP header "${D}" is missing or invalid.`)}if(!yt($)){if(RI.has(D.toLowerCase()))throw new AD(mt(D));throw new AD(`HTTP header "${D}" contains invalid characters (only ASCII is allowed).`)}return $}function T6(D){let $={capgo_api:ft,"x-cli-version":N$.version,"x-cli-command":qj,"x-cli-node":ut,"x-cli-os":gt()};if(D)for(let[U,Q]of Object.entries(D))$[U]=AI(U,Q);return $}var ft="2025-10-01",qj="",RI;var EI=u(()=>{H8();_1();RI=new Set(["authorization","capgkey","x-capgo-log-token"])});import{execFileSync as it}from"child_process";import ct from"path";function lt(D,$){if($===void 0)return!0;if(typeof $==="string")return D===$;if($ instanceof RegExp)return $.test(D);return $(D)}function nt(D,$,U){return{agent:{id:D.id,name:D.name},strategy:"environment",signal:$.name,value:U}}function ot(D,$){let U=[],Q=Bj($.command);for(let X of D)for(let F of X.process??[]){if(!F.pattern.test(Q))continue;U.push(at(X,F,{...$,command:Q}))}return U}function at(D,$,U){return{agent:{id:D.id,name:D.name},strategy:"process-tree",signal:$.pattern.toString(),value:`${U.pid}:${U.command}`}}function Wj(D,$){try{return it("ps",["-o",`${$}=`,"-p",String(D)],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return""}}function Bj(D){return ct.basename(D.trim()).replace(/^-+/,"")}function Gj(D={}){let $=D.agents??ht,U=D.strategies??tt(D.experimentalProcessTree),Q={env:D.env??process.env,pid:D.pid??process.pid,agents:$,maxProcessDepth:D.maxProcessDepth??20},X=U.flatMap((Y)=>Y.detect(Q)),F=st($,X,Q.env);if(F===void 0)return{detected:!1};return{detected:!0,agent:F}}function tt(D=!1){let $=[new dt];if(D)$.push(new rt);return $}function st(D,$,U){let Q=new Set($.map((X)=>X.agent.id));for(let X of D){if(!Q.has(X.id))continue;return{id:X.id,name:X.name,...et(X,U)}}return}function et(D,$){for(let U of D.sessionEnv??[]){let Q=$[U];if(Q!==void 0&&Q.length>0)return{sessionId:Q}}return{}}var ht,dt=class{name="environment";detect(D){let $=[];for(let U of D.agents)for(let Q of U.env??[]){let X=D.env[Q.name];if(X===void 0||!lt(X,Q.value))continue;$.push(nt(U,Q,X))}return $}},pt=class{read(D){let $=Wj(D,"comm"),U=Number.parseInt(Wj(D,"ppid"),10);if(!$||!Number.isInteger(U))return;return{pid:D,ppid:U,command:Bj($)}}},rt=class{constructor(D=new pt){this.reader=D}reader;name="process-tree";detect(D){let $=[],U=D.pid;for(let Q=0;Q<D.maxProcessDepth;Q+=1){let X=this.reader.read(U);if(X===void 0)break;if($.push(...ot(D.agents,X)),X.ppid===void 0||X.ppid<=1||X.ppid===U)break;U=X.ppid}return $}};var zj=u(()=>{ht=[{id:"codex",name:"Codex",env:[{name:"CODEX_CI",value:"1"},{name:"CODEX_SHELL",value:"1"},{name:"CODEX_THREAD_ID"}],process:[{pattern:/^codex$/i}],sessionEnv:["CODEX_THREAD_ID"]},{id:"cursor",name:"Cursor",env:[{name:"CURSOR_AGENT",value:"1"},{name:"CURSOR_CONVERSATION_ID"}],process:[{pattern:/^cursor$/i}],sessionEnv:["CURSOR_CONVERSATION_ID"]},{id:"claude-code",name:"Claude Code",env:[{name:"CLAUDECODE",value:"1"},{name:"CLAUDE_CODE_SESSION_ID"}],process:[{pattern:/^claude$/i}],sessionEnv:["CLAUDE_CODE_SESSION_ID"]},{id:"opencode",name:"OpenCode",env:[{name:"OPENCODE",value:"1"},{name:"OPENCODE_PID"}],process:[{pattern:/^opencode$/i}]},{id:"devin",name:"Devin",process:[{pattern:/devin/i}]},{id:"gemini",name:"Gemini CLI",env:[{name:"GEMINI_CLI",value:"1"}],process:[{pattern:/^gemini$/i}]},{id:"antigravity",name:"Antigravity",env:[{name:"ANTIGRAVITY_AGENT",value:"1"},{name:"ANTIGRAVITY_TRAJECTORY_ID"}],process:[{pattern:/^antigravity$/i}],sessionEnv:["ANTIGRAVITY_TRAJECTORY_ID"]},{id:"bolt",name:"Bolt",env:[{name:"BOLT_ENV"},{name:"BOLT_ORIGIN"},{name:"BOLT_SERVER_URL"}]},{id:"pi",name:"Pi",env:[{name:"PI_CODING_AGENT",value:"true"}]},{id:"replit",name:"Replit",env:[{name:"REPLIT_SESSION"}],sessionEnv:["REPLIT_SESSION"]},{id:"rork",name:"Rork",env:[{name:"RORK_API_URL"}]},{id:"kiro",name:"Kiro",env:[{name:"KIRO_SESSION_ID"}],process:[{pattern:/kiro/i}],sessionEnv:["KIRO_SESSION_ID"]},{id:"muse",name:"Muse Code",env:[{name:"MUSE_RELEASE_INFO"}]},{id:"cline",name:"Cline",env:[{name:"CLINE_WRAPPER_PATH"}],process:[{pattern:/^cline$/i}]},{id:"kilocode",name:"Kilo Code",env:[{name:"KILO",value:"1"},{name:"KILOCODE_VERSION"},{name:"KILO_RUN_ID"}],process:[{pattern:/^(kilo|kilocode)$/i}],sessionEnv:["KILO_RUN_ID"]},{id:"copilot",name:"GitHub Copilot CLI",env:[{name:"COPILOT_CLI",value:"1"},{name:"COPILOT_AGENT_SESSION_ID"},{name:"COPILOT_RUN_APP",value:"1"}],process:[{pattern:/^(github-copilot-cli|copilot)$/i}],sessionEnv:["COPILOT_AGENT_SESSION_ID"]}]});import{platform as Ds,release as $s}from"node:os";import{arch as Us,env as Xs,version as Qs}from"node:process";function EwD(D){jI=D}function jwD(){return jI}function Zj(D=Xs){let $=Gj({env:D}),U={cli_version:N$.version,node_version:Qs,os_platform:Ds(),os_arch:Us,os_release:$s(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"undefined",is_ci:p9.isCI,is_tty:Boolean(process.stdout.isTTY),invocation_source:jI,agent_invoker:$.detected};if($.detected&&$.agent)U.agent_identity=$.agent;if(p9.name)U.ci_provider=p9.name;return U}var p9,jI="cli";var Kj=u(()=>{zj();H8();p9=g0(GJ(),1)});import{AsyncLocalStorage as Fs}from"node:async_hooks";function PwD(D,$){return Lj.run(D,()=>Promise.resolve($()))}function Ys(){return Lj.getStore()}function CwD(){Nj=!0}function Mj(){return Nj}function bwD(D){wj=D}function Hj(D){try{wj?.(D)}catch{}}function _wD(D,$){let U;try{U=new URL(D).pathname}catch{U=D.split("?")[0]}let Q="/functions/v1/",X=U.indexOf(Q);if(X>=0){let q=U.slice(X+Q.length),W=0,B=q.length;while(W<B&&q[W]==="/")W+=1;while(B>W&&q[B-1]==="/")B-=1;let G=q.slice(W,B);return G?`${$} functions:${G}`:`${$} functions`}let F="/rest/v1/",Y=U.indexOf(F),J=Y>=0?U.slice(Y+F.length):U.replace(/^\//,"");if(J.startsWith("rpc/"))return`rpc:${J.slice(4).split("/")[0]}`;let I=J.split("/")[0]||U;return`${$} ${I}`}function Js(D){let $=D?.headers;if(!$)return;let U=$.get;if(typeof U==="function")return U.call($,"capgkey")??void 0;if(Array.isArray($))return $.find(([Q])=>Q.toLowerCase()==="capgkey")?.[1];return $.capgkey}function Oj(){return async($,U)=>{let Q=(U?.method??"GET").toUpperCase(),X=typeof $==="string"?$:$ instanceof URL?$.href:$.url,F=Ys(),Y=Js(U),J=Date.now();try{let I=await globalThis.fetch($,U);return Hj({url:X,method:Q,status:I.status,ok:I.ok,durationMs:Date.now()-J,source:F,apikey:Y}),I}catch(I){throw Hj({url:X,method:Q,status:0,ok:!1,durationMs:Date.now()-J,source:F,apikey:Y,error:I}),I}}}var Lj,Nj=!1,wj,vwD=5000;var Vj=u(()=>{Lj=new Fs});function Is(D,$){if(!J9(D)||!J9($))return!1;return B1(K$(D),K$($))}function qs(D,$,U){let Q=U?.trim()?`
89
+ GFS4: `),console.error(D)};if(!cD[z0]){if(YI=global[z0]||[],TE(cD,YI),cD.close=function(D){function $(U,Q){return D.call(cD,U,function(X){if(!X)jE();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty($,wU,{value:D}),$}(cD.close),cD.closeSync=function(D){function $(U){D.apply(cD,arguments),jE()}return Object.defineProperty($,wU,{value:D}),$}(cD.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){S1(cD[z0]),s("assert").equal(cD[z0].length,0)})}var YI;if(!global[z0])TE(global,cD[z0]);qI.exports=JI(ka(cD));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!cD.__patched)qI.exports=JI(cD),cD.__patched=!0;function JI(D){va(D),D.gracefulify=JI,D.createReadStream=j,D.createWriteStream=E;var $=D.readFile;D.readFile=U;function U(b,R,P){if(typeof R==="function")P=R,R=null;return h(b,R,P);function h(i,v,k,A){return $(i,v,function(w){if(w&&(w.code==="EMFILE"||w.code==="ENFILE"))W8([h,[i,v,k],w,A||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var Q=D.writeFile;D.writeFile=X;function X(b,R,P,h){if(typeof P==="function")h=P,P=null;return i(b,R,P,h);function i(v,k,A,w,V){return Q(v,k,A,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))W8([i,[v,k,A,w],_,V||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}var F=D.appendFile;if(F)D.appendFile=Y;function Y(b,R,P,h){if(typeof P==="function")h=P,P=null;return i(b,R,P,h);function i(v,k,A,w,V){return F(v,k,A,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))W8([i,[v,k,A,w],_,V||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}var J=D.copyFile;if(J)D.copyFile=I;function I(b,R,P,h){if(typeof P==="function")h=P,P=0;return i(b,R,P,h);function i(v,k,A,w,V){return J(v,k,A,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))W8([i,[v,k,A,w],_,V||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}var q=D.readdir;D.readdir=B;var W=/^v[0-5]\./;function B(b,R,P){if(typeof R==="function")P=R,R=null;var h=W.test(process.version)?function(k,A,w,V){return q(k,i(k,A,w,V))}:function(k,A,w,V){return q(k,A,i(k,A,w,V))};return h(b,R,P);function i(v,k,A,w){return function(V,_){if(V&&(V.code==="EMFILE"||V.code==="ENFILE"))W8([h,[v,k,A],V,w||Date.now(),Date.now()]);else{if(_&&_.sort)_.sort();if(typeof A==="function")A.call(this,V,_)}}}}if(process.version.substr(0,4)==="v0.8"){var G=_a(D);M=G.ReadStream,L=G.WriteStream}var Z=D.ReadStream;if(Z)M.prototype=Object.create(Z.prototype),M.prototype.open=N;var z=D.WriteStream;if(z)L.prototype=Object.create(z.prototype),L.prototype.open=O;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(b){M=b},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return L},set:function(b){L=b},enumerable:!0,configurable:!0});var K=M;Object.defineProperty(D,"FileReadStream",{get:function(){return K},set:function(b){K=b},enumerable:!0,configurable:!0});var H=L;Object.defineProperty(D,"FileWriteStream",{get:function(){return H},set:function(b){H=b},enumerable:!0,configurable:!0});function M(b,R){if(this instanceof M)return Z.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function N(){var b=this;S(b.path,b.flags,b.mode,function(R,P){if(R){if(b.autoClose)b.destroy();b.emit("error",R)}else b.fd=P,b.emit("open",P),b.read()})}function L(b,R){if(this instanceof L)return z.apply(this,arguments),this;else return L.apply(Object.create(L.prototype),arguments)}function O(){var b=this;S(b.path,b.flags,b.mode,function(R,P){if(R)b.destroy(),b.emit("error",R);else b.fd=P,b.emit("open",P)})}function j(b,R){return new D.ReadStream(b,R)}function E(b,R){return new D.WriteStream(b,R)}var C=D.open;D.open=S;function S(b,R,P,h){if(typeof P==="function")h=P,P=null;return i(b,R,P,h);function i(v,k,A,w,V){return C(v,k,A,function(_,m){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))W8([i,[v,k,A,w],_,V||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}return D}function W8(D){S1("ENQUEUE",D[0].name,D[1]),cD[z0].push(D),II()}var MU;function jE(){var D=Date.now();for(var $=0;$<cD[z0].length;++$)if(cD[z0][$].length>2)cD[z0][$][3]=D,cD[z0][$][4]=D;II()}function II(){if(clearTimeout(MU),MU=void 0,cD[z0].length===0)return;var D=cD[z0].shift(),$=D[0],U=D[1],Q=D[2],X=D[3],F=D[4];if(X===void 0)S1("RETRY",$.name,U),$.apply(null,U);else if(Date.now()-X>=60000){S1("TIMEOUT",$.name,U);var Y=U.pop();if(typeof Y==="function")Y.call(null,Q)}else{var J=Date.now()-F,I=Math.max(F-X,1),q=Math.min(I*1.2,100);if(J>=q)S1("RETRY",$.name,U),$.apply(null,U.concat([X]));else cD[z0].push(D)}if(MU===void 0)MU=setTimeout(II,0)}});var PE=T((oMD,SE)=>{function Y$(D,$){if(typeof $==="boolean")$={forever:$};if(this._originalTimeouts=JSON.parse(JSON.stringify(D)),this._timeouts=D,this._options=$||{},this._maxRetryTime=$&&$.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}SE.exports=Y$;Y$.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};Y$.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};Y$.prototype.retry=function(D){if(this._timeout)clearTimeout(this._timeout);if(!D)return!1;var $=new Date().getTime();if(D&&$-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(D);var U=this._timeouts.shift();if(U===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),U=this._timeouts.shift();else return!1;var Q=this,X=setTimeout(function(){if(Q._attempts++,Q._operationTimeoutCb){if(Q._timeout=setTimeout(function(){Q._operationTimeoutCb(Q._attempts)},Q._operationTimeout),Q._options.unref)Q._timeout.unref()}Q._fn(Q._attempts)},U);if(this._options.unref)X.unref();return!0};Y$.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var U=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){U._operationTimeoutCb()},U._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};Y$.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};Y$.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};Y$.prototype.start=Y$.prototype.try;Y$.prototype.errors=function(){return this._errors};Y$.prototype.attempts=function(){return this._attempts};Y$.prototype.mainError=function(){if(this._errors.length===0)return null;var D={},$=null,U=0;for(var Q=0;Q<this._errors.length;Q++){var X=this._errors[Q],F=X.message,Y=(D[F]||0)+1;if(D[F]=Y,Y>=U)$=X,U=Y}return $}});var bE=T((ua)=>{var ga=PE();ua.operation=function(D){var $=ua.timeouts(D);return new ga($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};ua.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var U in D)$[U]=D[U];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Q=[];for(var X=0;X<$.retries;X++)Q.push(this.createTimeout(X,$));if(D&&D.forever&&!Q.length)Q.push(this.createTimeout(X,$));return Q.sort(function(F,Y){return F-Y}),Q};ua.createTimeout=function(D,$){var U=$.randomize?Math.random()+1:1,Q=Math.round(U*$.minTimeout*Math.pow($.factor,D));return Q=Math.min(Q,$.maxTimeout),Q};ua.wrap=function(D,$,U){if($ instanceof Array)U=$,$=null;if(!U){U=[];for(var Q in D)if(typeof D[Q]==="function")U.push(Q)}for(var X=0;X<U.length;X++){var F=U[X],Y=D[F];D[F]=function(I){var q=ua.operation($),W=Array.prototype.slice.call(arguments,1),B=W.pop();W.push(function(G){if(q.retry(G))return;if(G)arguments[0]=q.mainError();B.apply(this,arguments)}),q.attempt(function(){I.apply(D,W)})}.bind(D,Y),D[F].options=$}}});var vE=T((tMD,OU)=>{OU.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")OU.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")OU.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var ZI=T((sMD,G8)=>{var dD=global.process,P1=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!P1(dD))G8.exports=function(){return function(){}};else{if(WI=s("assert"),C1=vE(),BI=/^win/i.test(dD.platform),B8=s("events"),typeof B8!=="function")B8=B8.EventEmitter;if(dD.__signal_exit_emitter__)Q0=dD.__signal_exit_emitter__;else Q0=dD.__signal_exit_emitter__=new B8,Q0.count=0,Q0.emitted={};if(!Q0.infinite)Q0.setMaxListeners(1/0),Q0.infinite=!0;G8.exports=function(D,$){if(!P1(global.process))return function(){};if(WI.equal(typeof D,"function","a callback must be provided for exit handler"),b1===!1)VU();var U="exit";if($&&$.alwaysLast)U="afterexit";var Q=function(){if(Q0.removeListener(U,D),Q0.listeners("exit").length===0&&Q0.listeners("afterexit").length===0)h9()};return Q0.on(U,D),Q},h9=function(){if(!b1||!P1(global.process))return;b1=!1,C1.forEach(function($){try{dD.removeListener($,d9[$])}catch(U){}}),dD.emit=l9,dD.reallyExit=RU,Q0.count-=1},G8.exports.unload=h9,A6=function($,U,Q){if(Q0.emitted[$])return;Q0.emitted[$]=!0,Q0.emit($,U,Q)},d9={},C1.forEach(function(D){d9[D]=function(){if(!P1(global.process))return;var U=dD.listeners(D);if(U.length===Q0.count){if(h9(),A6("exit",null,D),A6("afterexit",null,D),BI&&D==="SIGHUP")D="SIGINT";dD.kill(dD.pid,D)}}}),G8.exports.signals=function(){return C1},b1=!1,VU=function(){if(b1||!P1(global.process))return;b1=!0,Q0.count+=1,C1=C1.filter(function($){try{return dD.on($,d9[$]),!0}catch(U){return!1}}),dD.emit=zI,dD.reallyExit=GI},G8.exports.load=VU,RU=dD.reallyExit,GI=function($){if(!P1(global.process))return;dD.exitCode=$||0,A6("exit",dD.exitCode,null),A6("afterexit",dD.exitCode,null),RU.call(dD,dD.exitCode)},l9=dD.emit,zI=function($,U){if($==="exit"&&P1(global.process)){if(U!==void 0)dD.exitCode=U;var Q=l9.apply(this,arguments);return A6("exit",dD.exitCode,null),A6("afterexit",dD.exitCode,null),Q}else return l9.apply(this,arguments)}}var WI,C1,BI,B8,Q0,h9,A6,d9,b1,VU,RU,GI,l9,zI});var kE=T((la,KI)=>{var _E=Symbol();function ha(D,$,U){let Q=$[_E];if(Q)return $.stat(D,(F,Y)=>{if(F)return U(F);U(null,Y.mtime,Q)});let X=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,X,X,(F)=>{if(F)return U(F);$.stat(D,(Y,J)=>{if(Y)return U(Y);let I=J.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,_E,{value:I}),U(null,J.mtime,I)})})}function da(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}la.probe=ha;la.getMtime=da});var yE=T((sa,i9)=>{var ca=s("path"),NI=R6(),pa=bE(),ra=ZI(),xE=kE(),e$={};function n9(D,$){return $.lockfilePath||`${D}.lock`}function MI(D,$,U){if(!$.realpath)return U(null,ca.resolve(D));$.fs.realpath(D,U)}function LI(D,$,U){let Q=n9(D,$);$.fs.mkdir(Q,(X)=>{if(!X)return xE.probe(Q,$.fs,(F,Y,J)=>{if(F)return $.fs.rmdir(Q,()=>{}),U(F);U(null,Y,J)});if(X.code!=="EEXIST")return U(X);if($.stale<=0)return U(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(Q,(F,Y)=>{if(F){if(F.code==="ENOENT")return LI(D,{...$,stale:0},U);return U(F)}if(!gE(Y,$))return U(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));uE(D,$,(J)=>{if(J)return U(J);LI(D,{...$,stale:0},U)})})})}function gE(D,$){return D.mtime.getTime()<Date.now()-$.stale}function uE(D,$,U){$.fs.rmdir(n9(D,$),(Q)=>{if(Q&&Q.code!=="ENOENT")return U(Q);U()})}function AU(D,$){let U=e$[D];if(U.updateTimeout)return;if(U.updateDelay=U.updateDelay||$.update,U.updateTimeout=setTimeout(()=>{U.updateTimeout=null,$.fs.stat(U.lockfilePath,(Q,X)=>{let F=U.lastUpdate+$.stale<Date.now();if(Q){if(Q.code==="ENOENT"||F)return HI(D,U,Object.assign(Q,{code:"ECOMPROMISED"}));return U.updateDelay=1000,AU(D,$)}if(U.mtime.getTime()!==X.mtime.getTime())return HI(D,U,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let J=xE.getMtime(U.mtimePrecision);$.fs.utimes(U.lockfilePath,J,J,(I)=>{let q=U.lastUpdate+$.stale<Date.now();if(U.released)return;if(I){if(I.code==="ENOENT"||q)return HI(D,U,Object.assign(I,{code:"ECOMPROMISED"}));return U.updateDelay=1000,AU(D,$)}U.mtime=J,U.lastUpdate=Date.now(),U.updateDelay=null,AU(D,$)})})},U.updateDelay),U.updateTimeout.unref)U.updateTimeout.unref()}function HI(D,$,U){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(e$[D]===$)delete e$[D];$.options.onCompromised(U)}function oa(D,$,U){$={stale:1e4,update:null,realpath:!0,retries:0,fs:NI,onCompromised:(Q)=>{throw Q},...$},$.retries=$.retries||0,$.retries=typeof $.retries==="number"?{retries:$.retries}:$.retries,$.stale=Math.max($.stale||0,2000),$.update=$.update==null?$.stale/2:$.update||0,$.update=Math.max(Math.min($.update,$.stale/2),1000),MI(D,$,(Q,X)=>{if(Q)return U(Q);let F=pa.operation($.retries);F.attempt(()=>{LI(X,$,(Y,J,I)=>{if(F.retry(Y))return;if(Y)return U(F.mainError());let q=e$[X]={lockfilePath:n9(X,$),mtime:J,mtimePrecision:I,options:$,lastUpdate:Date.now()};AU(X,$),U(null,(W)=>{if(q.released)return W&&W(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));fE(X,{...$,realpath:!1},W)})})})})}function fE(D,$,U){$={fs:NI,realpath:!0,...$},MI(D,$,(Q,X)=>{if(Q)return U(Q);let F=e$[X];if(!F)return U(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));F.updateTimeout&&clearTimeout(F.updateTimeout),F.released=!0,delete e$[X],uE(X,$,U)})}function aa(D,$,U){$={stale:1e4,realpath:!0,fs:NI,...$},$.stale=Math.max($.stale||0,2000),MI(D,$,(Q,X)=>{if(Q)return U(Q);$.fs.stat(n9(X,$),(F,Y)=>{if(F)return F.code==="ENOENT"?U(null,!1):U(F);return U(null,!gE(Y,$))})})}function ta(){return e$}ra(()=>{for(let D in e$){let $=e$[D].options;try{$.fs.rmdirSync(n9(D,$))}catch(U){}}});sa.lock=oa;sa.unlock=fE;sa.check=aa;sa.getLocks=ta});var hE=T((eMD,mE)=>{var Xt=R6();function Qt(D){let $=["mkdir","realpath","stat","rmdir","utimes"],U={...D};return $.forEach((Q)=>{U[Q]=(...X)=>{let F=X.pop(),Y;try{Y=D[`${Q}Sync`](...X)}catch(J){return F(J)}F(null,Y)}}),U}function Ft(D){return(...$)=>new Promise((U,Q)=>{$.push((X,F)=>{if(X)Q(X);else U(F)}),D(...$)})}function Yt(D){return(...$)=>{let U,Q;if($.push((X,F)=>{U=X,Q=F}),D(...$),U)throw U;return Q}}function Jt(D){if(D={...D},D.fs=Qt(D.fs||Xt),typeof D.retries==="number"&&D.retries>0||D.retries&&typeof D.retries.retries==="number"&&D.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return D}mE.exports={toPromise:Ft,toSync:Yt,toSyncOptions:Jt}});var lE=T((DwD,E6)=>{var z8=yE(),{toPromise:EU,toSync:jU,toSyncOptions:wI}=hE();async function dE(D,$){let U=await EU(z8.lock)(D,$);return EU(U)}function It(D,$){let U=jU(z8.lock)(D,wI($));return jU(U)}function qt(D,$){return EU(z8.unlock)(D,$)}function Wt(D,$){return jU(z8.unlock)(D,wI($))}function Bt(D,$){return EU(z8.check)(D,$)}function Gt(D,$){return jU(z8.check)(D,wI($))}E6.exports=dE;E6.exports.lock=dE;E6.exports.unlock=qt;E6.exports.lockSync=It;E6.exports.unlockSync=Wt;E6.exports.check=Bt;E6.exports.checkSync=Gt});var aE=T((rE)=>{Object.defineProperty(rE,"__esModule",{value:!0});rE.canStoreURLs=rE.FileUrlStorage=void 0;var nE=s("fs"),zt=Kt(NE()),iE=Zt(lE());function pE(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,U=new WeakMap;return(pE=function(Q){return Q?U:$})(D)}function Zt(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var U=pE($);if(U&&U.has(D))return U.get(D);var Q={__proto__:null},X=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in D)if(F!=="default"&&{}.hasOwnProperty.call(D,F)){var Y=X?Object.getOwnPropertyDescriptor(D,F):null;Y&&(Y.get||Y.set)?Object.defineProperty(Q,F,Y):Q[F]=D[F]}return Q.default=D,U&&U.set(D,Q),Q}function Kt(D){return D&&D.__esModule?D:{default:D}}function c9(D){return c9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},c9(D)}function Ht(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function cE(D,$){for(var U=0;U<$.length;U++){var Q=$[U];if(Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q)Q.writable=!0;Object.defineProperty(D,Nt(Q.key),Q)}}function Lt(D,$,U){if($)cE(D.prototype,$);if(U)cE(D,U);return Object.defineProperty(D,"prototype",{writable:!1}),D}function Nt(D){var $=Mt(D,"string");return c9($)=="symbol"?$:$+""}function Mt(D,$){if(c9(D)!="object"||!D)return D;var U=D[Symbol.toPrimitive];if(U!==void 0){var Q=U.call(D,$||"default");if(c9(Q)!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var $wD=rE.canStoreURLs=!0,UwD=rE.FileUrlStorage=function(){function D($){Ht(this,D),this.path=$}return Lt(D,[{key:"findAllUploads",value:function(){var U=this;return new Promise(function(Q,X){U._getItems("tus::",function(F,Y){if(F)X(F);else Q(Y)})})}},{key:"findUploadsByFingerprint",value:function(U){var Q=this;return new Promise(function(X,F){Q._getItems("tus::".concat(U),function(Y,J){if(Y)F(Y);else X(J)})})}},{key:"removeUpload",value:function(U){var Q=this;return new Promise(function(X,F){Q._removeItem(U,function(Y){if(Y)F(Y);else X()})})}},{key:"addUpload",value:function(U,Q){var X=this,F=Math.round(Math.random()*1000000000000),Y="tus::".concat(U,"::").concat(F);return new Promise(function(J,I){X._setItem(Y,Q,function(q){if(q)I(q);else J(Y)})})}},{key:"_setItem",value:function(U,Q,X){var F=this;iE.lock(this.path,this._lockfileOptions()).then(function(Y){X=F._releaseAndCb(Y,X),F._getData(function(J,I){if(J){X(J);return}I[U]=Q,F._writeData(I,function(q){return X(q)})})}).catch(X)}},{key:"_getItems",value:function(U,Q){this._getData(function(X,F){if(X){Q(X);return}var Y=Object.keys(F).filter(function(J){return J.startsWith(U)}).map(function(J){var I=F[J];return I.urlStorageKey=J,I});Q(null,Y)})}},{key:"_removeItem",value:function(U,Q){var X=this;iE.lock(this.path,this._lockfileOptions()).then(function(F){Q=X._releaseAndCb(F,Q),X._getData(function(Y,J){if(Y){Q(Y);return}delete J[U],X._writeData(J,function(I){return Q(I)})})}).catch(Q)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(U,Q){return function(X){if(X){U().then(function(){return Q(X)}).catch(function(F){return Q((0,zt.default)([X,F]))});return}U().then(Q).catch(Q)}}},{key:"_writeData",value:function(U,Q){var X={encoding:"utf8",mode:432,flag:"w"};(0,nE.writeFile)(this.path,JSON.stringify(U),X,function(F){return Q(F)})}},{key:"_getData",value:function(U){(0,nE.readFile)(this.path,"utf8",function(Q,X){if(Q){if(Q.code==="ENOENT")U(null,{});else U(Q);return}try{X=!X.trim().length?{}:JSON.parse(X)}catch(F){U(F);return}U(null,X)})}}])}()});var Jj=T((j6)=>{Object.defineProperty(j6,"__esModule",{value:!0});Object.defineProperty(j6,"DefaultHttpStack",{enumerable:!0,get:function(){return Dj.default}});Object.defineProperty(j6,"DetailedError",{enumerable:!0,get:function(){return Ot.default}});Object.defineProperty(j6,"FileUrlStorage",{enumerable:!0,get:function(){return $j.FileUrlStorage}});Object.defineProperty(j6,"StreamSource",{enumerable:!0,get:function(){return jt.default}});j6.Upload=void 0;Object.defineProperty(j6,"canStoreURLs",{enumerable:!0,get:function(){return $j.canStoreURLs}});j6.defaultOptions=void 0;Object.defineProperty(j6,"enableDebugLog",{enumerable:!0,get:function(){return Vt.enableDebugLog}});j6.isSupported=void 0;var Ot=v1(MJ()),Vt=wJ(),Rt=v1(lV()),OI=v1(VR()),At=v1(dR()),Et=v1(pR()),Dj=v1(qA()),jt=v1(bJ()),$j=aE();function v1(D){return D&&D.__esModule?D:{default:D}}function K8(D){return K8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},K8(D)}function Tt(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function tE(D,$){for(var U=0;U<$.length;U++){var Q=$[U];if(Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q)Q.writable=!0;Object.defineProperty(D,Xj(Q.key),Q)}}function St(D,$,U){if($)tE(D.prototype,$);if(U)tE(D,U);return Object.defineProperty(D,"prototype",{writable:!1}),D}function Pt(D,$,U){return $=TU($),Ct(D,Uj()?Reflect.construct($,U||[],TU(D).constructor):$.apply(D,U))}function Ct(D,$){if($&&(K8($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return bt(D)}function bt(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function Uj(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(Uj=function(){return!!D})()}function TU(D){return TU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(U){return U.__proto__||Object.getPrototypeOf(U)},TU(D)}function vt(D,$){if(typeof $!=="function"&&$!==null)throw TypeError("Super expression must either be null or a function");if(D.prototype=Object.create($&&$.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),Object.defineProperty(D,"prototype",{writable:!1}),$)VI(D,$)}function VI(D,$){return VI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,X){return Q.__proto__=X,Q},VI(D,$)}function sE(D,$){var U=Object.keys(D);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(D);$&&(Q=Q.filter(function(X){return Object.getOwnPropertyDescriptor(D,X).enumerable})),U.push.apply(U,Q)}return U}function Z8(D){for(var $=1;$<arguments.length;$++){var U=arguments[$]!=null?arguments[$]:{};$%2?sE(Object(U),!0).forEach(function(Q){_t(D,Q,U[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(U)):sE(Object(U)).forEach(function(Q){Object.defineProperty(D,Q,Object.getOwnPropertyDescriptor(U,Q))})}return D}function _t(D,$,U){if($=Xj($),$ in D)Object.defineProperty(D,$,{value:U,enumerable:!0,configurable:!0,writable:!0});else D[$]=U;return D}function Xj(D){var $=kt(D,"string");return K8($)=="symbol"?$:$+""}function kt(D,$){if(K8(D)!="object"||!D)return D;var U=D[Symbol.toPrimitive];if(U!==void 0){var Q=U.call(D,$||"default");if(K8(Q)!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var eE=j6.defaultOptions=Z8(Z8({},OI.default.defaultOptions),{},{httpStack:new Dj.default,fileReader:new At.default,urlStorage:new Rt.default,fingerprint:Et.default}),QwD=j6.Upload=function(D){function $(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Tt(this,$),Q=Z8(Z8({},eE),Q),Pt(this,$,[U,Q])}return vt($,D),St($,null,[{key:"terminate",value:function(Q){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return X=Z8(Z8({},eE),X),OI.default.terminate(Q,X)}}])}(OI.default),FwD=j6.isSupported=!0});var N$;var H8=u(()=>{N$={name:"@capgo/cli",type:"module",version:"8.72.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","test:bundle":"bun test/test-bundle.mjs","test:bundle-validation":"bun test test/bundle/","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs && bun test/test-get-remote-dependencies.mjs","test:package-json-guard":"bun test/test-package-json-guard.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-export":"bun test/test-credentials-export.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:cli-help":"bun test/test-cli-help.mjs","test:build-cache-payload":"bun test/test-build-cache-payload.mjs","test:build-cancellation":"bun test/test-build-cancellation.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:cli-headers":"bun test/test-cli-headers.mjs","test:min-cli-version":"bun test/test-min-cli-version.mjs","test:authenticated-command-invocation":"bun test/test-authenticated-command-invocation.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:app-add-exists":"bun test/test-app-add-exists.mjs","test:app-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:app-todo":"bun test/test-app-todo.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:cli-recovery":"bun test/test-cli-recovery.mjs","test:create-supabase-client":"bun test/test-create-supabase-client.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:channel-add-exists":"bun test/test-channel-add-exists.mjs","test:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-upload-recovery":"bun test/test-init-upload-error-gate.mjs && bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-telemetry":"bun test/test-init-telemetry.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:android-version":"bun test/test-android-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && bun run test:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:cordova-upload-mode && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:cli-headers && bun run test:min-cli-version && bun run test:authenticated-command-invocation && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:app-add-exists && bun run test:app-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-supabase-client && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && bun run test:builder-login-gate && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:channel-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:android-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-gcp && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:2fa-compliance-network && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.mjs","test:builder-login-gate":"bun test/test-builder-login-gate.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs && bun test/test-app-list-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-gcp":"bun test/test-android-gcp.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:2fa-compliance-network":"bun test/test-2fa-compliance-network.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs","test:ios-provisioning-map":"bun test/test-ios-provisioning-map.mjs","test:ios-provisioning-command":"bun test/test-ios-provisioning-command.mjs","test:channel-list":"bun test/test-channel-list.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@manypkg/tools":"^2.1.2","@rrweb/types":"^2.1.1","@standard-schema/spec":"^1.1.0","@xmldom/xmldom":"^0.9.10","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","agent-cli-detector":"^0.1.6","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",typescript:"6.0.3",zod:"^4.5.4"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@vue/compiler-dom":"3.5.40","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.2",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",ws:"^8.21.1"}}});var AD;var _1=u(()=>{AD=class AD extends Error{context;constructor(D,$){super(D);this.name="CliUserError",this.context=$}}});import{platform as gt}from"node:os";import{version as ut}from"node:process";function zwD(D){qj=D}function yt(D){for(let $=0;$<D.length;$++)if(D.charCodeAt($)>255)return!1;return!0}function Ij(D){if(D.toLowerCase()==="x-capgo-log-token")return"Build log token is missing. Re-run the build command or pass a valid log token.";return"Capgo API key is missing. Run `npx -y @capgo/cli@latest login` or pass `--apikey`."}function mt(D){if(D.toLowerCase()==="x-capgo-log-token")return"Build log token contains invalid characters (only ASCII is allowed). Re-run the build command to get a fresh token.";if(D.toLowerCase()==="authorization")return"Authorization header contains invalid characters (only ASCII is allowed). Check your Capgo API key or Supabase anon key configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function AI(D,$){if($===void 0||$===null){if(RI.has(D.toLowerCase()))throw new AD(Ij(D));throw new AD(`HTTP header "${D}" is missing or invalid.`)}if(typeof $!=="string"){if(RI.has(D.toLowerCase()))throw new AD(Ij(D));throw new AD(`HTTP header "${D}" is missing or invalid.`)}if(!yt($)){if(RI.has(D.toLowerCase()))throw new AD(mt(D));throw new AD(`HTTP header "${D}" contains invalid characters (only ASCII is allowed).`)}return $}function T6(D){let $={capgo_api:ft,"x-cli-version":N$.version,"x-cli-command":qj,"x-cli-node":ut,"x-cli-os":gt()};if(D)for(let[U,Q]of Object.entries(D))$[U]=AI(U,Q);return $}var ft="2025-10-01",qj="",RI;var EI=u(()=>{H8();_1();RI=new Set(["authorization","capgkey","x-capgo-log-token"])});import{execFileSync as it}from"child_process";import ct from"path";function lt(D,$){if($===void 0)return!0;if(typeof $==="string")return D===$;if($ instanceof RegExp)return $.test(D);return $(D)}function nt(D,$,U){return{agent:{id:D.id,name:D.name},strategy:"environment",signal:$.name,value:U}}function ot(D,$){let U=[],Q=Bj($.command);for(let X of D)for(let F of X.process??[]){if(!F.pattern.test(Q))continue;U.push(at(X,F,{...$,command:Q}))}return U}function at(D,$,U){return{agent:{id:D.id,name:D.name},strategy:"process-tree",signal:$.pattern.toString(),value:`${U.pid}:${U.command}`}}function Wj(D,$){try{return it("ps",["-o",`${$}=`,"-p",String(D)],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return""}}function Bj(D){return ct.basename(D.trim()).replace(/^-+/,"")}function Gj(D={}){let $=D.agents??ht,U=D.strategies??tt(D.experimentalProcessTree),Q={env:D.env??process.env,pid:D.pid??process.pid,agents:$,maxProcessDepth:D.maxProcessDepth??20},X=U.flatMap((Y)=>Y.detect(Q)),F=st($,X,Q.env);if(F===void 0)return{detected:!1};return{detected:!0,agent:F}}function tt(D=!1){let $=[new dt];if(D)$.push(new rt);return $}function st(D,$,U){let Q=new Set($.map((X)=>X.agent.id));for(let X of D){if(!Q.has(X.id))continue;return{id:X.id,name:X.name,...et(X,U)}}return}function et(D,$){for(let U of D.sessionEnv??[]){let Q=$[U];if(Q!==void 0&&Q.length>0)return{sessionId:Q}}return{}}var ht,dt=class{name="environment";detect(D){let $=[];for(let U of D.agents)for(let Q of U.env??[]){let X=D.env[Q.name];if(X===void 0||!lt(X,Q.value))continue;$.push(nt(U,Q,X))}return $}},pt=class{read(D){let $=Wj(D,"comm"),U=Number.parseInt(Wj(D,"ppid"),10);if(!$||!Number.isInteger(U))return;return{pid:D,ppid:U,command:Bj($)}}},rt=class{constructor(D=new pt){this.reader=D}reader;name="process-tree";detect(D){let $=[],U=D.pid;for(let Q=0;Q<D.maxProcessDepth;Q+=1){let X=this.reader.read(U);if(X===void 0)break;if($.push(...ot(D.agents,X)),X.ppid===void 0||X.ppid<=1||X.ppid===U)break;U=X.ppid}return $}};var zj=u(()=>{ht=[{id:"codex",name:"Codex",env:[{name:"CODEX_CI",value:"1"},{name:"CODEX_SHELL",value:"1"},{name:"CODEX_THREAD_ID"}],process:[{pattern:/^codex$/i}],sessionEnv:["CODEX_THREAD_ID"]},{id:"cursor",name:"Cursor",env:[{name:"CURSOR_AGENT",value:"1"},{name:"CURSOR_CONVERSATION_ID"}],process:[{pattern:/^cursor$/i}],sessionEnv:["CURSOR_CONVERSATION_ID"]},{id:"claude-code",name:"Claude Code",env:[{name:"CLAUDECODE",value:"1"},{name:"CLAUDE_CODE_SESSION_ID"}],process:[{pattern:/^claude$/i}],sessionEnv:["CLAUDE_CODE_SESSION_ID"]},{id:"opencode",name:"OpenCode",env:[{name:"OPENCODE",value:"1"},{name:"OPENCODE_PID"}],process:[{pattern:/^opencode$/i}]},{id:"devin",name:"Devin",process:[{pattern:/devin/i}]},{id:"gemini",name:"Gemini CLI",env:[{name:"GEMINI_CLI",value:"1"}],process:[{pattern:/^gemini$/i}]},{id:"antigravity",name:"Antigravity",env:[{name:"ANTIGRAVITY_AGENT",value:"1"},{name:"ANTIGRAVITY_TRAJECTORY_ID"}],process:[{pattern:/^antigravity$/i}],sessionEnv:["ANTIGRAVITY_TRAJECTORY_ID"]},{id:"bolt",name:"Bolt",env:[{name:"BOLT_ENV"},{name:"BOLT_ORIGIN"},{name:"BOLT_SERVER_URL"}]},{id:"pi",name:"Pi",env:[{name:"PI_CODING_AGENT",value:"true"}]},{id:"replit",name:"Replit",env:[{name:"REPLIT_SESSION"}],sessionEnv:["REPLIT_SESSION"]},{id:"rork",name:"Rork",env:[{name:"RORK_API_URL"}]},{id:"kiro",name:"Kiro",env:[{name:"KIRO_SESSION_ID"}],process:[{pattern:/kiro/i}],sessionEnv:["KIRO_SESSION_ID"]},{id:"muse",name:"Muse Code",env:[{name:"MUSE_RELEASE_INFO"}]},{id:"cline",name:"Cline",env:[{name:"CLINE_WRAPPER_PATH"}],process:[{pattern:/^cline$/i}]},{id:"kilocode",name:"Kilo Code",env:[{name:"KILO",value:"1"},{name:"KILOCODE_VERSION"},{name:"KILO_RUN_ID"}],process:[{pattern:/^(kilo|kilocode)$/i}],sessionEnv:["KILO_RUN_ID"]},{id:"copilot",name:"GitHub Copilot CLI",env:[{name:"COPILOT_CLI",value:"1"},{name:"COPILOT_AGENT_SESSION_ID"},{name:"COPILOT_RUN_APP",value:"1"}],process:[{pattern:/^(github-copilot-cli|copilot)$/i}],sessionEnv:["COPILOT_AGENT_SESSION_ID"]}]});import{platform as Ds,release as $s}from"node:os";import{arch as Us,env as Xs,version as Qs}from"node:process";function EwD(D){jI=D}function jwD(){return jI}function Zj(D=Xs){let $=Gj({env:D}),U={cli_version:N$.version,node_version:Qs,os_platform:Ds(),os_arch:Us,os_release:$s(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"undefined",is_ci:p9.isCI,is_tty:Boolean(process.stdout.isTTY),invocation_source:jI,agent_invoker:$.detected};if($.detected&&$.agent)U.agent_identity=$.agent;if(p9.name)U.ci_provider=p9.name;return U}var p9,jI="cli";var Kj=u(()=>{zj();H8();p9=g0(GJ(),1)});import{AsyncLocalStorage as Fs}from"node:async_hooks";function PwD(D,$){return Lj.run(D,()=>Promise.resolve($()))}function Ys(){return Lj.getStore()}function CwD(){Nj=!0}function Mj(){return Nj}function bwD(D){wj=D}function Hj(D){try{wj?.(D)}catch{}}function _wD(D,$){let U;try{U=new URL(D).pathname}catch{U=D.split("?")[0]}let Q="/functions/v1/",X=U.indexOf(Q);if(X>=0){let q=U.slice(X+Q.length),W=0,B=q.length;while(W<B&&q[W]==="/")W+=1;while(B>W&&q[B-1]==="/")B-=1;let G=q.slice(W,B);return G?`${$} functions:${G}`:`${$} functions`}let F="/rest/v1/",Y=U.indexOf(F),J=Y>=0?U.slice(Y+F.length):U.replace(/^\//,"");if(J.startsWith("rpc/"))return`rpc:${J.slice(4).split("/")[0]}`;let I=J.split("/")[0]||U;return`${$} ${I}`}function Js(D){let $=D?.headers;if(!$)return;let U=$.get;if(typeof U==="function")return U.call($,"capgkey")??void 0;if(Array.isArray($))return $.find(([Q])=>Q.toLowerCase()==="capgkey")?.[1];return $.capgkey}function Oj(){return async($,U)=>{let Q=(U?.method??"GET").toUpperCase(),X=typeof $==="string"?$:$ instanceof URL?$.href:$.url,F=Ys(),Y=Js(U),J=Date.now();try{let I=await globalThis.fetch($,U);return Hj({url:X,method:Q,status:I.status,ok:I.ok,durationMs:Date.now()-J,source:F,apikey:Y}),I}catch(I){throw Hj({url:X,method:Q,status:0,ok:!1,durationMs:Date.now()-J,source:F,apikey:Y,error:I}),I}}}var Lj,Nj=!1,wj,vwD=5000;var Vj=u(()=>{Lj=new Fs});function Is(D,$){if(!J9(D)||!J9($))return!1;return B1(K$(D),K$($))}function qs(D,$,U){let Q=U?.trim()?`
90
90
  ${U.trim()}`:"";return`This Capgo API requires @capgo/cli@${$} or newer. You are using @capgo/cli@${D}.${Q}
91
91
  Please update: npx @capgo/cli@latest`}function Rj(D,$,U=!1){let Q=$||N$.version,X=D.minCliVersion?.trim();if(!X||!Is(Q,X))return;let F=qs(Q,X,D.minCliVersionReason);if(!U)SD.error(F);throw new AD(F,{minCliVersion:X,currentVersion:Q})}var Aj=u(()=>{L6();oY();H8();_1()});function Ej(D,$){let Q=["normal","bold","dim","italic","underline","strikethrough"].indexOf(D),X="\x1B[";return"\x1B["+Q+"m"+$+"\x1B[0m"}var r9;var jj=u(()=>{r9=class r9{title=null;headers=[];rows=[];static narrowTheme={top:["╔","═","╤","╗"],row:["║"," ","│","║"],div:["╟","─","┼","╢"],bot:["╚","═","╧","╝"]};static wideTheme={top:["╔═","═","═╤═","═╗"],row:["║ "," "," │ "," ║"],div:["╟─","─","─┼─","─╢"],bot:["╚═","═","═╧═","═╝"]};static roundTheme={top:["╭─","─","─┬─","─╮"],row:["│ "," "," │ "," │"],div:["├─","─","─┼─","─┤"],bot:["╰─","─","─┴─","─╯"]};theme=r9.wideTheme;columnWidth(){let D=[this.headers,...this.rows].filter((U)=>U.length>0),$=D[0].map((U)=>this.cast(U).length);for(let U of D.slice(1))for(let Q=0;Q<$.length;Q++){let X=this.cast(U[Q]).length;if(X>$[Q])$[Q]=X}return $}cast(D){if(typeof D==="object")return"obj";if(D!==void 0&&typeof D.toString==="function")return D.toString();else return""}renderTitle(){return"[ "+this.title+" ]"}renderLine(D){let $=this.columnWidth();return D[0]+$.map((U)=>D[1].repeat(U)).join(D[2])+D[3]}renderCell(D,$,U=!1){let Q=this.cast(D),X=U?Ej("bold",Q):Q,F=$-Q.length,Y=this.theme.row[1];switch(typeof D){case"number":return Y.repeat(F)+X;case"string":return X+Y.repeat(F);case"boolean":case"object":return Y.repeat(Math.ceil(F/2))+Ej("italic",Q)+Y.repeat(Math.floor(F/2));default:return Y.repeat(F)}}renderRow(D,$=!1){let U=this.theme.row,Q=this.columnWidth();return U[0]+D.map((X,F)=>this.renderCell(X,Q[F],$)).join(U[2])+U[3]}toString(){let D=this.theme,$=this.headers.length>0,U=this.rows.length>0;return[this.title?this.renderTitle():"",$||U?this.renderLine(D.top):"",$?this.renderRow(this.headers,!0):"",$&&U?this.renderLine(D.div):"",...this.rows.map((Q)=>this.renderRow(Q)),$||U?this.renderLine(D.bot):""].filter((Q)=>Q.length>0).join(`
92
92
  `)}}});var Tj=u(()=>{jj()});async function Sj(D){try{let U=`https://registry.npmjs.org/${encodeURIComponent(D.toLowerCase())}`,Q=await fetch(U,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!Q.ok)return null;return(await Q.json())["dist-tags"]?.latest||null}catch{return null}}async function Ws(){let D=await Sj("@capgo/cli")??"",$=D?.split(".")[0]??"";return{currentVersion:N$.version,latestVersion:D,isOutdated:!!D&&D!==N$.version,majorVersion:$}}async function Pj(D={warn:($)=>SD.warning($)}){let{isOutdated:$,currentVersion:U,latestVersion:Q,majorVersion:X}=await Ws();if($)D.warn(`\uD83D\uDEA8 You are using @capgo/cli@${U} it's not the latest version.
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.71.0",
4
+ "version": "8.72.0",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -50,6 +50,7 @@ export declare function findChannel(supabase: SupabaseClient<Database>, appId: s
50
50
  ios: boolean;
51
51
  name: string;
52
52
  owner_org: string;
53
+ paused_at: string | null;
53
54
  public: boolean;
54
55
  auto_pause_action: string;
55
56
  auto_pause_confidence: number;
package/dist/src/sdk.js CHANGED
@@ -1,4 +1,4 @@
1
- import{createRequire as qC0}from"node:module";var module={exports:{}};var QC0=Object.create;var{getPrototypeOf:JC0,defineProperty:gG,getOwnPropertyNames:ig}=Object;var aw=Object.prototype.hasOwnProperty;function sw($){return this[$]}var z0=($,D,X)=>{var Q=ig(D);for(let J of Q)if(!aw.call($,J)&&J!=="default")gG($,J,{get:sw.bind(D,J),enumerable:!0});if(X){for(let J of Q)if(!aw.call(X,J)&&J!=="default")gG(X,J,{get:sw.bind(D,J),enumerable:!0});return X}},YC0,ZC0,v$=($,D,X)=>{var Q=$!=null&&typeof $==="object";if(Q){var J=D?YC0??=new WeakMap:ZC0??=new WeakMap,Y=J.get($);if(Y)return Y}X=$!=null?QC0(JC0($)):{};let Z=D||!$||!$.__esModule?gG(X,"default",{value:$,enumerable:!0}):X;for(let F of ig($))if(!aw.call(Z,F))gG(Z,F,{get:sw.bind($,F),enumerable:!0});if(Q)J.set($,Z);return Z};var E=($,D)=>()=>(D||$((D={exports:{}}).exports,D),D.exports);var FC0=($)=>$;function GC0($,D){this[$]=FC0.bind(null,D)}var K6=($,D)=>{for(var X in D)gG($,X,{get:D[X],enumerable:!0,configurable:!0,set:GC0.bind(D,X)})};var o=($,D)=>()=>($&&(D=$($=0)),D);var X0=qC0(import.meta.url);var DD;var M8=o(()=>{DD={name:"@capgo/cli",type:"module",version:"8.71.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","test:bundle":"bun test/test-bundle.mjs","test:bundle-validation":"bun test test/bundle/","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs && bun test/test-get-remote-dependencies.mjs","test:package-json-guard":"bun test/test-package-json-guard.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-export":"bun test/test-credentials-export.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:cli-help":"bun test/test-cli-help.mjs","test:build-cache-payload":"bun test/test-build-cache-payload.mjs","test:build-cancellation":"bun test/test-build-cancellation.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:cli-headers":"bun test/test-cli-headers.mjs","test:min-cli-version":"bun test/test-min-cli-version.mjs","test:authenticated-command-invocation":"bun test/test-authenticated-command-invocation.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:app-add-exists":"bun test/test-app-add-exists.mjs","test:app-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:app-todo":"bun test/test-app-todo.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:cli-recovery":"bun test/test-cli-recovery.mjs","test:create-supabase-client":"bun test/test-create-supabase-client.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:channel-add-exists":"bun test/test-channel-add-exists.mjs","test:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-upload-recovery":"bun test/test-init-upload-error-gate.mjs && bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-telemetry":"bun test/test-init-telemetry.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:android-version":"bun test/test-android-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && bun run test:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:cordova-upload-mode && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:cli-headers && bun run test:min-cli-version && bun run test:authenticated-command-invocation && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:app-add-exists && bun run test:app-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-supabase-client && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && bun run test:builder-login-gate && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:channel-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:android-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-gcp && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:2fa-compliance-network && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.mjs","test:builder-login-gate":"bun test/test-builder-login-gate.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs && bun test/test-app-list-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-gcp":"bun test/test-android-gcp.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:2fa-compliance-network":"bun test/test-2fa-compliance-network.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs","test:ios-provisioning-map":"bun test/test-ios-provisioning-map.mjs","test:ios-provisioning-command":"bun test/test-ios-provisioning-command.mjs","test:channel-list":"bun test/test-channel-list.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@manypkg/tools":"^2.1.2","@rrweb/types":"^2.1.1","@standard-schema/spec":"^1.1.0","@xmldom/xmldom":"^0.9.10","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","agent-cli-detector":"^0.1.6","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",typescript:"6.0.3",zod:"^4.5.4"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@vue/compiler-dom":"3.5.40","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.2",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",ws:"^8.21.1"}}});var F0;var I$=o(()=>{F0=class F0 extends Error{context;constructor($,D){super($);this.name="CliUserError",this.context=D}}});import{platform as UC0}from"node:os";import{version as HC0}from"node:process";function VC0($){for(let D=0;D<$.length;D++)if($.charCodeAt(D)>255)return!1;return!0}function pg($){if($.toLowerCase()==="x-capgo-log-token")return"Build log token is missing. Re-run the build command or pass a valid log token.";return"Capgo API key is missing. Run `npx -y @capgo/cli@latest login` or pass `--apikey`."}function zC0($){if($.toLowerCase()==="x-capgo-log-token")return"Build log token contains invalid characters (only ASCII is allowed). Re-run the build command to get a fresh token.";if($.toLowerCase()==="authorization")return"Authorization header contains invalid characters (only ASCII is allowed). Check your Capgo API key or Supabase anon key configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function $R($,D){if(D===void 0||D===null){if(ew.has($.toLowerCase()))throw new F0(pg($));throw new F0(`HTTP header "${$}" is missing or invalid.`)}if(typeof D!=="string"){if(ew.has($.toLowerCase()))throw new F0(pg($));throw new F0(`HTTP header "${$}" is missing or invalid.`)}if(!VC0(D)){if(ew.has($.toLowerCase()))throw new F0(zC0($));throw new F0(`HTTP header "${$}" contains invalid characters (only ASCII is allowed).`)}return D}function o$($){let D={capgo_api:KC0,"x-cli-version":DD.version,"x-cli-command":OC0,"x-cli-node":HC0,"x-cli-os":UC0()};if($)for(let[X,Q]of Object.entries($))D[X]=$R(X,Q);return D}var KC0="2025-10-01",OC0="",ew;var W4=o(()=>{M8();I$();ew=new Set(["authorization","capgkey","x-capgo-log-token"])});var rg,og=($)=>{return $===12288||$>=65281&&$<=65376||$>=65504&&$<=65510},tg=($)=>{return $===8987||$===9001||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$>=131072&&$<=196605||$>=196608&&$<=262141};var ag=o(()=>{rg=(()=>{let $=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(D)=>{let X=0;$.lastIndex=0;while($.test(D))X+=1;return D.length-X}})()});var MC0,LC0,sg,NC0,eg,BC0,wC0,RC0,$m=($,D={},X={})=>{let Q=D.limit??1/0,J=D.ellipsis??"",Y=D?.ellipsisWidth??(J?$m(J,RC0,X).width:0),Z=0,F=X.controlWidth??0,G=X.tabWidth??8,q=X.emojiWidth??2,W=2,U=X.regularWidth??1,H=X.wideWidth??2,K=[[BC0,U],[MC0,0],[LC0,F],[NC0,G],[eg,q],[sg,H]],O=0,V=0,z=$.length,N=0,w=!1,M=z,L=Math.max(0,Q-Y),B=0,R=0,P=0,v=0;$:while(!0){if(R>B||V>=z&&V>O){let j=$.slice(B,R)||$.slice(O,V);N=0;for(let k of j.replaceAll(wC0,"")){let x=k.codePointAt(0)||0;if(og(x))v=2;else if(tg(x))v=H;else v=U;if(P+v>L)M=Math.min(M,Math.max(B,O)+N);if(P+v>Q){w=!0;break $}N+=k.length,P+=v}B=R=0}if(V>=z)break $;for(let j=0,k=K.length;j<k;j++){let[x,g]=K[j];if(x.lastIndex=V,x.test($)){if(N=x===sg?rg($.slice(V,x.lastIndex)):x===eg?1:x.lastIndex-V,v=N*g,P+v>L)M=Math.min(M,V+Math.floor((L-P)/g));if(P+v>Q){w=!0;break $}P+=v,B=O,R=V,V=O=x.lastIndex;continue $}}V+=1}return{width:w?L:P,index:w?M:z,truncated:w,ellipsed:w&&Q>=Y}},Dm;var Xm=o(()=>{ag();MC0=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,LC0=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,sg=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,NC0=/\t{1,1000}/y,eg=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,BC0=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,wC0=/\p{M}+/gu,RC0={limit:1/0,ellipsis:""},Dm=$m});var EC0,jC0=($,D={})=>{return Dm($,EC0,D).width},n8;var DR=o(()=>{Xm();EC0={limit:1/0,ellipsis:"",ellipsisWidth:0},n8=jC0});function m7($,D,X){return String($).normalize().split(PC0).map((Q)=>CC0(Q,D,X)).join(`
1
+ import{createRequire as qC0}from"node:module";var module={exports:{}};var QC0=Object.create;var{getPrototypeOf:JC0,defineProperty:gG,getOwnPropertyNames:ig}=Object;var aw=Object.prototype.hasOwnProperty;function sw($){return this[$]}var z0=($,D,X)=>{var Q=ig(D);for(let J of Q)if(!aw.call($,J)&&J!=="default")gG($,J,{get:sw.bind(D,J),enumerable:!0});if(X){for(let J of Q)if(!aw.call(X,J)&&J!=="default")gG(X,J,{get:sw.bind(D,J),enumerable:!0});return X}},YC0,ZC0,v$=($,D,X)=>{var Q=$!=null&&typeof $==="object";if(Q){var J=D?YC0??=new WeakMap:ZC0??=new WeakMap,Y=J.get($);if(Y)return Y}X=$!=null?QC0(JC0($)):{};let Z=D||!$||!$.__esModule?gG(X,"default",{value:$,enumerable:!0}):X;for(let F of ig($))if(!aw.call(Z,F))gG(Z,F,{get:sw.bind($,F),enumerable:!0});if(Q)J.set($,Z);return Z};var E=($,D)=>()=>(D||$((D={exports:{}}).exports,D),D.exports);var FC0=($)=>$;function GC0($,D){this[$]=FC0.bind(null,D)}var K6=($,D)=>{for(var X in D)gG($,X,{get:D[X],enumerable:!0,configurable:!0,set:GC0.bind(D,X)})};var o=($,D)=>()=>($&&(D=$($=0)),D);var X0=qC0(import.meta.url);var DD;var M8=o(()=>{DD={name:"@capgo/cli",type:"module",version:"8.72.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"https://github.com/Cap-go/capgo.app",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:notify-app-ready-background":"bun test ./test/test-notify-app-ready-background.mjs ./test/test-background-check-shutdown.mjs","test:bundle":"bun test/test-bundle.mjs","test:bundle-validation":"bun test test/bundle/","test:prescan":"bun test test/prescan/","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs && bun test/test-get-remote-dependencies.mjs","test:package-json-guard":"bun test/test-package-json-guard.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-export":"bun test/test-credentials-export.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:cli-help":"bun test/test-cli-help.mjs","test:build-cache-payload":"bun test/test-build-cache-payload.mjs","test:build-cancellation":"bun test/test-build-cancellation.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs && bun test/test-android-select-guard.mjs","test:android-keystore-action":"bun test/test-android-keystore-action.mjs","test:android-google-play-action":"bun test/test-android-google-play-action.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:cli-headers":"bun test/test-cli-headers.mjs","test:min-cli-version":"bun test/test-min-cli-version.mjs","test:authenticated-command-invocation":"bun test/test-authenticated-command-invocation.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:bundle-pages":"bun test test/test-bundle-pages.test.ts","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:app-add-exists":"bun test/test-app-add-exists.mjs","test:app-add-getting-started":"bun test/test-app-add-getting-started.mjs","test:app-list-output-text":"bun test/test-app-list-output-text.mjs","test:app-todo":"bun test/test-app-todo.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:cli-recovery":"bun test/test-cli-recovery.mjs","test:create-supabase-client":"bun test/test-create-supabase-client.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:channel-add-exists":"bun test/test-channel-add-exists.mjs","test:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-upload-recovery":"bun test/test-init-upload-error-gate.mjs && bun test/test-init-upload-monorepo-recovery.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:init-telemetry":"bun test/test-init-telemetry.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:builder-app-id-config":"bun test/test-builder-app-id-config.mjs","test:capacitor-config-typescript7":"bun test/test-capacitor-config-typescript7.mjs","test:capacitor-config-native-import":"bun test/test-capacitor-config-native-import.mjs","test:cli-user-error-config":"bun test/test-cli-user-error-config.mjs","test:cordova-upload-mode":"bun test/test-cordova-upload-mode.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-certificate-action":"bun test/test-ios-certificate-action.mjs","test:ios-profile-action":"bun test/test-ios-profile-action.mjs","test:ios-credential-action":"bun test/test-ios-credential-action.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:ios-marketing-version":"bun test/test-ios-marketing-version.mjs","test:android-version":"bun test/test-android-version.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && bun run test:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:cordova-upload-mode && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:android-keystore-action && bun run test:android-google-play-action && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:cli-headers && bun run test:min-cli-version && bun run test:authenticated-command-invocation && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:bundle-pages && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:app-add-exists && bun run test:app-add-getting-started && bun run test:app-list-output-text && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-supabase-client && bun run test:build-platform-selection && bun run test:builder-project-discovery && bun run test:builder-app-selection && bun run test:builder-login-gate && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:channel-list && bun run test:channel-add-exists && bun run test:wait-log && bun run test:init-guardrails && bun run test:init-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-certificate-action && bun run test:ios-profile-action && bun run test:ios-credential-action && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:android-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-gcp && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:2fa-compliance-network && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:builder-project-discovery":"bun test/test-builder-project-discovery.mjs","test:builder-app-selection":"bun test/test-builder-app-selection.mjs","test:builder-login-gate":"bun test/test-builder-login-gate.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs && bun test/test-app-list-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-gcp":"bun test/test-android-gcp.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:2fa-compliance-network":"bun test/test-2fa-compliance-network.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs","test:ios-provisioning-map":"bun test/test-ios-provisioning-map.mjs","test:ios-provisioning-command":"bun test/test-ios-provisioning-command.mjs","test:channel-list":"bun test/test-channel-list.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@manypkg/tools":"^2.1.2","@rrweb/types":"^2.1.1","@standard-schema/spec":"^1.1.0","@xmldom/xmldom":"^0.9.10","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","agent-cli-detector":"^0.1.6","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",typescript:"6.0.3",zod:"^4.5.4"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@vue/compiler-dom":"3.5.40","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.0","git-format-staged":"4.0.2",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",ws:"^8.21.1"}}});var F0;var I$=o(()=>{F0=class F0 extends Error{context;constructor($,D){super($);this.name="CliUserError",this.context=D}}});import{platform as UC0}from"node:os";import{version as HC0}from"node:process";function VC0($){for(let D=0;D<$.length;D++)if($.charCodeAt(D)>255)return!1;return!0}function pg($){if($.toLowerCase()==="x-capgo-log-token")return"Build log token is missing. Re-run the build command or pass a valid log token.";return"Capgo API key is missing. Run `npx -y @capgo/cli@latest login` or pass `--apikey`."}function zC0($){if($.toLowerCase()==="x-capgo-log-token")return"Build log token contains invalid characters (only ASCII is allowed). Re-run the build command to get a fresh token.";if($.toLowerCase()==="authorization")return"Authorization header contains invalid characters (only ASCII is allowed). Check your Capgo API key or Supabase anon key configuration.";return"Capgo API key contains invalid characters (only ASCII is allowed). Copy the key from the Capgo dashboard."}function $R($,D){if(D===void 0||D===null){if(ew.has($.toLowerCase()))throw new F0(pg($));throw new F0(`HTTP header "${$}" is missing or invalid.`)}if(typeof D!=="string"){if(ew.has($.toLowerCase()))throw new F0(pg($));throw new F0(`HTTP header "${$}" is missing or invalid.`)}if(!VC0(D)){if(ew.has($.toLowerCase()))throw new F0(zC0($));throw new F0(`HTTP header "${$}" contains invalid characters (only ASCII is allowed).`)}return D}function o$($){let D={capgo_api:KC0,"x-cli-version":DD.version,"x-cli-command":OC0,"x-cli-node":HC0,"x-cli-os":UC0()};if($)for(let[X,Q]of Object.entries($))D[X]=$R(X,Q);return D}var KC0="2025-10-01",OC0="",ew;var W4=o(()=>{M8();I$();ew=new Set(["authorization","capgkey","x-capgo-log-token"])});var rg,og=($)=>{return $===12288||$>=65281&&$<=65376||$>=65504&&$<=65510},tg=($)=>{return $===8987||$===9001||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$>=131072&&$<=196605||$>=196608&&$<=262141};var ag=o(()=>{rg=(()=>{let $=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(D)=>{let X=0;$.lastIndex=0;while($.test(D))X+=1;return D.length-X}})()});var MC0,LC0,sg,NC0,eg,BC0,wC0,RC0,$m=($,D={},X={})=>{let Q=D.limit??1/0,J=D.ellipsis??"",Y=D?.ellipsisWidth??(J?$m(J,RC0,X).width:0),Z=0,F=X.controlWidth??0,G=X.tabWidth??8,q=X.emojiWidth??2,W=2,U=X.regularWidth??1,H=X.wideWidth??2,K=[[BC0,U],[MC0,0],[LC0,F],[NC0,G],[eg,q],[sg,H]],O=0,V=0,z=$.length,N=0,w=!1,M=z,L=Math.max(0,Q-Y),B=0,R=0,P=0,v=0;$:while(!0){if(R>B||V>=z&&V>O){let j=$.slice(B,R)||$.slice(O,V);N=0;for(let k of j.replaceAll(wC0,"")){let x=k.codePointAt(0)||0;if(og(x))v=2;else if(tg(x))v=H;else v=U;if(P+v>L)M=Math.min(M,Math.max(B,O)+N);if(P+v>Q){w=!0;break $}N+=k.length,P+=v}B=R=0}if(V>=z)break $;for(let j=0,k=K.length;j<k;j++){let[x,g]=K[j];if(x.lastIndex=V,x.test($)){if(N=x===sg?rg($.slice(V,x.lastIndex)):x===eg?1:x.lastIndex-V,v=N*g,P+v>L)M=Math.min(M,V+Math.floor((L-P)/g));if(P+v>Q){w=!0;break $}P+=v,B=O,R=V,V=O=x.lastIndex;continue $}}V+=1}return{width:w?L:P,index:w?M:z,truncated:w,ellipsed:w&&Q>=Y}},Dm;var Xm=o(()=>{ag();MC0=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,LC0=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,sg=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,NC0=/\t{1,1000}/y,eg=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,BC0=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,wC0=/\p{M}+/gu,RC0={limit:1/0,ellipsis:""},Dm=$m});var EC0,jC0=($,D={})=>{return Dm($,EC0,D).width},n8;var DR=o(()=>{Xm();EC0={limit:1/0,ellipsis:"",ellipsisWidth:0},n8=jC0});function m7($,D,X){return String($).normalize().split(PC0).map((Q)=>CC0(Q,D,X)).join(`
2
2
  `)}var WK="\x1B",Fm="›",AC0=39,QR="\x07",Gm="[",IC0="]",qm="m",JR,Qm,Jm=($)=>{if($>=30&&$<=37)return 39;if($>=90&&$<=97)return 39;if($>=40&&$<=47)return 49;if($>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0;return},Ym=($)=>`${WK}${Gm}${$}${qm}`,Zm=($)=>`${WK}${JR}${$}${QR}`,XR=($,D,X)=>{let Q=D[Symbol.iterator](),J=!1,Y=!1,Z=$.at(-1),F=Z===void 0?0:n8(Z),G=Q.next(),q=Q.next(),W=0;while(!G.done){let U=G.value,H=n8(U);if(F+H<=X)$[$.length-1]+=U;else $.push(U),F=0;if(U===WK||U===Fm)J=!0,Y=D.startsWith(JR,W+1);if(J){if(Y){if(U===QR)J=!1,Y=!1}else if(U===qm)J=!1}else if(F+=H,F===X&&!q.done)$.push(""),F=0;G=q,q=Q.next(),W+=U.length}if(Z=$.at(-1),!F&&Z!==void 0&&Z.length&&$.length>1)$[$.length-2]+=$.pop()},TC0=($)=>{let D=$.split(" "),X=D.length;while(X){if(n8(D[X-1]))break;X--}if(X===D.length)return $;return D.slice(0,X).join(" ")+D.slice(X).join("")},CC0=($,D,X={})=>{if(X.trim!==!1&&$.trim()==="")return"";let Q="",J,Y,Z=$.split(" "),F=[""],G=0;for(let U=0;U<Z.length;U++){let H=Z[U];if(X.trim!==!1){let O=F.at(-1)??"",V=O.trimStart();if(O.length!==V.length)F[F.length-1]=V,G=n8(V)}if(U!==0){if(G>=D&&(X.wordWrap===!1||X.trim===!1))F.push(""),G=0;if(G||X.trim===!1)F[F.length-1]+=" ",G++}let K=n8(H);if(X.hard&&K>D){let O=D-G,V=1+Math.floor((K-O-1)/D);if(Math.floor((K-1)/D)<V)F.push("");XR(F,H,D),G=n8(F.at(-1)??"");continue}if(G+K>D&&G&&K){if(X.wordWrap===!1&&G<D){XR(F,H,D),G=n8(F.at(-1)??"");continue}F.push(""),G=0}if(G+K>D&&X.wordWrap===!1){XR(F,H,D),G=n8(F.at(-1)??"");continue}F[F.length-1]+=H,G+=K}if(X.trim!==!1)F=F.map((U)=>TC0(U));let q=F.join(`
3
3
  `),W=!1;for(let U=0;U<q.length;U++){let H=q[U];if(Q+=H,!W){if(W=H>="\uD800"&&H<="\uDBFF",W)continue}else W=!1;if(H===WK||H===Fm){Qm.lastIndex=U+1;let O=Qm.exec(q)?.groups;if(O?.code!==void 0){let V=Number.parseFloat(O.code);J=V===AC0?void 0:V}else if(O?.uri!==void 0)Y=O.uri.length===0?void 0:O.uri}if(q[U+1]===`
4
4
  `){if(Y)Q+=Zm("");let K=J?Jm(J):void 0;if(J&&K)Q+=Ym(K)}else if(H===`
@@ -811,6 +811,7 @@ export type Database = {
811
811
  ios: boolean;
812
812
  name: string;
813
813
  owner_org: string;
814
+ paused_at: string | null;
814
815
  public: boolean;
815
816
  auto_pause_action: string;
816
817
  auto_pause_confidence: number;
@@ -851,6 +852,7 @@ export type Database = {
851
852
  ios?: boolean;
852
853
  name: string;
853
854
  owner_org: string;
855
+ paused_at?: string | null;
854
856
  public?: boolean;
855
857
  auto_pause_action?: string;
856
858
  auto_pause_confidence?: number;
@@ -891,6 +893,7 @@ export type Database = {
891
893
  ios?: boolean;
892
894
  name?: string;
893
895
  owner_org?: string;
896
+ paused_at?: string | null;
894
897
  public?: boolean;
895
898
  auto_pause_action?: string;
896
899
  auto_pause_confidence?: number;
@@ -5680,7 +5683,7 @@ export type Database = {
5680
5683
  cron_task_type: "function" | "queue" | "function_queue";
5681
5684
  disable_update: "major" | "minor" | "patch" | "version_number" | "none";
5682
5685
  platform_os: "ios" | "android" | "electron";
5683
- stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableEmulator" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "keyMismatch" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal" | "download_0" | "disableProdBuild" | "disableDevice" | "disablePlatformElectron" | "customIdBlocked" | "app_crash" | "app_crash_native" | "app_anr" | "app_killed_low_memory" | "app_killed_excessive_resource_usage" | "app_initialization_failure" | "app_memory_warning" | "webview_javascript_error" | "webview_unhandled_rejection" | "webview_resource_error" | "webview_security_policy_violation" | "webview_unclean_restart" | "webview_render_process_gone" | "webview_content_process_terminated" | "os_version_changed" | "native_app_version_changed" | "app_nav";
5686
+ stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableEmulator" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "keyMismatch" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal" | "download_0" | "disableProdBuild" | "disableDevice" | "disablePlatformElectron" | "customIdBlocked" | "app_crash" | "app_crash_native" | "app_anr" | "app_killed_low_memory" | "app_killed_excessive_resource_usage" | "app_initialization_failure" | "app_memory_warning" | "webview_javascript_error" | "webview_unhandled_rejection" | "webview_resource_error" | "webview_security_policy_violation" | "webview_unclean_restart" | "webview_render_process_gone" | "webview_content_process_terminated" | "os_version_changed" | "native_app_version_changed" | "app_nav" | "channelPaused";
5684
5687
  stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
5685
5688
  user_role: "read" | "upload" | "write" | "admin";
5686
5689
  version_action: "get" | "fail" | "install" | "uninstall";
@@ -5781,7 +5784,7 @@ export declare const Constants: {
5781
5784
  readonly cron_task_type: readonly ["function", "queue", "function_queue"];
5782
5785
  readonly disable_update: readonly ["major", "minor", "patch", "version_number", "none"];
5783
5786
  readonly platform_os: readonly ["ios", "android", "electron"];
5784
- readonly stats_action: readonly ["delete", "reset", "set", "get", "set_fail", "update_fail", "download_fail", "windows_path_fail", "canonical_path_fail", "directory_path_fail", "unzip_fail", "low_mem_fail", "download_10", "download_20", "download_30", "download_40", "download_50", "download_60", "download_70", "download_80", "download_90", "download_complete", "decrypt_fail", "app_moved_to_foreground", "app_moved_to_background", "uninstall", "needPlanUpgrade", "missingBundle", "noNew", "disablePlatformIos", "disablePlatformAndroid", "disableAutoUpdateToMajor", "cannotUpdateViaPrivateChannel", "disableAutoUpdateToMinor", "disableAutoUpdateToPatch", "channelMisconfigured", "disableAutoUpdateMetadata", "disableAutoUpdateUnderNative", "disableDevBuild", "disableEmulator", "cannotGetBundle", "checksum_fail", "NoChannelOrOverride", "setChannel", "getChannel", "rateLimited", "disableAutoUpdate", "keyMismatch", "ping", "InvalidIp", "blocked_by_server_url", "download_manifest_start", "download_manifest_complete", "download_zip_start", "download_zip_complete", "download_manifest_file_fail", "download_manifest_checksum_fail", "download_manifest_brotli_fail", "backend_refusal", "download_0", "disableProdBuild", "disableDevice", "disablePlatformElectron", "customIdBlocked", "app_crash", "app_crash_native", "app_anr", "app_killed_low_memory", "app_killed_excessive_resource_usage", "app_initialization_failure", "app_memory_warning", "webview_javascript_error", "webview_unhandled_rejection", "webview_resource_error", "webview_security_policy_violation", "webview_unclean_restart", "webview_render_process_gone", "webview_content_process_terminated", "os_version_changed", "native_app_version_changed", "app_nav"];
5787
+ readonly stats_action: readonly ["delete", "reset", "set", "get", "set_fail", "update_fail", "download_fail", "windows_path_fail", "canonical_path_fail", "directory_path_fail", "unzip_fail", "low_mem_fail", "download_10", "download_20", "download_30", "download_40", "download_50", "download_60", "download_70", "download_80", "download_90", "download_complete", "decrypt_fail", "app_moved_to_foreground", "app_moved_to_background", "uninstall", "needPlanUpgrade", "missingBundle", "noNew", "disablePlatformIos", "disablePlatformAndroid", "disableAutoUpdateToMajor", "cannotUpdateViaPrivateChannel", "disableAutoUpdateToMinor", "disableAutoUpdateToPatch", "channelMisconfigured", "disableAutoUpdateMetadata", "disableAutoUpdateUnderNative", "disableDevBuild", "disableEmulator", "cannotGetBundle", "checksum_fail", "NoChannelOrOverride", "setChannel", "getChannel", "rateLimited", "disableAutoUpdate", "keyMismatch", "ping", "InvalidIp", "blocked_by_server_url", "download_manifest_start", "download_manifest_complete", "download_zip_start", "download_zip_complete", "download_manifest_file_fail", "download_manifest_checksum_fail", "download_manifest_brotli_fail", "backend_refusal", "download_0", "disableProdBuild", "disableDevice", "disablePlatformElectron", "customIdBlocked", "app_crash", "app_crash_native", "app_anr", "app_killed_low_memory", "app_killed_excessive_resource_usage", "app_initialization_failure", "app_memory_warning", "webview_javascript_error", "webview_unhandled_rejection", "webview_resource_error", "webview_security_policy_violation", "webview_unclean_restart", "webview_render_process_gone", "webview_content_process_terminated", "os_version_changed", "native_app_version_changed", "app_nav", "channelPaused"];
5785
5788
  readonly stripe_status: readonly ["created", "succeeded", "updated", "failed", "deleted", "canceled"];
5786
5789
  readonly user_role: readonly ["read", "upload", "write", "admin"];
5787
5790
  readonly version_action: readonly ["get", "fail", "install", "uninstall"];