builder.io 1.9.5 → 1.9.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.
@@ -9,40 +9,35 @@ interface BackupGitRepoOptions {
9
9
  repoPath: string;
10
10
  aiBranch: string;
11
11
  featureBranch: string;
12
+ originalRepoUrl: string;
12
13
  workspace: WorkspaceConfiguration | undefined;
13
14
  debug: boolean;
14
15
  }
15
- export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, debug, }: BackupGitRepoOptions): Promise<{
16
- success: boolean;
16
+ export interface BackupGitRepoResultValid {
17
+ success: true;
18
+ partial: boolean;
19
+ repoUrl: string;
17
20
  empty: boolean;
18
21
  lastCommitHash: string;
19
- skipped?: undefined;
20
- reason?: undefined;
21
- filePath?: undefined;
22
- expiresAt?: undefined;
23
- bundleSize?: undefined;
24
- contentMd5?: undefined;
25
- } | {
26
- success: boolean;
27
- skipped: boolean;
28
- reason: string;
29
- empty?: undefined;
30
- lastCommitHash?: undefined;
31
- filePath?: undefined;
32
- expiresAt?: undefined;
33
- bundleSize?: undefined;
34
- contentMd5?: undefined;
35
- } | {
36
- success: boolean;
37
- filePath: string;
38
- expiresAt: string;
39
- bundleSize: number;
40
- contentMd5: string;
41
- lastCommitHash: string;
42
- empty?: undefined;
43
- skipped?: undefined;
44
- reason?: undefined;
45
- }>;
22
+ backupRef: string | undefined;
23
+ }
24
+ export interface BackupGitRepoResultInvalid {
25
+ success: false;
26
+ reason: "project_removed";
27
+ }
28
+ export type BackupGitRepoResult = BackupGitRepoResultValid | BackupGitRepoResultInvalid;
29
+ export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, originalRepoUrl, debug, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
30
+ interface InitialCommitHashResult {
31
+ initialCommitHash: string;
32
+ partial: boolean;
33
+ }
34
+ export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, }: {
35
+ sys: DevToolsSys;
36
+ repoPath: string;
37
+ featureBranch: string;
38
+ debug: boolean;
39
+ workspace: WorkspaceConfiguration | undefined;
40
+ }): Promise<InitialCommitHashResult>;
46
41
  /**
47
42
  * Requests a signed upload URL for git backup
48
43
  */
@@ -78,4 +73,9 @@ export declare function computeMD5Hash(bundlePath: string): Promise<{
78
73
  size: number;
79
74
  }>;
80
75
  export declare function setLastCommit(sys: DevToolsSys, credentials: Credentials, data: CodegenSetLastCommit, verbose: boolean): Promise<any>;
76
+ export declare function computeBackupRef(input: {
77
+ version: string | undefined;
78
+ originalRepoUrl: string | undefined;
79
+ commitHash: string | undefined;
80
+ }): string | undefined;
81
81
  export {};
@@ -52,10 +52,6 @@ export declare class CodeGenSession {
52
52
  loadHistory(): Promise<LoadHistoryResult>;
53
53
  loadWholeSession(opts?: LoadWholeSessionOptions): Promise<LoadWholeSessionResult>;
54
54
  loadMoreTurns(): Promise<CodegenTurn[]>;
55
- setRepoUrl(repoUrl: string): void;
56
- getRepoUrl(): string | undefined;
57
- setPrUrl(prUrl: string): void;
58
- prExists(): boolean;
59
55
  pushRepoV2({ repoFullName }: {
60
56
  repoFullName: string;
61
57
  }): Promise<{
@@ -79,63 +75,10 @@ export declare class CodeGenSession {
79
75
  archiveProject(): Promise<string>;
80
76
  isIdle(): Promise<boolean>;
81
77
  needsBackup(): Promise<boolean>;
82
- uploadBackup(): Promise<{
83
- success: boolean;
84
- empty: boolean;
85
- lastCommitHash: string;
86
- skipped?: undefined;
87
- reason?: undefined;
88
- filePath?: undefined;
89
- expiresAt?: undefined;
90
- bundleSize?: undefined;
91
- contentMd5?: undefined;
92
- } | {
93
- success: boolean;
94
- skipped: boolean;
95
- reason: string;
96
- empty?: undefined;
97
- lastCommitHash?: undefined;
98
- filePath?: undefined;
99
- expiresAt?: undefined;
100
- bundleSize?: undefined;
101
- contentMd5?: undefined;
102
- } | {
103
- success: boolean;
104
- filePath: string;
105
- expiresAt: string;
106
- bundleSize: number;
107
- contentMd5: string;
108
- lastCommitHash: string;
109
- empty?: undefined;
110
- skipped?: undefined;
111
- reason?: undefined;
112
- } | {
78
+ uploadBackup(): Promise<import("./backup").BackupGitRepoResultValid | import("./backup").BackupGitRepoResultInvalid | {
113
79
  success: boolean;
114
80
  error: Error;
115
81
  }>;
116
- createPR(...args: [
117
- {
118
- repoFullName: string;
119
- githubToken: string;
120
- branchName: string;
121
- projectId: string;
122
- }
123
- ] | [string, string, string, string]): Promise<{
124
- output: string;
125
- upToDate: boolean;
126
- createdBranch: boolean;
127
- setUpToStream: boolean;
128
- status: GenerateCompletionStepGit | null;
129
- success: boolean;
130
- prUrl: any;
131
- prNumber: any;
132
- error?: undefined;
133
- details?: undefined;
134
- } | {
135
- success: boolean;
136
- error: string;
137
- details: unknown;
138
- }>;
139
82
  getCommitMode(): CommitMode | undefined;
140
83
  setCommitMode(commitMode: CommitMode): void;
141
84
  pushChanges(pullFirst?: boolean): Promise<{
@@ -90,4 +90,6 @@ export interface CLIArgs {
90
90
  index?: boolean;
91
91
  /** If true list indexed repositories */
92
92
  listIndexedRepos?: boolean;
93
+ /** MCP support */
94
+ mcpSupport?: boolean;
93
95
  }