@builder.io/dev-tools 1.24.0-dev.202602060823.cf6b0e472 → 1.24.0-dev.202602060949.9613162d0

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.
Files changed (238) hide show
  1. package/cli/index.cjs +91 -305
  2. package/cli/index.cjs.map +2 -2
  3. package/core/index.cjs +1 -1
  4. package/core/index.mjs +1 -1
  5. package/node/index.cjs +1 -1
  6. package/node/index.mjs +1 -1
  7. package/package.json +3 -3
  8. package/server/index.cjs +2 -2
  9. package/server/index.mjs +2 -2
  10. package/types/_tests_/utils.d.ts +35 -48
  11. package/types/cli/abort-signal-any.d.ts +1 -3
  12. package/types/cli/auth/auth-utils.d.ts +1 -3
  13. package/types/cli/auth/auth.d.ts +1 -5
  14. package/types/cli/backup.d.ts +60 -114
  15. package/types/cli/builder-add/interface.d.ts +4 -21
  16. package/types/cli/code-file-utils.d.ts +8 -11
  17. package/types/cli/code-tools.test.d.ts +1 -0
  18. package/types/cli/code.d.ts +3 -13
  19. package/types/cli/codegen.d.ts +0 -8
  20. package/types/cli/credentials.d.ts +45 -61
  21. package/types/cli/detectors/nextjs.d.ts +1 -4
  22. package/types/cli/detectors/svelte.d.ts +1 -4
  23. package/types/cli/detectors/vue.d.ts +1 -4
  24. package/types/cli/download.d.ts +4 -9
  25. package/types/cli/dsi-mcp.d.ts +1 -4
  26. package/types/cli/fetch.d.ts +2 -7
  27. package/types/cli/figma-publish.d.ts +17 -34
  28. package/types/cli/figma-utils.d.ts +21 -51
  29. package/types/cli/figma.d.ts +2 -9
  30. package/types/cli/generate.d.ts +11 -14
  31. package/types/cli/github-cli.test.d.ts +1 -0
  32. package/types/cli/incremental-tsc.d.ts +7 -19
  33. package/types/cli/index.d.ts +154 -154
  34. package/types/cli/launch/InitStateMachine.d.ts +89 -156
  35. package/types/cli/launch/config.d.ts +3 -13
  36. package/types/cli/launch/dry-run-backup.d.ts +7 -14
  37. package/types/cli/launch/errors.d.ts +2 -7
  38. package/types/cli/launch/grafana.d.ts +1 -5
  39. package/types/cli/launch/helpers.d.ts +10 -19
  40. package/types/cli/launch/machine-health.d.ts +3 -8
  41. package/types/cli/launch/proxy.d.ts +4 -11
  42. package/types/cli/launch/server.d.ts +12 -19
  43. package/types/cli/launch/vscode-tunnel-manager.d.ts +68 -77
  44. package/types/cli/launch.d.ts +106 -109
  45. package/types/cli/prettier.d.ts +2 -9
  46. package/types/cli/repo-connect/env-collector.d.ts +11 -16
  47. package/types/cli/repo-connect/file-collector.d.ts +15 -22
  48. package/types/cli/repo-connect/git-detector.d.ts +11 -13
  49. package/types/cli/repo-connect/install-runner.d.ts +5 -8
  50. package/types/cli/repo-connect/package-detector.d.ts +8 -12
  51. package/types/cli/repo-connect/repo-connect.d.ts +1 -4
  52. package/types/cli/repo-indexing/component-discovery.d.ts +17 -30
  53. package/types/cli/repo-indexing/icons.d.ts +24 -36
  54. package/types/cli/repo-indexing/installation.d.ts +14 -22
  55. package/types/cli/repo-indexing/repo-indexing-utils.d.ts +79 -138
  56. package/types/cli/repo-indexing/repo-indexing.d.ts +17 -37
  57. package/types/cli/repo-indexing/repo-indexing.mock.d.ts +3 -3
  58. package/types/cli/repo-indexing/tokens.d.ts +25 -44
  59. package/types/cli/repo-indexing/types.d.ts +0 -2
  60. package/types/cli/repo-metrics-utils.d.ts +5 -13
  61. package/types/cli/repo-metrics.d.ts +1 -4
  62. package/types/cli/report/figma-report.d.ts +36 -63
  63. package/types/cli/server-ws.d.ts +32 -40
  64. package/types/cli/spinner.d.ts +4 -4
  65. package/types/cli/track.d.ts +1 -4
  66. package/types/cli/utils/agent-discovery.d.ts +5 -10
  67. package/types/cli/utils/codegen-utils.d.ts +0 -9
  68. package/types/cli/utils/component-group-mdx-prompt.d.ts +1 -2
  69. package/types/cli/utils/discovery-test-utils.d.ts +1 -3
  70. package/types/cli/utils/env-capture.d.ts +15 -21
  71. package/types/cli/utils/env-substitution.d.ts +1 -4
  72. package/types/cli/utils/feature-flags.d.ts +1 -3
  73. package/types/cli/utils/file-overrides-manager.d.ts +23 -39
  74. package/types/cli/utils/git.d.ts +16 -28
  75. package/types/cli/utils/hosts-file-manager.d.ts +4 -7
  76. package/types/cli/utils/lock-file.d.ts +7 -10
  77. package/types/cli/utils/parseGitDiff.d.ts +1 -4
  78. package/types/cli/utils/process-tracker.d.ts +51 -85
  79. package/types/cli/utils/repo-indexing-agent-prompt.d.ts +1 -2
  80. package/types/cli/utils/rules-discovery.d.ts +5 -10
  81. package/types/cli/utils/rules-parser.d.ts +1 -5
  82. package/types/cli/utils/terminal-buffer.d.ts +23 -23
  83. package/types/cli/utils/workspace-path-resolver.d.ts +16 -23
  84. package/types/cli/utils/yaml-frontmatter.d.ts +6 -10
  85. package/types/client/client-api.d.ts +10 -42
  86. package/types/client/edit-button/document-listeners.d.ts +1 -3
  87. package/types/client/edit-button/index.d.ts +6 -6
  88. package/types/client/menu/index.d.ts +3 -3
  89. package/types/client/menu/pages/component-detail.d.ts +2 -8
  90. package/types/client/menu/pages/component-input.d.ts +1 -5
  91. package/types/client/menu/pages/component-list.d.ts +1 -4
  92. package/types/client/menu/toggle/menu-toggle.d.ts +1 -4
  93. package/types/client/setup-ui/overview.d.ts +2 -2
  94. package/types/client/tracking.d.ts +11 -11
  95. package/types/client/utils.d.ts +3 -5
  96. package/types/common/ast/app-dependencies.d.ts +2 -8
  97. package/types/common/ast/component-info.d.ts +6 -26
  98. package/types/common/ast/component-input-types.d.ts +9 -28
  99. package/types/common/ast/component-registry.d.ts +8 -23
  100. package/types/common/ast/convert-values.d.ts +8 -40
  101. package/types/common/ast/ensure-array-statement.d.ts +3 -7
  102. package/types/common/ast/ensure-comments.d.ts +1 -5
  103. package/types/common/ast/ensure-imports.d.ts +5 -10
  104. package/types/common/ast/exported-statements.d.ts +4 -8
  105. package/types/common/ast/imported-statements.d.ts +1 -5
  106. package/types/common/ast/normalize-statements.d.ts +3 -12
  107. package/types/common/ast/remove-unused-imports.d.ts +1 -4
  108. package/types/common/ast/transform.d.ts +3 -13
  109. package/types/common/ast/utils.d.ts +19 -42
  110. package/types/common/builder/builder-api.d.ts +23 -32
  111. package/types/common/builder/builder-sdks.d.ts +8 -10
  112. package/types/common/builder/content-generation.d.ts +7 -10
  113. package/types/common/builder/content-ids.d.ts +1 -2
  114. package/types/common/cache.d.ts +1 -4
  115. package/types/common/constants.d.ts +1 -2
  116. package/types/common/dotenv.d.ts +5 -24
  117. package/types/common/errors.d.ts +22 -50
  118. package/types/common/fs.d.ts +4 -17
  119. package/types/common/interactive-select-files.d.ts +2 -16
  120. package/types/common/mem-sys.d.ts +5 -7
  121. package/types/common/node-request.d.ts +4 -4
  122. package/types/common/path.d.ts +3 -1
  123. package/types/common/test-utils.d.ts +7 -21
  124. package/types/common/typescript.d.ts +7 -26
  125. package/types/common/utils.d.ts +8 -36
  126. package/types/core/adapters/angular/angular-api-key.d.ts +6 -29
  127. package/types/core/adapters/angular/angular-app-module-imports.d.ts +2 -12
  128. package/types/core/adapters/angular/angular-app-routes-update.d.ts +1 -6
  129. package/types/core/adapters/angular/angular-components.d.ts +12 -40
  130. package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +3 -9
  131. package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +4 -16
  132. package/types/core/adapters/angular/angular-fix-tsconfig.d.ts +1 -3
  133. package/types/core/adapters/angular/angular-registry-parse.d.ts +10 -22
  134. package/types/core/adapters/angular/angular-registry.d.ts +2 -15
  135. package/types/core/adapters/angular/angular-test-utils.d.ts +4 -8
  136. package/types/core/adapters/angular/index.d.ts +12 -20
  137. package/types/core/adapters/angular/types.d.ts +5 -5
  138. package/types/core/adapters/next/index.d.ts +18 -26
  139. package/types/core/adapters/next/next-api-key.d.ts +1 -4
  140. package/types/core/adapters/next/next-component-info.d.ts +2 -9
  141. package/types/core/adapters/next/next-components.d.ts +1 -4
  142. package/types/core/adapters/next/next-ensure-builder-setup.d.ts +2 -6
  143. package/types/core/adapters/next/next-ensure-config-plugin.d.ts +1 -5
  144. package/types/core/adapters/next/next-registry-parse.d.ts +8 -21
  145. package/types/core/adapters/next/next-registry.d.ts +2 -15
  146. package/types/core/adapters/next/next-test-utils.d.ts +11 -21
  147. package/types/core/adapters/qwik-city/index.d.ts +6 -14
  148. package/types/core/adapters/qwik-city/qwik-api-key.d.ts +1 -4
  149. package/types/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +1 -4
  150. package/types/core/adapters/qwik-city/qwik-components.d.ts +8 -23
  151. package/types/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +2 -6
  152. package/types/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +1 -5
  153. package/types/core/adapters/qwik-city/qwik-registry-parse.d.ts +10 -22
  154. package/types/core/adapters/qwik-city/qwik-registry.d.ts +2 -15
  155. package/types/core/adapters/qwik-city/qwik-test-utils.d.ts +4 -8
  156. package/types/core/adapters/qwik-city/qwik-ts-program.d.ts +1 -3
  157. package/types/core/adapters/react/index.d.ts +11 -19
  158. package/types/core/adapters/react/react-api-key.d.ts +1 -4
  159. package/types/core/adapters/react/react-builder-sdk-setup.d.ts +1 -3
  160. package/types/core/adapters/react/react-component-info.d.ts +2 -9
  161. package/types/core/adapters/react/react-components.d.ts +11 -37
  162. package/types/core/adapters/react/react-ensure-builder-setup.d.ts +2 -6
  163. package/types/core/adapters/react/react-registry-parse.d.ts +8 -21
  164. package/types/core/adapters/react/react-registry.d.ts +2 -15
  165. package/types/core/adapters/react/react-test-utils.d.ts +5 -11
  166. package/types/core/adapters/react/react-ts-program.d.ts +1 -3
  167. package/types/core/adapters/remix/index.d.ts +11 -19
  168. package/types/core/adapters/remix/remix-api-key.d.ts +1 -4
  169. package/types/core/adapters/remix/remix-components.d.ts +1 -4
  170. package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +3 -9
  171. package/types/core/adapters/remix/remix-ensure-config-plugin.d.ts +1 -5
  172. package/types/core/adapters/remix/remix-registry-parse.d.ts +10 -22
  173. package/types/core/adapters/remix/remix-registry.d.ts +2 -15
  174. package/types/core/adapters/remix/remix-test-utils.d.ts +5 -11
  175. package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +2 -12
  176. package/types/core/adapters/vue/index.d.ts +12 -20
  177. package/types/core/adapters/vue/vue-api-key.d.ts +1 -4
  178. package/types/core/adapters/vue/vue-components.d.ts +2 -10
  179. package/types/core/adapters/vue/vue-ensure-builder-setup.d.ts +3 -7
  180. package/types/core/adapters/vue/vue-registry-parse.d.ts +9 -19
  181. package/types/core/adapters/vue/vue-registry.d.ts +3 -6
  182. package/types/core/adapters/webpack/webpack-config-helpers.d.ts +3 -8
  183. package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +1 -5
  184. package/types/core/create-dev-tools.d.ts +1 -4
  185. package/types/core/detect-frameworks.d.ts +2 -7
  186. package/types/core/ensure-config-plugin.d.ts +2 -6
  187. package/types/core/find-dependencies.d.ts +3 -6
  188. package/types/core/import-export-registry.d.ts +2 -9
  189. package/types/core/index.d.ts +3 -18
  190. package/types/figma/index.d.ts +64 -95
  191. package/types/node/node-sys.d.ts +6 -13
  192. package/types/remix/index.d.ts +3 -5
  193. package/types/server/auth.d.ts +1 -4
  194. package/types/server/builder-connect.d.ts +6 -21
  195. package/types/server/client-script.d.ts +2 -6
  196. package/types/server/create-dev-tools-server.d.ts +1 -3
  197. package/types/server/dev-tools-api.d.ts +1 -4
  198. package/types/server/dev-tools-http-server.d.ts +1 -3
  199. package/types/server/index.d.ts +1 -28
  200. package/types/server/request-handler.d.ts +1 -6
  201. package/types/tsconfig.tsbuildinfo +1 -1
  202. package/types/types/codegen-server.d.ts +1 -1
  203. package/types/types/connection-tracker.d.ts +34 -34
  204. package/types/types/proxy-middleware.d.ts +15 -25
  205. package/types/types/websocket-types.d.ts +7 -9
  206. package/types/types.d.ts +358 -387
  207. package/types/vite/main.d.ts +1 -1
  208. package/types/webpack/main.d.ts +5 -5
  209. package/vendors/darwin-arm64/complete/rg.bash +783 -0
  210. package/vendors/darwin-arm64/complete/rg.fish +175 -0
  211. package/vendors/darwin-arm64/doc/rg.1 +2178 -0
  212. package/vendors/darwin-arm64/rg +0 -0
  213. package/vendors/darwin-x64/complete/rg.bash +783 -0
  214. package/vendors/darwin-x64/complete/rg.fish +175 -0
  215. package/vendors/darwin-x64/doc/rg.1 +2178 -0
  216. package/vendors/darwin-x64/rg +0 -0
  217. package/vendors/linux-arm64/complete/rg.bash +783 -0
  218. package/vendors/linux-arm64/complete/rg.fish +175 -0
  219. package/vendors/linux-arm64/doc/rg.1 +2178 -0
  220. package/vendors/linux-arm64/rg +0 -0
  221. package/vendors/linux-x64/complete/rg.bash +783 -0
  222. package/vendors/linux-x64/complete/rg.fish +175 -0
  223. package/vendors/linux-x64/doc/rg.1 +2178 -0
  224. package/vendors/linux-x64/rg +0 -0
  225. package/vendors/win32-x64/rg.exe +0 -0
  226. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/COPYING +3 -0
  227. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/LICENSE-MIT +21 -0
  228. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/README.md +516 -0
  229. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/UNLICENSE +24 -0
  230. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/complete/_rg +665 -0
  231. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/complete/_rg.ps1 +213 -0
  232. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/complete/rg.bash +783 -0
  233. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/complete/rg.fish +175 -0
  234. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/doc/CHANGELOG.md +1689 -0
  235. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/doc/FAQ.md +1046 -0
  236. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/doc/GUIDE.md +1022 -0
  237. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/doc/rg.1 +2178 -0
  238. package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/rg.exe +0 -0
