extension 4.1.8 → 4.1.10

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/cli.cjs CHANGED
@@ -6869,7 +6869,7 @@ var __webpack_modules__ = {
6869
6869
  }
6870
6870
  var messaging = __webpack_require__("./helpers/messaging.ts");
6871
6871
  const TEMPLATE_CORPUS_REPO = 'extension-js/examples';
6872
- const TEMPLATE_CORPUS_REF = '787c974573f6ed70107e331e261924d20de64740';
6872
+ const TEMPLATE_CORPUS_REF = 'cb6a25377bd9516a1e55447a2010537019851ab2';
6873
6873
  const TEMPLATE_CORPUS_SLUGS = [
6874
6874
  'action',
6875
6875
  'action-locales',
@@ -7018,6 +7018,18 @@ var __webpack_modules__ = {
7018
7018
  'action-locales'
7019
7019
  ]
7020
7020
  },
7021
+ {
7022
+ title: 'DevTools panel',
7023
+ summary: 'panel added to the browser developer tools',
7024
+ templates: [
7025
+ 'devtools',
7026
+ 'devtools-preact',
7027
+ 'devtools-react',
7028
+ 'devtools-svelte',
7029
+ "devtools-typescript",
7030
+ 'devtools-vue'
7031
+ ]
7032
+ },
7021
7033
  {
7022
7034
  title: 'Special folders',
7023
7035
  summary: "pages/ and scripts/ entrypoints",
@@ -8772,6 +8784,17 @@ Cross-browser compatibility
8772
8784
  console.log(JSON.stringify(frame));
8773
8785
  }
8774
8786
  }
