@builder.io/dev-tools 1.22.2-dev.202602021932.a1fb74ebb → 1.22.2-dev.202602031702.b0e4d3ec2

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 (218) hide show
  1. package/cli/index.cjs +47 -4
  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 +1 -1
  8. package/server/index.cjs +2 -2
  9. package/server/index.mjs +2 -2
  10. package/types/_tests_/codegen-acl-glob.test.d.ts +1 -0
  11. package/types/_tests_/launch-mcp-http.e2e.d.ts +11 -0
  12. package/types/_tests_/launch-mcp-mixed.e2e.d.ts +10 -0
  13. package/types/_tests_/launch-mcp-sse.e2e.d.ts +10 -0
  14. package/types/_tests_/launch-mcp-stdio.e2e.d.ts +10 -0
  15. package/types/_tests_/mcp-retry.e2e.d.ts +1 -0
  16. package/types/_tests_/mcp-test-server-http.d.ts +22 -0
  17. package/types/_tests_/mcp-test-server-sse.d.ts +24 -0
  18. package/types/_tests_/mcp-test-server-stdio.d.ts +18 -0
  19. package/types/_tests_/utils.d.ts +35 -48
  20. package/types/cli/abort-signal-any.d.ts +1 -3
  21. package/types/cli/auth/auth-utils.d.ts +1 -3
  22. package/types/cli/auth/auth.d.ts +1 -5
  23. package/types/cli/backup.d.ts +60 -114
  24. package/types/cli/builder-add/interface.d.ts +4 -21
  25. package/types/cli/code-file-utils.d.ts +8 -11
  26. package/types/cli/code.d.ts +3 -13
  27. package/types/cli/credentials.d.ts +45 -61
  28. package/types/cli/debug-mcp.d.ts +19 -0
  29. package/types/cli/detectors/nextjs.d.ts +1 -4
  30. package/types/cli/detectors/svelte.d.ts +1 -4
  31. package/types/cli/detectors/vue.d.ts +1 -4
  32. package/types/cli/download.d.ts +4 -9
  33. package/types/cli/dsi-mcp.d.ts +1 -4
  34. package/types/cli/fetch.d.ts +2 -7
  35. package/types/cli/figma-publish.d.ts +17 -34
  36. package/types/cli/figma-utils.d.ts +21 -51
  37. package/types/cli/figma.d.ts +2 -9
  38. package/types/cli/generate.d.ts +11 -14
  39. package/types/cli/incremental-tsc.d.ts +7 -19
  40. package/types/cli/index.d.ts +154 -154
  41. package/types/cli/launch/InitStateMachine.d.ts +89 -156
  42. package/types/cli/launch/config.d.ts +3 -13
  43. package/types/cli/launch/dev-server-orchestrator.d.ts +99 -131
  44. package/types/cli/launch/dry-run-backup.d.ts +7 -14
  45. package/types/cli/launch/errors.d.ts +2 -7
  46. package/types/cli/launch/grafana.d.ts +1 -5
  47. package/types/cli/launch/helpers.d.ts +10 -19
  48. package/types/cli/launch/machine-health.d.ts +3 -8
  49. package/types/cli/launch/proxy.d.ts +4 -11
  50. package/types/cli/launch/server.d.ts +12 -19
  51. package/types/cli/launch/vscode-tunnel-manager.d.ts +68 -77
  52. package/types/cli/launch.d.ts +106 -109
  53. package/types/cli/prettier.d.ts +2 -9
  54. package/types/cli/repo-connect/env-collector.d.ts +11 -16
  55. package/types/cli/repo-connect/file-collector.d.ts +15 -22
  56. package/types/cli/repo-connect/git-detector.d.ts +11 -13
  57. package/types/cli/repo-connect/install-runner.d.ts +5 -8
  58. package/types/cli/repo-connect/package-detector.d.ts +8 -12
  59. package/types/cli/repo-connect/repo-connect.d.ts +1 -4
  60. package/types/cli/repo-indexing/component-discovery.d.ts +17 -30
  61. package/types/cli/repo-indexing/component-indexing.d.ts +20 -39
  62. package/types/cli/repo-indexing/icons.d.ts +24 -36
  63. package/types/cli/repo-indexing/installation.d.ts +14 -22
  64. package/types/cli/repo-indexing/repo-indexing-utils.d.ts +79 -138
  65. package/types/cli/repo-indexing/repo-indexing.d.ts +17 -37
  66. package/types/cli/repo-indexing/repo-indexing.mock.d.ts +3 -3
  67. package/types/cli/repo-indexing/tokens.d.ts +25 -44
  68. package/types/cli/repo-indexing/types.d.ts +29 -29
  69. package/types/cli/repo-metrics-utils.d.ts +5 -13
  70. package/types/cli/repo-metrics.d.ts +1 -4
  71. package/types/cli/report/figma-report.d.ts +36 -63
  72. package/types/cli/server-ws.d.ts +32 -40
  73. package/types/cli/spinner.d.ts +4 -4
  74. package/types/cli/sync-utils.d.ts +18 -45
  75. package/types/cli/track.d.ts +1 -4
  76. package/types/cli/utils/agent-discovery.d.ts +5 -10
  77. package/types/cli/utils/agent-parser.d.ts +13 -18
  78. package/types/cli/utils/component-group-mdx-prompt.d.ts +1 -2
  79. package/types/cli/utils/discovery-test-utils.d.ts +1 -3
  80. package/types/cli/utils/env-capture.d.ts +15 -21
  81. package/types/cli/utils/env-substitution.d.ts +1 -4
  82. package/types/cli/utils/feature-flags.d.ts +1 -3
  83. package/types/cli/utils/file-overrides-manager.d.ts +23 -39
  84. package/types/cli/utils/git.d.ts +16 -28
  85. package/types/cli/utils/hosts-file-manager.d.ts +4 -7
  86. package/types/cli/utils/lock-file.d.ts +7 -10
  87. package/types/cli/utils/parseGitDiff.d.ts +1 -4
  88. package/types/cli/utils/process-tracker.d.ts +51 -85
  89. package/types/cli/utils/repo-indexing-agent-prompt.d.ts +1 -2
  90. package/types/cli/utils/rules-discovery.d.ts +5 -10
  91. package/types/cli/utils/rules-parser.d.ts +1 -5
  92. package/types/cli/utils/terminal-buffer.d.ts +23 -23
  93. package/types/cli/utils/workspace-path-resolver.d.ts +16 -23
  94. package/types/cli/utils/yaml-frontmatter.d.ts +6 -10
  95. package/types/client/client-api.d.ts +10 -42
  96. package/types/client/edit-button/document-listeners.d.ts +1 -3
  97. package/types/client/edit-button/index.d.ts +6 -6
  98. package/types/client/menu/index.d.ts +3 -3
  99. package/types/client/menu/pages/component-detail.d.ts +2 -8
  100. package/types/client/menu/pages/component-input.d.ts +1 -5
  101. package/types/client/menu/pages/component-list.d.ts +1 -4
  102. package/types/client/menu/toggle/menu-toggle.d.ts +1 -4
  103. package/types/client/setup-ui/overview.d.ts +2 -2
  104. package/types/client/tracking.d.ts +11 -11
  105. package/types/client/utils.d.ts +3 -5
  106. package/types/common/ast/app-dependencies.d.ts +2 -8
  107. package/types/common/ast/component-info.d.ts +6 -26
  108. package/types/common/ast/component-input-types.d.ts +9 -28
  109. package/types/common/ast/component-registry.d.ts +8 -23
  110. package/types/common/ast/convert-values.d.ts +8 -40
  111. package/types/common/ast/ensure-array-statement.d.ts +3 -7
  112. package/types/common/ast/ensure-comments.d.ts +1 -5
  113. package/types/common/ast/ensure-imports.d.ts +5 -10
  114. package/types/common/ast/exported-statements.d.ts +4 -8
  115. package/types/common/ast/imported-statements.d.ts +1 -5
  116. package/types/common/ast/normalize-statements.d.ts +3 -12
  117. package/types/common/ast/remove-unused-imports.d.ts +1 -4
  118. package/types/common/ast/transform.d.ts +3 -13
  119. package/types/common/ast/utils.d.ts +19 -42
  120. package/types/common/builder/builder-api.d.ts +23 -32
  121. package/types/common/builder/builder-sdks.d.ts +8 -10
  122. package/types/common/builder/content-generation.d.ts +7 -10
  123. package/types/common/builder/content-ids.d.ts +1 -2
  124. package/types/common/cache.d.ts +1 -4
  125. package/types/common/constants.d.ts +1 -2
  126. package/types/common/dotenv.d.ts +5 -24
  127. package/types/common/errors.d.ts +22 -50
  128. package/types/common/fs.d.ts +4 -17
  129. package/types/common/interactive-select-files.d.ts +2 -16
  130. package/types/common/mem-sys.d.ts +5 -7
  131. package/types/common/node-request.d.ts +4 -4
  132. package/types/common/path.d.ts +3 -1
  133. package/types/common/test-utils.d.ts +7 -21
  134. package/types/common/typescript.d.ts +7 -26
  135. package/types/common/utils.d.ts +8 -36
  136. package/types/core/adapters/angular/angular-api-key.d.ts +6 -29
  137. package/types/core/adapters/angular/angular-app-module-imports.d.ts +2 -12
  138. package/types/core/adapters/angular/angular-app-routes-update.d.ts +1 -6
  139. package/types/core/adapters/angular/angular-components.d.ts +12 -40
  140. package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +3 -9
  141. package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +4 -16
  142. package/types/core/adapters/angular/angular-fix-tsconfig.d.ts +1 -3
  143. package/types/core/adapters/angular/angular-registry-parse.d.ts +10 -22
  144. package/types/core/adapters/angular/angular-registry.d.ts +2 -15
  145. package/types/core/adapters/angular/angular-test-utils.d.ts +4 -8
  146. package/types/core/adapters/angular/index.d.ts +12 -20
  147. package/types/core/adapters/angular/types.d.ts +5 -5
  148. package/types/core/adapters/next/index.d.ts +18 -26
  149. package/types/core/adapters/next/next-api-key.d.ts +1 -4
  150. package/types/core/adapters/next/next-component-info.d.ts +2 -9
  151. package/types/core/adapters/next/next-components.d.ts +1 -4
  152. package/types/core/adapters/next/next-ensure-builder-setup.d.ts +2 -6
  153. package/types/core/adapters/next/next-ensure-config-plugin.d.ts +1 -5
  154. package/types/core/adapters/next/next-registry-parse.d.ts +8 -21
  155. package/types/core/adapters/next/next-registry.d.ts +2 -15
  156. package/types/core/adapters/next/next-test-utils.d.ts +11 -21
  157. package/types/core/adapters/qwik-city/index.d.ts +6 -14
  158. package/types/core/adapters/qwik-city/qwik-api-key.d.ts +1 -4
  159. package/types/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +1 -4
  160. package/types/core/adapters/qwik-city/qwik-components.d.ts +8 -23
  161. package/types/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +2 -6
  162. package/types/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +1 -5
  163. package/types/core/adapters/qwik-city/qwik-registry-parse.d.ts +10 -22
  164. package/types/core/adapters/qwik-city/qwik-registry.d.ts +2 -15
  165. package/types/core/adapters/qwik-city/qwik-test-utils.d.ts +4 -8
  166. package/types/core/adapters/qwik-city/qwik-ts-program.d.ts +1 -3
  167. package/types/core/adapters/react/index.d.ts +11 -19
  168. package/types/core/adapters/react/react-api-key.d.ts +1 -4
  169. package/types/core/adapters/react/react-builder-sdk-setup.d.ts +1 -3
  170. package/types/core/adapters/react/react-component-info.d.ts +2 -9
  171. package/types/core/adapters/react/react-components.d.ts +11 -37
  172. package/types/core/adapters/react/react-ensure-builder-setup.d.ts +2 -6
  173. package/types/core/adapters/react/react-registry-parse.d.ts +8 -21
  174. package/types/core/adapters/react/react-registry.d.ts +2 -15
  175. package/types/core/adapters/react/react-test-utils.d.ts +5 -11
  176. package/types/core/adapters/react/react-ts-program.d.ts +1 -3
  177. package/types/core/adapters/remix/index.d.ts +11 -19
  178. package/types/core/adapters/remix/remix-api-key.d.ts +1 -4
  179. package/types/core/adapters/remix/remix-components.d.ts +1 -4
  180. package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +3 -9
  181. package/types/core/adapters/remix/remix-ensure-config-plugin.d.ts +1 -5
  182. package/types/core/adapters/remix/remix-registry-parse.d.ts +10 -22
  183. package/types/core/adapters/remix/remix-registry.d.ts +2 -15
  184. package/types/core/adapters/remix/remix-test-utils.d.ts +5 -11
  185. package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +2 -12
  186. package/types/core/adapters/vue/index.d.ts +12 -20
  187. package/types/core/adapters/vue/vue-api-key.d.ts +1 -4
  188. package/types/core/adapters/vue/vue-components.d.ts +2 -10
  189. package/types/core/adapters/vue/vue-ensure-builder-setup.d.ts +3 -7
  190. package/types/core/adapters/vue/vue-registry-parse.d.ts +9 -19
  191. package/types/core/adapters/vue/vue-registry.d.ts +3 -6
  192. package/types/core/adapters/webpack/webpack-config-helpers.d.ts +3 -8
  193. package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +1 -5
  194. package/types/core/create-dev-tools.d.ts +1 -4
  195. package/types/core/detect-frameworks.d.ts +2 -7
  196. package/types/core/ensure-config-plugin.d.ts +2 -6
  197. package/types/core/find-dependencies.d.ts +3 -6
  198. package/types/core/import-export-registry.d.ts +2 -9
  199. package/types/core/index.d.ts +3 -18
  200. package/types/figma/index.d.ts +64 -95
  201. package/types/node/node-sys.d.ts +6 -13
  202. package/types/remix/index.d.ts +3 -5
  203. package/types/server/auth.d.ts +1 -4
  204. package/types/server/builder-connect.d.ts +6 -21
  205. package/types/server/client-script.d.ts +2 -6
  206. package/types/server/create-dev-tools-server.d.ts +1 -3
  207. package/types/server/dev-tools-api.d.ts +1 -4
  208. package/types/server/dev-tools-http-server.d.ts +1 -3
  209. package/types/server/index.d.ts +1 -28
  210. package/types/server/request-handler.d.ts +1 -6
  211. package/types/tsconfig.tsbuildinfo +1 -1
  212. package/types/types/codegen-server.d.ts +1 -1
  213. package/types/types/connection-tracker.d.ts +34 -34
  214. package/types/types/proxy-middleware.d.ts +15 -25
  215. package/types/types/websocket-types.d.ts +7 -9
  216. package/types/types.d.ts +358 -387
  217. package/types/vite/main.d.ts +1 -1
  218. package/types/webpack/main.d.ts +5 -5
