builder.io 1.18.1 → 1.18.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.
@@ -241,7 +241,8 @@ export declare class CodeGenSession {
241
241
  getTurns(): CodegenTurn[];
242
242
  getSessionContext(): SessionContext;
243
243
  runSetupCommand(): Promise<import("$/ai-utils").SetupCommandResult | undefined>;
244
- abortSetupCommand(): void;
244
+ abortSetupCommand(): Promise<import("$/ai-utils").SetupCommandResult | undefined> | undefined;
245
+ abortValidateCommand(): Promise<import("$/ai-utils").ValidateCommandResult | undefined> | undefined;
245
246
  toolsRunning(): boolean;
246
247
  abortAllTools(): void;
247
248
  /**
@@ -1 +1,11 @@
1
- export declare const safeFetch: typeof globalThis.fetch;
1
+ import { type RequestInit } from "undici";
2
+ import { NetworkError } from "../common/errors";
3
+ export declare const safeFetch: (input: string | URL, init?: RequestInit) => ReturnType<typeof globalThis.fetch>;
4
+ /**
5
+ * Checks the health of the Builder.io API by attempting to fetch the health endpoint.
6
+ * Retries up to 3 times with a delay between attempts.
7
+ * @param delayMs - The delay in milliseconds between retry attempts (default: 1000ms)
8
+ * @returns undefined if all attempts fail
9
+ * @throws NetworkError if all retry attempts fail
10
+ */
11
+ export declare function checkBuilderHealth(delayMs?: number): Promise<NetworkError | undefined>;
@@ -132,4 +132,10 @@ export interface CLIArgs {
132
132
  * Example: --instructions "Do not index mapper files."
133
133
  */
134
134
  instructions?: string;
135
+ /**
136
+ * Accept self-signed SSL certificates.
137
+ * Useful for development environments where SSL certificates are not trusted.
138
+ * Example: --acceptSelfSignedCertificates
139
+ */
140
+ acceptSelfSigned?: boolean;
135
141
  }
@@ -47,7 +47,8 @@ export interface DevServerOrchestrator {
47
47
  autoDetectDevServer: boolean;
48
48
  devCommandProcess: DevCommandProcess | undefined;
49
49
  autoDetectDevServerPatterns: string[] | undefined;
50
- abortSetupCommand: () => void;
50
+ abortSetupCommand: () => Promise<SetupCommandResult | undefined>;
51
+ abortValidateCommand: () => Promise<ValidateCommandResult | undefined>;
51
52
  clearEnvVariables: () => void;
52
53
  setEnvVariable: (key: string, value: string | undefined) => boolean;
53
54
  ensureDevCommand: (abortSignal?: AbortSignal) => Promise<boolean>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Substitutes environment variables in a string.
3
+ * Replaces ${VAR_NAME} patterns with their corresponding values from the env object.
4
+ * If a variable is not found in env, the pattern is left as-is.
5
+ *
6
+ * @param str - The string containing environment variable patterns
7
+ * @param env - A record of environment variable names to their values
8
+ * @returns The string with all ${VAR_NAME} patterns replaced
9
+ *
10
+ * @example
11
+ * substituteEnvVars("Hello ${USER}!", { USER: "Alice" })
12
+ * // Returns: "Hello Alice!"
13
+ *
14
+ * @example
15
+ * substituteEnvVars("Path: ${HOME}/docs", { HOME: "/Users/alice" })
16
+ * // Returns: "Path: /Users/alice/docs"
17
+ *
18
+ * @example
19
+ * substituteEnvVars("Missing: ${UNKNOWN}", {})
20
+ * // Returns: "Missing: ${UNKNOWN}"
21
+ */
22
+ export declare function substituteEnvVars(str: string, env: Record<string, string | undefined>): string;
@@ -0,0 +1 @@
1
+ export {};