@nuxt/devtools 0.5.5 → 0.6.0
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/module-main.mjs +134 -29
- package/dist/chunks/vscode.mjs +5 -2
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +7 -0
- package/dist/client/_nuxt/{Badge.e58c5f84.js → Badge.bb04dbdf.js} +1 -1
- package/dist/client/_nuxt/CodeSnippets.vue.b3f0f3dc.js +1 -0
- package/dist/client/_nuxt/DrawerRight.vue.48c2c3d6.js +1 -0
- package/dist/client/_nuxt/DurationDisplay.vue.1f2b63ce.js +1 -0
- package/dist/client/_nuxt/FilepathItem.vue.67a3bac2.js +1 -0
- package/dist/client/_nuxt/{HelpFab.vue.044c905c.js → HelpFab.vue.e0c5b3b9.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.a3f71c42.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.56878d59.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.vue.2f00c5a7.js +2 -0
- package/dist/client/_nuxt/NIconButton.vue.afd698ce.js +1 -0
- package/dist/client/_nuxt/NIconTitle.vue.025b1812.js +1 -0
- package/dist/client/_nuxt/NLink.vue.efbf2660.js +1 -0
- package/dist/client/_nuxt/NMarkdown.vue.4a55718e.js +1 -0
- package/dist/client/_nuxt/{NPanelGrids.923427b0.js → NPanelGrids.e209861e.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.012f83f1.css +1 -0
- package/dist/client/_nuxt/NSectionBlock.a9d6a8bd.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.0258c4d8.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.774134ee.js +1 -0
- package/dist/client/_nuxt/NTip.vue.b7996913.js +1 -0
- package/dist/client/_nuxt/{Navbar.vue.1eab843e.js → Navbar.vue.97a344a8.js} +1 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.5857e84f.js +1 -0
- package/dist/client/_nuxt/{PanelLeftRight.vue.5807516f.js → PanelLeftRight.vue.4252eb45.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.a6af1a3f.js +1 -0
- package/dist/client/_nuxt/__blank.f74f0354.js +1 -0
- package/dist/client/_nuxt/analyze-build.d8530c6c.js +1 -0
- package/dist/client/_nuxt/assets.e5e05d1f.js +16 -0
- package/dist/client/_nuxt/{client.4ef5790f.js → client.c658398a.js} +1 -1
- package/dist/client/_nuxt/{components.1cc22fdb.js → components.c29053f6.js} +27 -27
- package/dist/client/_nuxt/custom-_name_.85ea5a6a.js +1 -0
- package/dist/client/_nuxt/{default.2805e636.js → default.a568b6bd.js} +1 -1
- package/dist/client/_nuxt/editor.beb173d9.js +1 -0
- package/dist/client/_nuxt/entry.ea777320.css +1 -0
- package/dist/client/_nuxt/entry.eb90118b.js +19 -0
- package/dist/client/_nuxt/{error-404.61da4836.js → error-404.47f56ae7.js} +1 -1
- package/dist/client/_nuxt/{error-500.68195134.js → error-500.3d8abd19.js} +1 -1
- package/dist/client/_nuxt/{error-component.db5245e7.js → error-component.97bd3af7.js} +2 -2
- package/dist/client/_nuxt/{full.cfa15ba5.js → full.039e8e59.js} +1 -1
- package/dist/client/_nuxt/hooks.4df47b77.js +1 -0
- package/dist/client/_nuxt/imports.dd38df5c.js +1 -0
- package/dist/client/_nuxt/{index.476fd219.js → index.2d500b42.js} +1 -1
- package/dist/client/_nuxt/{index.e17aa9ce.js → index.ee7015bb.js} +1 -1
- package/dist/client/_nuxt/json-editor-vue.6b7715bf.js +137 -0
- package/dist/client/_nuxt/{middleware.10bb56a6.js → middleware.a6f1dc81.js} +1 -1
- package/dist/client/_nuxt/modules.8de52693.js +4 -0
- package/dist/client/_nuxt/{none.a68953c7.js → none.7a55d586.js} +1 -1
- package/dist/client/_nuxt/nuxt-docs.100caa70.js +1 -0
- package/dist/client/_nuxt/open-graph.ba654e1e.js +3 -0
- package/dist/client/_nuxt/overview.4725a261.js +1 -0
- package/dist/client/_nuxt/pages.46157a67.js +1 -0
- package/dist/client/_nuxt/payload.b59c0588.js +1 -0
- package/dist/client/_nuxt/plugins.6a2cae7a.js +1 -0
- package/dist/client/_nuxt/runtime-configs.4a7ef849.js +1 -0
- package/dist/client/_nuxt/server-routes.2d06f2c7.js +9 -0
- package/dist/client/_nuxt/settings.1b865c96.js +1 -0
- package/dist/client/_nuxt/state-components.ed0b4287.js +1 -0
- package/dist/client/_nuxt/storage.b18c38a9.js +1 -0
- package/dist/client/_nuxt/terminals.195d8588.js +9 -0
- package/dist/client/_nuxt/{terminals.d1dcf297.css → terminals.ae8c3544.css} +1 -1
- package/dist/client/_nuxt/{unocss-runtime.7eface6f.js → unocss-runtime.032bcb78.js} +2 -2
- package/dist/client/_nuxt/{virtual-files.3e66a8af.js → virtual-files.5f7c5d81.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/auth/index.html +71 -0
- package/dist/runtime/nitro/inline.d.ts +3 -0
- package/dist/runtime/nitro/inline.mjs +6 -0
- package/dist/runtime/plugins/devtools.client.d.ts +8 -0
- package/dist/runtime/plugins/devtools.client.mjs +73 -8
- package/dist/runtime/plugins/devtools.server.d.ts +2 -0
- package/dist/runtime/plugins/devtools.server.mjs +8 -0
- package/dist/runtime/plugins/view/Frame.vue +31 -228
- package/dist/runtime/plugins/view/FrameBox.vue +167 -0
- package/dist/runtime/plugins/view/Main.vue +360 -0
- package/dist/runtime/plugins/view/client.d.ts +3 -0
- package/dist/runtime/plugins/view/client.mjs +45 -0
- package/dist/runtime/plugins/view/state.d.ts +2 -3
- package/dist/runtime/plugins/view/state.mjs +12 -9
- package/dist/runtime/plugins/view/utils.d.ts +1 -0
- package/dist/runtime/plugins/view/utils.mjs +9 -0
- package/dist/shared/{devtools.345c630c.mjs → devtools.7ab40af4.mjs} +3 -1
- package/dist/types.d.ts +1 -1
- package/package.json +30 -29
- package/dist/client/__inspecting/index.html +0 -7
- package/dist/client/_nuxt/CodeSnippets.vue.22b03a10.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.58044cee.js +0 -1
- package/dist/client/_nuxt/DurationDisplay.vue.0d87f5bf.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.063a2cdd.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.59383ce6.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.f53d5fde.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.e2044e41.js +0 -2
- package/dist/client/_nuxt/NIconButton.vue.6924c323.js +0 -1
- package/dist/client/_nuxt/NIconTitle.vue.19793f87.js +0 -1
- package/dist/client/_nuxt/NLink.vue.dddf8805.js +0 -1
- package/dist/client/_nuxt/NMarkdown.vue.2a7f337d.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.2937e558.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.63c19da9.css +0 -1
- package/dist/client/_nuxt/NSelect.vue.6bc1e782.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.e15ba847.js +0 -1
- package/dist/client/_nuxt/NTip.vue.16191ba5.js +0 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.47b612aa.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.d28666b8.js +0 -1
- package/dist/client/_nuxt/__inspecting.324d8c7c.js +0 -1
- package/dist/client/_nuxt/analyze-build.9257b30a.js +0 -1
- package/dist/client/_nuxt/assets.c3e8e0f3.js +0 -16
- package/dist/client/_nuxt/custom-_name_.e1ada273.js +0 -1
- package/dist/client/_nuxt/editor.721868d4.js +0 -1
- package/dist/client/_nuxt/entry.bf8a0e33.css +0 -1
- package/dist/client/_nuxt/entry.f02d2ccc.js +0 -19
- package/dist/client/_nuxt/hooks.a0b5858b.js +0 -1
- package/dist/client/_nuxt/imports.c13274b4.js +0 -1
- package/dist/client/_nuxt/json-editor-vue.3c153669.js +0 -137
- package/dist/client/_nuxt/modules.41d22931.js +0 -4
- package/dist/client/_nuxt/open-graph.87c9ce95.js +0 -3
- package/dist/client/_nuxt/overview.e078ddfd.js +0 -1
- package/dist/client/_nuxt/pages.2011bfab.js +0 -1
- package/dist/client/_nuxt/payload.aa12c647.js +0 -1
- package/dist/client/_nuxt/plugins.2722f367.js +0 -1
- package/dist/client/_nuxt/runtime-configs.1c597722.js +0 -1
- package/dist/client/_nuxt/server-routes.be515b73.js +0 -9
- package/dist/client/_nuxt/settings.bdc2ea51.js +0 -1
- package/dist/client/_nuxt/state-components.97be2043.js +0 -1
- package/dist/client/_nuxt/storage.b1a77fa3.js +0 -1
- package/dist/client/_nuxt/terminals.ce48c24d.js +0 -9
- package/dist/runtime/plugins/view/Container.vue +0 -97
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import fs, { existsSync } from 'node:fs';
|
|
2
|
-
import { resolve, join, dirname } from 'pathe';
|
|
2
|
+
import { resolve, join as join$1, dirname } from 'pathe';
|
|
3
3
|
import { logger, useNuxt, addPlugin, addVitePlugin } from '@nuxt/kit';
|
|
4
4
|
import { searchForWorkspaceRoot } from 'vite';
|
|
5
5
|
import sirv from 'sirv';
|
|
6
6
|
import c from 'picocolors';
|
|
7
7
|
import { createBirpcGroup } from 'birpc';
|
|
8
|
-
import { W as WS_EVENT_NAME,
|
|
8
|
+
import { R as ROUTE_AUTH, W as WS_EVENT_NAME, a as ROUTE_ANALYZE, b as ROUTE_CLIENT, c as ROUTE_AUTH_VERIFY } from '../shared/devtools.7ab40af4.mjs';
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
import { join } from 'node:path';
|
|
9
11
|
import fsp from 'node:fs/promises';
|
|
10
12
|
import { imageMeta } from 'image-meta';
|
|
11
13
|
import fg from 'fast-glob';
|
|
@@ -19,16 +21,16 @@ import 'pkg-types';
|
|
|
19
21
|
import semver from 'semver';
|
|
20
22
|
import { getPackageInfo } from 'local-pkg';
|
|
21
23
|
import { resolveBuiltinPresets } from 'unimport';
|
|
24
|
+
import boxen from 'boxen';
|
|
22
25
|
import { debounce } from 'perfect-debounce';
|
|
23
26
|
import require$$0$1 from 'fs';
|
|
24
27
|
import require$$1 from 'tty';
|
|
25
28
|
import require$$1$1 from 'util';
|
|
26
29
|
import require$$0 from 'os';
|
|
27
30
|
import { spawn } from 'child_process';
|
|
28
|
-
import { homedir } from 'node:os';
|
|
29
31
|
import { runtimeDir, clientDir, packageDir, isGlobalInstall } from '../dirs.mjs';
|
|
30
32
|
|
|
31
|
-
const version = "0.
|
|
33
|
+
const version = "0.6.0";
|
|
32
34
|
|
|
33
35
|
/*! (c) 2020 Andrea Giammarchi */
|
|
34
36
|
|
|
@@ -122,6 +124,32 @@ const stringify = (value, replacer, space) => {
|
|
|
122
124
|
}
|
|
123
125
|
};
|
|
124
126
|
|
|
127
|
+
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
128
|
+
function randomStr(size = 16, dict = urlAlphabet) {
|
|
129
|
+
let id = "";
|
|
130
|
+
let i = size;
|
|
131
|
+
const len = dict.length;
|
|
132
|
+
while (i--)
|
|
133
|
+
id += dict[Math.random() * len | 0];
|
|
134
|
+
return id;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
let token;
|
|
138
|
+
async function getDevAuthToken() {
|
|
139
|
+
if (token)
|
|
140
|
+
return token;
|
|
141
|
+
const home = homedir();
|
|
142
|
+
const dir = join(home, ".nuxt/devtools");
|
|
143
|
+
const filepath = join(dir, "dev-auth-token.txt");
|
|
144
|
+
if (existsSync(filepath))
|
|
145
|
+
token = (await fsp.readFile(filepath, "utf-8")).trim();
|
|
146
|
+
if (!token)
|
|
147
|
+
token = randomStr(32);
|
|
148
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
149
|
+
await fsp.writeFile(filepath, token, "utf-8");
|
|
150
|
+
return token;
|
|
151
|
+
}
|
|
152
|
+
|
|
125
153
|
const IGNORE_STORAGE_MOUNTS = ["root", "build", "src", "cache"];
|
|
126
154
|
function shouldIgnoreStorageKey(key) {
|
|
127
155
|
return IGNORE_STORAGE_MOUNTS.includes(key.split(":")[0]);
|
|
@@ -184,7 +212,7 @@ function setupStorageRPC({
|
|
|
184
212
|
};
|
|
185
213
|
}
|
|
186
214
|
|
|
187
|
-
function setupAssetsRPC({ nuxt }) {
|
|
215
|
+
function setupAssetsRPC({ nuxt, ensureDevAuthToken }) {
|
|
188
216
|
const _imageMetaCache = /* @__PURE__ */ new Map();
|
|
189
217
|
return {
|
|
190
218
|
async getStaticAssets() {
|
|
@@ -212,7 +240,7 @@ function setupAssetsRPC({ nuxt }) {
|
|
|
212
240
|
const stat = await fsp.lstat(filePath);
|
|
213
241
|
return {
|
|
214
242
|
path,
|
|
215
|
-
publicPath: join(baseURL, path),
|
|
243
|
+
publicPath: join$1(baseURL, path),
|
|
216
244
|
filePath,
|
|
217
245
|
type: guessType(path),
|
|
218
246
|
size: stat.size,
|
|
@@ -242,7 +270,8 @@ function setupAssetsRPC({ nuxt }) {
|
|
|
242
270
|
return void 0;
|
|
243
271
|
}
|
|
244
272
|
},
|
|
245
|
-
async writeStaticAssets(files, path) {
|
|
273
|
+
async writeStaticAssets(token, files, path) {
|
|
274
|
+
await ensureDevAuthToken(token);
|
|
246
275
|
const baseDir = resolve(nuxt.options.srcDir, nuxt.options.dir.public + path);
|
|
247
276
|
return await Promise.all(
|
|
248
277
|
files.map(async ({ name, data }) => {
|
|
@@ -290,7 +319,7 @@ async function checkForUpdateOf(name, current, nuxt = useNuxt()) {
|
|
|
290
319
|
}
|
|
291
320
|
}
|
|
292
321
|
|
|
293
|
-
function setupNpmRPC({ nuxt }) {
|
|
322
|
+
function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
294
323
|
let detectPromise;
|
|
295
324
|
const updatesPromise = /* @__PURE__ */ new Map();
|
|
296
325
|
function getPackageManager() {
|
|
@@ -319,7 +348,7 @@ function setupNpmRPC({ nuxt }) {
|
|
|
319
348
|
}, {
|
|
320
349
|
id: processId,
|
|
321
350
|
name: `${command} ${packageName}`,
|
|
322
|
-
icon: "i-
|
|
351
|
+
icon: "i-logos-npm-icon",
|
|
323
352
|
restartable: false
|
|
324
353
|
});
|
|
325
354
|
return {
|
|
@@ -334,8 +363,12 @@ function setupNpmRPC({ nuxt }) {
|
|
|
334
363
|
},
|
|
335
364
|
getPackageManager,
|
|
336
365
|
getNpmCommand,
|
|
337
|
-
runNpmCommand,
|
|
338
|
-
|
|
366
|
+
async runNpmCommand(token, ...args) {
|
|
367
|
+
await ensureDevAuthToken(token);
|
|
368
|
+
return runNpmCommand(...args);
|
|
369
|
+
},
|
|
370
|
+
async installNuxtModule(token, name, dry = true) {
|
|
371
|
+
await ensureDevAuthToken(token);
|
|
339
372
|
const commands = await getNpmCommand("install", name, { dev: true });
|
|
340
373
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
341
374
|
const source = await fsp.readFile(filepath, "utf-8");
|
|
@@ -370,7 +403,8 @@ function setupNpmRPC({ nuxt }) {
|
|
|
370
403
|
processId
|
|
371
404
|
};
|
|
372
405
|
},
|
|
373
|
-
async uninstallNuxtModule(name, dry = true) {
|
|
406
|
+
async uninstallNuxtModule(token, name, dry = true) {
|
|
407
|
+
await ensureDevAuthToken(token);
|
|
374
408
|
const commands = await getNpmCommand("uninstall", name);
|
|
375
409
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
376
410
|
const source = await fsp.readFile(filepath, "utf-8");
|
|
@@ -499,7 +533,7 @@ function setupHooksDebug(hooks) {
|
|
|
499
533
|
return serverHooks;
|
|
500
534
|
}
|
|
501
535
|
|
|
502
|
-
function setupGeneralRPC({ nuxt, refresh, openInEditorHooks }) {
|
|
536
|
+
function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
|
|
503
537
|
const components = [];
|
|
504
538
|
const imports = [];
|
|
505
539
|
const importPresets = [];
|
|
@@ -555,6 +589,9 @@ function setupGeneralRPC({ nuxt, refresh, openInEditorHooks }) {
|
|
|
555
589
|
getServerConfig() {
|
|
556
590
|
return nuxt.options;
|
|
557
591
|
},
|
|
592
|
+
getModuleOptions() {
|
|
593
|
+
return options;
|
|
594
|
+
},
|
|
558
595
|
getServerApp() {
|
|
559
596
|
return serverApp;
|
|
560
597
|
},
|
|
@@ -618,6 +655,27 @@ function setupGeneralRPC({ nuxt, refresh, openInEditorHooks }) {
|
|
|
618
655
|
restartNuxt(hard = true) {
|
|
619
656
|
logger.info("Restarting Nuxt...");
|
|
620
657
|
return nuxt.callHook("restart", { hard });
|
|
658
|
+
},
|
|
659
|
+
async requestForAuth(info) {
|
|
660
|
+
const token = await getDevAuthToken();
|
|
661
|
+
const message = [
|
|
662
|
+
`A browser is requesting permissions of ${c.bold(c.yellow("writing files and running commands"))} from the DevTools UI.`,
|
|
663
|
+
c.bold(info),
|
|
664
|
+
"",
|
|
665
|
+
"Please open the following URL in the browser:",
|
|
666
|
+
c.bold(c.green(`http://localhost:${nuxt.options.devServer.port}${ROUTE_AUTH}?token=${token}`))
|
|
667
|
+
];
|
|
668
|
+
console.log(`
|
|
669
|
+
${boxen(message.join("\n"), {
|
|
670
|
+
padding: 1,
|
|
671
|
+
borderColor: "yellow",
|
|
672
|
+
borderStyle: "round",
|
|
673
|
+
title: "Permission Request"
|
|
674
|
+
})}
|
|
675
|
+
`);
|
|
676
|
+
},
|
|
677
|
+
async verifyAuthToken(token) {
|
|
678
|
+
return token === await getDevAuthToken();
|
|
621
679
|
}
|
|
622
680
|
};
|
|
623
681
|
}
|
|
@@ -635,8 +693,8 @@ const route = useRoute()
|
|
|
635
693
|
</template>
|
|
636
694
|
`;
|
|
637
695
|
async function enablePages(nuxt) {
|
|
638
|
-
const pathApp = join(nuxt.options.srcDir, "app.vue");
|
|
639
|
-
const pathPageIndex = join(nuxt.options.srcDir, "pages/index.vue");
|
|
696
|
+
const pathApp = join$1(nuxt.options.srcDir, "app.vue");
|
|
697
|
+
const pathPageIndex = join$1(nuxt.options.srcDir, "pages/index.vue");
|
|
640
698
|
if (fs.existsSync(pathPageIndex)) {
|
|
641
699
|
logger.warn("pages/index.vue already exists, skipping");
|
|
642
700
|
return;
|
|
@@ -884,7 +942,7 @@ function scanFileHandler(type, prefix = "/") {
|
|
|
884
942
|
};
|
|
885
943
|
}
|
|
886
944
|
async function scanServerDir(nitro, name, mapper) {
|
|
887
|
-
const dirs = nitro.options.scanDirs.map((dir) => join(dir, name));
|
|
945
|
+
const dirs = nitro.options.scanDirs.map((dir) => join$1(dir, name));
|
|
888
946
|
const files = await scanDirs(dirs);
|
|
889
947
|
return files.map((f) => mapper(f));
|
|
890
948
|
}
|
|
@@ -6219,12 +6277,12 @@ function gitInstanceFactory(baseDir, options) {
|
|
|
6219
6277
|
init_git_response_error();
|
|
6220
6278
|
var esm_default = gitInstanceFactory;
|
|
6221
6279
|
|
|
6222
|
-
function setupAnalyzeBuildRPC({ nuxt, refresh }) {
|
|
6280
|
+
function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
|
|
6223
6281
|
let builds = [];
|
|
6224
6282
|
let promise;
|
|
6225
6283
|
let initalized;
|
|
6226
6284
|
const processId = "devtools:analyze-build";
|
|
6227
|
-
const analyzeDir = join(nuxt.options.rootDir, ".nuxt/analyze");
|
|
6285
|
+
const analyzeDir = join$1(nuxt.options.rootDir, ".nuxt/analyze");
|
|
6228
6286
|
async function startAnalyzeBuild(name) {
|
|
6229
6287
|
if (promise)
|
|
6230
6288
|
throw new Error("Already building");
|
|
@@ -6256,9 +6314,9 @@ function setupAnalyzeBuildRPC({ nuxt, refresh }) {
|
|
|
6256
6314
|
return {
|
|
6257
6315
|
...json,
|
|
6258
6316
|
features: {
|
|
6259
|
-
bundleClient: fs.existsSync(join(dir, "client.html")),
|
|
6260
|
-
bundleNitro: fs.existsSync(join(dir, "nitro.html")),
|
|
6261
|
-
viteInspect: fs.existsSync(join(dir, ".vite-inspect"))
|
|
6317
|
+
bundleClient: fs.existsSync(join$1(dir, "client.html")),
|
|
6318
|
+
bundleNitro: fs.existsSync(join$1(dir, "nitro.html")),
|
|
6319
|
+
viteInspect: fs.existsSync(join$1(dir, ".vite-inspect"))
|
|
6262
6320
|
}
|
|
6263
6321
|
};
|
|
6264
6322
|
}));
|
|
@@ -6284,18 +6342,22 @@ function setupAnalyzeBuildRPC({ nuxt, refresh }) {
|
|
|
6284
6342
|
builds
|
|
6285
6343
|
};
|
|
6286
6344
|
},
|
|
6287
|
-
async clearAnalyzeBuilds(names) {
|
|
6345
|
+
async clearAnalyzeBuilds(token, names) {
|
|
6346
|
+
await ensureDevAuthToken(token);
|
|
6288
6347
|
if (!names) {
|
|
6289
6348
|
await fsp.rm(analyzeDir, { recursive: true, force: true });
|
|
6290
6349
|
} else {
|
|
6291
6350
|
const targets = builds.filter((build) => names.includes(build.name));
|
|
6292
|
-
await Promise.all(targets.map((target) => fsp.rm(join(analyzeDir, target.slug), { recursive: true, force: true })));
|
|
6351
|
+
await Promise.all(targets.map((target) => fsp.rm(join$1(analyzeDir, target.slug), { recursive: true, force: true })));
|
|
6293
6352
|
}
|
|
6294
6353
|
initalized = readBuildInfo();
|
|
6295
6354
|
refresh("getAnalyzeBuildInfo");
|
|
6296
6355
|
},
|
|
6297
6356
|
generateAnalyzeBuildName,
|
|
6298
|
-
startAnalyzeBuild
|
|
6357
|
+
async startAnalyzeBuild(token, ...args) {
|
|
6358
|
+
await ensureDevAuthToken(token);
|
|
6359
|
+
return startAnalyzeBuild(...args);
|
|
6360
|
+
}
|
|
6299
6361
|
};
|
|
6300
6362
|
}
|
|
6301
6363
|
|
|
@@ -6888,8 +6950,8 @@ const defaults = {
|
|
|
6888
6950
|
function setupUIOptionsRPC({ nuxt }) {
|
|
6889
6951
|
const home = homedir();
|
|
6890
6952
|
const projectHash = hash(nuxt.options.rootDir);
|
|
6891
|
-
const dir = join(home, ".nuxt/devtools");
|
|
6892
|
-
const filepath = join(dir, `${projectHash}.json`);
|
|
6953
|
+
const dir = join$1(home, ".nuxt/devtools");
|
|
6954
|
+
const filepath = join$1(dir, `${projectHash}.json`);
|
|
6893
6955
|
let settings;
|
|
6894
6956
|
async function getUIOptions() {
|
|
6895
6957
|
if (!settings)
|
|
@@ -6972,7 +7034,13 @@ function setupRPC(nuxt, options) {
|
|
|
6972
7034
|
rpc,
|
|
6973
7035
|
refresh,
|
|
6974
7036
|
extendServerRpc,
|
|
6975
|
-
openInEditorHooks: []
|
|
7037
|
+
openInEditorHooks: [],
|
|
7038
|
+
async ensureDevAuthToken(token) {
|
|
7039
|
+
if (options.disableAuthorization)
|
|
7040
|
+
return;
|
|
7041
|
+
if (token !== await getDevAuthToken())
|
|
7042
|
+
throw new Error("Invalid dev auth token.");
|
|
7043
|
+
}
|
|
6976
7044
|
};
|
|
6977
7045
|
nuxt.devtools = ctx;
|
|
6978
7046
|
Object.assign(serverFunctions, {
|
|
@@ -7048,16 +7116,32 @@ async function enableModule(options, nuxt) {
|
|
|
7048
7116
|
await nuxt.callHook("devtools:before");
|
|
7049
7117
|
nuxt.options.imports.collectMeta = true;
|
|
7050
7118
|
addPlugin({
|
|
7051
|
-
src: join(runtimeDir, "plugins/devtools.client"),
|
|
7119
|
+
src: join$1(runtimeDir, "plugins/devtools.client"),
|
|
7052
7120
|
mode: "client"
|
|
7053
7121
|
});
|
|
7122
|
+
addPlugin({
|
|
7123
|
+
src: join$1(runtimeDir, "plugins/devtools.server"),
|
|
7124
|
+
mode: "server"
|
|
7125
|
+
});
|
|
7126
|
+
nuxt.hook("nitro:config", (config) => {
|
|
7127
|
+
config.externals = config.externals || {};
|
|
7128
|
+
config.externals.inline = config.externals.inline || [];
|
|
7129
|
+
config.externals.inline.push(join$1(runtimeDir, "nitro"));
|
|
7130
|
+
config.virtual = config.virtual || {};
|
|
7131
|
+
config.virtual["#nuxt-devtools-inline"] = `export const script = \`
|
|
7132
|
+
window.__NUXT_DEVTOOLS_TIME_METRIC__ = window.__NUXT_DEVTOOLS_TIME_METRIC__ || {}
|
|
7133
|
+
window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
7134
|
+
\``;
|
|
7135
|
+
config.plugins = config.plugins || [];
|
|
7136
|
+
config.plugins.push(join$1(runtimeDir, "nitro/inline"));
|
|
7137
|
+
});
|
|
7054
7138
|
const {
|
|
7055
7139
|
vitePlugin,
|
|
7056
7140
|
...ctx
|
|
7057
7141
|
} = setupRPC(nuxt, options);
|
|
7058
7142
|
addVitePlugin(vitePlugin);
|
|
7059
7143
|
const clientDirExists = existsSync(clientDir);
|
|
7060
|
-
const analyzeDir = join(nuxt.options.rootDir, ".nuxt/analyze");
|
|
7144
|
+
const analyzeDir = join$1(nuxt.options.rootDir, ".nuxt/analyze");
|
|
7061
7145
|
nuxt.hook("vite:extendConfig", (config) => {
|
|
7062
7146
|
var _a, _b, _c, _d;
|
|
7063
7147
|
config.server || (config.server = {});
|
|
@@ -7076,6 +7160,27 @@ async function enableModule(options, nuxt) {
|
|
|
7076
7160
|
server.middlewares.use(ROUTE_ANALYZE, sirv(analyzeDir, { single: false, dev: true }));
|
|
7077
7161
|
if (clientDirExists)
|
|
7078
7162
|
server.middlewares.use(ROUTE_CLIENT, sirv(clientDir, { single: true, dev: true }));
|
|
7163
|
+
server.middlewares.use(ROUTE_AUTH, sirv(join$1(runtimeDir, "auth"), { single: true, dev: true }));
|
|
7164
|
+
server.middlewares.use(ROUTE_AUTH_VERIFY, async (req, res) => {
|
|
7165
|
+
const search = req.url?.split("?")[1];
|
|
7166
|
+
if (!search) {
|
|
7167
|
+
res.statusCode = 400;
|
|
7168
|
+
res.end("No token provided");
|
|
7169
|
+
}
|
|
7170
|
+
const query = new URLSearchParams(search);
|
|
7171
|
+
const token = query.get("token");
|
|
7172
|
+
if (!token) {
|
|
7173
|
+
res.statusCode = 400;
|
|
7174
|
+
res.end("No token provided");
|
|
7175
|
+
}
|
|
7176
|
+
if (token === await getDevAuthToken()) {
|
|
7177
|
+
res.statusCode = 200;
|
|
7178
|
+
res.end("Valid token");
|
|
7179
|
+
} else {
|
|
7180
|
+
res.statusCode = 403;
|
|
7181
|
+
res.end("Invalid token");
|
|
7182
|
+
}
|
|
7183
|
+
});
|
|
7079
7184
|
});
|
|
7080
7185
|
const integrations = [
|
|
7081
7186
|
import('./plugin-metrics.mjs').then(({ setup }) => setup(ctx)),
|
package/dist/chunks/vscode.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import 'vite';
|
|
|
14
14
|
import 'sirv';
|
|
15
15
|
import 'picocolors';
|
|
16
16
|
import 'birpc';
|
|
17
|
-
import '../shared/devtools.
|
|
17
|
+
import '../shared/devtools.7ab40af4.mjs';
|
|
18
18
|
import '../dirs.mjs';
|
|
19
19
|
import 'node:url';
|
|
20
20
|
import 'is-installed-globally';
|
|
@@ -28,6 +28,7 @@ import 'pkg-types';
|
|
|
28
28
|
import 'semver';
|
|
29
29
|
import 'local-pkg';
|
|
30
30
|
import 'unimport';
|
|
31
|
+
import 'boxen';
|
|
31
32
|
import 'perfect-debounce';
|
|
32
33
|
import 'fs';
|
|
33
34
|
import 'tty';
|
|
@@ -56,7 +57,8 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
|
|
|
56
57
|
rpc.broadcast.navigateTo("/modules/custom-builtin-vscode");
|
|
57
58
|
return true;
|
|
58
59
|
} catch (e) {
|
|
59
|
-
console.
|
|
60
|
+
console.debug(`Failed to open file "${file}" in VS Code Server`);
|
|
61
|
+
console.debug(e);
|
|
60
62
|
return false;
|
|
61
63
|
}
|
|
62
64
|
});
|
|
@@ -137,6 +139,7 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
|
|
|
137
139
|
title: "VS Code",
|
|
138
140
|
icon: "bxl-visual-studio",
|
|
139
141
|
category: "modules",
|
|
142
|
+
requireAuth: true,
|
|
140
143
|
view: !installed ? {
|
|
141
144
|
type: "launch",
|
|
142
145
|
title: "Install VS Code Server",
|
package/dist/client/200.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html >
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.eb90118b.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.ea777320.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.ee7015bb.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.a568b6bd.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.039e8e59.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.7a55d586.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-docs.100caa70.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.032bcb78.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.97bd3af7.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.ea777320.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
|
|
5
5
|
</script></head>
|
|
6
|
-
<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><script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.
|
|
6
|
+
<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><script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.eb90118b.js" crossorigin></script></body>
|
|
7
7
|
</html>
|
package/dist/client/404.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html >
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.eb90118b.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.ea777320.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.ee7015bb.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.a568b6bd.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.039e8e59.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.7a55d586.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-docs.100caa70.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.032bcb78.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.97bd3af7.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.ea777320.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
|
|
5
5
|
</script></head>
|
|
6
|
-
<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><script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.
|
|
6
|
+
<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><script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.eb90118b.js" crossorigin></script></body>
|
|
7
7
|
</html>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html >
|
|
3
|
+
<head><meta charset="utf-8">
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.eb90118b.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.ea777320.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.ee7015bb.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.a568b6bd.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.039e8e59.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.7a55d586.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-docs.100caa70.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.032bcb78.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.97bd3af7.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.ea777320.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
|
|
5
|
+
</script></head>
|
|
6
|
+
<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><script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.eb90118b.js" crossorigin></script></body>
|
|
7
|
+
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aY as n,o,e as s,Z as t}from"./entry.eb90118b.js";const c={},r={class:"mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs"};function a(e,_){return o(),s("span",r,[t(e.$slots,"default")])}const l=n(c,[["render",a]]);export{l as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as C}from"./NCodeBlock.vue.2f00c5a7.js";import{a as g,b3 as h,aj as S,o as s,e as a,b as n,F as d,m as w,p as u,u as o,t as x,f as _,w as f,j as m,c as B,q as r,h as N}from"./entry.eb90118b.js";import{a as V}from"./editor.beb173d9.js";const $={key:0,relative:"","n-code-block":""},j={flex:"~ wrap","w-full":""},D=["onClick"],E=n("div",{border:"b base","flex-auto":""},null,-1),F={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},T=g({__name:"CodeSnippets",props:{codeSnippets:{}},setup(b){const c=b,e=h(c.codeSnippets[0]),k=V();return S(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(l,p)=>{const v=C,i=N;return l.codeSnippets.length?(s(),a("div",$,[n("div",j,[(s(!0),a(d,null,w(l.codeSnippets,(t,y)=>(s(),a("button",{key:y,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:q=>e.value=t},[n("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},x(t.name),3)],10,D))),128)),E]),o(e)?(s(),a(d,{key:0},[_(v,{code:o(e).code,lang:o(e).lang,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),n("div",F,[_(i,{icon:"carbon-copy",onClick:p[0]||(p[0]=t=>o(k)(o(e).code))},{default:f(()=>[m(" Copy ")]),_:1}),o(e)?.docs?(s(),B(i,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:f(()=>[m(" Docs ")]),_:1},8,["to"])):r("",!0)])],64)):r("",!0)])):r("",!0)}}});export{T as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i}from"./NIconButton.vue.afd698ce.js";import{a as u,r as f,ac as m,ad as d,c as p,w as _,ae as b,o as s,e as v,f as g,b as h,Z as x,af as y,u as k,q as B}from"./entry.eb90118b.js";const C={relative:"","h-full":"","w-full":"","of-auto":""},V={inheritAttrs:!1},N=u({...V,__name:"DrawerRight",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(r,{emit:l}){const t=r,o=f(),{height:n}=m(()=>t.navbar,void 0,{box:"border-box"});return d(o,()=>{t.modelValue&&t.autoClose&&l("close")},{ignore:["a","button","summary"]}),(e,a)=>{const c=i;return s(),p(b,{"enter-active-class":"duration-200 ease-in","enter-from-class":"transform translate-x-1/1","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100","leave-to-class":"transform translate-x-1/1"},{default:_(()=>[e.modelValue?(s(),v("div",y({key:0,ref_key:"el",ref:o,border:"l base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{top:`${k(n)}px`}},e.$attrs),[g(c,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:a[0]||(a[0]=$=>e.$emit("close"))}),h("div",C,[x(e.$slots,"default")])],16)):B("",!0)]),_:3})}}});export{N as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n,o as s,e as i,j as u,t as f,p,b as c}from"./entry.eb90118b.js";const m=c("span",{"ml-1":"","text-xs":"",op50:""},"ms",-1),l=n({__name:"DurationDisplay",props:{duration:{},factor:{default:1}},setup(r){const e=r;function o(t){return t?(t=t*e.factor,t<.5?"text-gray:50":t>1e3?"text-red-400":t>500?"text-orange-400":t>200?"text-yellow-400":""):"text-gray-400"}function a(t){return t?t<1?"<1":t.toFixed(2):"-"}return(t,d)=>(s(),i("div",{class:p(o(t.duration))},[u(f(a(t.duration)),1),m],2))}});export{l as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as h}from"./editor.beb173d9.js";import{a as f,U as c,l as k,at as v,o as t,c as y,w as B,e as s,F as l,j as m,t as n,u as a,b as C,q as b,p as N,ab as g}from"./entry.eb90118b.js";const w={key:0,op50:""},I=f({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(u){const r=u,d=h(),p=c(),o=k(()=>r.filepath&&p.value?v(r.filepath,p.value.rootDir):{path:r.filepath||""});return(e,i)=>(t(),y(g(e.filepath?"button":"span"),{class:N([e.filepath?"hover:underline":"",e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath,onClick:i[0]||(i[0]=D=>e.filepath&&a(d)(e.filepath))},{default:B(()=>[e.override?(t(),s(l,{key:0},[m(n(e.override),1)],64)):a(o).moduleName?(t(),s(l,{key:1},[C("span",null,n(a(o).moduleName),1),e.subpath?(t(),s("span",w,n(a(o).path.slice(a(o).moduleName.length)),1)):b("",!0)],64)):(t(),s(l,{key:2},[m(n(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{I as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as f}from"./NIconButton.vue.
|
|
1
|
+
import{_ as f}from"./NIconButton.vue.afd698ce.js";import{a as _,r as m,u as o,e as s,b as d,f as a,w as i,ae as u,F as v,q as n,o as l,Z as g,a5 as k}from"./entry.eb90118b.js";const x=d("div",{"i-ri:question-mark":""},null,-1),h=[x],y={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"",px8:"",py4:"","bg-base":""},$=_({__name:"HelpFab",setup(w){const e=m(!1),{showHelpButtons:p}=k();return(b,t)=>{const c=f;return o(p)?(l(),s(v,{key:0},[d("button",{pos:"absolute bottom-5 right-5",border:"~ base rounded-full ",flex:"~ items-center justify-center","z-110":"","h-11":"","w-11":"","backdrop-blur-8":"",bg:"bg-base op50!","light:shadow":"",hover:"bg-active",title:"Help",onClick:t[0]||(t[0]=r=>e.value=!o(e))},h),a(u,{name:"fade-in"},{default:i(()=>[o(e)?(l(),s("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:t[1]||(t[1]=r=>e.value=!1)})):n("",!0)]),_:1}),a(u,{name:"slide-in"},{default:i(()=>[o(e)?(l(),s("div",y,[g(b.$slots,"default"),a(c,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:t[2]||(t[2]=r=>e.value=!1)})])):n("",!0)]),_:3})],64)):n("",!0)}}});export{$ as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k,c as o,w as a,o as n,f as r,b as c,t as i,q as m,e as b,m as g,af as h,j as N,F as w,aX as x,P as C,h as y,a6 as B}from"./entry.eb90118b.js";import{_ as $}from"./NMarkdown.vue.4a55718e.js";import{_ as P}from"./NPanelGrids.e209861e.js";const V={"text-xl":""},v={flex:"~ gap2 wrap"},q=k({__name:"LaunchPage",props:{icon:{},title:{},description:{},actions:{}},emits:["action"],setup(F){return(e,I)=>{const _=x,l=$,p=C,d=y,u=B,f=P;return n(),o(f,null,{default:a(()=>[r(u,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:a(()=>[r(_,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),c("h1",V,i(e.title),1),e.description?(n(),o(l,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):m("",!0),c("div",v,[(n(!0),b(w,null,g(e.actions,(t,s)=>(n(),o(d,h({key:s,n:"solid primary",disabled:t.pending,to:t.src,target:t.src?"_blank":void 0},t.attrs,{onClick:()=>{t.handle?.(),e.$emit("action",s)}}),{default:a(()=>[t.pending?(n(),o(p,{key:0,icon:"carbon-circle-dash","animate-spin":""})):m("",!0),N(" "+i(t.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{q as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,ar as r,e as p,v as b,bh as u,u as a,b as n,H as h,aO as k,f,Z as m,p as v,o as _,P as x}from"./entry.eb90118b.js";const V=["checked","disabled"],y=["disabled"],B={class:"n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},$=i({__name:"NCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(o,s)=>{const d=x;return _(),p("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:a(e)||null,disabled:o.disabled||null},[b(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>h(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:o.disabled,onKeypress:s[1]||(s[1]=k(l=>e.value=!a(e),["enter"]))},null,40,y),[[u,a(e)]]),n("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:v([a(e)?"":"op50","n-transition"])},[m(o.$slots,"default")],2)],8,V)}}});export{$ as _};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as u}from"./client.c658398a.js";import{a as _,l as m,ai as k,o as n,e as s,p as r,b as t,F as d,m as f,t as g}from"./entry.eb90118b.js";const h=["innerHTML"],C={class:"shiki"},v=["textContent"],y=t("br",null,null,-1),H=_({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(a,{emit:c}){const o=a,l=m(()=>{const e=u.value?.devtools.renderCodeHighlight(o.code,o.lang)||{code:o.code,supported:!1};return e.supported&&o.transformRendered&&(e.code=o.transformRendered(e.code)),e.supported&&k(()=>c("loaded")),e});return(e,b)=>e.lang&&l.value.supported?(n(),s("pre",{key:0,class:r(["n-code-block",e.lines?"n-code-block-lines":""]),innerHTML:l.value.code},null,10,h)):(n(),s("pre",{key:1,class:r(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",C,[t("code",null,[(n(!0),s(d,null,f(e.code.split(`
|
|
2
|
+
`),(i,p)=>(n(),s(d,{key:p},[t("span",{class:"line",textContent:g(i)},null,8,v),y],64))),128))])])],2))}});export{H as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,o as e,c,w as r,f as i,af as p,ab as _,u as m,I as u,P as f}from"./entry.eb90118b.js";const d=s({__name:"NIconButton",props:{to:{},icon:{}},setup(n){const t=n;return(o,l)=>{const a=f;return e(),c(_(o.to?m(u):"button"),p({to:o.to},o.$attrs,{class:"n-transition n-icon-button"}),{default:r(()=>[i(a,{icon:t.icon},null,8,["icon"])]),_:1},16,["to"])}}});export{d as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,o,e as s,p as a,q as n,Z as r,b as l,t as i}from"./entry.eb90118b.js";const c={flex:"~ gap-3","items-center":""},u=t({__name:"NIconTitle",props:{icon:{},text:{}},setup(p){return(e,m)=>(o(),s("div",c,[e.icon?(o(),s("div",{key:0,class:a(e.icon)},null,2)):n("",!0),r(e.$slots,"default",{},()=>[l("div",null,i(e.text),1)])]))}});export{u as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n,o as a,c as o,w as r,Z as s,af as t,ab as p,u as i,I as l}from"./entry.eb90118b.js";const c=n({__name:"NLink",props:{to:{},href:{},target:{}},setup(_){return(e,f)=>(a(),o(p(e.href||e.target?"a":i(l)),t(e.$props,{class:"n-link n-transition hover:n-link-hover n-link-base"}),{default:r(()=>[s(e.$slots,"default")]),_:3},16))}});export{c as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as o}from"./client.c658398a.js";import{a as t,u as a,o as e,c as r,ab as s,t as d}from"./entry.eb90118b.js";const i=t({__name:"NMarkdown",props:{markdown:{},tag:{}},setup(m){return(n,l)=>n.markdown&&a(o)?.devtools?.renderMarkdown?(e(),r(s(n.tag||"span"),{key:0,class:"n-markdown",innerHTML:a(o).devtools.renderMarkdown(n.markdown)},null,8,["innerHTML"])):(e(),r(s(n.tag||"span"),{key:1,class:"n-markdown",textContent:d(n.markdown)},null,8,["textContent"]))}});export{i as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aY as n,o,e as s,Z as t}from"./entry.eb90118b.js";const c={},r={class:"n-panel-grids-center"};function _(e,a){return o(),s("div",r,[t(e.$slots,"default")])}const d=n(c,[["render",_]]);export{d as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
details[data-v-a73dbcfe]{border-style:none}summary[data-v-a73dbcfe]{border-style:none;list-style:none}details[open] summary[data-v-a73dbcfe]{border-style:none}details summary[data-v-a73dbcfe]::-webkit-details-marker{display:none}details[open] .chevron[data-v-a73dbcfe]{opacity:.75;transform:rotate(180deg)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as g,ar as y,e as r,b as o,p as n,f as b,w,u as i,F as c,v as B,x as S,Z as s,q as p,o as l,j as u,t as v,c as $,ay as C,az as N,P as k,aY as x}from"./entry.eb90118b.js";import{_ as I}from"./NIconTitle.vue.025b1812.js";const f=t=>(C("data-v-a73dbcfe"),t=t(),N(),t),V=["open"],z={"text-base":""},T={key:0,"text-sm":"",op50:""},D=f(()=>o("div",{class:"flex-auto"},null,-1)),F=f(()=>o("div",{class:"x-divider"},null,-1)),j=g({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(t){const a=y(t,"open",void 0,{passive:!0});function _(e){a.value=e.target.open}return(e,d)=>{const m=k,h=I;return l(),r(c,null,[o("details",{open:i(a),onToggle:_},[o("summary",{class:n(["cursor-pointer select-none hover:bg-active p4",e.collapse?"":"pointer-events-none"])},[b(h,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:n([i(a)?"op100":"op60",e.headerClass])},{default:w(()=>[o("div",null,[o("div",z,[s(e.$slots,"text",{},()=>[u(v(e.text),1)],!0)]),e.description||e.$slots.description?(l(),r("div",T,[s(e.$slots,"description",{},()=>[u(v(e.description),1)],!0)])):p("",!0)]),D,s(e.$slots,"actions",{},void 0,!0),e.collapse?(l(),$(m,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):p("",!0)]),_:3},8,["icon","text","class"])],2),d._lazyshow1||i(a)?(d._lazyshow1=!0,l(),r(c,null,[B(o("div",{class:n(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[s(e.$slots,"details",{},void 0,!0),o("div",{class:n([e.containerClass,"mt1"])},[s(e.$slots,"default",{},void 0,!0)],2),s(e.$slots,"footer",{},void 0,!0)],2),[[S,i(a)]])],64)):p("v-show-if",!0)],40,V),F],64)}}});const P=x(j,[["__scopeId","data-v-a73dbcfe"]]);export{P as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,ar as p,e as t,Z as l,v as f,bi as m,u as b,b as h,t as v,q as n,H as _,o as s,c as V,P as k}from"./entry.eb90118b.js";const y={class:"n-text-input flex flex items-center border n-border-base rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base"},B=["disabled"],w={key:0,value:"",disabled:"",hidden:""},g=u({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(d,{emit:i}){const o=p(d,"modelValue",i,{passive:!0});return(e,a)=>{const r=k;return s(),t("div",y,[l(e.$slots,"icon",{},()=>[e.icon?(s(),V(r,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):n("",!0)]),f(h("select",{"onUpdate:modelValue":a[0]||(a[0]=c=>_(o)?o.value=c:null),disabled:e.disabled,class:"w-full flex-auto n-bg-base !outline-none"},[e.placeholder?(s(),t("option",w,v(e.placeholder),1)):n("",!0),l(e.$slots,"default")],8,B),[[m,b(o)]])])}}});export{g as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,ar as c,o as r,e as u,v as h,bh as p,u as l,b as t,H as b,aO as v,Z as f}from"./entry.eb90118b.js";const k=["checked","disabled"],m=["disabled"],w=t("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[t("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),B=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(o,{emit:d}){const e=c(o,"modelValue",d,{passive:!0});return(a,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:l(e)||null,disabled:a.disabled||null},[h(t("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=v(n=>e.value=!l(e),["enter"]))},null,40,m),[[p,l(e)]]),w,f(a.$slots,"default")],8,k))}});export{B as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,o,e as c,Z as n,c as t,q as i,b as r,P as l}from"./entry.eb90118b.js";const p={class:"n-tip n-tip-base"},u=a({__name:"NTip",props:{icon:{}},setup(_){return(e,m)=>{const s=l;return o(),c("div",p,[n(e.$slots,"icon",{},()=>[e.icon?(o(),t(s,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):i("",!0)]),r("div",null,[n(e.$slots,"default")])])}}});export{u as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,
|
|
1
|
+
import{a as r,e as c,b as d,Z as s,p as n,o as p,f as i,J as u}from"./entry.eb90118b.js";const f={flex:"~ gap4"},g=r({__name:"Navbar",props:{search:{type:String,default:void 0},noPadding:{type:Boolean,default:!1}},emits:["update:search"],setup(e,{emit:o}){function t(a){o("update:search",a.target.value)}return(a,m)=>{const l=u;return p(),c("div",{flex:"~ col gap2",border:"b base","flex-1":"","navbar-glass":"",class:n([{p4:!e.noPadding}])},[d("div",f,[s(a.$slots,"search",{},()=>[i(l,{placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:n({"px-5 py-2":!e.noPadding}),value:e.search,onInput:t},null,8,["class","value"])]),s(a.$slots,"actions")]),s(a.$slots,"default")],2)}}});export{g as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as S}from"./Badge.bb04dbdf.js";import{_ as E}from"./NCodeBlock.vue.2f00c5a7.js";import{_ as F}from"./NCheckbox.vue.56878d59.js";import{_ as q}from"./NTip.vue.b7996913.js";import{a as A,C as G,aT as H,r as h,aU as K,A as W,o as l,e as p,Z,u as e,t as v,q as x,F as N,f as t,c as z,w as s,b as _,H as b,j as i,h as J,K as L}from"./entry.eb90118b.js";const M={key:0},O={p4:"",flex:"~ col gap-1"},Q={class:"text-lg font-medium leading-6"},X=_("p",{op50:""}," The following command will be executed in your terminal: ",-1),Y={flex:"~ gap-3",mt2:"","justify-end":""},ne=A({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(V){const u=V,$=G(),{info:r,update:w,state:B,processId:U,restart:R}=H(u.packageName,u.options),d=h(!0),c=h(!0),T=K(),f=W();async function g(){const o=await w(async a=>f.start(a));o&&c.value&&T.value.push({id:o,message:`${u.packageName} has been updated. Do you want to restart the Nuxt server now?`}),o&&d.value&&$.push(`/modules/terminals?id=${encodeURIComponent(o)}`)}return(o,a)=>{const k=S,D=E,y=F,P=q,C=J,j=L;return l(),p(N,null,[Z(o.$slots,"default",{id:e(U),info:e(r),update:g,state:e(B),restart:e(R)},()=>[e(r)&&o.showVersion?(l(),p("code",M,v(`v${e(r).current}`),1)):x("",!0),e(r)?.latest?(l(),p(N,{key:1},[e(r).needsUpdate?(l(),p("button",{key:0,onClick:a[0]||(a[0]=m=>g())},[t(k,{"bg-green-400:10":"","text-green-400":"",title:"updates available",textContent:"updates available"})])):(l(),z(k,{key:1,"bg-gray-400:10":"","text-gray-400":"",title:"latest",textContent:"latest"}))],64)):x("",!0)]),t(e(f),null,{default:s(({resolve:m,args:I})=>[t(j,{"model-value":!0,onClose:n=>m(!1)},{default:s(()=>[_("div",O,[_("h3",Q," Update "+v(u.packageName)+"? ",1),X,t(D,{code:I[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),t(y,{modelValue:e(d),"onUpdate:modelValue":a[1]||(a[1]=n=>b(d)?d.value=n:null),n:"primary"},{default:s(()=>[i(" Navigate to terminal ")]),_:1},8,["modelValue"]),t(y,{modelValue:e(c),"onUpdate:modelValue":a[2]||(a[2]=n=>b(c)?c.value=n:null),n:"primary"},{default:s(()=>[i(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),_("div",Y,[t(P,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:s(()=>[i(" Experimental feature. Please make sure to backup your project first. ")]),_:1}),t(C,{onClick:n=>m(!1)},{default:s(()=>[i(" Cancel ")]),_:2},1032,["onClick"]),t(C,{n:"solid primary",onClick:n=>m(!0)},{default:s(()=>[i(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}});export{ne as _};
|