builder.io 1.7.28 → 1.7.30

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.
@@ -4,7 +4,7 @@ import type { GitBackupUploadUrlResult, GitBackupUploadUrlOptions, GitBackupReco
4
4
  /**
5
5
  * Requests a signed upload URL for git backup
6
6
  */
7
- export declare function requestSignedUploadUrl(credentials: Credentials, body: GitBackupUploadUrlOptions): Promise<GitBackupUploadUrlResult>;
7
+ export declare function requestSignedUploadUrl(credentials: Credentials, body: GitBackupUploadUrlOptions): Promise<GitBackupUploadUrlResult | null>;
8
8
  /**
9
9
  * Records a successful git backup in Firebase
10
10
  */
@@ -84,6 +84,29 @@ export declare class CodeGenSession {
84
84
  skipped: boolean;
85
85
  reason: string;
86
86
  lastCommitHash: string;
87
+ empty?: undefined;
88
+ filePath?: undefined;
89
+ expiresAt?: undefined;
90
+ bundleSize?: undefined;
91
+ contentMd5?: undefined;
92
+ error?: undefined;
93
+ } | {
94
+ success: boolean;
95
+ empty: boolean;
96
+ skipped?: undefined;
97
+ reason?: undefined;
98
+ lastCommitHash?: undefined;
99
+ filePath?: undefined;
100
+ expiresAt?: undefined;
101
+ bundleSize?: undefined;
102
+ contentMd5?: undefined;
103
+ error?: undefined;
104
+ } | {
105
+ success: boolean;
106
+ skipped: boolean;
107
+ reason: string;
108
+ lastCommitHash?: undefined;
109
+ empty?: undefined;
87
110
  filePath?: undefined;
88
111
  expiresAt?: undefined;
89
112
  bundleSize?: undefined;
@@ -98,6 +121,7 @@ export declare class CodeGenSession {
98
121
  skipped?: undefined;
99
122
  reason?: undefined;
100
123
  lastCommitHash?: undefined;
124
+ empty?: undefined;
101
125
  error?: undefined;
102
126
  } | {
103
127
  success: boolean;
@@ -105,6 +129,7 @@ export declare class CodeGenSession {
105
129
  skipped?: undefined;
106
130
  reason?: undefined;
107
131
  lastCommitHash?: undefined;
132
+ empty?: undefined;
108
133
  filePath?: undefined;
109
134
  expiresAt?: undefined;
110
135
  bundleSize?: undefined;
@@ -157,6 +182,7 @@ export declare class CodeGenSession {
157
182
  * Get the current commit hash
158
183
  */
159
184
  getCurrentCommitHash(branchName?: string): Promise<string | undefined>;
185
+ getCurrentBranch(): Promise<string>;
160
186
  /**
161
187
  * Get the feature branch name
162
188
  */
@@ -307,7 +333,7 @@ export declare class CodeGenSession {
307
333
  * @param dirPath A directory path that may include a workspace prefix
308
334
  * @returns Array of file names in the directory or empty array if directory doesn't exist
309
335
  */
310
- listDir(dirPath: string, ignoreGlobs?: string[]): Promise<string[]>;
336
+ listDir(dirPath: string): Promise<string[]>;
311
337
  /**
312
338
  * Get stats for a file in the workspace
313
339
  * @param filePath A file path that may include a workspace prefix
@@ -338,3 +364,11 @@ export declare function loadWorkspace(sys: DevToolsSys, workspaceFile: string):
338
364
  workingDirectory: string;
339
365
  }>;
340
366
  export declare function keepAlive(): () => void;
367
+ export declare class BashError extends Error {
368
+ readonly code: number | string | undefined;
369
+ readonly stdout: string;
370
+ readonly stderr: string;
371
+ constructor(message: string, code: number | string | undefined, stdout: string, stderr: string, opts: {
372
+ cause?: Error;
373
+ });
374
+ }
@@ -1,4 +1,3 @@
1
- import { exec } from "child_process";
2
1
  import type { DevToolsSys } from "@builder.io/dev-tools/core";
3
2
  import { type FusionConfig, type WorkspaceFolder, type InitState, type InitStateStep, type InitStatusLog } from "$/ai-utils";
4
3
  import type { Credentials } from "../credentials";
@@ -14,28 +13,27 @@ export interface InitStatus {
14
13
  message: string;
15
14
  error?: string;
16
15
  }
17
- declare const _execAsync: typeof exec.__promisify__;
18
16
  export declare class InitStateMachine {
19
17
  logIdCounter: number;
20
18
  initStatusLogs: InitStatusLog[];
21
19
  initState: InitState;
22
20
  debug: boolean;
23
- execAsync(...args: Parameters<typeof _execAsync>): Promise<{
24
- stdout: string | Buffer;
25
- stderr: string | Buffer;
21
+ execAsync(cmd: string, cwd?: string): Promise<{
22
+ stdout: string;
23
+ stderr: string;
26
24
  }>;
27
- init(config: InitConfig, signal?: AbortSignal): Promise<boolean>;
25
+ init(config: InitConfig): Promise<boolean>;
28
26
  addInitLog(type: "status" | "log" | "error" | "complete", message: string, options?: {
29
27
  step?: InitStateStep;
30
28
  error?: string;
31
29
  success?: boolean;
32
30
  }): void;
33
31
  clearInitLogs(): void;
34
- step1CheckDirectories(config: InitConfig, repositories: Required<WorkspaceFolder>[], signal?: AbortSignal): Promise<void>;
35
- step2ConfigureGitRepositories(config: InitConfig, repositories: Required<WorkspaceFolder>[], signal?: AbortSignal): Promise<void>;
36
- step3ConfigureGitUser(config: InitConfig, repositories: Required<WorkspaceFolder>[], signal?: AbortSignal): Promise<void>;
37
- step4StashChanges(config: InitConfig, repositories: Required<WorkspaceFolder>[], signal?: AbortSignal): Promise<void>;
38
- step5CollectRepoInfo(config: InitConfig, repositories: Required<WorkspaceFolder>[], signal?: AbortSignal): Promise<void>;
32
+ step1CheckDirectories(config: InitConfig, repositories: Required<WorkspaceFolder>[]): Promise<void>;
33
+ step2ConfigureGitRepositories(config: InitConfig, repositories: Required<WorkspaceFolder>[]): Promise<void>;
34
+ step3ConfigureGitUser(config: InitConfig, repositories: Required<WorkspaceFolder>[]): Promise<void>;
35
+ step4StashChanges(config: InitConfig, repositories: Required<WorkspaceFolder>[]): Promise<void>;
36
+ step5CollectRepoInfo(config: InitConfig, repositories: Required<WorkspaceFolder>[]): Promise<void>;
39
37
  private isGitConfigured;
40
38
  private getGitRemoteUrl;
41
39
  private sanitizeGitRemoteUrl;
@@ -45,11 +43,9 @@ export declare class InitStateMachine {
45
43
  * If no backup is available, do nothing.
46
44
  */
47
45
  private restoreFromPartialBackup;
48
- cloneRepository({ repo, repoPath, signal, backupResult, }: {
46
+ cloneRepository({ repo, repoPath, backupResult, }: {
49
47
  repo: Required<WorkspaceFolder>;
50
48
  repoPath: string;
51
- signal?: AbortSignal;
52
49
  backupResult: GitBackupDownloadResult | undefined;
53
50
  }): Promise<boolean>;
54
51
  }
55
- export {};