builder.io 1.17.6 → 1.17.7

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.
@@ -91,4 +91,6 @@ export interface CLIArgs {
91
91
  /** Comma-separated list of component names to reindex */
92
92
  components?: string;
93
93
  nativeApp?: boolean;
94
+ /** Install command to run for repo-connect (e.g., npm install) */
95
+ installCommand?: string;
94
96
  }
@@ -0,0 +1,27 @@
1
+ import type { EnvironmentVariable } from "$/ai-utils";
2
+ import type { DevToolsSys } from "../../types";
3
+ interface CategorizedEnvVar {
4
+ key: string;
5
+ value: string;
6
+ category: string;
7
+ isSecret: boolean;
8
+ shouldPreselect: boolean;
9
+ fromDotEnv?: boolean;
10
+ }
11
+ /**
12
+ * Filter and categorize environment variables
13
+ */
14
+ export declare function filterAndCategorizeEnvVars(dotEnvVars?: Record<string, string>): CategorizedEnvVar[];
15
+ /**
16
+ * Present multiselect UI for environment variables
17
+ */
18
+ export declare function selectEnvironmentVariables(sys: DevToolsSys, gitRoot: string): Promise<EnvironmentVariable[] | null>;
19
+ /**
20
+ * Format environment variables summary
21
+ */
22
+ export declare function formatEnvSummary(envVars: EnvironmentVariable[]): {
23
+ total: number;
24
+ secrets: number;
25
+ public: number;
26
+ };
27
+ export {};
@@ -0,0 +1,33 @@
1
+ import type { DevToolsSys } from "../../types";
2
+ import type { FileOverride } from "$/ai-utils";
3
+ export interface CollectedFiles {
4
+ projectNpmrc?: {
5
+ path: string;
6
+ content: string;
7
+ };
8
+ userNpmrc?: {
9
+ path: string;
10
+ content: string;
11
+ };
12
+ etcHosts?: {
13
+ path: string;
14
+ content: string;
15
+ };
16
+ }
17
+ /**
18
+ * Collect configuration files from the project and system
19
+ */
20
+ export declare function collectConfigFiles(sys: DevToolsSys, gitRoot: string): Promise<CollectedFiles>;
21
+ /**
22
+ * Convert collected files to FileOverride array with proper path conventions
23
+ *
24
+ * Path conventions:
25
+ * - ./ prefix = relative to git repository root
26
+ * - ~/ prefix = relative to home directory
27
+ * - absolute paths = only for well-known system files
28
+ */
29
+ export declare function filesToFileOverrides(collected: CollectedFiles): FileOverride[];
30
+ /**
31
+ * Format collected files summary
32
+ */
33
+ export declare function formatFilesSummary(collected: CollectedFiles): string[];
@@ -0,0 +1,21 @@
1
+ import type { DevToolsSys } from "../../types";
2
+ export interface GitInfo {
3
+ gitRoot: string;
4
+ recommendedRoot?: string;
5
+ originUrl: string;
6
+ repoProvider: "github" | "gitlab" | "bitbucket" | "azure" | "custom";
7
+ repoProtocol: "https" | "ssh";
8
+ repoFullName: string;
9
+ repoOwner: string;
10
+ repoName: string;
11
+ isPrivate: boolean;
12
+ projectName: string;
13
+ }
14
+ /**
15
+ * Detect git repository information
16
+ */
17
+ export declare function detectGitInfo(sys: DevToolsSys): Promise<GitInfo>;
18
+ /**
19
+ * Display git info in a user-friendly format
20
+ */
21
+ export declare function formatGitInfo(info: GitInfo): string[];
@@ -0,0 +1,10 @@
1
+ export interface InstallResult {
2
+ success: boolean;
3
+ command: string;
4
+ exitCode?: number;
5
+ skipped: boolean;
6
+ }
7
+ /**
8
+ * Run install command with live output and retry logic
9
+ */
10
+ export declare function runInstallCommand(cwd: string, initialCommand?: string): Promise<InstallResult>;
@@ -0,0 +1,21 @@
1
+ import type { SetupMiseDependency } from "$/ai-utils";
2
+ export interface PackageVersions {
3
+ node?: string;
4
+ npm?: string;
5
+ pnpm?: string;
6
+ yarn?: string;
7
+ bun?: string;
8
+ deno?: string;
9
+ }
10
+ /**
11
+ * Detect versions of installed package managers and runtimes
12
+ */
13
+ export declare function detectPackageVersions(): Promise<PackageVersions>;
14
+ /**
15
+ * Convert package versions to SetupMiseDependency array
16
+ */
17
+ export declare function packagesToSetupDependencies(versions: PackageVersions): SetupMiseDependency[];
18
+ /**
19
+ * Format package versions for display
20
+ */
21
+ export declare function formatPackageVersions(versions: PackageVersions): string;
@@ -0,0 +1,6 @@
1
+ import type { DevToolsSys } from "../../types";
2
+ import type { CLIArgs } from "../index";
3
+ /**
4
+ * Main repo-connect command handler
5
+ */
6
+ export declare function runRepoConnectCommand(sys: DevToolsSys, args: CLIArgs): Promise<void>;
@@ -0,0 +1,77 @@
1
+ export interface FileOverride {
2
+ /**
3
+ * Path where the file should be written.
4
+ * - Absolute paths: "/app/.env", "/etc/config/app.conf"
5
+ * - Tilde expansion: "~/.config/app.json" (expands to home directory)
6
+ * - Relative paths: "./file.txt", "config.json" (resolved against working directory)
7
+ */
8
+ path: string;
9
+ /**
10
+ * Content to write to the file.
11
+ */
12
+ content: string;
13
+ }
14
+ export interface SentryLike {
15
+ captureException: (error: unknown) => void;
16
+ }
17
+ export interface ApplyFileOverridesResult {
18
+ success: boolean;
19
+ appliedFiles: string[];
20
+ failedFiles: Array<{
21
+ path: string;
22
+ error: string;
23
+ }>;
24
+ }
25
+ /**
26
+ * Expand tilde (~) in file path to home directory
27
+ * @param filePath - The file path that may contain tilde
28
+ * @returns Expanded path with home directory
29
+ */
30
+ export declare function expandTildePath(filePath: string): string;
31
+ /**
32
+ * Resolve a file path to an absolute path.
33
+ * Handles tilde expansion, relative paths, and absolute paths.
34
+ * @param filePath - The file path to resolve
35
+ * @param workingDirectory - Optional working directory for resolving relative paths
36
+ * @returns Resolved absolute path
37
+ */
38
+ export declare function resolveFilePath(filePath: string, workingDirectory?: string): string;
39
+ /**
40
+ * Validate that a file path can be resolved to an absolute path
41
+ * Supports tilde (~) expansion and relative paths (when workingDirectory is provided)
42
+ * @param filePath - The file path to validate
43
+ * @param workingDirectory - Optional working directory for resolving relative paths
44
+ * @returns true if valid, false otherwise
45
+ */
46
+ export declare function isValidFilePath(filePath: string, workingDirectory?: string): boolean;
47
+ /**
48
+ * Apply multiple file overrides to the filesystem.
49
+ * This function will:
50
+ * 1. Validate each file path
51
+ * 2. Resolve relative paths against working directory
52
+ * 3. Create directories as needed
53
+ * 4. Write files with the provided content
54
+ * 5. Return detailed results for success/failure of each file
55
+ *
56
+ * @param overrides - Array of file overrides to apply
57
+ * @param workingDirectory - Optional working directory for resolving relative paths
58
+ * @param sentry - Optional Sentry instance for error logging
59
+ * @returns Object with overall success status and details for each file
60
+ */
61
+ export declare function applyFileOverrides(overrides: FileOverride[], workingDirectory?: string, sentry?: SentryLike): ApplyFileOverridesResult;
62
+ /**
63
+ * Read a file and return its content
64
+ * Supports tilde (~) expansion and relative paths.
65
+ * @param filePath - The path to the file to read
66
+ * @param workingDirectory - Optional working directory for resolving relative paths
67
+ * @returns The file content or null if it cannot be read
68
+ */
69
+ export declare function readFileOverride(filePath: string, workingDirectory?: string): string | null;
70
+ /**
71
+ * Check if a file exists at the given path
72
+ * Supports tilde (~) expansion and relative paths.
73
+ * @param filePath - The path to check
74
+ * @param workingDirectory - Optional working directory for resolving relative paths
75
+ * @returns true if the file exists, false otherwise
76
+ */
77
+ export declare function fileOverrideExists(filePath: string, workingDirectory?: string): boolean;
@@ -0,0 +1 @@
1
+ export {};