@nuxt/devtools-nightly 4.0.0-29889901.31569c7 → 4.0.0-29893089.d6a282e
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-29893089.d6a282e";
|
|
29
29
|
const peerDependencies = {
|
|
30
30
|
"@nuxt/kit": "^4.0.0-0 || ^5.0.0-0",
|
|
31
31
|
nitro: "*",
|
|
@@ -1825,9 +1825,12 @@ async function enableModule(options, nuxt) {
|
|
|
1825
1825
|
const clientAssetsSource = isSelfClient ? void 0 : resolveClientAssetsSource();
|
|
1826
1826
|
const clientUrl = clientAssetsSource ? `${ROUTE_CLIENT}/` : `${nuxt.options.app.baseURL || "/"}/`.replace(MULTIPLE_SLASHES_RE, "/");
|
|
1827
1827
|
let publicDevServerOrigin;
|
|
1828
|
-
|
|
1828
|
+
const allowedOrigins = [];
|
|
1829
|
+
nuxt.hook("listen", async (_server, listener) => {
|
|
1829
1830
|
if (listener?.url)
|
|
1830
1831
|
publicDevServerOrigin = new URL(listener.url).origin;
|
|
1832
|
+
const urls = await listener?.getURLs?.() ?? [];
|
|
1833
|
+
allowedOrigins.push(...urls.map(({ url }) => new URL(url).origin));
|
|
1831
1834
|
});
|
|
1832
1835
|
const branding = {
|
|
1833
1836
|
productName: "Nuxt DevTools",
|
|
@@ -1841,8 +1844,13 @@ async function enableModule(options, nuxt) {
|
|
|
1841
1844
|
windowTitle: "Nuxt DevTools"
|
|
1842
1845
|
};
|
|
1843
1846
|
viteDevToolsDefaults.branding = branding;
|
|
1847
|
+
viteDevToolsDefaults.allowedOrigins = allowedOrigins;
|
|
1844
1848
|
if (isGreaterThanOrEqual(version$1, "8.3.0")) {
|
|
1845
1849
|
extendViteDevToolsConfig((devtools) => {
|
|
1850
|
+
devtools.allowedOrigins = [
|
|
1851
|
+
...devtools.allowedOrigins ?? [],
|
|
1852
|
+
...allowedOrigins
|
|
1853
|
+
];
|
|
1846
1854
|
for (const [key, value] of Object.entries(viteDevToolsDefaults))
|
|
1847
1855
|
devtools[key] ??= value;
|
|
1848
1856
|
});
|
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-29893089.d6a282e",
|
|
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-29893089.d6a282e",
|
|
52
|
+
"@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-29893089.d6a282e",
|
|
53
53
|
"@vitejs/devtools": "^0.8.0",
|
|
54
54
|
"@vitejs/devtools-kit": "^0.8.0",
|
|
55
55
|
"consola": "^3.4.2",
|