builder.io 1.10.10 → 1.10.11
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 +348 -347
- 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 +1 -1
- package/server/index.cjs +107 -107
- package/server/index.mjs +117 -117
- package/types/cli/backup.d.ts +1 -1
- package/types/cli/codegen.d.ts +9 -7
- package/types/cli/launch/config.d.ts +2 -1
- package/types/common/errors.d.ts +27 -0
- package/types/tsconfig.tsbuildinfo +1 -1
package/types/cli/backup.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ interface InitialCommitHashResult {
|
|
|
51
51
|
* - The repo is an example/starter template (users can't push to origin, need to fork)
|
|
52
52
|
* - There's no origin remote configured
|
|
53
53
|
*
|
|
54
|
-
* For partial backups, we fetch the latest state of the
|
|
54
|
+
* For partial backups, we fetch the latest state of the chosen upstream branch from origin
|
|
55
55
|
* to ensure the backup has the correct commit range reference.
|
|
56
56
|
*/
|
|
57
57
|
export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, }: {
|
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 } from "$/ai-utils";
|
|
3
|
+
import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode } 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";
|
|
@@ -23,8 +23,8 @@ export interface CodeGenSessionOptionsBase {
|
|
|
23
23
|
credentials: Credentials;
|
|
24
24
|
position: string;
|
|
25
25
|
maxTokens?: number;
|
|
26
|
-
encryptKey?: string;
|
|
27
26
|
mode: CodeGenMode;
|
|
27
|
+
privacyMode?: PrivacyMode;
|
|
28
28
|
builtInCustomInstructions?: CustomInstruction[];
|
|
29
29
|
fusionContext?: FusionContext;
|
|
30
30
|
fusionConfig?: FusionConfig;
|
|
@@ -49,6 +49,7 @@ export declare class CodeGenSession {
|
|
|
49
49
|
constructor(options: CodeGenSessionOptions);
|
|
50
50
|
get fusionConfig(): FusionConfig | undefined;
|
|
51
51
|
get workingDirectory(): string;
|
|
52
|
+
setPrivacyMode(privacyMode: PrivacyMode | undefined): Promise<void>;
|
|
52
53
|
initializeSession(opts?: {
|
|
53
54
|
skipSessionLoading?: boolean;
|
|
54
55
|
}): Promise<void>;
|
|
@@ -92,11 +93,7 @@ export declare class CodeGenSession {
|
|
|
92
93
|
status: GenerateCompletionStepGit | null;
|
|
93
94
|
}>;
|
|
94
95
|
hasChangesRelativeToRemote(): Promise<boolean>;
|
|
95
|
-
pullLatestFromRemote(): Promise<
|
|
96
|
-
syncChangesFromMain(arg: string | {
|
|
97
|
-
mainBranchName: string;
|
|
98
|
-
allowUnrelatedHistory?: boolean;
|
|
99
|
-
}): Promise<{
|
|
96
|
+
pullLatestFromRemote(): Promise<{
|
|
100
97
|
success: boolean;
|
|
101
98
|
message: string;
|
|
102
99
|
conflicts?: undefined;
|
|
@@ -105,6 +102,11 @@ export declare class CodeGenSession {
|
|
|
105
102
|
conflicts: boolean;
|
|
106
103
|
message: string;
|
|
107
104
|
}>;
|
|
105
|
+
syncChangesFromMain(arg: string | {
|
|
106
|
+
mainBranchName: string;
|
|
107
|
+
allowUnrelatedHistory?: boolean;
|
|
108
|
+
pullCurrentBranch?: boolean;
|
|
109
|
+
}): Promise<void>;
|
|
108
110
|
/**
|
|
109
111
|
* Get the current commit hash
|
|
110
112
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FusionConfig } from "$/ai-utils";
|
|
2
2
|
import type { LaunchArgs } from "../launch";
|
|
3
3
|
import type { DevToolsSys } from "types";
|
|
4
4
|
export declare function getFusionConfig(sys: DevToolsSys, args: LaunchArgs): Promise<FusionConfig>;
|
|
5
|
+
export declare function trackConfigData(sys: DevToolsSys, fusionConfig: FusionConfig): void;
|
package/types/common/errors.d.ts
CHANGED
|
@@ -4,3 +4,30 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class PrivateError extends Error {
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Standardized network error class with structured properties for better diagnostics
|
|
9
|
+
*/
|
|
10
|
+
export declare class NetworkError extends PrivateError {
|
|
11
|
+
constructor({ type, cause, message, suggestions, hostname, port, statusCode, errorCode, }: {
|
|
12
|
+
type: NetworkErrorType;
|
|
13
|
+
cause?: Error;
|
|
14
|
+
message: string;
|
|
15
|
+
suggestions?: string[];
|
|
16
|
+
hostname?: string;
|
|
17
|
+
port?: number;
|
|
18
|
+
statusCode?: number;
|
|
19
|
+
errorCode?: string;
|
|
20
|
+
});
|
|
21
|
+
readonly type: NetworkErrorType;
|
|
22
|
+
readonly suggestions: string[];
|
|
23
|
+
readonly hostname?: string;
|
|
24
|
+
readonly port?: number;
|
|
25
|
+
readonly statusCode?: number;
|
|
26
|
+
readonly errorCode?: string;
|
|
27
|
+
}
|
|
28
|
+
export type NetworkErrorType = "connection_refused" | "connection_timeout" | "dns_not_found" | "ssl_error" | "rate_limit" | "server_error" | "authentication_error" | "unknown";
|
|
29
|
+
export declare function convertNodeErrorToNetworkError(error: Error & {
|
|
30
|
+
code?: string;
|
|
31
|
+
}, hostname: string, port?: number): NetworkError;
|
|
32
|
+
export declare function createHttpError(statusCode: number, hostname: string, cause?: Error): NetworkError;
|
|
33
|
+
export declare function displayNetworkError(error: NetworkError): void;
|