@@ -1,166 +1,99 @@
1
1
  import type { DevToolsSys } from "@builder.io/dev-tools/core";
2
- import {
3
- type FusionConfig,
4
- type WorkspaceFolder,
5
- type InitState,
6
- type InitStateStep,
7
- type InitStatusLog,
8
- } from "$/ai-utils";
9
- type ValidatedWorkspaceFolder = WorkspaceFolder &
10
- Required<Pick<WorkspaceFolder, "name" | "path">>;
11
- type WorkspaceFolderWithRepoInfo = ValidatedWorkspaceFolder &
12
- Required<Pick<WorkspaceFolder, "repoName" | "repoUrl">>;
2
+ import { type FusionConfig, type WorkspaceFolder, type InitState, type InitStateStep, type InitStatusLog } from "$/ai-utils";
3
+ type ValidatedWorkspaceFolder = WorkspaceFolder & Required<Pick<WorkspaceFolder, "name" | "path">>;
4
+ type WorkspaceFolderWithRepoInfo = ValidatedWorkspaceFolder & Required<Pick<WorkspaceFolder, "repoName" | "repoUrl">>;
13
5
  import type { Credentials } from "../credentials";
14
6
  import { type GitBackupDownloadResult } from "../backup";
15
7
  export interface InitConfig {
16
- fusionConfig: FusionConfig;
17
- credentials: Credentials;
18
- sys: DevToolsSys;
19
- debug?: boolean;
20
- sentryTags?: Record<string, string>;
8
+ fusionConfig: FusionConfig;
9
+ credentials: Credentials;
10
+ sys: DevToolsSys;
11
+ debug?: boolean;
12
+ sentryTags?: Record<string, string>;
21
13
  }
