@capgo/cli 7.76.8 → 7.78.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "7.76.8",
4
+ "version": "7.78.0",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -0,0 +1,43 @@
1
+ export declare const updateProbeDeviceId = "00000000-0000-0000-0000-000000000000";
2
+ interface UpdateProbePayload {
3
+ app_id: string;
4
+ device_id: string;
5
+ version_name: string;
6
+ version_build: string;
7
+ is_emulator: boolean;
8
+ is_prod: boolean;
9
+ platform: 'ios' | 'android';
10
+ plugin_version: string;
11
+ defaultChannel: string;
12
+ }
13
+ export interface PreparedUpdateProbe {
14
+ endpoint: string;
15
+ payload: UpdateProbePayload;
16
+ nativeSource: string;
17
+ versionBuildSource: string;
18
+ appIdSource: string;
19
+ }
20
+ export type PrepareUpdateProbeResult = {
21
+ ok: true;
22
+ context: PreparedUpdateProbe;
23
+ } | {
24
+ ok: false;
25
+ error: string;
26
+ };
27
+ export type UpdateProbeResult = {
28
+ success: true;
29
+ availableVersion: string;
30
+ } | {
31
+ success: false;
32
+ reason: string;
33
+ backendRefusal: boolean;
34
+ errorCode?: string;
35
+ backendMessage?: string;
36
+ extra?: Record<string, unknown>;
37
+ };
38
+ export declare function prepareUpdateProbe(platform: 'ios' | 'android', capConfig: any): Promise<PrepareUpdateProbeResult>;
39
+ export declare function singleProbeRequest(endpoint: string, payload: UpdateProbePayload): Promise<UpdateProbeResult>;
40
+ export declare function explainCommonUpdateError(result: Extract<UpdateProbeResult, {
41
+ success: false;
42
+ }>): string[];
43
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { UpdateProbeResult } from './app/updateProbe';
2
+ interface ProbeOptions {
3
+ platform?: string;
4
+ }
5
+ export interface ProbeInternalResult {
6
+ success: boolean;
7
+ error?: string;
8
+ probeResult?: UpdateProbeResult;
9
+ endpoint?: string;
10
+ platform?: 'ios' | 'android';
11
+ versionBuild?: string;
12
+ versionBuildSource?: string;
13
+ appId?: string;
14
+ appIdSource?: string;
15
+ nativeSource?: string;
16
+ hints?: string[];
17
+ }
18
+ export declare function probeInternal(options: ProbeOptions): Promise<ProbeInternalResult>;
19
+ export declare function probe(options: ProbeOptions): Promise<void>;
20
+ export {};
@@ -9,6 +9,8 @@ export declare const buildCredentialsSchema: z.ZodObject<{
9
9
  APPLE_KEY_CONTENT: z.ZodOptional<z.ZodString>;
10
10
  APPLE_PROFILE_NAME: z.ZodOptional<z.ZodString>;
11
11
  APP_STORE_CONNECT_TEAM_ID: z.ZodOptional<z.ZodString>;
12
+ CAPGO_IOS_SCHEME: z.ZodOptional<z.ZodString>;
13
+ CAPGO_IOS_TARGET: z.ZodOptional<z.ZodString>;
12
14
  ANDROID_KEYSTORE_FILE: z.ZodOptional<z.ZodString>;
13
15
  KEYSTORE_KEY_ALIAS: z.ZodOptional<z.ZodString>;
14
16
  KEYSTORE_KEY_PASSWORD: z.ZodOptional<z.ZodString>;
@@ -41,6 +43,8 @@ export declare const buildRequestOptionsSchema: z.ZodObject<{
41
43
  appleKeyContent: z.ZodOptional<z.ZodString>;
42
44
  appleProfileName: z.ZodOptional<z.ZodString>;
43
45
  appStoreConnectTeamId: z.ZodOptional<z.ZodString>;
46
+ iosScheme: z.ZodOptional<z.ZodString>;
47
+ iosTarget: z.ZodOptional<z.ZodString>;
44
48
  androidKeystoreFile: z.ZodOptional<z.ZodString>;
45
49
  keystoreKeyAlias: z.ZodOptional<z.ZodString>;
46
50
  keystoreKeyPassword: z.ZodOptional<z.ZodString>;
@@ -94,6 +98,8 @@ export declare const savedCredentialsSchema: z.ZodObject<{
94
98
  APPLE_KEY_CONTENT: z.ZodOptional<z.ZodOptional<z.ZodString>>;
95
99
  APPLE_PROFILE_NAME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
96
100
  APP_STORE_CONNECT_TEAM_ID: z.ZodOptional<z.ZodOptional<z.ZodString>>;
101
+ CAPGO_IOS_SCHEME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
102
+ CAPGO_IOS_TARGET: z.ZodOptional<z.ZodOptional<z.ZodString>>;
97
103
  ANDROID_KEYSTORE_FILE: z.ZodOptional<z.ZodOptional<z.ZodString>>;
98
104
  KEYSTORE_KEY_ALIAS: z.ZodOptional<z.ZodOptional<z.ZodString>>;
99
105
  KEYSTORE_KEY_PASSWORD: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -112,6 +118,8 @@ export declare const savedCredentialsSchema: z.ZodObject<{
112
118
  APPLE_KEY_CONTENT: z.ZodOptional<z.ZodOptional<z.ZodString>>;
113
119
  APPLE_PROFILE_NAME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
114
120
  APP_STORE_CONNECT_TEAM_ID: z.ZodOptional<z.ZodOptional<z.ZodString>>;
121
+ CAPGO_IOS_SCHEME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
122
+ CAPGO_IOS_TARGET: z.ZodOptional<z.ZodOptional<z.ZodString>>;
115
123
  ANDROID_KEYSTORE_FILE: z.ZodOptional<z.ZodOptional<z.ZodString>>;
116
124
  KEYSTORE_KEY_ALIAS: z.ZodOptional<z.ZodOptional<z.ZodString>>;
117
125
  KEYSTORE_KEY_PASSWORD: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -133,6 +141,8 @@ export declare const allCredentialsSchema: z.ZodRecord<z.ZodString, z.ZodObject<
133
141
  APPLE_KEY_CONTENT: z.ZodOptional<z.ZodOptional<z.ZodString>>;
134
142
  APPLE_PROFILE_NAME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
135
143
  APP_STORE_CONNECT_TEAM_ID: z.ZodOptional<z.ZodOptional<z.ZodString>>;
144
+ CAPGO_IOS_SCHEME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
145
+ CAPGO_IOS_TARGET: z.ZodOptional<z.ZodOptional<z.ZodString>>;
136
146
  ANDROID_KEYSTORE_FILE: z.ZodOptional<z.ZodOptional<z.ZodString>>;
137
147
  KEYSTORE_KEY_ALIAS: z.ZodOptional<z.ZodOptional<z.ZodString>>;
138
148
  KEYSTORE_KEY_PASSWORD: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -151,6 +161,8 @@ export declare const allCredentialsSchema: z.ZodRecord<z.ZodString, z.ZodObject<
151
161
  APPLE_KEY_CONTENT: z.ZodOptional<z.ZodOptional<z.ZodString>>;
152
162
  APPLE_PROFILE_NAME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
153
163
  APP_STORE_CONNECT_TEAM_ID: z.ZodOptional<z.ZodOptional<z.ZodString>>;
164
+ CAPGO_IOS_SCHEME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
165
+ CAPGO_IOS_TARGET: z.ZodOptional<z.ZodOptional<z.ZodString>>;
154
166
  ANDROID_KEYSTORE_FILE: z.ZodOptional<z.ZodOptional<z.ZodString>>;
155
167
  KEYSTORE_KEY_ALIAS: z.ZodOptional<z.ZodOptional<z.ZodString>>;
156
168
  KEYSTORE_KEY_PASSWORD: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -261,6 +261,8 @@ export declare const requestBuildOptionsSchema: z.ZodObject<{
261
261
  APPLE_KEY_CONTENT: z.ZodOptional<z.ZodString>;
262
262
  APPLE_PROFILE_NAME: z.ZodOptional<z.ZodString>;
263
263
  APP_STORE_CONNECT_TEAM_ID: z.ZodOptional<z.ZodString>;
264
+ CAPGO_IOS_SCHEME: z.ZodOptional<z.ZodString>;
265
+ CAPGO_IOS_TARGET: z.ZodOptional<z.ZodString>;
264
266
  ANDROID_KEYSTORE_FILE: z.ZodOptional<z.ZodString>;
265
267
  KEYSTORE_KEY_ALIAS: z.ZodOptional<z.ZodString>;
266
268
  KEYSTORE_KEY_PASSWORD: z.ZodOptional<z.ZodString>;
@@ -324,3 +326,10 @@ export declare const deviceStatsSchema: z.ZodObject<{
324
326
  createdAt: z.ZodString;
325
327
  }, z.core.$strip>;
326
328
  export type DeviceStats = z.infer<typeof deviceStatsSchema>;
329
+ export declare const probeOptionsSchema: z.ZodObject<{
330
+ platform: z.ZodEnum<{
331
+ ios: "ios";
332
+ android: "android";
333
+ }>;
334
+ }, z.core.$strip>;
335
+ export type ProbeOptions = z.infer<typeof probeOptionsSchema>;
package/dist/src/sdk.d.ts CHANGED
@@ -2,7 +2,8 @@ import type { Channel } from './api/channels';
2
2
  import type { DecryptResult } from './bundle/decrypt';
3
3
  import type { EncryptResult } from './bundle/encrypt';
4
4
  import type { ZipResult } from './bundle/zip';
5
- import type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, OrganizationInfo, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions } from './schemas/sdk';
5
+ import type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, OrganizationInfo, ProbeOptions, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions } from './schemas/sdk';
6
+ import type { ProbeInternalResult } from './probe';
6
7
  import { getInfoInternal } from './app/info';
7
8
  import { checkCompatibilityInternal } from './bundle/compatibility';
8
9
  export type DoctorInfo = Awaited<ReturnType<typeof getInfoInternal>>;
@@ -318,6 +319,7 @@ export declare class CapgoSDK {
318
319
  */
319
320
  getStats(options: GetStatsOptions): Promise<SDKResult<DeviceStats[]>>;
320
321
  setAppSetting(path: string, options: SetSettingOptions): Promise<SDKResult>;
322
+ probe(options: ProbeOptions): Promise<SDKResult<ProbeInternalResult>>;
321
323
  }
322
324
  /**
323
325
  * Upload a bundle to Capgo Cloud (functional API)
@@ -459,6 +461,7 @@ export declare function requestBuild(options: RequestBuildOptions): Promise<SDKR
459
461
  * ```
460
462
  */
461
463
  export declare function getStats(options: GetStatsOptions): Promise<SDKResult<DeviceStats[]>>;
464
+ export declare function probeUpdates(options: ProbeOptions): Promise<SDKResult<ProbeInternalResult>>;
462
465
  /**
463
466
  * Get Capacitor configuration
464
467
  *
@@ -482,7 +485,9 @@ export declare function getCapacitorConfig(): Promise<{
482
485
  path: string;
483
486
  } | null>;
484
487
  export type { CapacitorConfig } from './config';
485
- export type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, OrganizationInfo, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './schemas/sdk';
488
+ export type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, OrganizationInfo, ProbeOptions, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './schemas/sdk';
489
+ export type { UpdateProbeResult } from './app/updateProbe';
490
+ export type { ProbeInternalResult } from './probe';
486
491
  export type { Database } from './types/supabase.types';
487
492
  export { createSupabaseClient } from './utils';
488
493
  export { formatApiErrorForCli, getSecurityPolicyMessage, isSecurityPolicyError, parseSecurityPolicyError, SECURITY_POLICY_ERRORS, SECURITY_POLICY_MESSAGES, } from './utils/security_policy_errors';