extension-develop 3.4.0 → 3.4.1

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 CHANGED
@@ -95,7 +95,7 @@ Options accepted by each command. Values shown are typical types or enumerations
95
95
  | profile | string or false | Profile path or disable profile persistence |
96
96
  | startingUrl | string | Initial URL to open |
97
97
  | open | boolean | Focus/open the browser window (CLI: use `--no-open` to disable) |
98
- | noRunner | boolean | Skip launching the browser runner |
98
+ | --no-runner | boolean | Skip launching the browser runner |
99
99
  | chromiumBinary | string | Custom Chromium-based executable path |
100
100
  | geckoBinary | string | Custom Gecko-based executable path |
101
101
 
package/dist/547.cjs CHANGED
@@ -8332,6 +8332,8 @@ Set background.noDynamicEntryWarning to true to disable this warning.
8332
8332
  }
8333
8333
  class BrowsersPlugin {
8334
8334
  apply(compiler) {
8335
+ const wslDistro = String(process.env.WSL_DISTRO_NAME || '').trim().toLowerCase();
8336
+ if ('docker-desktop' === wslDistro || 'docker-desktop-data' === wslDistro) return void console.warn(browsers_lib_messages.R24());
8335
8337
  if ('chrome' === this.browser || 'edge' === this.browser || 'chromium' === this.browser || 'chromium-based' === this.browser) {
8336
8338
  if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(browsers_lib_messages.hmB(this.browser));
8337
8339
  new RunChromiumPlugin(this).apply(compiler);
package/dist/module.cjs CHANGED
@@ -127307,6 +127307,7 @@ var __webpack_modules__ = {
127307
127307
  Qiq: ()=>cdpClientLoadEventTimeout,
127308
127308
  Qx1: ()=>sourceInspectorWatchModeStopped,
127309
127309
  QzP: ()=>firefoxUnifiedLoggingFailed,
127310
+ R24: ()=>wslDockerDesktopRunnerDisabled,
127310
127311
  R4W: ()=>sourceInspectorNoTabActorAvailable,
127311
127312
  RzV: ()=>sourceInspectorStartingWatchMode,
127312
127313
  SAK: ()=>profileFallbackWarning,
@@ -127540,6 +127541,13 @@ var __webpack_modules__ = {
127540
127541
  function chromeInitializingEnhancedReload() {
127541
127542
  return `${getLoggingPrefix('info')} Initializing enhanced reload service with direct spawn for Chrome`;
127542
127543
  }
127544
+ function wslDockerDesktopRunnerDisabled() {
127545
+ return [
127546
+ `${getLoggingPrefix('warn')} Browser runner already disabled (docker-desktop WSL detected).`,
127547
+ "This environment can't launch Windows browser binaries or access /mnt/c.",
127548
+ "If you need the browser open, install a real WSL distro (Ubuntu/Debian) or run dev from Windows."
127549
+ ].join('\n');
127550
+ }
127543
127551
  function locatingBrowser(browser) {
127544
127552
  return `${getLoggingPrefix('info')} Locating ${capitalizedBrowserName(browser)} browser binary...`;
127545
127553
  }
@@ -131250,7 +131258,7 @@ var __webpack_modules__ = {
131250
131258
  function optionalToolingSetup(integrations, fallback, isAuthor) {
131251
131259
  const list = integrations && integrations.length > 0 ? integrations.join('/') : fallback;
131252
131260
  const prefix = isAuthor ? pintor__rspack_import_0_default().brightMagenta('►►► Author says') : pintor__rspack_import_0_default().gray('►►►');
131253
- return `${prefix} Setting up ${list} tooling... (this is a one time op)`;
131261
+ return `${prefix} Setting up ${list} tooling after a fresh install... (this is a one time operation)`;
131254
131262
  }
131255
131263
  function optionalToolingRootInstall(integration) {
131256
131264
  return `${pintor__rspack_import_0_default().brightMagenta('►►► Author says')} [${integration}] Installing root dependencies for dev...`;
@@ -133497,7 +133505,7 @@ var __webpack_modules__ = {
133497
133505
  },
133498
133506
  "./package.json" (module) {
133499
133507
  "use strict";
133500
- module.exports = JSON.parse('{"rE":"3.4.0","El":{"@rspack/core":"^1.7.2","@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","firefox-location2":"3.0.0","go-git-it":"^5.0.3","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"}}');
133508
+ module.exports = JSON.parse('{"rE":"3.4.1","El":{"@rspack/core":"^1.7.2","@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","firefox-location2":"3.0.0","go-git-it":"^5.0.3","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"}}');
133501
133509
  }
133502
133510
  };
133503
133511
  var __webpack_module_cache__ = {};
@@ -134280,141 +134288,17 @@ var __webpack_exports__ = {};
134280
134288
  const promises_namespaceObject = require("fs/promises");
134281
134289
  async function generateExtensionTypes(manifestDir, packageJsonDir) {
134282
134290
  const extensionEnvFile = external_path_.join(packageJsonDir, 'extension-env.d.ts');
134283
- const { dependencies, devDependencies, peerDependencies, optionalDependencies } = await readPackageJson(packageJsonDir);
134284
- const hasDependency = (name)=>Boolean(dependencies[name] || devDependencies[name] || peerDependencies[name] || optionalDependencies[name]);
134285
- const usesReact = hasDependency('react') || hasDependency('@types/react');
134286
- const usesReactDom = hasDependency('react-dom') || hasDependency('@types/react-dom');
134287
- const usesSvelte = hasDependency('svelte');
134288
- const frameworkTypeRefs = [
134289
- usesReact ? '/// <reference types="react" />' : '',
134290
- usesReactDom ? '/// <reference types="react-dom" />' : '',
134291
- usesSvelte ? '/// <reference types="svelte" />' : ''
134292
- ].filter(Boolean).join('\n');
134291
+ const typePath = 'extension';
134293
134292
  const fileContent = `\
134294
134293
  // Required Extension.js types for TypeScript projects.
134295
134294
  // This file is auto-generated and should not be excluded.
134296
- //
134297
- /// <reference types="webextension-polyfill" />
134298
- /// <reference types="node" />
134299
- /// <reference types="chrome" />
134300
- ${frameworkTypeRefs}
134301
-
134302
- declare global {
134303
- // Align types with Extension.js runtime: we provide the browser global via
134304
- // webextension-polyfill in Chromium, and it's natively available in Firefox.
134305
- const browser: typeof import('webextension-polyfill')
134306
-
134307
- type ExtensionBrowser =
134308
- | 'chrome'
134309
- | 'edge'
134310
- | 'firefox'
134311
- | 'chromium-based'
134312
- | 'gecko-based'
134313
-
134314
- type ExtensionMode = 'development' | 'production'
134315
-
134316
- interface ExtensionEnv {
134317
- EXTENSION_BROWSER: ExtensionBrowser
134318
- EXTENSION_MODE: ExtensionMode
134319
- EXTENSION_PUBLIC_BROWSER: ExtensionBrowser
134320
- EXTENSION_PUBLIC_MODE: ExtensionMode
134321
- EXTENSION_PUBLIC_DESCRIPTION_TEXT: string
134322
- EXTENSION_PUBLIC_LLM_API_KEY: string
134323
- EXTENSION_AUTHOR_MODE: string
134324
- EXTENSION_PUBLIC_AUTHOR_MODE: string
134325
- }
134326
-
134327
- namespace NodeJS {
134328
- interface ProcessEnv extends ExtensionEnv {
134329
- [key: string]: string | undefined
134330
- }
134331
- }
134332
-
134333
- interface ImportMetaEnv extends ExtensionEnv {
134334
- [key: string]: string | undefined
134335
- }
134295
+ // If you need additional types, consider creating a new *.d.ts file and
134296
+ // referencing it in the "include" array of your tsconfig.json file.
134297
+ // See https://www.typescriptlang.org/tsconfig#include for more information.
134298
+ /// <reference types="${typePath}/types" />
134336
134299
 
134337
- interface ImportMeta {
134338
- readonly env: ImportMetaEnv
134339
- readonly webpackHot?: {
134340
- accept: (module?: string | string[], callback?: () => void) => void
134341
- dispose: (callback: () => void) => void
134342
- }
134343
- url: string
134344
- }
134345
-
134346
- interface Window {
134347
- /**
134348
- * @deprecated
134349
- * @description
134350
- * This is how Extension.js used to inject the shadow root into the window object.
134351
- * Use the shadowRoot reference from the content script instead.
134352
- */
134353
- __EXTENSION_SHADOW_ROOT__: ShadowRoot
134354
- }
134355
- }
134356
-
134357
- // Asset imports (CSS modules + static images)
134358
- type CSSContentData = Readonly<Record<string, string>>
134359
- type CSSModuleData = Readonly<Record<string, string>>
134360
-
134361
- declare module '*.css' {
134362
- const content: CSSContentData
134363
- export default content
134364
- }
134365
-
134366
- declare module '*.module.css' {
134367
- const content: CSSModuleData
134368
- export default content
134369
- }
134370
- declare module '*.module.scss' {
134371
- const content: CSSModuleData
134372
- export default content
134373
- }
134374
- declare module '*.module.sass' {
134375
- const content: CSSModuleData
134376
- export default content
134377
- }
134378
-
134379
- declare module '*.png' {
134380
- const content: string
134381
- export default content
134382
- }
134383
- declare module '*.jpg' {
134384
- const content: string
134385
- export default content
134386
- }
134387
- declare module '*.jpeg' {
134388
- const content: string
134389
- export default content
134390
- }
134391
- declare module '*.gif' {
134392
- const content: string
134393
- export default content
134394
- }
134395
- declare module '*.webp' {
134396
- const content: string
134397
- export default content
134398
- }
134399
- declare module '*.avif' {
134400
- const content: string
134401
- export default content
134402
- }
134403
- declare module '*.ico' {
134404
- const content: string
134405
- export default content
134406
- }
134407
- declare module '*.bmp' {
134408
- const content: string
134409
- export default content
134410
- }
134411
- declare module '*.svg' {
134412
- // Use any to avoid conflicts with SVGR or other SVG loaders.
134413
- const content: any
134414
- export default content
134415
- }
134416
-
134417
- export {}
134300
+ // Polyfill types for browser.* APIs
134301
+ /// <reference types="${typePath}/types/polyfill" />
134418
134302
  `;
134419
134303
  try {
134420
134304
  await promises_namespaceObject.access(extensionEnvFile);
@@ -134431,26 +134315,6 @@ export {}
134431
134315
  }
134432
134316
  }
134433
134317
  }
134434
- async function readPackageJson(projectPath) {
134435
- const packageJsonPath = external_path_.join(projectPath, 'package.json');
134436
- try {
134437
- const content = await promises_namespaceObject.readFile(packageJsonPath, 'utf8');
134438
- const parsed = JSON.parse(content) || {};
134439
- return {
134440
- dependencies: parsed.dependencies || {},
134441
- devDependencies: parsed.devDependencies || {},
134442
- peerDependencies: parsed.peerDependencies || {},
134443
- optionalDependencies: parsed.optionalDependencies || {}
134444
- };
134445
- } catch {
134446
- return {
134447
- dependencies: {},
134448
- devDependencies: {},
134449
- peerDependencies: {},
134450
- optionalDependencies: {}
134451
- };
134452
- }
134453
- }
134454
134318
  async function extensionDev(pathOrRemoteUrl, devOptions) {
134455
134319
  const projectStructure = await getProjectStructure(pathOrRemoteUrl);
134456
134320
  try {
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "dist"
24
24
  ],
25
25
  "name": "extension-develop",
26
- "version": "3.4.0",
26
+ "version": "3.4.1",
27
27
  "description": "Develop, build, preview, and package Extension.js projects.",
28
28
  "author": {
29
29
  "name": "Cezar Augusto",