@builder.io/dev-tools 1.19.14 → 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.
- package/cli/index.cjs +683 -683
- 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 +74 -74
- package/server/index.mjs +75 -75
- package/types/cli/launch/InitStateMachine.d.ts +6 -1
- package/types/cli/launch/server.d.ts +1 -0
- package/types/cli/launch/vscode-tunnel-manager.d.ts +107 -0
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -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
|
|
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;
|