@nuxt/devtools-kit 4.0.0-alpha.1 → 4.0.0-alpha.2

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/index.cjs CHANGED
@@ -23,6 +23,7 @@ function startSubprocess(execaOptions, tabOptions, nuxt = kit.useNuxt()) {
23
23
  {
24
24
  nodeOptions: {
25
25
  ...execaOptions.nodeOptions,
26
+ cwd: execaOptions.cwd ?? execaOptions.nodeOptions?.cwd,
26
27
  env: {
27
28
  ...process.env,
28
29
  COLORS: "true",
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { BirpcGroup } from 'birpc';
3
3
  import { ChildProcess } from 'node:child_process';
4
4
  import { Result } from 'tinyexec';
5
- import { M as ModuleCustomTab, N as NuxtDevtoolsInfo, S as SubprocessOptions, T as TerminalState } from './shared/devtools-kit.f1VcjZlm.cjs';
5
+ import { M as ModuleCustomTab, N as NuxtDevtoolsInfo, S as SubprocessOptions, T as TerminalState } from './shared/devtools-kit.CijV1blW.cjs';
6
6
  import 'vue';
7
7
  import 'nuxt/schema';
8
8
  import 'unimport';
@@ -32,6 +32,11 @@ declare function startSubprocess(execaOptions: SubprocessOptions, tabOptions: Te
32
32
  restart: () => void;
33
33
  clear: () => void;
34
34
  };
35
+ /**
36
+ * Extend server RPC with namespaced functions.
37
+ *
38
+ * Returns an object with a `broadcast` proxy for calling client functions.
39
+ */
35
40
  declare function extendServerRpc<ClientFunctions extends object = Record<string, unknown>, ServerFunctions extends object = Record<string, unknown>>(namespace: string, functions: ServerFunctions, nuxt?: _nuxt_schema.Nuxt): BirpcGroup<ClientFunctions, ServerFunctions>;
36
41
  declare function onDevToolsInitialized(fn: (info: NuxtDevtoolsInfo) => void, nuxt?: _nuxt_schema.Nuxt): void;
37
42
 
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { BirpcGroup } from 'birpc';
3
3
  import { ChildProcess } from 'node:child_process';
4
4
  import { Result } from 'tinyexec';
5
- import { M as ModuleCustomTab, N as NuxtDevtoolsInfo, S as SubprocessOptions, T as TerminalState } from './shared/devtools-kit.f1VcjZlm.mjs';
5
+ import { M as ModuleCustomTab, N as NuxtDevtoolsInfo, S as SubprocessOptions, T as TerminalState } from './shared/devtools-kit.CijV1blW.mjs';
6
6
  import 'vue';
7
7
  import 'nuxt/schema';
8
8
  import 'unimport';
@@ -32,6 +32,11 @@ declare function startSubprocess(execaOptions: SubprocessOptions, tabOptions: Te
32
32
  restart: () => void;
33
33
  clear: () => void;
34
34
  };
35
+ /**
36
+ * Extend server RPC with namespaced functions.
37
+ *
38
+ * Returns an object with a `broadcast` proxy for calling client functions.
39
+ */
35
40
  declare function extendServerRpc<ClientFunctions extends object = Record<string, unknown>, ServerFunctions extends object = Record<string, unknown>>(namespace: string, functions: ServerFunctions, nuxt?: _nuxt_schema.Nuxt): BirpcGroup<ClientFunctions, ServerFunctions>;
36
41
  declare function onDevToolsInitialized(fn: (info: NuxtDevtoolsInfo) => void, nuxt?: _nuxt_schema.Nuxt): void;
37
42
 
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { BirpcGroup } from 'birpc';
3
3
  import { ChildProcess } from 'node:child_process';
4
4
  import { Result } from 'tinyexec';
5
- import { M as ModuleCustomTab, N as NuxtDevtoolsInfo, S as SubprocessOptions, T as TerminalState } from './shared/devtools-kit.f1VcjZlm.js';
5
+ import { M as ModuleCustomTab, N as NuxtDevtoolsInfo, S as SubprocessOptions, T as TerminalState } from './shared/devtools-kit.CijV1blW.js';
6
6
  import 'vue';
7
7
  import 'nuxt/schema';
8
8
  import 'unimport';
@@ -32,6 +32,11 @@ declare function startSubprocess(execaOptions: SubprocessOptions, tabOptions: Te
32
32
  restart: () => void;
33
33
  clear: () => void;
34
34
  };
35
+ /**
36
+ * Extend server RPC with namespaced functions.
37
+ *
38
+ * Returns an object with a `broadcast` proxy for calling client functions.
39
+ */
35
40
  declare function extendServerRpc<ClientFunctions extends object = Record<string, unknown>, ServerFunctions extends object = Record<string, unknown>>(namespace: string, functions: ServerFunctions, nuxt?: _nuxt_schema.Nuxt): BirpcGroup<ClientFunctions, ServerFunctions>;
36
41
  declare function onDevToolsInitialized(fn: (info: NuxtDevtoolsInfo) => void, nuxt?: _nuxt_schema.Nuxt): void;
37
42
 
package/dist/index.mjs CHANGED
@@ -21,6 +21,7 @@ function startSubprocess(execaOptions, tabOptions, nuxt = useNuxt()) {
21
21
  {
22
22
  nodeOptions: {
23
23
  ...execaOptions.nodeOptions,
24
+ cwd: execaOptions.cwd ?? execaOptions.nodeOptions?.cwd,
24
25
  env: {
25
26
  ...process.env,
26
27
  COLORS: "true",
@@ -379,12 +379,7 @@ interface ModuleOptions {
379
379
  */
380
380
  viteInspect?: boolean;
381
381
  /**
382
- * Disable dev time authorization check.
383
- *
384
- * **NOT RECOMMENDED**, only use this if you know what you are doing.
385
- *
386
- * @see https://github.com/nuxt/devtools/pull/257
387
- * @default false
382
+ * @deprecated Auth is now handled by Vite DevTools. This option is ignored.
388
383
  */
389
384
  disableAuthorization?: boolean;
390
385
  /**
@@ -673,13 +668,32 @@ interface NuxtServerData {
673
668
  }
674
669
  type ClientUpdateEvent = keyof ServerFunctions;
675
670
 
671
+ /**
672
+ * Compatibility RPC interface that supports broadcast and function access.
673
+ * Backed by Vite DevTools Kit's RpcFunctionsHost internally.
674
+ */
675
+ interface NuxtDevtoolsRpc {
676
+ /**
677
+ * Broadcast proxy for calling client functions.
678
+ * Supports `rpc.broadcast.refresh.asEvent(event)` pattern for backward compatibility.
679
+ */
680
+ broadcast: {
681
+ [K in keyof ClientFunctions]: ClientFunctions[K] & {
682
+ asEvent: ClientFunctions[K];
683
+ };
684
+ };
685
+ /**
686
+ * Proxy for accessing server functions locally.
687
+ */
688
+ functions: ServerFunctions;
689
+ }
676
690
  /**
677
691
  * @internal
678
692
  */
679
693
  interface NuxtDevtoolsServerContext {
680
694
  nuxt: Nuxt;
681
695
  options: ModuleOptions;
682
- rpc: BirpcGroup<ClientFunctions, ServerFunctions>;
696
+ rpc: NuxtDevtoolsRpc;
683
697
  /**
684
698
  * Hook to open file in editor
685
699
  */
@@ -689,7 +703,7 @@ interface NuxtDevtoolsServerContext {
689
703
  */
690
704
  refresh: (event: keyof ServerFunctions) => void;
691
705
  /**
692
- * Ensure dev auth token is valid, throw if not
706
+ * @deprecated Auth is now handled by Vite DevTools. This is a noop.
693
707
  */
694
708
  ensureDevAuthToken: (token: string) => Promise<void>;
695
709
  extendServerRpc: <ClientFunctions extends object = Record<string, unknown>, ServerFunctions extends object = Record<string, unknown>>(name: string, functions: ServerFunctions) => BirpcGroup<ClientFunctions, ServerFunctions>;
@@ -774,4 +788,4 @@ declare module '@nuxt/schema' {
774
788
  }
775
789
  }
776
790
 
777
- export type { ServerDebugContext as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, ClientFunctions as C, ModuleTabInfo as D, ModuleType as E, ModuleVNodeView as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ModuleView as J, NpmCommandOptions as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, NpmCommandType as O, PluginMetric as P, NuxtDevToolsOptions as Q, NuxtDevtoolsServerContext as R, SubprocessOptions as S, TerminalState as T, NuxtServerData as U, PackageManagerName as V, PackageUpdateInfo as W, Payload as X, PluginInfoWithMetic as Y, RouteInfo as Z, ScannedNitroTasks as _, ServerFunctions as a, ServerDebugModuleMutationRecord as a0, ServerRouteInfo as a1, ServerRouteInput as a2, ServerRouteInputType as a3, ServerTaskInfo as a4, TabCategory as a5, TerminalAction as a6, TerminalBase as a7, TerminalInfo as a8, VSCodeIntegrationOptions as a9, VSCodeTunnelOptions as aa, VueInspectorClient as ab, VueInspectorData as ac, AnalyzeBuildsInfo as b, AssetEntry as c, AssetInfo as d, AssetType as e, AutoImportsWithMetadata as f, CategorizedTabs as g, ClientUpdateEvent as h, CodeServerOptions as i, CodeServerType as j, CodeSnippet as k, CompatibilityStatus as l, ComponentRelationship as m, ComponentWithRelationships as n, InstallModuleReturn as o, InstalledModuleInfo as p, MaintainerInfo as q, ModuleBuiltinTab as r, ModuleCompatibility as s, ModuleIframeTabLazyOptions as t, ModuleIframeView as u, ModuleLaunchAction as v, ModuleLaunchView as w, ModuleOptions as x, ModuleStaticInfo as y, ModuleStats as z };
791
+ export type { ScannedNitroTasks as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, CategorizedTabs as C, ModuleTabInfo as D, ModuleType as E, ModuleVNodeView as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ModuleView as J, NpmCommandOptions as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, NpmCommandType as O, PluginMetric as P, NuxtDevToolsOptions as Q, NuxtDevtoolsRpc as R, SubprocessOptions as S, TerminalState as T, NuxtDevtoolsServerContext as U, NuxtServerData as V, PackageManagerName as W, PackageUpdateInfo as X, Payload as Y, PluginInfoWithMetic as Z, RouteInfo as _, ServerFunctions as a, ServerDebugContext as a0, ServerDebugModuleMutationRecord as a1, ServerRouteInfo as a2, ServerRouteInput as a3, ServerRouteInputType as a4, ServerTaskInfo as a5, TabCategory as a6, TerminalAction as a7, TerminalBase as a8, TerminalInfo as a9, VSCodeIntegrationOptions as aa, VSCodeTunnelOptions as ab, VueInspectorClient as ac, VueInspectorData as ad, AnalyzeBuildsInfo as b, AssetEntry as c, AssetInfo as d, AssetType as e, AutoImportsWithMetadata as f, ClientFunctions as g, ClientUpdateEvent as h, CodeServerOptions as i, CodeServerType as j, CodeSnippet as k, CompatibilityStatus as l, ComponentRelationship as m, ComponentWithRelationships as n, InstallModuleReturn as o, InstalledModuleInfo as p, MaintainerInfo as q, ModuleBuiltinTab as r, ModuleCompatibility as s, ModuleIframeTabLazyOptions as t, ModuleIframeView as u, ModuleLaunchAction as v, ModuleLaunchView as w, ModuleOptions as x, ModuleStaticInfo as y, ModuleStats as z };
@@ -379,12 +379,7 @@ interface ModuleOptions {
379
379
  */
380
380
  viteInspect?: boolean;
381
381
  /**
382
- * Disable dev time authorization check.
383
- *
384
- * **NOT RECOMMENDED**, only use this if you know what you are doing.
385
- *
386
- * @see https://github.com/nuxt/devtools/pull/257
387
- * @default false
382
+ * @deprecated Auth is now handled by Vite DevTools. This option is ignored.
388
383
  */
389
384
  disableAuthorization?: boolean;
390
385
  /**
@@ -673,13 +668,32 @@ interface NuxtServerData {
673
668
  }
674
669
  type ClientUpdateEvent = keyof ServerFunctions;
675
670
 
671
+ /**
672
+ * Compatibility RPC interface that supports broadcast and function access.
673
+ * Backed by Vite DevTools Kit's RpcFunctionsHost internally.
674
+ */
675
+ interface NuxtDevtoolsRpc {
676
+ /**
677
+ * Broadcast proxy for calling client functions.
678
+ * Supports `rpc.broadcast.refresh.asEvent(event)` pattern for backward compatibility.
679
+ */
680
+ broadcast: {
681
+ [K in keyof ClientFunctions]: ClientFunctions[K] & {
682
+ asEvent: ClientFunctions[K];
683
+ };
684
+ };
685
+ /**
686
+ * Proxy for accessing server functions locally.
687
+ */
688
+ functions: ServerFunctions;
689
+ }
676
690
  /**
677
691
  * @internal
678
692
  */
679
693
  interface NuxtDevtoolsServerContext {
680
694
  nuxt: Nuxt;
681
695
  options: ModuleOptions;
682
- rpc: BirpcGroup<ClientFunctions, ServerFunctions>;
696
+ rpc: NuxtDevtoolsRpc;
683
697
  /**
684
698
  * Hook to open file in editor
685
699
  */
@@ -689,7 +703,7 @@ interface NuxtDevtoolsServerContext {
689
703
  */
690
704
  refresh: (event: keyof ServerFunctions) => void;
691
705
  /**
692
- * Ensure dev auth token is valid, throw if not
706
+ * @deprecated Auth is now handled by Vite DevTools. This is a noop.
693
707
  */
694
708
  ensureDevAuthToken: (token: string) => Promise<void>;
695
709
  extendServerRpc: <ClientFunctions extends object = Record<string, unknown>, ServerFunctions extends object = Record<string, unknown>>(name: string, functions: ServerFunctions) => BirpcGroup<ClientFunctions, ServerFunctions>;
@@ -774,4 +788,4 @@ declare module '@nuxt/schema' {
774
788
  }
775
789
  }
776
790
 
777
- export type { ServerDebugContext as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, ClientFunctions as C, ModuleTabInfo as D, ModuleType as E, ModuleVNodeView as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ModuleView as J, NpmCommandOptions as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, NpmCommandType as O, PluginMetric as P, NuxtDevToolsOptions as Q, NuxtDevtoolsServerContext as R, SubprocessOptions as S, TerminalState as T, NuxtServerData as U, PackageManagerName as V, PackageUpdateInfo as W, Payload as X, PluginInfoWithMetic as Y, RouteInfo as Z, ScannedNitroTasks as _, ServerFunctions as a, ServerDebugModuleMutationRecord as a0, ServerRouteInfo as a1, ServerRouteInput as a2, ServerRouteInputType as a3, ServerTaskInfo as a4, TabCategory as a5, TerminalAction as a6, TerminalBase as a7, TerminalInfo as a8, VSCodeIntegrationOptions as a9, VSCodeTunnelOptions as aa, VueInspectorClient as ab, VueInspectorData as ac, AnalyzeBuildsInfo as b, AssetEntry as c, AssetInfo as d, AssetType as e, AutoImportsWithMetadata as f, CategorizedTabs as g, ClientUpdateEvent as h, CodeServerOptions as i, CodeServerType as j, CodeSnippet as k, CompatibilityStatus as l, ComponentRelationship as m, ComponentWithRelationships as n, InstallModuleReturn as o, InstalledModuleInfo as p, MaintainerInfo as q, ModuleBuiltinTab as r, ModuleCompatibility as s, ModuleIframeTabLazyOptions as t, ModuleIframeView as u, ModuleLaunchAction as v, ModuleLaunchView as w, ModuleOptions as x, ModuleStaticInfo as y, ModuleStats as z };
791
+ export type { ScannedNitroTasks as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, CategorizedTabs as C, ModuleTabInfo as D, ModuleType as E, ModuleVNodeView as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ModuleView as J, NpmCommandOptions as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, NpmCommandType as O, PluginMetric as P, NuxtDevToolsOptions as Q, NuxtDevtoolsRpc as R, SubprocessOptions as S, TerminalState as T, NuxtDevtoolsServerContext as U, NuxtServerData as V, PackageManagerName as W, PackageUpdateInfo as X, Payload as Y, PluginInfoWithMetic as Z, RouteInfo as _, ServerFunctions as a, ServerDebugContext as a0, ServerDebugModuleMutationRecord as a1, ServerRouteInfo as a2, ServerRouteInput as a3, ServerRouteInputType as a4, ServerTaskInfo as a5, TabCategory as a6, TerminalAction as a7, TerminalBase as a8, TerminalInfo as a9, VSCodeIntegrationOptions as aa, VSCodeTunnelOptions as ab, VueInspectorClient as ac, VueInspectorData as ad, AnalyzeBuildsInfo as b, AssetEntry as c, AssetInfo as d, AssetType as e, AutoImportsWithMetadata as f, ClientFunctions as g, ClientUpdateEvent as h, CodeServerOptions as i, CodeServerType as j, CodeSnippet as k, CompatibilityStatus as l, ComponentRelationship as m, ComponentWithRelationships as n, InstallModuleReturn as o, InstalledModuleInfo as p, MaintainerInfo as q, ModuleBuiltinTab as r, ModuleCompatibility as s, ModuleIframeTabLazyOptions as t, ModuleIframeView as u, ModuleLaunchAction as v, ModuleLaunchView as w, ModuleOptions as x, ModuleStaticInfo as y, ModuleStats as z };
@@ -379,12 +379,7 @@ interface ModuleOptions {
379
379
  */
380
380
  viteInspect?: boolean;
381
381
  /**
382
- * Disable dev time authorization check.
383
- *
384
- * **NOT RECOMMENDED**, only use this if you know what you are doing.
385
- *
386
- * @see https://github.com/nuxt/devtools/pull/257
387
- * @default false
382
+ * @deprecated Auth is now handled by Vite DevTools. This option is ignored.
388
383
  */
389
384
  disableAuthorization?: boolean;
390
385
  /**
@@ -673,13 +668,32 @@ interface NuxtServerData {
673
668
  }
674
669
  type ClientUpdateEvent = keyof ServerFunctions;
675
670
 
671
+ /**
672
+ * Compatibility RPC interface that supports broadcast and function access.
673
+ * Backed by Vite DevTools Kit's RpcFunctionsHost internally.
674
+ */
675
+ interface NuxtDevtoolsRpc {
676
+ /**
677
+ * Broadcast proxy for calling client functions.
678
+ * Supports `rpc.broadcast.refresh.asEvent(event)` pattern for backward compatibility.
679
+ */
680
+ broadcast: {
681
+ [K in keyof ClientFunctions]: ClientFunctions[K] & {
682
+ asEvent: ClientFunctions[K];
683
+ };
684
+ };
685
+ /**
686
+ * Proxy for accessing server functions locally.
687
+ */
688
+ functions: ServerFunctions;
689
+ }
676
690
  /**
677
691
  * @internal
678
692
  */
679
693
  interface NuxtDevtoolsServerContext {
680
694
  nuxt: Nuxt;
681
695
  options: ModuleOptions;
682
- rpc: BirpcGroup<ClientFunctions, ServerFunctions>;
696
+ rpc: NuxtDevtoolsRpc;
683
697
  /**
684
698
  * Hook to open file in editor
685
699
  */
@@ -689,7 +703,7 @@ interface NuxtDevtoolsServerContext {
689
703
  */
690
704
  refresh: (event: keyof ServerFunctions) => void;
691
705
  /**
692
- * Ensure dev auth token is valid, throw if not
706
+ * @deprecated Auth is now handled by Vite DevTools. This is a noop.
693
707
  */
694
708
  ensureDevAuthToken: (token: string) => Promise<void>;
695
709
  extendServerRpc: <ClientFunctions extends object = Record<string, unknown>, ServerFunctions extends object = Record<string, unknown>>(name: string, functions: ServerFunctions) => BirpcGroup<ClientFunctions, ServerFunctions>;
@@ -774,4 +788,4 @@ declare module '@nuxt/schema' {
774
788
  }
775
789
  }
776
790
 
777
- export type { ServerDebugContext as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, ClientFunctions as C, ModuleTabInfo as D, ModuleType as E, ModuleVNodeView as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ModuleView as J, NpmCommandOptions as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, NpmCommandType as O, PluginMetric as P, NuxtDevToolsOptions as Q, NuxtDevtoolsServerContext as R, SubprocessOptions as S, TerminalState as T, NuxtServerData as U, PackageManagerName as V, PackageUpdateInfo as W, Payload as X, PluginInfoWithMetic as Y, RouteInfo as Z, ScannedNitroTasks as _, ServerFunctions as a, ServerDebugModuleMutationRecord as a0, ServerRouteInfo as a1, ServerRouteInput as a2, ServerRouteInputType as a3, ServerTaskInfo as a4, TabCategory as a5, TerminalAction as a6, TerminalBase as a7, TerminalInfo as a8, VSCodeIntegrationOptions as a9, VSCodeTunnelOptions as aa, VueInspectorClient as ab, VueInspectorData as ac, AnalyzeBuildsInfo as b, AssetEntry as c, AssetInfo as d, AssetType as e, AutoImportsWithMetadata as f, CategorizedTabs as g, ClientUpdateEvent as h, CodeServerOptions as i, CodeServerType as j, CodeSnippet as k, CompatibilityStatus as l, ComponentRelationship as m, ComponentWithRelationships as n, InstallModuleReturn as o, InstalledModuleInfo as p, MaintainerInfo as q, ModuleBuiltinTab as r, ModuleCompatibility as s, ModuleIframeTabLazyOptions as t, ModuleIframeView as u, ModuleLaunchAction as v, ModuleLaunchView as w, ModuleOptions as x, ModuleStaticInfo as y, ModuleStats as z };
791
+ export type { ScannedNitroTasks as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, CategorizedTabs as C, ModuleTabInfo as D, ModuleType as E, ModuleVNodeView as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ModuleView as J, NpmCommandOptions as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, NpmCommandType as O, PluginMetric as P, NuxtDevToolsOptions as Q, NuxtDevtoolsRpc as R, SubprocessOptions as S, TerminalState as T, NuxtDevtoolsServerContext as U, NuxtServerData as V, PackageManagerName as W, PackageUpdateInfo as X, Payload as Y, PluginInfoWithMetic as Z, RouteInfo as _, ServerFunctions as a, ServerDebugContext as a0, ServerDebugModuleMutationRecord as a1, ServerRouteInfo as a2, ServerRouteInput as a3, ServerRouteInputType as a4, ServerTaskInfo as a5, TabCategory as a6, TerminalAction as a7, TerminalBase as a8, TerminalInfo as a9, VSCodeIntegrationOptions as aa, VSCodeTunnelOptions as ab, VueInspectorClient as ac, VueInspectorData as ad, AnalyzeBuildsInfo as b, AssetEntry as c, AssetInfo as d, AssetType as e, AutoImportsWithMetadata as f, ClientFunctions as g, ClientUpdateEvent as h, CodeServerOptions as i, CodeServerType as j, CodeSnippet as k, CompatibilityStatus as l, ComponentRelationship as m, ComponentWithRelationships as n, InstallModuleReturn as o, InstalledModuleInfo as p, MaintainerInfo as q, ModuleBuiltinTab as r, ModuleCompatibility as s, ModuleIframeTabLazyOptions as t, ModuleIframeView as u, ModuleLaunchAction as v, ModuleLaunchView as w, ModuleOptions as x, ModuleStaticInfo as y, ModuleStats as z };
package/dist/types.d.cts CHANGED
@@ -1,6 +1,5 @@
1
- import { a as ServerFunctions, C as ClientFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.f1VcjZlm.cjs';
2
- export { A as AnalyzeBuildMeta, b as AnalyzeBuildsInfo, c as AssetEntry, d as AssetInfo, e as AssetType, f as AutoImportsWithMetadata, B as BasicModuleInfo, g as CategorizedTabs, h as ClientUpdateEvent, i as CodeServerOptions, j as CodeServerType, k as CodeSnippet, l as CompatibilityStatus, m as ComponentRelationship, n as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, o as InstallModuleReturn, p as InstalledModuleInfo, q as MaintainerInfo, r as ModuleBuiltinTab, s as ModuleCompatibility, M as ModuleCustomTab, t as ModuleIframeTabLazyOptions, u as ModuleIframeView, v as ModuleLaunchAction, w as ModuleLaunchView, x as ModuleOptions, y as ModuleStaticInfo, z as ModuleStats, D as ModuleTabInfo, E as ModuleType, F as ModuleVNodeView, J as ModuleView, K as NpmCommandOptions, O as NpmCommandType, Q as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, R as NuxtDevtoolsServerContext, U as NuxtServerData, V as PackageManagerName, W as PackageUpdateInfo, X as Payload, Y as PluginInfoWithMetic, Z as RouteInfo, _ as ScannedNitroTasks, $ as ServerDebugContext, a0 as ServerDebugModuleMutationRecord, a1 as ServerRouteInfo, a2 as ServerRouteInput, a3 as ServerRouteInputType, a4 as ServerTaskInfo, S as SubprocessOptions, a5 as TabCategory, a6 as TerminalAction, a7 as TerminalBase, a8 as TerminalInfo, T as TerminalState, a9 as VSCodeIntegrationOptions, aa as VSCodeTunnelOptions, ab as VueInspectorClient, ac as VueInspectorData } from './shared/devtools-kit.f1VcjZlm.cjs';
3
- import { BirpcReturn } from 'birpc';
1
+ import { a as ServerFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.CijV1blW.cjs';
2
+ export { A as AnalyzeBuildMeta, b as AnalyzeBuildsInfo, c as AssetEntry, d as AssetInfo, e as AssetType, f as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, g as ClientFunctions, h as ClientUpdateEvent, i as CodeServerOptions, j as CodeServerType, k as CodeSnippet, l as CompatibilityStatus, m as ComponentRelationship, n as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, o as InstallModuleReturn, p as InstalledModuleInfo, q as MaintainerInfo, r as ModuleBuiltinTab, s as ModuleCompatibility, M as ModuleCustomTab, t as ModuleIframeTabLazyOptions, u as ModuleIframeView, v as ModuleLaunchAction, w as ModuleLaunchView, x as ModuleOptions, y as ModuleStaticInfo, z as ModuleStats, D as ModuleTabInfo, E as ModuleType, F as ModuleVNodeView, J as ModuleView, K as NpmCommandOptions, O as NpmCommandType, Q as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, R as NuxtDevtoolsRpc, U as NuxtDevtoolsServerContext, V as NuxtServerData, W as PackageManagerName, X as PackageUpdateInfo, Y as Payload, Z as PluginInfoWithMetic, _ as RouteInfo, $ as ScannedNitroTasks, a0 as ServerDebugContext, a1 as ServerDebugModuleMutationRecord, a2 as ServerRouteInfo, a3 as ServerRouteInput, a4 as ServerRouteInputType, a5 as ServerTaskInfo, S as SubprocessOptions, a6 as TabCategory, a7 as TerminalAction, a8 as TerminalBase, a9 as TerminalInfo, T as TerminalState, aa as VSCodeIntegrationOptions, ab as VSCodeTunnelOptions, ac as VueInspectorClient, ad as VueInspectorData } from './shared/devtools-kit.CijV1blW.cjs';
4
3
  import { Hookable } from 'hookable';
5
4
  import { NuxtApp } from 'nuxt/app';
6
5
  import { AppConfig } from 'nuxt/schema';
@@ -8,6 +7,7 @@ import { $Fetch } from 'ofetch';
8
7
  import { BuiltinLanguage } from 'shiki';
9
8
  import { Ref } from 'vue';
10
9
  import { StackFrame } from 'error-stack-parser-es';
10
+ import 'birpc';
11
11
  import 'unimport';
12
12
  import 'vue-router';
13
13
  import 'nitropack';
@@ -149,15 +149,18 @@ interface NuxtDevtoolsHostClient {
149
149
  interface CodeHighlightOptions {
150
150
  grammarContextCode?: string;
151
151
  }
152
+ type AsyncServerFunctions = {
153
+ [K in keyof ServerFunctions]: (...args: Parameters<ServerFunctions[K]>) => Promise<Awaited<ReturnType<ServerFunctions[K]>>>;
154
+ };
152
155
  interface NuxtDevtoolsClient {
153
- rpc: BirpcReturn<ServerFunctions, ClientFunctions>;
156
+ rpc: AsyncServerFunctions;
154
157
  renderCodeHighlight: (code: string, lang?: BuiltinLanguage, options?: CodeHighlightOptions) => {
155
158
  code: string;
156
159
  supported: boolean;
157
160
  };
158
161
  renderMarkdown: (markdown: string) => string;
159
162
  colorMode: string;
160
- extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => BirpcReturn<ServerFunctions, ClientFunctions>;
163
+ extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
161
164
  }
162
165
  interface NuxtDevtoolsIframeClient {
163
166
  host: NuxtDevtoolsHostClient;
@@ -167,5 +170,5 @@ interface NuxtDevtoolsGlobal {
167
170
  setClient: (client: NuxtDevtoolsHostClient) => void;
168
171
  }
169
172
 
170
- export { ClientFunctions, HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
171
- export type { CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
173
+ export { HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
174
+ export type { AsyncServerFunctions, CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
package/dist/types.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import { a as ServerFunctions, C as ClientFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.f1VcjZlm.mjs';
2
- export { A as AnalyzeBuildMeta, b as AnalyzeBuildsInfo, c as AssetEntry, d as AssetInfo, e as AssetType, f as AutoImportsWithMetadata, B as BasicModuleInfo, g as CategorizedTabs, h as ClientUpdateEvent, i as CodeServerOptions, j as CodeServerType, k as CodeSnippet, l as CompatibilityStatus, m as ComponentRelationship, n as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, o as InstallModuleReturn, p as InstalledModuleInfo, q as MaintainerInfo, r as ModuleBuiltinTab, s as ModuleCompatibility, M as ModuleCustomTab, t as ModuleIframeTabLazyOptions, u as ModuleIframeView, v as ModuleLaunchAction, w as ModuleLaunchView, x as ModuleOptions, y as ModuleStaticInfo, z as ModuleStats, D as ModuleTabInfo, E as ModuleType, F as ModuleVNodeView, J as ModuleView, K as NpmCommandOptions, O as NpmCommandType, Q as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, R as NuxtDevtoolsServerContext, U as NuxtServerData, V as PackageManagerName, W as PackageUpdateInfo, X as Payload, Y as PluginInfoWithMetic, Z as RouteInfo, _ as ScannedNitroTasks, $ as ServerDebugContext, a0 as ServerDebugModuleMutationRecord, a1 as ServerRouteInfo, a2 as ServerRouteInput, a3 as ServerRouteInputType, a4 as ServerTaskInfo, S as SubprocessOptions, a5 as TabCategory, a6 as TerminalAction, a7 as TerminalBase, a8 as TerminalInfo, T as TerminalState, a9 as VSCodeIntegrationOptions, aa as VSCodeTunnelOptions, ab as VueInspectorClient, ac as VueInspectorData } from './shared/devtools-kit.f1VcjZlm.mjs';
3
- import { BirpcReturn } from 'birpc';
1
+ import { a as ServerFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.CijV1blW.mjs';
2
+ export { A as AnalyzeBuildMeta, b as AnalyzeBuildsInfo, c as AssetEntry, d as AssetInfo, e as AssetType, f as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, g as ClientFunctions, h as ClientUpdateEvent, i as CodeServerOptions, j as CodeServerType, k as CodeSnippet, l as CompatibilityStatus, m as ComponentRelationship, n as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, o as InstallModuleReturn, p as InstalledModuleInfo, q as MaintainerInfo, r as ModuleBuiltinTab, s as ModuleCompatibility, M as ModuleCustomTab, t as ModuleIframeTabLazyOptions, u as ModuleIframeView, v as ModuleLaunchAction, w as ModuleLaunchView, x as ModuleOptions, y as ModuleStaticInfo, z as ModuleStats, D as ModuleTabInfo, E as ModuleType, F as ModuleVNodeView, J as ModuleView, K as NpmCommandOptions, O as NpmCommandType, Q as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, R as NuxtDevtoolsRpc, U as NuxtDevtoolsServerContext, V as NuxtServerData, W as PackageManagerName, X as PackageUpdateInfo, Y as Payload, Z as PluginInfoWithMetic, _ as RouteInfo, $ as ScannedNitroTasks, a0 as ServerDebugContext, a1 as ServerDebugModuleMutationRecord, a2 as ServerRouteInfo, a3 as ServerRouteInput, a4 as ServerRouteInputType, a5 as ServerTaskInfo, S as SubprocessOptions, a6 as TabCategory, a7 as TerminalAction, a8 as TerminalBase, a9 as TerminalInfo, T as TerminalState, aa as VSCodeIntegrationOptions, ab as VSCodeTunnelOptions, ac as VueInspectorClient, ad as VueInspectorData } from './shared/devtools-kit.CijV1blW.mjs';
4
3
  import { Hookable } from 'hookable';
5
4
  import { NuxtApp } from 'nuxt/app';
6
5
  import { AppConfig } from 'nuxt/schema';
@@ -8,6 +7,7 @@ import { $Fetch } from 'ofetch';
8
7
  import { BuiltinLanguage } from 'shiki';
9
8
  import { Ref } from 'vue';
10
9
  import { StackFrame } from 'error-stack-parser-es';
10
+ import 'birpc';
11
11
  import 'unimport';
12
12
  import 'vue-router';
13
13
  import 'nitropack';
@@ -149,15 +149,18 @@ interface NuxtDevtoolsHostClient {
149
149
  interface CodeHighlightOptions {
150
150
  grammarContextCode?: string;
151
151
  }
152
+ type AsyncServerFunctions = {
153
+ [K in keyof ServerFunctions]: (...args: Parameters<ServerFunctions[K]>) => Promise<Awaited<ReturnType<ServerFunctions[K]>>>;
154
+ };
152
155
  interface NuxtDevtoolsClient {
153
- rpc: BirpcReturn<ServerFunctions, ClientFunctions>;
156
+ rpc: AsyncServerFunctions;
154
157
  renderCodeHighlight: (code: string, lang?: BuiltinLanguage, options?: CodeHighlightOptions) => {
155
158
  code: string;
156
159
  supported: boolean;
157
160
  };
158
161
  renderMarkdown: (markdown: string) => string;
159
162
  colorMode: string;
160
- extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => BirpcReturn<ServerFunctions, ClientFunctions>;
163
+ extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
161
164
  }
162
165
  interface NuxtDevtoolsIframeClient {
163
166
  host: NuxtDevtoolsHostClient;
@@ -167,5 +170,5 @@ interface NuxtDevtoolsGlobal {
167
170
  setClient: (client: NuxtDevtoolsHostClient) => void;
168
171
  }
169
172
 
170
- export { ClientFunctions, HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
171
- export type { CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
173
+ export { HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
174
+ export type { AsyncServerFunctions, CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
package/dist/types.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { a as ServerFunctions, C as ClientFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.f1VcjZlm.js';
2
- export { A as AnalyzeBuildMeta, b as AnalyzeBuildsInfo, c as AssetEntry, d as AssetInfo, e as AssetType, f as AutoImportsWithMetadata, B as BasicModuleInfo, g as CategorizedTabs, h as ClientUpdateEvent, i as CodeServerOptions, j as CodeServerType, k as CodeSnippet, l as CompatibilityStatus, m as ComponentRelationship, n as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, o as InstallModuleReturn, p as InstalledModuleInfo, q as MaintainerInfo, r as ModuleBuiltinTab, s as ModuleCompatibility, M as ModuleCustomTab, t as ModuleIframeTabLazyOptions, u as ModuleIframeView, v as ModuleLaunchAction, w as ModuleLaunchView, x as ModuleOptions, y as ModuleStaticInfo, z as ModuleStats, D as ModuleTabInfo, E as ModuleType, F as ModuleVNodeView, J as ModuleView, K as NpmCommandOptions, O as NpmCommandType, Q as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, R as NuxtDevtoolsServerContext, U as NuxtServerData, V as PackageManagerName, W as PackageUpdateInfo, X as Payload, Y as PluginInfoWithMetic, Z as RouteInfo, _ as ScannedNitroTasks, $ as ServerDebugContext, a0 as ServerDebugModuleMutationRecord, a1 as ServerRouteInfo, a2 as ServerRouteInput, a3 as ServerRouteInputType, a4 as ServerTaskInfo, S as SubprocessOptions, a5 as TabCategory, a6 as TerminalAction, a7 as TerminalBase, a8 as TerminalInfo, T as TerminalState, a9 as VSCodeIntegrationOptions, aa as VSCodeTunnelOptions, ab as VueInspectorClient, ac as VueInspectorData } from './shared/devtools-kit.f1VcjZlm.js';
3
- import { BirpcReturn } from 'birpc';
1
+ import { a as ServerFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.CijV1blW.js';
2
+ export { A as AnalyzeBuildMeta, b as AnalyzeBuildsInfo, c as AssetEntry, d as AssetInfo, e as AssetType, f as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, g as ClientFunctions, h as ClientUpdateEvent, i as CodeServerOptions, j as CodeServerType, k as CodeSnippet, l as CompatibilityStatus, m as ComponentRelationship, n as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, o as InstallModuleReturn, p as InstalledModuleInfo, q as MaintainerInfo, r as ModuleBuiltinTab, s as ModuleCompatibility, M as ModuleCustomTab, t as ModuleIframeTabLazyOptions, u as ModuleIframeView, v as ModuleLaunchAction, w as ModuleLaunchView, x as ModuleOptions, y as ModuleStaticInfo, z as ModuleStats, D as ModuleTabInfo, E as ModuleType, F as ModuleVNodeView, J as ModuleView, K as NpmCommandOptions, O as NpmCommandType, Q as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, R as NuxtDevtoolsRpc, U as NuxtDevtoolsServerContext, V as NuxtServerData, W as PackageManagerName, X as PackageUpdateInfo, Y as Payload, Z as PluginInfoWithMetic, _ as RouteInfo, $ as ScannedNitroTasks, a0 as ServerDebugContext, a1 as ServerDebugModuleMutationRecord, a2 as ServerRouteInfo, a3 as ServerRouteInput, a4 as ServerRouteInputType, a5 as ServerTaskInfo, S as SubprocessOptions, a6 as TabCategory, a7 as TerminalAction, a8 as TerminalBase, a9 as TerminalInfo, T as TerminalState, aa as VSCodeIntegrationOptions, ab as VSCodeTunnelOptions, ac as VueInspectorClient, ad as VueInspectorData } from './shared/devtools-kit.CijV1blW.js';
4
3
  import { Hookable } from 'hookable';
5
4
  import { NuxtApp } from 'nuxt/app';
6
5
  import { AppConfig } from 'nuxt/schema';
@@ -8,6 +7,7 @@ import { $Fetch } from 'ofetch';
8
7
  import { BuiltinLanguage } from 'shiki';
9
8
  import { Ref } from 'vue';
10
9
  import { StackFrame } from 'error-stack-parser-es';
10
+ import 'birpc';
11
11
  import 'unimport';
12
12
  import 'vue-router';
13
13
  import 'nitropack';
@@ -149,15 +149,18 @@ interface NuxtDevtoolsHostClient {
149
149
  interface CodeHighlightOptions {
150
150
  grammarContextCode?: string;
151
151
  }
152
+ type AsyncServerFunctions = {
153
+ [K in keyof ServerFunctions]: (...args: Parameters<ServerFunctions[K]>) => Promise<Awaited<ReturnType<ServerFunctions[K]>>>;
154
+ };
152
155
  interface NuxtDevtoolsClient {
153
- rpc: BirpcReturn<ServerFunctions, ClientFunctions>;
156
+ rpc: AsyncServerFunctions;
154
157
  renderCodeHighlight: (code: string, lang?: BuiltinLanguage, options?: CodeHighlightOptions) => {
155
158
  code: string;
156
159
  supported: boolean;
157
160
  };
158
161
  renderMarkdown: (markdown: string) => string;
159
162
  colorMode: string;
160
- extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => BirpcReturn<ServerFunctions, ClientFunctions>;
163
+ extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
161
164
  }
162
165
  interface NuxtDevtoolsIframeClient {
163
166
  host: NuxtDevtoolsHostClient;
@@ -167,5 +170,5 @@ interface NuxtDevtoolsGlobal {
167
170
  setClient: (client: NuxtDevtoolsHostClient) => void;
168
171
  }
169
172
 
170
- export { ClientFunctions, HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
171
- export type { CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
173
+ export { HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
174
+ export type { AsyncServerFunctions, CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools-kit",
3
3
  "type": "module",
4
- "version": "4.0.0-alpha.1",
4
+ "version": "4.0.0-alpha.2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://devtools.nuxt.com/module/utils-kit",
7
7
  "repository": {
@@ -51,7 +51,7 @@
51
51
  "hookable": "^6.1.0",
52
52
  "unbuild": "^3.6.1",
53
53
  "unimport": "^6.0.2",
54
- "vue-router": "^5.0.3"
54
+ "vue-router": "^5.0.4"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "unbuild",