@capgo/cli 7.72.1 → 7.72.2

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.
Files changed (51) hide show
  1. package/dist/index.js +390 -378
  2. package/dist/package.json +3 -3
  3. package/dist/src/api/app.d.ts +1 -7
  4. package/dist/src/api/channels.d.ts +6 -10
  5. package/dist/src/api/crypto.d.ts +2 -4
  6. package/dist/src/app/add.d.ts +3 -3
  7. package/dist/src/app/debug.d.ts +3 -6
  8. package/dist/src/app/delete.d.ts +1 -1
  9. package/dist/src/app/list.d.ts +1 -1
  10. package/dist/src/app/setting.d.ts +3 -8
  11. package/dist/src/build/credentials.d.ts +2 -23
  12. package/dist/src/build/request.d.ts +2 -70
  13. package/dist/src/bundle/cleanup.d.ts +3 -11
  14. package/dist/src/bundle/compatibility.d.ts +4 -9
  15. package/dist/src/bundle/decrypt.d.ts +4 -13
  16. package/dist/src/bundle/delete.d.ts +3 -7
  17. package/dist/src/bundle/encrypt.d.ts +4 -14
  18. package/dist/src/bundle/list.d.ts +1 -1
  19. package/dist/src/bundle/releaseType.d.ts +3 -8
  20. package/dist/src/bundle/unlink.d.ts +3 -8
  21. package/dist/src/bundle/upload.d.ts +2 -12
  22. package/dist/src/bundle/upload_interface.d.ts +2 -50
  23. package/dist/src/bundle/zip.d.ts +4 -18
  24. package/dist/src/channel/add.d.ts +3 -8
  25. package/dist/src/channel/currentBundle.d.ts +3 -8
  26. package/dist/src/channel/delete.d.ts +3 -8
  27. package/dist/src/channel/list.d.ts +31 -3
  28. package/dist/src/channel/set.d.ts +2 -18
  29. package/dist/src/config/index.d.ts +2 -12
  30. package/dist/src/organization/add.d.ts +3 -8
  31. package/dist/src/organization/delete.d.ts +3 -7
  32. package/dist/src/organization/list.d.ts +1 -1
  33. package/dist/src/organization/members.d.ts +1 -1
  34. package/dist/src/organization/set.d.ts +3 -17
  35. package/dist/src/schemas/app.d.ts +26 -0
  36. package/dist/src/schemas/base.d.ts +7 -0
  37. package/dist/src/schemas/build.d.ts +151 -0
  38. package/dist/src/schemas/bundle.d.ts +159 -0
  39. package/dist/src/schemas/channel.d.ts +62 -0
  40. package/dist/src/schemas/common.d.ts +55 -0
  41. package/dist/src/schemas/config.d.ts +20 -0
  42. package/dist/src/schemas/crypto.d.ts +6 -0
  43. package/dist/src/schemas/index.d.ts +21 -0
  44. package/dist/src/schemas/organization.d.ts +41 -0
  45. package/dist/src/schemas/sdk.d.ts +324 -0
  46. package/dist/src/schemas/validate.d.ts +12 -0
  47. package/dist/src/sdk.d.ts +14 -354
  48. package/dist/src/sdk.js +330 -291
  49. package/dist/src/utils/security_policy_errors.d.ts +2 -5
  50. package/dist/src/utils.d.ts +56 -40
  51. package/package.json +3 -3
@@ -15,11 +15,8 @@ export declare const SECURITY_POLICY_ERRORS: {
15
15
  };
16
16
  export type SecurityPolicyErrorCode = typeof SECURITY_POLICY_ERRORS[keyof typeof SECURITY_POLICY_ERRORS];
17
17
  export declare const SECURITY_POLICY_MESSAGES: Record<string, string>;
18
- export interface ParsedSecurityError {
19
- isSecurityPolicyError: boolean;
20
- errorCode: string;
21
- message: string;
22
- }
18
+ export type { ParsedSecurityError } from '../schemas/common';
19
+ type ParsedSecurityError = import('../schemas/common').ParsedSecurityError;
23
20
  /**
24
21
  * Check if an error code is a security policy error.
25
22
  */
@@ -3,6 +3,7 @@ import type { SemVer } from '@std/semver';
3
3
  import type { SupabaseClient } from '@supabase/supabase-js';
4
4
  import type { Buffer } from 'node:buffer';
5
5
  import type { CapacitorConfig, ExtConfigPairs } from './config';
