extension-develop 3.3.3-next.16 → 3.3.3-next.18
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/module.js +65 -12
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -131028,6 +131028,13 @@ var __webpack_modules__ = {
|
|
|
131028
131028
|
const execDir = path__rspack_import_0.dirname(process.execPath);
|
|
131029
131029
|
const candidate = path__rspack_import_0.join(execDir, 'npm.cmd');
|
|
131030
131030
|
if (fs__rspack_import_1.existsSync(candidate)) return candidate;
|
|
131031
|
+
const posixMatch = /^\/([a-z])\//i.exec(execDir);
|
|
131032
|
+
if (posixMatch) {
|
|
131033
|
+
const drive = posixMatch[1].toUpperCase();
|
|
131034
|
+
const winDir = `${drive}:\\${execDir.slice(3).replace(/\//g, '\\')}`;
|
|
131035
|
+
const winCandidate = path__rspack_import_0.join(winDir, 'npm.cmd');
|
|
131036
|
+
if (fs__rspack_import_1.existsSync(winCandidate)) return winCandidate;
|
|
131037
|
+
}
|
|
131031
131038
|
} catch {}
|
|
131032
131039
|
}
|
|
131033
131040
|
function resolveNpmCommand() {
|
|
@@ -131051,18 +131058,64 @@ var __webpack_modules__ = {
|
|
|
131051
131058
|
function isWindowsCmd(command) {
|
|
131052
131059
|
return 'win32' === process.platform && /\.(cmd|bat)$/i.test(command);
|
|
131053
131060
|
}
|
|
131061
|
+
function resolveWindowsCmdExe() {
|
|
131062
|
+
if ('win32' !== process.platform) return 'cmd.exe';
|
|
131063
|
+
const comspec = process.env.ComSpec;
|
|
131064
|
+
if (comspec && fs__rspack_import_1.existsSync(comspec)) return comspec;
|
|
131065
|
+
const systemRoot = process.env.SystemRoot || 'C:\\Windows';
|
|
131066
|
+
const fallback = path__rspack_import_0.join(systemRoot, 'System32', 'cmd.exe');
|
|
131067
|
+
if (fs__rspack_import_1.existsSync(fallback)) return fallback;
|
|
131068
|
+
return 'cmd.exe';
|
|
131069
|
+
}
|
|
131070
|
+
function formatCmdArgs(command, args) {
|
|
131071
|
+
const quotedCommand = command.includes(' ') ? `"${command}"` : command;
|
|
131072
|
+
const quotedArgs = args.map((arg)=>arg.includes(' ') ? `"${arg}"` : arg);
|
|
131073
|
+
return `${quotedCommand} ${quotedArgs.join(' ')}`.trim();
|
|
131074
|
+
}
|
|
131075
|
+
function shouldUseCmdExe(command) {
|
|
131076
|
+
if ('win32' !== process.platform) return false;
|
|
131077
|
+
if (isWindowsCmd(command)) return true;
|
|
131078
|
+
return [
|
|
131079
|
+
'npm',
|
|
131080
|
+
'pnpm',
|
|
131081
|
+
'yarn',
|
|
131082
|
+
'corepack',
|
|
131083
|
+
'bun'
|
|
131084
|
+
].includes(command);
|
|
131085
|
+
}
|
|
131054
131086
|
function execFileSyncSafe(command, args, options) {
|
|
131055
|
-
if (
|
|
131056
|
-
|
|
131057
|
-
|
|
131058
|
-
|
|
131059
|
-
|
|
131060
|
-
|
|
131061
|
-
|
|
131062
|
-
|
|
131063
|
-
|
|
131064
|
-
|
|
131065
|
-
|
|
131087
|
+
if (shouldUseCmdExe(command)) {
|
|
131088
|
+
const cmdExe = resolveWindowsCmdExe();
|
|
131089
|
+
(0, child_process__rspack_import_2.execFileSync)(cmdExe, [
|
|
131090
|
+
'/d',
|
|
131091
|
+
'/s',
|
|
131092
|
+
'/c',
|
|
131093
|
+
formatCmdArgs(command, args)
|
|
131094
|
+
], {
|
|
131095
|
+
...options,
|
|
131096
|
+
windowsHide: true
|
|
131097
|
+
});
|
|
131098
|
+
return;
|
|
131099
|
+
}
|
|
131100
|
+
try {
|
|
131101
|
+
(0, child_process__rspack_import_2.execFileSync)(command, args, options);
|
|
131102
|
+
} catch (error) {
|
|
131103
|
+
const err = error;
|
|
131104
|
+
if ('win32' === process.platform && err?.code === 'EINVAL') {
|
|
131105
|
+
const cmdExe = resolveWindowsCmdExe();
|
|
131106
|
+
(0, child_process__rspack_import_2.execFileSync)(cmdExe, [
|
|
131107
|
+
'/d',
|
|
131108
|
+
'/s',
|
|
131109
|
+
'/c',
|
|
131110
|
+
formatCmdArgs(command, args)
|
|
131111
|
+
], {
|
|
131112
|
+
...options,
|
|
131113
|
+
windowsHide: true
|
|
131114
|
+
});
|
|
131115
|
+
return;
|
|
131116
|
+
}
|
|
131117
|
+
throw error;
|
|
131118
|
+
}
|
|
131066
131119
|
}
|
|
131067
131120
|
function execInstallCommand(command, options) {
|
|
131068
131121
|
try {
|
|
@@ -133345,7 +133398,7 @@ var __webpack_modules__ = {
|
|
|
133345
133398
|
},
|
|
133346
133399
|
"./package.json" (module) {
|
|
133347
133400
|
"use strict";
|
|
133348
|
-
module.exports = JSON.parse('{"rE":"3.3.3-next.
|
|
133401
|
+
module.exports = JSON.parse('{"rE":"3.3.3-next.18","El":{"@rspack/core":"^1.7.2","@rspack/dev-server":"^1.1.5","@swc/core":"^1.15.8","@swc/helpers":"^0.5.18","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chrome-location2":"4.0.0","chromium-location":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","edge-location":"2.2.0","firefox-location2":"3.0.0","go-git-it":"^5.0.3","ignore":"^7.0.5","loader-utils":"^3.3.1","magic-string":"^0.30.21","parse5":"^8.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.3.3","tiny-glob":"^0.2.9","unique-names-generator":"^4.7.1","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.19.0"}}');
|
|
133349
133402
|
}
|
|
133350
133403
|
};
|
|
133351
133404
|
var __webpack_module_cache__ = {};
|
package/package.json
CHANGED