@nuxt/devtools 4.0.0-alpha.14 → 4.0.0-alpha.15
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/dist/chunks/module-main.mjs +21 -2
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/view/client.js +14 -14
- package/package.json +11 -10
|
@@ -31,7 +31,7 @@ import { isLess } from 'verkit';
|
|
|
31
31
|
import { DEVTOOLS_TERMINALS_DOCK_ID } from '@vitejs/devtools-kit/constants';
|
|
32
32
|
import { normalizeBaseKey, normalizeKey, createStorage, builtinDrivers } from 'unstorage';
|
|
33
33
|
|
|
34
|
-
const version$1 = "4.0.0-alpha.
|
|
34
|
+
const version$1 = "4.0.0-alpha.15";
|
|
35
35
|
const peerDependencies = {
|
|
36
36
|
"@nuxt/devtools-assets": "workspace:*",
|
|
37
37
|
"@nuxt/kit": "^4.0.0-0 || ^5.0.0-0",
|
|
@@ -12067,7 +12067,24 @@ async function enableModule(options, nuxt) {
|
|
|
12067
12067
|
const isSelfClient = resolve(nuxt.options.rootDir) === resolve(packageDir, "client");
|
|
12068
12068
|
const clientAssetsSource = isSelfClient ? void 0 : resolveClientAssetsSource();
|
|
12069
12069
|
const clientUrl = clientAssetsSource ? `${ROUTE_CLIENT}/` : `${nuxt.options.app.baseURL || "/"}/`.replace(MULTIPLE_SLASHES_RE, "/");
|
|
12070
|
-
|
|
12070
|
+
let publicDevServerOrigin;
|
|
12071
|
+
nuxt.hook("listen", (_server, listener) => {
|
|
12072
|
+
if (listener?.url)
|
|
12073
|
+
publicDevServerOrigin = new URL(listener.url).origin;
|
|
12074
|
+
});
|
|
12075
|
+
const DevTools = await import('@vitejs/devtools').then((r) => r.DevTools({
|
|
12076
|
+
branding: {
|
|
12077
|
+
productName: "Nuxt DevTools",
|
|
12078
|
+
tagline: "DevTools for Nuxt",
|
|
12079
|
+
primaryColor: "#099e61",
|
|
12080
|
+
logo: "https://nuxt.com/assets/design-kit/icon-green.svg",
|
|
12081
|
+
wordmark: {
|
|
12082
|
+
light: "https://cdn.jsdelivr.net/gh/nuxt/devtools@main/assets/nuxt-devtools-light.svg",
|
|
12083
|
+
dark: "https://cdn.jsdelivr.net/gh/nuxt/devtools@main/assets/nuxt-devtools-dark.svg"
|
|
12084
|
+
},
|
|
12085
|
+
windowTitle: "Nuxt DevTools"
|
|
12086
|
+
}
|
|
12087
|
+
}));
|
|
12071
12088
|
addVitePlugin(DevTools);
|
|
12072
12089
|
let connectDevToolsKit;
|
|
12073
12090
|
addVitePlugin(defineViteDevToolsPlugin({
|
|
@@ -12075,6 +12092,8 @@ async function enableModule(options, nuxt) {
|
|
|
12075
12092
|
devtools: {
|
|
12076
12093
|
async setup(ctx2) {
|
|
12077
12094
|
if (!skipInSSR(ctx2)) {
|
|
12095
|
+
const resolveViteOrigin = ctx2.host.resolveOrigin.bind(ctx2.host);
|
|
12096
|
+
ctx2.host.resolveOrigin = () => publicDevServerOrigin || resolveViteOrigin();
|
|
12078
12097
|
if (clientAssetsSource) {
|
|
12079
12098
|
ctx2.viteServer?.middlewares.use((req, res, next) => {
|
|
12080
12099
|
const [pathname = "", search = ""] = (req.url ?? "").split("?");
|
package/dist/module.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { getDevframeClientContext } from "@devframes/hub/client";
|
|
1
2
|
import { NuxtDevtoolsInspectPanel } from "@nuxt/devtools/webcomponents";
|
|
2
|
-
import { getDevToolsClientContext } from "@vitejs/devtools-kit/client";
|
|
3
3
|
import { createHooks } from "hookable";
|
|
4
4
|
import { debounce } from "perfect-debounce";
|
|
5
5
|
import { events as inspectorEvents, hasData as inspectorHasData, state as inspectorState } from "vite-plugin-vue-tracer/client/overlay";
|
|
6
6
|
import { computed, markRaw, nextTick, reactive, ref, shallowReactive, shallowRef, toRef, watch } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
8
|
import { initTimelineMetrics } from "../../function-metrics-helpers.js";
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
return
|
|
9
|
+
const NUXT_DOCK_ANCHOR_ID = "nuxt:devtools";
|
|
10
|
+
function getDevframeContext() {
|
|
11
|
+
return getDevframeClientContext();
|
|
12
12
|
}
|
|
13
13
|
const clientRef = shallowRef();
|
|
14
14
|
export { clientRef as client };
|
|
@@ -27,27 +27,27 @@ export async function setupDevToolsClient({
|
|
|
27
27
|
inspector: getInspectorInstance(),
|
|
28
28
|
devtools: {
|
|
29
29
|
toggle() {
|
|
30
|
-
const ctx =
|
|
30
|
+
const ctx = getDevframeContext();
|
|
31
31
|
if (ctx)
|
|
32
|
-
ctx.docks.toggleEntry(
|
|
32
|
+
ctx.docks.toggleEntry(NUXT_DOCK_ANCHOR_ID);
|
|
33
33
|
},
|
|
34
34
|
close() {
|
|
35
|
-
const ctx =
|
|
35
|
+
const ctx = getDevframeContext();
|
|
36
36
|
if (ctx)
|
|
37
|
-
ctx.panel.
|
|
37
|
+
ctx.panel.session.open = false;
|
|
38
38
|
},
|
|
39
39
|
open() {
|
|
40
|
-
const ctx =
|
|
40
|
+
const ctx = getDevframeContext();
|
|
41
41
|
if (ctx) {
|
|
42
|
-
ctx.panel.
|
|
43
|
-
ctx.docks.switchEntry(
|
|
42
|
+
ctx.panel.session.open = true;
|
|
43
|
+
ctx.docks.switchEntry(NUXT_DOCK_ANCHOR_ID);
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
async navigate(path) {
|
|
47
|
-
const ctx =
|
|
47
|
+
const ctx = getDevframeContext();
|
|
48
48
|
if (ctx) {
|
|
49
|
-
ctx.panel.
|
|
50
|
-
ctx.docks.switchEntry(
|
|
49
|
+
ctx.panel.session.open = true;
|
|
50
|
+
ctx.docks.switchEntry(NUXT_DOCK_ANCHOR_ID);
|
|
51
51
|
}
|
|
52
52
|
await client.hooks.callHook("host:action:navigate", path);
|
|
53
53
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.15",
|
|
5
5
|
"description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devtools.nuxt.com",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"nitropack": "^2.0.0",
|
|
27
27
|
"vite": "^8.1.5",
|
|
28
28
|
"vite-plugin-inspect": "^12.0.2",
|
|
29
|
-
"@nuxt/devtools-assets": "4.0.0-alpha.
|
|
29
|
+
"@nuxt/devtools-assets": "4.0.0-alpha.15"
|
|
30
30
|
},
|
|
31
31
|
"peerDependenciesMeta": {
|
|
32
32
|
"@nuxt/devtools-assets": {
|
|
@@ -43,13 +43,14 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@devframes/
|
|
47
|
-
"@devframes/plugin-
|
|
48
|
-
"@
|
|
49
|
-
"@vitejs/devtools
|
|
46
|
+
"@devframes/hub": "^0.9.5",
|
|
47
|
+
"@devframes/plugin-code-server": "^0.9.5",
|
|
48
|
+
"@devframes/plugin-data-inspector": "^0.9.5",
|
|
49
|
+
"@vitejs/devtools": "^0.5.2",
|
|
50
|
+
"@vitejs/devtools-kit": "^0.5.2",
|
|
50
51
|
"consola": "^3.4.2",
|
|
51
52
|
"destr": "^2.0.5",
|
|
52
|
-
"devframe": "^0.9.
|
|
53
|
+
"devframe": "^0.9.5",
|
|
53
54
|
"error-stack-parser-es": "^2.0.1",
|
|
54
55
|
"fast-npm-meta": "^2.2.0",
|
|
55
56
|
"hookable": "^6.1.1",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"unstorage": "^1.17.5",
|
|
64
65
|
"verkit": "^0.4.0",
|
|
65
66
|
"vite-plugin-vue-tracer": "^1.5.0",
|
|
66
|
-
"@nuxt/devtools-kit": "4.0.0-alpha.
|
|
67
|
+
"@nuxt/devtools-kit": "4.0.0-alpha.15"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
70
|
"@antfu/utils": "^9.3.0",
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
"@unocss/preset-icons": "^66.8.0",
|
|
83
84
|
"@unocss/preset-uno": "^66.8.0",
|
|
84
85
|
"@unocss/runtime": "^66.8.0",
|
|
85
|
-
"@vitejs/devtools": "^0.5.
|
|
86
|
+
"@vitejs/devtools": "^0.5.2",
|
|
86
87
|
"@vueuse/nuxt": "^14.4.0",
|
|
87
88
|
"cronstrue": "^3.24.0",
|
|
88
89
|
"diff": "^9.0.0",
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
"vite-plugin-inspect": "^12.0.2",
|
|
118
119
|
"vue-tsc": "^3.3.10",
|
|
119
120
|
"vue-virtual-scroller": "^3.0.5",
|
|
120
|
-
"@nuxt/devtools-assets": "4.0.0-alpha.
|
|
121
|
+
"@nuxt/devtools-assets": "4.0.0-alpha.15"
|
|
121
122
|
},
|
|
122
123
|
"scripts": {
|
|
123
124
|
"build": "pnpm dev:prepare && pnpm build:module",
|