@@ -0,0 +1,19 @@
1
+ /**
2
+ * MCP Connection Debugging Command
3
+ *
4
+ * This command helps debug MCP (Model Context Protocol) server connection issues.
5
+ * It mimics exactly how the dev-tools CLI connects to MCP servers, making it useful
6
+ * for diagnosing problems like "invalid session ID" errors.
7
+ *
8
+ * Usage:
9
+ * npx builder.io debug-mcp [--server <name>] [--verbose]
10
+ */
11
+ import type { DevToolsSys } from "../core";
12
+ import type { CLIArgs } from "./index";
13
+ export interface DebugMcpArgs extends CLIArgs {
14
+ /** Test only a specific server by name */
15
+ server?: string;
16
+ /** Show verbose/detailed output */
17
+ verbose?: boolean;
18
+ }
19
+ export declare function runDebugMcpCommand(sys: DevToolsSys, args: DebugMcpArgs): Promise<void>;
@@ -10,7 +10,4 @@ import type { GuessedSettings } from "$/ai-utils";
10
10
  * 4. package.json has a "dev" script
11
11
  * 5. The dev script includes "next dev"
12
12
  */
13
- export declare function detectNextJsSettings(
14
- basePath: string,
15
- files: string[],
16
- ): Promise<GuessedSettings | null>;
13
+ export declare function detectNextJsSettings(basePath: string, files: string[]): Promise<GuessedSettings | null>;
@@ -12,7 +12,4 @@ import type { GuessedSettings } from "$/ai-utils";
12
12
  * 6. Svelte is listed as a dependency
