@builder.io/dev-tools 1.18.35-dev.202512051115.d41d6da71 → 1.18.36-dev.202512051540.3dbdf8838
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.
- package/cli/index.cjs +221 -45
- package/cli/index.cjs.map +2 -2
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +4 -4
- package/server/index.cjs +2 -2
- package/server/index.mjs +2 -2
- package/types/cli/auto-update.d.ts +22 -0
- package/types/cli/auto-update.test.d.ts +1 -0
- package/types/cli/codegen.d.ts +21 -0
- package/types/cli/indexing.d.ts +5 -0
- package/types/cli/launch/github.d.ts +3 -0
- package/types/cli/repo-indexing-utils.d.ts +2 -0
- package/types/cli/repo-indexing.d.ts +17 -0
- package/types/cli/repo-indexing.mock.d.ts +5 -0
- package/types/cli/utils/repo-indexing-group-prompts.d.ts +1 -0
- package/types/common/utils.d.ts +1 -1
- package/types/scripts/analyze-projects.d.ts +18 -0
- package/types/scripts/call-ensure-container.d.ts +5 -0
- package/types/scripts/cli.d.ts +1 -0
- package/types/scripts/db.d.ts +3 -0
- package/types/scripts/download-projects.d.ts +12 -0
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if the CLI is running from a globally installed binary (builderio command)
|
|
3
|
+
* vs running through npx
|
|
4
|
+
*/
|
|
5
|
+
export declare function isRunningFromGlobalInstall(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Compare two semver versions
|
|
8
|
+
* Returns -1 if current < latest, 0 if equal, 1 if current > latest
|
|
9
|
+
*/
|
|
10
|
+
export declare function compareVersions(current: string, latest: string): number;
|
|
11
|
+
/**
|
|
12
|
+
* Check for updates and notify user if a newer version is available
|
|
13
|
+
*/
|
|
14
|
+
export declare function checkForUpdates(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Prompt user for update on quit and perform installation if confirmed
|
|
17
|
+
*/
|
|
18
|
+
export declare function promptAndInstallUpdate(): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Get whether an update is available (for use by exit handlers)
|
|
21
|
+
*/
|
|
22
|
+
export declare function hasUpdateAvailable(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/cli/codegen.d.ts
CHANGED
|
@@ -341,6 +341,27 @@ export declare class CodeGenSession {
|
|
|
341
341
|
newContent: string | null;
|
|
342
342
|
action: "create" | "update" | "delete";
|
|
343
343
|
}>;
|
|
344
|
+
/**
|
|
345
|
+
* Discards changes for a specific file by creating a revert commit
|
|
346
|
+
* @param filePath - The file path to discard changes for
|
|
347
|
+
* @returns success status, commit hash for reverting, and optional error message
|
|
348
|
+
*/
|
|
349
|
+
discardFileChanges(filePath: string): Promise<{
|
|
350
|
+
success: boolean;
|
|
351
|
+
commitHash?: string;
|
|
352
|
+
error?: string;
|
|
353
|
+
}>;
|
|
354
|
+
/**
|
|
355
|
+
* Reverts a discard commit using git revert
|
|
356
|
+
* @param commitHash - The commit hash to revert
|
|
357
|
+
* @returns success status and optional error message
|
|
358
|
+
*/
|
|
359
|
+
revertDiscard(options: {
|
|
360
|
+
commitHash: string;
|
|
361
|
+
}): Promise<{
|
|
362
|
+
success: boolean;
|
|
363
|
+
error?: string;
|
|
364
|
+
}>;
|
|
344
365
|
/**
|
|
345
366
|
* Checks if a file exists in the workspace
|
|
346
367
|
* @param filePath A file path that may include a workspace prefix
|
|
@@ -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>;
|
|
@@ -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 @@
|
|
|
1
|
+
export declare const REPO_INDEXING_GROUP_PROMPT: string;
|
package/types/common/utils.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function clone<T>(obj: T): T;
|
|
|
19
19
|
export declare function shouldSkipFolder(sys: DevToolsSys, skipFolders: Set<string>, fileName: string): boolean;
|
|
20
20
|
export declare function getPackageManager(): string;
|
|
21
21
|
export declare function isWindows(): boolean;
|
|
22
|
-
export declare function builderNpxPackage(): "
|
|
22
|
+
export declare function builderNpxPackage(): "\"@builder.io/dev-tools\"" | "builder.io";
|
|
23
23
|
/**
|
|
24
24
|
* Sanitizes a component name for use in filesystem paths by replacing invalid characters with underscores
|
|
25
25
|
* @param name The component name to sanitize
|
|
@@ -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 @@
|
|
|
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>;
|