22
14
  export interface InitStatus {
23
- message: string;
24
- error?: string;
15
+ message: string;
16
+ error?: string;
25
17
  }
26
18
  export declare class InitStateMachine {
27
- logIdCounter: number;
28
- initStatusLogs: InitStatusLog[];
29
- sys: DevToolsSys;
30
- config: InitConfig;
31
- /**
32
- * @deprecated use addInitLog instead. Do not use this directly.
33
- */
34
- debug: boolean;
35
- initState: InitState;
36
- constructor(config: InitConfig);
37
- checkout(branchName: string, ref: string, repoPath: string): Promise<boolean>;
38
- execAsync(
39
- exec: string,
40
- args: string[],
41
- cwd?: string,
42
- retry?: number,
43
- ): Promise<string>;
44
- git(
45
- args: string[],
46
- cwd: string,
47
- retry?: number,
48
- timeout?: number,
49
- ): Promise<string>;
50
- performBackup({
51
- sys,
52
- credentials,
53
- fusionConfig,
54
- volumePath,
55
- repositories,
56
- isConnectedToProvider,
57
- forcedFullBackup,
58
- }: {
59
- sys: DevToolsSys;
60
- credentials: Credentials;
61
- fusionConfig: FusionConfig;
62
- volumePath: string;
63
- repositories: ValidatedWorkspaceFolder[];
64
- isConnectedToProvider: boolean;
65
- forcedFullBackup: boolean;
66
- }): Promise<void>;
67
- performRegularBackup(
68
- args: Omit<
69
- Parameters<typeof this.performBackup>[0],
70
- "isConnectedToProvider" | "forcedFullBackup"
71
- >,
72
- ): Promise<void>;
73
- performOfflineBackup(
74
- args: Omit<
75
- Parameters<typeof this.performBackup>[0],
76
- "isConnectedToProvider" | "forcedFullBackup"
77
- >,
78
- ): Promise<void>;
79
- performForcedFullBackup(
80
- args: Omit<
81
- Parameters<typeof this.performBackup>[0],
82
- "isConnectedToProvider" | "forcedFullBackup"
83
- >,
84
- ): Promise<void>;
85
- init(): Promise<boolean>;
86
- addInitLog(
87
- type: "status" | "log" | "error" | "complete",
88
- message: string,
89
- options?: {
90
- step?: InitStateStep;
91
- error?: string;
92
- success?: boolean;
93
- },
94
- ): void;
95
- clearInitLogs(): void;
96
- hasFilesButNoGit(repoPath: string): Promise<boolean>;
97
- step1CheckDirectories(
98
- volumePath: string,
99
- repositories: ValidatedWorkspaceFolder[],
100
- ): Promise<void>;
101
- step2ConfigureGitRepositories(
102
- volumePath: string,
103
- repositories: ValidatedWorkspaceFolder[],
104
- ): Promise<void>;
105
- step3ConfigureGitUser(
106
- volumePath: string,
107
- repositories: ValidatedWorkspaceFolder[],
108
- ): Promise<void>;
109
- step4CollectRepoInfo(
110
- config: InitConfig,
111
- volumePath: string,
112
- repositories: ValidatedWorkspaceFolder[],
113
- ): Promise<void>;
114
- private isGitConfigured;
115
- private getGitRemoteUrl;
116
- private sanitizeGitRemoteUrl;
117
- /**
118
- * Check if the repository URL is from a standard git hosting provider
119
- */
120
- private isStandardGitHost;
121
- /**
122
- * Check if the repository host is reachable via network
123
- * Performs DNS resolution and TCP connection check
124
- */
125
- private checkHostConnectivity;
126
- private checkConnectivityDirect;
127
- private checkConnectivityViaProxy;
128
- /**
129
- * Ensures the parent directory of the given path exists.
130
- * Handles nested repo.path like "subdir/myproject".
131
- */
132
- private ensureParentDirExists;
133
- private cleanupLockFiles;
134
- validateGitRepo(repoPath: string): Promise<void>;
135
- /**
136
- * If a backup is available, perform a backup recovery (and throw if it fails and cannot be recovered from).
137
- * If no backup is available, do nothing.
138
- */
139
- private restoreFromPartialBackup;
140
- private initializeGitRepo;
141
- private refreshRepoConfig;
142
- runInitializationCommand({
143
- repo,
144
- tempCloningDir,
145
- repoPath,
146
- initCommand,
147
- }: {
148
- repo: ValidatedWorkspaceFolder;
149
- tempCloningDir: string;
150
- repoPath: string;
151
- initCommand: string;
152
- }): Promise<{
153
- outcome: boolean;
154
- error?: Error;
155
- }>;
156
- cloneRepository({
157
- repo,
158
- repoPath,
159
- backupResult,
160
- }: {
161
- repo: WorkspaceFolderWithRepoInfo;
162
- repoPath: string;
163
- backupResult: GitBackupDownloadResult | undefined;
164
- }): Promise<boolean>;
19
+ logIdCounter: number;
20
+ initStatusLogs: InitStatusLog[];
21
+ sys: DevToolsSys;
22
+ config: InitConfig;
23
+ /**
24
+ * @deprecated use addInitLog instead. Do not use this directly.
25
+ */
26
+ debug: boolean;
27
+ initState: InitState;
28
+ constructor(config: InitConfig);
29
+ checkout(branchName: string, ref: string, repoPath: string): Promise<boolean>;
30
+ execAsync(exec: string, args: string[], cwd?: string, retry?: number): Promise<string>;
31
+ git(args: string[], cwd: string, retry?: number, timeout?: number): Promise<string>;
32
+ performBackup({ sys, credentials, fusionConfig, volumePath, repositories, isConnectedToProvider, forcedFullBackup, }: {
33
+ sys: DevToolsSys;
34
+ credentials: Credentials;
35
+ fusionConfig: FusionConfig;
36
+ volumePath: string;
37
+ repositories: ValidatedWorkspaceFolder[];
38
+ isConnectedToProvider: boolean;
39
+ forcedFullBackup: boolean;
40
+ }): Promise<void>;
41
+ performRegularBackup(args: Omit<Parameters<typeof this.performBackup>[0], "isConnectedToProvider" | "forcedFullBackup">): Promise<void>;
42
+ performOfflineBackup(args: Omit<Parameters<typeof this.performBackup>[0], "isConnectedToProvider" | "forcedFullBackup">): Promise<void>;
43
+ performForcedFullBackup(args: Omit<Parameters<typeof this.performBackup>[0], "isConnectedToProvider" | "forcedFullBackup">): Promise<void>;
44
+ init(): Promise<boolean>;
45
+ addInitLog(type: "status" | "log" | "error" | "complete", message: string, options?: {
46
+ step?: InitStateStep;
47
+ error?: string;
48
+ success?: boolean;
49
+ }): void;
50
+ clearInitLogs(): void;
51
+ hasFilesButNoGit(repoPath: string): Promise<boolean>;
52
+ step1CheckDirectories(volumePath: string, repositories: ValidatedWorkspaceFolder[]): Promise<void>;
53
+ step2ConfigureGitRepositories(volumePath: string, repositories: ValidatedWorkspaceFolder[]): Promise<void>;
54
+ step3ConfigureGitUser(volumePath: string, repositories: ValidatedWorkspaceFolder[]): Promise<void>;
55
+ step4CollectRepoInfo(config: InitConfig, volumePath: string, repositories: ValidatedWorkspaceFolder[]): Promise<void>;
56
+ private isGitConfigured;
57
+ private getGitRemoteUrl;
58
+ private sanitizeGitRemoteUrl;
59
+ /**
60
+ * Check if the repository URL is from a standard git hosting provider
61
+ */
62
+ private isStandardGitHost;
63
+ /**
64
+ * Check if the repository host is reachable via network
65
+ * Performs DNS resolution and TCP connection check
66
+ */
67
+ private checkHostConnectivity;
68
+ private checkConnectivityDirect;
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;
75
+ private cleanupLockFiles;
76
+ validateGitRepo(repoPath: string): Promise<void>;
77
+ /**
78
+ * If a backup is available, perform a backup recovery (and throw if it fails and cannot be recovered from).
79
+ * If no backup is available, do nothing.
80
+ */
81
+ private restoreFromPartialBackup;
82
+ private initializeGitRepo;
83
+ private refreshRepoConfig;
84
+ runInitializationCommand({ repo, tempCloningDir, repoPath, initCommand, }: {
85
+ repo: ValidatedWorkspaceFolder;
86
+ tempCloningDir: string;
87
+ repoPath: string;
88
+ initCommand: string;
89
+ }): Promise<{
90
+ outcome: boolean;
91
+ error?: Error;
92
+ }>;
93
+ cloneRepository({ repo, repoPath, backupResult, }: {
94
+ repo: WorkspaceFolderWithRepoInfo;
95
+ repoPath: string;
96
+ backupResult: GitBackupDownloadResult | undefined;
97
+ }): Promise<boolean>;
165
98
  }
