@nuxt/devtools-kit 0.3.2 → 0.4.1

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.
@@ -2,7 +2,7 @@ import { AppConfig } from 'nuxt/schema';
2
2
  import { NuxtApp } from 'nuxt/dist/app/nuxt';
3
3
  import { Hookable } from 'hookable';
4
4
  import { BirpcReturn } from 'birpc';
5
- import { u as VueInspectorData, V as VueInspectorClient, H as HookInfo, p as PluginMetric, E as ServerFunctions } from './rpc-65887887.js';
5
+ import { v as VueInspectorData, V as VueInspectorClient, H as HookInfo, q as PluginMetric, F as ServerFunctions } from './rpc-6b6ce927.js';
6
6
 
7
7
  interface NuxtDevtoolsClientHooks {
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { M as ModuleCustomTab, F as ClientFunctions, E as ServerFunctions, T as TerminalState } from './rpc-65887887.js';
1
+ import { M as ModuleCustomTab, J as ClientFunctions, F as ServerFunctions, T as TerminalState } from './rpc-6b6ce927.js';
2
2
  import { BirpcGroup } from 'birpc';
3
3
  import { Nuxt } from 'nuxt/schema';
4
4
 
@@ -6,6 +6,8 @@ let clientRef;
6
6
  const fns = [];
7
7
  function onDevtoolsClientConnected(fn) {
8
8
  fns.push(fn);
9
+ if (typeof window === "undefined")
10
+ return;
9
11
  if (window.__NUXT_DEVTOOLS__) {
10
12
  fns.forEach((fn2) => fn2(window.__NUXT_DEVTOOLS__));
11
13
  }
@@ -1,10 +1,10 @@
1
1
  import { Ref } from 'vue';
2
- import { c as NuxtDevtoolsIframeClient } from './client-api-30cc2320.js';
2
+ import { c as NuxtDevtoolsIframeClient } from './client-api-65bbbf73.js';
3
3
  import 'nuxt/schema';
4
4
  import 'nuxt/dist/app/nuxt';
5
5
  import 'hookable';
6
6
  import 'birpc';
7
- import './rpc-65887887.js';
7
+ import './rpc-6b6ce927.js';
8
8
  import 'nitropack';
9
9
  import 'unstorage';
10
10
  import 'vue-router';
@@ -4,6 +4,8 @@ let clientRef;
4
4
  const fns = [];
5
5
  function onDevtoolsClientConnected(fn) {
6
6
  fns.push(fn);
7
+ if (typeof window === "undefined")
8
+ return;
7
9
  if (window.__NUXT_DEVTOOLS__) {
8
10
  fns.forEach((fn2) => fn2(window.__NUXT_DEVTOOLS__));
9
11
  }
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as execa from 'execa';
2
2
  import * as _nuxt_schema from '@nuxt/schema';
3
3
  import { BirpcGroup } from 'birpc';
4
- import { N as NuxtDevtoolsInfo } from './hooks-0a23b654.js';
5
- import { M as ModuleCustomTab, S as SubprocessOptions, T as TerminalState } from './rpc-65887887.js';
4
+ import { N as NuxtDevtoolsInfo } from './hooks-8f09958d.js';
5
+ import { M as ModuleCustomTab, S as SubprocessOptions, T as TerminalState } from './rpc-6b6ce927.js';
6
6
  import 'nuxt/schema';
7
7
  import 'nitropack';
8
8
  import 'unstorage';
@@ -143,6 +143,13 @@ interface AutoImportsWithMetadata {
143
143
  interface RouteInfo extends Pick<RouteRecordNormalized, 'name' | 'path' | 'meta' | 'props' | 'children'> {
144
144
  file?: string;
145
145
  }
146
+ interface ServerRouteInfo {
147
+ route: string;
148
+ filepath: string;
149
+ path: string;
150
+ method?: string;
151
+ type: 'api' | 'route';
152
+ }
146
153
  interface Payload {
147
154
  url: string;
148
155
  time: number;
@@ -217,7 +224,7 @@ interface VueInspectorClient {
217
224
  onUpdated: () => void;
218
225
  }
219
226
  type VueInspectorData = VueInspectorClient['linkParams'] & VueInspectorClient['position'];
220
- type AssetType = 'image' | 'font' | 'video' | 'audio' | 'text' | 'other';
227
+ type AssetType = 'image' | 'font' | 'video' | 'audio' | 'text' | 'json' | 'other';
221
228
  interface AssetInfo {
222
229
  path: string;
223
230
  type: AssetType;
@@ -293,6 +300,7 @@ interface ServerFunctions {
293
300
  getServerHooks(): HookInfo[];
294
301
  getServerLayouts(): NuxtLayout[];
295
302
  getStaticAssets(): Promise<AssetInfo[]>;
303
+ getServerRoutes(): Promise<ServerRouteInfo[]>;
296
304
  checkForUpdateFor(name: string): Promise<PackageUpdateInfo | undefined>;
297
305
  getPackageManager(): Promise<PackageManagerName>;
298
306
  getNpmCommand(command: NpmCommandType, packageName: string, options?: NpmCommandOptions): Promise<string[] | undefined>;
@@ -333,4 +341,4 @@ interface ClientFunctions {
333
341
  }
334
342
  type ClientUpdateEvent = keyof ServerFunctions;
335
343
 
336
- export { AutoImportsWithMetadata as A, BasicModuleInfo as B, CompatibilityStatus as C, GetWizardArgs as D, ServerFunctions as E, ClientFunctions as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ClientUpdateEvent as J, ModuleCustomTab as M, NpmCommandType as N, PackageUpdateInfo as P, RouteInfo as R, SubprocessOptions as S, TerminalState as T, VueInspectorClient as V, WizardFunctions as W, ModuleLaunchView as a, ModuleIframeView as b, ModuleVNodeView as c, ModuleLaunchAction as d, ModuleView as e, ModuleIframeTabLazyOptions as f, ModuleBuiltinTab as g, ModuleTabInfo as h, TerminalBase as i, TerminalAction as j, TerminalInfo as k, PackageManagerName as l, NpmCommandOptions as m, Payload as n, PluginInfoWithMetic as o, PluginMetric as p, ModuleMetric as q, ModuleCompatibility as r, ModuleType as s, MaintainerInfo as t, VueInspectorData as u, AssetType as v, AssetInfo as w, CodeSnippet as x, ComponentRelationship as y, WizardActions as z };
344
+ export { AutoImportsWithMetadata as A, BasicModuleInfo as B, CompatibilityStatus as C, WizardActions as D, GetWizardArgs as E, ServerFunctions as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ClientFunctions as J, ClientUpdateEvent as K, ModuleCustomTab as M, NpmCommandType as N, PackageUpdateInfo as P, RouteInfo as R, SubprocessOptions as S, TerminalState as T, VueInspectorClient as V, WizardFunctions as W, ModuleLaunchView as a, ModuleIframeView as b, ModuleVNodeView as c, ModuleLaunchAction as d, ModuleView as e, ModuleIframeTabLazyOptions as f, ModuleBuiltinTab as g, ModuleTabInfo as h, TerminalBase as i, TerminalAction as j, TerminalInfo as k, PackageManagerName as l, NpmCommandOptions as m, ServerRouteInfo as n, Payload as o, PluginInfoWithMetic as p, PluginMetric as q, ModuleMetric as r, ModuleCompatibility as s, ModuleType as t, MaintainerInfo as u, VueInspectorData as v, AssetType as w, AssetInfo as x, CodeSnippet as y, ComponentRelationship as z };
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { b as ModuleGlobalOptions, M as ModuleOptions, N as NuxtDevtoolsInfo, a as NuxtDevtoolsServerContext, V as VSCodeIntegrationOptions, c as VSCodeTunnelOptions } from './hooks-0a23b654.js';
2
- export { w as AssetInfo, v as AssetType, A as AutoImportsWithMetadata, B as BasicModuleInfo, F as ClientFunctions, J as ClientUpdateEvent, x as CodeSnippet, C as CompatibilityStatus, y as ComponentRelationship, D as GetWizardArgs, G as GitHubContributor, H as HookInfo, I as ImageMeta, t as MaintainerInfo, g as ModuleBuiltinTab, r as ModuleCompatibility, M as ModuleCustomTab, f as ModuleIframeTabLazyOptions, b as ModuleIframeView, d as ModuleLaunchAction, a as ModuleLaunchView, q as ModuleMetric, h as ModuleTabInfo, s as ModuleType, c as ModuleVNodeView, e as ModuleView, m as NpmCommandOptions, N as NpmCommandType, l as PackageManagerName, P as PackageUpdateInfo, n as Payload, o as PluginInfoWithMetic, p as PluginMetric, R as RouteInfo, E as ServerFunctions, S as SubprocessOptions, j as TerminalAction, i as TerminalBase, k as TerminalInfo, T as TerminalState, V as VueInspectorClient, u as VueInspectorData, z as WizardActions, W as WizardFunctions } from './rpc-65887887.js';
3
- export { b as NuxtDevtoolsClient, N as NuxtDevtoolsClientHooks, d as NuxtDevtoolsGlobal, a as NuxtDevtoolsHostClient, c as NuxtDevtoolsIframeClient } from './client-api-30cc2320.js';
1
+ export { b as ModuleGlobalOptions, M as ModuleOptions, N as NuxtDevtoolsInfo, a as NuxtDevtoolsServerContext, V as VSCodeIntegrationOptions, c as VSCodeTunnelOptions } from './hooks-8f09958d.js';
2
+ export { x as AssetInfo, w as AssetType, A as AutoImportsWithMetadata, B as BasicModuleInfo, J as ClientFunctions, K as ClientUpdateEvent, y as CodeSnippet, C as CompatibilityStatus, z as ComponentRelationship, E as GetWizardArgs, G as GitHubContributor, H as HookInfo, I as ImageMeta, u as MaintainerInfo, g as ModuleBuiltinTab, s as ModuleCompatibility, M as ModuleCustomTab, f as ModuleIframeTabLazyOptions, b as ModuleIframeView, d as ModuleLaunchAction, a as ModuleLaunchView, r as ModuleMetric, h as ModuleTabInfo, t as ModuleType, c as ModuleVNodeView, e as ModuleView, m as NpmCommandOptions, N as NpmCommandType, l as PackageManagerName, P as PackageUpdateInfo, o as Payload, p as PluginInfoWithMetic, q as PluginMetric, R as RouteInfo, F as ServerFunctions, n as ServerRouteInfo, S as SubprocessOptions, j as TerminalAction, i as TerminalBase, k as TerminalInfo, T as TerminalState, V as VueInspectorClient, v as VueInspectorData, D as WizardActions, W as WizardFunctions } from './rpc-6b6ce927.js';
3
+ export { b as NuxtDevtoolsClient, N as NuxtDevtoolsClientHooks, d as NuxtDevtoolsGlobal, a as NuxtDevtoolsHostClient, c as NuxtDevtoolsIframeClient } from './client-api-65bbbf73.js';
4
4
  import 'birpc';
5
5
  import 'nuxt/schema';
6
6
  import 'nitropack';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools-kit",
3
3
  "type": "module",
4
- "version": "0.3.2",
4
+ "version": "0.4.1",
5
5
  "license": "MIT",
6
6
  "repository": "nuxt/devtools",
7
7
  "exports": {
@@ -34,15 +34,15 @@
34
34
  "vite": "*"
35
35
  },
36
36
  "dependencies": {
37
- "@nuxt/kit": "^3.3.2",
38
- "@nuxt/schema": "^3.3.2",
37
+ "@nuxt/kit": "^3.4.1",
38
+ "@nuxt/schema": "^3.4.1",
39
39
  "execa": "^7.1.1"
40
40
  },
41
41
  "devDependencies": {
42
- "birpc": "^0.2.10",
43
- "hookable": "^5.5.2",
44
- "unbuild": "^1.1.2",
45
- "unimport": "^3.0.4",
42
+ "birpc": "^0.2.11",
43
+ "hookable": "^5.5.3",
44
+ "unbuild": "^1.2.1",
45
+ "unimport": "^3.0.6",
46
46
  "vue-router": "^4.1.6"
47
47
  },
48
48
  "scripts": {