@capgo/cli 7.122.6 → 7.123.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.
package/dist/src/sdk.js CHANGED
@@ -124,7 +124,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
124
124
  `)}),$.__defineSetter__("stack",function(X){return[X].concat($.stack).join(`
125
125
 
126
126
  `)}),$}});var Cv=E((Fs0,Tv)=>{var B4=l("constants"),Pq0=process.cwd,RY=null,uq0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!RY)RY=Pq0.call(process);return RY};try{process.cwd()}catch(D){}if(typeof process.chdir==="function"){if(jY=process.chdir,process.chdir=function(D){RY=null,jY.call(process,D)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,jY)}var jY;Tv.exports=xq0;function xq0(D){if(B4.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))$(D);if(!D.lutimes)X(D);if(D.chown=Y(D.chown),D.fchown=Y(D.fchown),D.lchown=Y(D.lchown),D.chmod=J(D.chmod),D.fchmod=J(D.fchmod),D.lchmod=J(D.lchmod),D.chownSync=Q(D.chownSync),D.fchownSync=Q(D.fchownSync),D.lchownSync=Q(D.lchownSync),D.chmodSync=F(D.chmodSync),D.fchmodSync=F(D.fchmodSync),D.lchmodSync=F(D.lchmodSync),D.stat=U(D.stat),D.fstat=U(D.fstat),D.lstat=U(D.lstat),D.statSync=Z(D.statSync),D.fstatSync=Z(D.fstatSync),D.lstatSync=Z(D.lstatSync),D.chmod&&!D.lchmod)D.lchmod=function(G,w,q){if(q)process.nextTick(q)},D.lchmodSync=function(){};if(D.chown&&!D.lchown)D.lchown=function(G,w,q,W){if(W)process.nextTick(W)},D.lchownSync=function(){};if(uq0==="win32")D.rename=typeof D.rename!=="function"?D.rename:function(G){function w(q,W,K){var H=Date.now(),L=0;G(q,W,function M(I){if(I&&(I.code==="EACCES"||I.code==="EPERM"||I.code==="EBUSY")&&Date.now()-H<60000){if(setTimeout(function(){D.stat(W,function(B,N){if(B&&B.code==="ENOENT")G(q,W,M);else K(I)})},L),L<100)L+=10;return}if(K)K(I)})}if(Object.setPrototypeOf)Object.setPrototypeOf(w,G);return w}(D.rename);D.read=typeof D.read!=="function"?D.read:function(G){function w(q,W,K,H,L,M){var I;if(M&&typeof M==="function"){var B=0;I=function(N,z,R){if(N&&N.code==="EAGAIN"&&B<10)return B++,G.call(D,q,W,K,H,L,I);M.apply(this,arguments)}}return G.call(D,q,W,K,H,L,I)}if(Object.setPrototypeOf)Object.setPrototypeOf(w,G);return w}(D.read),D.readSync=typeof D.readSync!=="function"?D.readSync:function(G){return function(w,q,W,K,H){var L=0;while(!0)try{return G.call(D,w,q,W,K,H)}catch(M){if(M.code==="EAGAIN"&&L<10){L++;continue}throw M}}}(D.readSync);function $(G){G.lchmod=function(w,q,W){G.open(w,B4.O_WRONLY|B4.O_SYMLINK,q,function(K,H){if(K){if(W)W(K);return}G.fchmod(H,q,function(L){G.close(H,function(M){if(W)W(L||M)})})})},G.lchmodSync=function(w,q){var W=G.openSync(w,B4.O_WRONLY|B4.O_SYMLINK,q),K=!0,H;try{H=G.fchmodSync(W,q),K=!1}finally{if(K)try{G.closeSync(W)}catch(L){}else G.closeSync(W)}return H}}function X(G){if(B4.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(w,q,W,K){G.open(w,B4.O_SYMLINK,function(H,L){if(H){if(K)K(H);return}G.futimes(L,q,W,function(M){G.close(L,function(I){if(K)K(M||I)})})})},G.lutimesSync=function(w,q,W){var K=G.openSync(w,B4.O_SYMLINK),H,L=!0;try{H=G.futimesSync(K,q,W),L=!1}finally{if(L)try{G.closeSync(K)}catch(M){}else G.closeSync(K)}return H};else if(G.futimes)G.lutimes=function(w,q,W,K){if(K)process.nextTick(K)},G.lutimesSync=function(){}}function J(G){if(!G)return G;return function(w,q,W){return G.call(D,w,q,function(K){if(O(K))K=null;if(W)W.apply(this,arguments)})}}function F(G){if(!G)return G;return function(w,q){try{return G.call(D,w,q)}catch(W){if(!O(W))throw W}}}function Y(G){if(!G)return G;return function(w,q,W,K){return G.call(D,w,q,W,function(H){if(O(H))H=null;if(K)K.apply(this,arguments)})}}function Q(G){if(!G)return G;return function(w,q,W){try{return G.call(D,w,q,W)}catch(K){if(!O(K))throw K}}}function U(G){if(!G)return G;return function(w,q,W){if(typeof q==="function")W=q,q=null;function K(H,L){if(L){if(L.uid<0)L.uid+=4294967296;if(L.gid<0)L.gid+=4294967296}if(W)W.apply(this,arguments)}return q?G.call(D,w,q,K):G.call(D,w,K)}}function Z(G){if(!G)return G;return function(w,q){var W=q?G.call(D,w,q):G.call(D,w);if(W){if(W.uid<0)W.uid+=4294967296;if(W.gid<0)W.gid+=4294967296}return W}}function O(G){if(!G)return!0;if(G.code==="ENOSYS")return!0;var w=!process.getuid||process.getuid()!==0;if(w){if(G.code==="EINVAL"||G.code==="EPERM")return!0}return!1}}});var uv=E((Ys0,Pv)=>{var Sv=l("stream").Stream;Pv.exports=vq0;function vq0(D){return{ReadStream:$,WriteStream:X};function $(J,F){if(!(this instanceof $))return new $(J,F);Sv.call(this);var Y=this;this.path=J,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,F=F||{};var Q=Object.keys(F);for(var U=0,Z=Q.length;U<Z;U++){var O=Q[U];this[O]=F[O]}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(){Y._read()});return}D.open(this.path,this.flags,this.mode,function(G,w){if(G){Y.emit("error",G),Y.readable=!1;return}Y.fd=w,Y.emit("open",w),Y._read()})}function X(J,F){if(!(this instanceof X))return new X(J,F);Sv.call(this),this.path=J,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,F=F||{};var Y=Object.keys(F);for(var Q=0,U=Y.length;Q<U;Q++){var Z=Y[Q];this[Z]=F[Z]}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 vv=E((Qs0,xv)=>{xv.exports=fq0;var _q0=Object.getPrototypeOf||function(D){return D.__proto__};function fq0(D){if(D===null||typeof D!=="object")return D;if(D instanceof Object)var $={__proto__:_q0(D)};else var $=Object.create(null);return Object.getOwnPropertyNames(D).forEach(function(X){Object.defineProperty($,X,Object.getOwnPropertyDescriptor(D,X))}),$}});var bD=E((Us0,DW)=>{var uD=l("fs"),kq0=Cv(),yq0=uv(),bq0=vv(),TY=l("util"),Y1,SY;if(typeof Symbol==="function"&&typeof Symbol.for==="function")Y1=Symbol.for("graceful-fs.queue"),SY=Symbol.for("graceful-fs.previous");else Y1="___graceful-fs.queue",SY="___graceful-fs.previous";function hq0(){}function fv(D,$){Object.defineProperty(D,Y1,{get:function(){return $}})}var b8=hq0;if(TY.debuglog)b8=TY.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))b8=function(){var D=TY.format.apply(TY,arguments);D="GFS4: "+D.split(/\n/).join(`
