extension 4.0.22 → 4.0.24
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/README.md +2 -0
- package/dist/49.cjs +47 -39
- package/dist/browsers.cjs +161 -103
- package/dist/cli.cjs +188 -107
- package/dist/extension/browsers/browsers-lib/banner.d.ts +1 -0
- package/dist/extension/browsers/browsers-lib/messages.d.ts +3 -3
- package/dist/extension/browsers/browsers-lib/ready-stamp.d.ts +2 -0
- package/dist/extension/browsers/run-firefox/rdp/rdp-extension-controller/index.d.ts +1 -0
- package/dist/extension/browsers/run-firefox/rdp/remote-firefox/index.d.ts +1 -0
- package/dist/extension/browsers/run-safari/safari-launch/index.d.ts +2 -1
- package/dist/extension/helpers/messaging.d.ts +4 -0
- package/dist/extension/helpers/no-browser.d.ts +1 -0
- package/dist/extension/helpers/telemetry.d.ts +1 -1
- package/package.json +4 -4
package/dist/browsers.cjs
CHANGED
|
@@ -95,6 +95,14 @@ var __webpack_modules__ = {
|
|
|
95
95
|
} catch {}
|
|
96
96
|
return deriveChromiumExtensionIdFromPath(outPath);
|
|
97
97
|
}
|
|
98
|
+
function expectedGeckoExtensionId(outPath) {
|
|
99
|
+
try {
|
|
100
|
+
const manifest = JSON.parse(node_fs__rspack_import_1.readFileSync(node_path__rspack_import_2.join(outPath, 'manifest.json'), 'utf-8'));
|
|
101
|
+
return deriveFirefoxExtensionIdFromManifest(manifest);
|
|
102
|
+
} catch {
|
|
103
|
+
return '';
|
|
104
|
+
}
|
|
105
|
+
}
|
|
98
106
|
function resolveExtensionId(args) {
|
|
99
107
|
const fromInfo = toNormalizedId(args.info?.extensionId);
|
|
100
108
|
if (fromInfo) return fromInfo;
|
|
@@ -147,13 +155,13 @@ var __webpack_modules__ = {
|
|
|
147
155
|
}
|
|
148
156
|
};
|
|
149
157
|
const updateSuffix = readUpdateSuffixOnce();
|
|
150
|
-
|
|
151
|
-
|
|
158
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.io());
|
|
159
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.e_(manifest, opts.browser, message, opts.browserVersionLine, updateSuffix || void 0, {
|
|
152
160
|
profilePath: opts.profilePath,
|
|
153
161
|
binaryPath: opts.binaryPath,
|
|
154
162
|
binaryProvenance: opts.binaryProvenance
|
|
155
163
|
}));
|
|
156
|
-
|
|
164
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.io());
|
|
157
165
|
markCardPrinted(k, opts.browser, opts.outPath);
|
|
158
166
|
return true;
|
|
159
167
|
}
|
|
@@ -188,15 +196,15 @@ var __webpack_modules__ = {
|
|
|
188
196
|
}
|
|
189
197
|
};
|
|
190
198
|
const updateSuffix = readUpdateSuffixOnce();
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.io());
|
|
200
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.e_(manifest, opts.browser, message, browserLabel, updateSuffix || void 0, {
|
|
193
201
|
includeExtensionId: opts.includeExtensionId,
|
|
194
202
|
runLabel,
|
|
195
203
|
profilePath: opts.profilePath,
|
|
196
204
|
binaryPath: opts.binaryPath,
|
|
197
205
|
binaryProvenance: opts.binaryProvenance
|
|
198
206
|
}));
|
|
199
|
-
|
|
207
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.io());
|
|
200
208
|
} else {
|
|
201
209
|
const message = {
|
|
202
210
|
data: {
|
|
@@ -208,20 +216,20 @@ var __webpack_modules__ = {
|
|
|
208
216
|
}
|
|
209
217
|
};
|
|
210
218
|
const updateSuffix = readUpdateSuffixOnce();
|
|
211
|
-
|
|
212
|
-
|
|
219
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.io());
|
|
220
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.e_(manifest, opts.browser, message, browserLabel, updateSuffix || void 0, {
|
|
213
221
|
includeExtensionId: opts.includeExtensionId,
|
|
214
222
|
runLabel,
|
|
215
223
|
profilePath: opts.profilePath,
|
|
216
224
|
binaryPath: opts.binaryPath,
|
|
217
225
|
binaryProvenance: opts.binaryProvenance
|
|
218
226
|
}));
|
|
219
|
-
|
|
227
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.io());
|
|
220
228
|
}
|
|
221
229
|
} catch {
|
|
222
230
|
const provenanceNote = _messages__rspack_import_5.xX(opts.binaryProvenance);
|
|
223
|
-
|
|
224
|
-
|
|
231
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.io());
|
|
232
|
+
(0, _helpers_messaging__rspack_import_3._w)((0, _helpers_messaging__rspack_import_3.Nr)({
|
|
225
233
|
rows: [
|
|
226
234
|
{
|
|
227
235
|
label: 'Browser',
|
|
@@ -241,13 +249,14 @@ var __webpack_modules__ = {
|
|
|
241
249
|
}
|
|
242
250
|
]
|
|
243
251
|
}));
|
|
244
|
-
|
|
252
|
+
(0, _helpers_messaging__rspack_import_3._w)(_messages__rspack_import_5.io());
|
|
245
253
|
}
|
|
246
254
|
markCardPrinted(k, opts.browser, opts.outPath);
|
|
247
255
|
return true;
|
|
248
256
|
}
|
|
249
257
|
__webpack_require__.d(__webpack_exports__, {
|
|
250
258
|
MK: ()=>printProdBannerOnce,
|
|
259
|
+
MT: ()=>expectedGeckoExtensionId,
|
|
251
260
|
ai: ()=>printDevBannerOnce,
|
|
252
261
|
vy: ()=>expectedChromiumExtensionId
|
|
253
262
|
});
|
|
@@ -490,11 +499,11 @@ var __webpack_modules__ = {
|
|
|
490
499
|
})();
|
|
491
500
|
return `${getLoggingPrefix('error')} ${isUnreachable}${pintor__rspack_import_8_default().gray('NOT FOUND')} ${pintor__rspack_import_8_default().underline(browserBinaryLocation || `${capitalizedBrowserName(browser)}BROWSER`)}\nInstall the missing browser, or choose another one with ${pintor__rspack_import_8_default().blue('--browser')} ${pintor__rspack_import_8_default().gray('<chrome|edge|firefox>')}.` + wslHint;
|
|
492
501
|
}
|
|
493
|
-
function usingManagedChromiumFamilyFallback(requestedBrowser,
|
|
494
|
-
return `${getLoggingPrefix('
|
|
502
|
+
function usingManagedChromiumFamilyFallback(requestedBrowser, _fallbackBrowser, _binaryPath) {
|
|
503
|
+
return `${getLoggingPrefix('warn')} ${managedBrowserDisplayName(requestedBrowser)} isn't installed.\nRun ${pintor__rspack_import_8_default().blue(`npx extension install ${requestedBrowser}`)} to use ${managedBrowserDisplayName(requestedBrowser)} itself.`;
|
|
495
504
|
}
|
|
496
|
-
function preferringSystemBrowserOverSnapshot(
|
|
497
|
-
return `${getLoggingPrefix('
|
|
505
|
+
function preferringSystemBrowserOverSnapshot(_systemBinary, _snapshotBinary) {
|
|
506
|
+
return `${getLoggingPrefix('warn')} Set ${pintor__rspack_import_8_default().blue('EXTENSION_PREFER_CHROMIUM_SNAPSHOT=true')} to use the cached Chromium snapshot instead.`;
|
|
498
507
|
}
|
|
499
508
|
function mv2NotSupportedByChromium(extensionPath) {
|
|
500
509
|
return `${getLoggingPrefix('warn')} ${pintor__rspack_import_8_default().brightYellow('This extension declares Manifest V2, which modern Chromium refuses to load.')}\n${pintor__rspack_import_8_default().gray('PATH')} ${pintor__rspack_import_8_default().underline(extensionPath)}\nThe browser will reject it at launch (a native dialog, not a console error), so the dev session can't attach.\nRun it on an MV2-capable browser (${pintor__rspack_import_8_default().blue('--browser firefox')}) or migrate the manifest to MV3.`;
|
|
@@ -523,8 +532,8 @@ var __webpack_modules__ = {
|
|
|
523
532
|
function geckoAddonLoadRefused(addonPath, reason) {
|
|
524
533
|
return `${getLoggingPrefix('error')} ${pintor__rspack_import_8_default().red("The browser refused to load this add-on, so it isn't running.")}\n${pintor__rspack_import_8_default().gray('PATH')} ${pintor__rspack_import_8_default().underline(addonPath)}\n` + (reason ? `${pintor__rspack_import_8_default().gray('REASON')} ${pintor__rspack_import_8_default().red(reason)}\n` : '') + `No background script, content script, or page from this add-on will run, and no Extension ID was assigned.\n` + `Fix the reason above and save.\n` + "If the browser doesn't pick it up, restart the dev session.";
|
|
525
534
|
}
|
|
526
|
-
function devChannelSnapshotInUse(
|
|
527
|
-
return `${getLoggingPrefix('warn')}
|
|
535
|
+
function devChannelSnapshotInUse(_binaryPath) {
|
|
536
|
+
return `${getLoggingPrefix('warn')} Chromium snapshot behavior may differ from stable Chrome.\nInstall a stable browser or remove the snapshot to stop using it.`;
|
|
528
537
|
}
|
|
529
538
|
function browserLaunchError(browser, error) {
|
|
530
539
|
return `${getLoggingPrefix('error')} Can't launch ${capitalizedBrowserName(browser)}.\n${pintor__rspack_import_8_default().red(errorDetail(error))}`;
|
|
@@ -696,7 +705,7 @@ var __webpack_modules__ = {
|
|
|
696
705
|
return `${getLoggingPrefix('warn')} safari-web-extension-converter reported ${pintor__rspack_import_8_default().yellow(String(warnings.length))} ${1 === warnings.length ? 'warning' : 'warnings'}, some manifest keys/APIs may not be supported by Safari:\n` + warnings.map((line)=>` ${pintor__rspack_import_8_default().gray('•')} ${line}`).join('\n');
|
|
697
706
|
}
|
|
698
707
|
function safariDefaultBundleIdNote(bundleId) {
|
|
699
|
-
return `${getLoggingPrefix('
|
|
708
|
+
return `${getLoggingPrefix('warn')} The bundle id ${pintor__rspack_import_8_default().gray(bundleId)} is generated from the app name.\nEvery project built from the same source shares this id, and the first team to register it takes it.\nSet your own with ${pintor__rspack_import_8_default().blue('--bundle-id')} before your first submission.\nAfter a submission, a new id is a new extension with none of your users.`;
|
|
700
709
|
}
|
|
701
710
|
function safariOpenHint(appPath, appName) {
|
|
702
711
|
return `${getLoggingPrefix('info')} Launch it once to register with Safari: ${pintor__rspack_import_8_default().blue('open')} ${pintor__rspack_import_8_default().underline(`"${appPath}"`)}\nThen enable ${pintor__rspack_import_8_default().yellow(appName)} via Safari ▸ Develop ▸ ${pintor__rspack_import_8_default().yellow('Allow Unsigned Extensions')} and Safari ▸ Settings ▸ Extensions.`;
|
|
@@ -717,7 +726,7 @@ var __webpack_modules__ = {
|
|
|
717
726
|
return `${getLoggingPrefix('success')} Safari recognizes ${pintor__rspack_import_8_default().yellow(appName)}, finish enabling it with the steps above.`;
|
|
718
727
|
}
|
|
719
728
|
function safariNotYetRegistered(appName) {
|
|
720
|
-
return `${getLoggingPrefix('
|
|
729
|
+
return `${getLoggingPrefix('info')} Safari hasn't picked up ${pintor__rspack_import_8_default().yellow(appName)} yet.\nOpen the app once, then check Safari ▸ Settings ▸ Extensions.`;
|
|
721
730
|
}
|
|
722
731
|
function safariRebuilt(appName) {
|
|
723
732
|
return `${getLoggingPrefix('success')} Rebuilt ${pintor__rspack_import_8_default().yellow(appName)}, reload the page (or toggle the extension) in Safari to see changes.`;
|
|
@@ -1202,7 +1211,7 @@ var __webpack_modules__ = {
|
|
|
1202
1211
|
return !!child && terminatedByUs.has(child);
|
|
1203
1212
|
}
|
|
1204
1213
|
function authorLog(line) {
|
|
1205
|
-
if (line && (0, _helpers_messaging__rspack_import_1._o)())
|
|
1214
|
+
if (line && (0, _helpers_messaging__rspack_import_1._o)()) (0, _helpers_messaging__rspack_import_1._w)(line);
|
|
1206
1215
|
}
|
|
1207
1216
|
function killWindowsTree(child, sync) {
|
|
1208
1217
|
if ('win32' !== process.platform) return;
|
|
@@ -1304,6 +1313,20 @@ var __webpack_modules__ = {
|
|
|
1304
1313
|
const profilePath = String(details?.profilePath || '').trim();
|
|
1305
1314
|
if (profilePath) ready.profilePath = profilePath;
|
|
1306
1315
|
if ('number' == typeof details?.browserPid && Number.isFinite(details.browserPid)) ready.browserPid = details.browserPid;
|
|
1316
|
+
const extensionId = String(details?.extensionId || '').trim();
|
|
1317
|
+
if (extensionId) ready.extensionId = extensionId;
|
|
1318
|
+
node_fs__rspack_import_0.writeFileSync(readyPath, JSON.stringify(ready, null, 2));
|
|
1319
|
+
} catch {}
|
|
1320
|
+
}
|
|
1321
|
+
function stampReadyExtensionId(extensionOutputPath, extensionId) {
|
|
1322
|
+
try {
|
|
1323
|
+
const id = String(extensionId || '').trim();
|
|
1324
|
+
if (!extensionOutputPath || !id) return;
|
|
1325
|
+
const readyPath = readyPathFor(extensionOutputPath);
|
|
1326
|
+
if (!node_fs__rspack_import_0.existsSync(readyPath)) return;
|
|
1327
|
+
const ready = JSON.parse(node_fs__rspack_import_0.readFileSync(readyPath, 'utf-8'));
|
|
1328
|
+
if (ready.extensionId === id) return;
|
|
1329
|
+
ready.extensionId = id;
|
|
1307
1330
|
node_fs__rspack_import_0.writeFileSync(readyPath, JSON.stringify(ready, null, 2));
|
|
1308
1331
|
} catch {}
|
|
1309
1332
|
}
|
|
@@ -1356,6 +1379,7 @@ var __webpack_modules__ = {
|
|
|
1356
1379
|
M: ()=>stampReadyBrowserLaunch,
|
|
1357
1380
|
Wi: ()=>stampReadyBrowserExited,
|
|
1358
1381
|
__: ()=>stampReadyRdpPort,
|
|
1382
|
+
hg: ()=>stampReadyExtensionId,
|
|
1359
1383
|
iD: ()=>stampReadyProfileLocked,
|
|
1360
1384
|
sf: ()=>stampReadyExtensionLoadRefused
|
|
1361
1385
|
});
|
|
@@ -1951,6 +1975,7 @@ var __webpack_modules__ = {
|
|
|
1951
1975
|
});
|
|
1952
1976
|
const external_node_http_namespaceObject = require("node:http");
|
|
1953
1977
|
var external_node_net_ = __webpack_require__("node:net");
|
|
1978
|
+
var messaging = __webpack_require__("./helpers/messaging.ts");
|
|
1954
1979
|
var constants = __webpack_require__("./browsers/browsers-lib/constants.ts");
|
|
1955
1980
|
var messages = __webpack_require__("./browsers/browsers-lib/messages.ts");
|
|
1956
1981
|
async function getJson(host, port, path) {
|
|
@@ -1983,14 +2008,14 @@ var __webpack_modules__ = {
|
|
|
1983
2008
|
const version = await getJson(host, port, '/json/version');
|
|
1984
2009
|
const wsUrl = 'string' == typeof version?.webSocketDebuggerUrl ? version.webSocketDebuggerUrl : void 0;
|
|
1985
2010
|
if (wsUrl) {
|
|
1986
|
-
if (isDev)
|
|
2011
|
+
if (isDev) (0, messaging._w)(messages.Te());
|
|
1987
2012
|
return wsUrl;
|
|
1988
2013
|
}
|
|
1989
2014
|
} catch (error) {
|
|
1990
|
-
if (isDev)
|
|
2015
|
+
if (isDev) (0, messaging.mR)('[CDP] Failed to read /json/version:', String(error?.message || error));
|
|
1991
2016
|
}
|
|
1992
2017
|
const targets = await getJson(host, port, '/json');
|
|
1993
|
-
if (isDev)
|
|
2018
|
+
if (isDev) (0, messaging._w)(messages.FF((targets || []).length || 0));
|
|
1994
2019
|
const pageTarget = (targets || []).find((target)=>{
|
|
1995
2020
|
const type = String(target?.type || '');
|
|
1996
2021
|
const ws = 'string' == typeof target?.webSocketDebuggerUrl ? target.webSocketDebuggerUrl : '';
|
|
@@ -1998,7 +2023,7 @@ var __webpack_modules__ = {
|
|
|
1998
2023
|
});
|
|
1999
2024
|
const pageWs = 'string' == typeof pageTarget?.webSocketDebuggerUrl ? pageTarget.webSocketDebuggerUrl : '';
|
|
2000
2025
|
if (pageWs) {
|
|
2001
|
-
if (isDev)
|
|
2026
|
+
if (isDev) (0, messaging._w)(messages.Te());
|
|
2002
2027
|
return pageWs;
|
|
2003
2028
|
}
|
|
2004
2029
|
throw new Error('No CDP WebSocket URL available');
|
|
@@ -2454,7 +2479,7 @@ var __webpack_modules__ = {
|
|
|
2454
2479
|
});
|
|
2455
2480
|
const userProfilePath = resolved.profilePath;
|
|
2456
2481
|
if ('managed' === resolved.kind) {
|
|
2457
|
-
if ((0, messaging._o)())
|
|
2482
|
+
if ((0, messaging._o)()) (0, messaging._w)(messages.sY(shownPath(userProfilePath)));
|
|
2458
2483
|
if (!resolved.persisted) try {
|
|
2459
2484
|
const maxAgeHours = parseInt(String(process.env.EXTENSION_TMP_PROFILE_MAX_AGE_HOURS || ''), 10);
|
|
2460
2485
|
(0, shared_utils.CW)(managedBaseDir, external_node_path_.basename(userProfilePath), Number.isFinite(maxAgeHours) ? maxAgeHours : 12);
|
|
@@ -2510,10 +2535,10 @@ var __webpack_modules__ = {
|
|
|
2510
2535
|
return (0, shared_utils.Py)(baseFlags);
|
|
2511
2536
|
}
|
|
2512
2537
|
function logChromiumDryRun(browserBinaryLocation, chromiumConfig) {
|
|
2513
|
-
if ((0, messaging._o)())
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2538
|
+
if ((0, messaging._o)()) (0, messaging._w)(messages.xy());
|
|
2539
|
+
(0, messaging._w)(messages.Nk());
|
|
2540
|
+
(0, messaging._w)(messages.Q0(browserBinaryLocation));
|
|
2541
|
+
(0, messaging._w)(messages.E8(chromiumConfig.join(' ')));
|
|
2517
2542
|
}
|
|
2518
2543
|
var extension_output_path = __webpack_require__("./browsers/run-chromium/chromium-launch/extension-output-path.ts");
|
|
2519
2544
|
const activeInstances = new Set();
|
|
@@ -2523,11 +2548,11 @@ var __webpack_modules__ = {
|
|
|
2523
2548
|
instance.isCleaningUp = true;
|
|
2524
2549
|
const { browser, child, cleanupInstance } = instance;
|
|
2525
2550
|
try {
|
|
2526
|
-
if ((0, messaging._o)())
|
|
2551
|
+
if ((0, messaging._o)()) (0, messaging._w)(messages.Vk(browser));
|
|
2527
2552
|
(0, process_teardown.Df)(child, browser);
|
|
2528
2553
|
cleanupInstance();
|
|
2529
2554
|
} catch (error) {
|
|
2530
|
-
|
|
2555
|
+
(0, messaging.Gg)(messages.TF(browser, error));
|
|
2531
2556
|
}
|
|
2532
2557
|
}
|
|
2533
2558
|
function cleanupAll() {
|
|
@@ -2549,13 +2574,13 @@ var __webpack_modules__ = {
|
|
|
2549
2574
|
process.on('exit', forceKillAllOnExit);
|
|
2550
2575
|
process.on('uncaughtException', (error)=>{
|
|
2551
2576
|
if ((0, process_teardown.FA)(error)) return;
|
|
2552
|
-
|
|
2577
|
+
(0, messaging.Gg)(messages.F4(firstBrowserLabel(), error));
|
|
2553
2578
|
cleanupAll();
|
|
2554
2579
|
process.exit(1);
|
|
2555
2580
|
});
|
|
2556
2581
|
process.on('unhandledRejection', (reason)=>{
|
|
2557
2582
|
if ((0, process_teardown.FA)(reason)) return;
|
|
2558
|
-
|
|
2583
|
+
(0, messaging.Gg)(messages.N4(firstBrowserLabel(), reason));
|
|
2559
2584
|
cleanupAll();
|
|
2560
2585
|
process.exit(1);
|
|
2561
2586
|
});
|
|
@@ -2741,9 +2766,9 @@ var __webpack_modules__ = {
|
|
|
2741
2766
|
}
|
|
2742
2767
|
async runOnce(compilation, opts) {
|
|
2743
2768
|
if (!this.logger) this.logger = {
|
|
2744
|
-
info: (...a)=>
|
|
2745
|
-
warn: (...a)=>
|
|
2746
|
-
error: (...a)=>
|
|
2769
|
+
info: (...a)=>(0, messaging._w)(...a),
|
|
2770
|
+
warn: (...a)=>(0, messaging.mR)(...a),
|
|
2771
|
+
error: (...a)=>(0, messaging.Gg)(...a),
|
|
2747
2772
|
debug: (...a)=>console.debug?.(...a)
|
|
2748
2773
|
};
|
|
2749
2774
|
await this.launchChromium(compilation, opts);
|
|
@@ -2751,9 +2776,9 @@ var __webpack_modules__ = {
|
|
|
2751
2776
|
apply(compiler) {
|
|
2752
2777
|
const host = compiler;
|
|
2753
2778
|
this.logger = 'function' == typeof host?.getInfrastructureLogger ? host.getInfrastructureLogger('ChromiumLaunchPlugin') : {
|
|
2754
|
-
info: (...a)=>
|
|
2755
|
-
warn: (...a)=>
|
|
2756
|
-
error: (...a)=>
|
|
2779
|
+
info: (...a)=>(0, messaging._w)(...a),
|
|
2780
|
+
warn: (...a)=>(0, messaging.mR)(...a),
|
|
2781
|
+
error: (...a)=>(0, messaging.Gg)(...a),
|
|
2757
2782
|
debug: (...a)=>console.debug?.(...a)
|
|
2758
2783
|
};
|
|
2759
2784
|
host.hooks.done.tapPromise('chromium:launch', async (stats)=>{
|
|
@@ -2763,7 +2788,7 @@ var __webpack_modules__ = {
|
|
|
2763
2788
|
if (this.didLaunch) return;
|
|
2764
2789
|
await this.launchChromium(stats.compilation);
|
|
2765
2790
|
this.didLaunch = true;
|
|
2766
|
-
if (!this.didReportReady && !this.extensionLoadRefused)
|
|
2791
|
+
if (!this.didReportReady && !this.extensionLoadRefused) (0, messaging._w)((0, ready_message.G)(stats.compilation.options.mode, this.options.browser));
|
|
2767
2792
|
} catch (error) {
|
|
2768
2793
|
try {
|
|
2769
2794
|
this.logger.error(messages._D(this.options.browser, error));
|
|
@@ -2851,11 +2876,11 @@ var __webpack_modules__ = {
|
|
|
2851
2876
|
preferManagedSnapshot: 'true' === String(process.env.EXTENSION_PREFER_CHROMIUM_SNAPSHOT || '').toLowerCase().trim()
|
|
2852
2877
|
});
|
|
2853
2878
|
if (choice.swappedToSystem && choice.binary) {
|
|
2854
|
-
|
|
2879
|
+
(0, messaging.mR)(messages.kK(choice.binary, browserBinaryLocation));
|
|
2855
2880
|
browserBinaryLocation = choice.binary;
|
|
2856
2881
|
} else if (choice.usedManagedSnapshot) {
|
|
2857
2882
|
usedManagedSnapshot = true;
|
|
2858
|
-
|
|
2883
|
+
(0, messaging.mR)(messages.JB(browserBinaryLocation));
|
|
2859
2884
|
}
|
|
2860
2885
|
}
|
|
2861
2886
|
let skipDetection = Boolean(browserBinaryLocation);
|
|
@@ -2938,14 +2963,14 @@ var __webpack_modules__ = {
|
|
|
2938
2963
|
};
|
|
2939
2964
|
switch(browser){
|
|
2940
2965
|
case 'chrome':
|
|
2941
|
-
if (isAuthorMode)
|
|
2966
|
+
if (isAuthorMode) (0, messaging._w)(messages.Gq(browser));
|
|
2942
2967
|
if (!skipDetection) browserBinaryLocation = resolveChromeLikeBinary();
|
|
2943
2968
|
break;
|
|
2944
2969
|
case 'brave':
|
|
2945
2970
|
case 'opera':
|
|
2946
2971
|
case 'vivaldi':
|
|
2947
2972
|
case 'yandex':
|
|
2948
|
-
if (isAuthorMode)
|
|
2973
|
+
if (isAuthorMode) (0, messaging._w)(messages.Gq(browser));
|
|
2949
2974
|
if (!skipDetection) try {
|
|
2950
2975
|
const locate = 'brave' === browser ? external_brave_location_default() : 'opera' === browser ? external_opera_location2_default() : 'vivaldi' === browser ? external_vivaldi_location2_default() : external_yandex_location_default();
|
|
2951
2976
|
const located = locate(true, {
|
|
@@ -2957,11 +2982,11 @@ var __webpack_modules__ = {
|
|
|
2957
2982
|
if (!browserBinaryLocation) browserBinaryLocation = resolveWslFallback();
|
|
2958
2983
|
break;
|
|
2959
2984
|
case 'chromium':
|
|
2960
|
-
if (isAuthorMode)
|
|
2985
|
+
if (isAuthorMode) (0, messaging._w)(messages.Gq(browser));
|
|
2961
2986
|
if (this.options?.chromiumBinary) {
|
|
2962
2987
|
const normalized = normalizePath(String(this.options.chromiumBinary));
|
|
2963
2988
|
if (!normalized || !external_node_fs_.existsSync(normalized)) {
|
|
2964
|
-
|
|
2989
|
+
(0, messaging.Gg)(messages.Sp(String(this.options.chromiumBinary)));
|
|
2965
2990
|
process.exit(1);
|
|
2966
2991
|
}
|
|
2967
2992
|
browserBinaryLocation = normalized;
|
|
@@ -2980,7 +3005,7 @@ var __webpack_modules__ = {
|
|
|
2980
3005
|
if (!browserBinaryLocation) browserBinaryLocation = resolveWslFallback();
|
|
2981
3006
|
break;
|
|
2982
3007
|
case 'edge':
|
|
2983
|
-
if (isAuthorMode)
|
|
3008
|
+
if (isAuthorMode) (0, messaging._w)(messages.Gq(browser));
|
|
2984
3009
|
try {
|
|
2985
3010
|
const override = String(process.env.EDGE_BINARY || '').trim();
|
|
2986
3011
|
if (override) {
|
|
@@ -3024,13 +3049,13 @@ var __webpack_modules__ = {
|
|
|
3024
3049
|
if (this.options?.chromiumBinary) {
|
|
3025
3050
|
const normalized = normalizePath(String(this.options.chromiumBinary));
|
|
3026
3051
|
if (!normalized || !external_node_fs_.existsSync(normalized)) {
|
|
3027
|
-
|
|
3052
|
+
(0, messaging.Gg)(messages.Sp(String(this.options.chromiumBinary)));
|
|
3028
3053
|
process.exit(1);
|
|
3029
3054
|
}
|
|
3030
3055
|
browserBinaryLocation = normalized;
|
|
3031
3056
|
binaryPinnedByFlag = true;
|
|
3032
3057
|
} else {
|
|
3033
|
-
|
|
3058
|
+
(0, messaging.Gg)(messages.ne());
|
|
3034
3059
|
process.exit(1);
|
|
3035
3060
|
}
|
|
3036
3061
|
if (!browserBinaryLocation && !skipDetection) try {
|
|
@@ -3056,7 +3081,7 @@ var __webpack_modules__ = {
|
|
|
3056
3081
|
const familyFallback = output_binaries_resolver.zN(compilation, browser);
|
|
3057
3082
|
const normalized = normalizePath(familyFallback?.binary || null);
|
|
3058
3083
|
if (familyFallback && isUsableBinary(normalized)) {
|
|
3059
|
-
|
|
3084
|
+
(0, messaging.mR)(messages.Ug(browser, familyFallback.browser, normalized));
|
|
3060
3085
|
browserBinaryLocation = normalized;
|
|
3061
3086
|
}
|
|
3062
3087
|
}
|
|
@@ -3083,18 +3108,18 @@ var __webpack_modules__ = {
|
|
|
3083
3108
|
for (const extPath of extensionsToLoad)try {
|
|
3084
3109
|
const m = JSON.parse(external_node_fs_.readFileSync(external_node_path_.join(String(extPath), 'manifest.json'), 'utf8'));
|
|
3085
3110
|
const refusal = diagnoseChromiumManifestRefusal(m);
|
|
3086
|
-
if ('mv2' === refusal)
|
|
3087
|
-
else if ("mv3-background-scripts" === refusal)
|
|
3088
|
-
else if ('unsupported-manifest-version' === refusal)
|
|
3111
|
+
if ('mv2' === refusal) (0, messaging.mR)(messages.sP(String(extPath)));
|
|
3112
|
+
else if ("mv3-background-scripts" === refusal) (0, messaging.mR)(messages.NO(String(extPath)));
|
|
3113
|
+
else if ('unsupported-manifest-version' === refusal) (0, messaging.mR)(messages.CN(String(extPath), m?.manifest_version));
|
|
3089
3114
|
const invalidPatterns = findInvalidMatchPatterns(m);
|
|
3090
|
-
if (invalidPatterns.length)
|
|
3115
|
+
if (invalidPatterns.length) (0, messaging.mR)(messages.qR(String(extPath), invalidPatterns));
|
|
3091
3116
|
const loadBlockers = [
|
|
3092
3117
|
...findChromiumLoadBlockers(m, resolvedBrowserVersion),
|
|
3093
3118
|
...findUnloadableIconFiles(m, String(extPath)),
|
|
3094
3119
|
...findLocaleLoadBlockers(m, String(extPath)),
|
|
3095
3120
|
...findMissingManagedSchema(m, String(extPath))
|
|
3096
3121
|
];
|
|
3097
|
-
if (loadBlockers.length)
|
|
3122
|
+
if (loadBlockers.length) (0, messaging.mR)(messages.L(String(extPath), loadBlockers));
|
|
3098
3123
|
} catch {}
|
|
3099
3124
|
let chromiumConfig;
|
|
3100
3125
|
try {
|
|
@@ -3143,9 +3168,11 @@ var __webpack_modules__ = {
|
|
|
3143
3168
|
extensionOutputPath: (0, extension_output_path.W)(compilation, chromiumConfig.find((flag)=>flag.startsWith('--load-extension='))) || void 0
|
|
3144
3169
|
};
|
|
3145
3170
|
const child = await this.launchWithDirectSpawn(browserBinaryLocation, chromiumConfig, usePipe);
|
|
3146
|
-
|
|
3171
|
+
const launchOutputPath = this.closeHandlerContext?.extensionOutputPath;
|
|
3172
|
+
(0, ready_stamp.M)(launchOutputPath, {
|
|
3147
3173
|
profilePath: chromiumConfig.find((flag)=>flag.startsWith('--user-data-dir='))?.slice('--user-data-dir='.length).replace(/^"|"$/g, ''),
|
|
3148
|
-
browserPid: child?.pid
|
|
3174
|
+
browserPid: child?.pid,
|
|
3175
|
+
extensionId: launchOutputPath ? (0, banner.vy)(launchOutputPath) : void 0
|
|
3149
3176
|
});
|
|
3150
3177
|
const pipeStreams = usePipe && child?.stdio?.[3] && child?.stdio?.[4] ? {
|
|
3151
3178
|
input: child.stdio[4],
|
|
@@ -3163,7 +3190,7 @@ var __webpack_modules__ = {
|
|
|
3163
3190
|
const reportReady = ()=>{
|
|
3164
3191
|
if ('development' !== compilation.options.mode) return;
|
|
3165
3192
|
if (this.didReportReady || this.extensionLoadRefused) return;
|
|
3166
|
-
|
|
3193
|
+
(0, messaging._w)((0, ready_message.G)(compilation.options.mode, this.options.browser));
|
|
3167
3194
|
this.didReportReady = true;
|
|
3168
3195
|
};
|
|
3169
3196
|
if (!enableCdp) reportReady();
|
|
@@ -3198,7 +3225,7 @@ var __webpack_modules__ = {
|
|
|
3198
3225
|
} catch (error) {
|
|
3199
3226
|
const message = String(error && error.message);
|
|
3200
3227
|
const hint = /timed out|did not complete/i.test(message) ? " Chrome likely rejected the extension at launch, open chrome://extensions in the dev browser window for the exact error. Common causes: MV3 content_security_policy with 'unsafe-inline', manifest keys Chrome does not support, or manifest references to missing files. Reload/HMR cannot attach until this is fixed." : '';
|
|
3201
|
-
|
|
3228
|
+
(0, messaging.Gg)(`[browser] ${message}${hint}`);
|
|
3202
3229
|
reportReady();
|
|
3203
3230
|
}
|
|
3204
3231
|
}
|
|
@@ -3270,13 +3297,13 @@ var __webpack_modules__ = {
|
|
|
3270
3297
|
try {
|
|
3271
3298
|
const displayCacheDir = output_binaries_resolver.LB(compilation);
|
|
3272
3299
|
const pretty = messages.MG(browserName || this.options.browser, raw, displayCacheDir);
|
|
3273
|
-
|
|
3300
|
+
(0, messaging.Gg)(pretty);
|
|
3274
3301
|
} catch {
|
|
3275
3302
|
try {
|
|
3276
3303
|
const pretty = messages.MG(browserName || this.options.browser, raw, '');
|
|
3277
|
-
|
|
3304
|
+
(0, messaging.Gg)(pretty);
|
|
3278
3305
|
} catch {
|
|
3279
|
-
|
|
3306
|
+
(0, messaging.Gg)(raw);
|
|
3280
3307
|
}
|
|
3281
3308
|
}
|
|
3282
3309
|
}
|
|
@@ -3462,6 +3489,7 @@ var __webpack_modules__ = {
|
|
|
3462
3489
|
const external_waterfox_location_namespaceObject = require("waterfox-location");
|
|
3463
3490
|
var external_waterfox_location_default = /*#__PURE__*/ __webpack_require__.n(external_waterfox_location_namespaceObject);
|
|
3464
3491
|
var messaging = __webpack_require__("./helpers/messaging.ts");
|
|
3492
|
+
var banner = __webpack_require__("./browsers/browsers-lib/banner.ts");
|
|
3465
3493
|
var instance_registry = __webpack_require__("./browsers/browsers-lib/instance-registry.ts");
|
|
3466
3494
|
var messages = __webpack_require__("./browsers/browsers-lib/messages.ts");
|
|
3467
3495
|
var output_binaries_resolver = __webpack_require__("./browsers/browsers-lib/output-binaries-resolver.ts");
|
|
@@ -3642,7 +3670,7 @@ var __webpack_modules__ = {
|
|
|
3642
3670
|
});
|
|
3643
3671
|
const profilePath = resolved.profilePath;
|
|
3644
3672
|
if ('managed' === resolved.kind) {
|
|
3645
|
-
if ((0, messaging._o)())
|
|
3673
|
+
if ((0, messaging._o)()) (0, messaging._w)(messages.sY(shownPath(profilePath)));
|
|
3646
3674
|
if (!resolved.persisted) try {
|
|
3647
3675
|
const maxAgeHours = parseInt(String(process.env.EXTENSION_TMP_PROFILE_MAX_AGE_HOURS || ''), 10);
|
|
3648
3676
|
(0, shared_utils.CW)(managedBaseDir, external_node_path_.basename(profilePath), Number.isFinite(maxAgeHours) ? maxAgeHours : 12);
|
|
@@ -3684,10 +3712,10 @@ var __webpack_modules__ = {
|
|
|
3684
3712
|
return parts.join(' ');
|
|
3685
3713
|
}
|
|
3686
3714
|
function logFirefoxDryRun(browserBinaryLocation, firefoxConfig) {
|
|
3687
|
-
if ((0, messaging._o)())
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3715
|
+
if ((0, messaging._o)()) (0, messaging._w)(messages.A9());
|
|
3716
|
+
(0, messaging._w)(messages.qn());
|
|
3717
|
+
(0, messaging._w)(messages.LD(browserBinaryLocation));
|
|
3718
|
+
(0, messaging._w)(messages.k6(firefoxConfig));
|
|
3691
3719
|
}
|
|
3692
3720
|
const activeInstances = new Set();
|
|
3693
3721
|
let globalHandlersInstalled = false;
|
|
@@ -3696,11 +3724,11 @@ var __webpack_modules__ = {
|
|
|
3696
3724
|
instance.isCleaningUp = true;
|
|
3697
3725
|
const { browser, childRef, cleanupInstance } = instance;
|
|
3698
3726
|
try {
|
|
3699
|
-
if ((0, messaging._o)())
|
|
3727
|
+
if ((0, messaging._o)()) (0, messaging._w)(messages.Vk(browser));
|
|
3700
3728
|
(0, process_teardown.Df)(childRef(), browser);
|
|
3701
3729
|
await cleanupInstance();
|
|
3702
3730
|
} catch (error) {
|
|
3703
|
-
|
|
3731
|
+
(0, messaging.Gg)(messages.TF(browser, error));
|
|
3704
3732
|
}
|
|
3705
3733
|
}
|
|
3706
3734
|
function cleanupAllInstances() {
|
|
@@ -3724,7 +3752,7 @@ var __webpack_modules__ = {
|
|
|
3724
3752
|
process.on('beforeExit', cleanupAllInstances);
|
|
3725
3753
|
process.on('uncaughtException', async (error)=>{
|
|
3726
3754
|
if ((0, process_teardown.FA)(error)) return;
|
|
3727
|
-
|
|
3755
|
+
(0, messaging.Gg)(messages.F4(firstBrowserLabel(), error));
|
|
3728
3756
|
await Promise.all([
|
|
3729
3757
|
...activeInstances
|
|
3730
3758
|
].map((i)=>attemptCleanup(i)));
|
|
@@ -3732,7 +3760,7 @@ var __webpack_modules__ = {
|
|
|
3732
3760
|
});
|
|
3733
3761
|
process.on('unhandledRejection', async (reason)=>{
|
|
3734
3762
|
if ((0, process_teardown.FA)(reason)) return;
|
|
3735
|
-
|
|
3763
|
+
(0, messaging.Gg)(messages.N4(firstBrowserLabel(), reason));
|
|
3736
3764
|
await Promise.all([
|
|
3737
3765
|
...activeInstances
|
|
3738
3766
|
].map((i)=>attemptCleanup(i)));
|
|
@@ -3840,7 +3868,6 @@ var __webpack_modules__ = {
|
|
|
3840
3868
|
}
|
|
3841
3869
|
return clientResponse;
|
|
3842
3870
|
}
|
|
3843
|
-
var banner = __webpack_require__("./browsers/browsers-lib/banner.ts");
|
|
3844
3871
|
async function waitForManifest(outPath, timeoutMs = 8000) {
|
|
3845
3872
|
const manifestPath = external_node_path_.join(outPath, 'manifest.json');
|
|
3846
3873
|
const start = Date.now();
|
|
@@ -4199,7 +4226,7 @@ var __webpack_modules__ = {
|
|
|
4199
4226
|
host,
|
|
4200
4227
|
port
|
|
4201
4228
|
}, ()=>{
|
|
4202
|
-
if ((0, messaging._o)())
|
|
4229
|
+
if ((0, messaging._o)()) (0, messaging._w)(messages.EI(host, port));
|
|
4203
4230
|
resolve();
|
|
4204
4231
|
});
|
|
4205
4232
|
this.conn = c;
|
|
@@ -4443,6 +4470,9 @@ var __webpack_modules__ = {
|
|
|
4443
4470
|
getAddonInstallRefusalReason() {
|
|
4444
4471
|
return this.addonInstallRefusalReason || null;
|
|
4445
4472
|
}
|
|
4473
|
+
getDerivedExtensionId() {
|
|
4474
|
+
return this.derivedExtensionId;
|
|
4475
|
+
}
|
|
4446
4476
|
selectPrimaryAddonPath(compilation, candidateAddonPaths) {
|
|
4447
4477
|
const normalizedOutputPath = String(compilation?.options?.output?.path || '').replace(/\\/g, '/');
|
|
4448
4478
|
if (normalizedOutputPath) {
|
|
@@ -4478,15 +4508,15 @@ var __webpack_modules__ = {
|
|
|
4478
4508
|
} catch (error) {
|
|
4479
4509
|
if (isErrorWithCode('ECONNREFUSED', error)) {
|
|
4480
4510
|
lastError = error;
|
|
4481
|
-
if ((0, messaging._o)() && attempt % RETRY_LOG_EVERY_N_ATTEMPTS === 0)
|
|
4511
|
+
if ((0, messaging._o)() && attempt % RETRY_LOG_EVERY_N_ATTEMPTS === 0) (0, messaging._w)(messages.GB(this.options.browser, port, attempt, MAX_RETRIES));
|
|
4482
4512
|
await new Promise((resolve)=>setTimeout(resolve, RETRY_INTERVAL));
|
|
4483
4513
|
} else {
|
|
4484
4514
|
const err = error;
|
|
4485
|
-
|
|
4515
|
+
(0, messaging.Gg)(messages.dk(this.options.browser, err.stack || String(error)));
|
|
4486
4516
|
throw err;
|
|
4487
4517
|
}
|
|
4488
4518
|
}
|
|
4489
|
-
|
|
4519
|
+
(0, messaging.Gg)(messages.MS(this.options.browser, port));
|
|
4490
4520
|
throw lastError;
|
|
4491
4521
|
}
|
|
4492
4522
|
invalidateConnectionScopedCaches() {
|
|
@@ -4516,10 +4546,10 @@ var __webpack_modules__ = {
|
|
|
4516
4546
|
pollIntervalMs: 150,
|
|
4517
4547
|
stableReadsRequired: 2
|
|
4518
4548
|
});
|
|
4519
|
-
if (!ready && (0, messaging._o)())
|
|
4549
|
+
if (!ready && (0, messaging._o)()) (0, messaging.mR)(`[browser] Firefox add-on output did not fully settle before install: ${addonPath}`);
|
|
4520
4550
|
} catch {}
|
|
4521
4551
|
if ((0, messaging._o)()) try {
|
|
4522
|
-
|
|
4552
|
+
(0, messaging._w)('[browser] Firefox add-on paths:', candidateAddonPaths);
|
|
4523
4553
|
} catch {}
|
|
4524
4554
|
let primaryUserAddonId;
|
|
4525
4555
|
for (const [index, addonPath] of candidateAddonPaths.entries()){
|
|
@@ -4542,7 +4572,7 @@ var __webpack_modules__ = {
|
|
|
4542
4572
|
try {
|
|
4543
4573
|
if (!this.derivedExtensionId) {
|
|
4544
4574
|
this.derivedExtensionId = await deriveMozExtensionId(client);
|
|
4545
|
-
if ((0, messaging._o)() && !this.derivedExtensionId)
|
|
4575
|
+
if ((0, messaging._o)() && !this.derivedExtensionId) (0, messaging.mR)('[browser] Firefox: could not resolve a unique add-on id for the banner (install response had none; multiple or zero moz-extension targets).');
|
|
4546
4576
|
}
|
|
4547
4577
|
} catch {}
|
|
4548
4578
|
this.lastInstalledAddonPath = primaryAddonPath;
|
|
@@ -4602,6 +4632,9 @@ var __webpack_modules__ = {
|
|
|
4602
4632
|
getAddonInstallRefusalReason() {
|
|
4603
4633
|
return this.remote.getAddonInstallRefusalReason();
|
|
4604
4634
|
}
|
|
4635
|
+
getExtensionId() {
|
|
4636
|
+
return this.remote.getDerivedExtensionId();
|
|
4637
|
+
}
|
|
4605
4638
|
async enableUnifiedLogging(opts) {
|
|
4606
4639
|
await this.remote.enableUnifiedLogging(opts);
|
|
4607
4640
|
}
|
|
@@ -4637,7 +4670,7 @@ var __webpack_modules__ = {
|
|
|
4637
4670
|
if (controller.getAddonInstallRefusalReason()) break;
|
|
4638
4671
|
if ((0, messaging._o)()) try {
|
|
4639
4672
|
const msg = error?.message || String(error);
|
|
4640
|
-
|
|
4673
|
+
(0, messaging.mR)(`[browser] Firefox RDP setup retry ${i + 1}/${attempts}: ${msg}`);
|
|
4641
4674
|
} catch {}
|
|
4642
4675
|
const ms = baseMs * 2 ** i;
|
|
4643
4676
|
await new Promise((r)=>setTimeout(r, ms));
|
|
@@ -4734,9 +4767,9 @@ var __webpack_modules__ = {
|
|
|
4734
4767
|
class FirefoxLaunchPlugin {
|
|
4735
4768
|
async runOnce(compilation, options) {
|
|
4736
4769
|
if (!this.ctx.logger) this.ctx.logger = {
|
|
4737
|
-
info: (...a)=>
|
|
4738
|
-
warn: (...a)=>
|
|
4739
|
-
error: (...a)=>
|
|
4770
|
+
info: (...a)=>(0, messaging._w)(...a),
|
|
4771
|
+
warn: (...a)=>(0, messaging.mR)(...a),
|
|
4772
|
+
error: (...a)=>(0, messaging.Gg)(...a),
|
|
4740
4773
|
debug: (...a)=>console?.debug?.(...a)
|
|
4741
4774
|
};
|
|
4742
4775
|
await this.launch(compilation, options);
|
|
@@ -4746,9 +4779,9 @@ var __webpack_modules__ = {
|
|
|
4746
4779
|
apply(compiler) {
|
|
4747
4780
|
const host = compiler;
|
|
4748
4781
|
this.ctx.logger = 'function' == typeof host?.getInfrastructureLogger ? host.getInfrastructureLogger('FirefoxLaunchPlugin') : {
|
|
4749
|
-
info: (...a)=>
|
|
4750
|
-
warn: (...a)=>
|
|
4751
|
-
error: (...a)=>
|
|
4782
|
+
info: (...a)=>(0, messaging._w)(...a),
|
|
4783
|
+
warn: (...a)=>(0, messaging.mR)(...a),
|
|
4784
|
+
error: (...a)=>(0, messaging.Gg)(...a),
|
|
4752
4785
|
debug: (...a)=>console?.debug?.(...a)
|
|
4753
4786
|
};
|
|
4754
4787
|
host.hooks.done.tapAsync('run-firefox:launch', async (stats, done)=>{
|
|
@@ -4761,7 +4794,7 @@ var __webpack_modules__ = {
|
|
|
4761
4794
|
}
|
|
4762
4795
|
if (this.ctx.didLaunch) return void done();
|
|
4763
4796
|
await this.launch(stats.compilation, (0, runtime_options.zU)(this.host, stats.compilation.options.mode));
|
|
4764
|
-
if ('development' === stats.compilation.options.mode && !this.host.extensionLoadRefused)
|
|
4797
|
+
if ('development' === stats.compilation.options.mode && !this.host.extensionLoadRefused) (0, messaging._w)((0, ready_message.G)(stats.compilation.options.mode, this.host.browser));
|
|
4765
4798
|
this.ctx.didLaunch = true;
|
|
4766
4799
|
} catch (error) {
|
|
4767
4800
|
this.ctx.logger?.error?.(messages.MQ(error));
|
|
@@ -4796,7 +4829,7 @@ var __webpack_modules__ = {
|
|
|
4796
4829
|
}
|
|
4797
4830
|
};
|
|
4798
4831
|
const exitForLaunchFailure = (message)=>{
|
|
4799
|
-
if (message)
|
|
4832
|
+
if (message) (0, messaging.Gg)(message);
|
|
4800
4833
|
process.exit(1);
|
|
4801
4834
|
};
|
|
4802
4835
|
const getGeckoBinaryErrorMessage = ()=>this.host.geckoBinary ? messages.Dh(this.host.geckoBinary) : messages.jk();
|
|
@@ -4920,7 +4953,8 @@ var __webpack_modules__ = {
|
|
|
4920
4953
|
this.child = await this.spawnFirefoxChild(binary, args, wslFallbackBinary);
|
|
4921
4954
|
(0, ready_stamp.M)(this.extensionOutputPath, {
|
|
4922
4955
|
profilePath,
|
|
4923
|
-
browserPid: this.child?.pid
|
|
4956
|
+
browserPid: this.child?.pid,
|
|
4957
|
+
extensionId: this.extensionOutputPath ? (0, banner.MT)(this.extensionOutputPath) : void 0
|
|
4924
4958
|
});
|
|
4925
4959
|
this.child.on('close', ()=>{
|
|
4926
4960
|
(0, shared_utils.sW)(profilePath);
|
|
@@ -4944,6 +4978,7 @@ var __webpack_modules__ = {
|
|
|
4944
4978
|
this.host.rdpController = ctrl;
|
|
4945
4979
|
this.ctx.setController(ctrl);
|
|
4946
4980
|
(0, ready_stamp.__)(this.extensionOutputPath, debugPort);
|
|
4981
|
+
(0, ready_stamp.hg)(this.extensionOutputPath, ctrl.getExtensionId());
|
|
4947
4982
|
this.scheduleWatchTimeout();
|
|
4948
4983
|
try {
|
|
4949
4984
|
if ((0, messaging._o)()) {
|
|
@@ -4971,7 +5006,8 @@ var __webpack_modules__ = {
|
|
|
4971
5006
|
];
|
|
4972
5007
|
this.child = await this.spawnFirefoxChild(binaryPath, args, wslFallbackBinary);
|
|
4973
5008
|
(0, ready_stamp.M)(this.extensionOutputPath, {
|
|
4974
|
-
browserPid: this.child?.pid
|
|
5009
|
+
browserPid: this.child?.pid,
|
|
5010
|
+
extensionId: this.extensionOutputPath ? (0, banner.MT)(this.extensionOutputPath) : void 0
|
|
4975
5011
|
});
|
|
4976
5012
|
this.wireChildLifecycle();
|
|
4977
5013
|
if (debugPort > 0) (0, ready_stamp.__)(this.extensionOutputPath, debugPort);
|
|
@@ -5043,6 +5079,7 @@ var __webpack_modules__ = {
|
|
|
5043
5079
|
this.host.rdpController = ctrl;
|
|
5044
5080
|
this.ctx.setController(ctrl);
|
|
5045
5081
|
this.host.extensionLoadRefused = void 0;
|
|
5082
|
+
(0, ready_stamp.hg)(this.extensionOutputPath, ctrl.getExtensionId());
|
|
5046
5083
|
return {
|
|
5047
5084
|
status: 'loaded'
|
|
5048
5085
|
};
|
|
@@ -5058,7 +5095,7 @@ var __webpack_modules__ = {
|
|
|
5058
5095
|
}
|
|
5059
5096
|
reportAddonLoadRefused(reason) {
|
|
5060
5097
|
const refusedPath = this.extensionOutputPath || '';
|
|
5061
|
-
|
|
5098
|
+
(0, messaging.Gg)(messages.EE(refusedPath, reason));
|
|
5062
5099
|
this.host.logSink?.({
|
|
5063
5100
|
level: 'error',
|
|
5064
5101
|
text: `extension_load_refused: ${refusedPath}${reason ? ` - ${reason}` : ''}`,
|
|
@@ -5092,9 +5129,9 @@ var __webpack_modules__ = {
|
|
|
5092
5129
|
try {
|
|
5093
5130
|
const displayCacheDir = (0, output_binaries_resolver.LB)(compilation);
|
|
5094
5131
|
const pretty = messages.MG(this.host.browser || 'firefox', raw, displayCacheDir);
|
|
5095
|
-
|
|
5132
|
+
(0, messaging.Gg)(pretty);
|
|
5096
5133
|
} catch {
|
|
5097
|
-
|
|
5134
|
+
(0, messaging.Gg)(raw);
|
|
5098
5135
|
}
|
|
5099
5136
|
}
|
|
5100
5137
|
constructor(host, ctx){
|
|
@@ -5258,10 +5295,10 @@ var __webpack_modules__ = {
|
|
|
5258
5295
|
var messaging = __webpack_require__("./helpers/messaging.ts");
|
|
5259
5296
|
var messages = __webpack_require__("./browsers/browsers-lib/messages.ts");
|
|
5260
5297
|
function logSafariDryRun(converterCmd, xcodebuildCmd) {
|
|
5261
|
-
if ((0, messaging._o)())
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5298
|
+
if ((0, messaging._o)()) (0, messaging._w)(messages.KP());
|
|
5299
|
+
(0, messaging._w)(messages.yc());
|
|
5300
|
+
(0, messaging._w)(messages.fL(converterCmd));
|
|
5301
|
+
(0, messaging._w)(messages.Aj(xcodebuildCmd));
|
|
5265
5302
|
}
|
|
5266
5303
|
var safari_config = __webpack_require__("./browsers/run-safari/safari-launch/safari-config.ts");
|
|
5267
5304
|
function isMacOS() {
|
|
@@ -5323,9 +5360,9 @@ var __webpack_modules__ = {
|
|
|
5323
5360
|
}
|
|
5324
5361
|
function fallbackLogger() {
|
|
5325
5362
|
return {
|
|
5326
|
-
info: (...a)=>
|
|
5327
|
-
warn: (...a)=>
|
|
5328
|
-
error: (...a)=>
|
|
5363
|
+
info: (...a)=>(0, messaging._w)(...a),
|
|
5364
|
+
warn: (...a)=>(0, messaging.mR)(...a),
|
|
5365
|
+
error: (...a)=>(0, messaging.Gg)(...a),
|
|
5329
5366
|
debug: (...a)=>console?.debug?.(...a)
|
|
5330
5367
|
};
|
|
5331
5368
|
}
|
|
@@ -5426,6 +5463,7 @@ var __webpack_modules__ = {
|
|
|
5426
5463
|
const config = (0, safari_config.F7)(compilation, host);
|
|
5427
5464
|
const converterArgs = (0, safari_config.w7)(config);
|
|
5428
5465
|
const xcodebuildArgs = (0, safari_config.vx)(config);
|
|
5466
|
+
if ('full' === mode && config.bundleIdDerived) logger.warn?.(messages.$q(config.bundleIdentifier));
|
|
5429
5467
|
if (host.dryRun || isTestEnv()) {
|
|
5430
5468
|
logSafariDryRun(`xcrun ${converterArgs.join(' ')}`, `xcodebuild ${xcodebuildArgs.join(' ')}`);
|
|
5431
5469
|
return describePackage(config);
|
|
@@ -5483,7 +5521,6 @@ var __webpack_modules__ = {
|
|
|
5483
5521
|
return describePackage(config);
|
|
5484
5522
|
}
|
|
5485
5523
|
logger.info?.(messages.Rl(appPath));
|
|
5486
|
-
if (config.bundleIdDerived) logger.info?.(messages.$q(config.bundleIdentifier));
|
|
5487
5524
|
if (!config.open) {
|
|
5488
5525
|
logger.info?.(messages.aO(appPath, config.appName));
|
|
5489
5526
|
return describePackage(config);
|
|
@@ -5499,7 +5536,7 @@ var __webpack_modules__ = {
|
|
|
5499
5536
|
]);
|
|
5500
5537
|
logger.info?.(messages.fO(config.appName));
|
|
5501
5538
|
if (await confirmRegisteredWithSafari(config.bundleIdentifier)) logger.info?.(messages.fd(config.appName));
|
|
5502
|
-
else logger.
|
|
5539
|
+
else logger.info?.(messages.qY(config.appName));
|
|
5503
5540
|
return describePackage(config);
|
|
5504
5541
|
}
|
|
5505
5542
|
async function packageSafariExtension(host, outputPath, logger, mode = 'full') {
|
|
@@ -5761,6 +5798,24 @@ var __webpack_modules__ = {
|
|
|
5761
5798
|
if ('debug' === type) return pintor__rspack_import_0_default().dim(pintor__rspack_import_0_default().gray(DEBUG_GLYPH));
|
|
5762
5799
|
return pintor__rspack_import_0_default().gray(GLYPH);
|
|
5763
5800
|
}
|
|
5801
|
+
const MACHINE_OUTPUT_VALUES = new Set([
|
|
5802
|
+
'json',
|
|
5803
|
+
'ndjson'
|
|
5804
|
+
]);
|
|
5805
|
+
function isMachineOutput() {
|
|
5806
|
+
return MACHINE_OUTPUT_VALUES.has(String(process.env.EXTENSION_OUTPUT || '').trim().toLowerCase());
|
|
5807
|
+
}
|
|
5808
|
+
function humanLine(...parts) {
|
|
5809
|
+
if (isMachineOutput()) return;
|
|
5810
|
+
console.log(...parts);
|
|
5811
|
+
}
|
|
5812
|
+
function humanWarn(...parts) {
|
|
5813
|
+
if (isMachineOutput()) return;
|
|
5814
|
+
console.warn(...parts);
|
|
5815
|
+
}
|
|
5816
|
+
function humanError(...parts) {
|
|
5817
|
+
console.error(...parts);
|
|
5818
|
+
}
|
|
5764
5819
|
const CARD_LABEL_WIDTH = 15;
|
|
5765
5820
|
function card(input = {}) {
|
|
5766
5821
|
const version = String(input.version || '').trim();
|
|
@@ -5811,11 +5866,14 @@ var __webpack_modules__ = {
|
|
|
5811
5866
|
}
|
|
5812
5867
|
__webpack_require__.d(__webpack_exports__, {
|
|
5813
5868
|
A6: ()=>browserRowValue,
|
|
5869
|
+
Gg: ()=>humanError,
|
|
5814
5870
|
Nr: ()=>card,
|
|
5815
5871
|
Pl: ()=>prefix,
|
|
5816
5872
|
T_: ()=>artifactNoun,
|
|
5817
5873
|
VR: ()=>isCardKeyClaimed,
|
|
5818
5874
|
_o: ()=>isDebug,
|
|
5875
|
+
_w: ()=>humanLine,
|
|
5876
|
+
mR: ()=>humanWarn,
|
|
5819
5877
|
od: ()=>claimCardKey
|
|
5820
5878
|
});
|
|
5821
5879
|
},
|