@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/index.cjs +135 -1
- package/dist/index.d.cts +248 -9
- package/dist/index.d.mts +248 -9
- package/dist/index.d.ts +248 -9
- package/dist/index.mjs +126 -2
- package/dist/runtime/iframe-client.d.ts +18 -0
- package/dist/runtime/iframe-client.mjs +7 -0
- package/dist/shared/{devtools-kit.f1VcjZlm.d.cts → devtools-kit.ClPv9w-a.d.cts} +289 -108
- package/dist/shared/{devtools-kit.f1VcjZlm.d.mts → devtools-kit.ClPv9w-a.d.mts} +289 -108
- package/dist/shared/{devtools-kit.f1VcjZlm.d.ts → devtools-kit.ClPv9w-a.d.ts} +289 -108
- package/dist/types.d.cts +37 -8
- package/dist/types.d.mts +37 -8
- package/dist/types.d.ts +37 -8
- package/package.json +22 -9
package/dist/types.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnalyzeBuildMeta,
|
|
3
|
-
import {
|
|
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:
|
|
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
|
-
|
|
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 {
|
|
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 {
|
|
2
|
-
export { A as AnalyzeBuildMeta,
|
|
3
|
-
import {
|
|
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:
|
|
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
|
-
|
|
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 {
|
|
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.
|
|
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": "
|
|
45
|
-
"
|
|
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": "
|
|
49
|
-
"birpc": "^4.
|
|
50
|
-
"error-stack-parser-es": "^
|
|
51
|
-
"hookable": "^6.1.
|
|
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
|
|
54
|
-
"vue-router": "^5.0
|
|
66
|
+
"unimport": "^6.4.0",
|
|
67
|
+
"vue-router": "^5.2.0"
|
|
55
68
|
},
|
|
56
69
|
"scripts": {
|
|
57
70
|
"build": "unbuild",
|