@nuxt/devtools-nightly 4.0.0-29887914.4c41943 → 4.0.0-29889901.a2a4fc6
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.
|
@@ -25,7 +25,7 @@ import { getPackageInfo } from 'local-pkg';
|
|
|
25
25
|
import { DEVTOOLS_TERMINALS_DOCK_ID } from '@vitejs/devtools-kit/constants';
|
|
26
26
|
import { debounce } from 'perfect-debounce';
|
|
27
27
|
|
|
28
|
-
const version = "4.0.0-
|
|
28
|
+
const version = "4.0.0-29889901.a2a4fc6";
|
|
29
29
|
const peerDependencies = {
|
|
30
30
|
"@nuxt/kit": "^4.0.0-0 || ^5.0.0-0",
|
|
31
31
|
nitro: "*",
|
|
@@ -1784,18 +1784,16 @@ async function enableModule(options, nuxt) {
|
|
|
1784
1784
|
return;
|
|
1785
1785
|
}
|
|
1786
1786
|
await nuxt.callHook("devtools:before");
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1787
|
+
const viteDevToolsDefaults = {};
|
|
1788
|
+
if (options.disableAuthorization)
|
|
1789
|
+
viteDevToolsDefaults.clientAuth = false;
|
|
1790
|
+
if (options.mcp !== void 0)
|
|
1791
|
+
viteDevToolsDefaults.mcp = options.mcp;
|
|
1792
1792
|
const kit = await import('@nuxt/kit');
|
|
1793
1793
|
if ("useTerminal" in kit) {
|
|
1794
1794
|
const { banner, onTrusted } = createTerminalAuthBanner(kit.useTerminal);
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
devtools.onTrusted ??= onTrusted;
|
|
1798
|
-
});
|
|
1795
|
+
viteDevToolsDefaults.banner = banner;
|
|
1796
|
+
viteDevToolsDefaults.onTrusted = onTrusted;
|
|
1799
1797
|
}
|
|
1800
1798
|
nuxt.options.imports.collectMeta = true;
|
|
1801
1799
|
addPlugin({
|
|
@@ -1842,12 +1840,14 @@ async function enableModule(options, nuxt) {
|
|
|
1842
1840
|
},
|
|
1843
1841
|
windowTitle: "Nuxt DevTools"
|
|
1844
1842
|
};
|
|
1843
|
+
viteDevToolsDefaults.branding = branding;
|
|
1845
1844
|
if (isGreaterThanOrEqual(version$1, "8.3.0")) {
|
|
1846
1845
|
extendViteDevToolsConfig((devtools) => {
|
|
1847
|
-
|
|
1846
|
+
for (const [key, value] of Object.entries(viteDevToolsDefaults))
|
|
1847
|
+
devtools[key] ??= value;
|
|
1848
1848
|
});
|
|
1849
1849
|
} else {
|
|
1850
|
-
const DevTools = await import('@vitejs/devtools').then((r) => r.DevTools(
|
|
1850
|
+
const DevTools = await import('@vitejs/devtools').then((r) => r.DevTools(viteDevToolsDefaults));
|
|
1851
1851
|
addVitePlugin(DevTools);
|
|
1852
1852
|
}
|
|
1853
1853
|
let connectDevToolsKit;
|
package/dist/module.json
CHANGED
|
@@ -3,7 +3,7 @@ import { NuxtDevtoolsInspectPanel } from "@nuxt/devtools/webcomponents";
|
|
|
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
|
-
import { computed, markRaw, nextTick, reactive, ref, shallowReactive, shallowRef, toRef
|
|
6
|
+
import { computed, effect, isRef, markRaw, nextTick, reactive, ref, shallowReactive, shallowRef, toRef } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
8
|
import { initTimelineMetrics } from "../../function-metrics-helpers.js";
|
|
9
9
|
const NUXT_DOCK_ANCHOR_ID = "nuxt:devtools";
|
|
@@ -240,14 +240,19 @@ function setupReactivity(client, router, timeMetric) {
|
|
|
240
240
|
const refreshReactivity = debounce(() => {
|
|
241
241
|
client.hooks.callHook("host:update:reactivity");
|
|
242
242
|
}, 100, { trailing: true });
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}, {
|
|
243
|
+
const runner = effect(() => {
|
|
244
|
+
traverse([
|
|
245
|
+
client.nuxt.payload,
|
|
246
|
+
client.app.colorMode.value,
|
|
247
|
+
client.metrics.loading(),
|
|
248
|
+
timeMetric
|
|
249
|
+
]);
|
|
250
|
+
}, {
|
|
251
|
+
scheduler: debounce(() => {
|
|
252
|
+
runner();
|
|
253
|
+
client.hooks.callHook("host:update:reactivity");
|
|
254
|
+
}, 100, { trailing: true })
|
|
255
|
+
});
|
|
251
256
|
router?.afterEach(() => {
|
|
252
257
|
refreshReactivity();
|
|
253
258
|
});
|
|
@@ -255,3 +260,19 @@ function setupReactivity(client, router, timeMetric) {
|
|
|
255
260
|
refreshReactivity();
|
|
256
261
|
});
|
|
257
262
|
}
|
|
263
|
+
function traverse(value, seen = /* @__PURE__ */ new Set()) {
|
|
264
|
+
if (!value || typeof value !== "object" || seen.has(value) || value.__v_skip)
|
|
265
|
+
return;
|
|
266
|
+
seen.add(value);
|
|
267
|
+
if (isRef(value)) {
|
|
268
|
+
traverse(value.value, seen);
|
|
269
|
+
} else if (Array.isArray(value)) {
|
|
270
|
+
for (const item of value)
|
|
271
|
+
traverse(item, seen);
|
|
272
|
+
} else if (value instanceof Map || value instanceof Set) {
|
|
273
|
+
value.forEach((item) => traverse(item, seen));
|
|
274
|
+
} else if (Object.prototype.toString.call(value) === "[object Object]") {
|
|
275
|
+
for (const key in value)
|
|
276
|
+
traverse(value[key], seen);
|
|
277
|
+
}
|
|
278
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-nightly",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-
|
|
4
|
+
"version": "4.0.0-29889901.a2a4fc6",
|
|
5
5
|
"description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://nuxt.com/modules/devtools",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@devframes/plugin-code-server": "^1.2.6",
|
|
49
49
|
"@devframes/plugin-data-inspector": "^1.2.6",
|
|
50
50
|
"@devframes/plugin-og": "^1.2.6",
|
|
51
|
-
"@nuxt/devtools-assets": "npm:@nuxt/devtools-assets-nightly@4.0.0-
|
|
52
|
-
"@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-
|
|
51
|
+
"@nuxt/devtools-assets": "npm:@nuxt/devtools-assets-nightly@4.0.0-29889901.a2a4fc6",
|
|
52
|
+
"@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-29889901.a2a4fc6",
|
|
53
53
|
"@vitejs/devtools": "^0.8.0",
|
|
54
54
|
"@vitejs/devtools-kit": "^0.8.0",
|
|
55
55
|
"consola": "^3.4.2",
|