@vitejs/devtools 0.0.0-alpha.26 → 0.0.0-alpha.27

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 (30) hide show
  1. package/dist/{DockIcon-guXN-Dg1.js → DockIcon-BfVdt_M0.js} +28 -30
  2. package/dist/{ViewBuiltinLogs-CSFcoXHM.js → ViewBuiltinLogs-C8wFxIxg.js} +2 -2
  3. package/dist/{ViewBuiltinTerminals-Cojpb-fR.js → ViewBuiltinTerminals-CrBOq_Ni.js} +609 -613
  4. package/dist/cli-commands.js +65 -2
  5. package/dist/cli.js +2 -2
  6. package/dist/client/inject.js +3 -3
  7. package/dist/client/standalone/assets/ViewBuiltinLogs-CYvdMq-7.js +1 -0
  8. package/dist/client/standalone/assets/{ViewBuiltinTerminals-C2zjH4Eh.js → ViewBuiltinTerminals-B9l9XmES.js} +3 -3
  9. package/dist/client/standalone/assets/index-DWC0UjCz.js +2 -0
  10. package/dist/client/standalone/assets/index-DzhHPm4X.css +1 -0
  11. package/dist/client/standalone/index.html +2 -2
  12. package/dist/client/webcomponents.d.ts +1447 -2
  13. package/dist/client/webcomponents.js +38 -56
  14. package/dist/dirs.js +7 -1
  15. package/dist/{dist-DMSdRXqd.js → dist-BpFPAu5f.js} +5 -6
  16. package/dist/{docks-DMCIffwx.js → docks-CYaKLVhQ.js} +1 -1
  17. package/dist/index.d.ts +168 -17
  18. package/dist/index.js +1 -1
  19. package/dist/plugins-BbzqUdpu.js +3038 -0
  20. package/dist/standalone-DVh1a9tu.js +34 -0
  21. package/dist/{vue.runtime.esm-bundler-fEVOOaBD.js → vue.runtime.esm-bundler-DL0i8o0W.js} +199 -189
  22. package/package.json +14 -15
  23. package/dist/cli-commands-DTrA5QU8.js +0 -97
  24. package/dist/client/standalone/assets/ViewBuiltinLogs-C4iyfEw1.js +0 -1
  25. package/dist/client/standalone/assets/index-BlqhxxEb.js +0 -2
  26. package/dist/client/standalone/assets/index-DR7GNsjy.css +0 -1
  27. package/dist/dirs-C0s1Ghvy.js +0 -9
  28. package/dist/index-DqO60P8I.d.ts +0 -576
  29. package/dist/plugins-CJzaRd9B.js +0 -2373
  30. /package/dist/{export-helper-Dw-qygE5.js → export-helper-DjM8b2QE.js} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitejs/devtools",
3
3
  "type": "module",
4
- "version": "0.0.0-alpha.26",
4
+ "version": "0.0.0-alpha.27",
5
5
  "description": "Vite DevTools",
6
6
  "author": "VoidZero Inc.",
7
7
  "license": "MIT",
@@ -41,7 +41,6 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "birpc": "^4.0.0",
44
- "birpc-x": "0.0.6",
45
44
  "cac": "^6.7.14",
46
45
  "h3": "^1.15.5",
47
46
  "immer": "^11.1.3",
@@ -50,29 +49,29 @@
50
49
  "obug": "^2.1.1",
51
50
  "open": "^11.0.0",
52
51
  "pathe": "^2.0.3",
53
- "perfect-debounce": "^2.0.0",
52
+ "perfect-debounce": "^2.1.0",
54
53
  "sirv": "^3.0.2",
55
54
  "tinyexec": "^1.0.2",
56
55
  "ws": "^8.19.0",
57
- "@vitejs/devtools-rpc": "0.0.0-alpha.26",
58
- "@vitejs/devtools-kit": "0.0.0-alpha.26",
59
- "@vitejs/devtools-vite": "0.0.0-alpha.26"
56
+ "@vitejs/devtools-rolldown": "0.0.0-alpha.27",
57
+ "@vitejs/devtools-rpc": "0.0.0-alpha.27",
58
+ "@vitejs/devtools-kit": "0.0.0-alpha.27"
60
59
  },
61
60
  "devDependencies": {
62
- "@clack/prompts": "^0.11.0",
63
- "@vitejs/plugin-vue": "^6.0.3",
61
+ "@clack/prompts": "^1.0.0",
62
+ "@vitejs/plugin-vue": "^6.0.4",
64
63
  "@xterm/addon-fit": "^0.11.0",
65
64
  "@xterm/xterm": "^6.0.0",
66
65
  "dompurify": "^3.3.1",
67
- "tsdown": "^0.19.0",
66
+ "tsdown": "^0.20.2",
68
67
  "typescript": "^5.9.3",
69
- "unplugin-vue": "^7.1.0",
68
+ "unplugin-vue": "^7.1.1",
70
69
  "unplugin-vue-router": "^0.19.2",
71
- "vite": "^8.0.0-beta.8",
72
- "vue": "^3.5.26",
73
- "vue-router": "^4.6.4",
74
- "vue-tsc": "^3.2.2",
75
- "@vitejs/devtools-vite": "0.0.0-alpha.26"
70
+ "vite": "^8.0.0-beta.13",
71
+ "vue": "^3.5.27",
72
+ "vue-router": "^5.0.2",
73
+ "vue-tsc": "^3.2.4",
74
+ "@vitejs/devtools-rolldown": "0.0.0-alpha.27"
76
75
  },