166
99
  export {};
@@ -1,16 +1,6 @@
1
1
  import { type FusionConfig } from "$/ai-utils";
2
2
  import type { LaunchArgs } from "../launch";
3
3
  import type { DevToolsSys } from "../../types";
4
- export declare function getFusionConfig(
5
- sys: DevToolsSys,
6
- args: LaunchArgs,
7
- ): Promise<FusionConfig>;
8
- export declare function saveFusionConfig(
9
- sys: DevToolsSys,
10
- fusionConfig: FusionConfig,
11
- args: LaunchArgs,
12
- ): Promise<void>;
13
- export declare function trackConfigData(
14
- sys: DevToolsSys,
15
- fusionConfig: FusionConfig,
16
- ): void;
4
+ export declare function getFusionConfig(sys: DevToolsSys, args: LaunchArgs): Promise<FusionConfig>;
5
+ export declare function saveFusionConfig(sys: DevToolsSys, fusionConfig: FusionConfig, args: LaunchArgs): Promise<void>;
6
+ export declare function trackConfigData(sys: DevToolsSys, fusionConfig: FusionConfig): void;
@@ -1,16 +1,9 @@
1
1
  import { type InitConfig } from "./InitStateMachine";
2
2
  import type { InitState } from "$/ai-utils";
3
- export declare const attemptDryRunBackupGit: (
4
- initConfig: InitConfig,
5
- realInitState: InitState,
6
- ) => Promise<
7
- | {
8
- success: boolean;
9
- error: string;
10
- }
11
- | {
12
- success: boolean;
13
- error?: undefined;
14
- }
15
- | null
16
- >;
3
+ export declare const attemptDryRunBackupGit: (initConfig: InitConfig, realInitState: InitState) => Promise<{
4
+ success: boolean;
5
+ error: string;
6
+ } | {
7
+ success: boolean;
8
+ error?: undefined;
9
+ } | null>;
@@ -1,8 +1,3 @@
1
1
  export declare const isGitHubAuthError: (errorMessage: string) => boolean;
