@nuxt/devtools 1.0.0-beta.0 → 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/dist/chunks/module-main.mjs +137 -45
- package/dist/chunks/vscode.mjs +3 -1
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/_nuxt/{CodeDiff.vue.3beaa134.js → CodeDiff.vue.09a831fc.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.136c5104.js → ComposableItem.vue.770ce9d1.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.125423b7.js → DataSchemaButton.vue.65a9244c.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.8ac6b677.js → DataSchemaDrawer.939e0d36.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.c49b4e64.js → DurationDisplay.vue.3abddd08.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.5af0b5df.js → FilepathItem.vue.66158bcd.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.98c902f4.js → HelpFab.vue.074157ff.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.20d8d836.js +1 -0
- package/dist/client/_nuxt/{NBadge.98d5d309.js → NBadge.532c6829.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.83a6e70e.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.adf1e9b4.js → NCodeBlock.vue.d4a74ca4.js} +2 -2
- package/dist/client/_nuxt/{NDrawer.vue.8e620517.js → NDrawer.vue.f03c3dec.js} +1 -1
- package/dist/client/_nuxt/{NDropdown.vue.b2f7aaef.js → NDropdown.vue.885f70c3.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.bf8093eb.js → NIconTitle.vue.5caf9fc5.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.0e98999b.js → NLink.vue.c05eef3c.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.b0e8b2fc.js → NMarkdown.vue.52b3ce56.js} +1 -1
- package/dist/client/_nuxt/NNavbar.vue.0f176f87.js +1 -0
- package/dist/client/_nuxt/{NSectionBlock.4347cc14.js → NSectionBlock.43816001.js} +1 -1
- package/dist/client/_nuxt/{NSelect.vue.4c22d30e.js → NSelect.vue.dcac9c73.js} +1 -1
- package/dist/client/_nuxt/{NSelectTabs.vue.c9be0aa2.js → NSelectTabs.vue.411a7347.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.de333089.js → NSwitch.vue.aacb5de3.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.770a171a.js → NTip.vue.7a94f00d.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.332bb451.js → StateEditor.vue.e862f0c1.js} +1 -1
- package/dist/client/_nuxt/analyze-build.2cdd206f.js +1 -0
- package/dist/client/_nuxt/assets.41fcf77e.js +16 -0
- package/dist/client/_nuxt/{client.3f2665f1.js → client.ab169146.js} +1 -1
- package/dist/client/_nuxt/components.81bb7f4d.js +98 -0
- package/dist/client/_nuxt/{custom-_name_.c49c72a2.js → custom-_name_.3060f125.js} +1 -1
- package/dist/client/_nuxt/{default.3ba7d10b.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.9d2aaad9.js → error-404.b43ed6fa.js} +1 -1
- package/dist/client/_nuxt/{error-500.20d1b3ce.js → error-500.9a32d319.js} +1 -1
- package/dist/client/_nuxt/{full.6d0fd7cf.js → full.44b6f3d9.js} +1 -1
- package/dist/client/_nuxt/{hooks.908144b2.js → hooks.85310903.js} +1 -1
- package/dist/client/_nuxt/imports.3e92b5b9.js +1 -0
- package/dist/client/_nuxt/index.370f8c55.js +17 -0
- package/dist/client/_nuxt/{index.eb95211d.js → index.780a9ee0.js} +1 -1
- package/dist/client/_nuxt/json-editor-vue.724e0801.js +129 -0
- package/dist/client/_nuxt/{middleware.9e4b2529.js → middleware.44a34c7b.js} +1 -1
- package/dist/client/_nuxt/modules.24081f84.js +2 -0
- package/dist/client/_nuxt/{none.27bf71df.js → none.06949a5f.js} +1 -1
- package/dist/client/_nuxt/{open-graph.b95ebacd.js → open-graph.6cf823d3.js} +2 -2
- package/dist/client/_nuxt/{overview.4991be1e.js → overview.86a88207.js} +1 -1
- package/dist/client/_nuxt/{pages.708b9e25.js → pages.23eb0566.js} +1 -1
- package/dist/client/_nuxt/{payload.eaf10e21.js → payload.1baa204b.js} +1 -1
- package/dist/client/_nuxt/{plugins.f02b2c56.js → plugins.f261769b.js} +1 -1
- 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.ca4a58b1.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.27117a31.js → storage.cb6d643c.js} +1 -1
- package/dist/client/_nuxt/{terminals.cdead889.js → terminals.06dde221.js} +2 -2
- package/dist/client/_nuxt/timeline.5add59be.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.ddd835d7.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/shared/devtools.d18bab28.mjs +84 -0
- package/package.json +32 -29
- package/dist/client/_nuxt/LaunchPage.vue.805f9595.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.6fb2ece1.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.371e4d0a.js +0 -1
- package/dist/client/_nuxt/analyze-build.281c50c1.js +0 -1
- package/dist/client/_nuxt/assets.ca8faf7a.js +0 -16
- package/dist/client/_nuxt/components.a8900a78.js +0 -98
- package/dist/client/_nuxt/entry.1c0836ed.css +0 -1
- package/dist/client/_nuxt/entry.e01776ec.js +0 -27
- package/dist/client/_nuxt/imports.d7bd415a.js +0 -1
- package/dist/client/_nuxt/index.a0a2f0b3.js +0 -17
- package/dist/client/_nuxt/json-editor-vue.b22bf91c.js +0 -129
- package/dist/client/_nuxt/modules.fd214f26.js +0 -2
- package/dist/client/_nuxt/runtime-configs.63235af8.js +0 -1
- package/dist/client/_nuxt/server-routes.88eebd4c.js +0 -9
- package/dist/client/_nuxt/settings.7dbb31cf.js +0 -1
- package/dist/client/_nuxt/state-modules.6d6b039c.js +0 -1
- package/dist/client/_nuxt/storage-options.ab028b2a.js +0 -1
- package/dist/client/_nuxt/timeline.ddc61557.js +0 -29
- package/dist/client/_nuxt/virtual-files.9da3562d.js +0 -1
- package/dist/shared/devtools.c28fc9a7.mjs +0 -80
|
@@ -7,7 +7,7 @@ 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.
|
|
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
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';
|
|
@@ -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 = "1.0.0-beta.
|
|
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
|
},
|
|
@@ -597,6 +659,8 @@ function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
|
|
|
597
659
|
return nuxt.callHook("restart", { hard });
|
|
598
660
|
},
|
|
599
661
|
async requestForAuth(info, origin) {
|
|
662
|
+
if (options.disableAuthorization)
|
|
663
|
+
return;
|
|
600
664
|
const token = await getDevAuthToken();
|
|
601
665
|
origin || (origin = `${nuxt.options.devServer.https ? "https" : "http"}://${nuxt.options.devServer.host === "::" ? "localhost" : nuxt.options.devServer.host || "localhost"}:${nuxt.options.devServer.port}`);
|
|
602
666
|
const message = [
|
|
@@ -619,6 +683,8 @@ function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
|
|
|
619
683
|
});
|
|
620
684
|
},
|
|
621
685
|
async verifyAuthToken(token) {
|
|
686
|
+
if (options.disableAuthorization)
|
|
687
|
+
return true;
|
|
622
688
|
return token === await getDevAuthToken();
|
|
623
689
|
}
|
|
624
690
|
};
|
|
@@ -914,6 +980,11 @@ function getOptionsFilepath(options) {
|
|
|
914
980
|
hashedKey
|
|
915
981
|
};
|
|
916
982
|
}
|
|
983
|
+
async function clearLocalOptions(options) {
|
|
984
|
+
const { filePath } = getOptionsFilepath(options);
|
|
985
|
+
if (existsSync(filePath))
|
|
986
|
+
await fsp.unlink(filePath);
|
|
987
|
+
}
|
|
917
988
|
async function writeLocalOptions(settings, options) {
|
|
918
989
|
const { filePath, hashedKey } = getOptionsFilepath(options);
|
|
919
990
|
await fsp.mkdir(dirname$1(filePath), { recursive: true });
|
|
@@ -932,9 +1003,12 @@ async function writeLocalOptions(settings, options) {
|
|
|
932
1003
|
);
|
|
933
1004
|
}
|
|
934
1005
|
|
|
1006
|
+
let options;
|
|
1007
|
+
function getOptions() {
|
|
1008
|
+
return options;
|
|
1009
|
+
}
|
|
935
1010
|
function setupOptionsRPC({ nuxt }) {
|
|
936
|
-
|
|
937
|
-
async function getOptions(tab) {
|
|
1011
|
+
async function getOptions2(tab) {
|
|
938
1012
|
if (!options || options[tab]) {
|
|
939
1013
|
options = defaultTabOptions;
|
|
940
1014
|
await read(tab);
|
|
@@ -948,9 +1022,16 @@ function setupOptionsRPC({ nuxt }) {
|
|
|
948
1022
|
});
|
|
949
1023
|
return options;
|
|
950
1024
|
}
|
|
1025
|
+
getOptions2("ui");
|
|
1026
|
+
async function clearOptions() {
|
|
1027
|
+
options = void 0;
|
|
1028
|
+
await clearLocalOptions({
|
|
1029
|
+
root: nuxt.options.rootDir
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
951
1032
|
return {
|
|
952
1033
|
async updateOptions(tab, _settings) {
|
|
953
|
-
const settings = await
|
|
1034
|
+
const settings = await getOptions2(tab);
|
|
954
1035
|
Object.assign(settings, _settings);
|
|
955
1036
|
await writeLocalOptions(
|
|
956
1037
|
{ ...settings },
|
|
@@ -965,7 +1046,8 @@ function setupOptionsRPC({ nuxt }) {
|
|
|
965
1046
|
}
|
|
966
1047
|
});
|
|
967
1048
|
},
|
|
968
|
-
getOptions
|
|
1049
|
+
getOptions: getOptions2,
|
|
1050
|
+
clearOptions
|
|
969
1051
|
};
|
|
970
1052
|
}
|
|
971
1053
|
|
|
@@ -974,12 +1056,14 @@ function setupTimelineRPC({ nuxt }) {
|
|
|
974
1056
|
async enableTimeline(dry) {
|
|
975
1057
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
976
1058
|
const source = await fsp.readFile(filepath, "utf-8");
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
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 } }`");
|
|
983
1067
|
if (!dry) {
|
|
984
1068
|
await fsp.writeFile(filepath, generated, "utf-8");
|
|
985
1069
|
await nuxt.callHook("restart", { hard: true });
|
|
@@ -1001,8 +1085,11 @@ function throttle(fn, delay) {
|
|
|
1001
1085
|
}
|
|
1002
1086
|
};
|
|
1003
1087
|
}
|
|
1088
|
+
let telemetry;
|
|
1089
|
+
const throttledSend = throttle(() => {
|
|
1090
|
+
telemetry?.sendEvents();
|
|
1091
|
+
}, SEND_DELAY);
|
|
1004
1092
|
function setupTelemetryRPC({ nuxt, options }) {
|
|
1005
|
-
let telemetry;
|
|
1006
1093
|
if (options.telemetry !== false) {
|
|
1007
1094
|
nuxt.hook("telemetry:setup", (t) => {
|
|
1008
1095
|
telemetry = t;
|
|
@@ -1016,21 +1103,23 @@ function setupTelemetryRPC({ nuxt, options }) {
|
|
|
1016
1103
|
t.createEvent("devtools", { event: "enabled" });
|
|
1017
1104
|
});
|
|
1018
1105
|
}
|
|
1019
|
-
const throttledSend = throttle(() => {
|
|
1020
|
-
telemetry?.sendEvents();
|
|
1021
|
-
}, SEND_DELAY);
|
|
1022
1106
|
return {
|
|
1023
1107
|
telemetryEvent(payload, immediate = false) {
|
|
1024
|
-
|
|
1025
|
-
return;
|
|
1026
|
-
telemetry.createEvent("devtools", payload);
|
|
1027
|
-
if (immediate)
|
|
1028
|
-
telemetry.sendEvents();
|
|
1029
|
-
else
|
|
1030
|
-
throttledSend();
|
|
1108
|
+
telemetryEvent(payload, immediate);
|
|
1031
1109
|
}
|
|
1032
1110
|
};
|
|
1033
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
|
+
}
|
|
1034
1123
|
|
|
1035
1124
|
function setupRPC(nuxt, options) {
|
|
1036
1125
|
const serverFunctions = {};
|
|
@@ -1048,7 +1137,10 @@ function setupRPC(nuxt, options) {
|
|
|
1048
1137
|
return extendedRpcMap.get(namespace)?.[fnName];
|
|
1049
1138
|
},
|
|
1050
1139
|
onError(error, name) {
|
|
1051
|
-
|
|
1140
|
+
logger.error(
|
|
1141
|
+
colors.yellow(`[nuxt-devtools] RPC error on executing "${colors.bold(name)}":
|
|
1142
|
+
`) + colors.red(error?.message || "")
|
|
1143
|
+
);
|
|
1052
1144
|
},
|
|
1053
1145
|
timeout: 12e4
|
|
1054
1146
|
}
|
|
@@ -1198,7 +1290,7 @@ if (!window.__NUXT_DEVTOOLS_TIME_METRIC__) {
|
|
|
1198
1290
|
window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
1199
1291
|
\``;
|
|
1200
1292
|
config.plugins = config.plugins || [];
|
|
1201
|
-
config.plugins.
|
|
1293
|
+
config.plugins.unshift(join$1(runtimeDir, "nitro/inline"));
|
|
1202
1294
|
});
|
|
1203
1295
|
const {
|
|
1204
1296
|
vitePlugin,
|
package/dist/chunks/vscode.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import 'sirv';
|
|
|
14
14
|
import 'consola/utils';
|
|
15
15
|
import 'birpc';
|
|
16
16
|
import 'flatted';
|
|
17
|
-
import '../shared/devtools.
|
|
17
|
+
import '../shared/devtools.d18bab28.mjs';
|
|
18
18
|
import '../dirs.mjs';
|
|
19
19
|
import 'node:url';
|
|
20
20
|
import 'is-installed-globally';
|
|
@@ -30,6 +30,8 @@ import 'pkg-types';
|
|
|
30
30
|
import 'semver';
|
|
31
31
|
import 'local-pkg';
|
|
32
32
|
import 'unimport';
|
|
33
|
+
import 'destr';
|
|
34
|
+
import 'scule';
|
|
33
35
|
import 'simple-git';
|
|
34
36
|
import 'ohash';
|
|
35
37
|
|
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/NDrawer.vue.
|
|
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>
|
package/dist/client/404.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/NDrawer.vue.
|
|
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>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{_ as R}from"./NCodeBlock.vue.
|
|
1
|
+
import{_ as R}from"./NCodeBlock.vue.d4a74ca4.js";import{d as _,a as N,r as F,ak as W,bx as A,o as B,h as J,f as V}from"./entry.9effa704.js";function m(){}m.prototype={diff:function(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=o.callback;typeof o=="function"&&(f=o,o={}),this.options=o;var r=this;function l(c){return f?(setTimeout(function(){f(void 0,c)},0),!0):c}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var i=t.length,s=e.length,u=1,d=i+s;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var a=[{newPos:-1,components:[]}],p=this.extractCommon(a[0],t,e,0);if(a[0].newPos+1>=i&&p+1>=s)return l([{value:this.join(t),count:t.length}]);function v(){for(var c=-1*u;c<=u;c+=2){var h=void 0,w=a[c-1],C=a[c+1],g=(C?C.newPos:0)-c;w&&(a[c-1]=void 0);var q=w&&w.newPos+1<i,$=C&&0<=g&&g<s;if(!q&&!$){a[c]=void 0;continue}if(!q||$&&w.newPos<C.newPos?(h=k(C),r.pushComponent(h.components,void 0,!0)):(h=w,h.newPos++,r.pushComponent(h.components,!0,void 0)),g=r.extractCommon(h,t,e,c),h.newPos+1>=i&&g+1>=s)return l(M(r,h.components,t,e,r.useLongestToken));a[c]=h}u++}if(f)(function c(){setTimeout(function(){if(u>d)return f();v()||c()},0)})();else for(;u<=d;){var y=v();if(y)return y}},pushComponent:function(e,t,o){var f=e[e.length-1];f&&f.added===t&&f.removed===o?e[e.length-1]={count:f.count+1,added:t,removed:o}:e.push({count:1,added:t,removed:o})},extractCommon:function(e,t,o,f){for(var r=t.length,l=o.length,i=e.newPos,s=i-f,u=0;i+1<r&&s+1<l&&this.equals(t[i+1],o[s+1]);)i++,s++,u++;return u&&e.components.push({count:u}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],o=0;o<e.length;o++)e[o]&&t.push(e[o]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function M(n,e,t,o,f){for(var r=0,l=e.length,i=0,s=0;r<l;r++){var u=e[r];if(u.removed){if(u.value=n.join(o.slice(s,s+u.count)),s+=u.count,r&&e[r-1].added){var a=e[r-1];e[r-1]=e[r],e[r]=a}}else{if(!u.added&&f){var d=t.slice(i,i+u.count);d=d.map(function(v,y){var c=o[s+y];return c.length>v.length?c:v}),u.value=n.join(d)}else u.value=n.join(t.slice(i,i+u.count));i+=u.count,u.added||(s+=u.count)}}var p=e[l-1];return l>1&&typeof p.value=="string"&&(p.added||p.removed)&&n.equals("",p.value)&&(e[l-2].value+=p.value,e.pop()),e}function k(n){return{newPos:n.newPos,components:n.components.slice(0)}}var I=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,T=/\S/,O=new m;O.equals=function(n,e){return this.options.ignoreCase&&(n=n.toLowerCase(),e=e.toLowerCase()),n===e||this.options.ignoreWhitespace&&!T.test(n)&&!T.test(e)};O.tokenize=function(n){for(var e=n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;t<e.length-1;t++)!e[t+1]&&e[t+2]&&I.test(e[t])&&I.test(e[t+2])&&(e[t]+=e[t+2],e.splice(t+1,2),t--);return e};var D=new m;D.tokenize=function(n){var e=[],t=n.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var o=0;o<t.length;o++){var f=t[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=f:(this.options.ignoreWhitespace&&(f=f.trim()),e.push(f))}return e};function Z(n,e,t){return D.diff(n,e,t)}var G=new m;G.tokenize=function(n){return n.split(/(\S.+?[.!?])(?=\s+|$)/)};var H=new m;H.tokenize=function(n){return n.split(/([{}:;,]|\s+)/)};function z(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?z=function(e){return typeof e}:z=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(n)}var Q=Object.prototype.toString,L=new m;L.useLongestToken=!0;L.tokenize=D.tokenize;L.castInput=function(n){var e=this.options,t=e.undefinedReplacement,o=e.stringifyReplacer,f=o===void 0?function(r,l){return typeof l>"u"?t:l}:o;return typeof n=="string"?n:JSON.stringify(E(n,null,null,f),f," ")};L.equals=function(n,e){return m.prototype.equals.call(L,n.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function E(n,e,t,o,f){e=e||[],t=t||[],o&&(n=o(f,n));var r;for(r=0;r<e.length;r+=1)if(e[r]===n)return t[r];var l;if(Q.call(n)==="[object Array]"){for(e.push(n),l=new Array(n.length),t.push(l),r=0;r<n.length;r+=1)l[r]=E(n[r],e,t,o,f);return e.pop(),t.pop(),l}if(n&&n.toJSON&&(n=n.toJSON()),z(n)==="object"&&n!==null){e.push(n),l={},t.push(l);var i=[],s;for(s in n)n.hasOwnProperty(s)&&i.push(s);for(i.sort(),r=0;r<i.length;r+=1)s=i[r],l[s]=E(n[s],e,t,o,s);e.pop(),t.pop()}else l=n;return l}var x=new m;x.tokenize=function(n){return n.slice()};x.join=x.removeEmpty=function(n){return n};const Y=_({__name:"CodeDiff",props:{from:{},to:{},lang:{}},setup(n){const e=n;function t(i,s){const u=Z(i.trim(),s.trim()),d=[],a=[],p=[];for(const v of u){const y=v.value.trimEnd().split(`
|
|
2
2
|
`);for(const c of y)v.added?(d.push(p.length),p.push(c)):(v.removed&&a.push(p.length),p.push(c))}return{added:d,removed:a,result:p.join(`
|
|
3
3
|
`)}}const o=N(()=>t(e.from,e.to));function f(i){let s=0;return i.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,u=>(s++,o.value.added.includes(s-1)?'class="line line-added"':o.value.removed.includes(s-1)?'class="line line-removed"':u))}const r=F();W(l);function l(){const i=A(r);i&&i.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(i,s)=>{const u=R;return B(),J(u,{ref_key:"elRef",ref:r,code:V(o).result,lang:i.lang,"transform-rendered":f,onLoaded:l},null,8,["code","lang"])}}});export{Y as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as I}from"./NMarkdown.vue.
|
|
1
|
+
import{_ as I}from"./NMarkdown.vue.52b3ce56.js";import{d as V,e as D,a8 as U,a as c,am as $,o as s,h as r,j as i,k as o,p as l,i as j,f as e,v as u,m as _,F as v,t as h,n as E,G as F,_ as S}from"./entry.9effa704.js";import{_ as z}from"./FilepathItem.vue.66158bcd.js";import{C as k}from"./constants.4e5eba24.js";const G={"hover:text-primary":""},L={key:0,"text-primary":""},M={"max-w-100":""},O={px4:"",py3:"","text-sm":""},T={flex:"~ gap2",n:"primary xs"},W={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},q={"text-sm":""},A=o("span",{op50:""},"It has been referenced ",-1),H={"text-primary":""},J=o("span",{op50:""}," times by:",-1),K={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},P={key:1,"text-sm":"",op50:""},Z=V({__name:"ComposableItem",props:{item:{},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(x){const t=x,b=D(),g=U(),m=c(()=>t.item.as||t.item.name),n=c(()=>t.metadata?.injectionUsage?.[m.value]?.count||0),C=c(()=>(t.metadata?.injectionUsage?.[m.value]?.moduleIds||[]).filter(a=>!a.endsWith("?macro=true"))),y=c(()=>{if(t.item.meta?.docsUrl)return t.item.meta.docsUrl;if(["nuxt","#app","nuxt3"].includes(t.item.from))return k.nuxt[t.item.name];if(t.item.from==="vue")return k.vue[t.item.name]});return(a,p)=>{const w=I,f=S,N=z,B=$("VDropdown");return s(),r(B,{disabled:!t.metadata},{popper:i(()=>[o("div",M,[o("div",O,[a.item.meta?.description?(s(),r(w,{key:0,tag:"div",pb3:"","text-sm":"",markdown:a.item.meta.description},null,8,["markdown"])):l("",!0),o("div",T,[j(f,{icon:"carbon-copy",onClick:p[0]||(p[0]=d=>e(b)(e(m)))},{default:i(()=>[u(" Copy ")]),_:1}),a.filepath?(s(),r(f,{key:0,icon:"carbon-code",onClick:p[1]||(p[1]=d=>a.filepath&&e(g)(a.filepath))},{default:i(()=>[u(" Source ")]),_:1})):l("",!0),e(y)?(s(),r(f,{key:1,icon:"carbon-catalog",to:e(y),target:"_blank"},{default:i(()=>[u(" Docs ")]),_:1},8,["to"])):l("",!0)])]),o("div",W,[e(n)?(s(),_(v,{key:0},[o("div",q,[A,o("strong",H,h(e(n)),1),J]),o("div",K,[(s(!0),_(v,null,E(e(C),d=>(s(),r(N,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),_("div",P," Not in use via auto import. "))])])]),default:i(()=>[o("button",G,[o("code",{rounded:"","font-mono":"",class:F([a.metadata&&!e(n)?"op30 hover:op100":"",a.classes])},[u(h(e(m))+" ",1),e(n)&&a.counter?(s(),_("sup",L,"x"+h(e(n)),1)):l("",!0)],2)])]),_:1},8,["disabled"])}}});export{Z as _};
|
package/dist/client/_nuxt/{DataSchemaButton.vue.125423b7.js → DataSchemaButton.vue.65a9244c.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,u as s,
|
|
1
|
+
import{d as r,u as s,ab as c,I as i,o as p,h as _,_ as u}from"./entry.9effa704.js";const f=r({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(l){const t=s();return(n,e)=>{const o=u,a=c("tooltip");return i((p(),_(o,{title:"Generate Data Schema",icon:"carbon:container-services",border:!1,onClick:e[0]||(e[0]=m=>t.value=n.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{f as _};
|