@builder.io/dev-tools 0.2.31 → 0.11.33-dev.202509151402.6aa9b1f64

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 (210) hide show
  1. package/README.md +43 -0
  2. package/angular/index.cjs +46 -0
  3. package/angular/index.d.ts +1 -0
  4. package/angular/index.mjs +21 -0
  5. package/cli/index.cjs +114063 -0
  6. package/cli/index.cjs.map +7 -0
  7. package/cli/main.cjs +26 -0
  8. package/core/index.cjs +14366 -325
  9. package/core/index.mjs +14349 -317
  10. package/figma/index.cjs +47 -0
  11. package/figma/index.d.ts +1 -0
  12. package/figma/index.mjs +28 -0
  13. package/figma/jsx-runtime/index.cjs +7 -0
  14. package/figma/jsx-runtime/index.d.ts +46 -0
  15. package/figma/jsx-runtime/index.js +7 -0
  16. package/figma/jsx-runtime/prop-types.d.ts +125 -0
  17. package/figma/jsx-runtime/react.d.ts +5217 -0
  18. package/next/index.d.ts +1 -1
  19. package/node/index.cjs +25310 -1
  20. package/node/index.mjs +25315 -1
  21. package/package.json +87 -22
  22. package/remix/build.cjs +132 -1
  23. package/remix/index.mjs +114 -1
  24. package/remix/server-build/index.mjs +1 -0
  25. package/server/index.cjs +22508 -192
  26. package/server/index.mjs +22508 -192
  27. package/types/_tests_/code.e2e.d.ts +1 -0
  28. package/types/_tests_/create-builder.e2e.d.ts +1 -0
  29. package/types/_tests_/dev-tools.e2e.d.ts +1 -0
  30. package/types/_tests_/figma-generate.e2e.d.ts +1 -0
  31. package/types/_tests_/figma-publish.e2e.d.ts +1 -0
  32. package/types/_tests_/fusionInit.e2e.d.ts +1 -0
  33. package/types/_tests_/help.e2e.d.ts +1 -0
  34. package/types/_tests_/launch.e2e.d.ts +1 -0
  35. package/types/_tests_/repo-indexing.test.d.ts +1 -0
  36. package/types/_tests_/sync-utils.test.d.ts +1 -0
  37. package/types/_tests_/utils.d.ts +44 -0
  38. package/types/_tests_/vitest.config.d.ts +2 -0
  39. package/types/_tests_/workspace.e2e.d.ts +1 -0
  40. package/types/angular/index.d.ts +1 -0
  41. package/types/cli/__tests__/parseGitDiffToApplyActions.spec.d.ts +1 -0
  42. package/types/cli/abort-signal-any.d.ts +1 -0
  43. package/types/cli/auth/auth-utils.d.ts +2 -0
  44. package/types/cli/auth/auth.d.ts +3 -0
  45. package/types/cli/auth/status.d.ts +3 -0
  46. package/types/cli/auto-update.d.ts +22 -0
  47. package/types/cli/auto-update.test.d.ts +1 -0
  48. package/types/cli/backup.d.ts +116 -0
  49. package/types/cli/builder-add/interface.d.ts +5 -0
  50. package/types/cli/builder-add/options.d.ts +2 -0
  51. package/types/cli/code-file-utils.d.ts +12 -0
  52. package/types/cli/code-file-utils.unit.d.ts +1 -0
  53. package/types/cli/code-tools.d.ts +91 -0
  54. package/types/cli/code.d.ts +7 -0
  55. package/types/cli/codegen.d.ts +339 -0
  56. package/types/cli/constants.d.ts +1 -0
  57. package/types/cli/credentials.d.ts +52 -0
  58. package/types/cli/download.d.ts +10 -0
  59. package/types/cli/exit.d.ts +1 -0
  60. package/types/cli/fetch.d.ts +1 -0
  61. package/types/cli/figma-publish.d.ts +24 -0
  62. package/types/cli/figma-publish.spec.d.ts +1 -0
  63. package/types/cli/figma-utils.d.ts +31 -0
  64. package/types/cli/figma.d.ts +4 -0
  65. package/types/cli/generate.d.ts +16 -0
  66. package/types/cli/help.d.ts +1 -0
  67. package/types/cli/incremental-tsc.d.ts +30 -0
  68. package/types/cli/index.d.ts +95 -0
  69. package/types/cli/indexing.d.ts +5 -0
  70. package/types/cli/launch/InitStateMachine.d.ts +68 -0
  71. package/types/cli/launch/config.d.ts +6 -0
  72. package/types/cli/launch/dev-server-orchestrator.d.ts +64 -0
  73. package/types/cli/launch/dry-run-backup.d.ts +9 -0
  74. package/types/cli/launch/errors.d.ts +3 -0
  75. package/types/cli/launch/github.d.ts +3 -0
  76. package/types/cli/launch/grafana.d.ts +4 -0
  77. package/types/cli/launch/helpers.d.ts +15 -0
  78. package/types/cli/launch/machine-health.d.ts +12 -0
  79. package/types/cli/launch/proxy.d.ts +3 -0
  80. package/types/cli/launch/server.d.ts +20 -0
  81. package/types/cli/launch.d.ts +90 -0
  82. package/types/cli/prettier.d.ts +3 -0
  83. package/types/cli/repo-indexing/component-discovery.d.ts +15 -0
  84. package/types/cli/repo-indexing/component-indexing.d.ts +19 -0
  85. package/types/cli/repo-indexing/repo-indexing-utils.d.ts +41 -0
  86. package/types/cli/repo-indexing/repo-indexing.d.ts +24 -0
  87. package/types/cli/repo-indexing/repo-indexing.mock.d.ts +5 -0
  88. package/types/cli/repo-indexing/types.d.ts +17 -0
  89. package/types/cli/repo-indexing-utils.d.ts +2 -0
  90. package/types/cli/repo-indexing.d.ts +17 -0
  91. package/types/cli/repo-indexing.mock.d.ts +5 -0
  92. package/types/cli/report/figma-report.d.ts +54 -0
  93. package/types/cli/server-ws.d.ts +50 -0
  94. package/types/cli/spinner.d.ts +6 -0
  95. package/types/cli/sync-utils.d.ts +21 -0
  96. package/types/cli/track.d.ts +5 -0
  97. package/types/cli/utils/component-group-mdx-prompt.d.ts +1 -0
  98. package/types/cli/utils/dev-server-url-parser.d.ts +11 -0
  99. package/types/cli/utils/dev-server-url-parser.test.d.ts +1 -0
  100. package/types/cli/utils/feature-flags.d.ts +2 -0
  101. package/types/cli/utils/git.d.ts +11 -0
  102. package/types/cli/utils/open.d.ts +1 -0
  103. package/types/cli/utils/parseGitDiff.d.ts +8 -0
  104. package/types/cli/utils/repo-indexing-agent-prompt.d.ts +1 -0
  105. package/types/cli/utils/repo-indexing-group-prompt.d.ts +1 -0
  106. package/types/cli/utils/repo-indexing-group-prompts.d.ts +1 -0
  107. package/types/cli/utils/signals.d.ts +2 -0
  108. package/types/cli/utils/terminal-buffer.d.ts +27 -0
  109. package/types/cli/utils/terminal-buffer.spec.d.ts +1 -0
  110. package/types/cli/utils/workspace-path-resolver.d.ts +92 -0
  111. package/types/cli/utils/workspace-path-resolver.unit.d.ts +1 -0
  112. package/types/cli/version.d.ts +1 -0
  113. package/types/client/client-api.d.ts +3 -2
  114. package/types/client/menu/pages/component-list.d.ts +2 -1
  115. package/types/client/tracking.d.ts +1 -1
  116. package/types/common/ast/component-info.d.ts +2 -0
  117. package/types/common/ast/component-input-types.d.ts +1 -1
  118. package/types/common/ast/convert-values.d.ts +1 -1
  119. package/types/common/ast/imported-statements.d.ts +4 -0
  120. package/types/common/ast/imported-statements.unit.d.ts +1 -0
  121. package/types/common/builder/builder-api.d.ts +8 -1
  122. package/types/common/builder/builder-sdks.d.ts +10 -0
  123. package/types/common/builder/content-generation.d.ts +1 -1
  124. package/types/common/constants.d.ts +2 -0
  125. package/types/common/dotenv.d.ts +1 -1
  126. package/types/common/dotenv.test.d.ts +1 -0
  127. package/types/common/errors.d.ts +32 -0
  128. package/types/common/estimate-code-tokens.d.ts +8 -0
  129. package/types/common/fs.d.ts +2 -0
  130. package/types/common/interactive-select-files.d.ts +3 -0
  131. package/types/common/test-utils.d.ts +6 -2
  132. package/types/common/typescript.d.ts +1 -1
  133. package/types/common/utils.d.ts +12 -1
  134. package/types/core/adapters/angular/angular-api-key.d.ts +10 -0
  135. package/types/core/adapters/angular/angular-api-key.unit.d.ts +1 -0
  136. package/types/core/adapters/angular/angular-app-module-imports.d.ts +3 -0
  137. package/types/core/adapters/angular/angular-app-module-imports.unit.d.ts +1 -0
  138. package/types/core/adapters/angular/angular-app-routes-update.d.ts +2 -0
  139. package/types/core/adapters/angular/angular-app-routes-update.unit.d.ts +1 -0
  140. package/types/core/adapters/angular/angular-components.d.ts +18 -0
  141. package/types/core/adapters/angular/angular-components.unit.d.ts +1 -0
  142. package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +5 -0
  143. package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +9 -0
  144. package/types/core/adapters/angular/angular-ensure-config-plugin.unit.d.ts +1 -0
  145. package/types/core/adapters/angular/angular-fix-tsconfig.d.ts +2 -0
  146. package/types/core/adapters/angular/angular-registry-parse.d.ts +16 -0
  147. package/types/core/adapters/angular/angular-registry-parse.unit.d.ts +1 -0
  148. package/types/core/adapters/angular/angular-registry.d.ts +3 -0
  149. package/types/core/adapters/angular/angular-registry.unit.d.ts +1 -0
  150. package/types/core/adapters/angular/angular-test-utils.d.ts +6 -0
  151. package/types/core/adapters/angular/index.d.ts +14 -0
  152. package/types/core/adapters/angular/types.d.ts +11 -0
  153. package/types/core/adapters/next/index.d.ts +15 -1
  154. package/types/core/adapters/next/next-ensure-builder-setup.d.ts +1 -1
  155. package/types/core/adapters/next/next-registry-parse.d.ts +2 -1
  156. package/types/core/adapters/next/next-registry.d.ts +1 -1
  157. package/types/core/adapters/next/next-test-utils.d.ts +3 -2
  158. package/types/core/adapters/react/index.d.ts +13 -0
  159. package/types/core/adapters/react/react-api-key.d.ts +6 -0
  160. package/types/core/adapters/react/react-builder-sdk-setup.d.ts +2 -0
  161. package/types/core/adapters/react/react-component-info.d.ts +5 -0
  162. package/types/core/adapters/react/react-components.d.ts +6 -4
  163. package/types/core/adapters/react/react-ensure-builder-setup.d.ts +4 -0
  164. package/types/core/adapters/react/react-registry-parse.d.ts +13 -0
  165. package/types/core/adapters/react/react-registry-parse.unit.d.ts +1 -0
  166. package/types/core/adapters/react/react-registry.d.ts +3 -0
  167. package/types/core/adapters/react/react-registry.unit.d.ts +1 -0
  168. package/types/core/adapters/react/react-test-utils.d.ts +7 -0
  169. package/types/core/adapters/remix/index.d.ts +1 -0
  170. package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +1 -1
  171. package/types/core/adapters/remix/remix-registry-parse.d.ts +1 -1
  172. package/types/core/adapters/remix/remix-registry.d.ts +1 -1
  173. package/types/core/adapters/remix/remix-test-utils.d.ts +2 -1
  174. package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +4 -0
  175. package/types/core/adapters/vue/index.d.ts +14 -0
  176. package/types/core/adapters/vue/vue-api-key.d.ts +6 -0
  177. package/types/core/adapters/vue/vue-components.d.ts +4 -0
  178. package/types/core/adapters/vue/vue-ensure-builder-setup.d.ts +7 -0
  179. package/types/core/adapters/vue/vue-registry-parse.d.ts +16 -0
  180. package/types/core/adapters/vue/vue-registry.d.ts +5 -0
  181. package/types/core/adapters/webpack/webpack-config-helpers.d.ts +11 -0
  182. package/types/core/adapters/webpack/webpack-config-helpers.unit.d.ts +1 -0
  183. package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +1 -1
  184. package/types/core/detect-frameworks.d.ts +2 -1
  185. package/types/core/find-dependencies.d.ts +7 -0
  186. package/types/core/import-export-registry.d.ts +1 -1
  187. package/types/figma/index.d.ts +88 -0
  188. package/types/node/node-sys.d.ts +5 -1
  189. package/types/scripts/analyze-projects.d.ts +18 -0
  190. package/types/scripts/call-ensure-container.d.ts +5 -0
  191. package/types/scripts/cli.d.ts +1 -0
  192. package/types/scripts/db.d.ts +3 -0
  193. package/types/scripts/download-projects.d.ts +12 -0
  194. package/types/server/builder-connect.d.ts +5 -2
  195. package/types/server/index.d.ts +1 -1
  196. package/types/server/request-handler.d.ts +0 -1
  197. package/types/tsconfig.tsbuildinfo +1 -0
  198. package/types/types.d.ts +152 -7
  199. package/types/vitest.config.d.ts +2 -0
  200. package/vite/index.cjs +153 -3
  201. package/vite/index.d.ts +1 -1
  202. package/vite/index.mjs +120 -3
  203. package/webpack/index.cjs +2883 -28
  204. package/webpack/index.d.ts +1 -1
  205. package/webpack/index.mjs +2872 -28
  206. package/types/next/index.d.cts +0 -4
  207. package/types/next/index.d.mts +0 -4
  208. package/types/remix/index-shim.d.cts +0 -2
  209. /package/types/vite/{index.d.ts → main.d.ts} +0 -0
  210. /package/types/webpack/{index.d.ts → main.d.ts} +0 -0
