mastra
Version:
cli for mastra
38 lines • 1.25 kB
TypeScript
import { createApiClient } from '../commands/auth/client.js';
type ApiClient = ReturnType<typeof createApiClient>;
/**
* Best-effort cancel of a deploy. Logs warnings on failure but never throws.
*/
export declare function bestEffortCancel(opts: {
postCancel: (client: ApiClient) => Promise<{
error?: unknown;
response: {
status: number;
};
}>;
client: ApiClient;
deployId: string;
}): Promise<void>;
/**
* Retry the upload-complete POST with exponential backoff.
* On exhaustion, cancels the orphaned deploy and throws.
*
* Retries on: 5xx, 401 (with token refresh), and transient network errors.
* Does NOT retry other 4xx (e.g. 404 = deploy not found).
*/
export declare function confirmUploadWithRetry(opts: {
postUploadComplete: (client: ApiClient) => Promise<{
error?: unknown;
response: {
status: number;
};
}>;
cancelDeploy: (client: ApiClient) => Promise<void>;
client: ApiClient;
orgId: string;
maxRetries?: number;
/** Override for testing — refresh the client with a new token. */
refreshClient?: (orgId: string) => Promise<ApiClient>;
}): Promise<void>;
export {};
//# sourceMappingURL=deploy-upload.d.ts.map