@builder.io/dev-tools 1.24.0-dev.202602061409.e623db468 → 1.24.0-dev.202602061553.6bec740a7

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 (214) hide show
  1. package/cli/index.cjs +18963 -532
  2. package/cli/index.cjs.map +4 -4
  3. package/core/index.cjs +1 -1
  4. package/core/index.mjs +1 -1
  5. package/node/index.cjs +1 -1
  6. package/node/index.mjs +1 -1
  7. package/package.json +3 -1
  8. package/server/index.cjs +18997 -332
  9. package/server/index.mjs +18998 -331
  10. package/types/_tests_/utils.d.ts +35 -48
  11. package/types/cli/abort-signal-any.d.ts +1 -3
  12. package/types/cli/auth/auth-utils.d.ts +1 -3
  13. package/types/cli/auth/auth.d.ts +1 -5
  14. package/types/cli/backup.d.ts +60 -114
  15. package/types/cli/builder-add/interface.d.ts +4 -21
  16. package/types/cli/code-file-utils.d.ts +8 -11
  17. package/types/cli/code.d.ts +3 -13
  18. package/types/cli/codegen.d.ts +0 -8
  19. package/types/cli/credentials.d.ts +45 -61
  20. package/types/cli/detectors/nextjs.d.ts +1 -4
  21. package/types/cli/detectors/svelte.d.ts +1 -4
  22. package/types/cli/detectors/vue.d.ts +1 -4
  23. package/types/cli/download.d.ts +4 -9
  24. package/types/cli/dsi-mcp.d.ts +1 -4
  25. package/types/cli/fetch.d.ts +21 -8
  26. package/types/cli/fetch.test.d.ts +1 -0
  27. package/types/cli/figma-publish.d.ts +17 -34
  28. package/types/cli/figma-utils.d.ts +21 -51
  29. package/types/cli/figma.d.ts +2 -9
  30. package/types/cli/generate.d.ts +11 -14
  31. package/types/cli/incremental-tsc.d.ts +7 -19
  32. package/types/cli/index.d.ts +154 -154
  33. package/types/cli/indexing.d.ts +5 -0
  34. package/types/cli/launch/InitStateMachine.d.ts +89 -156
  35. package/types/cli/launch/config.d.ts +3 -13
  36. package/types/cli/launch/dry-run-backup.d.ts +7 -14
  37. package/types/cli/launch/errors.d.ts +2 -7
  38. package/types/cli/launch/github.d.ts +3 -0
  39. package/types/cli/launch/grafana.d.ts +1 -5
  40. package/types/cli/launch/helpers.d.ts +10 -19
  41. package/types/cli/launch/machine-health.d.ts +3 -8
  42. package/types/cli/launch/proxy.d.ts +4 -11
  43. package/types/cli/launch/server.d.ts +12 -19
  44. package/types/cli/launch/vscode-tunnel-manager.d.ts +68 -77
  45. package/types/cli/launch.d.ts +106 -109
  46. package/types/cli/prettier.d.ts +2 -9
  47. package/types/cli/repo-connect/env-collector.d.ts +11 -16
  48. package/types/cli/repo-connect/file-collector.d.ts +15 -22
  49. package/types/cli/repo-connect/git-detector.d.ts +11 -13
  50. package/types/cli/repo-connect/install-runner.d.ts +5 -8
  51. package/types/cli/repo-connect/package-detector.d.ts +8 -12
  52. package/types/cli/repo-connect/repo-connect.d.ts +1 -4
  53. package/types/cli/repo-indexing/component-discovery.d.ts +17 -30
  54. package/types/cli/repo-indexing/icons.d.ts +24 -36
  55. package/types/cli/repo-indexing/installation.d.ts +14 -22
  56. package/types/cli/repo-indexing/repo-indexing-utils.d.ts +79 -138
  57. package/types/cli/repo-indexing/repo-indexing.d.ts +17 -37
  58. package/types/cli/repo-indexing/repo-indexing.mock.d.ts +3 -3
  59. package/types/cli/repo-indexing/tokens.d.ts +25 -44
  60. package/types/cli/repo-indexing/types.d.ts +0 -2
  61. package/types/cli/repo-indexing.d.ts +17 -0
  62. package/types/cli/repo-indexing.mock.d.ts +5 -0
  63. package/types/cli/repo-metrics-utils.d.ts +5 -13
  64. package/types/cli/repo-metrics.d.ts +1 -4
  65. package/types/cli/report/figma-report.d.ts +36 -63
  66. package/types/cli/server-ws.d.ts +32 -40
  67. package/types/cli/spinner.d.ts +4 -4
  68. package/types/cli/track.d.ts +1 -4
  69. package/types/cli/utils/agent-discovery.d.ts +5 -10
  70. package/types/cli/utils/codegen-utils.d.ts +0 -9
  71. package/types/cli/utils/component-group-mdx-prompt.d.ts +1 -2
  72. package/types/cli/utils/dev-server-url-parser.d.ts +12 -0
  73. package/types/cli/utils/dev-server-url-parser.test.d.ts +1 -0
  74. package/types/cli/utils/discovery-test-utils.d.ts +1 -3
  75. package/types/cli/utils/env-capture.d.ts +15 -21
  76. package/types/cli/utils/env-substitution.d.ts +1 -4
  77. package/types/cli/utils/feature-flags.d.ts +1 -3
  78. package/types/cli/utils/file-overrides-manager.d.ts +23 -39
  79. package/types/cli/utils/git.d.ts +16 -28
  80. package/types/cli/utils/hosts-file-manager.d.ts +4 -7
  81. package/types/cli/utils/lock-file.d.ts +7 -10
  82. package/types/cli/utils/parseGitDiff.d.ts +1 -4
  83. package/types/cli/utils/process-tracker.d.ts +51 -85
  84. package/types/cli/utils/repo-indexing-agent-prompt.d.ts +1 -1
  85. package/types/cli/utils/repo-indexing-group-prompts.d.ts +1 -0
  86. package/types/cli/utils/rules-discovery.d.ts +5 -10
  87. package/types/cli/utils/rules-parser.d.ts +1 -5
  88. package/types/cli/utils/terminal-buffer.d.ts +23 -23
  89. package/types/cli/utils/workspace-path-resolver.d.ts +16 -23
  90. package/types/cli/utils/yaml-frontmatter.d.ts +6 -10
  91. package/types/client/client-api.d.ts +10 -42
  92. package/types/client/edit-button/document-listeners.d.ts +1 -3
  93. package/types/client/edit-button/index.d.ts +6 -6
  94. package/types/client/menu/index.d.ts +3 -3
  95. package/types/client/menu/pages/component-detail.d.ts +2 -8
  96. package/types/client/menu/pages/component-input.d.ts +1 -5
  97. package/types/client/menu/pages/component-list.d.ts +1 -4
  98. package/types/client/menu/toggle/menu-toggle.d.ts +1 -4
  99. package/types/client/setup-ui/overview.d.ts +2 -2
  100. package/types/client/tracking.d.ts +11 -11
  101. package/types/client/utils.d.ts +3 -5
  102. package/types/common/ast/app-dependencies.d.ts +2 -8
  103. package/types/common/ast/component-info.d.ts +6 -26
  104. package/types/common/ast/component-input-types.d.ts +9 -28
  105. package/types/common/ast/component-registry.d.ts +8 -23
  106. package/types/common/ast/convert-values.d.ts +8 -40
  107. package/types/common/ast/ensure-array-statement.d.ts +3 -7
  108. package/types/common/ast/ensure-comments.d.ts +1 -5
  109. package/types/common/ast/ensure-imports.d.ts +5 -10
  110. package/types/common/ast/exported-statements.d.ts +4 -8
  111. package/types/common/ast/imported-statements.d.ts +1 -5
  112. package/types/common/ast/normalize-statements.d.ts +3 -12
  113. package/types/common/ast/remove-unused-imports.d.ts +1 -4
  114. package/types/common/ast/transform.d.ts +3 -13
  115. package/types/common/ast/utils.d.ts +19 -42
  116. package/types/common/builder/builder-api.d.ts +23 -32
  117. package/types/common/builder/builder-sdks.d.ts +8 -10
  118. package/types/common/builder/content-generation.d.ts +7 -10
  119. package/types/common/builder/content-ids.d.ts +1 -2
  120. package/types/common/cache.d.ts +1 -4
  121. package/types/common/constants.d.ts +1 -2
  122. package/types/common/dotenv.d.ts +5 -24
  123. package/types/common/errors.d.ts +22 -50
  124. package/types/common/fs.d.ts +4 -17
  125. package/types/common/interactive-select-files.d.ts +2 -16
  126. package/types/common/mem-sys.d.ts +5 -7
  127. package/types/common/node-request.d.ts +4 -4
  128. package/types/common/path.d.ts +3 -1
  129. package/types/common/test-utils.d.ts +7 -21
  130. package/types/common/typescript.d.ts +7 -26
  131. package/types/common/utils.d.ts +8 -36
  132. package/types/core/adapters/angular/angular-api-key.d.ts +6 -29
  133. package/types/core/adapters/angular/angular-app-module-imports.d.ts +2 -12
  134. package/types/core/adapters/angular/angular-app-routes-update.d.ts +1 -6
  135. package/types/core/adapters/angular/angular-components.d.ts +12 -40
  136. package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +3 -9
  137. package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +4 -16
  138. package/types/core/adapters/angular/angular-fix-tsconfig.d.ts +1 -3
  139. package/types/core/adapters/angular/angular-registry-parse.d.ts +10 -22
  140. package/types/core/adapters/angular/angular-registry.d.ts +2 -15
  141. package/types/core/adapters/angular/angular-test-utils.d.ts +4 -8
  142. package/types/core/adapters/angular/index.d.ts +12 -20
  143. package/types/core/adapters/angular/types.d.ts +5 -5
  144. package/types/core/adapters/next/index.d.ts +18 -26
  145. package/types/core/adapters/next/next-api-key.d.ts +1 -4
  146. package/types/core/adapters/next/next-component-info.d.ts +2 -9
  147. package/types/core/adapters/next/next-components.d.ts +1 -4
  148. package/types/core/adapters/next/next-ensure-builder-setup.d.ts +2 -6
  149. package/types/core/adapters/next/next-ensure-config-plugin.d.ts +1 -5
  150. package/types/core/adapters/next/next-registry-parse.d.ts +8 -21
  151. package/types/core/adapters/next/next-registry.d.ts +2 -15
  152. package/types/core/adapters/next/next-test-utils.d.ts +11 -21
  153. package/types/core/adapters/qwik-city/index.d.ts +6 -14
  154. package/types/core/adapters/qwik-city/qwik-api-key.d.ts +1 -4
  155. package/types/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +1 -4
  156. package/types/core/adapters/qwik-city/qwik-components.d.ts +8 -23
  157. package/types/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +2 -6
  158. package/types/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +1 -5
  159. package/types/core/adapters/qwik-city/qwik-registry-parse.d.ts +10 -22
  160. package/types/core/adapters/qwik-city/qwik-registry.d.ts +2 -15
  161. package/types/core/adapters/qwik-city/qwik-test-utils.d.ts +4 -8
  162. package/types/core/adapters/qwik-city/qwik-ts-program.d.ts +1 -3
  163. package/types/core/adapters/react/index.d.ts +11 -19
  164. package/types/core/adapters/react/react-api-key.d.ts +1 -4
  165. package/types/core/adapters/react/react-builder-sdk-setup.d.ts +1 -3
  166. package/types/core/adapters/react/react-component-info.d.ts +2 -9
  167. package/types/core/adapters/react/react-components.d.ts +11 -37
  168. package/types/core/adapters/react/react-ensure-builder-setup.d.ts +2 -6
  169. package/types/core/adapters/react/react-registry-parse.d.ts +8 -21
  170. package/types/core/adapters/react/react-registry.d.ts +2 -15
  171. package/types/core/adapters/react/react-test-utils.d.ts +5 -11
  172. package/types/core/adapters/react/react-ts-program.d.ts +1 -3
  173. package/types/core/adapters/remix/index.d.ts +11 -19
  174. package/types/core/adapters/remix/remix-api-key.d.ts +1 -4
  175. package/types/core/adapters/remix/remix-components.d.ts +1 -4
  176. package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +3 -9
  177. package/types/core/adapters/remix/remix-ensure-config-plugin.d.ts +1 -5
  178. package/types/core/adapters/remix/remix-registry-parse.d.ts +10 -22
  179. package/types/core/adapters/remix/remix-registry.d.ts +2 -15
  180. package/types/core/adapters/remix/remix-test-utils.d.ts +5 -11
  181. package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +2 -12
  182. package/types/core/adapters/vue/index.d.ts +12 -20
  183. package/types/core/adapters/vue/vue-api-key.d.ts +1 -4
  184. package/types/core/adapters/vue/vue-components.d.ts +2 -10
  185. package/types/core/adapters/vue/vue-ensure-builder-setup.d.ts +3 -7
  186. package/types/core/adapters/vue/vue-registry-parse.d.ts +9 -19
  187. package/types/core/adapters/vue/vue-registry.d.ts +3 -6
  188. package/types/core/adapters/webpack/webpack-config-helpers.d.ts +3 -8
  189. package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +1 -5
  190. package/types/core/create-dev-tools.d.ts +1 -4
  191. package/types/core/detect-frameworks.d.ts +2 -7
  192. package/types/core/ensure-config-plugin.d.ts +2 -6
  193. package/types/core/find-dependencies.d.ts +3 -6
  194. package/types/core/import-export-registry.d.ts +2 -9
  195. package/types/core/index.d.ts +3 -18
  196. package/types/figma/index.d.ts +64 -95
  197. package/types/node/node-sys.d.ts +6 -13
  198. package/types/remix/index.d.ts +3 -5
  199. package/types/server/auth.d.ts +1 -4
  200. package/types/server/builder-connect.d.ts +6 -21
  201. package/types/server/client-script.d.ts +2 -6
  202. package/types/server/create-dev-tools-server.d.ts +1 -3
  203. package/types/server/dev-tools-api.d.ts +1 -4
  204. package/types/server/dev-tools-http-server.d.ts +1 -3
  205. package/types/server/index.d.ts +1 -28
  206. package/types/server/request-handler.d.ts +1 -6
  207. package/types/tsconfig.tsbuildinfo +1 -1
  208. package/types/types/codegen-server.d.ts +1 -1
  209. package/types/types/connection-tracker.d.ts +34 -34
  210. package/types/types/proxy-middleware.d.ts +15 -25
  211. package/types/types/websocket-types.d.ts +7 -9
  212. package/types/types.d.ts +358 -387
  213. package/types/vite/main.d.ts +1 -1
  214. package/types/webpack/main.d.ts +5 -5
