@capgo/cli 8.69.0 → 8.71.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/README.md +28 -1
- package/dist/index.js +766 -759
- package/dist/notify-app-ready-worker.js +77 -76
- package/dist/onboarding-worker.js +127 -126
- package/dist/package.json +1 -1
- package/dist/src/bundle/upload-abandon-error.d.ts +25 -0
- package/dist/src/channel/promote.d.ts +12 -0
- package/dist/src/channel/set.d.ts +1 -1
- package/dist/src/mcp/tool-schemas.d.ts +8 -0
- package/dist/src/schemas/channel.d.ts +9 -0
- package/dist/src/schemas/index.d.ts +4 -4
- package/dist/src/schemas/sdk.d.ts +12 -0
- package/dist/src/sdk.d.ts +25 -2
- package/dist/src/sdk.js +373 -370
- package/dist/src/types/supabase.types.d.ts +14 -0
- package/dist/src/utils.d.ts +14 -0
- package/dist/updater-installed-worker.js +62 -61
- package/package.json +1 -1
- package/skills/release-management/SKILL.md +13 -0
- package/skills/usage/SKILL.md +1 -1
package/dist/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CliUserError } from '../shared/cli-user-error';
|
|
2
|
+
export type ManifestUploadAbandonScope = 'all' | 'manifest';
|
|
3
|
+
interface AbortableManifestUpload {
|
|
4
|
+
abort: (shouldTerminate?: boolean) => Promise<void> | void;
|
|
5
|
+
}
|
|
6
|
+
type RejectUpload = (reason: unknown) => void;
|
|
7
|
+
export declare class ManifestUploadAbandonError extends CliUserError {
|
|
8
|
+
readonly backendMessage: string;
|
|
9
|
+
readonly requestId?: string;
|
|
10
|
+
readonly scope: ManifestUploadAbandonScope;
|
|
11
|
+
constructor(scope: ManifestUploadAbandonScope, backendMessage: string, requestId?: string);
|
|
12
|
+
}
|
|
13
|
+
export declare function parseManifestUploadAbandonBody(body: string | undefined): ManifestUploadAbandonError | undefined;
|
|
14
|
+
export declare function getManifestUploadAbandonError(error: unknown): ManifestUploadAbandonError | undefined;
|
|
15
|
+
export declare function resolveManifestUploadAbandonScope(error: ManifestUploadAbandonError, manifestUploadAutoEnabled: boolean): ManifestUploadAbandonScope;
|
|
16
|
+
export declare class ManifestUploadAbandonController {
|
|
17
|
+
private abandonError;
|
|
18
|
+
private abandonPromise;
|
|
19
|
+
private readonly activeUploads;
|
|
20
|
+
register(upload: AbortableManifestUpload, reject: RejectUpload): boolean;
|
|
21
|
+
unregister(upload: AbortableManifestUpload): void;
|
|
22
|
+
throwIfAbandoned(): void;
|
|
23
|
+
abandon(error: ManifestUploadAbandonError): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChannelPromoteOptions } from '../schemas/channel';
|
|
2
|
+
export interface PromoteChannelResult {
|
|
3
|
+
bundle: string;
|
|
4
|
+
fromChannel: string;
|
|
5
|
+
toChannel: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Link the bundle currently served by `fromChannel` to `toChannel`.
|
|
9
|
+
* Reuses `channel set --bundle` so compatibility checks and RBAC stay identical.
|
|
10
|
+
*/
|
|
11
|
+
export declare function promoteChannelInternal(fromChannel: string, toChannel: string, appId: string, options: ChannelPromoteOptions, silent?: boolean): Promise<PromoteChannelResult>;
|
|
12
|
+
export declare function promoteChannel(fromChannel: string, toChannel: string, appId: string, options: ChannelPromoteOptions): Promise<void>;
|
|
@@ -14,5 +14,5 @@ export declare function rejectOrAcceptIncompatibleChannelBundle(params: {
|
|
|
14
14
|
heading: string;
|
|
15
15
|
errorMessage: string;
|
|
16
16
|
}): void;
|
|
17
|
-
export declare function setChannelInternal(channel: string, appId: string, options: OptionsSetChannel, silent?: boolean): Promise<boolean>;
|
|
17
|
+
export declare function setChannelInternal(channel: string, appId: string, options: OptionsSetChannel, silent?: boolean, showFrame?: boolean): Promise<boolean>;
|
|
18
18
|
export declare function setChannel(channel: string, appId: string, options: OptionsSetChannel): Promise<boolean>;
|
|
@@ -115,6 +115,14 @@ export declare const mcpGetCurrentBundleInputSchema: z.ZodObject<{
|
|
|
115
115
|
appId: z.ZodString;
|
|
116
116
|
channelId: z.ZodString;
|
|
117
117
|
}, z.core.$strip>;
|
|
118
|
+
export declare const mcpPromoteChannelInputSchema: z.ZodObject<{
|
|
119
|
+
appId: z.ZodString;
|
|
120
|
+
fromChannel: z.ZodString;
|
|
121
|
+
toChannel: z.ZodString;
|
|
122
|
+
acceptIncompatible: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
ignoreMetadataCheck: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
sendUpdateNotification: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
}, z.core.$strip>;
|
|
118
126
|
export declare const mcpAddOrganizationInputSchema: z.ZodObject<{
|
|
119
127
|
name: z.ZodString;
|
|
120
128
|
email: z.ZodString;
|
|
@@ -41,6 +41,15 @@ export declare const channelCurrentBundleOptionsSchema: z.ZodObject<{
|
|
|
41
41
|
quiet: z.ZodOptional<z.ZodBoolean>;
|
|
42
42
|
}, z.core.$strip>;
|
|
43
43
|
export type ChannelCurrentBundleOptions = z.infer<typeof channelCurrentBundleOptionsSchema>;
|
|
44
|
+
export declare const channelPromoteOptionsSchema: z.ZodObject<{
|
|
45
|
+
apikey: z.ZodString;
|
|
46
|
+
supaHost: z.ZodOptional<z.ZodString>;
|
|
47
|
+
supaAnon: z.ZodOptional<z.ZodString>;
|
|
48
|
+
ignoreMetadataCheck: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
acceptIncompatible: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
sendUpdateNotification: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type ChannelPromoteOptions = z.infer<typeof channelPromoteOptionsSchema>;
|
|
44
53
|
export declare const optionsSetChannelSchema: z.ZodObject<{
|
|
45
54
|
apikey: z.ZodString;
|
|
46
55
|
supaHost: z.ZodOptional<z.ZodString>;
|
|
@@ -7,13 +7,13 @@ export { allCredentialsSchema, buildCredentialsSchema, buildRequestOptionsSchema
|
|
|
7
7
|
export type { AllCredentials, BuildCredentials, BuildRequestOptions, BuildRequestResult, CredentialFile, SavedCredentials, } from './build';
|
|
8
8
|
export { bundleCleanupOptionsSchema, bundleCompatibilityOptionsSchema, bundleDecryptOptionsSchema, bundleDeleteOptionsSchema, bundleEncryptOptionsSchema, bundleReleaseTypeOptionsSchema, bundleZipOptionsSchema, decryptResultSchema, encryptResultSchema, optionsUploadSchema, uploadBundleResultSchema, zipResultSchema, } from './bundle';
|
|
9
9
|
export type { BundleCleanupOptions, BundleCompatibilityOptions, BundleDecryptOptions, BundleDeleteOptions, BundleEncryptOptions, BundleReleaseTypeOptions, BundleZipOptions, DecryptResult, EncryptResult, OptionsUpload, UploadBundleResult, ZipResult, } from './bundle';
|
|
10
|
-
export { channelAddOptionsSchema, channelCurrentBundleOptionsSchema, channelDeleteOptionsSchema, channelSchema, optionsSetChannelSchema } from './channel';
|
|
11
|
-
export type { Channel, ChannelAddOptions, ChannelCurrentBundleOptions, ChannelDeleteOptions, OptionsSetChannel } from './channel';
|
|
10
|
+
export { channelAddOptionsSchema, channelCurrentBundleOptionsSchema, channelDeleteOptionsSchema, channelPromoteOptionsSchema, channelSchema, optionsSetChannelSchema } from './channel';
|
|
11
|
+
export type { Channel, ChannelAddOptions, ChannelCurrentBundleOptions, ChannelDeleteOptions, ChannelPromoteOptions, OptionsSetChannel } from './channel';
|
|
12
12
|
export { compatibilityDetailsSchema, compatibilitySchema, incompatibilityReasonSchema, localizedReleaseNotesSchema, nativePackageSchema, parsedSecurityErrorSchema } from './common';
|
|
13
13
|
export type { Compatibility, CompatibilityDetails, IncompatibilityReason, NativePackage, ParsedSecurityError } from './common';
|
|
14
14
|
export type { CapacitorConfig, ExtConfigPairs } from './config';
|
|
15
15
|
export { organizationAddOptionsSchema, organizationDeleteOptionsSchema, organizationSetOptionsSchema, passwordPolicyConfigSchema } from './organization';
|
|
16
16
|
export type { OrganizationAddOptions, OrganizationDeleteOptions, OrganizationSetOptions, PasswordPolicyConfig } from './organization';
|
|
17
|
-
export { accountIdOptionsSchema, addAppOptionsSchema, addChannelOptionsSchema, addOrganizationOptionsSchema, appInfoSchema, bundleInfoSchema, cleanupOptionsSchema, currentBundleOptionsSchema, decryptBundleOptionsSchema, deleteOldKeyOptionsSchema, deleteOrganizationOptionsSchema, deviceStatsSchema, doctorOptionsSchema, encryptBundleOptionsSchema, generateKeyOptionsSchema, getStatsOptionsSchema, listOrganizationsOptionsSchema, loginOptionsSchema, observeOptionsObjectSchema, observeOptionsSchema, observeDaysSchema, observeSortSchema, observeViewSchema, organizationInfoSchema, saveKeyOptionsSchema, bundleCompatibilityOptionsSchema as sdkBundleCompatibilityOptionsSchema, requestBuildOptionsSchema as sdkRequestBuildOptionsSchema, setSettingOptionsSchema, statsOrderSchema, updateAppOptionsSchema, updateChannelOptionsSchema, updateOrganizationOptionsSchema, uploadOptionsSchema, uploadResultSchema, zipBundleOptionsSchema, } from './sdk';
|
|
18
|
-
export type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, ObserveOptions, ObserveView, OrganizationInfo, SaveKeyOptions, BundleCompatibilityOptions as SdkBundleCompatibilityOptions, RequestBuildOptions as SdkRequestBuildOptions, SDKResult, SetSettingOptions, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './sdk';
|
|
17
|
+
export { accountIdOptionsSchema, addAppOptionsSchema, addChannelOptionsSchema, addOrganizationOptionsSchema, appInfoSchema, bundleInfoSchema, cleanupOptionsSchema, currentBundleOptionsSchema, decryptBundleOptionsSchema, deleteOldKeyOptionsSchema, deleteOrganizationOptionsSchema, deviceStatsSchema, doctorOptionsSchema, encryptBundleOptionsSchema, generateKeyOptionsSchema, getStatsOptionsSchema, listOrganizationsOptionsSchema, loginOptionsSchema, observeOptionsObjectSchema, observeOptionsSchema, observeDaysSchema, observeSortSchema, observeViewSchema, organizationInfoSchema, promoteChannelOptionsSchema, saveKeyOptionsSchema, bundleCompatibilityOptionsSchema as sdkBundleCompatibilityOptionsSchema, requestBuildOptionsSchema as sdkRequestBuildOptionsSchema, setSettingOptionsSchema, statsOrderSchema, updateAppOptionsSchema, updateChannelOptionsSchema, updateOrganizationOptionsSchema, uploadOptionsSchema, uploadResultSchema, zipBundleOptionsSchema, } from './sdk';
|
|
18
|
+
export type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, ObserveOptions, ObserveView, OrganizationInfo, PromoteChannelOptions, SaveKeyOptions, BundleCompatibilityOptions as SdkBundleCompatibilityOptions, RequestBuildOptions as SdkRequestBuildOptions, SDKResult, SetSettingOptions, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './sdk';
|
|
19
19
|
export { validateOptions } from './validate';
|
|
@@ -253,6 +253,18 @@ export declare const updateChannelOptionsSchema: z.ZodObject<{
|
|
|
253
253
|
supaAnon: z.ZodOptional<z.ZodString>;
|
|
254
254
|
}, z.core.$strip>;
|
|
255
255
|
export type UpdateChannelOptions = z.infer<typeof updateChannelOptionsSchema>;
|
|
256
|
+
export declare const promoteChannelOptionsSchema: z.ZodObject<{
|
|
257
|
+
appId: z.ZodString;
|
|
258
|
+
fromChannel: z.ZodString;
|
|
259
|
+
toChannel: z.ZodString;
|
|
260
|
+
ignoreMetadataCheck: z.ZodOptional<z.ZodBoolean>;
|
|
261
|
+
acceptIncompatible: z.ZodOptional<z.ZodBoolean>;
|
|
262
|
+
sendUpdateNotification: z.ZodOptional<z.ZodBoolean>;
|
|
263
|
+
apikey: z.ZodOptional<z.ZodString>;
|
|
264
|
+
supaHost: z.ZodOptional<z.ZodString>;
|
|
265
|
+
supaAnon: z.ZodOptional<z.ZodString>;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
export type PromoteChannelOptions = z.infer<typeof promoteChannelOptionsSchema>;
|
|
256
268
|
export declare const accountIdOptionsSchema: z.ZodObject<{
|
|
257
269
|
apikey: z.ZodOptional<z.ZodString>;
|
|
258
270
|
supaHost: z.ZodOptional<z.ZodString>;
|
package/dist/src/sdk.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { EncryptResult } from './bundle/encrypt';
|
|
|
4
4
|
import type { ZipResult } from './bundle/zip';
|
|
5
5
|
import type { StarAllRepositoryResult } from './github';
|
|
6
6
|
import type { ProbeInternalResult } from './probe';
|
|
7
|
-
import type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, ObserveOptions, OrganizationInfo, ProbeOptions, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StarAllRepositoriesOptions, StarRepoOptions, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions } from './schemas/sdk';
|
|
7
|
+
import type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, ObserveOptions, OrganizationInfo, ProbeOptions, PromoteChannelOptions, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StarAllRepositoriesOptions, StarRepoOptions, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions } from './schemas/sdk';
|
|
8
8
|
import { getInfoInternal } from './app/info';
|
|
9
9
|
import { checkCompatibilityInternal } from './bundle/compatibility';
|
|
10
10
|
export type DoctorInfo = Awaited<ReturnType<typeof getInfoInternal>>;
|
|
@@ -271,6 +271,24 @@ export declare class CapgoSDK {
|
|
|
271
271
|
* ```
|
|
272
272
|
*/
|
|
273
273
|
updateChannel(options: UpdateChannelOptions): Promise<SDKResult>;
|
|
274
|
+
/**
|
|
275
|
+
* Promote the bundle currently linked to one channel to another channel
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```typescript
|
|
279
|
+
* const result = await sdk.promoteChannel({
|
|
280
|
+
* appId: 'com.example.app',
|
|
281
|
+
* fromChannel: 'staging',
|
|
282
|
+
* toChannel: 'production',
|
|
283
|
+
* })
|
|
284
|
+
* // result.data?.bundle === '1.2.3'
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
promoteChannel(options: PromoteChannelOptions): Promise<SDKResult<{
|
|
288
|
+
bundle: string;
|
|
289
|
+
fromChannel: string;
|
|
290
|
+
toChannel: string;
|
|
291
|
+
}>>;
|
|
274
292
|
/**
|
|
275
293
|
* Delete a channel
|
|
276
294
|
*
|
|
@@ -397,6 +415,11 @@ export declare function deleteLegacyEncryptionKey(options?: DeleteOldKeyOptions)
|
|
|
397
415
|
deleted: boolean;
|
|
398
416
|
}>>;
|
|
399
417
|
export declare function getCurrentBundle(appId: string, channelId: string, options?: CurrentBundleOptions): Promise<SDKResult<string>>;
|
|
418
|
+
export declare function promoteChannel(options: PromoteChannelOptions): Promise<SDKResult<{
|
|
419
|
+
bundle: string;
|
|
420
|
+
fromChannel: string;
|
|
421
|
+
toChannel: string;
|
|
422
|
+
}>>;
|
|
400
423
|
export declare function updateAppSetting(path: string, options: SetSettingOptions): Promise<SDKResult>;
|
|
401
424
|
export declare function getAccountId(options?: AccountIdOptions): Promise<SDKResult<string>>;
|
|
402
425
|
export declare function listOrganizations(options?: ListOrganizationsOptions): Promise<SDKResult<OrganizationInfo[]>>;
|
|
@@ -532,7 +555,7 @@ export declare function getCapacitorConfig(): Promise<import("./config").ExtConf
|
|
|
532
555
|
export type { BuildCredentials } from './build/request';
|
|
533
556
|
export type { CapacitorConfig } from './config';
|
|
534
557
|
export type { ProbeInternalResult } from './probe';
|
|
535
|
-
export type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, ObserveOptions, OrganizationInfo, ProbeOptions, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StarAllRepositoriesOptions, StarRepoOptions, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './schemas/sdk';
|
|
558
|
+
export type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, ObserveOptions, OrganizationInfo, ProbeOptions, PromoteChannelOptions, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StarAllRepositoriesOptions, StarRepoOptions, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './schemas/sdk';
|
|
536
559
|
export type { Database } from './types/supabase.types';
|
|
537
560
|
export { createSupabaseClient } from './utils';
|
|
538
561
|
export { formatApiErrorForCli, getSecurityPolicyMessage, isSecurityPolicyError, parseSecurityPolicyError, SECURITY_POLICY_ERRORS, SECURITY_POLICY_MESSAGES, } from './utils/security_policy_errors';
|