vite 8.2.2 → 8.2.4
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/node/chunks/node.js +264 -94
- package/package.json +2 -2
package/dist/node/chunks/node.js
CHANGED
|
@@ -542,7 +542,7 @@ const importMetaResolveWithCustomHookString = `
|
|
|
542
542
|
`;
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region package.json
|
|
545
|
-
var version = "8.2.
|
|
545
|
+
var version = "8.2.4";
|
|
546
546
|
//#endregion
|
|
547
547
|
//#region src/node/constants.ts
|
|
548
548
|
const ROLLUP_HOOKS = [
|
|
@@ -9288,10 +9288,10 @@ var require_binary_extensions = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
9288
9288
|
//#endregion
|
|
9289
9289
|
//#region ../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js
|
|
9290
9290
|
var require_is_binary_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9291
|
-
const path$
|
|
9291
|
+
const path$11 = __require("path");
|
|
9292
9292
|
const binaryExtensions = require_binary_extensions();
|
|
9293
9293
|
const extensions = new Set(binaryExtensions);
|
|
9294
|
-
module.exports = (filePath) => extensions.has(path$
|
|
9294
|
+
module.exports = (filePath) => extensions.has(path$11.extname(filePath).slice(1).toLowerCase());
|
|
9295
9295
|
}));
|
|
9296
9296
|
//#endregion
|
|
9297
9297
|
//#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=e17269188c54412478078f7ac7877c1d5a475a2f2438328e3a7e725513ccbf1f/node_modules/chokidar/lib/constants.js
|
|
@@ -10841,18 +10841,29 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10841
10841
|
exports.watch = watch;
|
|
10842
10842
|
}));
|
|
10843
10843
|
//#endregion
|
|
10844
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
10844
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js
|
|
10845
10845
|
var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10846
|
+
/** @import { ControlOperator } from './parse' */
|
|
10847
|
+
/** @type {ControlOperator['op'][]} */
|
|
10846
10848
|
var OPS = [
|
|
10847
10849
|
"||",
|
|
10848
10850
|
"&&",
|
|
10851
|
+
";;&",
|
|
10849
10852
|
";;",
|
|
10853
|
+
";&",
|
|
10850
10854
|
"|&",
|
|
10851
10855
|
"<(",
|
|
10856
|
+
">(",
|
|
10852
10857
|
"<<<",
|
|
10858
|
+
"<<-",
|
|
10859
|
+
"<<",
|
|
10853
10860
|
">>",
|
|
10854
10861
|
">&",
|
|
10862
|
+
">|",
|
|
10863
|
+
"&>>",
|
|
10864
|
+
"&>",
|
|
10855
10865
|
"<&",
|
|
10866
|
+
"<>",
|
|
10856
10867
|
"&",
|
|
10857
10868
|
";",
|
|
10858
10869
|
"(",
|
|
@@ -10862,51 +10873,70 @@ var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10862
10873
|
">"
|
|
10863
10874
|
];
|
|
10864
10875
|
var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
|
|
10865
|
-
var GLOB_SHELL_SPECIAL = /[\s#!"$&'()
|
|
10876
|
+
var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
|
|
10877
|
+
/** @type {typeof import('./quote')} */
|
|
10866
10878
|
module.exports = function quote(xs) {
|
|
10879
|
+
var sawComment = false;
|
|
10867
10880
|
return xs.map(function(s) {
|
|
10881
|
+
if (sawComment && typeof s === "string" && LINE_TERMINATORS.test(s)) throw new TypeError("a token after a `comment` must not contain line terminators");
|
|
10868
10882
|
if (s === "") return "''";
|
|
10869
10883
|
if (s && typeof s === "object") {
|
|
10870
|
-
if (s.op === "glob") {
|
|
10884
|
+
if ("op" in s && s.op === "glob") {
|
|
10871
10885
|
if (typeof s.pattern !== "string") throw new TypeError("glob token requires a string `pattern`");
|
|
10872
10886
|
if (LINE_TERMINATORS.test(s.pattern)) throw new TypeError("glob `pattern` must not contain line terminators");
|
|
10887
|
+
if (s.pattern === "") return "''";
|
|
10873
10888
|
return s.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
|
|
10874
10889
|
}
|
|
10875
|
-
if (typeof s.op === "string") {
|
|
10890
|
+
if ("op" in s && typeof s.op === "string") {
|
|
10876
10891
|
if (OPS.indexOf(s.op) < 0) throw new TypeError("invalid `op` value: " + JSON.stringify(s.op));
|
|
10877
10892
|
return s.op.replace(/[\s\S]/g, "\\$&");
|
|
10878
10893
|
}
|
|
10879
|
-
if (typeof s.comment === "string") {
|
|
10894
|
+
if ("comment" in s && typeof s.comment === "string") {
|
|
10880
10895
|
if (LINE_TERMINATORS.test(s.comment)) throw new TypeError("`comment` must not contain line terminators");
|
|
10896
|
+
sawComment = true;
|
|
10881
10897
|
return "#" + s.comment;
|
|
10882
10898
|
}
|
|
10883
10899
|
throw new TypeError("unrecognized object token shape");
|
|
10884
10900
|
}
|
|
10885
|
-
if (/
|
|
10886
|
-
if (/["
|
|
10887
|
-
|
|
10901
|
+
if (/'/.test(s) && /!/.test(s)) return "'" + s.replace(/'/g, "'\"'\"'") + "'";
|
|
10902
|
+
if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s + "'";
|
|
10903
|
+
if (/["'\s]/.test(s)) return "\"" + s.replace(/(["\\$`])/g, "\\$1") + "\"";
|
|
10904
|
+
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
|
|
10888
10905
|
}).join(" ");
|
|
10889
10906
|
};
|
|
10890
10907
|
}));
|
|
10891
10908
|
//#endregion
|
|
10892
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
10909
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js
|
|
10893
10910
|
var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10911
|
+
/**
|
|
10912
|
+
* @import {
|
|
10913
|
+
* ControlOperator,
|
|
10914
|
+
* Env,
|
|
10915
|
+
* GlobPattern,
|
|
10916
|
+
* ParseEntry,
|
|
10917
|
+
* } from './parse' */
|
|
10894
10918
|
var CONTROL = "(?:" + [
|
|
10895
10919
|
"\\|\\|",
|
|
10896
|
-
"
|
|
10897
|
-
"
|
|
10898
|
-
"
|
|
10920
|
+
"\\&(?:\\&|>>?)",
|
|
10921
|
+
";;\\&?",
|
|
10922
|
+
"[;|]\\&",
|
|
10899
10923
|
"\\<\\(",
|
|
10900
10924
|
"\\<\\<\\<",
|
|
10925
|
+
"\\<\\<-",
|
|
10926
|
+
"\\<\\<(?!\\()",
|
|
10901
10927
|
">>",
|
|
10902
|
-
"
|
|
10903
|
-
"
|
|
10928
|
+
">[&|(]",
|
|
10929
|
+
"<[&>]",
|
|
10904
10930
|
"[&;()|<>]"
|
|
10905
10931
|
].join("|") + ")";
|
|
10906
10932
|
var controlRE = new RegExp("^" + CONTROL + "$");
|
|
10907
10933
|
var META = "|&;()<> \\t";
|
|
10908
|
-
var SINGLE_QUOTE = "
|
|
10909
|
-
var
|
|
10934
|
+
var SINGLE_QUOTE = "'([^']*?)'";
|
|
10935
|
+
var ANSI_C_BODY = "(?:\\\\[\\s\\S]|[^\\\\'])*?";
|
|
10936
|
+
var ANSI_C_QUOTE = "\\$'" + ANSI_C_BODY + "'";
|
|
10937
|
+
var ansiCAt = new RegExp("\\$'" + ANSI_C_BODY + "(?:(')|\\\\?$)", "g");
|
|
10938
|
+
var ANSI_C_LETTERS = "abeEfnrtv";
|
|
10939
|
+
var ANSI_C_CHARS = "\x07\b\x1B\x1B\f\n\r \v";
|
|
10910
10940
|
var hash = /^#$/;
|
|
10911
10941
|
var SQ = "'";
|
|
10912
10942
|
var DQ = "\"";
|
|
@@ -10915,17 +10945,26 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10915
10945
|
var mult = 4294967296;
|
|
10916
10946
|
for (var i = 0; i < 4; i++) TOKEN += (mult * Math.random()).toString(16);
|
|
10917
10947
|
var startsWithToken = new RegExp("^" + TOKEN);
|
|
10948
|
+
/**
|
|
10949
|
+
* @param {string} s
|
|
10950
|
+
* @param {RegExp} r
|
|
10951
|
+
*/
|
|
10918
10952
|
function matchAll(s, r) {
|
|
10919
10953
|
var origIndex = r.lastIndex;
|
|
10920
10954
|
var matches = [];
|
|
10921
10955
|
var matchObj;
|
|
10922
10956
|
while (matchObj = r.exec(s)) {
|
|
10923
|
-
matches.
|
|
10957
|
+
matches[matches.length] = matchObj;
|
|
10924
10958
|
if (r.lastIndex === matchObj.index) r.lastIndex += 1;
|
|
10925
10959
|
}
|
|
10926
10960
|
r.lastIndex = origIndex;
|
|
10927
10961
|
return matches;
|
|
10928
10962
|
}
|
|
10963
|
+
/**
|
|
10964
|
+
* @param {Env} env
|
|
10965
|
+
* @param {string} pre
|
|
10966
|
+
* @param {string} key
|
|
10967
|
+
*/
|
|
10929
10968
|
function getVar(env, pre, key) {
|
|
10930
10969
|
var r = typeof env === "function" ? env(key) : env[key];
|
|
10931
10970
|
if (typeof r === "undefined" && key != "") r = "";
|
|
@@ -10933,11 +10972,51 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10933
10972
|
if (typeof r === "object") return pre + TOKEN + JSON.stringify(r) + TOKEN;
|
|
10934
10973
|
return pre + r;
|
|
10935
10974
|
}
|
|
10975
|
+
var ansiCEscape = /\\([0-7]{1,3}|x[\dA-Fa-f]{1,2}|u[\dA-Fa-f]{1,4}|U[\dA-Fa-f]{1,8}|c(?:\\\\|[\s\S])|[abeEfnrtv\\'"?])/g;
|
|
10976
|
+
/**
|
|
10977
|
+
* @param {string} m
|
|
10978
|
+
* @param {string} escape
|
|
10979
|
+
*/
|
|
10980
|
+
function expandAnsiCEscape(m, escape) {
|
|
10981
|
+
var kind = escape.charAt(0);
|
|
10982
|
+
if (kind === "c") {
|
|
10983
|
+
var ctrl = escape.charAt(1);
|
|
10984
|
+
return ctrl === "?" ? "" : String.fromCharCode(ctrl.charCodeAt(0) & 31);
|
|
10985
|
+
}
|
|
10986
|
+
if (kind === "x" || kind === "u" || kind === "U") {
|
|
10987
|
+
var cp = parseInt(escape.slice(1), 16);
|
|
10988
|
+
if (cp > 1114111) return m;
|
|
10989
|
+
return String.fromCharCode.apply(null, cp > 65535 ? [55232 + (cp >> 10), 56320 + (cp & 1023)] : [cp]);
|
|
10990
|
+
}
|
|
10991
|
+
if (kind >= "0" && kind <= "7") return String.fromCharCode(parseInt(escape, 8) & 255);
|
|
10992
|
+
var letter = ANSI_C_LETTERS.indexOf(escape);
|
|
10993
|
+
return letter < 0 ? escape : ANSI_C_CHARS.charAt(letter);
|
|
10994
|
+
}
|
|
10995
|
+
/** @param {string} body */
|
|
10996
|
+
function expandAnsiC(body) {
|
|
10997
|
+
return body.replace(ansiCEscape, expandAnsiCEscape).split("\0")[0];
|
|
10998
|
+
}
|
|
10999
|
+
/**
|
|
11000
|
+
* @param {string} s
|
|
11001
|
+
* @param {number} i
|
|
11002
|
+
*/
|
|
11003
|
+
function closesAnsiC(s, i) {
|
|
11004
|
+
ansiCAt.lastIndex = i;
|
|
11005
|
+
return !!ansiCAt.exec(s)[1];
|
|
11006
|
+
}
|
|
11007
|
+
/**
|
|
11008
|
+
* @param {string} string
|
|
11009
|
+
* @param {Env} [env]
|
|
11010
|
+
* @param {{ escape?: string, splitUnquoted?: boolean | string }} [opts]
|
|
11011
|
+
* @returns {ParseEntry[]}
|
|
11012
|
+
*/
|
|
10936
11013
|
function parseInternal(string, env, opts) {
|
|
10937
11014
|
if (!opts) opts = {};
|
|
10938
11015
|
var BS = opts.escape || "\\";
|
|
10939
|
-
var
|
|
10940
|
-
var
|
|
11016
|
+
var ifs = opts.splitUnquoted === true ? " \n" : typeof opts.splitUnquoted === "string" ? opts.splitUnquoted : "";
|
|
11017
|
+
var BAREWORD = "(\\" + BS + "['\"$\\" + BS + META + "]|\\$\\$|\\$(?!" + ANSI_C_QUOTE.slice(2) + ")|[^\\s'\"$" + META + "])+";
|
|
11018
|
+
var DOUBLE_QUOTE = "\"(?:\\" + BS + "[\\s\\S]|[^\"\\" + BS + "])*\"";
|
|
11019
|
+
var matches = matchAll(string, new RegExp(["(" + CONTROL + ")", "(" + ANSI_C_QUOTE + "|" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"].join("|"), "g"));
|
|
10941
11020
|
if (matches.length === 0) return [];
|
|
10942
11021
|
if (!env) env = {};
|
|
10943
11022
|
var commented = false;
|
|
@@ -10945,27 +11024,41 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10945
11024
|
var s = match[0];
|
|
10946
11025
|
if (!s || commented) return;
|
|
10947
11026
|
if (controlRE.test(s)) return { op: s };
|
|
11027
|
+
/** @type {string | boolean} */
|
|
10948
11028
|
var quote = false;
|
|
10949
11029
|
var esc = false;
|
|
10950
11030
|
var out = "";
|
|
11031
|
+
/** @type {string[]} */
|
|
11032
|
+
var words = [];
|
|
11033
|
+
var sawQuote = false;
|
|
11034
|
+
/** @type {number | null} */
|
|
11035
|
+
var pendingNw = null;
|
|
10951
11036
|
var isGlob = false;
|
|
11037
|
+
/** @type {number} */
|
|
10952
11038
|
var i;
|
|
10953
11039
|
function parseEnvVar() {
|
|
10954
11040
|
i += 1;
|
|
11041
|
+
/** @type {number | RegExpMatchArray | null} */
|
|
10955
11042
|
var varend;
|
|
11043
|
+
/** @type {string} */
|
|
10956
11044
|
var varname;
|
|
10957
11045
|
var char = s.charAt(i);
|
|
10958
11046
|
if (char === "{") {
|
|
10959
11047
|
i += 1;
|
|
10960
11048
|
if (s.charAt(i) === "}") throw new Error("Bad substitution: " + s.slice(i - 2, i + 1));
|
|
10961
|
-
|
|
10962
|
-
|
|
11049
|
+
var depth = 1;
|
|
11050
|
+
varend = i;
|
|
11051
|
+
while (depth > 0 && varend < s.length) {
|
|
11052
|
+
if (s.charAt(varend) === "{" && s.charAt(varend - 1) === "$") depth += 1;
|
|
11053
|
+
else if (s.charAt(varend) === "}") depth -= 1;
|
|
11054
|
+
varend += 1;
|
|
11055
|
+
}
|
|
11056
|
+
if (depth !== 0) throw new Error("Bad substitution: " + s.slice(i));
|
|
11057
|
+
varend -= 1;
|
|
10963
11058
|
varname = s.slice(i, varend);
|
|
10964
11059
|
i = varend;
|
|
10965
|
-
} else if (/[
|
|
10966
|
-
|
|
10967
|
-
i += 1;
|
|
10968
|
-
} else {
|
|
11060
|
+
} else if (/[*@#?$!-]/.test(char)) varname = char;
|
|
11061
|
+
else {
|
|
10969
11062
|
var slicedFromI = s.slice(i);
|
|
10970
11063
|
varend = slicedFromI.match(/[^\w\d_]/);
|
|
10971
11064
|
if (!varend) {
|
|
@@ -10978,8 +11071,23 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10978
11071
|
}
|
|
10979
11072
|
return getVar(env, "", varname);
|
|
10980
11073
|
}
|
|
11074
|
+
function flushRun() {
|
|
11075
|
+
if (pendingNw === null) return;
|
|
11076
|
+
if (pendingNw === 0) {
|
|
11077
|
+
if (out !== "") {
|
|
11078
|
+
words[words.length] = out;
|
|
11079
|
+
out = "";
|
|
11080
|
+
}
|
|
11081
|
+
} else {
|
|
11082
|
+
words[words.length] = out;
|
|
11083
|
+
out = "";
|
|
11084
|
+
for (var fe = 1; fe < pendingNw; fe += 1) words[words.length] = "";
|
|
11085
|
+
}
|
|
11086
|
+
pendingNw = null;
|
|
11087
|
+
}
|
|
10981
11088
|
for (i = 0; i < s.length; i++) {
|
|
10982
11089
|
var c = s.charAt(i);
|
|
11090
|
+
if (ifs && c !== DS) flushRun();
|
|
10983
11091
|
isGlob = isGlob || !quote && (c === "*" || c === "?");
|
|
10984
11092
|
if (esc) {
|
|
10985
11093
|
out += c;
|
|
@@ -10994,48 +11102,85 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10994
11102
|
else out += BS + c;
|
|
10995
11103
|
} else if (c === DS) out += parseEnvVar();
|
|
10996
11104
|
else out += c;
|
|
10997
|
-
} else if (c === DQ || c === SQ)
|
|
10998
|
-
|
|
11105
|
+
} else if (c === DQ || c === SQ) {
|
|
11106
|
+
quote = c;
|
|
11107
|
+
sawQuote = true;
|
|
11108
|
+
} else if (controlRE.test(c)) return { op: s };
|
|
10999
11109
|
else if (hash.test(c)) {
|
|
11000
11110
|
commented = true;
|
|
11001
11111
|
var commentObj = { comment: string.slice(match.index + i + 1) };
|
|
11002
11112
|
if (out.length) return [out, commentObj];
|
|
11003
11113
|
return [commentObj];
|
|
11004
11114
|
} else if (c === BS) esc = true;
|
|
11005
|
-
else if (c === DS)
|
|
11006
|
-
|
|
11115
|
+
else if (c === DS && s.charAt(i + 1) === SQ && closesAnsiC(s, i)) {
|
|
11116
|
+
flushRun();
|
|
11117
|
+
sawQuote = true;
|
|
11118
|
+
out += expandAnsiC(s.slice(i + 2, ansiCAt.lastIndex - 1));
|
|
11119
|
+
i = ansiCAt.lastIndex - 1;
|
|
11120
|
+
} else if (c === DS) {
|
|
11121
|
+
var value = parseEnvVar();
|
|
11122
|
+
if (!ifs) out += value;
|
|
11123
|
+
else for (var vi = 0; vi < value.length; vi += 1) {
|
|
11124
|
+
var vc = value.charAt(vi);
|
|
11125
|
+
if (ifs.indexOf(vc) < 0) {
|
|
11126
|
+
flushRun();
|
|
11127
|
+
out += vc;
|
|
11128
|
+
} else if (pendingNw === null) pendingNw = vc === " " || vc === " " || vc === "\n" ? 0 : 1;
|
|
11129
|
+
else if (vc !== " " && vc !== " " && vc !== "\n") pendingNw += 1;
|
|
11130
|
+
}
|
|
11131
|
+
} else out += c;
|
|
11007
11132
|
}
|
|
11008
11133
|
if (isGlob) return {
|
|
11009
11134
|
op: "glob",
|
|
11010
11135
|
pattern: out
|
|
11011
11136
|
};
|
|
11137
|
+
if (ifs) {
|
|
11138
|
+
if (pendingNw !== null && pendingNw > 0) {
|
|
11139
|
+
words[words.length] = out;
|
|
11140
|
+
out = "";
|
|
11141
|
+
for (var te = 1; te < pendingNw; te += 1) words[words.length] = "";
|
|
11142
|
+
}
|
|
11143
|
+
if (out !== "" || sawQuote && words.length === 0) words[words.length] = out;
|
|
11144
|
+
return words;
|
|
11145
|
+
}
|
|
11012
11146
|
return out;
|
|
11013
11147
|
}).reduce(function(prev, arg) {
|
|
11014
|
-
|
|
11148
|
+
if (typeof arg === "undefined") return prev;
|
|
11149
|
+
/** @type {ParseEntry[]} */ [].concat(arg).forEach(function(entry) {
|
|
11150
|
+
prev[prev.length] = entry;
|
|
11151
|
+
});
|
|
11152
|
+
return prev;
|
|
11015
11153
|
}, []);
|
|
11016
11154
|
}
|
|
11155
|
+
/** @type {typeof import('./parse')} */
|
|
11017
11156
|
module.exports = function parse(s, env, opts) {
|
|
11018
11157
|
var mapped = parseInternal(s, env, opts);
|
|
11019
11158
|
if (typeof env !== "function") return mapped;
|
|
11020
11159
|
return mapped.reduce(function(acc, s) {
|
|
11021
|
-
if (typeof s === "object")
|
|
11160
|
+
if (typeof s === "object") {
|
|
11161
|
+
acc[acc.length] = s;
|
|
11162
|
+
return acc;
|
|
11163
|
+
}
|
|
11022
11164
|
var xs = s.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
|
|
11023
|
-
if (xs.length === 1)
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11165
|
+
if (xs.length === 1) {
|
|
11166
|
+
acc[acc.length] = xs[0];
|
|
11167
|
+
return acc;
|
|
11168
|
+
}
|
|
11169
|
+
xs.filter(Boolean).forEach(function(x) {
|
|
11170
|
+
acc[acc.length] = startsWithToken.test(x) ? JSON.parse(x.split(TOKEN)[1]) : x;
|
|
11171
|
+
});
|
|
11172
|
+
return acc;
|
|
11028
11173
|
}, []);
|
|
11029
11174
|
};
|
|
11030
11175
|
}));
|
|
11031
11176
|
//#endregion
|
|
11032
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
11177
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js
|
|
11033
11178
|
var require_shell_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11034
11179
|
exports.quote = require_quote();
|
|
11035
11180
|
exports.parse = require_parse$1();
|
|
11036
11181
|
}));
|
|
11037
11182
|
//#endregion
|
|
11038
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11183
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/macos.js
|
|
11039
11184
|
var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11040
11185
|
module.exports = {
|
|
11041
11186
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
@@ -11070,7 +11215,7 @@ var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11070
11215
|
};
|
|
11071
11216
|
}));
|
|
11072
11217
|
//#endregion
|
|
11073
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11218
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/linux.js
|
|
11074
11219
|
var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11075
11220
|
module.exports = {
|
|
11076
11221
|
atom: "atom",
|
|
@@ -11104,7 +11249,7 @@ var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11104
11249
|
};
|
|
11105
11250
|
}));
|
|
11106
11251
|
//#endregion
|
|
11107
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11252
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/windows.js
|
|
11108
11253
|
var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11109
11254
|
module.exports = [
|
|
11110
11255
|
"Brackets.exe",
|
|
@@ -11137,9 +11282,9 @@ var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11137
11282
|
];
|
|
11138
11283
|
}));
|
|
11139
11284
|
//#endregion
|
|
11140
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11285
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/guess.js
|
|
11141
11286
|
var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11142
|
-
const path$
|
|
11287
|
+
const path$10 = __require("path");
|
|
11143
11288
|
const shellQuote = require_shell_quote();
|
|
11144
11289
|
const childProcess$2 = __require("child_process");
|
|
11145
11290
|
const COMMON_EDITORS_MACOS = require_macos();
|
|
@@ -11163,7 +11308,7 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11163
11308
|
const runningProcesses = output.split("\r\n");
|
|
11164
11309
|
for (let i = 0; i < runningProcesses.length; i++) {
|
|
11165
11310
|
const fullProcessPath = runningProcesses[i].trim();
|
|
11166
|
-
const shortProcessName = path$
|
|
11311
|
+
const shortProcessName = path$10.win32.basename(fullProcessPath);
|
|
11167
11312
|
if (COMMON_EDITORS_WIN.indexOf(shortProcessName) !== -1) return fullProcessPath;
|
|
11168
11313
|
}
|
|
11169
11314
|
}
|
|
@@ -11212,11 +11357,15 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11212
11357
|
module.exports.getEditorFromLinuxProcesses = getEditorFromLinuxProcesses;
|
|
11213
11358
|
}));
|
|
11214
11359
|
//#endregion
|
|
11215
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11360
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/get-args.js
|
|
11216
11361
|
var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11217
|
-
const
|
|
11218
|
-
|
|
11219
|
-
|
|
11362
|
+
const os$2 = __require("os");
|
|
11363
|
+
const path$9 = __require("path");
|
|
11364
|
+
module.exports = function getArgumentsForFile(editor, fileName, lineNumber, columnNumber = 1) {
|
|
11365
|
+
fileName = path$9.resolve(fileName);
|
|
11366
|
+
if (process.platform === "linux" && fileName.startsWith("/mnt/") && /Microsoft/i.test(os$2.release())) fileName = `./${path$9.relative("", fileName)}`;
|
|
11367
|
+
if (!lineNumber) return [fileName];
|
|
11368
|
+
switch (path$9.basename(editor).replace(/\.(exe|cmd|bat)$/i, "")) {
|
|
11220
11369
|
case "atom":
|
|
11221
11370
|
case "Atom":
|
|
11222
11371
|
case "Atom Beta":
|
|
@@ -11291,7 +11440,42 @@ var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11291
11440
|
};
|
|
11292
11441
|
}));
|
|
11293
11442
|
//#endregion
|
|
11294
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11443
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/construct-windows-launch-command.js
|
|
11444
|
+
var require_construct_windows_launch_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11445
|
+
function escapeCmdArgs(cmdArgs) {
|
|
11446
|
+
return cmdArgs.replace(/([&|<>,;=^])/g, "^$1");
|
|
11447
|
+
}
|
|
11448
|
+
function doubleQuoteIfNeeded(str) {
|
|
11449
|
+
if (str.includes("^")) return `^"${str}^"`;
|
|
11450
|
+
else if (str.includes(" ")) return `"${str}"`;
|
|
11451
|
+
return str;
|
|
11452
|
+
}
|
|
11453
|
+
function constructWindowsLaunchCommand(editor, args) {
|
|
11454
|
+
if (args.some((arg) => /[\r\n]/.test(arg))) throw new Error("Cannot launch an editor with an argument containing a line break");
|
|
11455
|
+
if (args.some((arg) => arg.includes("%"))) throw new Error("Cannot launch an editor with an argument containing \"%\"");
|
|
11456
|
+
return [editor, ...args.map(escapeCmdArgs)].map(doubleQuoteIfNeeded).join(" ");
|
|
11457
|
+
}
|
|
11458
|
+
module.exports = constructWindowsLaunchCommand;
|
|
11459
|
+
}));
|
|
11460
|
+
//#endregion
|
|
11461
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/parse-file.js
|
|
11462
|
+
var require_parse_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11463
|
+
const path$8 = __require("path");
|
|
11464
|
+
const positionRE = /:(\d+)(:(\d+))?$/;
|
|
11465
|
+
module.exports = function parseFile(file) {
|
|
11466
|
+
if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
|
|
11467
|
+
const unresolvedFileName = file.replace(positionRE, "");
|
|
11468
|
+
const fileName = unresolvedFileName ? path$8.resolve(unresolvedFileName) : "";
|
|
11469
|
+
const match = file.match(positionRE);
|
|
11470
|
+
return {
|
|
11471
|
+
fileName,
|
|
11472
|
+
lineNumber: match && match[1],
|
|
11473
|
+
columnNumber: match && match[3]
|
|
11474
|
+
};
|
|
11475
|
+
};
|
|
11476
|
+
}));
|
|
11477
|
+
//#endregion
|
|
11478
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/index.js
|
|
11295
11479
|
var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11296
11480
|
/**
|
|
11297
11481
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
@@ -11303,12 +11487,13 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
11303
11487
|
* Modified by Yuxi Evan You
|
|
11304
11488
|
*/
|
|
11305
11489
|
const fs$6 = __require("fs");
|
|
11306
|
-
const os$2 = __require("os");
|
|
11307
11490
|
const path$7 = __require("path");
|
|
11308
11491
|
const colors = require_picocolors();
|
|
11309
11492
|
const childProcess$1 = __require("child_process");
|
|
11310
11493
|
const guessEditor = require_guess();
|
|
11311
|
-
const
|
|
11494
|
+
const getArgumentsForFile = require_get_args();
|
|
11495
|
+
const constructWindowsLaunchCommand = require_construct_windows_launch_command();
|
|
11496
|
+
const parseFile = require_parse_file();
|
|
11312
11497
|
function wrapErrorCallback(cb) {
|
|
11313
11498
|
return (fileName, errorMessage) => {
|
|
11314
11499
|
console.log();
|
|
@@ -11329,55 +11514,36 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
11329
11514
|
}
|
|
11330
11515
|
return false;
|
|
11331
11516
|
}
|
|
11332
|
-
const positionRE = /:(\d+)(:(\d+))?$/;
|
|
11333
|
-
function parseFile(file) {
|
|
11334
|
-
if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
|
|
11335
|
-
const fileName = file.replace(positionRE, "");
|
|
11336
|
-
const match = file.match(positionRE);
|
|
11337
|
-
return {
|
|
11338
|
-
fileName,
|
|
11339
|
-
lineNumber: match && match[1],
|
|
11340
|
-
columnNumber: match && match[3]
|
|
11341
|
-
};
|
|
11342
|
-
}
|
|
11343
11517
|
let currentChildProcess = null;
|
|
11344
11518
|
function launchEditor(file, specifiedEditor, onErrorCallback) {
|
|
11345
|
-
const
|
|
11346
|
-
let { fileName } = parsed;
|
|
11347
|
-
const { lineNumber, columnNumber } = parsed;
|
|
11348
|
-
if (process.platform === "win32" && path$7.resolve(fileName).startsWith("\\\\")) return onErrorCallback(fileName, "UNC paths are not supported on Windows to avoid security issues. See https://github.com/vitejs/launch-editor/tree/main/packages/launch-editor#unc-paths-on-windows for details.");
|
|
11349
|
-
if (!fs$6.existsSync(fileName)) return;
|
|
11519
|
+
const { fileName, lineNumber, columnNumber } = parseFile(file);
|
|
11350
11520
|
if (typeof specifiedEditor === "function") {
|
|
11351
11521
|
onErrorCallback = specifiedEditor;
|
|
11352
11522
|
specifiedEditor = void 0;
|
|
11353
11523
|
}
|
|
11354
11524
|
onErrorCallback = wrapErrorCallback(onErrorCallback);
|
|
11525
|
+
if (process.platform === "win32" && fileName.startsWith("\\\\")) return onErrorCallback(fileName, "UNC paths are not supported on Windows to avoid security issues. See https://github.com/vitejs/launch-editor/tree/main/packages/launch-editor#unc-paths-on-windows for details.");
|
|
11526
|
+
if (!fs$6.existsSync(fileName)) return;
|
|
11355
11527
|
const [editor, ...args] = guessEditor(specifiedEditor);
|
|
11356
11528
|
if (!editor) {
|
|
11357
11529
|
onErrorCallback(fileName, null);
|
|
11358
11530
|
return;
|
|
11359
11531
|
}
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11532
|
+
const extraArgs = getArgumentsForFile(editor, fileName, lineNumber, columnNumber);
|
|
11533
|
+
args.push.apply(args, extraArgs);
|
|
11534
|
+
let launchCommand;
|
|
11535
|
+
if (process.platform === "win32") try {
|
|
11536
|
+
launchCommand = constructWindowsLaunchCommand(editor, args);
|
|
11537
|
+
} catch (error) {
|
|
11538
|
+
onErrorCallback(fileName, error.message);
|
|
11539
|
+
return;
|
|
11540
|
+
}
|
|
11365
11541
|
if (currentChildProcess && isTerminalEditor(editor)) currentChildProcess.kill("SIGKILL");
|
|
11366
|
-
if (process.platform === "win32") {
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
if (str.includes("^")) return `^"${str}^"`;
|
|
11372
|
-
else if (str.includes(" ")) return `"${str}"`;
|
|
11373
|
-
return str;
|
|
11374
|
-
}
|
|
11375
|
-
const launchCommand = [editor, ...args.map(escapeCmdArgs)].map(doubleQuoteIfNeeded).join(" ");
|
|
11376
|
-
currentChildProcess = childProcess$1.exec(launchCommand, {
|
|
11377
|
-
stdio: "inherit",
|
|
11378
|
-
shell: true
|
|
11379
|
-
});
|
|
11380
|
-
} else currentChildProcess = childProcess$1.spawn(editor, args, { stdio: "inherit" });
|
|
11542
|
+
if (process.platform === "win32") currentChildProcess = childProcess$1.exec(launchCommand, {
|
|
11543
|
+
stdio: "inherit",
|
|
11544
|
+
shell: true
|
|
11545
|
+
});
|
|
11546
|
+
else currentChildProcess = childProcess$1.spawn(editor, args, { stdio: "inherit" });
|
|
11381
11547
|
currentChildProcess.on("exit", function(errorCode) {
|
|
11382
11548
|
currentChildProcess = null;
|
|
11383
11549
|
if (errorCode) onErrorCallback(fileName, "(code " + errorCode + ")");
|
|
@@ -11391,7 +11557,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
11391
11557
|
module.exports = launchEditor;
|
|
11392
11558
|
}));
|
|
11393
11559
|
//#endregion
|
|
11394
|
-
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.14.
|
|
11560
|
+
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.14.2/node_modules/launch-editor-middleware/index.js
|
|
11395
11561
|
var require_launch_editor_middleware = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11396
11562
|
const path$6 = __require("path");
|
|
11397
11563
|
const launch = require_launch_editor();
|
|
@@ -25112,8 +25278,9 @@ const urlRE = /[?&]url\b/;
|
|
|
25112
25278
|
const rawRE = /[?&]raw\b/;
|
|
25113
25279
|
const inlineRE$1 = /[?&]inline\b/;
|
|
25114
25280
|
const svgRE = /\.svg\b/;
|
|
25281
|
+
const wasmInstanceRE$1 = /[?&]vite-wasm-instance(?:&|$)/;
|
|
25115
25282
|
function isServerAccessDeniedForTransform(config, id) {
|
|
25116
|
-
if (rawRE.test(id) || urlRE.test(id) || inlineRE$1.test(id) || svgRE.test(id)) return checkLoadingAccess(config, cleanUrl(id)) !== "allowed" || checkLoadingAccess(config, id) !== "allowed";
|
|
25283
|
+
if (rawRE.test(id) || urlRE.test(id) || inlineRE$1.test(id) || svgRE.test(id) || wasmInstanceRE$1.test(id)) return checkLoadingAccess(config, cleanUrl(id)) !== "allowed" || checkLoadingAccess(config, id) !== "allowed";
|
|
25117
25284
|
return false;
|
|
25118
25285
|
}
|
|
25119
25286
|
/**
|
|
@@ -25528,8 +25695,9 @@ function createDevHtmlTransformFn(config) {
|
|
|
25528
25695
|
};
|
|
25529
25696
|
}
|
|
25530
25697
|
function getHtmlFilename(url, server) {
|
|
25531
|
-
|
|
25532
|
-
|
|
25698
|
+
const urlPath = cleanUrl(url);
|
|
25699
|
+
if (urlPath.startsWith(FS_PREFIX)) return decodeURIComponent(fsPathFromId(urlPath));
|
|
25700
|
+
else return decodeURIComponent(normalizePath(path.join(server.config.root, urlPath.slice(1))));
|
|
25533
25701
|
}
|
|
25534
25702
|
function shouldPreTransform(url, config) {
|
|
25535
25703
|
return !checkPublicFile(url, config) && (isJSRequest(url) || isCSSRequest(url));
|
|
@@ -25541,6 +25709,7 @@ function isBareRelative(url) {
|
|
|
25541
25709
|
function getHtmlDirnameForRelativeUrl(htmlPath) {
|
|
25542
25710
|
return htmlPath.endsWith("/") ? htmlPath : path.posix.dirname(htmlPath);
|
|
25543
25711
|
}
|
|
25712
|
+
const multipleLeadingSlashesRE = /^\/{2,}/g;
|
|
25544
25713
|
const processNodeUrl = (url, useSrcSetReplacer, config, htmlPath, originalUrl, server, isClassicScriptLink) => {
|
|
25545
25714
|
const replacer = (url) => {
|
|
25546
25715
|
if (url[0] === "/" && url[1] !== "/" || (url[0] === "." || isBareRelative(url)) && originalUrl && originalUrl !== "/" && htmlPath === "/index.html") url = path.posix.join(config.base, url);
|
|
@@ -25566,6 +25735,7 @@ const processNodeUrl = (url, useSrcSetReplacer, config, htmlPath, originalUrl, s
|
|
|
25566
25735
|
return useSrcSetReplacer ? processSrcSetSync(url, ({ url }) => replacer(url)) : replacer(url);
|
|
25567
25736
|
};
|
|
25568
25737
|
const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl }) => {
|
|
25738
|
+
if (htmlPath.startsWith("//")) htmlPath = htmlPath.replace(multipleLeadingSlashesRE, "/");
|
|
25569
25739
|
const { config, watcher } = server;
|
|
25570
25740
|
const base = config.base || "/";
|
|
25571
25741
|
const decodedBase = config.decodedBase || "/";
|
|
@@ -28151,8 +28321,8 @@ function importAnalysisPlugin(config) {
|
|
|
28151
28321
|
if (specifier === clientPublicPath) return;
|
|
28152
28322
|
if (specifier[0] === "/" && !(config.assetsInclude(cleanUrl(specifier)) || urlRE$1.test(specifier)) && checkPublicFile(specifier, config)) throw new Error(`Cannot import non-asset file ${specifier} which is inside /public. JS/CSS files inside /public are copied as-is on build and can only be referenced via <script src> or <link href> in html. If you want to get the URL of that file, use ${injectQuery(specifier, "url")} instead.`);
|
|
28153
28323
|
let [url, resolvedId] = await normalizeUrl(specifier, start);
|
|
28324
|
+
if (resolvedId) config.safeModulePaths.add(cleanUrl(resolvedId));
|
|
28154
28325
|
resolvedId = resolvedId || url;
|
|
28155
|
-
config.safeModulePaths.add(fsPathFromUrl(stripBase(url, base)));
|
|
28156
28326
|
if (url !== specifier) {
|
|
28157
28327
|
let rewriteDone = false;
|
|
28158
28328
|
if (!(depsOptimizer?.isOptimizedDepFile(importer) && specifier[0] === ".") && depsOptimizer?.isOptimizedDepFile(resolvedId) && !optimizedDepChunkRE.test(resolvedId)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.4",
|
|
4
4
|
"description": "Native-ESM powered web dev build tool",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build-tool",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"fresh-import": "^0.2.1",
|
|
94
94
|
"host-validation-middleware": "^0.1.4",
|
|
95
95
|
"http-proxy-3": "^1.23.3",
|
|
96
|
-
"launch-editor-middleware": "^2.14.
|
|
96
|
+
"launch-editor-middleware": "^2.14.2",
|
|
97
97
|
"magic-string": "^1.2.0",
|
|
98
98
|
"mlly": "^1.8.2",
|
|
99
99
|
"mrmime": "^2.0.1",
|