@builder.io/dev-tools 1.19.13 → 1.20.0

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.
@@ -165,6 +165,8 @@ export declare class CodeGenSession {
165
165
  gitignore?: boolean;
166
166
  deep?: number;
167
167
  truncate?: number;
168
+ maxFiles?: number;
169
+ onlyFiles?: boolean;
168
170
  }): Promise<string[]>;
169
171
  searchFiles(options: SearchFilesOptions): Promise<SearchFilesResult>;
170
172
  /**
@@ -28,7 +28,7 @@ export declare class InitStateMachine {
28
28
  constructor(config: InitConfig);
29
29
  checkout(branchName: string, ref: string, repoPath: string): Promise<boolean>;
30
30
  execAsync(exec: string, args: string[], cwd?: string, retry?: number): Promise<string>;
31
- git(args: string[], cwd?: string, retry?: number, timeout?: number): Promise<string>;
31
+ git(args: string[], cwd: string, retry?: number, timeout?: number): Promise<string>;
32
32
  performBackup({ sys, credentials, fusionConfig, volumePath, repositories, isConnectedToProvider, forcedFullBackup, }: {
33
33
  sys: DevToolsSys;
34
34
  credentials: Credentials;
@@ -67,6 +67,11 @@ export declare class InitStateMachine {
67
67
  private checkHostConnectivity;
68
68
  private checkConnectivityDirect;
69
69
  private checkConnectivityViaProxy;
70
+ /**
71
+ * Ensures the parent directory of the given path exists.
72
+ * Handles nested repo.path like "subdir/myproject".
73
+ */
74
+ private ensureParentDirExists;
70
75
  private cleanupLockFiles;
71
76
  validateGitRepo(repoPath: string): Promise<void>;