127
- GFS4: `),console.error(D)};if(!uD[Y1]){if(aq=global[Y1]||[],fv(uD,aq),uD.close=function(D){function $(X,J){return D.call(uD,X,function(F){if(!F)_v();if(typeof J==="function")J.apply(this,arguments)})}return Object.defineProperty($,SY,{value:D}),$}(uD.close),uD.closeSync=function(D){function $(X){D.apply(uD,arguments),_v()}return Object.defineProperty($,SY,{value:D}),$}(uD.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){b8(uD[Y1]),l("assert").equal(uD[Y1].length,0)})}var aq;if(!global[Y1])fv(global,uD[Y1]);DW.exports=sq(bq0(uD));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!uD.__patched)DW.exports=sq(uD),uD.__patched=!0;function sq(D){kq0(D),D.gracefulify=sq,D.createReadStream=z,D.createWriteStream=R;var $=D.readFile;D.readFile=X;function X(A,u,S){if(typeof u==="function")S=u,u=null;return m(A,u,S);function m(g,r,k,T){return $(g,r,function(P){if(P&&(P.code==="EMFILE"||P.code==="ENFILE"))S5([m,[g,r,k],P,T||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var J=D.writeFile;D.writeFile=F;function F(A,u,S,m){if(typeof S==="function")m=S,S=null;return g(A,u,S,m);function g(r,k,T,P,x){return J(r,k,T,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))S5([g,[r,k,T,P],f,x||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var Y=D.appendFile;if(Y)D.appendFile=Q;function Q(A,u,S,m){if(typeof S==="function")m=S,S=null;return g(A,u,S,m);function g(r,k,T,P,x){return Y(r,k,T,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))S5([g,[r,k,T,P],f,x||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var U=D.copyFile;if(U)D.copyFile=Z;function Z(A,u,S,m){if(typeof S==="function")m=S,S=0;return g(A,u,S,m);function g(r,k,T,P,x){return U(r,k,T,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))S5([g,[r,k,T,P],f,x||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var O=D.readdir;D.readdir=w;var G=/^v[0-5]\./;function w(A,u,S){if(typeof u==="function")S=u,u=null;var m=G.test(process.version)?function(k,T,P,x){return O(k,g(k,T,P,x))}:function(k,T,P,x){return O(k,T,g(k,T,P,x))};return m(A,u,S);function g(r,k,T,P){return function(x,f){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))S5([m,[r,k,T],x,P||Date.now(),Date.now()]);else{if(f&&f.sort)f.sort();if(typeof T==="function")T.call(this,x,f)}}}}if(process.version.substr(0,4)==="v0.8"){var q=yq0(D);M=q.ReadStream,B=q.WriteStream}var W=D.ReadStream;if(W)M.prototype=Object.create(W.prototype),M.prototype.open=I;var K=D.WriteStream;if(K)B.prototype=Object.create(K.prototype),B.prototype.open=N;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(A){M=A},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return B},set:function(A){B=A},enumerable:!0,configurable:!0});var H=M;Object.defineProperty(D,"FileReadStream",{get:function(){return H},set:function(A){H=A},enumerable:!0,configurable:!0});var L=B;Object.defineProperty(D,"FileWriteStream",{get:function(){return L},set:function(A){L=A},enumerable:!0,configurable:!0});function M(A,u){if(this instanceof M)return W.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function I(){var A=this;_(A.path,A.flags,A.mode,function(u,S){if(u){if(A.autoClose)A.destroy();A.emit("error",u)}else A.fd=S,A.emit("open",S),A.read()})}function B(A,u){if(this instanceof B)return K.apply(this,arguments),this;else return B.apply(Object.create(B.prototype),arguments)}function N(){var A=this;_(A.path,A.flags,A.mode,function(u,S){if(u)A.destroy(),A.emit("error",u);else A.fd=S,A.emit("open",S)})}function z(A,u){return new D.ReadStream(A,u)}function R(A,u){return new D.WriteStream(A,u)}var v=D.open;D.open=_;function _(A,u,S,m){if(typeof S==="function")m=S,S=null;return g(A,u,S,m);function g(r,k,T,P,x){return v(r,k,T,function(f,h){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))S5([g,[r,k,T,P],f,x||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}return D}function S5(D){b8("ENQUEUE",D[0].name,D[1]),uD[Y1].push(D),eq()}var CY;function _v(){var D=Date.now();for(var $=0;$<uD[Y1].length;++$)if(uD[Y1][$].length>2)uD[Y1][$][3]=D,uD[Y1][$][4]=D;eq()}function eq(){if(clearTimeout(CY),CY=void 0,uD[Y1].length===0)return;var D=uD[Y1].shift(),$=D[0],X=D[1],J=D[2],F=D[3],Y=D[4];if(F===void 0)b8("RETRY",$.name,X),$.apply(null,X);else if(Date.now()-F>=60000){b8("TIMEOUT",$.name,X);var Q=X.pop();if(typeof Q==="function")Q.call(null,J)}else{var U=Date.now()-Y,Z=Math.max(Y-F,1),O=Math.min(Z*1.2,100);if(U>=O)b8("RETRY",$.name,X),$.apply(null,X.concat([F]));else uD[Y1].push(D)}if(CY===void 0)CY=setTimeout(eq,0)}});var yv=E((Zs0,kv)=>{function V$(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)}kv.exports=V$;V$.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};V$.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};V$.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 X=this._timeouts.shift();if(X===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),X=this._timeouts.shift();else return!1;var J=this,F=setTimeout(function(){if(J._attempts++,J._operationTimeoutCb){if(J._timeout=setTimeout(function(){J._operationTimeoutCb(J._attempts)},J._operationTimeout),J._options.unref)J._timeout.unref()}J._fn(J._attempts)},X);if(this._options.unref)F.unref();return!0};V$.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};V$.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};V$.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};V$.prototype.start=V$.prototype.try;V$.prototype.errors=function(){return this._errors};V$.prototype.attempts=function(){return this._attempts};V$.prototype.mainError=function(){if(this._errors.length===0)return null;var D={},$=null,X=0;for(var J=0;J<this._errors.length;J++){var F=this._errors[J],Y=F.message,Q=(D[Y]||0)+1;if(D[Y]=Q,Q>=X)$=F,X=Q}return $}});var hv=E((mq0)=>{var gq0=yv();mq0.operation=function(D){var $=mq0.timeouts(D);return new gq0($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};mq0.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in D)$[X]=D[X];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var J=[];for(var F=0;F<$.retries;F++)J.push(this.createTimeout(F,$));if(D&&D.forever&&!J.length)J.push(this.createTimeout(F,$));return J.sort(function(Y,Q){return Y-Q}),J};mq0.createTimeout=function(D,$){var X=$.randomize?Math.random()+1:1,J=Math.round(X*$.minTimeout*Math.pow($.factor,D));return J=Math.min(J,$.maxTimeout),J};mq0.wrap=function(D,$,X){if($ instanceof Array)X=$,$=null;if(!X){X=[];for(var J in D)if(typeof D[J]==="function")X.push(J)}for(var F=0;F<X.length;F++){var Y=X[F],Q=D[Y];D[Y]=function(Z){var O=mq0.operation($),G=Array.prototype.slice.call(arguments,1),w=G.pop();G.push(function(q){if(O.retry(q))return;if(q)arguments[0]=O.mainError();w.apply(this,arguments)}),O.attempt(function(){Z.apply(D,G)})}.bind(D,Q),D[Y].options=$}}});var gv=E((Gs0,PY)=>{PY.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")PY.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")PY.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var vY=E((ws0,u5)=>{var jD=global.process,h8=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(!h8(jD))u5.exports=function(){return function(){}};else{if($W=l("assert"),g8=gv(),XW=/^win/i.test(jD.platform),P5=l("events"),typeof P5!=="function")P5=P5.EventEmitter;if(jD.__signal_exit_emitter__)oD=jD.__signal_exit_emitter__;else oD=jD.__signal_exit_emitter__=new P5,oD.count=0,oD.emitted={};if(!oD.infinite)oD.setMaxListeners(1/0),oD.infinite=!0;u5.exports=function(D,$){if(!h8(global.process))return function(){};if($W.equal(typeof D,"function","a callback must be provided for exit handler"),m8===!1)uY();var X="exit";if($&&$.alwaysLast)X="afterexit";var J=function(){if(oD.removeListener(X,D),oD.listeners("exit").length===0&&oD.listeners("afterexit").length===0)I2()};return oD.on(X,D),J},I2=function(){if(!m8||!h8(global.process))return;m8=!1,g8.forEach(function($){try{jD.removeListener($,A2[$])}catch(X){}}),jD.emit=E2,jD.reallyExit=xY,oD.count-=1},u5.exports.unload=I2,N4=function($,X,J){if(oD.emitted[$])return;oD.emitted[$]=!0,oD.emit($,X,J)},A2={},g8.forEach(function(D){A2[D]=function(){if(!h8(global.process))return;var X=jD.listeners(D);if(X.length===oD.count){if(I2(),N4("exit",null,D),N4("afterexit",null,D),XW&&D==="SIGHUP")D="SIGINT";jD.kill(jD.pid,D)}}}),u5.exports.signals=function(){return g8},m8=!1,uY=function(){if(m8||!h8(global.process))return;m8=!0,oD.count+=1,g8=g8.filter(function($){try{return jD.on($,A2[$]),!0}catch(X){return!1}}),jD.emit=FW,jD.reallyExit=JW},u5.exports.load=uY,xY=jD.reallyExit,JW=function($){if(!h8(global.process))return;jD.exitCode=$||0,N4("exit",jD.exitCode,null),N4("afterexit",jD.exitCode,null),xY.call(jD,jD.exitCode)},E2=jD.emit,FW=function($,X){if($==="exit"&&h8(global.process)){if(X!==void 0)jD.exitCode=X;var J=E2.apply(this,arguments);return N4("exit",jD.exitCode,null),N4("afterexit",jD.exitCode,null),J}else return E2.apply(this,arguments)}}var $W,g8,XW,P5,oD,I2,N4,A2,m8,uY,xY,JW,E2,FW});var cv=E((pq0,YW)=>{var mv=Symbol();function lq0(D,$,X){let J=$[mv];if(J)return $.stat(D,(Y,Q)=>{if(Y)return X(Y);X(null,Q.mtime,J)});let F=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,F,F,(Y)=>{if(Y)return X(Y);$.stat(D,(Q,U)=>{if(Q)return X(Q);let Z=U.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,mv,{value:Z}),X(null,U.mtime,Z)})})}function iq0(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}pq0.probe=lq0;pq0.getMtime=iq0});var pv=E((XW0,j2)=>{var oq0=l("path"),ZW=bD(),aq0=hv(),sq0=vY(),dv=cv(),k6={};function R2(D,$){return $.lockfilePath||`${D}.lock`}function OW(D,$,X){if(!$.realpath)return X(null,oq0.resolve(D));$.fs.realpath(D,X)}function UW(D,$,X){let J=R2(D,$);$.fs.mkdir(J,(F)=>{if(!F)return dv.probe(J,$.fs,(Y,Q,U)=>{if(Y)return $.fs.rmdir(J,()=>{}),X(Y);X(null,Q,U)});if(F.code!=="EEXIST")return X(F);if($.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(J,(Y,Q)=>{if(Y){if(Y.code==="ENOENT")return UW(D,{...$,stale:0},X);return X(Y)}if(!nv(Q,$))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));lv(D,$,(U)=>{if(U)return X(U);UW(D,{...$,stale:0},X)})})})}function nv(D,$){return D.mtime.getTime()<Date.now()-$.stale}function lv(D,$,X){$.fs.rmdir(R2(D,$),(J)=>{if(J&&J.code!=="ENOENT")return X(J);X()})}function _Y(D,$){let X=k6[D];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||$.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,$.fs.stat(X.lockfilePath,(J,F)=>{let Y=X.lastUpdate+$.stale<Date.now();if(J){if(J.code==="ENOENT"||Y)return QW(D,X,Object.assign(J,{code:"ECOMPROMISED"}));return X.updateDelay=1000,_Y(D,$)}if(X.mtime.getTime()!==F.mtime.getTime())return QW(D,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let U=dv.getMtime(X.mtimePrecision);$.fs.utimes(X.lockfilePath,U,U,(Z)=>{let O=X.lastUpdate+$.stale<Date.now();if(X.released)return;if(Z){if(Z.code==="ENOENT"||O)return QW(D,X,Object.assign(Z,{code:"ECOMPROMISED"}));return X.updateDelay=1000,_Y(D,$)}X.mtime=U,X.lastUpdate=Date.now(),X.updateDelay=null,_Y(D,$)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function QW(D,$,X){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(k6[D]===$)delete k6[D];$.options.onCompromised(X)}function eq0(D,$,X){$={stale:1e4,update:null,realpath:!0,retries:0,fs:ZW,onCompromised:(J)=>{throw J},...$},$.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),OW(D,$,(J,F)=>{if(J)return X(J);let Y=aq0.operation($.retries);Y.attempt(()=>{UW(F,$,(Q,U,Z)=>{if(Y.retry(Q))return;if(Q)return X(Y.mainError());let O=k6[F]={lockfilePath:R2(F,$),mtime:U,mtimePrecision:Z,options:$,lastUpdate:Date.now()};_Y(F,$),X(null,(G)=>{if(O.released)return G&&G(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));iv(F,{...$,realpath:!1},G)})})})})}function iv(D,$,X){$={fs:ZW,realpath:!0,...$},OW(D,$,(J,F)=>{if(J)return X(J);let Y=k6[F];if(!Y)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Y.updateTimeout&&clearTimeout(Y.updateTimeout),Y.released=!0,delete k6[F],lv(F,$,X)})}function DW0(D,$,X){$={stale:1e4,realpath:!0,fs:ZW,...$},$.stale=Math.max($.stale||0,2000),OW(D,$,(J,F)=>{if(J)return X(J);$.fs.stat(R2(F,$),(Y,Q)=>{if(Y)return Y.code==="ENOENT"?X(null,!1):X(Y);return X(null,!nv(Q,$))})})}function $W0(){return k6}sq0(()=>{for(let D in k6){let $=k6[D].options;try{$.fs.rmdirSync(R2(D,$))}catch(X){}}});XW0.lock=eq0;XW0.unlock=iv;XW0.check=DW0;XW0.getLocks=$W0});var tv=E((qs0,rv)=>{var UW0=bD();function ZW0(D){let $=["mkdir","realpath","stat","rmdir","utimes"],X={...D};return $.forEach((J)=>{X[J]=(...F)=>{let Y=F.pop(),Q;try{Q=D[`${J}Sync`](...F)}catch(U){return Y(U)}Y(null,Q)}}),X}function OW0(D){return(...$)=>new Promise((X,J)=>{$.push((F,Y)=>{if(F)J(F);else X(Y)}),D(...$)})}function GW0(D){return(...$)=>{let X,J;if($.push((F,Y)=>{X=F,J=Y}),D(...$),X)throw X;return J}}function wW0(D){if(D={...D},D.fs=ZW0(D.fs||UW0),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}rv.exports={toPromise:OW0,toSync:GW0,toSyncOptions:wW0}});var av=E((Ws0,z4)=>{var x5=pv(),{toPromise:fY,toSync:kY,toSyncOptions:GW}=tv();async function ov(D,$){let X=await fY(x5.lock)(D,$);return fY(X)}function qW0(D,$){let X=kY(x5.lock)(D,GW($));return kY(X)}function WW0(D,$){return fY(x5.unlock)(D,$)}function KW0(D,$){return kY(x5.unlock)(D,GW($))}function HW0(D,$){return fY(x5.check)(D,$)}function BW0(D,$){return kY(x5.check)(D,GW($))}z4.exports=ov;z4.exports.lock=ov;z4.exports.unlock=WW0;z4.exports.lockSync=qW0;z4.exports.unlockSync=KW0;z4.exports.check=HW0;z4.exports.checkSync=BW0});var F_=E((X_)=>{Object.defineProperty(X_,"__esModule",{value:!0});X_.canStoreURLs=X_.FileUrlStorage=void 0;var sv=l("fs"),NW0=VW0(jv()),ev=zW0(av());function $_(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,X=new WeakMap;return($_=function(J){return J?X:$})(D)}function zW0(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var X=$_($);if(X&&X.has(D))return X.get(D);var J={__proto__:null},F=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in D)if(Y!=="default"&&{}.hasOwnProperty.call(D,Y)){var Q=F?Object.getOwnPropertyDescriptor(D,Y):null;Q&&(Q.get||Q.set)?Object.defineProperty(J,Y,Q):J[Y]=D[Y]}return J.default=D,X&&X.set(D,J),J}function VW0(D){return D&&D.__esModule?D:{default:D}}function T2(D){return T2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},T2(D)}function LW0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function D_(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,IW0(J.key),J)}}function MW0(D,$,X){if($)D_(D.prototype,$);if(X)D_(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function IW0(D){var $=AW0(D,"string");return T2($)=="symbol"?$:$+""}function AW0(D,$){if(T2(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(T2(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var Ks0=X_.canStoreURLs=!0,Hs0=X_.FileUrlStorage=function(){function D($){LW0(this,D),this.path=$}return MW0(D,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(J,F){X._getItems("tus::",function(Y,Q){if(Y)F(Y);else J(Q)})})}},{key:"findUploadsByFingerprint",value:function(X){var J=this;return new Promise(function(F,Y){J._getItems("tus::".concat(X),function(Q,U){if(Q)Y(Q);else F(U)})})}},{key:"removeUpload",value:function(X){var J=this;return new Promise(function(F,Y){J._removeItem(X,function(Q){if(Q)Y(Q);else F()})})}},{key:"addUpload",value:function(X,J){var F=this,Y=Math.round(Math.random()*1000000000000),Q="tus::".concat(X,"::").concat(Y);return new Promise(function(U,Z){F._setItem(Q,J,function(O){if(O)Z(O);else U(Q)})})}},{key:"_setItem",value:function(X,J,F){var Y=this;ev.lock(this.path,this._lockfileOptions()).then(function(Q){F=Y._releaseAndCb(Q,F),Y._getData(function(U,Z){if(U){F(U);return}Z[X]=J,Y._writeData(Z,function(O){return F(O)})})}).catch(F)}},{key:"_getItems",value:function(X,J){this._getData(function(F,Y){if(F){J(F);return}var Q=Object.keys(Y).filter(function(U){return U.startsWith(X)}).map(function(U){var Z=Y[U];return Z.urlStorageKey=U,Z});J(null,Q)})}},{key:"_removeItem",value:function(X,J){var F=this;ev.lock(this.path,this._lockfileOptions()).then(function(Y){J=F._releaseAndCb(Y,J),F._getData(function(Q,U){if(Q){J(Q);return}delete U[X],F._writeData(U,function(Z){return J(Z)})})}).catch(J)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,J){return function(F){if(F){X().then(function(){return J(F)}).catch(function(Y){return J((0,NW0.default)([F,Y]))});return}X().then(J).catch(J)}}},{key:"_writeData",value:function(X,J){var F={encoding:"utf8",mode:432,flag:"w"};(0,sv.writeFile)(this.path,JSON.stringify(X),F,function(Y){return J(Y)})}},{key:"_getData",value:function(X){(0,sv.readFile)(this.path,"utf8",function(J,F){if(J){if(J.code==="ENOENT")X(null,{});else X(J);return}try{F=!F.trim().length?{}:JSON.parse(F)}catch(Y){X(Y);return}X(null,F)})}}])}()});var bY=E((V4)=>{Object.defineProperty(V4,"__esModule",{value:!0});Object.defineProperty(V4,"DefaultHttpStack",{enumerable:!0,get:function(){return Z_.default}});Object.defineProperty(V4,"DetailedError",{enumerable:!0,get:function(){return RW0.default}});Object.defineProperty(V4,"FileUrlStorage",{enumerable:!0,get:function(){return O_.FileUrlStorage}});Object.defineProperty(V4,"StreamSource",{enumerable:!0,get:function(){return PW0.default}});V4.Upload=void 0;Object.defineProperty(V4,"canStoreURLs",{enumerable:!0,get:function(){return O_.canStoreURLs}});V4.defaultOptions=void 0;Object.defineProperty(V4,"enableDebugLog",{enumerable:!0,get:function(){return jW0.enableDebugLog}});V4.isSupported=void 0;var RW0=c8(Gq()),jW0=wq(),TW0=c8(aP()),wW=c8(Pu()),CW0=c8(ou()),SW0=c8($x()),Z_=c8(Nx()),PW0=c8(Iq()),O_=F_();function c8(D){return D&&D.__esModule?D:{default:D}}function _5(D){return _5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_5(D)}function uW0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function Y_(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,w_(J.key),J)}}function xW0(D,$,X){if($)Y_(D.prototype,$);if(X)Y_(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function vW0(D,$,X){return $=yY($),_W0(D,G_()?Reflect.construct($,X||[],yY(D).constructor):$.apply(D,X))}function _W0(D,$){if($&&(_5($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return fW0(D)}function fW0(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function G_(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(G_=function(){return!!D})()}function yY(D){return yY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},yY(D)}function kW0(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}),$)qW(D,$)}function qW(D,$){return qW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,F){return J.__proto__=F,J},qW(D,$)}function Q_(D,$){var X=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);$&&(J=J.filter(function(F){return Object.getOwnPropertyDescriptor(D,F).enumerable})),X.push.apply(X,J)}return X}function v5(D){for(var $=1;$<arguments.length;$++){var X=arguments[$]!=null?arguments[$]:{};$%2?Q_(Object(X),!0).forEach(function(J){yW0(D,J,X[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(X)):Q_(Object(X)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor(X,J))})}return D}function yW0(D,$,X){if($=w_($),$ in D)Object.defineProperty(D,$,{value:X,enumerable:!0,configurable:!0,writable:!0});else D[$]=X;return D}function w_(D){var $=bW0(D,"string");return _5($)=="symbol"?$:$+""}function bW0(D,$){if(_5(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(_5(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var U_=V4.defaultOptions=v5(v5({},wW.default.defaultOptions),{},{httpStack:new Z_.default,fileReader:new CW0.default,urlStorage:new TW0.default,fingerprint:SW0.default}),Ns0=V4.Upload=function(D){function $(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return uW0(this,$),J=v5(v5({},U_),J),vW0(this,$,[X,J])}return kW0($,D),xW0($,null,[{key:"terminate",value:function(J){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return F=v5(v5({},U_),F),wW.default.terminate(J,F)}}])}(wW.default),zs0=V4.isSupported=!0});var i1;var d8=p(()=>{i1={name:"@capgo/cli",type:"module",version:"7.122.6",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:"git+https://github.com/Cap-go/capgo.git",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:bundle":"bun test/test-bundle.mjs","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:credentials":"bun test/test-credentials.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: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","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: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:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.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:init-guardrails":"bun test/test-init-guardrails.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.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:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs",test:"bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && 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:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:mcp-analytics && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && 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-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:apple-api-import-helpers && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:ai-render-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","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.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"},dependencies:{"@inkjs/ui":"^2.0.0",ink:"^7.0.4","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.6"},devDependencies:{"@antfu/eslint-config":"^9.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.3.4","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.4.0","@modelcontextprotocol/sdk":"^1.29.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.106.2","@tanstack/intent":"^0.0.41","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.9.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.15","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260526.1","@vercel/ncc":"^0.38.4","@xterm/headless":"^6.0.0","adm-zip":"^0.5.17","ci-info":"^4.4.0",commander:"^14.0.3",eslint:"^10.4.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.67.0",partysocket:"^1.1.19",prettyjson:"^1.2.5",tmp:"^0.2.6","tus-js-client":"^4.3.1",typescript:"^6.0.3",ws:"^8.21.0",zod:"^4.4.3"}}});async function hY(D){try{let X=`https://registry.npmjs.org/${encodeURIComponent(D.toLowerCase())}`,J=await fetch(X,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!J.ok)return null;return(await J.json())["dist-tags"]?.latest||null}catch{return null}}async function gW0(){let D=await hY("@capgo/cli")??"",$=D?.split(".")[0]??"";return{currentVersion:i1.version,latestVersion:D,isOutdated:!!D&&D!==i1.version,majorVersion:$}}async function WD(){let{isOutdated:D,currentVersion:$,latestVersion:X,majorVersion:J}=await gW0();if(D)V.warning(`\uD83D\uDEA8 You are using @capgo/cli@${$} it's not the latest version.
127
+ GFS4: `),console.error(D)};if(!uD[Y1]){if(aq=global[Y1]||[],fv(uD,aq),uD.close=function(D){function $(X,J){return D.call(uD,X,function(F){if(!F)_v();if(typeof J==="function")J.apply(this,arguments)})}return Object.defineProperty($,SY,{value:D}),$}(uD.close),uD.closeSync=function(D){function $(X){D.apply(uD,arguments),_v()}return Object.defineProperty($,SY,{value:D}),$}(uD.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){b8(uD[Y1]),l("assert").equal(uD[Y1].length,0)})}var aq;if(!global[Y1])fv(global,uD[Y1]);DW.exports=sq(bq0(uD));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!uD.__patched)DW.exports=sq(uD),uD.__patched=!0;function sq(D){kq0(D),D.gracefulify=sq,D.createReadStream=z,D.createWriteStream=R;var $=D.readFile;D.readFile=X;function X(A,u,S){if(typeof u==="function")S=u,u=null;return m(A,u,S);function m(g,r,k,T){return $(g,r,function(P){if(P&&(P.code==="EMFILE"||P.code==="ENFILE"))S5([m,[g,r,k],P,T||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var J=D.writeFile;D.writeFile=F;function F(A,u,S,m){if(typeof S==="function")m=S,S=null;return g(A,u,S,m);function g(r,k,T,P,x){return J(r,k,T,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))S5([g,[r,k,T,P],f,x||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var Y=D.appendFile;if(Y)D.appendFile=Q;function Q(A,u,S,m){if(typeof S==="function")m=S,S=null;return g(A,u,S,m);function g(r,k,T,P,x){return Y(r,k,T,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))S5([g,[r,k,T,P],f,x||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var U=D.copyFile;if(U)D.copyFile=Z;function Z(A,u,S,m){if(typeof S==="function")m=S,S=0;return g(A,u,S,m);function g(r,k,T,P,x){return U(r,k,T,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))S5([g,[r,k,T,P],f,x||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var O=D.readdir;D.readdir=w;var G=/^v[0-5]\./;function w(A,u,S){if(typeof u==="function")S=u,u=null;var m=G.test(process.version)?function(k,T,P,x){return O(k,g(k,T,P,x))}:function(k,T,P,x){return O(k,T,g(k,T,P,x))};return m(A,u,S);function g(r,k,T,P){return function(x,f){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))S5([m,[r,k,T],x,P||Date.now(),Date.now()]);else{if(f&&f.sort)f.sort();if(typeof T==="function")T.call(this,x,f)}}}}if(process.version.substr(0,4)==="v0.8"){var q=yq0(D);M=q.ReadStream,B=q.WriteStream}var W=D.ReadStream;if(W)M.prototype=Object.create(W.prototype),M.prototype.open=I;var K=D.WriteStream;if(K)B.prototype=Object.create(K.prototype),B.prototype.open=N;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(A){M=A},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return B},set:function(A){B=A},enumerable:!0,configurable:!0});var H=M;Object.defineProperty(D,"FileReadStream",{get:function(){return H},set:function(A){H=A},enumerable:!0,configurable:!0});var L=B;Object.defineProperty(D,"FileWriteStream",{get:function(){return L},set:function(A){L=A},enumerable:!0,configurable:!0});function M(A,u){if(this instanceof M)return W.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function I(){var A=this;_(A.path,A.flags,A.mode,function(u,S){if(u){if(A.autoClose)A.destroy();A.emit("error",u)}else A.fd=S,A.emit("open",S),A.read()})}function B(A,u){if(this instanceof B)return K.apply(this,arguments),this;else return B.apply(Object.create(B.prototype),arguments)}function N(){var A=this;_(A.path,A.flags,A.mode,function(u,S){if(u)A.destroy(),A.emit("error",u);else A.fd=S,A.emit("open",S)})}function z(A,u){return new D.ReadStream(A,u)}function R(A,u){return new D.WriteStream(A,u)}var v=D.open;D.open=_;function _(A,u,S,m){if(typeof S==="function")m=S,S=null;return g(A,u,S,m);function g(r,k,T,P,x){return v(r,k,T,function(f,h){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))S5([g,[r,k,T,P],f,x||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}return D}function S5(D){b8("ENQUEUE",D[0].name,D[1]),uD[Y1].push(D),eq()}var CY;function _v(){var D=Date.now();for(var $=0;$<uD[Y1].length;++$)if(uD[Y1][$].length>2)uD[Y1][$][3]=D,uD[Y1][$][4]=D;eq()}function eq(){if(clearTimeout(CY),CY=void 0,uD[Y1].length===0)return;var D=uD[Y1].shift(),$=D[0],X=D[1],J=D[2],F=D[3],Y=D[4];if(F===void 0)b8("RETRY",$.name,X),$.apply(null,X);else if(Date.now()-F>=60000){b8("TIMEOUT",$.name,X);var Q=X.pop();if(typeof Q==="function")Q.call(null,J)}else{var U=Date.now()-Y,Z=Math.max(Y-F,1),O=Math.min(Z*1.2,100);if(U>=O)b8("RETRY",$.name,X),$.apply(null,X.concat([F]));else uD[Y1].push(D)}if(CY===void 0)CY=setTimeout(eq,0)}});var yv=E((Zs0,kv)=>{function V$(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)}kv.exports=V$;V$.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};V$.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};V$.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 X=this._timeouts.shift();if(X===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),X=this._timeouts.shift();else return!1;var J=this,F=setTimeout(function(){if(J._attempts++,J._operationTimeoutCb){if(J._timeout=setTimeout(function(){J._operationTimeoutCb(J._attempts)},J._operationTimeout),J._options.unref)J._timeout.unref()}J._fn(J._attempts)},X);if(this._options.unref)F.unref();return!0};V$.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};V$.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};V$.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};V$.prototype.start=V$.prototype.try;V$.prototype.errors=function(){return this._errors};V$.prototype.attempts=function(){return this._attempts};V$.prototype.mainError=function(){if(this._errors.length===0)return null;var D={},$=null,X=0;for(var J=0;J<this._errors.length;J++){var F=this._errors[J],Y=F.message,Q=(D[Y]||0)+1;if(D[Y]=Q,Q>=X)$=F,X=Q}return $}});var hv=E((mq0)=>{var gq0=yv();mq0.operation=function(D){var $=mq0.timeouts(D);return new gq0($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};mq0.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in D)$[X]=D[X];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var J=[];for(var F=0;F<$.retries;F++)J.push(this.createTimeout(F,$));if(D&&D.forever&&!J.length)J.push(this.createTimeout(F,$));return J.sort(function(Y,Q){return Y-Q}),J};mq0.createTimeout=function(D,$){var X=$.randomize?Math.random()+1:1,J=Math.round(X*$.minTimeout*Math.pow($.factor,D));return J=Math.min(J,$.maxTimeout),J};mq0.wrap=function(D,$,X){if($ instanceof Array)X=$,$=null;if(!X){X=[];for(var J in D)if(typeof D[J]==="function")X.push(J)}for(var F=0;F<X.length;F++){var Y=X[F],Q=D[Y];D[Y]=function(Z){var O=mq0.operation($),G=Array.prototype.slice.call(arguments,1),w=G.pop();G.push(function(q){if(O.retry(q))return;if(q)arguments[0]=O.mainError();w.apply(this,arguments)}),O.attempt(function(){Z.apply(D,G)})}.bind(D,Q),D[Y].options=$}}});var gv=E((Gs0,PY)=>{PY.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")PY.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")PY.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var vY=E((ws0,u5)=>{var jD=global.process,h8=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(!h8(jD))u5.exports=function(){return function(){}};else{if($W=l("assert"),g8=gv(),XW=/^win/i.test(jD.platform),P5=l("events"),typeof P5!=="function")P5=P5.EventEmitter;if(jD.__signal_exit_emitter__)oD=jD.__signal_exit_emitter__;else oD=jD.__signal_exit_emitter__=new P5,oD.count=0,oD.emitted={};if(!oD.infinite)oD.setMaxListeners(1/0),oD.infinite=!0;u5.exports=function(D,$){if(!h8(global.process))return function(){};if($W.equal(typeof D,"function","a callback must be provided for exit handler"),m8===!1)uY();var X="exit";if($&&$.alwaysLast)X="afterexit";var J=function(){if(oD.removeListener(X,D),oD.listeners("exit").length===0&&oD.listeners("afterexit").length===0)I2()};return oD.on(X,D),J},I2=function(){if(!m8||!h8(global.process))return;m8=!1,g8.forEach(function($){try{jD.removeListener($,A2[$])}catch(X){}}),jD.emit=E2,jD.reallyExit=xY,oD.count-=1},u5.exports.unload=I2,N4=function($,X,J){if(oD.emitted[$])return;oD.emitted[$]=!0,oD.emit($,X,J)},A2={},g8.forEach(function(D){A2[D]=function(){if(!h8(global.process))return;var X=jD.listeners(D);if(X.length===oD.count){if(I2(),N4("exit",null,D),N4("afterexit",null,D),XW&&D==="SIGHUP")D="SIGINT";jD.kill(jD.pid,D)}}}),u5.exports.signals=function(){return g8},m8=!1,uY=function(){if(m8||!h8(global.process))return;m8=!0,oD.count+=1,g8=g8.filter(function($){try{return jD.on($,A2[$]),!0}catch(X){return!1}}),jD.emit=FW,jD.reallyExit=JW},u5.exports.load=uY,xY=jD.reallyExit,JW=function($){if(!h8(global.process))return;jD.exitCode=$||0,N4("exit",jD.exitCode,null),N4("afterexit",jD.exitCode,null),xY.call(jD,jD.exitCode)},E2=jD.emit,FW=function($,X){if($==="exit"&&h8(global.process)){if(X!==void 0)jD.exitCode=X;var J=E2.apply(this,arguments);return N4("exit",jD.exitCode,null),N4("afterexit",jD.exitCode,null),J}else return E2.apply(this,arguments)}}var $W,g8,XW,P5,oD,I2,N4,A2,m8,uY,xY,JW,E2,FW});var cv=E((pq0,YW)=>{var mv=Symbol();function lq0(D,$,X){let J=$[mv];if(J)return $.stat(D,(Y,Q)=>{if(Y)return X(Y);X(null,Q.mtime,J)});let F=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,F,F,(Y)=>{if(Y)return X(Y);$.stat(D,(Q,U)=>{if(Q)return X(Q);let Z=U.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,mv,{value:Z}),X(null,U.mtime,Z)})})}function iq0(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}pq0.probe=lq0;pq0.getMtime=iq0});var pv=E((XW0,j2)=>{var oq0=l("path"),ZW=bD(),aq0=hv(),sq0=vY(),dv=cv(),k6={};function R2(D,$){return $.lockfilePath||`${D}.lock`}function OW(D,$,X){if(!$.realpath)return X(null,oq0.resolve(D));$.fs.realpath(D,X)}function UW(D,$,X){let J=R2(D,$);$.fs.mkdir(J,(F)=>{if(!F)return dv.probe(J,$.fs,(Y,Q,U)=>{if(Y)return $.fs.rmdir(J,()=>{}),X(Y);X(null,Q,U)});if(F.code!=="EEXIST")return X(F);if($.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(J,(Y,Q)=>{if(Y){if(Y.code==="ENOENT")return UW(D,{...$,stale:0},X);return X(Y)}if(!nv(Q,$))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));lv(D,$,(U)=>{if(U)return X(U);UW(D,{...$,stale:0},X)})})})}function nv(D,$){return D.mtime.getTime()<Date.now()-$.stale}function lv(D,$,X){$.fs.rmdir(R2(D,$),(J)=>{if(J&&J.code!=="ENOENT")return X(J);X()})}function _Y(D,$){let X=k6[D];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||$.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,$.fs.stat(X.lockfilePath,(J,F)=>{let Y=X.lastUpdate+$.stale<Date.now();if(J){if(J.code==="ENOENT"||Y)return QW(D,X,Object.assign(J,{code:"ECOMPROMISED"}));return X.updateDelay=1000,_Y(D,$)}if(X.mtime.getTime()!==F.mtime.getTime())return QW(D,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let U=dv.getMtime(X.mtimePrecision);$.fs.utimes(X.lockfilePath,U,U,(Z)=>{let O=X.lastUpdate+$.stale<Date.now();if(X.released)return;if(Z){if(Z.code==="ENOENT"||O)return QW(D,X,Object.assign(Z,{code:"ECOMPROMISED"}));return X.updateDelay=1000,_Y(D,$)}X.mtime=U,X.lastUpdate=Date.now(),X.updateDelay=null,_Y(D,$)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function QW(D,$,X){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(k6[D]===$)delete k6[D];$.options.onCompromised(X)}function eq0(D,$,X){$={stale:1e4,update:null,realpath:!0,retries:0,fs:ZW,onCompromised:(J)=>{throw J},...$},$.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),OW(D,$,(J,F)=>{if(J)return X(J);let Y=aq0.operation($.retries);Y.attempt(()=>{UW(F,$,(Q,U,Z)=>{if(Y.retry(Q))return;if(Q)return X(Y.mainError());let O=k6[F]={lockfilePath:R2(F,$),mtime:U,mtimePrecision:Z,options:$,lastUpdate:Date.now()};_Y(F,$),X(null,(G)=>{if(O.released)return G&&G(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));iv(F,{...$,realpath:!1},G)})})})})}function iv(D,$,X){$={fs:ZW,realpath:!0,...$},OW(D,$,(J,F)=>{if(J)return X(J);let Y=k6[F];if(!Y)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Y.updateTimeout&&clearTimeout(Y.updateTimeout),Y.released=!0,delete k6[F],lv(F,$,X)})}function DW0(D,$,X){$={stale:1e4,realpath:!0,fs:ZW,...$},$.stale=Math.max($.stale||0,2000),OW(D,$,(J,F)=>{if(J)return X(J);$.fs.stat(R2(F,$),(Y,Q)=>{if(Y)return Y.code==="ENOENT"?X(null,!1):X(Y);return X(null,!nv(Q,$))})})}function $W0(){return k6}sq0(()=>{for(let D in k6){let $=k6[D].options;try{$.fs.rmdirSync(R2(D,$))}catch(X){}}});XW0.lock=eq0;XW0.unlock=iv;XW0.check=DW0;XW0.getLocks=$W0});var tv=E((qs0,rv)=>{var UW0=bD();function ZW0(D){let $=["mkdir","realpath","stat","rmdir","utimes"],X={...D};return $.forEach((J)=>{X[J]=(...F)=>{let Y=F.pop(),Q;try{Q=D[`${J}Sync`](...F)}catch(U){return Y(U)}Y(null,Q)}}),X}function OW0(D){return(...$)=>new Promise((X,J)=>{$.push((F,Y)=>{if(F)J(F);else X(Y)}),D(...$)})}function GW0(D){return(...$)=>{let X,J;if($.push((F,Y)=>{X=F,J=Y}),D(...$),X)throw X;return J}}function wW0(D){if(D={...D},D.fs=ZW0(D.fs||UW0),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}rv.exports={toPromise:OW0,toSync:GW0,toSyncOptions:wW0}});var av=E((Ws0,z4)=>{var x5=pv(),{toPromise:fY,toSync:kY,toSyncOptions:GW}=tv();async function ov(D,$){let X=await fY(x5.lock)(D,$);return fY(X)}function qW0(D,$){let X=kY(x5.lock)(D,GW($));return kY(X)}function WW0(D,$){return fY(x5.unlock)(D,$)}function KW0(D,$){return kY(x5.unlock)(D,GW($))}function HW0(D,$){return fY(x5.check)(D,$)}function BW0(D,$){return kY(x5.check)(D,GW($))}z4.exports=ov;z4.exports.lock=ov;z4.exports.unlock=WW0;z4.exports.lockSync=qW0;z4.exports.unlockSync=KW0;z4.exports.check=HW0;z4.exports.checkSync=BW0});var F_=E((X_)=>{Object.defineProperty(X_,"__esModule",{value:!0});X_.canStoreURLs=X_.FileUrlStorage=void 0;var sv=l("fs"),NW0=VW0(jv()),ev=zW0(av());function $_(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,X=new WeakMap;return($_=function(J){return J?X:$})(D)}function zW0(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var X=$_($);if(X&&X.has(D))return X.get(D);var J={__proto__:null},F=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in D)if(Y!=="default"&&{}.hasOwnProperty.call(D,Y)){var Q=F?Object.getOwnPropertyDescriptor(D,Y):null;Q&&(Q.get||Q.set)?Object.defineProperty(J,Y,Q):J[Y]=D[Y]}return J.default=D,X&&X.set(D,J),J}function VW0(D){return D&&D.__esModule?D:{default:D}}function T2(D){return T2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},T2(D)}function LW0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function D_(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,IW0(J.key),J)}}function MW0(D,$,X){if($)D_(D.prototype,$);if(X)D_(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function IW0(D){var $=AW0(D,"string");return T2($)=="symbol"?$:$+""}function AW0(D,$){if(T2(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(T2(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var Ks0=X_.canStoreURLs=!0,Hs0=X_.FileUrlStorage=function(){function D($){LW0(this,D),this.path=$}return MW0(D,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(J,F){X._getItems("tus::",function(Y,Q){if(Y)F(Y);else J(Q)})})}},{key:"findUploadsByFingerprint",value:function(X){var J=this;return new Promise(function(F,Y){J._getItems("tus::".concat(X),function(Q,U){if(Q)Y(Q);else F(U)})})}},{key:"removeUpload",value:function(X){var J=this;return new Promise(function(F,Y){J._removeItem(X,function(Q){if(Q)Y(Q);else F()})})}},{key:"addUpload",value:function(X,J){var F=this,Y=Math.round(Math.random()*1000000000000),Q="tus::".concat(X,"::").concat(Y);return new Promise(function(U,Z){F._setItem(Q,J,function(O){if(O)Z(O);else U(Q)})})}},{key:"_setItem",value:function(X,J,F){var Y=this;ev.lock(this.path,this._lockfileOptions()).then(function(Q){F=Y._releaseAndCb(Q,F),Y._getData(function(U,Z){if(U){F(U);return}Z[X]=J,Y._writeData(Z,function(O){return F(O)})})}).catch(F)}},{key:"_getItems",value:function(X,J){this._getData(function(F,Y){if(F){J(F);return}var Q=Object.keys(Y).filter(function(U){return U.startsWith(X)}).map(function(U){var Z=Y[U];return Z.urlStorageKey=U,Z});J(null,Q)})}},{key:"_removeItem",value:function(X,J){var F=this;ev.lock(this.path,this._lockfileOptions()).then(function(Y){J=F._releaseAndCb(Y,J),F._getData(function(Q,U){if(Q){J(Q);return}delete U[X],F._writeData(U,function(Z){return J(Z)})})}).catch(J)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,J){return function(F){if(F){X().then(function(){return J(F)}).catch(function(Y){return J((0,NW0.default)([F,Y]))});return}X().then(J).catch(J)}}},{key:"_writeData",value:function(X,J){var F={encoding:"utf8",mode:432,flag:"w"};(0,sv.writeFile)(this.path,JSON.stringify(X),F,function(Y){return J(Y)})}},{key:"_getData",value:function(X){(0,sv.readFile)(this.path,"utf8",function(J,F){if(J){if(J.code==="ENOENT")X(null,{});else X(J);return}try{F=!F.trim().length?{}:JSON.parse(F)}catch(Y){X(Y);return}X(null,F)})}}])}()});var bY=E((V4)=>{Object.defineProperty(V4,"__esModule",{value:!0});Object.defineProperty(V4,"DefaultHttpStack",{enumerable:!0,get:function(){return Z_.default}});Object.defineProperty(V4,"DetailedError",{enumerable:!0,get:function(){return RW0.default}});Object.defineProperty(V4,"FileUrlStorage",{enumerable:!0,get:function(){return O_.FileUrlStorage}});Object.defineProperty(V4,"StreamSource",{enumerable:!0,get:function(){return PW0.default}});V4.Upload=void 0;Object.defineProperty(V4,"canStoreURLs",{enumerable:!0,get:function(){return O_.canStoreURLs}});V4.defaultOptions=void 0;Object.defineProperty(V4,"enableDebugLog",{enumerable:!0,get:function(){return jW0.enableDebugLog}});V4.isSupported=void 0;var RW0=c8(Gq()),jW0=wq(),TW0=c8(aP()),wW=c8(Pu()),CW0=c8(ou()),SW0=c8($x()),Z_=c8(Nx()),PW0=c8(Iq()),O_=F_();function c8(D){return D&&D.__esModule?D:{default:D}}function _5(D){return _5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_5(D)}function uW0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function Y_(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,w_(J.key),J)}}function xW0(D,$,X){if($)Y_(D.prototype,$);if(X)Y_(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function vW0(D,$,X){return $=yY($),_W0(D,G_()?Reflect.construct($,X||[],yY(D).constructor):$.apply(D,X))}function _W0(D,$){if($&&(_5($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return fW0(D)}function fW0(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function G_(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(G_=function(){return!!D})()}function yY(D){return yY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},yY(D)}function kW0(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}),$)qW(D,$)}function qW(D,$){return qW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,F){return J.__proto__=F,J},qW(D,$)}function Q_(D,$){var X=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);$&&(J=J.filter(function(F){return Object.getOwnPropertyDescriptor(D,F).enumerable})),X.push.apply(X,J)}return X}function v5(D){for(var $=1;$<arguments.length;$++){var X=arguments[$]!=null?arguments[$]:{};$%2?Q_(Object(X),!0).forEach(function(J){yW0(D,J,X[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(X)):Q_(Object(X)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor(X,J))})}return D}function yW0(D,$,X){if($=w_($),$ in D)Object.defineProperty(D,$,{value:X,enumerable:!0,configurable:!0,writable:!0});else D[$]=X;return D}function w_(D){var $=bW0(D,"string");return _5($)=="symbol"?$:$+""}function bW0(D,$){if(_5(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(_5(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var U_=V4.defaultOptions=v5(v5({},wW.default.defaultOptions),{},{httpStack:new Z_.default,fileReader:new CW0.default,urlStorage:new TW0.default,fingerprint:SW0.default}),Ns0=V4.Upload=function(D){function $(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return uW0(this,$),J=v5(v5({},U_),J),vW0(this,$,[X,J])}return kW0($,D),xW0($,null,[{key:"terminate",value:function(J){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return F=v5(v5({},U_),F),wW.default.terminate(J,F)}}])}(wW.default),zs0=V4.isSupported=!0});var i1;var d8=p(()=>{i1={name:"@capgo/cli",type:"module",version:"7.123.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:"git+https://github.com/Cap-go/capgo.git",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:bundle":"bun test/test-bundle.mjs","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:credentials":"bun test/test-credentials.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: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","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: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:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.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:init-guardrails":"bun test/test-init-guardrails.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.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:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs",test:"bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && 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:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:mcp-analytics && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && 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-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:apple-api-import-helpers && bun run test:bundle-id-detector && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:ai-render-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","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.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"},dependencies:{"@inkjs/ui":"^2.0.0",ink:"^7.0.4","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.6","string-width":"^8.2.1"},devDependencies:{"@antfu/eslint-config":"^9.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.3.4","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.4.0","@modelcontextprotocol/sdk":"^1.29.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.106.2","@tanstack/intent":"^0.0.41","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.9.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.15","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260526.1","@vercel/ncc":"^0.38.4","@xterm/headless":"^6.0.0","adm-zip":"^0.5.17","ci-info":"^4.4.0",commander:"^14.0.3",eslint:"^10.4.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.67.0",partysocket:"^1.1.19",prettyjson:"^1.2.5",tmp:"^0.2.6","tus-js-client":"^4.3.1",typescript:"^6.0.3",ws:"^8.21.0",zod:"^4.4.3"}}});async function hY(D){try{let X=`https://registry.npmjs.org/${encodeURIComponent(D.toLowerCase())}`,J=await fetch(X,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!J.ok)return null;return(await J.json())["dist-tags"]?.latest||null}catch{return null}}async function gW0(){let D=await hY("@capgo/cli")??"",$=D?.split(".")[0]??"";return{currentVersion:i1.version,latestVersion:D,isOutdated:!!D&&D!==i1.version,majorVersion:$}}async function WD(){let{isOutdated:D,currentVersion:$,latestVersion:X,majorVersion:J}=await gW0();if(D)V.warning(`\uD83D\uDEA8 You are using @capgo/cli@${$} it's not the latest version.
128
128
  Please use @capgo/cli@${X}" or @capgo/cli@${J} to keep up to date with the latest features and bug fixes.`)}var j1=p(()=>{f0();d8()});async function H_(D,$,X,J,F,Y="✅"){await M0(X,{channel:D,event:J,icon:Y,org_id:$,tracking_version:2,...F?{tags:{"app-id":F}}:{},notify:!1})}var B_=p(()=>{f0();c9();j1();x0()});var z_=E((us0,N_)=>{var f5=1000,k5=f5*60,y5=k5*60,n8=y5*24,mW0=n8*7,cW0=n8*365.25;N_.exports=function(D,$){$=$||{};var X=typeof D;if(X==="string"&&D.length>0)return dW0(D);else if(X==="number"&&isFinite(D))return $.long?lW0(D):nW0(D);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(D))};function dW0(D){if(D=String(D),D.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(D);if(!$)return;var X=parseFloat($[1]),J=($[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return X*cW0;case"weeks":case"week":case"w":return X*mW0;case"days":case"day":case"d":return X*n8;case"hours":case"hour":case"hrs":case"hr":case"h":return X*y5;case"minutes":case"minute":case"mins":case"min":case"m":return X*k5;case"seconds":case"second":case"secs":case"sec":case"s":return X*f5;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function nW0(D){var $=Math.abs(D);if($>=n8)return Math.round(D/n8)+"d";if($>=y5)return Math.round(D/y5)+"h";if($>=k5)return Math.round(D/k5)+"m";if($>=f5)return Math.round(D/f5)+"s";return D+"ms"}function lW0(D){var $=Math.abs(D);if($>=n8)return gY(D,$,n8,"day");if($>=y5)return gY(D,$,y5,"hour");if($>=k5)return gY(D,$,k5,"minute");if($>=f5)return gY(D,$,f5,"second");return D+" ms"}function gY(D,$,X,J){var F=$>=X*1.5;return Math.round(D/X)+" "+J+(F?"s":"")}});var WW=E((xs0,V_)=>{function iW0(D){X.debug=X,X.default=X,X.coerce=Z,X.disable=Q,X.enable=F,X.enabled=U,X.humanize=z_(),X.destroy=O,Object.keys(D).forEach((G)=>{X[G]=D[G]}),X.names=[],X.skips=[],X.formatters={};function $(G){let w=0;for(let q=0;q<G.length;q++)w=(w<<5)-w+G.charCodeAt(q),w|=0;return X.colors[Math.abs(w)%X.colors.length]}X.selectColor=$;function X(G){let w,q=null,W,K;function H(...L){if(!H.enabled)return;let M=H,I=Number(new Date),B=I-(w||I);if(M.diff=B,M.prev=w,M.curr=I,w=I,L[0]=X.coerce(L[0]),typeof L[0]!=="string")L.unshift("%O");let N=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,(R,v)=>{if(R==="%%")return"%";N++;let _=X.formatters[v];if(typeof _==="function"){let A=L[N];R=_.call(M,A),L.splice(N,1),N--}return R}),X.formatArgs.call(M,L),(M.log||X.log).apply(M,L)}if(H.namespace=G,H.useColors=X.useColors(),H.color=X.selectColor(G),H.extend=J,H.destroy=X.destroy,Object.defineProperty(H,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(q!==null)return q;if(W!==X.namespaces)W=X.namespaces,K=X.enabled(G);return K},set:(L)=>{q=L}}),typeof X.init==="function")X.init(H);return H}function J(G,w){let q=X(this.namespace+(typeof w>"u"?":":w)+G);return q.log=this.log,q}function F(G){X.save(G),X.namespaces=G,X.names=[],X.skips=[];let w=(typeof G==="string"?G:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let q of w)if(q[0]==="-")X.skips.push(q.slice(1));else X.names.push(q)}function Y(G,w){let q=0,W=0,K=-1,H=0;while(q<G.length)if(W<w.length&&(w[W]===G[q]||w[W]==="*"))if(w[W]==="*")K=W,H=q,W++;else q++,W++;else if(K!==-1)W=K+1,H++,q=H;else return!1;while(W<w.length&&w[W]==="*")W++;return W===w.length}function Q(){let G=[...X.names,...X.skips.map((w)=>"-"+w)].join(",");return X.enable(""),G}function U(G){for(let w of X.skips)if(Y(G,w))return!1;for(let w of X.names)if(Y(G,w))return!0;return!1}function Z(G){if(G instanceof Error)return G.stack||G.message;return G}function O(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return X.enable(X.load()),X}V_.exports=iW0});var M_=E((L_,mY)=>{L_.formatArgs=rW0;L_.save=tW0;L_.load=oW0;L_.useColors=pW0;L_.storage=aW0();L_.destroy=(()=>{let D=!1;return()=>{if(!D)D=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();L_.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function pW0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let D;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(D=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(D[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function rW0(D){if(D[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+D[0]+(this.useColors?"%c ":" ")+"+"+mY.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;D.splice(1,0,$,"color: inherit");let X=0,J=0;D[0].replace(/%[a-zA-Z%]/g,(F)=>{if(F==="%%")return;if(X++,F==="%c")J=X}),D.splice(J,0,$)}L_.log=console.debug||console.log||(()=>{});function tW0(D){try{if(D)L_.storage.setItem("debug",D);else L_.storage.removeItem("debug")}catch($){}}function oW0(){let D;try{D=L_.storage.getItem("debug")||L_.storage.getItem("DEBUG")}catch($){}if(!D&&typeof process<"u"&&"env"in process)D=process.env.DEBUG;return D}function aW0(){try{return localStorage}catch(D){}}mY.exports=WW()(L_);var{formatters:sW0}=mY.exports;sW0.j=function(D){try{return JSON.stringify(D)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var A_=E((_s0,I_)=>{I_.exports=(D,$=process.argv)=>{let X=D.startsWith("-")?"":D.length===1?"-":"--",J=$.indexOf(X+D),F=$.indexOf("--");return J!==-1&&(F===-1||J<F)}});var j_=E((fs0,R_)=>{var QK0=l("os"),E_=l("tty"),L$=A_(),{env:D1}=process,L4;if(L$("no-color")||L$("no-colors")||L$("color=false")||L$("color=never"))L4=0;else if(L$("color")||L$("colors")||L$("color=true")||L$("color=always"))L4=1;if("FORCE_COLOR"in D1)if(D1.FORCE_COLOR==="true")L4=1;else if(D1.FORCE_COLOR==="false")L4=0;else L4=D1.FORCE_COLOR.length===0?1:Math.min(parseInt(D1.FORCE_COLOR,10),3);function KW(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function HW(D,$){if(L4===0)return 0;if(L$("color=16m")||L$("color=full")||L$("color=truecolor"))return 3;if(L$("color=256"))return 2;if(D&&!$&&L4===void 0)return 0;let X=L4||0;if(D1.TERM==="dumb")return X;if(process.platform==="win32"){let J=QK0.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in D1){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in D1))||D1.CI_NAME==="codeship")return 1;return X}if("TEAMCITY_VERSION"in D1)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(D1.TEAMCITY_VERSION)?1:0;if(D1.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in D1){let J=parseInt((D1.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(D1.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(D1.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(D1.TERM))return 1;if("COLORTERM"in D1)return 1;return X}function UK0(D){let $=HW(D,D&&D.isTTY);return KW($)}R_.exports={supportsColor:UK0,stdout:KW(HW(!0,E_.isatty(1))),stderr:KW(HW(!0,E_.isatty(2)))}});var P_=E((C_,dY)=>{var ZK0=l("tty"),cY=l("util");C_.init=HK0;C_.log=qK0;C_.formatArgs=GK0;C_.save=WK0;C_.load=KK0;C_.useColors=OK0;C_.destroy=cY.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");C_.colors=[6,2,3,4,5,1];try{let D=j_();if(D&&(D.stderr||D).level>=2)C_.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(D){}C_.inspectOpts=Object.keys(process.env).filter((D)=>{return/^debug_/i.test(D)}).reduce((D,$)=>{let X=$.substring(6).toLowerCase().replace(/_([a-z])/g,(F,Y)=>{return Y.toUpperCase()}),J=process.env[$];if(/^(yes|on|true|enabled)$/i.test(J))J=!0;else if(/^(no|off|false|disabled)$/i.test(J))J=!1;else if(J==="null")J=null;else J=Number(J);return D[X]=J,D},{});function OK0(){return"colors"in C_.inspectOpts?Boolean(C_.inspectOpts.colors):ZK0.isatty(process.stderr.fd)}function GK0(D){let{namespace:$,useColors:X}=this;if(X){let J=this.color,F="\x1B[3"+(J<8?J:"8;5;"+J),Y=` ${F};1m${$} \x1B[0m`;D[0]=Y+D[0].split(`
129
129
  `).join(`
130
130
  `+Y),D.push(F+"m+"+dY.exports.humanize(this.diff)+"\x1B[0m")}else D[0]=wK0()+$+" "+D[0]}function wK0(){if(C_.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function qK0(...D){return process.stderr.write(cY.formatWithOptions(C_.inspectOpts,...D)+`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "7.122.6",
4
+ "version": "7.123.0",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -105,8 +105,9 @@
105
105
  "test:payload-split": "bun test/test-payload-split.mjs",
106
106
  "test:macos-signing": "bun test/test-macos-signing.mjs",
107
107
  "test:apple-api-import-helpers": "bun test/test-apple-api-import-helpers.mjs",
108
+ "test:bundle-id-detector": "bun test/test-bundle-id-detector.mjs",
108
109
  "test:manifest-path-encoding": "bun test/test-manifest-path-encoding.mjs",
109
- "test": "bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && 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:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:mcp-analytics && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && 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-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:apple-api-import-helpers && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:ai-render-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",
110
+ "test": "bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && 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:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:mcp-analytics && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && 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-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:apple-api-import-helpers && bun run test:bundle-id-detector && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:ai-render-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",
110
111
  "test:build-platform-selection": "bun test/test-build-platform-selection.mjs",
111
112
  "test:ai-log-capture": "bun test/test-ai-log-capture.mjs",
112
113
  "test:ai-analyze-flow": "bun test/test-ai-analyze-flow.mjs",
@@ -130,7 +131,8 @@
130
131
  "jsonwebtoken": "^9.0.3",
131
132
  "node-forge": "^1.4.0",
132
133
  "qrcode": "^1.5.4",
133
- "react": "^19.2.6"
134
+ "react": "^19.2.6",
135
+ "string-width": "^8.2.1"
134
136
  },
135
137
  "devDependencies": {
136
138
  "@antfu/eslint-config": "^9.0.0",