@builder.io/dev-tools 1.21.16-dev.202601302342.7af7ffd7f → 1.22.0-dev.202602021245.ba8683d35

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 (51) hide show
  1. package/cli/index.cjs +455 -314
  2. package/cli/index.cjs.map +4 -4
  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 +1 -1
  8. package/server/index.cjs +2 -2
  9. package/server/index.mjs +2 -2
  10. package/types/cli/codegen.d.ts +3 -7
  11. package/types/cli/indexing.d.ts +5 -0
  12. package/types/cli/launch/InitStateMachine.d.ts +1 -6
  13. package/types/cli/launch/github.d.ts +3 -0
  14. package/types/cli/repo-indexing.d.ts +17 -0
  15. package/types/cli/repo-indexing.mock.d.ts +5 -0
  16. package/types/cli/utils/git-snapshot.d.ts +17 -0
  17. package/types/cli/utils/git-snapshot.test.d.ts +1 -0
  18. package/types/cli/utils/git.d.ts +1 -2
  19. package/types/cli/utils/repo-indexing-group-prompts.d.ts +1 -0
  20. package/types/common/ast/component-input-types.d.ts +1 -1
  21. package/types/common/ast/convert-values.d.ts +1 -1
  22. package/types/scripts/analyze-projects.d.ts +18 -0
  23. package/types/scripts/call-ensure-container.d.ts +4 -0
  24. package/types/scripts/check-backup.d.ts +1 -0
  25. package/types/scripts/cli.d.ts +1 -0
  26. package/types/scripts/download-projects.d.ts +12 -0
  27. package/types/scripts/utils/db.d.ts +3 -0
  28. package/types/scripts/utils/ensure-container.d.ts +7 -0
  29. package/types/scripts/utils/remove-machine-and-volume.d.ts +5 -0
  30. package/types/tsconfig.tsbuildinfo +1 -1
  31. package/cli/index.mjs +0 -4905
  32. package/cli/index.mjs.map +0 -7
  33. package/cli/main.mjs +0 -26
  34. package/types/cli/builder-ink.d.ts +0 -9
  35. package/types/cli/repo-indexing/lsp-references.d.ts +0 -17
  36. package/types/cli/ui/App.d.ts +0 -15
  37. package/types/cli/ui/AppWrapper.d.ts +0 -8
  38. package/types/cli/ui/AsciiLogo.d.ts +0 -1
  39. package/types/cli/ui/ComponentDiscoveryPhase.d.ts +0 -5
  40. package/types/cli/ui/ComponentIndexingPhase.d.ts +0 -5
  41. package/types/cli/ui/DesignSystemCRUD.d.ts +0 -16
  42. package/types/cli/ui/DesignSystemCreationComplete.d.ts +0 -5
  43. package/types/cli/ui/DesignSystemCreationPrompt.d.ts +0 -12
  44. package/types/cli/ui/DesignSystemDetail.d.ts +0 -7
  45. package/types/cli/ui/DesignSystemsTable.d.ts +0 -10
  46. package/types/cli/ui/GradientBorder.d.ts +0 -7
  47. package/types/cli/ui/InkDemo.d.ts +0 -6
  48. package/types/cli/ui/MainMenu.d.ts +0 -12
  49. package/types/cli/ui/SpaceSelector.d.ts +0 -14
  50. package/types/cli/ui/types.d.ts +0 -16
  51. /package/types/cli/{code.test.d.ts → codegen-git-snapshot.test.d.ts} +0 -0
@@ -192,7 +192,9 @@ export declare class CodeGenSession {
192
192
  }): Promise<RepoMetrics>;
193
193
  getSessionId(): string;
194
194
  getSpaceId(): string | undefined;
195
+ revertToCommitSnapshot(commitSnapshot: string): Promise<void>;
195
196
  revertToCommitHash(commitHash: string): Promise<void>;
197
+ resetToCommitSnapshot(commitSnapshot: string, requestRefresh?: boolean): Promise<void>;
196
198
  resetToCommitHash(commitHash: string, requestRefresh?: boolean): Promise<void>;
197
199
  /**
198
200
  * Core function to restore the codebase to a state that matches a predicate.
@@ -326,19 +328,13 @@ export declare class CodeGenSession {
326
328
  commitMessage: string;
327
329
  folderName?: string;
328
330
  }): Promise<boolean>;
329
- /**
330
- * Commits validation command fixes if there are uncommitted changes
331
- * and no merge conflicts. Used after validation commands complete.
332
- * @returns true if a commit was made, false otherwise
333
- */
334
- validateAndCommit(): Promise<boolean>;
335
331
  getLastSuggestedAction(): SuggestedActionBuildError | undefined;