72
77
  /**
@@ -11,6 +11,7 @@ export declare const NON_AUTHENTICATED_ENDPOINTS: {
11
11
  readonly PROXY_STATUS: "/proxy-status";
12
12
  readonly STATUS_V2: "/status-v2";
13
13
  readonly INIT_LOGS: "/init-logs";
14
+ readonly TUNNEL_STATUS: "/tunnel/status";
14
15
  };
15
16
  export declare const configureServer: ({ sys, app, validBuilderPrivateKey, authenticateProxy, isLocal, sharedState, }: {
16
17
  sys: DevToolsSys;
@@ -0,0 +1,107 @@
1
+ import { EventEmitter } from "events";
2
+ /**
3
+ * VS Code Tunnel status
4
+ */
5
+ export type TunnelStatus = "stopped" | "starting" | "running" | "error";
6
+ /**
7
+ * VS Code Tunnel information
8
+ */
9
+ export interface TunnelInfo {
10
+ status: TunnelStatus;
11
+ name: string | null;
12
+ url: string | null;
13
+ vscodeUri: string | null;
14
+ cursorUri: string | null;
15
+ webUrl: string | null;
16
+ error: string | null;
17
+ workspacePath: string;
18
+ }
19
+ /**
20
+ * Options for starting a VS Code tunnel
21
+ */
22
+ export interface TunnelOptions {
23
+ name: string;
24
+ workspacePath?: string;
25
+ acceptLicense?: boolean;
26
+ autoRestart?: boolean;
27
+ }
28
+ /**
29
+ * VS Code Tunnel Manager
30
+ *
31
+ * Manages the lifecycle of a VS Code tunnel process, providing:
32
+ * - Start/stop functionality
33
+ * - URL parsing from CLI output
34
+ * - Health monitoring
35
+ * - Automatic restart on failure
36
+ * - Cleanup on shutdown
37
+ */
38
+ export declare class VSCodeTunnelManager extends EventEmitter {
39
+ private process;
40
+ private status;
41
+ private tunnelName;
42
+ private tunnelUrl;
43
+ private error;
44
+ private workspacePath;
45
+ private autoRestart;
46
+ private restartAttempts;
47
+ private maxRestartAttempts;
48
+ private restartDelay;
49
+ private isShuttingDown;
50
+ constructor();
51
+ /**
52
+ * Start the VS Code tunnel
53
+ */
54
+ start(options: TunnelOptions): Promise<TunnelInfo>;
55
+ /**
56
+ * Spawn the tunnel process
57
+ */
58
+ private spawnTunnel;
59
+ /**
60
+ * Parse tunnel output to extract URL
61
+ */
62
+ private parseOutput;
63
+ /**
64
+ * Stop the VS Code tunnel
65
+ */
66
+ stop(): Promise<void>;
67
+ /**
68
+ * Get current tunnel information
69
+ */
70
+ getInfo(): TunnelInfo;
71
+ /**
72
+ * Get tunnel status
73
+ */
74
+ getStatus(): TunnelStatus;
75
+ /**
76
+ * Check if tunnel is enabled based on environment variables
77
+ */
78
+ static isEnabled(): boolean;
79
+ /**
80
+ * Check if auto-start is enabled
81
+ */
82
+ static isAutoStartEnabled(): boolean;
83
+ /**
84
+ * Get the configured tunnel name from environment or generate one
85
+ */
86
+ static getTunnelName(projectId?: string, branchName?: string): string;
87
+ /**
88
+ * Get the configured workspace path
89
+ */
90
+ static getWorkspacePath(): string;
91
+ }
92
+ /**
93
+ * Get the singleton tunnel manager instance
94
+ */
95
+ export declare function getTunnelManager(): VSCodeTunnelManager;
96
+ /**
97
+ * Generate VS Code deep link for a tunnel
98
+ */
99
+ export declare function generateVSCodeDeepLink(tunnelName: string, workspacePath?: string): string;
100
+ /**
101
+ * Generate Cursor deep link for a tunnel
102
+ */
103
+ export declare function generateCursorDeepLink(tunnelName: string, workspacePath?: string): string;
104
+ /**
105
+ * Generate web editor link for a tunnel
106
+ */
107
+ export declare function generateWebEditorLink(tunnelName: string, workspacePath?: string): string;
@@ -12,8 +12,9 @@ export interface GetAllProjectFilesOptions {
12
12
  dot?: boolean;
13
13
  deep?: number;
14
14
  gitignore?: boolean;
15
+ onlyFiles?: boolean;
15
16
  }
16
- export declare function getAllProjectFiles({ basePath, globPattern, extraIgnorePatterns, dot, deep, gitignore, sys, }: GetAllProjectFilesOptions): Promise<string[]>;
17
+ export declare function getAllProjectFiles({ basePath, globPattern, extraIgnorePatterns, dot, deep, gitignore, sys, onlyFiles, }: GetAllProjectFilesOptions): Promise<string[]>;
17
18
  export declare function findBuilderFiles(basePath: string, targetContentId: string, targetSessionKey: string): Promise<FileNode[]>;
18
19
  export declare function filterNonImportantFiles(files: string[]): string[];
19
20
  export declare function getIgnorePatterns(basePath: string): (path: string) => boolean;
@@ -7,8 +7,8 @@ import type { CustomInstruction } from "$/ai-utils";
7
7
  /**
8
8
  * Get custom instructions from the filesystem
9
9
  * Searches for instruction files in:
10
- * - .cursor/rules/ - Rule files (.mdc, .md, etc.)
11
- * - .builder/rules/ - Rule files (.mdc, .md, etc.)
10
+ * - .cursor/rules/ - Rule files (.mdc or RULE.md only)
11
+ * - .builder/rules/ - Rule files (.mdc or RULE.md only)
12
12
  * - .claude/skills/ - SKILL.md files only (subdirectories supported)
13
13
  * - .builder/skills/ - SKILL.md files only (subdirectories supported)
14
14
  * - .cursorrules, .builderrules, .windsurfrules