extension-develop 3.6.3 → 3.7.0
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/535.cjs +22 -5
- package/dist/module.cjs +242 -116
- package/package.json +1 -1
package/dist/535.cjs
CHANGED
|
@@ -847,18 +847,27 @@ exports.modules = {
|
|
|
847
847
|
const { useSass = true, useLess = true } = usage;
|
|
848
848
|
const isContentScript = (issuer)=>(0, is_content_script.z)(issuer, manifestPath, projectPath);
|
|
849
849
|
const fileTypes = [
|
|
850
|
+
{
|
|
851
|
+
test: /\.module\.css$/,
|
|
852
|
+
type: 'css/module',
|
|
853
|
+
loader: null
|
|
854
|
+
},
|
|
850
855
|
{
|
|
851
856
|
test: /\.css$/,
|
|
857
|
+
exclude: /\.module\.css$/,
|
|
858
|
+
type: 'asset',
|
|
852
859
|
loader: null
|
|
853
860
|
},
|
|
854
861
|
...useSass ? [
|
|
855
862
|
{
|
|
856
863
|
test: /\.(sass|scss)$/,
|
|
857
864
|
exclude: /\.module\.(sass|scss)$/,
|
|
865
|
+
type: 'asset',
|
|
858
866
|
loader: 'sass-loader'
|
|
859
867
|
},
|
|
860
868
|
{
|
|
861
869
|
test: /\.module\.(sass|scss)$/,
|
|
870
|
+
type: 'css/module',
|
|
862
871
|
loader: 'sass-loader'
|
|
863
872
|
}
|
|
864
873
|
] : [],
|
|
@@ -866,24 +875,26 @@ exports.modules = {
|
|
|
866
875
|
{
|
|
867
876
|
test: /\.less$/,
|
|
868
877
|
exclude: /\.module\.less$/,
|
|
878
|
+
type: 'asset',
|
|
869
879
|
loader: 'less-loader'
|
|
870
880
|
},
|
|
871
881
|
{
|
|
872
882
|
test: /\.module\.less$/,
|
|
883
|
+
type: 'css/module',
|
|
873
884
|
loader: 'less-loader'
|
|
874
885
|
}
|
|
875
886
|
] : []
|
|
876
887
|
];
|
|
877
|
-
const rules = await Promise.all(fileTypes.map(async ({ test, exclude, loader })=>{
|
|
888
|
+
const rules = await Promise.all(fileTypes.map(async ({ test, exclude, type = 'asset', loader })=>{
|
|
878
889
|
const baseConfig = {
|
|
879
890
|
test,
|
|
880
891
|
exclude,
|
|
881
|
-
type
|
|
882
|
-
generator: {
|
|
883
|
-
filename: "content_scripts/[name].[contenthash:8].css"
|
|
884
|
-
},
|
|
892
|
+
type,
|
|
885
893
|
issuer: isContentScript
|
|
886
894
|
};
|
|
895
|
+
if ('asset' === type) baseConfig.generator = {
|
|
896
|
+
filename: "content_scripts/[name].[contenthash:8].css"
|
|
897
|
+
};
|
|
887
898
|
if (!loader) return {
|
|
888
899
|
...baseConfig,
|
|
889
900
|
use: await commonStyleLoaders(projectPath, {
|
|
@@ -908,8 +919,14 @@ exports.modules = {
|
|
|
908
919
|
const { useSass = true, useLess = true } = usage;
|
|
909
920
|
const isNotContentScript = (issuer)=>!(0, is_content_script.z)(issuer, manifestPath, projectPath);
|
|
910
921
|
const fileTypes = [
|
|
922
|
+
{
|
|
923
|
+
test: /\.module\.css$/,
|
|
924
|
+
type: 'css/module',
|
|
925
|
+
loader: null
|
|
926
|
+
},
|
|
911
927
|
{
|
|
912
928
|
test: /\.css$/,
|
|
929
|
+
exclude: /\.module\.css$/,
|
|
913
930
|
type: 'css',
|
|
914
931
|
loader: null
|
|
915
932
|
},
|
package/dist/module.cjs
CHANGED
|
@@ -127679,27 +127679,28 @@ var __webpack_modules__ = {
|
|
|
127679
127679
|
});
|
|
127680
127680
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
127681
127681
|
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
|
-
|
|
127682
|
+
var os__rspack_import_2 = __webpack_require__("os");
|
|
127683
|
+
var module__rspack_import_3 = __webpack_require__("module");
|
|
127684
|
+
var pintor__rspack_import_4 = __webpack_require__("pintor");
|
|
127685
|
+
var pintor__rspack_import_4_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_4);
|
|
127686
|
+
var chrome_location2__rspack_import_5 = __webpack_require__("chrome-location2");
|
|
127687
|
+
var chromium_location__rspack_import_6 = __webpack_require__("chromium-location");
|
|
127688
|
+
var chromium_location__rspack_import_6_default = /*#__PURE__*/ __webpack_require__.n(chromium_location__rspack_import_6);
|
|
127689
|
+
var edge_location__rspack_import_7 = __webpack_require__("edge-location");
|
|
127690
|
+
var edge_location__rspack_import_7_default = /*#__PURE__*/ __webpack_require__.n(edge_location__rspack_import_7);
|
|
127691
|
+
var firefox_location2__rspack_import_8 = __webpack_require__("firefox-location2");
|
|
127692
|
+
var firefox_location2__rspack_import_8_default = /*#__PURE__*/ __webpack_require__.n(firefox_location2__rspack_import_8);
|
|
127693
|
+
const require1 = (0, module__rspack_import_3.createRequire)(__rslib_import_meta_url__);
|
|
127693
127694
|
function getLoggingPrefix(type) {
|
|
127694
127695
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
127695
127696
|
if (isAuthor) {
|
|
127696
127697
|
const base = 'error' === type ? 'ERROR Author says' : '►►► Author says';
|
|
127697
|
-
return
|
|
127698
|
+
return pintor__rspack_import_4_default().brightMagenta(base);
|
|
127698
127699
|
}
|
|
127699
|
-
if ('error' === type) return
|
|
127700
|
-
if ('warn' === type) return
|
|
127701
|
-
if ('info' === type) return
|
|
127702
|
-
return
|
|
127700
|
+
if ('error' === type) return pintor__rspack_import_4_default().red('ERROR');
|
|
127701
|
+
if ('warn' === type) return pintor__rspack_import_4_default().brightYellow('►►►');
|
|
127702
|
+
if ('info' === type) return pintor__rspack_import_4_default().gray('►►►');
|
|
127703
|
+
return pintor__rspack_import_4_default().green('►►►');
|
|
127703
127704
|
}
|
|
127704
127705
|
function errorDetail(error) {
|
|
127705
127706
|
if ('1' === process.env.EXTENSION_DEBUG) return String(error);
|
|
@@ -127707,22 +127708,23 @@ var __webpack_modules__ = {
|
|
|
127707
127708
|
return String(maybe || error);
|
|
127708
127709
|
}
|
|
127709
127710
|
function isWsl() {
|
|
127711
|
+
if ('linux' !== process.platform) return false;
|
|
127710
127712
|
const hasEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
127711
127713
|
if (hasEnv) return true;
|
|
127712
|
-
return
|
|
127714
|
+
return /microsoft/i.test(os__rspack_import_2.release());
|
|
127713
127715
|
}
|
|
127714
127716
|
function capitalizedBrowserName(browser) {
|
|
127715
127717
|
return `${browser.charAt(0).toUpperCase() + browser.slice(1)}`;
|
|
127716
127718
|
}
|
|
127717
127719
|
function creatingUserProfile(profilePath) {
|
|
127718
|
-
return `${getLoggingPrefix('info')} Creating a fresh user profile at ${
|
|
127720
|
+
return `${getLoggingPrefix('info')} Creating a fresh user profile at ${pintor__rspack_import_4_default().underline(profilePath)}...`;
|
|
127719
127721
|
}
|
|
127720
127722
|
function browserInstanceExited(browser) {
|
|
127721
127723
|
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} instance exited.`;
|
|
127722
127724
|
}
|
|
127723
127725
|
function stdoutData(browser, mode) {
|
|
127724
127726
|
const extensionOutput = 'firefox' === browser || 'gecko-based' === browser ? 'Add-on' : 'Extension';
|
|
127725
|
-
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} ${extensionOutput} running in ${
|
|
127727
|
+
return `${getLoggingPrefix('info')} ${capitalizedBrowserName(browser)} ${extensionOutput} running in ${pintor__rspack_import_4_default().green(mode || 'unknown')} mode.`;
|
|
127726
127728
|
}
|
|
127727
127729
|
function cdpClientAttachedToTarget(sessionId, targetType) {
|
|
127728
127730
|
return `${getLoggingPrefix('info')} Attached to target: ${targetType} (session ${sessionId})`;
|
|
@@ -127760,12 +127762,12 @@ var __webpack_modules__ = {
|
|
|
127760
127762
|
const wslHint = (()=>{
|
|
127761
127763
|
if (!isWsl()) return '';
|
|
127762
127764
|
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 ${
|
|
127765
|
+
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
127766
|
})();
|
|
127765
|
-
return `${getLoggingPrefix('error')} ${isUnreachable}Either install the missing browser or choose a different one via ${
|
|
127767
|
+
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
127768
|
}
|
|
127767
127769
|
function browserLaunchError(browser, error) {
|
|
127768
|
-
return `${getLoggingPrefix('error')} Error launching ${capitalizedBrowserName(browser)}:\n${
|
|
127770
|
+
return `${getLoggingPrefix('error')} Error launching ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127769
127771
|
}
|
|
127770
127772
|
function enhancedProcessManagementCleanup(browser) {
|
|
127771
127773
|
return `${getLoggingPrefix('info')} Process Management cleanup for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127777,22 +127779,22 @@ var __webpack_modules__ = {
|
|
|
127777
127779
|
return `${getLoggingPrefix('error')} Force killing ${capitalizedBrowserName(browser)} process after timeout`;
|
|
127778
127780
|
}
|
|
127779
127781
|
function enhancedProcessManagementCleanupError(browser, error) {
|
|
127780
|
-
return `${getLoggingPrefix('error')} Error during ${capitalizedBrowserName(browser)} cleanup:\n${
|
|
127782
|
+
return `${getLoggingPrefix('error')} Error during ${capitalizedBrowserName(browser)} cleanup:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127781
127783
|
}
|
|
127782
127784
|
function enhancedProcessManagementUncaughtException(browser, error) {
|
|
127783
|
-
return `${getLoggingPrefix('error')} Uncaught exception in ${capitalizedBrowserName(browser)} process:\n${
|
|
127785
|
+
return `${getLoggingPrefix('error')} Uncaught exception in ${capitalizedBrowserName(browser)} process:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127784
127786
|
}
|
|
127785
127787
|
function enhancedProcessManagementUnhandledRejection(browser, reason) {
|
|
127786
|
-
return `${getLoggingPrefix('error')} Unhandled rejection in ${capitalizedBrowserName(browser)} process:\n${
|
|
127788
|
+
return `${getLoggingPrefix('error')} Unhandled rejection in ${capitalizedBrowserName(browser)} process:\n${pintor__rspack_import_4_default().red(errorDetail(reason))}`;
|
|
127787
127789
|
}
|
|
127788
127790
|
function generalBrowserError(browser, error) {
|
|
127789
|
-
return `${getLoggingPrefix('error')} General error in ${capitalizedBrowserName(browser)}:\n${
|
|
127791
|
+
return `${getLoggingPrefix('error')} General error in ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127790
127792
|
}
|
|
127791
127793
|
function errorConnectingToBrowser(browser) {
|
|
127792
127794
|
return `${getLoggingPrefix('error')} Unable to connect to ${capitalizedBrowserName(browser)}. Too many retries.`;
|
|
127793
127795
|
}
|
|
127794
127796
|
function addonInstallError(browser, message) {
|
|
127795
|
-
return `${getLoggingPrefix('error')} Can't install add-on into ${capitalizedBrowserName(browser)}:\n${
|
|
127797
|
+
return `${getLoggingPrefix('error')} Can't install add-on into ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(message)}`;
|
|
127796
127798
|
}
|
|
127797
127799
|
function messagingClientClosedError(browser) {
|
|
127798
127800
|
return `${getLoggingPrefix('error')} Messaging client closed unexpectedly for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127801,25 +127803,25 @@ var __webpack_modules__ = {
|
|
|
127801
127803
|
return `${getLoggingPrefix('error')} Connection closed unexpectedly for ${capitalizedBrowserName(browser)}`;
|
|
127802
127804
|
}
|
|
127803
127805
|
function targetActorHasActiveRequestError(browser, targetActor) {
|
|
127804
|
-
return `${getLoggingPrefix('error')} Target actor ${
|
|
127806
|
+
return `${getLoggingPrefix('error')} Target actor ${pintor__rspack_import_4_default().gray(targetActor)} has active request for ${capitalizedBrowserName(browser)}`;
|
|
127805
127807
|
}
|
|
127806
127808
|
function parsingPacketError(browser, error) {
|
|
127807
|
-
return `${getLoggingPrefix('error')} Failed to parse packet from ${capitalizedBrowserName(browser)}:\n${
|
|
127809
|
+
return `${getLoggingPrefix('error')} Failed to parse packet from ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127808
127810
|
}
|
|
127809
127811
|
function messageWithoutSenderError(browser, message) {
|
|
127810
|
-
return `${getLoggingPrefix('error')} Message without sender from ${capitalizedBrowserName(browser)}:\n${
|
|
127812
|
+
return `${getLoggingPrefix('error')} Message without sender from ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_4_default().red(JSON.stringify(message))}`;
|
|
127811
127813
|
}
|
|
127812
127814
|
function profileFallbackWarning(browser, reason) {
|
|
127813
|
-
return `${getLoggingPrefix('warn')} ${capitalizedBrowserName(browser)} falling back to per-instance profile` + (reason ? `: ${
|
|
127815
|
+
return `${getLoggingPrefix('warn')} ${capitalizedBrowserName(browser)} falling back to per-instance profile` + (reason ? `: ${pintor__rspack_import_4_default().gray(reason)}` : '');
|
|
127814
127816
|
}
|
|
127815
127817
|
function chromeProcessExited(code) {
|
|
127816
|
-
return `${getLoggingPrefix('info')} Chrome process exited with code: ${
|
|
127818
|
+
return `${getLoggingPrefix('info')} Chrome process exited with code: ${pintor__rspack_import_4_default().gray(code.toString())}`;
|
|
127817
127819
|
}
|
|
127818
127820
|
function chromeProcessError(error) {
|
|
127819
|
-
return `${getLoggingPrefix('error')} Chrome process error:\n${
|
|
127821
|
+
return `${getLoggingPrefix('error')} Chrome process error:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127820
127822
|
}
|
|
127821
127823
|
function chromeFailedToSpawn(error) {
|
|
127822
|
-
return `${getLoggingPrefix('error')} Failed to spawn Chrome:\n${
|
|
127824
|
+
return `${getLoggingPrefix('error')} Failed to spawn Chrome:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127823
127825
|
}
|
|
127824
127826
|
function chromeInitializingEnhancedReload() {
|
|
127825
127827
|
return `${getLoggingPrefix('info')} Initializing enhanced reload service with direct spawn for Chrome`;
|
|
@@ -127835,7 +127837,7 @@ var __webpack_modules__ = {
|
|
|
127835
127837
|
return `${getLoggingPrefix('info')} Locating ${capitalizedBrowserName(browser)} browser binary...`;
|
|
127836
127838
|
}
|
|
127837
127839
|
function devChromeProfilePath(path) {
|
|
127838
|
-
return `${getLoggingPrefix('info')} Chrome profile: ${
|
|
127840
|
+
return `${getLoggingPrefix('info')} Chrome profile: ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127839
127841
|
}
|
|
127840
127842
|
function usingChromiumRunner(browser) {
|
|
127841
127843
|
return `${getLoggingPrefix('info')} Using Chromium runner for ${capitalizedBrowserName(browser)}`;
|
|
@@ -127847,13 +127849,13 @@ var __webpack_modules__ = {
|
|
|
127847
127849
|
return `${getLoggingPrefix('info')} [plugin-browsers] Dry run: not launching browser`;
|
|
127848
127850
|
}
|
|
127849
127851
|
function chromiumDryRunBinary(path) {
|
|
127850
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Binary: ${
|
|
127852
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Binary: ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127851
127853
|
}
|
|
127852
127854
|
function chromiumDryRunFlags(flags) {
|
|
127853
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Flags: ${
|
|
127855
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Flags: ${pintor__rspack_import_4_default().gray(flags)}`;
|
|
127854
127856
|
}
|
|
127855
127857
|
function prettyPuppeteerInstallGuidance(browser, rawGuidance, cacheDir) {
|
|
127856
|
-
const dim =
|
|
127858
|
+
const dim = pintor__rspack_import_4_default().gray;
|
|
127857
127859
|
const body = [];
|
|
127858
127860
|
let cleaned = String(rawGuidance || '').replace(/^Error:\s*/i, '').trim();
|
|
127859
127861
|
try {
|
|
@@ -127861,19 +127863,19 @@ var __webpack_modules__ = {
|
|
|
127861
127863
|
if (looksMinimal) {
|
|
127862
127864
|
const b = String(browser || '').toLowerCase();
|
|
127863
127865
|
if ('chromium' === b || 'chromium-based' === b) try {
|
|
127864
|
-
const txt = (0,
|
|
127866
|
+
const txt = (0, chromium_location__rspack_import_6.getInstallGuidance)();
|
|
127865
127867
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127866
127868
|
} catch {}
|
|
127867
127869
|
else if ('chrome' === b) try {
|
|
127868
|
-
const txt = (0,
|
|
127870
|
+
const txt = (0, chrome_location2__rspack_import_5.getInstallGuidance)();
|
|
127869
127871
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127870
127872
|
} catch {}
|
|
127871
127873
|
else if ('firefox' === b || 'gecko-based' === b) try {
|
|
127872
|
-
const txt = (0,
|
|
127874
|
+
const txt = (0, firefox_location2__rspack_import_8.getInstallGuidance)();
|
|
127873
127875
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127874
127876
|
} catch {}
|
|
127875
127877
|
else if ('edge' === b) try {
|
|
127876
|
-
const txt = (0,
|
|
127878
|
+
const txt = (0, edge_location__rspack_import_7.getInstallGuidance)();
|
|
127877
127879
|
if (txt && 'string' == typeof txt) cleaned = String(txt).trim();
|
|
127878
127880
|
} catch {}
|
|
127879
127881
|
}
|
|
@@ -127905,47 +127907,47 @@ var __webpack_modules__ = {
|
|
|
127905
127907
|
}
|
|
127906
127908
|
} catch {}
|
|
127907
127909
|
body.push(cleaned);
|
|
127908
|
-
if (finalCachePath) body.push(`${dim('INSTALL PATH')} ${
|
|
127910
|
+
if (finalCachePath) body.push(`${dim('INSTALL PATH')} ${pintor__rspack_import_4_default().underline(finalCachePath)}`);
|
|
127909
127911
|
return body.join('\n') + '\n';
|
|
127910
127912
|
}
|
|
127911
127913
|
function firefoxLaunchCalled() {
|
|
127912
127914
|
return `${getLoggingPrefix('info')} Firefox launch requested.`;
|
|
127913
127915
|
}
|
|
127914
127916
|
function firefoxBinaryArgsExtracted(args) {
|
|
127915
|
-
return `${getLoggingPrefix('info')} Firefox binary args extracted: ${
|
|
127917
|
+
return `${getLoggingPrefix('info')} Firefox binary args extracted: ${pintor__rspack_import_4_default().gray(args)}`;
|
|
127916
127918
|
}
|
|
127917
127919
|
function firefoxNoBinaryArgsFound() {
|
|
127918
127920
|
return `${getLoggingPrefix('info')} No Firefox binary args found`;
|
|
127919
127921
|
}
|
|
127920
127922
|
function firefoxFailedToStart(error) {
|
|
127921
|
-
return `${getLoggingPrefix('error')} Firefox failed to start:\n${
|
|
127923
|
+
return `${getLoggingPrefix('error')} Firefox failed to start:\n${pintor__rspack_import_4_default().red(errorDetail(error))}`;
|
|
127922
127924
|
}
|
|
127923
127925
|
function firefoxDryRunNotLaunching() {
|
|
127924
127926
|
return `${getLoggingPrefix('info')} [plugin-browsers] Dry run: not launching browser`;
|
|
127925
127927
|
}
|
|
127926
127928
|
function firefoxDryRunBinary(path) {
|
|
127927
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Binary (detected): ${
|
|
127929
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Binary (detected): ${pintor__rspack_import_4_default().underline(path)}`;
|
|
127928
127930
|
}
|
|
127929
127931
|
function firefoxDryRunConfig(cfg) {
|
|
127930
|
-
return `${getLoggingPrefix('info')} [plugin-browsers] Config: ${
|
|
127932
|
+
return `${getLoggingPrefix('info')} [plugin-browsers] Config: ${pintor__rspack_import_4_default().gray(cfg)}`;
|
|
127931
127933
|
}
|
|
127932
127934
|
function sourceInspectorInitialized() {
|
|
127933
127935
|
return `${getLoggingPrefix('info')} Chrome source inspector initialized successfully`;
|
|
127934
127936
|
}
|
|
127935
127937
|
function sourceInspectorInitializationFailed(error) {
|
|
127936
|
-
return `${getLoggingPrefix('error')} Failed to initialize Chrome source inspector: ${
|
|
127938
|
+
return `${getLoggingPrefix('error')} Failed to initialize Chrome source inspector: ${pintor__rspack_import_4_default().red(error)}`;
|
|
127937
127939
|
}
|
|
127938
127940
|
function sourceInspectorChromeDebuggingRequired(port) {
|
|
127939
127941
|
try {
|
|
127940
127942
|
const p = Number(port);
|
|
127941
127943
|
const shown = Number.isFinite(p) && p > 0 ? p : 9222;
|
|
127942
|
-
return `${getLoggingPrefix('error')} Chrome is not running with remote debugging enabled on port ${
|
|
127944
|
+
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
127945
|
} catch {
|
|
127944
|
-
return `${getLoggingPrefix('error')} Chrome is not running with remote debugging enabled on port ${
|
|
127946
|
+
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
127947
|
}
|
|
127946
127948
|
}
|
|
127947
127949
|
function sourceInspectorFirefoxDebuggingRequired(port) {
|
|
127948
|
-
return `${getLoggingPrefix('error')} Firefox is not running with remote debugging enabled on port ${
|
|
127950
|
+
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
127951
|
}
|
|
127950
127952
|
function sourceInspectorWaitingForFirefox() {
|
|
127951
127953
|
return `${getLoggingPrefix('info')} Waiting for Firefox to be ready with remote debugging...`;
|
|
@@ -127954,7 +127956,7 @@ var __webpack_modules__ = {
|
|
|
127954
127956
|
return `${getLoggingPrefix('success')} Firefox is ready with remote debugging.`;
|
|
127955
127957
|
}
|
|
127956
127958
|
function sourceInspectorFirefoxNotReadyYet(retries, maxRetries) {
|
|
127957
|
-
return `${getLoggingPrefix('warn')} Firefox not ready yet, retrying... (${
|
|
127959
|
+
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
127960
|
}
|
|
127959
127961
|
function sourceInspectorWaitingForChrome() {
|
|
127960
127962
|
return `${getLoggingPrefix('info')} Waiting for Chrome to be ready with remote debugging...`;
|
|
@@ -127963,10 +127965,10 @@ var __webpack_modules__ = {
|
|
|
127963
127965
|
return `${getLoggingPrefix('success')} Chrome is ready with remote debugging.`;
|
|
127964
127966
|
}
|
|
127965
127967
|
function sourceInspectorChromeNotReadyYet(retries, maxRetries) {
|
|
127966
|
-
return `${getLoggingPrefix('warn')} Chrome not ready yet, retrying... (${
|
|
127968
|
+
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
127969
|
}
|
|
127968
127970
|
function sourceInspectorOpeningUrl(url) {
|
|
127969
|
-
return `${getLoggingPrefix('info')} Chrome is opening URL: ${
|
|
127971
|
+
return `${getLoggingPrefix('info')} Chrome is opening URL: ${pintor__rspack_import_4_default().underline(url)}`;
|
|
127970
127972
|
}
|
|
127971
127973
|
function sourceInspectorWaitingForPageLoad() {
|
|
127972
127974
|
return `${getLoggingPrefix('info')} Chrome is waiting for the page to load...`;
|
|
@@ -127978,22 +127980,22 @@ var __webpack_modules__ = {
|
|
|
127978
127980
|
return `${getLoggingPrefix('info')} Chrome is finding an existing target...`;
|
|
127979
127981
|
}
|
|
127980
127982
|
function sourceInspectorUsingExistingTarget(targetId) {
|
|
127981
|
-
return `${getLoggingPrefix('info')} Chrome is using existing target with ID: ${
|
|
127983
|
+
return `${getLoggingPrefix('info')} Chrome is using existing target with ID: ${pintor__rspack_import_4_default().gray(targetId)}`;
|
|
127982
127984
|
}
|
|
127983
127985
|
function sourceInspectorTargetCreated(targetId) {
|
|
127984
|
-
return `${getLoggingPrefix('success')} Chrome created a target with ID: ${
|
|
127986
|
+
return `${getLoggingPrefix('success')} Chrome created a target with ID: ${pintor__rspack_import_4_default().gray(targetId)}`;
|
|
127985
127987
|
}
|
|
127986
127988
|
function sourceInspectorAttachingToTarget() {
|
|
127987
127989
|
return `${getLoggingPrefix('info')} Chrome is attaching to the target...`;
|
|
127988
127990
|
}
|
|
127989
127991
|
function sourceInspectorAttachedToTarget(sessionId) {
|
|
127990
|
-
return `${getLoggingPrefix('success')} Chrome is attached to the target with session ID: ${
|
|
127992
|
+
return `${getLoggingPrefix('success')} Chrome is attached to the target with session ID: ${pintor__rspack_import_4_default().gray(sessionId)}`;
|
|
127991
127993
|
}
|
|
127992
127994
|
function sourceInspectorHTMLExtractionComplete() {
|
|
127993
127995
|
return `${getLoggingPrefix('success')} Chrome HTML extraction is complete.`;
|
|
127994
127996
|
}
|
|
127995
127997
|
function sourceInspectorInspectionFailed(error) {
|
|
127996
|
-
return `${getLoggingPrefix('error')} Failed to inspect Chrome source: ${
|
|
127998
|
+
return `${getLoggingPrefix('error')} Failed to inspect Chrome source: ${pintor__rspack_import_4_default().red(error)}`;
|
|
127997
127999
|
}
|
|
127998
128000
|
function sourceInspectorStartingWatchMode() {
|
|
127999
128001
|
return `${getLoggingPrefix('info')} Chrome is starting watch mode for sources...`;
|
|
@@ -128023,10 +128025,10 @@ var __webpack_modules__ = {
|
|
|
128023
128025
|
return `${getLoggingPrefix('info')} Chrome is reconnecting to the target...`;
|
|
128024
128026
|
}
|
|
128025
128027
|
function sourceInspectorReconnectedToTarget(sessionId) {
|
|
128026
|
-
return `${getLoggingPrefix('success')} Chrome reconnected to target with session ID: ${
|
|
128028
|
+
return `${getLoggingPrefix('success')} Chrome reconnected to target with session ID: ${pintor__rspack_import_4_default().gray(sessionId)}`;
|
|
128027
128029
|
}
|
|
128028
128030
|
function sourceInspectorReconnectionFailed(error) {
|
|
128029
|
-
return `${getLoggingPrefix('error')} Failed to reconnect to Chrome target: ${
|
|
128031
|
+
return `${getLoggingPrefix('error')} Failed to reconnect to Chrome target: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128030
128032
|
}
|
|
128031
128033
|
function sourceInspectorEnsuringNavigation() {
|
|
128032
128034
|
return `${getLoggingPrefix('info')} Chrome ensuring target navigates to URL...`;
|
|
@@ -128044,13 +128046,13 @@ var __webpack_modules__ = {
|
|
|
128044
128046
|
return `${getLoggingPrefix('warn')} Chrome source file changed, updating HTML...`;
|
|
128045
128047
|
}
|
|
128046
128048
|
function sourceInspectorHTMLUpdateFailed(error) {
|
|
128047
|
-
return `${getLoggingPrefix('error')} Failed to update Chrome HTML: ${
|
|
128049
|
+
return `${getLoggingPrefix('error')} Failed to update Chrome HTML: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128048
128050
|
}
|
|
128049
128051
|
function sourceInspectorCleanupComplete() {
|
|
128050
128052
|
return `${getLoggingPrefix('success')} Chrome source inspector cleaned up.`;
|
|
128051
128053
|
}
|
|
128052
128054
|
function sourceInspectorCleanupError(error) {
|
|
128053
|
-
return `${getLoggingPrefix('error')} Error during Chrome cleanup: ${
|
|
128055
|
+
return `${getLoggingPrefix('error')} Error during Chrome cleanup: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128054
128056
|
}
|
|
128055
128057
|
function sourceInspectorNotInitialized() {
|
|
128056
128058
|
return `${getLoggingPrefix('error')} Chrome source inspector not initialized`;
|
|
@@ -128059,19 +128061,19 @@ var __webpack_modules__ = {
|
|
|
128059
128061
|
return `${getLoggingPrefix('warn')} Chrome invalid WebSocket server provided`;
|
|
128060
128062
|
}
|
|
128061
128063
|
function sourceInspectorUrlRequired() {
|
|
128062
|
-
return `${getLoggingPrefix('error')} Chrome source inspection requires either ${
|
|
128064
|
+
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
128065
|
}
|
|
128064
128066
|
function sourceInspectorWillInspect(url) {
|
|
128065
|
-
return `${getLoggingPrefix('info')} Chrome source inspection will inspect: ${
|
|
128067
|
+
return `${getLoggingPrefix('info')} Chrome source inspection will inspect: ${pintor__rspack_import_4_default().underline(url)}`;
|
|
128066
128068
|
}
|
|
128067
128069
|
function sourceInspectorSetupFailed(error) {
|
|
128068
|
-
return `${getLoggingPrefix('error')} Failed to setup Chrome source inspection: ${
|
|
128070
|
+
return `${getLoggingPrefix('error')} Failed to setup Chrome source inspection: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128069
128071
|
}
|
|
128070
128072
|
function sourceInspectorHTMLOutputHeader() {
|
|
128071
128073
|
return '\n' + '='.repeat(80);
|
|
128072
128074
|
}
|
|
128073
128075
|
function sourceInspectorHTMLOutputTitle(title) {
|
|
128074
|
-
return `${
|
|
128076
|
+
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
128077
|
}
|
|
128076
128078
|
function sourceInspectorHTMLOutputFooter() {
|
|
128077
128079
|
return '='.repeat(80) + '\n';
|
|
@@ -128089,16 +128091,16 @@ var __webpack_modules__ = {
|
|
|
128089
128091
|
return `${getLoggingPrefix('error')} Failed to extract Firefox HTML after retries`;
|
|
128090
128092
|
}
|
|
128091
128093
|
function cdpClientFoundTargets(count) {
|
|
128092
|
-
return `${getLoggingPrefix('info')} Chrome found ${
|
|
128094
|
+
return `${getLoggingPrefix('info')} Chrome found ${pintor__rspack_import_4_default().gray(count.toString())} targets`;
|
|
128093
128095
|
}
|
|
128094
128096
|
function cdpClientTargetWebSocketUrlStored() {
|
|
128095
128097
|
return `${getLoggingPrefix('info')} Chrome target WebSocket URL stored for future connections`;
|
|
128096
128098
|
}
|
|
128097
128099
|
function cdpClientConnected(host, port) {
|
|
128098
|
-
return `${getLoggingPrefix('success')} Chrome CDP Client connected to ${
|
|
128100
|
+
return `${getLoggingPrefix('success')} Chrome CDP Client connected to ${pintor__rspack_import_4_default().gray(host)}:${pintor__rspack_import_4_default().gray(port.toString())}`;
|
|
128099
128101
|
}
|
|
128100
128102
|
function cdpClientConnectionError(error) {
|
|
128101
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client connection error: ${
|
|
128103
|
+
return `${getLoggingPrefix('error')} Chrome CDP Client connection error: ${pintor__rspack_import_4_default().red(error)}`;
|
|
128102
128104
|
}
|
|
128103
128105
|
function cdpClientBrowserConnectionEstablished() {
|
|
128104
128106
|
return `${getLoggingPrefix('success')} Chrome CDP Client browser connection established`;
|
|
@@ -128110,19 +128112,19 @@ var __webpack_modules__ = {
|
|
|
128110
128112
|
return `${getLoggingPrefix('warn')} Chrome load event timed out; proceeding anyway...`;
|
|
128111
128113
|
}
|
|
128112
128114
|
function cdpClientExtensionReloadFailed(extensionId, error) {
|
|
128113
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to force-reload extension ${
|
|
128115
|
+
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
128116
|
}
|
|
128115
128117
|
function cdpClientExtensionUnloadFailed(extensionId, error) {
|
|
128116
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to unload extension ${
|
|
128118
|
+
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
128119
|
}
|
|
128118
128120
|
function cdpClientExtensionInfoFailed(extensionId, error) {
|
|
128119
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to get extension info for ${
|
|
128121
|
+
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
128122
|
}
|
|
128121
128123
|
function cdpClientExtensionLoadFailed(path, error) {
|
|
128122
|
-
return `${getLoggingPrefix('error')} Chrome CDP Client: Failed to load extension from ${
|
|
128124
|
+
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
128125
|
}
|
|
128124
128126
|
function firefoxRdpClientConnected(host, port) {
|
|
128125
|
-
return `${getLoggingPrefix('success')} Connected to Firefox Remote Debugging Protocol on ${
|
|
128127
|
+
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
128128
|
}
|
|
128127
128129
|
function firefoxRdpClientTestingEvaluation() {
|
|
128128
128130
|
return `${getLoggingPrefix('info')} Testing basic Firefox RDP evaluation...`;
|
|
@@ -128148,7 +128150,7 @@ var __webpack_modules__ = {
|
|
|
128148
128150
|
default:
|
|
128149
128151
|
browserDevToolsUrl = '';
|
|
128150
128152
|
}
|
|
128151
|
-
if (!message.data) return `${getLoggingPrefix('error')} No Client Data Received for ${manifestName}\n\n${
|
|
128153
|
+
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
128154
|
const { id = '', management } = message.data;
|
|
128153
128155
|
if (!management) {
|
|
128154
128156
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) return `${getLoggingPrefix('error')} No management API info received from client for ${manifestName}. Investigate.`;
|
|
@@ -128164,7 +128166,7 @@ var __webpack_modules__ = {
|
|
|
128164
128166
|
let effectiveBrowserLine = browserVersionLine && browserVersionLine.trim().length > 0 ? browserVersionLine.trim() : '';
|
|
128165
128167
|
if (!effectiveBrowserLine) try {
|
|
128166
128168
|
if ('chromium' === browser || 'chromium-based' === browser) {
|
|
128167
|
-
const p =
|
|
128169
|
+
const p = chromium_location__rspack_import_6_default()();
|
|
128168
128170
|
if (p && 'string' == typeof p && fs__rspack_import_1.existsSync(p)) {
|
|
128169
128171
|
const v = require1('child_process').execFileSync(p, [
|
|
128170
128172
|
'--version'
|
|
@@ -128174,7 +128176,7 @@ var __webpack_modules__ = {
|
|
|
128174
128176
|
effectiveBrowserLine = v || 'Chromium';
|
|
128175
128177
|
}
|
|
128176
128178
|
} else if ('chrome' === browser) {
|
|
128177
|
-
const p = (0,
|
|
128179
|
+
const p = (0, chrome_location2__rspack_import_5.locateChromeOrExplain)({
|
|
128178
128180
|
allowFallback: true
|
|
128179
128181
|
});
|
|
128180
128182
|
if (p && fs__rspack_import_1.existsSync(p)) {
|
|
@@ -128186,7 +128188,7 @@ var __webpack_modules__ = {
|
|
|
128186
128188
|
effectiveBrowserLine = v || 'Chrome';
|
|
128187
128189
|
}
|
|
128188
128190
|
} else if ('edge' === browser) {
|
|
128189
|
-
const p =
|
|
128191
|
+
const p = edge_location__rspack_import_7_default()();
|
|
128190
128192
|
if (p && fs__rspack_import_1.existsSync(p)) {
|
|
128191
128193
|
const v = require1('child_process').execFileSync(p, [
|
|
128192
128194
|
'--version'
|
|
@@ -128196,7 +128198,7 @@ var __webpack_modules__ = {
|
|
|
128196
128198
|
effectiveBrowserLine = v || 'Microsoft Edge';
|
|
128197
128199
|
}
|
|
128198
128200
|
} else if ('firefox' === browser) {
|
|
128199
|
-
const p =
|
|
128201
|
+
const p = firefox_location2__rspack_import_8_default()(true);
|
|
128200
128202
|
if (p && 'string' == typeof p && fs__rspack_import_1.existsSync(p)) {
|
|
128201
128203
|
const v = require1('child_process').execFileSync(p, [
|
|
128202
128204
|
'--version'
|
|
@@ -128215,8 +128217,8 @@ var __webpack_modules__ = {
|
|
|
128215
128217
|
const updateNotice = updateSuffix ? ` ${updateSuffix}` : '';
|
|
128216
128218
|
const displayName = String(manifestName);
|
|
128217
128219
|
const displayVersion = String(version1 || manifest.version || '');
|
|
128218
|
-
lines.push(` 🧩 ${
|
|
128219
|
-
if (includeExtensionId) lines.push(` Extension ID ${
|
|
128220
|
+
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)}`);
|
|
128221
|
+
if (includeExtensionId) lines.push(` Extension ID ${pintor__rspack_import_4_default().gray(cleanId)}`);
|
|
128220
128222
|
return lines.join('\n');
|
|
128221
128223
|
}
|
|
128222
128224
|
function emptyLine() {
|
|
@@ -128226,19 +128228,19 @@ var __webpack_modules__ = {
|
|
|
128226
128228
|
return ''.padEnd(80, '=');
|
|
128227
128229
|
}
|
|
128228
128230
|
function devChromiumDebugPort(finalPort, requestedPort) {
|
|
128229
|
-
return `${getLoggingPrefix('info')} Chromium debug port: ${
|
|
128231
|
+
return `${getLoggingPrefix('info')} Chromium debug port: ${pintor__rspack_import_4_default().gray(finalPort.toString())} (requested ${pintor__rspack_import_4_default().gray(requestedPort.toString())})`;
|
|
128230
128232
|
}
|
|
128231
128233
|
function devFirefoxDebugPort(finalPort, requestedPort) {
|
|
128232
|
-
return `${getLoggingPrefix('info')} Firefox debug port: ${
|
|
128234
|
+
return `${getLoggingPrefix('info')} Firefox debug port: ${pintor__rspack_import_4_default().gray(finalPort.toString())} (requested ${pintor__rspack_import_4_default().gray(requestedPort.toString())})`;
|
|
128233
128235
|
}
|
|
128234
128236
|
function devFirefoxProfilePath(profilePath) {
|
|
128235
|
-
return `${getLoggingPrefix('info')} Firefox profile: ${
|
|
128237
|
+
return `${getLoggingPrefix('info')} Firefox profile: ${pintor__rspack_import_4_default().underline(profilePath)}`;
|
|
128236
128238
|
}
|
|
128237
128239
|
function devHtmlSampleRetry(sample) {
|
|
128238
|
-
return `${
|
|
128240
|
+
return `${pintor__rspack_import_4_default().gray('[Extension.js] HTML sample (retry):')} ${pintor__rspack_import_4_default().gray(sample)}`;
|
|
128239
128241
|
}
|
|
128240
128242
|
function devHtmlSampleLate(sample) {
|
|
128241
|
-
return `${
|
|
128243
|
+
return `${pintor__rspack_import_4_default().gray('[Extension.js] HTML sample (late):')} ${pintor__rspack_import_4_default().gray(sample)}`;
|
|
128242
128244
|
}
|
|
128243
128245
|
function cdpUnifiedExtensionLog(ts, payload) {
|
|
128244
128246
|
const data = (()=>{
|
|
@@ -128251,31 +128253,31 @@ var __webpack_modules__ = {
|
|
|
128251
128253
|
return `[extension-log ${ts}] ${data}`;
|
|
128252
128254
|
}
|
|
128253
128255
|
function firefoxInspectSourceNonFatal(message) {
|
|
128254
|
-
return `${getLoggingPrefix('warn')} Firefox Inspect non-fatal error: ${
|
|
128256
|
+
return `${getLoggingPrefix('warn')} Firefox Inspect non-fatal error: ${pintor__rspack_import_4_default().yellow(message)}`;
|
|
128255
128257
|
}
|
|
128256
128258
|
function unsupportedBrowser(browser) {
|
|
128257
128259
|
const supported = "chrome, edge, firefox";
|
|
128258
|
-
const hintFlag = `${
|
|
128259
|
-
const docsUrl =
|
|
128260
|
-
return `${getLoggingPrefix('error')} Unsupported browser ${
|
|
128260
|
+
const hintFlag = `${pintor__rspack_import_4_default().blue('--browser')} ${pintor__rspack_import_4_default().gray('<chrome|edge|firefox>')}`;
|
|
128261
|
+
const docsUrl = pintor__rspack_import_4_default().underline('https://github.com/extension-js/extension.js');
|
|
128262
|
+
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
128263
|
}
|
|
128262
128264
|
function browserRunnerError(body) {
|
|
128263
|
-
return `${
|
|
128265
|
+
return `${pintor__rspack_import_4_default().red('ERROR')} ${pintor__rspack_import_4_default().brightBlue('error in browser runner')}\n${body}`;
|
|
128264
128266
|
}
|
|
128265
128267
|
function requireChromiumBinaryForChromiumBased() {
|
|
128266
|
-
const body = `Configuration required\nProvide ${
|
|
128268
|
+
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
128269
|
return browserRunnerError(body);
|
|
128268
128270
|
}
|
|
128269
128271
|
function requireGeckoBinaryForGeckoBased() {
|
|
128270
|
-
const body = `Configuration required\nProvide ${
|
|
128272
|
+
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
128273
|
return browserRunnerError(body);
|
|
128272
128274
|
}
|
|
128273
128275
|
function invalidChromiumBinaryPath(p) {
|
|
128274
|
-
const body = `Invalid binary path\nChromium binary not found at ${
|
|
128276
|
+
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
128277
|
return browserRunnerError(body);
|
|
128276
128278
|
}
|
|
128277
128279
|
function invalidGeckoBinaryPath(p) {
|
|
128278
|
-
const body = `Invalid binary path\nFirefox/Gecko binary not found at ${
|
|
128280
|
+
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
128281
|
return browserRunnerError(body);
|
|
128280
128282
|
}
|
|
128281
128283
|
function rdpInvalidRequestPayload() {
|
|
@@ -128283,8 +128285,8 @@ var __webpack_modules__ = {
|
|
|
128283
128285
|
}
|
|
128284
128286
|
function chromiumDeveloperModeGuidance(browser) {
|
|
128285
128287
|
let exts = '';
|
|
128286
|
-
exts = 'edge' === browser ?
|
|
128287
|
-
return `${getLoggingPrefix('warn')} Configuration required\nEnable ${
|
|
128288
|
+
exts = 'edge' === browser ? pintor__rspack_import_4_default().underline('edge://extensions') : pintor__rspack_import_4_default().underline('chrome://extensions');
|
|
128289
|
+
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
128290
|
}
|
|
128289
128291
|
},
|
|
128290
128292
|
"./webpack/plugin-browsers/browsers-lib/output-binaries-resolver.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -128616,6 +128618,95 @@ var __webpack_modules__ = {
|
|
|
128616
128618
|
var shared_utils = __webpack_require__("./webpack/plugin-browsers/browsers-lib/shared-utils.ts");
|
|
128617
128619
|
var banner = __webpack_require__("./webpack/plugin-browsers/browsers-lib/banner.ts");
|
|
128618
128620
|
var external_path_ = __webpack_require__("path");
|
|
128621
|
+
const masterPreferences = {
|
|
128622
|
+
alternate_error_pages: {
|
|
128623
|
+
enabled: false
|
|
128624
|
+
},
|
|
128625
|
+
autofill: {
|
|
128626
|
+
enabled: false
|
|
128627
|
+
},
|
|
128628
|
+
browser: {
|
|
128629
|
+
check_default_browser: false,
|
|
128630
|
+
default_browser_setting_enabled: false
|
|
128631
|
+
},
|
|
128632
|
+
default_apps: 'noinstall',
|
|
128633
|
+
distribution: {
|
|
128634
|
+
alternate_shortcut_text: false,
|
|
128635
|
+
auto_launch_chrome: false,
|
|
128636
|
+
import_bookmarks: false,
|
|
128637
|
+
import_history: false,
|
|
128638
|
+
import_home_page: false,
|
|
128639
|
+
import_search_engine: false,
|
|
128640
|
+
suppress_first_run_bubble: true,
|
|
128641
|
+
do_not_register_for_update_launch: true,
|
|
128642
|
+
make_chrome_default: false,
|
|
128643
|
+
make_chrome_default_for_user: false,
|
|
128644
|
+
require_eula: false,
|
|
128645
|
+
suppress_first_run_default_browser_prompt: true
|
|
128646
|
+
},
|
|
128647
|
+
dns_prefetching: {
|
|
128648
|
+
enabled: false
|
|
128649
|
+
},
|
|
128650
|
+
download: {
|
|
128651
|
+
default_directory: '/tmp/',
|
|
128652
|
+
directory_upgrade: true,
|
|
128653
|
+
open_pdf_in_adobe_reader: false,
|
|
128654
|
+
prompt_for_download: true
|
|
128655
|
+
},
|
|
128656
|
+
enable_do_not_track: true,
|
|
128657
|
+
extensions: {
|
|
128658
|
+
theme: {
|
|
128659
|
+
use_system: false
|
|
128660
|
+
},
|
|
128661
|
+
toolbarsize: -1,
|
|
128662
|
+
developer_mode: true,
|
|
128663
|
+
ui: {
|
|
128664
|
+
developer_mode: true
|
|
128665
|
+
}
|
|
128666
|
+
},
|
|
128667
|
+
plugins: {
|
|
128668
|
+
plugins_list: [
|
|
128669
|
+
{
|
|
128670
|
+
enabled: false,
|
|
128671
|
+
name: 'Java(TM)'
|
|
128672
|
+
}
|
|
128673
|
+
],
|
|
128674
|
+
show_details: true
|
|
128675
|
+
},
|
|
128676
|
+
profile: {
|
|
128677
|
+
password_manager_enabled: false
|
|
128678
|
+
},
|
|
128679
|
+
safebrowsing: {
|
|
128680
|
+
enabled: false,
|
|
128681
|
+
safebrowsingextended_reporting_enabled: false
|
|
128682
|
+
},
|
|
128683
|
+
savefile: {
|
|
128684
|
+
default_directory: '/tmp',
|
|
128685
|
+
type: 0
|
|
128686
|
+
},
|
|
128687
|
+
search: {
|
|
128688
|
+
suggest_enabled: false
|
|
128689
|
+
},
|
|
128690
|
+
session: {
|
|
128691
|
+
restore_on_startup: 5
|
|
128692
|
+
},
|
|
128693
|
+
sync: {
|
|
128694
|
+
suppress_start: true
|
|
128695
|
+
},
|
|
128696
|
+
sync_promo: {
|
|
128697
|
+
show_on_first_run_allowed: false,
|
|
128698
|
+
show_ntp_bubble: false
|
|
128699
|
+
},
|
|
128700
|
+
translate: {
|
|
128701
|
+
enabled: false
|
|
128702
|
+
}
|
|
128703
|
+
};
|
|
128704
|
+
const chromeMasterPreferences = {
|
|
128705
|
+
...masterPreferences
|
|
128706
|
+
};
|
|
128707
|
+
const edgeMasterPreferences = {
|
|
128708
|
+
...masterPreferences
|
|
128709
|
+
};
|
|
128619
128710
|
var external_unique_names_generator_ = __webpack_require__("unique-names-generator");
|
|
128620
128711
|
const DEFAULT_BROWSER_FLAGS = [
|
|
128621
128712
|
'--no-first-run',
|
|
@@ -128641,6 +128732,37 @@ var __webpack_modules__ = {
|
|
|
128641
128732
|
'--enable-features=SidePanelUpdates',
|
|
128642
128733
|
'--disable-features=DisableLoadExtensionCommandLineSwitch'
|
|
128643
128734
|
];
|
|
128735
|
+
function isPlainObject(value) {
|
|
128736
|
+
return !!value && 'object' == typeof value && !Array.isArray(value);
|
|
128737
|
+
}
|
|
128738
|
+
function deepMergePreferences(base, custom) {
|
|
128739
|
+
const merged = {
|
|
128740
|
+
...base
|
|
128741
|
+
};
|
|
128742
|
+
for (const [key, value] of Object.entries(custom)){
|
|
128743
|
+
const current = merged[key];
|
|
128744
|
+
if (isPlainObject(current) && isPlainObject(value)) {
|
|
128745
|
+
merged[key] = deepMergePreferences(current, value);
|
|
128746
|
+
continue;
|
|
128747
|
+
}
|
|
128748
|
+
merged[key] = value;
|
|
128749
|
+
}
|
|
128750
|
+
return merged;
|
|
128751
|
+
}
|
|
128752
|
+
function getChromiumMasterPreferences(browser) {
|
|
128753
|
+
return 'edge' === browser ? edgeMasterPreferences : chromeMasterPreferences;
|
|
128754
|
+
}
|
|
128755
|
+
function seedChromiumPreferences(profilePath, browser, customPreferences) {
|
|
128756
|
+
const preferencesPath = external_path_.join(profilePath, 'Default', 'Preferences');
|
|
128757
|
+
if (external_fs_.existsSync(preferencesPath)) return;
|
|
128758
|
+
const basePreferences = getChromiumMasterPreferences(browser);
|
|
128759
|
+
const custom = isPlainObject(customPreferences) ? customPreferences : {};
|
|
128760
|
+
const mergedPreferences = deepMergePreferences(basePreferences, custom);
|
|
128761
|
+
external_fs_.mkdirSync(external_path_.dirname(preferencesPath), {
|
|
128762
|
+
recursive: true
|
|
128763
|
+
});
|
|
128764
|
+
external_fs_.writeFileSync(preferencesPath, JSON.stringify(mergedPreferences), 'utf8');
|
|
128765
|
+
}
|
|
128644
128766
|
function browserConfig(compilation, configOptions) {
|
|
128645
128767
|
const extensionsToLoad = Array.isArray(configOptions.extension) ? configOptions.extension : [
|
|
128646
128768
|
configOptions.extension
|
|
@@ -128696,6 +128818,12 @@ var __webpack_modules__ = {
|
|
|
128696
128818
|
} catch {}
|
|
128697
128819
|
}
|
|
128698
128820
|
}
|
|
128821
|
+
if (userProfilePath) try {
|
|
128822
|
+
external_fs_.mkdirSync(userProfilePath, {
|
|
128823
|
+
recursive: true
|
|
128824
|
+
});
|
|
128825
|
+
seedChromiumPreferences(userProfilePath, configOptions.browser, configOptions.preferences);
|
|
128826
|
+
} catch {}
|
|
128699
128827
|
const excludeFlags = configOptions.excludeBrowserFlags || [];
|
|
128700
128828
|
const filteredFlags = (0, shared_utils.ov)(DEFAULT_BROWSER_FLAGS, excludeFlags);
|
|
128701
128829
|
const cdpPort = (0, shared_utils.jl)(configOptions.port, configOptions.instanceId);
|
|
@@ -128778,8 +128906,12 @@ var __webpack_modules__ = {
|
|
|
128778
128906
|
console.log(messages.E8B(chromiumConfig.join(' ')));
|
|
128779
128907
|
}
|
|
128780
128908
|
var extension_output_path = __webpack_require__("./webpack/plugin-browsers/run-chromium/chromium-launch/extension-output-path.ts");
|
|
128909
|
+
var external_os_ = __webpack_require__("os");
|
|
128781
128910
|
function isWslEnv() {
|
|
128782
|
-
|
|
128911
|
+
if ('linux' !== process.platform) return false;
|
|
128912
|
+
const hasWslEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
128913
|
+
if (hasWslEnv) return true;
|
|
128914
|
+
return /microsoft/i.test(external_os_.release());
|
|
128783
128915
|
}
|
|
128784
128916
|
function normalizeBinaryPathForWsl(input) {
|
|
128785
128917
|
let value = String(input || '').trim();
|
|
@@ -130047,8 +130179,12 @@ var __webpack_modules__ = {
|
|
|
130047
130179
|
}
|
|
130048
130180
|
}
|
|
130049
130181
|
}
|
|
130182
|
+
var external_os_ = __webpack_require__("os");
|
|
130050
130183
|
function isWslEnv() {
|
|
130051
|
-
|
|
130184
|
+
if ('linux' !== process.platform) return false;
|
|
130185
|
+
const hasWslEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
130186
|
+
if (hasWslEnv) return true;
|
|
130187
|
+
return /microsoft/i.test(external_os_.release());
|
|
130052
130188
|
}
|
|
130053
130189
|
function normalizeBinaryPathForWsl(input) {
|
|
130054
130190
|
let value = String(input || '').trim();
|
|
@@ -134365,7 +134501,7 @@ var __webpack_modules__ = {
|
|
|
134365
134501
|
},
|
|
134366
134502
|
"./package.json" (module) {
|
|
134367
134503
|
"use strict";
|
|
134368
|
-
module.exports = JSON.parse('{"rE":"3.
|
|
134504
|
+
module.exports = JSON.parse('{"rE":"3.7.0","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
134505
|
}
|
|
134370
134506
|
};
|
|
134371
134507
|
var __webpack_module_cache__ = {};
|
|
@@ -134762,24 +134898,14 @@ var __webpack_exports__ = {};
|
|
|
134762
134898
|
});
|
|
134763
134899
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
134764
134900
|
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);
|
|
134901
|
+
console.log(progressLabel);
|
|
134772
134902
|
if (isAuthor) console.warn(messages.TL('project dependencies'));
|
|
134773
134903
|
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
|
-
}
|
|
134904
|
+
await (0, package_manager.Qt)(command.command, command.args, {
|
|
134905
|
+
cwd: projectPath,
|
|
134906
|
+
stdio
|
|
134907
|
+
});
|
|
134908
|
+
(0, install_cache.h)(projectPath);
|
|
134783
134909
|
} catch (error) {
|
|
134784
134910
|
console.error(messages.RB(error));
|
|
134785
134911
|
process.exit(1);
|
package/package.json
CHANGED