6
+ import type { Compatibility, CompatibilityDetails, NativePackage } from './schemas/common';
6
7
  import type { Database } from './types/supabase.types';
7
8
  import { spinner as spinnerC } from '@clack/prompts';
8
9
  export declare const baseKey = ".capgo_key";
@@ -79,11 +80,7 @@ interface TrackOptions {
79
80
  */
80
81
  timestamp?: number | Date;
81
82
  }
82
- export interface OptionsBase {
83
- apikey: string;
84
- supaHost?: string;
85
- supaAnon?: string;
86
- }
83
+ export type { OptionsBase } from './schemas/base';
87
84
  export declare function wait(ms: number): Promise<unknown>;
88
85
  export declare function projectIsMonorepo(dir: string): boolean;
89
86
  export declare function findRoot(dir: string): string;
@@ -103,7 +100,17 @@ export declare function getBundleVersion(f?: string, file?: string | undefined):
103
100
  */
104
101
  export declare function getInstalledVersion(packageName: string, rootDir?: string, packageJsonPath?: string): Promise<string | null>;
105
102
  export declare function getAllPackagesDependencies(f?: string, file?: string | undefined): Promise<Map<string, string>>;
106
- export declare function getConfig(): Promise<ExtConfigPairs>;
103
+ export declare function getConfig(): Promise<{
104
+ config: {
105
+ [x: string]: unknown;
106
+ appId: string;
107
+ appName: string;
108
+ webDir: string;
109
+ plugins?: Record<string, any> | undefined;
110
+ android?: Record<string, any> | undefined;
111
+ };
112
+ path: string;
113
+ }>;
107
114
  export declare function updateConfigbyKey(key: string, newConfig: any): Promise<ExtConfigPairs>;
108
115
  export declare function updateConfigUpdater(newConfig: any): Promise<ExtConfigPairs>;
109
116
  export declare function getLocalConfig(): Promise<CapgoConfig>;
@@ -251,12 +258,20 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
251
258
  native_packages?: import("./types/supabase.types").Json[] | null;
252
259
  owner_org: string;
253
260
  r2_path?: string | null;
254
- session_key?: string | null;
261
+ session_key
262
+ /**
263
+ * Event description
264
+ * example: "joe@example.com joined waitlist"
265
+ */
266
+ ? /**
267
+ * Event description
268
+ * example: "joe@example.com joined waitlist"
269
+ */: string | null;
255
270
  storage_provider?: string;
256
271
  updated_at?: string | null;
257
272
  user_id? /**
258
- * Event tags
259
- * example: { username: "mattie" }
273
+ * User ID
274
+ * example: "user-123"
260
275
  */: string | null;
261
276
  };