13
13
  * 7. Either @sveltejs/kit or @sveltejs/vite-plugin-svelte is a dependency
14
14
  */
15
- export declare function detectSvelteSettings(
16
- basePath: string,
17
- files: string[],
18
- ): Promise<GuessedSettings | null>;
15
+ export declare function detectSvelteSettings(basePath: string, files: string[]): Promise<GuessedSettings | null>;
@@ -14,7 +14,4 @@ import type { GuessedSettings } from "$/ai-utils";
14
14
  * Note: This detector focuses on standard Vue projects (Vue 3 + Vite or Vue 2 + CLI).
15
15
  * Nuxt projects are handled separately as a different framework.
16
16
  */
17
- export declare function detectVueSettings(
18
- basePath: string,
19
- files: string[],
20
- ): Promise<GuessedSettings | null>;
17
+ export declare function detectVueSettings(basePath: string, files: string[]): Promise<GuessedSettings | null>;
@@ -2,14 +2,9 @@ import type { CLIArgs } from "./index";
2
2
  import type { DevToolsSys } from "../types";
3
3
  import type { FigmaBuilderLink } from "$/ai-utils";
4
4
  interface KVGetRequest {
5
- privateKey: string;
6
- spaceId: string;
5
+ privateKey: string;
6
+ spaceId: string;
7
7
  }
