@nuxt/devtools 0.8.5 → 1.0.0-beta.1
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 +1 -5
- package/dist/chunks/module-main.mjs +189 -69
- package/dist/chunks/vscode.mjs +13 -11
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/_nuxt/{CodeDiff.vue.0e58df1f.js → CodeDiff.vue.09a831fc.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.e263b9a9.js → ComposableItem.vue.770ce9d1.js} +1 -1
- package/dist/client/_nuxt/DataSchemaButton.vue.65a9244c.js +1 -0
- package/dist/client/_nuxt/{DataSchemaDrawer.6de1f238.js → DataSchemaDrawer.939e0d36.js} +2 -2
- package/dist/client/_nuxt/{DurationDisplay.vue.8da73fd3.js → DurationDisplay.vue.3abddd08.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.7bd675c6.js → FilepathItem.vue.66158bcd.js} +1 -1
- package/dist/client/_nuxt/HelpFab.vue.074157ff.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.20d8d836.js +1 -0
- package/dist/client/_nuxt/NBadge.532c6829.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.83a6e70e.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.84865d5b.js → NCodeBlock.vue.d4a74ca4.js} +1 -1
- package/dist/client/_nuxt/NDrawer.vue.f03c3dec.js +1 -0
- package/dist/client/_nuxt/{NDropdown.vue.d756d40c.js → NDropdown.vue.885f70c3.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.b6d28480.js → NIconTitle.vue.5caf9fc5.js} +1 -1
- package/dist/client/_nuxt/NLink.vue.c05eef3c.js +1 -0
- package/dist/client/_nuxt/{NMarkdown.vue.d2063d22.js → NMarkdown.vue.52b3ce56.js} +1 -1
- package/dist/client/_nuxt/NNavbar.vue.0f176f87.js +1 -0
- package/dist/client/_nuxt/{NSectionBlock.42a3cefc.js → NSectionBlock.43816001.js} +1 -1
- package/dist/client/_nuxt/NSelect.vue.dcac9c73.js +1 -0
- package/dist/client/_nuxt/{NSelectTabs.vue.4a83d611.js → NSelectTabs.vue.411a7347.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.21018268.js → NSwitch.vue.aacb5de3.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.d193bf96.js → NTip.vue.7a94f00d.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.e862f0c1.js +1 -0
- package/dist/client/_nuxt/analyze-build.2cdd206f.js +1 -0
- package/dist/client/_nuxt/assets.41fcf77e.js +16 -0
- package/dist/client/_nuxt/{client.d926285a.js → client.ab169146.js} +1 -1
- package/dist/client/_nuxt/components.81bb7f4d.js +98 -0
- package/dist/client/_nuxt/custom-_name_.3060f125.js +1 -0
- package/dist/client/_nuxt/{default.c4c43b40.js → default.de670135.js} +1 -1
- package/dist/client/_nuxt/entry.9effa704.js +27 -0
- package/dist/client/_nuxt/entry.ebd8706b.css +1 -0
- package/dist/client/_nuxt/{error-404.087131b3.js → error-404.b43ed6fa.js} +1 -1
- package/dist/client/_nuxt/{error-500.d1c41037.js → error-500.9a32d319.js} +1 -1
- package/dist/client/_nuxt/{full.478da439.js → full.44b6f3d9.js} +1 -1
- package/dist/client/_nuxt/hooks.85310903.js +1 -0
- package/dist/client/_nuxt/imports.3e92b5b9.js +1 -0
- package/dist/client/_nuxt/index.370f8c55.js +17 -0
- package/dist/client/_nuxt/index.780a9ee0.js +1 -0
- package/dist/client/_nuxt/json-editor-vue.724e0801.js +129 -0
- package/dist/client/_nuxt/{middleware.87876377.js → middleware.44a34c7b.js} +1 -1
- package/dist/client/_nuxt/modules.24081f84.js +2 -0
- package/dist/client/_nuxt/{none.cfaeed76.js → none.06949a5f.js} +1 -1
- package/dist/client/_nuxt/open-graph.6cf823d3.js +3 -0
- package/dist/client/_nuxt/overview.86a88207.js +1 -0
- package/dist/client/_nuxt/pages.23eb0566.js +1 -0
- package/dist/client/_nuxt/payload.1baa204b.js +1 -0
- package/dist/client/_nuxt/plugins.f261769b.js +1 -0
- package/dist/client/_nuxt/runtime-configs.a5615107.js +1 -0
- package/dist/client/_nuxt/server-routes.2022f4ba.js +9 -0
- package/dist/client/_nuxt/settings.ab7b45b3.js +1 -0
- package/dist/client/_nuxt/{state-components.c2201640.js → state-components.1d5849c5.js} +1 -1
- package/dist/client/_nuxt/state-modules.78318316.js +1 -0
- package/dist/client/_nuxt/storage-options.8ca9ecbc.js +1 -0
- package/dist/client/_nuxt/storage.cb6d643c.js +1 -0
- package/dist/client/_nuxt/{terminals.a1c82952.js → terminals.06dde221.js} +3 -3
- package/dist/client/_nuxt/timeline.5add59be.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.dedd4a37.js → unocss-runtime.1dfe0ac4.js} +2 -2
- package/dist/client/_nuxt/virtual-files.804fdba7.js +1 -0
- package/dist/client/index.html +17 -17
- package/dist/client/modules/analyze-build/index.html +17 -17
- package/dist/client/modules/assets/index.html +17 -17
- package/dist/client/modules/components/index.html +17 -17
- package/dist/client/modules/hooks/index.html +17 -17
- package/dist/client/modules/imports/index.html +17 -17
- package/dist/client/modules/middleware/index.html +17 -17
- package/dist/client/modules/modules/index.html +17 -17
- package/dist/client/modules/open-graph/index.html +17 -17
- package/dist/client/modules/overview/index.html +17 -17
- package/dist/client/modules/pages/index.html +17 -17
- package/dist/client/modules/payload/index.html +17 -17
- package/dist/client/modules/plugins/index.html +17 -17
- package/dist/client/modules/runtime-configs/index.html +17 -17
- package/dist/client/modules/server-routes/index.html +17 -17
- package/dist/client/modules/storage/index.html +17 -17
- package/dist/client/modules/terminals/index.html +17 -17
- package/dist/client/modules/timeline/index.html +17 -17
- package/dist/client/modules/virtual-files/index.html +17 -17
- package/dist/client/settings/index.html +17 -17
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/Main.vue +39 -10
- package/dist/runtime/plugins/view/client.mjs +2 -1
- package/dist/runtime/settings.d.ts +4 -0
- package/dist/runtime/settings.mjs +2 -0
- package/dist/shared/devtools.d18bab28.mjs +84 -0
- package/package.json +36 -35
- package/dist/client/_nuxt/Badge.15b76164.js +0 -1
- package/dist/client/_nuxt/DataSchemaButton.vue.41ad6158.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.5bde5a0b.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.f082102a.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.f8df9e2a.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.fcd1d971.js +0 -1
- package/dist/client/_nuxt/NLink.vue.e0a3a39a.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.e3495019.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.bacddf14.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.5fea57d7.js +0 -1
- package/dist/client/_nuxt/analyze-build.7513704d.js +0 -1
- package/dist/client/_nuxt/assets.35017b46.js +0 -16
- package/dist/client/_nuxt/components.fc36eeef.js +0 -98
- package/dist/client/_nuxt/custom-_name_.50e8c68f.js +0 -1
- package/dist/client/_nuxt/entry.38bf3bdf.css +0 -1
- package/dist/client/_nuxt/entry.54b63325.js +0 -27
- package/dist/client/_nuxt/hooks.d9e8fd29.js +0 -1
- package/dist/client/_nuxt/imports.79d88ab3.js +0 -1
- package/dist/client/_nuxt/index.5e3c6999.js +0 -17
- package/dist/client/_nuxt/index.86b1fd88.js +0 -1
- package/dist/client/_nuxt/json-editor-vue.ce96762e.js +0 -129
- package/dist/client/_nuxt/modules.caf682af.js +0 -2
- package/dist/client/_nuxt/open-graph.cd0bdf97.js +0 -3
- package/dist/client/_nuxt/overview.14a73720.js +0 -1
- package/dist/client/_nuxt/pages.746eb038.js +0 -1
- package/dist/client/_nuxt/payload.913d1fd8.js +0 -1
- package/dist/client/_nuxt/plugins.5342d060.js +0 -1
- package/dist/client/_nuxt/runtime-configs.bf4f2459.js +0 -1
- package/dist/client/_nuxt/server-routes.8c094c9d.js +0 -9
- package/dist/client/_nuxt/settings.59f50baa.js +0 -1
- package/dist/client/_nuxt/state-modules.8816f603.js +0 -1
- package/dist/client/_nuxt/storage-options.b1a5fc25.js +0 -1
- package/dist/client/_nuxt/storage.713a7e46.js +0 -1
- package/dist/client/_nuxt/timeline.9cfa88d9.js +0 -29
- package/dist/client/_nuxt/virtual-files.7dc060d0.js +0 -1
- package/dist/shared/devtools.18eefaee.mjs +0 -78
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<a href="https://devtools.nuxt.com"><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
|
<h1>
|
|
4
|
-
Nuxt DevTools
|
|
4
|
+
Nuxt DevTools
|
|
5
5
|
</h1>
|
|
6
6
|
|
|
7
7
|
[![npm version][npm-version-src]][npm-version-href]
|
|
@@ -23,10 +23,6 @@ Unleash Nuxt Developer Experience.
|
|
|
23
23
|
|
|
24
24
|
<br>
|
|
25
25
|
|
|
26
|
-
> **Warning**: Experimental and under heavy development. APIs are subject to change.
|
|
27
|
-
|
|
28
|
-
<br>
|
|
29
|
-
|
|
30
26
|
## Installation
|
|
31
27
|
|
|
32
28
|
> Nuxt DevTools requires **Nuxt v3.1.0 or higher**.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import fs, { existsSync } from 'node:fs';
|
|
2
2
|
import os, { homedir } from 'node:os';
|
|
3
3
|
import { resolve, join as join$1, dirname } from 'pathe';
|
|
4
|
-
import { logger, useNuxt, addPlugin, addVitePlugin } from '@nuxt/kit';
|
|
4
|
+
import { logger, useNuxt, addPlugin, addTemplate, addVitePlugin } from '@nuxt/kit';
|
|
5
5
|
import { searchForWorkspaceRoot } from 'vite';
|
|
6
6
|
import sirv from 'sirv';
|
|
7
7
|
import { colors } from 'consola/utils';
|
|
8
8
|
import { createBirpcGroup } from 'birpc';
|
|
9
9
|
import { stringify, parse } from 'flatted';
|
|
10
|
-
import { R as ROUTE_AUTH, d as defaultTabOptions, W as WS_EVENT_NAME, a as ROUTE_ANALYZE, b as ROUTE_CLIENT, c as ROUTE_AUTH_VERIFY } from '../shared/devtools.
|
|
11
|
-
import { join } from 'node:path';
|
|
10
|
+
import { R as ROUTE_AUTH, d as defaultTabOptions, W as WS_EVENT_NAME, a as ROUTE_ANALYZE, b as ROUTE_CLIENT, c as ROUTE_AUTH_VERIFY } from '../shared/devtools.d18bab28.mjs';
|
|
11
|
+
import { join, dirname as dirname$1 } from 'node:path';
|
|
12
12
|
import fsp from 'node:fs/promises';
|
|
13
13
|
import { randomStr } from '@antfu/utils';
|
|
14
14
|
import { imageMeta } from 'image-meta';
|
|
@@ -24,11 +24,13 @@ import 'pkg-types';
|
|
|
24
24
|
import semver from 'semver';
|
|
25
25
|
import { getPackageInfo } from 'local-pkg';
|
|
26
26
|
import { resolveBuiltinPresets } from 'unimport';
|
|
27
|
+
import destr from 'destr';
|
|
28
|
+
import { snakeCase } from 'scule';
|
|
27
29
|
import Git from 'simple-git';
|
|
28
30
|
import { hash } from 'ohash';
|
|
29
31
|
import { runtimeDir, clientDir, packageDir, isGlobalInstall } from '../dirs.mjs';
|
|
30
32
|
|
|
31
|
-
const version = "0.
|
|
33
|
+
const version = "1.0.0-beta.1";
|
|
32
34
|
|
|
33
35
|
let token;
|
|
34
36
|
async function getDevAuthToken() {
|
|
@@ -121,7 +123,7 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh }) {
|
|
|
121
123
|
refresh("getStaticAssets");
|
|
122
124
|
}, 500);
|
|
123
125
|
nuxt.hook("builder:watch", (event, key) => {
|
|
124
|
-
if (key.startsWith(
|
|
126
|
+
if (key.startsWith(nuxt.options.dir.public) && (event === "add" || event === "unlink"))
|
|
125
127
|
refreshDebounced();
|
|
126
128
|
});
|
|
127
129
|
async function scan() {
|
|
@@ -233,6 +235,8 @@ async function checkForUpdateOf(name, current, nuxt = useNuxt()) {
|
|
|
233
235
|
return;
|
|
234
236
|
current = info.packageJson.version;
|
|
235
237
|
}
|
|
238
|
+
if (!current)
|
|
239
|
+
return;
|
|
236
240
|
const packument = await import('pacote').then((r) => r.default?.packument || r.packument);
|
|
237
241
|
const manifest = await packument(name);
|
|
238
242
|
const latest = manifest["dist-tags"].latest;
|
|
@@ -249,11 +253,22 @@ async function checkForUpdateOf(name, current, nuxt = useNuxt()) {
|
|
|
249
253
|
}
|
|
250
254
|
}
|
|
251
255
|
|
|
256
|
+
async function magicastGuard(fn, message = "") {
|
|
257
|
+
let generated;
|
|
258
|
+
try {
|
|
259
|
+
generated = await fn();
|
|
260
|
+
} catch (e) {
|
|
261
|
+
logger.error(e);
|
|
262
|
+
throw new Error(`Magicast failed to modify Nuxt config automatically. Maybe the config are composed too dynamically that we failed to statically analyze it. ${message}`);
|
|
263
|
+
}
|
|
264
|
+
return generated;
|
|
265
|
+
}
|
|
266
|
+
|
|
252
267
|
function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
253
268
|
let detectPromise;
|
|
254
269
|
const updatesPromise = /* @__PURE__ */ new Map();
|
|
255
270
|
function getPackageManager() {
|
|
256
|
-
detectPromise || (detectPromise = detectPackageManager(nuxt.options.rootDir)
|
|
271
|
+
detectPromise || (detectPromise = detectPackageManager(nuxt.options.rootDir));
|
|
257
272
|
return detectPromise;
|
|
258
273
|
}
|
|
259
274
|
async function getNpmCommand(command, packageName, options = {}) {
|
|
@@ -262,10 +277,26 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
262
277
|
global = packageName === "@nuxt/devtools" && isInstalledGlobally
|
|
263
278
|
} = options;
|
|
264
279
|
const agent = await getPackageManager();
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
280
|
+
const name = agent?.name || "npm";
|
|
281
|
+
if (command === "install" || command === "update") {
|
|
282
|
+
return [
|
|
283
|
+
name,
|
|
284
|
+
name === "npm" ? "install" : "add",
|
|
285
|
+
`${packageName}@latest`,
|
|
286
|
+
dev ? "-D" : "",
|
|
287
|
+
global ? "-g" : "",
|
|
288
|
+
// In yarn berry, `--ignore-scripts` is removed
|
|
289
|
+
name === "yarn" && !agent?.version?.startsWith("1.") ? "" : "--ignore-scripts"
|
|
290
|
+
].filter(Boolean);
|
|
291
|
+
}
|
|
292
|
+
if (command === "uninstall") {
|
|
293
|
+
return [
|
|
294
|
+
name,
|
|
295
|
+
name === "npm" ? "uninstall" : "remove",
|
|
296
|
+
packageName,
|
|
297
|
+
global ? "-g" : ""
|
|
298
|
+
].filter(Boolean);
|
|
299
|
+
}
|
|
269
300
|
}
|
|
270
301
|
async function runNpmCommand(command, packageName, options = {}) {
|
|
271
302
|
const args = await getNpmCommand(command, packageName, options);
|
|
@@ -293,7 +324,6 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
293
324
|
updatesPromise.set(name, checkForUpdateOf(name, void 0, nuxt));
|
|
294
325
|
return updatesPromise.get(name);
|
|
295
326
|
},
|
|
296
|
-
getPackageManager,
|
|
297
327
|
getNpmCommand,
|
|
298
328
|
async runNpmCommand(token, ...args) {
|
|
299
329
|
await ensureDevAuthToken(token);
|
|
@@ -306,9 +336,11 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
306
336
|
let source = latestGenerated;
|
|
307
337
|
if (source == null)
|
|
308
338
|
source = await fsp.readFile(filepath, "utf-8");
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
|
|
339
|
+
const generated = await magicastGuard(async () => {
|
|
340
|
+
const mod = parseModule(source, { sourceFileName: filepath });
|
|
341
|
+
addNuxtModule(mod, name);
|
|
342
|
+
return mod.generate().code;
|
|
343
|
+
});
|
|
312
344
|
const processId = `nuxt:add-module:${name}`;
|
|
313
345
|
if (!dry) {
|
|
314
346
|
latestGenerated = generated;
|
|
@@ -348,16 +380,18 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
348
380
|
const commands = await getNpmCommand("uninstall", name);
|
|
349
381
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
350
382
|
const source = await fsp.readFile(filepath, "utf-8");
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
383
|
+
const generated = await magicastGuard(async () => {
|
|
384
|
+
const mod = parseModule(source, { sourceFileName: filepath });
|
|
385
|
+
const config = getDefaultExportOptions(mod);
|
|
386
|
+
config.modules || (config.modules = []);
|
|
387
|
+
if (config.modules.includes(name)) {
|
|
388
|
+
Object.values(config.modules).forEach((value, index) => {
|
|
389
|
+
if (value === name)
|
|
390
|
+
config.modules.splice(index - 1, 1);
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
return mod.generate().code;
|
|
394
|
+
});
|
|
361
395
|
const processId = `nuxt:remove-module:${name}`;
|
|
362
396
|
if (!dry) {
|
|
363
397
|
const process = startSubprocess({
|
|
@@ -529,6 +563,34 @@ function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
|
|
|
529
563
|
getServerConfig() {
|
|
530
564
|
return nuxt.options;
|
|
531
565
|
},
|
|
566
|
+
getServerRuntimeConfig() {
|
|
567
|
+
const ENV_PREFIX = "NITRO_";
|
|
568
|
+
const ENV_PREFIX_ALT = "NUXT_";
|
|
569
|
+
function _getEnv(key) {
|
|
570
|
+
const envKey = snakeCase(key).toUpperCase();
|
|
571
|
+
return destr(process.env[ENV_PREFIX + envKey] ?? process.env[ENV_PREFIX_ALT + envKey]);
|
|
572
|
+
}
|
|
573
|
+
function _isObject(input) {
|
|
574
|
+
return typeof input === "object" && !Array.isArray(input);
|
|
575
|
+
}
|
|
576
|
+
function _applyEnv(obj, parentKey = "") {
|
|
577
|
+
for (const key in obj) {
|
|
578
|
+
const subKey = parentKey ? `${parentKey}_${key}` : key;
|
|
579
|
+
const envValue = _getEnv(subKey);
|
|
580
|
+
if (_isObject(obj[key])) {
|
|
581
|
+
if (_isObject(envValue))
|
|
582
|
+
obj[key] = { ...obj[key], ...envValue };
|
|
583
|
+
_applyEnv(obj[key], subKey);
|
|
584
|
+
} else {
|
|
585
|
+
obj[key] = envValue ?? obj[key];
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return obj;
|
|
589
|
+
}
|
|
590
|
+
const runtime = { ...nuxt.options.runtimeConfig };
|
|
591
|
+
_applyEnv(runtime);
|
|
592
|
+
return runtime;
|
|
593
|
+
},
|
|
532
594
|
getModuleOptions() {
|
|
533
595
|
return options;
|
|
534
596
|
},
|
|
@@ -596,14 +658,17 @@ function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
|
|
|
596
658
|
logger.info("Restarting Nuxt...");
|
|
597
659
|
return nuxt.callHook("restart", { hard });
|
|
598
660
|
},
|
|
599
|
-
async requestForAuth(info) {
|
|
661
|
+
async requestForAuth(info, origin) {
|
|
662
|
+
if (options.disableAuthorization)
|
|
663
|
+
return;
|
|
600
664
|
const token = await getDevAuthToken();
|
|
665
|
+
origin || (origin = `${nuxt.options.devServer.https ? "https" : "http"}://${nuxt.options.devServer.host === "::" ? "localhost" : nuxt.options.devServer.host || "localhost"}:${nuxt.options.devServer.port}`);
|
|
601
666
|
const message = [
|
|
602
667
|
`A browser is requesting permissions of ${colors.bold(colors.yellow("writing files and running commands"))} from the DevTools UI.`,
|
|
603
668
|
colors.bold(info),
|
|
604
669
|
"",
|
|
605
670
|
"Please open the following URL in the browser:",
|
|
606
|
-
colors.bold(colors.green(`${
|
|
671
|
+
colors.bold(colors.green(`${origin}${ROUTE_AUTH}?token=${token}`)),
|
|
607
672
|
"",
|
|
608
673
|
"Or manually copy and paste the following token:",
|
|
609
674
|
colors.bold(colors.cyan(token))
|
|
@@ -618,6 +683,8 @@ function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
|
|
|
618
683
|
});
|
|
619
684
|
},
|
|
620
685
|
async verifyAuthToken(token) {
|
|
686
|
+
if (options.disableAuthorization)
|
|
687
|
+
return true;
|
|
621
688
|
return token === await getDevAuthToken();
|
|
622
689
|
}
|
|
623
690
|
};
|
|
@@ -668,7 +735,7 @@ function setupWizardRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
668
735
|
};
|
|
669
736
|
}
|
|
670
737
|
|
|
671
|
-
function setupTerminalRPC({ nuxt, rpc, refresh }) {
|
|
738
|
+
function setupTerminalRPC({ nuxt, rpc, refresh, ensureDevAuthToken }) {
|
|
672
739
|
const terminals = /* @__PURE__ */ new Map();
|
|
673
740
|
nuxt.hook("devtools:terminal:register", (terminal) => {
|
|
674
741
|
terminals.set(terminal.id, terminal);
|
|
@@ -718,10 +785,12 @@ function setupTerminalRPC({ nuxt, rpc, refresh }) {
|
|
|
718
785
|
getTerminals() {
|
|
719
786
|
return Array.from(terminals.values()).map((i) => serializeTerminal(i));
|
|
720
787
|
},
|
|
721
|
-
getTerminalDetail(id) {
|
|
788
|
+
async getTerminalDetail(token, id) {
|
|
789
|
+
await ensureDevAuthToken(token);
|
|
722
790
|
return serializeTerminal(terminals.get(id), true);
|
|
723
791
|
},
|
|
724
|
-
async runTerminalAction(id, action) {
|
|
792
|
+
async runTerminalAction(token, id, action) {
|
|
793
|
+
await ensureDevAuthToken(token);
|
|
725
794
|
const terminal = terminals.get(id);
|
|
726
795
|
if (!terminal)
|
|
727
796
|
return false;
|
|
@@ -887,13 +956,8 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
|
|
|
887
956
|
};
|
|
888
957
|
}
|
|
889
958
|
|
|
890
|
-
async function
|
|
891
|
-
|
|
892
|
-
if (options.key)
|
|
893
|
-
hashedKey = hash(`${options.root}:${options.key}`);
|
|
894
|
-
else
|
|
895
|
-
hashedKey = hash(options.root);
|
|
896
|
-
const filePath = join$1(homedir(), ".nuxt/devtools", `${hashedKey}.json`);
|
|
959
|
+
async function readLocalOptions(defaults, options) {
|
|
960
|
+
const { filePath } = getOptionsFilepath(options);
|
|
897
961
|
if (existsSync(filePath)) {
|
|
898
962
|
const options2 = {
|
|
899
963
|
...defaults,
|
|
@@ -904,16 +968,26 @@ async function readOptions(defaults, options) {
|
|
|
904
968
|
return { ...defaults };
|
|
905
969
|
}
|
|
906
970
|
}
|
|
907
|
-
|
|
908
|
-
const dir = join$1(homedir(), ".nuxt/devtools");
|
|
909
|
-
if (!existsSync(dir))
|
|
910
|
-
await fsp.mkdir(dir, { recursive: true });
|
|
971
|
+
function getOptionsFilepath(options) {
|
|
911
972
|
let hashedKey;
|
|
912
973
|
if (options.key)
|
|
913
974
|
hashedKey = hash(`${options.root}:${options.key}`);
|
|
914
975
|
else
|
|
915
976
|
hashedKey = hash(options.root);
|
|
916
|
-
const filePath = join$1(
|
|
977
|
+
const filePath = join$1(homedir(), ".nuxt/devtools", `${hashedKey}.json`);
|
|
978
|
+
return {
|
|
979
|
+
filePath,
|
|
980
|
+
hashedKey
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
async function clearLocalOptions(options) {
|
|
984
|
+
const { filePath } = getOptionsFilepath(options);
|
|
985
|
+
if (existsSync(filePath))
|
|
986
|
+
await fsp.unlink(filePath);
|
|
987
|
+
}
|
|
988
|
+
async function writeLocalOptions(settings, options) {
|
|
989
|
+
const { filePath, hashedKey } = getOptionsFilepath(options);
|
|
990
|
+
await fsp.mkdir(dirname$1(filePath), { recursive: true });
|
|
917
991
|
await fsp.writeFile(
|
|
918
992
|
filePath,
|
|
919
993
|
JSON.stringify(
|
|
@@ -929,9 +1003,12 @@ async function writeOptions(settings, options) {
|
|
|
929
1003
|
);
|
|
930
1004
|
}
|
|
931
1005
|
|
|
1006
|
+
let options;
|
|
1007
|
+
function getOptions() {
|
|
1008
|
+
return options;
|
|
1009
|
+
}
|
|
932
1010
|
function setupOptionsRPC({ nuxt }) {
|
|
933
|
-
|
|
934
|
-
async function getOptions(tab) {
|
|
1011
|
+
async function getOptions2(tab) {
|
|
935
1012
|
if (!options || options[tab]) {
|
|
936
1013
|
options = defaultTabOptions;
|
|
937
1014
|
await read(tab);
|
|
@@ -939,22 +1016,38 @@ function setupOptionsRPC({ nuxt }) {
|
|
|
939
1016
|
return options[tab];
|
|
940
1017
|
}
|
|
941
1018
|
async function read(tab) {
|
|
942
|
-
options[tab] = await
|
|
1019
|
+
options[tab] = await readLocalOptions(defaultTabOptions[tab], {
|
|
943
1020
|
root: nuxt.options.rootDir,
|
|
944
1021
|
key: tab !== "ui" && tab
|
|
945
1022
|
});
|
|
946
1023
|
return options;
|
|
947
1024
|
}
|
|
1025
|
+
getOptions2("ui");
|
|
1026
|
+
async function clearOptions() {
|
|
1027
|
+
options = void 0;
|
|
1028
|
+
await clearLocalOptions({
|
|
1029
|
+
root: nuxt.options.rootDir
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
948
1032
|
return {
|
|
949
1033
|
async updateOptions(tab, _settings) {
|
|
950
|
-
const settings = await
|
|
1034
|
+
const settings = await getOptions2(tab);
|
|
951
1035
|
Object.assign(settings, _settings);
|
|
952
|
-
await
|
|
953
|
-
|
|
954
|
-
|
|
1036
|
+
await writeLocalOptions(
|
|
1037
|
+
{ ...settings },
|
|
1038
|
+
{
|
|
1039
|
+
root: nuxt.options.rootDir,
|
|
1040
|
+
key: tab !== "ui" && tab
|
|
1041
|
+
}
|
|
1042
|
+
);
|
|
1043
|
+
nuxt.callHook("builder:generateApp", {
|
|
1044
|
+
filter(template) {
|
|
1045
|
+
return template.filename.includes("devtools/settings.mjs");
|
|
1046
|
+
}
|
|
955
1047
|
});
|
|
956
1048
|
},
|
|
957
|
-
getOptions
|
|
1049
|
+
getOptions: getOptions2,
|
|
1050
|
+
clearOptions
|
|
958
1051
|
};
|
|
959
1052
|
}
|
|
960
1053
|
|
|
@@ -963,12 +1056,14 @@ function setupTimelineRPC({ nuxt }) {
|
|
|
963
1056
|
async enableTimeline(dry) {
|
|
964
1057
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
965
1058
|
const source = await fsp.readFile(filepath, "utf-8");
|
|
966
|
-
const
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1059
|
+
const generated = await magicastGuard(async () => {
|
|
1060
|
+
const mod = parseModule(source, { sourceFileName: filepath });
|
|
1061
|
+
const options = getDefaultExportOptions(mod);
|
|
1062
|
+
options.devtools = options.devtools || {};
|
|
1063
|
+
options.devtools.timeline = options.devtools.timeline || {};
|
|
1064
|
+
options.devtools.timeline.enabled = true;
|
|
1065
|
+
return mod.generate().code;
|
|
1066
|
+
}, "\nYou can enable timeline manually by adding `devtools: { timeline: { enabled: true } }`");
|
|
972
1067
|
if (!dry) {
|
|
973
1068
|
await fsp.writeFile(filepath, generated, "utf-8");
|
|
974
1069
|
await nuxt.callHook("restart", { hard: true });
|
|
@@ -990,8 +1085,11 @@ function throttle(fn, delay) {
|
|
|
990
1085
|
}
|
|
991
1086
|
};
|
|
992
1087
|
}
|
|
1088
|
+
let telemetry;
|
|
1089
|
+
const throttledSend = throttle(() => {
|
|
1090
|
+
telemetry?.sendEvents();
|
|
1091
|
+
}, SEND_DELAY);
|
|
993
1092
|
function setupTelemetryRPC({ nuxt, options }) {
|
|
994
|
-
let telemetry;
|
|
995
1093
|
if (options.telemetry !== false) {
|
|
996
1094
|
nuxt.hook("telemetry:setup", (t) => {
|
|
997
1095
|
telemetry = t;
|
|
@@ -1005,21 +1103,23 @@ function setupTelemetryRPC({ nuxt, options }) {
|
|
|
1005
1103
|
t.createEvent("devtools", { event: "enabled" });
|
|
1006
1104
|
});
|
|
1007
1105
|
}
|
|
1008
|
-
const throttledSend = throttle(() => {
|
|
1009
|
-
telemetry?.sendEvents();
|
|
1010
|
-
}, SEND_DELAY);
|
|
1011
1106
|
return {
|
|
1012
1107
|
telemetryEvent(payload, immediate = false) {
|
|
1013
|
-
|
|
1014
|
-
return;
|
|
1015
|
-
telemetry.createEvent("devtools", payload);
|
|
1016
|
-
if (immediate)
|
|
1017
|
-
telemetry.sendEvents();
|
|
1018
|
-
else
|
|
1019
|
-
throttledSend();
|
|
1108
|
+
telemetryEvent(payload, immediate);
|
|
1020
1109
|
}
|
|
1021
1110
|
};
|
|
1022
1111
|
}
|
|
1112
|
+
function telemetryEvent(payload, immediate = false) {
|
|
1113
|
+
if (!telemetry)
|
|
1114
|
+
return;
|
|
1115
|
+
if (getOptions()?.behavior.telemetry === false)
|
|
1116
|
+
return;
|
|
1117
|
+
telemetry.createEvent("devtools", payload);
|
|
1118
|
+
if (immediate)
|
|
1119
|
+
telemetry.sendEvents();
|
|
1120
|
+
else
|
|
1121
|
+
throttledSend();
|
|
1122
|
+
}
|
|
1023
1123
|
|
|
1024
1124
|
function setupRPC(nuxt, options) {
|
|
1025
1125
|
const serverFunctions = {};
|
|
@@ -1037,7 +1137,10 @@ function setupRPC(nuxt, options) {
|
|
|
1037
1137
|
return extendedRpcMap.get(namespace)?.[fnName];
|
|
1038
1138
|
},
|
|
1039
1139
|
onError(error, name) {
|
|
1040
|
-
|
|
1140
|
+
logger.error(
|
|
1141
|
+
colors.yellow(`[nuxt-devtools] RPC error on executing "${colors.bold(name)}":
|
|
1142
|
+
`) + colors.red(error?.message || "")
|
|
1143
|
+
);
|
|
1041
1144
|
},
|
|
1042
1145
|
timeout: 12e4
|
|
1043
1146
|
}
|
|
@@ -1144,6 +1247,7 @@ async function enableModule(options, nuxt) {
|
|
|
1144
1247
|
await import('./analyze-build.mjs').then(({ setup }) => setup(nuxt, options));
|
|
1145
1248
|
return;
|
|
1146
1249
|
}
|
|
1250
|
+
const enabledExplicitly = nuxt.options.devtools === true || nuxt.options.devtools && nuxt.options.devtools.enabled || !!nuxt.options.modules.find((m) => m === "@nuxt/devtools" || m === "@nuxt/devtools-edge");
|
|
1147
1251
|
await nuxt.callHook("devtools:before");
|
|
1148
1252
|
nuxt.options.imports.collectMeta = true;
|
|
1149
1253
|
addPlugin({
|
|
@@ -1154,6 +1258,22 @@ async function enableModule(options, nuxt) {
|
|
|
1154
1258
|
src: join$1(runtimeDir, "plugins/devtools.server"),
|
|
1155
1259
|
mode: "server"
|
|
1156
1260
|
});
|
|
1261
|
+
addTemplate({
|
|
1262
|
+
filename: "devtools/settings.mjs",
|
|
1263
|
+
async getContents() {
|
|
1264
|
+
const uiOptions = await readLocalOptions(
|
|
1265
|
+
{
|
|
1266
|
+
...defaultTabOptions.ui,
|
|
1267
|
+
// When not enabled explicitly, we hide the panel by default
|
|
1268
|
+
showPanel: enabledExplicitly ? true : null
|
|
1269
|
+
},
|
|
1270
|
+
{ root: nuxt.options.rootDir }
|
|
1271
|
+
);
|
|
1272
|
+
return `export default ${JSON.stringify({
|
|
1273
|
+
ui: uiOptions
|
|
1274
|
+
})}`;
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1157
1277
|
nuxt.hook("nitro:config", (config) => {
|
|
1158
1278
|
config.externals = config.externals || {};
|
|
1159
1279
|
config.externals.inline = config.externals.inline || [];
|
|
@@ -1170,7 +1290,7 @@ if (!window.__NUXT_DEVTOOLS_TIME_METRIC__) {
|
|
|
1170
1290
|
window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
1171
1291
|
\``;
|
|
1172
1292
|
config.plugins = config.plugins || [];
|
|
1173
|
-
config.plugins.
|
|
1293
|
+
config.plugins.unshift(join$1(runtimeDir, "nitro/inline"));
|
|
1174
1294
|
});
|
|
1175
1295
|
const {
|
|
1176
1296
|
vitePlugin,
|
|
@@ -1239,7 +1359,7 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
|
1239
1359
|
isGlobalInstall: isGlobalInstall()
|
|
1240
1360
|
});
|
|
1241
1361
|
const isMac = os.platform() === "darwin";
|
|
1242
|
-
logger.success(`Nuxt DevTools
|
|
1362
|
+
logger.success(`Nuxt DevTools ${colors.dim(`v${version}`)}${isGlobalInstall() ? colors.dim(" [global]") : ""} enabled, press \`Shift\` + \`${isMac ? "Option" : "Alt"}\` + \`D\` in app to open.`);
|
|
1243
1363
|
}
|
|
1244
1364
|
|
|
1245
1365
|
const moduleMain = {
|
package/dist/chunks/vscode.mjs
CHANGED
|
@@ -6,7 +6,6 @@ import { logger } from '@nuxt/kit';
|
|
|
6
6
|
import { execa } from 'execa';
|
|
7
7
|
import { checkPort, getPort } from 'get-port-please';
|
|
8
8
|
import which from 'which';
|
|
9
|
-
import waitOn from 'wait-on';
|
|
10
9
|
import { startSubprocess } from '@nuxt/devtools-kit';
|
|
11
10
|
import { L as LOG_PREFIX } from './module-main.mjs';
|
|
12
11
|
import 'pathe';
|
|
@@ -15,7 +14,7 @@ import 'sirv';
|
|
|
15
14
|
import 'consola/utils';
|
|
16
15
|
import 'birpc';
|
|
17
16
|
import 'flatted';
|
|
18
|
-
import '../shared/devtools.
|
|
17
|
+
import '../shared/devtools.d18bab28.mjs';
|
|
19
18
|
import '../dirs.mjs';
|
|
20
19
|
import 'node:url';
|
|
21
20
|
import 'is-installed-globally';
|
|
@@ -31,6 +30,8 @@ import 'pkg-types';
|
|
|
31
30
|
import 'semver';
|
|
32
31
|
import 'local-pkg';
|
|
33
32
|
import 'unimport';
|
|
33
|
+
import 'destr';
|
|
34
|
+
import 'scule';
|
|
34
35
|
import 'simple-git';
|
|
35
36
|
import 'ohash';
|
|
36
37
|
|
|
@@ -95,11 +96,11 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
|
|
|
95
96
|
},
|
|
96
97
|
nuxt
|
|
97
98
|
);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
99
|
+
for (let i = 0; i < 100; i++) {
|
|
100
|
+
if (await fetch(url).then((r) => r.ok).catch(() => false))
|
|
101
|
+
break;
|
|
102
|
+
await new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
103
|
+
}
|
|
103
104
|
await new Promise((resolve2) => setTimeout(resolve2, 2e3));
|
|
104
105
|
loaded = true;
|
|
105
106
|
}
|
|
@@ -118,10 +119,11 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
|
|
|
118
119
|
nuxt.hook("close", () => {
|
|
119
120
|
command.kill();
|
|
120
121
|
});
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
for (let i = 0; i < 100; i++) {
|
|
123
|
+
if (await fetch(url).then((r) => r.ok).catch(() => false))
|
|
124
|
+
break;
|
|
125
|
+
await new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
126
|
+
}
|
|
125
127
|
await new Promise((resolve2) => setTimeout(resolve2, 2e3));
|
|
126
128
|
loaded = true;
|
|
127
129
|
}
|
package/dist/client/200.html
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<html >
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.
|
|
7
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.
|
|
5
|
+
<link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.ebd8706b.css">
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.9effa704.js">
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.370f8c55.js">
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/onig.0c57a370.js">
|
|
9
9
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-dark.ab479e3d.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-light.696edcfd.js">
|
|
@@ -18,24 +18,24 @@
|
|
|
18
18
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vue-html.0806679f.js">
|
|
19
19
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/diff.22e0b108.js">
|
|
20
20
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/shellscript.9d056341.js">
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.
|
|
22
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.
|
|
23
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.de670135.js">
|
|
22
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.44b6f3d9.js">
|
|
23
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.06949a5f.js">
|
|
24
24
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-docs.100caa70.js">
|
|
25
25
|
<link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.6994516c.css">
|
|
26
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.
|
|
28
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.
|
|
29
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.
|
|
30
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.
|
|
31
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.
|
|
32
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/
|
|
33
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.
|
|
26
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.939e0d36.js">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.dcac9c73.js">
|
|
28
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.aacb5de3.js">
|
|
29
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.885f70c3.js">
|
|
30
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.d4a74ca4.js">
|
|
31
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.ab169146.js">
|
|
32
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDrawer.vue.f03c3dec.js">
|
|
33
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.1dfe0ac4.js">
|
|
34
34
|
<link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-404.82ac0ec5.css">
|
|
35
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.
|
|
35
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.b43ed6fa.js">
|
|
36
36
|
<link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-500.ff959f66.css">
|
|
37
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.
|
|
38
|
-
<script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.
|
|
37
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.9a32d319.js">
|
|
38
|
+
<script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.9effa704.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
|
|
39
39
|
</script></head>
|
|
40
40
|
<body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
|
|
41
41
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
|