@nuxt/devtools 4.0.0-alpha.3 → 4.0.0-alpha.6
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/chunks/analyze-build.mjs +0 -1
- package/dist/chunks/module-main.mjs +105 -100
- package/dist/chunks/vite-inspect.mjs +8 -20
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/__blank-ekrx7eve.js +1 -0
- package/dist/client/_nuxt/analyze-build-gtjxxh9s.js +1 -0
- package/dist/client/_nuxt/assets-fxuoynew.js +6 -0
- package/dist/client/_nuxt/auth-required-panel-gwrodxrm.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/386e78c8-3698-49a8-a7c5-53c44542b939.json +1 -0
- package/dist/client/_nuxt/client-jwk7bkap.js +1 -0
- package/dist/client/_nuxt/{code-diff-o5b2z2ie.js → code-diff-d1bf4mlz.js} +4 -4
- package/dist/client/_nuxt/code-snippets-nodldh90.js +1 -0
- package/dist/client/_nuxt/components-ibu6c1zd.js +1 -0
- package/dist/client/_nuxt/composable-item-lb3qexrh.js +1 -0
- package/dist/client/_nuxt/custom-_name_-dt22ybu3.js +1 -0
- package/dist/client/_nuxt/data-schema-button-m4wb470q.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-5ccj6aug.js +2 -0
- package/dist/client/_nuxt/debug-nxl66qh3.js +1 -0
- package/dist/client/_nuxt/default-ibmlv6hu.js +1 -0
- package/dist/client/_nuxt/dist-nsuzcp77.js +1 -0
- package/dist/client/_nuxt/duration-display-cfe3xsok.js +1 -0
- package/dist/client/_nuxt/entry.css-m21ytcnz.css +1 -0
- package/dist/client/_nuxt/error-404-izmgsqlm.js +1 -0
- package/dist/client/_nuxt/error-404.css-l9jcssuy.css +1 -0
- package/dist/client/_nuxt/{error-500-oozftcqy.js → error-500-fejd4grh.js} +1 -1
- package/dist/client/_nuxt/error-500.css-he4ew8b1.css +1 -0
- package/dist/client/_nuxt/{error-knm3fbzu.js → error-mm873c55.js} +2 -2
- package/dist/client/_nuxt/filepath-item-calgslzq.js +1 -0
- package/dist/client/_nuxt/full-pesi6bu3.js +1 -0
- package/dist/client/_nuxt/h0fobd1u.js +4 -0
- package/dist/client/_nuxt/help-fab-ietvwhig.js +1 -0
- package/dist/client/_nuxt/hooks-mqgelnks.js +1 -0
- package/dist/client/_nuxt/imports-bofdhcsr.js +1 -0
- package/dist/client/_nuxt/launch-page-i8mgxym7.js +1 -0
- package/dist/client/_nuxt/modules-b6uha2ss.js +1 -0
- package/dist/client/_nuxt/nbadge-ft1i3ddy.js +1 -0
- package/dist/client/_nuxt/ncheckbox-gl62y715.js +1 -0
- package/dist/client/_nuxt/ncode-block-ksrq5ppu.js +2 -0
- package/dist/client/_nuxt/{ncode-block.css-o2ixs97j.css → ncode-block.css-ivoxtfjk.css} +1 -1
- package/dist/client/_nuxt/ndrawer-evv584t1.js +1 -0
- package/dist/client/_nuxt/ndropdown-dqqc8bnq.js +1 -0
- package/dist/client/_nuxt/nicon-title-f3ho3hah.js +1 -0
- package/dist/client/_nuxt/nlink-endeyoly.js +1 -0
- package/dist/client/_nuxt/nmarkdown-iw4stzqp.js +1 -0
- package/dist/client/_nuxt/nnavbar-n8fcnalx.js +1 -0
- package/dist/client/_nuxt/none-gr24yqiq.js +1 -0
- package/dist/client/_nuxt/nsection-block-n5u7wj9x.js +1 -0
- package/dist/client/_nuxt/nsection-block.css-h1lgpwgm.css +1 -0
- package/dist/client/_nuxt/nselect-kdzalcm2.js +1 -0
- package/dist/client/_nuxt/nselect-tabs-e440xayq.js +1 -0
- package/dist/client/_nuxt/nswitch-pdw73751.js +1 -0
- package/dist/client/_nuxt/ntip-m8x8y44j.js +1 -0
- package/dist/client/_nuxt/nuxt-kphganvs.js +1 -0
- package/dist/client/_nuxt/open-graph-mtq8qyx5.js +3 -0
- package/dist/client/_nuxt/overview-mgkokpl9.js +1 -0
- package/dist/client/_nuxt/pages-g3tcvbsn.js +1 -0
- package/dist/client/_nuxt/pages-lk0hxlsc.js +1 -0
- package/dist/client/_nuxt/payload-ovd8emqe.js +1 -0
- package/dist/client/_nuxt/pinia-e6em75yg.js +1 -0
- package/dist/client/_nuxt/plugins-ojph2z4c.js +1 -0
- package/dist/client/_nuxt/ready-b5u27bv4.js +1 -0
- package/dist/client/_nuxt/render-tree-iwtso0n9.js +1 -0
- package/dist/client/_nuxt/rolldown-runtime-imbltlrc.js +1 -0
- package/dist/client/_nuxt/rpc-ewzip6fb.js +4 -0
- package/dist/client/_nuxt/runtime-configs-gyhmrfcz.js +1 -0
- package/dist/client/_nuxt/server-discovery-cfu428ir.js +1 -0
- package/dist/client/_nuxt/server-route-inputs-hhxdu10p.js +1 -0
- package/dist/client/_nuxt/server-routes-efc7olve.js +7 -0
- package/dist/client/_nuxt/server-tasks-o59rfww6.js +1 -0
- package/dist/client/_nuxt/settings-c6tbo50r.js +1 -0
- package/dist/client/_nuxt/stacktrace-list-c5b46nul.js +1 -0
- package/dist/client/_nuxt/{state-components-pfh0w3gz.js → state-components-eaw2evd3.js} +1 -1
- package/dist/client/_nuxt/state-editor-jm35t8p1.js +1 -0
- package/dist/client/_nuxt/state-modules-oox7nhib.js +1 -0
- package/dist/client/_nuxt/storage-fdd2zc94.js +1 -0
- package/dist/client/_nuxt/{storage-options-fmhmng6m.js → storage-options-ho965h55.js} +1 -1
- package/dist/client/_nuxt/terminals-b8awmi75.js +1 -0
- package/dist/client/_nuxt/timeline-nsh72kov.js +31 -0
- package/dist/client/_nuxt/unocss-runtime-mcb0a6oh.js +1 -0
- package/dist/client/_nuxt/utils-hgmynvjd.js +2 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-mkw4apmc.js +3869 -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-it-gg8o3tmh.js +14 -0
- package/dist/client/_nuxt/vendor/{quicktype-core-bxh3g3c2.js → quicktype-core-ozubcbyl.js} +50 -50
- package/dist/client/_nuxt/vendor/shiki-c7z35hpo.js +293 -0
- package/dist/client/_nuxt/vendor/unocss-mfjt4fak.js +3 -0
- package/dist/client/_nuxt/vendor/unocss.css-flyrgbwp.css +1 -0
- package/dist/client/_nuxt/vendor/vis-izx2wksk.js +26 -0
- package/dist/client/_nuxt/vendor/{xterm-g6v3jqah.js → xterm-eb5atty5.js} +3 -3
- package/dist/client/_nuxt/vendor/{xterm.css-jqmddlol.css → xterm.css-j9zpjwmg.css} +1 -1
- package/dist/client/_nuxt/virtual-files-met9zkti.js +1 -0
- package/dist/client/_nuxt/vue-devtools-bl144b70.js +4 -0
- package/dist/client/_nuxt/vue-router-cnnrtyb0.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/devtools.client.js +1 -1
- package/dist/runtime/plugins/view/client.js +1 -1
- package/dist/shared/{devtools.DClER4Dv.mjs → devtools.nEotcg1R.mjs} +1 -1
- package/dist/webcomponents/index.mjs +23 -27
- package/package.json +50 -49
- package/dist/client/_nuxt/__blank-hkoz1rvj.js +0 -1
- package/dist/client/_nuxt/analyze-build-kqtn42f3.js +0 -1
- package/dist/client/_nuxt/assets-pdpavuv7.js +0 -6
- package/dist/client/_nuxt/auth-required-panel-eykuzska.js +0 -1
- package/dist/client/_nuxt/builds/meta/424f9fd7-bd33-4b1e-8498-929c14b6ad71.json +0 -1
- package/dist/client/_nuxt/client-coqmopwz.js +0 -1
- package/dist/client/_nuxt/code-snippets-lje00rjy.js +0 -1
- package/dist/client/_nuxt/components-mkmd03mc.js +0 -1
- package/dist/client/_nuxt/composable-item-lw4aqry9.js +0 -1
- package/dist/client/_nuxt/custom-_name_-h2d0kmts.js +0 -1
- package/dist/client/_nuxt/data-schema-button-g6gxhvpu.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-h229qgae.js +0 -2
- package/dist/client/_nuxt/debug-ezvak7q9.js +0 -1
- package/dist/client/_nuxt/default-f17ja76u.js +0 -1
- package/dist/client/_nuxt/dev-auth-h6radlhi.js +0 -1
- package/dist/client/_nuxt/dist-duc3zu0y.js +0 -1
- package/dist/client/_nuxt/dist-f16b9vaq.js +0 -1
- package/dist/client/_nuxt/dist-mnod32r1.js +0 -1
- package/dist/client/_nuxt/duration-display-lgba3ul7.js +0 -1
- package/dist/client/_nuxt/entry.css-d9crsfkn.css +0 -1
- package/dist/client/_nuxt/error-404-j6bw0i0a.js +0 -1
- package/dist/client/_nuxt/error-404.css-op0yx84h.css +0 -1
- package/dist/client/_nuxt/error-500.css-f169vd1x.css +0 -1
- package/dist/client/_nuxt/filepath-item-o7vxzdbh.js +0 -1
- package/dist/client/_nuxt/full-h1zczfpi.js +0 -1
- package/dist/client/_nuxt/h9sdxxta.js +0 -4
- package/dist/client/_nuxt/help-fab-ekagn9f2.js +0 -1
- package/dist/client/_nuxt/hooks-k3agmywq.js +0 -1
- package/dist/client/_nuxt/imports-gw4s306d.js +0 -1
- package/dist/client/_nuxt/launch-page-jvtn5jef.js +0 -1
- package/dist/client/_nuxt/mitt.es-pc7qwi6p.js +0 -1
- package/dist/client/_nuxt/modules-b3ta2mlp.js +0 -1
- package/dist/client/_nuxt/nbadge-ia2sg78l.js +0 -1
- package/dist/client/_nuxt/ncard-bpchuz30.js +0 -1
- package/dist/client/_nuxt/ncheckbox-dqqmiqln.js +0 -1
- package/dist/client/_nuxt/ncode-block-lbvhz228.js +0 -2
- package/dist/client/_nuxt/ndrawer-pdhwqkg2.js +0 -1
- package/dist/client/_nuxt/ndropdown-o0hg8oi1.js +0 -1
- package/dist/client/_nuxt/nicon-o8vtl3nv.js +0 -1
- package/dist/client/_nuxt/nicon-title-f04kekaa.js +0 -1
- package/dist/client/_nuxt/nlink-flm1s7uj.js +0 -1
- package/dist/client/_nuxt/nmarkdown-cu68ujlp.js +0 -1
- package/dist/client/_nuxt/nnavbar-iwf1qrzf.js +0 -1
- package/dist/client/_nuxt/none-b8do2yyn.js +0 -1
- package/dist/client/_nuxt/nsection-block-oc6icst0.js +0 -1
- package/dist/client/_nuxt/nsection-block.css-h05mpq8x.css +0 -1
- package/dist/client/_nuxt/nselect-k14i70o0.js +0 -1
- package/dist/client/_nuxt/nselect-tabs-gmel1seg.js +0 -1
- package/dist/client/_nuxt/nswitch-kprd7bwp.js +0 -1
- package/dist/client/_nuxt/ntip-erjk5wo4.js +0 -1
- package/dist/client/_nuxt/nuxt-bl8ryhiw.js +0 -1
- package/dist/client/_nuxt/nuxt-link-h8a2u03t.js +0 -1
- package/dist/client/_nuxt/open-graph-ipvg6gyk.js +0 -3
- package/dist/client/_nuxt/overview-fbg2mjz1.js +0 -1
- package/dist/client/_nuxt/pages-jx3r1z1o.js +0 -1
- package/dist/client/_nuxt/pages-nqnq5f5t.js +0 -1
- package/dist/client/_nuxt/payload-f7ar9blu.js +0 -1
- package/dist/client/_nuxt/pinia-in67b2ff.js +0 -1
- package/dist/client/_nuxt/plugins-foc4m9cu.js +0 -1
- package/dist/client/_nuxt/ready-nmtplnq5.js +0 -1
- package/dist/client/_nuxt/render-tree-mzpnvjww.js +0 -1
- package/dist/client/_nuxt/rolldown-runtime-oipoa1or.js +0 -1
- package/dist/client/_nuxt/rpc-ga26o8l5.js +0 -1
- package/dist/client/_nuxt/runtime-configs-f691dtpr.js +0 -1
- package/dist/client/_nuxt/server-discovery-fa3lq0oe.js +0 -1
- package/dist/client/_nuxt/server-route-inputs-kx5eivj6.js +0 -1
- package/dist/client/_nuxt/server-routes-ozsawrbd.js +0 -7
- package/dist/client/_nuxt/server-tasks-sykxh8ji.js +0 -1
- package/dist/client/_nuxt/settings-eufw79s0.js +0 -1
- package/dist/client/_nuxt/splitpanes.es-krbzt5ww.js +0 -1
- package/dist/client/_nuxt/stacktrace-list-ilvbql3y.js +0 -1
- package/dist/client/_nuxt/state-editor-c9yn0k8x.js +0 -1
- package/dist/client/_nuxt/state-modules-c35cpfly.js +0 -1
- package/dist/client/_nuxt/state-tabs-0wkipn6s.js +0 -1
- package/dist/client/_nuxt/storage-dqgie6yp.js +0 -1
- package/dist/client/_nuxt/terminals-o5xyk44w.js +0 -1
- package/dist/client/_nuxt/timeline-hwj8vazt.js +0 -31
- package/dist/client/_nuxt/unocss-runtime-fghua2d1.js +0 -1
- package/dist/client/_nuxt/utils-c43quyky.js +0 -2
- package/dist/client/_nuxt/vendor/json-editor-vue-mpqfj7dd.js +0 -3869
- package/dist/client/_nuxt/vendor/markdown-it-liuu8zo7.js +0 -14
- package/dist/client/_nuxt/vendor/shiki-ildq90cv.js +0 -153
- package/dist/client/_nuxt/vendor/unocss-hiscr44j.js +0 -3
- package/dist/client/_nuxt/vendor/unocss.css-3gd0e2sv.css +0 -1
- package/dist/client/_nuxt/vendor/vis-obscvyyi.js +0 -26
- package/dist/client/_nuxt/virtual-files-ld5g0ep3.js +0 -1
- package/dist/client/_nuxt/vue-devtools-mcimudqm.js +0 -4
- package/dist/client/_nuxt/vue-router-imuzx5c1.js +0 -1
- /package/dist/client/_nuxt/{_plugin-vue_export-helper-n58akrbk.js → _plugin-vue_export-helper-d9irwgla.js} +0 -0
- /package/dist/client/_nuxt/{color-bh8526bd.js → color-abaog8vc.js} +0 -0
- /package/dist/client/_nuxt/{composables-f0oa0ya0.js → composables-ioamscf4.js} +0 -0
- /package/dist/client/_nuxt/{constants-g7ujya00.js → constants-g2z8m4rs.js} +0 -0
|
@@ -2,7 +2,6 @@ import { addVitePlugin } from '@nuxt/kit';
|
|
|
2
2
|
import { resolve, join } from 'pathe';
|
|
3
3
|
import { readdir, lstat } from 'node:fs/promises';
|
|
4
4
|
import { createVitePluginInspect } from './vite-inspect.mjs';
|
|
5
|
-
import '@nuxt/devtools-kit';
|
|
6
5
|
|
|
7
6
|
async function getFolderSize(dir) {
|
|
8
7
|
const dirents = await readdir(dir, {
|
|
@@ -6,7 +6,7 @@ import { colors } from 'consola/utils';
|
|
|
6
6
|
import { join, dirname, resolve, isAbsolute } from 'pathe';
|
|
7
7
|
import sirv from 'sirv';
|
|
8
8
|
import { searchForWorkspaceRoot } from 'vite';
|
|
9
|
-
import { d as defaultAllowedExtensions, a as defaultTabOptions } from '../shared/devtools.
|
|
9
|
+
import { d as defaultAllowedExtensions, a as defaultTabOptions } from '../shared/devtools.nEotcg1R.mjs';
|
|
10
10
|
import { runtimeDir, clientDir, packageDir } from '../dirs.mjs';
|
|
11
11
|
import { startSubprocess } from '@nuxt/devtools-kit';
|
|
12
12
|
import { x } from 'tinyexec';
|
|
@@ -30,10 +30,10 @@ import { getDefaultExportOptions, addNuxtModule } from 'magicast/helpers';
|
|
|
30
30
|
import semver from 'semver';
|
|
31
31
|
import { normalizeBaseKey, normalizeKey } from 'unstorage';
|
|
32
32
|
|
|
33
|
-
const version$1 = "4.0.0-alpha.
|
|
33
|
+
const version$1 = "4.0.0-alpha.6";
|
|
34
34
|
|
|
35
35
|
const COLON_RE = /:/g;
|
|
36
|
-
function setupAnalyzeBuildRPC({ nuxt, refresh
|
|
36
|
+
function setupAnalyzeBuildRPC({ nuxt, refresh }) {
|
|
37
37
|
let builds = [];
|
|
38
38
|
let promise;
|
|
39
39
|
let initalized;
|
|
@@ -127,8 +127,7 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
|
|
|
127
127
|
builds
|
|
128
128
|
};
|
|
129
129
|
},
|
|
130
|
-
async clearAnalyzeBuilds(
|
|
131
|
-
await ensureDevAuthToken(token);
|
|
130
|
+
async clearAnalyzeBuilds(names) {
|
|
132
131
|
if (!names) {
|
|
133
132
|
await fs.rm(devtoolsAnalyzeDir, { recursive: true, force: true });
|
|
134
133
|
} else {
|
|
@@ -139,14 +138,13 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
|
|
|
139
138
|
refresh("getAnalyzeBuildInfo");
|
|
140
139
|
},
|
|
141
140
|
generateAnalyzeBuildName,
|
|
142
|
-
async startAnalyzeBuild(
|
|
143
|
-
await ensureDevAuthToken(token);
|
|
141
|
+
async startAnalyzeBuild(...args) {
|
|
144
142
|
return startAnalyzeBuild(...args);
|
|
145
143
|
}
|
|
146
144
|
};
|
|
147
145
|
}
|
|
148
146
|
|
|
149
|
-
function setupAssetsRPC({ nuxt,
|
|
147
|
+
function setupAssetsRPC({ nuxt, refresh, options }) {
|
|
150
148
|
const _imageMetaCache = /* @__PURE__ */ new Map();
|
|
151
149
|
let cache = null;
|
|
152
150
|
const extensions = options.assets?.uploadExtensions || defaultAllowedExtensions;
|
|
@@ -202,8 +200,7 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
|
|
|
202
200
|
async getStaticAssets() {
|
|
203
201
|
return await scan();
|
|
204
202
|
},
|
|
205
|
-
async getImageMeta(
|
|
206
|
-
await ensureDevAuthToken(token);
|
|
203
|
+
async getImageMeta(filepath) {
|
|
207
204
|
if (_imageMetaCache.has(filepath))
|
|
208
205
|
return _imageMetaCache.get(filepath);
|
|
209
206
|
try {
|
|
@@ -216,8 +213,7 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
|
|
|
216
213
|
return void 0;
|
|
217
214
|
}
|
|
218
215
|
},
|
|
219
|
-
async getTextAssetContent(
|
|
220
|
-
await ensureDevAuthToken(token);
|
|
216
|
+
async getTextAssetContent(filepath, limit = 300) {
|
|
221
217
|
try {
|
|
222
218
|
const content = await fs.readFile(filepath, "utf-8");
|
|
223
219
|
return content.slice(0, limit);
|
|
@@ -226,8 +222,7 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
|
|
|
226
222
|
return void 0;
|
|
227
223
|
}
|
|
228
224
|
},
|
|
229
|
-
async writeStaticAssets(
|
|
230
|
-
await ensureDevAuthToken(token);
|
|
225
|
+
async writeStaticAssets(files, folder) {
|
|
231
226
|
const baseDir = resolve(nuxt.options.srcDir, nuxt.options.dir.public + folder);
|
|
232
227
|
return await Promise.all(
|
|
233
228
|
files.map(async ({ path, content, encoding, override }) => {
|
|
@@ -258,12 +253,10 @@ You can configure it in Nuxt config at \`devtools.assets.uploadExtensions\`.`);
|
|
|
258
253
|
})
|
|
259
254
|
);
|
|
260
255
|
},
|
|
261
|
-
async deleteStaticAsset(
|
|
262
|
-
await ensureDevAuthToken(token);
|
|
256
|
+
async deleteStaticAsset(path) {
|
|
263
257
|
return await fs.unlink(path);
|
|
264
258
|
},
|
|
265
|
-
async renameStaticAsset(
|
|
266
|
-
await ensureDevAuthToken(token);
|
|
259
|
+
async renameStaticAsset(oldPath, newPath) {
|
|
267
260
|
const exist = cache?.find((asset) => asset.filePath === newPath);
|
|
268
261
|
if (exist)
|
|
269
262
|
throw new Error(`[Nuxt DevTools] File ${newPath} already exists, failed to rename`);
|
|
@@ -1241,10 +1234,10 @@ var pp$8 = Parser.prototype;
|
|
|
1241
1234
|
// to its body instead of creating a new node.
|
|
1242
1235
|
|
|
1243
1236
|
pp$8.parseTopLevel = function(node) {
|
|
1244
|
-
var exports
|
|
1237
|
+
var exports = Object.create(null);
|
|
1245
1238
|
if (!node.body) { node.body = []; }
|
|
1246
1239
|
while (this.type !== types$1.eof) {
|
|
1247
|
-
var stmt = this.parseStatement(null, true, exports
|
|
1240
|
+
var stmt = this.parseStatement(null, true, exports);
|
|
1248
1241
|
node.body.push(stmt);
|
|
1249
1242
|
}
|
|
1250
1243
|
if (this.inModule)
|
|
@@ -1352,7 +1345,7 @@ pp$8.isUsing = function(isFor) {
|
|
|
1352
1345
|
// `if (foo) /blah/.exec(foo)`, where looking at the previous token
|
|
1353
1346
|
// does not help.
|
|
1354
1347
|
|
|
1355
|
-
pp$8.parseStatement = function(context, topLevel, exports
|
|
1348
|
+
pp$8.parseStatement = function(context, topLevel, exports) {
|
|
1356
1349
|
var starttype = this.type, node = this.startNode(), kind;
|
|
1357
1350
|
|
|
1358
1351
|
if (this.isLet(context)) {
|
|
@@ -1407,7 +1400,7 @@ pp$8.parseStatement = function(context, topLevel, exports$1) {
|
|
|
1407
1400
|
if (!this.inModule)
|
|
1408
1401
|
{ this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); }
|
|
1409
1402
|
}
|
|
1410
|
-
return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports
|
|
1403
|
+
return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports)
|
|
1411
1404
|
|
|
1412
1405
|
// If the statement does not start with a statement keyword or a
|
|
1413
1406
|
// brace, it's an ExpressionStatement or LabeledStatement. We
|
|
@@ -2168,11 +2161,11 @@ function checkKeyName(node, name) {
|
|
|
2168
2161
|
|
|
2169
2162
|
// Parses module export declaration.
|
|
2170
2163
|
|
|
2171
|
-
pp$8.parseExportAllDeclaration = function(node, exports
|
|
2164
|
+
pp$8.parseExportAllDeclaration = function(node, exports) {
|
|
2172
2165
|
if (this.options.ecmaVersion >= 11) {
|
|
2173
2166
|
if (this.eatContextual("as")) {
|
|
2174
2167
|
node.exported = this.parseModuleExportName();
|
|
2175
|
-
this.checkExport(exports
|
|
2168
|
+
this.checkExport(exports, node.exported, this.lastTokStart);
|
|
2176
2169
|
} else {
|
|
2177
2170
|
node.exported = null;
|
|
2178
2171
|
}
|
|
@@ -2186,14 +2179,14 @@ pp$8.parseExportAllDeclaration = function(node, exports$1) {
|
|
|
2186
2179
|
return this.finishNode(node, "ExportAllDeclaration")
|
|
2187
2180
|
};
|
|
2188
2181
|
|
|
2189
|
-
pp$8.parseExport = function(node, exports
|
|
2182
|
+
pp$8.parseExport = function(node, exports) {
|
|
2190
2183
|
this.next();
|
|
2191
2184
|
// export * from '...'
|
|
2192
2185
|
if (this.eat(types$1.star)) {
|
|
2193
|
-
return this.parseExportAllDeclaration(node, exports
|
|
2186
|
+
return this.parseExportAllDeclaration(node, exports)
|
|
2194
2187
|
}
|
|
2195
2188
|
if (this.eat(types$1._default)) { // export default ...
|
|
2196
|
-
this.checkExport(exports
|
|
2189
|
+
this.checkExport(exports, "default", this.lastTokStart);
|
|
2197
2190
|
node.declaration = this.parseExportDefaultDeclaration();
|
|
2198
2191
|
return this.finishNode(node, "ExportDefaultDeclaration")
|
|
2199
2192
|
}
|
|
@@ -2201,16 +2194,16 @@ pp$8.parseExport = function(node, exports$1) {
|
|
|
2201
2194
|
if (this.shouldParseExportStatement()) {
|
|
2202
2195
|
node.declaration = this.parseExportDeclaration(node);
|
|
2203
2196
|
if (node.declaration.type === "VariableDeclaration")
|
|
2204
|
-
{ this.checkVariableExport(exports
|
|
2197
|
+
{ this.checkVariableExport(exports, node.declaration.declarations); }
|
|
2205
2198
|
else
|
|
2206
|
-
{ this.checkExport(exports
|
|
2199
|
+
{ this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
|
|
2207
2200
|
node.specifiers = [];
|
|
2208
2201
|
node.source = null;
|
|
2209
2202
|
if (this.options.ecmaVersion >= 16)
|
|
2210
2203
|
{ node.attributes = []; }
|
|
2211
2204
|
} else { // export { x, y as z } [from '...']
|
|
2212
2205
|
node.declaration = null;
|
|
2213
|
-
node.specifiers = this.parseExportSpecifiers(exports
|
|
2206
|
+
node.specifiers = this.parseExportSpecifiers(exports);
|
|
2214
2207
|
if (this.eatContextual("from")) {
|
|
2215
2208
|
if (this.type !== types$1.string) { this.unexpected(); }
|
|
2216
2209
|
node.source = this.parseExprAtom();
|
|
@@ -2260,47 +2253,47 @@ pp$8.parseExportDefaultDeclaration = function() {
|
|
|
2260
2253
|
}
|
|
2261
2254
|
};
|
|
2262
2255
|
|
|
2263
|
-
pp$8.checkExport = function(exports
|
|
2264
|
-
if (!exports
|
|
2256
|
+
pp$8.checkExport = function(exports, name, pos) {
|
|
2257
|
+
if (!exports) { return }
|
|
2265
2258
|
if (typeof name !== "string")
|
|
2266
2259
|
{ name = name.type === "Identifier" ? name.name : name.value; }
|
|
2267
|
-
if (hasOwn(exports
|
|
2260
|
+
if (hasOwn(exports, name))
|
|
2268
2261
|
{ this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
|
|
2269
|
-
exports
|
|
2262
|
+
exports[name] = true;
|
|
2270
2263
|
};
|
|
2271
2264
|
|
|
2272
|
-
pp$8.checkPatternExport = function(exports
|
|
2265
|
+
pp$8.checkPatternExport = function(exports, pat) {
|
|
2273
2266
|
var type = pat.type;
|
|
2274
2267
|
if (type === "Identifier")
|
|
2275
|
-
{ this.checkExport(exports
|
|
2268
|
+
{ this.checkExport(exports, pat, pat.start); }
|
|
2276
2269
|
else if (type === "ObjectPattern")
|
|
2277
2270
|
{ for (var i = 0, list = pat.properties; i < list.length; i += 1)
|
|
2278
2271
|
{
|
|
2279
2272
|
var prop = list[i];
|
|
2280
2273
|
|
|
2281
|
-
this.checkPatternExport(exports
|
|
2274
|
+
this.checkPatternExport(exports, prop);
|
|
2282
2275
|
} }
|
|
2283
2276
|
else if (type === "ArrayPattern")
|
|
2284
2277
|
{ for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
|
|
2285
2278
|
var elt = list$1[i$1];
|
|
2286
2279
|
|
|
2287
|
-
if (elt) { this.checkPatternExport(exports
|
|
2280
|
+
if (elt) { this.checkPatternExport(exports, elt); }
|
|
2288
2281
|
} }
|
|
2289
2282
|
else if (type === "Property")
|
|
2290
|
-
{ this.checkPatternExport(exports
|
|
2283
|
+
{ this.checkPatternExport(exports, pat.value); }
|
|
2291
2284
|
else if (type === "AssignmentPattern")
|
|
2292
|
-
{ this.checkPatternExport(exports
|
|
2285
|
+
{ this.checkPatternExport(exports, pat.left); }
|
|
2293
2286
|
else if (type === "RestElement")
|
|
2294
|
-
{ this.checkPatternExport(exports
|
|
2287
|
+
{ this.checkPatternExport(exports, pat.argument); }
|
|
2295
2288
|
};
|
|
2296
2289
|
|
|
2297
|
-
pp$8.checkVariableExport = function(exports
|
|
2298
|
-
if (!exports
|
|
2290
|
+
pp$8.checkVariableExport = function(exports, decls) {
|
|
2291
|
+
if (!exports) { return }
|
|
2299
2292
|
for (var i = 0, list = decls; i < list.length; i += 1)
|
|
2300
2293
|
{
|
|
2301
2294
|
var decl = list[i];
|
|
2302
2295
|
|
|
2303
|
-
this.checkPatternExport(exports
|
|
2296
|
+
this.checkPatternExport(exports, decl.id);
|
|
2304
2297
|
}
|
|
2305
2298
|
};
|
|
2306
2299
|
|
|
@@ -2315,13 +2308,13 @@ pp$8.shouldParseExportStatement = function() {
|
|
|
2315
2308
|
|
|
2316
2309
|
// Parses a comma-separated list of module exports.
|
|
2317
2310
|
|
|
2318
|
-
pp$8.parseExportSpecifier = function(exports
|
|
2311
|
+
pp$8.parseExportSpecifier = function(exports) {
|
|
2319
2312
|
var node = this.startNode();
|
|
2320
2313
|
node.local = this.parseModuleExportName();
|
|
2321
2314
|
|
|
2322
2315
|
node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
|
|
2323
2316
|
this.checkExport(
|
|
2324
|
-
exports
|
|
2317
|
+
exports,
|
|
2325
2318
|
node.exported,
|
|
2326
2319
|
node.exported.start
|
|
2327
2320
|
);
|
|
@@ -2329,7 +2322,7 @@ pp$8.parseExportSpecifier = function(exports$1) {
|
|
|
2329
2322
|
return this.finishNode(node, "ExportSpecifier")
|
|
2330
2323
|
};
|
|
2331
2324
|
|
|
2332
|
-
pp$8.parseExportSpecifiers = function(exports
|
|
2325
|
+
pp$8.parseExportSpecifiers = function(exports) {
|
|
2333
2326
|
var nodes = [], first = true;
|
|
2334
2327
|
// export { x, y as z } [from '...']
|
|
2335
2328
|
this.expect(types$1.braceL);
|
|
@@ -2339,7 +2332,7 @@ pp$8.parseExportSpecifiers = function(exports$1) {
|
|
|
2339
2332
|
if (this.afterTrailingComma(types$1.braceR)) { break }
|
|
2340
2333
|
} else { first = false; }
|
|
2341
2334
|
|
|
2342
|
-
nodes.push(this.parseExportSpecifier(exports
|
|
2335
|
+
nodes.push(this.parseExportSpecifier(exports));
|
|
2343
2336
|
}
|
|
2344
2337
|
return nodes
|
|
2345
2338
|
};
|
|
@@ -8983,7 +8976,11 @@ function _extractExtraNames(extraNamesStr) {
|
|
|
8983
8976
|
angleDepth++;
|
|
8984
8977
|
continue;
|
|
8985
8978
|
}
|
|
8986
|
-
if (inTypeAnnotation && char === "
|
|
8979
|
+
if (!inTypeAnnotation && char === "<" && depth === 0 && i > 0 && _isIdentifierBeforeAngleBracket(extraNamesStr, i)) {
|
|
8980
|
+
angleDepth++;
|
|
8981
|
+
continue;
|
|
8982
|
+
}
|
|
8983
|
+
if (char === ">" && angleDepth > 0 && extraNamesStr[i - 1] !== "=") {
|
|
8987
8984
|
angleDepth--;
|
|
8988
8985
|
continue;
|
|
8989
8986
|
}
|
|
@@ -9148,6 +9145,14 @@ function _getLocations(code, label) {
|
|
|
9148
9145
|
}
|
|
9149
9146
|
return locations;
|
|
9150
9147
|
}
|
|
9148
|
+
function _isIdentifierBeforeAngleBracket(str, i) {
|
|
9149
|
+
let j = i - 1;
|
|
9150
|
+
while (j >= 0 && /[A-Za-z0-9_$]/.test(str[j])) {
|
|
9151
|
+
j--;
|
|
9152
|
+
}
|
|
9153
|
+
const wordStart = j + 1;
|
|
9154
|
+
return wordStart < i && /[A-Za-z_$]/.test(str[wordStart]);
|
|
9155
|
+
}
|
|
9151
9156
|
|
|
9152
9157
|
function defineUnimportPreset(preset) {
|
|
9153
9158
|
return preset;
|
|
@@ -10283,7 +10288,6 @@ function setupGeneralRPC({
|
|
|
10283
10288
|
nuxt,
|
|
10284
10289
|
options,
|
|
10285
10290
|
refresh,
|
|
10286
|
-
ensureDevAuthToken,
|
|
10287
10291
|
openInEditorHooks
|
|
10288
10292
|
}) {
|
|
10289
10293
|
const components = [];
|
|
@@ -10467,8 +10471,7 @@ function setupGeneralRPC({
|
|
|
10467
10471
|
return false;
|
|
10468
10472
|
}
|
|
10469
10473
|
},
|
|
10470
|
-
async enablePages(
|
|
10471
|
-
await ensureDevAuthToken(token);
|
|
10474
|
+
async enablePages() {
|
|
10472
10475
|
const baseDir = nuxt.options.future.compatibilityVersion === 4 ? nuxt.options.dir.app : nuxt.options.srcDir;
|
|
10473
10476
|
const pathApp = join(baseDir, "app.vue");
|
|
10474
10477
|
const pathPageIndex = join(baseDir, "pages/index.vue");
|
|
@@ -10497,8 +10500,7 @@ const route = useRoute()
|
|
|
10497
10500
|
}
|
|
10498
10501
|
logger.success("Routing creation completed");
|
|
10499
10502
|
},
|
|
10500
|
-
async restartNuxt(
|
|
10501
|
-
await ensureDevAuthToken(token);
|
|
10503
|
+
async restartNuxt(hard = true) {
|
|
10502
10504
|
logger.info("Restarting Nuxt...");
|
|
10503
10505
|
return nuxt.callHook("restart", { hard });
|
|
10504
10506
|
},
|
|
@@ -11077,7 +11079,7 @@ async function magicastGuard(fn, message = "") {
|
|
|
11077
11079
|
return generated;
|
|
11078
11080
|
}
|
|
11079
11081
|
|
|
11080
|
-
function setupNpmRPC({ nuxt
|
|
11082
|
+
function setupNpmRPC({ nuxt }) {
|
|
11081
11083
|
let detectPromise;
|
|
11082
11084
|
const updatesPromise = /* @__PURE__ */ new Map();
|
|
11083
11085
|
function getPackageManager() {
|
|
@@ -11135,12 +11137,10 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
11135
11137
|
return updatesPromise.get(name);
|
|
11136
11138
|
},
|
|
11137
11139
|
getNpmCommand,
|
|
11138
|
-
async runNpmCommand(
|
|
11139
|
-
await ensureDevAuthToken(token);
|
|
11140
|
+
async runNpmCommand(...args) {
|
|
11140
11141
|
return runNpmCommand(...args);
|
|
11141
11142
|
},
|
|
11142
|
-
async installNuxtModule(
|
|
11143
|
-
await ensureDevAuthToken(token);
|
|
11143
|
+
async installNuxtModule(name, dry = true) {
|
|
11144
11144
|
const commands = await getNpmCommand("install", name, { dev: true });
|
|
11145
11145
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
11146
11146
|
let source = latestGenerated;
|
|
@@ -11183,8 +11183,7 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
11183
11183
|
processId
|
|
11184
11184
|
};
|
|
11185
11185
|
},
|
|
11186
|
-
async uninstallNuxtModule(
|
|
11187
|
-
await ensureDevAuthToken(token);
|
|
11186
|
+
async uninstallNuxtModule(name, dry = true) {
|
|
11188
11187
|
const commands = await getNpmCommand("uninstall", name);
|
|
11189
11188
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
11190
11189
|
const source = await fs.readFile(filepath, "utf-8");
|
|
@@ -11231,8 +11230,7 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
11231
11230
|
}
|
|
11232
11231
|
|
|
11233
11232
|
function setupServerDataRPC({
|
|
11234
|
-
nuxt
|
|
11235
|
-
ensureDevAuthToken
|
|
11233
|
+
nuxt
|
|
11236
11234
|
}) {
|
|
11237
11235
|
let nitro;
|
|
11238
11236
|
let viteServer;
|
|
@@ -11283,8 +11281,7 @@ function setupServerDataRPC({
|
|
|
11283
11281
|
getServerConfig() {
|
|
11284
11282
|
return nuxt.options;
|
|
11285
11283
|
},
|
|
11286
|
-
async getServerData(
|
|
11287
|
-
await ensureDevAuthToken(token);
|
|
11284
|
+
async getServerData() {
|
|
11288
11285
|
return {
|
|
11289
11286
|
nuxt: nuxt.options,
|
|
11290
11287
|
nitro: nitro?.options,
|
|
@@ -11426,8 +11423,7 @@ function shouldIgnoreStorageKey(key) {
|
|
|
11426
11423
|
}
|
|
11427
11424
|
function setupStorageRPC({
|
|
11428
11425
|
nuxt,
|
|
11429
|
-
rpc
|
|
11430
|
-
ensureDevAuthToken
|
|
11426
|
+
rpc
|
|
11431
11427
|
}) {
|
|
11432
11428
|
const storageMounts = {};
|
|
11433
11429
|
let storage;
|
|
@@ -11474,20 +11470,17 @@ function setupStorageRPC({
|
|
|
11474
11470
|
return [];
|
|
11475
11471
|
}
|
|
11476
11472
|
},
|
|
11477
|
-
async getStorageItem(
|
|
11478
|
-
await ensureDevAuthToken(token);
|
|
11473
|
+
async getStorageItem(key) {
|
|
11479
11474
|
if (!storage)
|
|
11480
11475
|
return null;
|
|
11481
11476
|
return await storage.getItem(key);
|
|
11482
11477
|
},
|
|
11483
|
-
async setStorageItem(
|
|
11484
|
-
await ensureDevAuthToken(token);
|
|
11478
|
+
async setStorageItem(key, value) {
|
|
11485
11479
|
if (!storage)
|
|
11486
11480
|
return;
|
|
11487
11481
|
return await storage.setItem(key, value);
|
|
11488
11482
|
},
|
|
11489
|
-
async removeStorageItem(
|
|
11490
|
-
await ensureDevAuthToken(token);
|
|
11483
|
+
async removeStorageItem(key) {
|
|
11491
11484
|
if (!storage)
|
|
11492
11485
|
return;
|
|
11493
11486
|
return await storage.removeItem(key);
|
|
@@ -11543,7 +11536,7 @@ function telemetryEvent(payload, immediate = false) {
|
|
|
11543
11536
|
throttledSend();
|
|
11544
11537
|
}
|
|
11545
11538
|
|
|
11546
|
-
function setupTerminalRPC({ nuxt, rpc, refresh
|
|
11539
|
+
function setupTerminalRPC({ nuxt, rpc, refresh }) {
|
|
11547
11540
|
const terminals = /* @__PURE__ */ new Map();
|
|
11548
11541
|
nuxt.hook("devtools:terminal:register", (terminal) => {
|
|
11549
11542
|
terminals.set(terminal.id, terminal);
|
|
@@ -11593,12 +11586,10 @@ function setupTerminalRPC({ nuxt, rpc, refresh, ensureDevAuthToken }) {
|
|
|
11593
11586
|
getTerminals() {
|
|
11594
11587
|
return Array.from(terminals.values(), (i) => serializeTerminal(i));
|
|
11595
11588
|
},
|
|
11596
|
-
async getTerminalDetail(
|
|
11597
|
-
await ensureDevAuthToken(token);
|
|
11589
|
+
async getTerminalDetail(id) {
|
|
11598
11590
|
return serializeTerminal(terminals.get(id), true);
|
|
11599
11591
|
},
|
|
11600
|
-
async runTerminalAction(
|
|
11601
|
-
await ensureDevAuthToken(token);
|
|
11592
|
+
async runTerminalAction(id, action) {
|
|
11602
11593
|
const terminal = terminals.get(id);
|
|
11603
11594
|
if (!terminal)
|
|
11604
11595
|
return false;
|
|
@@ -11653,14 +11644,14 @@ function setupTimelineRPC({ nuxt }) {
|
|
|
11653
11644
|
function setupRPC(nuxt, options) {
|
|
11654
11645
|
const serverFunctions = {};
|
|
11655
11646
|
const extendedRpcMap = /* @__PURE__ */ new Map();
|
|
11656
|
-
let
|
|
11647
|
+
let devtoolsKitCtx;
|
|
11657
11648
|
const pendingBroadcasts = [];
|
|
11658
11649
|
function broadcast(method, ...args) {
|
|
11659
|
-
if (!
|
|
11650
|
+
if (!devtoolsKitCtx) {
|
|
11660
11651
|
pendingBroadcasts.push({ method, args });
|
|
11661
11652
|
return;
|
|
11662
11653
|
}
|
|
11663
|
-
|
|
11654
|
+
devtoolsKitCtx.rpc.broadcast({
|
|
11664
11655
|
method,
|
|
11665
11656
|
args,
|
|
11666
11657
|
event: true
|
|
@@ -11681,11 +11672,11 @@ function setupRPC(nuxt, options) {
|
|
|
11681
11672
|
const functionsProxy = new Proxy(serverFunctions, {
|
|
11682
11673
|
set(target, prop, value) {
|
|
11683
11674
|
target[prop] = value;
|
|
11684
|
-
if (
|
|
11685
|
-
if (
|
|
11686
|
-
|
|
11675
|
+
if (devtoolsKitCtx && typeof prop === "string") {
|
|
11676
|
+
if (devtoolsKitCtx.rpc.has(prop)) {
|
|
11677
|
+
devtoolsKitCtx.rpc.update({ name: prop, handler: value });
|
|
11687
11678
|
} else {
|
|
11688
|
-
|
|
11679
|
+
devtoolsKitCtx.rpc.register({ name: prop, handler: value });
|
|
11689
11680
|
}
|
|
11690
11681
|
}
|
|
11691
11682
|
return true;
|
|
@@ -11700,10 +11691,10 @@ function setupRPC(nuxt, options) {
|
|
|
11700
11691
|
}
|
|
11701
11692
|
function extendServerRpc(namespace, functions) {
|
|
11702
11693
|
extendedRpcMap.set(namespace, functions);
|
|
11703
|
-
if (
|
|
11694
|
+
if (devtoolsKitCtx) {
|
|
11704
11695
|
for (const [fnName, handler] of Object.entries(functions)) {
|
|
11705
11696
|
if (typeof handler === "function") {
|
|
11706
|
-
|
|
11697
|
+
devtoolsKitCtx.rpc.register({ name: `${namespace}:${fnName}`, handler });
|
|
11707
11698
|
}
|
|
11708
11699
|
}
|
|
11709
11700
|
}
|
|
@@ -11718,13 +11709,12 @@ function setupRPC(nuxt, options) {
|
|
|
11718
11709
|
nuxt,
|
|
11719
11710
|
options,
|
|
11720
11711
|
rpc,
|
|
11712
|
+
get devtoolsKit() {
|
|
11713
|
+
return devtoolsKitCtx;
|
|
11714
|
+
},
|
|
11721
11715
|
refresh,
|
|
11722
11716
|
extendServerRpc,
|
|
11723
|
-
openInEditorHooks: []
|
|
11724
|
-
/** @deprecated Auth is now handled by Vite DevTools */
|
|
11725
|
-
async ensureDevAuthToken(_token) {
|
|
11726
|
-
logger.warn("[nuxt-devtools] `ensureDevAuthToken` is deprecated. Auth is now handled by Vite DevTools.");
|
|
11727
|
-
}
|
|
11717
|
+
openInEditorHooks: []
|
|
11728
11718
|
};
|
|
11729
11719
|
nuxt.devtools = ctx;
|
|
11730
11720
|
Object.assign(serverFunctions, {
|
|
@@ -11742,8 +11732,11 @@ function setupRPC(nuxt, options) {
|
|
|
11742
11732
|
...setupTelemetryRPC(ctx),
|
|
11743
11733
|
...setupServerDataRPC(ctx)
|
|
11744
11734
|
});
|
|
11745
|
-
function
|
|
11746
|
-
|
|
11735
|
+
function connectDevToolsKit(ctx2) {
|
|
11736
|
+
if (devtoolsKitCtx)
|
|
11737
|
+
return;
|
|
11738
|
+
devtoolsKitCtx = ctx2;
|
|
11739
|
+
const host = ctx2.rpc;
|
|
11747
11740
|
for (const { method, args } of pendingBroadcasts) {
|
|
11748
11741
|
broadcast(method, ...args);
|
|
11749
11742
|
}
|
|
@@ -11782,7 +11775,7 @@ function setupRPC(nuxt, options) {
|
|
|
11782
11775
|
}
|
|
11783
11776
|
}
|
|
11784
11777
|
return {
|
|
11785
|
-
|
|
11778
|
+
connectDevToolsKit,
|
|
11786
11779
|
...ctx
|
|
11787
11780
|
};
|
|
11788
11781
|
}
|
|
@@ -11818,9 +11811,21 @@ async function enableModule(options, nuxt) {
|
|
|
11818
11811
|
src: join(runtimeDir, "plugins/devtools.server"),
|
|
11819
11812
|
mode: "server"
|
|
11820
11813
|
});
|
|
11814
|
+
if (nuxt.options.dev) {
|
|
11815
|
+
nuxt.options.vite.optimizeDeps ||= {};
|
|
11816
|
+
nuxt.options.vite.optimizeDeps.include ||= [];
|
|
11817
|
+
nuxt.options.vite.optimizeDeps.include.push(
|
|
11818
|
+
"nuxt > @nuxt/devtools > @vue/devtools-kit",
|
|
11819
|
+
"nuxt > @nuxt/devtools > @vue/devtools-core",
|
|
11820
|
+
"nuxt > @nuxt/devtools > @vitejs/devtools/client/inject",
|
|
11821
|
+
"nuxt > @nuxt/devtools > @vitejs/devtools-kit/client",
|
|
11822
|
+
"nuxt > @nuxt/devtools > error-stack-parser-es",
|
|
11823
|
+
"nuxt > @nuxt/devtools > vite-plugin-vue-tracer/client/overlay"
|
|
11824
|
+
);
|
|
11825
|
+
}
|
|
11821
11826
|
const DevTools = await import('@vitejs/devtools').then((r) => r.DevTools());
|
|
11822
11827
|
addVitePlugin(DevTools);
|
|
11823
|
-
let
|
|
11828
|
+
let connectDevToolsKit;
|
|
11824
11829
|
addVitePlugin(defineViteDevToolsPlugin({
|
|
11825
11830
|
name: "nuxt:devtools",
|
|
11826
11831
|
devtools: {
|
|
@@ -11832,10 +11837,10 @@ async function enableModule(options, nuxt) {
|
|
|
11832
11837
|
title: "Nuxt DevTools",
|
|
11833
11838
|
url: "/__nuxt_devtools__/client/"
|
|
11834
11839
|
});
|
|
11835
|
-
|
|
11840
|
+
connectDevToolsKit?.(ctx2);
|
|
11836
11841
|
}
|
|
11837
11842
|
}
|
|
11838
|
-
}));
|
|
11843
|
+
}), { server: false });
|
|
11839
11844
|
addPlugin({
|
|
11840
11845
|
src: join(runtimeDir, "plugins/vite-devtools.client"),
|
|
11841
11846
|
mode: "client"
|
|
@@ -11875,10 +11880,10 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
|
11875
11880
|
config.plugins.unshift(join(runtimeDir, "nitro/inline"));
|
|
11876
11881
|
});
|
|
11877
11882
|
const {
|
|
11878
|
-
|
|
11883
|
+
connectDevToolsKit: _connectDevToolsKit,
|
|
11879
11884
|
...ctx
|
|
11880
11885
|
} = setupRPC(nuxt, options);
|
|
11881
|
-
|
|
11886
|
+
connectDevToolsKit = _connectDevToolsKit;
|
|
11882
11887
|
const clientDirExists = existsSync(clientDir);
|
|
11883
11888
|
extendViteConfig((config) => {
|
|
11884
11889
|
config.server ||= {};
|
|
@@ -1,32 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { addVitePlugin } from '@nuxt/kit';
|
|
1
|
+
import { addVitePlugin, logger } from '@nuxt/kit';
|
|
3
2
|
|
|
4
|
-
const DOUBLE_SLASH_RE = /\/\//g;
|
|
5
3
|
const VERSION_QUERY_RE = /\?v=\w+$/;
|
|
6
4
|
const VUE_EXT_RE = /\.vue($|\?v=)/;
|
|
7
5
|
async function createVitePluginInspect(options) {
|
|
8
6
|
return await import('vite-plugin-inspect').then((r) => r.default(options));
|
|
9
7
|
}
|
|
10
|
-
async function setup({
|
|
8
|
+
async function setup({ rpc, devtoolsKit }) {
|
|
11
9
|
const plugin = await createVitePluginInspect();
|
|
12
10
|
addVitePlugin(plugin);
|
|
13
|
-
let api;
|
|
14
|
-
nuxt.hook("vite:serverCreated", () => {
|
|
15
|
-
api = plugin.api;
|
|
16
|
-
});
|
|
17
|
-
addCustomTab(() => ({
|
|
18
|
-
name: "builtin-vite-inspect",
|
|
19
|
-
title: "Inspect",
|
|
20
|
-
icon: "carbon-ibm-watson-discovery",
|
|
21
|
-
category: "advanced",
|
|
22
|
-
view: {
|
|
23
|
-
type: "iframe",
|
|
24
|
-
src: `${nuxt.options.app.baseURL}${nuxt.options.app.buildAssetsDir}/__inspect/`.replace(DOUBLE_SLASH_RE, "/")
|
|
25
|
-
}
|
|
26
|
-
}), nuxt);
|
|
27
11
|
async function getComponentsRelationships() {
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
if (!devtoolsKit?.rpc.has("vite-plugin-inspect:get-metadata")) {
|
|
13
|
+
logger.warn("[nuxt-devtools] vite-plugin-inspect RPC functions not registered, component relationships unavailable");
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
const meta = await devtoolsKit.rpc.invokeLocal("vite-plugin-inspect:get-metadata");
|
|
17
|
+
const modules = (meta && meta.instances[0] ? await devtoolsKit.rpc.invokeLocal("vite-plugin-inspect:get-modules-list", {
|
|
30
18
|
vite: meta.instances[0].vite,
|
|
31
19
|
env: meta.instances[0].environments[0]
|
|
32
20
|
}) : null) || [];
|
package/dist/client/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/h0fobd1u.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-m21ytcnz.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-flyrgbwp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/h0fobd1u.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-d9irwgla.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-imbltlrc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-mkw4apmc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-hgmynvjd.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-c7z35hpo.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-b5u27bv4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-kphganvs.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-cnnrtyb0.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rpc-ewzip6fb.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-mfjt4fak.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-nsuzcp77.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-ho965h55.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/h0fobd1u.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"386e78c8-3698-49a8-a7c5-53c44542b939",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1780039912828,false]</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/h0fobd1u.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-m21ytcnz.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-flyrgbwp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/h0fobd1u.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-d9irwgla.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-imbltlrc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-mkw4apmc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-hgmynvjd.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-c7z35hpo.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-b5u27bv4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-kphganvs.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-cnnrtyb0.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rpc-ewzip6fb.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-mfjt4fak.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-nsuzcp77.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-ho965h55.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/h0fobd1u.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"386e78c8-3698-49a8-a7c5-53c44542b939",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1780039912831,false]</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as e,U as t,_ as n}from"./vendor/json-editor-vue-mkw4apmc.js";import"./composables-ioamscf4.js";var r={"h-screen":``,"w-screen":``,"bg-black":``},i=e({__name:`__blank`,setup(e){return(e,i)=>(t(),n(`div`,r))}});export{i as default};
|