@nuxt/devtools-kit-nightly 4.0.0-alpha.9-29763467.e116f0d β 4.1.0-29893292.8fc4720
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/README.md +15 -60
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +28 -9
- package/dist/runtime/host-client.d.mts +25 -0
- package/dist/runtime/host-client.mjs +6 -3
- package/dist/runtime/iframe-client.d.mts +42 -0
- package/dist/runtime/iframe-client.mjs +7 -7
- package/dist/shared/{devtools-kit-nightly.CuXIM8pH.d.cts β devtools-kit-nightly.DicolcF2.d.mts} +29 -39
- package/dist/types.d.mts +3 -24
- package/package.json +20 -36
- package/dist/index.cjs +0 -251
- package/dist/index.d.cts +0 -277
- package/dist/index.d.ts +0 -277
- package/dist/runtime/host-client.d.ts +0 -4
- package/dist/runtime/iframe-client.d.ts +0 -22
- package/dist/shared/devtools-kit-nightly.CuXIM8pH.d.mts +0 -955
- package/dist/shared/devtools-kit-nightly.CuXIM8pH.d.ts +0 -955
- package/dist/types.cjs +0 -2
- package/dist/types.d.cts +0 -200
- package/dist/types.d.ts +0 -200
- package/host-client.d.ts +0 -1
- package/host-client.mjs +0 -1
- package/iframe-client.d.ts +0 -1
- package/iframe-client.mjs +0 -1
- package/types.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<a href="https://
|
|
1
|
+
<a href="https://nuxt.com/modules/devtools"><img width="1200" alt="Nuxt DevTools" src="https://github-production-user-asset-6210df.s3.amazonaws.com/904724/261577617-a10567bd-ad33-48cc-9bda-9e37dbe1929f.png"></a>
|
|
2
2
|
<br>
|
|
3
3
|
|
|
4
4
|
<h1>
|
|
@@ -20,19 +20,19 @@ Unleash Nuxt Developer Experience.
|
|
|
20
20
|
<a href="https://nuxt.com/blog/nuxt-devtools-v1-0">π Introduction</a> |
|
|
21
21
|
<a href="https://github.com/nuxt/devtools/discussions/29">π‘ Ideas & Suggestions</a> |
|
|
22
22
|
<a href="https://github.com/nuxt/devtools/discussions/31">πΊοΈ Project Roadmap</a> |
|
|
23
|
-
<a href="https://
|
|
23
|
+
<a href="https://nuxt.com/modules/devtools">π Documentation</a>
|
|
24
24
|
</p>
|
|
25
25
|
|
|
26
26
|
> [!NOTE]
|
|
27
|
-
> You are
|
|
27
|
+
> You are at the `main` branch for v4. The v3 branch is [`v3`](https://github.com/nuxt/devtools/tree/v3).
|
|
28
28
|
|
|
29
29
|
<br>
|
|
30
30
|
|
|
31
31
|
## Installation
|
|
32
32
|
|
|
33
|
-
> Nuxt DevTools
|
|
33
|
+
> Nuxt DevTools v4 requires **Nuxt v4.5.0 or higher** (Vite 8). It is built on [Vite DevTools](https://github.com/vitejs/devtools) and shows up as the `Nuxt` group inside the Vite DevTools panel.
|
|
34
34
|
|
|
35
|
-
Nuxt DevTools is **enabled by default
|
|
35
|
+
Nuxt DevTools is **enabled by default**. You can press <kbd>Shift</kbd> + <kbd>Alt</kbd> / <kbd>β§ Shift</kbd> + <kbd>β₯ Option</kbd> + <kbd>D</kbd> in your app to open it up.
|
|
36
36
|
|
|
37
37
|
If you want to explicitly enable or disable Nuxt DevTools, you can update your `nuxt.config` with:
|
|
38
38
|
|
|
@@ -44,52 +44,9 @@ export default defineNuxtConfig({
|
|
|
44
44
|
})
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### Nuxt 4
|
|
48
48
|
|
|
49
|
-
Nuxt
|
|
50
|
-
|
|
51
|
-
<details>
|
|
52
|
-
<summary>npm</summary>
|
|
53
|
-
|
|
54
|
-
```json
|
|
55
|
-
{
|
|
56
|
-
"overrides": {
|
|
57
|
-
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
</details>
|
|
63
|
-
|
|
64
|
-
<details>
|
|
65
|
-
<summary>yarn</summary>
|
|
66
|
-
|
|
67
|
-
```json
|
|
68
|
-
{
|
|
69
|
-
"resolutions": {
|
|
70
|
-
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
</details>
|
|
76
|
-
|
|
77
|
-
<details>
|
|
78
|
-
<summary>pnpm</summary>
|
|
79
|
-
|
|
80
|
-
```json
|
|
81
|
-
{
|
|
82
|
-
"pnpm": {
|
|
83
|
-
"overrides": {
|
|
84
|
-
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
</details>
|
|
91
|
-
|
|
92
|
-
Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
|
|
49
|
+
Nuxt 5 ships `@nuxt/devtools-onboard`, which offers to install Nuxt DevTools v4 the first time you run `nuxt dev`; you can also install `@nuxt/devtools` with your package manager. Nuxt 4.5+ still bundles v3; override `@nuxt/devtools` to `^4.0.0` with your package manager (`overrides` in `package.json` for npm, in `pnpm-workspace.yaml` for pnpm, `resolutions` for yarn), remove your lockfile and reinstall. See the [upgrade guide](https://nuxt.com/modules/devtools/upgrading-to-v4) for details and for what changed.
|
|
93
50
|
|
|
94
51
|
### Nightly Release Channel
|
|
95
52
|
|
|
@@ -126,14 +83,10 @@ You can opt-in to the nightly release channel by using package manager resolutio
|
|
|
126
83
|
<details>
|
|
127
84
|
<summary>pnpm</summary>
|
|
128
85
|
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
86
|
+
```yaml
|
|
87
|
+
# pnpm-workspace.yaml
|
|
88
|
+
overrides:
|
|
89
|
+
'@nuxt/devtools': 'npm:@nuxt/devtools-nightly@latest'
|
|
137
90
|
```
|
|
138
91
|
|
|
139
92
|
</details>
|
|
@@ -165,11 +118,11 @@ Read the [**Announcement Blog Post π**](https://nuxt.com/blog/nuxt-devtools-v
|
|
|
165
118
|
|
|
166
119
|
## Module Authors
|
|
167
120
|
|
|
168
|
-
Please refer to the [Module Authors Guide](https://
|
|
121
|
+
Please refer to the [Module Authors Guide](https://nuxt.com/modules/devtools/module-authors).
|
|
169
122
|
|
|
170
123
|
## Contribution Guide
|
|
171
124
|
|
|
172
|
-
Please refer to the [Contribution Guide](https://
|
|
125
|
+
Please refer to the [Contribution Guide](https://nuxt.com/modules/devtools/contributing).
|
|
173
126
|
|
|
174
127
|
## Anonymous Usage Analytics
|
|
175
128
|
|
|
@@ -177,6 +130,8 @@ Nuxt DevTools collects anonymous telemetry data about general usage. This helps
|
|
|
177
130
|
|
|
178
131
|
Nuxt DevTools' telemetry data is piped through [Nuxt Telemetry](https://github.com/nuxt/telemetry), meaning that Nuxt DevTools will respect your local and global Nuxt Telemetry settings. You can also opt-out Nuxt DevTools' telemetry in the Nuxt DevTools settings.
|
|
179
132
|
|
|
133
|
+
Nuxt DevTools also respects the [`DO_NOT_TRACK`](https://donottrack.sh/) environment variable convention β set `DO_NOT_TRACK=1` in your environment to disable Nuxt DevTools telemetry regardless of any other setting.
|
|
134
|
+
|
|
180
135
|
The data we collect is completely anonymous, not traceable to the source (using hash+seed), and only meaningful in aggregate form. No data we collect is personally identifiable or trackable.
|
|
181
136
|
|
|
182
137
|
### Events
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { ViteDevToolsNodeContext } from '@vitejs/devtools-kit';
|
|
|
3
3
|
import { BirpcGroup } from 'birpc';
|
|
4
4
|
import { ChildProcess } from 'node:child_process';
|
|
5
5
|
import { Result } from 'tinyexec';
|
|
6
|
-
import {
|
|
6
|
+
import { NuxtDevtoolsServerContext, ModuleCustomTab, NuxtDevtoolsInfo, SubprocessOptions, TerminalState } from './types.mjs';
|
|
7
7
|
import * as nostics from 'nostics';
|
|
8
8
|
import { defineDiagnostics } from 'nostics';
|
|
9
9
|
export { createConsoleReporter, defineDiagnostics } from 'nostics';
|
|
@@ -20,7 +20,7 @@ import 'nitropack';
|
|
|
20
20
|
* Canonical docs URL for a Nuxt DevTools diagnostic code.
|
|
21
21
|
*
|
|
22
22
|
* Each code links to a per-code anchor in the v4 migration guide, e.g.
|
|
23
|
-
* `NDT_DEP_0001` β `.../module
|
|
23
|
+
* `NDT_DEP_0001` β `.../modules/devtools/module-migration#ndt_dep_0001`.
|
|
24
24
|
*/
|
|
25
25
|
declare function diagnosticsDocsBase(code: string | number): string;
|
|
26
26
|
/**
|
|
@@ -133,7 +133,7 @@ declare const consoleDiagnostics: nostics.Diagnostics<{
|
|
|
133
133
|
};
|
|
134
134
|
}, readonly [nostics.DiagnosticReporter<{
|
|
135
135
|
method?: nostics.ConsoleMethod;
|
|
136
|
-
}>]>;
|
|
136
|
+
}, any>], never>;
|
|
137
137
|
/**
|
|
138
138
|
* Register the Nuxt deprecation codes into the connected Vite DevTools kit's
|
|
139
139
|
* diagnostics host so they are known to DevTools and post-connect emissions
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { defineDiagnostics, createConsoleReporter } from 'nostics';
|
|
|
4
4
|
export { createConsoleReporter, defineDiagnostics } from 'nostics';
|
|
5
5
|
|
|
6
6
|
function diagnosticsDocsBase(code) {
|
|
7
|
-
return `https://
|
|
7
|
+
return `https://nuxt.com/modules/devtools/module-migration#${String(code).toLowerCase()}`;
|
|
8
8
|
}
|
|
9
9
|
const diagnosticCodes = {
|
|
10
10
|
/** `startSubprocess().getProcess()` β `getResult()`. */
|
|
@@ -52,17 +52,23 @@ const diagnosticCodes = {
|
|
|
52
52
|
};
|
|
53
53
|
const consoleDiagnostics = defineDiagnostics({
|
|
54
54
|
docsBase: diagnosticsDocsBase,
|
|
55
|
-
reporters: [
|
|
55
|
+
reporters: [
|
|
56
|
+
createConsoleReporter()
|
|
57
|
+
],
|
|
56
58
|
codes: diagnosticCodes
|
|
57
59
|
});
|
|
58
60
|
const stateByCtx = /* @__PURE__ */ new WeakMap();
|
|
59
|
-
const fallbackState = {
|
|
61
|
+
const fallbackState = {
|
|
62
|
+
emitted: /* @__PURE__ */ new Set()
|
|
63
|
+
};
|
|
60
64
|
function getState(ctx) {
|
|
61
65
|
if (!ctx)
|
|
62
66
|
return fallbackState;
|
|
63
67
|
let state = stateByCtx.get(ctx);
|
|
64
68
|
if (!state) {
|
|
65
|
-
state = {
|
|
69
|
+
state = {
|
|
70
|
+
emitted: /* @__PURE__ */ new Set()
|
|
71
|
+
};
|
|
66
72
|
stateByCtx.set(ctx, state);
|
|
67
73
|
}
|
|
68
74
|
return state;
|
|
@@ -98,7 +104,9 @@ function deprecate(nuxt, code, params, options = {}) {
|
|
|
98
104
|
function defineStandaloneDiagnostics(options) {
|
|
99
105
|
return defineDiagnostics({
|
|
100
106
|
...options,
|
|
101
|
-
reporters: options.reporters ?? [
|
|
107
|
+
reporters: options.reporters ?? [
|
|
108
|
+
createConsoleReporter()
|
|
109
|
+
]
|
|
102
110
|
});
|
|
103
111
|
}
|
|
104
112
|
function deprecateWithNuxt(code, params, options) {
|
|
@@ -110,7 +118,9 @@ function addCustomTab(tab, nuxt = useNuxt()) {
|
|
|
110
118
|
deprecate(nuxt, "NDT_DEP_0005", {
|
|
111
119
|
api: "addCustomTab",
|
|
112
120
|
replacement: "onDevtoolsReady((ctx) => ctx.docks.register(...))"
|
|
113
|
-
}, {
|
|
121
|
+
}, {
|
|
122
|
+
key: typeof tab === "function" ? void 0 : tab.name
|
|
123
|
+
});
|
|
114
124
|
nuxt.hook("devtools:customTabs", async (tabs) => {
|
|
115
125
|
if (typeof tab === "function")
|
|
116
126
|
tab = await tab();
|
|
@@ -150,14 +160,23 @@ function startSubprocess(execaOptions, tabOptions, nuxt = useNuxt()) {
|
|
|
150
160
|
}
|
|
151
161
|
}
|
|
152
162
|
);
|
|
153
|
-
nuxt.callHook("devtools:terminal:write", { id, data: `> ${[
|
|
163
|
+
nuxt.callHook("devtools:terminal:write", { id, data: `> ${[
|
|
164
|
+
execaOptions.command,
|
|
165
|
+
...execaOptions.args || []
|
|
166
|
+
].join(" ")}
|
|
154
167
|
|
|
155
168
|
` });
|
|
156
169
|
proc.process?.stdout?.on("data", (data) => {
|
|
157
|
-
nuxt.callHook("devtools:terminal:write", {
|
|
170
|
+
nuxt.callHook("devtools:terminal:write", {
|
|
171
|
+
id,
|
|
172
|
+
data: data.toString()
|
|
173
|
+
});
|
|
158
174
|
});
|
|
159
175
|
proc.process?.stderr?.on("data", (data) => {
|
|
160
|
-
nuxt.callHook("devtools:terminal:write", {
|
|
176
|
+
nuxt.callHook("devtools:terminal:write", {
|
|
177
|
+
id,
|
|
178
|
+
data: data.toString()
|
|
179
|
+
});
|
|
161
180
|
});
|
|
162
181
|
proc.process?.on("exit", (code) => {
|
|
163
182
|
if (!restarting) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import '../shared/devtools-kit-nightly.DicolcF2.mjs';
|
|
3
|
+
import { NuxtDevtoolsHostClient } from '../types.mjs';
|
|
4
|
+
import '@vitejs/devtools-kit';
|
|
5
|
+
import 'birpc';
|
|
6
|
+
import 'nuxt/schema';
|
|
7
|
+
import 'unimport';
|
|
8
|
+
import 'vue-router';
|
|
9
|
+
import 'unstorage';
|
|
10
|
+
import 'vite';
|
|
11
|
+
import '@nuxt/schema';
|
|
12
|
+
import 'nitro/types';
|
|
13
|
+
import 'nitropack';
|
|
14
|
+
import 'node:child_process';
|
|
15
|
+
import '@vitejs/devtools-kit/client';
|
|
16
|
+
import 'hookable';
|
|
17
|
+
import 'nuxt/app';
|
|
18
|
+
import 'ofetch';
|
|
19
|
+
import 'shiki';
|
|
20
|
+
import 'error-stack-parser-es';
|
|
21
|
+
|
|
22
|
+
declare function onDevtoolsHostClientConnected(fn: (client: NuxtDevtoolsHostClient) => void): (() => void) | undefined;
|
|
23
|
+
declare function useDevtoolsHostClient(): Ref<NuxtDevtoolsHostClient | undefined>;
|
|
24
|
+
|
|
25
|
+
export { onDevtoolsHostClientConnected, useDevtoolsHostClient };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { shallowRef } from
|
|
1
|
+
import { shallowRef } from 'vue';
|
|
2
|
+
|
|
2
3
|
let clientRef;
|
|
3
4
|
const fns = [];
|
|
4
|
-
|
|
5
|
+
function onDevtoolsHostClientConnected(fn) {
|
|
5
6
|
fns.push(fn);
|
|
6
7
|
if (typeof window === "undefined")
|
|
7
8
|
return;
|
|
@@ -22,7 +23,7 @@ export function onDevtoolsHostClientConnected(fn) {
|
|
|
22
23
|
fns.splice(fns.indexOf(fn), 1);
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
function useDevtoolsHostClient() {
|
|
26
27
|
if (!clientRef) {
|
|
27
28
|
clientRef = shallowRef();
|
|
28
29
|
onDevtoolsHostClientConnected(setup);
|
|
@@ -32,3 +33,5 @@ export function useDevtoolsHostClient() {
|
|
|
32
33
|
}
|
|
33
34
|
return clientRef;
|
|
34
35
|
}
|
|
36
|
+
|
|
37
|
+
export { onDevtoolsHostClientConnected, useDevtoolsHostClient };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DevToolsRpcClient } from '@vitejs/devtools-kit/client';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import '../shared/devtools-kit-nightly.DicolcF2.mjs';
|
|
4
|
+
import { NuxtDevtoolsIframeClient } from '../types.mjs';
|
|
5
|
+
import '@vitejs/devtools-kit';
|
|
6
|
+
import 'birpc';
|
|
7
|
+
import 'nuxt/schema';
|
|
8
|
+
import 'unimport';
|
|
9
|
+
import 'vue-router';
|
|
10
|
+
import 'unstorage';
|
|
11
|
+
import 'vite';
|
|
12
|
+
import '@nuxt/schema';
|
|
13
|
+
import 'nitro/types';
|
|
14
|
+
import 'nitropack';
|
|
15
|
+
import 'node:child_process';
|
|
16
|
+
import 'hookable';
|
|
17
|
+
import 'nuxt/app';
|
|
18
|
+
import 'ofetch';
|
|
19
|
+
import 'shiki';
|
|
20
|
+
import 'error-stack-parser-es';
|
|
21
|
+
|
|
22
|
+
declare function onDevtoolsClientConnected(fn: (client: NuxtDevtoolsIframeClient) => void): (() => void) | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Run a callback once the Vite DevTools client is ready, receiving the connected
|
|
25
|
+
* `DevToolsRpcClient` β the client-side mirror of the server's
|
|
26
|
+
* `onDevtoolsReady((ctx) => β¦)`.
|
|
27
|
+
*
|
|
28
|
+
* This is the recommended way to do client-side DevTools integration (register
|
|
29
|
+
* client RPC functions, call server functions, shared state, streaming, β¦):
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { onDevtoolsReady } from '@nuxt/devtools-kit/iframe-client'
|
|
33
|
+
*
|
|
34
|
+
* onDevtoolsReady((kit) => {
|
|
35
|
+
* kit.client.register({ name: 'my-module:on-update', type: 'event', handler })
|
|
36
|
+
* })
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare function onDevtoolsReady(fn: (kit: DevToolsRpcClient) => void): (() => void) | undefined;
|
|
40
|
+
declare function useDevtoolsClient(): Ref<NuxtDevtoolsIframeClient | undefined, NuxtDevtoolsIframeClient | undefined>;
|
|
41
|
+
|
|
42
|
+
export { onDevtoolsClientConnected, onDevtoolsReady, useDevtoolsClient };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { shallowRef, triggerRef } from
|
|
1
|
+
import { shallowRef, triggerRef } from 'vue';
|
|
2
|
+
|
|
2
3
|
let clientRef;
|
|
3
|
-
const hasSetup = false;
|
|
4
4
|
const fns = [];
|
|
5
|
-
|
|
5
|
+
function onDevtoolsClientConnected(fn) {
|
|
6
6
|
fns.push(fn);
|
|
7
|
-
if (hasSetup)
|
|
8
|
-
return;
|
|
9
7
|
if (typeof window === "undefined")
|
|
10
8
|
return;
|
|
11
9
|
if (window.__NUXT_DEVTOOLS__) {
|
|
@@ -25,14 +23,14 @@ export function onDevtoolsClientConnected(fn) {
|
|
|
25
23
|
fns.splice(fns.indexOf(fn), 1);
|
|
26
24
|
};
|
|
27
25
|
}
|
|
28
|
-
|
|
26
|
+
function onDevtoolsReady(fn) {
|
|
29
27
|
return onDevtoolsClientConnected((client) => {
|
|
30
28
|
const kit = client.devtools.devtoolsKit;
|
|
31
29
|
if (kit)
|
|
32
30
|
fn(kit);
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
|
-
|
|
33
|
+
function useDevtoolsClient() {
|
|
36
34
|
if (!clientRef) {
|
|
37
35
|
clientRef = shallowRef();
|
|
38
36
|
onDevtoolsClientConnected(setup);
|
|
@@ -49,3 +47,5 @@ export function useDevtoolsClient() {
|
|
|
49
47
|
}
|
|
50
48
|
return clientRef;
|
|
51
49
|
}
|
|
50
|
+
|
|
51
|
+
export { onDevtoolsClientConnected, onDevtoolsReady, useDevtoolsClient };
|
package/dist/shared/{devtools-kit-nightly.CuXIM8pH.d.cts β devtools-kit-nightly.DicolcF2.d.mts}
RENAMED
|
@@ -11,7 +11,7 @@ import { Nitro as Nitro$1, StorageMounts as StorageMounts$1 } from 'nitro/types'
|
|
|
11
11
|
import { Nitro, StorageMounts } from 'nitropack';
|
|
12
12
|
import { SpawnOptions } from 'node:child_process';
|
|
13
13
|
|
|
14
|
-
type TabCategory = 'pinned' | 'app' | '
|
|
14
|
+
type TabCategory = 'pinned' | 'app' | 'analyze' | 'server' | 'modules' | 'documentation' | 'advanced';
|
|
15
15
|
|
|
16
16
|
interface ModuleCustomTab {
|
|
17
17
|
/**
|
|
@@ -42,10 +42,8 @@ interface ModuleCustomTab {
|
|
|
42
42
|
*/
|
|
43
43
|
extraTabVNode?: VNode;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @default false
|
|
45
|
+
* @deprecated No longer enforced client-side. Access to sensitive RPC
|
|
46
|
+
* methods is gated by Vite DevTools' own connection authorization instead.
|
|
49
47
|
*/
|
|
50
48
|
requireAuth?: boolean;
|
|
51
49
|
}
|
|
@@ -192,13 +190,6 @@ interface HookInfo {
|
|
|
192
190
|
listeners: number;
|
|
193
191
|
executions: number[];
|
|
194
192
|
}
|
|
195
|
-
interface ImageMeta {
|
|
196
|
-
width: number;
|
|
197
|
-
height: number;
|
|
198
|
-
orientation?: number;
|
|
199
|
-
type?: string;
|
|
200
|
-
mimeType?: string;
|
|
201
|
-
}
|
|
202
193
|
interface PackageUpdateInfo {
|
|
203
194
|
name: string;
|
|
204
195
|
current: string;
|
|
@@ -354,22 +345,6 @@ interface VueInspectorClient {
|
|
|
354
345
|
onUpdated: () => void;
|
|
355
346
|
}
|
|
356
347
|
type VueInspectorData = VueInspectorClient['linkParams'] & Partial<VueInspectorClient['position']>;
|
|
357
|
-
type AssetType = 'image' | 'font' | 'video' | 'audio' | 'text' | 'json' | 'other';
|
|
358
|
-
interface AssetInfo {
|
|
359
|
-
path: string;
|
|
360
|
-
type: AssetType;
|
|
361
|
-
publicPath: string;
|
|
362
|
-
filePath: string;
|
|
363
|
-
size: number;
|
|
364
|
-
mtime: number;
|
|
365
|
-
layer?: string;
|
|
366
|
-
}
|
|
367
|
-
interface AssetEntry {
|
|
368
|
-
path: string;
|
|
369
|
-
content: string;
|
|
370
|
-
encoding?: BufferEncoding;
|
|
371
|
-
override?: boolean;
|
|
372
|
-
}
|
|
373
348
|
interface CodeSnippet {
|
|
374
349
|
code: string;
|
|
375
350
|
lang: string;
|
|
@@ -416,7 +391,10 @@ interface ModuleOptions {
|
|
|
416
391
|
*/
|
|
417
392
|
componentInspector?: boolean;
|
|
418
393
|
/**
|
|
419
|
-
* Enable Vue DevTools integration
|
|
394
|
+
* Enable the Vue DevTools integration, which registers Vue DevTools'
|
|
395
|
+
* own dock entry next to the Nuxt one.
|
|
396
|
+
*
|
|
397
|
+
* @default true
|
|
420
398
|
*/
|
|
421
399
|
vueDevTools?: boolean;
|
|
422
400
|
/**
|
|
@@ -430,6 +408,13 @@ interface ModuleOptions {
|
|
|
430
408
|
* @default true
|
|
431
409
|
*/
|
|
432
410
|
viteInspect?: boolean;
|
|
411
|
+
/**
|
|
412
|
+
* Enable the Data Inspector integration, which registers the live
|
|
413
|
+
* `Nuxt Application` data source and mounts the Data Inspector panel.
|
|
414
|
+
*
|
|
415
|
+
* @default true
|
|
416
|
+
*/
|
|
417
|
+
dataInspector?: boolean;
|
|
433
418
|
/**
|
|
434
419
|
* Disable the DevTools client authorization prompt, allowing any browser to
|
|
435
420
|
* connect without approving it first.
|
|
@@ -442,9 +427,20 @@ interface ModuleOptions {
|
|
|
442
427
|
*/
|
|
443
428
|
disableAuthorization?: boolean;
|
|
444
429
|
/**
|
|
445
|
-
*
|
|
430
|
+
* Expose the Vite DevTools MCP endpoint (`/__devtools/__mcp`), which
|
|
431
|
+
* lets AI agents call the DevTools' agent tools over the Model Context
|
|
432
|
+
* Protocol.
|
|
433
|
+
*
|
|
434
|
+
* - `'auto'`: mount the endpoint once any DevTools integration exposes an
|
|
435
|
+
* agent tool.
|
|
436
|
+
* - `true`: always mount it.
|
|
437
|
+
* - `false`: never mount it.
|
|
438
|
+
*
|
|
439
|
+
* Same as setting `vite.devtools.mcp`, which takes precedence.
|
|
440
|
+
*
|
|
441
|
+
* @default 'auto'
|
|
446
442
|
*/
|
|
447
|
-
|
|
443
|
+
mcp?: boolean | 'auto';
|
|
448
444
|
/**
|
|
449
445
|
* Experimental features
|
|
450
446
|
*/
|
|
@@ -664,12 +660,11 @@ interface ServerFunctions {
|
|
|
664
660
|
getModuleOptions: () => ModuleOptions;
|
|
665
661
|
getComponents: () => Component[];
|
|
666
662
|
getComponentsRelationships: () => Promise<ComponentRelationship[]>;
|
|
667
|
-
getAutoImports: () => AutoImportsWithMetadata
|
|
663
|
+
getAutoImports: () => Promise<AutoImportsWithMetadata>;
|
|
668
664
|
getServerPages: () => NuxtPage[];
|
|
669
665
|
getCustomTabs: () => ModuleCustomTab[];
|
|
670
666
|
getServerHooks: () => HookInfo[];
|
|
671
667
|
getServerLayouts: () => NuxtLayout[];
|
|
672
|
-
getStaticAssets: () => Promise<AssetInfo[]>;
|
|
673
668
|
getServerRoutes: () => ServerRouteInfo[];
|
|
674
669
|
getServerTasks: () => ScannedNitroTasks | null;
|
|
675
670
|
getServerApp: () => NuxtApp | undefined;
|
|
@@ -691,11 +686,6 @@ interface ServerFunctions {
|
|
|
691
686
|
generateAnalyzeBuildName: () => Promise<string>;
|
|
692
687
|
startAnalyzeBuild: (name: string) => Promise<string>;
|
|
693
688
|
clearAnalyzeBuilds: (names?: string[]) => Promise<void>;
|
|
694
|
-
getImageMeta: (filepath: string) => Promise<ImageMeta | undefined>;
|
|
695
|
-
getTextAssetContent: (filepath: string, limit?: number) => Promise<string | undefined>;
|
|
696
|
-
writeStaticAssets: (file: AssetEntry[], folder: string) => Promise<string[]>;
|
|
697
|
-
deleteStaticAsset: (filepath: string) => Promise<void>;
|
|
698
|
-
renameStaticAsset: (oldPath: string, newPath: string) => Promise<void>;
|
|
699
689
|
notify: (input: NuxtDevtoolsNotifyInput) => Promise<void>;
|
|
700
690
|
telemetryEvent: (payload: object, immediate?: boolean) => void;
|
|
701
691
|
customTabAction: (name: string, action: number) => Promise<boolean>;
|
|
@@ -952,4 +942,4 @@ declare module '@nuxt/schema' {
|
|
|
952
942
|
}
|
|
953
943
|
}
|
|
954
944
|
|
|
955
|
-
export type {
|
|
945
|
+
export type { ServerDebugModuleMutationRecord as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, CategorizedTabs as C, ModuleVNodeView as D, ModuleView as E, NpmCommandOptions as F, GitHubContributor as G, HookInfo as H, InstallModuleReturn as I, NpmCommandType as J, NuxtDevToolsOptions as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsServerContext as N, NuxtDevtoolsNotifyLevel as O, PluginMetric as P, NuxtDevtoolsRpc as Q, NuxtServerData as R, SubprocessOptions as S, TerminalState as T, PackageManagerName as U, PackageUpdateInfo as V, Payload as W, PluginInfoWithMetic as X, RouteInfo as Y, ScannedNitroTasks as Z, ServerDebugContext as _, NuxtDevtoolsInfo as a, ServerRouteInfo as a0, ServerRouteInput as a1, ServerRouteInputType as a2, ServerTaskInfo as a3, TabCategory as a4, TerminalAction as a5, TerminalBase as a6, TerminalInfo as a7, VSCodeIntegrationOptions as a8, VSCodeTunnelOptions as a9, VueInspectorClient as aa, VueInspectorData as ab, ServerFunctions as b, NuxtDevtoolsNotifyInput as c, AnalyzeBuildsInfo as d, AutoImportsWithMetadata as e, ClientFunctions as f, ClientUpdateEvent as g, CodeServerIntegrationOptions as h, CodeServerType as i, CodeSnippet as j, CompatibilityStatus as k, ComponentRelationship as l, ComponentWithRelationships as m, InstalledModuleInfo as n, MaintainerInfo as o, ModuleBuiltinTab as p, ModuleCompatibility as q, ModuleIframeTabLazyOptions as r, ModuleIframeView as s, ModuleLaunchAction as t, ModuleLaunchView as u, ModuleOptions as v, ModuleStaticInfo as w, ModuleStats as x, ModuleTabInfo as y, ModuleType as z };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnalyzeBuildMeta, d as AnalyzeBuildsInfo, e as
|
|
1
|
+
import { H as HookInfo, P as PluginMetric, L as LoadingTimeMetric, b as ServerFunctions, c as NuxtDevtoolsNotifyInput } from './shared/devtools-kit-nightly.DicolcF2.mjs';
|
|
2
|
+
export { A as AnalyzeBuildMeta, d as AnalyzeBuildsInfo, e as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, f as ClientFunctions, g as ClientUpdateEvent, h as CodeServerIntegrationOptions, i as CodeServerType, j as CodeSnippet, k as CompatibilityStatus, l as ComponentRelationship, m as ComponentWithRelationships, G as GitHubContributor, I as InstallModuleReturn, n as InstalledModuleInfo, o as MaintainerInfo, p as ModuleBuiltinTab, q as ModuleCompatibility, M as ModuleCustomTab, r as ModuleIframeTabLazyOptions, s as ModuleIframeView, t as ModuleLaunchAction, u as ModuleLaunchView, v as ModuleOptions, w as ModuleStaticInfo, x as ModuleStats, y as ModuleTabInfo, z as ModuleType, D as ModuleVNodeView, E as ModuleView, F as NpmCommandOptions, J as NpmCommandType, K as NuxtDevToolsOptions, a as NuxtDevtoolsInfo, O as NuxtDevtoolsNotifyLevel, Q as NuxtDevtoolsRpc, N as NuxtDevtoolsServerContext, R as NuxtServerData, U as PackageManagerName, V as PackageUpdateInfo, W as Payload, X as PluginInfoWithMetic, Y as RouteInfo, Z as ScannedNitroTasks, _ as ServerDebugContext, $ as ServerDebugModuleMutationRecord, a0 as ServerRouteInfo, a1 as ServerRouteInput, a2 as ServerRouteInputType, a3 as ServerTaskInfo, S as SubprocessOptions, a4 as TabCategory, a5 as TerminalAction, a6 as TerminalBase, a7 as TerminalInfo, T as TerminalState, a8 as VSCodeIntegrationOptions, a9 as VSCodeTunnelOptions, aa as VueInspectorClient, ab as VueInspectorData } from './shared/devtools-kit-nightly.DicolcF2.mjs';
|
|
3
3
|
import { DevToolsRpcClient } from '@vitejs/devtools-kit/client';
|
|
4
4
|
import { Hookable } from 'hookable';
|
|
5
5
|
import { NuxtApp } from 'nuxt/app';
|
|
@@ -67,17 +67,6 @@ interface TimelineEventsSegment {
|
|
|
67
67
|
previousGap?: number;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
interface DevToolsFrameState {
|
|
71
|
-
width: number;
|
|
72
|
-
height: number;
|
|
73
|
-
top: number;
|
|
74
|
-
left: number;
|
|
75
|
-
open: boolean;
|
|
76
|
-
route: string;
|
|
77
|
-
position: 'left' | 'right' | 'bottom' | 'top';
|
|
78
|
-
closeOnOutsideClick: boolean;
|
|
79
|
-
minimizePanelInactive: number;
|
|
80
|
-
}
|
|
81
70
|
interface NuxtDevtoolsClientHooks {
|
|
82
71
|
/**
|
|
83
72
|
* When the DevTools navigates, used for persisting the current tab
|
|
@@ -110,7 +99,6 @@ interface NuxtDevtoolsClientHooks {
|
|
|
110
99
|
interface NuxtDevtoolsHostClient {
|
|
111
100
|
nuxt: NuxtApp;
|
|
112
101
|
hooks: Hookable<NuxtDevtoolsClientHooks>;
|
|
113
|
-
getIframe: () => HTMLIFrameElement | undefined;
|
|
114
102
|
inspector?: {
|
|
115
103
|
enable: () => void;
|
|
116
104
|
disable: () => void;
|
|
@@ -130,7 +118,6 @@ interface NuxtDevtoolsHostClient {
|
|
|
130
118
|
navigate: (path: string, hard?: boolean) => void;
|
|
131
119
|
appConfig: AppConfig;
|
|
132
120
|
colorMode: Ref<'dark' | 'light'>;
|
|
133
|
-
frameState: Ref<DevToolsFrameState>;
|
|
134
121
|
$fetch: $Fetch;
|
|
135
122
|
};
|
|
136
123
|
metrics: {
|
|
@@ -143,11 +130,6 @@ interface NuxtDevtoolsHostClient {
|
|
|
143
130
|
* A counter to trigger reactivity updates
|
|
144
131
|
*/
|
|
145
132
|
revision: Ref<number>;
|
|
146
|
-
/**
|
|
147
|
-
* Update client
|
|
148
|
-
* @internal
|
|
149
|
-
*/
|
|
150
|
-
syncClient: () => NuxtDevtoolsHostClient;
|
|
151
133
|
}
|
|
152
134
|
interface CodeHighlightOptions {
|
|
153
135
|
grammarContextCode?: string;
|
|
@@ -192,9 +174,6 @@ interface NuxtDevtoolsIframeClient {
|
|
|
192
174
|
host: NuxtDevtoolsHostClient;
|
|
193
175
|
devtools: NuxtDevtoolsClient;
|
|
194
176
|
}
|
|
195
|
-
interface NuxtDevtoolsGlobal {
|
|
196
|
-
setClient: (client: NuxtDevtoolsHostClient) => void;
|
|
197
|
-
}
|
|
198
177
|
|
|
199
178
|
export { HookInfo, LoadingTimeMetric, NuxtDevtoolsNotifyInput, PluginMetric, ServerFunctions };
|
|
200
|
-
export type { AsyncServerFunctions, CodeHighlightOptions,
|
|
179
|
+
export type { AsyncServerFunctions, CodeHighlightOptions, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
|