@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.
- package/dist/index.js +390 -378
- package/dist/package.json +3 -3
- package/dist/src/api/app.d.ts +1 -7
- package/dist/src/api/channels.d.ts +6 -10
- package/dist/src/api/crypto.d.ts +2 -4
- package/dist/src/app/add.d.ts +3 -3
- package/dist/src/app/debug.d.ts +3 -6
- package/dist/src/app/delete.d.ts +1 -1
- package/dist/src/app/list.d.ts +1 -1
- package/dist/src/app/setting.d.ts +3 -8
- package/dist/src/build/credentials.d.ts +2 -23
- package/dist/src/build/request.d.ts +2 -70
- package/dist/src/bundle/cleanup.d.ts +3 -11
- package/dist/src/bundle/compatibility.d.ts +4 -9
- package/dist/src/bundle/decrypt.d.ts +4 -13
- package/dist/src/bundle/delete.d.ts +3 -7
- package/dist/src/bundle/encrypt.d.ts +4 -14
- package/dist/src/bundle/list.d.ts +1 -1
- package/dist/src/bundle/releaseType.d.ts +3 -8
- package/dist/src/bundle/unlink.d.ts +3 -8
- package/dist/src/bundle/upload.d.ts +2 -12
- package/dist/src/bundle/upload_interface.d.ts +2 -50
- package/dist/src/bundle/zip.d.ts +4 -18
- package/dist/src/channel/add.d.ts +3 -8
- package/dist/src/channel/currentBundle.d.ts +3 -8
- package/dist/src/channel/delete.d.ts +3 -8
- package/dist/src/channel/list.d.ts +31 -3
- package/dist/src/channel/set.d.ts +2 -18
- package/dist/src/config/index.d.ts +2 -12
- package/dist/src/organization/add.d.ts +3 -8
- package/dist/src/organization/delete.d.ts +3 -7
- package/dist/src/organization/list.d.ts +1 -1
- package/dist/src/organization/members.d.ts +1 -1
- package/dist/src/organization/set.d.ts +3 -17
- package/dist/src/schemas/app.d.ts +26 -0
- package/dist/src/schemas/base.d.ts +7 -0
- package/dist/src/schemas/build.d.ts +151 -0
- package/dist/src/schemas/bundle.d.ts +159 -0
- package/dist/src/schemas/channel.d.ts +62 -0
- package/dist/src/schemas/common.d.ts +55 -0
- package/dist/src/schemas/config.d.ts +20 -0
- package/dist/src/schemas/crypto.d.ts +6 -0
- package/dist/src/schemas/index.d.ts +21 -0
- package/dist/src/schemas/organization.d.ts +41 -0
- package/dist/src/schemas/sdk.d.ts +324 -0
- package/dist/src/schemas/validate.d.ts +12 -0
- package/dist/src/sdk.d.ts +14 -354
- package/dist/src/sdk.js +330 -291
- package/dist/src/utils/security_policy_errors.d.ts +2 -5
- package/dist/src/utils.d.ts +56 -40
- package/package.json +3 -3
package/dist/src/sdk.d.ts
CHANGED
|
@@ -1,364 +1,14 @@
|
|
|
1
1
|
import type { Channel } from './api/channels';
|
|
2
|
-
import type { BuildCredentials } from './build/request';
|
|
3
2
|
import type { DecryptResult } from './bundle/decrypt';
|
|
4
3
|
import type { EncryptResult } from './bundle/encrypt';
|
|
5
|
-
import type { UploadBundleResult } from './bundle/upload';
|
|
6
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';
|
|
7
6
|
import { getInfoInternal } from './app/info';
|
|
8
7
|
import { checkCompatibilityInternal } from './bundle/compatibility';
|
|
9
8
|
export type DoctorInfo = Awaited<ReturnType<typeof getInfoInternal>>;
|
|
10
9
|
type CompatibilityReport = Awaited<ReturnType<typeof checkCompatibilityInternal>>['finalCompatibility'];
|
|
11
10
|
export type BundleCompatibilityEntry = CompatibilityReport[number];
|
|
12
|
-
|
|
13
|
-
export interface SDKResult<T = void> {
|
|
14
|
-
success: boolean;
|
|
15
|
-
data?: T;
|
|
16
|
-
error?: string;
|
|
17
|
-
/** Human-readable message for security policy errors (2FA, password policy, API key requirements) */
|
|
18
|
-
securityPolicyMessage?: string;
|
|
19
|
-
/** Whether this error is due to a security policy (2FA, password policy, hashed API key requirement, etc.) */
|
|
20
|
-
isSecurityPolicyError?: boolean;
|
|
21
|
-
warnings?: string[];
|
|
22
|
-
}
|
|
23
|
-
export interface AddAppOptions {
|
|
24
|
-
/** App ID (e.g., com.example.app) */
|
|
25
|
-
appId: string;
|
|
26
|
-
/** App name for display in Capgo Cloud */
|
|
27
|
-
name?: string;
|
|
28
|
-
/** App icon path for display in Capgo Cloud */
|
|
29
|
-
icon?: string;
|
|
30
|
-
/** API key for authentication */
|
|
31
|
-
apikey?: string;
|
|
32
|
-
/** Custom Supabase host */
|
|
33
|
-
supaHost?: string;
|
|
34
|
-
/** Custom Supabase anon key */
|
|
35
|
-
supaAnon?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface UpdateAppOptions {
|
|
38
|
-
/** App ID (e.g., com.example.app) */
|
|
39
|
-
appId: string;
|
|
40
|
-
/** Updated app name */
|
|
41
|
-
name?: string;
|
|
42
|
-
/** Updated app icon path */
|
|
43
|
-
icon?: string;
|
|
44
|
-
/** Days to keep old bundles (0 = infinite) */
|
|
45
|
-
retention?: number;
|
|
46
|
-
/** API key for authentication */
|
|
47
|
-
apikey?: string;
|
|
48
|
-
/** Custom Supabase host */
|
|
49
|
-
supaHost?: string;
|
|
50
|
-
/** Custom Supabase anon key */
|
|
51
|
-
supaAnon?: string;
|
|
52
|
-
}
|
|
53
|
-
export interface AppInfo {
|
|
54
|
-
appId: string;
|
|
55
|
-
name: string;
|
|
56
|
-
iconUrl?: string;
|
|
57
|
-
createdAt: Date;
|
|
58
|
-
}
|
|
59
|
-
export interface UploadOptions {
|
|
60
|
-
/** App ID (e.g., com.example.app) */
|
|
61
|
-
appId: string;
|
|
62
|
-
/** Path to build folder */
|
|
63
|
-
path: string;
|
|
64
|
-
/** Bundle version */
|
|
65
|
-
bundle?: string;
|
|
66
|
-
/** Channel name */
|
|
67
|
-
channel?: string;
|
|
68
|
-
/** API key for authentication */
|
|
69
|
-
apikey?: string;
|
|
70
|
-
/** External URL instead of upload */
|
|
71
|
-
external?: string;
|
|
72
|
-
/** Enable encryption */
|
|
73
|
-
encrypt?: boolean;
|
|
74
|
-
/** Private key for encryption */
|
|
75
|
-
encryptionKey?: string;
|
|
76
|
-
/** Custom Supabase host */
|
|
77
|
-
supaHost?: string;
|
|
78
|
-
/** Custom Supabase anon key */
|
|
79
|
-
supaAnon?: string;
|
|
80
|
-
/** Timeout in seconds */
|
|
81
|
-
timeout?: number;
|
|
82
|
-
/** Use TUS protocol for upload */
|
|
83
|
-
useTus?: boolean;
|
|
84
|
-
/** Comment for this version */
|
|
85
|
-
comment?: string;
|
|
86
|
-
/** Minimum update version required */
|
|
87
|
-
minUpdateVersion?: string;
|
|
88
|
-
/** Automatically set min-update-version when compatibility fails */
|
|
89
|
-
autoMinUpdateVersion?: boolean;
|
|
90
|
-
/** Allow self-assignment to channel */
|
|
91
|
-
selfAssign?: boolean;
|
|
92
|
-
/** Package.json paths for monorepos */
|
|
93
|
-
packageJsonPaths?: string;
|
|
94
|
-
/** Ignore compatibility checks */
|
|
95
|
-
ignoreCompatibilityCheck?: boolean;
|
|
96
|
-
/** Disable code check for notifyAppReady() */
|
|
97
|
-
disableCodeCheck?: boolean;
|
|
98
|
-
/** Use legacy zip upload instead of TUS */
|
|
99
|
-
useZip?: boolean;
|
|
100
|
-
}
|
|
101
|
-
export interface UploadResult {
|
|
102
|
-
success: boolean;
|
|
103
|
-
bundleId?: string;
|
|
104
|
-
bundleUrl?: string;
|
|
105
|
-
checksum?: string | null;
|
|
106
|
-
encryptionMethod?: UploadBundleResult['encryptionMethod'];
|
|
107
|
-
sessionKey?: string;
|
|
108
|
-
ivSessionKey?: string | null;
|
|
109
|
-
storageProvider?: string;
|
|
110
|
-
skipped?: boolean;
|
|
111
|
-
reason?: string;
|
|
112
|
-
error?: string;
|
|
113
|
-
warnings?: string[];
|
|
114
|
-
}
|
|
115
|
-
export interface BundleInfo {
|
|
116
|
-
id: string;
|
|
117
|
-
version: string;
|
|
118
|
-
channel?: string;
|
|
119
|
-
uploadedAt: Date;
|
|
120
|
-
size: number;
|
|
121
|
-
encrypted: boolean;
|
|
122
|
-
}
|
|
123
|
-
export interface CleanupOptions {
|
|
124
|
-
/** App ID */
|
|
125
|
-
appId: string;
|
|
126
|
-
/** Number of versions to keep */
|
|
127
|
-
keep?: number;
|
|
128
|
-
/** Bundle version pattern */
|
|
129
|
-
bundle?: string;
|
|
130
|
-
/** Force removal without confirmation */
|
|
131
|
-
force?: boolean;
|
|
132
|
-
/** Delete bundles even if linked to channels */
|
|
133
|
-
ignoreChannel?: boolean;
|
|
134
|
-
/** API key for authentication */
|
|
135
|
-
apikey?: string;
|
|
136
|
-
/** Custom Supabase host */
|
|
137
|
-
supaHost?: string;
|
|
138
|
-
/** Custom Supabase anon key */
|
|
139
|
-
supaAnon?: string;
|
|
140
|
-
}
|
|
141
|
-
export interface GenerateKeyOptions {
|
|
142
|
-
/** Overwrite existing keys if they already exist */
|
|
143
|
-
force?: boolean;
|
|
144
|
-
/** Automatically configure the default encryption channel instead of prompting */
|
|
145
|
-
setupChannel?: boolean;
|
|
146
|
-
}
|
|
147
|
-
export interface SaveKeyOptions {
|
|
148
|
-
/** Path to the public key file (.pub) */
|
|
149
|
-
keyPath?: string;
|
|
150
|
-
/** Public key contents as string (used if keyPath not provided) */
|
|
151
|
-
keyData?: string;
|
|
152
|
-
/** Automatically configure the default encryption channel instead of prompting */
|
|
153
|
-
setupChannel?: boolean;
|
|
154
|
-
}
|
|
155
|
-
export interface DeleteOldKeyOptions {
|
|
156
|
-
/** Force deletion if legacy files are present */
|
|
157
|
-
force?: boolean;
|
|
158
|
-
/** Automatically configure the default encryption channel instead of prompting */
|
|
159
|
-
setupChannel?: boolean;
|
|
160
|
-
}
|
|
161
|
-
export interface AddChannelOptions {
|
|
162
|
-
/** Channel ID/name */
|
|
163
|
-
channelId: string;
|
|
164
|
-
/** App ID */
|
|
165
|
-
appId: string;
|
|
166
|
-
/** Set as default channel */
|
|
167
|
-
default?: boolean;
|
|
168
|
-
/** Allow device self-assignment */
|
|
169
|
-
selfAssign?: boolean;
|
|
170
|
-
/** API key for authentication */
|
|
171
|
-
apikey?: string;
|
|
172
|
-
/** Custom Supabase host */
|
|
173
|
-
supaHost?: string;
|
|
174
|
-
/** Custom Supabase anon key */
|
|
175
|
-
supaAnon?: string;
|
|
176
|
-
}
|
|
177
|
-
export interface UpdateChannelOptions {
|
|
178
|
-
/** Channel ID/name */
|
|
179
|
-
channelId: string;
|
|
180
|
-
/** App ID */
|
|
181
|
-
appId: string;
|
|
182
|
-
/** Bundle version to link */
|
|
183
|
-
bundle?: string;
|
|
184
|
-
/** Channel state (default or normal) */
|
|
185
|
-
state?: string;
|
|
186
|
-
/** Allow downgrade */
|
|
187
|
-
downgrade?: boolean;
|
|
188
|
-
/** Enable for iOS */
|
|
189
|
-
ios?: boolean;
|
|
190
|
-
/** Enable for Android */
|
|
191
|
-
android?: boolean;
|
|
192
|
-
/** Allow device self-assignment */
|
|
193
|
-
selfAssign?: boolean;
|
|
194
|
-
/** Disable auto update strategy */
|
|
195
|
-
disableAutoUpdate?: string;
|
|
196
|
-
/** Enable for dev builds */
|
|
197
|
-
dev?: boolean;
|
|
198
|
-
/** Enable for emulators */
|
|
199
|
-
emulator?: boolean;
|
|
200
|
-
/** Enable for physical devices */
|
|
201
|
-
device?: boolean;
|
|
202
|
-
/** Enable for production builds */
|
|
203
|
-
prod?: boolean;
|
|
204
|
-
/** API key for authentication */
|
|
205
|
-
apikey?: string;
|
|
206
|
-
/** Custom Supabase host */
|
|
207
|
-
supaHost?: string;
|
|
208
|
-
/** Custom Supabase anon key */
|
|
209
|
-
supaAnon?: string;
|
|
210
|
-
}
|
|
211
|
-
export interface AccountIdOptions {
|
|
212
|
-
/** API key for authentication */
|
|
213
|
-
apikey?: string;
|
|
214
|
-
/** Custom Supabase host */
|
|
215
|
-
supaHost?: string;
|
|
216
|
-
/** Custom Supabase anon key */
|
|
217
|
-
supaAnon?: string;
|
|
218
|
-
}
|
|
219
|
-
export interface ListOrganizationsOptions extends AccountIdOptions {
|
|
220
|
-
}
|
|
221
|
-
export interface AddOrganizationOptions extends AccountIdOptions {
|
|
222
|
-
/** Organization name */
|
|
223
|
-
name: string;
|
|
224
|
-
/** Management email */
|
|
225
|
-
email: string;
|
|
226
|
-
}
|
|
227
|
-
export interface UpdateOrganizationOptions extends AccountIdOptions {
|
|
228
|
-
/** Organization ID */
|
|
229
|
-
orgId: string;
|
|
230
|
-
/** Updated name */
|
|
231
|
-
name?: string;
|
|
232
|
-
/** Updated management email */
|
|
233
|
-
email?: string;
|
|
234
|
-
}
|
|
235
|
-
export interface OrganizationInfo {
|
|
236
|
-
id: string;
|
|
237
|
-
name: string;
|
|
238
|
-
role?: string;
|
|
239
|
-
appCount?: number;
|
|
240
|
-
email?: string;
|
|
241
|
-
createdAt?: Date;
|
|
242
|
-
}
|
|
243
|
-
export interface DeleteOrganizationOptions extends AccountIdOptions {
|
|
244
|
-
autoConfirm?: boolean;
|
|
245
|
-
}
|
|
246
|
-
export interface LoginOptions {
|
|
247
|
-
apikey: string;
|
|
248
|
-
local?: boolean;
|
|
249
|
-
supaHost?: string;
|
|
250
|
-
supaAnon?: string;
|
|
251
|
-
}
|
|
252
|
-
export interface DoctorOptions {
|
|
253
|
-
packageJson?: string;
|
|
254
|
-
}
|
|
255
|
-
export interface BundleCompatibilityOptions {
|
|
256
|
-
appId: string;
|
|
257
|
-
channel: string;
|
|
258
|
-
packageJson?: string;
|
|
259
|
-
nodeModules?: string;
|
|
260
|
-
textOutput?: boolean;
|
|
261
|
-
apikey?: string;
|
|
262
|
-
supaHost?: string;
|
|
263
|
-
supaAnon?: string;
|
|
264
|
-
}
|
|
265
|
-
export interface EncryptBundleOptions {
|
|
266
|
-
zipPath: string;
|
|
267
|
-
checksum: string;
|
|
268
|
-
keyPath?: string;
|
|
269
|
-
keyData?: string;
|
|
270
|
-
json?: boolean;
|
|
271
|
-
packageJson?: string;
|
|
272
|
-
}
|
|
273
|
-
export interface DecryptBundleOptions {
|
|
274
|
-
zipPath: string;
|
|
275
|
-
ivSessionKey: string;
|
|
276
|
-
keyPath?: string;
|
|
277
|
-
keyData?: string;
|
|
278
|
-
checksum?: string;
|
|
279
|
-
packageJson?: string;
|
|
280
|
-
}
|
|
281
|
-
export interface ZipBundleOptions {
|
|
282
|
-
appId: string;
|
|
283
|
-
path: string;
|
|
284
|
-
bundle?: string;
|
|
285
|
-
name?: string;
|
|
286
|
-
codeCheck?: boolean;
|
|
287
|
-
json?: boolean;
|
|
288
|
-
keyV2?: boolean;
|
|
289
|
-
packageJson?: string;
|
|
290
|
-
}
|
|
291
|
-
export interface RequestBuildOptions {
|
|
292
|
-
/** App ID (e.g., com.example.app) */
|
|
293
|
-
appId: string;
|
|
294
|
-
/** Path to project directory */
|
|
295
|
-
path?: string;
|
|
296
|
-
/** Fastlane lane - must be exactly "ios" or "android" */
|
|
297
|
-
platform: 'ios' | 'android';
|
|
298
|
-
/**
|
|
299
|
-
* Credentials for signing and publishing to stores
|
|
300
|
-
*
|
|
301
|
-
* SECURITY GUARANTEE:
|
|
302
|
-
* These credentials are NEVER stored on Capgo servers.
|
|
303
|
-
* They are:
|
|
304
|
-
* - Transmitted securely over HTTPS
|
|
305
|
-
* - Used ONLY during the active build process
|
|
306
|
-
* - Automatically deleted after build completion
|
|
307
|
-
* - Builds sent directly to app stores - Capgo keeps nothing
|
|
308
|
-
*/
|
|
309
|
-
credentials?: BuildCredentials;
|
|
310
|
-
/** User ID for the build job (optional, will be auto-detected if not provided) */
|
|
311
|
-
userId?: string;
|
|
312
|
-
/** API key for authentication */
|
|
313
|
-
apikey?: string;
|
|
314
|
-
/** Custom Supabase host */
|
|
315
|
-
supaHost?: string;
|
|
316
|
-
/** Custom Supabase anon key */
|
|
317
|
-
supaAnon?: string;
|
|
318
|
-
}
|
|
319
|
-
export interface CurrentBundleOptions extends AccountIdOptions {
|
|
320
|
-
}
|
|
321
|
-
export interface SetSettingOptions {
|
|
322
|
-
apikey?: string;
|
|
323
|
-
bool?: string;
|
|
324
|
-
string?: string;
|
|
325
|
-
}
|
|
326
|
-
export interface StatsOrder {
|
|
327
|
-
key: string;
|
|
328
|
-
sortable?: 'asc' | 'desc';
|
|
329
|
-
}
|
|
330
|
-
export interface GetStatsOptions {
|
|
331
|
-
/** App ID */
|
|
332
|
-
appId: string;
|
|
333
|
-
/** Filter by specific device IDs */
|
|
334
|
-
deviceIds?: string[];
|
|
335
|
-
/** Search query */
|
|
336
|
-
search?: string;
|
|
337
|
-
/** Sort order */
|
|
338
|
-
order?: StatsOrder[];
|
|
339
|
-
/** Start date/time for range filter (ISO string) */
|
|
340
|
-
rangeStart?: string;
|
|
341
|
-
/** End date/time for range filter (ISO string) */
|
|
342
|
-
rangeEnd?: string;
|
|
343
|
-
/** Limit number of results */
|
|
344
|
-
limit?: number;
|
|
345
|
-
/** Get only stats after this timestamp (for polling) */
|
|
346
|
-
after?: string | null;
|
|
347
|
-
/** API key for authentication */
|
|
348
|
-
apikey?: string;
|
|
349
|
-
/** Custom Supabase host */
|
|
350
|
-
supaHost?: string;
|
|
351
|
-
/** Custom Supabase anon key */
|
|
352
|
-
supaAnon?: string;
|
|
353
|
-
}
|
|
354
|
-
export interface DeviceStats {
|
|
355
|
-
appId: string;
|
|
356
|
-
deviceId: string;
|
|
357
|
-
action: string;
|
|
358
|
-
versionId: number;
|
|
359
|
-
version?: number;
|
|
360
|
-
createdAt: string;
|
|
361
|
-
}
|
|
11
|
+
export type { BuildCredentials } from './build/request';
|
|
362
12
|
/**
|
|
363
13
|
* Capgo SDK for programmatic access to all CLI functionality.
|
|
364
14
|
* Use this class to integrate Capgo operations directly into your application.
|
|
@@ -820,9 +470,19 @@ export declare function getStats(options: GetStatsOptions): Promise<SDKResult<De
|
|
|
820
470
|
* }
|
|
821
471
|
* ```
|
|
822
472
|
*/
|
|
823
|
-
export declare function getCapacitorConfig(): Promise<
|
|
824
|
-
|
|
473
|
+
export declare function getCapacitorConfig(): Promise<{
|
|
474
|
+
config: {
|
|
475
|
+
[x: string]: unknown;
|
|
476
|
+
appId: string;
|
|
477
|
+
appName: string;
|
|
478
|
+
webDir: string;
|
|
479
|
+
plugins?: Record<string, any> | undefined;
|
|
480
|
+
android?: Record<string, any> | undefined;
|
|
481
|
+
};
|
|
482
|
+
path: string;
|
|
483
|
+
} | null>;
|
|
825
484
|
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';
|
|
826
486
|
export type { Database } from './types/supabase.types';
|
|
827
487
|
export { createSupabaseClient } from './utils';
|
|
828
488
|
export { formatApiErrorForCli, getSecurityPolicyMessage, isSecurityPolicyError, parseSecurityPolicyError, SECURITY_POLICY_ERRORS, SECURITY_POLICY_MESSAGES, } from './utils/security_policy_errors';
|