vite-plugin-vue-devtools 7.3.6 → 7.3.8
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/client/assets/index-BJf28x_a.css +1 -0
- package/client/assets/index-Dvsjwf1e.js +1091 -0
- package/client/assets/{shellscript-BZfs-ost.js → shellscript-DOv5BRyJ.js} +1 -1
- package/client/assets/{vitesse-dark-Bxkoe-BC.js → vitesse-dark-EQHFthT6.js} +1 -1
- package/client/assets/{vitesse-light-Br6ll-O0.js → vitesse-light-NrGJGX17.js} +1 -1
- package/client/assets/{vue-CCkGgcwy.js → vue-IkaSwu6t.js} +90 -20
- package/client/assets/{vue-html-BO1wI6aZ.js → vue-html-B7iqIeLO.js} +1 -1
- package/client/index.html +2 -2
- package/dist/vite.cjs +41 -8
- package/dist/vite.mjs +40 -8
- package/package.json +7 -7
- package/src/overlay/devtools-overlay.mjs +5 -5
- package/client/assets/css-CAzixsid-BiWblMbN.js +0 -505
- package/client/assets/diff-Bo5iyMQ2-DvyTQcux.js +0 -1
- package/client/assets/html-BZB5lEhh-ZkrgDCHn.js +0 -74
- package/client/assets/index-B7HpA-pQ.js +0 -1103
- package/client/assets/index-Xo_VulOV.css +0 -1
- package/client/assets/javascript-DqVBMyXe-Dch3xQiY.js +0 -699
- package/client/assets/json-B12k4-6m-CupVZNk8.js +0 -25
- package/client/assets/shellscript-C_gmBC5P-BZfs-ost.js +0 -1
- package/client/assets/typescript-AEg-ehu7-DC8MraHL.js +0 -666
- package/client/assets/vitesse-dark-CkUHDarG-Bxkoe-BC.js +0 -1
- package/client/assets/vitesse-light-K81-viQS-Br6ll-O0.js +0 -1
- package/client/assets/vue-BJXWFdmh-C_buXVgd.js +0 -2002
- package/client/assets/vue-html-0n5tMFM2-DEnWwNAV.js +0 -1
- package/client/assets/yaml-BEu5ErCD-Dg8vsKpL.js +0 -200
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./vue-
|
|
1
|
+
import t from"./vue-IkaSwu6t.js";import e from"./javascript-Dch3xQiY.js";import"./html-CqhC7HHo.js";import"./css-CbYhyuC0.js";import"./typescript-DC8MraHL.js";import"./json-CupVZNk8.js";import"./yaml-DK4oFTHQ.js";const n=Object.freeze({displayName:"Vue HTML",fileTypes:[],name:"vue-html",patterns:[{include:"source.vue#vue-interpolations"},{begin:"(<)([A-Z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"support.class.component.html"}},end:"(>)(<)(/)(\\2)(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"},2:{name:"punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html"},3:{name:"punctuation.definition.tag.begin.html"},4:{name:"support.class.component.html"},5:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(<)([a-z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.html"}},end:"(>)(<)(/)(\\2)(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"},2:{name:"punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html"},3:{name:"punctuation.definition.tag.begin.html"},4:{name:"entity.name.tag.html"},5:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(<\\?)(xml)",captures:{1:{name:"punctuation.definition.tag.html"},2:{name:"entity.name.tag.xml.html"}},end:"(\\?>)",name:"meta.tag.preprocessor.xml.html",patterns:[{include:"#tag-generic-attribute"},{include:"#string-double-quoted"},{include:"#string-single-quoted"}]},{begin:"<!--",captures:{0:{name:"punctuation.definition.comment.html"}},end:"-->",name:"comment.block.html"},{begin:"<!",captures:{0:{name:"punctuation.definition.tag.html"}},end:">",name:"meta.tag.sgml.html",patterns:[{begin:"(?i:DOCTYPE)",captures:{1:{name:"entity.name.tag.doctype.html"}},end:"(?=>)",name:"meta.tag.sgml.doctype.html",patterns:[{match:'"[^">]*"',name:"string.quoted.double.doctype.identifiers-and-DTDs.html"}]},{begin:"\\[CDATA\\[",end:"]](?=>)",name:"constant.other.inline-data.html"},{match:"(\\s*)(?!--|>)\\S(\\s*)",name:"invalid.illegal.bad-comments-or-CDATA.html"}]},{begin:"(</?)([A-Z][a-zA-Z0-9:-]*\\b)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"support.class.component.html"}},end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.block.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(</?)([a-z][a-zA-Z0-9:-]*\\b)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.block.any.html"}},end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.block.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(</?)((?i:body|head|html)\\b)",captures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.structure.any.html"}},end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.structure.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)(?!-)\\b)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.block.any.html"}},end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.block.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)(?!-)\\b)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.inline.any.html"}},end:"(/?>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.inline.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(</?)([a-zA-Z0-9:-]+)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.other.html"}},end:"(/?>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.other.html",patterns:[{include:"#tag-stuff"}]},{include:"#entities"},{match:"<>",name:"invalid.illegal.incomplete.html"},{match:"<",name:"invalid.illegal.bad-angle-bracket.html"}],repository:{entities:{patterns:[{captures:{1:{name:"punctuation.definition.entity.html"},3:{name:"punctuation.definition.entity.html"}},match:"(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",name:"constant.character.entity.html"},{match:"&",name:"invalid.illegal.bad-ampersand.html"}]},"string-double-quoted":{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"string.quoted.double.html",patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},"string-single-quoted":{begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"string.quoted.single.html",patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},"tag-generic-attribute":{match:"(?<=[^=])\\b([a-zA-Z0-9:\\-_]+)",name:"entity.other.attribute-name.html"},"tag-id-attribute":{begin:"\\b(id)\\b\\s*(=)",captures:{1:{name:"entity.other.attribute-name.id.html"},2:{name:"punctuation.separator.key-value.html"}},end:`(?!\\G)(?<='|"|[^\\s<>/])`,name:"meta.attribute-with-value.id.html",patterns:[{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},contentName:"meta.toc-list.id.html",end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"string.quoted.double.html",patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},{begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},contentName:"meta.toc-list.id.html",end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"string.quoted.single.html",patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},{captures:{0:{name:"meta.toc-list.id.html"}},match:`(?<==)(?:[^\\s<>/'"]|/(?!>))+`,name:"string.unquoted.html"}]},"tag-stuff":{patterns:[{include:"#vue-directives"},{include:"#tag-id-attribute"},{include:"#tag-generic-attribute"},{include:"#string-double-quoted"},{include:"#string-single-quoted"},{include:"#unquoted-attribute"}]},"unquoted-attribute":{match:`(?<==)(?:[^\\s<>/'"]|/(?!>))+`,name:"string.unquoted.html"},"vue-directives":{begin:"(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",captures:{1:{name:"entity.other.attribute-name.html"},2:{name:"punctuation.separator.key-value.html"},3:{name:"entity.other.attribute-name.html"},4:{name:"entity.other.attribute-name.html"},5:{name:"entity.other.attribute-name.html"},6:{name:"punctuation.separator.key-value.html"}},end:"(?<='|\")|(?=[\\s<>`])",name:"meta.directive.vue",patterns:[{begin:"`",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"`",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"source.directive.vue",patterns:[{include:"source.js#expression"}]},{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"source.directive.vue",patterns:[{include:"source.js#expression"}]},{begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"source.directive.vue",patterns:[{include:"source.js#expression"}]}]}},scopeName:"text.html.vue-html",embeddedLangs:["vue","javascript"]});var s=[...t,...e,n];export{s as default};
|
package/client/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<link rel="icon" href="./logo.svg" type="image/svg+xml" />
|
|
7
7
|
<title>Vue DevTools Client</title>
|
|
8
8
|
<script src="./color-scheme.js"></script>
|
|
9
|
-
<script type="module" crossorigin src="./assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/index-Dvsjwf1e.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BJf28x_a.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="app"></div>
|
package/dist/vite.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const node_url = require('node:url');
|
|
4
4
|
const path$a = require('node:path');
|
|
5
|
+
const fs$8 = require('node:fs');
|
|
5
6
|
const vite = require('vite');
|
|
6
7
|
const sirv = require('sirv');
|
|
7
8
|
const Inspect = require('vite-plugin-inspect');
|
|
@@ -19,6 +20,7 @@ const require$$0$4 = require('fs');
|
|
|
19
20
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
20
21
|
|
|
21
22
|
const path__default = /*#__PURE__*/_interopDefaultCompat(path$a);
|
|
23
|
+
const fs__default = /*#__PURE__*/_interopDefaultCompat(fs$8);
|
|
22
24
|
const sirv__default = /*#__PURE__*/_interopDefaultCompat(sirv);
|
|
23
25
|
const Inspect__default = /*#__PURE__*/_interopDefaultCompat(Inspect);
|
|
24
26
|
const VueInspector__default = /*#__PURE__*/_interopDefaultCompat(VueInspector);
|
|
@@ -6895,6 +6897,7 @@ function normalizeWindowsPath(input = "") {
|
|
|
6895
6897
|
const _UNC_REGEX = /^[/\\]{2}/;
|
|
6896
6898
|
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
6897
6899
|
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
6900
|
+
const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
6898
6901
|
const normalize = function(path) {
|
|
6899
6902
|
if (path.length === 0) {
|
|
6900
6903
|
return ".";
|
|
@@ -7029,6 +7032,22 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
7029
7032
|
const isAbsolute = function(p) {
|
|
7030
7033
|
return _IS_ABSOLUTE_RE.test(p);
|
|
7031
7034
|
};
|
|
7035
|
+
const relative = function(from, to) {
|
|
7036
|
+
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
7037
|
+
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
7038
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7039
|
+
return _to.join("/");
|
|
7040
|
+
}
|
|
7041
|
+
const _fromCopy = [..._from];
|
|
7042
|
+
for (const segment of _fromCopy) {
|
|
7043
|
+
if (_to[0] !== segment) {
|
|
7044
|
+
break;
|
|
7045
|
+
}
|
|
7046
|
+
_from.shift();
|
|
7047
|
+
_to.shift();
|
|
7048
|
+
}
|
|
7049
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
7050
|
+
};
|
|
7032
7051
|
|
|
7033
7052
|
const decoder = new TextDecoder();
|
|
7034
7053
|
const toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
|
|
@@ -7836,6 +7855,8 @@ function getAssetsFunctions(ctx) {
|
|
|
7836
7855
|
async function scan() {
|
|
7837
7856
|
const dir = resolve(config.root);
|
|
7838
7857
|
const baseURL = config.base;
|
|
7858
|
+
const publicDir = config.publicDir;
|
|
7859
|
+
const relativePublicDir = publicDir === "" ? "" : `${relative(dir, publicDir)}/`;
|
|
7839
7860
|
const files = await fg([
|
|
7840
7861
|
// image
|
|
7841
7862
|
"**/*.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff)",
|
|
@@ -7861,15 +7882,16 @@ function getAssetsFunctions(ctx) {
|
|
|
7861
7882
|
"**/pnpm-workspace.*"
|
|
7862
7883
|
]
|
|
7863
7884
|
});
|
|
7864
|
-
cache = await Promise.all(files.map(async (
|
|
7865
|
-
const filePath = resolve(dir,
|
|
7885
|
+
cache = await Promise.all(files.map(async (relativePath) => {
|
|
7886
|
+
const filePath = resolve(dir, relativePath);
|
|
7866
7887
|
const stat = await fsp__default.lstat(filePath);
|
|
7867
|
-
path =
|
|
7888
|
+
const path = relativePath.replace(relativePublicDir, "");
|
|
7868
7889
|
return {
|
|
7869
7890
|
path,
|
|
7891
|
+
relativePath,
|
|
7870
7892
|
publicPath: join(baseURL, path),
|
|
7871
7893
|
filePath,
|
|
7872
|
-
type: guessType(
|
|
7894
|
+
type: guessType(relativePath),
|
|
7873
7895
|
size: stat.size,
|
|
7874
7896
|
mtime: stat.mtimeMs
|
|
7875
7897
|
};
|
|
@@ -7966,6 +7988,10 @@ function getRpcFunctions(ctx) {
|
|
|
7966
7988
|
};
|
|
7967
7989
|
}
|
|
7968
7990
|
|
|
7991
|
+
function removeUrlQuery(url) {
|
|
7992
|
+
return url.replace(/\?.*$/, "");
|
|
7993
|
+
}
|
|
7994
|
+
|
|
7969
7995
|
function getVueDevtoolsPath() {
|
|
7970
7996
|
const pluginPath = vite.normalizePath(path__default.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('vite.cjs', document.baseURI).href)))));
|
|
7971
7997
|
return pluginPath.replace(/\/dist$/, "//src");
|
|
@@ -7978,6 +8004,7 @@ const toggleComboKeysMap = {
|
|
|
7978
8004
|
function normalizeComboKeyPrint(toggleComboKey) {
|
|
7979
8005
|
return toggleComboKey.split("-").map((key) => toggleComboKeysMap[key] || key[0].toUpperCase() + key.slice(1)).join(dim("+"));
|
|
7980
8006
|
}
|
|
8007
|
+
const devtoolsNextResourceSymbol = "?__vue-devtools-next-resource";
|
|
7981
8008
|
const defaultOptions = {
|
|
7982
8009
|
appendTo: "",
|
|
7983
8010
|
componentInspector: true,
|
|
@@ -8020,6 +8047,8 @@ function VitePluginVueDevTools(options) {
|
|
|
8020
8047
|
`);
|
|
8021
8048
|
};
|
|
8022
8049
|
}
|
|
8050
|
+
const devtoolsOptionsImportee = "virtual:vue-devtools-options";
|
|
8051
|
+
const resolvedDevtoolsOptions = `\0${devtoolsOptionsImportee}`;
|
|
8023
8052
|
const plugin = {
|
|
8024
8053
|
name: "vite-plugin-vue-devtools",
|
|
8025
8054
|
enforce: "pre",
|
|
@@ -8031,16 +8060,20 @@ function VitePluginVueDevTools(options) {
|
|
|
8031
8060
|
configureServer(server);
|
|
8032
8061
|
},
|
|
8033
8062
|
async resolveId(importee) {
|
|
8034
|
-
if (importee
|
|
8035
|
-
return
|
|
8063
|
+
if (importee === devtoolsOptionsImportee) {
|
|
8064
|
+
return resolvedDevtoolsOptions;
|
|
8036
8065
|
} else if (importee.startsWith("virtual:vue-devtools-path:")) {
|
|
8037
8066
|
const resolved = importee.replace("virtual:vue-devtools-path:", `${vueDevtoolsPath}/`);
|
|
8038
|
-
return resolved
|
|
8067
|
+
return `${resolved}${devtoolsNextResourceSymbol}`;
|
|
8039
8068
|
}
|
|
8040
8069
|
},
|
|
8041
8070
|
async load(id) {
|
|
8042
|
-
if (id ===
|
|
8071
|
+
if (id === resolvedDevtoolsOptions) {
|
|
8043
8072
|
return `export default ${JSON.stringify({ base: config.base, componentInspector: pluginOptions.componentInspector })}`;
|
|
8073
|
+
} else if (id.endsWith(devtoolsNextResourceSymbol)) {
|
|
8074
|
+
const filename = removeUrlQuery(id);
|
|
8075
|
+
return await fs__default.promises.readFile(filename, "utf-8");
|
|
8076
|
+
}
|
|
8044
8077
|
},
|
|
8045
8078
|
transform(code, id, options2) {
|
|
8046
8079
|
if (options2?.ssr)
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
2
|
import path$a, { dirname, resolve as resolve$1 } from 'node:path';
|
|
3
|
+
import fs$8 from 'node:fs';
|
|
3
4
|
import { normalizePath } from 'vite';
|
|
4
5
|
import sirv from 'sirv';
|
|
5
6
|
import Inspect from 'vite-plugin-inspect';
|
|
@@ -6879,6 +6880,7 @@ function normalizeWindowsPath(input = "") {
|
|
|
6879
6880
|
const _UNC_REGEX = /^[/\\]{2}/;
|
|
6880
6881
|
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
6881
6882
|
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
6883
|
+
const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
6882
6884
|
const normalize = function(path) {
|
|
6883
6885
|
if (path.length === 0) {
|
|
6884
6886
|
return ".";
|
|
@@ -7013,6 +7015,22 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
7013
7015
|
const isAbsolute = function(p) {
|
|
7014
7016
|
return _IS_ABSOLUTE_RE.test(p);
|
|
7015
7017
|
};
|
|
7018
|
+
const relative = function(from, to) {
|
|
7019
|
+
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
7020
|
+
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
7021
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7022
|
+
return _to.join("/");
|
|
7023
|
+
}
|
|
7024
|
+
const _fromCopy = [..._from];
|
|
7025
|
+
for (const segment of _fromCopy) {
|
|
7026
|
+
if (_to[0] !== segment) {
|
|
7027
|
+
break;
|
|
7028
|
+
}
|
|
7029
|
+
_from.shift();
|
|
7030
|
+
_to.shift();
|
|
7031
|
+
}
|
|
7032
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
7033
|
+
};
|
|
7016
7034
|
|
|
7017
7035
|
const decoder = new TextDecoder();
|
|
7018
7036
|
const toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
|
|
@@ -7820,6 +7838,8 @@ function getAssetsFunctions(ctx) {
|
|
|
7820
7838
|
async function scan() {
|
|
7821
7839
|
const dir = resolve(config.root);
|
|
7822
7840
|
const baseURL = config.base;
|
|
7841
|
+
const publicDir = config.publicDir;
|
|
7842
|
+
const relativePublicDir = publicDir === "" ? "" : `${relative(dir, publicDir)}/`;
|
|
7823
7843
|
const files = await fg([
|
|
7824
7844
|
// image
|
|
7825
7845
|
"**/*.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff)",
|
|
@@ -7845,15 +7865,16 @@ function getAssetsFunctions(ctx) {
|
|
|
7845
7865
|
"**/pnpm-workspace.*"
|
|
7846
7866
|
]
|
|
7847
7867
|
});
|
|
7848
|
-
cache = await Promise.all(files.map(async (
|
|
7849
|
-
const filePath = resolve(dir,
|
|
7868
|
+
cache = await Promise.all(files.map(async (relativePath) => {
|
|
7869
|
+
const filePath = resolve(dir, relativePath);
|
|
7850
7870
|
const stat = await fsp.lstat(filePath);
|
|
7851
|
-
path =
|
|
7871
|
+
const path = relativePath.replace(relativePublicDir, "");
|
|
7852
7872
|
return {
|
|
7853
7873
|
path,
|
|
7874
|
+
relativePath,
|
|
7854
7875
|
publicPath: join(baseURL, path),
|
|
7855
7876
|
filePath,
|
|
7856
|
-
type: guessType(
|
|
7877
|
+
type: guessType(relativePath),
|
|
7857
7878
|
size: stat.size,
|
|
7858
7879
|
mtime: stat.mtimeMs
|
|
7859
7880
|
};
|
|
@@ -7950,6 +7971,10 @@ function getRpcFunctions(ctx) {
|
|
|
7950
7971
|
};
|
|
7951
7972
|
}
|
|
7952
7973
|
|
|
7974
|
+
function removeUrlQuery(url) {
|
|
7975
|
+
return url.replace(/\?.*$/, "");
|
|
7976
|
+
}
|
|
7977
|
+
|
|
7953
7978
|
function getVueDevtoolsPath() {
|
|
7954
7979
|
const pluginPath = normalizePath(path$a.dirname(fileURLToPath(import.meta.url)));
|
|
7955
7980
|
return pluginPath.replace(/\/dist$/, "//src");
|
|
@@ -7962,6 +7987,7 @@ const toggleComboKeysMap = {
|
|
|
7962
7987
|
function normalizeComboKeyPrint(toggleComboKey) {
|
|
7963
7988
|
return toggleComboKey.split("-").map((key) => toggleComboKeysMap[key] || key[0].toUpperCase() + key.slice(1)).join(dim("+"));
|
|
7964
7989
|
}
|
|
7990
|
+
const devtoolsNextResourceSymbol = "?__vue-devtools-next-resource";
|
|
7965
7991
|
const defaultOptions = {
|
|
7966
7992
|
appendTo: "",
|
|
7967
7993
|
componentInspector: true,
|
|
@@ -8004,6 +8030,8 @@ function VitePluginVueDevTools(options) {
|
|
|
8004
8030
|
`);
|
|
8005
8031
|
};
|
|
8006
8032
|
}
|
|
8033
|
+
const devtoolsOptionsImportee = "virtual:vue-devtools-options";
|
|
8034
|
+
const resolvedDevtoolsOptions = `\0${devtoolsOptionsImportee}`;
|
|
8007
8035
|
const plugin = {
|
|
8008
8036
|
name: "vite-plugin-vue-devtools",
|
|
8009
8037
|
enforce: "pre",
|
|
@@ -8015,16 +8043,20 @@ function VitePluginVueDevTools(options) {
|
|
|
8015
8043
|
configureServer(server);
|
|
8016
8044
|
},
|
|
8017
8045
|
async resolveId(importee) {
|
|
8018
|
-
if (importee
|
|
8019
|
-
return
|
|
8046
|
+
if (importee === devtoolsOptionsImportee) {
|
|
8047
|
+
return resolvedDevtoolsOptions;
|
|
8020
8048
|
} else if (importee.startsWith("virtual:vue-devtools-path:")) {
|
|
8021
8049
|
const resolved = importee.replace("virtual:vue-devtools-path:", `${vueDevtoolsPath}/`);
|
|
8022
|
-
return resolved
|
|
8050
|
+
return `${resolved}${devtoolsNextResourceSymbol}`;
|
|
8023
8051
|
}
|
|
8024
8052
|
},
|
|
8025
8053
|
async load(id) {
|
|
8026
|
-
if (id ===
|
|
8054
|
+
if (id === resolvedDevtoolsOptions) {
|
|
8027
8055
|
return `export default ${JSON.stringify({ base: config.base, componentInspector: pluginOptions.componentInspector })}`;
|
|
8056
|
+
} else if (id.endsWith(devtoolsNextResourceSymbol)) {
|
|
8057
|
+
const filename = removeUrlQuery(id);
|
|
8058
|
+
return await fs$8.promises.readFile(filename, "utf-8");
|
|
8059
|
+
}
|
|
8028
8060
|
},
|
|
8029
8061
|
transform(code, id, options2) {
|
|
8030
8062
|
if (options2?.ssr)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-vue-devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.8",
|
|
5
5
|
"description": "A vite plugin for Vue DevTools",
|
|
6
6
|
"author": "webfansplz",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"execa": "^8.0.1",
|
|
50
50
|
"sirv": "^2.0.4",
|
|
51
|
-
"vite-plugin-inspect": "^0.8.
|
|
52
|
-
"vite-plugin-vue-inspector": "^5.1.
|
|
53
|
-
"@vue/devtools-core": "^7.3.
|
|
54
|
-
"@vue/devtools-kit": "^7.3.
|
|
55
|
-
"@vue/devtools-shared": "^7.3.
|
|
51
|
+
"vite-plugin-inspect": "^0.8.5",
|
|
52
|
+
"vite-plugin-vue-inspector": "^5.1.3",
|
|
53
|
+
"@vue/devtools-core": "^7.3.8",
|
|
54
|
+
"@vue/devtools-kit": "^7.3.8",
|
|
55
|
+
"@vue/devtools-shared": "^7.3.8"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@types/node": "^20.14.
|
|
58
|
+
"@types/node": "^20.14.15",
|
|
59
59
|
"fast-glob": "^3.3.2",
|
|
60
60
|
"image-meta": "^0.2.1",
|
|
61
61
|
"pathe": "^1.1.2"
|