@capgo/cli 8.95.1 → 8.95.3
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 +755 -755
- package/dist/notify-app-ready-worker.js +155 -155
- package/dist/onboarding-worker.js +317 -317
- package/dist/package.json +4 -2
- package/dist/src/api/capgo-http-error-payload.d.ts +6 -0
- package/dist/src/init/builder-setup.d.ts +1 -0
- package/dist/src/init/ota-checklist.d.ts +5 -0
- package/dist/src/sdk.js +338 -338
- package/dist/src/shared/retryable-capgo-api-error.d.ts +22 -0
- package/dist/src/shared/two-factor-compliance.d.ts +1 -1
- package/dist/src/utils.d.ts +1 -6
- package/dist/updater-installed-worker.js +152 -152
- package/package.json +4 -2
- package/skills/usage/SKILL.md +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const CAPGO_API_RETRY_MAX_ATTEMPTS = 3;
|
|
2
|
+
/** Backend 503 error codes that are safe to retry during uploads and preflight. */
|
|
3
|
+
export declare const EXPLICIT_RETRYABLE_503_ERROR_CODES: Set<string>;
|
|
4
|
+
export declare const CAPGO_API_MAX_RETRY_DELAY_MS = 10000;
|
|
5
|
+
export type CapgoApiRetryOptions = {
|
|
6
|
+
/** When false, only explicit transient 503 responses are retried (not transport errors). */
|
|
7
|
+
retryTransientNetwork?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/** Transport failures and curated transient 503 responses from the Capgo API. */
|
|
10
|
+
export declare function isRetryableCapgoApiError(error: unknown, options?: CapgoApiRetryOptions): Promise<boolean>;
|
|
11
|
+
export declare function getCapgoApiRetryDelayMs(error: unknown, attemptIndex: number): Promise<number>;
|
|
12
|
+
export declare function invokeCapgoCliApiResultWithRetry<T>(call: () => PromiseLike<{
|
|
13
|
+
data: T | null;
|
|
14
|
+
error: {
|
|
15
|
+
message?: string;
|
|
16
|
+
} | null;
|
|
17
|
+
}>, sleepFn?: (ms: number) => Promise<void>, options?: CapgoApiRetryOptions): Promise<{
|
|
18
|
+
data: T | null;
|
|
19
|
+
error: {
|
|
20
|
+
message?: string;
|
|
21
|
+
} | null;
|
|
22
|
+
}>;
|
|
@@ -9,7 +9,7 @@ export declare const TWO_FACTOR_PREFLIGHT_MAX_ATTEMPTS = 3;
|
|
|
9
9
|
export declare class TwoFactorComplianceNetworkError extends Error {
|
|
10
10
|
constructor(message?: string);
|
|
11
11
|
}
|
|
12
|
-
/** Retries transient transport failures before the preflight fail-open path runs. */
|
|
12
|
+
/** Retries transient transport and retryable 503 failures before the preflight fail-open path runs. */
|
|
13
13
|
export declare function callTwoFactorComplianceRpcWithRetry<T>(rpcCall: () => PromiseLike<{
|
|
14
14
|
data: T | null;
|
|
15
15
|
error: {
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -225,12 +225,7 @@ export interface CapgoCliInvokeOptions {
|
|
|
225
225
|
/** Opt this request into a newer `capgo_api` contract than the CLI default. */
|
|
226
226
|
apiVersion?: string;
|
|
227
227
|
}
|
|
228
|
-
export
|
|
229
|
-
export declare function readCapgoCliApiErrorPayload(error: unknown): Promise<{
|
|
230
|
-
error?: string;
|
|
231
|
-
message?: string;
|
|
232
|
-
moreInfo?: Record<string, unknown>;
|
|
233
|
-
} | null>;
|
|
228
|
+
export { getCapgoCliHttpStatus, readCapgoCliApiErrorPayload } from './api/capgo-http-error-payload';
|
|
234
229
|
export declare function formatCapgoCliInvokeError(error: unknown): Promise<string>;
|
|
235
230
|
/**
|
|
236
231
|
* Call the Capgo HTTP API. Every request carries the API key and the `capgo_api`
|