@@ -1,105 +1,74 @@
1
1
  import type { DevToolsSys } from "../../core";
2
2
  import { type Credentials } from "../credentials";
3
- import type {
4
- DesignSystem,
5
- GenerateUserMessage,
6
- WorkspaceConfiguration,
7
- UpdateDesignSystemInput,
8
- DesignSystemScope,
9
- DisplayDesignSystem,
10
- IndexDocumentV1,
11
- AclPolicy,
12
- PrivacyMode,
13
- } from "$/ai-utils";
3
+ import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, UpdateDesignSystemInput, DesignSystemScope, DisplayDesignSystem, IndexDocumentV1, AclPolicy, PrivacyMode } from "$/ai-utils";
14
4
  export declare const AGENT_FILE = "AGENTS.md";
15
5
  export declare const ICONS_FILE = "icons.mdx";
16
6
  export declare const TOKENS_FILE = "tokens.mdx";
17
7
  export declare const INSTALLATION_FILE = "installation.md";
18
8
  export declare const REPO_INDEXING_FOLDER = "repo-indexing";
19
9
  export interface UserSettings {
20
- isAdminInOrganization: boolean;
21
- email: string;
10
+ isAdminInOrganization: boolean;
11
+ email: string;
22
12
  }
23
13
  interface GetAllDesignSystemsOpts {
24
- /**
25
- * If true, only design systems that the user has permission to edit will be
26
- * returned. If false, all design systems that the user has permission to edit
27
- * as well as design systems that the user has permission to read but not edit
28
- * will be returned. Defaults to false.
29
- */
30
- onlyEditAccess?: boolean;
31
- /**
32
- * If true, design systems that are scoped to the global space will be included.
33
- * Defaults to false.
34
- */
35
- includeGlobalScopeDesignSystems?: boolean;
36
- /**
37
- * If true, the # of component docs in each design system will also be returned.
38
- * Defaults to false.
39
- */
40
- includeDocumentCount?: boolean;
14
+ /**
15
+ * If true, only design systems that the user has permission to edit will be
16
+ * returned. If false, all design systems that the user has permission to edit
17
+ * as well as design systems that the user has permission to read but not edit
18
+ * will be returned. Defaults to false.
19
+ */
20
+ onlyEditAccess?: boolean;
21
+ /**
22
+ * If true, design systems that are scoped to the global space will be included.
23
+ * Defaults to false.
24
+ */
25
+ includeGlobalScopeDesignSystems?: boolean;
26
+ /**
27
+ * If true, the # of component docs in each design system will also be returned.
28
+ * Defaults to false.
29
+ */
30
+ includeDocumentCount?: boolean;
41
31
  }
