@nuxt/devtools-nightly 4.0.0-29893089.d6a282e → 4.0.0-29893186.47ed265

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.
@@ -28,6 +28,7 @@ import 'node:process';
28
28
  import 'node:module';
29
29
  import '@vitejs/devtools-kit/constants';
30
30
  import 'perfect-debounce';
31
+ import 'node:tls';
31
32
 
32
33
  async function getFolderSize(dir) {
33
34
  const dirents = await readdir(dir, {
@@ -22,10 +22,11 @@ import { getDefaultExportOptions, addNuxtModule } from 'magicast/helpers';
22
22
  import process$1 from 'node:process';
23
23
  import { createRequire } from 'node:module';
24
24
  import { getPackageInfo } from 'local-pkg';
25
- import { DEVTOOLS_TERMINALS_DOCK_ID } from '@vitejs/devtools-kit/constants';
25
+ import { DEVTOOLS_TERMINALS_DOCK_ID, DEVTOOLS_MOUNT_PATH } from '@vitejs/devtools-kit/constants';
26
26
  import { debounce } from 'perfect-debounce';
27
+ import { Server } from 'node:tls';
27
28
 
28
- const version = "4.0.0-29893089.d6a282e";
29
+ const version = "4.0.0-29893186.47ed265";
29
30
  const peerDependencies = {
30
31
  "@nuxt/kit": "^4.0.0-0 || ^5.0.0-0",
31
32
  nitro: "*",
@@ -1760,6 +1761,37 @@ function setupRPC(nuxt, options) {
1760
1761
  };
1761
1762
  }
1762
1763
 
1764
+ const SKIPS_DEVTOOLS_UPGRADES = /* @__PURE__ */ Symbol.for("nuxt-devtools:skips-devtools-upgrades");
1765
+ function createDevListenerPlugin(nuxt) {
1766
+ return {
1767
+ name: "nuxt:devtools:dev-listener",
1768
+ apply: "serve",
1769
+ configureServer: {
1770
+ order: "pre",
1771
+ handler(server) {
1772
+ if (server.config.build?.ssr || server.httpServer)
1773
+ return;
1774
+ const listener = nuxt._devServerListener;
1775
+ if (!(listener instanceof Server))
1776
+ return;
1777
+ server.httpServer = listener;
1778
+ skipDevToolsUpgrades(nuxt.server);
1779
+ }
1780
+ }
1781
+ };
1782
+ }
1783
+ function skipDevToolsUpgrades(nuxtServer) {
1784
+ const upgrade = nuxtServer?.upgrade;
1785
+ if (!nuxtServer || typeof upgrade !== "function" || nuxtServer[SKIPS_DEVTOOLS_UPGRADES])
1786
+ return;
1787
+ nuxtServer[SKIPS_DEVTOOLS_UPGRADES] = true;
1788
+ nuxtServer.upgrade = (req, socket, head) => {
1789
+ if (req.url?.startsWith(DEVTOOLS_MOUNT_PATH))
1790
+ return;
1791
+ return upgrade.call(nuxtServer, req, socket, head);
1792
+ };
1793
+ }
1794
+
1763
1795
  const MULTIPLE_SLASHES_RE = /\/+/g;
1764
1796
  const ASSETS_PACKAGE = "@nuxt/devtools-assets";
1765
1797
  function resolveClientAssetsSource() {
@@ -1858,6 +1890,7 @@ async function enableModule(options, nuxt) {
1858
1890
  const DevTools = await import('@vitejs/devtools').then((r) => r.DevTools(viteDevToolsDefaults));
1859
1891
  addVitePlugin(DevTools);
1860
1892
  }
1893
+ addVitePlugin(createDevListenerPlugin(nuxt), { server: false });
1861
1894
  let connectDevToolsKit;
1862
1895
  addVitePlugin(defineViteDevToolsPlugin({
1863
1896
  name: "nuxt:devtools",
@@ -27,6 +27,7 @@ import 'node:process';
27
27
  import 'node:module';
28
28
  import '@vitejs/devtools-kit/constants';
29
29
  import 'perfect-debounce';
30
+ import 'node:tls';
30
31
 
31
32
  const VERSION_QUERY_RE = /\?v=\w+$/;
32
33
  const VUE_EXT_RE = /\.vue($|\?v=)/;
@@ -27,6 +27,7 @@ import 'node:module';
27
27
  import 'local-pkg';
28
28
  import '@vitejs/devtools-kit/constants';
29
29
  import 'perfect-debounce';
30
+ import 'node:tls';
30
31
 
31
32
  function setup({ nuxt }) {
32
33
  if (!nuxt.options.dev || nuxt.options.test)
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "configKey": "devtools",
4
- "version": "4.0.0-29893089.d6a282e",
4
+ "version": "4.0.0-29893186.47ed265",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "3.6.1"
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-29893089.d6a282e",
4
+ "version": "4.0.0-29893186.47ed265",
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-29893089.d6a282e",
52
- "@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-29893089.d6a282e",
51
+ "@nuxt/devtools-assets": "npm:@nuxt/devtools-assets-nightly@4.0.0-29893186.47ed265",
52
+ "@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-29893186.47ed265",
53
53
  "@vitejs/devtools": "^0.8.0",
54
54
  "@vitejs/devtools-kit": "^0.8.0",
55
55
  "consola": "^3.4.2",