@nuxt/devtools-kit 3.4.0 → 4.0.0-alpha.10

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/types.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as ServerFunctions, C as ClientFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.DK4FFgLu.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 GetWizardArgs, o as GitHubContributor, I as ImageMeta, p as InstallModuleReturn, q as InstalledModuleInfo, r as MaintainerInfo, s as ModuleBuiltinTab, t as ModuleCompatibility, M as ModuleCustomTab, u as ModuleGlobalOptions, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, V as NuxtDevtoolsServerContext, W as NuxtServerData, X as PackageManagerName, Y as PackageUpdateInfo, Z as Payload, _ as PluginInfoWithMetic, $ as RouteInfo, a0 as ScannedNitroTasks, a1 as ServerDebugContext, a2 as ServerDebugModuleMutationRecord, a3 as ServerRouteInfo, a4 as ServerRouteInput, a5 as ServerRouteInputType, a6 as ServerTaskInfo, S as SubprocessOptions, a7 as TabCategory, a8 as TerminalAction, a9 as TerminalBase, aa as TerminalInfo, T as TerminalState, ab as VSCodeIntegrationOptions, ac as VSCodeTunnelOptions, ad as VueInspectorClient, ae as VueInspectorData, af as WizardActions, ag as WizardFunctions } from './shared/devtools-kit.DK4FFgLu.cjs';
3
- import { BirpcReturn } from 'birpc';
1
+ import { b as ServerFunctions, c as NuxtDevtoolsNotifyInput, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.DepvFgru.cjs';
2
+ export { A as AnalyzeBuildMeta, d as AnalyzeBuildsInfo, e as AssetEntry, f as AssetInfo, g as AssetType, h as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, i as ClientFunctions, j as ClientUpdateEvent, k as CodeServerIntegrationOptions, l as CodeServerType, m as CodeSnippet, n as CompatibilityStatus, o as ComponentRelationship, p as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, q as InstallModuleReturn, r as InstalledModuleInfo, s as MaintainerInfo, t as ModuleBuiltinTab, u as ModuleCompatibility, M as ModuleCustomTab, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, a as NuxtDevtoolsInfo, V as NuxtDevtoolsNotifyLevel, W as NuxtDevtoolsRpc, N as NuxtDevtoolsServerContext, X as NuxtServerData, Y as PackageManagerName, Z as PackageUpdateInfo, _ as Payload, $ as PluginInfoWithMetic, a0 as RouteInfo, a1 as ScannedNitroTasks, a2 as ServerDebugContext, a3 as ServerDebugModuleMutationRecord, a4 as ServerRouteInfo, a5 as ServerRouteInput, a6 as ServerRouteInputType, a7 as ServerTaskInfo, S as SubprocessOptions, a8 as TabCategory, a9 as TerminalAction, aa as TerminalBase, ab as TerminalInfo, T as TerminalState, ac as VSCodeIntegrationOptions, ad as VSCodeTunnelOptions, ae as VueInspectorClient, af as VueInspectorData } from './shared/devtools-kit.DepvFgru.cjs';
3
+ import { DevToolsRpcClient } from '@vitejs/devtools-kit/client';
4
4
  import { Hookable } from 'hookable';
5
5
  import { NuxtApp } from 'nuxt/app';
6
6
  import { AppConfig } from 'nuxt/schema';
@@ -8,13 +8,16 @@ import { $Fetch } from 'ofetch';
8
8
  import { BuiltinLanguage } from 'shiki';
9
9
  import { Ref } from 'vue';
10
10
  import { StackFrame } from 'error-stack-parser-es';
11
+ import '@vitejs/devtools-kit';
12
+ import 'birpc';
11
13
  import 'unimport';
12
14
  import 'vue-router';
13
- import 'nitropack';
14
15
  import 'unstorage';
15
16
  import 'vite';
16
17
  import '@nuxt/schema';
17
- import 'execa';
18
+ import 'nitro/types';
19
+ import 'nitropack';
20
+ import 'node:child_process';
18
21
 
19
22
  interface TimelineEventFunction {
20
23
  type: 'function';
@@ -121,16 +124,6 @@ interface NuxtDevtoolsHostClient {
121
124
  toggle: () => void;
122
125
  reload: () => void;
123
126
  navigate: (path: string) => void;
124
- /**
125
- * Popup the DevTools frame into Picture-in-Picture mode
126
- *
127
- * Requires Chrome 111 with experimental flag enabled.
128
- *
129
- * Function is undefined when not supported.
130
- *
131
- * @see https://developer.chrome.com/docs/web-platform/document-picture-in-picture/
132
- */
133
- popup?: () => any;
134
127
  };
135
128
  app: {
136
129
  reload: () => void;
@@ -159,15 +152,41 @@ interface NuxtDevtoolsHostClient {
159
152
  interface CodeHighlightOptions {
160
153
  grammarContextCode?: string;
161
154
  }
155
+ type AsyncServerFunctions = {
156
+ [K in keyof ServerFunctions]: (...args: Parameters<ServerFunctions[K]>) => Promise<Awaited<ReturnType<ServerFunctions[K]>>>;
157
+ };
162
158
  interface NuxtDevtoolsClient {
163
- rpc: BirpcReturn<ServerFunctions, ClientFunctions>;
159
+ rpc: AsyncServerFunctions;
164
160
  renderCodeHighlight: (code: string, lang?: BuiltinLanguage, options?: CodeHighlightOptions) => {
165
161
  code: string;
166
162
  supported: boolean;
167
163
  };
168
164
  renderMarkdown: (markdown: string) => string;
169
165
  colorMode: string;
170
- extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => BirpcReturn<ServerFunctions, ClientFunctions>;
166
+ /**
167
+ * Push a notification through the devframe Messages system.
168
+ *
169
+ * Routes to the shared Messages host, so it surfaces in the Vite DevTools
170
+ * **Messages** dock and/or as a transient toast (when `notify` is set — the
171
+ * default). Use this from custom tabs / in-client code to give feedback
172
+ * through the same notification system as the rest of DevTools.
173
+ */
174
+ notify: (input: NuxtDevtoolsNotifyInput) => Promise<void>;
175
+ /**
176
+ * The connected Vite DevTools RPC client, mirroring `nuxt.devtools.devtoolsKit`
177
+ * on the server. Use it for full devframe-native access — register client RPC
178
+ * functions (`devtoolsKit.client.register(...)`), call server functions
179
+ * (`devtoolsKit.call(...)`), shared state, streaming, scoping, etc.
180
+ *
181
+ * `undefined` until the DevTools client has connected.
182
+ */
183
+ devtoolsKit: DevToolsRpcClient | undefined;
184
+ /**
185
+ * @deprecated Use `onDevtoolsReady((kit) => kit.client.register(...))` from
186
+ * `@nuxt/devtools-kit/iframe-client`, or the exposed `devtoolsKit` client
187
+ * directly (`client.devtools.devtoolsKit?.client.register(...)`).
188
+ */
189
+ extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
171
190
  }
172
191
  interface NuxtDevtoolsIframeClient {
173
192
  host: NuxtDevtoolsHostClient;
@@ -177,5 +196,5 @@ interface NuxtDevtoolsGlobal {
177
196
  setClient: (client: NuxtDevtoolsHostClient) => void;
178
197
  }
179
198
 
180
- export { ClientFunctions, HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
181
- export type { CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
199
+ export { HookInfo, LoadingTimeMetric, NuxtDevtoolsNotifyInput, PluginMetric, ServerFunctions };
200
+ 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,6 @@
1
- import { a as ServerFunctions, C as ClientFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.DK4FFgLu.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 GetWizardArgs, o as GitHubContributor, I as ImageMeta, p as InstallModuleReturn, q as InstalledModuleInfo, r as MaintainerInfo, s as ModuleBuiltinTab, t as ModuleCompatibility, M as ModuleCustomTab, u as ModuleGlobalOptions, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, V as NuxtDevtoolsServerContext, W as NuxtServerData, X as PackageManagerName, Y as PackageUpdateInfo, Z as Payload, _ as PluginInfoWithMetic, $ as RouteInfo, a0 as ScannedNitroTasks, a1 as ServerDebugContext, a2 as ServerDebugModuleMutationRecord, a3 as ServerRouteInfo, a4 as ServerRouteInput, a5 as ServerRouteInputType, a6 as ServerTaskInfo, S as SubprocessOptions, a7 as TabCategory, a8 as TerminalAction, a9 as TerminalBase, aa as TerminalInfo, T as TerminalState, ab as VSCodeIntegrationOptions, ac as VSCodeTunnelOptions, ad as VueInspectorClient, ae as VueInspectorData, af as WizardActions, ag as WizardFunctions } from './shared/devtools-kit.DK4FFgLu.mjs';
3
- import { BirpcReturn } from 'birpc';
1
+ import { b as ServerFunctions, c as NuxtDevtoolsNotifyInput, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.DepvFgru.mjs';
2
+ export { A as AnalyzeBuildMeta, d as AnalyzeBuildsInfo, e as AssetEntry, f as AssetInfo, g as AssetType, h as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, i as ClientFunctions, j as ClientUpdateEvent, k as CodeServerIntegrationOptions, l as CodeServerType, m as CodeSnippet, n as CompatibilityStatus, o as ComponentRelationship, p as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, q as InstallModuleReturn, r as InstalledModuleInfo, s as MaintainerInfo, t as ModuleBuiltinTab, u as ModuleCompatibility, M as ModuleCustomTab, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, a as NuxtDevtoolsInfo, V as NuxtDevtoolsNotifyLevel, W as NuxtDevtoolsRpc, N as NuxtDevtoolsServerContext, X as NuxtServerData, Y as PackageManagerName, Z as PackageUpdateInfo, _ as Payload, $ as PluginInfoWithMetic, a0 as RouteInfo, a1 as ScannedNitroTasks, a2 as ServerDebugContext, a3 as ServerDebugModuleMutationRecord, a4 as ServerRouteInfo, a5 as ServerRouteInput, a6 as ServerRouteInputType, a7 as ServerTaskInfo, S as SubprocessOptions, a8 as TabCategory, a9 as TerminalAction, aa as TerminalBase, ab as TerminalInfo, T as TerminalState, ac as VSCodeIntegrationOptions, ad as VSCodeTunnelOptions, ae as VueInspectorClient, af as VueInspectorData } from './shared/devtools-kit.DepvFgru.mjs';
3
+ import { DevToolsRpcClient } from '@vitejs/devtools-kit/client';
4
4
  import { Hookable } from 'hookable';
5
5
  import { NuxtApp } from 'nuxt/app';
6
6
  import { AppConfig } from 'nuxt/schema';
@@ -8,13 +8,16 @@ import { $Fetch } from 'ofetch';
8
8
  import { BuiltinLanguage } from 'shiki';
9
9
  import { Ref } from 'vue';
10
10
  import { StackFrame } from 'error-stack-parser-es';
11
+ import '@vitejs/devtools-kit';
12
+ import 'birpc';
11
13
  import 'unimport';
12
14
  import 'vue-router';
13
- import 'nitropack';
14
15
  import 'unstorage';
15
16
  import 'vite';
16
17
  import '@nuxt/schema';
17
- import 'execa';
18
+ import 'nitro/types';
19
+ import 'nitropack';
20
+ import 'node:child_process';
18
21
 
19
22
  interface TimelineEventFunction {
20
23
  type: 'function';
@@ -121,16 +124,6 @@ interface NuxtDevtoolsHostClient {
121
124
  toggle: () => void;
122
125
  reload: () => void;
123
126
  navigate: (path: string) => void;
124
- /**
125
- * Popup the DevTools frame into Picture-in-Picture mode
126
- *
127
- * Requires Chrome 111 with experimental flag enabled.
128
- *
129
- * Function is undefined when not supported.
130
- *
131
- * @see https://developer.chrome.com/docs/web-platform/document-picture-in-picture/
132
- */
133
- popup?: () => any;
134
127
  };
135
128
  app: {
136
129
  reload: () => void;
@@ -159,15 +152,41 @@ interface NuxtDevtoolsHostClient {
159
152
  interface CodeHighlightOptions {
160
153
  grammarContextCode?: string;
161
154
  }
155
+ type AsyncServerFunctions = {
156
+ [K in keyof ServerFunctions]: (...args: Parameters<ServerFunctions[K]>) => Promise<Awaited<ReturnType<ServerFunctions[K]>>>;
157
+ };
162
158
  interface NuxtDevtoolsClient {
163
- rpc: BirpcReturn<ServerFunctions, ClientFunctions>;
159
+ rpc: AsyncServerFunctions;
164
160
  renderCodeHighlight: (code: string, lang?: BuiltinLanguage, options?: CodeHighlightOptions) => {
165
161
  code: string;
166
162
  supported: boolean;
167
163
  };
168
164
  renderMarkdown: (markdown: string) => string;
169
165
  colorMode: string;
170
- extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => BirpcReturn<ServerFunctions, ClientFunctions>;
166
+ /**
167
+ * Push a notification through the devframe Messages system.
168
+ *
169
+ * Routes to the shared Messages host, so it surfaces in the Vite DevTools
170
+ * **Messages** dock and/or as a transient toast (when `notify` is set — the
171
+ * default). Use this from custom tabs / in-client code to give feedback
172
+ * through the same notification system as the rest of DevTools.
173
+ */
174
+ notify: (input: NuxtDevtoolsNotifyInput) => Promise<void>;
175
+ /**
176
+ * The connected Vite DevTools RPC client, mirroring `nuxt.devtools.devtoolsKit`
177
+ * on the server. Use it for full devframe-native access — register client RPC
178
+ * functions (`devtoolsKit.client.register(...)`), call server functions
179
+ * (`devtoolsKit.call(...)`), shared state, streaming, scoping, etc.
180
+ *
181
+ * `undefined` until the DevTools client has connected.
182
+ */
183
+ devtoolsKit: DevToolsRpcClient | undefined;
184
+ /**
185
+ * @deprecated Use `onDevtoolsReady((kit) => kit.client.register(...))` from
186
+ * `@nuxt/devtools-kit/iframe-client`, or the exposed `devtoolsKit` client
187
+ * directly (`client.devtools.devtoolsKit?.client.register(...)`).
188
+ */
189
+ extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
171
190
  }
172
191
  interface NuxtDevtoolsIframeClient {
173
192
  host: NuxtDevtoolsHostClient;
@@ -177,5 +196,5 @@ interface NuxtDevtoolsGlobal {
177
196
  setClient: (client: NuxtDevtoolsHostClient) => void;
178
197
  }
179
198
 
180
- export { ClientFunctions, HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
181
- export type { CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
199
+ export { HookInfo, LoadingTimeMetric, NuxtDevtoolsNotifyInput, PluginMetric, ServerFunctions };
200
+ 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,6 @@
1
- import { a as ServerFunctions, C as ClientFunctions, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.DK4FFgLu.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 GetWizardArgs, o as GitHubContributor, I as ImageMeta, p as InstallModuleReturn, q as InstalledModuleInfo, r as MaintainerInfo, s as ModuleBuiltinTab, t as ModuleCompatibility, M as ModuleCustomTab, u as ModuleGlobalOptions, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, V as NuxtDevtoolsServerContext, W as NuxtServerData, X as PackageManagerName, Y as PackageUpdateInfo, Z as Payload, _ as PluginInfoWithMetic, $ as RouteInfo, a0 as ScannedNitroTasks, a1 as ServerDebugContext, a2 as ServerDebugModuleMutationRecord, a3 as ServerRouteInfo, a4 as ServerRouteInput, a5 as ServerRouteInputType, a6 as ServerTaskInfo, S as SubprocessOptions, a7 as TabCategory, a8 as TerminalAction, a9 as TerminalBase, aa as TerminalInfo, T as TerminalState, ab as VSCodeIntegrationOptions, ac as VSCodeTunnelOptions, ad as VueInspectorClient, ae as VueInspectorData, af as WizardActions, ag as WizardFunctions } from './shared/devtools-kit.DK4FFgLu.js';
3
- import { BirpcReturn } from 'birpc';
1
+ import { b as ServerFunctions, c as NuxtDevtoolsNotifyInput, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.DepvFgru.js';
2
+ export { A as AnalyzeBuildMeta, d as AnalyzeBuildsInfo, e as AssetEntry, f as AssetInfo, g as AssetType, h as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, i as ClientFunctions, j as ClientUpdateEvent, k as CodeServerIntegrationOptions, l as CodeServerType, m as CodeSnippet, n as CompatibilityStatus, o as ComponentRelationship, p as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, q as InstallModuleReturn, r as InstalledModuleInfo, s as MaintainerInfo, t as ModuleBuiltinTab, u as ModuleCompatibility, M as ModuleCustomTab, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, a as NuxtDevtoolsInfo, V as NuxtDevtoolsNotifyLevel, W as NuxtDevtoolsRpc, N as NuxtDevtoolsServerContext, X as NuxtServerData, Y as PackageManagerName, Z as PackageUpdateInfo, _ as Payload, $ as PluginInfoWithMetic, a0 as RouteInfo, a1 as ScannedNitroTasks, a2 as ServerDebugContext, a3 as ServerDebugModuleMutationRecord, a4 as ServerRouteInfo, a5 as ServerRouteInput, a6 as ServerRouteInputType, a7 as ServerTaskInfo, S as SubprocessOptions, a8 as TabCategory, a9 as TerminalAction, aa as TerminalBase, ab as TerminalInfo, T as TerminalState, ac as VSCodeIntegrationOptions, ad as VSCodeTunnelOptions, ae as VueInspectorClient, af as VueInspectorData } from './shared/devtools-kit.DepvFgru.js';
3
+ import { DevToolsRpcClient } from '@vitejs/devtools-kit/client';
4
4
  import { Hookable } from 'hookable';
5
5
  import { NuxtApp } from 'nuxt/app';
6
6
  import { AppConfig } from 'nuxt/schema';
@@ -8,13 +8,16 @@ import { $Fetch } from 'ofetch';
8
8
  import { BuiltinLanguage } from 'shiki';
9
9
  import { Ref } from 'vue';
10
10
  import { StackFrame } from 'error-stack-parser-es';
11
+ import '@vitejs/devtools-kit';
12
+ import 'birpc';
11
13
  import 'unimport';
12
14
  import 'vue-router';
13
- import 'nitropack';
14
15
  import 'unstorage';
15
16
  import 'vite';
16
17
  import '@nuxt/schema';
17
- import 'execa';
18
+ import 'nitro/types';
19
+ import 'nitropack';
20
+ import 'node:child_process';
18
21
 
19
22
  interface TimelineEventFunction {
20
23
  type: 'function';
@@ -121,16 +124,6 @@ interface NuxtDevtoolsHostClient {
121
124
  toggle: () => void;
122
125
  reload: () => void;
123
126
  navigate: (path: string) => void;
124
- /**
125
- * Popup the DevTools frame into Picture-in-Picture mode
126
- *
127
- * Requires Chrome 111 with experimental flag enabled.
128
- *
129
- * Function is undefined when not supported.
130
- *
131
- * @see https://developer.chrome.com/docs/web-platform/document-picture-in-picture/
132
- */
133
- popup?: () => any;
134
127
  };
135
128
  app: {
136
129
  reload: () => void;
@@ -159,15 +152,41 @@ interface NuxtDevtoolsHostClient {
159
152
  interface CodeHighlightOptions {
160
153
  grammarContextCode?: string;
161
154
  }
155
+ type AsyncServerFunctions = {
156
+ [K in keyof ServerFunctions]: (...args: Parameters<ServerFunctions[K]>) => Promise<Awaited<ReturnType<ServerFunctions[K]>>>;
157
+ };
162
158
  interface NuxtDevtoolsClient {
163
- rpc: BirpcReturn<ServerFunctions, ClientFunctions>;
159
+ rpc: AsyncServerFunctions;
164
160
  renderCodeHighlight: (code: string, lang?: BuiltinLanguage, options?: CodeHighlightOptions) => {
165
161
  code: string;
166
162
  supported: boolean;
167
163
  };
168
164
  renderMarkdown: (markdown: string) => string;
169
165
  colorMode: string;
170
- extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => BirpcReturn<ServerFunctions, ClientFunctions>;
166
+ /**
167
+ * Push a notification through the devframe Messages system.
168
+ *
169
+ * Routes to the shared Messages host, so it surfaces in the Vite DevTools
170
+ * **Messages** dock and/or as a transient toast (when `notify` is set — the
171
+ * default). Use this from custom tabs / in-client code to give feedback
172
+ * through the same notification system as the rest of DevTools.
173
+ */
174
+ notify: (input: NuxtDevtoolsNotifyInput) => Promise<void>;
175
+ /**
176
+ * The connected Vite DevTools RPC client, mirroring `nuxt.devtools.devtoolsKit`
177
+ * on the server. Use it for full devframe-native access — register client RPC
178
+ * functions (`devtoolsKit.client.register(...)`), call server functions
179
+ * (`devtoolsKit.call(...)`), shared state, streaming, scoping, etc.
180
+ *
181
+ * `undefined` until the DevTools client has connected.
182
+ */
183
+ devtoolsKit: DevToolsRpcClient | undefined;
184
+ /**
185
+ * @deprecated Use `onDevtoolsReady((kit) => kit.client.register(...))` from
186
+ * `@nuxt/devtools-kit/iframe-client`, or the exposed `devtoolsKit` client
187
+ * directly (`client.devtools.devtoolsKit?.client.register(...)`).
188
+ */
189
+ extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
171
190
  }
172
191
  interface NuxtDevtoolsIframeClient {
173
192
  host: NuxtDevtoolsHostClient;
@@ -177,5 +196,5 @@ interface NuxtDevtoolsGlobal {
177
196
  setClient: (client: NuxtDevtoolsHostClient) => void;
178
197
  }
179
198
 
180
- export { ClientFunctions, HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
181
- export type { CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
199
+ export { HookInfo, LoadingTimeMetric, NuxtDevtoolsNotifyInput, PluginMetric, ServerFunctions };
200
+ 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": "3.4.0",
4
+ "version": "4.0.0-alpha.10",
5
5
  "license": "MIT",
6
6
  "homepage": "https://devtools.nuxt.com/module/utils-kit",
7
7
  "repository": {
@@ -38,20 +38,33 @@
38
38
  "dist"
39
39
  ],
40
40
  "peerDependencies": {
41
+ "nitro": "^3.0.0-0",
42
+ "nitropack": "^2.0.0",
41
43
  "vite": ">=6.0"
42
44
  },
45
+ "peerDependenciesMeta": {
46
+ "nitro": {
47
+ "optional": true
48
+ },
49
+ "nitropack": {
50
+ "optional": true
51
+ }
52
+ },
43
53
  "dependencies": {
44
- "@nuxt/kit": "^4.4.4",
45
- "execa": "^8.0.1"
54
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-29755283.b4586ef2",
55
+ "nostics": "^1.2.0",
56
+ "tinyexec": "^1.3.0"
46
57
  },
47
58
  "devDependencies": {
48
- "@nuxt/schema": "^4.4.4",
59
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29755283.b4586ef2",
49
60
  "birpc": "^4.0.0",
50
- "error-stack-parser-es": "^1.0.5",
61
+ "error-stack-parser-es": "^2.0.1",
51
62
  "hookable": "^6.1.1",
63
+ "nitro": "^3.0.260610-beta",
64
+ "nitropack": "^2.13.4",
52
65
  "unbuild": "^3.6.1",
53
- "unimport": "^6.2.0",
54
- "vue-router": "^5.0.6"
66
+ "unimport": "^6.4.0",
67
+ "vue-router": "^5.2.0"
55
68
  },
56
69
  "scripts": {
57
70
  "build": "unbuild",