262
277
  Update: {
@@ -3613,12 +3628,7 @@ export declare function generateManifest(path: string): Promise<{
3613
3628
  hash: string;
3614
3629
  }[]>;
3615
3630
  export type manifestType = Awaited<ReturnType<typeof generateManifest>>;
3616
- export interface uploadUrlsType {
3617
- path: string;
3618
- hash: string;
3619
- uploadLink: string;
3620
- finalPath: string;
3621
- }
3631
+ export type { uploadUrlsType } from './schemas/common';
3622
3632
  export declare function zipFile(filePath: string): Promise<Buffer>;
3623
3633
  export declare function zipFileUnix(filePath: string): Buffer<ArrayBufferLike>;
3624
3634
  export declare function zipFileWindows(filePath: string): Promise<Buffer>;
@@ -3667,30 +3677,16 @@ export declare function getLocalDependencies(packageJsonPath: string | undefined
3667
3677
  android_checksum?: string;
3668
3678
  }[]>;
3669
3679
  export declare function getRemoteChecksums(supabase: SupabaseClient<Database>, appId: string, channel: string): Promise<string | null>;
3670
- export interface NativePackage {
3680
+ export type { NativePackage } from './schemas/common';
3681
+ export declare function convertNativePackages(nativePackages: NativePackage[]): Map<string, NativePackage>;
3682
+ export declare function getRemoteDependencies(supabase: SupabaseClient<Database>, appId: string, channel: string): Promise<Map<string, {
3671
3683
  name: string;
3672
3684
  version: string;
3673
- ios_checksum?: string;
3674
- android_checksum?: string;
3675
- }
3676
- export declare function convertNativePackages(nativePackages: NativePackage[]): Map<string, NativePackage>;
3677
- export declare function getRemoteDependencies(supabase: SupabaseClient<Database>, appId: string, channel: string): Promise<Map<string, NativePackage>>;
3685
+ ios_checksum?: string | undefined;
3686
+ android_checksum?: string | undefined;
3687
+ }>>;
3678
3688
  export declare function checkChecksum(supabase: SupabaseClient<Database>, appId: string, channel: string, currentChecksum: string): Promise<void>;
3679
- export interface Compatibility {
3680
- name: string;
3681
- localVersion: string | undefined;
3682
- remoteVersion: string | undefined;
3683
- localIosChecksum?: string;
3684
- remoteIosChecksum?: string;
3685
- localAndroidChecksum?: string;
3686
- remoteAndroidChecksum?: string;
3687
- }
3688
- export type IncompatibilityReason = 'new_plugin' | 'removed_plugin' | 'version_mismatch' | 'ios_code_changed' | 'android_code_changed' | 'both_platforms_changed';
3689
- export interface CompatibilityDetails {
3690
- compatible: boolean;
3691
- reasons: IncompatibilityReason[];
3692
- message: string;
3693
- }
3689
+ export type { Compatibility, CompatibilityDetails, IncompatibilityReason } from './schemas/common';
3694
3690
  export declare function getAppId(appId: string | undefined, config: CapacitorConfig | undefined): any;
3695
3691
  /**
3696
3692
  * Check if a package is compatible and return detailed reasons if not
@@ -3701,7 +3697,15 @@ export declare function getCompatibilityDetails(pkg: Compatibility): Compatibili
3701
3697
  */
3702
3698
  export declare function isCompatible(pkg: Compatibility): boolean;
3703
3699
  export declare function checkCompatibilityCloud(supabase: SupabaseClient<Database>, appId: string, channel: string, packageJsonPath: string | undefined, nodeModules: string | undefined): Promise<{
3704
- finalCompatibility: Compatibility[];
3700
+ finalCompatibility: {
3701
+ name: string;
3702
+ localVersion?: string | undefined;
3703
+ remoteVersion?: string | undefined;
3704
+ localIosChecksum?: string | undefined;
3705
+ remoteIosChecksum?: string | undefined;
3706
+ localAndroidChecksum?: string | undefined;
3707
+ remoteAndroidChecksum?: string | undefined;
3708
+ }[];
3705
3709
  localDependencies: {
3706
3710
  name: string;
3707
3711
  version: string;
@@ -3711,8 +3715,20 @@ export declare function checkCompatibilityCloud(supabase: SupabaseClient<Databas
3711
3715
  }[];
3712
3716
  }>;
3713
3717
  export declare function checkCompatibilityNativePackages(supabase: SupabaseClient<Database>, appId: string, channel: string, nativePackages: NativePackage[]): Promise<{
3714
- finalCompatibility: Compatibility[];
3715
- localDependencies: NativePackage[];
3718
+ finalCompatibility: {
3719
+ name: string;
3720
+ localVersion?: string | undefined;
3721
+ remoteVersion?: string | undefined;
3722
+ localIosChecksum?: string | undefined;
3723
+ remoteIosChecksum?: string | undefined;
3724
+ localAndroidChecksum?: string | undefined;
3725
+ remoteAndroidChecksum?: string | undefined;
3726
+ }[];
3727
+ localDependencies: {
3728
+ name: string;
3729
+ version: string;
3730
+ ios_checksum?: string | undefined;
3731
+ android_checksum?: string | undefined;
3732
+ }[];
3716
3733
  }>;
3717
3734
  export declare function promptAndSyncCapacitor(isInit?: boolean, orgId?: string, apikey?: string): Promise<void>;
3718
- export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "7.72.1",
4
+ "version": "7.72.2",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -75,7 +75,7 @@
75
75
  "@capacitor/cli": "^8.0.0",
76
76
  "@capgo/find-package-manager": "^0.0.18",
77
77
  "@clack/prompts": "^1.0.0",
78
- "@modelcontextprotocol/sdk": "^1.0.0",
78
+ "@modelcontextprotocol/sdk": "^1.25.3",
79
79
  "@sauber/table": "npm:@jsr/sauber__table",
80
80
  "@std/semver": "npm:@jsr/std__semver@1.0.6",
81
81
  "@supabase/supabase-js": "^2.79.0",
@@ -97,6 +97,6 @@
97
97
  "tmp": "^0.2.5",
98
98
  "tus-js-client": "^4.3.1",
99
99
  "typescript": "^5.9.3",
100
- "zod": "^3.24.0"
100
+ "zod": "^4.3.6"
101
101
  }
102
102
  }