8
- export declare const runFigmaMigrate: (
9
- sys: DevToolsSys,
10
- args: CLIArgs,
11
- ) => Promise<undefined>;
12
- export declare function getBuilderSpaceFigmaLinks(
13
- kvReq: KVGetRequest,
14
- ): Promise<FigmaBuilderLink[]>;
8
+ export declare const runFigmaMigrate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
9
+ export declare function getBuilderSpaceFigmaLinks(kvReq: KVGetRequest): Promise<FigmaBuilderLink[]>;
15
10
  export {};
@@ -1,6 +1,3 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from "./index";
3
- export declare function runDsiMcpServer(
4
- sys: DevToolsSys,
5
- args: CLIArgs,
6
- ): Promise<void>;
3
+ export declare function runDsiMcpServer(sys: DevToolsSys, args: CLIArgs): Promise<void>;
@@ -1,9 +1,6 @@
1
1
  import { type RequestInit } from "undici";
2
2
  import { NetworkError } from "../common/errors";
3
- export declare const safeFetch: (
4
- input: string | URL,
5
- init?: RequestInit,
6
- ) => ReturnType<typeof globalThis.fetch>;
3
+ export declare const safeFetch: (input: string | URL, init?: RequestInit) => ReturnType<typeof globalThis.fetch>;
7
4
  /**
8
5
  * Checks the health of the Builder.io API by attempting to fetch the health endpoint.
9
6
  * Retries up to 3 times with a delay between attempts.
@@ -11,6 +8,4 @@ export declare const safeFetch: (
11
8
  * @returns undefined if all attempts fail
12
9
  * @throws NetworkError if all retry attempts fail
13
10
  */
14
- export declare function checkBuilderHealth(
15
- delayMs?: number,
16
- ): Promise<NetworkError | undefined>;
11
+ export declare function checkBuilderHealth(delayMs?: number): Promise<NetworkError | undefined>;
@@ -2,40 +2,23 @@ import ts from "typescript";
2
2
  import type { DevTools, DevToolsSys } from "../types";
3
3
  import type { CLIArgs } from "./index";
4
4
  import type { FigmaBuilderLink, FigmaMapperFile } from "$/ai-utils";
5
- export declare const runFigmaPublish: (
6
- sys: DevToolsSys,
7
- args: CLIArgs,
8
- ) => Promise<undefined>;
5
+ export declare const runFigmaPublish: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
9
6
  export declare const FIGMA_CONNECT_CALL = "figmaMapping";