package/README.md CHANGED
@@ -6,16 +6,47 @@ Setup and integrate [Builder.io Visual CMS](https://www.builder.io/) during deve
6
6
 
7
7
  Builder's Devtools can be [installed and initialized](https://www.npmjs.com/package/@builder.io/create) using:
8
8
 
9
+ **npm**
10
+
9
11
  ```
10
12
  npm init builder.io@latest
11
13
  ```
12
14
 
15
+ **pnpm**
16
+
17
+ ```
18
+ pnpm create builder.io@latest
19
+ ```
20
+
13
21
  This command will update the config file (such as next.config.js, or vite.config.js) and install the `@builder.io/dev-tools` package. Once installed, you can start your app's dev server:
14
22
 
15
23
  ```
16
24
  npm run dev
17
25
  ```
18
26
 
27
+ ## Local Development
28
+
29
+ To develop and test Builder Devtools locally:
30
+
31
+ 1. In the devtools directory, build and link the package:
32
+
33
+ ```bash
34
+ cd dist/dev-tools
35
+ npm link
36
+ ```
37
+
38
+ 2. In your application directory, link to the local devtools:
39
+
40
+ ```bash
41
+ npm link @builder.io/dev-tools
42
+ ```
43
+
44
+ 3. You can now run the Figma generate command:
45
+
46
+ ```bash
47
+ npx builder.io figma generate
48
+ ```
49
+
19
50
  ## Manual Installation
20
51
 
21
52
  Alternatively, you can manually install Builder's Devtools, and update the config files following the steps below.
@@ -92,3 +123,15 @@ module.exports = {
92
123
  plugins: [new BuilderDevToolsPlugin()],
93
124
  };
94
125
  ```
126
+
127
+ ## CLI
128
+
129
+ Devtools can also be started with a CLI command, which could be useful if there is a custom setup that doesn't fit into one of the above solutions. Below is an example of running CLI from an npm script:
130
+
131
+ ```json
132
+ {
133
+ "scripts": {
134
+ "devtools": "builder-dev-tools"
135
+ }
136
+ }
137
+ ```
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/dev-tools/angular/index.ts
21
+ var angular_exports = {};
22
+ __export(angular_exports, {
23
+ builderDevTools: () => builderDevTools
24
+ });
25
+ module.exports = __toCommonJS(angular_exports);
26
+ async function builderDevTools() {
27
+ if (typeof document !== "undefined" && window.location.hostname === "localhost") {
28
+ let devToolsScript = document.head.querySelector(
29
+ "script[data-builder-dev-tools]"
30
+ );
31
+ if (!devToolsScript) {
32
+ devToolsScript = document.createElement("script");
33
+ devToolsScript.setAttribute(
34
+ "src",
35
+ "http://localhost:5273/~builder-dev-tools.js"
36
+ );
37
+ devToolsScript.setAttribute("data-builder-dev-tools", "");
38
+ devToolsScript.setAttribute("async", "");
39
+ document.head.appendChild(devToolsScript);
40
+ }
41
+ }
42
+ }
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ builderDevTools
46
+ });
@@ -0,0 +1 @@
1
+ export * from "../types/angular";
@@ -0,0 +1,21 @@
1
+ // packages/dev-tools/angular/index.ts
2
+ async function builderDevTools() {
3
+ if (typeof document !== "undefined" && window.location.hostname === "localhost") {
4
+ let devToolsScript = document.head.querySelector(
5
+ "script[data-builder-dev-tools]"
6
+ );
7
+ if (!devToolsScript) {
8
+ devToolsScript = document.createElement("script");
9
+ devToolsScript.setAttribute(
10
+ "src",
11
+ "http://localhost:5273/~builder-dev-tools.js"
12
+ );
13
+ devToolsScript.setAttribute("data-builder-dev-tools", "");
14
+ devToolsScript.setAttribute("async", "");
15
+ document.head.appendChild(devToolsScript);
16
+ }
17
+ }
18
+ }
19
+ export {
20
+ builderDevTools
21
+ };