@builder.io/dev-tools 0.2.32 → 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.
- package/README.md +43 -0
- package/angular/index.cjs +46 -0
- package/angular/index.d.ts +1 -0
- package/angular/index.mjs +21 -0
- package/cli/index.cjs +114063 -0
- package/cli/index.cjs.map +7 -0
- package/cli/main.cjs +26 -0
- package/core/index.cjs +14366 -325
- package/core/index.mjs +14349 -317
- package/figma/index.cjs +47 -0
- package/figma/index.d.ts +1 -0
- package/figma/index.mjs +28 -0
- package/figma/jsx-runtime/index.cjs +7 -0
- package/figma/jsx-runtime/index.d.ts +46 -0
- package/figma/jsx-runtime/index.js +7 -0
- package/figma/jsx-runtime/prop-types.d.ts +125 -0
- package/figma/jsx-runtime/react.d.ts +5217 -0
- package/next/index.d.ts +1 -1
- package/node/index.cjs +25310 -1
- package/node/index.mjs +25315 -1
- package/package.json +87 -22
- package/remix/build.cjs +132 -1
- package/remix/index.mjs +114 -1
- package/remix/server-build/index.mjs +1 -0
- package/server/index.cjs +22508 -192
- package/server/index.mjs +22508 -192
- package/types/_tests_/code.e2e.d.ts +1 -0
- package/types/_tests_/create-builder.e2e.d.ts +1 -0
- package/types/_tests_/dev-tools.e2e.d.ts +1 -0
- package/types/_tests_/figma-generate.e2e.d.ts +1 -0
- package/types/_tests_/figma-publish.e2e.d.ts +1 -0
- package/types/_tests_/fusionInit.e2e.d.ts +1 -0
- package/types/_tests_/help.e2e.d.ts +1 -0
- package/types/_tests_/launch.e2e.d.ts +1 -0
- package/types/_tests_/repo-indexing.test.d.ts +1 -0
- package/types/_tests_/sync-utils.test.d.ts +1 -0
- package/types/_tests_/utils.d.ts +44 -0
- package/types/_tests_/vitest.config.d.ts +2 -0
- package/types/_tests_/workspace.e2e.d.ts +1 -0
- package/types/angular/index.d.ts +1 -0
- package/types/cli/__tests__/parseGitDiffToApplyActions.spec.d.ts +1 -0
- package/types/cli/abort-signal-any.d.ts +1 -0
- package/types/cli/auth/auth-utils.d.ts +2 -0
- package/types/cli/auth/auth.d.ts +3 -0
- package/types/cli/auth/status.d.ts +3 -0
- package/types/cli/auto-update.d.ts +22 -0
- package/types/cli/auto-update.test.d.ts +1 -0
- package/types/cli/backup.d.ts +116 -0
- package/types/cli/builder-add/interface.d.ts +5 -0
- package/types/cli/builder-add/options.d.ts +2 -0
- package/types/cli/code-file-utils.d.ts +12 -0
- package/types/cli/code-file-utils.unit.d.ts +1 -0
- package/types/cli/code-tools.d.ts +91 -0
- package/types/cli/code.d.ts +7 -0
- package/types/cli/codegen.d.ts +339 -0
- package/types/cli/constants.d.ts +1 -0
- package/types/cli/credentials.d.ts +52 -0
- package/types/cli/download.d.ts +10 -0
- package/types/cli/exit.d.ts +1 -0
- package/types/cli/fetch.d.ts +1 -0
- package/types/cli/figma-publish.d.ts +24 -0
- package/types/cli/figma-publish.spec.d.ts +1 -0
- package/types/cli/figma-utils.d.ts +31 -0
- package/types/cli/figma.d.ts +4 -0
- package/types/cli/generate.d.ts +16 -0
- package/types/cli/help.d.ts +1 -0
- package/types/cli/incremental-tsc.d.ts +30 -0
- package/types/cli/index.d.ts +95 -0
- package/types/cli/indexing.d.ts +5 -0
- package/types/cli/launch/InitStateMachine.d.ts +68 -0
- package/types/cli/launch/config.d.ts +6 -0
- package/types/cli/launch/dev-server-orchestrator.d.ts +64 -0
- package/types/cli/launch/dry-run-backup.d.ts +9 -0
- package/types/cli/launch/errors.d.ts +3 -0
- package/types/cli/launch/github.d.ts +3 -0
- package/types/cli/launch/grafana.d.ts +4 -0
- package/types/cli/launch/helpers.d.ts +15 -0
- package/types/cli/launch/machine-health.d.ts +12 -0
- package/types/cli/launch/proxy.d.ts +3 -0
- package/types/cli/launch/server.d.ts +20 -0
- package/types/cli/launch.d.ts +90 -0
- package/types/cli/prettier.d.ts +3 -0
- package/types/cli/repo-indexing/component-discovery.d.ts +15 -0
- package/types/cli/repo-indexing/component-indexing.d.ts +19 -0
- package/types/cli/repo-indexing/repo-indexing-utils.d.ts +41 -0
- package/types/cli/repo-indexing/repo-indexing.d.ts +24 -0
- package/types/cli/repo-indexing/repo-indexing.mock.d.ts +5 -0
- package/types/cli/repo-indexing/types.d.ts +17 -0
- package/types/cli/repo-indexing-utils.d.ts +2 -0
- package/types/cli/repo-indexing.d.ts +17 -0
- package/types/cli/repo-indexing.mock.d.ts +5 -0
- package/types/cli/report/figma-report.d.ts +54 -0
- package/types/cli/server-ws.d.ts +50 -0
- package/types/cli/spinner.d.ts +6 -0
- package/types/cli/sync-utils.d.ts +21 -0
- package/types/cli/track.d.ts +5 -0
- package/types/cli/utils/component-group-mdx-prompt.d.ts +1 -0
- package/types/cli/utils/dev-server-url-parser.d.ts +11 -0
- package/types/cli/utils/dev-server-url-parser.test.d.ts +1 -0
- package/types/cli/utils/feature-flags.d.ts +2 -0
- package/types/cli/utils/git.d.ts +11 -0
- package/types/cli/utils/open.d.ts +1 -0
- package/types/cli/utils/parseGitDiff.d.ts +8 -0
- package/types/cli/utils/repo-indexing-agent-prompt.d.ts +1 -0
- package/types/cli/utils/repo-indexing-group-prompt.d.ts +1 -0
- package/types/cli/utils/repo-indexing-group-prompts.d.ts +1 -0
- package/types/cli/utils/signals.d.ts +2 -0
- package/types/cli/utils/terminal-buffer.d.ts +27 -0
- package/types/cli/utils/terminal-buffer.spec.d.ts +1 -0
- package/types/cli/utils/workspace-path-resolver.d.ts +92 -0
- package/types/cli/utils/workspace-path-resolver.unit.d.ts +1 -0
- package/types/cli/version.d.ts +1 -0
- package/types/client/client-api.d.ts +3 -2
- package/types/client/menu/pages/component-list.d.ts +2 -1
- package/types/client/tracking.d.ts +1 -1
- package/types/common/ast/component-info.d.ts +2 -0
- package/types/common/ast/component-input-types.d.ts +1 -1
- package/types/common/ast/convert-values.d.ts +1 -1
- package/types/common/ast/imported-statements.d.ts +4 -0
- package/types/common/ast/imported-statements.unit.d.ts +1 -0
- package/types/common/builder/builder-api.d.ts +2 -1
- package/types/common/builder/builder-sdks.d.ts +10 -0
- package/types/common/builder/content-generation.d.ts +1 -1
- package/types/common/constants.d.ts +2 -0
- package/types/common/dotenv.d.ts +1 -1
- package/types/common/dotenv.test.d.ts +1 -0
- package/types/common/errors.d.ts +32 -0
- package/types/common/estimate-code-tokens.d.ts +8 -0
- package/types/common/fs.d.ts +2 -0
- package/types/common/interactive-select-files.d.ts +3 -0
- package/types/common/test-utils.d.ts +6 -2
- package/types/common/typescript.d.ts +1 -1
- package/types/common/utils.d.ts +12 -1
- package/types/core/adapters/angular/angular-api-key.d.ts +10 -0
- package/types/core/adapters/angular/angular-api-key.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-app-module-imports.d.ts +3 -0
- package/types/core/adapters/angular/angular-app-module-imports.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-app-routes-update.d.ts +2 -0
- package/types/core/adapters/angular/angular-app-routes-update.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-components.d.ts +18 -0
- package/types/core/adapters/angular/angular-components.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +5 -0
- package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +9 -0
- package/types/core/adapters/angular/angular-ensure-config-plugin.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-fix-tsconfig.d.ts +2 -0
- package/types/core/adapters/angular/angular-registry-parse.d.ts +16 -0
- package/types/core/adapters/angular/angular-registry-parse.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-registry.d.ts +3 -0
- package/types/core/adapters/angular/angular-registry.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-test-utils.d.ts +6 -0
- package/types/core/adapters/angular/index.d.ts +14 -0
- package/types/core/adapters/angular/types.d.ts +11 -0
- package/types/core/adapters/next/index.d.ts +15 -1
- package/types/core/adapters/next/next-ensure-builder-setup.d.ts +1 -1
- package/types/core/adapters/next/next-registry-parse.d.ts +2 -1
- package/types/core/adapters/next/next-registry.d.ts +1 -1
- package/types/core/adapters/next/next-test-utils.d.ts +3 -2
- package/types/core/adapters/react/index.d.ts +13 -0
- package/types/core/adapters/react/react-api-key.d.ts +6 -0
- package/types/core/adapters/react/react-builder-sdk-setup.d.ts +2 -0
- package/types/core/adapters/react/react-component-info.d.ts +5 -0
- package/types/core/adapters/react/react-components.d.ts +6 -4
- package/types/core/adapters/react/react-ensure-builder-setup.d.ts +4 -0
- package/types/core/adapters/react/react-registry-parse.d.ts +13 -0
- package/types/core/adapters/react/react-registry-parse.unit.d.ts +1 -0
- package/types/core/adapters/react/react-registry.d.ts +3 -0
- package/types/core/adapters/react/react-registry.unit.d.ts +1 -0
- package/types/core/adapters/react/react-test-utils.d.ts +7 -0
- package/types/core/adapters/remix/index.d.ts +1 -0
- package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +1 -1
- package/types/core/adapters/remix/remix-registry-parse.d.ts +1 -1
- package/types/core/adapters/remix/remix-registry.d.ts +1 -1
- package/types/core/adapters/remix/remix-test-utils.d.ts +2 -1
- package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +4 -0
- package/types/core/adapters/vue/index.d.ts +14 -0
- package/types/core/adapters/vue/vue-api-key.d.ts +6 -0
- package/types/core/adapters/vue/vue-components.d.ts +4 -0
- package/types/core/adapters/vue/vue-ensure-builder-setup.d.ts +7 -0
- package/types/core/adapters/vue/vue-registry-parse.d.ts +16 -0
- package/types/core/adapters/vue/vue-registry.d.ts +5 -0
- package/types/core/adapters/webpack/webpack-config-helpers.d.ts +11 -0
- package/types/core/adapters/webpack/webpack-config-helpers.unit.d.ts +1 -0
- package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +1 -1
- package/types/core/detect-frameworks.d.ts +2 -1
- package/types/core/find-dependencies.d.ts +7 -0
- package/types/core/import-export-registry.d.ts +1 -1
- package/types/figma/index.d.ts +88 -0
- package/types/node/node-sys.d.ts +5 -1
- package/types/scripts/analyze-projects.d.ts +18 -0
- package/types/scripts/call-ensure-container.d.ts +5 -0
- package/types/scripts/cli.d.ts +1 -0
- package/types/scripts/db.d.ts +3 -0
- package/types/scripts/download-projects.d.ts +12 -0
- package/types/server/builder-connect.d.ts +5 -2
- package/types/server/index.d.ts +1 -1
- package/types/server/request-handler.d.ts +0 -1
- package/types/tsconfig.tsbuildinfo +1 -0
- package/types/types.d.ts +152 -7
- package/types/vitest.config.d.ts +2 -0
- package/vite/index.cjs +153 -3
- package/vite/index.d.ts +1 -1
- package/vite/index.mjs +120 -3
- package/webpack/index.cjs +2883 -28
- package/webpack/index.d.ts +1 -1
- package/webpack/index.mjs +2872 -28
- package/types/next/index.d.cts +0 -4
- package/types/next/index.d.mts +0 -4
- package/types/remix/index-shim.d.cts +0 -2
- /package/types/vite/{index.d.ts → main.d.ts} +0 -0
- /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
|
+
};
|