builder.io 1.11.0 → 1.11.2
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/cli/index.cjs +186 -181
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +2 -2
- package/server/index.cjs +43 -43
- package/server/index.mjs +43 -43
- package/types/cli/backup.d.ts +7 -18
- package/types/cli/codegen.d.ts +5 -5
- package/types/cli/launch/InitStateMachine.d.ts +12 -1
- package/types/cli/launch/helpers.d.ts +2 -1
- package/types/tsconfig.tsbuildinfo +1 -1
package/types/cli/backup.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DevToolsSys } from "../types";
|
|
2
2
|
import type { Credentials } from "./credentials";
|
|
3
|
-
import { type GitBackupUploadUrlResult, type GitBackupUploadUrlOptions, type GitBackupRecordOptions, type GitBackupRecordResult, type BackupMetadata, type WorkspaceConfiguration, type CodegenRuntimeStatus } from "$/ai-utils";
|
|
3
|
+
import { type GitBackupUploadUrlResult, type GitBackupUploadUrlOptions, type GitBackupRecordOptions, type GitBackupRecordResult, type BackupMetadata, type WorkspaceConfiguration, type CodegenRuntimeStatus, type BackupGitRepoResult } from "$/ai-utils";
|
|
4
4
|
interface BackupGitRepoOptions {
|
|
5
5
|
sys: DevToolsSys;
|
|
6
6
|
credentials: Credentials;
|
|
@@ -16,20 +16,8 @@ interface BackupGitRepoOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
isConnectedToProvider: boolean;
|
|
18
18
|
debug: boolean;
|
|
19
|
+
forcedFullBackup: boolean;
|
|
19
20
|
}
|
|
20
|
-
export interface BackupGitRepoResultValid {
|
|
21
|
-
success: true;
|
|
22
|
-
partial: boolean;
|
|
23
|
-
repoUrl: string;
|
|
24
|
-
empty: boolean;
|
|
25
|
-
lastCommitHash: string;
|
|
26
|
-
backupRef: string | undefined;
|
|
27
|
-
}
|
|
28
|
-
export interface BackupGitRepoResultInvalid {
|
|
29
|
-
success: false;
|
|
30
|
-
reason: "project_removed";
|
|
31
|
-
}
|
|
32
|
-
export type BackupGitRepoResult = BackupGitRepoResultValid | BackupGitRepoResultInvalid;
|
|
33
21
|
/**
|
|
34
22
|
* Creates a backup of git repository changes made by the AI system.
|
|
35
23
|
*
|
|
@@ -42,12 +30,12 @@ export type BackupGitRepoResult = BackupGitRepoResultValid | BackupGitRepoResult
|
|
|
42
30
|
* The aiBranch is where the AI creates commits as work progresses, while featureBranch
|
|
43
31
|
* is the base branch where work started (usually "main").
|
|
44
32
|
*/
|
|
45
|
-
export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, isConnectedToProvider, debug, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
|
|
46
|
-
|
|
33
|
+
export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, isConnectedToProvider, debug, forcedFullBackup, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
|
|
34
|
+
type InitialCommitHashResult = {
|
|
47
35
|
initialBranch: string;
|
|
48
36
|
initialCommitHash: string;
|
|
49
37
|
partial: boolean;
|
|
50
|
-
}
|
|
38
|
+
};
|
|
51
39
|
/**
|
|
52
40
|
* Determines the initial commit hash and whether to create a partial or full backup.
|
|
53
41
|
*
|
|
@@ -58,13 +46,14 @@ interface InitialCommitHashResult {
|
|
|
58
46
|
* For partial backups, we fetch the latest state of the chosen upstream branch from origin
|
|
59
47
|
* to ensure the backup has the correct commit range reference.
|
|
60
48
|
*/
|
|
61
|
-
export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, isConnectedToProvider, }: {
|
|
49
|
+
export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, isConnectedToProvider, forcedFullBackup, }: {
|
|
62
50
|
sys: DevToolsSys;
|
|
63
51
|
repoPath: string;
|
|
64
52
|
featureBranch: string;
|
|
65
53
|
debug: boolean;
|
|
66
54
|
workspace: WorkspaceConfiguration | undefined;
|
|
67
55
|
isConnectedToProvider: boolean;
|
|
56
|
+
forcedFullBackup?: boolean;
|
|
68
57
|
}): Promise<InitialCommitHashResult>;
|
|
69
58
|
/**
|
|
70
59
|
* Requests a signed upload URL for git backup
|
package/types/cli/codegen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DevToolsSys } from "../types";
|
|
2
2
|
import { type Credentials } from "./credentials";
|
|
3
|
-
import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition } from "$/ai-utils";
|
|
3
|
+
import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult } from "$/ai-utils";
|
|
4
4
|
import prettier from "prettier";
|
|
5
5
|
import { type FusionContext, type ToolResolution } from "./code-tools";
|
|
6
6
|
import EventEmitter from "node:events";
|
|
@@ -81,9 +81,9 @@ export declare class CodeGenSession {
|
|
|
81
81
|
archiveProject(): Promise<string>;
|
|
82
82
|
isIdle(): boolean;
|
|
83
83
|
needsBackup(): Promise<boolean>;
|
|
84
|
-
uploadBackup(): Promise<
|
|
85
|
-
success:
|
|
86
|
-
error:
|
|
84
|
+
uploadBackup(): Promise<BackupGitRepoResult | {
|
|
85
|
+
success: false;
|
|
86
|
+
error: Error;
|
|
87
87
|
}>;
|
|
88
88
|
getCommitMode(): import("$/ai-utils").CommitMode;
|
|
89
89
|
pushChanges(pullFirst?: boolean): Promise<{
|
|
@@ -111,7 +111,7 @@ export declare class CodeGenSession {
|
|
|
111
111
|
/**
|
|
112
112
|
* Get the current commit hash
|
|
113
113
|
*/
|
|
114
|
-
getCurrentCommitHash(
|
|
114
|
+
getCurrentCommitHash(): Promise<string | undefined>;
|
|
115
115
|
getCurrentBranch(): Promise<string>;
|
|
116
116
|
/**
|
|
117
117
|
* Get the feature branch name
|
|
@@ -24,7 +24,18 @@ export declare class InitStateMachine {
|
|
|
24
24
|
checkout(branchName: string, ref: string, repoPath: string): Promise<boolean>;
|
|
25
25
|
execAsync(exec: string, args: string[], cwd?: string): Promise<string>;
|
|
26
26
|
git(args: string[], cwd?: string): Promise<string>;
|
|
27
|
-
|
|
27
|
+
performBackup({ sys, credentials, fusionConfig, volumePath, repositories, isConnectedToProvider, forcedFullBackup, }: {
|
|
28
|
+
sys: DevToolsSys;
|
|
29
|
+
credentials: Credentials;
|
|
30
|
+
fusionConfig: FusionConfig;
|
|
31
|
+
volumePath: string;
|
|
32
|
+
repositories: Required<WorkspaceFolder>[];
|
|
33
|
+
isConnectedToProvider: boolean;
|
|
34
|
+
forcedFullBackup: boolean;
|
|
35
|
+
}): Promise<void>;
|
|
36
|
+
performRegularBackup(args: Omit<Parameters<typeof this.performBackup>[0], "isConnectedToProvider" | "forcedFullBackup">): Promise<void>;
|
|
37
|
+
performOfflineBackup(args: Omit<Parameters<typeof this.performBackup>[0], "isConnectedToProvider" | "forcedFullBackup">): Promise<void>;
|
|
38
|
+
performForcedFullBackup(args: Omit<Parameters<typeof this.performBackup>[0], "isConnectedToProvider" | "forcedFullBackup">): Promise<void>;
|
|
28
39
|
init(): Promise<boolean>;
|
|
29
40
|
addInitLog(type: "status" | "log" | "error" | "complete", message: string, options?: {
|
|
30
41
|
step?: InitStateStep;
|
|
@@ -4,9 +4,10 @@ export declare const getCommandWithShellArgs: (command: string, shell: string) =
|
|
|
4
4
|
export declare const isInRemoteContainer: () => boolean;
|
|
5
5
|
export declare const getVolumePath: (fusionConfig: FusionConfig) => string;
|
|
6
6
|
export declare function computeAIBranchName(featureBranch: string, sessionId: string): string;
|
|
7
|
-
export declare const getAndParseGitRepoInfo: ({ sys, gitWorkingDirectory, }: {
|
|
7
|
+
export declare const getAndParseGitRepoInfo: ({ sys, gitWorkingDirectory, strict, }: {
|
|
8
8
|
sys: DevToolsSys;
|
|
9
9
|
gitWorkingDirectory: string;
|
|
10
|
+
strict: boolean;
|
|
10
11
|
}) => Promise<{
|
|
11
12
|
currentBranch: string;
|
|
12
13
|
featureBranch: string;
|