extension 4.1.39 → 4.1.40-canary.458.001a6a0

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.
Files changed (64) hide show
  1. package/README.md +17 -13
  2. package/dist/browsers.cjs +2708 -576
  3. package/dist/cli.cjs +3154 -757
  4. package/dist/extension/__spec__/command-harness.d.ts +1 -0
  5. package/dist/extension/__spec__/helpers/temp-folders.d.ts +1 -0
  6. package/dist/extension/browsers/__spec__/safari-fake-tools.d.ts +4 -0
  7. package/dist/extension/browsers/__spec__/safari-fake-ui-tools.d.ts +11 -0
  8. package/dist/extension/browsers/browsers-lib/banner.d.ts +2 -0
  9. package/dist/extension/browsers/browsers-lib/binary-env-override.d.ts +12 -0
  10. package/dist/extension/browsers/browsers-lib/boot-registrations-hold.d.ts +9 -0
  11. package/dist/extension/browsers/browsers-lib/built-boot-registrations.d.ts +47 -0
  12. package/dist/extension/browsers/browsers-lib/eval-result-cap.d.ts +15 -0
  13. package/dist/extension/browsers/browsers-lib/locator-env.d.ts +2 -0
  14. package/dist/extension/browsers/browsers-lib/messages.d.ts +19 -3
  15. package/dist/extension/browsers/browsers-lib/output-binaries-resolver.d.ts +2 -0
  16. package/dist/extension/browsers/browsers-lib/pinned-binary.d.ts +2 -0
  17. package/dist/extension/browsers/browsers-lib/process-teardown.d.ts +6 -0
  18. package/dist/extension/browsers/browsers-lib/ready-stamp.d.ts +28 -0
  19. package/dist/extension/browsers/browsers-lib/real-path.d.ts +7 -0
  20. package/dist/extension/browsers/browsers-lib/resolve-live-pid.d.ts +1 -0
  21. package/dist/extension/browsers/browsers-lib/runtime-options.d.ts +1 -0
  22. package/dist/extension/browsers/browsers-lib/shared-utils.d.ts +2 -0
  23. package/dist/extension/browsers/browsers-types.d.ts +1 -0
  24. package/dist/extension/browsers/index.d.ts +2 -1
  25. package/dist/extension/browsers/run-chromium/cdp/cdp-extension-controller/index.d.ts +8 -0
  26. package/dist/extension/browsers/run-chromium/cdp/ensure-developer-mode.d.ts +3 -1
  27. package/dist/extension/browsers/run-chromium/cdp/ensure-startup-new-tab.d.ts +14 -0
  28. package/dist/extension/browsers/run-chromium/cdp/evaluate-tab-document.d.ts +32 -0
  29. package/dist/extension/browsers/run-chromium/chromium-launch/browser-config.d.ts +6 -0
  30. package/dist/extension/browsers/run-chromium/chromium-launch/dry-run.d.ts +1 -1
  31. package/dist/extension/browsers/run-chromium/chromium-launch/process-handlers.d.ts +1 -1
  32. package/dist/extension/browsers/run-chromium/chromium-types.d.ts +4 -1
  33. package/dist/extension/browsers/run-firefox/firefox-launch/dry-run.d.ts +1 -1
  34. package/dist/extension/browsers/run-firefox/firefox-types.d.ts +4 -1
  35. package/dist/extension/browsers/run-firefox/rdp/evaluate-extension-document.d.ts +22 -0
  36. package/dist/extension/browsers/run-firefox/rdp/rdp-extension-controller/index.d.ts +5 -1
  37. package/dist/extension/browsers/run-firefox/rdp/remote-firefox/firefox-utils.d.ts +1 -0
  38. package/dist/extension/browsers/run-firefox/rdp/remote-firefox/index.d.ts +6 -1
  39. package/dist/extension/browsers/run-firefox/rdp/remote-firefox/manager-tab.d.ts +2 -0
  40. package/dist/extension/browsers/run-firefox/rdp/remote-firefox/moz-id.d.ts +10 -0
  41. package/dist/extension/browsers/run-firefox/rdp/remote-firefox/starting-url.d.ts +3 -1
  42. package/dist/extension/browsers/run-only.d.ts +1 -0
  43. package/dist/extension/browsers/run-safari/safari-launch/index.d.ts +3 -1
  44. package/dist/extension/browsers/run-safari/safari-launch/registry.d.ts +18 -0
  45. package/dist/extension/browsers/run-safari/safari-launch/tools.d.ts +5 -0
  46. package/dist/extension/browsers/run-safari/safari-launch/webdriver.d.ts +2 -0
  47. package/dist/extension/browsers/run-safari/safari-types.d.ts +2 -0
  48. package/dist/extension/browsers/run-safari/safari-ui/index.d.ts +12 -0
  49. package/dist/extension/browsers/run-safari/safari-ui/scripts.d.ts +8 -4
  50. package/dist/extension/commands/act.d.ts +6 -0
  51. package/dist/extension/commands/create.d.ts +1 -1
  52. package/dist/extension/commands/doctor.d.ts +2 -0
  53. package/dist/extension/config-types.d.ts +35 -2
  54. package/dist/extension/helpers/localized-manifest-name.d.ts +9 -0
  55. package/dist/extension/helpers/messages.d.ts +4 -2
  56. package/dist/extension/helpers/session-liveness.d.ts +27 -0
  57. package/dist/extension/helpers/session-project-path.d.ts +1 -0
  58. package/dist/extension/helpers/telemetry-cli.d.ts +1 -0
  59. package/dist/extension/helpers/telemetry.d.ts +3 -1
  60. package/dist/extension/helpers/template-catalog.d.ts +1 -1
  61. package/dist/extension/helpers/template-corpus.generated.d.ts +2 -2
  62. package/dist/{753.cjs → t.cjs} +92 -87
  63. package/package.json +7 -7
  64. package/types/index.d.ts +2 -2
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- [npm-version-image]: https://img.shields.io/npm/v/extension.svg?color=0971fe
1
+ [npm-version-image]: https://img.shields.io/npm/v/extension.svg?color=0065e6
2
2
  [npm-version-url]: https://www.npmjs.com/package/extension
