builder.io 1.14.3 → 1.14.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 +443 -418
- 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 +169 -169
- package/server/index.mjs +166 -166
- package/types/cli/codegen.d.ts +4 -1
- package/types/cli/launch/InitStateMachine.d.ts +9 -0
- package/types/cli/launch/dev-server-orchestrator.d.ts +4 -1
- package/types/cli/launch/proxy.d.ts +8 -0
- package/types/cli/launch/proxy.test.d.ts +1 -0
- package/types/cli/repo-metrics.d.ts +3 -0
- package/types/cli/repo-metrics.test.d.ts +1 -0
- package/types/cli/utils/hosts-file-manager.d.ts +34 -0
- package/types/cli/utils/hosts-file-manager.test.d.ts +1 -0
- package/types/cli/utils/lock-file.d.ts +3 -1
- package/types/tsconfig.tsbuildinfo +1 -1
package/types/cli/codegen.d.ts
CHANGED
|
@@ -132,7 +132,9 @@ export declare class CodeGenSession {
|
|
|
132
132
|
includePattern?: string;
|
|
133
133
|
gitignore?: boolean;
|
|
134
134
|
}): Promise<string[]>;
|
|
135
|
-
collectRepoMetrics(
|
|
135
|
+
collectRepoMetrics(opts?: {
|
|
136
|
+
rootPath?: string;
|
|
137
|
+
}): Promise<RepoMetrics>;
|
|
136
138
|
getSessionId(): string;
|
|
137
139
|
getSpaceId(): string | undefined;
|
|
138
140
|
revertToCommitHash(commitHash: string): Promise<void>;
|
|
@@ -181,6 +183,7 @@ export declare class CodeGenSession {
|
|
|
181
183
|
getLastApplyResultsTurn(): CodegenTurn | undefined;
|
|
182
184
|
getLastTurn(): CodegenTurn | undefined;
|
|
183
185
|
getNextUrl(): string | undefined;
|
|
186
|
+
getScheduledMessage(): GenerateUserMessage | undefined;
|
|
184
187
|
getNextMessage(): {
|
|
185
188
|
shouldWait: boolean;
|
|
186
189
|
promise: Promise<GenerateUserMessage | undefined>;
|
|
@@ -54,6 +54,15 @@ export declare class InitStateMachine {
|
|
|
54
54
|
private isGitConfigured;
|
|
55
55
|
private getGitRemoteUrl;
|
|
56
56
|
private sanitizeGitRemoteUrl;
|
|
57
|
+
/**
|
|
58
|
+
* Check if the repository URL is from a standard git hosting provider
|
|
59
|
+
*/
|
|
60
|
+
private isStandardGitHost;
|
|
61
|
+
/**
|
|
62
|
+
* Check if the repository host is reachable via network
|
|
63
|
+
* Performs DNS resolution and TCP connection check
|
|
64
|
+
*/
|
|
65
|
+
private checkHostConnectivity;
|
|
57
66
|
private cleanupLockFiles;
|
|
58
67
|
validateGitRepo(repoPath: string): Promise<void>;
|
|
59
68
|
/**
|
|
@@ -58,7 +58,10 @@ export interface DevServerOrchestrator {
|
|
|
58
58
|
signal?: AbortSignal;
|
|
59
59
|
}) => Promise<SetupCommandResult | null>;
|
|
60
60
|
setDevCommand: (newCommand: string | undefined, forceRestart?: boolean, signal?: AbortSignal) => Promise<DevCommandResult>;
|
|
61
|
-
setProxyServer: (newProxyServer: string) => Promise<
|
|
61
|
+
setProxyServer: (newProxyServer: string) => Promise<{
|
|
62
|
+
updatedProxyServer: boolean;
|
|
63
|
+
updatedHosts: boolean;
|
|
64
|
+
}>;
|
|
62
65
|
setPort: (newPort: number) => Promise<boolean>;
|
|
63
66
|
setAutoDetectSettings: (enabled: boolean, patterns?: string[]) => Promise<boolean>;
|
|
64
67
|
addCheckpoint: () => void;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import type { DevToolsSys } from "../../types";
|
|
2
2
|
import type { ProxyMiddleware } from "../../types/proxy-middleware";
|
|
3
3
|
export declare const createProxy: (serverUrl: string, sys: DevToolsSys) => ProxyMiddleware;
|
|
4
|
+
/**
|
|
5
|
+
* Detects if HTML was server-side rendered by checking for framework-specific markers.
|
|
6
|
+
* Returns whether SSR was used and whether the header/head was server-rendered.
|
|
7
|
+
*/
|
|
8
|
+
export declare const detectSSR: (body: string) => {
|
|
9
|
+
hasSSR: boolean;
|
|
10
|
+
hasHeaderSSR: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,5 +2,8 @@ import type { RepoMetrics } from "$/ai-utils";
|
|
|
2
2
|
import type { DevToolsSys } from "../types";
|
|
3
3
|
/**
|
|
4
4
|
* Collect comprehensive repository metrics
|
|
5
|
+
* @param sys - DevTools system interface
|
|
6
|
+
* @param basePath - Absolute path to the repository root
|
|
7
|
+
* @param rootPath - Relative path within the repository to analyze (default: "/" for entire repo)
|
|
5
8
|
*/
|
|
6
9
|
export declare function collectRepoMetrics(sys: DevToolsSys, basePath: string): Promise<RepoMetrics>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface HostEntry {
|
|
2
|
+
hostname: string;
|
|
3
|
+
ip?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SentryLike {
|
|
6
|
+
captureException: (error: unknown) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Check if a hostname is localhost or 127.0.0.1
|
|
10
|
+
*/
|
|
11
|
+
export declare function isLocalhost(hostname: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Update the /etc/hosts file with new entries in a non-destructive way.
|
|
14
|
+
* This function will:
|
|
15
|
+
* 1. Remove all previously managed entries (marked with special comments)
|
|
16
|
+
* 2. Add new entries with marker comments
|
|
17
|
+
* 3. Preserve all other entries in the file
|
|
18
|
+
*
|
|
19
|
+
* @param entries - Array of host entries to add
|
|
20
|
+
* @param sentry - Optional Sentry instance for error logging
|
|
21
|
+
* @returns true if successful, false otherwise
|
|
22
|
+
*/
|
|
23
|
+
export declare function updateHostsFile(entries: HostEntry[], sentry?: SentryLike): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Remove all managed entries from the hosts file
|
|
26
|
+
* @param sentry - Optional Sentry instance for error logging
|
|
27
|
+
* @returns true if successful, false otherwise
|
|
28
|
+
*/
|
|
29
|
+
export declare function clearManagedHostEntries(sentry?: SentryLike): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Check if we have permission to modify the hosts file
|
|
32
|
+
* Returns true if we can write, false otherwise
|
|
33
|
+
*/
|
|
34
|
+
export declare function canModifyHostsFile(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { DevToolsSys } from "@builder.io/dev-tools/core";
|
|
2
|
+
import type { FusionConfig } from "$/ai-utils";
|
|
2
3
|
export interface LockFileData {
|
|
3
4
|
cwd: string;
|
|
4
5
|
projectId?: string;
|
|
5
6
|
branchId?: string;
|
|
6
7
|
pid: number;
|
|
7
8
|
createdAt: number;
|
|
9
|
+
port?: number;
|
|
8
10
|
}
|
|
9
11
|
export type LockConflictBehavior = "replace" | "exit" | "kill";
|
|
10
12
|
/**
|
|
@@ -23,4 +25,4 @@ export type LockConflictBehavior = "replace" | "exit" | "kill";
|
|
|
23
25
|
* @param projectId - Optional project ID
|
|
24
26
|
* @param branchId - Optional branch ID/name
|
|
25
27
|
*/
|
|
26
|
-
export declare function registerLock(sys: DevToolsSys,
|
|
28
|
+
export declare function registerLock(sys: DevToolsSys, fusionConfig: FusionConfig): Promise<void>;
|