extension-develop 3.6.3 → 3.7.0-canary.170.2b1f54a
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/323.cjs +48 -21
- package/dist/535.cjs +72 -9
- package/dist/928.cjs +7 -3
- package/dist/module.cjs +451 -176
- package/package.json +2 -1
package/dist/module.cjs
CHANGED
|
@@ -127339,8 +127339,7 @@ var __webpack_modules__ = {
|
|
|
127339
127339
|
});
|
|
127340
127340
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
127341
127341
|
var path__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(path__rspack_import_0);
|
|
127342
|
-
var
|
|
127343
|
-
var browser_extension_manifest_fields__rspack_import_2 = __webpack_require__("browser-extension-manifest-fields");
|
|
127342
|
+
var browser_extension_manifest_fields__rspack_import_1 = __webpack_require__("browser-extension-manifest-fields");
|
|
127344
127343
|
function isUnderPublicDir(entry, projectRoot, publicDir) {
|
|
127345
127344
|
if (!entry) return false;
|
|
127346
127345
|
const normalizedEntry = String(entry);
|
|
@@ -127366,14 +127365,14 @@ var __webpack_modules__ = {
|
|
|
127366
127365
|
function getSpecialFoldersDataForCompiler(compiler) {
|
|
127367
127366
|
const projectRoot = compiler.options.context || '';
|
|
127368
127367
|
const publicDir = path__rspack_import_0_default().join(projectRoot, 'public');
|
|
127369
|
-
const data = (0,
|
|
127368
|
+
const data = (0, browser_extension_manifest_fields__rspack_import_1.getSpecialFoldersData)({
|
|
127370
127369
|
manifestPath: path__rspack_import_0_default().join(projectRoot, 'package.json')
|
|
127371
127370
|
});
|
|
127372
127371
|
return finalizeSpecialFoldersData(data, projectRoot, publicDir);
|
|
127373
127372
|
}
|
|
127374
127373
|
function getSpecialFoldersDataForProjectRoot(projectRoot) {
|
|
127375
127374
|
const publicDir = path__rspack_import_0_default().join(projectRoot, 'public');
|
|
127376
|
-
const data = (0,
|
|
127375
|
+
const data = (0, browser_extension_manifest_fields__rspack_import_1.getSpecialFoldersData)({
|
|
127377
127376
|
manifestPath: path__rspack_import_0_default().join(projectRoot, 'package.json')
|
|
127378
127377
|
});
|
|
127379
127378
|
return finalizeSpecialFoldersData(data, projectRoot, publicDir);
|
|
@@ -127383,40 +127382,22 @@ var __webpack_modules__ = {
|
|
|
127383
127382
|
...data,
|
|
127384
127383
|
pages: filterPublicEntrypoints(data.pages, projectRoot, publicDir),
|
|
127385
127384
|
scripts: filterPublicEntrypoints(data.scripts, projectRoot, publicDir),
|
|
127386
|
-
extensions:
|
|
127385
|
+
extensions: void 0
|
|
127387
127386
|
};
|
|
127388
127387
|
}
|
|
127389
|
-
function getLocalExtensionsConfig(projectRoot) {
|
|
127390
|
-
if (!projectRoot) return;
|
|
127391
|
-
const extensionsDir = path__rspack_import_0_default().join(projectRoot, 'extensions');
|
|
127392
|
-
try {
|
|
127393
|
-
if (fs__rspack_import_1.existsSync(extensionsDir) && fs__rspack_import_1.statSync(extensionsDir).isDirectory()) return {
|
|
127394
|
-
dir: './extensions'
|
|
127395
|
-
};
|
|
127396
|
-
} catch {}
|
|
127397
|
-
}
|
|
127398
127388
|
},
|
|
127399
127389
|
"./webpack/plugin-browsers/browsers-lib/banner.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
127400
127390
|
"use strict";
|
|
127401
127391
|
__webpack_require__.d(__webpack_exports__, {
|
|
127402
|
-
|
|
127403
|
-
|
|
127392
|
+
M: ()=>printProdBannerOnce,
|
|
127393
|
+
a: ()=>printDevBannerOnce
|
|
127404
127394
|
});
|
|
127405
|
-
var
|
|
127406
|
-
var
|
|
127407
|
-
var
|
|
127408
|
-
var
|
|
127409
|
-
|
|
127410
|
-
|
|
127411
|
-
pendingCompilationLine: ''
|
|
127412
|
-
};
|
|
127413
|
-
function markBannerPrinted() {
|
|
127414
|
-
sharedState.bannerPrinted = true;
|
|
127415
|
-
if (sharedState.pendingCompilationLine) {
|
|
127416
|
-
console.log(sharedState.pendingCompilationLine);
|
|
127417
|
-
sharedState.pendingCompilationLine = '';
|
|
127418
|
-
}
|
|
127419
|
-
}
|
|
127395
|
+
var fs__rspack_import_0 = __webpack_require__("fs");
|
|
127396
|
+
var path__rspack_import_1 = __webpack_require__("path");
|
|
127397
|
+
var crypto__rspack_import_2 = __webpack_require__("crypto");
|
|
127398
|
+
var _messages__rspack_import_3 = __webpack_require__("./webpack/plugin-browsers/browsers-lib/messages.ts");
|
|
127399
|
+
var _webpack_lib_messages__rspack_import_4 = __webpack_require__("./webpack/webpack-lib/messages.ts");
|
|
127400
|
+
var _plugin_compilation_compilation_lib_shared_state__rspack_import_5 = __webpack_require__("./webpack/plugin-compilation/compilation-lib/shared-state.ts");
|
|
127420
127401
|
const printedKeys = new Set();
|
|
127421
127402
|
function readUpdateSuffixOnce() {
|
|
127422
127403
|
const suffix = process.env.EXTENSION_CLI_UPDATE_SUFFIX;
|
|
@@ -127427,17 +127408,67 @@ var __webpack_modules__ = {
|
|
|
127427
127408
|
function keyFor(browser, outPath, hp) {
|
|
127428
127409
|
const host = (hp?.host || '127.0.0.1').toString();
|
|
127429
127410
|
const port = hp?.port == null ? '' : String(hp.port);
|
|
127430
|
-
return `${browser}::${
|
|
127411
|
+
return `${browser}::${path__rspack_import_1.resolve(outPath)}::${host}:${port}`;
|
|
127412
|
+
}
|
|
127413
|
+
function toNormalizedId(value) {
|
|
127414
|
+
if ('string' != typeof value) return '';
|
|
127415
|
+
return value.trim();
|
|
127416
|
+
}
|
|
127417
|
+
function deriveChromiumExtensionIdFromManifest(manifest) {
|
|
127418
|
+
const key = toNormalizedId(manifest?.key);
|
|
127419
|
+
if (!key) return '';
|
|
127420
|
+
try {
|
|
127421
|
+
const decodedKey = Buffer.from(key.replace(/\s+/g, ''), 'base64');
|
|
127422
|
+
if (!decodedKey.length) return '';
|
|
127423
|
+
const digest = (0, crypto__rspack_import_2.createHash)('sha256').update(decodedKey).digest().subarray(0, 16);
|
|
127424
|
+
let extensionId = '';
|
|
127425
|
+
for (const byte of digest){
|
|
127426
|
+
extensionId += String.fromCharCode(97 + (byte >> 4 & 0x0f));
|
|
127427
|
+
extensionId += String.fromCharCode(97 + (0x0f & byte));
|
|
127428
|
+
}
|
|
127429
|
+
return extensionId;
|
|
127430
|
+
} catch {
|
|
127431
|
+
return '';
|
|
127432
|
+
}
|
|
127433
|
+
}
|
|
127434
|
+
function deriveFirefoxExtensionIdFromManifest(manifest) {
|
|
127435
|
+
const fromBrowserSpecificSettings = toNormalizedId(manifest?.browser_specific_settings?.gecko?.id);
|
|
127436
|
+
if (fromBrowserSpecificSettings) return fromBrowserSpecificSettings;
|
|
127437
|
+
return toNormalizedId(manifest?.applications?.gecko?.id);
|
|
127438
|
+
}
|
|
127439
|
+
function resolveExtensionId(args) {
|
|
127440
|
+
const fromInfo = toNormalizedId(args.info?.extensionId);
|
|
127441
|
+
if (fromInfo) return fromInfo;
|
|
127442
|
+
const fromFallback = toNormalizedId(args.fallback?.extensionId);
|
|
127443
|
+
if (fromFallback) return fromFallback;
|
|
127444
|
+
if ('chrome' === args.browser || 'edge' === args.browser || 'chromium' === args.browser || 'chromium-based' === args.browser) return deriveChromiumExtensionIdFromManifest(args.manifest);
|
|
127445
|
+
if ('firefox' === args.browser || 'firefox-based' === args.browser) return deriveFirefoxExtensionIdFromManifest(args.manifest);
|
|
127446
|
+
return '';
|
|
127431
127447
|
}
|
|
127432
127448
|
async function printDevBannerOnce(opts) {
|
|
127433
127449
|
const k = keyFor(opts.browser, opts.outPath, opts.hostPort);
|
|
127434
127450
|
if (printedKeys.has(k)) return false;
|
|
127435
|
-
const
|
|
127436
|
-
const manifestPath = external_path_.join(opts.outPath, 'manifest.json');
|
|
127451
|
+
const manifestPath = path__rspack_import_1.join(opts.outPath, 'manifest.json');
|
|
127437
127452
|
const updateSuffix = readUpdateSuffixOnce();
|
|
127438
|
-
if (!
|
|
127439
|
-
const manifest = JSON.parse(
|
|
127440
|
-
const
|
|
127453
|
+
if (!fs__rspack_import_0.existsSync(manifestPath)) return false;
|
|
127454
|
+
const manifest = JSON.parse(fs__rspack_import_0.readFileSync(manifestPath, 'utf-8'));
|
|
127455
|
+
const manifestDerivedExtensionId = resolveExtensionId({
|
|
127456
|
+
browser: opts.browser,
|
|
127457
|
+
info: null,
|
|
127458
|
+
fallback: opts.fallback,
|
|
127459
|
+
manifest
|
|
127460
|
+
});
|
|
127461
|
+
const info = manifestDerivedExtensionId ? await Promise.race([
|
|
127462
|
+
opts.getInfo().catch(()=>null),
|
|
127463
|
+
new Promise((resolve)=>setTimeout(()=>resolve(null), 250))
|
|
127464
|
+
]) : await opts.getInfo().catch(()=>null);
|
|
127465
|
+
const extensionId = resolveExtensionId({
|
|
127466
|
+
browser: opts.browser,
|
|
127467
|
+
info,
|
|
127468
|
+
fallback: opts.fallback,
|
|
127469
|
+
manifest
|
|
127470
|
+
});
|
|
127471
|
+
if (!extensionId) return false;
|
|
127441
127472
|
const name = info?.name || opts.fallback?.name || manifest.name;
|
|
127442
127473
|
const version1 = info?.version || opts.fallback?.version || manifest.version;
|
|
127443
127474
|
const message = {
|
|
@@ -127449,10 +127480,10 @@ var __webpack_modules__ = {
|
|
|
127449
127480
|
}
|
|
127450
127481
|
}
|
|
127451
127482
|
};
|
|
127452
|
-
console.log(
|
|
127453
|
-
console.log(
|
|
127454
|
-
console.log(
|
|
127455
|
-
|
|
127483
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127484
|
+
console.log(_messages__rspack_import_3.e_P(manifest, opts.browser, message, opts.browserVersionLine, updateSuffix || void 0));
|
|
127485
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127486
|
+
(0, _plugin_compilation_compilation_lib_shared_state__rspack_import_5.If)();
|
|
127456
127487
|
process.env.EXTENSION_CLI_BANNER_PRINTED = 'true';
|
|
127457
127488
|
printedKeys.add(k);
|
|
127458
127489
|
return true;
|
|
@@ -127463,23 +127494,33 @@ var __webpack_modules__ = {
|
|
|
127463
127494
|
const browserLabel = opts.browserVersionLine && opts.browserVersionLine.trim().length > 0 ? opts.browserVersionLine.trim() : String(opts.browser || 'unknown');
|
|
127464
127495
|
const updateSuffix = readUpdateSuffixOnce();
|
|
127465
127496
|
try {
|
|
127466
|
-
const manifestPath =
|
|
127467
|
-
const manifest = JSON.parse(
|
|
127468
|
-
|
|
127497
|
+
const manifestPath = path__rspack_import_1.join(opts.outPath, 'manifest.json');
|
|
127498
|
+
const manifest = JSON.parse(fs__rspack_import_0.readFileSync(manifestPath, 'utf-8'));
|
|
127499
|
+
const runtimeInfo = opts.runtime ? {
|
|
127500
|
+
extensionId: opts.runtime.extensionId,
|
|
127501
|
+
name: opts.runtime.name,
|
|
127502
|
+
version: opts.runtime.version
|
|
127503
|
+
} : null;
|
|
127504
|
+
const resolvedExtensionId = resolveExtensionId({
|
|
127505
|
+
browser: opts.browser,
|
|
127506
|
+
info: runtimeInfo,
|
|
127507
|
+
manifest
|
|
127508
|
+
});
|
|
127509
|
+
if (resolvedExtensionId) {
|
|
127469
127510
|
const message = {
|
|
127470
127511
|
data: {
|
|
127471
|
-
id:
|
|
127512
|
+
id: resolvedExtensionId,
|
|
127472
127513
|
management: {
|
|
127473
|
-
name: opts.runtime
|
|
127474
|
-
version: opts.runtime
|
|
127514
|
+
name: opts.runtime?.name || manifest.name,
|
|
127515
|
+
version: opts.runtime?.version || manifest.version
|
|
127475
127516
|
}
|
|
127476
127517
|
}
|
|
127477
127518
|
};
|
|
127478
|
-
console.log(
|
|
127479
|
-
console.log(
|
|
127519
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127520
|
+
console.log(_messages__rspack_import_3.e_P(manifest, opts.browser, message, browserLabel, updateSuffix || void 0, {
|
|
127480
127521
|
includeExtensionId: opts.includeExtensionId
|
|
127481
127522
|
}));
|
|
127482
|
-
console.log(
|
|
127523
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127483
127524
|
} else {
|
|
127484
127525
|
const message = {
|
|
127485
127526
|
data: {
|
|
@@ -127490,18 +127531,18 @@ var __webpack_modules__ = {
|
|
|
127490
127531
|
}
|
|
127491
127532
|
}
|
|
127492
127533
|
};
|
|
127493
|
-
console.log(
|
|
127494
|
-
console.log(
|
|
127534
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127535
|
+
console.log(_messages__rspack_import_3.e_P(manifest, opts.browser, message, browserLabel, updateSuffix || void 0, {
|
|
127495
127536
|
includeExtensionId: opts.includeExtensionId
|
|
127496
127537
|
}));
|
|
127497
|
-
console.log(
|
|
127538
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127498
127539
|
}
|
|
127499
127540
|
} catch {
|
|
127500
|
-
console.log(
|
|
127501
|
-
console.log(
|
|
127502
|
-
console.log(
|
|
127541
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127542
|
+
console.log(_webpack_lib_messages__rspack_import_4.Al(opts.outPath, browserLabel));
|
|
127543
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127503
127544
|
}
|
|
127504
|
-
|
|
127545
|
+
(0, _plugin_compilation_compilation_lib_shared_state__rspack_import_5.If)();
|
|
127505
127546
|
process.env.EXTENSION_CLI_BANNER_PRINTED = 'true';
|
|
127506
127547
|
printedKeys.add(k);
|
|
127507
127548
|
return true;
|
|
@@ -127679,27 +127720,28 @@ var __webpack_modules__ = {
|
|
|
127679
127720
|
});
|
|
127680
127721
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
127681
127722
|
var fs__rspack_import_1 = __webpack_require__("fs");
|
|
127682
|
-
var
|
|
127683
|
-
var
|
|
127684
|
-
var
|
|
127685
|
-
var
|
|
127686
|
-
var
|
|
127687
|
-
var
|
|
127688
|
-
var
|
|
127689
|
-
var
|
|
127690
|
-
var
|
|
127691
|
-
var
|
|
127692
|
-
|
|
127723
|
+
var os__rspack_import_2 = __webpack_require__("os");
|
|
127724
|
+
var module__rspack_import_3 = __webpack_require__("module");
|
|
127725
|
+
var pintor__rspack_import_4 = __webpack_require__("pintor");
|
|
127726
|
+
var pintor__rspack_import_4_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_4);
|
|
127727
|
+
var chrome_location2__rspack_import_5 = __webpack_require__("chrome-location2");
|
|
127728
|
+
var chromium_location__rspack_import_6 = __webpack_require__("chromium-location");
|
|
127729
|
+
var chromium_location__rspack_import_6_default = /*#__PURE__*/ __webpack_require__.n(chromium_location__rspack_import_6);
|
|
127730
|
+
var edge_location__rspack_import_7 = __webpack_require__("edge-location");
|
|
127731
|
+
var edge_location__rspack_import_7_default = /*#__PURE__*/ __webpack_require__.n(edge_location__rspack_import_7);
|
|
127732
|
+
var firefox_location2__rspack_import_8 = __webpack_require__("firefox-location2");
|
|
127733
|
+
var firefox_location2__rspack_import_8_default = /*#__PURE__*/ __webpack_require__.n(firefox_location2__rspack_import_8);
|
|
127734
|
+
const require1 = (0, module__rspack_import_3.createRequire)(__rslib_import_meta_url__);
|
|
127693
127735
|
function getLoggingPrefix(type) {
|
|
127694
127736
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
127695
127737
|
if (isAuthor) {
|
|
127696
127738
|
const base = 'error' === type ? 'ERROR Author says' : '►►► Author says';
|
|
127697
|
-
return
|
|
127739
|
+
return pintor__rspack_import_4_default().brightMagenta(base);
|
|
127698
127740
|
}
|
|
127699
|
-
if ('error' === type) return
|
|
127700
|
-
if ('warn' === type) return
|
|
127701
|
-
if ('info' === type) return
|
|
127702
|
-
return
|
|
127741
|
+
if ('error' === type) return pintor__rspack_import_4_default().red('ERROR');
|
|
127742
|
+
if ('warn' === type) return pintor__rspack_import_4_default().brightYellow('►►►');
|
|
127743
|
+
if ('info' === type) return pintor__rspack_import_4_default().gray('►►►');
|
|
127744
|
+
return pintor__rspack_import_4_default().green('►►►');
|
|
127703
127745
|
}
|
|
127704
127746
|
function errorDetail(error) {
|
|
127705
127747
|
if ('1' === process.env.EXTENSION_DEBUG) return String(error);
|
|
@@ -127707,22 +127749,23 @@ var __webpack_modules__ = {
|
|
|
127707
127749
|
return String(maybe || error);
|
|
127708
127750
|
}
|
|
127709
127751
|
function isWsl() {
|
|
127752
|
+
if ('linux' !== process.platform) return false;
|
|
127710
127753
|
const hasEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
127711
127754
|
if (hasEnv) return true;
|
|
127712
|
-
return
|
|
127755
|
+
return /microsoft/i.test(os__rspack_import_2.release());
|
|
127713
127756
|
}
|
|
127714
127757
|
function capitalizedBrowserName(browser) {
|
|
127715
127758
|
return `${browser.charAt(0).toUpperCase() + browser.slice(1)}`;
|
|
127716
127759
|
}
|
|
127717
127760
|
function creatingUserProfile(profilePath) {
|
|
127718
|
-
return `${getLoggingPrefix('info')} Creating a fresh user profile at ${
|
|
127761
|
+
return `${getLoggingPrefix('info')} Creating a fresh user profile at ${pintor__rspack_import_4_default().underline(profilePath)}...`;
|
|
127719
127762
|
}
|
|
127720
127763
|
function browserInstanceExited(browser) {
|
|
127721
127764
|
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} instance exited.`;
|
|
127722
127765
|
}
|
|
127723
127766
|
function stdoutData(browser, mode) {
|
|
127724
127767
|
const extensionOutput = 'firefox' === browser || 'gecko-based' === browser ? 'Add-on' : 'Extension';
|
|
127725
|
-
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} ${extensionOutput} running in ${
|
|
127768
|
+
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} ${extensionOutput} running in ${pintor__rspack_import_4_default().green(mode || 'unknown')} mode.`;
|
|
127726
127769
|
}
|
|
127727
127770
|
function cdpClientAttachedToTarget(sessionId, targetType) {
|
|
127728
127771
|
return `${getLoggingPrefix('info')} Attached to target: ${targetType} (session ${sessionId})`;
|
|
@@ -127760,12 +127803,12 @@ var __webpack_modules__ = {
|
|
|
127760
127803
|
const wslHint = (()=>{
|
|
127761
127804
|
if (!isWsl()) return '';
|
|
127762
127805
|
const example = '/mnt/c/Program Files/Google/Chrome/Application/chrome.exe';
|
|
127763
|
-
return `\n\n${getLoggingPrefix('info')} WSL detected\n- Install a Linux browser in WSL, or\n- Provide a Windows binary path via ${
|
|
127806
|
+
return `\n\n${getLoggingPrefix('info')} WSL detected\n- Install a Linux browser in WSL, or\n- Provide a Windows binary path via ${pintor__rspack_import_4_default().blue('--chromium-binary')} ${pintor__rspack_import_4_default().gray(`\"${example}\"`)}\n (Tip: a shell alias like ${pintor__rspack_import_4_default().gray('google-chrome=...')} won't be used by Extension.js; use a real path or wrapper script.)`;
|
|
127764
127807
|
})();
|
|
127765
|
-
return `${getLoggingPrefix('error')} ${isUnreachable}Either install the missing browser or choose a different one via ${
|
|
127808
|
+
return `${getLoggingPrefix('error')} ${isUnreachable}Either install the missing browser or choose a different one via ${pintor__rspack_import_4_default().blue('--browser')} ${pintor__rspack_import_4_default().gray('<chrome|edge|firefox>')}.\n\n${pintor__rspack_import_4_default().red('NOT FOUND')} ${pintor__rspack_import_4_default().underline(browserBinaryLocation || capitalizedBrowserName(browser) + 'BROWSER')}` + wslHint;
|
|
127766
127809
|
}
|
|
127767
127810
|
function browserLaunchError(browser, error) {
|
|
127768
|
-
return `${getLoggingPrefix('error')} Error launching ${capitalizedBrowserName(browser)}:\n${
|
|
127811
|
+
return `${getLoggingPrefix('error')} Error launching ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127769
127812
|
}
|
|
127770
127813
|
function enhancedProcessManagementCleanup(browser) {
|
|
127771
127814
|
return `${getLoggingPrefix('info')} Process Management cleanup for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127777,22 +127820,22 @@ var __webpack_modules__ = {
|
|
|
127777
127820
|
return `${getLoggingPrefix('error')} Force killing ${capitalizedBrowserName(browser)} process after timeout`;
|
|
127778
127821
|
}
|
|
127779
127822
|
function enhancedProcessManagementCleanupError(browser, error) {
|
|
127780
|
-
return `${getLoggingPrefix('error')} Error during ${capitalizedBrowserName(browser)} cleanup:\n${
|
|
127823
|
+
return `${getLoggingPrefix('error')} Error during ${capitalizedBrowserName(browser)} cleanup:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127781
127824
|
}
|
|
127782
127825
|
function enhancedProcessManagementUncaughtException(browser, error) {
|
|
127783
|
-
return `${getLoggingPrefix('error')} Uncaught exception in ${capitalizedBrowserName(browser)} process:\n${
|
|
127826
|
+
return `${getLoggingPrefix('error')} Uncaught exception in ${capitalizedBrowserName(browser)} process:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127784
127827
|
}
|
|
127785
127828
|
function enhancedProcessManagementUnhandledRejection(browser, reason) {
|
|
127786
|
-
return `${getLoggingPrefix('error')} Unhandled rejection in ${capitalizedBrowserName(browser)} process:\n${
|
|
127829
|
+
return `${getLoggingPrefix('error')} Unhandled rejection in ${capitalizedBrowserName(browser)} process:\n${pintor__rspack_import_4_default().red(errorDetail(reason))}`;
|
|
127787
127830
|
}
|
|
127788
127831
|
function generalBrowserError(browser, error) {
|
|
127789
|
-
return `${getLoggingPrefix('error')} General error in ${capitalizedBrowserName(browser)}:\n${
|
|
127832
|
+
return `${getLoggingPrefix('error')} General error in ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127790
127833
|
}
|
|
127791
127834
|
function errorConnectingToBrowser(browser) {
|
|
127792
127835
|
return `${getLoggingPrefix('error')} Unable to connect to ${capitalizedBrowserName(browser)}. Too many retries.`;
|
|
127793
127836
|
}
|
|
127794
127837
|
function addonInstallError(browser, message) {
|
|
127795
|
-
return `${getLoggingPrefix('error')} Can't install add-on into ${capitalizedBrowserName(browser)}:\n${
|
|
127838
|
+
return `${getLoggingPrefix('error')} Can't install add-on into ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(message)}`;
|
|
127796
127839
|
}
|
|
127797
127840
|
function messagingClientClosedError(browser) {
|
|
127798
127841
|
return `${getLoggingPrefix('error')} Messaging client closed unexpectedly for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127801,25 +127844,25 @@ var __webpack_modules__ = {
|
|
|
127801
127844
|
return `${getLoggingPrefix('error')} Connection closed unexpectedly for ${capitalizedBrowserName(browser)}`;
|
|
127802
127845
|
}
|
|
127803
127846
|
function targetActorHasActiveRequestError(browser, targetActor) {
|
|
127804
|
-
return `${getLoggingPrefix('error')} Target actor ${
|
|
127847
|
+
return `${getLoggingPrefix('error')} Target actor ${pintor__rspack_import_4_default().gray(targetActor)} has active request for ${capitalizedBrowserName(browser)}`;
|
|
127805
127848
|
}
|
|
127806
127849
|
function parsingPacketError(browser, error) {
|
|
127807
|
-
return `${getLoggingPrefix('error')} Failed to parse packet from ${capitalizedBrowserName(browser)}:\n${
|
|
127850
|
+
return `${getLoggingPrefix('error')} Failed to parse packet from ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127808
127851
|
}
|
|
127809
127852
|
function messageWithoutSenderError(browser, message) {
|
|
127810
|
-
return `${getLoggingPrefix('error')} Message without sender from ${capitalizedBrowserName(browser)}:\n${
|
|
127853
|
+
return `${getLoggingPrefix('error')} Message without sender from ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(JSON.stringify(message))}`;
|
|
127811
127854
|
}
|
|
127812
127855
|
function profileFallbackWarning(browser, reason) {
|
|
127813
|
-
return `${getLoggingPrefix('warn')} ${capitalizedBrowserName(browser)} falling back to per-instance profile` + (reason ? `: ${
|
|
127856
|
+
return `${getLoggingPrefix('warn')} ${capitalizedBrowserName(browser)} falling back to per-instance profile` + (reason ? `: ${pintor__rspack_import_4_default().gray(reason)}` : '');
|
|
127814
127857
|
}
|
|
127815
127858
|
function chromeProcessExited(code) {
|
|
127816
|
-
return `${getLoggingPrefix('info')} Chrome process exited with code: ${
|
|
127859
|
+
return `${getLoggingPrefix('info')} Chrome process exited with code: ${pintor__rspack_import_4_default().gray(code.toString())}`;
|
|
127817
127860
|
}
|
|
127818
127861
|
function chromeProcessError(error) {
|
|
127819
|
-
return `${getLoggingPrefix('error')} Chrome process error:\n${
|
|
127862
|
+
return `${getLoggingPrefix('error')} Chrome process error:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127820
127863
|
}
|
|
127821
127864
|
function chromeFailedToSpawn(error) {
|
|
127822
|
-
return `${getLoggingPrefix('error')} Failed to spawn Chrome:\n${
|
|
127865
|
+
return `${getLoggingPrefix('error')} Failed to spawn Chrome:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127823
127866
|
}
|
|
127824
127867
|
function chromeInitializingEnhancedReload() {
|
|
127825
127868
|
return `${getLoggingPrefix('info')} Initializing enhanced reload service with direct spawn for Chrome`;
|
|
@@ -127835,7 +127878,7 @@ var __webpack_modules__ = {
|
|
|
127835
127878
|
return `${getLoggingPrefix('info')} Locating ${capitalizedBrowserName(browser)} browser binary...`;
|
|
127836
127879
|
}
|
|
127837
127880
|
function devChromeProfilePath(path) {
|
|
127838
|
-
return `${getLoggingPrefix('info')} Chrome profile: ${
|
|
127881
|
+
return `${getLoggingPrefix('info')} Chrome profile: ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127839
127882
|
}
|
|
127840
127883
|
function usingChromiumRunner(browser) {
|
|
127841
127884
|
return `${getLoggingPrefix('info')} Using Chromium runner for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127847,13 +127890,13 @@ var __webpack_modules__ = {
|
|
|
127847
127890
|
return `${getLoggingPrefix('info')} [plugin-browsers] Dry run: not launching browser`;
|
|
127848
127891
|
}
|
|
127849
127892
|
function chromiumDryRunBinary(path) {
|
|
127850
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Binary: ${
|
|
127893
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Binary: ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127851
127894
|
}
|
|
127852
127895
|
function chromiumDryRunFlags(flags) {
|
|
127853
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Flags: ${
|
|
127896
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Flags: ${pintor__rspack_import_4_default().gray(flags)}`;
|
|
127854
127897
|
}
|
|
127855
127898
|
function prettyPuppeteerInstallGuidance(browser, rawGuidance, cacheDir) {
|
|
127856
|
-
const dim =
|
|
127899
|
+
const dim = pintor__rspack_import_4_default().gray;
|
|
127857
127900
|
const body = [];
|
|
127858
127901
|
let cleaned = String(rawGuidance || '').replace(/^Error:\s*/i, '').trim();
|
|
127859
127902
|
try {
|
|
@@ -127861,19 +127904,19 @@ var __webpack_modules__ = {
|
|
|
127861
127904
|
if (looksMinimal) {
|
|
127862
127905
|
const b = String(browser || '').toLowerCase();
|
|
127863
127906
|
if ('chromium' === b || 'chromium-based' === b) try {
|
|
127864
|
-
const txt = (0,
|
|
127907
|
+
const txt = (0, chromium_location__rspack_import_6.getInstallGuidance)();
|
|
127865
127908
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127866
127909
|
} catch {}
|
|
127867
127910
|
else if ('chrome' === b) try {
|
|
127868
|
-
const txt = (0,
|
|
127911
|
+
const txt = (0, chrome_location2__rspack_import_5.getInstallGuidance)();
|
|
127869
127912
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127870
127913
|
} catch {}
|
|
127871
127914
|
else if ('firefox' === b || 'gecko-based' === b) try {
|
|
127872
|
-
const txt = (0,
|
|
127915
|
+
const txt = (0, firefox_location2__rspack_import_8.getInstallGuidance)();
|
|
127873
127916
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127874
127917
|
} catch {}
|
|
127875
127918
|
else if ('edge' === b) try {
|
|
127876
|
-
const txt = (0,
|
|
127919
|
+
const txt = (0, edge_location__rspack_import_7.getInstallGuidance)();
|
|
127877
127920
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127878
127921
|
} catch {}
|
|
127879
127922
|
}
|
|
@@ -127905,47 +127948,47 @@ var __webpack_modules__ = {
|
|
|
127905
127948
|
}
|
|
127906
127949
|
} catch {}
|
|
127907
127950
|
body.push(cleaned);
|
|
127908
|
-
if (finalCachePath) body.push(`${dim('INSTALL PATH')} ${
|
|
127951
|
+
if (finalCachePath) body.push(`${dim('INSTALL PATH')} ${pintor__rspack_import_4_default().underline(finalCachePath)}`);
|
|
127909
127952
|
return body.join('\n') + '\n';
|
|
127910
127953
|
}
|
|
127911
127954
|
function firefoxLaunchCalled() {
|
|
127912
127955
|
return `${getLoggingPrefix('info')} Firefox launch requested.`;
|
|
127913
127956
|
}
|
|
127914
127957
|
function firefoxBinaryArgsExtracted(args) {
|
|
127915
|
-
return `${getLoggingPrefix('info')} Firefox binary args extracted: ${
|
|
127958
|
+
return `${getLoggingPrefix('info')} Firefox binary args extracted: ${pintor__rspack_import_4_default().gray(args)}`;
|
|
127916
127959
|
}
|
|
127917
127960
|
function firefoxNoBinaryArgsFound() {
|
|
127918
127961
|
return `${getLoggingPrefix('info')} No Firefox binary args found`;
|
|
127919
127962
|
}
|
|
127920
127963
|
function firefoxFailedToStart(error) {
|
|
127921
|
-
return `${getLoggingPrefix('error')} Firefox failed to start:\n${
|
|
127964
|
+
return `${getLoggingPrefix('error')} Firefox failed to start:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127922
127965
|
}
|
|
127923
127966
|
function firefoxDryRunNotLaunching() {
|
|
127924
127967
|
return `${getLoggingPrefix('info')} [plugin-browsers] Dry run: not launching browser`;
|
|
127925
127968
|
}
|
|
127926
127969
|
function firefoxDryRunBinary(path) {
|
|
127927
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Binary (detected): ${
|
|
127970
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Binary (detected): ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127928
127971
|
}
|
|
127929
127972
|
function firefoxDryRunConfig(cfg) {
|
|
127930
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Config: ${
|
|
127973
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Config: ${pintor__rspack_import_4_default().gray(cfg)}`;
|
|
127931
127974
|
}
|
|
127932
127975
|
function sourceInspectorInitialized() {
|
|
127933
127976
|
return `${getLoggingPrefix('info')} Chrome source inspector initialized successfully`;
|
|
127934
127977
|
}
|
|
127935
127978
|
function sourceInspectorInitializationFailed(error) {
|
|
127936
|
-
return `${getLoggingPrefix('error')} Failed to initialize Chrome source inspector: ${
|
|
127979
|
+
return `${getLoggingPrefix('error')} Failed to initialize Chrome source inspector: ${pintor__rspack_import_4_default().red(error)}`;
|
|
127937
127980
|
}
|
|
127938
127981
|
function sourceInspectorChromeDebuggingRequired(port) {
|
|
127939
127982
|
try {
|
|
127940
127983
|
const p = Number(port);
|
|
127941
127984
|
const shown = Number.isFinite(p) && p > 0 ? p : 9222;
|
|
127942
|
-
return `${getLoggingPrefix('error')} Chrome is not running with remote debugging enabled on port ${
|
|
127985
|
+
return `${getLoggingPrefix('error')} Chrome is not running with remote debugging enabled on port ${pintor__rspack_import_4_default().gray(shown.toString())}. Ensure Chrome is launched with ${pintor__rspack_import_4_default().blue('--remote-debugging-port')}=${pintor__rspack_import_4_default().gray(shown.toString())}`;
|
|
127943
127986
|
} catch {
|
|
127944
|
-
return `${getLoggingPrefix('error')} Chrome is not running with remote debugging enabled on port ${
|
|
127987
|
+
return `${getLoggingPrefix('error')} Chrome is not running with remote debugging enabled on port ${pintor__rspack_import_4_default().gray('9222')}. Ensure Chrome is launched with ${pintor__rspack_import_4_default().blue('--remote-debugging-port')}=${pintor__rspack_import_4_default().gray('9222')}`;
|
|
127945
127988
|
}
|
|
127946
127989
|
}
|
|
127947
127990
|
function sourceInspectorFirefoxDebuggingRequired(port) {
|
|
127948
|
-
return `${getLoggingPrefix('error')} Firefox is not running with remote debugging enabled on port ${
|
|
127991
|
+
return `${getLoggingPrefix('error')} Firefox is not running with remote debugging enabled on port ${pintor__rspack_import_4_default().gray(port.toString())}. Ensure Firefox is launched with ${pintor__rspack_import_4_default().blue('-start-debugger-server')} ${pintor__rspack_import_4_default().gray(port.toString())}`;
|
|
127949
127992
|
}
|
|
127950
127993
|
function sourceInspectorWaitingForFirefox() {
|
|
127951
127994
|
return `${getLoggingPrefix('info')} Waiting for Firefox to be ready with remote debugging...`;
|
|
@@ -127954,7 +127997,7 @@ var __webpack_modules__ = {
|
|
|
127954
127997
|
return `${getLoggingPrefix('success')} Firefox is ready with remote debugging.`;
|
|
127955
127998
|
}
|
|
127956
127999
|
function sourceInspectorFirefoxNotReadyYet(retries, maxRetries) {
|
|
127957
|
-
return `${getLoggingPrefix('warn')} Firefox not ready yet, retrying... (${
|
|
128000
|
+
return `${getLoggingPrefix('warn')} Firefox not ready yet, retrying... (${pintor__rspack_import_4_default().gray(retries.toString())}/${pintor__rspack_import_4_default().gray(maxRetries.toString())})`;
|
|
127958
128001
|
}
|
|
127959
128002
|
function sourceInspectorWaitingForChrome() {
|
|
127960
128003
|
return `${getLoggingPrefix('info')} Waiting for Chrome to be ready with remote debugging...`;
|
|
@@ -127963,10 +128006,10 @@ var __webpack_modules__ = {
|
|
|
127963
128006
|
return `${getLoggingPrefix('success')} Chrome is ready with remote debugging.`;
|
|
127964
128007
|
}
|
|
127965
128008
|
function sourceInspectorChromeNotReadyYet(retries, maxRetries) {
|
|
127966
|
-
return `${getLoggingPrefix('warn')} Chrome not ready yet, retrying... (${
|
|
128009
|
+
return `${getLoggingPrefix('warn')} Chrome not ready yet, retrying... (${pintor__rspack_import_4_default().gray(retries.toString())}/${pintor__rspack_import_4_default().gray(maxRetries.toString())})`;
|
|
127967
128010
|
}
|
|
127968
128011
|
function sourceInspectorOpeningUrl(url) {
|
|
127969
|
-
return `${getLoggingPrefix('info')} Chrome is opening URL: ${
|
|
128012
|
+
return `${getLoggingPrefix('info')} Chrome is opening URL: ${pintor__rspack_import_4_default().underline(url)}`;
|
|
127970
128013
|
}
|
|
127971
128014
|
function sourceInspectorWaitingForPageLoad() {
|
|
127972
128015
|
return `${getLoggingPrefix('info')} Chrome is waiting for the page to load...`;
|
|
@@ -127978,22 +128021,22 @@ var __webpack_modules__ = {
|
|
|
127978
128021
|
return `${getLoggingPrefix('info')} Chrome is finding an existing target...`;
|
|
127979
128022
|
}
|
|
127980
128023
|
function sourceInspectorUsingExistingTarget(targetId) {
|
|
127981
|
-
return `${getLoggingPrefix('info')} Chrome is using existing target with ID: ${
|
|
128024
|
+
return `${getLoggingPrefix('info')} Chrome is using existing target with ID: ${pintor__rspack_import_4_default().gray(targetId)}`;
|
|
127982
128025
|
}
|
|
127983
128026
|
function sourceInspectorTargetCreated(targetId) {
|
|
127984
|
-
return `${getLoggingPrefix('success')} Chrome created a target with ID: ${
|
|
128027
|
+
return `${getLoggingPrefix('success')} Chrome created a target with ID: ${pintor__rspack_import_4_default().gray(targetId)}`;
|
|
127985
128028
|
}
|
|
127986
128029
|
function sourceInspectorAttachingToTarget() {
|
|
127987
128030
|
return `${getLoggingPrefix('info')} Chrome is attaching to the target...`;
|
|
127988
128031
|
}
|
|
127989
128032
|
function sourceInspectorAttachedToTarget(sessionId) {
|
|
127990
|
-
return `${getLoggingPrefix('success')} Chrome is attached to the target with session ID: ${
|
|
128033
|
+
return `${getLoggingPrefix('success')} Chrome is attached to the target with session ID: ${pintor__rspack_import_4_default().gray(sessionId)}`;
|
|
127991
128034
|
}
|
|
127992
128035
|
function sourceInspectorHTMLExtractionComplete() {
|
|
127993
128036
|
return `${getLoggingPrefix('success')} Chrome HTML extraction is complete.`;
|
|
127994
128037
|
}
|
|
127995
128038
|
function sourceInspectorInspectionFailed(error) {
|
|
127996
|
-
return `${getLoggingPrefix('error')} Failed to inspect Chrome source: ${
|
|
128039
|
+
return `${getLoggingPrefix('error')} Failed to inspect Chrome source: ${pintor__rspack_import_4_default().red(error)}`;
|
|
127997
128040
|
}
|
|
127998
128041
|
function sourceInspectorStartingWatchMode() {
|
|
127999
128042
|
return `${getLoggingPrefix('info')} Chrome is starting watch mode for sources...`;
|
|
@@ -128023,10 +128066,10 @@ var __webpack_modules__ = {
|
|
|
128023
128066
|
return `${getLoggingPrefix('info')} Chrome is reconnecting to the target...`;
|
|
128024
128067
|
}
|
|
128025
128068
|
function sourceInspectorReconnectedToTarget(sessionId) {
|
|
128026
|
-
return `${getLoggingPrefix('success')} Chrome reconnected to target with session ID: ${
|
|
128069
|
+
return `${getLoggingPrefix('success')} Chrome reconnected to target with session ID: ${pintor__rspack_import_4_default().gray(sessionId)}`;
|
|
128027
128070
|
}
|
|
128028
128071
|
function sourceInspectorReconnectionFailed(error) {
|
|
128029
|
-
return `${getLoggingPrefix('error')} Failed to reconnect to Chrome target: ${
|
|
128072
|
+
return `${getLoggingPrefix('error')} Failed to reconnect to Chrome target: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128030
128073
|
}
|
|
128031
128074
|
function sourceInspectorEnsuringNavigation() {
|
|
128032
128075
|
return `${getLoggingPrefix('info')} Chrome ensuring target navigates to URL...`;
|
|
@@ -128044,13 +128087,13 @@ var __webpack_modules__ = {
|
|
|
128044
128087
|
return `${getLoggingPrefix('warn')} Chrome source file changed, updating HTML...`;
|
|
128045
128088
|
}
|
|
128046
128089
|
function sourceInspectorHTMLUpdateFailed(error) {
|
|
128047
|
-
return `${getLoggingPrefix('error')} Failed to update Chrome HTML: ${
|
|
128090
|
+
return `${getLoggingPrefix('error')} Failed to update Chrome HTML: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128048
128091
|
}
|
|
128049
128092
|
function sourceInspectorCleanupComplete() {
|
|
128050
128093
|
return `${getLoggingPrefix('success')} Chrome source inspector cleaned up.`;
|
|
128051
128094
|
}
|
|
128052
128095
|
function sourceInspectorCleanupError(error) {
|
|
128053
|
-
return `${getLoggingPrefix('error')} Error during Chrome cleanup: ${
|
|
128096
|
+
return `${getLoggingPrefix('error')} Error during Chrome cleanup: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128054
128097
|
}
|
|
128055
128098
|
function sourceInspectorNotInitialized() {
|
|
128056
128099
|
return `${getLoggingPrefix('error')} Chrome source inspector not initialized`;
|
|
@@ -128059,19 +128102,19 @@ var __webpack_modules__ = {
|
|
|
128059
128102
|
return `${getLoggingPrefix('warn')} Chrome invalid WebSocket server provided`;
|
|
128060
128103
|
}
|
|
128061
128104
|
function sourceInspectorUrlRequired() {
|
|
128062
|
-
return `${getLoggingPrefix('error')} Chrome source inspection requires either ${
|
|
128105
|
+
return `${getLoggingPrefix('error')} Chrome source inspection requires either ${pintor__rspack_import_4_default().blue('--source')} ${pintor__rspack_import_4_default().gray('<url>')} or ${pintor__rspack_import_4_default().blue('--starting-url')} ${pintor__rspack_import_4_default().gray('<url>')} to be specified`;
|
|
128063
128106
|
}
|
|
128064
128107
|
function sourceInspectorWillInspect(url) {
|
|
128065
|
-
return `${getLoggingPrefix('info')} Chrome source inspection will inspect: ${
|
|
128108
|
+
return `${getLoggingPrefix('info')} Chrome source inspection will inspect: ${pintor__rspack_import_4_default().underline(url)}`;
|
|
128066
128109
|
}
|
|
128067
128110
|
function sourceInspectorSetupFailed(error) {
|
|
128068
|
-
return `${getLoggingPrefix('error')} Failed to setup Chrome source inspection: ${
|
|
128111
|
+
return `${getLoggingPrefix('error')} Failed to setup Chrome source inspection: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128069
128112
|
}
|
|
128070
128113
|
function sourceInspectorHTMLOutputHeader() {
|
|
128071
128114
|
return '\n' + '='.repeat(80);
|
|
128072
128115
|
}
|
|
128073
128116
|
function sourceInspectorHTMLOutputTitle(title) {
|
|
128074
|
-
return `${
|
|
128117
|
+
return `${pintor__rspack_import_4_default().bold(pintor__rspack_import_4_default().blue('PAGE HTML'))} ${pintor__rspack_import_4_default().gray('(')}${pintor__rspack_import_4_default().gray(title)}${pintor__rspack_import_4_default().gray(')')}:`;
|
|
128075
128118
|
}
|
|
128076
128119
|
function sourceInspectorHTMLOutputFooter() {
|
|
128077
128120
|
return '='.repeat(80) + '\n';
|
|
@@ -128089,16 +128132,16 @@ var __webpack_modules__ = {
|
|
|
128089
128132
|
return `${getLoggingPrefix('error')} Failed to extract Firefox HTML after retries`;
|
|
128090
128133
|
}
|
|
128091
128134
|
function cdpClientFoundTargets(count) {
|
|
128092
|
-
return `${getLoggingPrefix('info')} Chrome found ${
|
|
128135
|
+
return `${getLoggingPrefix('info')} Chrome found ${pintor__rspack_import_4_default().gray(count.toString())} targets`;
|
|
128093
128136
|
}
|
|
128094
128137
|
function cdpClientTargetWebSocketUrlStored() {
|
|
128095
128138
|
return `${getLoggingPrefix('info')} Chrome target WebSocket URL stored for future connections`;
|
|
128096
128139
|
}
|
|
128097
128140
|
function cdpClientConnected(host, port) {
|
|
128098
|
-
return `${getLoggingPrefix('success')} Chrome CDP Client connected to ${
|
|
128141
|
+
return `${getLoggingPrefix('success')} Chrome CDP Client connected to ${pintor__rspack_import_4_default().gray(host)}:${pintor__rspack_import_4_default().gray(port.toString())}`;
|
|
128099
128142
|
}
|
|
128100
128143
|
function cdpClientConnectionError(error) {
|
|
128101
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client connection error: ${
|
|
128144
|
+
return `${getLoggingPrefix('error')} Chrome CDP Client connection error: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128102
128145
|
}
|
|
128103
128146
|
function cdpClientBrowserConnectionEstablished() {
|
|
128104
128147
|
return `${getLoggingPrefix('success')} Chrome CDP Client browser connection established`;
|
|
@@ -128110,19 +128153,19 @@ var __webpack_modules__ = {
|
|
|
128110
128153
|
return `${getLoggingPrefix('warn')} Chrome load event timed out; proceeding anyway...`;
|
|
128111
128154
|
}
|
|
128112
128155
|
function cdpClientExtensionReloadFailed(extensionId, error) {
|
|
128113
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to force-reload extension ${
|
|
128156
|
+
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to force-reload extension ${pintor__rspack_import_4_default().gray(extensionId)}: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128114
128157
|
}
|
|
128115
128158
|
function cdpClientExtensionUnloadFailed(extensionId, error) {
|
|
128116
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to unload extension ${
|
|
128159
|
+
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to unload extension ${pintor__rspack_import_4_default().gray(extensionId)}: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128117
128160
|
}
|
|
128118
128161
|
function cdpClientExtensionInfoFailed(extensionId, error) {
|
|
128119
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to get extension info for ${
|
|
128162
|
+
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to get extension info for ${pintor__rspack_import_4_default().gray(extensionId)}: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128120
128163
|
}
|
|
128121
128164
|
function cdpClientExtensionLoadFailed(path, error) {
|
|
128122
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to load extension from ${
|
|
128165
|
+
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to load extension from ${pintor__rspack_import_4_default().underline(path)}: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128123
128166
|
}
|
|
128124
128167
|
function firefoxRdpClientConnected(host, port) {
|
|
128125
|
-
return `${getLoggingPrefix('success')} Connected to Firefox Remote Debugging Protocol on ${
|
|
128168
|
+
return `${getLoggingPrefix('success')} Connected to Firefox Remote Debugging Protocol on ${pintor__rspack_import_4_default().gray(host)}:${pintor__rspack_import_4_default().gray(port.toString())}`;
|
|
128126
128169
|
}
|
|
128127
128170
|
function firefoxRdpClientTestingEvaluation() {
|
|
128128
128171
|
return `${getLoggingPrefix('info')} Testing basic Firefox RDP evaluation...`;
|
|
@@ -128148,7 +128191,7 @@ var __webpack_modules__ = {
|
|
|
128148
128191
|
default:
|
|
128149
128192
|
browserDevToolsUrl = '';
|
|
128150
128193
|
}
|
|
128151
|
-
if (!message.data) return `${getLoggingPrefix('error')} No Client Data Received for ${manifestName}\n\n${
|
|
128194
|
+
if (!message.data) return `${getLoggingPrefix('error')} No Client Data Received for ${manifestName}\n\n${pintor__rspack_import_4_default().red("This error happens when the program can't get the data from your extension.")}\n${pintor__rspack_import_4_default().red('There are many reasons this might happen. To fix, ensure that:')}\n\n- Your extension is set as enabled in ${pintor__rspack_import_4_default().underline(browserDevToolsUrl)}\n- No previous ${capitalize(browser)} browser instance is open\n\nIf that is not the case, restart both the ${pintor__rspack_import_4_default().yellow(manifest.name || '')} and the\n${pintor__rspack_import_4_default().yellow('Manager Extension')} in ${pintor__rspack_import_4_default().underline(browserDevToolsUrl)} and try again.\nIf the issue still persists, please report a bug:\n` + pintor__rspack_import_4_default().underline("https://github.com/extension-js/extension.js/issues");
|
|
128152
128195
|
const { id = '', management } = message.data;
|
|
128153
128196
|
if (!management) {
|
|
128154
128197
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) return `${getLoggingPrefix('error')} No management API info received from client for ${manifestName}. Investigate.`;
|
|
@@ -128164,7 +128207,7 @@ var __webpack_modules__ = {
|
|
|
128164
128207
|
let effectiveBrowserLine = browserVersionLine && browserVersionLine.trim().length > 0 ? browserVersionLine.trim() : '';
|
|
128165
128208
|
if (!effectiveBrowserLine) try {
|
|
128166
128209
|
if ('chromium' === browser || 'chromium-based' === browser) {
|
|
128167
|
-
const p =
|
|
128210
|
+
const p = chromium_location__rspack_import_6_default()();
|
|
128168
128211
|
if (p && 'string' == typeof p && fs__rspack_import_1.existsSync(p)) {
|
|
128169
128212
|
const v = require1('child_process').execFileSync(p, [
|
|
128170
128213
|
'--version'
|
|
@@ -128174,7 +128217,7 @@ var __webpack_modules__ = {
|
|
|
128174
128217
|
effectiveBrowserLine = v || 'Chromium';
|
|
128175
128218
|
}
|
|
128176
128219
|
} else if ('chrome' === browser) {
|
|
128177
|
-
const p = (0,
|
|
128220
|
+
const p = (0, chrome_location2__rspack_import_5.locateChromeOrExplain)({
|
|
128178
128221
|
allowFallback: true
|
|
128179
128222
|
});
|
|
128180
128223
|
if (p && fs__rspack_import_1.existsSync(p)) {
|
|
@@ -128186,7 +128229,7 @@ var __webpack_modules__ = {
|
|
|
128186
128229
|
effectiveBrowserLine = v || 'Chrome';
|
|
128187
128230
|
}
|
|
128188
128231
|
} else if ('edge' === browser) {
|
|
128189
|
-
const p =
|
|
128232
|
+
const p = edge_location__rspack_import_7_default()();
|
|
128190
128233
|
if (p && fs__rspack_import_1.existsSync(p)) {
|
|
128191
128234
|
const v = require1('child_process').execFileSync(p, [
|
|
128192
128235
|
'--version'
|
|
@@ -128196,7 +128239,7 @@ var __webpack_modules__ = {
|
|
|
128196
128239
|
effectiveBrowserLine = v || 'Microsoft Edge';
|
|
128197
128240
|
}
|
|
128198
128241
|
} else if ('firefox' === browser) {
|
|
128199
|
-
const p =
|
|
128242
|
+
const p = firefox_location2__rspack_import_8_default()(true);
|
|
128200
128243
|
if (p && 'string' == typeof p && fs__rspack_import_1.existsSync(p)) {
|
|
128201
128244
|
const v = require1('child_process').execFileSync(p, [
|
|
128202
128245
|
'--version'
|
|
@@ -128215,8 +128258,8 @@ var __webpack_modules__ = {
|
|
|
128215
128258
|
const updateNotice = updateSuffix ? ` ${updateSuffix}` : '';
|
|
128216
128259
|
const displayName = String(manifestName);
|
|
128217
128260
|
const displayVersion = String(version1 || manifest.version || '');
|
|
128218
|
-
lines.push(` 🧩 ${
|
|
128219
|
-
if (includeExtensionId) lines.push(` Extension ID ${
|
|
128261
|
+
lines.push(` 🧩 ${pintor__rspack_import_4_default().brightBlue('Extension.js')} ${pintor__rspack_import_4_default().gray(`${extensionVersion}`)}${updateNotice}`, ` Browser ${pintor__rspack_import_4_default().gray(browserLabel)}`, ` Extension ${pintor__rspack_import_4_default().gray(displayVersion ? `${displayName} ${displayVersion}` : displayName)}`);
|
|
128262
|
+
if (includeExtensionId && cleanId) lines.push(` Extension ID ${pintor__rspack_import_4_default().gray(cleanId)}`);
|
|
128220
128263
|
return lines.join('\n');
|
|
128221
128264
|
}
|
|
128222
128265
|
function emptyLine() {
|
|
@@ -128226,19 +128269,19 @@ var __webpack_modules__ = {
|
|
|
128226
128269
|
return ''.padEnd(80, '=');
|
|
128227
128270
|
}
|
|
128228
128271
|
function devChromiumDebugPort(finalPort, requestedPort) {
|
|
128229
|
-
return `${getLoggingPrefix('info')} Chromium debug port: ${
|
|
128272
|
+
return `${getLoggingPrefix('info')} Chromium debug port: ${pintor__rspack_import_4_default().gray(finalPort.toString())} (requested ${pintor__rspack_import_4_default().gray(requestedPort.toString())})`;
|
|
128230
128273
|
}
|
|
128231
128274
|
function devFirefoxDebugPort(finalPort, requestedPort) {
|
|
128232
|
-
return `${getLoggingPrefix('info')} Firefox debug port: ${
|
|
128275
|
+
return `${getLoggingPrefix('info')} Firefox debug port: ${pintor__rspack_import_4_default().gray(finalPort.toString())} (requested ${pintor__rspack_import_4_default().gray(requestedPort.toString())})`;
|
|
128233
128276
|
}
|
|
128234
128277
|
function devFirefoxProfilePath(profilePath) {
|
|
128235
|
-
return `${getLoggingPrefix('info')} Firefox profile: ${
|
|
128278
|
+
return `${getLoggingPrefix('info')} Firefox profile: ${pintor__rspack_import_4_default().underline(profilePath)}`;
|
|
128236
128279
|
}
|
|
128237
128280
|
function devHtmlSampleRetry(sample) {
|
|
128238
|
-
return `${
|
|
128281
|
+
return `${pintor__rspack_import_4_default().gray('[Extension.js] HTML sample (retry):')} ${pintor__rspack_import_4_default().gray(sample)}`;
|
|
128239
128282
|
}
|
|
128240
128283
|
function devHtmlSampleLate(sample) {
|
|
128241
|
-
return `${
|
|
128284
|
+
return `${pintor__rspack_import_4_default().gray('[Extension.js] HTML sample (late):')} ${pintor__rspack_import_4_default().gray(sample)}`;
|
|
128242
128285
|
}
|
|
128243
128286
|
function cdpUnifiedExtensionLog(ts, payload) {
|
|
128244
128287
|
const data = (()=>{
|
|
@@ -128251,31 +128294,31 @@ var __webpack_modules__ = {
|
|
|
128251
128294
|
return `[extension-log ${ts}] ${data}`;
|
|
128252
128295
|
}
|
|
128253
128296
|
function firefoxInspectSourceNonFatal(message) {
|
|
128254
|
-
return `${getLoggingPrefix('warn')} Firefox Inspect non-fatal error: ${
|
|
128297
|
+
return `${getLoggingPrefix('warn')} Firefox Inspect non-fatal error: ${pintor__rspack_import_4_default().yellow(message)}`;
|
|
128255
128298
|
}
|
|
128256
128299
|
function unsupportedBrowser(browser) {
|
|
128257
128300
|
const supported = "chrome, edge, firefox";
|
|
128258
|
-
const hintFlag = `${
|
|
128259
|
-
const docsUrl =
|
|
128260
|
-
return `${getLoggingPrefix('error')} Unsupported browser ${
|
|
128301
|
+
const hintFlag = `${pintor__rspack_import_4_default().blue('--browser')} ${pintor__rspack_import_4_default().gray('<chrome|edge|firefox>')}`;
|
|
128302
|
+
const docsUrl = pintor__rspack_import_4_default().underline('https://github.com/extension-js/extension.js');
|
|
128303
|
+
return `${getLoggingPrefix('error')} Unsupported browser ${pintor__rspack_import_4_default().yellow(`"${browser}"`)}\n\nWe currently support: ${pintor__rspack_import_4_default().green(supported)}.\nTry selecting a supported browser with ${hintFlag}.\n\nNeed another engine? Open a discussion or PR:\n${docsUrl}`;
|
|
128261
128304
|
}
|
|
128262
128305
|
function browserRunnerError(body) {
|
|
128263
|
-
return `${
|
|
128306
|
+
return `${pintor__rspack_import_4_default().red('ERROR')} ${pintor__rspack_import_4_default().brightBlue('error in browser runner')}\n${body}`;
|
|
128264
128307
|
}
|
|
128265
128308
|
function requireChromiumBinaryForChromiumBased() {
|
|
128266
|
-
const body = `Configuration required\nProvide ${
|
|
128309
|
+
const body = `Configuration required\nProvide ${pintor__rspack_import_4_default().blue('--chromium-binary')} ${pintor__rspack_import_4_default().gray('<abs-path>')} when using ${pintor__rspack_import_4_default().yellow('chromium-based')}.\n`;
|
|
128267
128310
|
return browserRunnerError(body);
|
|
128268
128311
|
}
|
|
128269
128312
|
function requireGeckoBinaryForGeckoBased() {
|
|
128270
|
-
const body = `Configuration required\nProvide ${
|
|
128313
|
+
const body = `Configuration required\nProvide ${pintor__rspack_import_4_default().blue('--gecko-binary')} ${pintor__rspack_import_4_default().gray('<abs-path>')} when using ${pintor__rspack_import_4_default().yellow('gecko-based')} or ${pintor__rspack_import_4_default().yellow('firefox-based')}.\n`;
|
|
128271
128314
|
return browserRunnerError(body);
|
|
128272
128315
|
}
|
|
128273
128316
|
function invalidChromiumBinaryPath(p) {
|
|
128274
|
-
const body = `Invalid binary path\nChromium binary not found at ${
|
|
128317
|
+
const body = `Invalid binary path\nChromium binary not found at ${pintor__rspack_import_4_default().underline(p)}.\nProvide a working path via ${pintor__rspack_import_4_default().blue('--chromium-binary')} ${pintor__rspack_import_4_default().gray('<abs-path>')}.`;
|
|
128275
128318
|
return browserRunnerError(body);
|
|
128276
128319
|
}
|
|
128277
128320
|
function invalidGeckoBinaryPath(p) {
|
|
128278
|
-
const body = `Invalid binary path\nFirefox/Gecko binary not found at ${
|
|
128321
|
+
const body = `Invalid binary path\nFirefox/Gecko binary not found at ${pintor__rspack_import_4_default().underline(p)}.\nProvide a working path via ${pintor__rspack_import_4_default().blue('--gecko-binary')} ${pintor__rspack_import_4_default().gray('<abs-path>')}.`;
|
|
128279
128322
|
return browserRunnerError(body);
|
|
128280
128323
|
}
|
|
128281
128324
|
function rdpInvalidRequestPayload() {
|
|
@@ -128283,8 +128326,8 @@ var __webpack_modules__ = {
|
|
|
128283
128326
|
}
|
|
128284
128327
|
function chromiumDeveloperModeGuidance(browser) {
|
|
128285
128328
|
let exts = '';
|
|
128286
|
-
exts = 'edge' === browser ?
|
|
128287
|
-
return `${getLoggingPrefix('warn')} Configuration required\nEnable ${
|
|
128329
|
+
exts = 'edge' === browser ? pintor__rspack_import_4_default().underline('edge://extensions') : pintor__rspack_import_4_default().underline('chrome://extensions');
|
|
128330
|
+
return `${getLoggingPrefix('warn')} Configuration required\nEnable ${pintor__rspack_import_4_default().yellow('Developer mode')} in ${exts} for reliable reloads.\nWithout it, hard reloads may disable your unpacked extension.`;
|
|
128288
128331
|
}
|
|
128289
128332
|
},
|
|
128290
128333
|
"./webpack/plugin-browsers/browsers-lib/output-binaries-resolver.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -128616,6 +128659,95 @@ var __webpack_modules__ = {
|
|
|
128616
128659
|
var shared_utils = __webpack_require__("./webpack/plugin-browsers/browsers-lib/shared-utils.ts");
|
|
128617
128660
|
var banner = __webpack_require__("./webpack/plugin-browsers/browsers-lib/banner.ts");
|
|
128618
128661
|
var external_path_ = __webpack_require__("path");
|
|
128662
|
+
const masterPreferences = {
|
|
128663
|
+
alternate_error_pages: {
|
|
128664
|
+
enabled: false
|
|
128665
|
+
},
|
|
128666
|
+
autofill: {
|
|
128667
|
+
enabled: false
|
|
128668
|
+
},
|
|
128669
|
+
browser: {
|
|
128670
|
+
check_default_browser: false,
|
|
128671
|
+
default_browser_setting_enabled: false
|
|
128672
|
+
},
|
|
128673
|
+
default_apps: 'noinstall',
|
|
128674
|
+
distribution: {
|
|
128675
|
+
alternate_shortcut_text: false,
|
|
128676
|
+
auto_launch_chrome: false,
|
|
128677
|
+
import_bookmarks: false,
|
|
128678
|
+
import_history: false,
|
|
128679
|
+
import_home_page: false,
|
|
128680
|
+
import_search_engine: false,
|
|
128681
|
+
suppress_first_run_bubble: true,
|
|
128682
|
+
do_not_register_for_update_launch: true,
|
|
128683
|
+
make_chrome_default: false,
|
|
128684
|
+
make_chrome_default_for_user: false,
|
|
128685
|
+
require_eula: false,
|
|
128686
|
+
suppress_first_run_default_browser_prompt: true
|
|
128687
|
+
},
|
|
128688
|
+
dns_prefetching: {
|
|
128689
|
+
enabled: false
|
|
128690
|
+
},
|
|
128691
|
+
download: {
|
|
128692
|
+
default_directory: '/tmp/',
|
|
128693
|
+
directory_upgrade: true,
|
|
128694
|
+
open_pdf_in_adobe_reader: false,
|
|
128695
|
+
prompt_for_download: true
|
|
128696
|
+
},
|
|
128697
|
+
enable_do_not_track: true,
|
|
128698
|
+
extensions: {
|
|
128699
|
+
theme: {
|
|
128700
|
+
use_system: false
|
|
128701
|
+
},
|
|
128702
|
+
toolbarsize: -1,
|
|
128703
|
+
developer_mode: true,
|
|
128704
|
+
ui: {
|
|
128705
|
+
developer_mode: true
|
|
128706
|
+
}
|
|
128707
|
+
},
|
|
128708
|
+
plugins: {
|
|
128709
|
+
plugins_list: [
|
|
128710
|
+
{
|
|
128711
|
+
enabled: false,
|
|
128712
|
+
name: 'Java(TM)'
|
|
128713
|
+
}
|
|
128714
|
+
],
|
|
128715
|
+
show_details: true
|
|
128716
|
+
},
|
|
128717
|
+
profile: {
|
|
128718
|
+
password_manager_enabled: false
|
|
128719
|
+
},
|
|
128720
|
+
safebrowsing: {
|
|
128721
|
+
enabled: false,
|
|
128722
|
+
safebrowsingextended_reporting_enabled: false
|
|
128723
|
+
},
|
|
128724
|
+
savefile: {
|
|
128725
|
+
default_directory: '/tmp',
|
|
128726
|
+
type: 0
|
|
128727
|
+
},
|
|
128728
|
+
search: {
|
|
128729
|
+
suggest_enabled: false
|
|
128730
|
+
},
|
|
128731
|
+
session: {
|
|
128732
|
+
restore_on_startup: 5
|
|
128733
|
+
},
|
|
128734
|
+
sync: {
|
|
128735
|
+
suppress_start: true
|
|
128736
|
+
},
|
|
128737
|
+
sync_promo: {
|
|
128738
|
+
show_on_first_run_allowed: false,
|
|
128739
|
+
show_ntp_bubble: false
|
|
128740
|
+
},
|
|
128741
|
+
translate: {
|
|
128742
|
+
enabled: false
|
|
128743
|
+
}
|
|
128744
|
+
};
|
|
128745
|
+
const chromeMasterPreferences = {
|
|
128746
|
+
...masterPreferences
|
|
128747
|
+
};
|
|
128748
|
+
const edgeMasterPreferences = {
|
|
128749
|
+
...masterPreferences
|
|
128750
|
+
};
|
|
128619
128751
|
var external_unique_names_generator_ = __webpack_require__("unique-names-generator");
|
|
128620
128752
|
const DEFAULT_BROWSER_FLAGS = [
|
|
128621
128753
|
'--no-first-run',
|
|
@@ -128641,6 +128773,37 @@ var __webpack_modules__ = {
|
|
|
128641
128773
|
'--enable-features=SidePanelUpdates',
|
|
128642
128774
|
'--disable-features=DisableLoadExtensionCommandLineSwitch'
|
|
128643
128775
|
];
|
|
128776
|
+
function isPlainObject(value) {
|
|
128777
|
+
return !!value && 'object' == typeof value && !Array.isArray(value);
|
|
128778
|
+
}
|
|
128779
|
+
function deepMergePreferences(base, custom) {
|
|
128780
|
+
const merged = {
|
|
128781
|
+
...base
|
|
128782
|
+
};
|
|
128783
|
+
for (const [key, value] of Object.entries(custom)){
|
|
128784
|
+
const current = merged[key];
|
|
128785
|
+
if (isPlainObject(current) && isPlainObject(value)) {
|
|
128786
|
+
merged[key] = deepMergePreferences(current, value);
|
|
128787
|
+
continue;
|
|
128788
|
+
}
|
|
128789
|
+
merged[key] = value;
|
|
128790
|
+
}
|
|
128791
|
+
return merged;
|
|
128792
|
+
}
|
|
128793
|
+
function getChromiumMasterPreferences(browser) {
|
|
128794
|
+
return 'edge' === browser ? edgeMasterPreferences : chromeMasterPreferences;
|
|
128795
|
+
}
|
|
128796
|
+
function seedChromiumPreferences(profilePath, browser, customPreferences) {
|
|
128797
|
+
const preferencesPath = external_path_.join(profilePath, 'Default', 'Preferences');
|
|
128798
|
+
if (external_fs_.existsSync(preferencesPath)) return;
|
|
128799
|
+
const basePreferences = getChromiumMasterPreferences(browser);
|
|
128800
|
+
const custom = isPlainObject(customPreferences) ? customPreferences : {};
|
|
128801
|
+
const mergedPreferences = deepMergePreferences(basePreferences, custom);
|
|
128802
|
+
external_fs_.mkdirSync(external_path_.dirname(preferencesPath), {
|
|
128803
|
+
recursive: true
|
|
128804
|
+
});
|
|
128805
|
+
external_fs_.writeFileSync(preferencesPath, JSON.stringify(mergedPreferences), 'utf8');
|
|
128806
|
+
}
|
|
128644
128807
|
function browserConfig(compilation, configOptions) {
|
|
128645
128808
|
const extensionsToLoad = Array.isArray(configOptions.extension) ? configOptions.extension : [
|
|
128646
128809
|
configOptions.extension
|
|
@@ -128696,6 +128859,12 @@ var __webpack_modules__ = {
|
|
|
128696
128859
|
} catch {}
|
|
128697
128860
|
}
|
|
128698
128861
|
}
|
|
128862
|
+
if (userProfilePath) try {
|
|
128863
|
+
external_fs_.mkdirSync(userProfilePath, {
|
|
128864
|
+
recursive: true
|
|
128865
|
+
});
|
|
128866
|
+
seedChromiumPreferences(userProfilePath, configOptions.browser, configOptions.preferences);
|
|
128867
|
+
} catch {}
|
|
128699
128868
|
const excludeFlags = configOptions.excludeBrowserFlags || [];
|
|
128700
128869
|
const filteredFlags = (0, shared_utils.ov)(DEFAULT_BROWSER_FLAGS, excludeFlags);
|
|
128701
128870
|
const cdpPort = (0, shared_utils.jl)(configOptions.port, configOptions.instanceId);
|
|
@@ -128778,8 +128947,12 @@ var __webpack_modules__ = {
|
|
|
128778
128947
|
console.log(messages.E8B(chromiumConfig.join(' ')));
|
|
128779
128948
|
}
|
|
128780
128949
|
var extension_output_path = __webpack_require__("./webpack/plugin-browsers/run-chromium/chromium-launch/extension-output-path.ts");
|
|
128950
|
+
var external_os_ = __webpack_require__("os");
|
|
128781
128951
|
function isWslEnv() {
|
|
128782
|
-
|
|
128952
|
+
if ('linux' !== process.platform) return false;
|
|
128953
|
+
const hasWslEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
128954
|
+
if (hasWslEnv) return true;
|
|
128955
|
+
return /microsoft/i.test(external_os_.release());
|
|
128783
128956
|
}
|
|
128784
128957
|
function normalizeBinaryPathForWsl(input) {
|
|
128785
128958
|
let value = String(input || '').trim();
|
|
@@ -130047,8 +130220,12 @@ var __webpack_modules__ = {
|
|
|
130047
130220
|
}
|
|
130048
130221
|
}
|
|
130049
130222
|
}
|
|
130223
|
+
var external_os_ = __webpack_require__("os");
|
|
130050
130224
|
function isWslEnv() {
|
|
130051
|
-
|
|
130225
|
+
if ('linux' !== process.platform) return false;
|
|
130226
|
+
const hasWslEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
130227
|
+
if (hasWslEnv) return true;
|
|
130228
|
+
return /microsoft/i.test(external_os_.release());
|
|
130052
130229
|
}
|
|
130053
130230
|
function normalizeBinaryPathForWsl(input) {
|
|
130054
130231
|
let value = String(input || '').trim();
|
|
@@ -130479,7 +130656,7 @@ var __webpack_modules__ = {
|
|
|
130479
130656
|
host: '127.0.0.1'
|
|
130480
130657
|
},
|
|
130481
130658
|
getInfo: async ()=>({
|
|
130482
|
-
extensionId
|
|
130659
|
+
extensionId,
|
|
130483
130660
|
name: manifest.name,
|
|
130484
130661
|
version: manifest.version
|
|
130485
130662
|
}),
|
|
@@ -131246,6 +131423,31 @@ var __webpack_modules__ = {
|
|
|
131246
131423
|
}
|
|
131247
131424
|
}
|
|
131248
131425
|
},
|
|
131426
|
+
"./webpack/plugin-compilation/compilation-lib/shared-state.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
131427
|
+
"use strict";
|
|
131428
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
131429
|
+
FF: ()=>setPendingCompilationLine,
|
|
131430
|
+
If: ()=>markBannerPrinted,
|
|
131431
|
+
TC: ()=>isBannerPrinted
|
|
131432
|
+
});
|
|
131433
|
+
const sharedState = {
|
|
131434
|
+
bannerPrinted: false,
|
|
131435
|
+
pendingCompilationLine: ''
|
|
131436
|
+
};
|
|
131437
|
+
function markBannerPrinted() {
|
|
131438
|
+
sharedState.bannerPrinted = true;
|
|
131439
|
+
if (sharedState.pendingCompilationLine) {
|
|
131440
|
+
console.log(sharedState.pendingCompilationLine);
|
|
131441
|
+
sharedState.pendingCompilationLine = '';
|
|
131442
|
+
}
|
|
131443
|
+
}
|
|
131444
|
+
function isBannerPrinted() {
|
|
131445
|
+
return sharedState.bannerPrinted;
|
|
131446
|
+
}
|
|
131447
|
+
function setPendingCompilationLine(line) {
|
|
131448
|
+
sharedState.pendingCompilationLine = line;
|
|
131449
|
+
}
|
|
131450
|
+
},
|
|
131249
131451
|
"./webpack/plugin-css/css-lib/integrations.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
131250
131452
|
"use strict";
|
|
131251
131453
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -134036,11 +134238,15 @@ var __webpack_modules__ = {
|
|
|
134036
134238
|
const invocation = buildSpawnInvocation(command, args);
|
|
134037
134239
|
const env = buildExecEnv();
|
|
134038
134240
|
const stdio = options?.stdio ?? 'ignore';
|
|
134241
|
+
const useShell = 'win32' === process.platform && /\.(cmd|bat)$/i.test(invocation.command);
|
|
134039
134242
|
return new Promise((resolve, reject)=>{
|
|
134040
134243
|
const child = (0, child_process__rspack_import_2.spawn)(invocation.command, invocation.args, {
|
|
134041
134244
|
cwd: options?.cwd,
|
|
134042
134245
|
stdio,
|
|
134043
|
-
env: env || process.env
|
|
134246
|
+
env: env || process.env,
|
|
134247
|
+
...useShell ? {
|
|
134248
|
+
shell: true
|
|
134249
|
+
} : {}
|
|
134044
134250
|
});
|
|
134045
134251
|
child.on('close', (code)=>{
|
|
134046
134252
|
if (0 !== code) reject(new Error(`Install failed with exit code ${code}`));
|
|
@@ -134095,7 +134301,8 @@ var __webpack_modules__ = {
|
|
|
134095
134301
|
if (fs__rspack_import_0.existsSync(path__rspack_import_1.join(nm, '.pnpm'))) return false;
|
|
134096
134302
|
if (fs__rspack_import_0.existsSync(path__rspack_import_1.join(nm, '.modules.yaml'))) return false;
|
|
134097
134303
|
if (hasMarker) try {
|
|
134098
|
-
|
|
134304
|
+
const entries = fs__rspack_import_0.readdirSync(nm).filter((name)=>'.bin' !== name && !name.startsWith('.cache'));
|
|
134305
|
+
if (entries.length > 0) return false;
|
|
134099
134306
|
} catch {}
|
|
134100
134307
|
const hasInstalledDep = [
|
|
134101
134308
|
...deps,
|
|
@@ -134365,7 +134572,7 @@ var __webpack_modules__ = {
|
|
|
134365
134572
|
},
|
|
134366
134573
|
"./package.json" (module) {
|
|
134367
134574
|
"use strict";
|
|
134368
|
-
module.exports = JSON.parse('{"rE":"3.
|
|
134575
|
+
module.exports = JSON.parse('{"rE":"3.7.0-canary.170.2b1f54a","El":{"@rspack/core":"^1.7.5","@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","extension-from-store":"^0.1.1","firefox-location2":"3.0.0","go-git-it":"^5.1.1","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"}}');
|
|
134369
134576
|
}
|
|
134370
134577
|
};
|
|
134371
134578
|
var __webpack_module_cache__ = {};
|
|
@@ -134564,6 +134771,8 @@ var __webpack_exports__ = {};
|
|
|
134564
134771
|
if (isUrl(pathOrRemoteUrl)) {
|
|
134565
134772
|
const url = new URL(pathOrRemoteUrl);
|
|
134566
134773
|
if (url.protocol.startsWith('http')) {
|
|
134774
|
+
const pathname = url.pathname.toLowerCase();
|
|
134775
|
+
if (pathname.endsWith('.zip')) return await importUrlSourceFromZip(pathOrRemoteUrl);
|
|
134567
134776
|
if ('https://github.com' !== url.origin) {
|
|
134568
134777
|
const urlSource = await importUrlSourceFromZip(pathOrRemoteUrl);
|
|
134569
134778
|
return urlSource;
|
|
@@ -134730,6 +134939,77 @@ var __webpack_exports__ = {};
|
|
|
134730
134939
|
'install'
|
|
134731
134940
|
];
|
|
134732
134941
|
}
|
|
134942
|
+
function findNearestWorkspaceRoot(startDir) {
|
|
134943
|
+
let current = external_path_.resolve(startDir);
|
|
134944
|
+
while(true){
|
|
134945
|
+
const workspaceFile = external_path_.join(current, 'pnpm-workspace.yaml');
|
|
134946
|
+
if (external_fs_.existsSync(workspaceFile)) return current;
|
|
134947
|
+
const parent = external_path_.dirname(current);
|
|
134948
|
+
if (parent === current) return;
|
|
134949
|
+
current = parent;
|
|
134950
|
+
}
|
|
134951
|
+
}
|
|
134952
|
+
function toRelativePath(baseDir, targetDir) {
|
|
134953
|
+
return external_path_.relative(baseDir, targetDir).split(external_path_.sep).join('/');
|
|
134954
|
+
}
|
|
134955
|
+
function parseWorkspacePatterns(workspaceFilePath) {
|
|
134956
|
+
try {
|
|
134957
|
+
const raw = external_fs_.readFileSync(workspaceFilePath, 'utf8');
|
|
134958
|
+
const lines = raw.split(/\r?\n/);
|
|
134959
|
+
const patterns = [];
|
|
134960
|
+
let inPackages = false;
|
|
134961
|
+
for (const line of lines){
|
|
134962
|
+
const trimmed = line.trim();
|
|
134963
|
+
if (!inPackages) {
|
|
134964
|
+
if ('packages:' === trimmed) inPackages = true;
|
|
134965
|
+
continue;
|
|
134966
|
+
}
|
|
134967
|
+
if (0 === trimmed.length || trimmed.startsWith('#')) continue;
|
|
134968
|
+
if (!trimmed.startsWith('-')) break;
|
|
134969
|
+
const value = trimmed.slice(1).trim();
|
|
134970
|
+
const unquoted = value.replace(/^['"]|['"]$/g, '');
|
|
134971
|
+
if (unquoted.length > 0) patterns.push(unquoted);
|
|
134972
|
+
}
|
|
134973
|
+
return patterns;
|
|
134974
|
+
} catch {
|
|
134975
|
+
return [];
|
|
134976
|
+
}
|
|
134977
|
+
}
|
|
134978
|
+
function globToRegExp(glob) {
|
|
134979
|
+
const normalized = glob.replace(/^\.\//, '').replace(/^!/, '').replace(/\/+$/, '');
|
|
134980
|
+
let pattern = '';
|
|
134981
|
+
for(let i = 0; i < normalized.length; i++){
|
|
134982
|
+
const char = normalized[i];
|
|
134983
|
+
if ('*' === char) {
|
|
134984
|
+
if ('*' === normalized[i + 1]) {
|
|
134985
|
+
pattern += '.*';
|
|
134986
|
+
i += 1;
|
|
134987
|
+
} else pattern += '[^/]*';
|
|
134988
|
+
continue;
|
|
134989
|
+
}
|
|
134990
|
+
if (/[|\\{}()[\]^$+?.]/.test(char)) pattern += `\\${char}`;
|
|
134991
|
+
else pattern += char;
|
|
134992
|
+
}
|
|
134993
|
+
return new RegExp(`^${pattern}$`);
|
|
134994
|
+
}
|
|
134995
|
+
function isProjectIncludedByWorkspace(workspaceRoot, projectPath) {
|
|
134996
|
+
const workspaceFile = external_path_.join(workspaceRoot, 'pnpm-workspace.yaml');
|
|
134997
|
+
const patterns = parseWorkspacePatterns(workspaceFile);
|
|
134998
|
+
if (0 === patterns.length) return true;
|
|
134999
|
+
const relativeProjectPath = toRelativePath(workspaceRoot, projectPath);
|
|
135000
|
+
let included = false;
|
|
135001
|
+
for (const pattern of patterns){
|
|
135002
|
+
const isNegated = pattern.startsWith('!');
|
|
135003
|
+
const matcher = globToRegExp(pattern);
|
|
135004
|
+
if (matcher.test(relativeProjectPath)) included = !isNegated;
|
|
135005
|
+
}
|
|
135006
|
+
return included;
|
|
135007
|
+
}
|
|
135008
|
+
function shouldUsePnpmIsolatedInstall(projectPath) {
|
|
135009
|
+
const workspaceRoot = findNearestWorkspaceRoot(projectPath);
|
|
135010
|
+
if (!workspaceRoot) return false;
|
|
135011
|
+
return !isProjectIncludedByWorkspace(workspaceRoot, projectPath);
|
|
135012
|
+
}
|
|
134733
135013
|
async function hasDependenciesToInstall(projectPath) {
|
|
134734
135014
|
try {
|
|
134735
135015
|
const raw = await external_fs_.promises.readFile(external_path_.join(projectPath, 'package.json'), 'utf8');
|
|
@@ -134757,29 +135037,24 @@ var __webpack_exports__ = {};
|
|
|
134757
135037
|
...dependenciesArgs,
|
|
134758
135038
|
'--include=dev'
|
|
134759
135039
|
];
|
|
135040
|
+
if ('pnpm' === pm.name && shouldUsePnpmIsolatedInstall(projectPath)) dependenciesArgs = [
|
|
135041
|
+
...dependenciesArgs,
|
|
135042
|
+
'--ignore-workspace',
|
|
135043
|
+
'--lockfile=false'
|
|
135044
|
+
];
|
|
134760
135045
|
await external_fs_.promises.mkdir(nodeModulesPath, {
|
|
134761
135046
|
recursive: true
|
|
134762
135047
|
});
|
|
134763
135048
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
134764
135049
|
const stdio = isAuthor ? 'inherit' : 'ignore';
|
|
134765
|
-
|
|
134766
|
-
const persistLabel = 'true' === process.env.EXTENSION_ONE_TIME_INSTALL_HINT;
|
|
134767
|
-
const progress = (0, webpack_lib_progress.J)(progressLabel, {
|
|
134768
|
-
enabled: progressEnabled,
|
|
134769
|
-
persistLabel
|
|
134770
|
-
});
|
|
134771
|
-
if (!progressEnabled) console.log(progressLabel);
|
|
135050
|
+
console.log(progressLabel);
|
|
134772
135051
|
if (isAuthor) console.warn(messages.TL('project dependencies'));
|
|
134773
135052
|
const command = (0, package_manager.tj)(pm, dependenciesArgs);
|
|
134774
|
-
|
|
134775
|
-
|
|
134776
|
-
|
|
134777
|
-
|
|
134778
|
-
|
|
134779
|
-
(0, install_cache.h)(projectPath);
|
|
134780
|
-
} finally{
|
|
134781
|
-
progress.stop();
|
|
134782
|
-
}
|
|
135053
|
+
await (0, package_manager.Qt)(command.command, command.args, {
|
|
135054
|
+
cwd: projectPath,
|
|
135055
|
+
stdio
|
|
135056
|
+
});
|
|
135057
|
+
(0, install_cache.h)(projectPath);
|
|
134783
135058
|
} catch (error) {
|
|
134784
135059
|
console.error(messages.RB(error));
|
|
134785
135060
|
process.exit(1);
|