@capgo/cli 8.32.5 → 8.32.7
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 +666 -665
- package/dist/package.json +1 -1
- package/dist/src/api/update.d.ts +5 -1
- package/dist/src/bundle/reporter.d.ts +23 -0
- package/dist/src/bundle/upload.d.ts +4 -15
- package/dist/src/init/replay.d.ts +0 -2
- package/dist/src/init/runtime.d.ts +7 -0
- package/dist/src/replicationProgress.d.ts +10 -1
- package/dist/src/sdk.js +346 -346
- package/dist/src/utils.d.ts +2 -2
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/src/api/update.d.ts
CHANGED
|
@@ -4,5 +4,9 @@ export interface VersionCheckResult {
|
|
|
4
4
|
isOutdated: boolean;
|
|
5
5
|
majorVersion: string;
|
|
6
6
|
}
|
|
7
|
+
interface AlertsReporter {
|
|
8
|
+
warn: (message: string) => void;
|
|
9
|
+
}
|
|
7
10
|
export declare function checkVersionStatus(): Promise<VersionCheckResult>;
|
|
8
|
-
export declare function checkAlerts(): Promise<void>;
|
|
11
|
+
export declare function checkAlerts(reporter?: AlertsReporter): Promise<void>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface UploadSpinner {
|
|
2
|
+
start: (message: string) => void;
|
|
3
|
+
message: (message: string) => void;
|
|
4
|
+
stop: (message?: string) => void;
|
|
5
|
+
error: (message: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface UploadReporter {
|
|
8
|
+
info: (message: string) => void;
|
|
9
|
+
warn: (message: string) => void;
|
|
10
|
+
error: (message: string) => void;
|
|
11
|
+
success: (message: string) => void;
|
|
12
|
+
intro: (message: string) => void;
|
|
13
|
+
outro: (message: string) => void;
|
|
14
|
+
spinner: () => UploadSpinner;
|
|
15
|
+
}
|
|
16
|
+
export declare const clackUploadReporter: UploadReporter;
|
|
17
|
+
export declare function getUploadReporter(): UploadReporter;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the reporter only while an internal upload explicitly supplies one.
|
|
20
|
+
* Shared helpers use this to preserve normal Clack output outside the Ink flow.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getActiveUploadReporter(): UploadReporter | undefined;
|
|
23
|
+
export declare function runWithUploadReporter<T>(reporter: UploadReporter | undefined, action: () => Promise<T>): Promise<T>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { UploadBundleResult } from '../schemas/bundle';
|
|
2
|
+
import type { UploadReporter, UploadSpinner } from './reporter';
|
|
2
3
|
import type { OptionsUpload } from './upload_interface';
|
|
3
4
|
import { createSupabaseClient } from '../utils';
|
|
4
5
|
type SupabaseType = Awaited<ReturnType<typeof createSupabaseClient>>;
|
|
5
6
|
export type { UploadBundleResult };
|
|
7
|
+
export type { UploadReporter, UploadSpinner };
|
|
6
8
|
export declare function getDefaultUploadChannel(appId: string, supabase: SupabaseType, hostWeb: string): Promise<string>;
|
|
7
|
-
export declare function uploadBundleInternal(preAppid: string, options: OptionsUpload, silent?: boolean): Promise<UploadBundleResult>;
|
|
9
|
+
export declare function uploadBundleInternal(preAppid: string, options: OptionsUpload, silent?: boolean, reporter?: UploadReporter): Promise<UploadBundleResult>;
|
|
8
10
|
/**
|
|
9
11
|
* Validate mutually-exclusive and dependent upload options, failing fast (via
|
|
10
12
|
* `uploadFail`) before any network call. Exported so the option-conflict guards
|
|
@@ -12,17 +14,4 @@ export declare function uploadBundleInternal(preAppid: string, options: OptionsU
|
|
|
12
14
|
* directly.
|
|
13
15
|
*/
|
|
14
16
|
export declare function checkValidOptions(options: OptionsUpload): void;
|
|
15
|
-
export declare function uploadBundle(appid: string, options: OptionsUpload): Promise<
|
|
16
|
-
success: boolean;
|
|
17
|
-
bundle: string;
|
|
18
|
-
encryptionMethod: "none" | "v1" | "v2";
|
|
19
|
-
appId?: string | undefined;
|
|
20
|
-
updatedChannels?: string[] | undefined;
|
|
21
|
-
checksum?: string | null | undefined;
|
|
22
|
-
sessionKey?: string | undefined;
|
|
23
|
-
ivSessionKey?: string | null | undefined;
|
|
24
|
-
storageProvider?: string | undefined;
|
|
25
|
-
skipped?: boolean | undefined;
|
|
26
|
-
reason?: string | undefined;
|
|
27
|
-
builderAction?: "launch-onboarding" | "launch-build" | undefined;
|
|
28
|
-
}>;
|
|
17
|
+
export declare function uploadBundle(appid: string, options: OptionsUpload): Promise<UploadBundleResult>;
|
|
@@ -63,12 +63,10 @@ export declare function shouldStartInitReplay(input: InitReplayGateInput): boole
|
|
|
63
63
|
export declare function resolveCapgoReplayUrl(host?: string): string | undefined;
|
|
64
64
|
export declare function resolveSupabaseReplayUrl(supaHost?: string): string | undefined;
|
|
65
65
|
export declare function resolveReplayUrlForFlush(replayUrl: Promise<string | undefined>, timeoutMs?: number, onTimeout?: () => void): Promise<string | undefined>;
|
|
66
|
-
export declare function parseTerminalPixelSizeResponse(input: string): TerminalPixelSize | undefined;
|
|
67
66
|
export declare function getReplayViewportSize(cols?: number, rows?: number, terminalPixelSize?: TerminalPixelSize): {
|
|
68
67
|
height: number;
|
|
69
68
|
width: number;
|
|
70
69
|
};
|
|
71
|
-
export declare function queryTerminalPixelSize(timeoutMs?: number): Promise<TerminalPixelSize | undefined>;
|
|
72
70
|
export declare function renderRedactedTerminalFrame(rawAnsi: string, cols?: number, rows?: number, terminalPixelSize?: TerminalPixelSize): Promise<TerminalReplayFrame>;
|
|
73
71
|
export declare function renderRedactedTerminalText(rawAnsi: string, cols?: number, rows?: number): Promise<string>;
|
|
74
72
|
export declare function createTerminalSnapshot(frameInput: TerminalReplayFrame | string, options?: {
|
|
@@ -74,6 +74,11 @@ export interface InitStreamingOutput {
|
|
|
74
74
|
lines: string[];
|
|
75
75
|
status: InitStreamingOutputStatus;
|
|
76
76
|
statusMessage?: string;
|
|
77
|
+
onCancel?: () => void;
|
|
78
|
+
continuePrompt?: {
|
|
79
|
+
message: string;
|
|
80
|
+
resolve: (value: void | symbol) => void;
|
|
81
|
+
};
|
|
77
82
|
}
|
|
78
83
|
export interface InitRuntimeState {
|
|
79
84
|
screen?: InitScreen;
|
|
@@ -104,8 +109,10 @@ export declare function setInitEncryptionSummary(summary?: InitEncryptionSummary
|
|
|
104
109
|
export declare function startInitStreamingOutput(params: {
|
|
105
110
|
title: string;
|
|
106
111
|
command: string;
|
|
112
|
+
onCancel?: () => void;
|
|
107
113
|
}): void;
|
|
108
114
|
export declare function appendInitStreamingLine(line: string): void;
|
|
109
115
|
export declare function updateInitStreamingStatus(status: InitStreamingOutputStatus, statusMessage?: string): void;
|
|
116
|
+
export declare function waitForInitStreamingContinue(message: string): Promise<void | symbol>;
|
|
110
117
|
export declare function clearInitStreamingOutput(): void;
|
|
111
118
|
export declare function setInitVersionWarning(currentVersion: string, latestVersion: string, majorVersion: string): void;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
export interface ReplicationProgressReporter {
|
|
2
|
+
info: (message: string) => void;
|
|
3
|
+
spinner: () => {
|
|
4
|
+
start: (message: string) => void;
|
|
5
|
+
message: (message: string) => void;
|
|
6
|
+
stop: (message: string) => void;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
1
9
|
export interface ReplicationProgressOptions {
|
|
2
10
|
interactive?: boolean;
|
|
3
11
|
totalMs?: number;
|
|
4
12
|
updateIntervalMs?: number;
|
|
5
13
|
title?: string;
|
|
6
14
|
completeMessage?: string;
|
|
15
|
+
reporter?: ReplicationProgressReporter;
|
|
7
16
|
}
|
|
8
|
-
export declare function showReplicationProgress({ interactive, totalMs, updateIntervalMs, title, completeMessage, }?: ReplicationProgressOptions): Promise<void>;
|
|
17
|
+
export declare function showReplicationProgress({ interactive, totalMs, updateIntervalMs, title, completeMessage, reporter, }?: ReplicationProgressOptions): Promise<void>;
|