@builder.io/dev-tools 1.14.3-dev.202510200543.6a1fd28ff → 1.14.3-dev.202510200835.6a1fd28ff

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.
@@ -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<boolean>;
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;
@@ -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 {};