builder.io 1.12.3 → 1.12.5
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 +561 -557
- 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 +210 -210
- package/server/index.mjs +210 -210
- package/types/cli/codegen.d.ts +14 -19
- package/types/cli/launch/config.d.ts +1 -1
- package/types/cli/launch/dev-server-orchestrator.d.ts +11 -10
- package/types/cli/launch/grafana.d.ts +2 -2
- package/types/cli/launch/helpers.d.ts +1 -1
- package/types/cli/launch/proxy.d.ts +1 -1
- package/types/cli/repo-metrics.d.ts +6 -0
- package/types/cli/utils/git.d.ts +1 -1
- package/types/cli/utils/terminal-buffer.d.ts +2 -0
- package/types/tsconfig.tsbuildinfo +1 -1
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, BackupGitRepoResult, PushChangesArgs, CodegenApiResult } 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, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics } 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";
|
|
@@ -91,14 +91,22 @@ export declare class CodeGenSession {
|
|
|
91
91
|
git(args: string[], opts?: string | RunCommandOptions): Promise<string>;
|
|
92
92
|
setDebug(debug: boolean): void;
|
|
93
93
|
createTerminal(options?: {
|
|
94
|
+
terminalId?: string;
|
|
95
|
+
title?: string;
|
|
94
96
|
cwd?: string;
|
|
95
97
|
env?: Record<string, string | undefined>;
|
|
96
98
|
cols?: number;
|
|
97
99
|
rows?: number;
|
|
98
100
|
shell?: string;
|
|
99
|
-
|
|
101
|
+
createdBy?: string;
|
|
102
|
+
}): CodegenApiTerminal;
|
|
103
|
+
emitTerminals(): void;
|
|
104
|
+
updateTerminal({ terminalId, cols, rows, title, }: {
|
|
100
105
|
terminalId: string;
|
|
101
|
-
|
|
106
|
+
cols?: number;
|
|
107
|
+
rows?: number;
|
|
108
|
+
title?: string;
|
|
109
|
+
}): boolean;
|
|
102
110
|
writeTerminal({ terminalId, data }: {
|
|
103
111
|
terminalId: string;
|
|
104
112
|
data: string;
|
|
@@ -121,6 +129,7 @@ export declare class CodeGenSession {
|
|
|
121
129
|
includePattern?: string;
|
|
122
130
|
gitignore?: boolean;
|
|
123
131
|
}): Promise<string[]>;
|
|
132
|
+
collectRepoMetrics(): Promise<RepoMetrics>;
|
|
124
133
|
getSessionId(): string;
|
|
125
134
|
getSpaceId(): string | undefined;
|
|
126
135
|
revertToCommitHash(commitHash: string): Promise<void>;
|
|
@@ -180,7 +189,7 @@ export declare class CodeGenSession {
|
|
|
180
189
|
sendMessage(message: GenerateUserMessage, immediate?: boolean): Promise<void>;
|
|
181
190
|
getTurns(): CodegenTurn[];
|
|
182
191
|
getSessionContext(): SessionContext;
|
|
183
|
-
runSetupCommand(): Promise<import("
|
|
192
|
+
runSetupCommand(): Promise<import("$/ai-utils").SetupCommandResult | undefined>;
|
|
184
193
|
abortSetupCommand(): void;
|
|
185
194
|
toolsRunning(): boolean;
|
|
186
195
|
abortAllTools(): void;
|
|
@@ -196,21 +205,7 @@ export declare class CodeGenSession {
|
|
|
196
205
|
abort(cleanCurrentMessage?: boolean): Promise<boolean>;
|
|
197
206
|
stopEventLoop(): Promise<void>;
|
|
198
207
|
requestRefresh(): void;
|
|
199
|
-
configureDevOrchestrator(opts:
|
|
200
|
-
devCommand?: string;
|
|
201
|
-
setupCommand?: string;
|
|
202
|
-
proxyPort?: number;
|
|
203
|
-
proxyServer?: string;
|
|
204
|
-
env?: Record<string, string | null>;
|
|
205
|
-
replaceEnvs?: boolean;
|
|
206
|
-
forceSetupCommand?: boolean;
|
|
207
|
-
forceDevCommand?: boolean;
|
|
208
|
-
}): Promise<{
|
|
209
|
-
devCommand: boolean;
|
|
210
|
-
setupCommand: boolean;
|
|
211
|
-
proxyServer: boolean;
|
|
212
|
-
env: boolean;
|
|
213
|
-
}>;
|
|
208
|
+
configureDevOrchestrator(opts: ConfigureDevOrchestratorOpts): Promise<ConfigureDevOrchestratorUpdates>;
|
|
214
209
|
close(uploadGitBackup?: boolean): Promise<void>;
|
|
215
210
|
emitGitStatus(): Promise<GenerateCompletionStepGit | null>;
|
|
216
211
|
manualCommit(options: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FusionConfig } from "$/ai-utils";
|
|
2
2
|
import type { LaunchArgs } from "../launch";
|
|
3
|
-
import type { DevToolsSys } from "types";
|
|
3
|
+
import type { DevToolsSys } from "../../types";
|
|
4
4
|
export declare function getFusionConfig(sys: DevToolsSys, args: LaunchArgs): Promise<FusionConfig>;
|
|
5
5
|
export declare function saveFusionConfig(sys: DevToolsSys, fusionConfig: FusionConfig): Promise<void>;
|
|
6
6
|
export declare function trackConfigData(sys: DevToolsSys, fusionConfig: FusionConfig): void;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import type { DevToolsSys } from "@builder.io/dev-tools/core";
|
|
2
2
|
import type { ProxyMiddleware } from "../../types/proxy-middleware";
|
|
3
|
-
import type { DevCommandState, EnvironmentVariable, HttpServerState } from "$/ai-utils";
|
|
3
|
+
import type { DevCommandState, EnvironmentVariable, HttpServerState, SetupCommandResult } from "$/ai-utils";
|
|
4
4
|
import EventEmitter from "events";
|
|
5
5
|
import { ChildProcess } from "node:child_process";
|
|
6
6
|
import type { FusionConfig, SetupCommandState } from "$/ai-utils";
|
|
7
7
|
export type DevServerState = Exclude<SetupCommandState | DevCommandState, "installed" | "starting">;
|
|
8
|
-
export interface SetupCommandResult {
|
|
9
|
-
code: number | null;
|
|
10
|
-
output: string;
|
|
11
|
-
}
|
|
12
8
|
export interface DevCommandProcess {
|
|
13
9
|
type: "devCommandProcess";
|
|
14
10
|
getPid: () => number | undefined;
|
|
@@ -40,13 +36,15 @@ export interface DevServerOrchestrator {
|
|
|
40
36
|
devState: DevCommandState;
|
|
41
37
|
httpServerState: HttpServerState;
|
|
42
38
|
state: DevServerState;
|
|
43
|
-
proxyTarget: string;
|
|
44
|
-
proxyPort: number;
|
|
39
|
+
proxyTarget: string | undefined;
|
|
40
|
+
proxyPort: number | undefined;
|
|
45
41
|
environmentVariables: EnvironmentVariable[];
|
|
46
42
|
envVars: Record<string, string>;
|
|
47
43
|
proxyMiddleware: ProxyMiddleware | undefined;
|
|
48
44
|
pid: number | undefined;
|
|
49
|
-
autoDetectedUrl:
|
|
45
|
+
autoDetectedUrl: boolean;
|
|
46
|
+
autoDetectDevServer: boolean;
|
|
47
|
+
autoDetectDevServerPatterns: string[] | undefined;
|
|
50
48
|
abortSetupCommand: () => void;
|
|
51
49
|
clearEnvVariables: () => void;
|
|
52
50
|
setEnvVariable: (key: string, value: string | undefined) => boolean;
|
|
@@ -54,16 +52,19 @@ export interface DevServerOrchestrator {
|
|
|
54
52
|
ensureSetupCommand: (abortSignal?: AbortSignal) => Promise<boolean>;
|
|
55
53
|
setupCommandPromise: Promise<SetupCommandResult> | undefined;
|
|
56
54
|
runSetupCommand: (signal?: AbortSignal) => Promise<SetupCommandResult>;
|
|
57
|
-
setSetupCommand: (newCommand: string, forceRestart?: boolean, signal?: AbortSignal) => Promise<SetupCommandResult | null>;
|
|
58
|
-
setDevCommand: (newCommand: string, forceRestart?: boolean, signal?: AbortSignal) => Promise<boolean>;
|
|
55
|
+
setSetupCommand: (newCommand: string | undefined, forceRestart?: boolean, signal?: AbortSignal) => Promise<SetupCommandResult | null>;
|
|
56
|
+
setDevCommand: (newCommand: string | undefined, forceRestart?: boolean, signal?: AbortSignal) => Promise<boolean>;
|
|
59
57
|
setProxyServer: (newProxyServer: string) => Promise<boolean>;
|
|
60
58
|
setPort: (newPort: number) => Promise<boolean>;
|
|
59
|
+
setAutoDetectSettings: (enabled: boolean, patterns?: string[]) => Promise<boolean>;
|
|
61
60
|
addCheckpoint: () => void;
|
|
62
61
|
getOpenPorts: () => Promise<number[]>;
|
|
63
62
|
getCheckpoints: (n: number, mode: "all" | "out" | "err") => string;
|
|
64
63
|
getAllStdout: () => string;
|
|
65
64
|
getAllStderr: () => string;
|
|
66
65
|
getOutput: () => string;
|
|
66
|
+
getSetupWrite: () => string;
|
|
67
|
+
getDevWrite: () => string;
|
|
67
68
|
getSetupOutput: () => string;
|
|
68
69
|
waitUntilIdle: (initialWaitMs?: number, idleTimeMs?: number) => Promise<void>;
|
|
69
70
|
onClose: (callback: (code: number | null) => void) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { FusionMetrics } from "$/ai-utils";
|
|
2
|
-
import type { Credentials } from "
|
|
3
|
-
import type { DevToolsSys } from "types";
|
|
2
|
+
import type { Credentials } from "../credentials";
|
|
3
|
+
import type { DevToolsSys } from "../../types";
|
|
4
4
|
export declare function pushMetrics(sys: DevToolsSys, credentials: Credentials, body: FusionMetrics): Promise<void>;
|
package/types/cli/utils/git.d.ts
CHANGED
|
@@ -8,9 +8,11 @@ export declare class TerminalBuffer {
|
|
|
8
8
|
private currentColumn;
|
|
9
9
|
private maxLines;
|
|
10
10
|
private maxColumns;
|
|
11
|
+
private chunks;
|
|
11
12
|
constructor(maxLines?: number, maxColumns?: number);
|
|
12
13
|
write(data: string): void;
|
|
13
14
|
private ensureLineExists;
|
|
15
|
+
getWrite(): string;
|
|
14
16
|
getContent(): string;
|
|
15
17
|
clear(): void;
|
|
16
18
|
/**
|