3
- [stars-image]: https://img.shields.io/github/stars/extension-js/extension.js?style=flat&color=0971fe
3
+ [stars-image]: https://img.shields.io/github/stars/extension-js/extension.js?style=flat&color=0065e6
4
4
  [stars-url]: https://github.com/extension-js/extension.js/stargazers
5
- [action-image]: https://github.com/extension-js/extension.js/actions/workflows/ci.yml/badge.svg?branch=main&color=0971fe
5
+ [action-image]: https://github.com/extension-js/extension.js/actions/workflows/ci.yml/badge.svg?branch=main&color=0065e6
6
6
  [action-url]: https://github.com/extension-js/extension.js/actions
7
- [discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=0971fe
7
+ [discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=0065e6
8
8
  [discord-url]: https://discord.gg/BRqbPDfPxb
9
- [bestpractices-image]: https://img.shields.io/cii/level/14662?label=Best%20Practices&style=flat&color=0971fe
9
+ [bestpractices-image]: https://img.shields.io/cii/level/14662?label=Best%20Practices&style=flat&color=0065e6
10
10
  [bestpractices-url]: https://www.bestpractices.dev/projects/14662
11
11
 
12
12
  # Extension.js [![Version][npm-version-image]][npm-version-url] [![Stars][stars-image]][stars-url] [![CI][action-image]][action-url] [![Discord][discord-image]][discord-url] [![Best Practices][bestpractices-image]][bestpractices-url]
@@ -25,7 +25,7 @@ Works with `npm`, `pnpm`, `yarn`, `bun`, and `deno`.
25
25
 
26
26
  The CLI itself runs on Node.js 22.12+, Deno 2.5+, and Bun 1.2+.
27
27
 
28
- [Documentation](https://extension.js.org/docs) · [Examples](https://github.com/extension-js/examples) · [YouTube](https://www.youtube.com/@BrowserExtension) · [Showcase](https://extension.js.org/showcase) · [Blog](https://extension.js.org/blog)
28
+ [Documentation](https://extension.js.org/docs) · [Examples](https://github.com/extension-js/templates) · [YouTube](https://www.youtube.com/@BrowserExtension) · [Showcase](https://extension.js.org/showcase) · [Blog](https://extension.js.org/blog)
29
29
 
30
30
  ## Why Extension.js
31
31
 
@@ -53,7 +53,7 @@ If you have used [Plasmo](https://www.plasmo.com), [WXT](https://wxt.dev), or [C
53
53
  | Managed browser binaries | `extension install firefox` downloads an isolated build |
54
54
  | Targeted content-script reload across browsers | Built in, only the changed entries re-inject, no plugin glue |
55
55
  | Production zip for the stores | `extension build --zip` |
56
- | Framework agnostic | [Vanilla](https://github.com/extension-js/examples/tree/main/examples/javascript), [TS](https://github.com/extension-js/examples/tree/main/examples/typescript), [React](https://github.com/extension-js/examples/tree/main/examples/react), [Vue](https://github.com/extension-js/examples/tree/main/examples/vue), [Svelte](https://github.com/extension-js/examples/tree/main/examples/svelte), [Preact](https://github.com/extension-js/examples/tree/main/examples/preact), no lock-in |
56
+ | Framework agnostic | [Vanilla](https://github.com/extension-js/templates/tree/main/examples/javascript), [TS](https://github.com/extension-js/templates/tree/main/examples/typescript), [React](https://github.com/extension-js/templates/tree/main/examples/react), [Vue](https://github.com/extension-js/templates/tree/main/examples/vue), [Svelte](https://github.com/extension-js/templates/tree/main/examples/svelte), [Preact](https://github.com/extension-js/templates/tree/main/examples/preact), no lock-in |
57
57
  | Custom Chromium and Gecko binaries | `--chromium-binary`, `--gecko-binary` |
58
58
 
59
59
  ## Frameworks
@@ -62,7 +62,7 @@ If you have used [Plasmo](https://www.plasmo.com), [WXT](https://wxt.dev), or [C
62
62
 
63
63
  | <img alt="ESNext" src="https://github.com/cezaraugusto/extension.js/assets/4672033/a9e2541a-96f0-4caa-9fc9-5fc5c3e901c8" width="70"> | <img alt="TypeScript" src="https://github.com/cezaraugusto/extension.js/assets/4672033/b42c5330-9e2a-4045-99c3-1f7d264dfaf4" width="70"> | <img alt="WASM" src="https://github.com/cezaraugusto/extension.js/assets/4672033/f19edff3-9005-4f50-b05c-fba615896a7f" width="70"> | <img alt="React" src="https://github.com/cezaraugusto/extension.js/assets/4672033/ff64721d-d145-4213-930d-e70193f8d57e" width="70"> | <img alt="Vue" src="https://github.com/cezaraugusto/extension.js/assets/4672033/15f1314a-aa65-4ce2-a3f3-cf53c4f730cf" width="70"> | <img alt="Svelte" src="https://github.com/cezaraugusto/extension.js/assets/4672033/de1082fd-7cf6-4202-8c12-a5c3cd3e5b42" width="70"> | <img alt="Preact" src="https://github.com/cezaraugusto/extension.js/assets/4672033/8807efd9-93e5-4db5-a1d2-9ac524f7ecc2" width="70"> |
64
64
  | :-: | :-: | :-: | :-: | :-: | :-: | :-: |
65
- | ESNext<br>[Try out](https://github.com/extension-js/examples/tree/main/examples/javascript) | TypeScript<br>[Try out](https://github.com/extension-js/examples/tree/main/examples/typescript) | WASM<br>[Try out](https://github.com/extension-js/examples/tree/main/examples/transformers-js) | React<br>[Try out](https://github.com/extension-js/examples/tree/main/examples/react) | Vue<br>[Try out](https://github.com/extension-js/examples/tree/main/examples/vue) | Svelte<br>[Try out](https://github.com/extension-js/examples/tree/main/examples/svelte) | Preact<br>[Try out](https://github.com/extension-js/examples/tree/main/examples/preact) |
65
+ | ESNext<br>[Try out](https://github.com/extension-js/templates/tree/main/examples/javascript) | TypeScript<br>[Try out](https://github.com/extension-js/templates/tree/main/examples/typescript) | WASM<br>[Try out](https://github.com/extension-js/templates/tree/main/examples/transformers-js) | React<br>[Try out](https://github.com/extension-js/templates/tree/main/examples/react) | Vue<br>[Try out](https://github.com/extension-js/templates/tree/main/examples/vue) | Svelte<br>[Try out](https://github.com/extension-js/templates/tree/main/examples/svelte) | Preact<br>[Try out](https://github.com/extension-js/templates/tree/main/examples/preact) |
66
66
 
67
67
  </div>
68
68
 
@@ -74,15 +74,17 @@ Use these flags with `extension dev`, `extension start`, or `extension preview`:
74
74
  - Custom Chromium binary: `--chromium-binary <path-to-binary>`
75
75
  - Custom Gecko (Firefox) binary: `--gecko-binary <path-to-binary>`
76
76
 
77
+ Every browser picks its binary in the same order: the flag above, then the browser's variable (`CHROME_FOR_TESTING_PATH`, `CHROMIUM_BINARY`, `CHROME_BINARY`, `EDGE_BINARY` or `FIREFOX_BINARY`), then the copy `extension install` downloaded, then the system install. A flag or variable that names a path that does not exist stops the command and names the path.
78
+
77
79
  ```bash
78
- # Chrome (system default)
80
+ # Chrome for Testing (the managed copy, offered on the first run)
79
81
  npx extension@latest dev --browser=chrome
80
82
 
81
83
  # Edge
82
84
  npx extension@latest dev --browser=edge
83
85
 
84
- # Custom Chrome/Chromium path
85
- npx extension@latest dev --chromium-binary "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
86
+ # Custom Chromium path
87
+ npx extension@latest dev --chromium-binary "/Applications/Chromium.app/Contents/MacOS/Chromium"
86
88
 
87
89
  # Custom Firefox path
88
90
  npx extension@latest dev --gecko-binary "/Applications/Firefox.app/Contents/MacOS/firefox"
@@ -116,6 +118,8 @@ Useful flags:
116
118
  - `--zip` packages the build into a ZIP ready for store upload
117
119
  - `--zip-source` includes source files for store source-code review
118
120
  - `--zip-filename <name>` controls the output filename, written as `dist/<name>-<browser>.zip`
121
+ - `--zip-dir <path>` writes the ZIP files to that folder instead of `dist`, relative to the project root or absolute
122
+ - `--source-maps` writes a source map beside each script and stylesheet of a production build. The maps stay out of the ZIP file, and the build total counts them apart
119
123
  - `--out-dir <path>` writes the build to `<path>/<browser>` instead of `dist/<browser>`. A build into the folder a live dev session serves is refused, so this is how a build runs beside a dev session
120
124
  - `--polyfill` enables the cross-browser webextension polyfill
121
125
 
@@ -195,7 +199,7 @@ Which runtime the CLI then executes on is a separate question, answered below.
195
199
  - Star the repo if Extension.js helped you ship faster
196
200
  - Join the [Discord](https://discord.gg/BRqbPDfPxb) for help and feedback
197
201
  - Open issues and feature requests on [GitHub](https://github.com/extension-js/extension.js/issues)
198
- - Browse production-ready [examples](https://github.com/extension-js/examples)
202
+ - Browse production-ready [examples](https://github.com/extension-js/templates)
199
203
 
200
204
  ## Sponsors
201
205
 
@@ -207,7 +211,7 @@ Sponsors help the project ship faster releases, better developer experience, and
207
211
  </p>
208
212
  </div>
209
213
 
210
- Documentation is hosted by [Mintlify](https://mintlify.com/?utm_medium=infrastructure&utm_source=extensionjs) through its open source program. Tiers and placement are listed in [BACKERS.md](https://github.com/extension-js/extension.js/blob/main/BACKERS.md).
214
+ Documentation is hosted by [Mintlify](https://mintlify.com/) through its open source program. Tiers and placement are listed in [BACKERS.md](https://github.com/extension-js/extension.js/blob/main/BACKERS.md).
211
215
 
212
216
  ## Contributing
213
217