42
- export declare const promptForDesignSystemScope: (
43
- credentials: Credentials,
44
- userSettings: UserSettings | null,
45
- selectedScope?: DesignSystemScope,
46
- ) => Promise<DesignSystemScope | undefined>;
47
- export declare const parseDesignSystem: (
48
- sys: DevToolsSys,
49
- designSystemPackage?: string,
50
- ) => Promise<{
51
- name: any;
52
- version: string | undefined;
32
+ export declare const promptForDesignSystemScope: (credentials: Credentials, userSettings: UserSettings | null, selectedScope?: DesignSystemScope) => Promise<DesignSystemScope | undefined>;
33
+ export declare const parseDesignSystem: (sys: DevToolsSys, designSystemPackage?: string) => Promise<{
34
+ name: any;
35
+ version: string | undefined;
53
36
  }>;
54
- export declare const storeComponentDocs: (
55
- credentials: Credentials,
56
- body: IndexDocumentV1,
57
- debug?: boolean,
58
- ) => Promise<any>;
59
- export declare const runCodeGen: (
60
- sys: DevToolsSys,
61
- credentials: Credentials,
62
- sessionId: string,
63
- message: GenerateUserMessage,
64
- debug?: boolean,
65
- designSystemPackage?: string,
66
- workspaceConfig?: WorkspaceConfiguration,
67
- opts?: {
68
- tags?: object;
69
- maxTokens?: number;
70
- retriesAllowed?: number;
71
- /**
72
- * What kind of file to expect from the LLM.
73
- * `'tool'`: The LLM will use the Write tool to output the file. We will intercept that
74
- * and keep the file contents in-memory. File is not written to disk.
75
- * `string`: The LLM will write the file directly to the file system. We will read the
76
- * contents into memory and then delete the file from the file system. This is useful
77
- * for writing large files that would otherwise consume a lot of tokens.
78
- */
79
- expectFile?: "tool" | string;
80
- /**
81
- * Glob pattern(s) to include for access control.
82
- * When specified, only these patterns will be accessible by default.
83
- * Can be a single string or array of strings.
84
- */
85
- include?: string | string[];
86
- /**
87
- * Glob pattern(s) to exclude for access control.
88
- * These patterns will be denied access even if included.
89
- * Can be a single string or array of strings.
90
- */
91
- exclude?: string | string[];
92
- /**
93
- * Extra instructions to be taken into account during repo indexing.
94
- */
95
- instructions?: string;
96
- /**
97
- * Privacy mode settings for encryption key handling.
98
- */
99
- privacyMode?: PrivacyMode;
100
- },
101
- metadata?: any,
102
- ) => Promise<string>;
37
+ export declare const storeComponentDocs: (credentials: Credentials, body: IndexDocumentV1, debug?: boolean) => Promise<any>;
38
+ export declare const runCodeGen: (sys: DevToolsSys, credentials: Credentials, sessionId: string, message: GenerateUserMessage, debug?: boolean, designSystemPackage?: string, workspaceConfig?: WorkspaceConfiguration, opts?: {
39
+ tags?: object;
40
+ maxTokens?: number;
41
+ retriesAllowed?: number;
42
+ /**
43
+ * What kind of file to expect from the LLM.
44
+ * `'tool'`: The LLM will use the Write tool to output the file. We will intercept that
45
+ * and keep the file contents in-memory. File is not written to disk.
46
+ * `string`: The LLM will write the file directly to the file system. We will read the
47
+ * contents into memory and then delete the file from the file system. This is useful
48
+ * for writing large files that would otherwise consume a lot of tokens.
49
+ */
50
+ expectFile?: "tool" | string;
51
+ /**
52
+ * Glob pattern(s) to include for access control.
53
+ * When specified, only these patterns will be accessible by default.
54
+ * Can be a single string or array of strings.
55
+ */
56
+ include?: string | string[];
57
+ /**
58
+ * Glob pattern(s) to exclude for access control.
59
+ * These patterns will be denied access even if included.
60
+ * Can be a single string or array of strings.
61
+ */
62
+ exclude?: string | string[];
63
+ /**
64
+ * Extra instructions to be taken into account during repo indexing.
65
+ */
66
+ instructions?: string;
67
+ /**
68
+ * Privacy mode settings for encryption key handling.
69
+ */
70
+ privacyMode?: PrivacyMode;
71
+ }, metadata?: any) => Promise<string>;
103
72
  /**
104
73
  * Generates an ACL policy for repo indexing based on include/exclude patterns.
105
74
  *
@@ -121,52 +90,24 @@ export declare const runCodeGen: (
121
90
  * const policy2 = generateRepoIndexingAclPolicy("src/**\/*", "dist/**");
122
91
  * ```
123
92
  */
124
- export declare const generateRepoIndexingAclPolicy: (
125
- include?: string | string[],
126
- exclude?: string | string[],
127
- ) => AclPolicy;
128
- export declare function getAllDesignSystems(
129
- credentials: Credentials,
130
- opts: {
131
- includeDocumentCount: true;
132
- } & Omit<GetAllDesignSystemsOpts, "includeDocumentCount">,
133
- ): Promise<DisplayDesignSystem[]>;
134
- export declare function getAllDesignSystems(
135
- credentials: Credentials,
136
- opts?: GetAllDesignSystemsOpts,
137
- ): Promise<DesignSystem[]>;
138
- export declare const getDesignSystemsByScope: (
139
- scope: DesignSystemScope,
140
- designSystems: DesignSystem[],
141
- ) => DesignSystem[];
142
- export declare const getDesignSystemByName: (
143
- designSystemName: string,
144
- designSystems: DesignSystem[],
145
- ) => DesignSystem | null;
146
- export declare const getDesignSystemByNameAndScope: (
147
- credentials: Credentials,
148
- designSystemName: string,
149
- scope: DesignSystemScope,
150
- designSystems: DesignSystem[],
151
- ) => DesignSystem | null;
152
- export declare const addDesignSystem: (
153
- credentials: Credentials,
154
- body: {
155
- designSystemName: string;
156
- designSystemVersion?: string;
157
- designSystemPackage?: string;
158
- status: string;
159
- scope: DesignSystemScope;
160
- gitOriginUrl: string | undefined;
161
- gitRelativePath: string | undefined;
162
- cliArgs: string[];
163
- },
164
- ) => Promise<any>;
165
- export declare const updateDesignSystem: (
166
- credentials: Credentials,
167
- body: UpdateDesignSystemInput,
168
- ) => Promise<any>;
169
- export declare const checkRepoIndexingFolder: (
170
- sys: DevToolsSys,
171
- ) => Promise<boolean>;
93
+ export declare const generateRepoIndexingAclPolicy: (include?: string | string[], exclude?: string | string[]) => AclPolicy;
94
+ export declare function getAllDesignSystems(credentials: Credentials, opts: {
95
+ includeDocumentCount: true;
96
+ } & Omit<GetAllDesignSystemsOpts, "includeDocumentCount">): Promise<DisplayDesignSystem[]>;
97
+ export declare function getAllDesignSystems(credentials: Credentials, opts?: GetAllDesignSystemsOpts): Promise<DesignSystem[]>;
98
+ export declare const getDesignSystemsByScope: (scope: DesignSystemScope, designSystems: DesignSystem[]) => DesignSystem[];
99
+ export declare const getDesignSystemByName: (designSystemName: string, designSystems: DesignSystem[]) => DesignSystem | null;
100
+ export declare const getDesignSystemByNameAndScope: (credentials: Credentials, designSystemName: string, scope: DesignSystemScope, designSystems: DesignSystem[]) => DesignSystem | null;
101
+ export declare const addDesignSystem: (credentials: Credentials, body: {
102
+ designSystemName: string;
103
+ designSystemVersion?: string;
104
+ designSystemPackage?: string;
105
+ status: string;
106
+ scope: DesignSystemScope;
107
+ gitOriginUrl: string | undefined;
108
+ gitRelativePath: string | undefined;
109
+ cliArgs: string[];
110
+ }) => Promise<any>;
111
+ export declare const updateDesignSystem: (credentials: Credentials, body: UpdateDesignSystemInput) => Promise<any>;
112
+ export declare const checkRepoIndexingFolder: (sys: DevToolsSys) => Promise<boolean>;
172
113
  export {};
@@ -2,43 +2,23 @@ import type { DevToolsSys } from "../../types";
2
2
  import type { CLIArgs } from "../index";
3
3
  import { type Credentials } from "../credentials";
4
4
  import type { ComponentTask, TokenTask } from "./types";
5
- export declare const displayComponentLibrarySummary: (
6
- components: ComponentTask[],
7
- indexedComponents: ComponentTask[],
8
- startTime: number,
9
- failedComponents: string[] | undefined,
10
- isForce: boolean | undefined,
11
- designSystemName: string,
12
- designSystemId?: string,
13
- numIconsIndexed?: number,
14
- tokenGroupsFound?: TokenTask[],
15
- tokenGroupsToIndex?: TokenTask[],
16
- tokenGroupsFailed?: string[],
17
- ) => void;
5
+ export declare const displayComponentLibrarySummary: (components: ComponentTask[], indexedComponents: ComponentTask[], startTime: number, failedComponents: string[] | undefined, isForce: boolean | undefined, designSystemName: string, designSystemId?: string, numIconsIndexed?: number, tokenGroupsFound?: TokenTask[], tokenGroupsToIndex?: TokenTask[], tokenGroupsFailed?: string[]) => void;
18
6
  export interface RepoIndexingDoc {
19
- name: string;
20
- content:
21
- | string
22
- | {
23
- name: string;
24
- description: string;
25
- components: string[];
26
- relevantFiles: string[];
27
- }[];
28
- createdDate: string;
29
- description: string;
30
- id: string;
31
- ownerId: string;
32
- userId: string;
7
+ name: string;
8
+ content: string | {
9
+ name: string;
10
+ description: string;
11
+ components: string[];
12
+ relevantFiles: string[];
13
+ }[];
14
+ createdDate: string;
15
+ description: string;
16
+ id: string;
17
+ ownerId: string;
18
+ userId: string;
33
19
  }
34
- export declare const runRepoIndexing: (
35
- sys: DevToolsSys,
36
- args: CLIArgs,
37
- ) => Promise<void>;
38
- export declare const isFeatureAllowed: (
39
- credentials: Credentials,
40
- debug?: boolean,
41
- ) => Promise<{
42
- isAllowed: boolean;
43
- reason?: string;
20
+ export declare const runRepoIndexing: (sys: DevToolsSys, args: CLIArgs) => Promise<void>;
21
+ export declare const isFeatureAllowed: (credentials: Credentials, debug?: boolean) => Promise<{
22
+ isAllowed: boolean;
23
+ reason?: string;
44
24
  }>;
@@ -1,5 +1,5 @@
1
1
  export declare const mockDeps: {
2
- getStoredComponentDocs: () => Promise<never[]>;
3
- storeComponentDocs: () => Promise<{}>;
4
- runCodeGen: () => Promise<string>;
2
+ getStoredComponentDocs: () => Promise<never[]>;
3
+ storeComponentDocs: () => Promise<{}>;
4
+ runCodeGen: () => Promise<string>;
5
5
  };
@@ -1,47 +1,28 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { TokenTask } from "./types";
3
3
  import type { Credentials } from "../credentials";
4
- import type {
5
- WorkspaceConfiguration,
6
- TokenDocument,
7
- PrivacyMode,
8
- } from "$/ai-utils";
9
- export declare const discoverTokens: (
10
- sys: DevToolsSys,
11
- credentials: Credentials,
12
- sessionId: string,
13
- remoteTokens: TokenDocument[],
14
- opts?: {
15
- force?: boolean;
16
- designSystemPackage?: string;
17
- workspaceConfig?: WorkspaceConfiguration;
18
- debug?: boolean;
19
- include?: string | string[];
20
- exclude?: string | string[];
21
- instructions?: string;
22
- privacyMode?: PrivacyMode;
23
- },
24
- ) => Promise<
25
- | {
26
- tokenGroupsToIndex: TokenTask[];
27
- discoveredTokenGroups: TokenTask[];
28
- }
29
- | undefined
30
- >;
31
- export declare const processTokens: (
32
- sys: DevToolsSys,
33
- credentials: Credentials,
34
- sessionId: string,
35
- group: TokenTask,
36
- opts: {
37
- designSystemId: string;
38
- designSystemPackage?: string;
39
- designSystemVersion?: string;
40
- debug?: boolean;
41
- workspaceConfig?: WorkspaceConfiguration;
42
- include?: string | string[];
43
- exclude?: string | string[];
44
- instructions?: string;
45
- privacyMode?: PrivacyMode;
46
- },
47
- ) => Promise<void>;
4
+ import type { WorkspaceConfiguration, TokenDocument, PrivacyMode } from "$/ai-utils";
5
+ export declare const discoverTokens: (sys: DevToolsSys, credentials: Credentials, sessionId: string, remoteTokens: TokenDocument[], opts?: {
6
+ force?: boolean;
7
+ designSystemPackage?: string;
8
+ workspaceConfig?: WorkspaceConfiguration;
9
+ debug?: boolean;
10
+ include?: string | string[];
11
+ exclude?: string | string[];
12
+ instructions?: string;
13
+ privacyMode?: PrivacyMode;
14
+ }) => Promise<{
15
+ tokenGroupsToIndex: TokenTask[];
16
+ discoveredTokenGroups: TokenTask[];
17
+ } | undefined>;
18
+ export declare const processTokens: (sys: DevToolsSys, credentials: Credentials, sessionId: string, group: TokenTask, opts: {
19
+ designSystemId: string;
20
+ designSystemPackage?: string;
21
+ designSystemVersion?: string;
22
+ debug?: boolean;
23
+ workspaceConfig?: WorkspaceConfiguration;
24
+ include?: string | string[];
25
+ exclude?: string | string[];
26
+ instructions?: string;
27
+ privacyMode?: PrivacyMode;
28
+ }) => Promise<void>;
@@ -15,8 +15,6 @@ export interface TokenTask extends BaseTask {
15
15
  type: "token";
16
16
  relevantFiles: string[];
17
17
  tokens: string[];
18
- /** Map of token name to its default value (e.g., "--spacing-1": "4px") */
19
- tokenValues?: Record<string, string>;
20
18
  hash: string;
21
19
  }
22
20
  export interface IconTask extends BaseTask {
@@ -0,0 +1,17 @@
1
+ import type { DevToolsSys } from "../types";
2
+ import type { CLIArgs } from "./index";
3
+ export interface RepoIndexingDoc {
4
+ name: string;
5
+ content: string | {
6
+ name: string;
7
+ description: string;
8
+ components: string[];
9
+ relevantFiles: string[];
10
+ }[];
11
+ createdDate: string;
12
+ description: string;
13
+ id: string;
14
+ ownerId: string;
15
+ userId: string;
16
+ }
17
+ export declare const runRepoIndexing: (sys: DevToolsSys, args: CLIArgs) => Promise<void>;
@@ -0,0 +1,5 @@
1
+ export declare const mockDeps: {
2
+ getStoredComponentDocs: () => Promise<never[]>;
3
+ storeComponentDocs: () => Promise<{}>;
4
+ runCodeGen: () => Promise<string>;
5
+ };
@@ -10,16 +10,14 @@ export declare function safeReadFile(filePath: string): string | null;
10
10
  * Package manager information
11
11
  */
12
12
  export interface PackageManagerInfo {
13
- manager: "npm" | "yarn" | "pnpm" | "bun";
14
- setupCommand: string;
13
+ manager: "npm" | "yarn" | "pnpm" | "bun";
14
+ setupCommand: string;
15
15
  }
16
16
  /**
17
17
  * Detect the package manager at the root level based on lock files
18
18
  * Returns the specific package manager command for setup
19
19
  */
20
- export declare function detectRootPackageManager(
21
- files: string[],
22
- ): PackageManagerInfo | null;
20
+ export declare function detectRootPackageManager(files: string[]): PackageManagerInfo | null;
23
21
  /**
24
22
  * Check if a file exists at the root level
25
23
  */
@@ -27,14 +25,8 @@ export declare function hasRootFile(files: string[], fileName: string): boolean;
27
25
  /**
28
26
  * Check if any file matches a pattern at the root level
29
27
  */
30
- export declare function hasRootFileMatching(
31
- files: string[],
32
- predicate: (fileName: string) => boolean,
33
- ): boolean;
28
+ export declare function hasRootFileMatching(files: string[], predicate: (fileName: string) => boolean): boolean;
34
29
  /**
35
30
  * Check if a directory exists at the root level
36
31
  */
37
- export declare function hasRootDirectory(
38
- files: string[],
39
- directoryName: string,
40
- ): boolean;
32
+ export declare function hasRootDirectory(files: string[], directoryName: string): boolean;
@@ -15,7 +15,4 @@ export declare function isExactVersion(version: string | undefined): boolean;
15
15
  * @param basePath - Absolute path to the repository root
16
16
  * @param rootPath - Relative path within the repository to analyze (default: "/" for entire repo)
17
17
  */
18
- export declare function collectRepoMetrics(
19
- sys: DevToolsSys,
20
- basePath: string,
21
- ): Promise<RepoMetrics>;
18
+ export declare function collectRepoMetrics(sys: DevToolsSys, basePath: string): Promise<RepoMetrics>;
@@ -1,81 +1,54 @@
1
1
  import type { FigmaComponentInfo } from "$/ai-utils";
2
2
  import type { CLIArgs } from "..";
3
3
  import type { DevToolsSys } from "../../core";
4
- import type {
5
- PublishedComponent,
6
- PublishedComponentSet,
7
- } from "@figma/rest-api-spec";
4
+ import type { PublishedComponent, PublishedComponentSet } from "@figma/rest-api-spec";
8
5
  type Context = {
9
- sys: DevToolsSys;
10
- args: CLIArgs;
11
- debug: (msg: unknown) => void;
12
- figmaAuth: {
13
- access_token: string;
14
- oauth: boolean;
15
- };
6
+ sys: DevToolsSys;
7
+ args: CLIArgs;
8
+ debug: (msg: unknown) => void;
9
+ figmaAuth: {
10
+ access_token: string;
11
+ oauth: boolean;
12
+ };
16
13
  };
17
14
  /**
18
15
  * A component or component set
19
16
  */
20
17
  type FigmaTeamComponent = {
21
- /** The unique identifier for the component. */
22
- key: string;
23
- /** The unique identifier of the Figma file that contains the component. */
24
- file_key: string;
25
- /** The unique identifier of the component node within the Figma file. */
26
- node_id: string;
27
- /** A URL to a thumbnail image of the component. */
28
- thumbnail_url?: string;
29
- /** The name of the component. */
30
- name: string;
31
- /** The description of the component as entered by the publisher. */
32
- description: string;
33
- /** The component data. */
34
- componentData?: FigmaComponentInfo;
35
- /** Whether the component is published. */
36
- isPublished?: boolean;
18
+ /** The unique identifier for the component. */
19
+ key: string;
20
+ /** The unique identifier of the Figma file that contains the component. */
21
+ file_key: string;
22
+ /** The unique identifier of the component node within the Figma file. */
23
+ node_id: string;
24
+ /** A URL to a thumbnail image of the component. */
25
+ thumbnail_url?: string;
26
+ /** The name of the component. */
27
+ name: string;
28
+ /** The description of the component as entered by the publisher. */
29
+ description: string;
30
+ /** The component data. */
31
+ componentData?: FigmaComponentInfo;
32
+ /** Whether the component is published. */
33
+ isPublished?: boolean;
37
34
  };
38
35
  export declare function extractFigmaIds(url: string): {
39
- teamId?: string;
40
- fileKey?: string;
41
- nodeId?: string;
36
+ teamId?: string;
37
+ fileKey?: string;
38
+ nodeId?: string;
42
39
  };
43
- export declare function fetchTeamComponents(
44
- context: Context,
45
- teamId: string,
46
- onProgress: () => void,
47
- ): Promise<PublishedComponent[]>;
48
- export declare function fetchTeamComponentSets(
49
- context: Context,
50
- teamId: string,
51
- onProgress: () => void,
52
- ): Promise<PublishedComponentSet[]>;
40
+ export declare function fetchTeamComponents(context: Context, teamId: string, onProgress: () => void): Promise<PublishedComponent[]>;
41
+ export declare function fetchTeamComponentSets(context: Context, teamId: string, onProgress: () => void): Promise<PublishedComponentSet[]>;
53
42
  /**
54
43
  * Returns a list of components and component sets that are present in the file or selection as
55
44
  * well as a set of remote keys for components that are referenced but not present.
56
45
  */
57
- export declare function processFileOrSelection(
58
- context: Context,
59
- fileKey: string,
60
- nodeId?: string,
61
- ): Promise<{
62
- fileComponents: FigmaTeamComponent[];
63
- remoteKeys: Set<string>;
46
+ export declare function processFileOrSelection(context: Context, fileKey: string, nodeId?: string): Promise<{
47
+ fileComponents: FigmaTeamComponent[];
48
+ remoteKeys: Set<string>;
64
49
  }>;
65
- export declare function fetchRemoteComponentData(
66
- context: Context,
67
- remoteKeys: Set<string>,
68
- ): Promise<(FigmaTeamComponent | undefined)[]>;
69
- export declare function resolveComponentData(
70
- context: Context,
71
- components: FigmaTeamComponent[],
72
- ): Promise<FigmaTeamComponent[]>;
73
- export declare function generateComponentReport(
74
- component: FigmaTeamComponent,
75
- baseDir: string,
76
- ): Promise<void>;
77
- export declare const runFigmaReport: (
78
- sys: DevToolsSys,
79
- args: CLIArgs,
80
- ) => Promise<void>;
50
+ export declare function fetchRemoteComponentData(context: Context, remoteKeys: Set<string>): Promise<(FigmaTeamComponent | undefined)[]>;
51
+ export declare function resolveComponentData(context: Context, components: FigmaTeamComponent[]): Promise<FigmaTeamComponent[]>;
52
+ export declare function generateComponentReport(component: FigmaTeamComponent, baseDir: string): Promise<void>;
53
+ export declare const runFigmaReport: (sys: DevToolsSys, args: CLIArgs) => Promise<void>;
81
54
  export {};