336
332
  connectToEventLoop(shouldReplay: boolean, onStep: (step: GenerateCompletionStep) => void): () => void;
337
333
  waitUntilPendingPromises(signal?: AbortSignal): Promise<void>;
338
334
  waitUntilBlockingPendingPromises(signal?: AbortSignal): Promise<void>;
339
335
  waitUntilIdle(signal?: AbortSignal): Promise<void>;
340
336
  waitForEventLoop(): Promise<void>;
341
- commitWorkInProgress(lastTurn: CodegenTurn, changedFiles: string[]): Promise<string | false>;
337
+ commitWorkInProgress(lastTurn: CodegenTurn, changedFiles: string[]): Promise<string | false | undefined>;
342
338
  getChangesReport(): Promise<{
343
339
  diff: string;
344
340
  files: string[];
@@ -0,0 +1,5 @@
1
+ import type { DevToolsSys } from "../types";
2
+ import type { CLIArgs } from "./index";
3
+ import { type Credentials } from "./credentials";
4
+ export declare const runCodeIndexing: (_sys: DevToolsSys, _args: CLIArgs) => Promise<void>;
5
+ export declare const codeIndexing: (sys: DevToolsSys, credentials: Credentials) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import type { DevToolsSys } from "@builder.io/dev-tools/core";
2
- import { type FusionConfig, type WorkspaceFolder, type InitState, type InitStateStep, type InitStatusLog, type GitDiagnostics } from "$/ai-utils";
2
+ import { type FusionConfig, type WorkspaceFolder, type InitState, type InitStateStep, type InitStatusLog } from "$/ai-utils";
3
3
  type ValidatedWorkspaceFolder = WorkspaceFolder & Required<Pick<WorkspaceFolder, "name" | "path">>;
4
4
  type WorkspaceFolderWithRepoInfo = ValidatedWorkspaceFolder & Required<Pick<WorkspaceFolder, "repoName" | "repoUrl">>;
5
5
  import type { Credentials } from "../credentials";
@@ -46,7 +46,6 @@ export declare class InitStateMachine {
46
46
  step?: InitStateStep;
47
47
  error?: string;
48
48
  success?: boolean;
49
- gitDiagnostics?: GitDiagnostics;
50
49
  }): void;
51
50
  clearInitLogs(): void;
52
51
  hasFilesButNoGit(repoPath: string): Promise<boolean>;
