@builder.io/dev-tools 1.58.2-dev.202605201531.6953985a6 → 1.58.2-dev.202605201725.6953985a6
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/codegen.cjs +38459 -0
- package/cli/codegen.d.ts +1 -0
- package/cli/codegen.mjs +38455 -0
- package/cli/index.cjs +2 -2
- package/cli/index.d.ts +1 -0
- package/cli/index.mjs +136602 -0
- 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 +1 -1
- package/server/index.cjs +2 -2
- package/server/index.mjs +2 -2
- package/types/_tests_/figma-generate.e2e.d.ts +1 -0
- package/types/cli/generate.d.ts +16 -0
- package/types/cli/launch.d.ts +1 -1
- package/types/cli/utils/browser-testing-agent.d.ts +2 -0
- package/types/cli/utils/code-review-agent/code-review-agent.d.ts +2 -0
- package/types/cli/utils/code-review-agent/index.d.ts +1 -0
- package/types/cli/utils/code-review-orchestrator/code-review-orchestrator.d.ts +2 -0
- package/types/cli/utils/code-review-orchestrator/index.d.ts +1 -0
- package/types/cli/utils/dev-server-url-parser.d.ts +12 -0
- package/types/cli/utils/dev-server-url-parser.test.d.ts +1 -0
- package/types/cli/utils/project-configuration-agent.d.ts +2 -0
- package/types/cli/utils/rules-parser.d.ts +17 -0
- package/types/cli/utils/rules-parser.test.d.ts +1 -0
- package/types/cli/utils/yaml-frontmatter.d.ts +32 -0
- package/types/cli/utils/yaml-frontmatter.test.d.ts +1 -0
- package/types/common/utils.d.ts +1 -1
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
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/launch.d.ts
CHANGED
|
@@ -117,6 +117,6 @@ export declare function runFusionCommand({ sys, args, existingSession, }: {
|
|
|
117
117
|
args: LaunchArgs;
|
|
118
118
|
existingSession?: CodeGenSession;
|
|
119
119
|
}): Promise<void>;
|
|
120
|
-
declare const PUBLIC_METHODS: ("
|
|
120
|
+
declare const PUBLIC_METHODS: ("switchSessionMode" | "switchModelOverride" | "queueSystemReminder" | "setDefaultAutoPush" | "setPrivacyMode" | "loadHistory" | "loadMoreTurns" | "setCustomInstructions" | "pushRepoV2" | "uploadBackup" | "pushChanges" | "abortMerge" | "syncChangesFromRemote" | "createTerminal" | "updateTerminal" | "writeTerminal" | "signalTerminal" | "disposeTerminal" | "restartTerminal" | "getAllFiles" | "searchFiles" | "searchFileTree" | "collectRepoMetrics" | "restoreFromCompletionId" | "restoreBeforeCompletionId" | "undoLastUserMessage" | "sendFeedback" | "clearSession" | "clearMessageQueue" | "updateMessage" | "flushMessageQueue" | "sendMessage" | "setProxyOrigin" | "abortSetupCommand" | "abortValidateCommand" | "toolFullfilment" | "abortToolCall" | "abort" | "stopEventLoop" | "configureDevOrchestrator" | "tsServerInit" | "tsServerOpenFile" | "tsServerChangeFile" | "tsServerCloseFile" | "tsServerGetCompletions" | "tsServerGetCompletionDetails" | "tsServerGetDefinition" | "tsServerGetTypeDefinition" | "tsServerGetQuickInfo" | "tsServerGetReferences" | "tsServerGetSignatureHelp" | "tsServerRequestDiagnostics" | "tsServerGetRenameLocations" | "tsServerGetNavTree" | "tsServerOrganizeImports" | "tsServerGetInlayHints" | "tsServerGetCodeFixes" | "tsServerGetApplicableRefactors" | "tsServerGetEditsForRefactor" | "tsServerGetImplementation" | "tsServerGetSelectionRange" | "tsServerGetLinkedEditingRange" | "tsServerGetFormatRange" | "manualCommit" | "launchEditor" | "readFile" | "readFileWithChecksum" | "readBinaryFile" | "getSingleFileDiff" | "discardFileChanges" | "revertDiscard" | "fileExists" | "writeFile" | "listDir" | "listCustomInstructions" | "deleteFile" | "getDiff")[];
|
|
121
121
|
export type PublicCodeGenSession = Pick<InstanceType<typeof CodeGenSession>, (typeof PUBLIC_METHODS)[0]>;
|
|
122
122
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CODE_REVIEW_AGENT } from "./code-review-agent";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CODE_REVIEW_ORCHESTRATOR } from "./code-review-orchestrator";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DevServerUrlInfo {
|
|
2
|
+
url: string;
|
|
3
|
+
port: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Parse dev server output to extract URL and port information
|
|
7
|
+
*
|
|
8
|
+
* @param output - The command output string to parse
|
|
9
|
+
* @param customPatterns - Optional array of custom regex patterns to try first
|
|
10
|
+
* @returns Object with url and port, or null if no valid URL found
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseDevServerOutput(output: string, customPatterns?: string[]): DevServerUrlInfo | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom instruction/rules parsing utilities
|
|
3
|
+
* Handles parsing of custom instruction files (.mdc, .cursorrules, etc.)
|
|
4
|
+
*/
|
|
5
|
+
import type { CustomInstruction } from "$/ai-utils";
|
|
6
|
+
/**
|
|
7
|
+
* Parse a custom instruction file
|
|
8
|
+
* Supports both:
|
|
9
|
+
* - .mdc files with YAML frontmatter
|
|
10
|
+
* - Plain text files (.cursorrules, .builderrules, etc.)
|
|
11
|
+
*
|
|
12
|
+
* @param fileContent - Raw file content
|
|
13
|
+
* @param filePath - File path (for generating name and id)
|
|
14
|
+
* @param hashFunction - Optional hash function for generating unique IDs
|
|
15
|
+
* @returns Parsed CustomInstruction or null
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseCustomInstructionFile(fileContent: string, filePath: string, hashFunction?: (content: string) => string): CustomInstruction | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic YAML frontmatter parser for Markdown files
|
|
3
|
+
* Supports both simple key-value pairs and arrays
|
|
4
|
+
*/
|
|
5
|
+
export interface YamlFrontmatterResult<T = Record<string, any>> {
|
|
6
|
+
frontmatter: T;
|
|
7
|
+
body: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Checks if content has YAML frontmatter
|
|
11
|
+
*/
|
|
12
|
+
export declare function hasYamlFrontmatter(content: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Parses YAML frontmatter from a string
|
|
15
|
+
* Handles simple YAML: key-value pairs, arrays, and comments
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseYamlFrontmatter(yamlContent: string): Record<string, any>;
|
|
18
|
+
/**
|
|
19
|
+
* Extracts YAML frontmatter and body from Markdown content
|
|
20
|
+
* @param content - The raw Markdown content with frontmatter
|
|
21
|
+
* @returns Object with frontmatter and body, or null if no frontmatter found
|
|
22
|
+
*/
|
|
23
|
+
export declare function extractYamlFrontmatter(content: string): {
|
|
24
|
+
frontmatterContent: string;
|
|
25
|
+
body: string;
|
|
26
|
+
} | null;
|
|
27
|
+
/**
|
|
28
|
+
* Parse Markdown file with YAML frontmatter
|
|
29
|
+
* @param content - The raw file content
|
|
30
|
+
* @returns Parsed frontmatter and body
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseMarkdownWithYaml<T = Record<string, any>>(content: string): YamlFrontmatterResult<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
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(): "@builder.io/agent" | "\"@builder.io/dev-tools\""
|
|
22
|
+
export declare function builderNpxPackage(): "builder.io" | "@builder.io/agent" | "\"@builder.io/dev-tools\"";
|
|
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
|