builder.io 1.7.24 → 1.7.26

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.
@@ -1,33 +1,36 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import type { Credentials } from "./credentials";
3
- import type { GitBackupDownloadUrlResult, GitBackupDownloadUrlOptions, GitBackupUploadUrlResult, GitBackupUploadUrlOptions, GitBackupRecordOptions, GitBackupRecordResult } from "$/ai-utils";
3
+ import type { GitBackupUploadUrlResult, GitBackupUploadUrlOptions, GitBackupRecordOptions, GitBackupRecordResult, BackupMetadata } from "$/ai-utils";
4
4
  /**
5
5
  * Requests a signed upload URL for git backup
6
6
  */
7
7
  export declare function requestSignedUploadUrl(credentials: Credentials, body: GitBackupUploadUrlOptions): Promise<GitBackupUploadUrlResult>;
8
- /**
9
- * Requests a signed download URL for git backup
10
- */
11
- export declare function requestSignedDownloadUrl(credentials: Credentials, body: GitBackupDownloadUrlOptions): Promise<GitBackupDownloadUrlResult>;
12
8
  /**
13
9
  * Records a successful git backup in Firebase
14
10
  */
15
11
  export declare function recordBackup(credentials: Credentials, body: GitBackupRecordOptions): Promise<GitBackupRecordResult>;
16
- export type GitBackupDownloadResult = {
17
- success: boolean;
18
- partial?: boolean;
19
- exists?: boolean;
20
- bundlePath?: string;
21
- bundleSize?: number;
22
- error?: Error;
23
- message?: string;
24
- };
12
+ export interface GitBackupDownloadResultValid {
13
+ success: true;
14
+ partial: boolean;
15
+ bundlePath: string;
16
+ bundleSize: number;
17
+ gitBranchName: string;
18
+ }
19
+ export interface GitBackupDownloadResultInvalid {
20
+ success: false;
21
+ error: Error;
22
+ }
23
+ export type GitBackupDownloadResult = GitBackupDownloadResultValid | GitBackupDownloadResultInvalid;
25
24
  /**
26
25
  * Downloads a git backup bundle
27
26
  * @returns The path to the downloaded bundle file, or null if no backup exists
28
27
  */
29
- export declare function downloadGitBackup(sys: DevToolsSys, credentials: Credentials, options: GitBackupDownloadUrlOptions): Promise<GitBackupDownloadResult>;
28
+ export declare function downloadGitBackup(sys: DevToolsSys, response: BackupMetadata): Promise<GitBackupDownloadResult>;
30
29
  /**
31
30
  * Uploads a file stream to a signed URL
32
31
  */
33
- export declare function uploadFileStream(filePath: string, signedUrl: string, size: number): Promise<Response>;
32
+ export declare function uploadFileStream(filePath: string, signedUrl: string, size: number, contentMd5: string): Promise<Response>;
33
+ export declare function computeMD5Hash(bundlePath: string): Promise<{
34
+ contentMd5: string;
35
+ size: number;
36
+ }>;
@@ -87,12 +87,14 @@ export declare class CodeGenSession {
87
87
  filePath?: undefined;
88
88
  expiresAt?: undefined;
89
89
  bundleSize?: undefined;
90
+ contentMd5?: undefined;
90
91
  error?: undefined;
91
92
  } | {
92
93
  success: boolean;
93
94
  filePath: string;
94
95
  expiresAt: string;
95
96
  bundleSize: number;
97
+ contentMd5: string;
96
98
  skipped?: undefined;
97
99
  reason?: undefined;
98
100
  lastCommitHash?: undefined;
@@ -106,6 +108,7 @@ export declare class CodeGenSession {
106
108
  filePath?: undefined;
107
109
  expiresAt?: undefined;
108
110
  bundleSize?: undefined;
111
+ contentMd5?: undefined;
109
112
  }>;
110
113
  createPR(...args: [
111
114
  {
@@ -153,7 +156,7 @@ export declare class CodeGenSession {
153
156
  /**
154
157
  * Get the current commit hash
155
158
  */
156
- getCurrentCommitHash(): Promise<string | undefined>;
159
+ getCurrentCommitHash(branchName?: string): Promise<string | undefined>;
157
160
  /**
158
161
  * Get the feature branch name
159
162
  */
@@ -1,9 +1,3 @@
1
1
  import { type InitConfig } from "./InitStateMachine";
2
2
  import type { InitState } from "$/ai-utils";
3
- export declare const attemptDryRunBackupGit: ({ sys, fusionConfig, debug, credentials }: InitConfig, realInitState: InitState) => Promise<{
4
- success: boolean;
5
- error: string;
6
- } | {
7
- success: boolean;
8
- error?: undefined;
9
- }>;
3
+ export declare const attemptDryRunBackupGit: (initConfig: InitConfig, realInitState: InitState) => Promise<void>;
@@ -0,0 +1,4 @@
1
+ import type { FusionMetrics } from "$/ai-utils";
2
+ import type { Credentials } from "cli/credentials";
3
+ import type { DevToolsSys } from "types";
4
+ export declare function pushMetrics(sys: DevToolsSys, credentials: Credentials, body: FusionMetrics): Promise<void>;