@builder.io/dev-tools 1.6.60 → 1.6.62-dev.202505271742.74e26043

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.
File without changes
@@ -61,5 +61,5 @@ interface RipgrepResult {
61
61
  }
62
62
  export declare function runRipgrep(workingDirectory: string, pattern: string, includeGlob?: string, excludeGlob?: string): Promise<RipgrepResult>;
63
63
  export declare function newAbortError(): Error;
64
- export declare function killProcess(sys: DevToolsSys, proc: ChildProcessByStdio<null, Readable, Readable> | undefined, timeout?: number): Promise<void>;
64
+ export declare function killProcess(sys: DevToolsSys, proc: ChildProcessByStdio<null, Readable, Readable> | undefined, abortSignal?: AbortSignal, timeout?: number): Promise<void>;
65
65
  export {};
@@ -6,7 +6,7 @@ import { type CommitMode, type FusionContext } from "./code-tools";
6
6
  export interface RunCommandCtx {
7
7
  command: string;
8
8
  state: "running" | "stopped";
9
- ensureRunning: () => Promise<boolean>;
9
+ ensureRunning: (abortSignal?: AbortSignal) => Promise<boolean>;
10
10
  addCheckpoint: () => void;
11
11
  getCheckpoints: (n: number, mode: "all" | "out" | "err") => string;
12
12
  getAllStdout: () => string;
@@ -17,7 +17,7 @@ export interface RunCommandCtx {
17
17
  onClose: (callback: (code: number | null) => void) => void;
18
18
  onStdout: (callback: (data: string) => void) => void;
19
19
  onStderr: (callback: (data: string) => void) => void;
20
- restart: () => Promise<void>;
20
+ restart: (abortSignal?: AbortSignal) => Promise<void>;
21
21
  }
22
22
  export interface SessionContext {
23
23
  sessionId: string;
@@ -92,7 +92,7 @@ export declare class CodeGenSession {
92
92
  }>;
93
93
  getCommitMode(): CommitMode | undefined;
94
94
  setCommitMode(commitMode: CommitMode): void;
95
- pushChanges(pullFirst?: boolean): Promise<void>;
95
+ pushChanges(pullFirst?: boolean): Promise<string>;
96
96
  hasChangesRelativeToRemote(): Promise<boolean>;
97
97
  pullLatestFromRemote(): Promise<void>;
98
98
  /**
@@ -47,4 +47,6 @@ export interface CLIArgs {
47
47
  builderUserId?: string;
48
48
  /** Path to workspace configuration file */
49
49
  workspace?: string;
50
+ /** Output structured JSON data instead of human-readable logs */
51
+ jsonOutput?: boolean;
50
52
  }
@@ -0,0 +1,86 @@
1
+ import { type SelectOptions, type ConfirmOptions, type TextOptions } from "@clack/prompts";
2
+ import { spinner } from "./spinner";
3
+ import type { WebSocket } from "ws";
4
+ export interface IOService {
5
+ log(str: string): void;
6
+ info(str: string): void;
7
+ warn(str: string): void;
8
+ error(str: string): void;
9
+ write(text: string): void;
10
+ writeMetadata(metadata: Record<string, any>): void;
11
+ confirm(options: ConfirmOptions): Promise<boolean | symbol>;
12
+ text(options: TextOptions): Promise<string | symbol>;
13
+ select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
14
+ createSpinner(): ReturnType<typeof spinner>;
15
+ isInteractive(): boolean;
16
+ isTTY(): boolean;
17
+ exit(code: number): Promise<void>;
18
+ }
19
+ export declare class ConsoleIOService implements IOService {
20
+ log(str: string): void;
21
+ info(str: string): void;
22
+ warn(str: string): void;
23
+ error(str: string): void;
24
+ write(text: string): void;
25
+ writeMetadata(_: Record<string, any>): void;
26
+ confirm(options: ConfirmOptions): Promise<boolean | symbol>;
27
+ text(options: TextOptions): Promise<string | symbol>;
28
+ select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
29
+ createSpinner(): ReturnType<typeof spinner>;
30
+ isInteractive(): boolean;
31
+ isTTY(): boolean;
32
+ exit(code: number): Promise<void>;
33
+ }
34
+ export interface BaseMessage {
35
+ type: string;
36
+ [key: string]: any;
37
+ }
38
+ export interface LogMessage extends BaseMessage {
39
+ type: "log";
40
+ level: "info" | "warn" | "error";
41
+ message: string;
42
+ }
43
+ export interface WriteMessage extends BaseMessage {
44
+ type: "write";
45
+ text: string;
46
+ }
47
+ export interface SpinnerMessage extends BaseMessage {
48
+ type: "spinner";
49
+ status: "start" | "stop";
50
+ message: string;
51
+ code?: number;
52
+ }
53
+ export interface PromptRequest extends BaseMessage {
54
+ type: "prompt";
55
+ promptType: "text" | "confirm" | "select";
56
+ options: any;
57
+ requestId: string;
58
+ }
59
+ export interface PromptResponse extends BaseMessage {
60
+ type: "prompt_response";
61
+ requestId: string;
62
+ value: any;
63
+ cancelled?: boolean;
64
+ }
65
+ export declare class WebSocketIOService implements IOService {
66
+ private ws;
67
+ private promptCallbacks;
68
+ private messageQueue;
69
+ private isProcessing;
70
+ constructor(ws: WebSocket);
71
+ private sendMessage;
72
+ private prompt;
73
+ log(...args: any[]): void;
74
+ info(...args: any[]): void;
75
+ warn(...args: any[]): void;
76
+ error(...args: any[]): void;
77
+ write(text: string): void;
78
+ writeMetadata(metadata: Record<string, any>): void;
79
+ confirm(options: ConfirmOptions): Promise<boolean | symbol>;
80
+ text(options: TextOptions): Promise<string | symbol>;
81
+ select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
82
+ createSpinner(): ReturnType<typeof spinner>;
83
+ isInteractive(): boolean;
84
+ isTTY(): boolean;
85
+ exit(code: number): Promise<void>;
86
+ }
@@ -43,6 +43,13 @@ export interface LaunchArgs extends CLIArgs {
43
43
  * @default "node"
44
44
  */
45
45
  dockerImageType?: "fusion-starter" | "node";
46
+ /**
47
+ * Output structured JSON data.
48
+ * Useful for programmatic consumption (e.g., VSCode extensions).
49
+ *
50
+ * @default false
51
+ */
52
+ jsonOutput?: boolean;
46
53
  }
47
54
  export interface FusionConfig {
48
55
  command: string;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Simple terminal buffer that handles basic control sequences
3
+ * to properly represent what would be shown in a real terminal
4
+ */
5
+ export declare class TerminalBuffer {
6
+ private lines;
7
+ private currentLine;
8
+ private currentColumn;
9
+ private maxLines;
10
+ constructor(maxLines?: number);
11
+ write(data: string): void;
12
+ private ensureLineExists;
13
+ getContent(): string;
14
+ clear(): void;
15
+ /**
16
+ * Get current cursor position for testing/debugging
17
+ */
18
+ getCursorPosition(): {
19
+ line: number;
20
+ column: number;
21
+ };
22
+ /**
23
+ * Get the current number of lines for testing/debugging
24
+ */
25
+ getLineCount(): number;
26
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { DevToolsSys } from "../..";
2
+ import type { EnsureConfigResult } from "../../../types";
3
+ /**
4
+ * Ensure the Remix Vite config has the necessary plugins and settings
5
+ */
6
+ export declare function ensureRemixConfig(sys: DevToolsSys, configFilePath: string, configContent: string): Promise<EnsureConfigResult>;
@@ -0,0 +1,10 @@
1
+ import type { DevToolsSys } from "../..";
2
+ import type ts from "typescript";
3
+ /**
4
+ * Check if the current project is using Remix framework
5
+ */
6
+ export declare function isRemixFramework(sys: DevToolsSys): boolean;
7
+ /**
8
+ * Update an object literal to include the external dependencies for Remix
9
+ */
10
+ export declare function updateCommonJsLibrary(sys: DevToolsSys, config: ts.ObjectLiteralExpression): ts.ObjectLiteralExpression | null;
@@ -0,0 +1,6 @@
1
+ import type { DevToolsSys } from "../..";
2
+ import type { EnsureConfigResult } from "../../../types";
3
+ /**
4
+ * Update a Vite config file to include a plugin
5
+ */
6
+ export declare function updateViteConfig(sys: DevToolsSys, configFilePath: string, configContent: string, pluginName: string, importPath: string): Promise<EnsureConfigResult>;