@capgo/cli 7.86.1 → 7.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +310 -310
- package/dist/package.json +1 -1
- package/dist/src/api/app.d.ts +3 -0
- package/dist/src/api/channels.d.ts +24 -0
- package/dist/src/app/list.d.ts +8 -0
- package/dist/src/sdk.js +1 -1
- package/dist/src/types/supabase.types.d.ts +12 -0
- package/dist/src/utils.d.ts +20 -4
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/src/api/app.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import type { SupabaseClient } from '@supabase/supabase-js';
|
|
|
2
2
|
import type { Database } from '../types/supabase.types';
|
|
3
3
|
import { OrganizationPerm } from '../utils';
|
|
4
4
|
export declare function checkAppExists(supabase: SupabaseClient<Database>, appid: string): Promise<boolean>;
|
|
5
|
+
export type PendingOnboardingApp = Pick<Database['public']['Tables']['apps']['Row'], 'app_id' | 'name' | 'icon_url' | 'need_onboarding' | 'existing_app' | 'ios_store_url' | 'android_store_url'>;
|
|
6
|
+
export declare function listPendingOnboardingApps(supabase: SupabaseClient<Database>, orgId: string): Promise<PendingOnboardingApp[]>;
|
|
7
|
+
export declare function completePendingOnboardingApp(supabase: SupabaseClient<Database>, orgId: string, appId: string): Promise<void>;
|
|
5
8
|
/**
|
|
6
9
|
* Check multiple app IDs at once for batch validation (e.g., for suggestions)
|
|
7
10
|
*/
|
|
@@ -277,15 +277,19 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
277
277
|
};
|
|
278
278
|
apps: {
|
|
279
279
|
Row: {
|
|
280
|
+
android_store_url: string | null;
|
|
280
281
|
app_id: string;
|
|
281
282
|
channel_device_count: number;
|
|
282
283
|
created_at: string | null;
|
|
283
284
|
default_upload_channel: string;
|
|
285
|
+
existing_app: boolean;
|
|
284
286
|
expose_metadata: boolean;
|
|
285
287
|
icon_url: string;
|
|
286
288
|
id: string | null;
|
|
289
|
+
ios_store_url: string | null;
|
|
287
290
|
last_version: string | null;
|
|
288
291
|
manifest_bundle_count: number;
|
|
292
|
+
need_onboarding: boolean;
|
|
289
293
|
name: string | null;
|
|
290
294
|
owner_org: string;
|
|
291
295
|
retention: number;
|
|
@@ -294,15 +298,19 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
294
298
|
user_id: string | null;
|
|
295
299
|
};
|
|
296
300
|
Insert: {
|
|
301
|
+
android_store_url?: string | null;
|
|
297
302
|
app_id: string;
|
|
298
303
|
channel_device_count?: number;
|
|
299
304
|
created_at?: string | null;
|
|
300
305
|
default_upload_channel?: string;
|
|
306
|
+
existing_app?: boolean;
|
|
301
307
|
expose_metadata?: boolean;
|
|
302
308
|
icon_url: string;
|
|
303
309
|
id?: string | null;
|
|
310
|
+
ios_store_url?: string | null;
|
|
304
311
|
last_version?: string | null;
|
|
305
312
|
manifest_bundle_count?: number;
|
|
313
|
+
need_onboarding?: boolean;
|
|
306
314
|
name?: string | null;
|
|
307
315
|
owner_org: string;
|
|
308
316
|
retention?: number;
|
|
@@ -311,15 +319,19 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
311
319
|
user_id?: string | null;
|
|
312
320
|
};
|
|
313
321
|
Update: {
|
|
322
|
+
android_store_url?: string | null;
|
|
314
323
|
app_id?: string;
|
|
315
324
|
channel_device_count?: number;
|
|
316
325
|
created_at?: string | null;
|
|
317
326
|
default_upload_channel?: string;
|
|
327
|
+
existing_app?: boolean;
|
|
318
328
|
expose_metadata?: boolean;
|
|
319
329
|
icon_url?: string;
|
|
320
330
|
id?: string | null;
|
|
331
|
+
ios_store_url?: string | null;
|
|
321
332
|
last_version?: string | null;
|
|
322
333
|
manifest_bundle_count?: number;
|
|
334
|
+
need_onboarding?: boolean;
|
|
323
335
|
name?: string | null;
|
|
324
336
|
owner_org?: string;
|
|
325
337
|
retention?: number;
|
|
@@ -3747,15 +3759,19 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3747
3759
|
};
|
|
3748
3760
|
apps: {
|
|
3749
3761
|
Row: {
|
|
3762
|
+
android_store_url: string | null;
|
|
3750
3763
|
app_id: string;
|
|
3751
3764
|
channel_device_count: number;
|
|
3752
3765
|
created_at: string | null;
|
|
3753
3766
|
default_upload_channel: string;
|
|
3767
|
+
existing_app: boolean;
|
|
3754
3768
|
expose_metadata: boolean;
|
|
3755
3769
|
icon_url: string;
|
|
3756
3770
|
id: string | null;
|
|
3771
|
+
ios_store_url: string | null;
|
|
3757
3772
|
last_version: string | null;
|
|
3758
3773
|
manifest_bundle_count: number;
|
|
3774
|
+
need_onboarding: boolean;
|
|
3759
3775
|
name: string | null;
|
|
3760
3776
|
owner_org: string;
|
|
3761
3777
|
retention: number;
|
|
@@ -3764,15 +3780,19 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3764
3780
|
user_id: string | null;
|
|
3765
3781
|
};
|
|
3766
3782
|
Insert: {
|
|
3783
|
+
android_store_url?: string | null;
|
|
3767
3784
|
app_id: string;
|
|
3768
3785
|
channel_device_count?: number;
|
|
3769
3786
|
created_at?: string | null;
|
|
3770
3787
|
default_upload_channel?: string;
|
|
3788
|
+
existing_app?: boolean;
|
|
3771
3789
|
expose_metadata?: boolean;
|
|
3772
3790
|
icon_url: string;
|
|
3773
3791
|
id?: string | null;
|
|
3792
|
+
ios_store_url?: string | null;
|
|
3774
3793
|
last_version?: string | null;
|
|
3775
3794
|
manifest_bundle_count?: number;
|
|
3795
|
+
need_onboarding?: boolean;
|
|
3776
3796
|
name?: string | null;
|
|
3777
3797
|
owner_org: string;
|
|
3778
3798
|
retention?: number;
|
|
@@ -3781,15 +3801,19 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3781
3801
|
user_id?: string | null;
|
|
3782
3802
|
};
|
|
3783
3803
|
Update: {
|
|
3804
|
+
android_store_url?: string | null;
|
|
3784
3805
|
app_id?: string;
|
|
3785
3806
|
channel_device_count?: number;
|
|
3786
3807
|
created_at?: string | null;
|
|
3787
3808
|
default_upload_channel?: string;
|
|
3809
|
+
existing_app?: boolean;
|
|
3788
3810
|
expose_metadata?: boolean;
|
|
3789
3811
|
icon_url?: string;
|
|
3790
3812
|
id?: string | null;
|
|
3813
|
+
ios_store_url?: string | null;
|
|
3791
3814
|
last_version?: string | null;
|
|
3792
3815
|
manifest_bundle_count?: number;
|
|
3816
|
+
need_onboarding?: boolean;
|
|
3793
3817
|
name?: string | null;
|
|
3794
3818
|
owner_org?: string;
|
|
3795
3819
|
retention?: number;
|
package/dist/src/app/list.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { OptionsBase } from '../schemas/base';
|
|
2
2
|
export declare function listAppInternal(options: OptionsBase, silent?: boolean): Promise<{
|
|
3
|
+
android_store_url: string | null;
|
|
3
4
|
app_id: string;
|
|
4
5
|
channel_device_count: number;
|
|
5
6
|
created_at: string | null;
|
|
6
7
|
default_upload_channel: string;
|
|
8
|
+
existing_app: boolean;
|
|
7
9
|
expose_metadata: boolean;
|
|
8
10
|
icon_url: string;
|
|
9
11
|
id: string | null;
|
|
12
|
+
ios_store_url: string | null;
|
|
10
13
|
last_version: string | null;
|
|
11
14
|
manifest_bundle_count: number;
|
|
15
|
+
need_onboarding: boolean;
|
|
12
16
|
name: string | null;
|
|
13
17
|
owner_org: string;
|
|
14
18
|
retention: number;
|
|
@@ -17,15 +21,19 @@ export declare function listAppInternal(options: OptionsBase, silent?: boolean):
|
|
|
17
21
|
user_id: string | null;
|
|
18
22
|
}[]>;
|
|
19
23
|
export declare function listApp(options: OptionsBase): Promise<{
|
|
24
|
+
android_store_url: string | null;
|
|
20
25
|
app_id: string;
|
|
21
26
|
channel_device_count: number;
|
|
22
27
|
created_at: string | null;
|
|
23
28
|
default_upload_channel: string;
|
|
29
|
+
existing_app: boolean;
|
|
24
30
|
expose_metadata: boolean;
|
|
25
31
|
icon_url: string;
|
|
26
32
|
id: string | null;
|
|
33
|
+
ios_store_url: string | null;
|
|
27
34
|
last_version: string | null;
|
|
28
35
|
manifest_bundle_count: number;
|
|
36
|
+
need_onboarding: boolean;
|
|
29
37
|
name: string | null;
|
|
30
38
|
owner_org: string;
|
|
31
39
|
retention: number;
|
package/dist/src/sdk.js
CHANGED
|
@@ -127,7 +127,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
127
127
|
`)}),$.__defineSetter__("stack",function(X){return[X].concat($.stack).join(`
|
|
128
128
|
|
|
129
129
|
`)}),$}});var Mx=T((hbD,Lx)=>{var d6=i("constants"),TQD=process.cwd,zY=null,CQD=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!zY)zY=TQD.call(process);return zY};try{process.cwd()}catch(D){}if(typeof process.chdir==="function"){if(BY=process.chdir,process.chdir=function(D){zY=null,BY.call(process,D)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,BY)}var BY;Lx.exports=PQD;function PQD(D){if(d6.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))$(D);if(!D.lutimes)X(D);if(D.chown=Q(D.chown),D.fchown=Q(D.fchown),D.lchown=Q(D.lchown),D.chmod=Y(D.chmod),D.fchmod=Y(D.fchmod),D.lchmod=Y(D.lchmod),D.chownSync=F(D.chownSync),D.fchownSync=F(D.fchownSync),D.lchownSync=F(D.lchownSync),D.chmodSync=J(D.chmodSync),D.fchmodSync=J(D.fchmodSync),D.lchmodSync=J(D.lchmodSync),D.stat=Z(D.stat),D.fstat=Z(D.fstat),D.lstat=Z(D.lstat),D.statSync=w(D.statSync),D.fstatSync=w(D.fstatSync),D.lstatSync=w(D.lstatSync),D.chmod&&!D.lchmod)D.lchmod=function(U,O,z){if(z)process.nextTick(z)},D.lchmodSync=function(){};if(D.chown&&!D.lchown)D.lchown=function(U,O,z,q){if(q)process.nextTick(q)},D.lchownSync=function(){};if(CQD==="win32")D.rename=typeof D.rename!=="function"?D.rename:function(U){function O(z,q,B){var W=Date.now(),L=0;U(z,q,function M(I){if(I&&(I.code==="EACCES"||I.code==="EPERM"||I.code==="EBUSY")&&Date.now()-W<60000){if(setTimeout(function(){D.stat(q,function(K,N){if(K&&K.code==="ENOENT")U(z,q,M);else B(I)})},L),L<100)L+=10;return}if(B)B(I)})}if(Object.setPrototypeOf)Object.setPrototypeOf(O,U);return O}(D.rename);D.read=typeof D.read!=="function"?D.read:function(U){function O(z,q,B,W,L,M){var I;if(M&&typeof M==="function"){var K=0;I=function(N,V,R){if(N&&N.code==="EAGAIN"&&K<10)return K++,U.call(D,z,q,B,W,L,I);M.apply(this,arguments)}}return U.call(D,z,q,B,W,L,I)}if(Object.setPrototypeOf)Object.setPrototypeOf(O,U);return O}(D.read),D.readSync=typeof D.readSync!=="function"?D.readSync:function(U){return function(O,z,q,B,W){var L=0;while(!0)try{return U.call(D,O,z,q,B,W)}catch(M){if(M.code==="EAGAIN"&&L<10){L++;continue}throw M}}}(D.readSync);function $(U){U.lchmod=function(O,z,q){U.open(O,d6.O_WRONLY|d6.O_SYMLINK,z,function(B,W){if(B){if(q)q(B);return}U.fchmod(W,z,function(L){U.close(W,function(M){if(q)q(L||M)})})})},U.lchmodSync=function(O,z){var q=U.openSync(O,d6.O_WRONLY|d6.O_SYMLINK,z),B=!0,W;try{W=U.fchmodSync(q,z),B=!1}finally{if(B)try{U.closeSync(q)}catch(L){}else U.closeSync(q)}return W}}function X(U){if(d6.hasOwnProperty("O_SYMLINK")&&U.futimes)U.lutimes=function(O,z,q,B){U.open(O,d6.O_SYMLINK,function(W,L){if(W){if(B)B(W);return}U.futimes(L,z,q,function(M){U.close(L,function(I){if(B)B(M||I)})})})},U.lutimesSync=function(O,z,q){var B=U.openSync(O,d6.O_SYMLINK),W,L=!0;try{W=U.futimesSync(B,z,q),L=!1}finally{if(L)try{U.closeSync(B)}catch(M){}else U.closeSync(B)}return W};else if(U.futimes)U.lutimes=function(O,z,q,B){if(B)process.nextTick(B)},U.lutimesSync=function(){}}function Y(U){if(!U)return U;return function(O,z,q){return U.call(D,O,z,function(B){if(G(B))B=null;if(q)q.apply(this,arguments)})}}function J(U){if(!U)return U;return function(O,z){try{return U.call(D,O,z)}catch(q){if(!G(q))throw q}}}function Q(U){if(!U)return U;return function(O,z,q,B){return U.call(D,O,z,q,function(W){if(G(W))W=null;if(B)B.apply(this,arguments)})}}function F(U){if(!U)return U;return function(O,z,q){try{return U.call(D,O,z,q)}catch(B){if(!G(B))throw B}}}function Z(U){if(!U)return U;return function(O,z,q){if(typeof z==="function")q=z,z=null;function B(W,L){if(L){if(L.uid<0)L.uid+=4294967296;if(L.gid<0)L.gid+=4294967296}if(q)q.apply(this,arguments)}return z?U.call(D,O,z,B):U.call(D,O,B)}}function w(U){if(!U)return U;return function(O,z){var q=z?U.call(D,O,z):U.call(D,O);if(q){if(q.uid<0)q.uid+=4294967296;if(q.gid<0)q.gid+=4294967296}return q}}function G(U){if(!U)return!0;if(U.code==="ENOSYS")return!0;var O=!process.getuid||process.getuid()!==0;if(O){if(U.code==="EINVAL"||U.code==="EPERM")return!0}return!1}}});var Rx=T((gbD,Ax)=>{var Ix=i("stream").Stream;Ax.exports=xQD;function xQD(D){return{ReadStream:$,WriteStream:X};function $(Y,J){if(!(this instanceof $))return new $(Y,J);Ix.call(this);var Q=this;this.path=Y,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,J=J||{};var F=Object.keys(J);for(var Z=0,w=F.length;Z<w;Z++){var G=F[Z];this[G]=J[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(){Q._read()});return}D.open(this.path,this.flags,this.mode,function(U,O){if(U){Q.emit("error",U),Q.readable=!1;return}Q.fd=O,Q.emit("open",O),Q._read()})}function X(Y,J){if(!(this instanceof X))return new X(Y,J);Ix.call(this),this.path=Y,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,J=J||{};var Q=Object.keys(J);for(var F=0,Z=Q.length;F<Z;F++){var w=Q[F];this[w]=J[w]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=D.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var Ex=T((mbD,jx)=>{jx.exports=uQD;var SQD=Object.getPrototypeOf||function(D){return D.__proto__};function uQD(D){if(D===null||typeof D!=="object")return D;if(D instanceof Object)var $={__proto__:SQD(D)};else var $=Object.create(null);return Object.getOwnPropertyNames(D).forEach(function(X){Object.defineProperty($,X,Object.getOwnPropertyDescriptor(D,X))}),$}});var S0=T((cbD,jO)=>{var M0=i("fs"),vQD=Mx(),_QD=Rx(),kQD=Ex(),WY=i("util"),o0,HY;if(typeof Symbol==="function"&&typeof Symbol.for==="function")o0=Symbol.for("graceful-fs.queue"),HY=Symbol.for("graceful-fs.previous");else o0="___graceful-fs.queue",HY="___graceful-fs.previous";function fQD(){}function Cx(D,$){Object.defineProperty(D,o0,{get:function(){return $}})}var $8=fQD;if(WY.debuglog)$8=WY.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))$8=function(){var D=WY.format.apply(WY,arguments);D="GFS4: "+D.split(/\n/).join(`
|
|
130
|
-
GFS4: `),console.error(D)};if(!M0[o0]){if(IO=global[o0]||[],Cx(M0,IO),M0.close=function(D){function $(X,Y){return D.call(M0,X,function(J){if(!J)Tx();if(typeof Y==="function")Y.apply(this,arguments)})}return Object.defineProperty($,HY,{value:D}),$}(M0.close),M0.closeSync=function(D){function $(X){D.apply(M0,arguments),Tx()}return Object.defineProperty($,HY,{value:D}),$}(M0.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){$8(M0[o0]),i("assert").equal(M0[o0].length,0)})}var IO;if(!global[o0])Cx(global,M0[o0]);jO.exports=AO(kQD(M0));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!M0.__patched)jO.exports=AO(M0),M0.__patched=!0;function AO(D){vQD(D),D.gracefulify=AO,D.createReadStream=V,D.createWriteStream=R;var $=D.readFile;D.readFile=X;function X(_,v,S){if(typeof v==="function")S=v,v=null;return h(_,v,S);function h(b,l,f,j){return $(b,l,function(P){if(P&&(P.code==="EMFILE"||P.code==="ENFILE"))k9([h,[b,l,f],P,j||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var Y=D.writeFile;D.writeFile=J;function J(_,v,S,h){if(typeof S==="function")h=S,S=null;return b(_,v,S,h);function b(l,f,j,P,u){return Y(l,f,j,function(y){if(y&&(y.code==="EMFILE"||y.code==="ENFILE"))k9([b,[l,f,j,P],y,u||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var Q=D.appendFile;if(Q)D.appendFile=F;function F(_,v,S,h){if(typeof S==="function")h=S,S=null;return b(_,v,S,h);function b(l,f,j,P,u){return Q(l,f,j,function(y){if(y&&(y.code==="EMFILE"||y.code==="ENFILE"))k9([b,[l,f,j,P],y,u||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var Z=D.copyFile;if(Z)D.copyFile=w;function w(_,v,S,h){if(typeof S==="function")h=S,S=0;return b(_,v,S,h);function b(l,f,j,P,u){return Z(l,f,j,function(y){if(y&&(y.code==="EMFILE"||y.code==="ENFILE"))k9([b,[l,f,j,P],y,u||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var G=D.readdir;D.readdir=O;var U=/^v[0-5]\./;function O(_,v,S){if(typeof v==="function")S=v,v=null;var h=U.test(process.version)?function(f,j,P,u){return G(f,b(f,j,P,u))}:function(f,j,P,u){return G(f,j,b(f,j,P,u))};return h(_,v,S);function b(l,f,j,P){return function(u,y){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))k9([h,[l,f,j],u,P||Date.now(),Date.now()]);else{if(y&&y.sort)y.sort();if(typeof j==="function")j.call(this,u,y)}}}}if(process.version.substr(0,4)==="v0.8"){var z=_QD(D);M=z.ReadStream,K=z.WriteStream}var q=D.ReadStream;if(q)M.prototype=Object.create(q.prototype),M.prototype.open=I;var B=D.WriteStream;if(B)K.prototype=Object.create(B.prototype),K.prototype.open=N;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(_){M=_},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return K},set:function(_){K=_},enumerable:!0,configurable:!0});var W=M;Object.defineProperty(D,"FileReadStream",{get:function(){return W},set:function(_){W=_},enumerable:!0,configurable:!0});var L=K;Object.defineProperty(D,"FileWriteStream",{get:function(){return L},set:function(_){L=_},enumerable:!0,configurable:!0});function M(_,v){if(this instanceof M)return q.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function I(){var _=this;A(_.path,_.flags,_.mode,function(v,S){if(v){if(_.autoClose)_.destroy();_.emit("error",v)}else _.fd=S,_.emit("open",S),_.read()})}function K(_,v){if(this instanceof K)return B.apply(this,arguments),this;else return K.apply(Object.create(K.prototype),arguments)}function N(){var _=this;A(_.path,_.flags,_.mode,function(v,S){if(v)_.destroy(),_.emit("error",v);else _.fd=S,_.emit("open",S)})}function V(_,v){return new D.ReadStream(_,v)}function R(_,v){return new D.WriteStream(_,v)}var x=D.open;D.open=A;function A(_,v,S,h){if(typeof S==="function")h=S,S=null;return b(_,v,S,h);function b(l,f,j,P,u){return x(l,f,j,function(y,c){if(y&&(y.code==="EMFILE"||y.code==="ENFILE"))k9([b,[l,f,j,P],y,u||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}return D}function k9(D){$8("ENQUEUE",D[0].name,D[1]),M0[o0].push(D),RO()}var KY;function Tx(){var D=Date.now();for(var $=0;$<M0[o0].length;++$)if(M0[o0][$].length>2)M0[o0][$][3]=D,M0[o0][$][4]=D;RO()}function RO(){if(clearTimeout(KY),KY=void 0,M0[o0].length===0)return;var D=M0[o0].shift(),$=D[0],X=D[1],Y=D[2],J=D[3],Q=D[4];if(J===void 0)$8("RETRY",$.name,X),$.apply(null,X);else if(Date.now()-J>=60000){$8("TIMEOUT",$.name,X);var F=X.pop();if(typeof F==="function")F.call(null,Y)}else{var Z=Date.now()-Q,w=Math.max(Q-J,1),G=Math.min(w*1.2,100);if(Z>=G)$8("RETRY",$.name,X),$.apply(null,X.concat([J]));else M0[o0].push(D)}if(KY===void 0)KY=setTimeout(RO,0)}});var xx=T((dbD,Px)=>{function e1(D,$){if(typeof $==="boolean")$={forever:$};if(this._originalTimeouts=JSON.parse(JSON.stringify(D)),this._timeouts=D,this._options=$||{},this._maxRetryTime=$&&$.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}Px.exports=e1;e1.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};e1.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};e1.prototype.retry=function(D){if(this._timeout)clearTimeout(this._timeout);if(!D)return!1;var $=new Date().getTime();if(D&&$-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(D);var X=this._timeouts.shift();if(X===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),X=this._timeouts.shift();else return!1;var Y=this,J=setTimeout(function(){if(Y._attempts++,Y._operationTimeoutCb){if(Y._timeout=setTimeout(function(){Y._operationTimeoutCb(Y._attempts)},Y._operationTimeout),Y._options.unref)Y._timeout.unref()}Y._fn(Y._attempts)},X);if(this._options.unref)J.unref();return!0};e1.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};e1.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};e1.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};e1.prototype.start=e1.prototype.try;e1.prototype.errors=function(){return this._errors};e1.prototype.attempts=function(){return this._attempts};e1.prototype.mainError=function(){if(this._errors.length===0)return null;var D={},$=null,X=0;for(var Y=0;Y<this._errors.length;Y++){var J=this._errors[Y],Q=J.message,F=(D[Q]||0)+1;if(D[Q]=F,F>=X)$=J,X=F}return $}});var ux=T((bQD)=>{var yQD=xx();bQD.operation=function(D){var $=bQD.timeouts(D);return new yQD($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};bQD.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in D)$[X]=D[X];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Y=[];for(var J=0;J<$.retries;J++)Y.push(this.createTimeout(J,$));if(D&&D.forever&&!Y.length)Y.push(this.createTimeout(J,$));return Y.sort(function(Q,F){return Q-F}),Y};bQD.createTimeout=function(D,$){var X=$.randomize?Math.random()+1:1,Y=Math.round(X*$.minTimeout*Math.pow($.factor,D));return Y=Math.min(Y,$.maxTimeout),Y};bQD.wrap=function(D,$,X){if($ instanceof Array)X=$,$=null;if(!X){X=[];for(var Y in D)if(typeof D[Y]==="function")X.push(Y)}for(var J=0;J<X.length;J++){var Q=X[J],F=D[Q];D[Q]=function(w){var G=bQD.operation($),U=Array.prototype.slice.call(arguments,1),O=U.pop();U.push(function(z){if(G.retry(z))return;if(z)arguments[0]=G.mainError();O.apply(this,arguments)}),G.attempt(function(){w.apply(D,U)})}.bind(D,F),D[Q].options=$}}});var vx=T((nbD,VY)=>{VY.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")VY.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")VY.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var MY=T((ibD,y9)=>{var K0=global.process,X8=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!X8(K0))y9.exports=function(){return function(){}};else{if(EO=i("assert"),J8=vx(),TO=/^win/i.test(K0.platform),f9=i("events"),typeof f9!=="function")f9=f9.EventEmitter;if(K0.__signal_exit_emitter__)g0=K0.__signal_exit_emitter__;else g0=K0.__signal_exit_emitter__=new f9,g0.count=0,g0.emitted={};if(!g0.infinite)g0.setMaxListeners(1/0),g0.infinite=!0;y9.exports=function(D,$){if(!X8(global.process))return function(){};if(EO.equal(typeof D,"function","a callback must be provided for exit handler"),Y8===!1)NY();var X="exit";if($&&$.alwaysLast)X="afterexit";var Y=function(){if(g0.removeListener(X,D),g0.listeners("exit").length===0&&g0.listeners("afterexit").length===0)q3()};return g0.on(X,D),Y},q3=function(){if(!Y8||!X8(global.process))return;Y8=!1,J8.forEach(function($){try{K0.removeListener($,z3[$])}catch(X){}}),K0.emit=B3,K0.reallyExit=LY,g0.count-=1},y9.exports.unload=q3,l6=function($,X,Y){if(g0.emitted[$])return;g0.emitted[$]=!0,g0.emit($,X,Y)},z3={},J8.forEach(function(D){z3[D]=function(){if(!X8(global.process))return;var X=K0.listeners(D);if(X.length===g0.count){if(q3(),l6("exit",null,D),l6("afterexit",null,D),TO&&D==="SIGHUP")D="SIGINT";K0.kill(K0.pid,D)}}}),y9.exports.signals=function(){return J8},Y8=!1,NY=function(){if(Y8||!X8(global.process))return;Y8=!0,g0.count+=1,J8=J8.filter(function($){try{return K0.on($,z3[$]),!0}catch(X){return!1}}),K0.emit=PO,K0.reallyExit=CO},y9.exports.load=NY,LY=K0.reallyExit,CO=function($){if(!X8(global.process))return;K0.exitCode=$||0,l6("exit",K0.exitCode,null),l6("afterexit",K0.exitCode,null),LY.call(K0,K0.exitCode)},B3=K0.emit,PO=function($,X){if($==="exit"&&X8(global.process)){if(X!==void 0)K0.exitCode=X;var Y=B3.apply(this,arguments);return l6("exit",K0.exitCode,null),l6("afterexit",K0.exitCode,null),Y}else return B3.apply(this,arguments)}}var EO,J8,TO,f9,g0,q3,l6,z3,Y8,NY,LY,CO,B3,PO});var kx=T((lQD,xO)=>{var _x=Symbol();function cQD(D,$,X){let Y=$[_x];if(Y)return $.stat(D,(Q,F)=>{if(Q)return X(Q);X(null,F.mtime,Y)});let J=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,J,J,(Q)=>{if(Q)return X(Q);$.stat(D,(F,Z)=>{if(F)return X(F);let w=Z.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,_x,{value:w}),X(null,Z.mtime,w)})})}function dQD(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}lQD.probe=cQD;lQD.getMtime=dQD});var gx=T((eQD,K3)=>{var pQD=i("path"),vO=S0(),rQD=ux(),oQD=MY(),fx=kx(),Z6={};function W3(D,$){return $.lockfilePath||`${D}.lock`}function _O(D,$,X){if(!$.realpath)return X(null,pQD.resolve(D));$.fs.realpath(D,X)}function uO(D,$,X){let Y=W3(D,$);$.fs.mkdir(Y,(J)=>{if(!J)return fx.probe(Y,$.fs,(Q,F,Z)=>{if(Q)return $.fs.rmdir(Y,()=>{}),X(Q);X(null,F,Z)});if(J.code!=="EEXIST")return X(J);if($.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(Y,(Q,F)=>{if(Q){if(Q.code==="ENOENT")return uO(D,{...$,stale:0},X);return X(Q)}if(!yx(F,$))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));bx(D,$,(Z)=>{if(Z)return X(Z);uO(D,{...$,stale:0},X)})})})}function yx(D,$){return D.mtime.getTime()<Date.now()-$.stale}function bx(D,$,X){$.fs.rmdir(W3(D,$),(Y)=>{if(Y&&Y.code!=="ENOENT")return X(Y);X()})}function IY(D,$){let X=Z6[D];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||$.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,$.fs.stat(X.lockfilePath,(Y,J)=>{let Q=X.lastUpdate+$.stale<Date.now();if(Y){if(Y.code==="ENOENT"||Q)return SO(D,X,Object.assign(Y,{code:"ECOMPROMISED"}));return X.updateDelay=1000,IY(D,$)}if(X.mtime.getTime()!==J.mtime.getTime())return SO(D,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let Z=fx.getMtime(X.mtimePrecision);$.fs.utimes(X.lockfilePath,Z,Z,(w)=>{let G=X.lastUpdate+$.stale<Date.now();if(X.released)return;if(w){if(w.code==="ENOENT"||G)return SO(D,X,Object.assign(w,{code:"ECOMPROMISED"}));return X.updateDelay=1000,IY(D,$)}X.mtime=Z,X.lastUpdate=Date.now(),X.updateDelay=null,IY(D,$)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function SO(D,$,X){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(Z6[D]===$)delete Z6[D];$.options.onCompromised(X)}function aQD(D,$,X){$={stale:1e4,update:null,realpath:!0,retries:0,fs:vO,onCompromised:(Y)=>{throw Y},...$},$.retries=$.retries||0,$.retries=typeof $.retries==="number"?{retries:$.retries}:$.retries,$.stale=Math.max($.stale||0,2000),$.update=$.update==null?$.stale/2:$.update||0,$.update=Math.max(Math.min($.update,$.stale/2),1000),_O(D,$,(Y,J)=>{if(Y)return X(Y);let Q=rQD.operation($.retries);Q.attempt(()=>{uO(J,$,(F,Z,w)=>{if(Q.retry(F))return;if(F)return X(Q.mainError());let G=Z6[J]={lockfilePath:W3(J,$),mtime:Z,mtimePrecision:w,options:$,lastUpdate:Date.now()};IY(J,$),X(null,(U)=>{if(G.released)return U&&U(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));hx(J,{...$,realpath:!1},U)})})})})}function hx(D,$,X){$={fs:vO,realpath:!0,...$},_O(D,$,(Y,J)=>{if(Y)return X(Y);let Q=Z6[J];if(!Q)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Q.updateTimeout&&clearTimeout(Q.updateTimeout),Q.released=!0,delete Z6[J],bx(J,$,X)})}function tQD(D,$,X){$={stale:1e4,realpath:!0,fs:vO,...$},$.stale=Math.max($.stale||0,2000),_O(D,$,(Y,J)=>{if(Y)return X(Y);$.fs.stat(W3(J,$),(Q,F)=>{if(Q)return Q.code==="ENOENT"?X(null,!1):X(Q);return X(null,!yx(F,$))})})}function sQD(){return Z6}oQD(()=>{for(let D in Z6){let $=Z6[D].options;try{$.fs.rmdirSync(W3(D,$))}catch(X){}}});eQD.lock=aQD;eQD.unlock=hx;eQD.check=tQD;eQD.getLocks=sQD});var cx=T((pbD,mx)=>{var YFD=S0();function QFD(D){let $=["mkdir","realpath","stat","rmdir","utimes"],X={...D};return $.forEach((Y)=>{X[Y]=(...J)=>{let Q=J.pop(),F;try{F=D[`${Y}Sync`](...J)}catch(Z){return Q(Z)}Q(null,F)}}),X}function FFD(D){return(...$)=>new Promise((X,Y)=>{$.push((J,Q)=>{if(J)Y(J);else X(Q)}),D(...$)})}function ZFD(D){return(...$)=>{let X,Y;if($.push((J,Q)=>{X=J,Y=Q}),D(...$),X)throw X;return Y}}function wFD(D){if(D={...D},D.fs=QFD(D.fs||YFD),typeof D.retries==="number"&&D.retries>0||D.retries&&typeof D.retries.retries==="number"&&D.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return D}mx.exports={toPromise:FFD,toSync:ZFD,toSyncOptions:wFD}});var lx=T((rbD,n6)=>{var b9=gx(),{toPromise:AY,toSync:RY,toSyncOptions:kO}=cx();async function dx(D,$){let X=await AY(b9.lock)(D,$);return AY(X)}function GFD(D,$){let X=RY(b9.lock)(D,kO($));return RY(X)}function UFD(D,$){return AY(b9.unlock)(D,$)}function OFD(D,$){return RY(b9.unlock)(D,kO($))}function qFD(D,$){return AY(b9.check)(D,$)}function zFD(D,$){return RY(b9.check)(D,kO($))}n6.exports=dx;n6.exports.lock=dx;n6.exports.unlock=UFD;n6.exports.lockSync=GFD;n6.exports.unlockSync=OFD;n6.exports.check=qFD;n6.exports.checkSync=zFD});var tx=T((ox)=>{Object.defineProperty(ox,"__esModule",{value:!0});ox.canStoreURLs=ox.FileUrlStorage=void 0;var nx=i("fs"),BFD=KFD(Nx()),ix=WFD(lx());function rx(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,X=new WeakMap;return(rx=function(Y){return Y?X:$})(D)}function WFD(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var X=rx($);if(X&&X.has(D))return X.get(D);var Y={__proto__:null},J=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Q in D)if(Q!=="default"&&{}.hasOwnProperty.call(D,Q)){var F=J?Object.getOwnPropertyDescriptor(D,Q):null;F&&(F.get||F.set)?Object.defineProperty(Y,Q,F):Y[Q]=D[Q]}return Y.default=D,X&&X.set(D,Y),Y}function KFD(D){return D&&D.__esModule?D:{default:D}}function H3(D){return H3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},H3(D)}function HFD(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function px(D,$){for(var X=0;X<$.length;X++){var Y=$[X];if(Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y)Y.writable=!0;Object.defineProperty(D,NFD(Y.key),Y)}}function VFD(D,$,X){if($)px(D.prototype,$);if(X)px(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function NFD(D){var $=LFD(D,"string");return H3($)=="symbol"?$:$+""}function LFD(D,$){if(H3(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var Y=X.call(D,$||"default");if(H3(Y)!="object")return Y;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var obD=ox.canStoreURLs=!0,abD=ox.FileUrlStorage=function(){function D($){HFD(this,D),this.path=$}return VFD(D,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(Y,J){X._getItems("tus::",function(Q,F){if(Q)J(Q);else Y(F)})})}},{key:"findUploadsByFingerprint",value:function(X){var Y=this;return new Promise(function(J,Q){Y._getItems("tus::".concat(X),function(F,Z){if(F)Q(F);else J(Z)})})}},{key:"removeUpload",value:function(X){var Y=this;return new Promise(function(J,Q){Y._removeItem(X,function(F){if(F)Q(F);else J()})})}},{key:"addUpload",value:function(X,Y){var J=this,Q=Math.round(Math.random()*1000000000000),F="tus::".concat(X,"::").concat(Q);return new Promise(function(Z,w){J._setItem(F,Y,function(G){if(G)w(G);else Z(F)})})}},{key:"_setItem",value:function(X,Y,J){var Q=this;ix.lock(this.path,this._lockfileOptions()).then(function(F){J=Q._releaseAndCb(F,J),Q._getData(function(Z,w){if(Z){J(Z);return}w[X]=Y,Q._writeData(w,function(G){return J(G)})})}).catch(J)}},{key:"_getItems",value:function(X,Y){this._getData(function(J,Q){if(J){Y(J);return}var F=Object.keys(Q).filter(function(Z){return Z.startsWith(X)}).map(function(Z){var w=Q[Z];return w.urlStorageKey=Z,w});Y(null,F)})}},{key:"_removeItem",value:function(X,Y){var J=this;ix.lock(this.path,this._lockfileOptions()).then(function(Q){Y=J._releaseAndCb(Q,Y),J._getData(function(F,Z){if(F){Y(F);return}delete Z[X],J._writeData(Z,function(w){return Y(w)})})}).catch(Y)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,Y){return function(J){if(J){X().then(function(){return Y(J)}).catch(function(Q){return Y((0,BFD.default)([J,Q]))});return}X().then(Y).catch(Y)}}},{key:"_writeData",value:function(X,Y){var J={encoding:"utf8",mode:432,flag:"w"};(0,nx.writeFile)(this.path,JSON.stringify(X),J,function(Q){return Y(Q)})}},{key:"_getData",value:function(X){(0,nx.readFile)(this.path,"utf8",function(Y,J){if(Y){if(Y.code==="ENOENT")X(null,{});else X(Y);return}try{J=!J.trim().length?{}:JSON.parse(J)}catch(Q){X(Q);return}X(null,J)})}}])}()});var EY=T((i6)=>{Object.defineProperty(i6,"__esModule",{value:!0});Object.defineProperty(i6,"DefaultHttpStack",{enumerable:!0,get:function(){return $S.default}});Object.defineProperty(i6,"DetailedError",{enumerable:!0,get:function(){return IFD.default}});Object.defineProperty(i6,"FileUrlStorage",{enumerable:!0,get:function(){return XS.FileUrlStorage}});Object.defineProperty(i6,"StreamSource",{enumerable:!0,get:function(){return TFD.default}});i6.Upload=void 0;Object.defineProperty(i6,"canStoreURLs",{enumerable:!0,get:function(){return XS.canStoreURLs}});i6.defaultOptions=void 0;Object.defineProperty(i6,"enableDebugLog",{enumerable:!0,get:function(){return AFD.enableDebugLog}});i6.isSupported=void 0;var IFD=Q8(kU()),AFD=fU(),RFD=Q8(lT()),fO=Q8(AC()),jFD=Q8(dC()),EFD=Q8(rC()),$S=Q8(UP()),TFD=Q8(pU()),XS=tx();function Q8(D){return D&&D.__esModule?D:{default:D}}function g9(D){return g9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},g9(D)}function CFD(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function sx(D,$){for(var X=0;X<$.length;X++){var Y=$[X];if(Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y)Y.writable=!0;Object.defineProperty(D,YS(Y.key),Y)}}function PFD(D,$,X){if($)sx(D.prototype,$);if(X)sx(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function xFD(D,$,X){return $=jY($),SFD(D,JS()?Reflect.construct($,X||[],jY(D).constructor):$.apply(D,X))}function SFD(D,$){if($&&(g9($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return uFD(D)}function uFD(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function JS(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(JS=function(){return!!D})()}function jY(D){return jY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},jY(D)}function vFD(D,$){if(typeof $!=="function"&&$!==null)throw TypeError("Super expression must either be null or a function");if(D.prototype=Object.create($&&$.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),Object.defineProperty(D,"prototype",{writable:!1}),$)yO(D,$)}function yO(D,$){return yO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Y,J){return Y.__proto__=J,Y},yO(D,$)}function ex(D,$){var X=Object.keys(D);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(D);$&&(Y=Y.filter(function(J){return Object.getOwnPropertyDescriptor(D,J).enumerable})),X.push.apply(X,Y)}return X}function h9(D){for(var $=1;$<arguments.length;$++){var X=arguments[$]!=null?arguments[$]:{};$%2?ex(Object(X),!0).forEach(function(Y){_FD(D,Y,X[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(X)):ex(Object(X)).forEach(function(Y){Object.defineProperty(D,Y,Object.getOwnPropertyDescriptor(X,Y))})}return D}function _FD(D,$,X){if($=YS($),$ in D)Object.defineProperty(D,$,{value:X,enumerable:!0,configurable:!0,writable:!0});else D[$]=X;return D}function YS(D){var $=kFD(D,"string");return g9($)=="symbol"?$:$+""}function kFD(D,$){if(g9(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var Y=X.call(D,$||"default");if(g9(Y)!="object")return Y;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var DS=i6.defaultOptions=h9(h9({},fO.default.defaultOptions),{},{httpStack:new $S.default,fileReader:new jFD.default,urlStorage:new RFD.default,fingerprint:EFD.default}),sbD=i6.Upload=function(D){function $(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return CFD(this,$),Y=h9(h9({},DS),Y),xFD(this,$,[X,Y])}return vFD($,D),PFD($,null,[{key:"terminate",value:function(Y){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return J=h9(h9({},DS),J),fO.default.terminate(Y,J)}}])}(fO.default),ebD=i6.isSupported=!0});var H$;var V3=o(()=>{H$={name:"@capgo/cli",type:"module",version:"7.86.1",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLI#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/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:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsc --noEmit",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:payload-split":"bun test/test-payload-split.mjs",test:"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:credentials && bun run test:credentials-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split"},devDependencies:{"@antfu/eslint-config":"^7.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.4","@capacitor/cli":"^8.0.0","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.0.0","@modelcontextprotocol/sdk":"^1.25.3","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.79.0","@tanstack/intent":"^0.0.23","@types/adm-zip":"^0.5.7","@types/node":"^25.0.0","@types/prettyjson":"^0.0.33","@types/tmp":"^0.2.6","@vercel/ncc":"^0.38.4","adm-zip":"^0.5.16","ci-info":"^4.3.1",commander:"^14.0.2",eslint:"^9.38.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.0",micromatch:"^4.0.8",open:"^11.0.0",partysocket:"^1.1.11",prettyjson:"^1.2.5",tmp:"^0.2.5","tus-js-client":"^4.3.1",typescript:"^5.9.3",ws:"^8.18.3",zod:"^4.3.6"}}});async function TY(D){try{let X=`https://registry.npmjs.org/${encodeURIComponent(D.toLowerCase())}`,Y=await fetch(X,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!Y.ok)return null;return(await Y.json())["dist-tags"]?.latest||null}catch{return null}}async function F0(){let D=await TY("@capgo/cli")??"",$=D?.split(".")[0];if(D!==H$.version)H.warning(`\uD83D\uDEA8 You are using @capgo/cli@${H$.version} it's not the latest version.
|
|
130
|
+
GFS4: `),console.error(D)};if(!M0[o0]){if(IO=global[o0]||[],Cx(M0,IO),M0.close=function(D){function $(X,Y){return D.call(M0,X,function(J){if(!J)Tx();if(typeof Y==="function")Y.apply(this,arguments)})}return Object.defineProperty($,HY,{value:D}),$}(M0.close),M0.closeSync=function(D){function $(X){D.apply(M0,arguments),Tx()}return Object.defineProperty($,HY,{value:D}),$}(M0.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){$8(M0[o0]),i("assert").equal(M0[o0].length,0)})}var IO;if(!global[o0])Cx(global,M0[o0]);jO.exports=AO(kQD(M0));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!M0.__patched)jO.exports=AO(M0),M0.__patched=!0;function AO(D){vQD(D),D.gracefulify=AO,D.createReadStream=V,D.createWriteStream=R;var $=D.readFile;D.readFile=X;function X(_,v,S){if(typeof v==="function")S=v,v=null;return h(_,v,S);function h(b,l,f,j){return $(b,l,function(P){if(P&&(P.code==="EMFILE"||P.code==="ENFILE"))k9([h,[b,l,f],P,j||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var Y=D.writeFile;D.writeFile=J;function J(_,v,S,h){if(typeof S==="function")h=S,S=null;return b(_,v,S,h);function b(l,f,j,P,u){return Y(l,f,j,function(y){if(y&&(y.code==="EMFILE"||y.code==="ENFILE"))k9([b,[l,f,j,P],y,u||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var Q=D.appendFile;if(Q)D.appendFile=F;function F(_,v,S,h){if(typeof S==="function")h=S,S=null;return b(_,v,S,h);function b(l,f,j,P,u){return Q(l,f,j,function(y){if(y&&(y.code==="EMFILE"||y.code==="ENFILE"))k9([b,[l,f,j,P],y,u||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var Z=D.copyFile;if(Z)D.copyFile=w;function w(_,v,S,h){if(typeof S==="function")h=S,S=0;return b(_,v,S,h);function b(l,f,j,P,u){return Z(l,f,j,function(y){if(y&&(y.code==="EMFILE"||y.code==="ENFILE"))k9([b,[l,f,j,P],y,u||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}var G=D.readdir;D.readdir=O;var U=/^v[0-5]\./;function O(_,v,S){if(typeof v==="function")S=v,v=null;var h=U.test(process.version)?function(f,j,P,u){return G(f,b(f,j,P,u))}:function(f,j,P,u){return G(f,j,b(f,j,P,u))};return h(_,v,S);function b(l,f,j,P){return function(u,y){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))k9([h,[l,f,j],u,P||Date.now(),Date.now()]);else{if(y&&y.sort)y.sort();if(typeof j==="function")j.call(this,u,y)}}}}if(process.version.substr(0,4)==="v0.8"){var z=_QD(D);M=z.ReadStream,K=z.WriteStream}var q=D.ReadStream;if(q)M.prototype=Object.create(q.prototype),M.prototype.open=I;var B=D.WriteStream;if(B)K.prototype=Object.create(B.prototype),K.prototype.open=N;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(_){M=_},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return K},set:function(_){K=_},enumerable:!0,configurable:!0});var W=M;Object.defineProperty(D,"FileReadStream",{get:function(){return W},set:function(_){W=_},enumerable:!0,configurable:!0});var L=K;Object.defineProperty(D,"FileWriteStream",{get:function(){return L},set:function(_){L=_},enumerable:!0,configurable:!0});function M(_,v){if(this instanceof M)return q.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function I(){var _=this;A(_.path,_.flags,_.mode,function(v,S){if(v){if(_.autoClose)_.destroy();_.emit("error",v)}else _.fd=S,_.emit("open",S),_.read()})}function K(_,v){if(this instanceof K)return B.apply(this,arguments),this;else return K.apply(Object.create(K.prototype),arguments)}function N(){var _=this;A(_.path,_.flags,_.mode,function(v,S){if(v)_.destroy(),_.emit("error",v);else _.fd=S,_.emit("open",S)})}function V(_,v){return new D.ReadStream(_,v)}function R(_,v){return new D.WriteStream(_,v)}var x=D.open;D.open=A;function A(_,v,S,h){if(typeof S==="function")h=S,S=null;return b(_,v,S,h);function b(l,f,j,P,u){return x(l,f,j,function(y,c){if(y&&(y.code==="EMFILE"||y.code==="ENFILE"))k9([b,[l,f,j,P],y,u||Date.now(),Date.now()]);else if(typeof P==="function")P.apply(this,arguments)})}}return D}function k9(D){$8("ENQUEUE",D[0].name,D[1]),M0[o0].push(D),RO()}var KY;function Tx(){var D=Date.now();for(var $=0;$<M0[o0].length;++$)if(M0[o0][$].length>2)M0[o0][$][3]=D,M0[o0][$][4]=D;RO()}function RO(){if(clearTimeout(KY),KY=void 0,M0[o0].length===0)return;var D=M0[o0].shift(),$=D[0],X=D[1],Y=D[2],J=D[3],Q=D[4];if(J===void 0)$8("RETRY",$.name,X),$.apply(null,X);else if(Date.now()-J>=60000){$8("TIMEOUT",$.name,X);var F=X.pop();if(typeof F==="function")F.call(null,Y)}else{var Z=Date.now()-Q,w=Math.max(Q-J,1),G=Math.min(w*1.2,100);if(Z>=G)$8("RETRY",$.name,X),$.apply(null,X.concat([J]));else M0[o0].push(D)}if(KY===void 0)KY=setTimeout(RO,0)}});var xx=T((dbD,Px)=>{function e1(D,$){if(typeof $==="boolean")$={forever:$};if(this._originalTimeouts=JSON.parse(JSON.stringify(D)),this._timeouts=D,this._options=$||{},this._maxRetryTime=$&&$.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}Px.exports=e1;e1.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};e1.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};e1.prototype.retry=function(D){if(this._timeout)clearTimeout(this._timeout);if(!D)return!1;var $=new Date().getTime();if(D&&$-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(D);var X=this._timeouts.shift();if(X===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),X=this._timeouts.shift();else return!1;var Y=this,J=setTimeout(function(){if(Y._attempts++,Y._operationTimeoutCb){if(Y._timeout=setTimeout(function(){Y._operationTimeoutCb(Y._attempts)},Y._operationTimeout),Y._options.unref)Y._timeout.unref()}Y._fn(Y._attempts)},X);if(this._options.unref)J.unref();return!0};e1.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};e1.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};e1.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};e1.prototype.start=e1.prototype.try;e1.prototype.errors=function(){return this._errors};e1.prototype.attempts=function(){return this._attempts};e1.prototype.mainError=function(){if(this._errors.length===0)return null;var D={},$=null,X=0;for(var Y=0;Y<this._errors.length;Y++){var J=this._errors[Y],Q=J.message,F=(D[Q]||0)+1;if(D[Q]=F,F>=X)$=J,X=F}return $}});var ux=T((bQD)=>{var yQD=xx();bQD.operation=function(D){var $=bQD.timeouts(D);return new yQD($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};bQD.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in D)$[X]=D[X];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Y=[];for(var J=0;J<$.retries;J++)Y.push(this.createTimeout(J,$));if(D&&D.forever&&!Y.length)Y.push(this.createTimeout(J,$));return Y.sort(function(Q,F){return Q-F}),Y};bQD.createTimeout=function(D,$){var X=$.randomize?Math.random()+1:1,Y=Math.round(X*$.minTimeout*Math.pow($.factor,D));return Y=Math.min(Y,$.maxTimeout),Y};bQD.wrap=function(D,$,X){if($ instanceof Array)X=$,$=null;if(!X){X=[];for(var Y in D)if(typeof D[Y]==="function")X.push(Y)}for(var J=0;J<X.length;J++){var Q=X[J],F=D[Q];D[Q]=function(w){var G=bQD.operation($),U=Array.prototype.slice.call(arguments,1),O=U.pop();U.push(function(z){if(G.retry(z))return;if(z)arguments[0]=G.mainError();O.apply(this,arguments)}),G.attempt(function(){w.apply(D,U)})}.bind(D,F),D[Q].options=$}}});var vx=T((nbD,VY)=>{VY.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")VY.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")VY.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var MY=T((ibD,y9)=>{var K0=global.process,X8=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!X8(K0))y9.exports=function(){return function(){}};else{if(EO=i("assert"),J8=vx(),TO=/^win/i.test(K0.platform),f9=i("events"),typeof f9!=="function")f9=f9.EventEmitter;if(K0.__signal_exit_emitter__)g0=K0.__signal_exit_emitter__;else g0=K0.__signal_exit_emitter__=new f9,g0.count=0,g0.emitted={};if(!g0.infinite)g0.setMaxListeners(1/0),g0.infinite=!0;y9.exports=function(D,$){if(!X8(global.process))return function(){};if(EO.equal(typeof D,"function","a callback must be provided for exit handler"),Y8===!1)NY();var X="exit";if($&&$.alwaysLast)X="afterexit";var Y=function(){if(g0.removeListener(X,D),g0.listeners("exit").length===0&&g0.listeners("afterexit").length===0)q3()};return g0.on(X,D),Y},q3=function(){if(!Y8||!X8(global.process))return;Y8=!1,J8.forEach(function($){try{K0.removeListener($,z3[$])}catch(X){}}),K0.emit=B3,K0.reallyExit=LY,g0.count-=1},y9.exports.unload=q3,l6=function($,X,Y){if(g0.emitted[$])return;g0.emitted[$]=!0,g0.emit($,X,Y)},z3={},J8.forEach(function(D){z3[D]=function(){if(!X8(global.process))return;var X=K0.listeners(D);if(X.length===g0.count){if(q3(),l6("exit",null,D),l6("afterexit",null,D),TO&&D==="SIGHUP")D="SIGINT";K0.kill(K0.pid,D)}}}),y9.exports.signals=function(){return J8},Y8=!1,NY=function(){if(Y8||!X8(global.process))return;Y8=!0,g0.count+=1,J8=J8.filter(function($){try{return K0.on($,z3[$]),!0}catch(X){return!1}}),K0.emit=PO,K0.reallyExit=CO},y9.exports.load=NY,LY=K0.reallyExit,CO=function($){if(!X8(global.process))return;K0.exitCode=$||0,l6("exit",K0.exitCode,null),l6("afterexit",K0.exitCode,null),LY.call(K0,K0.exitCode)},B3=K0.emit,PO=function($,X){if($==="exit"&&X8(global.process)){if(X!==void 0)K0.exitCode=X;var Y=B3.apply(this,arguments);return l6("exit",K0.exitCode,null),l6("afterexit",K0.exitCode,null),Y}else return B3.apply(this,arguments)}}var EO,J8,TO,f9,g0,q3,l6,z3,Y8,NY,LY,CO,B3,PO});var kx=T((lQD,xO)=>{var _x=Symbol();function cQD(D,$,X){let Y=$[_x];if(Y)return $.stat(D,(Q,F)=>{if(Q)return X(Q);X(null,F.mtime,Y)});let J=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,J,J,(Q)=>{if(Q)return X(Q);$.stat(D,(F,Z)=>{if(F)return X(F);let w=Z.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,_x,{value:w}),X(null,Z.mtime,w)})})}function dQD(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}lQD.probe=cQD;lQD.getMtime=dQD});var gx=T((eQD,K3)=>{var pQD=i("path"),vO=S0(),rQD=ux(),oQD=MY(),fx=kx(),Z6={};function W3(D,$){return $.lockfilePath||`${D}.lock`}function _O(D,$,X){if(!$.realpath)return X(null,pQD.resolve(D));$.fs.realpath(D,X)}function uO(D,$,X){let Y=W3(D,$);$.fs.mkdir(Y,(J)=>{if(!J)return fx.probe(Y,$.fs,(Q,F,Z)=>{if(Q)return $.fs.rmdir(Y,()=>{}),X(Q);X(null,F,Z)});if(J.code!=="EEXIST")return X(J);if($.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(Y,(Q,F)=>{if(Q){if(Q.code==="ENOENT")return uO(D,{...$,stale:0},X);return X(Q)}if(!yx(F,$))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));bx(D,$,(Z)=>{if(Z)return X(Z);uO(D,{...$,stale:0},X)})})})}function yx(D,$){return D.mtime.getTime()<Date.now()-$.stale}function bx(D,$,X){$.fs.rmdir(W3(D,$),(Y)=>{if(Y&&Y.code!=="ENOENT")return X(Y);X()})}function IY(D,$){let X=Z6[D];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||$.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,$.fs.stat(X.lockfilePath,(Y,J)=>{let Q=X.lastUpdate+$.stale<Date.now();if(Y){if(Y.code==="ENOENT"||Q)return SO(D,X,Object.assign(Y,{code:"ECOMPROMISED"}));return X.updateDelay=1000,IY(D,$)}if(X.mtime.getTime()!==J.mtime.getTime())return SO(D,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let Z=fx.getMtime(X.mtimePrecision);$.fs.utimes(X.lockfilePath,Z,Z,(w)=>{let G=X.lastUpdate+$.stale<Date.now();if(X.released)return;if(w){if(w.code==="ENOENT"||G)return SO(D,X,Object.assign(w,{code:"ECOMPROMISED"}));return X.updateDelay=1000,IY(D,$)}X.mtime=Z,X.lastUpdate=Date.now(),X.updateDelay=null,IY(D,$)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function SO(D,$,X){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(Z6[D]===$)delete Z6[D];$.options.onCompromised(X)}function aQD(D,$,X){$={stale:1e4,update:null,realpath:!0,retries:0,fs:vO,onCompromised:(Y)=>{throw Y},...$},$.retries=$.retries||0,$.retries=typeof $.retries==="number"?{retries:$.retries}:$.retries,$.stale=Math.max($.stale||0,2000),$.update=$.update==null?$.stale/2:$.update||0,$.update=Math.max(Math.min($.update,$.stale/2),1000),_O(D,$,(Y,J)=>{if(Y)return X(Y);let Q=rQD.operation($.retries);Q.attempt(()=>{uO(J,$,(F,Z,w)=>{if(Q.retry(F))return;if(F)return X(Q.mainError());let G=Z6[J]={lockfilePath:W3(J,$),mtime:Z,mtimePrecision:w,options:$,lastUpdate:Date.now()};IY(J,$),X(null,(U)=>{if(G.released)return U&&U(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));hx(J,{...$,realpath:!1},U)})})})})}function hx(D,$,X){$={fs:vO,realpath:!0,...$},_O(D,$,(Y,J)=>{if(Y)return X(Y);let Q=Z6[J];if(!Q)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Q.updateTimeout&&clearTimeout(Q.updateTimeout),Q.released=!0,delete Z6[J],bx(J,$,X)})}function tQD(D,$,X){$={stale:1e4,realpath:!0,fs:vO,...$},$.stale=Math.max($.stale||0,2000),_O(D,$,(Y,J)=>{if(Y)return X(Y);$.fs.stat(W3(J,$),(Q,F)=>{if(Q)return Q.code==="ENOENT"?X(null,!1):X(Q);return X(null,!yx(F,$))})})}function sQD(){return Z6}oQD(()=>{for(let D in Z6){let $=Z6[D].options;try{$.fs.rmdirSync(W3(D,$))}catch(X){}}});eQD.lock=aQD;eQD.unlock=hx;eQD.check=tQD;eQD.getLocks=sQD});var cx=T((pbD,mx)=>{var YFD=S0();function QFD(D){let $=["mkdir","realpath","stat","rmdir","utimes"],X={...D};return $.forEach((Y)=>{X[Y]=(...J)=>{let Q=J.pop(),F;try{F=D[`${Y}Sync`](...J)}catch(Z){return Q(Z)}Q(null,F)}}),X}function FFD(D){return(...$)=>new Promise((X,Y)=>{$.push((J,Q)=>{if(J)Y(J);else X(Q)}),D(...$)})}function ZFD(D){return(...$)=>{let X,Y;if($.push((J,Q)=>{X=J,Y=Q}),D(...$),X)throw X;return Y}}function wFD(D){if(D={...D},D.fs=QFD(D.fs||YFD),typeof D.retries==="number"&&D.retries>0||D.retries&&typeof D.retries.retries==="number"&&D.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return D}mx.exports={toPromise:FFD,toSync:ZFD,toSyncOptions:wFD}});var lx=T((rbD,n6)=>{var b9=gx(),{toPromise:AY,toSync:RY,toSyncOptions:kO}=cx();async function dx(D,$){let X=await AY(b9.lock)(D,$);return AY(X)}function GFD(D,$){let X=RY(b9.lock)(D,kO($));return RY(X)}function UFD(D,$){return AY(b9.unlock)(D,$)}function OFD(D,$){return RY(b9.unlock)(D,kO($))}function qFD(D,$){return AY(b9.check)(D,$)}function zFD(D,$){return RY(b9.check)(D,kO($))}n6.exports=dx;n6.exports.lock=dx;n6.exports.unlock=UFD;n6.exports.lockSync=GFD;n6.exports.unlockSync=OFD;n6.exports.check=qFD;n6.exports.checkSync=zFD});var tx=T((ox)=>{Object.defineProperty(ox,"__esModule",{value:!0});ox.canStoreURLs=ox.FileUrlStorage=void 0;var nx=i("fs"),BFD=KFD(Nx()),ix=WFD(lx());function rx(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,X=new WeakMap;return(rx=function(Y){return Y?X:$})(D)}function WFD(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var X=rx($);if(X&&X.has(D))return X.get(D);var Y={__proto__:null},J=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Q in D)if(Q!=="default"&&{}.hasOwnProperty.call(D,Q)){var F=J?Object.getOwnPropertyDescriptor(D,Q):null;F&&(F.get||F.set)?Object.defineProperty(Y,Q,F):Y[Q]=D[Q]}return Y.default=D,X&&X.set(D,Y),Y}function KFD(D){return D&&D.__esModule?D:{default:D}}function H3(D){return H3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},H3(D)}function HFD(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function px(D,$){for(var X=0;X<$.length;X++){var Y=$[X];if(Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y)Y.writable=!0;Object.defineProperty(D,NFD(Y.key),Y)}}function VFD(D,$,X){if($)px(D.prototype,$);if(X)px(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function NFD(D){var $=LFD(D,"string");return H3($)=="symbol"?$:$+""}function LFD(D,$){if(H3(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var Y=X.call(D,$||"default");if(H3(Y)!="object")return Y;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var obD=ox.canStoreURLs=!0,abD=ox.FileUrlStorage=function(){function D($){HFD(this,D),this.path=$}return VFD(D,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(Y,J){X._getItems("tus::",function(Q,F){if(Q)J(Q);else Y(F)})})}},{key:"findUploadsByFingerprint",value:function(X){var Y=this;return new Promise(function(J,Q){Y._getItems("tus::".concat(X),function(F,Z){if(F)Q(F);else J(Z)})})}},{key:"removeUpload",value:function(X){var Y=this;return new Promise(function(J,Q){Y._removeItem(X,function(F){if(F)Q(F);else J()})})}},{key:"addUpload",value:function(X,Y){var J=this,Q=Math.round(Math.random()*1000000000000),F="tus::".concat(X,"::").concat(Q);return new Promise(function(Z,w){J._setItem(F,Y,function(G){if(G)w(G);else Z(F)})})}},{key:"_setItem",value:function(X,Y,J){var Q=this;ix.lock(this.path,this._lockfileOptions()).then(function(F){J=Q._releaseAndCb(F,J),Q._getData(function(Z,w){if(Z){J(Z);return}w[X]=Y,Q._writeData(w,function(G){return J(G)})})}).catch(J)}},{key:"_getItems",value:function(X,Y){this._getData(function(J,Q){if(J){Y(J);return}var F=Object.keys(Q).filter(function(Z){return Z.startsWith(X)}).map(function(Z){var w=Q[Z];return w.urlStorageKey=Z,w});Y(null,F)})}},{key:"_removeItem",value:function(X,Y){var J=this;ix.lock(this.path,this._lockfileOptions()).then(function(Q){Y=J._releaseAndCb(Q,Y),J._getData(function(F,Z){if(F){Y(F);return}delete Z[X],J._writeData(Z,function(w){return Y(w)})})}).catch(Y)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,Y){return function(J){if(J){X().then(function(){return Y(J)}).catch(function(Q){return Y((0,BFD.default)([J,Q]))});return}X().then(Y).catch(Y)}}},{key:"_writeData",value:function(X,Y){var J={encoding:"utf8",mode:432,flag:"w"};(0,nx.writeFile)(this.path,JSON.stringify(X),J,function(Q){return Y(Q)})}},{key:"_getData",value:function(X){(0,nx.readFile)(this.path,"utf8",function(Y,J){if(Y){if(Y.code==="ENOENT")X(null,{});else X(Y);return}try{J=!J.trim().length?{}:JSON.parse(J)}catch(Q){X(Q);return}X(null,J)})}}])}()});var EY=T((i6)=>{Object.defineProperty(i6,"__esModule",{value:!0});Object.defineProperty(i6,"DefaultHttpStack",{enumerable:!0,get:function(){return $S.default}});Object.defineProperty(i6,"DetailedError",{enumerable:!0,get:function(){return IFD.default}});Object.defineProperty(i6,"FileUrlStorage",{enumerable:!0,get:function(){return XS.FileUrlStorage}});Object.defineProperty(i6,"StreamSource",{enumerable:!0,get:function(){return TFD.default}});i6.Upload=void 0;Object.defineProperty(i6,"canStoreURLs",{enumerable:!0,get:function(){return XS.canStoreURLs}});i6.defaultOptions=void 0;Object.defineProperty(i6,"enableDebugLog",{enumerable:!0,get:function(){return AFD.enableDebugLog}});i6.isSupported=void 0;var IFD=Q8(kU()),AFD=fU(),RFD=Q8(lT()),fO=Q8(AC()),jFD=Q8(dC()),EFD=Q8(rC()),$S=Q8(UP()),TFD=Q8(pU()),XS=tx();function Q8(D){return D&&D.__esModule?D:{default:D}}function g9(D){return g9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},g9(D)}function CFD(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function sx(D,$){for(var X=0;X<$.length;X++){var Y=$[X];if(Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y)Y.writable=!0;Object.defineProperty(D,YS(Y.key),Y)}}function PFD(D,$,X){if($)sx(D.prototype,$);if(X)sx(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function xFD(D,$,X){return $=jY($),SFD(D,JS()?Reflect.construct($,X||[],jY(D).constructor):$.apply(D,X))}function SFD(D,$){if($&&(g9($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return uFD(D)}function uFD(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function JS(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(JS=function(){return!!D})()}function jY(D){return jY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},jY(D)}function vFD(D,$){if(typeof $!=="function"&&$!==null)throw TypeError("Super expression must either be null or a function");if(D.prototype=Object.create($&&$.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),Object.defineProperty(D,"prototype",{writable:!1}),$)yO(D,$)}function yO(D,$){return yO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Y,J){return Y.__proto__=J,Y},yO(D,$)}function ex(D,$){var X=Object.keys(D);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(D);$&&(Y=Y.filter(function(J){return Object.getOwnPropertyDescriptor(D,J).enumerable})),X.push.apply(X,Y)}return X}function h9(D){for(var $=1;$<arguments.length;$++){var X=arguments[$]!=null?arguments[$]:{};$%2?ex(Object(X),!0).forEach(function(Y){_FD(D,Y,X[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(X)):ex(Object(X)).forEach(function(Y){Object.defineProperty(D,Y,Object.getOwnPropertyDescriptor(X,Y))})}return D}function _FD(D,$,X){if($=YS($),$ in D)Object.defineProperty(D,$,{value:X,enumerable:!0,configurable:!0,writable:!0});else D[$]=X;return D}function YS(D){var $=kFD(D,"string");return g9($)=="symbol"?$:$+""}function kFD(D,$){if(g9(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var Y=X.call(D,$||"default");if(g9(Y)!="object")return Y;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var DS=i6.defaultOptions=h9(h9({},fO.default.defaultOptions),{},{httpStack:new $S.default,fileReader:new jFD.default,urlStorage:new RFD.default,fingerprint:EFD.default}),sbD=i6.Upload=function(D){function $(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return CFD(this,$),Y=h9(h9({},DS),Y),xFD(this,$,[X,Y])}return vFD($,D),PFD($,null,[{key:"terminate",value:function(Y){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return J=h9(h9({},DS),J),fO.default.terminate(Y,J)}}])}(fO.default),ebD=i6.isSupported=!0});var H$;var V3=o(()=>{H$={name:"@capgo/cli",type:"module",version:"7.87.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLI#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/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:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsc --noEmit",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:payload-split":"bun test/test-payload-split.mjs",test:"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:credentials && bun run test:credentials-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split"},devDependencies:{"@antfu/eslint-config":"^7.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.4","@capacitor/cli":"^8.0.0","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.0.0","@modelcontextprotocol/sdk":"^1.25.3","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.79.0","@tanstack/intent":"^0.0.23","@types/adm-zip":"^0.5.7","@types/node":"^25.0.0","@types/prettyjson":"^0.0.33","@types/tmp":"^0.2.6","@vercel/ncc":"^0.38.4","adm-zip":"^0.5.16","ci-info":"^4.3.1",commander:"^14.0.2",eslint:"^9.38.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.0",micromatch:"^4.0.8",open:"^11.0.0",partysocket:"^1.1.11",prettyjson:"^1.2.5",tmp:"^0.2.5","tus-js-client":"^4.3.1",typescript:"^5.9.3",ws:"^8.18.3",zod:"^4.3.6"}}});async function TY(D){try{let X=`https://registry.npmjs.org/${encodeURIComponent(D.toLowerCase())}`,Y=await fetch(X,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!Y.ok)return null;return(await Y.json())["dist-tags"]?.latest||null}catch{return null}}async function F0(){let D=await TY("@capgo/cli")??"",$=D?.split(".")[0];if(D!==H$.version)H.warning(`\uD83D\uDEA8 You are using @capgo/cli@${H$.version} it's not the latest version.
|
|
131
131
|
Please use @capgo/cli@${D}" or @capgo/cli@${$} to keep up to date with the latest features and bug fixes.`)}var O1=o(()=>{vD();V3()});async function wS(D,$,X,Y,J,Q="✅"){await AD(X,{channel:D,event:Y,icon:Q,user_id:$,...J?{tags:{"app-id":J}}:{},notify:!1})}var GS=o(()=>{vD();D6();O1();kD()});import{Buffer as US}from"node:buffer";import{createHash as yFD}from"node:crypto";function hFD(D){let $=4294967295;for(let X=0;X<D.length;X++){let Y=D[X];$=bFD[($^Y)&255]^$>>>8}return $=$^4294967295,($>>>0).toString(16).padStart(8,"0")}async function p6(D,$="sha256"){let X=US.isBuffer(D)?D:US.from(D);if($==="crc32")return hFD(X);let Y=yFD($);return Y.update(X),Y.digest("hex")}var bFD;var N3=o(()=>{bFD=(()=>{let D=[];for(let $=0;$<256;$++){let X=$;for(let Y=0;Y<8;Y++)X=X&1?3988292384^X>>>1:X>>>1;D[$]=X}return D})()});var qS=T((WhD,OS)=>{var m9=1000,c9=m9*60,d9=c9*60,F8=d9*24,gFD=F8*7,mFD=F8*365.25;OS.exports=function(D,$){$=$||{};var X=typeof D;if(X==="string"&&D.length>0)return cFD(D);else if(X==="number"&&isFinite(D))return $.long?lFD(D):dFD(D);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(D))};function cFD(D){if(D=String(D),D.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(D);if(!$)return;var X=parseFloat($[1]),Y=($[2]||"ms").toLowerCase();switch(Y){case"years":case"year":case"yrs":case"yr":case"y":return X*mFD;case"weeks":case"week":case"w":return X*gFD;case"days":case"day":case"d":return X*F8;case"hours":case"hour":case"hrs":case"hr":case"h":return X*d9;case"minutes":case"minute":case"mins":case"min":case"m":return X*c9;case"seconds":case"second":case"secs":case"sec":case"s":return X*m9;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function dFD(D){var $=Math.abs(D);if($>=F8)return Math.round(D/F8)+"d";if($>=d9)return Math.round(D/d9)+"h";if($>=c9)return Math.round(D/c9)+"m";if($>=m9)return Math.round(D/m9)+"s";return D+"ms"}function lFD(D){var $=Math.abs(D);if($>=F8)return CY(D,$,F8,"day");if($>=d9)return CY(D,$,d9,"hour");if($>=c9)return CY(D,$,c9,"minute");if($>=m9)return CY(D,$,m9,"second");return D+" ms"}function CY(D,$,X,Y){var J=$>=X*1.5;return Math.round(D/X)+" "+Y+(J?"s":"")}});var bO=T((KhD,zS)=>{function nFD(D){X.debug=X,X.default=X,X.coerce=w,X.disable=F,X.enable=J,X.enabled=Z,X.humanize=qS(),X.destroy=G,Object.keys(D).forEach((U)=>{X[U]=D[U]}),X.names=[],X.skips=[],X.formatters={};function $(U){let O=0;for(let z=0;z<U.length;z++)O=(O<<5)-O+U.charCodeAt(z),O|=0;return X.colors[Math.abs(O)%X.colors.length]}X.selectColor=$;function X(U){let O,z=null,q,B;function W(...L){if(!W.enabled)return;let M=W,I=Number(new Date),K=I-(O||I);if(M.diff=K,M.prev=O,M.curr=I,O=I,L[0]=X.coerce(L[0]),typeof L[0]!=="string")L.unshift("%O");let N=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,(R,x)=>{if(R==="%%")return"%";N++;let A=X.formatters[x];if(typeof A==="function"){let _=L[N];R=A.call(M,_),L.splice(N,1),N--}return R}),X.formatArgs.call(M,L),(M.log||X.log).apply(M,L)}if(W.namespace=U,W.useColors=X.useColors(),W.color=X.selectColor(U),W.extend=Y,W.destroy=X.destroy,Object.defineProperty(W,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(z!==null)return z;if(q!==X.namespaces)q=X.namespaces,B=X.enabled(U);return B},set:(L)=>{z=L}}),typeof X.init==="function")X.init(W);return W}function Y(U,O){let z=X(this.namespace+(typeof O>"u"?":":O)+U);return z.log=this.log,z}function J(U){X.save(U),X.namespaces=U,X.names=[],X.skips=[];let O=(typeof U==="string"?U:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let z of O)if(z[0]==="-")X.skips.push(z.slice(1));else X.names.push(z)}function Q(U,O){let z=0,q=0,B=-1,W=0;while(z<U.length)if(q<O.length&&(O[q]===U[z]||O[q]==="*"))if(O[q]==="*")B=q,W=z,q++;else z++,q++;else if(B!==-1)q=B+1,W++,z=W;else return!1;while(q<O.length&&O[q]==="*")q++;return q===O.length}function F(){let U=[...X.names,...X.skips.map((O)=>"-"+O)].join(",");return X.enable(""),U}function Z(U){for(let O of X.skips)if(Q(U,O))return!1;for(let O of X.names)if(Q(U,O))return!0;return!1}function w(U){if(U instanceof Error)return U.stack||U.message;return U}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 X.enable(X.load()),X}zS.exports=nFD});var WS=T((BS,PY)=>{BS.formatArgs=pFD;BS.save=rFD;BS.load=oFD;BS.useColors=iFD;BS.storage=aFD();BS.destroy=(()=>{let D=!1;return()=>{if(!D)D=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();BS.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 iFD(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let D;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(D=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(D[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function pFD(D){if(D[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+D[0]+(this.useColors?"%c ":" ")+"+"+PY.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;D.splice(1,0,$,"color: inherit");let X=0,Y=0;D[0].replace(/%[a-zA-Z%]/g,(J)=>{if(J==="%%")return;if(X++,J==="%c")Y=X}),D.splice(Y,0,$)}BS.log=console.debug||console.log||(()=>{});function rFD(D){try{if(D)BS.storage.setItem("debug",D);else BS.storage.removeItem("debug")}catch($){}}function oFD(){let D;try{D=BS.storage.getItem("debug")||BS.storage.getItem("DEBUG")}catch($){}if(!D&&typeof process<"u"&&"env"in process)D=process.env.DEBUG;return D}function aFD(){try{return localStorage}catch(D){}}PY.exports=bO()(BS);var{formatters:tFD}=PY.exports;tFD.j=function(D){try{return JSON.stringify(D)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var HS=T((VhD,KS)=>{KS.exports=(D,$=process.argv)=>{let X=D.startsWith("-")?"":D.length===1?"-":"--",Y=$.indexOf(X+D),J=$.indexOf("--");return Y!==-1&&(J===-1||Y<J)}});var LS=T((NhD,NS)=>{var QZD=i("os"),VS=i("tty"),D$=HS(),{env:n0}=process,r6;if(D$("no-color")||D$("no-colors")||D$("color=false")||D$("color=never"))r6=0;else if(D$("color")||D$("colors")||D$("color=true")||D$("color=always"))r6=1;if("FORCE_COLOR"in n0)if(n0.FORCE_COLOR==="true")r6=1;else if(n0.FORCE_COLOR==="false")r6=0;else r6=n0.FORCE_COLOR.length===0?1:Math.min(parseInt(n0.FORCE_COLOR,10),3);function hO(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function gO(D,$){if(r6===0)return 0;if(D$("color=16m")||D$("color=full")||D$("color=truecolor"))return 3;if(D$("color=256"))return 2;if(D&&!$&&r6===void 0)return 0;let X=r6||0;if(n0.TERM==="dumb")return X;if(process.platform==="win32"){let Y=QZD.release().split(".");if(Number(Y[0])>=10&&Number(Y[2])>=10586)return Number(Y[2])>=14931?3:2;return 1}if("CI"in n0){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((Y)=>(Y in n0))||n0.CI_NAME==="codeship")return 1;return X}if("TEAMCITY_VERSION"in n0)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n0.TEAMCITY_VERSION)?1:0;if(n0.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in n0){let Y=parseInt((n0.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n0.TERM_PROGRAM){case"iTerm.app":return Y>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(n0.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(n0.TERM))return 1;if("COLORTERM"in n0)return 1;return X}function FZD(D){let $=gO(D,D&&D.isTTY);return hO($)}NS.exports={supportsColor:FZD,stdout:hO(gO(!0,VS.isatty(1))),stderr:hO(gO(!0,VS.isatty(2)))}});var RS=T((IS,SY)=>{var ZZD=i("tty"),xY=i("util");IS.init=BZD;IS.log=OZD;IS.formatArgs=GZD;IS.save=qZD;IS.load=zZD;IS.useColors=wZD;IS.destroy=xY.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");IS.colors=[6,2,3,4,5,1];try{let D=LS();if(D&&(D.stderr||D).level>=2)IS.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(D){}IS.inspectOpts=Object.keys(process.env).filter((D)=>{return/^debug_/i.test(D)}).reduce((D,$)=>{let X=$.substring(6).toLowerCase().replace(/_([a-z])/g,(J,Q)=>{return Q.toUpperCase()}),Y=process.env[$];if(/^(yes|on|true|enabled)$/i.test(Y))Y=!0;else if(/^(no|off|false|disabled)$/i.test(Y))Y=!1;else if(Y==="null")Y=null;else Y=Number(Y);return D[X]=Y,D},{});function wZD(){return"colors"in IS.inspectOpts?Boolean(IS.inspectOpts.colors):ZZD.isatty(process.stderr.fd)}function GZD(D){let{namespace:$,useColors:X}=this;if(X){let Y=this.color,J="\x1B[3"+(Y<8?Y:"8;5;"+Y),Q=` ${J};1m${$} \x1B[0m`;D[0]=Q+D[0].split(`
|
|
132
132
|
`).join(`
|
|
133
133
|
`+Q),D.push(J+"m+"+SY.exports.humanize(this.diff)+"\x1B[0m")}else D[0]=UZD()+$+" "+D[0]}function UZD(){if(IS.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function OZD(...D){return process.stderr.write(xY.formatWithOptions(IS.inspectOpts,...D)+`
|
|
@@ -233,15 +233,19 @@ export type Database = {
|
|
|
233
233
|
};
|
|
234
234
|
apps: {
|
|
235
235
|
Row: {
|
|
236
|
+
android_store_url: string | null;
|
|
236
237
|
app_id: string;
|
|
237
238
|
channel_device_count: number;
|
|
238
239
|
created_at: string | null;
|
|
239
240
|
default_upload_channel: string;
|
|
241
|
+
existing_app: boolean;
|
|
240
242
|
expose_metadata: boolean;
|
|
241
243
|
icon_url: string;
|
|
242
244
|
id: string | null;
|
|
245
|
+
ios_store_url: string | null;
|
|
243
246
|
last_version: string | null;
|
|
244
247
|
manifest_bundle_count: number;
|
|
248
|
+
need_onboarding: boolean;
|
|
245
249
|
name: string | null;
|
|
246
250
|
owner_org: string;
|
|
247
251
|
retention: number;
|
|
@@ -250,15 +254,19 @@ export type Database = {
|
|
|
250
254
|
user_id: string | null;
|
|
251
255
|
};
|
|
252
256
|
Insert: {
|
|
257
|
+
android_store_url?: string | null;
|
|
253
258
|
app_id: string;
|
|
254
259
|
channel_device_count?: number;
|
|
255
260
|
created_at?: string | null;
|
|
256
261
|
default_upload_channel?: string;
|
|
262
|
+
existing_app?: boolean;
|
|
257
263
|
expose_metadata?: boolean;
|
|
258
264
|
icon_url: string;
|
|
259
265
|
id?: string | null;
|
|
266
|
+
ios_store_url?: string | null;
|
|
260
267
|
last_version?: string | null;
|
|
261
268
|
manifest_bundle_count?: number;
|
|
269
|
+
need_onboarding?: boolean;
|
|
262
270
|
name?: string | null;
|
|
263
271
|
owner_org: string;
|
|
264
272
|
retention?: number;
|
|
@@ -267,15 +275,19 @@ export type Database = {
|
|
|
267
275
|
user_id?: string | null;
|
|
268
276
|
};
|
|
269
277
|
Update: {
|
|
278
|
+
android_store_url?: string | null;
|
|
270
279
|
app_id?: string;
|
|
271
280
|
channel_device_count?: number;
|
|
272
281
|
created_at?: string | null;
|
|
273
282
|
default_upload_channel?: string;
|
|
283
|
+
existing_app?: boolean;
|
|
274
284
|
expose_metadata?: boolean;
|
|
275
285
|
icon_url?: string;
|
|
276
286
|
id?: string | null;
|
|
287
|
+
ios_store_url?: string | null;
|
|
277
288
|
last_version?: string | null;
|
|
278
289
|
manifest_bundle_count?: number;
|
|
290
|
+
need_onboarding?: boolean;
|
|
279
291
|
name?: string | null;
|
|
280
292
|
owner_org?: string;
|
|
281
293
|
retention?: number;
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -350,15 +350,19 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
350
350
|
};
|
|
351
351
|
apps: {
|
|
352
352
|
Row: {
|
|
353
|
+
android_store_url: string | null;
|
|
353
354
|
app_id: string;
|
|
354
355
|
channel_device_count: number;
|
|
355
356
|
created_at: string | null;
|
|
356
357
|
default_upload_channel: string;
|
|
358
|
+
existing_app: boolean;
|
|
357
359
|
expose_metadata: boolean;
|
|
358
360
|
icon_url: string;
|
|
359
361
|
id: string | null;
|
|
362
|
+
ios_store_url: string | null;
|
|
360
363
|
last_version: string | null;
|
|
361
364
|
manifest_bundle_count: number;
|
|
365
|
+
need_onboarding: boolean;
|
|
362
366
|
name: string | null;
|
|
363
367
|
owner_org: string;
|
|
364
368
|
retention: number;
|
|
@@ -367,15 +371,19 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
367
371
|
user_id: string | null;
|
|
368
372
|
};
|
|
369
373
|
Insert: {
|
|
374
|
+
android_store_url?: string | null;
|
|
370
375
|
app_id: string;
|
|
371
376
|
channel_device_count?: number;
|
|
372
377
|
created_at?: string | null;
|
|
373
378
|
default_upload_channel?: string;
|
|
379
|
+
existing_app?: boolean;
|
|
374
380
|
expose_metadata?: boolean;
|
|
375
381
|
icon_url: string;
|
|
376
382
|
id?: string | null;
|
|
383
|
+
ios_store_url?: string | null;
|
|
377
384
|
last_version?: string | null;
|
|
378
385
|
manifest_bundle_count?: number;
|
|
386
|
+
need_onboarding?: boolean;
|
|
379
387
|
name?: string | null;
|
|
380
388
|
owner_org: string;
|
|
381
389
|
retention?: number;
|
|
@@ -384,15 +392,19 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
384
392
|
user_id?: string | null;
|
|
385
393
|
};
|
|
386
394
|
Update: {
|
|
395
|
+
android_store_url?: string | null;
|
|
387
396
|
app_id?: string;
|
|
388
397
|
channel_device_count?: number;
|
|
389
398
|
created_at?: string | null;
|
|
390
399
|
default_upload_channel?: string;
|
|
400
|
+
existing_app?: boolean;
|
|
391
401
|
expose_metadata?: boolean;
|
|
392
402
|
icon_url?: string;
|
|
393
403
|
id?: string | null;
|
|
404
|
+
ios_store_url?: string | null;
|
|
394
405
|
last_version?: string | null;
|
|
395
406
|
manifest_bundle_count?: number;
|
|
407
|
+
need_onboarding?: boolean;
|
|
396
408
|
name?: string | null;
|
|
397
409
|
owner_org?: string;
|
|
398
410
|
retention?: number;
|
|
@@ -1889,9 +1901,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1889
1901
|
credits_estimated: number;
|
|
1890
1902
|
details?: import("./types/supabase.types").Json | null;
|
|
1891
1903
|
id?: string;
|
|
1892
|
-
metric: Database["public"]["Enums"]
|
|
1893
|
-
* Read directory recursively and return full paths for all files
|
|
1894
|
-
*/["credit_metric_type"];
|
|
1904
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1895
1905
|
org_id: string;
|
|
1896
1906
|
overage_amount: number;
|
|
1897
1907
|
};
|
|
@@ -1942,7 +1952,13 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1942
1952
|
validated_at?: string;
|
|
1943
1953
|
};
|
|
1944
1954
|
Update: {
|
|
1945
|
-
created_at
|
|
1955
|
+
created_at
|
|
1956
|
+
/**
|
|
1957
|
+
* Calculate checksums for iOS and Android native code in a dependency folder.
|
|
1958
|
+
* Includes both native source files and platform configuration files
|
|
1959
|
+
* (podspec, Package.swift, build.gradle) that define platform dependencies.
|
|
1960
|
+
*/
|
|
1961
|
+
?: string;
|
|
1946
1962
|
id?: number;
|
|
1947
1963
|
org_id?: string;
|
|
1948
1964
|
policy_hash?: string;
|