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

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.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.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 { b as ServerFunctions, c as NuxtDevtoolsNotifyInput, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.ClPv9w-a.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.ClPv9w-a.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,12 +8,15 @@ 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';
18
+ import 'nitro/types';
19
+ import 'nitropack';
17
20
  import 'node:child_process';
18
21
 
19
22
  interface TimelineEventFunction {
@@ -149,15 +152,41 @@ interface NuxtDevtoolsHostClient {
149
152
  interface CodeHighlightOptions {
150
153
  grammarContextCode?: string;
151
154
  }
155
+ type AsyncServerFunctions = {
156
+ [K in keyof ServerFunctions]: (...args: Parameters<ServerFunctions[K]>) => Promise<Awaited<ReturnType<ServerFunctions[K]>>>;
157
+ };
152
158
  interface NuxtDevtoolsClient {
153
- rpc: BirpcReturn<ServerFunctions, ClientFunctions>;
159
+ rpc: AsyncServerFunctions;
154
160
  renderCodeHighlight: (code: string, lang?: BuiltinLanguage, options?: CodeHighlightOptions) => {
155
161
  code: string;
156
162
  supported: boolean;
157
163
  };
158
164
  renderMarkdown: (markdown: string) => string;
159
165
  colorMode: string;
160
- 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;
161
190
  }
162
191
  interface NuxtDevtoolsIframeClient {
163
192
  host: NuxtDevtoolsHostClient;
@@ -167,5 +196,5 @@ interface NuxtDevtoolsGlobal {
167
196
  setClient: (client: NuxtDevtoolsHostClient) => void;
168
197
  }
169
198
 
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 };
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.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 { b as ServerFunctions, c as NuxtDevtoolsNotifyInput, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.ClPv9w-a.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.ClPv9w-a.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,12 +8,15 @@ 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';
18
+ import 'nitro/types';
19
+ import 'nitropack';
17
20
  import 'node:child_process';
18
21
 
19
22
  interface TimelineEventFunction {
@@ -149,15 +152,41 @@ interface NuxtDevtoolsHostClient {
149
152
  interface CodeHighlightOptions {
150
153
  grammarContextCode?: string;
151
154
  }
155
+ type AsyncServerFunctions = {
156
+ [K in keyof ServerFunctions]: (...args: Parameters<ServerFunctions[K]>) => Promise<Awaited<ReturnType<ServerFunctions[K]>>>;
157
+ };
152
158
  interface NuxtDevtoolsClient {
153
- rpc: BirpcReturn<ServerFunctions, ClientFunctions>;
159
+ rpc: AsyncServerFunctions;
154
160
  renderCodeHighlight: (code: string, lang?: BuiltinLanguage, options?: CodeHighlightOptions) => {
155
161
  code: string;
156
162
  supported: boolean;
157
163
  };
158
164
  renderMarkdown: (markdown: string) => string;
159
165
  colorMode: string;
160
- 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;
161
190
  }
162
191
  interface NuxtDevtoolsIframeClient {
163
192
  host: NuxtDevtoolsHostClient;
@@ -167,5 +196,5 @@ interface NuxtDevtoolsGlobal {
167
196
  setClient: (client: NuxtDevtoolsHostClient) => void;
168
197
  }
169
198
 
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 };
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": "4.0.0-alpha.1",
4
+ "version": "4.0.0-alpha.11",
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.2",
45
- "tinyexec": "^1.0.4"
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.2",
49
- "birpc": "^4.0.0",
50
- "error-stack-parser-es": "^1.0.5",
51
- "hookable": "^6.1.0",
59
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29755283.b4586ef2",
60
+ "birpc": "^4.1.0",
61
+ "error-stack-parser-es": "^2.0.1",
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.0.2",
54
- "vue-router": "^5.0.3"
66
+ "unimport": "^6.4.0",
67
+ "vue-router": "^5.2.0"
55
68
  },
56
69
  "scripts": {
57
70
  "build": "unbuild",