@nuxt/devtools 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/README.md +88 -7
- package/dist/chunks/analyze-build.mjs +32 -2
- package/dist/chunks/code-server.mjs +74 -0
- package/dist/chunks/data-inspector.mjs +82 -0
- package/dist/chunks/module-main.mjs +780 -554
- package/dist/chunks/timeline.mjs +2 -2
- package/dist/chunks/vite-inspect.mjs +92 -53
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/__blank-ki8oaugs.js +1 -0
- package/dist/client/_nuxt/analyze-build-ne41xjd4.js +1 -0
- package/dist/client/_nuxt/assets-f8xklgq9.js +6 -0
- package/dist/client/_nuxt/auth-required-panel-hlhmg87z.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/491c94f8-60b1-4f88-a55c-3cb1bf18dd79.json +1 -0
- package/dist/client/_nuxt/cd81saaa.js +2 -0
- package/dist/client/_nuxt/{client-im47u3kz.js → client-iet3i2jx.js} +1 -1
- package/dist/client/_nuxt/code-diff-f21wjzw6.js +8 -0
- package/dist/client/_nuxt/code-snippets-e28cw1b6.js +1 -0
- package/dist/client/_nuxt/components-o6uyjkn7.js +1 -0
- package/dist/client/_nuxt/composable-item-ocorhvb4.js +1 -0
- package/dist/client/_nuxt/composables-li5sexni.js +1 -0
- package/dist/client/_nuxt/custom-_name_-m5d1q22j.js +1 -0
- package/dist/client/_nuxt/data-schema-button-kil5d35s.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-pb9ef6ns.js +2 -0
- package/dist/client/_nuxt/debug-nrr1l0ts.js +1 -0
- package/dist/client/_nuxt/default-m4s11ttb.js +1 -0
- package/dist/client/_nuxt/dialog-loe55arg.js +1 -0
- package/dist/client/_nuxt/dist-2c3gpsw0.js +1 -0
- package/dist/client/_nuxt/dist-gklva25a.js +1 -0
- package/dist/client/_nuxt/duration-display-fjuy04uz.js +1 -0
- package/dist/client/_nuxt/editor-eakm7xzk.js +1 -0
- package/dist/client/_nuxt/entry.css-meav5jmw.css +1 -0
- package/dist/client/_nuxt/error-404-nauqrial.js +1 -0
- package/dist/client/_nuxt/error-404.css-k0vnbfeq.css +1 -0
- package/dist/client/_nuxt/error-500-h4c50p0t.js +1 -0
- package/dist/client/_nuxt/error-500.css-lhh2zs4d.css +1 -0
- package/dist/client/_nuxt/error-nukkk3mr.js +9 -0
- package/dist/client/_nuxt/filepath-item-l8m3u23m.js +1 -0
- package/dist/client/_nuxt/full-kcw32vsy.js +1 -0
- package/dist/client/_nuxt/fuse-ipb957gg.js +1 -0
- package/dist/client/_nuxt/help-fab-ccbj2zxc.js +1 -0
- package/dist/client/_nuxt/hooks-d7ream10.js +1 -0
- package/dist/client/_nuxt/imports-eqmikopw.js +1 -0
- package/dist/client/_nuxt/launch-page-l2e581he.js +1 -0
- package/dist/client/_nuxt/modules-j9bs520l.js +1 -0
- package/dist/client/_nuxt/nbadge-n73p68uz.js +1 -0
- package/dist/client/_nuxt/nbutton-np26z5og.js +1 -0
- package/dist/client/_nuxt/ncard-kyrmtdmn.js +1 -0
- package/dist/client/_nuxt/ncheckbox-hmazj87n.js +1 -0
- package/dist/client/_nuxt/ncode-block-ltlsxf5u.js +2 -0
- package/dist/client/_nuxt/{ncode-block.css-o2ixs97j.css → ncode-block.css-ivoxtfjk.css} +1 -1
- package/dist/client/_nuxt/ndialog-mpi6dkdo.js +3 -0
- package/dist/client/_nuxt/ndrawer-hw8gqgye.js +1 -0
- package/dist/client/_nuxt/ndropdown-l76w9qwv.js +1 -0
- package/dist/client/_nuxt/nicon-co5pnhft.js +4 -0
- package/dist/client/_nuxt/nicon-title-ejbxuupx.js +1 -0
- package/dist/client/_nuxt/nlink-h3jrz76l.js +1 -0
- package/dist/client/_nuxt/nloading-lhpm96ki.js +1 -0
- package/dist/client/_nuxt/nmarkdown-7qnv8atx.js +1 -0
- package/dist/client/_nuxt/nnavbar-g38amume.js +1 -0
- package/dist/client/_nuxt/none-ju85xmqv.js +1 -0
- package/dist/client/_nuxt/npanel-grids-fa3ah9jo.js +1 -0
- package/dist/client/_nuxt/npm-napoklx5.js +1 -0
- package/dist/client/_nuxt/nsection-block-kzcj1vk3.js +1 -0
- package/dist/client/_nuxt/nsection-block.css-h1lgpwgm.css +1 -0
- package/dist/client/_nuxt/nselect-md65qzv8.js +1 -0
- package/dist/client/_nuxt/nselect-tabs-brv0wfuv.js +1 -0
- package/dist/client/_nuxt/nsplit-pane-bs5dfe16.js +1 -0
- package/dist/client/_nuxt/nsplit-pane.css-k1gopk47.css +1 -0
- package/dist/client/_nuxt/ntext-input-obq09i2s.js +1 -0
- package/dist/client/_nuxt/ntip-nv65xhm1.js +1 -0
- package/dist/client/_nuxt/nuxt-hj3jyofn.js +1 -0
- package/dist/client/_nuxt/nuxt-link-nsgkom6k.js +1 -0
- package/dist/client/_nuxt/nuxt-logo-dead1uws.js +1 -0
- package/dist/client/_nuxt/open-graph-d1iodawb.js +3 -0
- package/dist/client/_nuxt/overview-cbabgv3v.js +1 -0
- package/dist/client/_nuxt/pages-oi6j0pbk.js +1 -0
- package/dist/client/_nuxt/payload-ie12v3te.js +1 -0
- package/dist/client/_nuxt/plugins-20xi1djl.js +1 -0
- package/dist/client/_nuxt/ready-ikhds7hc.js +2 -0
- package/dist/client/_nuxt/rolldown-runtime-f96lzs6p.js +1 -0
- package/dist/client/_nuxt/runtime-configs-fq4qn3y8.js +1 -0
- package/dist/client/_nuxt/server-route-inputs-c90qumt8.js +1 -0
- package/dist/client/_nuxt/server-routes-mcizq24b.js +7 -0
- package/dist/client/_nuxt/server-tasks-cicwbkvm.js +1 -0
- package/dist/client/_nuxt/settings-noeex3c7.js +1 -0
- package/dist/client/_nuxt/stacktrace-list-gmhj3wmk.js +1 -0
- package/dist/client/_nuxt/state-commands-bzr47er3.js +1 -0
- package/dist/client/_nuxt/state-components-jvq23n80.js +1 -0
- package/dist/client/_nuxt/state-editor-h7d9pjpa.js +1 -0
- package/dist/client/_nuxt/state-modules-fie7gkqb.js +1 -0
- package/dist/client/_nuxt/state-routes-ntw79bv6.js +1 -0
- package/dist/client/_nuxt/state-schema-eifqm6o4.js +1 -0
- package/dist/client/_nuxt/state-tabs-dhcec3o6.js +1 -0
- package/dist/client/_nuxt/storage-m9yh2hjt.js +1 -0
- package/dist/client/_nuxt/tab-icon-bw4o7q2t.js +1 -0
- package/dist/client/_nuxt/telemetry-mienojg2.js +1 -0
- package/dist/client/_nuxt/timeline-ce3m8i2h.js +31 -0
- package/dist/client/_nuxt/unhead.dnki-vlv7-jmz34zx6.js +1 -0
- package/dist/client/_nuxt/unocss-runtime-htk43m9c.js +1 -0
- package/dist/client/_nuxt/utils-d6zq4cvn.js +1 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-h1waqukq.js +3862 -0
- package/dist/client/_nuxt/vendor/{json-editor-vue.css-lkbe0qhh.css → json-editor-vue.css-lb1ewor6.css} +1 -1
- package/dist/client/_nuxt/vendor/markdown-exit-nzr6hp55.js +12 -0
- package/dist/client/_nuxt/vendor/quicktype-core-lz5bp16m.js +929 -0
- package/dist/client/_nuxt/vendor/shiki-g3svwmfz.js +152 -0
- package/dist/client/_nuxt/vendor/unocss-hvwio62w.js +3 -0
- package/dist/client/_nuxt/vendor/unocss.css-bhad58wt.css +1 -0
- package/dist/client/_nuxt/vendor/vis-bjkylbfi.js +30 -0
- package/dist/client/_nuxt/virtual-files-la0ohl9t.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/devtools.client.js +1 -1
- package/dist/runtime/plugins/view/client.js +8 -9
- package/dist/runtime/plugins/vite-devtools.client.js +5 -1
- package/dist/shared/devtools.BNZC-DT8.mjs +114 -0
- package/dist/types.d.mts +1 -5
- package/dist/webcomponents/index.mjs +28 -31
- package/package.json +78 -71
- package/.discoveryrc.cjs +0 -13
- package/dist/chunks/vscode.mjs +0 -170
- package/dist/chunks/vue-devtools.mjs +0 -18
- package/dist/client/_nuxt/__blank-cpzbm3dn.js +0 -1
- package/dist/client/_nuxt/analyze-build-e7v5vkef.js +0 -1
- package/dist/client/_nuxt/assets-b5c187l4.js +0 -6
- package/dist/client/_nuxt/builds/meta/25fc8778-785e-4df1-8047-b131fc1cd4b2.json +0 -1
- package/dist/client/_nuxt/code-diff-idsu3m0z.js +0 -8
- package/dist/client/_nuxt/code-snippets-k81hoi4s.js +0 -1
- package/dist/client/_nuxt/components-bmictfph.js +0 -1
- package/dist/client/_nuxt/composable-item-cza22cup.js +0 -1
- package/dist/client/_nuxt/copkoh3j.js +0 -4
- package/dist/client/_nuxt/custom-_name_-gqm5kr56.js +0 -1
- package/dist/client/_nuxt/data-schema-button-b308wyi0.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-lr34uwsh.js +0 -2
- package/dist/client/_nuxt/debug-kgc8fptp.js +0 -1
- package/dist/client/_nuxt/default-jvhm51ri.js +0 -1
- package/dist/client/_nuxt/dev-auth-ojiqold5.js +0 -1
- package/dist/client/_nuxt/dist-duc3zu0y.js +0 -1
- package/dist/client/_nuxt/dist-mnod32r1.js +0 -1
- package/dist/client/_nuxt/duration-display-f7ucshmo.js +0 -1
- package/dist/client/_nuxt/entry.css-me26coxn.css +0 -1
- package/dist/client/_nuxt/error-404-nggtc73s.js +0 -1
- package/dist/client/_nuxt/error-404.css-j1aav08u.css +0 -1
- package/dist/client/_nuxt/error-500-dym2gzqx.js +0 -1
- package/dist/client/_nuxt/error-500.css-eu9fz4va.css +0 -1
- package/dist/client/_nuxt/error-fqinfa1x.js +0 -9
- package/dist/client/_nuxt/filepath-item-e1s52fbh.js +0 -1
- package/dist/client/_nuxt/full-et0weok9.js +0 -1
- package/dist/client/_nuxt/help-fab-hz6r2oxa.js +0 -1
- package/dist/client/_nuxt/hooks-i7nsduqp.js +0 -1
- package/dist/client/_nuxt/imports-9o2qs53q.js +0 -1
- package/dist/client/_nuxt/launch-page-hpkkqhit.js +0 -1
- package/dist/client/_nuxt/mitt.es-fjx0h8xe.js +0 -1
- package/dist/client/_nuxt/modules-jok0opuq.js +0 -1
- package/dist/client/_nuxt/nbadge-m66xoquo.js +0 -1
- package/dist/client/_nuxt/nbutton-gygn07c2.js +0 -1
- package/dist/client/_nuxt/ncard-mqcl8pso.js +0 -1
- package/dist/client/_nuxt/ncheckbox-c0r45qtu.js +0 -1
- package/dist/client/_nuxt/ncode-block-figzf35k.js +0 -2
- package/dist/client/_nuxt/ndrawer-bgqyrlmt.js +0 -1
- package/dist/client/_nuxt/ndropdown-cip8lboe.js +0 -1
- package/dist/client/_nuxt/nicon-m1crov2l.js +0 -1
- package/dist/client/_nuxt/nicon-title-tqdvw0w0.js +0 -1
- package/dist/client/_nuxt/nlink-od4lllbl.js +0 -1
- package/dist/client/_nuxt/nmarkdown-hw0hmqw7.js +0 -1
- package/dist/client/_nuxt/nnavbar-lpozm5fj.js +0 -1
- package/dist/client/_nuxt/none-bdxkqeml.js +0 -1
- package/dist/client/_nuxt/npanel-grids-dd23ifsw.js +0 -1
- package/dist/client/_nuxt/nsection-block-lqrohs9v.js +0 -1
- package/dist/client/_nuxt/nsection-block.css-h05mpq8x.css +0 -1
- package/dist/client/_nuxt/nselect-gczoit0g.js +0 -1
- package/dist/client/_nuxt/nselect-tabs-bsw5fg3d.js +0 -1
- package/dist/client/_nuxt/nswitch-ke379yjx.js +0 -1
- package/dist/client/_nuxt/ntext-input-cygthohl.js +0 -1
- package/dist/client/_nuxt/ntip-ke63ovgc.js +0 -1
- package/dist/client/_nuxt/nuxt-link-bumooa9d.js +0 -1
- package/dist/client/_nuxt/nuxt-otp6bp04.js +0 -1
- package/dist/client/_nuxt/open-graph-lumhcitx.js +0 -3
- package/dist/client/_nuxt/overview-c1ufrox9.js +0 -1
- package/dist/client/_nuxt/pages-cf1hvns3.js +0 -1
- package/dist/client/_nuxt/pages-lgihsvbt.js +0 -1
- package/dist/client/_nuxt/payload-fvgw4hh9.js +0 -1
- package/dist/client/_nuxt/pinia-lmrgyjxw.js +0 -1
- package/dist/client/_nuxt/plugins-ccaip8nh.js +0 -1
- package/dist/client/_nuxt/ready-dadbdj5i.js +0 -1
- package/dist/client/_nuxt/render-tree-corj3giw.js +0 -1
- package/dist/client/_nuxt/rolldown-runtime-oipoa1or.js +0 -1
- package/dist/client/_nuxt/rpc-ez4fzlum.js +0 -1
- package/dist/client/_nuxt/runtime-configs-im0uu24n.js +0 -1
- package/dist/client/_nuxt/server-discovery-ffkkczqi.js +0 -1
- package/dist/client/_nuxt/server-route-inputs-lspeoiem.js +0 -1
- package/dist/client/_nuxt/server-routes-dhvqrowz.js +0 -7
- package/dist/client/_nuxt/server-tasks-mr9ezn8q.js +0 -1
- package/dist/client/_nuxt/settings-issronwn.js +0 -1
- package/dist/client/_nuxt/splitpanes.es-bxyirks2.js +0 -1
- package/dist/client/_nuxt/stacktrace-list-hiui24c3.js +0 -1
- package/dist/client/_nuxt/state-components-fbls8ka7.js +0 -1
- package/dist/client/_nuxt/state-editor-c7e04uj2.js +0 -1
- package/dist/client/_nuxt/state-modules-inqbwd7z.js +0 -1
- package/dist/client/_nuxt/state-routes-jln33b1m.js +0 -1
- package/dist/client/_nuxt/state-tabs-etl5jr30.js +0 -1
- package/dist/client/_nuxt/storage-husj5pg6.js +0 -1
- package/dist/client/_nuxt/storage-options-cth3coln.js +0 -1
- package/dist/client/_nuxt/telemetry-eqv6a0hn.js +0 -1
- package/dist/client/_nuxt/terminals-kitd8oja.js +0 -1
- package/dist/client/_nuxt/terminals.css-mejv43xm.css +0 -1
- package/dist/client/_nuxt/timeline-gr4tcvcz.js +0 -31
- package/dist/client/_nuxt/unocss-runtime-cpug61u1.js +0 -1
- package/dist/client/_nuxt/utils-nbkl6byi.js +0 -2
- package/dist/client/_nuxt/vendor/json-editor-vue-eojr4v24.js +0 -3869
- package/dist/client/_nuxt/vendor/markdown-it-ckeo8pwp.js +0 -14
- package/dist/client/_nuxt/vendor/quicktype-core-k4qx3809.js +0 -929
- package/dist/client/_nuxt/vendor/shiki-lqo1hg2n.js +0 -153
- package/dist/client/_nuxt/vendor/unocss-k727ub0h.js +0 -3
- package/dist/client/_nuxt/vendor/unocss.css-3gd0e2sv.css +0 -1
- package/dist/client/_nuxt/vendor/vis-id8udisj.js +0 -26
- package/dist/client/_nuxt/vendor/xterm-ed0pys2e.js +0 -36
- package/dist/client/_nuxt/vendor/xterm.css-jqmddlol.css +0 -1
- package/dist/client/_nuxt/virtual-files-ky9cc4av.js +0 -1
- package/dist/client/_nuxt/vue-devtools-dunhx2nz.js +0 -4
- package/dist/client/_nuxt/vue-router-jbnxw7nb.js +0 -1
- package/dist/client/discovery/index.html +0 -611
- package/dist/runtime/vue-devtools-client.d.ts +0 -2
- package/dist/runtime/vue-devtools-client.js +0 -8
- package/dist/shared/devtools.COlX0Gls.mjs +0 -114
- /package/dist/client/_nuxt/{_plugin-vue_export-helper-n58akrbk.js → _plugin-vue_export-helper-d9irwgla.js} +0 -0
- /package/dist/client/_nuxt/{color-b9xoe9j2.js → color-abaog8vc.js} +0 -0
- /package/dist/client/_nuxt/{composables-b2ccklz4.js → composables-ioamscf4.js} +0 -0
- /package/dist/client/_nuxt/{constants-ih922r91.js → constants-g2z8m4rs.js} +0 -0
- /package/dist/client/_nuxt/{dist-m49wlq01.js → dist-das2ggjj.js} +0 -0
package/README.md
CHANGED
|
@@ -44,21 +44,100 @@ export default defineNuxtConfig({
|
|
|
44
44
|
})
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
### Opting in to v4.0
|
|
48
|
+
|
|
49
|
+
Nuxt DevTools v4.0 is currently in alpha. Since Nuxt ships with a built-in version of DevTools, you can opt-in to v4.0 by using package manager resolutions to override the bundled version:
|
|
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.
|
|
93
|
+
|
|
47
94
|
### Nightly Release Channel
|
|
48
95
|
|
|
49
96
|
Similar to [Nuxt's Nightly Channel](https://nuxt.com/docs/guide/going-further/nightly-release-channel), DevTools also offers a nightly release channel, that automatically releases for every commit to `main` branch.
|
|
50
97
|
|
|
51
|
-
You can opt-in to the nightly release channel by
|
|
98
|
+
You can opt-in to the nightly release channel by using package manager resolutions:
|
|
99
|
+
|
|
100
|
+
<details>
|
|
101
|
+
<summary>npm</summary>
|
|
52
102
|
|
|
53
|
-
```
|
|
103
|
+
```json
|
|
54
104
|
{
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
++ "@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
|
|
105
|
+
"overrides": {
|
|
106
|
+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
|
|
58
107
|
}
|
|
59
108
|
}
|
|
60
109
|
```
|
|
61
110
|
|
|
111
|
+
</details>
|
|
112
|
+
|
|
113
|
+
<details>
|
|
114
|
+
<summary>yarn</summary>
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"resolutions": {
|
|
119
|
+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
</details>
|
|
125
|
+
|
|
126
|
+
<details>
|
|
127
|
+
<summary>pnpm</summary>
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"pnpm": {
|
|
132
|
+
"overrides": {
|
|
133
|
+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
</details>
|
|
140
|
+
|
|
62
141
|
Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
|
|
63
142
|
|
|
64
143
|
### Module Options
|
|
@@ -71,8 +150,8 @@ export default defineNuxtConfig({
|
|
|
71
150
|
devtools: {
|
|
72
151
|
// Enable devtools (default: true)
|
|
73
152
|
enabled: true,
|
|
74
|
-
//
|
|
75
|
-
|
|
153
|
+
// Coder code-server options (enabled by default)
|
|
154
|
+
codeServer: {},
|
|
76
155
|
// ...other options
|
|
77
156
|
}
|
|
78
157
|
})
|
|
@@ -98,6 +177,8 @@ Nuxt DevTools collects anonymous telemetry data about general usage. This helps
|
|
|
98
177
|
|
|
99
178
|
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.
|
|
100
179
|
|
|
180
|
+
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.
|
|
181
|
+
|
|
101
182
|
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.
|
|
102
183
|
|
|
103
184
|
### Events
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
import { addVitePlugin } from '@nuxt/kit';
|
|
2
2
|
import { resolve, join } from 'pathe';
|
|
3
3
|
import { readdir, lstat } from 'node:fs/promises';
|
|
4
|
-
import { createVitePluginInspect } from './vite-inspect.mjs';
|
|
4
|
+
import { isVitePluginInspectAvailable, createVitePluginInspect } from './vite-inspect.mjs';
|
|
5
5
|
import '@nuxt/devtools-kit';
|
|
6
|
+
import '@vitejs/devtools-kit/node';
|
|
7
|
+
import 'local-pkg';
|
|
8
|
+
import './module-main.mjs';
|
|
9
|
+
import 'node:fs';
|
|
10
|
+
import 'node:os';
|
|
11
|
+
import 'consola/utils';
|
|
12
|
+
import 'sirv';
|
|
13
|
+
import 'vite';
|
|
14
|
+
import '../shared/devtools.BNZC-DT8.mjs';
|
|
15
|
+
import '../dirs.mjs';
|
|
16
|
+
import 'node:path';
|
|
17
|
+
import 'node:url';
|
|
18
|
+
import 'tinyexec';
|
|
19
|
+
import 'tinyglobby';
|
|
20
|
+
import 'image-meta';
|
|
21
|
+
import 'perfect-debounce';
|
|
22
|
+
import 'destr';
|
|
23
|
+
import '../../dist/runtime/shared/hooks.js';
|
|
24
|
+
import 'ohash';
|
|
25
|
+
import 'node:process';
|
|
26
|
+
import 'node:module';
|
|
27
|
+
import 'pkg-types';
|
|
28
|
+
import 'node:assert';
|
|
29
|
+
import 'node:v8';
|
|
30
|
+
import 'node:util';
|
|
31
|
+
import 'magicast';
|
|
32
|
+
import 'magicast/helpers';
|
|
33
|
+
import 'verkit';
|
|
34
|
+
import '@vitejs/devtools-kit/constants';
|
|
35
|
+
import 'unstorage';
|
|
6
36
|
|
|
7
37
|
async function getFolderSize(dir) {
|
|
8
38
|
const dirents = await readdir(dir, {
|
|
@@ -37,7 +67,7 @@ async function getFolderSize(dir) {
|
|
|
37
67
|
}
|
|
38
68
|
|
|
39
69
|
async function setup(nuxt, options) {
|
|
40
|
-
if (options.viteInspect !== false) {
|
|
70
|
+
if (options.viteInspect !== false && isVitePluginInspectAvailable(nuxt.options.rootDir)) {
|
|
41
71
|
addVitePlugin(
|
|
42
72
|
await createVitePluginInspect({
|
|
43
73
|
build: true,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { createCodeServerDevframe } from '@devframes/plugin-code-server';
|
|
2
|
+
import { setupCodeServer } from '@devframes/plugin-code-server/node';
|
|
3
|
+
import { deprecate, onDevtoolsReady, NUXT_DEVTOOLS_GROUP_ID } from '@nuxt/devtools-kit';
|
|
4
|
+
|
|
5
|
+
const RESERVED_ARGS = ["--auth", "--bind-addr", "--cookie-suffix"];
|
|
6
|
+
const RESERVED_ENV = ["PASSWORD", "HASHED_PASSWORD"];
|
|
7
|
+
function matchesOption(arg, option) {
|
|
8
|
+
return arg === option || arg.startsWith(`${option}=`);
|
|
9
|
+
}
|
|
10
|
+
function resolveCodeServerOptions(options, rootDir) {
|
|
11
|
+
const args = options?.args;
|
|
12
|
+
const reservedArg = args?.find((arg) => RESERVED_ARGS.some((option) => matchesOption(arg, option)));
|
|
13
|
+
if (reservedArg) {
|
|
14
|
+
throw new Error(
|
|
15
|
+
`[Nuxt DevTools] codeServer.args cannot override ${reservedArg.split("=")[0]}. Configure host and cookieSuffix through their dedicated codeServer options; authentication is managed automatically.`
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const env = options?.env;
|
|
19
|
+
const reservedEnv = RESERVED_ENV.find((key) => Object.hasOwn(env ?? {}, key));
|
|
20
|
+
if (reservedEnv) {
|
|
21
|
+
throw new Error(
|
|
22
|
+
`[Nuxt DevTools] codeServer.env cannot set ${reservedEnv}. Code Server authentication credentials are generated and managed automatically.`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
// The 0.7 plugin also knows about Microsoft's serve-web and tunnels. Nuxt
|
|
27
|
+
// intentionally exposes only Coder code-server for this integration.
|
|
28
|
+
backend: "code-server",
|
|
29
|
+
bin: options?.bin,
|
|
30
|
+
cwd: options?.cwd ?? rootDir,
|
|
31
|
+
serverPort: options?.serverPort,
|
|
32
|
+
host: options?.host,
|
|
33
|
+
args,
|
|
34
|
+
env,
|
|
35
|
+
cookieSuffix: options?.cookieSuffix,
|
|
36
|
+
startTimeout: options?.startTimeout
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function setup(ctx) {
|
|
40
|
+
const { nuxt, options } = ctx;
|
|
41
|
+
if (options.vscode !== void 0) {
|
|
42
|
+
deprecate(nuxt, "NDT_DEP_0008", {
|
|
43
|
+
api: "devtools.vscode",
|
|
44
|
+
replacement: "devtools.codeServer"
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (options.codeServer?.enabled === false)
|
|
48
|
+
return;
|
|
49
|
+
const codeServerOptions = resolveCodeServerOptions(options.codeServer, nuxt.options.rootDir);
|
|
50
|
+
const definition = createCodeServerDevframe(codeServerOptions);
|
|
51
|
+
let supervisor;
|
|
52
|
+
let setupPromise;
|
|
53
|
+
const mountedDefinition = {
|
|
54
|
+
...definition,
|
|
55
|
+
async setup(devframeCtx) {
|
|
56
|
+
setupPromise = setupCodeServer(devframeCtx, codeServerOptions);
|
|
57
|
+
supervisor = await setupPromise;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
nuxt.hook("close", async () => {
|
|
61
|
+
await setupPromise;
|
|
62
|
+
supervisor?.dispose();
|
|
63
|
+
});
|
|
64
|
+
onDevtoolsReady((kit) => {
|
|
65
|
+
return kit.install(mountedDefinition, {
|
|
66
|
+
dock: {
|
|
67
|
+
groupId: NUXT_DEVTOOLS_GROUP_ID,
|
|
68
|
+
category: "modules"
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}, nuxt);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { resolveCodeServerOptions, setup };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { registerDataSource, createDataInspectorDevframe } from '@devframes/plugin-data-inspector';
|
|
2
|
+
import { onDevtoolsReady, NUXT_DEVTOOLS_GROUP_ID, deprecate } from '@nuxt/devtools-kit';
|
|
3
|
+
|
|
4
|
+
const captured = {};
|
|
5
|
+
function normalizeViteConfig(config) {
|
|
6
|
+
return {
|
|
7
|
+
...config,
|
|
8
|
+
environments: Object.fromEntries(
|
|
9
|
+
Object.entries(config.env ?? {}).map(([key, _]) => {
|
|
10
|
+
return [key, null];
|
|
11
|
+
})
|
|
12
|
+
),
|
|
13
|
+
plugins: (config.plugins ?? []).map((i) => {
|
|
14
|
+
const clone = { ...i };
|
|
15
|
+
delete clone.api;
|
|
16
|
+
return clone;
|
|
17
|
+
}),
|
|
18
|
+
inlineConfig: null
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function setup(ctx) {
|
|
22
|
+
const { nuxt } = ctx;
|
|
23
|
+
nuxt.hook("nitro:build:before", (nitro) => {
|
|
24
|
+
captured.nitro = nitro;
|
|
25
|
+
});
|
|
26
|
+
nuxt.hook("vite:serverCreated", (server) => {
|
|
27
|
+
captured.vite = server;
|
|
28
|
+
});
|
|
29
|
+
const dataSource = registerDataSource({
|
|
30
|
+
id: "nuxt:application",
|
|
31
|
+
title: "Nuxt Application",
|
|
32
|
+
description: "Live Nuxt, Nitro, and Vite configuration",
|
|
33
|
+
icon: "i-ph:database-duotone",
|
|
34
|
+
static: false,
|
|
35
|
+
data: () => ({
|
|
36
|
+
nuxt: nuxt.options,
|
|
37
|
+
nitro: captured.nitro?.options,
|
|
38
|
+
vite: captured.vite
|
|
39
|
+
}),
|
|
40
|
+
queries: [
|
|
41
|
+
{ title: "Overview", query: "", excludeFunctions: true },
|
|
42
|
+
{ title: "Nuxt modules", query: "nuxt.modules", excludeFunctions: true },
|
|
43
|
+
{ title: "Vite plugins", query: "vite.config.plugins", excludeFunctions: true },
|
|
44
|
+
{ title: "Vite config", query: "vite.config", excludeFunctions: true },
|
|
45
|
+
{ title: "Vite environments", query: "vite.environments", excludeFunctions: true },
|
|
46
|
+
{ title: "Nitro routes", query: "nitro.handlers", excludeFunctions: true }
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
nuxt.hook("close", () => {
|
|
50
|
+
dataSource.unregister();
|
|
51
|
+
captured.nitro = void 0;
|
|
52
|
+
captured.vite = void 0;
|
|
53
|
+
});
|
|
54
|
+
const definition = createDataInspectorDevframe({ exampleSource: false });
|
|
55
|
+
onDevtoolsReady((kit) => {
|
|
56
|
+
return kit.install(definition, {
|
|
57
|
+
dock: {
|
|
58
|
+
groupId: NUXT_DEVTOOLS_GROUP_ID,
|
|
59
|
+
category: "advanced"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}, nuxt);
|
|
63
|
+
}
|
|
64
|
+
function getServerData(nuxt) {
|
|
65
|
+
deprecate(nuxt, "NDT_DEP_0009", {
|
|
66
|
+
api: "getServerData()",
|
|
67
|
+
replacement: "the Nuxt Application source in the Data Inspector panel"
|
|
68
|
+
});
|
|
69
|
+
const config = captured.vite?.config;
|
|
70
|
+
return {
|
|
71
|
+
nuxt: nuxt.options,
|
|
72
|
+
nitro: captured.nitro?.options,
|
|
73
|
+
vite: {
|
|
74
|
+
server: config ? normalizeViteConfig(config) : void 0,
|
|
75
|
+
client: config ? normalizeViteConfig(config) : void 0
|
|
76
|
+
}
|
|
77
|
+
// `nuxt.options` is `@nuxt/schema`'s `NuxtOptions` while `NuxtServerData`
|
|
78
|
+
// pins the structurally-identical `nuxt/schema` one; bridge the two.
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { getServerData, setup };
|