extension-develop 3.6.2 → 3.7.0-canary.169.5b5db8b
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 +464 -189
- package/package.json +2 -1
package/dist/module.cjs
CHANGED
|
@@ -127399,24 +127399,15 @@ var __webpack_modules__ = {
|
|
|
127399
127399
|
"./webpack/plugin-browsers/browsers-lib/banner.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
127400
127400
|
"use strict";
|
|
127401
127401
|
__webpack_require__.d(__webpack_exports__, {
|
|
127402
|
-
|
|
127403
|
-
|
|
127402
|
+
M: ()=>printProdBannerOnce,
|
|
127403
|
+
a: ()=>printDevBannerOnce
|
|
127404
127404
|
});
|
|
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
|
-
}
|
|
127405
|
+
var fs__rspack_import_0 = __webpack_require__("fs");
|
|
127406
|
+
var path__rspack_import_1 = __webpack_require__("path");
|
|
127407
|
+
var crypto__rspack_import_2 = __webpack_require__("crypto");
|
|
127408
|
+
var _messages__rspack_import_3 = __webpack_require__("./webpack/plugin-browsers/browsers-lib/messages.ts");
|
|
127409
|
+
var _webpack_lib_messages__rspack_import_4 = __webpack_require__("./webpack/webpack-lib/messages.ts");
|
|
127410
|
+
var _plugin_compilation_compilation_lib_shared_state__rspack_import_5 = __webpack_require__("./webpack/plugin-compilation/compilation-lib/shared-state.ts");
|
|
127420
127411
|
const printedKeys = new Set();
|
|
127421
127412
|
function readUpdateSuffixOnce() {
|
|
127422
127413
|
const suffix = process.env.EXTENSION_CLI_UPDATE_SUFFIX;
|
|
@@ -127427,17 +127418,67 @@ var __webpack_modules__ = {
|
|
|
127427
127418
|
function keyFor(browser, outPath, hp) {
|
|
127428
127419
|
const host = (hp?.host || '127.0.0.1').toString();
|
|
127429
127420
|
const port = hp?.port == null ? '' : String(hp.port);
|
|
127430
|
-
return `${browser}::${
|
|
127421
|
+
return `${browser}::${path__rspack_import_1.resolve(outPath)}::${host}:${port}`;
|
|
127422
|
+
}
|
|
127423
|
+
function toNormalizedId(value) {
|
|
127424
|
+
if ('string' != typeof value) return '';
|
|
127425
|
+
return value.trim();
|
|
127426
|
+
}
|
|
127427
|
+
function deriveChromiumExtensionIdFromManifest(manifest) {
|
|
127428
|
+
const key = toNormalizedId(manifest?.key);
|
|
127429
|
+
if (!key) return '';
|
|
127430
|
+
try {
|
|
127431
|
+
const decodedKey = Buffer.from(key.replace(/\s+/g, ''), 'base64');
|
|
127432
|
+
if (!decodedKey.length) return '';
|
|
127433
|
+
const digest = (0, crypto__rspack_import_2.createHash)('sha256').update(decodedKey).digest().subarray(0, 16);
|
|
127434
|
+
let extensionId = '';
|
|
127435
|
+
for (const byte of digest){
|
|
127436
|
+
extensionId += String.fromCharCode(97 + (byte >> 4 & 0x0f));
|
|
127437
|
+
extensionId += String.fromCharCode(97 + (0x0f & byte));
|
|
127438
|
+
}
|
|
127439
|
+
return extensionId;
|
|
127440
|
+
} catch {
|
|
127441
|
+
return '';
|
|
127442
|
+
}
|
|
127443
|
+
}
|
|
127444
|
+
function deriveFirefoxExtensionIdFromManifest(manifest) {
|
|
127445
|
+
const fromBrowserSpecificSettings = toNormalizedId(manifest?.browser_specific_settings?.gecko?.id);
|
|
127446
|
+
if (fromBrowserSpecificSettings) return fromBrowserSpecificSettings;
|
|
127447
|
+
return toNormalizedId(manifest?.applications?.gecko?.id);
|
|
127448
|
+
}
|
|
127449
|
+
function resolveExtensionId(args) {
|
|
127450
|
+
const fromInfo = toNormalizedId(args.info?.extensionId);
|
|
127451
|
+
if (fromInfo) return fromInfo;
|
|
127452
|
+
const fromFallback = toNormalizedId(args.fallback?.extensionId);
|
|
127453
|
+
if (fromFallback) return fromFallback;
|
|
127454
|
+
if ('chrome' === args.browser || 'edge' === args.browser || 'chromium' === args.browser || 'chromium-based' === args.browser) return deriveChromiumExtensionIdFromManifest(args.manifest);
|
|
127455
|
+
if ('firefox' === args.browser || 'firefox-based' === args.browser) return deriveFirefoxExtensionIdFromManifest(args.manifest);
|
|
127456
|
+
return '';
|
|
127431
127457
|
}
|
|
127432
127458
|
async function printDevBannerOnce(opts) {
|
|
127433
127459
|
const k = keyFor(opts.browser, opts.outPath, opts.hostPort);
|
|
127434
127460
|
if (printedKeys.has(k)) return false;
|
|
127435
|
-
const
|
|
127436
|
-
const manifestPath = external_path_.join(opts.outPath, 'manifest.json');
|
|
127461
|
+
const manifestPath = path__rspack_import_1.join(opts.outPath, 'manifest.json');
|
|
127437
127462
|
const updateSuffix = readUpdateSuffixOnce();
|
|
127438
|
-
if (!
|
|
127439
|
-
const manifest = JSON.parse(
|
|
127440
|
-
const
|
|
127463
|
+
if (!fs__rspack_import_0.existsSync(manifestPath)) return false;
|
|
127464
|
+
const manifest = JSON.parse(fs__rspack_import_0.readFileSync(manifestPath, 'utf-8'));
|
|
127465
|
+
const manifestDerivedExtensionId = resolveExtensionId({
|
|
127466
|
+
browser: opts.browser,
|
|
127467
|
+
info: null,
|
|
127468
|
+
fallback: opts.fallback,
|
|
127469
|
+
manifest
|
|
127470
|
+
});
|
|
127471
|
+
const info = manifestDerivedExtensionId ? await Promise.race([
|
|
127472
|
+
opts.getInfo().catch(()=>null),
|
|
127473
|
+
new Promise((resolve)=>setTimeout(()=>resolve(null), 250))
|
|
127474
|
+
]) : await opts.getInfo().catch(()=>null);
|
|
127475
|
+
const extensionId = resolveExtensionId({
|
|
127476
|
+
browser: opts.browser,
|
|
127477
|
+
info,
|
|
127478
|
+
fallback: opts.fallback,
|
|
127479
|
+
manifest
|
|
127480
|
+
});
|
|
127481
|
+
if (!extensionId) return false;
|
|
127441
127482
|
const name = info?.name || opts.fallback?.name || manifest.name;
|
|
127442
127483
|
const version1 = info?.version || opts.fallback?.version || manifest.version;
|
|
127443
127484
|
const message = {
|
|
@@ -127449,10 +127490,10 @@ var __webpack_modules__ = {
|
|
|
127449
127490
|
}
|
|
127450
127491
|
}
|
|
127451
127492
|
};
|
|
127452
|
-
console.log(
|
|
127453
|
-
console.log(
|
|
127454
|
-
console.log(
|
|
127455
|
-
|
|
127493
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127494
|
+
console.log(_messages__rspack_import_3.e_P(manifest, opts.browser, message, opts.browserVersionLine, updateSuffix || void 0));
|
|
127495
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127496
|
+
(0, _plugin_compilation_compilation_lib_shared_state__rspack_import_5.If)();
|
|
127456
127497
|
process.env.EXTENSION_CLI_BANNER_PRINTED = 'true';
|
|
127457
127498
|
printedKeys.add(k);
|
|
127458
127499
|
return true;
|
|
@@ -127463,23 +127504,33 @@ var __webpack_modules__ = {
|
|
|
127463
127504
|
const browserLabel = opts.browserVersionLine && opts.browserVersionLine.trim().length > 0 ? opts.browserVersionLine.trim() : String(opts.browser || 'unknown');
|
|
127464
127505
|
const updateSuffix = readUpdateSuffixOnce();
|
|
127465
127506
|
try {
|
|
127466
|
-
const manifestPath =
|
|
127467
|
-
const manifest = JSON.parse(
|
|
127468
|
-
|
|
127507
|
+
const manifestPath = path__rspack_import_1.join(opts.outPath, 'manifest.json');
|
|
127508
|
+
const manifest = JSON.parse(fs__rspack_import_0.readFileSync(manifestPath, 'utf-8'));
|
|
127509
|
+
const runtimeInfo = opts.runtime ? {
|
|
127510
|
+
extensionId: opts.runtime.extensionId,
|
|
127511
|
+
name: opts.runtime.name,
|
|
127512
|
+
version: opts.runtime.version
|
|
127513
|
+
} : null;
|
|
127514
|
+
const resolvedExtensionId = resolveExtensionId({
|
|
127515
|
+
browser: opts.browser,
|
|
127516
|
+
info: runtimeInfo,
|
|
127517
|
+
manifest
|
|
127518
|
+
});
|
|
127519
|
+
if (resolvedExtensionId) {
|
|
127469
127520
|
const message = {
|
|
127470
127521
|
data: {
|
|
127471
|
-
id:
|
|
127522
|
+
id: resolvedExtensionId,
|
|
127472
127523
|
management: {
|
|
127473
|
-
name: opts.runtime
|
|
127474
|
-
version: opts.runtime
|
|
127524
|
+
name: opts.runtime?.name || manifest.name,
|
|
127525
|
+
version: opts.runtime?.version || manifest.version
|
|
127475
127526
|
}
|
|
127476
127527
|
}
|
|
127477
127528
|
};
|
|
127478
|
-
console.log(
|
|
127479
|
-
console.log(
|
|
127529
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127530
|
+
console.log(_messages__rspack_import_3.e_P(manifest, opts.browser, message, browserLabel, updateSuffix || void 0, {
|
|
127480
127531
|
includeExtensionId: opts.includeExtensionId
|
|
127481
127532
|
}));
|
|
127482
|
-
console.log(
|
|
127533
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127483
127534
|
} else {
|
|
127484
127535
|
const message = {
|
|
127485
127536
|
data: {
|
|
@@ -127490,18 +127541,18 @@ var __webpack_modules__ = {
|
|
|
127490
127541
|
}
|
|
127491
127542
|
}
|
|
127492
127543
|
};
|
|
127493
|
-
console.log(
|
|
127494
|
-
console.log(
|
|
127544
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127545
|
+
console.log(_messages__rspack_import_3.e_P(manifest, opts.browser, message, browserLabel, updateSuffix || void 0, {
|
|
127495
127546
|
includeExtensionId: opts.includeExtensionId
|
|
127496
127547
|
}));
|
|
127497
|
-
console.log(
|
|
127548
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127498
127549
|
}
|
|
127499
127550
|
} catch {
|
|
127500
|
-
console.log(
|
|
127501
|
-
console.log(
|
|
127502
|
-
console.log(
|
|
127551
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127552
|
+
console.log(_webpack_lib_messages__rspack_import_4.Al(opts.outPath, browserLabel));
|
|
127553
|
+
console.log(_messages__rspack_import_3.io8());
|
|
127503
127554
|
}
|
|
127504
|
-
|
|
127555
|
+
(0, _plugin_compilation_compilation_lib_shared_state__rspack_import_5.If)();
|
|
127505
127556
|
process.env.EXTENSION_CLI_BANNER_PRINTED = 'true';
|
|
127506
127557
|
printedKeys.add(k);
|
|
127507
127558
|
return true;
|
|
@@ -127679,27 +127730,28 @@ var __webpack_modules__ = {
|
|
|
127679
127730
|
});
|
|
127680
127731
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
127681
127732
|
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
|
-
|
|
127733
|
+
var os__rspack_import_2 = __webpack_require__("os");
|
|
127734
|
+
var module__rspack_import_3 = __webpack_require__("module");
|
|
127735
|
+
var pintor__rspack_import_4 = __webpack_require__("pintor");
|
|
127736
|
+
var pintor__rspack_import_4_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_4);
|
|
127737
|
+
var chrome_location2__rspack_import_5 = __webpack_require__("chrome-location2");
|
|
127738
|
+
var chromium_location__rspack_import_6 = __webpack_require__("chromium-location");
|
|
127739
|
+
var chromium_location__rspack_import_6_default = /*#__PURE__*/ __webpack_require__.n(chromium_location__rspack_import_6);
|
|
127740
|
+
var edge_location__rspack_import_7 = __webpack_require__("edge-location");
|
|
127741
|
+
var edge_location__rspack_import_7_default = /*#__PURE__*/ __webpack_require__.n(edge_location__rspack_import_7);
|
|
127742
|
+
var firefox_location2__rspack_import_8 = __webpack_require__("firefox-location2");
|
|
127743
|
+
var firefox_location2__rspack_import_8_default = /*#__PURE__*/ __webpack_require__.n(firefox_location2__rspack_import_8);
|
|
127744
|
+
const require1 = (0, module__rspack_import_3.createRequire)(__rslib_import_meta_url__);
|
|
127693
127745
|
function getLoggingPrefix(type) {
|
|
127694
127746
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
127695
127747
|
if (isAuthor) {
|
|
127696
127748
|
const base = 'error' === type ? 'ERROR Author says' : '►►► Author says';
|
|
127697
|
-
return
|
|
127749
|
+
return pintor__rspack_import_4_default().brightMagenta(base);
|
|
127698
127750
|
}
|
|
127699
|
-
if ('error' === type) return
|
|
127700
|
-
if ('warn' === type) return
|
|
127701
|
-
if ('info' === type) return
|
|
127702
|
-
return
|
|
127751
|
+
if ('error' === type) return pintor__rspack_import_4_default().red('ERROR');
|
|
127752
|
+
if ('warn' === type) return pintor__rspack_import_4_default().brightYellow('►►►');
|
|
127753
|
+
if ('info' === type) return pintor__rspack_import_4_default().gray('►►►');
|
|
127754
|
+
return pintor__rspack_import_4_default().green('►►►');
|
|
127703
127755
|
}
|
|
127704
127756
|
function errorDetail(error) {
|
|
127705
127757
|
if ('1' === process.env.EXTENSION_DEBUG) return String(error);
|
|
@@ -127707,22 +127759,23 @@ var __webpack_modules__ = {
|
|
|
127707
127759
|
return String(maybe || error);
|
|
127708
127760
|
}
|
|
127709
127761
|
function isWsl() {
|
|
127762
|
+
if ('linux' !== process.platform) return false;
|
|
127710
127763
|
const hasEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
127711
127764
|
if (hasEnv) return true;
|
|
127712
|
-
return
|
|
127765
|
+
return /microsoft/i.test(os__rspack_import_2.release());
|
|
127713
127766
|
}
|
|
127714
127767
|
function capitalizedBrowserName(browser) {
|
|
127715
127768
|
return `${browser.charAt(0).toUpperCase() + browser.slice(1)}`;
|
|
127716
127769
|
}
|
|
127717
127770
|
function creatingUserProfile(profilePath) {
|
|
127718
|
-
return `${getLoggingPrefix('info')} Creating a fresh user profile at ${
|
|
127771
|
+
return `${getLoggingPrefix('info')} Creating a fresh user profile at ${pintor__rspack_import_4_default().underline(profilePath)}...`;
|
|
127719
127772
|
}
|
|
127720
127773
|
function browserInstanceExited(browser) {
|
|
127721
127774
|
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} instance exited.`;
|
|
127722
127775
|
}
|
|
127723
127776
|
function stdoutData(browser, mode) {
|
|
127724
127777
|
const extensionOutput = 'firefox' === browser || 'gecko-based' === browser ? 'Add-on' : 'Extension';
|
|
127725
|
-
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} ${extensionOutput} running in ${
|
|
127778
|
+
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} ${extensionOutput} running in ${pintor__rspack_import_4_default().green(mode || 'unknown')} mode.`;
|
|
127726
127779
|
}
|
|
127727
127780
|
function cdpClientAttachedToTarget(sessionId, targetType) {
|
|
127728
127781
|
return `${getLoggingPrefix('info')} Attached to target: ${targetType} (session ${sessionId})`;
|
|
@@ -127760,12 +127813,12 @@ var __webpack_modules__ = {
|
|
|
127760
127813
|
const wslHint = (()=>{
|
|
127761
127814
|
if (!isWsl()) return '';
|
|
127762
127815
|
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 ${
|
|
127816
|
+
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
127817
|
})();
|
|
127765
|
-
return `${getLoggingPrefix('error')} ${isUnreachable}Either install the missing browser or choose a different one via ${
|
|
127818
|
+
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
127819
|
}
|
|
127767
127820
|
function browserLaunchError(browser, error) {
|
|
127768
|
-
return `${getLoggingPrefix('error')} Error launching ${capitalizedBrowserName(browser)}:\n${
|
|
127821
|
+
return `${getLoggingPrefix('error')} Error launching ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127769
127822
|
}
|
|
127770
127823
|
function enhancedProcessManagementCleanup(browser) {
|
|
127771
127824
|
return `${getLoggingPrefix('info')} Process Management cleanup for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127777,22 +127830,22 @@ var __webpack_modules__ = {
|
|
|
127777
127830
|
return `${getLoggingPrefix('error')} Force killing ${capitalizedBrowserName(browser)} process after timeout`;
|
|
127778
127831
|
}
|
|
127779
127832
|
function enhancedProcessManagementCleanupError(browser, error) {
|
|
127780
|
-
return `${getLoggingPrefix('error')} Error during ${capitalizedBrowserName(browser)} cleanup:\n${
|
|
127833
|
+
return `${getLoggingPrefix('error')} Error during ${capitalizedBrowserName(browser)} cleanup:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127781
127834
|
}
|
|
127782
127835
|
function enhancedProcessManagementUncaughtException(browser, error) {
|
|
127783
|
-
return `${getLoggingPrefix('error')} Uncaught exception in ${capitalizedBrowserName(browser)} process:\n${
|
|
127836
|
+
return `${getLoggingPrefix('error')} Uncaught exception in ${capitalizedBrowserName(browser)} process:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127784
127837
|
}
|
|
127785
127838
|
function enhancedProcessManagementUnhandledRejection(browser, reason) {
|
|
127786
|
-
return `${getLoggingPrefix('error')} Unhandled rejection in ${capitalizedBrowserName(browser)} process:\n${
|
|
127839
|
+
return `${getLoggingPrefix('error')} Unhandled rejection in ${capitalizedBrowserName(browser)} process:\n${pintor__rspack_import_4_default().red(errorDetail(reason))}`;
|
|
127787
127840
|
}
|
|
127788
127841
|
function generalBrowserError(browser, error) {
|
|
127789
|
-
return `${getLoggingPrefix('error')} General error in ${capitalizedBrowserName(browser)}:\n${
|
|
127842
|
+
return `${getLoggingPrefix('error')} General error in ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127790
127843
|
}
|
|
127791
127844
|
function errorConnectingToBrowser(browser) {
|
|
127792
127845
|
return `${getLoggingPrefix('error')} Unable to connect to ${capitalizedBrowserName(browser)}. Too many retries.`;
|
|
127793
127846
|
}
|
|
127794
127847
|
function addonInstallError(browser, message) {
|
|
127795
|
-
return `${getLoggingPrefix('error')} Can't install add-on into ${capitalizedBrowserName(browser)}:\n${
|
|
127848
|
+
return `${getLoggingPrefix('error')} Can't install add-on into ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(message)}`;
|
|
127796
127849
|
}
|
|
127797
127850
|
function messagingClientClosedError(browser) {
|
|
127798
127851
|
return `${getLoggingPrefix('error')} Messaging client closed unexpectedly for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127801,25 +127854,25 @@ var __webpack_modules__ = {
|
|
|
127801
127854
|
return `${getLoggingPrefix('error')} Connection closed unexpectedly for ${capitalizedBrowserName(browser)}`;
|
|
127802
127855
|
}
|
|
127803
127856
|
function targetActorHasActiveRequestError(browser, targetActor) {
|
|
127804
|
-
return `${getLoggingPrefix('error')} Target actor ${
|
|
127857
|
+
return `${getLoggingPrefix('error')} Target actor ${pintor__rspack_import_4_default().gray(targetActor)} has active request for ${capitalizedBrowserName(browser)}`;
|
|
127805
127858
|
}
|
|
127806
127859
|
function parsingPacketError(browser, error) {
|
|
127807
|
-
return `${getLoggingPrefix('error')} Failed to parse packet from ${capitalizedBrowserName(browser)}:\n${
|
|
127860
|
+
return `${getLoggingPrefix('error')} Failed to parse packet from ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127808
127861
|
}
|
|
127809
127862
|
function messageWithoutSenderError(browser, message) {
|
|
127810
|
-
return `${getLoggingPrefix('error')} Message without sender from ${capitalizedBrowserName(browser)}:\n${
|
|
127863
|
+
return `${getLoggingPrefix('error')} Message without sender from ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(JSON.stringify(message))}`;
|
|
127811
127864
|
}
|
|
127812
127865
|
function profileFallbackWarning(browser, reason) {
|
|
127813
|
-
return `${getLoggingPrefix('warn')} ${capitalizedBrowserName(browser)} falling back to per-instance profile` + (reason ? `: ${
|
|
127866
|
+
return `${getLoggingPrefix('warn')} ${capitalizedBrowserName(browser)} falling back to per-instance profile` + (reason ? `: ${pintor__rspack_import_4_default().gray(reason)}` : '');
|
|
127814
127867
|
}
|
|
127815
127868
|
function chromeProcessExited(code) {
|
|
127816
|
-
return `${getLoggingPrefix('info')} Chrome process exited with code: ${
|
|
127869
|
+
return `${getLoggingPrefix('info')} Chrome process exited with code: ${pintor__rspack_import_4_default().gray(code.toString())}`;
|
|
127817
127870
|
}
|
|
127818
127871
|
function chromeProcessError(error) {
|
|
127819
|
-
return `${getLoggingPrefix('error')} Chrome process error:\n${
|
|
127872
|
+
return `${getLoggingPrefix('error')} Chrome process error:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127820
127873
|
}
|
|
127821
127874
|
function chromeFailedToSpawn(error) {
|
|
127822
|
-
return `${getLoggingPrefix('error')} Failed to spawn Chrome:\n${
|
|
127875
|
+
return `${getLoggingPrefix('error')} Failed to spawn Chrome:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127823
127876
|
}
|
|
127824
127877
|
function chromeInitializingEnhancedReload() {
|
|
127825
127878
|
return `${getLoggingPrefix('info')} Initializing enhanced reload service with direct spawn for Chrome`;
|
|
@@ -127835,7 +127888,7 @@ var __webpack_modules__ = {
|
|
|
127835
127888
|
return `${getLoggingPrefix('info')} Locating ${capitalizedBrowserName(browser)} browser binary...`;
|
|
127836
127889
|
}
|
|
127837
127890
|
function devChromeProfilePath(path) {
|
|
127838
|
-
return `${getLoggingPrefix('info')} Chrome profile: ${
|
|
127891
|
+
return `${getLoggingPrefix('info')} Chrome profile: ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127839
127892
|
}
|
|
127840
127893
|
function usingChromiumRunner(browser) {
|
|
127841
127894
|
return `${getLoggingPrefix('info')} Using Chromium runner for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127847,13 +127900,13 @@ var __webpack_modules__ = {
|
|
|
127847
127900
|
return `${getLoggingPrefix('info')} [plugin-browsers] Dry run: not launching browser`;
|
|
127848
127901
|
}
|
|
127849
127902
|
function chromiumDryRunBinary(path) {
|
|
127850
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Binary: ${
|
|
127903
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Binary: ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127851
127904
|
}
|
|
127852
127905
|
function chromiumDryRunFlags(flags) {
|
|
127853
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Flags: ${
|
|
127906
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Flags: ${pintor__rspack_import_4_default().gray(flags)}`;
|
|
127854
127907
|
}
|
|
127855
127908
|
function prettyPuppeteerInstallGuidance(browser, rawGuidance, cacheDir) {
|
|
127856
|
-
const dim =
|
|
127909
|
+
const dim = pintor__rspack_import_4_default().gray;
|
|
127857
127910
|
const body = [];
|
|
127858
127911
|
let cleaned = String(rawGuidance || '').replace(/^Error:\s*/i, '').trim();
|
|
127859
127912
|
try {
|
|
@@ -127861,19 +127914,19 @@ var __webpack_modules__ = {
|
|
|
127861
127914
|
if (looksMinimal) {
|
|
127862
127915
|
const b = String(browser || '').toLowerCase();
|
|
127863
127916
|
if ('chromium' === b || 'chromium-based' === b) try {
|
|
127864
|
-
const txt = (0,
|
|
127917
|
+
const txt = (0, chromium_location__rspack_import_6.getInstallGuidance)();
|
|
127865
127918
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127866
127919
|
} catch {}
|
|
127867
127920
|
else if ('chrome' === b) try {
|
|
127868
|
-
const txt = (0,
|
|
127921
|
+
const txt = (0, chrome_location2__rspack_import_5.getInstallGuidance)();
|
|
127869
127922
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127870
127923
|
} catch {}
|
|
127871
127924
|
else if ('firefox' === b || 'gecko-based' === b) try {
|
|
127872
|
-
const txt = (0,
|
|
127925
|
+
const txt = (0, firefox_location2__rspack_import_8.getInstallGuidance)();
|
|
127873
127926
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127874
127927
|
} catch {}
|
|
127875
127928
|
else if ('edge' === b) try {
|
|
127876
|
-
const txt = (0,
|
|
127929
|
+
const txt = (0, edge_location__rspack_import_7.getInstallGuidance)();
|
|
127877
127930
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127878
127931
|
} catch {}
|
|
127879
127932
|
}
|
|
@@ -127905,47 +127958,47 @@ var __webpack_modules__ = {
|
|
|
127905
127958
|
}
|
|
127906
127959
|
} catch {}
|
|
127907
127960
|
body.push(cleaned);
|
|
127908
|
-
if (finalCachePath) body.push(`${dim('INSTALL PATH')} ${
|
|
127961
|
+
if (finalCachePath) body.push(`${dim('INSTALL PATH')} ${pintor__rspack_import_4_default().underline(finalCachePath)}`);
|
|
127909
127962
|
return body.join('\n') + '\n';
|
|
127910
127963
|
}
|
|
127911
127964
|
function firefoxLaunchCalled() {
|
|
127912
127965
|
return `${getLoggingPrefix('info')} Firefox launch requested.`;
|
|
127913
127966
|
}
|
|
127914
127967
|
function firefoxBinaryArgsExtracted(args) {
|
|
127915
|
-
return `${getLoggingPrefix('info')} Firefox binary args extracted: ${
|
|
127968
|
+
return `${getLoggingPrefix('info')} Firefox binary args extracted: ${pintor__rspack_import_4_default().gray(args)}`;
|
|
127916
127969
|
}
|
|
127917
127970
|
function firefoxNoBinaryArgsFound() {
|
|
127918
127971
|
return `${getLoggingPrefix('info')} No Firefox binary args found`;
|
|
127919
127972
|
}
|
|
127920
127973
|
function firefoxFailedToStart(error) {
|
|
127921
|
-
return `${getLoggingPrefix('error')} Firefox failed to start:\n${
|
|
127974
|
+
return `${getLoggingPrefix('error')} Firefox failed to start:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127922
127975
|
}
|
|
127923
127976
|
function firefoxDryRunNotLaunching() {
|
|
127924
127977
|
return `${getLoggingPrefix('info')} [plugin-browsers] Dry run: not launching browser`;
|
|
127925
127978
|
}
|
|
127926
127979
|
function firefoxDryRunBinary(path) {
|
|
127927
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Binary (detected): ${
|
|
127980
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Binary (detected): ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127928
127981
|
}
|
|
127929
127982
|
function firefoxDryRunConfig(cfg) {
|
|
127930
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Config: ${
|
|
127983
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Config: ${pintor__rspack_import_4_default().gray(cfg)}`;
|
|
127931
127984
|
}
|
|
127932
127985
|
function sourceInspectorInitialized() {
|
|
127933
127986
|
return `${getLoggingPrefix('info')} Chrome source inspector initialized successfully`;
|
|
127934
127987
|
}
|
|
127935
127988
|
function sourceInspectorInitializationFailed(error) {
|
|
127936
|
-
return `${getLoggingPrefix('error')} Failed to initialize Chrome source inspector: ${
|
|
127989
|
+
return `${getLoggingPrefix('error')} Failed to initialize Chrome source inspector: ${pintor__rspack_import_4_default().red(error)}`;
|
|
127937
127990
|
}
|
|
127938
127991
|
function sourceInspectorChromeDebuggingRequired(port) {
|
|
127939
127992
|
try {
|
|
127940
127993
|
const p = Number(port);
|
|
127941
127994
|
const shown = Number.isFinite(p) && p > 0 ? p : 9222;
|
|
127942
|
-
return `${getLoggingPrefix('error')} Chrome is not running with remote debugging enabled on port ${
|
|
127995
|
+
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
127996
|
} catch {
|
|
127944
|
-
return `${getLoggingPrefix('error')} Chrome is not running with remote debugging enabled on port ${
|
|
127997
|
+
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
127998
|
}
|
|
127946
127999
|
}
|
|
127947
128000
|
function sourceInspectorFirefoxDebuggingRequired(port) {
|
|
127948
|
-
return `${getLoggingPrefix('error')} Firefox is not running with remote debugging enabled on port ${
|
|
128001
|
+
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
128002
|
}
|
|
127950
128003
|
function sourceInspectorWaitingForFirefox() {
|
|
127951
128004
|
return `${getLoggingPrefix('info')} Waiting for Firefox to be ready with remote debugging...`;
|
|
@@ -127954,7 +128007,7 @@ var __webpack_modules__ = {
|
|
|
127954
128007
|
return `${getLoggingPrefix('success')} Firefox is ready with remote debugging.`;
|
|
127955
128008
|
}
|
|
127956
128009
|
function sourceInspectorFirefoxNotReadyYet(retries, maxRetries) {
|
|
127957
|
-
return `${getLoggingPrefix('warn')} Firefox not ready yet, retrying... (${
|
|
128010
|
+
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
128011
|
}
|
|
127959
128012
|
function sourceInspectorWaitingForChrome() {
|
|
127960
128013
|
return `${getLoggingPrefix('info')} Waiting for Chrome to be ready with remote debugging...`;
|
|
@@ -127963,10 +128016,10 @@ var __webpack_modules__ = {
|
|
|
127963
128016
|
return `${getLoggingPrefix('success')} Chrome is ready with remote debugging.`;
|
|
127964
128017
|
}
|
|
127965
128018
|
function sourceInspectorChromeNotReadyYet(retries, maxRetries) {
|
|
127966
|
-
return `${getLoggingPrefix('warn')} Chrome not ready yet, retrying... (${
|
|
128019
|
+
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
128020
|
}
|
|
127968
128021
|
function sourceInspectorOpeningUrl(url) {
|
|
127969
|
-
return `${getLoggingPrefix('info')} Chrome is opening URL: ${
|
|
128022
|
+
return `${getLoggingPrefix('info')} Chrome is opening URL: ${pintor__rspack_import_4_default().underline(url)}`;
|
|
127970
128023
|
}
|
|
127971
128024
|
function sourceInspectorWaitingForPageLoad() {
|
|
127972
128025
|
return `${getLoggingPrefix('info')} Chrome is waiting for the page to load...`;
|
|
@@ -127978,22 +128031,22 @@ var __webpack_modules__ = {
|
|
|
127978
128031
|
return `${getLoggingPrefix('info')} Chrome is finding an existing target...`;
|
|
127979
128032
|
}
|
|
127980
128033
|
function sourceInspectorUsingExistingTarget(targetId) {
|
|
127981
|
-
return `${getLoggingPrefix('info')} Chrome is using existing target with ID: ${
|
|
128034
|
+
return `${getLoggingPrefix('info')} Chrome is using existing target with ID: ${pintor__rspack_import_4_default().gray(targetId)}`;
|
|
127982
128035
|
}
|
|
127983
128036
|
function sourceInspectorTargetCreated(targetId) {
|
|
127984
|
-
return `${getLoggingPrefix('success')} Chrome created a target with ID: ${
|
|
128037
|
+
return `${getLoggingPrefix('success')} Chrome created a target with ID: ${pintor__rspack_import_4_default().gray(targetId)}`;
|
|
127985
128038
|
}
|
|
127986
128039
|
function sourceInspectorAttachingToTarget() {
|
|
127987
128040
|
return `${getLoggingPrefix('info')} Chrome is attaching to the target...`;
|
|
127988
128041
|
}
|
|
127989
128042
|
function sourceInspectorAttachedToTarget(sessionId) {
|
|
127990
|
-
return `${getLoggingPrefix('success')} Chrome is attached to the target with session ID: ${
|
|
128043
|
+
return `${getLoggingPrefix('success')} Chrome is attached to the target with session ID: ${pintor__rspack_import_4_default().gray(sessionId)}`;
|
|
127991
128044
|
}
|
|
127992
128045
|
function sourceInspectorHTMLExtractionComplete() {
|
|
127993
128046
|
return `${getLoggingPrefix('success')} Chrome HTML extraction is complete.`;
|
|
127994
128047
|
}
|
|
127995
128048
|
function sourceInspectorInspectionFailed(error) {
|
|
127996
|
-
return `${getLoggingPrefix('error')} Failed to inspect Chrome source: ${
|
|
128049
|
+
return `${getLoggingPrefix('error')} Failed to inspect Chrome source: ${pintor__rspack_import_4_default().red(error)}`;
|
|
127997
128050
|
}
|
|
127998
128051
|
function sourceInspectorStartingWatchMode() {
|
|
127999
128052
|
return `${getLoggingPrefix('info')} Chrome is starting watch mode for sources...`;
|
|
@@ -128023,10 +128076,10 @@ var __webpack_modules__ = {
|
|
|
128023
128076
|
return `${getLoggingPrefix('info')} Chrome is reconnecting to the target...`;
|
|
128024
128077
|
}
|
|
128025
128078
|
function sourceInspectorReconnectedToTarget(sessionId) {
|
|
128026
|
-
return `${getLoggingPrefix('success')} Chrome reconnected to target with session ID: ${
|
|
128079
|
+
return `${getLoggingPrefix('success')} Chrome reconnected to target with session ID: ${pintor__rspack_import_4_default().gray(sessionId)}`;
|
|
128027
128080
|
}
|
|
128028
128081
|
function sourceInspectorReconnectionFailed(error) {
|
|
128029
|
-
return `${getLoggingPrefix('error')} Failed to reconnect to Chrome target: ${
|
|
128082
|
+
return `${getLoggingPrefix('error')} Failed to reconnect to Chrome target: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128030
128083
|
}
|
|
128031
128084
|
function sourceInspectorEnsuringNavigation() {
|
|
128032
128085
|
return `${getLoggingPrefix('info')} Chrome ensuring target navigates to URL...`;
|
|
@@ -128044,13 +128097,13 @@ var __webpack_modules__ = {
|
|
|
128044
128097
|
return `${getLoggingPrefix('warn')} Chrome source file changed, updating HTML...`;
|
|
128045
128098
|
}
|
|
128046
128099
|
function sourceInspectorHTMLUpdateFailed(error) {
|
|
128047
|
-
return `${getLoggingPrefix('error')} Failed to update Chrome HTML: ${
|
|
128100
|
+
return `${getLoggingPrefix('error')} Failed to update Chrome HTML: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128048
128101
|
}
|
|
128049
128102
|
function sourceInspectorCleanupComplete() {
|
|
128050
128103
|
return `${getLoggingPrefix('success')} Chrome source inspector cleaned up.`;
|
|
128051
128104
|
}
|
|
128052
128105
|
function sourceInspectorCleanupError(error) {
|
|
128053
|
-
return `${getLoggingPrefix('error')} Error during Chrome cleanup: ${
|
|
128106
|
+
return `${getLoggingPrefix('error')} Error during Chrome cleanup: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128054
128107
|
}
|
|
128055
128108
|
function sourceInspectorNotInitialized() {
|
|
128056
128109
|
return `${getLoggingPrefix('error')} Chrome source inspector not initialized`;
|
|
@@ -128059,19 +128112,19 @@ var __webpack_modules__ = {
|
|
|
128059
128112
|
return `${getLoggingPrefix('warn')} Chrome invalid WebSocket server provided`;
|
|
128060
128113
|
}
|
|
128061
128114
|
function sourceInspectorUrlRequired() {
|
|
128062
|
-
return `${getLoggingPrefix('error')} Chrome source inspection requires either ${
|
|
128115
|
+
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
128116
|
}
|
|
128064
128117
|
function sourceInspectorWillInspect(url) {
|
|
128065
|
-
return `${getLoggingPrefix('info')} Chrome source inspection will inspect: ${
|
|
128118
|
+
return `${getLoggingPrefix('info')} Chrome source inspection will inspect: ${pintor__rspack_import_4_default().underline(url)}`;
|
|
128066
128119
|
}
|
|
128067
128120
|
function sourceInspectorSetupFailed(error) {
|
|
128068
|
-
return `${getLoggingPrefix('error')} Failed to setup Chrome source inspection: ${
|
|
128121
|
+
return `${getLoggingPrefix('error')} Failed to setup Chrome source inspection: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128069
128122
|
}
|
|
128070
128123
|
function sourceInspectorHTMLOutputHeader() {
|
|
128071
128124
|
return '\n' + '='.repeat(80);
|
|
128072
128125
|
}
|
|
128073
128126
|
function sourceInspectorHTMLOutputTitle(title) {
|
|
128074
|
-
return `${
|
|
128127
|
+
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
128128
|
}
|
|
128076
128129
|
function sourceInspectorHTMLOutputFooter() {
|
|
128077
128130
|
return '='.repeat(80) + '\n';
|
|
@@ -128089,16 +128142,16 @@ var __webpack_modules__ = {
|
|
|
128089
128142
|
return `${getLoggingPrefix('error')} Failed to extract Firefox HTML after retries`;
|
|
128090
128143
|
}
|
|
128091
128144
|
function cdpClientFoundTargets(count) {
|
|
128092
|
-
return `${getLoggingPrefix('info')} Chrome found ${
|
|
128145
|
+
return `${getLoggingPrefix('info')} Chrome found ${pintor__rspack_import_4_default().gray(count.toString())} targets`;
|
|
128093
128146
|
}
|
|
128094
128147
|
function cdpClientTargetWebSocketUrlStored() {
|
|
128095
128148
|
return `${getLoggingPrefix('info')} Chrome target WebSocket URL stored for future connections`;
|
|
128096
128149
|
}
|
|
128097
128150
|
function cdpClientConnected(host, port) {
|
|
128098
|
-
return `${getLoggingPrefix('success')} Chrome CDP Client connected to ${
|
|
128151
|
+
return `${getLoggingPrefix('success')} Chrome CDP Client connected to ${pintor__rspack_import_4_default().gray(host)}:${pintor__rspack_import_4_default().gray(port.toString())}`;
|
|
128099
128152
|
}
|
|
128100
128153
|
function cdpClientConnectionError(error) {
|
|
128101
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client connection error: ${
|
|
128154
|
+
return `${getLoggingPrefix('error')} Chrome CDP Client connection error: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128102
128155
|
}
|
|
128103
128156
|
function cdpClientBrowserConnectionEstablished() {
|
|
128104
128157
|
return `${getLoggingPrefix('success')} Chrome CDP Client browser connection established`;
|
|
@@ -128110,19 +128163,19 @@ var __webpack_modules__ = {
|
|
|
128110
128163
|
return `${getLoggingPrefix('warn')} Chrome load event timed out; proceeding anyway...`;
|
|
128111
128164
|
}
|
|
128112
128165
|
function cdpClientExtensionReloadFailed(extensionId, error) {
|
|
128113
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to force-reload extension ${
|
|
128166
|
+
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
128167
|
}
|
|
128115
128168
|
function cdpClientExtensionUnloadFailed(extensionId, error) {
|
|
128116
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to unload extension ${
|
|
128169
|
+
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
128170
|
}
|
|
128118
128171
|
function cdpClientExtensionInfoFailed(extensionId, error) {
|
|
128119
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to get extension info for ${
|
|
128172
|
+
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
128173
|
}
|
|
128121
128174
|
function cdpClientExtensionLoadFailed(path, error) {
|
|
128122
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to load extension from ${
|
|
128175
|
+
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
128176
|
}
|
|
128124
128177
|
function firefoxRdpClientConnected(host, port) {
|
|
128125
|
-
return `${getLoggingPrefix('success')} Connected to Firefox Remote Debugging Protocol on ${
|
|
128178
|
+
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
128179
|
}
|
|
128127
128180
|
function firefoxRdpClientTestingEvaluation() {
|
|
128128
128181
|
return `${getLoggingPrefix('info')} Testing basic Firefox RDP evaluation...`;
|
|
@@ -128148,7 +128201,7 @@ var __webpack_modules__ = {
|
|
|
128148
128201
|
default:
|
|
128149
128202
|
browserDevToolsUrl = '';
|
|
128150
128203
|
}
|
|
128151
|
-
if (!message.data) return `${getLoggingPrefix('error')} No Client Data Received for ${manifestName}\n\n${
|
|
128204
|
+
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
128205
|
const { id = '', management } = message.data;
|
|
128153
128206
|
if (!management) {
|
|
128154
128207
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) return `${getLoggingPrefix('error')} No management API info received from client for ${manifestName}. Investigate.`;
|
|
@@ -128164,7 +128217,7 @@ var __webpack_modules__ = {
|
|
|
128164
128217
|
let effectiveBrowserLine = browserVersionLine && browserVersionLine.trim().length > 0 ? browserVersionLine.trim() : '';
|
|
128165
128218
|
if (!effectiveBrowserLine) try {
|
|
128166
128219
|
if ('chromium' === browser || 'chromium-based' === browser) {
|
|
128167
|
-
const p =
|
|
128220
|
+
const p = chromium_location__rspack_import_6_default()();
|
|
128168
128221
|
if (p && 'string' == typeof p && fs__rspack_import_1.existsSync(p)) {
|
|
128169
128222
|
const v = require1('child_process').execFileSync(p, [
|
|
128170
128223
|
'--version'
|
|
@@ -128174,7 +128227,7 @@ var __webpack_modules__ = {
|
|
|
128174
128227
|
effectiveBrowserLine = v || 'Chromium';
|
|
128175
128228
|
}
|
|
128176
128229
|
} else if ('chrome' === browser) {
|
|
128177
|
-
const p = (0,
|
|
128230
|
+
const p = (0, chrome_location2__rspack_import_5.locateChromeOrExplain)({
|
|
128178
128231
|
allowFallback: true
|
|
128179
128232
|
});
|
|
128180
128233
|
if (p && fs__rspack_import_1.existsSync(p)) {
|
|
@@ -128186,7 +128239,7 @@ var __webpack_modules__ = {
|
|
|
128186
128239
|
effectiveBrowserLine = v || 'Chrome';
|
|
128187
128240
|
}
|
|
128188
128241
|
} else if ('edge' === browser) {
|
|
128189
|
-
const p =
|
|
128242
|
+
const p = edge_location__rspack_import_7_default()();
|
|
128190
128243
|
if (p && fs__rspack_import_1.existsSync(p)) {
|
|
128191
128244
|
const v = require1('child_process').execFileSync(p, [
|
|
128192
128245
|
'--version'
|
|
@@ -128196,7 +128249,7 @@ var __webpack_modules__ = {
|
|
|
128196
128249
|
effectiveBrowserLine = v || 'Microsoft Edge';
|
|
128197
128250
|
}
|
|
128198
128251
|
} else if ('firefox' === browser) {
|
|
128199
|
-
const p =
|
|
128252
|
+
const p = firefox_location2__rspack_import_8_default()(true);
|
|
128200
128253
|
if (p && 'string' == typeof p && fs__rspack_import_1.existsSync(p)) {
|
|
128201
128254
|
const v = require1('child_process').execFileSync(p, [
|
|
128202
128255
|
'--version'
|
|
@@ -128215,8 +128268,8 @@ var __webpack_modules__ = {
|
|
|
128215
128268
|
const updateNotice = updateSuffix ? ` ${updateSuffix}` : '';
|
|
128216
128269
|
const displayName = String(manifestName);
|
|
128217
128270
|
const displayVersion = String(version1 || manifest.version || '');
|
|
128218
|
-
lines.push(` 🧩 ${
|
|
128219
|
-
if (includeExtensionId) lines.push(` Extension ID ${
|
|
128271
|
+
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)}`);
|
|
128272
|
+
if (includeExtensionId && cleanId) lines.push(` Extension ID ${pintor__rspack_import_4_default().gray(cleanId)}`);
|
|
128220
128273
|
return lines.join('\n');
|
|
128221
128274
|
}
|
|
128222
128275
|
function emptyLine() {
|
|
@@ -128226,19 +128279,19 @@ var __webpack_modules__ = {
|
|
|
128226
128279
|
return ''.padEnd(80, '=');
|
|
128227
128280
|
}
|
|
128228
128281
|
function devChromiumDebugPort(finalPort, requestedPort) {
|
|
128229
|
-
return `${getLoggingPrefix('info')} Chromium debug port: ${
|
|
128282
|
+
return `${getLoggingPrefix('info')} Chromium debug port: ${pintor__rspack_import_4_default().gray(finalPort.toString())} (requested ${pintor__rspack_import_4_default().gray(requestedPort.toString())})`;
|
|
128230
128283
|
}
|
|
128231
128284
|
function devFirefoxDebugPort(finalPort, requestedPort) {
|
|
128232
|
-
return `${getLoggingPrefix('info')} Firefox debug port: ${
|
|
128285
|
+
return `${getLoggingPrefix('info')} Firefox debug port: ${pintor__rspack_import_4_default().gray(finalPort.toString())} (requested ${pintor__rspack_import_4_default().gray(requestedPort.toString())})`;
|
|
128233
128286
|
}
|
|
128234
128287
|
function devFirefoxProfilePath(profilePath) {
|
|
128235
|
-
return `${getLoggingPrefix('info')} Firefox profile: ${
|
|
128288
|
+
return `${getLoggingPrefix('info')} Firefox profile: ${pintor__rspack_import_4_default().underline(profilePath)}`;
|
|
128236
128289
|
}
|
|
128237
128290
|
function devHtmlSampleRetry(sample) {
|
|
128238
|
-
return `${
|
|
128291
|
+
return `${pintor__rspack_import_4_default().gray('[Extension.js] HTML sample (retry):')} ${pintor__rspack_import_4_default().gray(sample)}`;
|
|
128239
128292
|
}
|
|
128240
128293
|
function devHtmlSampleLate(sample) {
|
|
128241
|
-
return `${
|
|
128294
|
+
return `${pintor__rspack_import_4_default().gray('[Extension.js] HTML sample (late):')} ${pintor__rspack_import_4_default().gray(sample)}`;
|
|
128242
128295
|
}
|
|
128243
128296
|
function cdpUnifiedExtensionLog(ts, payload) {
|
|
128244
128297
|
const data = (()=>{
|
|
@@ -128251,31 +128304,31 @@ var __webpack_modules__ = {
|
|
|
128251
128304
|
return `[extension-log ${ts}] ${data}`;
|
|
128252
128305
|
}
|
|
128253
128306
|
function firefoxInspectSourceNonFatal(message) {
|
|
128254
|
-
return `${getLoggingPrefix('warn')} Firefox Inspect non-fatal error: ${
|
|
128307
|
+
return `${getLoggingPrefix('warn')} Firefox Inspect non-fatal error: ${pintor__rspack_import_4_default().yellow(message)}`;
|
|
128255
128308
|
}
|
|
128256
128309
|
function unsupportedBrowser(browser) {
|
|
128257
128310
|
const supported = "chrome, edge, firefox";
|
|
128258
|
-
const hintFlag = `${
|
|
128259
|
-
const docsUrl =
|
|
128260
|
-
return `${getLoggingPrefix('error')} Unsupported browser ${
|
|
128311
|
+
const hintFlag = `${pintor__rspack_import_4_default().blue('--browser')} ${pintor__rspack_import_4_default().gray('<chrome|edge|firefox>')}`;
|
|
128312
|
+
const docsUrl = pintor__rspack_import_4_default().underline('https://github.com/extension-js/extension.js');
|
|
128313
|
+
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
128314
|
}
|
|
128262
128315
|
function browserRunnerError(body) {
|
|
128263
|
-
return `${
|
|
128316
|
+
return `${pintor__rspack_import_4_default().red('ERROR')} ${pintor__rspack_import_4_default().brightBlue('error in browser runner')}\n${body}`;
|
|
128264
128317
|
}
|
|
128265
128318
|
function requireChromiumBinaryForChromiumBased() {
|
|
128266
|
-
const body = `Configuration required\nProvide ${
|
|
128319
|
+
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
128320
|
return browserRunnerError(body);
|
|
128268
128321
|
}
|
|
128269
128322
|
function requireGeckoBinaryForGeckoBased() {
|
|
128270
|
-
const body = `Configuration required\nProvide ${
|
|
128323
|
+
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
128324
|
return browserRunnerError(body);
|
|
128272
128325
|
}
|
|
128273
128326
|
function invalidChromiumBinaryPath(p) {
|
|
128274
|
-
const body = `Invalid binary path\nChromium binary not found at ${
|
|
128327
|
+
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
128328
|
return browserRunnerError(body);
|
|
128276
128329
|
}
|
|
128277
128330
|
function invalidGeckoBinaryPath(p) {
|
|
128278
|
-
const body = `Invalid binary path\nFirefox/Gecko binary not found at ${
|
|
128331
|
+
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
128332
|
return browserRunnerError(body);
|
|
128280
128333
|
}
|
|
128281
128334
|
function rdpInvalidRequestPayload() {
|
|
@@ -128283,8 +128336,8 @@ var __webpack_modules__ = {
|
|
|
128283
128336
|
}
|
|
128284
128337
|
function chromiumDeveloperModeGuidance(browser) {
|
|
128285
128338
|
let exts = '';
|
|
128286
|
-
exts = 'edge' === browser ?
|
|
128287
|
-
return `${getLoggingPrefix('warn')} Configuration required\nEnable ${
|
|
128339
|
+
exts = 'edge' === browser ? pintor__rspack_import_4_default().underline('edge://extensions') : pintor__rspack_import_4_default().underline('chrome://extensions');
|
|
128340
|
+
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
128341
|
}
|
|
128289
128342
|
},
|
|
128290
128343
|
"./webpack/plugin-browsers/browsers-lib/output-binaries-resolver.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -128616,6 +128669,95 @@ var __webpack_modules__ = {
|
|
|
128616
128669
|
var shared_utils = __webpack_require__("./webpack/plugin-browsers/browsers-lib/shared-utils.ts");
|
|
128617
128670
|
var banner = __webpack_require__("./webpack/plugin-browsers/browsers-lib/banner.ts");
|
|
128618
128671
|
var external_path_ = __webpack_require__("path");
|
|
128672
|
+
const masterPreferences = {
|
|
128673
|
+
alternate_error_pages: {
|
|
128674
|
+
enabled: false
|
|
128675
|
+
},
|
|
128676
|
+
autofill: {
|
|
128677
|
+
enabled: false
|
|
128678
|
+
},
|
|
128679
|
+
browser: {
|
|
128680
|
+
check_default_browser: false,
|
|
128681
|
+
default_browser_setting_enabled: false
|
|
128682
|
+
},
|
|
128683
|
+
default_apps: 'noinstall',
|
|
128684
|
+
distribution: {
|
|
128685
|
+
alternate_shortcut_text: false,
|
|
128686
|
+
auto_launch_chrome: false,
|
|
128687
|
+
import_bookmarks: false,
|
|
128688
|
+
import_history: false,
|
|
128689
|
+
import_home_page: false,
|
|
128690
|
+
import_search_engine: false,
|
|
128691
|
+
suppress_first_run_bubble: true,
|
|
128692
|
+
do_not_register_for_update_launch: true,
|
|
128693
|
+
make_chrome_default: false,
|
|
128694
|
+
make_chrome_default_for_user: false,
|
|
128695
|
+
require_eula: false,
|
|
128696
|
+
suppress_first_run_default_browser_prompt: true
|
|
128697
|
+
},
|
|
128698
|
+
dns_prefetching: {
|
|
128699
|
+
enabled: false
|
|
128700
|
+
},
|
|
128701
|
+
download: {
|
|
128702
|
+
default_directory: '/tmp/',
|
|
128703
|
+
directory_upgrade: true,
|
|
128704
|
+
open_pdf_in_adobe_reader: false,
|
|
128705
|
+
prompt_for_download: true
|
|
128706
|
+
},
|
|
128707
|
+
enable_do_not_track: true,
|
|
128708
|
+
extensions: {
|
|
128709
|
+
theme: {
|
|
128710
|
+
use_system: false
|
|
128711
|
+
},
|
|
128712
|
+
toolbarsize: -1,
|
|
128713
|
+
developer_mode: true,
|
|
128714
|
+
ui: {
|
|
128715
|
+
developer_mode: true
|
|
128716
|
+
}
|
|
128717
|
+
},
|
|
128718
|
+
plugins: {
|
|
128719
|
+
plugins_list: [
|
|
128720
|
+
{
|
|
128721
|
+
enabled: false,
|
|
128722
|
+
name: 'Java(TM)'
|
|
128723
|
+
}
|
|
128724
|
+
],
|
|
128725
|
+
show_details: true
|
|
128726
|
+
},
|
|
128727
|
+
profile: {
|
|
128728
|
+
password_manager_enabled: false
|
|
128729
|
+
},
|
|
128730
|
+
safebrowsing: {
|
|
128731
|
+
enabled: false,
|
|
128732
|
+
safebrowsingextended_reporting_enabled: false
|
|
128733
|
+
},
|
|
128734
|
+
savefile: {
|
|
128735
|
+
default_directory: '/tmp',
|
|
128736
|
+
type: 0
|
|
128737
|
+
},
|
|
128738
|
+
search: {
|
|
128739
|
+
suggest_enabled: false
|
|
128740
|
+
},
|
|
128741
|
+
session: {
|
|
128742
|
+
restore_on_startup: 5
|
|
128743
|
+
},
|
|
128744
|
+
sync: {
|
|
128745
|
+
suppress_start: true
|
|
128746
|
+
},
|
|
128747
|
+
sync_promo: {
|
|
128748
|
+
show_on_first_run_allowed: false,
|
|
128749
|
+
show_ntp_bubble: false
|
|
128750
|
+
},
|
|
128751
|
+
translate: {
|
|
128752
|
+
enabled: false
|
|
128753
|
+
}
|
|
128754
|
+
};
|
|
128755
|
+
const chromeMasterPreferences = {
|
|
128756
|
+
...masterPreferences
|
|
128757
|
+
};
|
|
128758
|
+
const edgeMasterPreferences = {
|
|
128759
|
+
...masterPreferences
|
|
128760
|
+
};
|
|
128619
128761
|
var external_unique_names_generator_ = __webpack_require__("unique-names-generator");
|
|
128620
128762
|
const DEFAULT_BROWSER_FLAGS = [
|
|
128621
128763
|
'--no-first-run',
|
|
@@ -128641,6 +128783,37 @@ var __webpack_modules__ = {
|
|
|
128641
128783
|
'--enable-features=SidePanelUpdates',
|
|
128642
128784
|
'--disable-features=DisableLoadExtensionCommandLineSwitch'
|
|
128643
128785
|
];
|
|
128786
|
+
function isPlainObject(value) {
|
|
128787
|
+
return !!value && 'object' == typeof value && !Array.isArray(value);
|
|
128788
|
+
}
|
|
128789
|
+
function deepMergePreferences(base, custom) {
|
|
128790
|
+
const merged = {
|
|
128791
|
+
...base
|
|
128792
|
+
};
|
|
128793
|
+
for (const [key, value] of Object.entries(custom)){
|
|
128794
|
+
const current = merged[key];
|
|
128795
|
+
if (isPlainObject(current) && isPlainObject(value)) {
|
|
128796
|
+
merged[key] = deepMergePreferences(current, value);
|
|
128797
|
+
continue;
|
|
128798
|
+
}
|
|
128799
|
+
merged[key] = value;
|
|
128800
|
+
}
|
|
128801
|
+
return merged;
|
|
128802
|
+
}
|
|
128803
|
+
function getChromiumMasterPreferences(browser) {
|
|
128804
|
+
return 'edge' === browser ? edgeMasterPreferences : chromeMasterPreferences;
|
|
128805
|
+
}
|
|
128806
|
+
function seedChromiumPreferences(profilePath, browser, customPreferences) {
|
|
128807
|
+
const preferencesPath = external_path_.join(profilePath, 'Default', 'Preferences');
|
|
128808
|
+
if (external_fs_.existsSync(preferencesPath)) return;
|
|
128809
|
+
const basePreferences = getChromiumMasterPreferences(browser);
|
|
128810
|
+
const custom = isPlainObject(customPreferences) ? customPreferences : {};
|
|
128811
|
+
const mergedPreferences = deepMergePreferences(basePreferences, custom);
|
|
128812
|
+
external_fs_.mkdirSync(external_path_.dirname(preferencesPath), {
|
|
128813
|
+
recursive: true
|
|
128814
|
+
});
|
|
128815
|
+
external_fs_.writeFileSync(preferencesPath, JSON.stringify(mergedPreferences), 'utf8');
|
|
128816
|
+
}
|
|
128644
128817
|
function browserConfig(compilation, configOptions) {
|
|
128645
128818
|
const extensionsToLoad = Array.isArray(configOptions.extension) ? configOptions.extension : [
|
|
128646
128819
|
configOptions.extension
|
|
@@ -128696,6 +128869,12 @@ var __webpack_modules__ = {
|
|
|
128696
128869
|
} catch {}
|
|
128697
128870
|
}
|
|
128698
128871
|
}
|
|
128872
|
+
if (userProfilePath) try {
|
|
128873
|
+
external_fs_.mkdirSync(userProfilePath, {
|
|
128874
|
+
recursive: true
|
|
128875
|
+
});
|
|
128876
|
+
seedChromiumPreferences(userProfilePath, configOptions.browser, configOptions.preferences);
|
|
128877
|
+
} catch {}
|
|
128699
128878
|
const excludeFlags = configOptions.excludeBrowserFlags || [];
|
|
128700
128879
|
const filteredFlags = (0, shared_utils.ov)(DEFAULT_BROWSER_FLAGS, excludeFlags);
|
|
128701
128880
|
const cdpPort = (0, shared_utils.jl)(configOptions.port, configOptions.instanceId);
|
|
@@ -128778,8 +128957,12 @@ var __webpack_modules__ = {
|
|
|
128778
128957
|
console.log(messages.E8B(chromiumConfig.join(' ')));
|
|
128779
128958
|
}
|
|
128780
128959
|
var extension_output_path = __webpack_require__("./webpack/plugin-browsers/run-chromium/chromium-launch/extension-output-path.ts");
|
|
128960
|
+
var external_os_ = __webpack_require__("os");
|
|
128781
128961
|
function isWslEnv() {
|
|
128782
|
-
|
|
128962
|
+
if ('linux' !== process.platform) return false;
|
|
128963
|
+
const hasWslEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
128964
|
+
if (hasWslEnv) return true;
|
|
128965
|
+
return /microsoft/i.test(external_os_.release());
|
|
128783
128966
|
}
|
|
128784
128967
|
function normalizeBinaryPathForWsl(input) {
|
|
128785
128968
|
let value = String(input || '').trim();
|
|
@@ -130047,8 +130230,12 @@ var __webpack_modules__ = {
|
|
|
130047
130230
|
}
|
|
130048
130231
|
}
|
|
130049
130232
|
}
|
|
130233
|
+
var external_os_ = __webpack_require__("os");
|
|
130050
130234
|
function isWslEnv() {
|
|
130051
|
-
|
|
130235
|
+
if ('linux' !== process.platform) return false;
|
|
130236
|
+
const hasWslEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
130237
|
+
if (hasWslEnv) return true;
|
|
130238
|
+
return /microsoft/i.test(external_os_.release());
|
|
130052
130239
|
}
|
|
130053
130240
|
function normalizeBinaryPathForWsl(input) {
|
|
130054
130241
|
let value = String(input || '').trim();
|
|
@@ -130479,7 +130666,7 @@ var __webpack_modules__ = {
|
|
|
130479
130666
|
host: '127.0.0.1'
|
|
130480
130667
|
},
|
|
130481
130668
|
getInfo: async ()=>({
|
|
130482
|
-
extensionId
|
|
130669
|
+
extensionId,
|
|
130483
130670
|
name: manifest.name,
|
|
130484
130671
|
version: manifest.version
|
|
130485
130672
|
}),
|
|
@@ -131246,6 +131433,31 @@ var __webpack_modules__ = {
|
|
|
131246
131433
|
}
|
|
131247
131434
|
}
|
|
131248
131435
|
},
|
|
131436
|
+
"./webpack/plugin-compilation/compilation-lib/shared-state.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
131437
|
+
"use strict";
|
|
131438
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
131439
|
+
FF: ()=>setPendingCompilationLine,
|
|
131440
|
+
If: ()=>markBannerPrinted,
|
|
131441
|
+
TC: ()=>isBannerPrinted
|
|
131442
|
+
});
|
|
131443
|
+
const sharedState = {
|
|
131444
|
+
bannerPrinted: false,
|
|
131445
|
+
pendingCompilationLine: ''
|
|
131446
|
+
};
|
|
131447
|
+
function markBannerPrinted() {
|
|
131448
|
+
sharedState.bannerPrinted = true;
|
|
131449
|
+
if (sharedState.pendingCompilationLine) {
|
|
131450
|
+
console.log(sharedState.pendingCompilationLine);
|
|
131451
|
+
sharedState.pendingCompilationLine = '';
|
|
131452
|
+
}
|
|
131453
|
+
}
|
|
131454
|
+
function isBannerPrinted() {
|
|
131455
|
+
return sharedState.bannerPrinted;
|
|
131456
|
+
}
|
|
131457
|
+
function setPendingCompilationLine(line) {
|
|
131458
|
+
sharedState.pendingCompilationLine = line;
|
|
131459
|
+
}
|
|
131460
|
+
},
|
|
131249
131461
|
"./webpack/plugin-css/css-lib/integrations.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
131250
131462
|
"use strict";
|
|
131251
131463
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -132542,7 +132754,7 @@ var __webpack_modules__ = {
|
|
|
132542
132754
|
a: ()=>isUsingSvelte
|
|
132543
132755
|
});
|
|
132544
132756
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
132545
|
-
var
|
|
132757
|
+
var fs__rspack_import_1 = __webpack_require__("fs");
|
|
132546
132758
|
var _js_frameworks_lib_messages__rspack_import_2 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/messages.ts");
|
|
132547
132759
|
var _frameworks_lib_integrations__rspack_import_3 = __webpack_require__("./webpack/plugin-js-frameworks/frameworks-lib/integrations.ts");
|
|
132548
132760
|
var _js_frameworks_lib_load_loader_options__rspack_import_4 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/load-loader-options.ts");
|
|
@@ -132635,42 +132847,34 @@ var __webpack_modules__ = {
|
|
|
132635
132847
|
}
|
|
132636
132848
|
}
|
|
132637
132849
|
];
|
|
132638
|
-
const
|
|
132639
|
-
const
|
|
132640
|
-
|
|
132641
|
-
|
|
132642
|
-
|
|
132643
|
-
|
|
132644
|
-
|
|
132850
|
+
const sveltePackageJson = resolveFromProject('svelte/package.json', projectPath);
|
|
132851
|
+
const sveltePackageRoot = sveltePackageJson ? path__rspack_import_0.dirname(sveltePackageJson) : void 0;
|
|
132852
|
+
const resolveClientSubpath = (relative)=>{
|
|
132853
|
+
const direct = resolveFromProject(`svelte/${relative}`, projectPath);
|
|
132854
|
+
if (direct) return direct;
|
|
132855
|
+
if (!sveltePackageRoot) return;
|
|
132856
|
+
const fromRoot = path__rspack_import_0.join(sveltePackageRoot, relative);
|
|
132857
|
+
return fs__rspack_import_1.existsSync(fromRoot) ? fromRoot : void 0;
|
|
132645
132858
|
};
|
|
132646
132859
|
const alias = {};
|
|
132647
|
-
const
|
|
132648
|
-
const
|
|
132649
|
-
const
|
|
132650
|
-
const
|
|
132651
|
-
|
|
132652
|
-
if (
|
|
132653
|
-
if (
|
|
132654
|
-
if (
|
|
132655
|
-
if (svelteMotion) alias['svelte/motion'] = svelteMotion;
|
|
132656
|
-
if (svelteTransition) alias['svelte/transition'] = svelteTransition;
|
|
132860
|
+
const svelteClient = resolveClientSubpath('src/index-client.js');
|
|
132861
|
+
const svelteStoreClient = resolveClientSubpath('src/store/index-client.js');
|
|
132862
|
+
const svelteReactivityClient = resolveClientSubpath('src/reactivity/index-client.js');
|
|
132863
|
+
const svelteLegacyClient = resolveClientSubpath('src/legacy/legacy-client.js');
|
|
132864
|
+
if (svelteClient) alias.svelte = svelteClient;
|
|
132865
|
+
if (svelteStoreClient) alias['svelte/store'] = svelteStoreClient;
|
|
132866
|
+
if (svelteReactivityClient) alias['svelte/reactivity'] = svelteReactivityClient;
|
|
132867
|
+
if (svelteLegacyClient) alias['svelte/legacy'] = svelteLegacyClient;
|
|
132657
132868
|
const resolverPlugin = {
|
|
132658
132869
|
apply (compiler) {
|
|
132659
132870
|
const existingMainFields = compiler.options.resolve && compiler.options.resolve.mainFields || [];
|
|
132660
132871
|
const existingExtensions = compiler.options.resolve && compiler.options.resolve.extensions || [];
|
|
132661
132872
|
const existingAlias = compiler.options.resolve && compiler.options.resolve.alias || {};
|
|
132662
132873
|
const existingModules = compiler.options.resolve && compiler.options.resolve.modules || [];
|
|
132663
|
-
const nextMainFields = [
|
|
132664
|
-
'svelte',
|
|
132665
|
-
'browser',
|
|
132666
|
-
'module',
|
|
132667
|
-
'main',
|
|
132668
|
-
...existingMainFields
|
|
132669
|
-
];
|
|
132670
132874
|
const dedupe = (arr)=>Array.from(new Set(arr));
|
|
132671
132875
|
compiler.options.resolve = {
|
|
132672
132876
|
...compiler.options.resolve,
|
|
132673
|
-
mainFields: dedupe(
|
|
132877
|
+
mainFields: dedupe(existingMainFields),
|
|
132674
132878
|
extensions: dedupe([
|
|
132675
132879
|
'.svelte',
|
|
132676
132880
|
...existingExtensions
|
|
@@ -132688,7 +132892,7 @@ var __webpack_modules__ = {
|
|
|
132688
132892
|
resolverPlugin
|
|
132689
132893
|
],
|
|
132690
132894
|
loaders: defaultLoaders,
|
|
132691
|
-
alias
|
|
132895
|
+
alias: Object.keys(alias).length > 0 ? alias : void 0
|
|
132692
132896
|
};
|
|
132693
132897
|
}
|
|
132694
132898
|
},
|
|
@@ -134044,11 +134248,15 @@ var __webpack_modules__ = {
|
|
|
134044
134248
|
const invocation = buildSpawnInvocation(command, args);
|
|
134045
134249
|
const env = buildExecEnv();
|
|
134046
134250
|
const stdio = options?.stdio ?? 'ignore';
|
|
134251
|
+
const useShell = 'win32' === process.platform && /\.(cmd|bat)$/i.test(invocation.command);
|
|
134047
134252
|
return new Promise((resolve, reject)=>{
|
|
134048
134253
|
const child = (0, child_process__rspack_import_2.spawn)(invocation.command, invocation.args, {
|
|
134049
134254
|
cwd: options?.cwd,
|
|
134050
134255
|
stdio,
|
|
134051
|
-
env: env || process.env
|
|
134256
|
+
env: env || process.env,
|
|
134257
|
+
...useShell ? {
|
|
134258
|
+
shell: true
|
|
134259
|
+
} : {}
|
|
134052
134260
|
});
|
|
134053
134261
|
child.on('close', (code)=>{
|
|
134054
134262
|
if (0 !== code) reject(new Error(`Install failed with exit code ${code}`));
|
|
@@ -134103,7 +134311,8 @@ var __webpack_modules__ = {
|
|
|
134103
134311
|
if (fs__rspack_import_0.existsSync(path__rspack_import_1.join(nm, '.pnpm'))) return false;
|
|
134104
134312
|
if (fs__rspack_import_0.existsSync(path__rspack_import_1.join(nm, '.modules.yaml'))) return false;
|
|
134105
134313
|
if (hasMarker) try {
|
|
134106
|
-
|
|
134314
|
+
const entries = fs__rspack_import_0.readdirSync(nm).filter((name)=>'.bin' !== name && !name.startsWith('.cache'));
|
|
134315
|
+
if (entries.length > 0) return false;
|
|
134107
134316
|
} catch {}
|
|
134108
134317
|
const hasInstalledDep = [
|
|
134109
134318
|
...deps,
|
|
@@ -134373,7 +134582,7 @@ var __webpack_modules__ = {
|
|
|
134373
134582
|
},
|
|
134374
134583
|
"./package.json" (module) {
|
|
134375
134584
|
"use strict";
|
|
134376
|
-
module.exports = JSON.parse('{"rE":"3.
|
|
134585
|
+
module.exports = JSON.parse('{"rE":"3.7.0-canary.169.5b5db8b","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"}}');
|
|
134377
134586
|
}
|
|
134378
134587
|
};
|
|
134379
134588
|
var __webpack_module_cache__ = {};
|
|
@@ -134738,6 +134947,77 @@ var __webpack_exports__ = {};
|
|
|
134738
134947
|
'install'
|
|
134739
134948
|
];
|
|
134740
134949
|
}
|
|
134950
|
+
function findNearestWorkspaceRoot(startDir) {
|
|
134951
|
+
let current = external_path_.resolve(startDir);
|
|
134952
|
+
while(true){
|
|
134953
|
+
const workspaceFile = external_path_.join(current, 'pnpm-workspace.yaml');
|
|
134954
|
+
if (external_fs_.existsSync(workspaceFile)) return current;
|
|
134955
|
+
const parent = external_path_.dirname(current);
|
|
134956
|
+
if (parent === current) return;
|
|
134957
|
+
current = parent;
|
|
134958
|
+
}
|
|
134959
|
+
}
|
|
134960
|
+
function toRelativePath(baseDir, targetDir) {
|
|
134961
|
+
return external_path_.relative(baseDir, targetDir).split(external_path_.sep).join('/');
|
|
134962
|
+
}
|
|
134963
|
+
function parseWorkspacePatterns(workspaceFilePath) {
|
|
134964
|
+
try {
|
|
134965
|
+
const raw = external_fs_.readFileSync(workspaceFilePath, 'utf8');
|
|
134966
|
+
const lines = raw.split(/\r?\n/);
|
|
134967
|
+
const patterns = [];
|
|
134968
|
+
let inPackages = false;
|
|
134969
|
+
for (const line of lines){
|
|
134970
|
+
const trimmed = line.trim();
|
|
134971
|
+
if (!inPackages) {
|
|
134972
|
+
if ('packages:' === trimmed) inPackages = true;
|
|
134973
|
+
continue;
|
|
134974
|
+
}
|
|
134975
|
+
if (0 === trimmed.length || trimmed.startsWith('#')) continue;
|
|
134976
|
+
if (!trimmed.startsWith('-')) break;
|
|
134977
|
+
const value = trimmed.slice(1).trim();
|
|
134978
|
+
const unquoted = value.replace(/^['"]|['"]$/g, '');
|
|
134979
|
+
if (unquoted.length > 0) patterns.push(unquoted);
|
|
134980
|
+
}
|
|
134981
|
+
return patterns;
|
|
134982
|
+
} catch {
|
|
134983
|
+
return [];
|
|
134984
|
+
}
|
|
134985
|
+
}
|
|
134986
|
+
function globToRegExp(glob) {
|
|
134987
|
+
const normalized = glob.replace(/^\.\//, '').replace(/^!/, '').replace(/\/+$/, '');
|
|
134988
|
+
let pattern = '';
|
|
134989
|
+
for(let i = 0; i < normalized.length; i++){
|
|
134990
|
+
const char = normalized[i];
|
|
134991
|
+
if ('*' === char) {
|
|
134992
|
+
if ('*' === normalized[i + 1]) {
|
|
134993
|
+
pattern += '.*';
|
|
134994
|
+
i += 1;
|
|
134995
|
+
} else pattern += '[^/]*';
|
|
134996
|
+
continue;
|
|
134997
|
+
}
|
|
134998
|
+
if (/[|\\{}()[\]^$+?.]/.test(char)) pattern += `\\${char}`;
|
|
134999
|
+
else pattern += char;
|
|
135000
|
+
}
|
|
135001
|
+
return new RegExp(`^${pattern}$`);
|
|
135002
|
+
}
|
|
135003
|
+
function isProjectIncludedByWorkspace(workspaceRoot, projectPath) {
|
|
135004
|
+
const workspaceFile = external_path_.join(workspaceRoot, 'pnpm-workspace.yaml');
|
|
135005
|
+
const patterns = parseWorkspacePatterns(workspaceFile);
|
|
135006
|
+
if (0 === patterns.length) return true;
|
|
135007
|
+
const relativeProjectPath = toRelativePath(workspaceRoot, projectPath);
|
|
135008
|
+
let included = false;
|
|
135009
|
+
for (const pattern of patterns){
|
|
135010
|
+
const isNegated = pattern.startsWith('!');
|
|
135011
|
+
const matcher = globToRegExp(pattern);
|
|
135012
|
+
if (matcher.test(relativeProjectPath)) included = !isNegated;
|
|
135013
|
+
}
|
|
135014
|
+
return included;
|
|
135015
|
+
}
|
|
135016
|
+
function shouldUsePnpmIsolatedInstall(projectPath) {
|
|
135017
|
+
const workspaceRoot = findNearestWorkspaceRoot(projectPath);
|
|
135018
|
+
if (!workspaceRoot) return false;
|
|
135019
|
+
return !isProjectIncludedByWorkspace(workspaceRoot, projectPath);
|
|
135020
|
+
}
|
|
134741
135021
|
async function hasDependenciesToInstall(projectPath) {
|
|
134742
135022
|
try {
|
|
134743
135023
|
const raw = await external_fs_.promises.readFile(external_path_.join(projectPath, 'package.json'), 'utf8');
|
|
@@ -134765,29 +135045,24 @@ var __webpack_exports__ = {};
|
|
|
134765
135045
|
...dependenciesArgs,
|
|
134766
135046
|
'--include=dev'
|
|
134767
135047
|
];
|
|
135048
|
+
if ('pnpm' === pm.name && shouldUsePnpmIsolatedInstall(projectPath)) dependenciesArgs = [
|
|
135049
|
+
...dependenciesArgs,
|
|
135050
|
+
'--ignore-workspace',
|
|
135051
|
+
'--lockfile=false'
|
|
135052
|
+
];
|
|
134768
135053
|
await external_fs_.promises.mkdir(nodeModulesPath, {
|
|
134769
135054
|
recursive: true
|
|
134770
135055
|
});
|
|
134771
135056
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
134772
135057
|
const stdio = isAuthor ? 'inherit' : 'ignore';
|
|
134773
|
-
|
|
134774
|
-
const persistLabel = 'true' === process.env.EXTENSION_ONE_TIME_INSTALL_HINT;
|
|
134775
|
-
const progress = (0, webpack_lib_progress.J)(progressLabel, {
|
|
134776
|
-
enabled: progressEnabled,
|
|
134777
|
-
persistLabel
|
|
134778
|
-
});
|
|
134779
|
-
if (!progressEnabled) console.log(progressLabel);
|
|
135058
|
+
console.log(progressLabel);
|
|
134780
135059
|
if (isAuthor) console.warn(messages.TL('project dependencies'));
|
|
134781
135060
|
const command = (0, package_manager.tj)(pm, dependenciesArgs);
|
|
134782
|
-
|
|
134783
|
-
|
|
134784
|
-
|
|
134785
|
-
|
|
134786
|
-
|
|
134787
|
-
(0, install_cache.h)(projectPath);
|
|
134788
|
-
} finally{
|
|
134789
|
-
progress.stop();
|
|
134790
|
-
}
|
|
135061
|
+
await (0, package_manager.Qt)(command.command, command.args, {
|
|
135062
|
+
cwd: projectPath,
|
|
135063
|
+
stdio
|
|
135064
|
+
});
|
|
135065
|
+
(0, install_cache.h)(projectPath);
|
|
134791
135066
|
} catch (error) {
|
|
134792
135067
|
console.error(messages.RB(error));
|
|
134793
135068
|
process.exit(1);
|