vite 7.3.2 → 7.3.5
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/LICENSE.md +1 -1
- package/dist/node/chunks/config.js +127 -51
- package/package.json +2 -2
package/LICENSE.md
CHANGED
|
@@ -1085,7 +1085,7 @@ Repository: https://github.com/lydell/js-tokens
|
|
|
1085
1085
|
## launch-editor, launch-editor-middleware
|
|
1086
1086
|
License: MIT
|
|
1087
1087
|
By: Evan You
|
|
1088
|
-
Repositories: https://github.com/
|
|
1088
|
+
Repositories: https://github.com/vitejs/launch-editor, https://github.com/vitejs/launch-editor
|
|
1089
1089
|
|
|
1090
1090
|
> The MIT License (MIT)
|
|
1091
1091
|
>
|
|
@@ -2284,11 +2284,11 @@ function processSrcSetSync(srcs, replacer) {
|
|
|
2284
2284
|
descriptor
|
|
2285
2285
|
})));
|
|
2286
2286
|
}
|
|
2287
|
-
const windowsDriveRE = /^[A-Z]:/;
|
|
2287
|
+
const windowsDriveRE$1 = /^[A-Z]:/;
|
|
2288
2288
|
const replaceWindowsDriveRE = /^([A-Z]):\//;
|
|
2289
2289
|
const linuxAbsolutePathRE = /^\/[^/]/;
|
|
2290
2290
|
function escapeToLinuxLikePath(path$13) {
|
|
2291
|
-
if (windowsDriveRE.test(path$13)) return path$13.replace(replaceWindowsDriveRE, "/windows/$1/");
|
|
2291
|
+
if (windowsDriveRE$1.test(path$13)) return path$13.replace(replaceWindowsDriveRE, "/windows/$1/");
|
|
2292
2292
|
if (linuxAbsolutePathRE.test(path$13)) return `/linux${path$13}`;
|
|
2293
2293
|
return path$13;
|
|
2294
2294
|
}
|
|
@@ -6212,6 +6212,21 @@ const buildEsbuildPlugin = () => {
|
|
|
6212
6212
|
}
|
|
6213
6213
|
};
|
|
6214
6214
|
};
|
|
6215
|
+
const destructuringBugRE = /^(safari|ios)(\d+)(?:\.(\d+))?$/;
|
|
6216
|
+
function needsDestructuringSupportedWorkaround(target) {
|
|
6217
|
+
if (!target) return false;
|
|
6218
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
6219
|
+
for (const t$1 of targets) {
|
|
6220
|
+
const match = destructuringBugRE.exec(t$1);
|
|
6221
|
+
if (!match) continue;
|
|
6222
|
+
const major = Number(match[2]);
|
|
6223
|
+
if (major < 10) continue;
|
|
6224
|
+
if (major < 14) return true;
|
|
6225
|
+
if (major > 14) continue;
|
|
6226
|
+
if ((match[3] ? Number(match[3]) : 0) < (match[1] === "safari" ? 1 : 5)) return true;
|
|
6227
|
+
}
|
|
6228
|
+
return false;
|
|
6229
|
+
}
|
|
6215
6230
|
function resolveEsbuildTranspileOptions(config$2, format$3) {
|
|
6216
6231
|
const target = config$2.build.target;
|
|
6217
6232
|
const minify = config$2.build.minify === "esbuild";
|
|
@@ -6225,6 +6240,7 @@ function resolveEsbuildTranspileOptions(config$2, format$3) {
|
|
|
6225
6240
|
format: rollupToEsbuildFormatMap[format$3],
|
|
6226
6241
|
supported: {
|
|
6227
6242
|
...defaultEsbuildSupported,
|
|
6243
|
+
...needsDestructuringSupportedWorkaround(target) ? { destructuring: true } : null,
|
|
6228
6244
|
...esbuildOptions.supported
|
|
6229
6245
|
}
|
|
6230
6246
|
};
|
|
@@ -14350,12 +14366,47 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14350
14366
|
}));
|
|
14351
14367
|
|
|
14352
14368
|
//#endregion
|
|
14353
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.8.
|
|
14369
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js
|
|
14354
14370
|
var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14371
|
+
var OPS = [
|
|
14372
|
+
"||",
|
|
14373
|
+
"&&",
|
|
14374
|
+
";;",
|
|
14375
|
+
"|&",
|
|
14376
|
+
"<(",
|
|
14377
|
+
"<<<",
|
|
14378
|
+
">>",
|
|
14379
|
+
">&",
|
|
14380
|
+
"<&",
|
|
14381
|
+
"&",
|
|
14382
|
+
";",
|
|
14383
|
+
"(",
|
|
14384
|
+
")",
|
|
14385
|
+
"|",
|
|
14386
|
+
"<",
|
|
14387
|
+
">"
|
|
14388
|
+
];
|
|
14389
|
+
var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
|
|
14390
|
+
var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|]/g;
|
|
14355
14391
|
module.exports = function quote(xs) {
|
|
14356
14392
|
return xs.map(function(s) {
|
|
14357
14393
|
if (s === "") return "''";
|
|
14358
|
-
if (s && typeof s === "object")
|
|
14394
|
+
if (s && typeof s === "object") {
|
|
14395
|
+
if (s.op === "glob") {
|
|
14396
|
+
if (typeof s.pattern !== "string") throw new TypeError("glob token requires a string `pattern`");
|
|
14397
|
+
if (LINE_TERMINATORS.test(s.pattern)) throw new TypeError("glob `pattern` must not contain line terminators");
|
|
14398
|
+
return s.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
|
|
14399
|
+
}
|
|
14400
|
+
if (typeof s.op === "string") {
|
|
14401
|
+
if (OPS.indexOf(s.op) < 0) throw new TypeError("invalid `op` value: " + JSON.stringify(s.op));
|
|
14402
|
+
return s.op.replace(/[\s\S]/g, "\\$&");
|
|
14403
|
+
}
|
|
14404
|
+
if (typeof s.comment === "string") {
|
|
14405
|
+
if (LINE_TERMINATORS.test(s.comment)) throw new TypeError("`comment` must not contain line terminators");
|
|
14406
|
+
return "#" + s.comment;
|
|
14407
|
+
}
|
|
14408
|
+
throw new TypeError("unrecognized object token shape");
|
|
14409
|
+
}
|
|
14359
14410
|
if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s.replace(/(['])/g, "\\$1") + "'";
|
|
14360
14411
|
if (/["'\s]/.test(s)) return "\"" + s.replace(/(["\\$`!])/g, "\\$1") + "\"";
|
|
14361
14412
|
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, "$1\\$2");
|
|
@@ -14364,7 +14415,7 @@ var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14364
14415
|
}));
|
|
14365
14416
|
|
|
14366
14417
|
//#endregion
|
|
14367
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.8.
|
|
14418
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js
|
|
14368
14419
|
var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14369
14420
|
var CONTROL = "(?:" + [
|
|
14370
14421
|
"\\|\\|",
|
|
@@ -14504,14 +14555,14 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14504
14555
|
}));
|
|
14505
14556
|
|
|
14506
14557
|
//#endregion
|
|
14507
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.8.
|
|
14558
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js
|
|
14508
14559
|
var require_shell_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14509
14560
|
exports.quote = require_quote();
|
|
14510
14561
|
exports.parse = require_parse$1();
|
|
14511
14562
|
}));
|
|
14512
14563
|
|
|
14513
14564
|
//#endregion
|
|
14514
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
14565
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js
|
|
14515
14566
|
var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14516
14567
|
module.exports = {
|
|
14517
14568
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
@@ -14521,11 +14572,14 @@ var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14521
14572
|
"/Applications/Sublime Text.app/Contents/MacOS/sublime_text": "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl",
|
|
14522
14573
|
"/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2": "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl",
|
|
14523
14574
|
"/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text": "/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl",
|
|
14575
|
+
"/Applications/Visual Studio Code.app/Contents/MacOS/Code": "code",
|
|
14524
14576
|
"/Applications/Visual Studio Code.app/Contents/MacOS/Electron": "code",
|
|
14577
|
+
"/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders": "code-insiders",
|
|
14525
14578
|
"/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron": "code-insiders",
|
|
14526
14579
|
"/Applications/VSCodium.app/Contents/MacOS/Electron": "codium",
|
|
14527
14580
|
"/Applications/Cursor.app/Contents/MacOS/Cursor": "cursor",
|
|
14528
14581
|
"/Applications/Trae.app/Contents/MacOS/Electron": "trae",
|
|
14582
|
+
"/Applications/Antigravity.app/Contents/MacOS/Electron": "antigravity",
|
|
14529
14583
|
"/Applications/AppCode.app/Contents/MacOS/appcode": "/Applications/AppCode.app/Contents/MacOS/appcode",
|
|
14530
14584
|
"/Applications/CLion.app/Contents/MacOS/clion": "/Applications/CLion.app/Contents/MacOS/clion",
|
|
14531
14585
|
"/Applications/IntelliJ IDEA.app/Contents/MacOS/idea": "/Applications/IntelliJ IDEA.app/Contents/MacOS/idea",
|
|
@@ -14544,7 +14598,7 @@ var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14544
14598
|
}));
|
|
14545
14599
|
|
|
14546
14600
|
//#endregion
|
|
14547
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
14601
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js
|
|
14548
14602
|
var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14549
14603
|
module.exports = {
|
|
14550
14604
|
atom: "atom",
|
|
@@ -14555,6 +14609,7 @@ var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14555
14609
|
codium: "codium",
|
|
14556
14610
|
cursor: "cursor",
|
|
14557
14611
|
trae: "trae",
|
|
14612
|
+
antigravity: "antigravity",
|
|
14558
14613
|
emacs: "emacs",
|
|
14559
14614
|
gvim: "gvim",
|
|
14560
14615
|
idea: "idea",
|
|
@@ -14578,7 +14633,7 @@ var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14578
14633
|
}));
|
|
14579
14634
|
|
|
14580
14635
|
//#endregion
|
|
14581
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
14636
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js
|
|
14582
14637
|
var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14583
14638
|
module.exports = [
|
|
14584
14639
|
"Brackets.exe",
|
|
@@ -14605,12 +14660,14 @@ var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14605
14660
|
"goland64.exe",
|
|
14606
14661
|
"rider.exe",
|
|
14607
14662
|
"rider64.exe",
|
|
14608
|
-
"
|
|
14663
|
+
"Trae.exe",
|
|
14664
|
+
"zed.exe",
|
|
14665
|
+
"Antigravity.exe"
|
|
14609
14666
|
];
|
|
14610
14667
|
}));
|
|
14611
14668
|
|
|
14612
14669
|
//#endregion
|
|
14613
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
14670
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js
|
|
14614
14671
|
var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14615
14672
|
const path$8 = __require("path");
|
|
14616
14673
|
const shellQuote = require_shell_quote();
|
|
@@ -14618,61 +14675,75 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14618
14675
|
const COMMON_EDITORS_MACOS = require_macos();
|
|
14619
14676
|
const COMMON_EDITORS_LINUX = require_linux();
|
|
14620
14677
|
const COMMON_EDITORS_WIN = require_windows$1();
|
|
14621
|
-
|
|
14678
|
+
function getEditorFromMacProcesses(output) {
|
|
14679
|
+
const processNames = Object.keys(COMMON_EDITORS_MACOS);
|
|
14680
|
+
const processList = output.split("\n");
|
|
14681
|
+
for (let i$1 = 0; i$1 < processNames.length; i$1++) {
|
|
14682
|
+
const processName = processNames[i$1];
|
|
14683
|
+
if (processList.includes(processName)) return COMMON_EDITORS_MACOS[processName];
|
|
14684
|
+
const processNameWithoutApplications = processName.replace("/Applications", "");
|
|
14685
|
+
if (output.indexOf(processNameWithoutApplications) !== -1) {
|
|
14686
|
+
if (processName !== COMMON_EDITORS_MACOS[processName]) return COMMON_EDITORS_MACOS[processName];
|
|
14687
|
+
const runningProcess = processList.find((procName) => procName.endsWith(processNameWithoutApplications));
|
|
14688
|
+
if (runningProcess !== void 0) return runningProcess;
|
|
14689
|
+
}
|
|
14690
|
+
}
|
|
14691
|
+
}
|
|
14692
|
+
function getEditorFromWindowsProcesses(output) {
|
|
14693
|
+
const runningProcesses = output.split("\r\n");
|
|
14694
|
+
for (let i$1 = 0; i$1 < runningProcesses.length; i$1++) {
|
|
14695
|
+
const fullProcessPath = runningProcesses[i$1].trim();
|
|
14696
|
+
const shortProcessName = path$8.win32.basename(fullProcessPath);
|
|
14697
|
+
if (COMMON_EDITORS_WIN.indexOf(shortProcessName) !== -1) return fullProcessPath;
|
|
14698
|
+
}
|
|
14699
|
+
}
|
|
14700
|
+
function getEditorFromLinuxProcesses(output) {
|
|
14701
|
+
const processNames = Object.keys(COMMON_EDITORS_LINUX);
|
|
14702
|
+
for (let i$1 = 0; i$1 < processNames.length; i$1++) {
|
|
14703
|
+
const processName = processNames[i$1];
|
|
14704
|
+
if (output.indexOf(processName) !== -1) return COMMON_EDITORS_LINUX[processName];
|
|
14705
|
+
}
|
|
14706
|
+
}
|
|
14707
|
+
function guessEditor$1(specifiedEditor) {
|
|
14622
14708
|
if (specifiedEditor) return shellQuote.parse(specifiedEditor);
|
|
14623
14709
|
if (process.env.LAUNCH_EDITOR) return [process.env.LAUNCH_EDITOR];
|
|
14624
14710
|
if (process.versions.webcontainer) return [process.env.EDITOR || "code"];
|
|
14625
14711
|
try {
|
|
14626
14712
|
if (process.platform === "darwin") {
|
|
14627
|
-
const
|
|
14713
|
+
const editor = getEditorFromMacProcesses(childProcess$2.execSync("ps x -o comm=", { stdio: [
|
|
14628
14714
|
"pipe",
|
|
14629
14715
|
"pipe",
|
|
14630
14716
|
"ignore"
|
|
14631
|
-
] }).toString();
|
|
14632
|
-
|
|
14633
|
-
const processList = output.split("\n");
|
|
14634
|
-
for (let i$1 = 0; i$1 < processNames.length; i$1++) {
|
|
14635
|
-
const processName = processNames[i$1];
|
|
14636
|
-
if (processList.includes(processName)) return [COMMON_EDITORS_MACOS[processName]];
|
|
14637
|
-
const processNameWithoutApplications = processName.replace("/Applications", "");
|
|
14638
|
-
if (output.indexOf(processNameWithoutApplications) !== -1) {
|
|
14639
|
-
if (processName !== COMMON_EDITORS_MACOS[processName]) return [COMMON_EDITORS_MACOS[processName]];
|
|
14640
|
-
const runningProcess = processList.find((procName) => procName.endsWith(processNameWithoutApplications));
|
|
14641
|
-
if (runningProcess !== void 0) return [runningProcess];
|
|
14642
|
-
}
|
|
14643
|
-
}
|
|
14717
|
+
] }).toString());
|
|
14718
|
+
if (editor !== void 0) return [editor];
|
|
14644
14719
|
} else if (process.platform === "win32") {
|
|
14645
|
-
const
|
|
14720
|
+
const editor = getEditorFromWindowsProcesses(childProcess$2.execSync("powershell -NoProfile -Command \"[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\\"select executablepath from win32_process where executablepath is not null\\\" | % { $_.ExecutablePath }\"", { stdio: [
|
|
14646
14721
|
"pipe",
|
|
14647
14722
|
"pipe",
|
|
14648
14723
|
"ignore"
|
|
14649
|
-
] }).toString()
|
|
14650
|
-
|
|
14651
|
-
const fullProcessPath = runningProcesses[i$1].trim();
|
|
14652
|
-
const shortProcessName = path$8.basename(fullProcessPath);
|
|
14653
|
-
if (COMMON_EDITORS_WIN.indexOf(shortProcessName) !== -1) return [fullProcessPath];
|
|
14654
|
-
}
|
|
14724
|
+
] }).toString());
|
|
14725
|
+
if (editor !== void 0) return [editor];
|
|
14655
14726
|
} else if (process.platform === "linux") {
|
|
14656
|
-
const
|
|
14727
|
+
const editor = getEditorFromLinuxProcesses(childProcess$2.execSync("ps x --no-heading -o comm --sort=comm", { stdio: [
|
|
14657
14728
|
"pipe",
|
|
14658
14729
|
"pipe",
|
|
14659
14730
|
"ignore"
|
|
14660
|
-
] }).toString();
|
|
14661
|
-
|
|
14662
|
-
for (let i$1 = 0; i$1 < processNames.length; i$1++) {
|
|
14663
|
-
const processName = processNames[i$1];
|
|
14664
|
-
if (output.indexOf(processName) !== -1) return [COMMON_EDITORS_LINUX[processName]];
|
|
14665
|
-
}
|
|
14731
|
+
] }).toString());
|
|
14732
|
+
if (editor !== void 0) return [editor];
|
|
14666
14733
|
}
|
|
14667
14734
|
} catch (ignoreError) {}
|
|
14668
14735
|
if (process.env.VISUAL) return [process.env.VISUAL];
|
|
14669
14736
|
else if (process.env.EDITOR) return [process.env.EDITOR];
|
|
14670
14737
|
return [null];
|
|
14671
|
-
}
|
|
14738
|
+
}
|
|
14739
|
+
module.exports = guessEditor$1;
|
|
14740
|
+
module.exports.getEditorFromMacProcesses = getEditorFromMacProcesses;
|
|
14741
|
+
module.exports.getEditorFromWindowsProcesses = getEditorFromWindowsProcesses;
|
|
14742
|
+
module.exports.getEditorFromLinuxProcesses = getEditorFromLinuxProcesses;
|
|
14672
14743
|
}));
|
|
14673
14744
|
|
|
14674
14745
|
//#endregion
|
|
14675
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
14746
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js
|
|
14676
14747
|
var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14677
14748
|
const path$7 = __require("path");
|
|
14678
14749
|
module.exports = function getArgumentsForPosition$1(editor, fileName, lineNumber, columnNumber = 1) {
|
|
@@ -14710,6 +14781,7 @@ var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14710
14781
|
case "Code - Insiders":
|
|
14711
14782
|
case "codium":
|
|
14712
14783
|
case "trae":
|
|
14784
|
+
case "antigravity":
|
|
14713
14785
|
case "cursor":
|
|
14714
14786
|
case "vscodium":
|
|
14715
14787
|
case "VSCodium": return [
|
|
@@ -14751,7 +14823,7 @@ var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14751
14823
|
}));
|
|
14752
14824
|
|
|
14753
14825
|
//#endregion
|
|
14754
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
14826
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js
|
|
14755
14827
|
var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14756
14828
|
/**
|
|
14757
14829
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
@@ -14800,11 +14872,12 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
14800
14872
|
columnNumber: match && match[3]
|
|
14801
14873
|
};
|
|
14802
14874
|
}
|
|
14803
|
-
let
|
|
14875
|
+
let currentChildProcess = null;
|
|
14804
14876
|
function launchEditor(file, specifiedEditor, onErrorCallback) {
|
|
14805
14877
|
const parsed = parseFile(file);
|
|
14806
14878
|
let { fileName } = parsed;
|
|
14807
14879
|
const { lineNumber, columnNumber } = parsed;
|
|
14880
|
+
if (process.platform === "win32" && path$6.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.");
|
|
14808
14881
|
if (!fs$5.existsSync(fileName)) return;
|
|
14809
14882
|
if (typeof specifiedEditor === "function") {
|
|
14810
14883
|
onErrorCallback = specifiedEditor;
|
|
@@ -14821,7 +14894,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
14821
14894
|
const extraArgs = getArgumentsForPosition(editor, fileName, lineNumber, columnNumber);
|
|
14822
14895
|
args.push.apply(args, extraArgs);
|
|
14823
14896
|
} else args.push(fileName);
|
|
14824
|
-
if (
|
|
14897
|
+
if (currentChildProcess && isTerminalEditor(editor)) currentChildProcess.kill("SIGKILL");
|
|
14825
14898
|
if (process.platform === "win32") {
|
|
14826
14899
|
function escapeCmdArgs(cmdArgs) {
|
|
14827
14900
|
return cmdArgs.replace(/([&|<>,;=^])/g, "^$1");
|
|
@@ -14832,16 +14905,16 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
14832
14905
|
return str;
|
|
14833
14906
|
}
|
|
14834
14907
|
const launchCommand = [editor, ...args.map(escapeCmdArgs)].map(doubleQuoteIfNeeded).join(" ");
|
|
14835
|
-
|
|
14908
|
+
currentChildProcess = childProcess$1.exec(launchCommand, {
|
|
14836
14909
|
stdio: "inherit",
|
|
14837
14910
|
shell: true
|
|
14838
14911
|
});
|
|
14839
|
-
} else
|
|
14840
|
-
|
|
14841
|
-
|
|
14912
|
+
} else currentChildProcess = childProcess$1.spawn(editor, args, { stdio: "inherit" });
|
|
14913
|
+
currentChildProcess.on("exit", function(errorCode) {
|
|
14914
|
+
currentChildProcess = null;
|
|
14842
14915
|
if (errorCode) onErrorCallback(fileName, "(code " + errorCode + ")");
|
|
14843
14916
|
});
|
|
14844
|
-
|
|
14917
|
+
currentChildProcess.on("error", function(error$1) {
|
|
14845
14918
|
let { code, message } = error$1;
|
|
14846
14919
|
if ("ENOENT" === code) message = `${message} ('${editor}' command does not exist in 'PATH')`;
|
|
14847
14920
|
onErrorCallback(fileName, message);
|
|
@@ -14851,7 +14924,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
14851
14924
|
}));
|
|
14852
14925
|
|
|
14853
14926
|
//#endregion
|
|
14854
|
-
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.
|
|
14927
|
+
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js
|
|
14855
14928
|
var require_launch_editor_middleware = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14856
14929
|
const path$5 = __require("path");
|
|
14857
14930
|
const launch = require_launch_editor();
|
|
@@ -22499,12 +22572,15 @@ function isFileServingAllowed(configOrUrl, urlOrServer) {
|
|
|
22499
22572
|
function isFileInTargetPath(targetPath, filePath) {
|
|
22500
22573
|
return isSameFilePath(targetPath, filePath) || isParentDirectory(targetPath, filePath);
|
|
22501
22574
|
}
|
|
22575
|
+
const windowsDriveRE = /^[A-Z]:/i;
|
|
22502
22576
|
/**
|
|
22503
22577
|
* Warning: parameters are not validated, only works with normalized absolute paths
|
|
22504
22578
|
*/
|
|
22505
22579
|
function isFileLoadingAllowed(config$2, filePath) {
|
|
22506
22580
|
const { fs: fs$12 } = config$2.server;
|
|
22507
22581
|
if (!fs$12.strict) return true;
|
|
22582
|
+
if (isWindows && filePath.includes("~")) return false;
|
|
22583
|
+
if ((isWindows && windowsDriveRE.test(filePath) ? filePath.slice(2) : filePath).includes(":")) return false;
|
|
22508
22584
|
const filePathWithoutTrailingSlash = filePath.endsWith("/") ? filePath.slice(0, -1) : filePath;
|
|
22509
22585
|
if (config$2.fsDenyGlob(filePathWithoutTrailingSlash)) return false;
|
|
22510
22586
|
if (config$2.safeModulePaths.has(filePath)) return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"etag": "^1.8.1",
|
|
109
109
|
"host-validation-middleware": "^0.1.2",
|
|
110
110
|
"http-proxy-3": "^1.22.0",
|
|
111
|
-
"launch-editor-middleware": "^2.
|
|
111
|
+
"launch-editor-middleware": "^2.14.1",
|
|
112
112
|
"lightningcss": "^1.30.2",
|
|
113
113
|
"magic-string": "^0.30.21",
|
|
114
114
|
"mlly": "^1.8.0",
|