2
- export declare const getGitHubAuthErrorMessage: (
3
- repoName: string,
4
- hasGhToken: boolean,
5
- ) => string;
6
- export declare const getUserMessageForNpmInstallErrors: (
7
- errorOutput: string,
8
- ) => string;
2
+ export declare const getGitHubAuthErrorMessage: (repoName: string, hasGhToken: boolean) => string;
3
+ export declare const getUserMessageForNpmInstallErrors: (errorOutput: string) => string;
@@ -1,8 +1,4 @@
1
1
  import type { FusionMetrics } from "$/ai-utils";
2
2
  import type { Credentials } from "../credentials";
3
3
  import type { DevToolsSys } from "../../types";
4
- export declare function pushMetrics(
5
- sys: DevToolsSys,
6
- credentials: Credentials,
7
- body: FusionMetrics,
8
- ): Promise<void>;
4
+ export declare function pushMetrics(sys: DevToolsSys, credentials: Credentials, body: FusionMetrics): Promise<void>;
@@ -3,26 +3,17 @@ import type { DevToolsSys } from "../../types";
3
3
  /**
4
4
  * Scrub sensitive data from fusion config before sending to webapp or logging
5
5
  */
6
- export declare function scrubFusionConfig(
7
- config: FusionConfig | undefined,
8
- ): FusionConfig | undefined;
6
+ export declare function scrubFusionConfig(config: FusionConfig | undefined): FusionConfig | undefined;
9
7
  export declare const isInRemoteContainer: () => boolean;
