@capgo/cli 8.32.4 → 8.32.6
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/index.js +544 -544
- package/dist/package.json +1 -1
- package/dist/src/init/command.d.ts +8 -0
- package/dist/src/init/replay.d.ts +0 -2
- package/dist/src/sdk.js +1 -1
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Options } from '../api/app';
|
|
2
|
+
import type { Organization } from '../utils';
|
|
2
3
|
import { spawnSync } from 'node:child_process';
|
|
3
4
|
import { getConfig, getPMAndCommand } from '../utils';
|
|
4
5
|
interface SuperOptions extends Options {
|
|
@@ -59,6 +60,13 @@ export declare function getDirtyGitStatusActionOptions(): {
|
|
|
59
60
|
hint: string;
|
|
60
61
|
}[];
|
|
61
62
|
export declare function injectInitCode(filePath: string, currentContent: string): string;
|
|
63
|
+
interface ResumeResult {
|
|
64
|
+
stepDone: number;
|
|
65
|
+
orgId: string;
|
|
66
|
+
orgName: string;
|
|
67
|
+
appId?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare function getResumedOnboardingAccessError(resume: ResumeResult, organization: Organization | undefined, hasCreateAppPermission: boolean, hasAppAccess: boolean): string | undefined;
|
|
62
70
|
type PackageManagerInfo = ReturnType<typeof getPMAndCommand>;
|
|
63
71
|
export type PlatformChoice = 'ios' | 'android';
|
|
64
72
|
export type RunDeviceStepOutcome = {
|
|
@@ -63,12 +63,10 @@ export declare function shouldStartInitReplay(input: InitReplayGateInput): boole
|
|
|
63
63
|
export declare function resolveCapgoReplayUrl(host?: string): string | undefined;
|
|
64
64
|
export declare function resolveSupabaseReplayUrl(supaHost?: string): string | undefined;
|
|
65
65
|
export declare function resolveReplayUrlForFlush(replayUrl: Promise<string | undefined>, timeoutMs?: number, onTimeout?: () => void): Promise<string | undefined>;
|
|
66
|
-
export declare function parseTerminalPixelSizeResponse(input: string): TerminalPixelSize | undefined;
|
|
67
66
|
export declare function getReplayViewportSize(cols?: number, rows?: number, terminalPixelSize?: TerminalPixelSize): {
|
|
68
67
|
height: number;
|
|
69
68
|
width: number;
|
|
70
69
|
};
|
|
71
|
-
export declare function queryTerminalPixelSize(timeoutMs?: number): Promise<TerminalPixelSize | undefined>;
|
|
72
70
|
export declare function renderRedactedTerminalFrame(rawAnsi: string, cols?: number, rows?: number, terminalPixelSize?: TerminalPixelSize): Promise<TerminalReplayFrame>;
|
|
73
71
|
export declare function renderRedactedTerminalText(rawAnsi: string, cols?: number, rows?: number): Promise<string>;
|
|
74
72
|
export declare function createTerminalSnapshot(frameInput: TerminalReplayFrame | string, options?: {
|
package/dist/src/sdk.js
CHANGED
|
@@ -109,7 +109,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
109
109
|
`)}),D.__defineSetter__("stack",function(J){return[J].concat(D.stack).join(`
|
|
110
110
|
|
|
111
111
|
`)}),D}});var td=A((IE$,ad)=>{var d9=s("constants"),Fv0=process.cwd,OW=null,Uv0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!OW)OW=Fv0.call(process);return OW};try{process.cwd()}catch($){}if(typeof process.chdir==="function"){if(VW=process.chdir,process.chdir=function($){OW=null,VW.call(process,$)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,VW)}var VW;ad.exports=Gv0;function Gv0($){if(d9.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))D($);if(!$.lutimes)J($);if($.chown=Y($.chown),$.fchown=Y($.fchown),$.lchown=Y($.lchown),$.chmod=X($.chmod),$.fchmod=X($.fchmod),$.lchmod=X($.lchmod),$.chownSync=Z($.chownSync),$.fchownSync=Z($.fchownSync),$.lchownSync=Z($.lchownSync),$.chmodSync=Q($.chmodSync),$.fchmodSync=Q($.fchmodSync),$.lchmodSync=Q($.lchmodSync),$.stat=F($.stat),$.fstat=F($.fstat),$.lstat=F($.lstat),$.statSync=U($.statSync),$.fstatSync=U($.fstatSync),$.lstatSync=U($.lstatSync),$.chmod&&!$.lchmod)$.lchmod=function(q,W,z){if(z)process.nextTick(z)},$.lchmodSync=function(){};if($.chown&&!$.lchown)$.lchown=function(q,W,z,H){if(H)process.nextTick(H)},$.lchownSync=function(){};if(Uv0==="win32")$.rename=typeof $.rename!=="function"?$.rename:function(q){function W(z,H,O){var V=Date.now(),K=0;q(z,H,function L(E){if(E&&(E.code==="EACCES"||E.code==="EPERM"||E.code==="EBUSY")&&Date.now()-V<60000){if(setTimeout(function(){$.stat(H,function(N,M){if(N&&N.code==="ENOENT")q(z,H,L);else O(E)})},K),K<100)K+=10;return}if(O)O(E)})}if(Object.setPrototypeOf)Object.setPrototypeOf(W,q);return W}($.rename);$.read=typeof $.read!=="function"?$.read:function(q){function W(z,H,O,V,K,L){var E;if(L&&typeof L==="function"){var N=0;E=function(M,w,R){if(M&&M.code==="EAGAIN"&&N<10)return N++,q.call($,z,H,O,V,K,E);L.apply(this,arguments)}}return q.call($,z,H,O,V,K,E)}if(Object.setPrototypeOf)Object.setPrototypeOf(W,q);return W}($.read),$.readSync=typeof $.readSync!=="function"?$.readSync:function(q){return function(W,z,H,O,V){var K=0;while(!0)try{return q.call($,W,z,H,O,V)}catch(L){if(L.code==="EAGAIN"&&K<10){K++;continue}throw L}}}($.readSync);function D(q){q.lchmod=function(W,z,H){q.open(W,d9.O_WRONLY|d9.O_SYMLINK,z,function(O,V){if(O){if(H)H(O);return}q.fchmod(V,z,function(K){q.close(V,function(L){if(H)H(K||L)})})})},q.lchmodSync=function(W,z){var H=q.openSync(W,d9.O_WRONLY|d9.O_SYMLINK,z),O=!0,V;try{V=q.fchmodSync(H,z),O=!1}finally{if(O)try{q.closeSync(H)}catch(K){}else q.closeSync(H)}return V}}function J(q){if(d9.hasOwnProperty("O_SYMLINK")&&q.futimes)q.lutimes=function(W,z,H,O){q.open(W,d9.O_SYMLINK,function(V,K){if(V){if(O)O(V);return}q.futimes(K,z,H,function(L){q.close(K,function(E){if(O)O(L||E)})})})},q.lutimesSync=function(W,z,H){var O=q.openSync(W,d9.O_SYMLINK),V,K=!0;try{V=q.futimesSync(O,z,H),K=!1}finally{if(K)try{q.closeSync(O)}catch(L){}else q.closeSync(O)}return V};else if(q.futimes)q.lutimes=function(W,z,H,O){if(O)process.nextTick(O)},q.lutimesSync=function(){}}function X(q){if(!q)return q;return function(W,z,H){return q.call($,W,z,function(O){if(G(O))O=null;if(H)H.apply(this,arguments)})}}function Q(q){if(!q)return q;return function(W,z){try{return q.call($,W,z)}catch(H){if(!G(H))throw H}}}function Y(q){if(!q)return q;return function(W,z,H,O){return q.call($,W,z,H,function(V){if(G(V))V=null;if(O)O.apply(this,arguments)})}}function Z(q){if(!q)return q;return function(W,z,H){try{return q.call($,W,z,H)}catch(O){if(!G(O))throw O}}}function F(q){if(!q)return q;return function(W,z,H){if(typeof z==="function")H=z,z=null;function O(V,K){if(K){if(K.uid<0)K.uid+=4294967296;if(K.gid<0)K.gid+=4294967296}if(H)H.apply(this,arguments)}return z?q.call($,W,z,O):q.call($,W,O)}}function U(q){if(!q)return q;return function(W,z){var H=z?q.call($,W,z):q.call($,W);if(H){if(H.uid<0)H.uid+=4294967296;if(H.gid<0)H.gid+=4294967296}return H}}function G(q){if(!q)return!0;if(q.code==="ENOSYS")return!0;var W=!process.getuid||process.getuid()!==0;if(W){if(q.code==="EINVAL"||q.code==="EPERM")return!0}return!1}}});var $c=A((jE$,ed)=>{var sd=s("stream").Stream;ed.exports=qv0;function qv0($){return{ReadStream:D,WriteStream:J};function D(X,Q){if(!(this instanceof D))return new D(X,Q);sd.call(this);var Y=this;this.path=X,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Q=Q||{};var Z=Object.keys(Q);for(var F=0,U=Z.length;F<U;F++){var G=Z[F];this[G]=Q[G]}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}$.open(this.path,this.flags,this.mode,function(q,W){if(q){Y.emit("error",q),Y.readable=!1;return}Y.fd=W,Y.emit("open",W),Y._read()})}function J(X,Q){if(!(this instanceof J))return new J(X,Q);sd.call(this),this.path=X,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var Y=Object.keys(Q);for(var Z=0,F=Y.length;Z<F;Z++){var U=Y[Z];this[U]=Q[U]}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=$.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var Jc=A((TE$,Dc)=>{Dc.exports=zv0;var Wv0=Object.getPrototypeOf||function($){return $.__proto__};function zv0($){if($===null||typeof $!=="object")return $;if($ instanceof Object)var D={__proto__:Wv0($)};else var D=Object.create(null);return Object.getOwnPropertyNames($).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor($,J))}),D}});var y1=A((CE$,uw)=>{var T1=s("fs"),Hv0=td(),Ov0=$c(),Vv0=Jc(),KW=s("util"),WD,MW;if(typeof Symbol==="function"&&typeof Symbol.for==="function")WD=Symbol.for("graceful-fs.queue"),MW=Symbol.for("graceful-fs.previous");else WD="___graceful-fs.queue",MW="___graceful-fs.previous";function Kv0(){}function Qc($,D){Object.defineProperty($,WD,{get:function(){return D}})}var EJ=Kv0;if(KW.debuglog)EJ=KW.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))EJ=function(){var $=KW.format.apply(KW,arguments);$="GFS4: "+$.split(/\n/).join(`
|
|
112
|
-
GFS4: `),console.error($)};if(!T1[WD]){if(vw=global[WD]||[],Qc(T1,vw),T1.close=function($){function D(J,X){return $.call(T1,J,function(Q){if(!Q)Xc();if(typeof X==="function")X.apply(this,arguments)})}return Object.defineProperty(D,MW,{value:$}),D}(T1.close),T1.closeSync=function($){function D(J){$.apply(T1,arguments),Xc()}return Object.defineProperty(D,MW,{value:$}),D}(T1.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){EJ(T1[WD]),s("assert").equal(T1[WD].length,0)})}var vw;if(!global[WD])Qc(global,T1[WD]);uw.exports=_w(Vv0(T1));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!T1.__patched)uw.exports=_w(T1),T1.__patched=!0;function _w($){Hv0($),$.gracefulify=_w,$.createReadStream=w,$.createWriteStream=R;var D=$.readFile;$.readFile=J;function J(I,_,x){if(typeof _==="function")x=_,_=null;return c(I,_,x);function c(d,D0,b,j){return D(d,D0,function(T){if(T&&(T.code==="EMFILE"||T.code==="ENFILE"))xX([c,[d,D0,b],T,j||Date.now(),Date.now()]);else if(typeof b==="function")b.apply(this,arguments)})}}var X=$.writeFile;$.writeFile=Q;function Q(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,b,j,T,u){return X(D0,b,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))xX([d,[D0,b,j,T],m,u||Date.now(),Date.now()]);else if(typeof T==="function")T.apply(this,arguments)})}}var Y=$.appendFile;if(Y)$.appendFile=Z;function Z(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,b,j,T,u){return Y(D0,b,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))xX([d,[D0,b,j,T],m,u||Date.now(),Date.now()]);else if(typeof T==="function")T.apply(this,arguments)})}}var F=$.copyFile;if(F)$.copyFile=U;function U(I,_,x,c){if(typeof x==="function")c=x,x=0;return d(I,_,x,c);function d(D0,b,j,T,u){return F(D0,b,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))xX([d,[D0,b,j,T],m,u||Date.now(),Date.now()]);else if(typeof T==="function")T.apply(this,arguments)})}}var G=$.readdir;$.readdir=W;var q=/^v[0-5]\./;function W(I,_,x){if(typeof _==="function")x=_,_=null;var c=q.test(process.version)?function(b,j,T,u){return G(b,d(b,j,T,u))}:function(b,j,T,u){return G(b,j,d(b,j,T,u))};return c(I,_,x);function d(D0,b,j,T){return function(u,m){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))xX([c,[D0,b,j],u,T||Date.now(),Date.now()]);else{if(m&&m.sort)m.sort();if(typeof j==="function")j.call(this,u,m)}}}}if(process.version.substr(0,4)==="v0.8"){var z=Ov0($);L=z.ReadStream,N=z.WriteStream}var H=$.ReadStream;if(H)L.prototype=Object.create(H.prototype),L.prototype.open=E;var O=$.WriteStream;if(O)N.prototype=Object.create(O.prototype),N.prototype.open=M;Object.defineProperty($,"ReadStream",{get:function(){return L},set:function(I){L=I},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return N},set:function(I){N=I},enumerable:!0,configurable:!0});var V=L;Object.defineProperty($,"FileReadStream",{get:function(){return V},set:function(I){V=I},enumerable:!0,configurable:!0});var K=N;Object.defineProperty($,"FileWriteStream",{get:function(){return K},set:function(I){K=I},enumerable:!0,configurable:!0});function L(I,_){if(this instanceof L)return H.apply(this,arguments),this;else return L.apply(Object.create(L.prototype),arguments)}function E(){var I=this;v(I.path,I.flags,I.mode,function(_,x){if(_){if(I.autoClose)I.destroy();I.emit("error",_)}else I.fd=x,I.emit("open",x),I.read()})}function N(I,_){if(this instanceof N)return O.apply(this,arguments),this;else return N.apply(Object.create(N.prototype),arguments)}function M(){var I=this;v(I.path,I.flags,I.mode,function(_,x){if(_)I.destroy(),I.emit("error",_);else I.fd=x,I.emit("open",x)})}function w(I,_){return new $.ReadStream(I,_)}function R(I,_){return new $.WriteStream(I,_)}var S=$.open;$.open=v;function v(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,b,j,T,u){return S(D0,b,j,function(m,i){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))xX([d,[D0,b,j,T],m,u||Date.now(),Date.now()]);else if(typeof T==="function")T.apply(this,arguments)})}}return $}function xX($){EJ("ENQUEUE",$[0].name,$[1]),T1[WD].push($),kw()}var NW;function Xc(){var $=Date.now();for(var D=0;D<T1[WD].length;++D)if(T1[WD][D].length>2)T1[WD][D][3]=$,T1[WD][D][4]=$;kw()}function kw(){if(clearTimeout(NW),NW=void 0,T1[WD].length===0)return;var $=T1[WD].shift(),D=$[0],J=$[1],X=$[2],Q=$[3],Y=$[4];if(Q===void 0)EJ("RETRY",D.name,J),D.apply(null,J);else if(Date.now()-Q>=60000){EJ("TIMEOUT",D.name,J);var Z=J.pop();if(typeof Z==="function")Z.call(null,X)}else{var F=Date.now()-Y,U=Math.max(Y-Q,1),G=Math.min(U*1.2,100);if(F>=G)EJ("RETRY",D.name,J),D.apply(null,J.concat([Q]));else T1[WD].push($)}if(NW===void 0)NW=setTimeout(kw,0)}});var Zc=A((PE$,Yc)=>{function n6($,D){if(typeof D==="boolean")D={forever:D};if(this._originalTimeouts=JSON.parse(JSON.stringify($)),this._timeouts=$,this._options=D||{},this._maxRetryTime=D&&D.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)}Yc.exports=n6;n6.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};n6.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};n6.prototype.retry=function($){if(this._timeout)clearTimeout(this._timeout);if(!$)return!1;var D=new Date().getTime();if($&&D-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push($);var J=this._timeouts.shift();if(J===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),J=this._timeouts.shift();else return!1;var X=this,Q=setTimeout(function(){if(X._attempts++,X._operationTimeoutCb){if(X._timeout=setTimeout(function(){X._operationTimeoutCb(X._attempts)},X._operationTimeout),X._options.unref)X._timeout.unref()}X._fn(X._attempts)},J);if(this._options.unref)Q.unref();return!0};n6.prototype.attempt=function($,D){if(this._fn=$,D){if(D.timeout)this._operationTimeout=D.timeout;if(D.cb)this._operationTimeoutCb=D.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};n6.prototype.try=function($){console.log("Using RetryOperation.try() is deprecated"),this.attempt($)};n6.prototype.start=function($){console.log("Using RetryOperation.start() is deprecated"),this.attempt($)};n6.prototype.start=n6.prototype.try;n6.prototype.errors=function(){return this._errors};n6.prototype.attempts=function(){return this._attempts};n6.prototype.mainError=function(){if(this._errors.length===0)return null;var $={},D=null,J=0;for(var X=0;X<this._errors.length;X++){var Q=this._errors[X],Y=Q.message,Z=($[Y]||0)+1;if($[Y]=Z,Z>=J)D=Q,J=Z}return D}});var Uc=A((Mv0)=>{var Nv0=Zc();Mv0.operation=function($){var D=Mv0.timeouts($);return new Nv0(D,{forever:$&&$.forever,unref:$&&$.unref,maxRetryTime:$&&$.maxRetryTime})};Mv0.timeouts=function($){if($ instanceof Array)return[].concat($);var D={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in $)D[J]=$[J];if(D.minTimeout>D.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var X=[];for(var Q=0;Q<D.retries;Q++)X.push(this.createTimeout(Q,D));if($&&$.forever&&!X.length)X.push(this.createTimeout(Q,D));return X.sort(function(Y,Z){return Y-Z}),X};Mv0.createTimeout=function($,D){var J=D.randomize?Math.random()+1:1,X=Math.round(J*D.minTimeout*Math.pow(D.factor,$));return X=Math.min(X,D.maxTimeout),X};Mv0.wrap=function($,D,J){if(D instanceof Array)J=D,D=null;if(!J){J=[];for(var X in $)if(typeof $[X]==="function")J.push(X)}for(var Q=0;Q<J.length;Q++){var Y=J[Q],Z=$[Y];$[Y]=function(U){var G=Mv0.operation(D),q=Array.prototype.slice.call(arguments,1),W=q.pop();q.push(function(z){if(G.retry(z))return;if(z)arguments[0]=G.mainError();W.apply(this,arguments)}),G.attempt(function(){U.apply($,q)})}.bind($,Z),$[Y].options=D}}});var Gc=A((xE$,LW)=>{LW.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")LW.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")LW.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var EW=A((vE$,_X)=>{var B1=global.process,RJ=function($){return $&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function"};if(!RJ(B1))_X.exports=function(){return function(){}};else{if(yw=s("assert"),AJ=Gc(),fw=/^win/i.test(B1.platform),vX=s("events"),typeof vX!=="function")vX=vX.EventEmitter;if(B1.__signal_exit_emitter__)a1=B1.__signal_exit_emitter__;else a1=B1.__signal_exit_emitter__=new vX,a1.count=0,a1.emitted={};if(!a1.infinite)a1.setMaxListeners(1/0),a1.infinite=!0;_X.exports=function($,D){if(!RJ(global.process))return function(){};if(yw.equal(typeof $,"function","a callback must be provided for exit handler"),IJ===!1)wW();var J="exit";if(D&&D.alwaysLast)J="afterexit";var X=function(){if(a1.removeListener(J,$),a1.listeners("exit").length===0&&a1.listeners("afterexit").length===0)zF()};return a1.on(J,$),X},zF=function(){if(!IJ||!RJ(global.process))return;IJ=!1,AJ.forEach(function(D){try{B1.removeListener(D,HF[D])}catch(J){}}),B1.emit=OF,B1.reallyExit=BW,a1.count-=1},_X.exports.unload=zF,c9=function(D,J,X){if(a1.emitted[D])return;a1.emitted[D]=!0,a1.emit(D,J,X)},HF={},AJ.forEach(function($){HF[$]=function(){if(!RJ(global.process))return;var J=B1.listeners($);if(J.length===a1.count){if(zF(),c9("exit",null,$),c9("afterexit",null,$),fw&&$==="SIGHUP")$="SIGINT";B1.kill(B1.pid,$)}}}),_X.exports.signals=function(){return AJ},IJ=!1,wW=function(){if(IJ||!RJ(global.process))return;IJ=!0,a1.count+=1,AJ=AJ.filter(function(D){try{return B1.on(D,HF[D]),!0}catch(J){return!1}}),B1.emit=bw,B1.reallyExit=hw},_X.exports.load=wW,BW=B1.reallyExit,hw=function(D){if(!RJ(global.process))return;B1.exitCode=D||0,c9("exit",B1.exitCode,null),c9("afterexit",B1.exitCode,null),BW.call(B1,B1.exitCode)},OF=B1.emit,bw=function(D,J){if(D==="exit"&&RJ(global.process)){if(J!==void 0)B1.exitCode=J;var X=OF.apply(this,arguments);return c9("exit",B1.exitCode,null),c9("afterexit",B1.exitCode,null),X}else return OF.apply(this,arguments)}}var yw,AJ,fw,vX,a1,zF,c9,HF,IJ,wW,BW,hw,OF,bw});var Wc=A((Av0,gw)=>{var qc=Symbol();function Ev0($,D,J){let X=D[qc];if(X)return D.stat($,(Y,Z)=>{if(Y)return J(Y);J(null,Z.mtime,X)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);D.utimes($,Q,Q,(Y)=>{if(Y)return J(Y);D.stat($,(Z,F)=>{if(Z)return J(Z);let U=F.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(D,qc,{value:U}),J(null,F.mtime,U)})})}function Rv0($){let D=Date.now();if($==="s")D=Math.ceil(D/1000)*1000;return new Date(D)}Av0.probe=Ev0;Av0.getMtime=Rv0});var Kc=A((_v0,KF)=>{var Tv0=s("path"),cw=y1(),Cv0=Uc(),Pv0=EW(),zc=Wc(),o8={};function VF($,D){return D.lockfilePath||`${$}.lock`}function lw($,D,J){if(!D.realpath)return J(null,Tv0.resolve($));D.fs.realpath($,J)}function dw($,D,J){let X=VF($,D);D.fs.mkdir(X,(Q)=>{if(!Q)return zc.probe(X,D.fs,(Y,Z,F)=>{if(Y)return D.fs.rmdir(X,()=>{}),J(Y);J(null,Z,F)});if(Q.code!=="EEXIST")return J(Q);if(D.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));D.fs.stat(X,(Y,Z)=>{if(Y){if(Y.code==="ENOENT")return dw($,{...D,stale:0},J);return J(Y)}if(!Hc(Z,D))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));Oc($,D,(F)=>{if(F)return J(F);dw($,{...D,stale:0},J)})})})}function Hc($,D){return $.mtime.getTime()<Date.now()-D.stale}function Oc($,D,J){D.fs.rmdir(VF($,D),(X)=>{if(X&&X.code!=="ENOENT")return J(X);J()})}function RW($,D){let J=o8[$];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||D.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,D.fs.stat(J.lockfilePath,(X,Q)=>{let Y=J.lastUpdate+D.stale<Date.now();if(X){if(X.code==="ENOENT"||Y)return mw($,J,Object.assign(X,{code:"ECOMPROMISED"}));return J.updateDelay=1000,RW($,D)}if(J.mtime.getTime()!==Q.mtime.getTime())return mw($,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let F=zc.getMtime(J.mtimePrecision);D.fs.utimes(J.lockfilePath,F,F,(U)=>{let G=J.lastUpdate+D.stale<Date.now();if(J.released)return;if(U){if(U.code==="ENOENT"||G)return mw($,J,Object.assign(U,{code:"ECOMPROMISED"}));return J.updateDelay=1000,RW($,D)}J.mtime=F,J.lastUpdate=Date.now(),J.updateDelay=null,RW($,D)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function mw($,D,J){if(D.released=!0,D.updateTimeout)clearTimeout(D.updateTimeout);if(o8[$]===D)delete o8[$];D.options.onCompromised(J)}function Sv0($,D,J){D={stale:1e4,update:null,realpath:!0,retries:0,fs:cw,onCompromised:(X)=>{throw X},...D},D.retries=D.retries||0,D.retries=typeof D.retries==="number"?{retries:D.retries}:D.retries,D.stale=Math.max(D.stale||0,2000),D.update=D.update==null?D.stale/2:D.update||0,D.update=Math.max(Math.min(D.update,D.stale/2),1000),lw($,D,(X,Q)=>{if(X)return J(X);let Y=Cv0.operation(D.retries);Y.attempt(()=>{dw(Q,D,(Z,F,U)=>{if(Y.retry(Z))return;if(Z)return J(Y.mainError());let G=o8[Q]={lockfilePath:VF(Q,D),mtime:F,mtimePrecision:U,options:D,lastUpdate:Date.now()};RW(Q,D),J(null,(q)=>{if(G.released)return q&&q(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));Vc(Q,{...D,realpath:!1},q)})})})})}function Vc($,D,J){D={fs:cw,realpath:!0,...D},lw($,D,(X,Q)=>{if(X)return J(X);let Y=o8[Q];if(!Y)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Y.updateTimeout&&clearTimeout(Y.updateTimeout),Y.released=!0,delete o8[Q],Oc(Q,D,J)})}function xv0($,D,J){D={stale:1e4,realpath:!0,fs:cw,...D},D.stale=Math.max(D.stale||0,2000),lw($,D,(X,Q)=>{if(X)return J(X);D.fs.stat(VF(Q,D),(Y,Z)=>{if(Y)return Y.code==="ENOENT"?J(null,!1):J(Y);return J(null,!Hc(Z,D))})})}function vv0(){return o8}Pv0(()=>{for(let $ in o8){let D=o8[$].options;try{D.fs.rmdirSync(VF($,D))}catch(J){}}});_v0.lock=Sv0;_v0.unlock=Vc;_v0.check=xv0;_v0.getLocks=vv0});var Mc=A((_E$,Nc)=>{var hv0=y1();function bv0($){let D=["mkdir","realpath","stat","rmdir","utimes"],J={...$};return D.forEach((X)=>{J[X]=(...Q)=>{let Y=Q.pop(),Z;try{Z=$[`${X}Sync`](...Q)}catch(F){return Y(F)}Y(null,Z)}}),J}function gv0($){return(...D)=>new Promise((J,X)=>{D.push((Q,Y)=>{if(Q)X(Q);else J(Y)}),$(...D)})}function mv0($){return(...D)=>{let J,X;if(D.push((Q,Y)=>{J=Q,X=Y}),$(...D),J)throw J;return X}}function dv0($){if($={...$},$.fs=bv0($.fs||hv0),typeof $.retries==="number"&&$.retries>0||$.retries&&typeof $.retries.retries==="number"&&$.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return $}Nc.exports={toPromise:gv0,toSync:mv0,toSyncOptions:dv0}});var wc=A((kE$,l9)=>{var kX=Kc(),{toPromise:AW,toSync:IW,toSyncOptions:nw}=Mc();async function Lc($,D){let J=await AW(kX.lock)($,D);return AW(J)}function cv0($,D){let J=IW(kX.lock)($,nw(D));return IW(J)}function lv0($,D){return AW(kX.unlock)($,D)}function nv0($,D){return IW(kX.unlock)($,nw(D))}function iv0($,D){return AW(kX.check)($,D)}function pv0($,D){return IW(kX.check)($,nw(D))}l9.exports=Lc;l9.exports.lock=Lc;l9.exports.unlock=lv0;l9.exports.lockSync=cv0;l9.exports.unlockSync=nv0;l9.exports.check=iv0;l9.exports.checkSync=pv0});var Tc=A((Ic)=>{Object.defineProperty(Ic,"__esModule",{value:!0});Ic.canStoreURLs=Ic.FileUrlStorage=void 0;var Bc=s("fs"),rv0=av0(od()),Ec=ov0(wc());function Ac($){if(typeof WeakMap!="function")return null;var D=new WeakMap,J=new WeakMap;return(Ac=function(X){return X?J:D})($)}function ov0($,D){if(!D&&$&&$.__esModule)return $;if($===null||typeof $!="object"&&typeof $!="function")return{default:$};var J=Ac(D);if(J&&J.has($))return J.get($);var X={__proto__:null},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in $)if(Y!=="default"&&{}.hasOwnProperty.call($,Y)){var Z=Q?Object.getOwnPropertyDescriptor($,Y):null;Z&&(Z.get||Z.set)?Object.defineProperty(X,Y,Z):X[Y]=$[Y]}return X.default=$,J&&J.set($,X),X}function av0($){return $&&$.__esModule?$:{default:$}}function NF($){return NF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},NF($)}function tv0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function Rc($,D){for(var J=0;J<D.length;J++){var X=D[J];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty($,ev0(X.key),X)}}function sv0($,D,J){if(D)Rc($.prototype,D);if(J)Rc($,J);return Object.defineProperty($,"prototype",{writable:!1}),$}function ev0($){var D=$_0($,"string");return NF(D)=="symbol"?D:D+""}function $_0($,D){if(NF($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var X=J.call($,D||"default");if(NF(X)!="object")return X;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var uE$=Ic.canStoreURLs=!0,yE$=Ic.FileUrlStorage=function(){function $(D){tv0(this,$),this.path=D}return sv0($,[{key:"findAllUploads",value:function(){var J=this;return new Promise(function(X,Q){J._getItems("tus::",function(Y,Z){if(Y)Q(Y);else X(Z)})})}},{key:"findUploadsByFingerprint",value:function(J){var X=this;return new Promise(function(Q,Y){X._getItems("tus::".concat(J),function(Z,F){if(Z)Y(Z);else Q(F)})})}},{key:"removeUpload",value:function(J){var X=this;return new Promise(function(Q,Y){X._removeItem(J,function(Z){if(Z)Y(Z);else Q()})})}},{key:"addUpload",value:function(J,X){var Q=this,Y=Math.round(Math.random()*1000000000000),Z="tus::".concat(J,"::").concat(Y);return new Promise(function(F,U){Q._setItem(Z,X,function(G){if(G)U(G);else F(Z)})})}},{key:"_setItem",value:function(J,X,Q){var Y=this;Ec.lock(this.path,this._lockfileOptions()).then(function(Z){Q=Y._releaseAndCb(Z,Q),Y._getData(function(F,U){if(F){Q(F);return}U[J]=X,Y._writeData(U,function(G){return Q(G)})})}).catch(Q)}},{key:"_getItems",value:function(J,X){this._getData(function(Q,Y){if(Q){X(Q);return}var Z=Object.keys(Y).filter(function(F){return F.startsWith(J)}).map(function(F){var U=Y[F];return U.urlStorageKey=F,U});X(null,Z)})}},{key:"_removeItem",value:function(J,X){var Q=this;Ec.lock(this.path,this._lockfileOptions()).then(function(Y){X=Q._releaseAndCb(Y,X),Q._getData(function(Z,F){if(Z){X(Z);return}delete F[J],Q._writeData(F,function(U){return X(U)})})}).catch(X)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(J,X){return function(Q){if(Q){J().then(function(){return X(Q)}).catch(function(Y){return X((0,rv0.default)([Q,Y]))});return}J().then(X).catch(X)}}},{key:"_writeData",value:function(J,X){var Q={encoding:"utf8",mode:432,flag:"w"};(0,Bc.writeFile)(this.path,JSON.stringify(J),Q,function(Y){return X(Y)})}},{key:"_getData",value:function(J){(0,Bc.readFile)(this.path,"utf8",function(X,Q){if(X){if(X.code==="ENOENT")J(null,{});else J(X);return}try{Q=!Q.trim().length?{}:JSON.parse(Q)}catch(Y){J(Y);return}J(null,Q)})}}])}()});var TW=A((n9)=>{Object.defineProperty(n9,"__esModule",{value:!0});Object.defineProperty(n9,"DefaultHttpStack",{enumerable:!0,get:function(){return xc.default}});Object.defineProperty(n9,"DetailedError",{enumerable:!0,get:function(){return J_0.default}});Object.defineProperty(n9,"FileUrlStorage",{enumerable:!0,get:function(){return vc.FileUrlStorage}});Object.defineProperty(n9,"StreamSource",{enumerable:!0,get:function(){return F_0.default}});n9.Upload=void 0;Object.defineProperty(n9,"canStoreURLs",{enumerable:!0,get:function(){return vc.canStoreURLs}});n9.defaultOptions=void 0;Object.defineProperty(n9,"enableDebugLog",{enumerable:!0,get:function(){return X_0.enableDebugLog}});n9.isSupported=void 0;var J_0=jJ(nL()),X_0=iL(),Q_0=jJ(wg()),iw=jJ(eg()),Y_0=jJ(Lm()),Z_0=jJ(Am()),xc=jJ(gm()),F_0=jJ(Xw()),vc=Tc();function jJ($){return $&&$.__esModule?$:{default:$}}function yX($){return yX=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},yX($)}function U_0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function Cc($,D){for(var J=0;J<D.length;J++){var X=D[J];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty($,kc(X.key),X)}}function G_0($,D,J){if(D)Cc($.prototype,D);if(J)Cc($,J);return Object.defineProperty($,"prototype",{writable:!1}),$}function q_0($,D,J){return D=jW(D),W_0($,_c()?Reflect.construct(D,J||[],jW($).constructor):D.apply($,J))}function W_0($,D){if(D&&(yX(D)==="object"||typeof D==="function"))return D;else if(D!==void 0)throw TypeError("Derived constructors may only return object or undefined");return z_0($)}function z_0($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function _c(){try{var $=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(D){}return(_c=function(){return!!$})()}function jW($){return jW=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)},jW($)}function H_0($,D){if(typeof D!=="function"&&D!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(D&&D.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Object.defineProperty($,"prototype",{writable:!1}),D)pw($,D)}function pw($,D){return pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,Q){return X.__proto__=Q,X},pw($,D)}function Pc($,D){var J=Object.keys($);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols($);D&&(X=X.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),J.push.apply(J,X)}return J}function uX($){for(var D=1;D<arguments.length;D++){var J=arguments[D]!=null?arguments[D]:{};D%2?Pc(Object(J),!0).forEach(function(X){O_0($,X,J[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(J)):Pc(Object(J)).forEach(function(X){Object.defineProperty($,X,Object.getOwnPropertyDescriptor(J,X))})}return $}function O_0($,D,J){if(D=kc(D),D in $)Object.defineProperty($,D,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[D]=J;return $}function kc($){var D=V_0($,"string");return yX(D)=="symbol"?D:D+""}function V_0($,D){if(yX($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var X=J.call($,D||"default");if(yX(X)!="object")return X;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var Sc=n9.defaultOptions=uX(uX({},iw.default.defaultOptions),{},{httpStack:new xc.default,fileReader:new Y_0.default,urlStorage:new Q_0.default,fingerprint:Z_0.default}),hE$=n9.Upload=function($){function D(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return U_0(this,D),X=uX(uX({},Sc),X),q_0(this,D,[J,X])}return H_0(D,$),G_0(D,null,[{key:"terminate",value:function(X){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Q=uX(uX({},Sc),Q),iw.default.terminate(X,Q)}}])}(iw.default),bE$=n9.isSupported=!0});var zD;var a8=a(()=>{zD={name:"@capgo/cli",type:"module",version:"8.32.4",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: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","test:credentials":"bun test/test-credentials.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: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:preview-qr":"bun test/test-preview-qr.mjs","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: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:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && 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-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: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: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:native-dependencies && 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:preview-qr && 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: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-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && 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-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:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && 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: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: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","test:android-reporting-api":"bun test/test-android-reporting-api.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: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"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","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",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},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","@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.1",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",typescript:"6.0.3",ws:"^8.21.1"}}});import{platform as N_0,release as M_0}from"node:os";import{arch as L_0,version as w_0}from"node:process";function rw(){return hc}function ow(){let $={cli_version:zD.version,node_version:w_0,os_platform:N_0(),os_arch:L_0,os_release:M_0(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"undefined",is_ci:MF.isCI,is_tty:Boolean(process.stdout.isTTY),invocation_source:hc};if(MF.name)$.ci_provider=MF.name;return $}var MF,hc="cli";var aw=a(()=>{a8();MF=j$(hL(),1)});import{AsyncLocalStorage as B_0}from"node:async_hooks";function fX($,D){return gc.run($,()=>Promise.resolve(D()))}function E_0(){return gc.getStore()}function mc(){return R_0}function cc($){dc=$}function bc($){try{dc?.($)}catch{}}function nc($,D){let J;try{J=new URL($).pathname}catch{J=$.split("?")[0]}let X="/functions/v1/",Q=J.indexOf(X);if(Q>=0){let G=J.slice(Q+X.length).replace(/^\/+|\/+$/g,"");return G?`${D} functions:${G}`:`${D} functions`}let Y="/rest/v1/",Z=J.indexOf(Y),F=Z>=0?J.slice(Z+Y.length):J.replace(/^\//,"");if(F.startsWith("rpc/"))return`rpc:${F.slice(4).split("/")[0]}`;let U=F.split("/")[0]||J;return`${D} ${U}`}function A_0($){let D=$?.headers;if(!D)return;let J=D.get;if(typeof J==="function")return J.call(D,"capgkey")??void 0;if(Array.isArray(D))return D.find(([X])=>X.toLowerCase()==="capgkey")?.[1];return D.capgkey}function ic(){return async(D,J)=>{let X=(J?.method??"GET").toUpperCase(),Q=typeof D==="string"?D:D instanceof URL?D.href:D.url,Y=E_0(),Z=A_0(J),F=Date.now();try{let U=await globalThis.fetch(D,J);return bc({url:Q,method:X,status:U.status,ok:U.ok,durationMs:Date.now()-F,source:Y,apikey:Z}),U}catch(U){throw bc({url:Q,method:X,status:0,ok:!1,durationMs:Date.now()-F,source:Y,apikey:Z,error:U}),U}}}var gc,R_0=!1,dc,lc=5000;var CW=a(()=>{gc=new B_0});function pc($,D){let X=["normal","bold","dim","italic","underline","strikethrough"].indexOf($),Q="\x1B[";return"\x1B["+X+"m"+D+"\x1B[0m"}var T6;var rc=a(()=>{T6=class T6{title=null;headers=[];rows=[];static narrowTheme={top:["╔","═","╤","╗"],row:["║"," ","│","║"],div:["╟","─","┼","╢"],bot:["╚","═","╧","╝"]};static wideTheme={top:["╔═","═","═╤═","═╗"],row:["║ "," "," │ "," ║"],div:["╟─","─","─┼─","─╢"],bot:["╚═","═","═╧═","═╝"]};static roundTheme={top:["╭─","─","─┬─","─╮"],row:["│ "," "," │ "," │"],div:["├─","─","─┼─","─┤"],bot:["╰─","─","─┴─","─╯"]};theme=T6.wideTheme;columnWidth(){let $=[this.headers,...this.rows].filter((J)=>J.length>0),D=$[0].map((J)=>this.cast(J).length);for(let J of $.slice(1))for(let X=0;X<D.length;X++){let Q=this.cast(J[X]).length;if(Q>D[X])D[X]=Q}return D}cast($){if(typeof $==="object")return"obj";if($!==void 0&&typeof $.toString==="function")return $.toString();else return""}renderTitle(){return"[ "+this.title+" ]"}renderLine($){let D=this.columnWidth();return $[0]+D.map((J)=>$[1].repeat(J)).join($[2])+$[3]}renderCell($,D,J=!1){let X=this.cast($),Q=J?pc("bold",X):X,Y=D-X.length,Z=this.theme.row[1];switch(typeof $){case"number":return Z.repeat(Y)+Q;case"string":return Q+Z.repeat(Y);case"boolean":case"object":return Z.repeat(Math.ceil(Y/2))+pc("italic",X)+Z.repeat(Math.floor(Y/2));default:return Z.repeat(Y)}}renderRow($,D=!1){let J=this.theme.row,X=this.columnWidth();return J[0]+$.map((Q,Y)=>this.renderCell(Q,X[Y],D)).join(J[2])+J[3]}toString(){let $=this.theme,D=this.headers.length>0,J=this.rows.length>0;return[this.title?this.renderTitle():"",D||J?this.renderLine($.top):"",D?this.renderRow(this.headers,!0):"",D&&J?this.renderLine($.div):"",...this.rows.map((X)=>this.renderRow(X)),D||J?this.renderLine($.bot):""].filter((X)=>X.length>0).join(`
|
|
112
|
+
GFS4: `),console.error($)};if(!T1[WD]){if(vw=global[WD]||[],Qc(T1,vw),T1.close=function($){function D(J,X){return $.call(T1,J,function(Q){if(!Q)Xc();if(typeof X==="function")X.apply(this,arguments)})}return Object.defineProperty(D,MW,{value:$}),D}(T1.close),T1.closeSync=function($){function D(J){$.apply(T1,arguments),Xc()}return Object.defineProperty(D,MW,{value:$}),D}(T1.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){EJ(T1[WD]),s("assert").equal(T1[WD].length,0)})}var vw;if(!global[WD])Qc(global,T1[WD]);uw.exports=_w(Vv0(T1));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!T1.__patched)uw.exports=_w(T1),T1.__patched=!0;function _w($){Hv0($),$.gracefulify=_w,$.createReadStream=w,$.createWriteStream=R;var D=$.readFile;$.readFile=J;function J(I,_,x){if(typeof _==="function")x=_,_=null;return c(I,_,x);function c(d,D0,b,j){return D(d,D0,function(T){if(T&&(T.code==="EMFILE"||T.code==="ENFILE"))xX([c,[d,D0,b],T,j||Date.now(),Date.now()]);else if(typeof b==="function")b.apply(this,arguments)})}}var X=$.writeFile;$.writeFile=Q;function Q(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,b,j,T,u){return X(D0,b,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))xX([d,[D0,b,j,T],m,u||Date.now(),Date.now()]);else if(typeof T==="function")T.apply(this,arguments)})}}var Y=$.appendFile;if(Y)$.appendFile=Z;function Z(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,b,j,T,u){return Y(D0,b,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))xX([d,[D0,b,j,T],m,u||Date.now(),Date.now()]);else if(typeof T==="function")T.apply(this,arguments)})}}var F=$.copyFile;if(F)$.copyFile=U;function U(I,_,x,c){if(typeof x==="function")c=x,x=0;return d(I,_,x,c);function d(D0,b,j,T,u){return F(D0,b,j,function(m){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))xX([d,[D0,b,j,T],m,u||Date.now(),Date.now()]);else if(typeof T==="function")T.apply(this,arguments)})}}var G=$.readdir;$.readdir=W;var q=/^v[0-5]\./;function W(I,_,x){if(typeof _==="function")x=_,_=null;var c=q.test(process.version)?function(b,j,T,u){return G(b,d(b,j,T,u))}:function(b,j,T,u){return G(b,j,d(b,j,T,u))};return c(I,_,x);function d(D0,b,j,T){return function(u,m){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))xX([c,[D0,b,j],u,T||Date.now(),Date.now()]);else{if(m&&m.sort)m.sort();if(typeof j==="function")j.call(this,u,m)}}}}if(process.version.substr(0,4)==="v0.8"){var z=Ov0($);L=z.ReadStream,N=z.WriteStream}var H=$.ReadStream;if(H)L.prototype=Object.create(H.prototype),L.prototype.open=E;var O=$.WriteStream;if(O)N.prototype=Object.create(O.prototype),N.prototype.open=M;Object.defineProperty($,"ReadStream",{get:function(){return L},set:function(I){L=I},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return N},set:function(I){N=I},enumerable:!0,configurable:!0});var V=L;Object.defineProperty($,"FileReadStream",{get:function(){return V},set:function(I){V=I},enumerable:!0,configurable:!0});var K=N;Object.defineProperty($,"FileWriteStream",{get:function(){return K},set:function(I){K=I},enumerable:!0,configurable:!0});function L(I,_){if(this instanceof L)return H.apply(this,arguments),this;else return L.apply(Object.create(L.prototype),arguments)}function E(){var I=this;v(I.path,I.flags,I.mode,function(_,x){if(_){if(I.autoClose)I.destroy();I.emit("error",_)}else I.fd=x,I.emit("open",x),I.read()})}function N(I,_){if(this instanceof N)return O.apply(this,arguments),this;else return N.apply(Object.create(N.prototype),arguments)}function M(){var I=this;v(I.path,I.flags,I.mode,function(_,x){if(_)I.destroy(),I.emit("error",_);else I.fd=x,I.emit("open",x)})}function w(I,_){return new $.ReadStream(I,_)}function R(I,_){return new $.WriteStream(I,_)}var S=$.open;$.open=v;function v(I,_,x,c){if(typeof x==="function")c=x,x=null;return d(I,_,x,c);function d(D0,b,j,T,u){return S(D0,b,j,function(m,i){if(m&&(m.code==="EMFILE"||m.code==="ENFILE"))xX([d,[D0,b,j,T],m,u||Date.now(),Date.now()]);else if(typeof T==="function")T.apply(this,arguments)})}}return $}function xX($){EJ("ENQUEUE",$[0].name,$[1]),T1[WD].push($),kw()}var NW;function Xc(){var $=Date.now();for(var D=0;D<T1[WD].length;++D)if(T1[WD][D].length>2)T1[WD][D][3]=$,T1[WD][D][4]=$;kw()}function kw(){if(clearTimeout(NW),NW=void 0,T1[WD].length===0)return;var $=T1[WD].shift(),D=$[0],J=$[1],X=$[2],Q=$[3],Y=$[4];if(Q===void 0)EJ("RETRY",D.name,J),D.apply(null,J);else if(Date.now()-Q>=60000){EJ("TIMEOUT",D.name,J);var Z=J.pop();if(typeof Z==="function")Z.call(null,X)}else{var F=Date.now()-Y,U=Math.max(Y-Q,1),G=Math.min(U*1.2,100);if(F>=G)EJ("RETRY",D.name,J),D.apply(null,J.concat([Q]));else T1[WD].push($)}if(NW===void 0)NW=setTimeout(kw,0)}});var Zc=A((PE$,Yc)=>{function n6($,D){if(typeof D==="boolean")D={forever:D};if(this._originalTimeouts=JSON.parse(JSON.stringify($)),this._timeouts=$,this._options=D||{},this._maxRetryTime=D&&D.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)}Yc.exports=n6;n6.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};n6.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};n6.prototype.retry=function($){if(this._timeout)clearTimeout(this._timeout);if(!$)return!1;var D=new Date().getTime();if($&&D-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push($);var J=this._timeouts.shift();if(J===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),J=this._timeouts.shift();else return!1;var X=this,Q=setTimeout(function(){if(X._attempts++,X._operationTimeoutCb){if(X._timeout=setTimeout(function(){X._operationTimeoutCb(X._attempts)},X._operationTimeout),X._options.unref)X._timeout.unref()}X._fn(X._attempts)},J);if(this._options.unref)Q.unref();return!0};n6.prototype.attempt=function($,D){if(this._fn=$,D){if(D.timeout)this._operationTimeout=D.timeout;if(D.cb)this._operationTimeoutCb=D.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};n6.prototype.try=function($){console.log("Using RetryOperation.try() is deprecated"),this.attempt($)};n6.prototype.start=function($){console.log("Using RetryOperation.start() is deprecated"),this.attempt($)};n6.prototype.start=n6.prototype.try;n6.prototype.errors=function(){return this._errors};n6.prototype.attempts=function(){return this._attempts};n6.prototype.mainError=function(){if(this._errors.length===0)return null;var $={},D=null,J=0;for(var X=0;X<this._errors.length;X++){var Q=this._errors[X],Y=Q.message,Z=($[Y]||0)+1;if($[Y]=Z,Z>=J)D=Q,J=Z}return D}});var Uc=A((Mv0)=>{var Nv0=Zc();Mv0.operation=function($){var D=Mv0.timeouts($);return new Nv0(D,{forever:$&&$.forever,unref:$&&$.unref,maxRetryTime:$&&$.maxRetryTime})};Mv0.timeouts=function($){if($ instanceof Array)return[].concat($);var D={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in $)D[J]=$[J];if(D.minTimeout>D.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var X=[];for(var Q=0;Q<D.retries;Q++)X.push(this.createTimeout(Q,D));if($&&$.forever&&!X.length)X.push(this.createTimeout(Q,D));return X.sort(function(Y,Z){return Y-Z}),X};Mv0.createTimeout=function($,D){var J=D.randomize?Math.random()+1:1,X=Math.round(J*D.minTimeout*Math.pow(D.factor,$));return X=Math.min(X,D.maxTimeout),X};Mv0.wrap=function($,D,J){if(D instanceof Array)J=D,D=null;if(!J){J=[];for(var X in $)if(typeof $[X]==="function")J.push(X)}for(var Q=0;Q<J.length;Q++){var Y=J[Q],Z=$[Y];$[Y]=function(U){var G=Mv0.operation(D),q=Array.prototype.slice.call(arguments,1),W=q.pop();q.push(function(z){if(G.retry(z))return;if(z)arguments[0]=G.mainError();W.apply(this,arguments)}),G.attempt(function(){U.apply($,q)})}.bind($,Z),$[Y].options=D}}});var Gc=A((xE$,LW)=>{LW.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")LW.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")LW.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var EW=A((vE$,_X)=>{var B1=global.process,RJ=function($){return $&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function"};if(!RJ(B1))_X.exports=function(){return function(){}};else{if(yw=s("assert"),AJ=Gc(),fw=/^win/i.test(B1.platform),vX=s("events"),typeof vX!=="function")vX=vX.EventEmitter;if(B1.__signal_exit_emitter__)a1=B1.__signal_exit_emitter__;else a1=B1.__signal_exit_emitter__=new vX,a1.count=0,a1.emitted={};if(!a1.infinite)a1.setMaxListeners(1/0),a1.infinite=!0;_X.exports=function($,D){if(!RJ(global.process))return function(){};if(yw.equal(typeof $,"function","a callback must be provided for exit handler"),IJ===!1)wW();var J="exit";if(D&&D.alwaysLast)J="afterexit";var X=function(){if(a1.removeListener(J,$),a1.listeners("exit").length===0&&a1.listeners("afterexit").length===0)zF()};return a1.on(J,$),X},zF=function(){if(!IJ||!RJ(global.process))return;IJ=!1,AJ.forEach(function(D){try{B1.removeListener(D,HF[D])}catch(J){}}),B1.emit=OF,B1.reallyExit=BW,a1.count-=1},_X.exports.unload=zF,c9=function(D,J,X){if(a1.emitted[D])return;a1.emitted[D]=!0,a1.emit(D,J,X)},HF={},AJ.forEach(function($){HF[$]=function(){if(!RJ(global.process))return;var J=B1.listeners($);if(J.length===a1.count){if(zF(),c9("exit",null,$),c9("afterexit",null,$),fw&&$==="SIGHUP")$="SIGINT";B1.kill(B1.pid,$)}}}),_X.exports.signals=function(){return AJ},IJ=!1,wW=function(){if(IJ||!RJ(global.process))return;IJ=!0,a1.count+=1,AJ=AJ.filter(function(D){try{return B1.on(D,HF[D]),!0}catch(J){return!1}}),B1.emit=bw,B1.reallyExit=hw},_X.exports.load=wW,BW=B1.reallyExit,hw=function(D){if(!RJ(global.process))return;B1.exitCode=D||0,c9("exit",B1.exitCode,null),c9("afterexit",B1.exitCode,null),BW.call(B1,B1.exitCode)},OF=B1.emit,bw=function(D,J){if(D==="exit"&&RJ(global.process)){if(J!==void 0)B1.exitCode=J;var X=OF.apply(this,arguments);return c9("exit",B1.exitCode,null),c9("afterexit",B1.exitCode,null),X}else return OF.apply(this,arguments)}}var yw,AJ,fw,vX,a1,zF,c9,HF,IJ,wW,BW,hw,OF,bw});var Wc=A((Av0,gw)=>{var qc=Symbol();function Ev0($,D,J){let X=D[qc];if(X)return D.stat($,(Y,Z)=>{if(Y)return J(Y);J(null,Z.mtime,X)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);D.utimes($,Q,Q,(Y)=>{if(Y)return J(Y);D.stat($,(Z,F)=>{if(Z)return J(Z);let U=F.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(D,qc,{value:U}),J(null,F.mtime,U)})})}function Rv0($){let D=Date.now();if($==="s")D=Math.ceil(D/1000)*1000;return new Date(D)}Av0.probe=Ev0;Av0.getMtime=Rv0});var Kc=A((_v0,KF)=>{var Tv0=s("path"),cw=y1(),Cv0=Uc(),Pv0=EW(),zc=Wc(),o8={};function VF($,D){return D.lockfilePath||`${$}.lock`}function lw($,D,J){if(!D.realpath)return J(null,Tv0.resolve($));D.fs.realpath($,J)}function dw($,D,J){let X=VF($,D);D.fs.mkdir(X,(Q)=>{if(!Q)return zc.probe(X,D.fs,(Y,Z,F)=>{if(Y)return D.fs.rmdir(X,()=>{}),J(Y);J(null,Z,F)});if(Q.code!=="EEXIST")return J(Q);if(D.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));D.fs.stat(X,(Y,Z)=>{if(Y){if(Y.code==="ENOENT")return dw($,{...D,stale:0},J);return J(Y)}if(!Hc(Z,D))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:$}));Oc($,D,(F)=>{if(F)return J(F);dw($,{...D,stale:0},J)})})})}function Hc($,D){return $.mtime.getTime()<Date.now()-D.stale}function Oc($,D,J){D.fs.rmdir(VF($,D),(X)=>{if(X&&X.code!=="ENOENT")return J(X);J()})}function RW($,D){let J=o8[$];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||D.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,D.fs.stat(J.lockfilePath,(X,Q)=>{let Y=J.lastUpdate+D.stale<Date.now();if(X){if(X.code==="ENOENT"||Y)return mw($,J,Object.assign(X,{code:"ECOMPROMISED"}));return J.updateDelay=1000,RW($,D)}if(J.mtime.getTime()!==Q.mtime.getTime())return mw($,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let F=zc.getMtime(J.mtimePrecision);D.fs.utimes(J.lockfilePath,F,F,(U)=>{let G=J.lastUpdate+D.stale<Date.now();if(J.released)return;if(U){if(U.code==="ENOENT"||G)return mw($,J,Object.assign(U,{code:"ECOMPROMISED"}));return J.updateDelay=1000,RW($,D)}J.mtime=F,J.lastUpdate=Date.now(),J.updateDelay=null,RW($,D)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function mw($,D,J){if(D.released=!0,D.updateTimeout)clearTimeout(D.updateTimeout);if(o8[$]===D)delete o8[$];D.options.onCompromised(J)}function Sv0($,D,J){D={stale:1e4,update:null,realpath:!0,retries:0,fs:cw,onCompromised:(X)=>{throw X},...D},D.retries=D.retries||0,D.retries=typeof D.retries==="number"?{retries:D.retries}:D.retries,D.stale=Math.max(D.stale||0,2000),D.update=D.update==null?D.stale/2:D.update||0,D.update=Math.max(Math.min(D.update,D.stale/2),1000),lw($,D,(X,Q)=>{if(X)return J(X);let Y=Cv0.operation(D.retries);Y.attempt(()=>{dw(Q,D,(Z,F,U)=>{if(Y.retry(Z))return;if(Z)return J(Y.mainError());let G=o8[Q]={lockfilePath:VF(Q,D),mtime:F,mtimePrecision:U,options:D,lastUpdate:Date.now()};RW(Q,D),J(null,(q)=>{if(G.released)return q&&q(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));Vc(Q,{...D,realpath:!1},q)})})})})}function Vc($,D,J){D={fs:cw,realpath:!0,...D},lw($,D,(X,Q)=>{if(X)return J(X);let Y=o8[Q];if(!Y)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Y.updateTimeout&&clearTimeout(Y.updateTimeout),Y.released=!0,delete o8[Q],Oc(Q,D,J)})}function xv0($,D,J){D={stale:1e4,realpath:!0,fs:cw,...D},D.stale=Math.max(D.stale||0,2000),lw($,D,(X,Q)=>{if(X)return J(X);D.fs.stat(VF(Q,D),(Y,Z)=>{if(Y)return Y.code==="ENOENT"?J(null,!1):J(Y);return J(null,!Hc(Z,D))})})}function vv0(){return o8}Pv0(()=>{for(let $ in o8){let D=o8[$].options;try{D.fs.rmdirSync(VF($,D))}catch(J){}}});_v0.lock=Sv0;_v0.unlock=Vc;_v0.check=xv0;_v0.getLocks=vv0});var Mc=A((_E$,Nc)=>{var hv0=y1();function bv0($){let D=["mkdir","realpath","stat","rmdir","utimes"],J={...$};return D.forEach((X)=>{J[X]=(...Q)=>{let Y=Q.pop(),Z;try{Z=$[`${X}Sync`](...Q)}catch(F){return Y(F)}Y(null,Z)}}),J}function gv0($){return(...D)=>new Promise((J,X)=>{D.push((Q,Y)=>{if(Q)X(Q);else J(Y)}),$(...D)})}function mv0($){return(...D)=>{let J,X;if(D.push((Q,Y)=>{J=Q,X=Y}),$(...D),J)throw J;return X}}function dv0($){if($={...$},$.fs=bv0($.fs||hv0),typeof $.retries==="number"&&$.retries>0||$.retries&&typeof $.retries.retries==="number"&&$.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return $}Nc.exports={toPromise:gv0,toSync:mv0,toSyncOptions:dv0}});var wc=A((kE$,l9)=>{var kX=Kc(),{toPromise:AW,toSync:IW,toSyncOptions:nw}=Mc();async function Lc($,D){let J=await AW(kX.lock)($,D);return AW(J)}function cv0($,D){let J=IW(kX.lock)($,nw(D));return IW(J)}function lv0($,D){return AW(kX.unlock)($,D)}function nv0($,D){return IW(kX.unlock)($,nw(D))}function iv0($,D){return AW(kX.check)($,D)}function pv0($,D){return IW(kX.check)($,nw(D))}l9.exports=Lc;l9.exports.lock=Lc;l9.exports.unlock=lv0;l9.exports.lockSync=cv0;l9.exports.unlockSync=nv0;l9.exports.check=iv0;l9.exports.checkSync=pv0});var Tc=A((Ic)=>{Object.defineProperty(Ic,"__esModule",{value:!0});Ic.canStoreURLs=Ic.FileUrlStorage=void 0;var Bc=s("fs"),rv0=av0(od()),Ec=ov0(wc());function Ac($){if(typeof WeakMap!="function")return null;var D=new WeakMap,J=new WeakMap;return(Ac=function(X){return X?J:D})($)}function ov0($,D){if(!D&&$&&$.__esModule)return $;if($===null||typeof $!="object"&&typeof $!="function")return{default:$};var J=Ac(D);if(J&&J.has($))return J.get($);var X={__proto__:null},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in $)if(Y!=="default"&&{}.hasOwnProperty.call($,Y)){var Z=Q?Object.getOwnPropertyDescriptor($,Y):null;Z&&(Z.get||Z.set)?Object.defineProperty(X,Y,Z):X[Y]=$[Y]}return X.default=$,J&&J.set($,X),X}function av0($){return $&&$.__esModule?$:{default:$}}function NF($){return NF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},NF($)}function tv0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function Rc($,D){for(var J=0;J<D.length;J++){var X=D[J];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty($,ev0(X.key),X)}}function sv0($,D,J){if(D)Rc($.prototype,D);if(J)Rc($,J);return Object.defineProperty($,"prototype",{writable:!1}),$}function ev0($){var D=$_0($,"string");return NF(D)=="symbol"?D:D+""}function $_0($,D){if(NF($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var X=J.call($,D||"default");if(NF(X)!="object")return X;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var uE$=Ic.canStoreURLs=!0,yE$=Ic.FileUrlStorage=function(){function $(D){tv0(this,$),this.path=D}return sv0($,[{key:"findAllUploads",value:function(){var J=this;return new Promise(function(X,Q){J._getItems("tus::",function(Y,Z){if(Y)Q(Y);else X(Z)})})}},{key:"findUploadsByFingerprint",value:function(J){var X=this;return new Promise(function(Q,Y){X._getItems("tus::".concat(J),function(Z,F){if(Z)Y(Z);else Q(F)})})}},{key:"removeUpload",value:function(J){var X=this;return new Promise(function(Q,Y){X._removeItem(J,function(Z){if(Z)Y(Z);else Q()})})}},{key:"addUpload",value:function(J,X){var Q=this,Y=Math.round(Math.random()*1000000000000),Z="tus::".concat(J,"::").concat(Y);return new Promise(function(F,U){Q._setItem(Z,X,function(G){if(G)U(G);else F(Z)})})}},{key:"_setItem",value:function(J,X,Q){var Y=this;Ec.lock(this.path,this._lockfileOptions()).then(function(Z){Q=Y._releaseAndCb(Z,Q),Y._getData(function(F,U){if(F){Q(F);return}U[J]=X,Y._writeData(U,function(G){return Q(G)})})}).catch(Q)}},{key:"_getItems",value:function(J,X){this._getData(function(Q,Y){if(Q){X(Q);return}var Z=Object.keys(Y).filter(function(F){return F.startsWith(J)}).map(function(F){var U=Y[F];return U.urlStorageKey=F,U});X(null,Z)})}},{key:"_removeItem",value:function(J,X){var Q=this;Ec.lock(this.path,this._lockfileOptions()).then(function(Y){X=Q._releaseAndCb(Y,X),Q._getData(function(Z,F){if(Z){X(Z);return}delete F[J],Q._writeData(F,function(U){return X(U)})})}).catch(X)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(J,X){return function(Q){if(Q){J().then(function(){return X(Q)}).catch(function(Y){return X((0,rv0.default)([Q,Y]))});return}J().then(X).catch(X)}}},{key:"_writeData",value:function(J,X){var Q={encoding:"utf8",mode:432,flag:"w"};(0,Bc.writeFile)(this.path,JSON.stringify(J),Q,function(Y){return X(Y)})}},{key:"_getData",value:function(J){(0,Bc.readFile)(this.path,"utf8",function(X,Q){if(X){if(X.code==="ENOENT")J(null,{});else J(X);return}try{Q=!Q.trim().length?{}:JSON.parse(Q)}catch(Y){J(Y);return}J(null,Q)})}}])}()});var TW=A((n9)=>{Object.defineProperty(n9,"__esModule",{value:!0});Object.defineProperty(n9,"DefaultHttpStack",{enumerable:!0,get:function(){return xc.default}});Object.defineProperty(n9,"DetailedError",{enumerable:!0,get:function(){return J_0.default}});Object.defineProperty(n9,"FileUrlStorage",{enumerable:!0,get:function(){return vc.FileUrlStorage}});Object.defineProperty(n9,"StreamSource",{enumerable:!0,get:function(){return F_0.default}});n9.Upload=void 0;Object.defineProperty(n9,"canStoreURLs",{enumerable:!0,get:function(){return vc.canStoreURLs}});n9.defaultOptions=void 0;Object.defineProperty(n9,"enableDebugLog",{enumerable:!0,get:function(){return X_0.enableDebugLog}});n9.isSupported=void 0;var J_0=jJ(nL()),X_0=iL(),Q_0=jJ(wg()),iw=jJ(eg()),Y_0=jJ(Lm()),Z_0=jJ(Am()),xc=jJ(gm()),F_0=jJ(Xw()),vc=Tc();function jJ($){return $&&$.__esModule?$:{default:$}}function yX($){return yX=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},yX($)}function U_0($,D){if(!($ instanceof D))throw TypeError("Cannot call a class as a function")}function Cc($,D){for(var J=0;J<D.length;J++){var X=D[J];if(X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X)X.writable=!0;Object.defineProperty($,kc(X.key),X)}}function G_0($,D,J){if(D)Cc($.prototype,D);if(J)Cc($,J);return Object.defineProperty($,"prototype",{writable:!1}),$}function q_0($,D,J){return D=jW(D),W_0($,_c()?Reflect.construct(D,J||[],jW($).constructor):D.apply($,J))}function W_0($,D){if(D&&(yX(D)==="object"||typeof D==="function"))return D;else if(D!==void 0)throw TypeError("Derived constructors may only return object or undefined");return z_0($)}function z_0($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function _c(){try{var $=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(D){}return(_c=function(){return!!$})()}function jW($){return jW=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)},jW($)}function H_0($,D){if(typeof D!=="function"&&D!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(D&&D.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Object.defineProperty($,"prototype",{writable:!1}),D)pw($,D)}function pw($,D){return pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,Q){return X.__proto__=Q,X},pw($,D)}function Pc($,D){var J=Object.keys($);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols($);D&&(X=X.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),J.push.apply(J,X)}return J}function uX($){for(var D=1;D<arguments.length;D++){var J=arguments[D]!=null?arguments[D]:{};D%2?Pc(Object(J),!0).forEach(function(X){O_0($,X,J[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(J)):Pc(Object(J)).forEach(function(X){Object.defineProperty($,X,Object.getOwnPropertyDescriptor(J,X))})}return $}function O_0($,D,J){if(D=kc(D),D in $)Object.defineProperty($,D,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[D]=J;return $}function kc($){var D=V_0($,"string");return yX(D)=="symbol"?D:D+""}function V_0($,D){if(yX($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var X=J.call($,D||"default");if(yX(X)!="object")return X;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}var Sc=n9.defaultOptions=uX(uX({},iw.default.defaultOptions),{},{httpStack:new xc.default,fileReader:new Y_0.default,urlStorage:new Q_0.default,fingerprint:Z_0.default}),hE$=n9.Upload=function($){function D(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return U_0(this,D),X=uX(uX({},Sc),X),q_0(this,D,[J,X])}return H_0(D,$),G_0(D,null,[{key:"terminate",value:function(X){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Q=uX(uX({},Sc),Q),iw.default.terminate(X,Q)}}])}(iw.default),bE$=n9.isSupported=!0});var zD;var a8=a(()=>{zD={name:"@capgo/cli",type:"module",version:"8.32.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: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","test:credentials":"bun test/test-credentials.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: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:preview-qr":"bun test/test-preview-qr.mjs","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: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:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && 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-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: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: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:native-dependencies && 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:preview-qr && 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: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-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && 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-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:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && 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: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: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","test:android-reporting-api":"bun test/test-android-reporting-api.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: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"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","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",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},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","@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.1",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",typescript:"6.0.3",ws:"^8.21.1"}}});import{platform as N_0,release as M_0}from"node:os";import{arch as L_0,version as w_0}from"node:process";function rw(){return hc}function ow(){let $={cli_version:zD.version,node_version:w_0,os_platform:N_0(),os_arch:L_0,os_release:M_0(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"undefined",is_ci:MF.isCI,is_tty:Boolean(process.stdout.isTTY),invocation_source:hc};if(MF.name)$.ci_provider=MF.name;return $}var MF,hc="cli";var aw=a(()=>{a8();MF=j$(hL(),1)});import{AsyncLocalStorage as B_0}from"node:async_hooks";function fX($,D){return gc.run($,()=>Promise.resolve(D()))}function E_0(){return gc.getStore()}function mc(){return R_0}function cc($){dc=$}function bc($){try{dc?.($)}catch{}}function nc($,D){let J;try{J=new URL($).pathname}catch{J=$.split("?")[0]}let X="/functions/v1/",Q=J.indexOf(X);if(Q>=0){let G=J.slice(Q+X.length).replace(/^\/+|\/+$/g,"");return G?`${D} functions:${G}`:`${D} functions`}let Y="/rest/v1/",Z=J.indexOf(Y),F=Z>=0?J.slice(Z+Y.length):J.replace(/^\//,"");if(F.startsWith("rpc/"))return`rpc:${F.slice(4).split("/")[0]}`;let U=F.split("/")[0]||J;return`${D} ${U}`}function A_0($){let D=$?.headers;if(!D)return;let J=D.get;if(typeof J==="function")return J.call(D,"capgkey")??void 0;if(Array.isArray(D))return D.find(([X])=>X.toLowerCase()==="capgkey")?.[1];return D.capgkey}function ic(){return async(D,J)=>{let X=(J?.method??"GET").toUpperCase(),Q=typeof D==="string"?D:D instanceof URL?D.href:D.url,Y=E_0(),Z=A_0(J),F=Date.now();try{let U=await globalThis.fetch(D,J);return bc({url:Q,method:X,status:U.status,ok:U.ok,durationMs:Date.now()-F,source:Y,apikey:Z}),U}catch(U){throw bc({url:Q,method:X,status:0,ok:!1,durationMs:Date.now()-F,source:Y,apikey:Z,error:U}),U}}}var gc,R_0=!1,dc,lc=5000;var CW=a(()=>{gc=new B_0});function pc($,D){let X=["normal","bold","dim","italic","underline","strikethrough"].indexOf($),Q="\x1B[";return"\x1B["+X+"m"+D+"\x1B[0m"}var T6;var rc=a(()=>{T6=class T6{title=null;headers=[];rows=[];static narrowTheme={top:["╔","═","╤","╗"],row:["║"," ","│","║"],div:["╟","─","┼","╢"],bot:["╚","═","╧","╝"]};static wideTheme={top:["╔═","═","═╤═","═╗"],row:["║ "," "," │ "," ║"],div:["╟─","─","─┼─","─╢"],bot:["╚═","═","═╧═","═╝"]};static roundTheme={top:["╭─","─","─┬─","─╮"],row:["│ "," "," │ "," │"],div:["├─","─","─┼─","─┤"],bot:["╰─","─","─┴─","─╯"]};theme=T6.wideTheme;columnWidth(){let $=[this.headers,...this.rows].filter((J)=>J.length>0),D=$[0].map((J)=>this.cast(J).length);for(let J of $.slice(1))for(let X=0;X<D.length;X++){let Q=this.cast(J[X]).length;if(Q>D[X])D[X]=Q}return D}cast($){if(typeof $==="object")return"obj";if($!==void 0&&typeof $.toString==="function")return $.toString();else return""}renderTitle(){return"[ "+this.title+" ]"}renderLine($){let D=this.columnWidth();return $[0]+D.map((J)=>$[1].repeat(J)).join($[2])+$[3]}renderCell($,D,J=!1){let X=this.cast($),Q=J?pc("bold",X):X,Y=D-X.length,Z=this.theme.row[1];switch(typeof $){case"number":return Z.repeat(Y)+Q;case"string":return Q+Z.repeat(Y);case"boolean":case"object":return Z.repeat(Math.ceil(Y/2))+pc("italic",X)+Z.repeat(Math.floor(Y/2));default:return Z.repeat(Y)}}renderRow($,D=!1){let J=this.theme.row,X=this.columnWidth();return J[0]+$.map((Q,Y)=>this.renderCell(Q,X[Y],D)).join(J[2])+J[3]}toString(){let $=this.theme,D=this.headers.length>0,J=this.rows.length>0;return[this.title?this.renderTitle():"",D||J?this.renderLine($.top):"",D?this.renderRow(this.headers,!0):"",D&&J?this.renderLine($.div):"",...this.rows.map((X)=>this.renderRow(X)),D||J?this.renderLine($.bot):""].filter((X)=>X.length>0).join(`
|
|
113
113
|
`)}}});var hX=a(()=>{rc()});async function PW($){try{let J=`https://registry.npmjs.org/${encodeURIComponent($.toLowerCase())}`,X=await fetch(J,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!X.ok)return null;return(await X.json())["dist-tags"]?.latest||null}catch{return null}}async function I_0(){let $=await PW("@capgo/cli")??"",D=$?.split(".")[0]??"";return{currentVersion:zD.version,latestVersion:$,isOutdated:!!$&&$!==zD.version,majorVersion:D}}async function Z1(){let{isOutdated:$,currentVersion:D,latestVersion:J,majorVersion:X}=await I_0();if($)B.warning(`\uD83D\uDEA8 You are using @capgo/cli@${D} it's not the latest version.
|
|
114
114
|
Please use @capgo/cli@${J}" or @capgo/cli@${X} to keep up to date with the latest features and bug fixes.`)}var bD=a(()=>{F$();a8()});async function oc($,D,J,X,Q,Y="✅",Z){await n0(J,{channel:$,event:X,icon:Y,org_id:D,tracking_version:2,...Q||Z?{tags:{...Q?{"app-id":Q}:{},...Z}}:{},notify:!1})}var ac=a(()=>{F$();hX();bD();D$()});var tw=A((FR$,tc)=>{var bX=1000,gX=bX*60,mX=gX*60,TJ=mX*24,j_0=TJ*7,T_0=TJ*365.25;tc.exports=function($,D){D=D||{};var J=typeof $;if(J==="string"&&$.length>0)return C_0($);else if(J==="number"&&isFinite($))return D.long?S_0($):P_0($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function C_0($){if($=String($),$.length>100)return;var D=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec($);if(!D)return;var J=parseFloat(D[1]),X=(D[2]||"ms").toLowerCase();switch(X){case"years":case"year":case"yrs":case"yr":case"y":return J*T_0;case"weeks":case"week":case"w":return J*j_0;case"days":case"day":case"d":return J*TJ;case"hours":case"hour":case"hrs":case"hr":case"h":return J*mX;case"minutes":case"minute":case"mins":case"min":case"m":return J*gX;case"seconds":case"second":case"secs":case"sec":case"s":return J*bX;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return J;default:return}}function P_0($){var D=Math.abs($);if(D>=TJ)return Math.round($/TJ)+"d";if(D>=mX)return Math.round($/mX)+"h";if(D>=gX)return Math.round($/gX)+"m";if(D>=bX)return Math.round($/bX)+"s";return $+"ms"}function S_0($){var D=Math.abs($);if(D>=TJ)return SW($,D,TJ,"day");if(D>=mX)return SW($,D,mX,"hour");if(D>=gX)return SW($,D,gX,"minute");if(D>=bX)return SW($,D,bX,"second");return $+" ms"}function SW($,D,J,X){var Q=D>=J*1.5;return Math.round($/J)+" "+X+(Q?"s":"")}});var sw=A((UR$,sc)=>{function x_0($){J.debug=J,J.default=J,J.coerce=U,J.disable=Z,J.enable=Q,J.enabled=F,J.humanize=tw(),J.destroy=G,Object.keys($).forEach((q)=>{J[q]=$[q]}),J.names=[],J.skips=[],J.formatters={};function D(q){let W=0;for(let z=0;z<q.length;z++)W=(W<<5)-W+q.charCodeAt(z),W|=0;return J.colors[Math.abs(W)%J.colors.length]}J.selectColor=D;function J(q){let W,z=null,H,O;function V(...K){if(!V.enabled)return;let L=V,E=Number(new Date),N=E-(W||E);if(L.diff=N,L.prev=W,L.curr=E,W=E,K[0]=J.coerce(K[0]),typeof K[0]!=="string")K.unshift("%O");let M=0;K[0]=K[0].replace(/%([a-zA-Z%])/g,(R,S)=>{if(R==="%%")return"%";M++;let v=J.formatters[S];if(typeof v==="function"){let I=K[M];R=v.call(L,I),K.splice(M,1),M--}return R}),J.formatArgs.call(L,K),(L.log||J.log).apply(L,K)}if(V.namespace=q,V.useColors=J.useColors(),V.color=J.selectColor(q),V.extend=X,V.destroy=J.destroy,Object.defineProperty(V,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(z!==null)return z;if(H!==J.namespaces)H=J.namespaces,O=J.enabled(q);return O},set:(K)=>{z=K}}),typeof J.init==="function")J.init(V);return V}function X(q,W){let z=J(this.namespace+(typeof W>"u"?":":W)+q);return z.log=this.log,z}function Q(q){J.save(q),J.namespaces=q,J.names=[],J.skips=[];let W=(typeof q==="string"?q:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let z of W)if(z[0]==="-")J.skips.push(z.slice(1));else J.names.push(z)}function Y(q,W){let z=0,H=0,O=-1,V=0;while(z<q.length)if(H<W.length&&(W[H]===q[z]||W[H]==="*"))if(W[H]==="*")O=H,V=z,H++;else z++,H++;else if(O!==-1)H=O+1,V++,z=V;else return!1;while(H<W.length&&W[H]==="*")H++;return H===W.length}function Z(){let q=[...J.names,...J.skips.map((W)=>"-"+W)].join(",");return J.enable(""),q}function F(q){for(let W of J.skips)if(Y(q,W))return!1;for(let W of J.names)if(Y(q,W))return!0;return!1}function U(q){if(q instanceof Error)return q.stack||q.message;return q}function G(){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 J.enable(J.load()),J}sc.exports=x_0});var $l=A((ec,xW)=>{ec.formatArgs=__0;ec.save=k_0;ec.load=u_0;ec.useColors=v_0;ec.storage=y_0();ec.destroy=(()=>{let $=!1;return()=>{if(!$)$=!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`.")}})();ec.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 v_0(){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 $;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&&($=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt($[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function __0($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+xW.exports.humanize(this.diff),!this.useColors)return;let D="color: "+this.color;$.splice(1,0,D,"color: inherit");let J=0,X=0;$[0].replace(/%[a-zA-Z%]/g,(Q)=>{if(Q==="%%")return;if(J++,Q==="%c")X=J}),$.splice(X,0,D)}ec.log=console.debug||console.log||(()=>{});function k_0($){try{if($)ec.storage.setItem("debug",$);else ec.storage.removeItem("debug")}catch(D){}}function u_0(){let $;try{$=ec.storage.getItem("debug")||ec.storage.getItem("DEBUG")}catch(D){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function y_0(){try{return localStorage}catch($){}}xW.exports=sw()(ec);var{formatters:f_0}=xW.exports;f_0.j=function($){try{return JSON.stringify($)}catch(D){return"[UnexpectedJSONParseError]: "+D.message}}});var Jl=A((qR$,Dl)=>{Dl.exports=($,D=process.argv)=>{let J=$.startsWith("-")?"":$.length===1?"-":"--",X=D.indexOf(J+$),Q=D.indexOf("--");return X!==-1&&(Q===-1||X<Q)}});var Yl=A((WR$,Ql)=>{var n_0=s("os"),Xl=s("tty"),i6=Jl(),{env:DD}=process,i9;if(i6("no-color")||i6("no-colors")||i6("color=false")||i6("color=never"))i9=0;else if(i6("color")||i6("colors")||i6("color=true")||i6("color=always"))i9=1;if("FORCE_COLOR"in DD)if(DD.FORCE_COLOR==="true")i9=1;else if(DD.FORCE_COLOR==="false")i9=0;else i9=DD.FORCE_COLOR.length===0?1:Math.min(parseInt(DD.FORCE_COLOR,10),3);function ew($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function $B($,D){if(i9===0)return 0;if(i6("color=16m")||i6("color=full")||i6("color=truecolor"))return 3;if(i6("color=256"))return 2;if($&&!D&&i9===void 0)return 0;let J=i9||0;if(DD.TERM==="dumb")return J;if(process.platform==="win32"){let X=n_0.release().split(".");if(Number(X[0])>=10&&Number(X[2])>=10586)return Number(X[2])>=14931?3:2;return 1}if("CI"in DD){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((X)=>(X in DD))||DD.CI_NAME==="codeship")return 1;return J}if("TEAMCITY_VERSION"in DD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(DD.TEAMCITY_VERSION)?1:0;if(DD.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in DD){let X=parseInt((DD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(DD.TERM_PROGRAM){case"iTerm.app":return X>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(DD.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(DD.TERM))return 1;if("COLORTERM"in DD)return 1;return J}function i_0($){let D=$B($,$&&$.isTTY);return ew(D)}Ql.exports={supportsColor:i_0,stdout:ew($B(!0,Xl.isatty(1))),stderr:ew($B(!0,Xl.isatty(2)))}});var Gl=A((Fl,_W)=>{var p_0=s("tty"),vW=s("util");Fl.init=$k0;Fl.log=t_0;Fl.formatArgs=o_0;Fl.save=s_0;Fl.load=e_0;Fl.useColors=r_0;Fl.destroy=vW.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Fl.colors=[6,2,3,4,5,1];try{let $=Yl();if($&&($.stderr||$).level>=2)Fl.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($){}Fl.inspectOpts=Object.keys(process.env).filter(($)=>{return/^debug_/i.test($)}).reduce(($,D)=>{let J=D.substring(6).toLowerCase().replace(/_([a-z])/g,(Q,Y)=>{return Y.toUpperCase()}),X=process.env[D];if(/^(yes|on|true|enabled)$/i.test(X))X=!0;else if(/^(no|off|false|disabled)$/i.test(X))X=!1;else if(X==="null")X=null;else X=Number(X);return $[J]=X,$},{});function r_0(){return"colors"in Fl.inspectOpts?Boolean(Fl.inspectOpts.colors):p_0.isatty(process.stderr.fd)}function o_0($){let{namespace:D,useColors:J}=this;if(J){let X=this.color,Q="\x1B[3"+(X<8?X:"8;5;"+X),Y=` ${Q};1m${D} \x1B[0m`;$[0]=Y+$[0].split(`
|
|
115
115
|
`).join(`
|