vite 8.1.5 → 8.1.6
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 +261 -92
- package/package.json +2 -2
package/dist/node/chunks/node.js
CHANGED
|
@@ -9060,10 +9060,10 @@ var require_binary_extensions = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
9060
9060
|
//#endregion
|
|
9061
9061
|
//#region ../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js
|
|
9062
9062
|
var require_is_binary_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9063
|
-
const path$
|
|
9063
|
+
const path$11 = __require("path");
|
|
9064
9064
|
const binaryExtensions = require_binary_extensions();
|
|
9065
9065
|
const extensions = new Set(binaryExtensions);
|
|
9066
|
-
module.exports = (filePath) => extensions.has(path$
|
|
9066
|
+
module.exports = (filePath) => extensions.has(path$11.extname(filePath).slice(1).toLowerCase());
|
|
9067
9067
|
}));
|
|
9068
9068
|
//#endregion
|
|
9069
9069
|
//#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=e17269188c54412478078f7ac7877c1d5a475a2f2438328e3a7e725513ccbf1f/node_modules/chokidar/lib/constants.js
|
|
@@ -10610,18 +10610,29 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10610
10610
|
exports.watch = watch;
|
|
10611
10611
|
}));
|
|
10612
10612
|
//#endregion
|
|
10613
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
10613
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js
|
|
10614
10614
|
var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10615
|
+
/** @import { ControlOperator } from './parse' */
|
|
10616
|
+
/** @type {ControlOperator['op'][]} */
|
|
10615
10617
|
var OPS = [
|
|
10616
10618
|
"||",
|
|
10617
10619
|
"&&",
|
|
10620
|
+
";;&",
|
|
10618
10621
|
";;",
|
|
10622
|
+
";&",
|
|
10619
10623
|
"|&",
|
|
10620
10624
|
"<(",
|
|
10625
|
+
">(",
|
|
10621
10626
|
"<<<",
|
|
10627
|
+
"<<-",
|
|
10628
|
+
"<<",
|
|
10622
10629
|
">>",
|
|
10623
10630
|
">&",
|
|
10631
|
+
">|",
|
|
10632
|
+
"&>>",
|
|
10633
|
+
"&>",
|
|
10624
10634
|
"<&",
|
|
10635
|
+
"<>",
|
|
10625
10636
|
"&",
|
|
10626
10637
|
";",
|
|
10627
10638
|
"(",
|
|
@@ -10631,51 +10642,70 @@ var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10631
10642
|
">"
|
|
10632
10643
|
];
|
|
10633
10644
|
var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
|
|
10634
|
-
var GLOB_SHELL_SPECIAL = /[\s#!"$&'()
|
|
10645
|
+
var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
|
|
10646
|
+
/** @type {typeof import('./quote')} */
|
|
10635
10647
|
module.exports = function quote(xs) {
|
|
10648
|
+
var sawComment = false;
|
|
10636
10649
|
return xs.map(function(s) {
|
|
10650
|
+
if (sawComment && typeof s === "string" && LINE_TERMINATORS.test(s)) throw new TypeError("a token after a `comment` must not contain line terminators");
|
|
10637
10651
|
if (s === "") return "''";
|
|
10638
10652
|
if (s && typeof s === "object") {
|
|
10639
|
-
if (s.op === "glob") {
|
|
10653
|
+
if ("op" in s && s.op === "glob") {
|
|
10640
10654
|
if (typeof s.pattern !== "string") throw new TypeError("glob token requires a string `pattern`");
|
|
10641
10655
|
if (LINE_TERMINATORS.test(s.pattern)) throw new TypeError("glob `pattern` must not contain line terminators");
|
|
10656
|
+
if (s.pattern === "") return "''";
|
|
10642
10657
|
return s.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
|
|
10643
10658
|
}
|
|
10644
|
-
if (typeof s.op === "string") {
|
|
10659
|
+
if ("op" in s && typeof s.op === "string") {
|
|
10645
10660
|
if (OPS.indexOf(s.op) < 0) throw new TypeError("invalid `op` value: " + JSON.stringify(s.op));
|
|
10646
10661
|
return s.op.replace(/[\s\S]/g, "\\$&");
|
|
10647
10662
|
}
|
|
10648
|
-
if (typeof s.comment === "string") {
|
|
10663
|
+
if ("comment" in s && typeof s.comment === "string") {
|
|
10649
10664
|
if (LINE_TERMINATORS.test(s.comment)) throw new TypeError("`comment` must not contain line terminators");
|
|
10665
|
+
sawComment = true;
|
|
10650
10666
|
return "#" + s.comment;
|
|
10651
10667
|
}
|
|
10652
10668
|
throw new TypeError("unrecognized object token shape");
|
|
10653
10669
|
}
|
|
10654
|
-
if (/
|
|
10655
|
-
if (/["
|
|
10656
|
-
|
|
10670
|
+
if (/'/.test(s) && /!/.test(s)) return "'" + s.replace(/'/g, "'\"'\"'") + "'";
|
|
10671
|
+
if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s + "'";
|
|
10672
|
+
if (/["'\s]/.test(s)) return "\"" + s.replace(/(["\\$`])/g, "\\$1") + "\"";
|
|
10673
|
+
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
|
|
10657
10674
|
}).join(" ");
|
|
10658
10675
|
};
|
|
10659
10676
|
}));
|
|
10660
10677
|
//#endregion
|
|
10661
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
10678
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js
|
|
10662
10679
|
var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10680
|
+
/**
|
|
10681
|
+
* @import {
|
|
10682
|
+
* ControlOperator,
|
|
10683
|
+
* Env,
|
|
10684
|
+
* GlobPattern,
|
|
10685
|
+
* ParseEntry,
|
|
10686
|
+
* } from './parse' */
|
|
10663
10687
|
var CONTROL = "(?:" + [
|
|
10664
10688
|
"\\|\\|",
|
|
10665
|
-
"
|
|
10666
|
-
"
|
|
10667
|
-
"
|
|
10689
|
+
"\\&(?:\\&|>>?)",
|
|
10690
|
+
";;\\&?",
|
|
10691
|
+
"[;|]\\&",
|
|
10668
10692
|
"\\<\\(",
|
|
10669
10693
|
"\\<\\<\\<",
|
|
10694
|
+
"\\<\\<-",
|
|
10695
|
+
"\\<\\<(?!\\()",
|
|
10670
10696
|
">>",
|
|
10671
|
-
"
|
|
10672
|
-
"
|
|
10697
|
+
">[&|(]",
|
|
10698
|
+
"<[&>]",
|
|
10673
10699
|
"[&;()|<>]"
|
|
10674
10700
|
].join("|") + ")";
|
|
10675
10701
|
var controlRE = new RegExp("^" + CONTROL + "$");
|
|
10676
10702
|
var META = "|&;()<> \\t";
|
|
10677
|
-
var SINGLE_QUOTE = "
|
|
10678
|
-
var
|
|
10703
|
+
var SINGLE_QUOTE = "'([^']*?)'";
|
|
10704
|
+
var ANSI_C_BODY = "(?:\\\\[\\s\\S]|[^\\\\'])*?";
|
|
10705
|
+
var ANSI_C_QUOTE = "\\$'" + ANSI_C_BODY + "'";
|
|
10706
|
+
var ansiCAt = new RegExp("\\$'" + ANSI_C_BODY + "(?:(')|\\\\?$)", "g");
|
|
10707
|
+
var ANSI_C_LETTERS = "abeEfnrtv";
|
|
10708
|
+
var ANSI_C_CHARS = "\x07\b\x1B\x1B\f\n\r \v";
|
|
10679
10709
|
var hash = /^#$/;
|
|
10680
10710
|
var SQ = "'";
|
|
10681
10711
|
var DQ = "\"";
|
|
@@ -10684,17 +10714,26 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10684
10714
|
var mult = 4294967296;
|
|
10685
10715
|
for (var i = 0; i < 4; i++) TOKEN += (mult * Math.random()).toString(16);
|
|
10686
10716
|
var startsWithToken = new RegExp("^" + TOKEN);
|
|
10717
|
+
/**
|
|
10718
|
+
* @param {string} s
|
|
10719
|
+
* @param {RegExp} r
|
|
10720
|
+
*/
|
|
10687
10721
|
function matchAll(s, r) {
|
|
10688
10722
|
var origIndex = r.lastIndex;
|
|
10689
10723
|
var matches = [];
|
|
10690
10724
|
var matchObj;
|
|
10691
10725
|
while (matchObj = r.exec(s)) {
|
|
10692
|
-
matches.
|
|
10726
|
+
matches[matches.length] = matchObj;
|
|
10693
10727
|
if (r.lastIndex === matchObj.index) r.lastIndex += 1;
|
|
10694
10728
|
}
|
|
10695
10729
|
r.lastIndex = origIndex;
|
|
10696
10730
|
return matches;
|
|
10697
10731
|
}
|
|
10732
|
+
/**
|
|
10733
|
+
* @param {Env} env
|
|
10734
|
+
* @param {string} pre
|
|
10735
|
+
* @param {string} key
|
|
10736
|
+
*/
|
|
10698
10737
|
function getVar(env, pre, key) {
|
|
10699
10738
|
var r = typeof env === "function" ? env(key) : env[key];
|
|
10700
10739
|
if (typeof r === "undefined" && key != "") r = "";
|
|
@@ -10702,11 +10741,51 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10702
10741
|
if (typeof r === "object") return pre + TOKEN + JSON.stringify(r) + TOKEN;
|
|
10703
10742
|
return pre + r;
|
|
10704
10743
|
}
|
|
10744
|
+
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;
|
|
10745
|
+
/**
|
|
10746
|
+
* @param {string} m
|
|
10747
|
+
* @param {string} escape
|
|
10748
|
+
*/
|
|
10749
|
+
function expandAnsiCEscape(m, escape) {
|
|
10750
|
+
var kind = escape.charAt(0);
|
|
10751
|
+
if (kind === "c") {
|
|
10752
|
+
var ctrl = escape.charAt(1);
|
|
10753
|
+
return ctrl === "?" ? "" : String.fromCharCode(ctrl.charCodeAt(0) & 31);
|
|
10754
|
+
}
|
|
10755
|
+
if (kind === "x" || kind === "u" || kind === "U") {
|
|
10756
|
+
var cp = parseInt(escape.slice(1), 16);
|
|
10757
|
+
if (cp > 1114111) return m;
|
|
10758
|
+
return String.fromCharCode.apply(null, cp > 65535 ? [55232 + (cp >> 10), 56320 + (cp & 1023)] : [cp]);
|
|
10759
|
+
}
|
|
10760
|
+
if (kind >= "0" && kind <= "7") return String.fromCharCode(parseInt(escape, 8) & 255);
|
|
10761
|
+
var letter = ANSI_C_LETTERS.indexOf(escape);
|
|
10762
|
+
return letter < 0 ? escape : ANSI_C_CHARS.charAt(letter);
|
|
10763
|
+
}
|
|
10764
|
+
/** @param {string} body */
|
|
10765
|
+
function expandAnsiC(body) {
|
|
10766
|
+
return body.replace(ansiCEscape, expandAnsiCEscape).split("\0")[0];
|
|
10767
|
+
}
|
|
10768
|
+
/**
|
|
10769
|
+
* @param {string} s
|
|
10770
|
+
* @param {number} i
|
|
10771
|
+
*/
|
|
10772
|
+
function closesAnsiC(s, i) {
|
|
10773
|
+
ansiCAt.lastIndex = i;
|
|
10774
|
+
return !!ansiCAt.exec(s)[1];
|
|
10775
|
+
}
|
|
10776
|
+
/**
|
|
10777
|
+
* @param {string} string
|
|
10778
|
+
* @param {Env} [env]
|
|
10779
|
+
* @param {{ escape?: string, splitUnquoted?: boolean | string }} [opts]
|
|
10780
|
+
* @returns {ParseEntry[]}
|
|
10781
|
+
*/
|
|
10705
10782
|
function parseInternal(string, env, opts) {
|
|
10706
10783
|
if (!opts) opts = {};
|
|
10707
10784
|
var BS = opts.escape || "\\";
|
|
10708
|
-
var
|
|
10709
|
-
var
|
|
10785
|
+
var ifs = opts.splitUnquoted === true ? " \n" : typeof opts.splitUnquoted === "string" ? opts.splitUnquoted : "";
|
|
10786
|
+
var BAREWORD = "(\\" + BS + "['\"$\\" + BS + META + "]|\\$\\$|\\$(?!" + ANSI_C_QUOTE.slice(2) + ")|[^\\s'\"$" + META + "])+";
|
|
10787
|
+
var DOUBLE_QUOTE = "\"(?:\\" + BS + "[\\s\\S]|[^\"\\" + BS + "])*\"";
|
|
10788
|
+
var matches = matchAll(string, new RegExp(["(" + CONTROL + ")", "(" + ANSI_C_QUOTE + "|" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"].join("|"), "g"));
|
|
10710
10789
|
if (matches.length === 0) return [];
|
|
10711
10790
|
if (!env) env = {};
|
|
10712
10791
|
var commented = false;
|
|
@@ -10714,27 +10793,41 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10714
10793
|
var s = match[0];
|
|
10715
10794
|
if (!s || commented) return;
|
|
10716
10795
|
if (controlRE.test(s)) return { op: s };
|
|
10796
|
+
/** @type {string | boolean} */
|
|
10717
10797
|
var quote = false;
|
|
10718
10798
|
var esc = false;
|
|
10719
10799
|
var out = "";
|
|
10800
|
+
/** @type {string[]} */
|
|
10801
|
+
var words = [];
|
|
10802
|
+
var sawQuote = false;
|
|
10803
|
+
/** @type {number | null} */
|
|
10804
|
+
var pendingNw = null;
|
|
10720
10805
|
var isGlob = false;
|
|
10806
|
+
/** @type {number} */
|
|
10721
10807
|
var i;
|
|
10722
10808
|
function parseEnvVar() {
|
|
10723
10809
|
i += 1;
|
|
10810
|
+
/** @type {number | RegExpMatchArray | null} */
|
|
10724
10811
|
var varend;
|
|
10812
|
+
/** @type {string} */
|
|
10725
10813
|
var varname;
|
|
10726
10814
|
var char = s.charAt(i);
|
|
10727
10815
|
if (char === "{") {
|
|
10728
10816
|
i += 1;
|
|
10729
10817
|
if (s.charAt(i) === "}") throw new Error("Bad substitution: " + s.slice(i - 2, i + 1));
|
|
10730
|
-
|
|
10731
|
-
|
|
10818
|
+
var depth = 1;
|
|
10819
|
+
varend = i;
|
|
10820
|
+
while (depth > 0 && varend < s.length) {
|
|
10821
|
+
if (s.charAt(varend) === "{" && s.charAt(varend - 1) === "$") depth += 1;
|
|
10822
|
+
else if (s.charAt(varend) === "}") depth -= 1;
|
|
10823
|
+
varend += 1;
|
|
10824
|
+
}
|
|
10825
|
+
if (depth !== 0) throw new Error("Bad substitution: " + s.slice(i));
|
|
10826
|
+
varend -= 1;
|
|
10732
10827
|
varname = s.slice(i, varend);
|
|
10733
10828
|
i = varend;
|
|
10734
|
-
} else if (/[
|
|
10735
|
-
|
|
10736
|
-
i += 1;
|
|
10737
|
-
} else {
|
|
10829
|
+
} else if (/[*@#?$!-]/.test(char)) varname = char;
|
|
10830
|
+
else {
|
|
10738
10831
|
var slicedFromI = s.slice(i);
|
|
10739
10832
|
varend = slicedFromI.match(/[^\w\d_]/);
|
|
10740
10833
|
if (!varend) {
|
|
@@ -10747,8 +10840,23 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10747
10840
|
}
|
|
10748
10841
|
return getVar(env, "", varname);
|
|
10749
10842
|
}
|
|
10843
|
+
function flushRun() {
|
|
10844
|
+
if (pendingNw === null) return;
|
|
10845
|
+
if (pendingNw === 0) {
|
|
10846
|
+
if (out !== "") {
|
|
10847
|
+
words[words.length] = out;
|
|
10848
|
+
out = "";
|
|
10849
|
+
}
|
|
10850
|
+
} else {
|
|
10851
|
+
words[words.length] = out;
|
|
10852
|
+
out = "";
|
|
10853
|
+
for (var fe = 1; fe < pendingNw; fe += 1) words[words.length] = "";
|
|
10854
|
+
}
|
|
10855
|
+
pendingNw = null;
|
|
10856
|
+
}
|
|
10750
10857
|
for (i = 0; i < s.length; i++) {
|
|
10751
10858
|
var c = s.charAt(i);
|
|
10859
|
+
if (ifs && c !== DS) flushRun();
|
|
10752
10860
|
isGlob = isGlob || !quote && (c === "*" || c === "?");
|
|
10753
10861
|
if (esc) {
|
|
10754
10862
|
out += c;
|
|
@@ -10762,48 +10870,85 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10762
10870
|
else out += BS + c;
|
|
10763
10871
|
} else if (c === DS) out += parseEnvVar();
|
|
10764
10872
|
else out += c;
|
|
10765
|
-
else if (c === DQ || c === SQ)
|
|
10766
|
-
|
|
10873
|
+
else if (c === DQ || c === SQ) {
|
|
10874
|
+
quote = c;
|
|
10875
|
+
sawQuote = true;
|
|
10876
|
+
} else if (controlRE.test(c)) return { op: s };
|
|
10767
10877
|
else if (hash.test(c)) {
|
|
10768
10878
|
commented = true;
|
|
10769
10879
|
var commentObj = { comment: string.slice(match.index + i + 1) };
|
|
10770
10880
|
if (out.length) return [out, commentObj];
|
|
10771
10881
|
return [commentObj];
|
|
10772
10882
|
} else if (c === BS) esc = true;
|
|
10773
|
-
else if (c === DS)
|
|
10774
|
-
|
|
10883
|
+
else if (c === DS && s.charAt(i + 1) === SQ && closesAnsiC(s, i)) {
|
|
10884
|
+
flushRun();
|
|
10885
|
+
sawQuote = true;
|
|
10886
|
+
out += expandAnsiC(s.slice(i + 2, ansiCAt.lastIndex - 1));
|
|
10887
|
+
i = ansiCAt.lastIndex - 1;
|
|
10888
|
+
} else if (c === DS) {
|
|
10889
|
+
var value = parseEnvVar();
|
|
10890
|
+
if (!ifs) out += value;
|
|
10891
|
+
else for (var vi = 0; vi < value.length; vi += 1) {
|
|
10892
|
+
var vc = value.charAt(vi);
|
|
10893
|
+
if (ifs.indexOf(vc) < 0) {
|
|
10894
|
+
flushRun();
|
|
10895
|
+
out += vc;
|
|
10896
|
+
} else if (pendingNw === null) pendingNw = vc === " " || vc === " " || vc === "\n" ? 0 : 1;
|
|
10897
|
+
else if (vc !== " " && vc !== " " && vc !== "\n") pendingNw += 1;
|
|
10898
|
+
}
|
|
10899
|
+
} else out += c;
|
|
10775
10900
|
}
|
|
10776
10901
|
if (isGlob) return {
|
|
10777
10902
|
op: "glob",
|
|
10778
10903
|
pattern: out
|
|
10779
10904
|
};
|
|
10905
|
+
if (ifs) {
|
|
10906
|
+
if (pendingNw !== null && pendingNw > 0) {
|
|
10907
|
+
words[words.length] = out;
|
|
10908
|
+
out = "";
|
|
10909
|
+
for (var te = 1; te < pendingNw; te += 1) words[words.length] = "";
|
|
10910
|
+
}
|
|
10911
|
+
if (out !== "" || sawQuote && words.length === 0) words[words.length] = out;
|
|
10912
|
+
return words;
|
|
10913
|
+
}
|
|
10780
10914
|
return out;
|
|
10781
10915
|
}).reduce(function(prev, arg) {
|
|
10782
|
-
|
|
10916
|
+
if (typeof arg === "undefined") return prev;
|
|
10917
|
+
/** @type {ParseEntry[]} */ [].concat(arg).forEach(function(entry) {
|
|
10918
|
+
prev[prev.length] = entry;
|
|
10919
|
+
});
|
|
10920
|
+
return prev;
|
|
10783
10921
|
}, []);
|
|
10784
10922
|
}
|
|
10923
|
+
/** @type {typeof import('./parse')} */
|
|
10785
10924
|
module.exports = function parse(s, env, opts) {
|
|
10786
10925
|
var mapped = parseInternal(s, env, opts);
|
|
10787
10926
|
if (typeof env !== "function") return mapped;
|
|
10788
10927
|
return mapped.reduce(function(acc, s) {
|
|
10789
|
-
if (typeof s === "object")
|
|
10928
|
+
if (typeof s === "object") {
|
|
10929
|
+
acc[acc.length] = s;
|
|
10930
|
+
return acc;
|
|
10931
|
+
}
|
|
10790
10932
|
var xs = s.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
|
|
10791
|
-
if (xs.length === 1)
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10933
|
+
if (xs.length === 1) {
|
|
10934
|
+
acc[acc.length] = xs[0];
|
|
10935
|
+
return acc;
|
|
10936
|
+
}
|
|
10937
|
+
xs.filter(Boolean).forEach(function(x) {
|
|
10938
|
+
acc[acc.length] = startsWithToken.test(x) ? JSON.parse(x.split(TOKEN)[1]) : x;
|
|
10939
|
+
});
|
|
10940
|
+
return acc;
|
|
10796
10941
|
}, []);
|
|
10797
10942
|
};
|
|
10798
10943
|
}));
|
|
10799
10944
|
//#endregion
|
|
10800
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
10945
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js
|
|
10801
10946
|
var require_shell_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10802
10947
|
exports.quote = require_quote();
|
|
10803
10948
|
exports.parse = require_parse$1();
|
|
10804
10949
|
}));
|
|
10805
10950
|
//#endregion
|
|
10806
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
10951
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/macos.js
|
|
10807
10952
|
var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10808
10953
|
module.exports = {
|
|
10809
10954
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
@@ -10838,7 +10983,7 @@ var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10838
10983
|
};
|
|
10839
10984
|
}));
|
|
10840
10985
|
//#endregion
|
|
10841
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
10986
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/linux.js
|
|
10842
10987
|
var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10843
10988
|
module.exports = {
|
|
10844
10989
|
atom: "atom",
|
|
@@ -10872,7 +11017,7 @@ var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10872
11017
|
};
|
|
10873
11018
|
}));
|
|
10874
11019
|
//#endregion
|
|
10875
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11020
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/windows.js
|
|
10876
11021
|
var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10877
11022
|
module.exports = [
|
|
10878
11023
|
"Brackets.exe",
|
|
@@ -10905,9 +11050,9 @@ var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10905
11050
|
];
|
|
10906
11051
|
}));
|
|
10907
11052
|
//#endregion
|
|
10908
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11053
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/guess.js
|
|
10909
11054
|
var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10910
|
-
const path$
|
|
11055
|
+
const path$10 = __require("path");
|
|
10911
11056
|
const shellQuote = require_shell_quote();
|
|
10912
11057
|
const childProcess$2 = __require("child_process");
|
|
10913
11058
|
const COMMON_EDITORS_MACOS = require_macos();
|
|
@@ -10931,7 +11076,7 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10931
11076
|
const runningProcesses = output.split("\r\n");
|
|
10932
11077
|
for (let i = 0; i < runningProcesses.length; i++) {
|
|
10933
11078
|
const fullProcessPath = runningProcesses[i].trim();
|
|
10934
|
-
const shortProcessName = path$
|
|
11079
|
+
const shortProcessName = path$10.win32.basename(fullProcessPath);
|
|
10935
11080
|
if (COMMON_EDITORS_WIN.indexOf(shortProcessName) !== -1) return fullProcessPath;
|
|
10936
11081
|
}
|
|
10937
11082
|
}
|
|
@@ -10980,11 +11125,15 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10980
11125
|
module.exports.getEditorFromLinuxProcesses = getEditorFromLinuxProcesses;
|
|
10981
11126
|
}));
|
|
10982
11127
|
//#endregion
|
|
10983
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11128
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/get-args.js
|
|
10984
11129
|
var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10985
|
-
const
|
|
10986
|
-
|
|
10987
|
-
|
|
11130
|
+
const os$2 = __require("os");
|
|
11131
|
+
const path$9 = __require("path");
|
|
11132
|
+
module.exports = function getArgumentsForFile(editor, fileName, lineNumber, columnNumber = 1) {
|
|
11133
|
+
fileName = path$9.resolve(fileName);
|
|
11134
|
+
if (process.platform === "linux" && fileName.startsWith("/mnt/") && /Microsoft/i.test(os$2.release())) fileName = `./${path$9.relative("", fileName)}`;
|
|
11135
|
+
if (!lineNumber) return [fileName];
|
|
11136
|
+
switch (path$9.basename(editor).replace(/\.(exe|cmd|bat)$/i, "")) {
|
|
10988
11137
|
case "atom":
|
|
10989
11138
|
case "Atom":
|
|
10990
11139
|
case "Atom Beta":
|
|
@@ -11059,7 +11208,42 @@ var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11059
11208
|
};
|
|
11060
11209
|
}));
|
|
11061
11210
|
//#endregion
|
|
11062
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
11211
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/construct-windows-launch-command.js
|
|
11212
|
+
var require_construct_windows_launch_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11213
|
+
function escapeCmdArgs(cmdArgs) {
|
|
11214
|
+
return cmdArgs.replace(/([&|<>,;=^])/g, "^$1");
|
|
11215
|
+
}
|
|
11216
|
+
function doubleQuoteIfNeeded(str) {
|
|
11217
|
+
if (str.includes("^")) return `^"${str}^"`;
|
|
11218
|
+
else if (str.includes(" ")) return `"${str}"`;
|
|
11219
|
+
return str;
|
|
11220
|
+
}
|
|
11221
|
+
function constructWindowsLaunchCommand(editor, args) {
|
|
11222
|
+
if (args.some((arg) => /[\r\n]/.test(arg))) throw new Error("Cannot launch an editor with an argument containing a line break");
|
|
11223
|
+
if (args.some((arg) => arg.includes("%"))) throw new Error("Cannot launch an editor with an argument containing \"%\"");
|
|
11224
|
+
return [editor, ...args.map(escapeCmdArgs)].map(doubleQuoteIfNeeded).join(" ");
|
|
11225
|
+
}
|
|
11226
|
+
module.exports = constructWindowsLaunchCommand;
|
|
11227
|
+
}));
|
|
11228
|
+
//#endregion
|
|
11229
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/parse-file.js
|
|
11230
|
+
var require_parse_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11231
|
+
const path$8 = __require("path");
|
|
11232
|
+
const positionRE = /:(\d+)(:(\d+))?$/;
|
|
11233
|
+
module.exports = function parseFile(file) {
|
|
11234
|
+
if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
|
|
11235
|
+
const unresolvedFileName = file.replace(positionRE, "");
|
|
11236
|
+
const fileName = unresolvedFileName ? path$8.resolve(unresolvedFileName) : "";
|
|
11237
|
+
const match = file.match(positionRE);
|
|
11238
|
+
return {
|
|
11239
|
+
fileName,
|
|
11240
|
+
lineNumber: match && match[1],
|
|
11241
|
+
columnNumber: match && match[3]
|
|
11242
|
+
};
|
|
11243
|
+
};
|
|
11244
|
+
}));
|
|
11245
|
+
//#endregion
|
|
11246
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/index.js
|
|
11063
11247
|
var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11064
11248
|
/**
|
|
11065
11249
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
@@ -11071,12 +11255,13 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
11071
11255
|
* Modified by Yuxi Evan You
|
|
11072
11256
|
*/
|
|
11073
11257
|
const fs$6 = __require("fs");
|
|
11074
|
-
const os$2 = __require("os");
|
|
11075
11258
|
const path$7 = __require("path");
|
|
11076
11259
|
const colors = require_picocolors();
|
|
11077
11260
|
const childProcess$1 = __require("child_process");
|
|
11078
11261
|
const guessEditor = require_guess();
|
|
11079
|
-
const
|
|
11262
|
+
const getArgumentsForFile = require_get_args();
|
|
11263
|
+
const constructWindowsLaunchCommand = require_construct_windows_launch_command();
|
|
11264
|
+
const parseFile = require_parse_file();
|
|
11080
11265
|
function wrapErrorCallback(cb) {
|
|
11081
11266
|
return (fileName, errorMessage) => {
|
|
11082
11267
|
console.log();
|
|
@@ -11097,55 +11282,36 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
11097
11282
|
}
|
|
11098
11283
|
return false;
|
|
11099
11284
|
}
|
|
11100
|
-
const positionRE = /:(\d+)(:(\d+))?$/;
|
|
11101
|
-
function parseFile(file) {
|
|
11102
|
-
if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
|
|
11103
|
-
const fileName = file.replace(positionRE, "");
|
|
11104
|
-
const match = file.match(positionRE);
|
|
11105
|
-
return {
|
|
11106
|
-
fileName,
|
|
11107
|
-
lineNumber: match && match[1],
|
|
11108
|
-
columnNumber: match && match[3]
|
|
11109
|
-
};
|
|
11110
|
-
}
|
|
11111
11285
|
let currentChildProcess = null;
|
|
11112
11286
|
function launchEditor(file, specifiedEditor, onErrorCallback) {
|
|
11113
|
-
const
|
|
11114
|
-
let { fileName } = parsed;
|
|
11115
|
-
const { lineNumber, columnNumber } = parsed;
|
|
11116
|
-
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.");
|
|
11117
|
-
if (!fs$6.existsSync(fileName)) return;
|
|
11287
|
+
const { fileName, lineNumber, columnNumber } = parseFile(file);
|
|
11118
11288
|
if (typeof specifiedEditor === "function") {
|
|
11119
11289
|
onErrorCallback = specifiedEditor;
|
|
11120
11290
|
specifiedEditor = void 0;
|
|
11121
11291
|
}
|
|
11122
11292
|
onErrorCallback = wrapErrorCallback(onErrorCallback);
|
|
11293
|
+
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.");
|
|
11294
|
+
if (!fs$6.existsSync(fileName)) return;
|
|
11123
11295
|
const [editor, ...args] = guessEditor(specifiedEditor);
|
|
11124
11296
|
if (!editor) {
|
|
11125
11297
|
onErrorCallback(fileName, null);
|
|
11126
11298
|
return;
|
|
11127
11299
|
}
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11300
|
+
const extraArgs = getArgumentsForFile(editor, fileName, lineNumber, columnNumber);
|
|
11301
|
+
args.push.apply(args, extraArgs);
|
|
11302
|
+
let launchCommand;
|
|
11303
|
+
if (process.platform === "win32") try {
|
|
11304
|
+
launchCommand = constructWindowsLaunchCommand(editor, args);
|
|
11305
|
+
} catch (error) {
|
|
11306
|
+
onErrorCallback(fileName, error.message);
|
|
11307
|
+
return;
|
|
11308
|
+
}
|
|
11133
11309
|
if (currentChildProcess && isTerminalEditor(editor)) currentChildProcess.kill("SIGKILL");
|
|
11134
|
-
if (process.platform === "win32") {
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
if (str.includes("^")) return `^"${str}^"`;
|
|
11140
|
-
else if (str.includes(" ")) return `"${str}"`;
|
|
11141
|
-
return str;
|
|
11142
|
-
}
|
|
11143
|
-
const launchCommand = [editor, ...args.map(escapeCmdArgs)].map(doubleQuoteIfNeeded).join(" ");
|
|
11144
|
-
currentChildProcess = childProcess$1.exec(launchCommand, {
|
|
11145
|
-
stdio: "inherit",
|
|
11146
|
-
shell: true
|
|
11147
|
-
});
|
|
11148
|
-
} else currentChildProcess = childProcess$1.spawn(editor, args, { stdio: "inherit" });
|
|
11310
|
+
if (process.platform === "win32") currentChildProcess = childProcess$1.exec(launchCommand, {
|
|
11311
|
+
stdio: "inherit",
|
|
11312
|
+
shell: true
|
|
11313
|
+
});
|
|
11314
|
+
else currentChildProcess = childProcess$1.spawn(editor, args, { stdio: "inherit" });
|
|
11149
11315
|
currentChildProcess.on("exit", function(errorCode) {
|
|
11150
11316
|
currentChildProcess = null;
|
|
11151
11317
|
if (errorCode) onErrorCallback(fileName, "(code " + errorCode + ")");
|
|
@@ -11159,7 +11325,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
11159
11325
|
module.exports = launchEditor;
|
|
11160
11326
|
}));
|
|
11161
11327
|
//#endregion
|
|
11162
|
-
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.14.
|
|
11328
|
+
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.14.2/node_modules/launch-editor-middleware/index.js
|
|
11163
11329
|
var require_launch_editor_middleware = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11164
11330
|
const path$6 = __require("path");
|
|
11165
11331
|
const launch = require_launch_editor();
|
|
@@ -24927,8 +25093,9 @@ function createDevHtmlTransformFn(config) {
|
|
|
24927
25093
|
};
|
|
24928
25094
|
}
|
|
24929
25095
|
function getHtmlFilename(url, server) {
|
|
24930
|
-
|
|
24931
|
-
|
|
25096
|
+
const urlPath = cleanUrl(url);
|
|
25097
|
+
if (urlPath.startsWith(FS_PREFIX)) return decodeURIComponent(fsPathFromId(urlPath));
|
|
25098
|
+
else return decodeURIComponent(normalizePath(path.join(server.config.root, urlPath.slice(1))));
|
|
24932
25099
|
}
|
|
24933
25100
|
function shouldPreTransform(url, config) {
|
|
24934
25101
|
return !checkPublicFile(url, config) && (isJSRequest(url) || isCSSRequest(url));
|
|
@@ -24940,6 +25107,7 @@ function isBareRelative(url) {
|
|
|
24940
25107
|
function getHtmlDirnameForRelativeUrl(htmlPath) {
|
|
24941
25108
|
return htmlPath.endsWith("/") ? htmlPath : path.posix.dirname(htmlPath);
|
|
24942
25109
|
}
|
|
25110
|
+
const multipleLeadingSlashesRE = /^\/{2,}/g;
|
|
24943
25111
|
const processNodeUrl = (url, useSrcSetReplacer, config, htmlPath, originalUrl, server, isClassicScriptLink) => {
|
|
24944
25112
|
const replacer = (url) => {
|
|
24945
25113
|
if (url[0] === "/" && url[1] !== "/" || (url[0] === "." || isBareRelative(url)) && originalUrl && originalUrl !== "/" && htmlPath === "/index.html") url = path.posix.join(config.base, url);
|
|
@@ -24965,6 +25133,7 @@ const processNodeUrl = (url, useSrcSetReplacer, config, htmlPath, originalUrl, s
|
|
|
24965
25133
|
return useSrcSetReplacer ? processSrcSetSync(url, ({ url }) => replacer(url)) : replacer(url);
|
|
24966
25134
|
};
|
|
24967
25135
|
const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl }) => {
|
|
25136
|
+
if (htmlPath.startsWith("//")) htmlPath = htmlPath.replace(multipleLeadingSlashesRE, "/");
|
|
24968
25137
|
const { config, watcher } = server;
|
|
24969
25138
|
const base = config.base || "/";
|
|
24970
25139
|
const decodedBase = config.decodedBase || "/";
|
|
@@ -27504,8 +27673,8 @@ function importAnalysisPlugin(config) {
|
|
|
27504
27673
|
if (specifier === clientPublicPath) return;
|
|
27505
27674
|
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.`);
|
|
27506
27675
|
let [url, resolvedId] = await normalizeUrl(specifier, start);
|
|
27676
|
+
if (resolvedId) config.safeModulePaths.add(cleanUrl(resolvedId));
|
|
27507
27677
|
resolvedId = resolvedId || url;
|
|
27508
|
-
config.safeModulePaths.add(fsPathFromUrl(stripBase(url, base)));
|
|
27509
27678
|
if (url !== specifier) {
|
|
27510
27679
|
let rewriteDone = false;
|
|
27511
27680
|
if (!depsOptimizer?.isOptimizedDepFile(importer) && depsOptimizer?.isOptimizedDepFile(resolvedId) && !optimizedDepChunkRE.test(resolvedId)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.6",
|
|
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": "^0.30.21",
|
|
98
98
|
"mlly": "^1.8.2",
|
|
99
99
|
"mrmime": "^2.0.1",
|