builder.io 1.14.2 → 1.14.3

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.
@@ -86,5 +86,7 @@ export interface CLIArgs {
86
86
  disableMcp?: boolean;
87
87
  /** Clear all stored credentials (logout) */
88
88
  reset?: boolean;
89
+ /** Comma-separated list of component names to reindex */
90
+ components?: string;
89
91
  nativeApp?: boolean;
90
92
  }
@@ -2,7 +2,6 @@ import type { DevToolsSys } from "@builder.io/dev-tools/core";
2
2
  import type { ProxyMiddleware } from "../../types/proxy-middleware";
3
3
  import type { DevCommandResult, DevCommandState, EnvironmentVariable, HttpServerState, SetupCommandResult, SetupDependency } from "$/ai-utils";
4
4
  import EventEmitter from "events";
5
- import { ChildProcess } from "node:child_process";
6
5
  import type { FusionConfig, SetupCommandState } from "$/ai-utils";
7
6
  export type DevServerState = Exclude<SetupCommandState | DevCommandState, "installed" | "starting">;
8
7
  export interface DevCommandProcess {
@@ -90,4 +89,3 @@ export interface DevServerOrchestrator {
90
89
  export declare const importPty: (sys: DevToolsSys) => typeof import("@lydell/node-pty") | undefined;
91
90
  export declare function devServerOrchestrator(sys: DevToolsSys, fusionConfig: FusionConfig, initialSetupState: "installed" | "not-installed" | "install-failed"): Promise<DevServerOrchestrator>;
92
91
  export declare const checkPortsListenedByPid: (pid: number) => number[];
93
- export declare function killProcess(sys: DevToolsSys, proc: ChildProcess | DevCommandProcess | undefined, abortSignal?: AbortSignal, timeout?: number): Promise<boolean>;
@@ -1,20 +1,5 @@
1
1
  import type { FusionConfig } from "$/ai-utils";
2
2
  import type { DevToolsSys } from "../../types";
3
- export declare const getTempFolder: () => string;
4
- export declare const cleanupTempFolder: () => boolean;
5
- /**
6
- * Detects if a command is multi-line (contains newlines)
7
- */
8
- export declare const isMultiLineCommand: (command: string) => boolean;
9
- /**
10
- * Creates a temporary script file for multi-line commands
11
- */
12
- export declare const createTempScript: (command: string, shell: string) => string;
13
- /**
14
- * Cleans up a temporary script file
15
- */
16
- export declare const cleanupTempScript: (scriptPath: string) => void;
17
- export declare const getCommandWithShellArgs: (command: string, shell: string) => string[];
18
3
  export declare const isInRemoteContainer: () => boolean;
19
4
  export declare const getVolumePath: (fusionConfig: FusionConfig) => string;
20
5
  export declare function computeAIBranchName(featureBranch: string, sessionId: string): string;
@@ -1,9 +1,6 @@
1
1
  import type { DevToolsSys } from "@builder.io/dev-tools/core";
2
2
  import type { CLIArgs } from "./index";
3
- /**
4
- * Large random-ish port number that is unlikely to be used
5
- */
6
- export declare const PROXY_PORT = 48752;
3
+ export declare const DEFAULT_PROXY_PORT = 48752;
7
4
  export interface LaunchArgs extends CLIArgs {
8
5
  /** Project ID for the dev server. Only needed when running in a remote container. */
9
6
  projectId?: string;
@@ -8,6 +8,7 @@ export declare const discoverComponents: (sys: DevToolsSys, credentials: Credent
8
8
  designSystemVersion?: string;
9
9
  workspaceConfig?: WorkspaceConfiguration;
10
10
  debug?: boolean;
11
+ specificComponents?: string[];
11
12
  }) => Promise<{
12
13
  numComponentsFound: number;
13
14
  componentsToIndex: ComponentTask[];
@@ -0,0 +1,26 @@
1
+ import type { DevToolsSys } from "@builder.io/dev-tools/core";
2
+ export interface LockFileData {
3
+ cwd: string;
4
+ projectId?: string;
5
+ branchId?: string;
6
+ pid: number;
7
+ createdAt: number;
8
+ }
9
+ export type LockConflictBehavior = "replace" | "exit" | "kill";
10
+ /**
11
+ * Registers a lock file to prevent multiple instances from running.
12
+ * - Checks if the lock file already exists
13
+ * - Handles conflicts based on the specified behavior:
14
+ * - 'exit': Exits with code -10 if lock exists
15
+ * - 'replace': Overwrites the existing lock file
16
+ * - 'kill': Kills the existing process and overwrites the lock file
17
+ * - Creates the lock file with process information
18
+ * - Automatically removes the lock file when the process exits
19
+ *
20
+ * @param sys - DevToolsSys for logging and Sentry integration
21
+ * @param lockFilePath - Absolute path where the lock file should be created
22
+ * @param conflictBehavior - How to handle existing lock files
23
+ * @param projectId - Optional project ID
24
+ * @param branchId - Optional branch ID/name
25
+ */
26
+ export declare function registerLock(sys: DevToolsSys, lockFilePath: string, conflictBehavior?: LockConflictBehavior, projectId?: string, branchId?: string): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,7 @@
1
1
  import { ChildProcess, type ChildProcessWithoutNullStreams, type ChildProcessByStdio, type SpawnOptions, type StdioPipe, type StdioNull } from "child_process";
2
2
  import type { Readable } from "stream";
3
+ import type { DevToolsSys } from "../../types";
4
+ import type { DevCommandProcess } from "../launch/dev-server-orchestrator";
3
5
  /**
4
6
  * Global process tracker that keeps track of all spawned processes
5
7
  * and ensures they are killed when the main process exits
@@ -18,8 +20,9 @@ declare class ProcessTracker {
18
20
  untrack(childProcess: ChildProcess): void;
19
21
  /**
20
22
  * Kill all tracked processes
23
+ * @param sys - DevToolsSys for logging and Sentry integration
21
24
  */
22
- killAll(): Promise<void>;
25
+ killAll(sys?: DevToolsSys): Promise<void>;
23
26
  /**
24
27
  * Register cleanup handlers for various exit signals
25
28
  */
@@ -56,4 +59,27 @@ export declare function trackedSpawn(config: TrackedSpawnOptions & {
56
59
  };
57
60
  }): ChildProcessByStdio<null, Readable, Readable>;
58
61
  export declare function trackedSpawn(config: TrackedSpawnOptions): ChildProcess;
62
+ export declare function safeSpawn(shell: string, command: string, options: SpawnOptions & {
63
+ stdio: "pipe" | [StdioPipe, StdioPipe, StdioPipe];
64
+ }): ChildProcessWithoutNullStreams;
65
+ export declare function safeSpawn(shell: string, command: string, options: SpawnOptions & {
66
+ stdio: [StdioNull | "ignore", StdioPipe, StdioPipe];
67
+ }): ChildProcessByStdio<null, Readable, Readable>;
68
+ export declare function safeSpawn(shell: string, command: string, options: SpawnOptions): ChildProcess;
69
+ export declare const getTempFolder: () => string;
70
+ export declare const cleanupTempFolder: () => boolean;
71
+ /**
72
+ * Detects if a command is multi-line (contains newlines)
73
+ */
74
+ export declare const isMultiLineCommand: (command: string) => boolean;
75
+ /**
76
+ * Creates a temporary script file for multi-line commands
77
+ */
78
+ export declare const createTempScript: (command: string, shell: string) => string;
79
+ /**
80
+ * Cleans up a temporary script file
81
+ */
82
+ export declare const cleanupTempScript: (scriptPath: string) => void;
83
+ export declare const getCommandWithShellArgs: (command: string, shell: string) => string[];
84
+ export declare function killProcess(sys: DevToolsSys, procOrPid: ChildProcess | DevCommandProcess | number | undefined, abortSignal?: AbortSignal, timeout?: number): Promise<boolean>;
59
85
  export {};