10
- export declare function findAllMappingFiles(
11
- sys: DevToolsSys,
12
- ): Promise<string[]>;
13
- export declare function setPublicKey(
14
- sys: DevToolsSys,
15
- publicKey: string,
16
- devTools: DevTools | undefined,
17
- ensureFigmaImportPage?: boolean,
18
- ): Promise<
19
- | {
20
- success: boolean;
21
- error: string;
22
- }
23
- | {
24
- success: boolean;
25
- error?: undefined;
26
- }
27
- >;
28
- export declare function findMappingsFromFiles({
29
- sys,
30
- mappingFiles,
31
- typeCheck,
32
- }: {
33
- mappingFiles: string[];
34
- sys: DevToolsSys;
35
- typeCheck?: boolean;
7
+ export declare function findAllMappingFiles(sys: DevToolsSys): Promise<string[]>;
8
+ export declare function setPublicKey(sys: DevToolsSys, publicKey: string, devTools: DevTools | undefined, ensureFigmaImportPage?: boolean): Promise<{
9
+ success: boolean;
10
+ error: string;
11
+ } | {
12
+ success: boolean;
13
+ error?: undefined;
14
+ }>;
15
+ export declare function findMappingsFromFiles({ sys, mappingFiles, typeCheck, }: {
16
+ mappingFiles: string[];
17
+ sys: DevToolsSys;
18
+ typeCheck?: boolean;
36
19
  }): Promise<{
37
- mapperFiles: FigmaMapperFile[];
38
- figmaBuilderLinks: FigmaBuilderLink[];
39
- diagnostics: ts.Diagnostic[];
40
- figmaLinksToResolve: string[];
20
+ mapperFiles: FigmaMapperFile[];
21
+ figmaBuilderLinks: FigmaBuilderLink[];
22
+ diagnostics: ts.Diagnostic[];
23
+ figmaLinksToResolve: string[];
41
24
  }>;
@@ -3,59 +3,29 @@ import type { DevToolsSys } from "../types";
3
3
  import type { CLIArgs } from "./index";
4
4
  import type { FigmaBuilderLink, FigmaComponentInfo } from "$/ai-utils";
5
5
  interface FigmaAPIOpts {
6
- auth: {
7
- access_token: string;
8
- oauth: boolean;
9
- };
10
- params?: Record<string, any>;
6
+ auth: {
7
+ access_token: string;
8
+ oauth: boolean;
9
+ };
10
+ params?: Record<string, any>;
11
11
  }
12
12
  export declare const parseFigmaURL: (str: string) => {
13
- fileID: string;
14
- nodeId: string;
13
+ fileID: string;
14
+ nodeId: string;
15
15
  } | null;
16
- export declare const figmaApi: <T = any>(
17
- sys: DevToolsSys,
18
- args: CLIArgs,
19
- path: string,
20
- { auth, params }: FigmaAPIOpts,
21
- ) => Promise<T>;
22
- export declare const getFigmaNodeData: (
23
- sys: DevToolsSys,
24
- args: CLIArgs,
25
- auth: {
26
- access_token: string;
27
- oauth: boolean;
28
- },
29
- fileId: string,
30
- nodeIds: string,
31
- depth?: number,
32
- ) => Promise<any>;
33
- export declare function getImportDataFromToken(
34
- credentials: Credentials,
35
- token: string,
36
- verbose: boolean,
37
- ): Promise<(readonly [string, FigmaComponentInfo])[]>;
16
+ export declare const figmaApi: <T = any>(sys: DevToolsSys, args: CLIArgs, path: string, { auth, params }: FigmaAPIOpts) => Promise<T>;
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])[]>;
38
22
  export declare function needsFigmaAuth(urls: string[]): boolean;
39
- export declare function getFigmaNodeDataFromURLs(
40
- sys: DevToolsSys,
41
- args: CLIArgs,
42
- figmaAuth:
43
- | {
44
- access_token: string;
45
- oauth: boolean;
46
- }
47
- | undefined,
48
- builderAuth: {
49
- privateKey: string;
50
- spaceId: string;
51
- },
52
- urls: string[],
53
- ): Promise<(readonly [string, FigmaComponentInfo])[]>;
54
- export declare function inPlaceResolveFigmaURLs(
55
- sys: DevToolsSys,
56
- args: CLIArgs,
57
- figmaAuth: FigmaAuth,
58
- figmaBuilderLinks: FigmaBuilderLink[],
59
- figmaLinksToResolve: string[],
60
- ): Promise<void>;
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>;
61
31
  export {};
