@builder.io/dev-tools 1.6.28 → 1.6.29-dev.202504291040.8efe1b1e
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/angular/index.cjs +46 -1
- package/angular/index.mjs +21 -1
- package/cli/index.cjs +103767 -3512
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +13656 -851
- package/core/index.mjs +13647 -852
- package/figma/index.cjs +39 -1
- package/figma/index.mjs +19 -1
- package/node/index.cjs +25304 -105
- package/node/index.mjs +25308 -105
- package/package.json +1 -1
- package/remix/build.cjs +132 -1
- package/remix/index.mjs +113 -1
- package/server/index.cjs +14984 -1358
- package/server/index.mjs +14977 -1358
- package/types/tsconfig.tsbuildinfo +1 -1
- package/vite/index.cjs +153 -3
- package/vite/index.mjs +119 -3
- package/webpack/index.cjs +2883 -27
- package/webpack/index.mjs +2871 -27
- package/types/_tests_/code.e2e.d.ts +0 -1
- package/types/_tests_/create-builder.e2e.d.ts +0 -1
- package/types/_tests_/dev-tools.e2e.d.ts +0 -1
- package/types/_tests_/figma-generate.e2e.d.ts +0 -1
- package/types/_tests_/figma-publish.e2e.d.ts +0 -1
- package/types/_tests_/help.e2e.d.ts +0 -1
- package/types/_tests_/launch.e2e.d.ts +0 -1
- package/types/_tests_/utils.d.ts +0 -43
- package/types/_tests_/vitest.config.d.ts +0 -2
- package/types/angular/index.d.ts +0 -1
- package/types/cli/builder-add/interface.d.ts +0 -5
- package/types/cli/builder-add/options.d.ts +0 -2
- package/types/cli/code-file-utils.d.ts +0 -50
- package/types/cli/code-file-utils.unit.d.ts +0 -1
- package/types/cli/code-server.d.ts +0 -0
- package/types/cli/code-tools.d.ts +0 -26
- package/types/cli/code.d.ts +0 -7
- package/types/cli/codegen.d.ts +0 -72
- package/types/cli/constants.d.ts +0 -1
- package/types/cli/credentials.d.ts +0 -49
- package/types/cli/download.d.ts +0 -10
- package/types/cli/exit.d.ts +0 -1
- package/types/cli/fetch.d.ts +0 -1
- package/types/cli/figma-publish.d.ts +0 -18
- package/types/cli/figma-publish.spec.d.ts +0 -1
- package/types/cli/figma-utils.d.ts +0 -31
- package/types/cli/figma.d.ts +0 -4
- package/types/cli/generate.d.ts +0 -16
- package/types/cli/help.d.ts +0 -1
- package/types/cli/incremental-tsc.d.ts +0 -30
- package/types/cli/index.d.ts +0 -64
- package/types/cli/indexing.d.ts +0 -5
- package/types/cli/io-service.d.ts +0 -86
- package/types/cli/launch/install-jsx-plugin.d.ts +0 -7
- package/types/cli/launch.d.ts +0 -7
- package/types/cli/prettier.d.ts +0 -1
- package/types/cli/report/figma-report.d.ts +0 -3
- package/types/cli/spinner.d.ts +0 -16
- package/types/cli/sync-utils.d.ts +0 -13
- package/types/cli/track.d.ts +0 -4
- package/types/cli/version.d.ts +0 -1
- package/types/client/client-api.d.ts +0 -12
- package/types/client/edit-button/document-listeners.d.ts +0 -2
- package/types/client/edit-button/index.d.ts +0 -8
- package/types/client/index.d.ts +0 -1
- package/types/client/menu/index.d.ts +0 -5
- package/types/client/menu/pages/component-detail.d.ts +0 -4
- package/types/client/menu/pages/component-input.d.ts +0 -3
- package/types/client/menu/pages/component-list.d.ts +0 -4
- package/types/client/menu/pages/home.d.ts +0 -1
- package/types/client/menu/pages/settings.d.ts +0 -1
- package/types/client/menu/toggle/menu-toggle.d.ts +0 -2
- package/types/client/setup-ui/connected.d.ts +0 -1
- package/types/client/setup-ui/index.d.ts +0 -1
- package/types/client/setup-ui/overview.d.ts +0 -4
- package/types/client/tracking.d.ts +0 -22
- package/types/client/utils.d.ts +0 -14
- package/types/common/ast/app-dependencies.d.ts +0 -4
- package/types/common/ast/component-info.d.ts +0 -9
- package/types/common/ast/component-input-types.d.ts +0 -24
- package/types/common/ast/component-registry.d.ts +0 -9
- package/types/common/ast/convert-values.d.ts +0 -11
- package/types/common/ast/convert-values.unit.d.ts +0 -1
- package/types/common/ast/ensure-array-statement.d.ts +0 -7
- package/types/common/ast/ensure-array-statement.unit.d.ts +0 -1
- package/types/common/ast/ensure-comments.d.ts +0 -1
- package/types/common/ast/ensure-imports.d.ts +0 -9
- package/types/common/ast/ensure-imports.unit.d.ts +0 -1
- package/types/common/ast/exported-statements.d.ts +0 -8
- package/types/common/ast/exported-statements.unit.d.ts +0 -1
- package/types/common/ast/imported-statements.d.ts +0 -4
- package/types/common/ast/imported-statements.unit.d.ts +0 -1
- package/types/common/ast/normalize-statements.d.ts +0 -7
- package/types/common/ast/normalize-statements.unit.d.ts +0 -1
- package/types/common/ast/remove-unused-imports.d.ts +0 -3
- package/types/common/ast/remove-unused-imports.unit.d.ts +0 -1
- package/types/common/ast/transform.d.ts +0 -5
- package/types/common/ast/utils.d.ts +0 -26
- package/types/common/ast/utils.unit.d.ts +0 -1
- package/types/common/builder/builder-api.d.ts +0 -27
- package/types/common/builder/builder-sdks.d.ts +0 -9
- package/types/common/builder/content-generation.d.ts +0 -8
- package/types/common/builder/content-ids.d.ts +0 -3
- package/types/common/cache.d.ts +0 -3
- package/types/common/constants.d.ts +0 -16
- package/types/common/dotenv.d.ts +0 -6
- package/types/common/dotenv.test.d.ts +0 -1
- package/types/common/estimate-code-tokens.d.ts +0 -8
- package/types/common/fs.d.ts +0 -6
- package/types/common/interactive-select-files.d.ts +0 -3
- package/types/common/mem-sys.d.ts +0 -8
- package/types/common/node-request.d.ts +0 -7
- package/types/common/path.d.ts +0 -4
- package/types/common/test-utils.d.ts +0 -9
- package/types/common/typescript.d.ts +0 -9
- package/types/common/utils.d.ts +0 -22
- package/types/common/utils.unit.d.ts +0 -1
- package/types/core/adapters/angular/angular-api-key.d.ts +0 -10
- package/types/core/adapters/angular/angular-api-key.unit.d.ts +0 -1
- package/types/core/adapters/angular/angular-app-module-imports.d.ts +0 -3
- package/types/core/adapters/angular/angular-app-module-imports.unit.d.ts +0 -1
- package/types/core/adapters/angular/angular-app-routes-update.d.ts +0 -2
- package/types/core/adapters/angular/angular-app-routes-update.unit.d.ts +0 -1
- package/types/core/adapters/angular/angular-components.d.ts +0 -18
- package/types/core/adapters/angular/angular-components.unit.d.ts +0 -1
- package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +0 -5
- package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +0 -9
- package/types/core/adapters/angular/angular-ensure-config-plugin.unit.d.ts +0 -1
- package/types/core/adapters/angular/angular-fix-tsconfig.d.ts +0 -2
- package/types/core/adapters/angular/angular-registry-parse.d.ts +0 -16
- package/types/core/adapters/angular/angular-registry-parse.unit.d.ts +0 -1
- package/types/core/adapters/angular/angular-registry.d.ts +0 -3
- package/types/core/adapters/angular/angular-registry.unit.d.ts +0 -1
- package/types/core/adapters/angular/angular-test-utils.d.ts +0 -6
- package/types/core/adapters/angular/index.d.ts +0 -14
- package/types/core/adapters/angular/types.d.ts +0 -11
- package/types/core/adapters/next/index.d.ts +0 -28
- package/types/core/adapters/next/next-api-key.d.ts +0 -4
- package/types/core/adapters/next/next-component-info.d.ts +0 -5
- package/types/core/adapters/next/next-component-info.unit.d.ts +0 -1
- package/types/core/adapters/next/next-component-inputs.unit.d.ts +0 -1
- package/types/core/adapters/next/next-component-source-inputs.unit.d.ts +0 -1
- package/types/core/adapters/next/next-components.d.ts +0 -4
- package/types/core/adapters/next/next-ensure-builder-setup.d.ts +0 -4
- package/types/core/adapters/next/next-ensure-config-plugin.d.ts +0 -3
- package/types/core/adapters/next/next-ensure-config-plugin.unit.d.ts +0 -1
- package/types/core/adapters/next/next-registry-parse.d.ts +0 -13
- package/types/core/adapters/next/next-registry-parse.unit.d.ts +0 -1
- package/types/core/adapters/next/next-registry.d.ts +0 -3
- package/types/core/adapters/next/next-registry.unit.d.ts +0 -1
- package/types/core/adapters/next/next-test-utils.d.ts +0 -16
- package/types/core/adapters/qwik-city/index.d.ts +0 -8
- package/types/core/adapters/qwik-city/qwik-api-key.d.ts +0 -4
- package/types/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +0 -3
- package/types/core/adapters/qwik-city/qwik-components.d.ts +0 -15
- package/types/core/adapters/qwik-city/qwik-components.unit.d.ts +0 -1
- package/types/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +0 -4
- package/types/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +0 -2
- package/types/core/adapters/qwik-city/qwik-registry-parse.d.ts +0 -16
- package/types/core/adapters/qwik-city/qwik-registry-parse.unit.d.ts +0 -1
- package/types/core/adapters/qwik-city/qwik-registry.d.ts +0 -3
- package/types/core/adapters/qwik-city/qwik-registry.unit.d.ts +0 -1
- package/types/core/adapters/qwik-city/qwik-test-utils.d.ts +0 -6
- package/types/core/adapters/qwik-city/qwik-ts-program.d.ts +0 -2
- package/types/core/adapters/react/index.d.ts +0 -13
- package/types/core/adapters/react/react-api-key.d.ts +0 -6
- package/types/core/adapters/react/react-builder-sdk-setup.d.ts +0 -2
- package/types/core/adapters/react/react-component-info.d.ts +0 -5
- package/types/core/adapters/react/react-components.d.ts +0 -18
- package/types/core/adapters/react/react-components.unit.d.ts +0 -1
- package/types/core/adapters/react/react-ensure-builder-setup.d.ts +0 -4
- package/types/core/adapters/react/react-registry-parse.d.ts +0 -13
- package/types/core/adapters/react/react-registry-parse.unit.d.ts +0 -1
- package/types/core/adapters/react/react-registry.d.ts +0 -3
- package/types/core/adapters/react/react-registry.unit.d.ts +0 -1
- package/types/core/adapters/react/react-test-utils.d.ts +0 -7
- package/types/core/adapters/react/react-ts-program.d.ts +0 -2
- package/types/core/adapters/remix/index.d.ts +0 -13
- package/types/core/adapters/remix/remix-api-key.d.ts +0 -4
- package/types/core/adapters/remix/remix-components.d.ts +0 -4
- package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +0 -5
- package/types/core/adapters/remix/remix-ensure-config-plugin.d.ts +0 -3
- package/types/core/adapters/remix/remix-ensure-config-plugin.unit.d.ts +0 -1
- package/types/core/adapters/remix/remix-registry-parse.d.ts +0 -16
- package/types/core/adapters/remix/remix-registry.d.ts +0 -3
- package/types/core/adapters/remix/remix-registry.unit.d.ts +0 -1
- package/types/core/adapters/remix/remix-test-utils.d.ts +0 -7
- package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +0 -7
- package/types/core/adapters/vite/vite-ensure-config-plugin.unit.d.ts +0 -1
- package/types/core/adapters/webpack/webpack-config-helpers.d.ts +0 -11
- package/types/core/adapters/webpack/webpack-config-helpers.unit.d.ts +0 -1
- package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +0 -3
- package/types/core/client-script.d.ts +0 -1
- package/types/core/create-dev-tools.d.ts +0 -2
- package/types/core/detect-frameworks.d.ts +0 -4
- package/types/core/ensure-config-plugin.d.ts +0 -3
- package/types/core/find-dependencies.d.ts +0 -7
- package/types/core/import-export-registry.d.ts +0 -3
- package/types/core/index.d.ts +0 -8
- package/types/figma/index.d.ts +0 -78
- package/types/node/index.d.ts +0 -2
- package/types/node/node-sys.d.ts +0 -14
- package/types/remix/index.d.ts +0 -6
- package/types/server/auth.d.ts +0 -2
- package/types/server/builder-connect.d.ts +0 -6
- package/types/server/client-script.d.ts +0 -3
- package/types/server/create-dev-tools-server.d.ts +0 -2
- package/types/server/dev-tools-api.d.ts +0 -2
- package/types/server/dev-tools-http-server.d.ts +0 -2
- package/types/server/index.d.ts +0 -3
- package/types/server/request-handler.d.ts +0 -3
- package/types/types.d.ts +0 -521
- package/types/vite/main.d.ts +0 -7
- package/types/vitest.config.d.ts +0 -2
- package/types/webpack/main.d.ts +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/types/_tests_/utils.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { type ExpectStatic } from "vitest";
|
|
2
|
-
interface CLI {
|
|
3
|
-
output(): string;
|
|
4
|
-
consumeOutput(): string;
|
|
5
|
-
inputText(text: string): Promise<void>;
|
|
6
|
-
inputEnter(text?: string): Promise<void>;
|
|
7
|
-
inputArrowUp(): Promise<void>;
|
|
8
|
-
inputArrowDown(): Promise<void>;
|
|
9
|
-
inputArrowRight(): Promise<void>;
|
|
10
|
-
inputArrowLeft(): Promise<void>;
|
|
11
|
-
inputCtrlC(): Promise<void>;
|
|
12
|
-
inputSpace(): Promise<void>;
|
|
13
|
-
waitUntilText(text: string, timeout?: number): Promise<void>;
|
|
14
|
-
waitUntilExit(): Promise<number>;
|
|
15
|
-
wait(ms: number): Promise<void>;
|
|
16
|
-
writeFile(path: string, content: string): Promise<void>;
|
|
17
|
-
readFile(path: string): string;
|
|
18
|
-
exists(path: string): boolean;
|
|
19
|
-
readdir(path: string): string[];
|
|
20
|
-
fsSnapshot(path: string): Promise<Snapshot>;
|
|
21
|
-
fsDiff(oldSnap: Snapshot): Promise<{
|
|
22
|
-
added: string[];
|
|
23
|
-
removed: string[];
|
|
24
|
-
modified: string[];
|
|
25
|
-
}>;
|
|
26
|
-
npm(...args: string[]): Promise<number>;
|
|
27
|
-
spawn(command: string, args: string[]): Promise<number>;
|
|
28
|
-
}
|
|
29
|
-
export declare function testCLI(name: string, template: string | undefined, handler: (cli: Handler, expect: ExpectStatic) => Promise<void>, timeout?: number, skip?: boolean): void;
|
|
30
|
-
type Handler = (cmd: "builderio" | "create-builderio", args: string[], options?: {
|
|
31
|
-
debug?: boolean;
|
|
32
|
-
}) => CLI;
|
|
33
|
-
export declare function createCLI(template: string | undefined, handler: (cli: Handler) => Promise<void>): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* A snapshot maps a file's relative path to its hash.
|
|
36
|
-
*/
|
|
37
|
-
type Snapshot = {
|
|
38
|
-
cwd: string;
|
|
39
|
-
hashes: {
|
|
40
|
-
[file: string]: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export {};
|
package/types/angular/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function builderDevTools(): Promise<void>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AddCliOptions, FileNode, FolderNode, Snippet, SyncInfo } from "../../types";
|
|
2
|
-
export declare function addCommand(opts: AddCliOptions): Promise<SyncInfo | undefined>;
|
|
3
|
-
export declare function fetchSnippet(id: string): Promise<Snippet | null>;
|
|
4
|
-
export declare function writeFiles(appRootDir: string, snippet: Snippet, files: Array<FileNode | FolderNode>, rootPath: string, addSessionLink: boolean): Promise<FileNode[]>;
|
|
5
|
-
export declare function suggestRootPath(appRootDir: string, framework: string): string;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import type { Credentials } from "./credentials";
|
|
3
|
-
import type { CLIArgs } from "cli";
|
|
4
|
-
import type { SessionContext } from "./codegen";
|
|
5
|
-
import type { CodebaseSearchOptions, CodebaseSearchResponse, RepoInfo } from "$/ai-utils";
|
|
6
|
-
export interface GitRankingParams {
|
|
7
|
-
sys: DevToolsSys;
|
|
8
|
-
appRootDir: string;
|
|
9
|
-
allFiles: string[];
|
|
10
|
-
files: string[];
|
|
11
|
-
hiddenFiles: string[];
|
|
12
|
-
selectedFilePaths: Map<string, number>;
|
|
13
|
-
promptRelevantFiles: string[];
|
|
14
|
-
}
|
|
15
|
-
export declare function processGitBasedRanking({ sys, appRootDir, allFiles, files, hiddenFiles, selectedFilePaths, promptRelevantFiles, }: GitRankingParams): Promise<void>;
|
|
16
|
-
export declare function shouldIncludeFile(inputFile: string, ctx: {
|
|
17
|
-
foundFiles: string[];
|
|
18
|
-
allFiles: string[];
|
|
19
|
-
selectedFilePaths: Map<string, number>;
|
|
20
|
-
cwd: string;
|
|
21
|
-
appRootDir: string;
|
|
22
|
-
fallbackImportance: number | 0;
|
|
23
|
-
}): number | 0;
|
|
24
|
-
export interface GitFileInfo {
|
|
25
|
-
filePath: string;
|
|
26
|
-
lastModified: Date;
|
|
27
|
-
frequency: number;
|
|
28
|
-
commitIds: string[];
|
|
29
|
-
relatedFiles: Set<string>;
|
|
30
|
-
}
|
|
31
|
-
export declare function getFileMetadata(sys: DevToolsSys, appRootDir: string, file: string): {
|
|
32
|
-
tokens: number;
|
|
33
|
-
content: string;
|
|
34
|
-
};
|
|
35
|
-
export declare function calculateMaxFileTokens(fileImportance: number, highImportanceCount: number): number;
|
|
36
|
-
/**
|
|
37
|
-
* Get recently modified files using git commands with commit relationship tracking
|
|
38
|
-
*/
|
|
39
|
-
export declare function getGitModifiedFiles(sys: DevToolsSys, appRootDir: string, commitCount?: number): Promise<Map<string, GitFileInfo>>;
|
|
40
|
-
/**
|
|
41
|
-
* Update file relationships based on files modified in the same commit
|
|
42
|
-
*/
|
|
43
|
-
export declare function updateFileRelationships(fileInfoMap: Map<string, GitFileInfo>, files: string[], commitId: string): void;
|
|
44
|
-
/**
|
|
45
|
-
* Calculate importance based on git history and relevant paths
|
|
46
|
-
*/
|
|
47
|
-
export declare function calculateGitImportance(file: string, gitFiles: Map<string, GitFileInfo>, baseImportance: number, relevantPaths: string[]): number;
|
|
48
|
-
export declare function shouldIncludeHiddenFile(sys: DevToolsSys, file: string): boolean;
|
|
49
|
-
export declare function performSearch(sys: DevToolsSys, credentials: Credentials, args: CLIArgs, sessionContext: SessionContext, repoInfo: RepoInfo, files: string[], hiddenFiles: string[], userPrompt: string, allFiles: string[], packageJson: any, signal: AbortSignal | undefined): Promise<CodebaseSearchResponse | null>;
|
|
50
|
-
export declare function searchCodeBase(sys: DevToolsSys, credentials: Credentials, args: CLIArgs, signal: AbortSignal | undefined, body: CodebaseSearchOptions): Promise<CodebaseSearchResponse | null>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { CodeGenTools, ContentMessageItemToolResult, ProjectFile } from "$/ai-utils";
|
|
2
|
-
import type { DevToolsSys } from "../core";
|
|
3
|
-
export interface LLMToolCalls {
|
|
4
|
-
name: CodeGenTools;
|
|
5
|
-
input: Record<string, any>;
|
|
6
|
-
id: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ToolResolution {
|
|
9
|
-
toolResult: string;
|
|
10
|
-
isError: boolean;
|
|
11
|
-
title?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function resolveToolCalls(sys: DevToolsSys, toolCalls: LLMToolCalls[]): Promise<{
|
|
14
|
-
toolResults: ContentMessageItemToolResult[];
|
|
15
|
-
projectFiles: ProjectFile[];
|
|
16
|
-
}>;
|
|
17
|
-
interface RipgrepMatch {
|
|
18
|
-
path: string;
|
|
19
|
-
lineNumber: number;
|
|
20
|
-
lineContent: string;
|
|
21
|
-
}
|
|
22
|
-
interface RipgrepResult {
|
|
23
|
-
matches: RipgrepMatch[];
|
|
24
|
-
}
|
|
25
|
-
export declare function runRipgrep(sys: DevToolsSys, pattern: string, includeGlob?: string, excludeGlob?: string): Promise<RipgrepResult>;
|
|
26
|
-
export {};
|
package/types/cli/code.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from "./index";
|
|
3
|
-
import type { UserContext } from "$/ai-utils";
|
|
4
|
-
export declare const runCodeCommand: (sys: DevToolsSys, subCommand: string, args: CLIArgs) => Promise<void>;
|
|
5
|
-
export declare const runCodeGen: (sys: DevToolsSys, args: CLIArgs) => Promise<void>;
|
|
6
|
-
export declare function checkProjectRoot(sys: DevToolsSys, interactive: boolean): Promise<void>;
|
|
7
|
-
export declare function getUserContext(sys: DevToolsSys): Promise<UserContext>;
|
package/types/cli/codegen.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from "./index";
|
|
3
|
-
import { type Credentials } from "./credentials";
|
|
4
|
-
import { type Checkpoint } from "./incremental-tsc";
|
|
5
|
-
import type { ApplyActionsResult, Attachment, CodebaseSearchResponse, ContentMessageItemToolResult, CustomInstruction, GenerateCompletionStep, GenerateUserMessage, ProjectFile, UserContext } from "$/ai-utils";
|
|
6
|
-
import prettier from "prettier";
|
|
7
|
-
interface Turn {
|
|
8
|
-
completionId: string;
|
|
9
|
-
nextUrl: string | undefined;
|
|
10
|
-
originalFiles: {
|
|
11
|
-
path: string;
|
|
12
|
-
content: Uint8Array | null;
|
|
13
|
-
}[];
|
|
14
|
-
isUserMessage: boolean;
|
|
15
|
-
toolResults: ContentMessageItemToolResult[];
|
|
16
|
-
sentiment?: "positive" | "negative" | "undo";
|
|
17
|
-
applyResults: ApplyActionsResult[];
|
|
18
|
-
projectFiles: ProjectFile[];
|
|
19
|
-
userInput: UserInput;
|
|
20
|
-
}
|
|
21
|
-
type State = "unknown" | "initial-with-url" | "initial-without-url" | "generating" | "success" | "abort" | "error";
|
|
22
|
-
export interface SessionContext {
|
|
23
|
-
sessionId: string;
|
|
24
|
-
turns: Turn[];
|
|
25
|
-
selectedFilePaths: Map<string, number>;
|
|
26
|
-
customInstructions: CustomInstruction[];
|
|
27
|
-
userContext: UserContext;
|
|
28
|
-
prettierConfig: prettier.Config | null;
|
|
29
|
-
state: State;
|
|
30
|
-
}
|
|
31
|
-
export interface UserInput {
|
|
32
|
-
userPrompt: string;
|
|
33
|
-
attachments: Attachment[];
|
|
34
|
-
sentiment: "positive" | "negative" | "undo";
|
|
35
|
-
files: ProjectFile[];
|
|
36
|
-
searchResponse: CodebaseSearchResponse | null;
|
|
37
|
-
rerankFiles?: number;
|
|
38
|
-
mostRelevantFile: string | null;
|
|
39
|
-
role: "user" | "agent";
|
|
40
|
-
}
|
|
41
|
-
export declare class CodeGenSession {
|
|
42
|
-
#private;
|
|
43
|
-
constructor(sys: DevToolsSys, credentials: Credentials, args: CLIArgs, position: string, initialUrl?: string, mode?: "quality" | "quality-v3" | "fast");
|
|
44
|
-
setDebug(debug: boolean): void;
|
|
45
|
-
getAllFiles(): Promise<string[]>;
|
|
46
|
-
isNextPage(): boolean;
|
|
47
|
-
getSessionId(): Promise<string>;
|
|
48
|
-
getSpaceId(): string | undefined;
|
|
49
|
-
undoLastUserMessage(dryRun?: boolean): Promise<string[]>;
|
|
50
|
-
getLastCompletionId(): string | undefined;
|
|
51
|
-
getCurrentState(): State;
|
|
52
|
-
getLastTurn(): Turn | undefined;
|
|
53
|
-
getNextUrl(): string | undefined;
|
|
54
|
-
getNextMessage(): Promise<GenerateUserMessage>;
|
|
55
|
-
sendFeedback(sentiment: "positive" | "negative" | "undo", message?: string, lastCompletionId?: string | undefined): Promise<void>;
|
|
56
|
-
hasUndoChanges(): Promise<boolean>;
|
|
57
|
-
isBusy(): boolean;
|
|
58
|
-
sendMessage(message: GenerateUserMessage): void;
|
|
59
|
-
isEventLoopRunning(): boolean;
|
|
60
|
-
getTurns(): void;
|
|
61
|
-
getSessionContext(): Promise<SessionContext>;
|
|
62
|
-
abort(): void;
|
|
63
|
-
stopEventLoop(): void;
|
|
64
|
-
startEventLoop(onStep: (step: GenerateCompletionStep) => void): Promise<void>;
|
|
65
|
-
agentCompletion(userMessage: GenerateUserMessage, baselineCheckpoint: Checkpoint, signal: AbortSignal | undefined, onStep: (step: GenerateCompletionStep) => Promise<void> | void): Promise<Checkpoint>;
|
|
66
|
-
getUserInput(userMessage: GenerateUserMessage, signal: AbortSignal | undefined): Promise<UserInput>;
|
|
67
|
-
}
|
|
68
|
-
export declare const createSessionContext: (sys: DevToolsSys) => Promise<SessionContext>;
|
|
69
|
-
export declare function transformStream(body: ReadableStream<Uint8Array> | null): AsyncGenerator<string, void, unknown>;
|
|
70
|
-
export declare function getUserContext(sys: DevToolsSys): Promise<UserContext>;
|
|
71
|
-
export declare function makeAsyncIterator<T>(): readonly [AsyncGenerator<T, void, void>, (event: T) => void, () => void];
|
|
72
|
-
export {};
|
package/types/cli/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const apiAirV2Host: string;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from "./index";
|
|
3
|
-
export interface CredentialsOptions {
|
|
4
|
-
forceSpaceId?: string;
|
|
5
|
-
builderPublicKey?: boolean;
|
|
6
|
-
builderPrivateKey?: boolean;
|
|
7
|
-
figmaAuth?: boolean;
|
|
8
|
-
force?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface FigmaAuth {
|
|
11
|
-
access_token: string;
|
|
12
|
-
oauth: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type Feature = "component-mapping";
|
|
15
|
-
export interface BuilderCodegenUsage {
|
|
16
|
-
total: number | undefined;
|
|
17
|
-
fast: number | undefined;
|
|
18
|
-
quality: number | undefined;
|
|
19
|
-
features?: Feature[];
|
|
20
|
-
limits?: {
|
|
21
|
-
aiGeneration: number;
|
|
22
|
-
aiGenerationContextWindow: number;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export interface BuilderAuth {
|
|
26
|
-
privateKey: string;
|
|
27
|
-
spaceId: string;
|
|
28
|
-
spaceName: string;
|
|
29
|
-
userId: string;
|
|
30
|
-
}
|
|
31
|
-
export interface Credentials {
|
|
32
|
-
figmaAuth?: FigmaAuth;
|
|
33
|
-
builderPublicKey?: string;
|
|
34
|
-
builderPrivateKey?: string;
|
|
35
|
-
spaceName?: string;
|
|
36
|
-
userId?: string;
|
|
37
|
-
}
|
|
38
|
-
export declare const isCI: (args: CLIArgs) => boolean;
|
|
39
|
-
export interface Credentials {
|
|
40
|
-
figmaAuth?: FigmaAuth;
|
|
41
|
-
builderPublicKey?: string;
|
|
42
|
-
builderPrivateKey?: string;
|
|
43
|
-
spaceName?: string;
|
|
44
|
-
userId?: string;
|
|
45
|
-
}
|
|
46
|
-
export declare const getCredentials: (sys: DevToolsSys, args: CLIArgs, opts: CredentialsOptions) => Promise<Credentials>;
|
|
47
|
-
export declare function getFigmaAuth(sys: DevToolsSys): Promise<FigmaAuth>;
|
|
48
|
-
export declare function getBuilderCodegenUsage(builderPublicKey: string, builderPrivateKey: string): Promise<BuilderCodegenUsage>;
|
|
49
|
-
export declare function getBuilderAuth(sys: DevToolsSys, preferSpaceId?: string): Promise<BuilderAuth>;
|
package/types/cli/download.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CLIArgs } from "./index";
|
|
2
|
-
import type { DevToolsSys } from "../types";
|
|
3
|
-
import type { FigmaBuilderLink } from "$/ai-utils";
|
|
4
|
-
interface KVGetRequest {
|
|
5
|
-
privateKey: string;
|
|
6
|
-
spaceId: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const runFigmaMigrate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
9
|
-
export declare function getBuilderSpaceFigmaLinks(kvReq: KVGetRequest): Promise<FigmaBuilderLink[]>;
|
|
10
|
-
export {};
|
package/types/cli/exit.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function exit(code: number): Promise<never>;
|
package/types/cli/fetch.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const safeFetch: typeof globalThis.fetch;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import type { DevTools, DevToolsSys } from "../types";
|
|
3
|
-
import type { CLIArgs } from "./index";
|
|
4
|
-
import type { FigmaBuilderLink, FigmaMapperFile } from "$/ai-utils";
|
|
5
|
-
export declare const runFigmaPublish: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
6
|
-
export declare const FIGMA_CONNECT_CALL = "figmaMapping";
|
|
7
|
-
export declare function findAllMappingFiles(sys: DevToolsSys): Promise<string[]>;
|
|
8
|
-
export declare function setPublicKey(sys: DevToolsSys, publicKey: string, devTools: DevTools | undefined, ensureFigmaImportPage?: boolean): Promise<boolean>;
|
|
9
|
-
export declare function findMappingsFromFiles({ sys, mappingFiles, typeCheck, }: {
|
|
10
|
-
mappingFiles: string[];
|
|
11
|
-
sys: DevToolsSys;
|
|
12
|
-
typeCheck?: boolean;
|
|
13
|
-
}): Promise<{
|
|
14
|
-
mapperFiles: FigmaMapperFile[];
|
|
15
|
-
figmaBuilderLinks: FigmaBuilderLink[];
|
|
16
|
-
diagnostics: ts.Diagnostic[];
|
|
17
|
-
figmaLinksToResolve: string[];
|
|
18
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type Credentials, type FigmaAuth } from "./credentials";
|
|
2
|
-
import type { DevToolsSys } from "../types";
|
|
3
|
-
import type { CLIArgs } from "./index";
|
|
4
|
-
import type { FigmaBuilderLink, FigmaComponentInfo } from "$/ai-utils";
|
|
5
|
-
type FigmaAPIOpts = {
|
|
6
|
-
auth: {
|
|
7
|
-
access_token: string;
|
|
8
|
-
oauth: boolean;
|
|
9
|
-
};
|
|
10
|
-
params?: Record<string, any>;
|
|
11
|
-
};
|
|
12
|
-
export declare const parseFigmaURL: (str: string) => {
|
|
13
|
-
fileID: string;
|
|
14
|
-
nodeId: string;
|
|
15
|
-
} | null;
|
|
16
|
-
export declare const figmaApi: (sys: DevToolsSys, args: CLIArgs, path: string, { auth, params }: FigmaAPIOpts) => Promise<any>;
|
|
17
|
-
export declare const getFigmaNodeData: (sys: DevToolsSys, args: CLIArgs, auth: {
|
|
18
|
-
access_token: string;
|
|
19
|
-
oauth: boolean;
|
|
20
|
-
}, fileId: string, nodeIds: string, depth?: number) => Promise<any>;
|
|
21
|
-
export declare function getImportDataFromToken(credentials: Credentials, token: string, verbose: boolean): Promise<(readonly [string, FigmaComponentInfo])[]>;
|
|
22
|
-
export declare function needsFigmaAuth(urls: string[]): boolean;
|
|
23
|
-
export declare function getFigmaNodeDataFromURLs(sys: DevToolsSys, args: CLIArgs, figmaAuth: {
|
|
24
|
-
access_token: string;
|
|
25
|
-
oauth: boolean;
|
|
26
|
-
} | undefined, builderAuth: {
|
|
27
|
-
privateKey: string;
|
|
28
|
-
spaceId: string;
|
|
29
|
-
}, urls: string[]): Promise<(readonly [string, FigmaComponentInfo])[]>;
|
|
30
|
-
export declare function inPlaceResolveFigmaURLs(sys: DevToolsSys, args: CLIArgs, figmaAuth: FigmaAuth, figmaBuilderLinks: FigmaBuilderLink[], figmaLinksToResolve: string[]): Promise<void>;
|
|
31
|
-
export {};
|
package/types/cli/figma.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from ".";
|
|
3
|
-
export declare const runFigmaCommand: (sys: DevToolsSys, subCommand: string, args: CLIArgs) => Promise<void>;
|
|
4
|
-
export declare function askToInstallBuilder(sys: DevToolsSys, args: CLIArgs): Promise<void>;
|
package/types/cli/generate.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ComponentInfo, ComponentRegistry, DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from "./index";
|
|
3
|
-
import { type FigmaComponentInfo, type UserContext } from "$/ai-utils";
|
|
4
|
-
export declare const runFigmaGenerate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
5
|
-
export interface MappingCodeV3 {
|
|
6
|
-
figmaNode?: FigmaComponentInfo;
|
|
7
|
-
registry?: ComponentRegistry;
|
|
8
|
-
userContext?: UserContext;
|
|
9
|
-
figmaUrl?: string;
|
|
10
|
-
docsUrl?: string;
|
|
11
|
-
registeredCmp?: ComponentInfo;
|
|
12
|
-
previousCompletion?: string;
|
|
13
|
-
userPrompt?: string;
|
|
14
|
-
token?: string;
|
|
15
|
-
pragma?: string;
|
|
16
|
-
}
|
package/types/cli/help.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function printHelp(subcommand?: string): void;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as ts from "typescript";
|
|
2
|
-
/**
|
|
3
|
-
* Performs an incremental type-check (no emit) for the given project directory.
|
|
4
|
-
* It reads tsconfig.json (just like the tsc CLI does) and enforces the `noEmit` flag.
|
|
5
|
-
*
|
|
6
|
-
* @param projectDir - The path to the project (where tsconfig.json is located).
|
|
7
|
-
* @param oldProgram - Optionally, the previous builder program for incremental builds.
|
|
8
|
-
* @returns An object containing the new builder program and collected diagnostics.
|
|
9
|
-
*/
|
|
10
|
-
export interface CheckpointData {
|
|
11
|
-
program: ts.EmitAndSemanticDiagnosticsBuilderProgram;
|
|
12
|
-
diagnostics: ts.Diagnostic[];
|
|
13
|
-
}
|
|
14
|
-
export type Checkpoint = CheckpointData | null;
|
|
15
|
-
export declare function runCheckpoint(projectDir: string, oldProgram?: ts.EmitAndSemanticDiagnosticsBuilderProgram): Checkpoint;
|
|
16
|
-
export declare function filterDiagnostic(c: ts.Diagnostic): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Given a new list of diagnostics and a baseline list, filter out diagnostics
|
|
19
|
-
* that were already present in the baseline.
|
|
20
|
-
*/
|
|
21
|
-
export declare function filterBaselineDiagnostics(baselineFingerprints: Set<string>, checkpoint: Checkpoint): ts.Diagnostic[];
|
|
22
|
-
export declare function createFingerprintSet(checkpoint: Checkpoint): Set<string>;
|
|
23
|
-
/**
|
|
24
|
-
* Pretty prints diagnostics as a plain text string.
|
|
25
|
-
*
|
|
26
|
-
* @param diagnostics - An array of ts.Diagnostic objects.
|
|
27
|
-
* @returns A formatted string that describes the diagnostics.
|
|
28
|
-
*/
|
|
29
|
-
export declare function prettyPrintDiagnostics(diagnostics: ts.Diagnostic[]): string;
|
|
30
|
-
export declare function prettyPrintDiagnosticsWithContext(diagnostics: ts.Diagnostic[]): string;
|
package/types/cli/index.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export interface CLIArgs {
|
|
2
|
-
/** Figma access token */
|
|
3
|
-
figmaToken?: string;
|
|
4
|
-
/** GitHub access token */
|
|
5
|
-
githubToken?: string;
|
|
6
|
-
/** Run in CI mode without interactive prompts */
|
|
7
|
-
ci?: boolean;
|
|
8
|
-
/** Show help text */
|
|
9
|
-
help?: boolean;
|
|
10
|
-
/** Force operation even if there are warnings */
|
|
11
|
-
force?: boolean;
|
|
12
|
-
/** Print output as JSON */
|
|
13
|
-
verbose?: boolean;
|
|
14
|
-
/** Run in dry-run mode without making changes */
|
|
15
|
-
dryrun?: boolean;
|
|
16
|
-
/** Auto-confirm all prompts */
|
|
17
|
-
yes?: boolean;
|
|
18
|
-
/** Builder.io space ID */
|
|
19
|
-
spaceId?: string;
|
|
20
|
-
/** Component name to use */
|
|
21
|
-
componentName?: string;
|
|
22
|
-
/** Mapping directory to use */
|
|
23
|
-
mappingOutput?: string;
|
|
24
|
-
/** Skip package installation step */
|
|
25
|
-
skipInstallation?: boolean;
|
|
26
|
-
/** Token to use for figma */
|
|
27
|
-
token?: string;
|
|
28
|
-
/** Url to start from */
|
|
29
|
-
url?: string;
|
|
30
|
-
/** Node ID from Figma URL */
|
|
31
|
-
nodeId?: string;
|
|
32
|
-
/** Prompt text for non-interactive mode */
|
|
33
|
-
prompt?: string;
|
|
34
|
-
/** Generation mode */
|
|
35
|
-
mode?: "fast" | "quality" | "quality-v3";
|
|
36
|
-
/** Working directory to run commands from */
|
|
37
|
-
cwd?: string;
|
|
38
|
-
/** Debug mode */
|
|
39
|
-
debug?: boolean;
|
|
40
|
-
/** Port number for the dev server */
|
|
41
|
-
port?: number;
|
|
42
|
-
/** Port number for the dev server (shorthand) */
|
|
43
|
-
p?: number;
|
|
44
|
-
/** Dev server command to execute */
|
|
45
|
-
command?: string;
|
|
46
|
-
/** Dev server command to execute (shorthand) */
|
|
47
|
-
c?: string;
|
|
48
|
-
/** Skip authentication for testing purposes */
|
|
49
|
-
noAuth?: boolean;
|
|
50
|
-
/** Skip authentication for testing purposes (flag form) */
|
|
51
|
-
auth?: boolean;
|
|
52
|
-
/** Use development server instead of production for launch command */
|
|
53
|
-
dev?: boolean;
|
|
54
|
-
/** Skip browser auto-open */
|
|
55
|
-
noOpen?: boolean;
|
|
56
|
-
/** Skip browser auto-open (flag form) */
|
|
57
|
-
open?: boolean;
|
|
58
|
-
/** Raw command line arguments */
|
|
59
|
-
_: string[];
|
|
60
|
-
/** Silent mode for launch command */
|
|
61
|
-
silent?: boolean;
|
|
62
|
-
/** Fusion project ID */
|
|
63
|
-
projectId?: string;
|
|
64
|
-
}
|
package/types/cli/indexing.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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,86 +0,0 @@
|
|
|
1
|
-
import { type SelectOptions, type ConfirmOptions, type TextOptions } from "@clack/prompts";
|
|
2
|
-
import { spinner } from "./spinner";
|
|
3
|
-
import type { WebSocket } from "ws";
|
|
4
|
-
export interface IOService {
|
|
5
|
-
log(str: string): void;
|
|
6
|
-
info(str: string): void;
|
|
7
|
-
warn(str: string): void;
|
|
8
|
-
error(str: string): void;
|
|
9
|
-
write(text: string): void;
|
|
10
|
-
writeMetadata(metadata: Record<string, any>): void;
|
|
11
|
-
confirm(options: ConfirmOptions): Promise<boolean | symbol>;
|
|
12
|
-
text(options: TextOptions): Promise<string | symbol>;
|
|
13
|
-
select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
|
|
14
|
-
createSpinner(): ReturnType<typeof spinner>;
|
|
15
|
-
isInteractive(): boolean;
|
|
16
|
-
isTTY(): boolean;
|
|
17
|
-
exit(code: number): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
export declare class ConsoleIOService implements IOService {
|
|
20
|
-
log(str: string): void;
|
|
21
|
-
info(str: string): void;
|
|
22
|
-
warn(str: string): void;
|
|
23
|
-
error(str: string): void;
|
|
24
|
-
write(text: string): void;
|
|
25
|
-
writeMetadata(_: Record<string, any>): void;
|
|
26
|
-
confirm(options: ConfirmOptions): Promise<boolean | symbol>;
|
|
27
|
-
text(options: TextOptions): Promise<string | symbol>;
|
|
28
|
-
select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
|
|
29
|
-
createSpinner(): ReturnType<typeof spinner>;
|
|
30
|
-
isInteractive(): boolean;
|
|
31
|
-
isTTY(): boolean;
|
|
32
|
-
exit(code: number): Promise<void>;
|
|
33
|
-
}
|
|
34
|
-
export interface BaseMessage {
|
|
35
|
-
type: string;
|
|
36
|
-
[key: string]: any;
|
|
37
|
-
}
|
|
38
|
-
export interface LogMessage extends BaseMessage {
|
|
39
|
-
type: "log";
|
|
40
|
-
level: "info" | "warn" | "error";
|
|
41
|
-
message: string;
|
|
42
|
-
}
|
|
43
|
-
export interface WriteMessage extends BaseMessage {
|
|
44
|
-
type: "write";
|
|
45
|
-
text: string;
|
|
46
|
-
}
|
|
47
|
-
export interface SpinnerMessage extends BaseMessage {
|
|
48
|
-
type: "spinner";
|
|
49
|
-
status: "start" | "stop";
|
|
50
|
-
message: string;
|
|
51
|
-
code?: number;
|
|
52
|
-
}
|
|
53
|
-
export interface PromptRequest extends BaseMessage {
|
|
54
|
-
type: "prompt";
|
|
55
|
-
promptType: "text" | "confirm" | "select";
|
|
56
|
-
options: any;
|
|
57
|
-
requestId: string;
|
|
58
|
-
}
|
|
59
|
-
export interface PromptResponse extends BaseMessage {
|
|
60
|
-
type: "prompt_response";
|
|
61
|
-
requestId: string;
|
|
62
|
-
value: any;
|
|
63
|
-
cancelled?: boolean;
|
|
64
|
-
}
|
|
65
|
-
export declare class WebSocketIOService implements IOService {
|
|
66
|
-
private ws;
|
|
67
|
-
private promptCallbacks;
|
|
68
|
-
private messageQueue;
|
|
69
|
-
private isProcessing;
|
|
70
|
-
constructor(ws: WebSocket);
|
|
71
|
-
private sendMessage;
|
|
72
|
-
private prompt;
|
|
73
|
-
log(...args: any[]): void;
|
|
74
|
-
info(...args: any[]): void;
|
|
75
|
-
warn(...args: any[]): void;
|
|
76
|
-
error(...args: any[]): void;
|
|
77
|
-
write(text: string): void;
|
|
78
|
-
writeMetadata(metadata: Record<string, any>): void;
|
|
79
|
-
confirm(options: ConfirmOptions): Promise<boolean | symbol>;
|
|
80
|
-
text(options: TextOptions): Promise<string | symbol>;
|
|
81
|
-
select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
|
|
82
|
-
createSpinner(): ReturnType<typeof spinner>;
|
|
83
|
-
isInteractive(): boolean;
|
|
84
|
-
isTTY(): boolean;
|
|
85
|
-
exit(code: number): Promise<void>;
|
|
86
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "@builder.io/dev-tools/core";
|
|
2
|
-
import type { CLIArgs } from "../index";
|
|
3
|
-
import type { EnsureConfigResult } from "types";
|
|
4
|
-
export type InstallOutcome = EnsureConfigResult["outcome"] | "install-failed";
|
|
5
|
-
export declare const installJsxPlugin: (sys: DevToolsSys, args: CLIArgs) => Promise<{
|
|
6
|
-
installOutcome: InstallOutcome;
|
|
7
|
-
}>;
|
package/types/cli/launch.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "@builder.io/dev-tools/core";
|
|
2
|
-
import type { CLIArgs } from "./index";
|
|
3
|
-
export declare const PROXY_PORT = 48752;
|
|
4
|
-
export declare function runLaunchCommand({ sys, args, }: {
|
|
5
|
-
sys: DevToolsSys;
|
|
6
|
-
args: CLIArgs;
|
|
7
|
-
}): Promise<number>;
|
package/types/cli/prettier.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function prettierFormat(code: string, parser?: string, filePath?: string): Promise<string>;
|
package/types/cli/spinner.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const spinner: () => {
|
|
2
|
-
start: (msg?: string) => void;
|
|
3
|
-
stop: (msg?: string, code?: number) => void;
|
|
4
|
-
message: (msg?: string) => void;
|
|
5
|
-
extra: (msg?: string) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare function block({ input, output, overwrite, hideCursor, }?: {
|
|
8
|
-
input?: (NodeJS.ReadStream & {
|
|
9
|
-
fd: 0;
|
|
10
|
-
}) | undefined;
|
|
11
|
-
output?: (NodeJS.WriteStream & {
|
|
12
|
-
fd: 1;
|
|
13
|
-
}) | undefined;
|
|
14
|
-
overwrite?: boolean | undefined;
|
|
15
|
-
hideCursor?: boolean | undefined;
|
|
16
|
-
}): () => void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AddCliOptions, DevToolsSys, FileNode, SyncInfo } from "../types";
|
|
2
|
-
export declare function extractSignatureInfo(content: string): {
|
|
3
|
-
contentId?: string;
|
|
4
|
-
sessionKey?: string;
|
|
5
|
-
snippetId?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function getAllProjectFiles(basePath: string, ignorePatterns?: (path: string) => boolean, globPattern?: string): Promise<string[]>;
|
|
8
|
-
export declare function findBuilderFiles(basePath: string, targetContentId: string, targetSessionKey: string): Promise<FileNode[]>;
|
|
9
|
-
export declare function filterNonImportantFiles(files: string[]): string[];
|
|
10
|
-
export declare function getIgnorePatterns(basePath: string): (path: string) => boolean;
|
|
11
|
-
export declare function watchDirectory(basePath: string, syncInfo: SyncInfo, onChange: (updatedSyncInfo: SyncInfo) => void): () => Promise<void>;
|
|
12
|
-
export declare function setupSyncServer(sys: DevToolsSys, initialSyncInfo?: SyncInfo): Promise<void>;
|
|
13
|
-
export declare function syncCommand(opts: AddCliOptions): Promise<SyncInfo | undefined>;
|