extension 4.1.28 → 4.1.29

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/browsers.cjs CHANGED
@@ -283,6 +283,12 @@ var __webpack_modules__ = {
283
283
  'yandex',
284
284
  'chromium-based'
285
285
  ]);
286
+ const SYSTEM_LOCATED_CHROMIUM_FORKS = new Set([
287
+ 'brave',
288
+ 'opera',
289
+ 'vivaldi',
290
+ 'yandex'
291
+ ]);
286
292
  const FIREFOX_BROWSERS = new Set([
287
293
  'firefox',
288
294
  'waterfox',
@@ -295,6 +301,9 @@ var __webpack_modules__ = {
295
301
  function isChromiumBrowser(browser) {
296
302
  return CHROMIUM_BROWSERS.has(String(browser));
297
303
  }
304
+ function isSystemLocatedChromiumFork(browser) {
305
+ return SYSTEM_LOCATED_CHROMIUM_FORKS.has(String(browser));
306
+ }
298
307
  function isFirefoxBrowser(browser) {
299
308
  return FIREFOX_BROWSERS.has(String(browser));
300
309
  }
@@ -306,6 +315,7 @@ var __webpack_modules__ = {
306
315
  }
307
316
  __webpack_require__.d(__webpack_exports__, {
308
317
  M_: ()=>isFirefoxBrowser,
318
+ cA: ()=>isSystemLocatedChromiumFork,
309
319
  eP: ()=>isEmulatorBrowser,
310
320
  rG: ()=>isChromiumBrowser
311
321
  });
@@ -572,6 +582,10 @@ var __webpack_modules__ = {
572
582
  const steps = String(guidance || '').split('\n').map((line)=>line.trimEnd()).filter((line)=>line && !/^We couldn't find/i.test(line)).filter((line)=>!/^Re-run your command/i.test(line)).join('\n');
573
583
  return `${getLoggingPrefix('error')} ${capitalizedBrowserName(browser)} isn't installed.\n${steps}\nOr point at a binary with ${pintor__rspack_import_8_default().blue('--gecko-binary')} ${pintor__rspack_import_8_default().gray('<path>')}, or choose another browser with ${pintor__rspack_import_8_default().blue('--browser')} ${pintor__rspack_import_8_default().gray('<firefox|waterfox|librewolf|zen|floorp>')}.`;
574
584
  }
585
+ function chromiumForkNotInstalled(browser, guidance) {
586
+ const steps = String(guidance || '').split('\n').map((line)=>line.trimEnd()).filter((line)=>line && !/^We couldn't find/i.test(line)).filter((line)=>!/^Re-run your command/i.test(line)).join('\n');
587
+ return `${getLoggingPrefix('error')} ${capitalizedBrowserName(browser)} isn't installed.\n${steps}\nOr point at a binary with ${pintor__rspack_import_8_default().blue('--chromium-binary')} ${pintor__rspack_import_8_default().gray('<path>')}, or choose another browser with ${pintor__rspack_import_8_default().blue('--browser')} ${pintor__rspack_import_8_default().gray('<chrome|chromium|edge|brave|opera|vivaldi|yandex>')}.`;
588
+ }
575
589
  function usingManagedChromiumFamilyFallback(requestedBrowser, _fallbackBrowser, _binaryPath) {
576
590
  return `${getLoggingPrefix('warn')} ${managedBrowserDisplayName(requestedBrowser)} isn't installed.\nRun ${pintor__rspack_import_8_default().blue(`npx extension install ${requestedBrowser}`)} to use ${managedBrowserDisplayName(requestedBrowser)} itself.`;
577
591
  }
@@ -1018,6 +1032,7 @@ var __webpack_modules__ = {
1018
1032
  Gq: ()=>locatingBrowser,
1019
1033
  H1: ()=>safariRegenerationDiscards,
1020
1034
  HH: ()=>messageWithoutSenderError,
1035
+ I5: ()=>chromiumForkNotInstalled,
1021
1036
  Ih: ()=>browserNotInstalledError,
1022
1037
  JB: ()=>devChannelSnapshotInUse,
1023
1038
  KP: ()=>safariBuildCalled,
@@ -2465,6 +2480,7 @@ var __webpack_modules__ = {
2465
2480
  var external_yandex_location_default = /*#__PURE__*/ __webpack_require__.n(external_yandex_location_namespaceObject);
2466
2481
  var messaging = __webpack_require__("./helpers/messaging.ts");
2467
2482
  var banner = __webpack_require__("./browsers/browsers-lib/banner.ts");
2483
+ var browser_family = __webpack_require__("./browsers/browsers-lib/browser-family.ts");
2468
2484
  const external_node_readline_namespaceObject = require("node:readline");
2469
2485
  var external_node_readline_default = /*#__PURE__*/ __webpack_require__.n(external_node_readline_namespaceObject);
2470
2486
  var browser_install_outcome = __webpack_require__("./helpers/browser-install-outcome.ts");
@@ -3012,6 +3028,27 @@ var __webpack_modules__ = {
3012
3028
  (0, messaging._w)(messages.E8(chromiumConfig.join(' ')));
3013
3029
  }
3014
3030
  var extension_output_path = __webpack_require__("./browsers/run-chromium/chromium-launch/extension-output-path.ts");
3031
+ function chromiumForkInstallGuidance(browser) {
3032
+ const read = (fn)=>{
3033
+ try {
3034
+ return fn();
3035
+ } catch {
3036
+ return '';
3037
+ }
3038
+ };
3039
+ switch(browser){
3040
+ case 'brave':
3041
+ return read(()=>(0, external_brave_location_namespaceObject.getInstallGuidance)());
3042
+ case 'opera':
3043
+ return read(()=>(0, external_opera_location2_namespaceObject.getInstallGuidance)());
3044
+ case 'vivaldi':
3045
+ return read(()=>(0, external_vivaldi_location2_namespaceObject.getInstallGuidance)());
3046
+ case 'yandex':
3047
+ return read(()=>(0, external_yandex_location_namespaceObject.getInstallGuidance)());
3048
+ default:
3049
+ return null;
3050
+ }
3051
+ }
3015
3052
  const activeInstances = new Set();
3016
3053
  let globalHandlersInstalled = false;
3017
3054
  function cleanupOne(instance) {
@@ -3293,6 +3330,7 @@ var __webpack_modules__ = {
3293
3330
  };
3294
3331
  const isUsableBinary = (p)=>Boolean(p && external_node_fs_.existsSync(p));
3295
3332
  const resolveManagedBinary = ()=>{
3333
+ if ((0, browser_family.cA)(browser)) return null;
3296
3334
  try {
3297
3335
  const resolved = output_binaries_resolver.kI(compilation, 'chromium' === browser || 'chromium-based' === browser ? 'chromium' : 'edge' === browser ? 'edge' : 'chrome');
3298
3336
  const normalized = normalizePath(resolved || null);
@@ -3567,7 +3605,10 @@ var __webpack_modules__ = {
3567
3605
  }
3568
3606
  if (!browserBinaryLocation || !external_node_fs_.existsSync(browserBinaryLocation)) {
3569
3607
  if ('chromium' === browser || 'chromium-based' === browser) printInstallGuidance(getInstallGuidanceText('chromium'), 'chromium');
3570
- if (!printedGuidance && 'chromium' !== browser && 'chromium-based' !== browser) this.logger.error(messages.Ih(browser, browserBinaryLocation || ''));
3608
+ if (!printedGuidance && 'chromium' !== browser && 'chromium-based' !== browser) {
3609
+ const forkGuidance = chromiumForkInstallGuidance(browser);
3610
+ this.logger.error(null !== forkGuidance ? messages.I5(browser, forkGuidance) : messages.Ih(browser, browserBinaryLocation || ''));
3611
+ }
3571
3612
  if (process.env.VITEST || process.env.VITEST_WORKER_ID) throw new Error('Browser not installed or binary path not found');
3572
3613
  process.exit(1);
3573
3614
  }
@@ -4293,9 +4334,25 @@ var __webpack_modules__ = {
4293
4334
  'security.enterprise_roots.enabled': true,
4294
4335
  'xpinstall.signatures.required': false
4295
4336
  };
4296
- function getPreferences(customPrefs) {
4337
+ const forkPreferences = {
4338
+ zen: {
4339
+ 'zen.welcome-screen.seen': true,
4340
+ 'zen.updates.show-update-notification': false
4341
+ },
4342
+ floorp: {
4343
+ 'floorp.browser.welcome.page.shown': true,
4344
+ 'floorp.releaseNotes.mode': 'disabled',
4345
+ 'floorp.releaseNotes.choiceConfirmed': true,
4346
+ 'floorp.releaseNotes.promptShown': true
4347
+ }
4348
+ };
4349
+ function getForkPreferences(browser) {
4350
+ return forkPreferences[String(browser || '')] || {};
4351
+ }
4352
+ function getPreferences(customPrefs, browser) {
4297
4353
  return {
4298
4354
  ...masterPreferences,
4355
+ ...getForkPreferences(browser),
4299
4356
  ...customPrefs
4300
4357
  };
4301
4358
  }
@@ -4354,7 +4411,7 @@ var __webpack_modules__ = {
4354
4411
  } catch {}
4355
4412
  }
4356
4413
  if (profilePath && provision) try {
4357
- const prefs = getPreferences(configOptions?.preferences || {});
4414
+ const prefs = getPreferences(configOptions?.preferences || {}, String(browser));
4358
4415
  function serializeValue(value) {
4359
4416
  if ('string' == typeof value) return JSON.stringify(value);
4360
4417
  if ('boolean' == typeof value) return String(value);
@@ -5843,6 +5900,8 @@ var __webpack_modules__ = {
5843
5900
  (0, ready_stamp.M)(this.extensionOutputPath, {
5844
5901
  profilePath,
5845
5902
  browserPid: this.child?.pid,
5903
+ binary: this.child?.spawnfile || binary,
5904
+ binaryProvenance: this.host.launchBinaryProvenance,
5846
5905
  extensionId: this.extensionOutputPath ? (0, banner.MT)(this.extensionOutputPath) : void 0
5847
5906
  });
5848
5907
  this.wireChildLifecycle();
@@ -5879,6 +5938,8 @@ var __webpack_modules__ = {
5879
5938
  this.child = await this.spawnFirefoxChild(plan.binary, plan.args, wslFallbackBinary);
5880
5939
  (0, ready_stamp.M)(this.extensionOutputPath, {
5881
5940
  browserPid: this.child?.pid,
5941
+ binary: this.child?.spawnfile || plan.binary,
5942
+ binaryProvenance: this.host.launchBinaryProvenance,
5882
5943
  extensionId: this.extensionOutputPath ? (0, banner.MT)(this.extensionOutputPath) : void 0
5883
5944
  });
5884
5945
  this.wireChildLifecycle();
@@ -7029,7 +7090,7 @@ var __webpack_modules__ = {
7029
7090
  const display = browserDisplayName(browser);
7030
7091
  const line = String(versionLine || '').trim();
7031
7092
  if (!line) return display;
7032
- if (!/[a-zA-Z]/.test(line)) return `${display} ${line}`;
7093
+ if (/^v?\d+(?:\.\d+)*(?:[a-z]+\d*)?$/i.test(line)) return `${display} ${line}`;
7033
7094
  return line.charAt(0).toUpperCase() + line.slice(1);
7034
7095
  }
7035
7096
  const CARD_KEYS_ENV = 'EXTENSION_CLI_CARD_KEYS';
package/dist/cli.cjs CHANGED
@@ -284,6 +284,12 @@ var __webpack_modules__ = {
284
284
  'yandex',
285
285
  'chromium-based'
286
286
  ]);
287
+ const SYSTEM_LOCATED_CHROMIUM_FORKS = new Set([
288
+ 'brave',
289
+ 'opera',
290
+ 'vivaldi',
291
+ 'yandex'
292
+ ]);
287
293
  const FIREFOX_BROWSERS = new Set([
288
294
  'firefox',
289
295
  'waterfox',
@@ -296,6 +302,9 @@ var __webpack_modules__ = {
296
302
  function isChromiumBrowser(browser) {
297
303
  return CHROMIUM_BROWSERS.has(String(browser));
298
304
  }
305
+ function isSystemLocatedChromiumFork(browser) {
306
+ return SYSTEM_LOCATED_CHROMIUM_FORKS.has(String(browser));
307
+ }
299
308
  function isFirefoxBrowser(browser) {
300
309
  return FIREFOX_BROWSERS.has(String(browser));
301
310
  }
@@ -307,6 +316,7 @@ var __webpack_modules__ = {
307
316
  }
308
317
  __webpack_require__.d(__webpack_exports__, {
309
318
  M_: ()=>isFirefoxBrowser,
319
+ cA: ()=>isSystemLocatedChromiumFork,
310
320
  eP: ()=>isEmulatorBrowser,
311
321
  rG: ()=>isChromiumBrowser
312
322
  });
@@ -573,6 +583,10 @@ var __webpack_modules__ = {
573
583
  const steps = String(guidance || '').split('\n').map((line)=>line.trimEnd()).filter((line)=>line && !/^We couldn't find/i.test(line)).filter((line)=>!/^Re-run your command/i.test(line)).join('\n');
574
584
  return `${getLoggingPrefix('error')} ${capitalizedBrowserName(browser)} isn't installed.\n${steps}\nOr point at a binary with ${pintor__rspack_import_8_default().blue('--gecko-binary')} ${pintor__rspack_import_8_default().gray('<path>')}, or choose another browser with ${pintor__rspack_import_8_default().blue('--browser')} ${pintor__rspack_import_8_default().gray('<firefox|waterfox|librewolf|zen|floorp>')}.`;
575
585
  }
586
+ function chromiumForkNotInstalled(browser, guidance) {
587
+ const steps = String(guidance || '').split('\n').map((line)=>line.trimEnd()).filter((line)=>line && !/^We couldn't find/i.test(line)).filter((line)=>!/^Re-run your command/i.test(line)).join('\n');
588
+ return `${getLoggingPrefix('error')} ${capitalizedBrowserName(browser)} isn't installed.\n${steps}\nOr point at a binary with ${pintor__rspack_import_8_default().blue('--chromium-binary')} ${pintor__rspack_import_8_default().gray('<path>')}, or choose another browser with ${pintor__rspack_import_8_default().blue('--browser')} ${pintor__rspack_import_8_default().gray('<chrome|chromium|edge|brave|opera|vivaldi|yandex>')}.`;
589
+ }
576
590
  function usingManagedChromiumFamilyFallback(requestedBrowser, _fallbackBrowser, _binaryPath) {
577
591
  return `${getLoggingPrefix('warn')} ${managedBrowserDisplayName(requestedBrowser)} isn't installed.\nRun ${pintor__rspack_import_8_default().blue(`npx extension install ${requestedBrowser}`)} to use ${managedBrowserDisplayName(requestedBrowser)} itself.`;
578
592
  }
@@ -1019,6 +1033,7 @@ var __webpack_modules__ = {
1019
1033
  Gq: ()=>locatingBrowser,
1020
1034
  H1: ()=>safariRegenerationDiscards,
1021
1035
  HH: ()=>messageWithoutSenderError,
1036
+ I5: ()=>chromiumForkNotInstalled,
1022
1037
  Ih: ()=>browserNotInstalledError,
1023
1038
  JB: ()=>devChannelSnapshotInUse,
1024
1039
  KP: ()=>safariBuildCalled,
@@ -2456,6 +2471,7 @@ var __webpack_modules__ = {
2456
2471
  var external_yandex_location_default = /*#__PURE__*/ __webpack_require__.n(external_yandex_location_namespaceObject);
2457
2472
  var messaging = __webpack_require__("./helpers/messaging.ts");
2458
2473
  var banner = __webpack_require__("./browsers/browsers-lib/banner.ts");
2474
+ var browser_family = __webpack_require__("./browsers/browsers-lib/browser-family.ts");
2459
2475
  const external_node_readline_namespaceObject = require("node:readline");
2460
2476
  var external_node_readline_default = /*#__PURE__*/ __webpack_require__.n(external_node_readline_namespaceObject);
2461
2477
  var browser_install_outcome = __webpack_require__("./helpers/browser-install-outcome.ts");
@@ -3003,6 +3019,27 @@ var __webpack_modules__ = {
3003
3019
  (0, messaging._w)(messages.E8(chromiumConfig.join(' ')));
3004
3020
  }
3005
3021
  var extension_output_path = __webpack_require__("./browsers/run-chromium/chromium-launch/extension-output-path.ts");
3022
+ function chromiumForkInstallGuidance(browser) {
3023
+ const read = (fn)=>{
3024
+ try {
3025
+ return fn();
3026
+ } catch {
3027
+ return '';
3028
+ }
3029
+ };
3030
+ switch(browser){
3031
+ case 'brave':
3032
+ return read(()=>(0, external_brave_location_namespaceObject.getInstallGuidance)());
3033
+ case 'opera':
3034
+ return read(()=>(0, external_opera_location2_namespaceObject.getInstallGuidance)());
3035
+ case 'vivaldi':
3036
+ return read(()=>(0, external_vivaldi_location2_namespaceObject.getInstallGuidance)());
3037
+ case 'yandex':
3038
+ return read(()=>(0, external_yandex_location_namespaceObject.getInstallGuidance)());
3039
+ default:
3040
+ return null;
3041
+ }
3042
+ }
3006
3043
  const activeInstances = new Set();
3007
3044
  let globalHandlersInstalled = false;
3008
3045
  function cleanupOne(instance) {
@@ -3284,6 +3321,7 @@ var __webpack_modules__ = {
3284
3321
  };
3285
3322
  const isUsableBinary = (p)=>Boolean(p && external_node_fs_.existsSync(p));
3286
3323
  const resolveManagedBinary = ()=>{
3324
+ if ((0, browser_family.cA)(browser)) return null;
3287
3325
  try {
3288
3326
  const resolved = output_binaries_resolver.kI(compilation, 'chromium' === browser || 'chromium-based' === browser ? 'chromium' : 'edge' === browser ? 'edge' : 'chrome');
3289
3327
  const normalized = normalizePath(resolved || null);
@@ -3558,7 +3596,10 @@ var __webpack_modules__ = {
3558
3596
  }
3559
3597
  if (!browserBinaryLocation || !external_node_fs_.existsSync(browserBinaryLocation)) {
3560
3598
  if ('chromium' === browser || 'chromium-based' === browser) printInstallGuidance(getInstallGuidanceText('chromium'), 'chromium');
3561
- if (!printedGuidance && 'chromium' !== browser && 'chromium-based' !== browser) this.logger.error(messages.Ih(browser, browserBinaryLocation || ''));
3599
+ if (!printedGuidance && 'chromium' !== browser && 'chromium-based' !== browser) {
3600
+ const forkGuidance = chromiumForkInstallGuidance(browser);
3601
+ this.logger.error(null !== forkGuidance ? messages.I5(browser, forkGuidance) : messages.Ih(browser, browserBinaryLocation || ''));
3602
+ }
3562
3603
  if (process.env.VITEST || process.env.VITEST_WORKER_ID) throw new Error('Browser not installed or binary path not found');
3563
3604
  process.exit(1);
3564
3605
  }
@@ -4284,9 +4325,25 @@ var __webpack_modules__ = {
4284
4325
  'security.enterprise_roots.enabled': true,
4285
4326
  'xpinstall.signatures.required': false
4286
4327
  };
4287
- function getPreferences(customPrefs) {
4328
+ const forkPreferences = {
4329
+ zen: {
4330
+ 'zen.welcome-screen.seen': true,
4331
+ 'zen.updates.show-update-notification': false
4332
+ },
4333
+ floorp: {
4334
+ 'floorp.browser.welcome.page.shown': true,
4335
+ 'floorp.releaseNotes.mode': 'disabled',
4336
+ 'floorp.releaseNotes.choiceConfirmed': true,
4337
+ 'floorp.releaseNotes.promptShown': true
4338
+ }
4339
+ };
4340
+ function getForkPreferences(browser) {
4341
+ return forkPreferences[String(browser || '')] || {};
4342
+ }
4343
+ function getPreferences(customPrefs, browser) {
4288
4344
  return {
4289
4345
  ...masterPreferences,
4346
+ ...getForkPreferences(browser),
4290
4347
  ...customPrefs
4291
4348
  };
4292
4349
  }
@@ -4345,7 +4402,7 @@ var __webpack_modules__ = {
4345
4402
  } catch {}
4346
4403
  }
4347
4404
  if (profilePath && provision) try {
4348
- const prefs = getPreferences(configOptions?.preferences || {});
4405
+ const prefs = getPreferences(configOptions?.preferences || {}, String(browser));
4349
4406
  function serializeValue(value) {
4350
4407
  if ('string' == typeof value) return JSON.stringify(value);
4351
4408
  if ('boolean' == typeof value) return String(value);
@@ -5834,6 +5891,8 @@ var __webpack_modules__ = {
5834
5891
  (0, ready_stamp.M)(this.extensionOutputPath, {
5835
5892
  profilePath,
5836
5893
  browserPid: this.child?.pid,
5894
+ binary: this.child?.spawnfile || binary,
5895
+ binaryProvenance: this.host.launchBinaryProvenance,
5837
5896
  extensionId: this.extensionOutputPath ? (0, banner.MT)(this.extensionOutputPath) : void 0
5838
5897
  });
5839
5898
  this.wireChildLifecycle();
@@ -5870,6 +5929,8 @@ var __webpack_modules__ = {
5870
5929
  this.child = await this.spawnFirefoxChild(plan.binary, plan.args, wslFallbackBinary);
5871
5930
  (0, ready_stamp.M)(this.extensionOutputPath, {
5872
5931
  browserPid: this.child?.pid,
5932
+ binary: this.child?.spawnfile || plan.binary,
5933
+ binaryProvenance: this.host.launchBinaryProvenance,
5873
5934
  extensionId: this.extensionOutputPath ? (0, banner.MT)(this.extensionOutputPath) : void 0
5874
5935
  });
5875
5936
  this.wireChildLifecycle();
@@ -7073,7 +7134,7 @@ var __webpack_modules__ = {
7073
7134
  const display = browserDisplayName(browser);
7074
7135
  const line = String(versionLine || '').trim();
7075
7136
  if (!line) return display;
7076
- if (!/[a-zA-Z]/.test(line)) return `${display} ${line}`;
7137
+ if (/^v?\d+(?:\.\d+)*(?:[a-z]+\d*)?$/i.test(line)) return `${display} ${line}`;
7077
7138
  return line.charAt(0).toUpperCase() + line.slice(1);
7078
7139
  }
7079
7140
  const CARD_KEYS_ENV = 'EXTENSION_CLI_CARD_KEYS';
@@ -8164,6 +8225,7 @@ var __webpack_modules__ = {
8164
8225
  'inspect',
8165
8226
  'install',
8166
8227
  'logs',
8228
+ 'navigate',
8167
8229
  'open',
8168
8230
  'preview',
8169
8231
  'publish',
@@ -8625,6 +8687,21 @@ var __webpack_modules__ = {
8625
8687
  description: 'Open an extension surface: popup, options, sidebar, action, or command (requires --allow-control)',
8626
8688
  supportsSourceInspection: false
8627
8689
  },
8690
+ {
8691
+ name: 'navigate',
8692
+ positionals: [
8693
+ {
8694
+ name: 'url',
8695
+ required: true
8696
+ },
8697
+ {
8698
+ name: 'project-path',
8699
+ required: false
8700
+ }
8701
+ ],
8702
+ description: 'Open a url in a tab through the extension: the active tab, --tab <id>, or a new tab with --new-tab (requires --allow-control). A static tabs call, so it works where an MV3 background refuses eval',
8703
+ supportsSourceInspection: false
8704
+ },
8628
8705
  {
8629
8706
  name: 'inspect',
8630
8707
  positionals: [
@@ -9237,6 +9314,18 @@ Cross-browser compatibility
9237
9314
  remedy
9238
9315
  ].filter(Boolean).join('\n');
9239
9316
  }
9317
+ function navigateFailed(url, reason, engine, remedy) {
9318
+ const engineNote = engine ? messages_arg(` (engine ${engine})`) : '';
9319
+ return [
9320
+ `${getLoggingPrefix('error')} Can't navigate a tab to ${messaging.Sc.val(url)}`,
9321
+ `${messaging.Sc.label('REASON')} ${messaging.Sc.val(reason)}${engineNote}`,
9322
+ remedy
9323
+ ].filter(Boolean).join('\n');
9324
+ }
9325
+ function navigatedTab(url, tabId, created) {
9326
+ const where = null == tabId ? 'a tab' : `${created ? 'new ' : ''}tab ${messaging.Sc.val(String(tabId))}`;
9327
+ return `${getLoggingPrefix('success')} Navigated ${where} to ${messaging.Sc.val(url)}`;
9328
+ }
9240
9329
  function openSurfaceGestureStep(surface) {
9241
9330
  return `Click the extension's toolbar entry, or its row in the extensions menu, to open the ${openSurfaceNoun(surface)}.`;
9242
9331
  }
@@ -9703,6 +9792,14 @@ Cross-browser compatibility
9703
9792
  hint: openSurfaceGestureStep(surface)
9704
9793
  };
9705
9794
  }
9795
+ function navigateResultLines(value) {
9796
+ if (!value || 'object' != typeof value) return;
9797
+ const reply = value;
9798
+ if ('string' != typeof reply.url) return;
9799
+ return [
9800
+ navigatedTab(reply.url, 'number' == typeof reply.tabId ? reply.tabId : null, true === reply.created)
9801
+ ];
9802
+ }
9706
9803
  function openResultLines(value) {
9707
9804
  if (!value || 'object' != typeof value) return;
9708
9805
  const reply = value;
@@ -9938,6 +10035,34 @@ Cross-browser compatibility
9938
10035
  } : void 0
9939
10036
  });
9940
10037
  });
10038
+ commonOptions(program.command('navigate').arguments('<url> [project-path]').description('Open a url in a tab through the extension: the active tab, --tab <id>, or a new tab with --new-tab (requires --allow-control). A static tabs call, so it works where an MV3 background refuses eval').option('--tab <id>', 'the tab to navigate (default: the active tab)').option('--new-tab', 'open the url in a new tab instead of the active one').option('--background', 'with --new-tab: open it without activating it')).action(async (url, projectPathArg, opts)=>{
10039
+ if (!/^[a-z][a-z0-9+.-]*:/i.test(url)) fail(`navigate needs an absolute url (got ${url})`, {
10040
+ command: 'navigate',
10041
+ code: messaging.Lp.E_ARGS,
10042
+ output: opts.output
10043
+ });
10044
+ const target = {
10045
+ context: 'background'
10046
+ };
10047
+ if (opts.tab) target.tabId = Number(opts.tab);
10048
+ const args = {
10049
+ url
10050
+ };
10051
+ if (opts.newTab) args.newTab = true;
10052
+ if (opts.newTab && opts.background) args.active = false;
10053
+ await runCommand({
10054
+ projectPathArg,
10055
+ command: 'navigate',
10056
+ op: 'tabs.navigate',
10057
+ target,
10058
+ args,
10059
+ opts,
10060
+ pretty: {
10061
+ value: navigateResultLines,
10062
+ failure: (error)=>navigateFailed(url, error.message, error.engine, error.hint)
10063
+ }
10064
+ });
10065
+ });
9941
10066
  commonOptions(program.command('open').arguments('<surface> [project-path]').description('Open an extension surface: popup, options, sidebar, action, or command (requires --allow-control)').option('--name <command>', 'with `open command`: the chrome.commands name to trigger')).action(async (surface, projectPathArg, opts)=>{
9942
10067
  const allowed = [
9943
10068
  'popup',
@@ -1,7 +1,9 @@
1
1
  import type { BrowserType } from '../browsers-types.js';
2
2
  export declare const CHROMIUM_BROWSERS: ReadonlySet<string>;
3
+ export declare const SYSTEM_LOCATED_CHROMIUM_FORKS: ReadonlySet<string>;
3
4
  export declare const FIREFOX_BROWSERS: ReadonlySet<string>;
4
5
  export declare function isChromiumBrowser(browser: BrowserType | string): boolean;
6
+ export declare function isSystemLocatedChromiumFork(browser: BrowserType | string): boolean;
5
7
  export declare function isFirefoxBrowser(browser: BrowserType | string): boolean;
6
8
  export declare const EMULATOR_BROWSERS: ReadonlySet<string>;
7
9
  export declare function isEmulatorBrowser(browser: BrowserType | string): boolean;
@@ -12,6 +12,7 @@ export declare function firefoxRdpRuntimeCapabilitySummary(state: 'available' |
12
12
  export declare function skippingBrowserLaunchDueToCompileErrors(): string;
13
13
  export declare function browserNotInstalledError(browser: Browser, browserBinaryLocation: string): string;
14
14
  export declare function geckoForkNotInstalled(browser: Browser, guidance: string): string;
15
+ export declare function chromiumForkNotInstalled(browser: Browser, guidance: string): string;
15
16
  export declare function usingManagedChromiumFamilyFallback(requestedBrowser: Browser, _fallbackBrowser: Browser, _binaryPath: string): string;
16
17
  export declare function preferringSystemBrowserOverSnapshot(_systemBinary: string, _snapshotBinary: string): string;
17
18
  export declare function mv2NotSupportedByChromium(extensionPath: string): string;
@@ -0,0 +1 @@
1
+ export declare function chromiumForkInstallGuidance(browser: unknown): string | null;
@@ -67,7 +67,8 @@ declare const masterPreferences: {
67
67
  'xpinstall.signatures.required': boolean;
68
68
  };
69
69
  export default masterPreferences;
70
- export declare function getPreferences(customPrefs: Record<string, unknown>): {
70
+ export declare function getForkPreferences(browser?: string): Record<string, unknown>;
71
+ export declare function getPreferences(customPrefs: Record<string, unknown>, browser?: string): {
71
72
  'browser.aboutwelcome.enabled': boolean;
72
73
  'browser.startup.homepage_override.mstone': string;
73
74
  'browser.shell.didSkipDefaultBrowserCheckOnFirstRun': boolean;
@@ -113,6 +113,17 @@ declare const COMMAND_TABLE: readonly [{
113
113
  }];
114
114
  readonly description: 'Open an extension surface: popup, options, sidebar, action, or command (requires --allow-control)';
115
115
  readonly supportsSourceInspection: false;
116
+ }, {
117
+ readonly name: 'navigate';
118
+ readonly positionals: readonly [{
119
+ readonly name: 'url';
120
+ readonly required: true;
121
+ }, {
122
+ readonly name: 'project-path';
123
+ readonly required: false;
124
+ }];
125
+ readonly description: 'Open a url in a tab through the extension: the active tab, --tab <id>, or a new tab with --new-tab (requires --allow-control). A static tabs call, so it works where an MV3 background refuses eval';
126
+ readonly supportsSourceInspection: false;
116
127
  }, {
117
128
  readonly name: 'inspect';
118
129
  readonly positionals: readonly [{
@@ -286,6 +297,8 @@ export declare function replayedActionClick(listeners: number): string;
286
297
  export declare function replayedCommand(listeners: number, command?: string): string;
287
298
  export declare function openSurfaceWarning(warning: string): string;
288
299
  export declare function openSurfaceFailed(surface: string, reason: string, engine?: string, remedy?: string): string;
300
+ export declare function navigateFailed(url: string, reason: string, engine?: string, remedy?: string): string;
301
+ export declare function navigatedTab(url: string, tabId: number | null, created: boolean): string;
289
302
  export declare function openSurfaceGestureStep(surface: string): string;
290
303
  export declare function openSurfaceNeedsGesturePlain(surface: string): string;
291
304
  export declare function openSurfaceNeedsGesture(surface: string): string;
@@ -1,5 +1,5 @@
1
1
  import { Telemetry, type TelemetrySource } from './telemetry.js';
2
- type KnownCommand = 'build' | 'capabilities' | 'create' | 'dev' | 'doctor' | 'eval' | 'inspect' | 'install' | 'logs' | 'open' | 'preview' | 'publish' | 'reload' | 'start' | 'storage' | 'telemetry' | 'uninstall' | 'unknown';
2
+ type KnownCommand = 'build' | 'capabilities' | 'create' | 'dev' | 'doctor' | 'eval' | 'inspect' | 'install' | 'logs' | 'navigate' | 'open' | 'preview' | 'publish' | 'reload' | 'start' | 'storage' | 'telemetry' | 'uninstall' | 'unknown';
3
3
  export declare const KNOWN_COMMANDS: ReadonlySet<KnownCommand>;
4
4
  export declare function detectInvokedCommand(argv: string[]): KnownCommand;
5
5
  export declare function advertisedTemplateName(value: string | undefined): string | undefined;
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "extension": "./bin/extension.cjs"
39
39
  },
40
40
  "name": "extension",
41
- "version": "4.1.28",
41
+ "version": "4.1.29",
42
42
  "description": "The cross-browser extension framework. Build Chrome, Edge, Firefox, and Safari extensions with no build configuration.",
43
43
  "homepage": "https://extension.js.org/",
44
44
  "funding": "https://github.com/sponsors/cezaraugusto",
@@ -104,10 +104,10 @@
104
104
  "chromium-location": "2.1.2",
105
105
  "commander": "^15.0.0",
106
106
  "edge-location": "2.3.1",
107
- "extension-create": "4.1.28",
108
- "extension-develop": "4.1.28",
109
- "extension-install": "4.1.28",
110
- "firefox-location2": "3.1.1",
107
+ "extension-create": "4.1.29",
108
+ "extension-develop": "4.1.29",
109
+ "extension-install": "4.1.29",
110
+ "firefox-location2": "3.2.0",
111
111
  "floorp-location": "1.0.0",
112
112
  "librewolf-location": "1.2.1",
113
113
  "opera-location2": "2.1.1",