@@ -1,11 +1,4 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from ".";
3
- export declare const runFigmaCommand: (
4
- sys: DevToolsSys,
5
- subCommand: string,
6
- args: CLIArgs,
7
- ) => Promise<void>;
8
- export declare function askToInstallBuilder(
9
- sys: DevToolsSys,
10
- args: CLIArgs,
11
- ): Promise<void>;
3
+ export declare const runFigmaCommand: (sys: DevToolsSys, subCommand: string, args: CLIArgs) => Promise<void>;
4
+ export declare function askToInstallBuilder(sys: DevToolsSys, args: CLIArgs): Promise<void>;
@@ -1,19 +1,16 @@
1
1
  import type { ComponentInfo, ComponentRegistry, DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from "./index";
3
3
  import { type FigmaComponentInfo, type UserContext } from "$/ai-utils";
4
- export declare const runFigmaGenerate: (
5
- sys: DevToolsSys,
6
- args: CLIArgs,
7
- ) => Promise<undefined>;
4
+ export declare const runFigmaGenerate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
8
5
  export interface MappingCodeV3 {
9
- figmaNode?: FigmaComponentInfo;
10
- registry?: ComponentRegistry;
11
- userContext?: UserContext;
12
- figmaUrl?: string;
13
- docsUrl?: string;
14
- registeredCmp?: ComponentInfo;
15
- previousCompletion?: string;
16
- userPrompt?: string;
17
- token?: string;
18
- pragma?: string;
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;
19
16
  }
@@ -8,35 +8,23 @@ import * as ts from "typescript";
8
8
  * @returns An object containing the new builder program and collected diagnostics.
9
9
  */
10
10
  export interface CheckpointData {
11
- program: ts.EmitAndSemanticDiagnosticsBuilderProgram;
12
- diagnostics: ts.Diagnostic[];
11
+ program: ts.EmitAndSemanticDiagnosticsBuilderProgram;
12
+ diagnostics: ts.Diagnostic[];
13
13
  }
14
14
  export type Checkpoint = CheckpointData | null;
15
- export declare function runCheckpoint(
16
- projectDir: string,
17
- oldProgram?: ts.EmitAndSemanticDiagnosticsBuilderProgram,
18
- ): Checkpoint;
15
+ export declare function runCheckpoint(projectDir: string, oldProgram?: ts.EmitAndSemanticDiagnosticsBuilderProgram): Checkpoint;
19
16
  export declare function filterDiagnostic(c: ts.Diagnostic): boolean;
20
17
  /**
21
18
  * Given a new list of diagnostics and a baseline list, filter out diagnostics
22
19
  * that were already present in the baseline.
23
20
  */
24
- export declare function filterBaselineDiagnostics(
25
- baselineFingerprints: Set<string>,
26
- checkpoint: Checkpoint,
27
- ): ts.Diagnostic[];
28
- export declare function createFingerprintSet(
29
- checkpoint: Checkpoint,
30
- ): Set<string>;
21
+ export declare function filterBaselineDiagnostics(baselineFingerprints: Set<string>, checkpoint: Checkpoint): ts.Diagnostic[];
22
+ export declare function createFingerprintSet(checkpoint: Checkpoint): Set<string>;
31
23
  /**
32
24
  * Pretty prints diagnostics as a plain text string.
33
25
  *
34
26
  * @param diagnostics - An array of ts.Diagnostic objects.
35
27
  * @returns A formatted string that describes the diagnostics.
36
28
  */
37
- export declare function prettyPrintDiagnostics(
38
- diagnostics: ts.Diagnostic[],
39
- ): string;
40
- export declare function prettyPrintDiagnosticsWithContext(
41
- diagnostics: ts.Diagnostic[],
42
- ): string;
29
+ export declare function prettyPrintDiagnostics(diagnostics: ts.Diagnostic[]): string;
30
+ export declare function prettyPrintDiagnosticsWithContext(diagnostics: ts.Diagnostic[]): string;
@@ -1,157 +1,157 @@
1
1
  import type { DesignSystemScope } from "$/ai-utils";
2
2
  export interface CLIArgs {
3
- /** Figma access token */
4
- figmaToken?: string;
5
- /** GitHub access token */
6
- githubToken?: string;
7
- /** Run in CI mode without interactive prompts */
8
- ci?: boolean;
9
- /** Show help text */
10
- help?: boolean;
11
- /** Force operation even if there are warnings */
12
- force?: boolean;
13
- /** Print output as JSON */
14
- verbose?: boolean;
15
- /** Run in dry-run mode without making changes */
16
- dryrun?: boolean;
17
- /** Auto-confirm all prompts */
18
- yes?: boolean;
19
- /** Builder.io space ID */
20
- spaceId?: string;
21
- /** Component name to use */
22
- componentName?: string;
23
- /** Mapping directory to use */
24
- mappingOutput?: string;
25
- /** Skip package installation step */
26
- skipInstallation?: boolean;
27
- /** Skip detailed grouping in repo indexing */
28
- skipDetailedGrouping?: boolean;
29
- /** Skip display of header in repo indexing */
30
- skipHeader?: boolean;
31
- /** NPM package name to index */
32
- designSystemPackage?: string;
33
- /**
34
- * A user-friendly design system name to index.
35
- *
36
- * This can be used in conjunction with designSystemPackage to index components
37
- * where the design system name is different than the npm package name.
38
- * Example: --designSystemPackage=@adobe/react-spectrum --designSystemName="Adobe React Spectrum"
39
- *
40
- * This flag can also be used with addDirectory to specify a name for design systems
41
- * that are not npm packages.
42
- * Example: --addDirectory "path/to/swift/ui/components" --designSystemName="Native UI"
43
- **/
44
- designSystemName?: string;
45
- /**
46
- * Comma separated string of directories to look in for repo indexing.
47
- * Use this when component implementations live in a different place
48
- * than the workspace package you are indexing.
49
- * Example: --includeDirectories "packages/foo, packages/bar"
50
- *
51
- * @deprecated Use addDirectory instead
52
- **/
53
- includeDirectories?: string;
54
- /**
55
- * Additional directories to look in for repo indexing.
56
- * Use this when component implementations live in a different place
57
- * than the workspace package you are indexing.
58
- *
59
- * @alias add
60
- * Example: --addDirectory "../docs" --addDirectory "../../bar"
61
- */
62
- addDirectory?: string | string[];
63
- /**
64
- * Path to the custom docs folder to upload.
65
- * Example: --uploadCustomDocs ./docs/manual
66
- */
67
- uploadCustomDocs?: string;
68
- /** The scope of the design system to index */
69
- scope?: DesignSystemScope;
70
- /** Token to use for figma */
71
- token?: string;
72
- /** Url to start from */
73
- url?: string;
74
- /** Node ID from Figma URL */
75
- nodeId?: string;
76
- /** Prompt text for non-interactive mode */
77
- prompt?: string;
78
- /** Generation mode */
79
- mode?: "quality" | "quality-v3";
80
- /** Working directory to run commands from */
81
- cwd?: string;
82
- /** Debug mode */
83
- debug?: boolean;
84
- /** Raw command line arguments */
85
- _: string[];
86
- /** Builder private key, used for authentication. */
87
- builderPrivateKey?: string;
88
- /** Builder public key, used for authentication. */
89
- builderPublicKey?: string;
90
- /** Builder user ID, used for authentication. */
91
- builderUserId?: string;
92
- /** Path to workspace configuration file */
93
- workspace?: string;
94
- /** Output structured JSON data instead of human-readable logs */
95
- jsonOutput?: boolean;
96
- /** Remove all mappings from the space, publishing zero mappings even if mapper files exist */
97
- clearMappings?: boolean;
98
- /** Enabled tools, list of strings separated by commas */
99
- enabledTools?: string;
100
- /** Disabled tools, list of strings separated by commas */
101
- disabledTools?: string;
102
- /** If true run brief indexing before running code generation */
103
- index?: boolean;
104
- /** If true list indexed repositories */
105
- listIndexedRepos?: boolean;
106
- /** Disable MCP support */
107
- disableMcp?: boolean;
108
- /** Clear all stored credentials (logout) */
109
- reset?: boolean;
110
- /** Comma-separated list of component names to reindex */
111
- components?: string;
112
- nativeApp?: boolean;
113
- /** Install command to run for connect-repo (e.g., npm install) */
114
- installCommand?: string;
115
- /** Use development server instead of production for launch command */
116
- dev?: boolean;
117
- /** Use native builder:// protocol instead of https:// */
118
- app?: boolean;
119
- /** Skip browser auto-open (flag form) */
120
- open?: boolean;
121
- /**
122
- * Glob pattern(s) to include for repo indexing access control.
123
- * When specified, only these patterns will be accessible by default.
124
- * Can be a single string or array of strings (when flag is repeated).
125
- * Example: --include "src/components/*.tsx" --include "src/lib/*.ts"
126
- */
127
- include?: string | string[];
128
- /**
129
- * Glob pattern(s) to exclude for repo indexing access control.
130
- * These patterns will be denied access even if included.
131
- * Can be a single string or array of strings (when flag is repeated).
132
- * Example: --exclude "*.test.ts" --exclude "__tests__/**"
133
- */
134
- exclude?: string | string[];
135
- /**
136
- * Extra instructions to be taken into account during repo indexing.
137
- * Example: --instructions "Do not index mapper files."
138
- */
139
- instructions?: string;
140
- /**
141
- * Accept self-signed SSL certificates.
142
- * Useful for development environments where SSL certificates are not trusted.
143
- * Example: --acceptSelfSigned
144
- */
145
- acceptSelfSigned?: boolean;
146
- /**
147
- * Create a fusion example project after design system indexing completes.
148
- * The project will be created with the design system pre-attached and a background
149
- * agent will be spawned to install the design system using installation.md.
150
- */
151
- createFusionExample?: boolean;
152
- /**
153
- * Test creating a fusion example project without running indexing.
154
- * Requires designSystemName to be provided or will prompt for it.
155
- */
156
- testFusionExample?: boolean;
3
+ /** Figma access token */
4
+ figmaToken?: string;
5
+ /** GitHub access token */
6
+ githubToken?: string;
7
+ /** Run in CI mode without interactive prompts */
8
+ ci?: boolean;
9
+ /** Show help text */
10
+ help?: boolean;
11
+ /** Force operation even if there are warnings */
12
+ force?: boolean;
13
+ /** Print output as JSON */
14
+ verbose?: boolean;
15
+ /** Run in dry-run mode without making changes */
16
+ dryrun?: boolean;
17
+ /** Auto-confirm all prompts */
18
+ yes?: boolean;
19
+ /** Builder.io space ID */
20
+ spaceId?: string;
21
+ /** Component name to use */
22
+ componentName?: string;
23
+ /** Mapping directory to use */
24
+ mappingOutput?: string;
25
+ /** Skip package installation step */
26
+ skipInstallation?: boolean;
27
+ /** Skip detailed grouping in repo indexing */
28
+ skipDetailedGrouping?: boolean;
29
+ /** Skip display of header in repo indexing */
30
+ skipHeader?: boolean;
31
+ /** NPM package name to index */
32
+ designSystemPackage?: string;
33
+ /**
34
+ * A user-friendly design system name to index.
35
+ *
36
+ * This can be used in conjunction with designSystemPackage to index components
37
+ * where the design system name is different than the npm package name.
38
+ * Example: --designSystemPackage=@adobe/react-spectrum --designSystemName="Adobe React Spectrum"
39
+ *
40
+ * This flag can also be used with addDirectory to specify a name for design systems
41
+ * that are not npm packages.
42
+ * Example: --addDirectory "path/to/swift/ui/components" --designSystemName="Native UI"
43
+ **/
44
+ designSystemName?: string;
45
+ /**
46
+ * Comma separated string of directories to look in for repo indexing.
47
+ * Use this when component implementations live in a different place
48
+ * than the workspace package you are indexing.
49
+ * Example: --includeDirectories "packages/foo, packages/bar"
50
+ *
51
+ * @deprecated Use addDirectory instead
52
+ **/
53
+ includeDirectories?: string;
54
+ /**
55
+ * Additional directories to look in for repo indexing.
56
+ * Use this when component implementations live in a different place
57
+ * than the workspace package you are indexing.
58
+ *
59
+ * @alias add
60
+ * Example: --addDirectory "../docs" --addDirectory "../../bar"
61
+ */
62
+ addDirectory?: string | string[];
63
+ /**
64
+ * Path to the custom docs folder to upload.
65
+ * Example: --uploadCustomDocs ./docs/manual
66
+ */
67
+ uploadCustomDocs?: string;
68
+ /** The scope of the design system to index */
69
+ scope?: DesignSystemScope;
70
+ /** Token to use for figma */
71
+ token?: string;
72
+ /** Url to start from */
73
+ url?: string;
74
+ /** Node ID from Figma URL */
75
+ nodeId?: string;
76
+ /** Prompt text for non-interactive mode */
77
+ prompt?: string;
78
+ /** Generation mode */
79
+ mode?: "quality" | "quality-v3";
80
+ /** Working directory to run commands from */
81
+ cwd?: string;
82
+ /** Debug mode */
83
+ debug?: boolean;
84
+ /** Raw command line arguments */
85
+ _: string[];
86
+ /** Builder private key, used for authentication. */
87
+ builderPrivateKey?: string;
88
+ /** Builder public key, used for authentication. */
89
+ builderPublicKey?: string;
90
+ /** Builder user ID, used for authentication. */
91
+ builderUserId?: string;
92
+ /** Path to workspace configuration file */
93
+ workspace?: string;
94
+ /** Output structured JSON data instead of human-readable logs */
95
+ jsonOutput?: boolean;
96
+ /** Remove all mappings from the space, publishing zero mappings even if mapper files exist */
97
+ clearMappings?: boolean;
98
+ /** Enabled tools, list of strings separated by commas */
99
+ enabledTools?: string;
100
+ /** Disabled tools, list of strings separated by commas */
101
+ disabledTools?: string;
102
+ /** If true run brief indexing before running code generation */
103
+ index?: boolean;
104
+ /** If true list indexed repositories */
105
+ listIndexedRepos?: boolean;
106
+ /** Disable MCP support */
107
+ disableMcp?: boolean;
108
+ /** Clear all stored credentials (logout) */
109
+ reset?: boolean;
110
+ /** Comma-separated list of component names to reindex */
111
+ components?: string;
112
+ nativeApp?: boolean;
113
+ /** Install command to run for connect-repo (e.g., npm install) */
114
+ installCommand?: string;
115
+ /** Use development server instead of production for launch command */
116
+ dev?: boolean;
117
+ /** Use native builder:// protocol instead of https:// */
118
+ app?: boolean;
119
+ /** Skip browser auto-open (flag form) */
120
+ open?: boolean;
121
+ /**
122
+ * Glob pattern(s) to include for repo indexing access control.
123
+ * When specified, only these patterns will be accessible by default.
124
+ * Can be a single string or array of strings (when flag is repeated).
125
+ * Example: --include "src/components/*.tsx" --include "src/lib/*.ts"
126
+ */
127
+ include?: string | string[];
128
+ /**
129
+ * Glob pattern(s) to exclude for repo indexing access control.
130
+ * These patterns will be denied access even if included.
131
+ * Can be a single string or array of strings (when flag is repeated).
132
+ * Example: --exclude "*.test.ts" --exclude "__tests__/**"
133
+ */
134
+ exclude?: string | string[];
135
+ /**
136
+ * Extra instructions to be taken into account during repo indexing.
137
+ * Example: --instructions "Do not index mapper files."
138
+ */
139
+ instructions?: string;
140
+ /**
141
+ * Accept self-signed SSL certificates.
142
+ * Useful for development environments where SSL certificates are not trusted.
143
+ * Example: --acceptSelfSigned
144
+ */
145
+ acceptSelfSigned?: boolean;
146
+ /**
147
+ * Create a fusion example project after design system indexing completes.
148
+ * The project will be created with the design system pre-attached and a background
149
+ * agent will be spawned to install the design system using installation.md.
150
+ */
151
+ createFusionExample?: boolean;
152
+ /**
153
+ * Test creating a fusion example project without running indexing.
154
+ * Requires designSystemName to be provided or will prompt for it.
155
+ */
156
+ testFusionExample?: boolean;
157
157
  }