8787
+ async function resolveConfigBrowser(projectPath, command) {
8788
+ try {
8789
+ const develop = await loadExtensionDevelopModule();
8790
+ if ('function' != typeof develop.loadCommandConfig) return;
8791
+ const config = await develop.loadCommandConfig(projectPath, command);
8792
+ const browser = config?.browser;
8793
+ return 'string' == typeof browser && browser.length > 0 ? browser : void 0;
8794
+ } catch {
8795
+ return;
8796
+ }
8797
+ }
8775
8798
  async function resolveNoBrowser(projectPath, command) {
8776
8799
  if ('1' === process.env.EXTENSION_CLI_NO_BROWSER) return true;
8777
8800
  try {
@@ -9019,7 +9042,8 @@ Cross-browser compatibility
9019
9042
  }
9020
9043
  function registerDevCommand(program) {
9021
9044
  program.command('dev').arguments('[project-path|remote-url]').usage('[project-path|remote-url] [options]').description(commandDescriptions.dev).addHelpText('after', "\nAdditional options:\n --no-browser do not launch the browser (dev server still starts)\n --no-reload emit a dev-mode dist without the content-script reload runtime; tabs need manual reload to see changes\n --wait wait for ready contract and exit; pair with --output json for machine output\n").option('--profile <path-to-file | boolean>', 'what path to use for the browser profile. A boolean value of false sets the profile to the default user profile. Defaults to a fresh profile').option(`-b, --browser <${BROWSER_TARGETS_HELP}>`, 'specify a browser/engine to run. Defaults to `chromium`. `safari` builds and opens a Safari app via Xcode (macOS only; no live reload)').option('--chromium-binary <path-to-binary>', 'specify a path to the Chromium binary. This option overrides the --browser setting. Defaults to the system default').option('--gecko-binary, --firefox-binary <path-to-binary>', 'specify a path to the Gecko binary. This option overrides the --browser setting. Defaults to the system default').option('--safari-binary <path-to-binary>', 'specify the Safari binary to open after packaging (safari targets only)').option('--app-name <name>', 'override the Safari app name (safari targets only). Defaults to the manifest `name`').option('--bundle-id <reverse.dns>', 'set a user-owned Safari bundle identifier (safari targets only). Defaults to a generated dev.extensionjs.* id').option('--development-team <id>', 'sign the Safari app with an Apple Developer team id (safari targets only). Without it the build is ad-hoc signed, which Safari treats as unsigned: the extension then needs Develop \u25b8 Allow Unsigned Extensions re-ticked on every launch. A signed build is listed and stays enabled across restarts').option('--macos-only [boolean]', 'generate a macOS-only Safari Xcode project (safari targets only). Pass `false` for a universal macOS + iOS project. Defaults to `true`', parseOptionalBoolean).option('--force-regenerate', 'regenerate the Safari Xcode project even when up to date (safari targets only)').option('--polyfill [boolean]', 'whether or not to apply the cross-browser polyfill. Defaults to `true`', parseOptionalBoolean).option('--no-polyfill', 'disable the cross-browser polyfill').option('--no-open', 'do not open the browser automatically (default: open)').option('--starting-url <url>', 'specify the starting URL for the browser. Defaults to `undefined`').option('--port <port>', 'specify the port to use for the development server. Defaults to `8080`').option('--host <host>', 'specify the host to bind the dev server to. Use 0.0.0.0 for Docker/devcontainers. Defaults to `127.0.0.1`').option('--public-host <host>', 'connectable host the browser (HMR + reload bridge) dials when it differs from the bind host (e.g. a remote/devcontainer). Defaults to the bind host, or 127.0.0.1 when bound to 0.0.0.0').option('--log-context <list>', '[experimental] comma-separated contexts to include (background,content,page,sidebar,popup,options,devtools). Use `all` to include all contexts (default)').option('--logs <off|error|warn|info|debug|trace|all>', '[experimental] minimum centralized logger level to display in terminal (default: off)').option('--log-format <pretty|json|ndjson>', '[experimental] output format for logger events. Defaults to `pretty`').option('--no-log-timestamps', 'disable ISO timestamps in pretty output').option('--no-log-color', 'disable color in pretty output').option('--log-url <pattern>', '[experimental] only show logs where event.url matches this substring or regex (/re/i)').option('--log-tab <id>', 'only show logs for a specific tabId (number)').option('--extensions <list>', 'comma-separated list of companion extensions or store URLs to load').option('--install [boolean]', '[internal] install project dependencies when missing', parseOptionalBoolean).option('--wait [boolean]', 'wait for dist/extension-js/<browser>/ready.json and exit', parseOptionalBoolean).option('--wait-timeout <ms>', 'timeout in milliseconds when using --wait (default: 60000)').option('--output <pretty|json>', 'result format. Use json for a schema-1 envelope on stdout').addOption(new external_commander_namespaceObject.Option('--wait-format <pretty|json>').hideHelp()).addOption(new external_commander_namespaceObject.Option('--debug', 'print maintainer diagnostics alongside normal output')).addOption(new external_commander_namespaceObject.Option('--author, --author-mode', 'deprecated alias for --debug').hideHelp()).option('--allow-control', 'enable the agent-bridge control channel for bounded act (storage/reload/open): see `extension reload|storage|open`').option('--allow-eval', 'additionally enable `extension eval` (implies --allow-control, runs arbitrary code in a context, writes a 0600 session token)').option('--parent-pid <pid>', 'exit when the given process dies. For wrappers that spawn `extension dev`, so a leaked dev server can never outlive its owner').action(async (pathOrRemoteUrl, options, command)=>{
9022
- const { browser = 'chromium', ...devOptions } = options;
9045
+ const { browser: cliBrowser, ...devOptions } = options;
9046
+ const browser = cliBrowser ?? await resolveConfigBrowser(pathOrRemoteUrl || process.cwd(), 'dev') ?? 'chromium';
9023
9047
  if (devOptions.debug || devOptions.author || devOptions.authorMode) {
9024
9048
  process.env.EXTENSION_DEBUG = '1';
9025
9049
  process.env.EXTENSION_AUTHOR_MODE = 'true';
@@ -0,0 +1 @@
1
+ export declare function resolveConfigBrowser(projectPath: string, command: 'dev' | 'build' | 'start' | 'preview'): Promise<string | undefined>;
@@ -1,6 +1,6 @@
1
1
  export declare const DEFAULT_TEMPLATE = "javascript";
2
2
  export declare const BUNDLED_TEMPLATES: readonly string[];
3
- export declare const TEMPLATE_CATALOG_URL = "https://github.com/extension-js/examples/tree/787c974573f6ed70107e331e261924d20de64740/examples";
3
+ export declare const TEMPLATE_CATALOG_URL = "https://github.com/extension-js/examples/tree/cb6a25377bd9516a1e55447a2010537019851ab2/examples";
4
4
  export interface TemplateGroup {
5
5
  title: string;
6
6
  summary: string;
@@ -1,3 +1,3 @@
1
1
  export declare const TEMPLATE_CORPUS_REPO = "extension-js/examples";
2
- export declare const TEMPLATE_CORPUS_REF = "787c974573f6ed70107e331e261924d20de64740";
2
+ export declare const TEMPLATE_CORPUS_REF = "cb6a25377bd9516a1e55447a2010537019851ab2";
3
3
  export declare const TEMPLATE_CORPUS_SLUGS: readonly string[];
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "extension": "./bin/extension.cjs"
39
39
  },
40
40
  "name": "extension",
41
- "version": "4.1.8",
41
+ "version": "4.1.10",
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
  "bugs": {
@@ -106,9 +106,9 @@
106
106
  "vivaldi-location2": "2.1.1",
107
107
  "waterfox-location": "2.1.1",
108
108
  "yandex-location": "2.1.1",
109
- "extension-create": "4.1.8",
110
- "extension-develop": "4.1.8",
111
- "extension-install": "4.1.8",
109
+ "extension-create": "4.1.10",
110
+ "extension-develop": "4.1.10",
111
+ "extension-install": "4.1.10",
112
112
  "commander": "^15.0.0",
113
113
  "pintor": "0.3.0",
114
114
  "semver": "^7.7.3",