77
76
  "scripts": {
78
77
  "build": "pnpm build:js && pnpm build:standalone",
@@ -1,97 +0,0 @@
1
- import { a as createDevToolsContext, i as getPort, n as createDevToolsMiddleware, o as ansis_default, r as MARK_NODE, t as DevTools } from "./plugins-CJzaRd9B.js";
2
- import { t as dirClientStandalone } from "./dirs-C0s1Ghvy.js";
3
- import { resolveConfig } from "vite";
4
- import { join, relative, resolve } from "pathe";
5
- import { existsSync } from "node:fs";
6
- import process from "node:process";
7
- import sirv from "sirv";
8
- import { createApp, eventHandler, fromNodeMiddleware, sendRedirect, toNodeListener } from "h3";
9
- import fs$1 from "node:fs/promises";
10
- import { createServer } from "node:http";
11
- import open from "open";
12
-
13
- //#region src/node/standalone.ts
14
- async function startStandaloneDevTools(options = {}) {
15
- const { cwd = process.cwd(), command = "build", mode = "production" } = options;
16
- const resolved = await resolveConfig({
17
- configFile: options.config,
18
- root: cwd,
19
- plugins: [DevTools()]
20
- }, command, mode);
21
- dedupeVitePlugins(resolved.plugins, (plugin) => plugin.name?.startsWith("vite:devtools"));
22
- return {
23
- config: resolved,
24
- context: await createDevToolsContext(resolved)
25
- };
26
- }
27
- function dedupeVitePlugins(plugins, include) {
28
- const toDelete = [];
29
- const map = /* @__PURE__ */ new Map();
30
- for (let i = 0; i < plugins.length; i++) {
31
- const plugin = plugins[i];
32
- if (!plugin || !include(plugin)) continue;
33
- if (map.has(plugin.name)) toDelete.push(i);
34
- else map.set(plugin.name, plugin);
35
- }
36
- toDelete.sort((a, b) => b - a);
37
- for (const i of toDelete) plugins.splice(i, 1);
38
- return plugins;
39
- }
40
-
41
- //#endregion
42
- //#region src/node/cli-commands.ts
43
- async function start(options) {
44
- const { host } = options;
45
- const port = await getPort({
46
- host,
47
- port: options.port == null ? void 0 : +options.port,
48
- portRange: [9999, 15e3]
49
- });
50
- const devtools = await startStandaloneDevTools({ cwd: options.root });
51
- const { h3 } = await createDevToolsMiddleware({
52
- cwd: devtools.config.root,
53
- hostWebSocket: host,
54
- context: devtools.context
55
- });
56
- const app = createApp();
57
- for (const { baseUrl, distDir } of devtools.context.views.buildStaticDirs) app.use(baseUrl, fromNodeMiddleware(sirv(distDir, {
58
- dev: true,
59
- single: true
60
- })));
61
- app.use("/.devtools/", h3.handler);
62
- app.use("/", eventHandler(async (event) => {
63
- if (event.node.req.url === "/") return sendRedirect(event, "/.devtools/");
64
- }));
65
- createServer(toNodeListener(app)).listen(port, host, async () => {
66
- console.log(ansis_default.green`${MARK_NODE} Vite DevTools started at`, ansis_default.green(`http://${host === "127.0.0.1" ? "localhost" : host}:${port}`), "\n");
67
- if (options.open) await open(`http://${host === "127.0.0.1" ? "localhost" : host}:${port}`);
68
- });
69
- }
70
- async function build(options) {
71
- console.log(ansis_default.cyan`${MARK_NODE} Building static Vite DevTools...`);
72
- const devtools = await startStandaloneDevTools({
73
- cwd: options.root,
74
- config: options.config
75
- });
76
- const outDir = resolve(devtools.config.root, options.outDir);
77
- if (existsSync(outDir)) await fs$1.rm(outDir, { recursive: true });
78
- const devToolsRoot = join(outDir, ".devtools");
79
- await fs$1.mkdir(devToolsRoot, { recursive: true });
80
- await fs$1.cp(dirClientStandalone, devToolsRoot, { recursive: true });
81
- for (const { baseUrl, distDir } of devtools.context.views.buildStaticDirs) {
82
- console.log(ansis_default.cyan`${MARK_NODE} Copying static files from ${distDir} to ${join(outDir, baseUrl)}`);
83
- await fs$1.mkdir(join(outDir, baseUrl), { recursive: true });
84
- await fs$1.cp(distDir, join(outDir, baseUrl), { recursive: true });
85
- }
86
- await fs$1.mkdir(resolve(devToolsRoot, "api"), { recursive: true });
87
- await fs$1.writeFile(resolve(devToolsRoot, ".vdt-connection.json"), JSON.stringify({ backend: "static" }, null, 2), "utf-8");
88
- console.log(ansis_default.cyan`${MARK_NODE} Writing RPC dump to ${resolve(devToolsRoot, ".vdt-rpc-dump.json")}`);
89
- const dump = {};
90
- for (const [key, value] of Object.entries(devtools.context.rpc.functions)) if (value.type === "static") dump[key] = await value.handler?.();
91
- await fs$1.writeFile(resolve(devToolsRoot, ".vdt-rpc-dump.json"), JSON.stringify(dump, null, 2), "utf-8");
92
- console.log(ansis_default.green`${MARK_NODE} Built to ${relative(devtools.config.root, outDir)}`);
93
- throw new Error("[Vite DevTools] Build mode of Vite DevTools is not yet complete");
94
- }
95
-
96
- //#endregion
97
- export { start as n, build as t };
@@ -1 +0,0 @@
1
- import{c as e,m as t,n}from"./index-BlqhxxEb.js";var r={};function i(n,r){return t(),e(`div`,null,` Logs // TODO: `)}var a=n(r,[[`render`,i]]);export{a as default};