@@ -61,10 +60,6 @@ export declare class InitStateMachine {
61
60
  * Check if the repository URL is from a standard git hosting provider
62
61
  */
63
62
  private isStandardGitHost;
64
- /**
65
- * Detect the git provider from the repository URL
66
- */
67
- private detectGitProvider;
68
63
  /**
69
64
  * Check if the repository host is reachable via network
70
65
  * Performs DNS resolution and TCP connection check
@@ -0,0 +1,3 @@
1
+ export declare const getKVHiddenComment: (key: string, value: string) => string;
2
+ export declare const getPreviewUrl: (projectId: string, branchName: string) => string;
3
+ export declare const getInitialDescription: (projectId: string, branchName: string) => string;
@@ -0,0 +1,17 @@
1
+ import type { DevToolsSys } from "../types";
2
+ import type { CLIArgs } from "./index";
3
+ export interface RepoIndexingDoc {
4
+ name: string;
5
+ content: string | {
6
+ name: string;
7
+ description: string;
8
+ components: string[];
9
+ relevantFiles: string[];
10
+ }[];
11
+ createdDate: string;
12
+ description: string;
13
+ id: string;
14
+ ownerId: string;
15
+ userId: string;
16
+ }
17
+ export declare const runRepoIndexing: (sys: DevToolsSys, args: CLIArgs) => Promise<void>;
@@ -0,0 +1,5 @@
1
+ export declare const mockDeps: {
2
+ getStoredComponentDocs: () => Promise<never[]>;
3
+ storeComponentDocs: () => Promise<{}>;
4
+ runCodeGen: () => Promise<string>;
5
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Parse multi-repo snapshot: "folder1:hash1,folder2:hash2" → { folder1: "hash1", ... }
3
+ * Backward compat: "abc123" (no colon) → { [primaryFolderName]: "abc123" }
4
+ */
5
+ export declare function parseGitSnapshot(snapshot: string | undefined, primaryFolderName?: string): Record<string, string>;
6
+ /**
7
+ * Serialize commits: { folder1: "hash1", ... } → "folder1:hash1,folder2:hash2"
8
+ * For single-repo, returns the full format with folder name
9
+ */
10
+ export declare function serializeGitSnapshot(commits: Record<string, string>): string;
11
+ /**
12
+ * Get commit for specific folder from snapshot
13
+ * @param snapshot - The snapshot string to parse
14
+ * @param folderName - The folder name to look up
15
+ * @param primaryFolderName - The primary folder name for parsing old format (optional, defaults to "code")
16
+ */
17
+ export declare function getCommitFromSnapshot(snapshot: string | undefined, folderName: string, primaryFolderName?: string): string | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { Credentials } from "../credentials";
3
- import type { GitConfigs, GitDiagnostics } from "$/ai-utils";
3
+ import type { GitConfigs } from "$/ai-utils";
4
4
  export interface RunCommandOptions {
5
5
  cwd?: string;
6
6
  debug?: boolean;
@@ -15,7 +15,6 @@ type FetchGitConfigsResult = {
15
15
  } | {
16
16
  success: false;
17
17
  error: Error;
18
- gitDiagnostics?: GitDiagnostics;
19
18
  };
20
19
  export declare function runCommand(cmd: string, args: string[], opts: RunCommandOptions): Promise<string>;
21
20
  export declare const isGitRepoCorrupted: (stdout: string, stderr: string) => boolean;
@@ -0,0 +1 @@
1
+ export declare const REPO_INDEXING_GROUP_PROMPT: string;
@@ -17,7 +17,7 @@ export declare const NUMBER_TYPES: string[];
17
17
  export declare const BOOLEAN_TYPES: string[];
18
18
  export declare const ARRAY_TYPES: string[];
19
19
  export declare const OBJECT_TYPES: string[];
20
- export declare function getPrimitiveType(t: string): "number" | "string" | "boolean" | "object" | "array";
20
+ export declare function getPrimitiveType(t: string): "string" | "number" | "boolean" | "object" | "array";
21
21
  export declare function removeQuotes(text: string): string;
22
22
  export declare const resolveType: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string[] | undefined;
23
23
  export declare const typeToString: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string;
@@ -8,4 +8,4 @@ export declare function objectExpressionToObjectValue(sys: DevToolsSys, objectLi
8
8
  };
9
9
  export declare function convertArrayExpressionToJsArray(sys: DevToolsSys, arr: ts.ArrayLiteralExpression): any[];
10
10
  export declare function getTextOfPropertyName(sys: DevToolsSys, prop: ts.PropertyAssignment | ts.ObjectLiteralElementLike | undefined): string | undefined;
11
- export declare function valueToExpression(sys: DevToolsSys, val: any): ts.ObjectLiteralExpression | ts.ArrayLiteralExpression | ts.Identifier | ts.StringLiteral | ts.NumericLiteral | ts.TrueLiteral | ts.FalseLiteral;
11
+ export declare function valueToExpression(sys: DevToolsSys, val: any): ts.ObjectLiteralExpression | ts.Identifier | ts.StringLiteral | ts.NumericLiteral | ts.TrueLiteral | ts.FalseLiteral | ts.ArrayLiteralExpression;
@@ -0,0 +1,18 @@
1
+ export declare function analyzeProjects(inputPath?: string): Promise<{
2
+ success: boolean;
3
+ error: string;
4
+ projectsCount?: undefined;
5
+ branchesCount?: undefined;
6
+ csvRowsCount?: undefined;
7
+ outputPath?: undefined;
8
+ } | {
9
+ success: boolean;
10
+ projectsCount: number;
11
+ branchesCount: number;
12
+ csvRowsCount: number;
13
+ outputPath: string;
14
+ error?: undefined;
15
+ }>;
16
+ export declare function handleAnalyzeProjects(args: {
17
+ inputPath?: string;
18
+ }): Promise<void>;
@@ -0,0 +1,4 @@
1
+ export declare function handleCallEnsureContainer(args: {
2
+ appName: string;
3
+ branchName: string;
4
+ }): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function handleCheckBackup(): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare function downloadProjects(): Promise<{
2
+ success: boolean;
3
+ count: number;
4
+ outputPath: string;
5
+ error?: undefined;
6
+ } | {
7
+ success: boolean;
8
+ error: string;
9
+ count?: undefined;
10
+ outputPath?: undefined;
11
+ }>;
12
+ export declare function handleDownloadProjects(): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import admin from "firebase-admin";
2
+ export declare const db: admin.firestore.Firestore;
3
+ export declare const storage: admin.storage.Storage;
@@ -0,0 +1,7 @@
1
+ export declare function ensureContainer(projectId: string, branchName: string): Promise<{
2
+ success: boolean;
3
+ error?: undefined;
4
+ } | {
5
+ success: boolean;
6
+ error: any;
7
+ }>;
@@ -0,0 +1,5 @@
1
+ export declare function forceRemoveMachineAndVolume({ projectId, branchName, shouldDeleteVolume, }: {
2
+ projectId: string;
3
+ branchName: string;
4
+ shouldDeleteVolume?: boolean;
5
+ }): Promise<void>;