@nuxt/devtools 2.2.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -3
- package/dist/chunks/module-main.mjs +125 -26
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +24 -24
- package/dist/client/404.html +24 -24
- package/dist/client/_nuxt/__blank-mlfs714t.js +1 -0
- package/dist/client/_nuxt/analyze-build-o6948dlp.js +1 -0
- package/dist/client/_nuxt/assets-fc8kk69n.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/20291db0-158a-4546-9c85-d3d4300c08ae.json +1 -0
- package/dist/client/_nuxt/{client-gsjyqe32.js → client-bqg1k5yt.js} +1 -1
- package/dist/client/_nuxt/{code-diff.vue-cmobgah0.js → code-diff.vue-wlkcn0ij.js} +3 -3
- package/dist/client/_nuxt/{code-snippets.vue-kiughdhz.js → code-snippets.vue-nnusc3m1.js} +1 -1
- package/dist/client/_nuxt/color-mt9xuhgy.js +1 -0
- package/dist/client/_nuxt/components-dnigdvlk.js +1 -0
- package/dist/client/_nuxt/composable-item.vue-hcm2n3uw.js +1 -0
- package/dist/client/_nuxt/custom-_name_-lea3ahcj.js +1 -0
- package/dist/client/_nuxt/{data-schema-button.vue-j12zu5ly.js → data-schema-button.vue-dgj05cxb.js} +1 -1
- package/dist/client/_nuxt/{data-schema-drawer-c0s8h2rf.js → data-schema-drawer-b6p6fr6f.js} +2 -2
- package/dist/client/_nuxt/debug-l9iw9jsl.js +1 -0
- package/dist/client/_nuxt/{default-gc7ie9i4.js → default-0qldsilx.js} +1 -1
- package/dist/client/_nuxt/duration-display.vue-lb5nc1xj.js +1 -0
- package/dist/client/_nuxt/entry.css-n6hiodwz.css +1 -0
- package/dist/client/_nuxt/{error-404-dlnouvoa.js → error-404-dw25cf31.js} +1 -1
- package/dist/client/_nuxt/error-404.css-k9d8ozcm.css +1 -0
- package/dist/client/_nuxt/{error-500-nwpcih6s.js → error-500-my62qy53.js} +1 -1
- package/dist/client/_nuxt/error-500.css-kolntf6l.css +1 -0
- package/dist/client/_nuxt/{error-n1d3rwvz.js → error-kr6ygqpy.js} +4 -4
- package/dist/client/_nuxt/{filepath-item.vue-csqbsvc3.js → filepath-item.vue-fd1zdt53.js} +1 -1
- package/dist/client/_nuxt/full-lau7d2fq.js +1 -0
- package/dist/client/_nuxt/{help-fab.vue-d99t6zdw.js → help-fab.vue-ob0qjvk7.js} +1 -1
- package/dist/client/_nuxt/hooks-duc6okah.js +1 -0
- package/dist/client/_nuxt/imports-cnlswbzv.js +1 -0
- package/dist/client/_nuxt/{index-izwizeyn.js → index-oskeiuxt.js} +1 -1
- package/dist/client/_nuxt/kvwmbylm.js +15 -0
- package/dist/client/_nuxt/launch-page.vue-nmjrqgea.js +1 -0
- package/dist/client/_nuxt/modules-jlynnmc3.js +1 -0
- package/dist/client/_nuxt/nbadge-njv6jhyo.js +1 -0
- package/dist/client/_nuxt/ncheckbox.vue-g4ghknbn.js +1 -0
- package/dist/client/_nuxt/ncode-block.vue-h2q9yyre.js +2 -0
- package/dist/client/_nuxt/{ndrawer.vue-m60bsg9x.js → ndrawer.vue-d58cjy0i.js} +1 -1
- package/dist/client/_nuxt/{ndropdown.vue-e8of1w4q.js → ndropdown.vue-hod8tej8.js} +1 -1
- package/dist/client/_nuxt/{nicon-title.vue-dsf9ygne.js → nicon-title.vue-oyhtd7jm.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-msx1bzvo.js → nlink.vue-hf7re1rn.js} +1 -1
- package/dist/client/_nuxt/nmarkdown.vue-io3ubke7.js +1 -0
- package/dist/client/_nuxt/nnavbar.vue-nqx0vxgx.js +1 -0
- package/dist/client/_nuxt/none-l9dnfz1g.js +1 -0
- package/dist/client/_nuxt/nsection-block-b5ox8weq.js +1 -0
- package/dist/client/_nuxt/nselect-tabs.vue-kce1z6go.js +1 -0
- package/dist/client/_nuxt/{nselect.vue-cwn1habi.js → nselect.vue-d6y2loab.js} +1 -1
- package/dist/client/_nuxt/{nswitch.vue-jbyu7ls8.js → nswitch.vue-fl7pkx4a.js} +1 -1
- package/dist/client/_nuxt/{open-graph-efd91aeh.js → open-graph-kjrergv9.js} +2 -2
- package/dist/client/_nuxt/{overview-b0jfropt.js → overview-e5oab66c.js} +1 -1
- package/dist/client/_nuxt/pages-o9m20tol.js +1 -0
- package/dist/client/_nuxt/{payload-nzogw6cx.js → payload-kye3mqim.js} +1 -1
- package/dist/client/_nuxt/pinia-jh2ui16k.js +1 -0
- package/dist/client/_nuxt/plugins-od29606e.js +1 -0
- package/dist/client/_nuxt/render-tree-c85w7f8g.js +1 -0
- package/dist/client/_nuxt/{runtime-configs-iwo02vae.js → runtime-configs-gzn1lbwe.js} +1 -1
- package/dist/client/_nuxt/server-discovery-hojt1s3k.js +1 -0
- package/dist/client/_nuxt/{server-route-inputs.vue-ouiap82r.js → server-route-inputs.vue-e2xp979g.js} +1 -1
- package/dist/client/_nuxt/server-routes-n5xn8rel.js +9 -0
- package/dist/client/_nuxt/server-tasks-if1rfb26.js +1 -0
- package/dist/client/_nuxt/settings-jzkg1swh.js +1 -0
- package/dist/client/_nuxt/stacktrace-list.vue-gmd7fzml.js +1 -0
- package/dist/client/_nuxt/{state-components-iu73pb63.js → state-components-jpzjqlfw.js} +1 -1
- package/dist/client/_nuxt/state-editor.vue-lnhqkmb1.js +1 -0
- package/dist/client/_nuxt/state-modules-l0rued1s.js +1 -0
- package/dist/client/_nuxt/storage-muwnw6ww.js +1 -0
- package/dist/client/_nuxt/terminals-mzadk7wd.js +1 -0
- package/dist/client/_nuxt/timeline-ezsq4bra.js +31 -0
- package/dist/client/_nuxt/timeline.css-pdb8jvzb.css +1 -0
- package/dist/client/_nuxt/{unocss-runtime-l2otbg6e.js → unocss-runtime-bag0aauk.js} +1 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-huf8dypo.js +3846 -0
- package/dist/client/_nuxt/vendor/quicktype-core-klbd9u2j.js +1007 -0
- package/dist/client/_nuxt/vendor/{shiki-kdj4mcqm.js → shiki-jv02kgzv.js} +55 -54
- package/dist/client/_nuxt/vendor/{unocss-mvzv9iuf.js → unocss-e7oqigho.js} +2 -2
- package/dist/client/_nuxt/virtual-files-jdb2jga6.js +1 -0
- package/dist/client/_nuxt/vue-devtools-l332du22.js +2 -0
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-gnguvd0a.js → vue-virtual-scroller.esm-bjuzk3oj.js} +2 -2
- package/dist/client/index.html +24 -24
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/shared/{devtools.60b2ba4d.mjs → devtools.c069f83f.mjs} +2 -2
- package/package.json +20 -22
- package/dist/client/_nuxt/__blank-o25h0hkz.js +0 -1
- package/dist/client/_nuxt/analyze-build-h1qtv94t.js +0 -1
- package/dist/client/_nuxt/assets-oebtr6sn.js +0 -16
- package/dist/client/_nuxt/builds/meta/917012c8-846d-4264-bce5-f9be7333c9da.json +0 -1
- package/dist/client/_nuxt/components-jia8wtb3.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-gfbdvk92.js +0 -1
- package/dist/client/_nuxt/custom-_name_-m80m298x.js +0 -1
- package/dist/client/_nuxt/duration-display.vue-h9mqvgci.js +0 -1
- package/dist/client/_nuxt/entry.css-jfo9gib8.css +0 -1
- package/dist/client/_nuxt/error-404.css-cyoi3t2n.css +0 -1
- package/dist/client/_nuxt/error-500.css-c3osv0mr.css +0 -1
- package/dist/client/_nuxt/full-3l6dimb1.js +0 -1
- package/dist/client/_nuxt/hooks-jk04ky26.js +0 -1
- package/dist/client/_nuxt/imports-dqjyu7ow.js +0 -1
- package/dist/client/_nuxt/launch-page.vue-b5znlr95.js +0 -1
- package/dist/client/_nuxt/modules-ftim9y66.js +0 -1
- package/dist/client/_nuxt/n2dc525b.js +0 -17
- package/dist/client/_nuxt/nbadge-htrvttst.js +0 -1
- package/dist/client/_nuxt/ncheckbox.vue-m6od5ntc.js +0 -1
- package/dist/client/_nuxt/ncode-block.vue-bir2wz4z.js +0 -2
- package/dist/client/_nuxt/nmarkdown.vue-iw2voruc.js +0 -1
- package/dist/client/_nuxt/nnavbar.vue-mt44hnfg.js +0 -1
- package/dist/client/_nuxt/none-fqfjn9dv.js +0 -1
- package/dist/client/_nuxt/nsection-block-blzeji2j.js +0 -1
- package/dist/client/_nuxt/nselect-tabs.vue-eewrxxrw.js +0 -1
- package/dist/client/_nuxt/pages-owmi8y1w.js +0 -1
- package/dist/client/_nuxt/pinia-h28kc7st.js +0 -1
- package/dist/client/_nuxt/plugins-cvrrxd2o.js +0 -1
- package/dist/client/_nuxt/render-tree-f4btmb99.js +0 -1
- package/dist/client/_nuxt/server-discovery-kduvqt6t.js +0 -1
- package/dist/client/_nuxt/server-routes-otulhw4o.js +0 -9
- package/dist/client/_nuxt/server-tasks-fb19xaov.js +0 -1
- package/dist/client/_nuxt/settings-m340011e.js +0 -1
- package/dist/client/_nuxt/stacktrace-list.vue-jk5kvmxj.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-ccl909mt.js +0 -1
- package/dist/client/_nuxt/state-modules-mc97lhwd.js +0 -1
- package/dist/client/_nuxt/storage-jl97i4lz.js +0 -1
- package/dist/client/_nuxt/terminals-hicd7c09.js +0 -1
- package/dist/client/_nuxt/timeline-d6b5hxwa.js +0 -31
- package/dist/client/_nuxt/timeline.css-lhkpu01p.css +0 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-llkaejaf.js +0 -3819
- package/dist/client/_nuxt/vendor/quicktype-core-o2aektoq.js +0 -1006
- package/dist/client/_nuxt/virtual-files-kopy8ufw.js +0 -1
- package/dist/client/_nuxt/vue-devtools-nhi1fp41.js +0 -2
package/README.md
CHANGED
|
@@ -25,9 +25,6 @@ Unleash Nuxt Developer Experience.
|
|
|
25
25
|
|
|
26
26
|
<br>
|
|
27
27
|
|
|
28
|
-
> [!NOTE]
|
|
29
|
-
> You are viewing the v2.x branch which are in active development. For the latest stable version, please refer to the [v1.x branch](https://github.com/nuxt/devtools/tree/v1)
|
|
30
|
-
|
|
31
28
|
## Installation
|
|
32
29
|
|
|
33
30
|
> Nuxt DevTools v2 requires **Nuxt v3.15.0 or higher**.
|
|
@@ -6,7 +6,7 @@ import { colors } from 'consola/utils';
|
|
|
6
6
|
import { join, dirname as dirname$1, resolve, isAbsolute } from 'pathe';
|
|
7
7
|
import sirv from 'sirv';
|
|
8
8
|
import { searchForWorkspaceRoot } from 'vite';
|
|
9
|
-
import { d as defaultAllowedExtensions, a as defaultTabOptions, W as WS_EVENT_NAME } from '../shared/devtools.
|
|
9
|
+
import { d as defaultAllowedExtensions, a as defaultTabOptions, W as WS_EVENT_NAME } from '../shared/devtools.c069f83f.mjs';
|
|
10
10
|
import path, { dirname, join as join$1, relative, parse } from 'node:path';
|
|
11
11
|
import { hash } from 'ohash';
|
|
12
12
|
import { runtimeDir, clientDir, packageDir, isGlobalInstall } from '../dirs.mjs';
|
|
@@ -42,7 +42,7 @@ import __cjs_mod__ from 'module';
|
|
|
42
42
|
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
43
43
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
44
44
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
45
|
-
const version$1 = "2.
|
|
45
|
+
const version$1 = "2.3.1";
|
|
46
46
|
|
|
47
47
|
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
48
48
|
function randomStr(size = 16, dict = urlAlphabet) {
|
|
@@ -971,6 +971,7 @@ var
|
|
|
971
971
|
SCOPE_SUPER = 64,
|
|
972
972
|
SCOPE_DIRECT_SUPER = 128,
|
|
973
973
|
SCOPE_CLASS_STATIC_BLOCK = 256,
|
|
974
|
+
SCOPE_CLASS_FIELD_INIT = 512,
|
|
974
975
|
SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
|
975
976
|
|
|
976
977
|
function functionFlags(async, generator) {
|
|
@@ -1081,15 +1082,16 @@ Parser.prototype.parse = function parse () {
|
|
|
1081
1082
|
|
|
1082
1083
|
prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 };
|
|
1083
1084
|
|
|
1084
|
-
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0
|
|
1085
|
+
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 };
|
|
1085
1086
|
|
|
1086
|
-
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0
|
|
1087
|
+
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 };
|
|
1087
1088
|
|
|
1088
1089
|
prototypeAccessors.canAwait.get = function () {
|
|
1089
1090
|
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1092
|
-
if (
|
|
1091
|
+
var ref = this.scopeStack[i];
|
|
1092
|
+
var flags = ref.flags;
|
|
1093
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT)) { return false }
|
|
1094
|
+
if (flags & SCOPE_FUNCTION) { return (flags & SCOPE_ASYNC) > 0 }
|
|
1093
1095
|
}
|
|
1094
1096
|
return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction
|
|
1095
1097
|
};
|
|
@@ -1097,8 +1099,7 @@ prototypeAccessors.canAwait.get = function () {
|
|
|
1097
1099
|
prototypeAccessors.allowSuper.get = function () {
|
|
1098
1100
|
var ref = this.currentThisScope();
|
|
1099
1101
|
var flags = ref.flags;
|
|
1100
|
-
|
|
1101
|
-
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod
|
|
1102
|
+
return (flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod
|
|
1102
1103
|
};
|
|
1103
1104
|
|
|
1104
1105
|
prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };
|
|
@@ -1106,10 +1107,13 @@ prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThis
|
|
|
1106
1107
|
prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };
|
|
1107
1108
|
|
|
1108
1109
|
prototypeAccessors.allowNewDotTarget.get = function () {
|
|
1109
|
-
var
|
|
1110
|
-
var
|
|
1111
|
-
|
|
1112
|
-
|
|
1110
|
+
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
|
1111
|
+
var ref = this.scopeStack[i];
|
|
1112
|
+
var flags = ref.flags;
|
|
1113
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) ||
|
|
1114
|
+
((flags & SCOPE_FUNCTION) && !(flags & SCOPE_ARROW))) { return true }
|
|
1115
|
+
}
|
|
1116
|
+
return false
|
|
1113
1117
|
};
|
|
1114
1118
|
|
|
1115
1119
|
prototypeAccessors.inClassStaticBlock.get = function () {
|
|
@@ -2036,11 +2040,9 @@ pp$8.parseClassField = function(field) {
|
|
|
2036
2040
|
|
|
2037
2041
|
if (this.eat(types$1.eq)) {
|
|
2038
2042
|
// To raise SyntaxError if 'arguments' exists in the initializer.
|
|
2039
|
-
|
|
2040
|
-
var inClassFieldInit = scope.inClassFieldInit;
|
|
2041
|
-
scope.inClassFieldInit = true;
|
|
2043
|
+
this.enterScope(SCOPE_CLASS_FIELD_INIT | SCOPE_SUPER);
|
|
2042
2044
|
field.value = this.parseMaybeAssign();
|
|
2043
|
-
|
|
2045
|
+
this.exitScope();
|
|
2044
2046
|
} else {
|
|
2045
2047
|
field.value = null;
|
|
2046
2048
|
}
|
|
@@ -2182,6 +2184,8 @@ pp$8.parseExport = function(node, exports) {
|
|
|
2182
2184
|
{ this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
|
|
2183
2185
|
node.specifiers = [];
|
|
2184
2186
|
node.source = null;
|
|
2187
|
+
if (this.options.ecmaVersion >= 16)
|
|
2188
|
+
{ node.attributes = []; }
|
|
2185
2189
|
} else { // export { x, y as z } [from '...']
|
|
2186
2190
|
node.declaration = null;
|
|
2187
2191
|
node.specifiers = this.parseExportSpecifiers(exports);
|
|
@@ -2205,6 +2209,8 @@ pp$8.parseExport = function(node, exports) {
|
|
|
2205
2209
|
}
|
|
2206
2210
|
|
|
2207
2211
|
node.source = null;
|
|
2212
|
+
if (this.options.ecmaVersion >= 16)
|
|
2213
|
+
{ node.attributes = []; }
|
|
2208
2214
|
}
|
|
2209
2215
|
this.semicolon();
|
|
2210
2216
|
}
|
|
@@ -3784,9 +3790,10 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
|
|
3784
3790
|
};
|
|
3785
3791
|
|
|
3786
3792
|
pp$5.parseGetterSetter = function(prop) {
|
|
3787
|
-
|
|
3793
|
+
var kind = prop.key.name;
|
|
3788
3794
|
this.parsePropertyName(prop);
|
|
3789
3795
|
prop.value = this.parseMethod(false);
|
|
3796
|
+
prop.kind = kind;
|
|
3790
3797
|
var paramCount = prop.kind === "get" ? 0 : 1;
|
|
3791
3798
|
if (prop.value.params.length !== paramCount) {
|
|
3792
3799
|
var start = prop.value.start;
|
|
@@ -3809,9 +3816,9 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
3809
3816
|
prop.kind = "init";
|
|
3810
3817
|
} else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
|
|
3811
3818
|
if (isPattern) { this.unexpected(); }
|
|
3812
|
-
prop.kind = "init";
|
|
3813
3819
|
prop.method = true;
|
|
3814
3820
|
prop.value = this.parseMethod(isGenerator, isAsync);
|
|
3821
|
+
prop.kind = "init";
|
|
3815
3822
|
} else if (!isPattern && !containsEsc &&
|
|
3816
3823
|
this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
|
|
3817
3824
|
(prop.key.name === "get" || prop.key.name === "set") &&
|
|
@@ -3823,7 +3830,6 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
3823
3830
|
this.checkUnreserved(prop.key);
|
|
3824
3831
|
if (prop.key.name === "await" && !this.awaitIdentPos)
|
|
3825
3832
|
{ this.awaitIdentPos = startPos; }
|
|
3826
|
-
prop.kind = "init";
|
|
3827
3833
|
if (isPattern) {
|
|
3828
3834
|
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
|
|
3829
3835
|
} else if (this.type === types$1.eq && refDestructuringErrors) {
|
|
@@ -3833,6 +3839,7 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
3833
3839
|
} else {
|
|
3834
3840
|
prop.value = this.copyNode(prop.key);
|
|
3835
3841
|
}
|
|
3842
|
+
prop.kind = "init";
|
|
3836
3843
|
prop.shorthand = true;
|
|
3837
3844
|
} else { this.unexpected(); }
|
|
3838
3845
|
};
|
|
@@ -4008,7 +4015,7 @@ pp$5.checkUnreserved = function(ref) {
|
|
|
4008
4015
|
{ this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); }
|
|
4009
4016
|
if (this.inAsync && name === "await")
|
|
4010
4017
|
{ this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); }
|
|
4011
|
-
if (this.currentThisScope().
|
|
4018
|
+
if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments")
|
|
4012
4019
|
{ this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); }
|
|
4013
4020
|
if (this.inClassStaticBlock && (name === "arguments" || name === "await"))
|
|
4014
4021
|
{ this.raise(start, ("Cannot use " + name + " in class static initialization block")); }
|
|
@@ -4121,6 +4128,9 @@ var pp$4 = Parser.prototype;
|
|
|
4121
4128
|
pp$4.raise = function(pos, message) {
|
|
4122
4129
|
var loc = getLineInfo(this.input, pos);
|
|
4123
4130
|
message += " (" + loc.line + ":" + loc.column + ")";
|
|
4131
|
+
if (this.sourceFile) {
|
|
4132
|
+
message += " in " + this.sourceFile;
|
|
4133
|
+
}
|
|
4124
4134
|
var err = new SyntaxError(message);
|
|
4125
4135
|
err.pos = pos; err.loc = loc; err.raisedAt = this.pos;
|
|
4126
4136
|
throw err
|
|
@@ -4144,8 +4154,6 @@ var Scope = function Scope(flags) {
|
|
|
4144
4154
|
this.lexical = [];
|
|
4145
4155
|
// A list of lexically-declared FunctionDeclaration names in the current lexical scope
|
|
4146
4156
|
this.functions = [];
|
|
4147
|
-
// A switch to disallow the identifier reference 'arguments'
|
|
4148
|
-
this.inClassFieldInit = false;
|
|
4149
4157
|
};
|
|
4150
4158
|
|
|
4151
4159
|
// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
|
|
@@ -4215,7 +4223,7 @@ pp$3.currentScope = function() {
|
|
|
4215
4223
|
pp$3.currentVarScope = function() {
|
|
4216
4224
|
for (var i = this.scopeStack.length - 1;; i--) {
|
|
4217
4225
|
var scope = this.scopeStack[i];
|
|
4218
|
-
if (scope.flags & SCOPE_VAR) { return scope }
|
|
4226
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK)) { return scope }
|
|
4219
4227
|
}
|
|
4220
4228
|
};
|
|
4221
4229
|
|
|
@@ -4223,7 +4231,8 @@ pp$3.currentVarScope = function() {
|
|
|
4223
4231
|
pp$3.currentThisScope = function() {
|
|
4224
4232
|
for (var i = this.scopeStack.length - 1;; i--) {
|
|
4225
4233
|
var scope = this.scopeStack[i];
|
|
4226
|
-
if (scope.flags & SCOPE_VAR
|
|
4234
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) &&
|
|
4235
|
+
!(scope.flags & SCOPE_ARROW)) { return scope }
|
|
4227
4236
|
}
|
|
4228
4237
|
};
|
|
4229
4238
|
|
|
@@ -6577,7 +6586,7 @@ pp.readWord = function() {
|
|
|
6577
6586
|
// [walk]: util/walk.js
|
|
6578
6587
|
|
|
6579
6588
|
|
|
6580
|
-
var version = "8.14.
|
|
6589
|
+
var version = "8.14.1";
|
|
6581
6590
|
|
|
6582
6591
|
Parser.acorn = {
|
|
6583
6592
|
Parser: Parser,
|
|
@@ -10010,6 +10019,61 @@ async function resolveBuiltinPresets(presets) {
|
|
|
10010
10019
|
return resolved.flat();
|
|
10011
10020
|
}
|
|
10012
10021
|
|
|
10022
|
+
function toJsLiteral(value, seen = /* @__PURE__ */ new Set()) {
|
|
10023
|
+
if (value === null) {
|
|
10024
|
+
return "null";
|
|
10025
|
+
}
|
|
10026
|
+
if (typeof value === "undefined") {
|
|
10027
|
+
return "undefined";
|
|
10028
|
+
}
|
|
10029
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
10030
|
+
return String(value);
|
|
10031
|
+
}
|
|
10032
|
+
if (value instanceof RegExp) {
|
|
10033
|
+
return value.toString();
|
|
10034
|
+
}
|
|
10035
|
+
if (typeof value === "function") {
|
|
10036
|
+
if (value.name) {
|
|
10037
|
+
return `function ${value.name}() { /* code */ }`;
|
|
10038
|
+
}
|
|
10039
|
+
return "function () { /* code */ }";
|
|
10040
|
+
}
|
|
10041
|
+
if (typeof value === "string") {
|
|
10042
|
+
return JSON.stringify(value);
|
|
10043
|
+
}
|
|
10044
|
+
if (Array.isArray(value)) {
|
|
10045
|
+
if (seen.has(value)) {
|
|
10046
|
+
return "[Circular]";
|
|
10047
|
+
}
|
|
10048
|
+
seen.add(value);
|
|
10049
|
+
const elements = value.map((item) => toJsLiteral(item, seen));
|
|
10050
|
+
const content = elements.join(", ");
|
|
10051
|
+
return `[${content}]`;
|
|
10052
|
+
}
|
|
10053
|
+
if (typeof value === "object") {
|
|
10054
|
+
if (seen.has(value)) {
|
|
10055
|
+
return "{Circular}";
|
|
10056
|
+
}
|
|
10057
|
+
seen.add(value);
|
|
10058
|
+
const entries = [];
|
|
10059
|
+
for (const key of Object.keys(value)) {
|
|
10060
|
+
entries.push(`${safeKey(key)}: ${toJsLiteral(value[key], seen)}`);
|
|
10061
|
+
}
|
|
10062
|
+
if (entries.length === 0) {
|
|
10063
|
+
return "{}";
|
|
10064
|
+
}
|
|
10065
|
+
return `{ ${entries.join(", ")} }`;
|
|
10066
|
+
}
|
|
10067
|
+
return JSON.stringify(value);
|
|
10068
|
+
}
|
|
10069
|
+
function safeKey(key) {
|
|
10070
|
+
const validIdentifier = /^[a-z_$][\w$]*$/i;
|
|
10071
|
+
if (validIdentifier.test(key)) {
|
|
10072
|
+
return key;
|
|
10073
|
+
}
|
|
10074
|
+
return JSON.stringify(key);
|
|
10075
|
+
}
|
|
10076
|
+
|
|
10013
10077
|
let options;
|
|
10014
10078
|
function getOptions() {
|
|
10015
10079
|
return options;
|
|
@@ -10117,6 +10181,41 @@ function setupGeneralRPC({
|
|
|
10117
10181
|
app = v;
|
|
10118
10182
|
});
|
|
10119
10183
|
return {
|
|
10184
|
+
getServerConfig() {
|
|
10185
|
+
return nuxt.options;
|
|
10186
|
+
},
|
|
10187
|
+
async getServerDebugContext() {
|
|
10188
|
+
if (!nuxt._debug)
|
|
10189
|
+
return;
|
|
10190
|
+
return {
|
|
10191
|
+
...nuxt._debug,
|
|
10192
|
+
moduleMutationRecords: await Promise.all(
|
|
10193
|
+
nuxt._debug.moduleMutationRecords?.map(async (i) => {
|
|
10194
|
+
let value = i.value;
|
|
10195
|
+
try {
|
|
10196
|
+
const json = toJsLiteral(value);
|
|
10197
|
+
if (json.length > 200)
|
|
10198
|
+
value = `${json.slice(0, 200)}...`;
|
|
10199
|
+
else
|
|
10200
|
+
value = json;
|
|
10201
|
+
} catch {
|
|
10202
|
+
value = "[Circular]";
|
|
10203
|
+
}
|
|
10204
|
+
let name = (await i.module.getMeta?.())?.name;
|
|
10205
|
+
if (!name) {
|
|
10206
|
+
const installedModule = nuxt.options._installedModules.find((m) => m.module === i.module);
|
|
10207
|
+
name = installedModule?.meta.name || installedModule?.entryPath;
|
|
10208
|
+
}
|
|
10209
|
+
return {
|
|
10210
|
+
...i,
|
|
10211
|
+
module: void 0,
|
|
10212
|
+
name: name || "(unknown)",
|
|
10213
|
+
value
|
|
10214
|
+
};
|
|
10215
|
+
}) || []
|
|
10216
|
+
)
|
|
10217
|
+
};
|
|
10218
|
+
},
|
|
10120
10219
|
getServerRuntimeConfig() {
|
|
10121
10220
|
const ENV_PREFIX = "NITRO_";
|
|
10122
10221
|
const ENV_PREFIX_ALT = "NUXT_";
|
package/dist/chunks/vscode.mjs
CHANGED
package/dist/client/200.html
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<!DOCTYPE html><html
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
-
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-
|
|
3
|
+
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-n6hiodwz.css" crossorigin>
|
|
4
4
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css" crossorigin>
|
|
5
5
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin>
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
7
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-
|
|
8
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-
|
|
9
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/kvwmbylm.js">
|
|
7
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-huf8dypo.js">
|
|
8
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-e7oqigho.js">
|
|
9
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-jv02kgzv.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js">
|
|
11
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-
|
|
12
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-
|
|
13
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-
|
|
11
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-0qldsilx.js">
|
|
12
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-lau7d2fq.js">
|
|
13
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-l9dnfz1g.js">
|
|
14
14
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css">
|
|
15
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-
|
|
16
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-
|
|
17
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-
|
|
18
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-
|
|
19
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-
|
|
20
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-
|
|
22
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-
|
|
23
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-
|
|
24
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-
|
|
25
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-
|
|
26
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-
|
|
28
|
-
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
29
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"
|
|
15
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-b6p6fr6f.js">
|
|
16
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-d6y2loab.js">
|
|
17
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-fl7pkx4a.js">
|
|
18
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-hod8tej8.js">
|
|
19
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-h2q9yyre.js">
|
|
20
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-bqg1k5yt.js">
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-d58cjy0i.js">
|
|
22
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-klbd9u2j.js">
|
|
23
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-bag0aauk.js">
|
|
24
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-k9d8ozcm.css">
|
|
25
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-dw25cf31.js">
|
|
26
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-kolntf6l.css">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-my62qy53.js">
|
|
28
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/kvwmbylm.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1742438481200,false]</script>
|
|
29
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"20291db0-158a-4546-9c85-d3d4300c08ae",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<!DOCTYPE html><html
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
-
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-
|
|
3
|
+
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-n6hiodwz.css" crossorigin>
|
|
4
4
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css" crossorigin>
|
|
5
5
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin>
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
7
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-
|
|
8
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-
|
|
9
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/kvwmbylm.js">
|
|
7
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-huf8dypo.js">
|
|
8
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-e7oqigho.js">
|
|
9
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-jv02kgzv.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js">
|
|
11
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-
|
|
12
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-
|
|
13
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-
|
|
11
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-0qldsilx.js">
|
|
12
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-lau7d2fq.js">
|
|
13
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-l9dnfz1g.js">
|
|
14
14
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css">
|
|
15
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-
|
|
16
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-
|
|
17
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-
|
|
18
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-
|
|
19
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-
|
|
20
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-
|
|
22
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-
|
|
23
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-
|
|
24
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-
|
|
25
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-
|
|
26
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-
|
|
28
|
-
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
29
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"
|
|
15
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-b6p6fr6f.js">
|
|
16
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-d6y2loab.js">
|
|
17
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-fl7pkx4a.js">
|
|
18
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-hod8tej8.js">
|
|
19
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-h2q9yyre.js">
|
|
20
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-bqg1k5yt.js">
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-d58cjy0i.js">
|
|
22
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-klbd9u2j.js">
|
|
23
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-bag0aauk.js">
|
|
24
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-k9d8ozcm.css">
|
|
25
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-dw25cf31.js">
|
|
26
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-kolntf6l.css">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-my62qy53.js">
|
|
28
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/kvwmbylm.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1742438481201,false]</script>
|
|
29
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"20291db0-158a-4546-9c85-d3d4300c08ae",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as e,O as n,a0 as t}from"./vendor/json-editor-vue-huf8dypo.js";const a={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(o,s)=>(t(),n("div",a))}});export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b9 as J,ba as P,_ as R,r as S,E as j,aj as X,bb as h,a6 as ee,a7 as ne,Z as te,a1 as le,i as ie,bc as k,a8 as oe,Q as re,v as ue,q as se,M as ae}from"./kvwmbylm.js";import{_ as de}from"./filepath-item.vue-fd1zdt53.js";import{q as L,u as V,k as F,O as u,a0 as i,P as e,Q as g,F as p,ad as U,a2 as d,a7 as v,v as b,a1 as a,a8 as f,a9 as D,aa as I,W as E,R as B}from"./vendor/json-editor-vue-huf8dypo.js";import{_ as me}from"./ncode-block.vue-h2q9yyre.js";import{_ as pe}from"./ncheckbox.vue-g4ghknbn.js";import{_ as ve}from"./help-fab.vue-ob0qjvk7.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./client-bqg1k5yt.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ce={flex:"~ wrap","w-full":""},ye=["onClick"],be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},xe={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge="/__nuxt_devtools__/client",_e=L({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(N){const c=N,w=`${J().app.baseURL.replace(ge,"/")}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),y=V(()=>{const l=[{name:"Overview",id:"overview"}];return c.current.features.bundleClient&&l.push({name:"Client Bundle",id:"bundle-client"}),c.current.features.bundleNitro&&l.push({name:"Nitro Bundle",id:"bundle-nitro"}),c.current.features.viteInspect&&l.push({name:"Vite Inspect",id:"vite-inspect"}),l}),o=F(y.value[0]);function $(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}function m(l){return l<1024?`${l}B`:l<1024*1024?`${(l/1024).toFixed(1)}KB`:l<1024*1024*1024?`${(l/1024/1024).toFixed(1)}MB`:`${(l/1024/1024/1024).toFixed(1)}GB`}async function T(l){return S.clearAnalyzeBuilds(await j(),[l])}return(l,n)=>{const A=de,C=R;return i(),u("div",fe,[e("div",ce,[(i(!0),u(p,null,U(y.value,(r,t)=>(i(),u("button",{key:t,px4:"",py2:"",border:"r base",hover:"bg-active",class:E(r.id===o.value?.id?"":"border-b"),onClick:z=>o.value=r},[e("div",{class:E(r.id===o.value?.id?"":"op30")},v(r.name),3)],10,ye))),128)),n[1]||(n[1]=e("div",{border:"b base","flex-auto":""},null,-1))]),o.value?.id==="overview"?(i(),u("div",be,[n[15]||(n[15]=e("div",{"flex-auto":""},null,-1)),e("div",xe,[n[10]||(n[10]=e("div",{"i-carbon-commit":"","text-xl":""},null,-1)),e("div",null,[n[2]||(n[2]=e("div",{"text-sm":"",op50:""}," Name ",-1)),e("div",null,v(l.current.name),1)]),n[11]||(n[11]=e("div",{"i-carbon-time":"","text-xl":""},null,-1)),e("div",null,[n[3]||(n[3]=e("div",{"text-sm":"",op50:""}," Build duration ",-1)),e("div",null,v($(l.current)),1)]),l.current.size?.clientBundle?(i(),u(p,{key:0},[n[5]||(n[5]=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1)),e("div",null,[n[4]||(n[4]=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1)),e("div",null,v(m(l.current.size.clientBundle)),1)])],64)):g("",!0),l.current.size?.nitroBundle?(i(),u(p,{key:1},[n[7]||(n[7]=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1)),e("div",null,[n[6]||(n[6]=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1)),e("div",null,v(m(l.current.size.nitroBundle)),1)])],64)):g("",!0),n[12]||(n[12]=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1)),e("div",null,[n[8]||(n[8]=e("div",{"text-sm":"",op50:""}," Built ",-1)),e("div",null,v(b(P)(new Date(l.current.endTime))),1)]),n[13]||(n[13]=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1)),e("div",null,[n[9]||(n[9]=e("div",{"text-sm":"",op50:""}," Report Path ",-1)),d(A,{filepath:l.current.analyzeDir},null,8,["filepath"])])]),n[16]||(n[16]=e("div",{"flex-auto":""},null,-1)),d(C,{n:"rose",icon:"carbon-delete",onClick:n[0]||(n[0]=r=>T(l.current.name))},{default:a(()=>n[14]||(n[14]=[f(" Delete this report ")])),_:1})])):g("",!0),n._lazyshow1||o.value?.id==="bundle-client"?(n._lazyshow1=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-client"]])],64)):g("v-show-if",!0),n._lazyshow2||o.value?.id==="bundle-nitro"?(n._lazyshow2=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-nitro"]])],64)):g("v-show-if",!0),n._lazyshow3||o.value?.id==="vite-inspect"?(n._lazyshow3=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="vite-inspect"]])],64)):g("v-show-if",!0)])}}}),we={class:"markdown-body"},$e={__name:"analyze-build",setup(N,{expose:c}){return c({frontmatter:{}}),(w,y)=>(i(),u("div",we,y[0]||(y[0]=[e("h1",null,"Build Analyze",-1),e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1)])))}},ze={flex:"~ col"},Be=["onClick"],Ce={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},ke={flex:"~ items-center justify-center wrap",p4:""},Ne={flex:"~ col gap-1","w-250":"",p4:""},Te={flex:"~ gap-3",mt2:"","justify-end":""},je=L({__name:"analyze-build",setup(N){const c=X(),_=h(),w=ee(),y=ne("analyze-build:slug",""),o=V(()=>_.value?.builds.find(r=>r.slug===y.value)??_.value?.builds[0]),$=F(!1),m=F(""),T=V(()=>_.value?.builds.some(r=>r.name===m.value.trim()));async function l(){m.value=await S.generateAnalyzeBuildName(),await c.start()&&(ae("analyze-build:start"),k.value={name:m.value,processId:await S.startAnalyzeBuild(await j(),m.value)},$.value&&C())}const n=te();function A(r){return`${((r.endTime-r.startTime)/1e3).toFixed(1)}s`}function C(){k.value?.processId&&(n.value=k.value.processId,w.push("/modules/terminals"))}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:l}]),(r,t)=>{const z=R,G=_e,O=ie,q=oe,M=ue,Q=se,W=me,Z=pe,H=re,K=$e,Y=ve;return i(),u(p,null,[d(q,{"left-size":30},{left:a(()=>[e("div",ze,[(i(!0),u(p,null,U(b(_)?.builds,s=>(i(),u(p,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:E(s.slug===o.value?.slug?"text-primary bg-active":""),onClick:x=>y.value=s.slug},[e("code",null,v(s.name),1),e("div",Ce,[t[4]||(t[4]=e("div",{"i-carbon-time":""},null,-1)),e("span",null,v(A(s)),1),t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("span",null,v(b(P)(new Date(s.endTime))),1)])],10,Be),t[6]||(t[6]=e("div",{"x-divider":""},null,-1))],64))),128)),e("div",ke,[b(k)?(i(),B(z,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:t[1]||(t[1]=s=>C())},{default:a(()=>t[8]||(t[8]=[f(" Building... ")])),_:1})):(i(),B(z,{key:0,n:"primary",icon:"carbon-edge-node",onClick:t[0]||(t[0]=s=>l())},{default:a(()=>t[7]||(t[7]=[f(" Start a new build ")])),_:1}))])])]),right:a(()=>[o.value?(i(),B(G,{key:0,current:o.value},null,8,["current"])):(i(),B(O,{key:1}))]),_:1}),d(b(c),null,{default:a(({resolve:s})=>[d(H,{"model-value":!0,onClose:x=>s(!1)},{default:a(()=>[e("div",Ne,[t[13]||(t[13]=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1)),t[14]||(t[14]=e("p",{op50:""}," Enter the name of the build: ",-1)),d(M,{modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=x=>m.value=x),placeholder:"Build name"},null,8,["modelValue"]),T.value?(i(),B(Q,{key:0,"n-orange":""},{default:a(()=>t[9]||(t[9]=[f(" A build with the same name already exists, continue would overrides the previous build result. ")])),_:1})):g("",!0),t[15]||(t[15]=e("div",{my3:"","x-divider":""},null,-1)),t[16]||(t[16]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),d(W,{code:`npx nuxi analyze --no-serve --name=${m.value}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d(Z,{modelValue:$.value,"onUpdate:modelValue":t[3]||(t[3]=x=>$.value=x),mt2:"",n:"primary"},{default:a(()=>t[10]||(t[10]=[f(" Navigate to terminal ")])),_:1},8,["modelValue"]),e("div",Te,[d(z,{onClick:x=>s(!1)},{default:a(()=>t[11]||(t[11]=[f(" Cancel ")])),_:2},1032,["onClick"]),d(z,{n:"solid primary",onClick:x=>s(!0)},{default:a(()=>t[12]||(t[12]=[f(" Start ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),d(Y,null,{default:a(()=>[d(K)]),_:1})],64)}}});export{je as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{G as ee,H,_ as te,I as ne,J as R,K as ce,L as pe,M as me,r as W,E as Z,v as se,N as ve,O as fe,c as le,A as ge,a as he,w as xe,P as be,Q as we,R as _e,S as ye,T as $e,g as ke,U as Ce}from"./kvwmbylm.js";import{_ as Ve}from"./ncheckbox.vue-g4ghknbn.js";import{_ as Pe}from"./ndropdown.vue-hod8tej8.js";import{_ as Ae}from"./nnavbar.vue-nqx0vxgx.js";import{q as Q,k as T,af as oe,O as i,a0 as o,W as J,v as m,a9 as K,a2 as d,P as t,a8 as D,F as z,ad as G,R as V,Q as S,a1 as h,u as U,U as ae,a7 as N,S as De,j as Ne,aq as Fe,V as Se}from"./vendor/json-editor-vue-huf8dypo.js";import{_ as Ue}from"./nsection-block-b5ox8weq.js";import{_ as Ie}from"./filepath-item.vue-fd1zdt53.js";import{_ as Te}from"./code-snippets.vue-nnusc3m1.js";import{_ as je}from"./ndrawer.vue-d58cjy0i.js";import{D as Ee}from"./constants-b32h69zq.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./nicon-title.vue-oyhtd7jm.js";import"./ncode-block.vue-h2q9yyre.js";import"./client-bqg1k5yt.js";const Be={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Le={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},ze={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Oe={grid:"~ cols-minmax-8rem gap-8","overflow-auto":"",p6:""},Re={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Ke={flex:"~ gap1","items-center":""},qe={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ge=Q({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(L){const l=L,f=ee(l,"modelValue"),C=T(),n=T([]);function v(s){C.value=s.target,f.value=!0}function b(s){s.target===C.value&&(f.value=!1)}function j(s){s.preventDefault()}function P(s){s.preventDefault(),x(s.dataTransfer.files)}function x(s){const c=Array.from(s||[]);if(c.length){const g=[],_=n.value.map(u=>u.name);for(const u of c)if(_.includes(u.name)){let A=1;const[y,B]=u.name.split(".");for(;_.includes(`${y} (${A}).${B}`);)A++;const M=`${y}-${A}.${B}`,a=new Blob([u],{type:u.type}),e=new File([a],M,{lastModified:Date.now()});g.push(e),_.push(M)}else u.type===""&&R({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),g.push(u);n.value=[...n.value,...g]}}async function E(){if(ce.value||pe.value)return;me("assets:upload");const s=[];for(const c of n.value){const g=new FileReader;g.readAsDataURL(c);const u=(await new Promise(A=>{g.onload=()=>A(g.result)})).split(";base64,").pop();s.push({path:c.name,encoding:"base64",content:u})}await W.writeStaticAssets(await Z(),[...s],l.folder).then(()=>{p(),R({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(c=>{p(),R({message:`Error uploading files: ${c?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),f.value=!1}function q(s){n.value?.splice(s,1)}function O(s){return URL.createObjectURL(s)}function w(s,c){const[g,_]=s.name.split("."),u=c.replace(/\.\w+$/,""),A=`${u}.${_}`;return u.length===0?(alert("File name must be at least 1 characters long"),g):(Object.defineProperty(s,"name",{value:A,writable:!1}),n.value.splice(n.value.indexOf(s),1,s),s)}function r(){n.value=[]}function p(){f.value=!1,r()}return H("dragenter",v),H("dragleave",b),H("dragover",j),H("drop",P),(s,c)=>{const g=te,_=ne,u=se,A=oe("tooltip");return o(),i("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:J(m(f)?"opacity-100 visible":"opacity-0 invisible")},[K(d(g,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[A,"Close",void 0,{"bottom-end":!0}]]),n.value?.length?(o(),i("div",ze,[c[4]||(c[4]=t("div",{px6:"",py6:""},[t("h1",{"text-2xl":""}," Upload "),t("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1)),t("div",Oe,[(o(!0),i(z,null,G(n.value,(y,B)=>(o(),i("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[t("div",Re,[t("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:O(y)},null,8,Me)]),t("div",Ke,[d(u,{n:"xs","h-full":"","flex-auto":"","model-value":y.name,"onUpdate:modelValue":M=>w(y,M.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(g,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:M=>q(B)},null,8,["onClick"])])]))),128))]),t("div",qe,[n.value.length?(o(),V(g,{key:0,n:"red",onClick:r},{default:h(()=>[d(_,{icon:"carbon-clean"}),c[2]||(c[2]=D(" Clear "))]),_:1})):S("",!0),d(g,{disabled:!n.value.length,n:"primary solid",onClick:E},{default:h(()=>[d(_,{icon:"carbon-cloud-upload"}),c[3]||(c[3]=D(" Upload "))]),_:1},8,["disabled"])])])):(o(),i("div",Be,[t("label",Le,[d(_,{icon:"carbon-cloud-upload","mr-2":""}),c[1]||(c[1]=D(" Drop files here or click to select "))]),t("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=y=>x(y.target.files))},null,32)]))],2)}}}),Qe=Q({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,f=U(()=>`devtools-assets-${ve(l.asset)}`);return fe(U(()=>`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: '${f.value}';
|
|
4
|
+
src: url('${l.asset.publicPath}');
|
|
5
|
+
}
|
|
6
|
+
`)),(C,n)=>(o(),i("div",{"of-hidden":"",style:ae({fontFamily:`'${f.value}'`})}," Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz ",4))}}),We={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ze=["src"],He={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Je={key:3,"w-full":"","self-start":"",p4:""},Xe=["textContent"],Ye={key:4},et=["src","autoplay","controls"],tt={key:5},nt={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},ot=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=Q({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(L){return(l,f)=>{const C=Qe;return o(),i("div",We,[l.asset.type==="image"?(o(),i("img",{key:0,src:l.asset.publicPath},null,8,Ze)):l.asset.type==="font"?(o(),V(C,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(o(),i("div",He)):l.asset.type==="text"&&l.textContent?(o(),i("div",Je,[t("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:N(l.textContent)},null,8,Xe)])):l.asset.type==="video"?(o(),i("div",Ye,[t("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,et)])):l.asset.type==="audio"?(o(),i("div",tt,[l.detail?(o(),i("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,ot)):(o(),i("div",nt))])):(o(),i("div",lt))])}}}),st={relative:"",flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},at={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},it=Q({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(L){const l=L,f=U(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(C,n)=>{const v=ne,b=ie;return o(),i("button",st,[C.asset.layer?(o(),V(v,{key:0,icon:"i-carbon-layers",absolute:"","right-4":"","top-4":"","bg-primary":""})):S("",!0),d(b,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:C.asset},null,8,["asset"]),t("div",at,N(f.value),1)])}}}),re=Q({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(L,{emit:l}){const f=L,n=ee(f,"modelValue",l,{passive:!0}),v=U(()=>f.item?.children?.length),b=T(!0),j=U(()=>v.value?"i-carbon-folder":f.item.type==="image"?"i-carbon-image":f.item.type==="video"?"i-carbon-video":f.item.type==="audio"?"i-carbon-volume-up":f.item.type==="font"?"i-carbon-text-small-caps":f.item.type==="text"?"i-carbon-document":f.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(P,x)=>{const E=ne,q=re;return o(),i("div",null,[t("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:ae({paddingLeft:`calc(1rem + ${P.index*1.5}em)`}),class:J({"bg-active":!v.value&&m(n)?.filePath===P.item?.filePath}),border:"b base",onClick:x[0]||(x[0]=O=>v.value?b.value=!b.value:n.value=P.item)},[t("div",{class:J(j.value)},null,2),t("span",{class:J({"flex items-center":v.value}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},[D(N(P.item.path)+" ",1),P.item.layer?(o(),V(E,{key:0,icon:"i-carbon-layers","bg-primary":""})):S("",!0)],2),v.value?(o(),V(E,{key:0,icon:"carbon:chevron-right","transform-rotate":b.value?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),b.value?De(P.$slots,"default",{key:0},()=>[(o(!0),i(z,null,G(P.item?.children,O=>(o(),V(q,{key:O.filepath,modelValue:m(n),"onUpdate:modelValue":x[1]||(x[1]=w=>Ne(n)?n.value=w:null),item:O,index:P.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),rt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},ut={flex:"~","items-center":"","justify-center":""},dt={"max-w-full":"","w-full":"","table-fixed":""},ct={flex:"~ gap-1","w-full":"","items-center":""},pt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},mt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},vt={capitalize:""},ft={key:0},gt={op70:""},ht={flex:"~ gap2 wrap"},xt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},bt={flex:"~ gap2 wrap justify-center"},wt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},_t={flex:"~ gap2 wrap justify-center"},yt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},$t={flex:"","justify-end":"","gap-4":""},kt=Q({__name:"AssetDetails",props:{modelValue:{}},setup(L,{emit:l}){const n=ee(L,"modelValue",l,{passive:!0}),v=le(async()=>{if(n.value.type==="image")return W.getImageMeta(await Z(),n.value.filePath)}),b=T(!1),j=T(),P=T(0),x=le(async()=>{if(n.value.type!=="text")return;P.value;const a=await W.getTextAssetContent(await Z(),n.value.filePath);return j.value=a,a});async function E(){if(x.value!==j.value)try{await W.writeStaticAssets(await Z(),[{path:n.value.path,content:j.value,override:!0}],""),b.value=!1,P.value++,R({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const q=ge(),O=U(()=>(q.value?._installedModules||[]).some(e=>e.meta?.name==="@nuxt/image"||e.meta?.name==="@nuxt/image-edge"||e.meta?.name==="@nuxt/image-nightly")),w=U(()=>{const a=[];if(n.value.type==="image"){const e=v.value?.width?`
|
|
7
|
+
width="${v.value.width}"
|
|
8
|
+
height="${v.value.height}" `:" ";return a.push({lang:"vue-html",code:`<img${e}
|
|
9
|
+
src="${n.value.publicPath}"
|
|
10
|
+
/>`,name:"Plain Image"}),O.value&&a.push({lang:"vue-html",code:`<NuxtImg${e}
|
|
11
|
+
src="${n.value.publicPath}"
|
|
12
|
+
/>`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${e}
|
|
13
|
+
src="${n.value.publicPath}"
|
|
14
|
+
/>`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),a}return a.push({lang:"html",code:`<a download href="${n.value.publicPath}">
|
|
15
|
+
Download ${n.value.path.split("/").slice(-1)[0]}
|
|
16
|
+
</a>`,name:"Download link"}),a}),r=he(),p=xe(),s=be(()=>n.value.mtime),c=U(()=>{const a=n.value.size;return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(2)} KB`:`${(a/1024/1024).toFixed(2)} MB`}),g=U(()=>{if(!v.value?.width||!v.value?.height)return"";const a=($,I)=>I?a(I,$%I):$,e=a(v.value.width,v.value.height);return e>3?`${v.value.width/e}:${v.value.height/e}`:""}),_=U(()=>["image","text","video","audio","font"].includes(n.value.type)),u=T(!1);async function A(){try{await W.deleteStaticAsset(await Z(),n.value.filePath),n.value=void 0,u.value=!1,R({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const y=T(!1),B=T("");async function M(){const a=n.value.filePath.split("/"),e=a.slice(-1)[0].split(".").slice(0,-1).join(".");if(!B.value||B.value===e)return R({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const $=a.slice(-1)[0].split(".").slice(-1)[0],I=`${a.slice(0,-1).join("/")}/${B.value}.${$}`;await W.renameStaticAsset(await Z(),n.value.filePath,I),n.value=void 0,y.value=!1,R({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch($){console.error($),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(a,e)=>{const $=ie,I=Ie,F=te,ue=Te,X=we,de=se,Y=oe("tooltip");return o(),i(z,null,[t("div",rt,[_.value?(o(),i(z,{key:0},[e[13]||(e[13]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Preview "),t("div",{"x-divider":""})],-1)),t("div",ut,[d($,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:m(n),"text-content":m(x)},null,8,["asset","text-content"])])],64)):S("",!0),e[25]||(e[25]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Details "),t("div",{"x-divider":""})],-1)),t("table",dt,[t("tbody",null,[t("tr",null,[e[14]||(e[14]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1)),t("td",null,[t("div",ct,[d(I,{filepath:m(n).filePath,"text-left":""},null,8,["filepath"]),K(d(F,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:e[0]||(e[0]=k=>m(p)(m(n).filePath))},null,512),[[Y,"Open in Editor"]])])])]),t("tr",null,[e[15]||(e[15]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1)),t("td",null,[t("div",pt,[t("div",mt,N(m(n).publicPath),1),K(d(F,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:e[1]||(e[1]=k=>m(r)(m(n).publicPath,"assets-public-path"))},null,512),[[Y,"Copy public path"]]),K(d(F,{"flex-none":"",to:m(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Y,"Open in browser"]])])])]),t("tr",null,[e[16]||(e[16]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1)),t("td",vt,N(m(n).type),1)]),m(v)?.width?(o(),i(z,{key:0},[t("tr",null,[e[17]||(e[17]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1)),t("td",null,N(m(v).width)+" x "+N(m(v).height),1)]),g.value?(o(),i("tr",ft,[e[18]||(e[18]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1)),t("td",null,N(g.value),1)])):S("",!0)],64)):S("",!0),t("tr",null,[e[19]||(e[19]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1)),t("td",null,N(c.value),1)]),t("tr",null,[e[20]||(e[20]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1)),t("td",null,[D(N(new Date(m(n).mtime).toLocaleString())+" ",1),t("span",gt,"("+N(m(s))+")",1)])])])]),e[26]||(e[26]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Actions "),t("div",{"x-divider":""})],-1)),t("div",ht,[d(F,{to:m(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:h(()=>e[21]||(e[21]=[D(" Download ")])),_:1},8,["to"]),m(n).type==="text"?(o(),V(F,{key:0,icon:"carbon-edit",n:"cyan",onClick:e[2]||(e[2]=k=>b.value=!b.value)},{default:h(()=>e[22]||(e[22]=[D(" Edit ")])),_:1})):S("",!0),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:e[3]||(e[3]=k=>y.value=!y.value)},{default:h(()=>e[23]||(e[23]=[D(" Rename ")])),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:e[4]||(e[4]=k=>u.value=!u.value)},{default:h(()=>e[24]||(e[24]=[D(" Delete ")])),_:1})]),e[27]||(e[27]=t("div",{"flex-auto":""},null,-1)),w.value.length?(o(),V(ue,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":w.value},null,8,["code-snippets"])):S("",!0)]),d(X,{modelValue:u.value,"onUpdate:modelValue":e[6]||(e[6]=k=>u.value=k)},{default:h(()=>[t("div",xt,[e[30]||(e[30]=t("span",null," Are you sure you want to delete this asset? ",-1)),t("div",bt,[d(F,{icon:"carbon-close",onClick:e[5]||(e[5]=k=>u.value=!1)},{default:h(()=>e[28]||(e[28]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:A},{default:h(()=>e[29]||(e[29]=[D(" Delete ")])),_:1})])])]),_:1},8,["modelValue"]),d(X,{modelValue:y.value,"onUpdate:modelValue":e[9]||(e[9]=k=>y.value=k)},{default:h(()=>[t("div",wt,[d(de,{modelValue:B.value,"onUpdate:modelValue":e[7]||(e[7]=k=>B.value=k),placeholder:"New name",n:"blue"},null,8,["modelValue"]),t("div",_t,[d(F,{icon:"carbon-close",onClick:e[8]||(e[8]=k=>y.value=!1)},{default:h(()=>e[31]||(e[31]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:M},{default:h(()=>e[32]||(e[32]=[D(" Rename ")])),_:1})])])]),_:1},8,["modelValue"]),m(n).type==="text"?(o(),V(X,{key:0,modelValue:b.value,"onUpdate:modelValue":e[12]||(e[12]=k=>b.value=k)},{default:h(()=>[t("div",yt,[K(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=k=>j.value=k),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:Se(E,["enter"])},null,544),[[Fe,j.value]]),t("div",$t,[d(F,{icon:"carbon-close",onClick:e[11]||(e[11]=k=>b.value=!1)},{default:h(()=>e[33]||(e[33]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon:save",n:"primary",onClick:E},{default:h(()=>e[34]||(e[34]=[D(" save ")])),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Ct={"h-full":"","of-auto":""},Vt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},Pt={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},At={flex:"~ col","w-30":"","of-auto":""},Dt={"text-xs":"",op75:""},Nt={op50:""},Ft={key:0},St={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Ut={key:1,p2:"",grid:"~ cols-minmax-8rem"},It={key:1},Ht=Q({__name:"assets",setup(L){const l=_e(),f=T(!1),C=T(""),n=U(()=>new ye(l.value||[],{keys:["path"]})),v=$e(()=>{const w=[];for(const r of l.value||[]){const p=r.path.split(".").pop();p&&!w.find(s=>s.name===p)&&w.push({name:p,value:!0})}return w}),b=U(()=>(C.value?n.value.search(C.value).map(r=>r.item):l.value||[]).filter(r=>{const p=r.path.split(".").pop();return!p||v.some(s=>s.name===p&&s.value)})),j=U(()=>{const w={};for(const r of b.value){const p=`${r.path.split("/").slice(0,-1).join("/")}/`;w[p]||(w[p]=[]),w[p].push(r)}return Object.entries(w).sort(([r],[p])=>r.localeCompare(p))}),P=U(()=>{const w={children:[]},r=(p,s,c)=>{const[g,..._]=s;let u=p.children.find(A=>A.path===g);u||(u={...c,path:g,children:[]},p.children.push(u)),_.length>1?r(u,_,c):_.length===1&&u.children.push({...c,path:_[0]})};return b.value.forEach(p=>{const s=p.path.split("/").filter(c=>c!=="");r(w,s,p)}),w.children}),x=T(),{view:E}=ke("assets");function q(){E.value=E.value==="list"?"grid":"list"}Ce("Escape",()=>{x.value=void 0});const O=T();return(w,r)=>{const p=te,s=Ve,c=Pe,g=Ae,_=Ge,u=it,A=Ue,y=re,B=kt,M=je,a=oe("tooltip");return o(),i("div",Ct,[d(g,{ref_key:"navbar",ref:O,search:C.value,"onUpdate:search":r[1]||(r[1]=e=>C.value=e),pb2:""},{actions:h(()=>[t("div",Vt,[K(d(p,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:r[0]||(r[0]=e=>f.value=!f.value)},null,512),[[a,"File Upload",void 0,{"bottom-end":!0}]]),m(v).length?(o(),V(c,{key:0,direction:"end",n:"sm primary"},{trigger:h(({click:e})=>[K(d(p,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:$=>e()},null,8,["onClick"]),[[a,"Filter",void 0,{"bottom-end":!0}]]),t("span",Pt,N(m(v).length),1)]),default:h(()=>[t("div",At,[(o(!0),i(z,null,G(m(v),e=>(o(),V(s,{key:e.name,modelValue:e.value,"onUpdate:modelValue":$=>e.value=$,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:h(()=>[t("span",Dt,N(e.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):S("",!0),K(d(p,{"text-lg":"",border:!1,icon:m(E)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:q},null,8,["icon"]),[[a,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:h(()=>[t("div",Nt,[C.value?(o(),i("span",Ft,N(b.value.length)+" matched · ",1)):S("",!0),t("span",null,N(m(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(_,{modelValue:f.value,"onUpdate:modelValue":r[2]||(r[2]=e=>f.value=e),folder:"/"},null,8,["modelValue"]),m(E)==="grid"?(o(),i(z,{key:0},[j.value.length>1?(o(!0),i(z,{key:0},G(j.value,([e,$])=>(o(),V(A,{key:e,text:e,description:`${$.length} items`,open:$.length<=m(Ee),padding:!1},{default:h(()=>[t("div",St,[(o(!0),i(z,null,G($,I=>(o(),V(u,{key:I.path,asset:I,folder:e,onClick:F=>x.value=I},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),i("div",Ut,[(o(!0),i(z,null,G(b.value,e=>(o(),V(u,{key:e.path,asset:e,onClick:$=>x.value=e},null,8,["asset","onClick"]))),128))]))],64)):(o(),i("div",It,[(o(!0),i(z,null,G(P.value,(e,$)=>(o(),V(y,{key:$,modelValue:x.value,"onUpdate:modelValue":r[3]||(r[3]=I=>x.value=I),item:e},null,8,["modelValue","item"]))),128))])),d(M,{"model-value":!!x.value,"auto-close":"","w-120":"",top:O.value,onClose:r[5]||(r[5]=e=>x.value=void 0)},{default:h(()=>[x.value?(o(),V(B,{key:0,modelValue:x.value,"onUpdate:modelValue":r[4]||(r[4]=e=>x.value=e)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","top"])])}}});export{Ht as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"20291db0-158a-4546-9c85-d3d4300c08ae","timestamp":1742438444363}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"20291db0-158a-4546-9c85-d3d4300c08ae","timestamp":1742438444363,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as f,I as r}from"./vendor/json-editor-vue-huf8dypo.js";let e;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(o=>o(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(o){o&&n.forEach(t=>t(o))},get(){return e.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){e||(e=f(),s(o));function i(){e&&r(e)}function o(t){e.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return e}const c=u();export{c as d};
|