10
8
  export declare const getVolumePath: (fusionConfig: FusionConfig) => string;
11
- export declare function computeAIBranchName(
12
- featureBranch: string,
13
- sessionId: string,
14
- ): string;
15
- export declare const getAndParseGitRepoInfo: ({
16
- sys,
17
- gitWorkingDirectory,
18
- strict,
19
- }: {
20
- sys: DevToolsSys;
21
- gitWorkingDirectory: string;
22
- strict: boolean;
9
+ export declare function computeAIBranchName(featureBranch: string, sessionId: string): string;
10
+ export declare const getAndParseGitRepoInfo: ({ sys, gitWorkingDirectory, strict, }: {
11
+ sys: DevToolsSys;
12
+ gitWorkingDirectory: string;
13
+ strict: boolean;
23
14
  }) => Promise<{
24
- currentBranch: string;
25
- featureBranch: string;
26
- sessionId: string | undefined;
27
- currentCommitHash: string;
15
+ currentBranch: string;
16
+ featureBranch: string;
17
+ sessionId: string | undefined;
18
+ currentCommitHash: string;
28
19
  }>;
@@ -2,13 +2,8 @@ import type { DevToolsSys } from "@builder.io/dev-tools/core";
2
2
  import type { Credentials } from "../credentials";
3
3
  import type { FusionConfig, LaunchServerStatus } from "$/ai-utils";
4
4
  interface FusionStatusMonitor {
5
- start: () => void;
6
- stop: () => void;
5
+ start: () => void;
6
+ stop: () => void;
7
7
  }
8
- export declare function createFusionStatusMonitor(
9
- sys: DevToolsSys,
10
- credentials: Credentials,
11
- fusionConfig: FusionConfig,
12
- sharedState: LaunchServerStatus,
13
- ): FusionStatusMonitor | null;
8
+ export declare function createFusionStatusMonitor(sys: DevToolsSys, credentials: Credentials, fusionConfig: FusionConfig, sharedState: LaunchServerStatus): FusionStatusMonitor | null;
14
9
  export {};
@@ -1,21 +1,14 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { ProxyMiddleware } from "../../types/proxy-middleware";
3
3
  import type { IncomingMessage } from "http";
4
- export declare const createPassThroughProxy: () => import("http-proxy-3").ProxyServer<
5
- typeof IncomingMessage,
6
- typeof import("http").ServerResponse,
7
- Error
8
- >;
9
- export declare const createProxyMiddleware: (
10
- serverUrl: URL,
11
- sys: DevToolsSys,
12
- ) => ProxyMiddleware | undefined;
4
+ export declare const createPassThroughProxy: () => import("http-proxy-3").ProxyServer<typeof IncomingMessage, typeof import("http").ServerResponse, Error>;
5
+ export declare const createProxyMiddleware: (serverUrl: URL, sys: DevToolsSys) => ProxyMiddleware | undefined;
13
6
  /**
14
7
  * Detects if HTML was server-side rendered by checking for framework-specific markers.
15
8
  * Returns whether SSR was used and whether the header/head was server-rendered.
16
9
  */
17
10
  export declare const detectSSR: (body: string) => {
18
- hasSSR: boolean;
19
- hasHeaderSSR: boolean;
11
+ hasSSR: boolean;
12
+ hasHeaderSSR: boolean;
20
13
  };
21
14
  export declare const permissiveHTTPS: any;
@@ -7,24 +7,17 @@ export declare const BUILDER_API_ENDPOINT_PREFIX: string;
7
7
  * Endpoints that are not authenticated because they are used by the fly.io health check.
8
8
  */
9
9
  export declare const NON_AUTHENTICATED_ENDPOINTS: {
10
- readonly STATUS: "/status";
11
- readonly PROXY_STATUS: "/proxy-status";
12
- readonly STATUS_V2: "/status-v2";
13
- readonly INIT_LOGS: "/init-logs";
14
- readonly TUNNEL_STATUS: "/tunnel/status";
10
+ readonly STATUS: "/status";
11
+ readonly PROXY_STATUS: "/proxy-status";
12
+ readonly STATUS_V2: "/status-v2";
13
+ readonly INIT_LOGS: "/init-logs";
14
+ readonly TUNNEL_STATUS: "/tunnel/status";
15
15
  };
16
- export declare const configureServer: ({
17
- sys,
18
- app,
19
- validBuilderPrivateKey,
20
- authenticateProxy,
21
- isLocal,
22
- sharedState,
23
- }: {
24
- sys: DevToolsSys;
25
- app: Express;
26
- validBuilderPrivateKey: string | undefined;
27
- authenticateProxy: boolean;
28
- isLocal: boolean;
29
- sharedState: LaunchServerStatus;
16
+ export declare const configureServer: ({ sys, app, validBuilderPrivateKey, authenticateProxy, isLocal, sharedState, }: {
17
+ sys: DevToolsSys;
18
+ app: Express;
19
+ validBuilderPrivateKey: string | undefined;
20
+ authenticateProxy: boolean;
21
+ isLocal: boolean;
22
+ sharedState: LaunchServerStatus;
30
23
  }) => void;
@@ -7,23 +7,23 @@ export type TunnelStatus = "stopped" | "starting" | "running" | "error";
7
7
  * VS Code Tunnel information
8
8
  */
9
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;
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
18
  }
19
19
  /**
20
20
  * Options for starting a VS Code tunnel
21
21
  */
22
22
  export interface TunnelOptions {
23
- name: string;
24
- workspacePath?: string;
25
- acceptLicense?: boolean;
26
- autoRestart?: boolean;
23
+ name: string;
24
+ workspacePath?: string;
25
+ acceptLicense?: boolean;
26
+ autoRestart?: boolean;
27
27
  }
28
28
  /**
29
29
  * VS Code Tunnel Manager
@@ -36,59 +36,59 @@ export interface TunnelOptions {
36
36
  * - Cleanup on shutdown
37
37
  */
38
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
77
- * Enabled by default for cloud environments, can be disabled with VSCODE_TUNNEL_ENABLED=false
78
- */
79
- static isEnabled(): boolean;
80
- /**
81
- * Check if auto-start is enabled
82
- */
83
- static isAutoStartEnabled(): boolean;
84
- /**
85
- * Get the configured tunnel name from environment or generate one
86
- */
87
- static getTunnelName(projectId?: string, branchName?: string): string;
88
- /**
89
- * Get the configured workspace path
90
- */
91
- static getWorkspacePath(): string;
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
77
+ * Enabled by default for cloud environments, can be disabled with VSCODE_TUNNEL_ENABLED=false
78
+ */
79
+ static isEnabled(): boolean;
80
+ /**
81
+ * Check if auto-start is enabled
82
+ */
83
+ static isAutoStartEnabled(): boolean;
84
+ /**
85
+ * Get the configured tunnel name from environment or generate one
86
+ */
87
+ static getTunnelName(projectId?: string, branchName?: string): string;
88
+ /**
89
+ * Get the configured workspace path
90
+ */
91
+ static getWorkspacePath(): string;
92
92
  }
93
93
  /**
94
94
  * Get the singleton tunnel manager instance
@@ -97,21 +97,12 @@ export declare function getTunnelManager(): VSCodeTunnelManager;
97
97
  /**
98
98
  * Generate VS Code deep link for a tunnel
99
99
  */
100
- export declare function generateVSCodeDeepLink(
101
- tunnelName: string,
102
- workspacePath?: string,
103
- ): string;
100
+ export declare function generateVSCodeDeepLink(tunnelName: string, workspacePath?: string): string;
104
101
  /**
105
102
  * Generate Cursor deep link for a tunnel
106
103
  */
107
- export declare function generateCursorDeepLink(
108
- tunnelName: string,
109
- workspacePath?: string,
110
- ): string;
104
+ export declare function generateCursorDeepLink(tunnelName: string, workspacePath?: string): string;
111
105
  /**
112
106
  * Generate web editor link for a tunnel
113
107
  */
114
- export declare function generateWebEditorLink(
115
- tunnelName: string,
116
- workspacePath?: string,
117
- ): string;
108
+ export declare function generateWebEditorLink(tunnelName: string, workspacePath?: string): string;