extension-develop 2.0.0-rc.9 → 2.0.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.
Files changed (606) hide show
  1. package/README.md +204 -0
  2. package/dist/add-content-script-wrapper.js +1777 -0
  3. package/dist/add-hmr-accept-code.js +95 -3
  4. package/dist/build.d.ts +2 -0
  5. package/dist/cleanup.d.ts +1 -0
  6. package/dist/deprecated-shadow-root.js +115 -14
  7. package/dist/dev.d.ts +2 -0
  8. package/dist/develop-lib/config-types.d.ts +85 -0
  9. package/dist/develop-lib/extract-from-zip.d.ts +1 -0
  10. package/dist/develop-lib/find-nearest-package.d.ts +2 -0
  11. package/dist/develop-lib/generate-extension-types.d.ts +1 -0
  12. package/dist/develop-lib/generate-zip.d.ts +2 -0
  13. package/dist/develop-lib/get-extension-config.d.ts +6 -0
  14. package/dist/develop-lib/get-project-path.d.ts +6 -0
  15. package/dist/develop-lib/install-dependencies.d.ts +2 -0
  16. package/dist/develop-lib/messages.d.ts +35 -0
  17. package/dist/develop-lib/validate-user-dependencies.d.ts +1 -0
  18. package/dist/ensure-hmr-for-scripts.js +74 -3
  19. package/dist/extensions/chrome-manager-extension/background.js +1 -1
  20. package/dist/extensions/chrome-manager-extension/images/logo.png +0 -0
  21. package/dist/extensions/chrome-manager-extension/manifest.json +3 -3
  22. package/dist/extensions/chrome-manager-extension/pages/welcome.html +3 -6
  23. package/dist/extensions/chrome-manager-extension/reload-service.js +214 -62
  24. package/dist/extensions/chromium-based-manager-extension/background.js +1 -1
  25. package/dist/extensions/chromium-based-manager-extension/images/logo.png +0 -0
  26. package/dist/extensions/chromium-based-manager-extension/manifest.json +3 -3
  27. package/dist/extensions/chromium-based-manager-extension/pages/welcome.html +3 -6
  28. package/dist/extensions/chromium-based-manager-extension/reload-service.js +185 -28
  29. package/dist/extensions/edge-manager-extension/background.js +1 -1
  30. package/dist/extensions/edge-manager-extension/images/logo.png +0 -0
  31. package/dist/extensions/edge-manager-extension/manifest.json +3 -3
  32. package/dist/extensions/edge-manager-extension/pages/welcome.html +3 -6
  33. package/dist/extensions/edge-manager-extension/reload-service.js +223 -69
  34. package/dist/extensions/firefox-manager-extension/background.js +40 -12
  35. package/dist/extensions/firefox-manager-extension/define-initial-tab.js +10 -12
  36. package/dist/extensions/firefox-manager-extension/images/logo.png +0 -0
  37. package/dist/extensions/firefox-manager-extension/manifest.json +4 -5
  38. package/dist/extensions/firefox-manager-extension/pages/welcome.html +3 -6
  39. package/dist/extensions/firefox-manager-extension/reload-service.js +113 -75
  40. package/dist/extensions/gecko-based-manager-extension/background.js +1 -1
  41. package/dist/extensions/gecko-based-manager-extension/define-initial-tab.js +7 -4
  42. package/dist/extensions/gecko-based-manager-extension/images/logo.png +0 -0
  43. package/dist/extensions/gecko-based-manager-extension/manifest.json +3 -3
  44. package/dist/extensions/gecko-based-manager-extension/pages/welcome.html +3 -6
  45. package/dist/extensions/gecko-based-manager-extension/reload-service.js +54 -26
  46. package/dist/inject-chromium-client-loader.js +144 -22
  47. package/dist/inject-firefox-client-loader.js +164 -47
  48. package/dist/minimum-chromium-file.js +25 -0
  49. package/dist/minimum-content-file.js +5 -0
  50. package/dist/minimum-firefox-file.js +17 -0
  51. package/dist/minimum-script-file.js +5 -0
  52. package/dist/module.d.ts +8 -95
  53. package/dist/module.js +10543 -128
  54. package/dist/preview.d.ts +2 -0
  55. package/dist/rslib.config.d.ts +3 -0
  56. package/dist/start.d.ts +2 -0
  57. package/dist/types.d.ts +11 -0
  58. package/dist/vitest.config.d.mts +2 -0
  59. package/dist/webpack/dev-server.d.ts +3 -0
  60. package/dist/webpack/plugin-browsers/browsers-lib/add-progress-bar.d.ts +1 -0
  61. package/dist/webpack/plugin-browsers/browsers-lib/constants.d.ts +5 -0
  62. package/dist/webpack/plugin-browsers/browsers-lib/dynamic-extension-manager.d.ts +35 -0
  63. package/dist/webpack/plugin-browsers/browsers-lib/html-merge.d.ts +1 -0
  64. package/dist/webpack/plugin-browsers/browsers-lib/instance-manager.d.ts +71 -0
  65. package/dist/webpack/plugin-browsers/browsers-lib/messages.d.ts +161 -0
  66. package/dist/webpack/plugin-browsers/browsers-lib/rdp-wire.d.ts +7 -0
  67. package/dist/webpack/plugin-browsers/browsers-lib/shared-utils.d.ts +16 -0
  68. package/dist/webpack/plugin-browsers/browsers-types.d.ts +131 -0
  69. package/dist/webpack/plugin-browsers/index.d.ts +41 -0
  70. package/dist/webpack/plugin-browsers/run-chromium/browser-config.d.ts +3 -0
  71. package/dist/webpack/plugin-browsers/run-chromium/create-profile.d.ts +10 -0
  72. package/dist/webpack/plugin-browsers/run-chromium/index.d.ts +28 -0
  73. package/dist/webpack/plugin-browsers/run-chromium/master-preferences.d.ts +161 -0
  74. package/dist/webpack/plugin-browsers/run-chromium/setup-chrome-inspection/cdp-client.d.ts +29 -0
  75. package/dist/webpack/plugin-browsers/run-chromium/setup-chrome-inspection/index.d.ts +25 -0
  76. package/dist/webpack/plugin-browsers/run-firefox/firefox/binary-detector.d.ts +15 -0
  77. package/dist/webpack/plugin-browsers/run-firefox/firefox/browser-config.d.ts +7 -0
  78. package/dist/webpack/plugin-browsers/run-firefox/firefox/create-profile.d.ts +13 -0
  79. package/dist/webpack/plugin-browsers/run-firefox/firefox/master-preferences.d.ts +95 -0
  80. package/dist/webpack/plugin-browsers/run-firefox/index.d.ts +26 -0
  81. package/dist/webpack/plugin-browsers/run-firefox/remote-firefox/index.d.ts +13 -0
  82. package/dist/webpack/plugin-browsers/run-firefox/remote-firefox/message-utils.d.ts +2 -0
  83. package/dist/webpack/plugin-browsers/run-firefox/remote-firefox/messaging-client.d.ts +42 -0
  84. package/dist/webpack/plugin-browsers/run-firefox/remote-firefox/setup-firefox-inspection.d.ts +31 -0
  85. package/dist/webpack/plugin-compatibility/feature-browser-specific-fields.d.ts +9 -0
  86. package/dist/webpack/plugin-compatibility/feature-polyfill.d.ts +12 -0
  87. package/dist/webpack/plugin-compatibility/index.d.ts +13 -0
  88. package/dist/webpack/plugin-compilation/clean-dist.d.ts +8 -0
  89. package/dist/webpack/plugin-compilation/env.d.ts +9 -0
  90. package/dist/webpack/plugin-compilation/index.d.ts +12 -0
  91. package/dist/webpack/plugin-css/common-style-loaders.d.ts +8 -0
  92. package/dist/webpack/plugin-css/css-in-content-script-loader.d.ts +11 -0
  93. package/dist/webpack/plugin-css/css-in-html-loader.d.ts +8 -0
  94. package/dist/webpack/plugin-css/css-tools/less.d.ts +4 -0
  95. package/dist/webpack/plugin-css/css-tools/postcss.d.ts +3 -0
  96. package/dist/webpack/plugin-css/css-tools/sass.d.ts +4 -0
  97. package/dist/webpack/plugin-css/css-tools/stylelint.d.ts +4 -0
  98. package/dist/webpack/plugin-css/css-tools/tailwind.d.ts +2 -0
  99. package/dist/webpack/plugin-css/index.d.ts +9 -0
  100. package/dist/webpack/plugin-css/is-content-script.d.ts +1 -0
  101. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/action.d.ts +2 -0
  102. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/background.d.ts +2 -0
  103. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/browser_action.d.ts +2 -0
  104. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/chrome_url_overrides.d.ts +2 -0
  105. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/devtools_page.d.ts +2 -0
  106. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/index.d.ts +2 -0
  107. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/options_ui.d.ts +2 -0
  108. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/page_action.d.ts +2 -0
  109. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/sandbox.d.ts +2 -0
  110. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/side_panel.d.ts +2 -0
  111. package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/sidebar_action.d.ts +2 -0
  112. package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/action.d.ts +2 -0
  113. package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/browser_action.d.ts +2 -0
  114. package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/browser_action.theme_icons.d.ts +2 -0
  115. package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/icons.d.ts +2 -0
  116. package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/index.d.ts +2 -0
  117. package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/normalize.d.ts +6 -0
  118. package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/page_action.d.ts +2 -0
  119. package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/sidebar_action.d.ts +2 -0
  120. package/dist/webpack/plugin-extension/data/manifest-fields/index.d.ts +19 -0
  121. package/dist/webpack/plugin-extension/data/manifest-fields/json-fields/declarative_net_request.d.ts +2 -0
  122. package/dist/webpack/plugin-extension/data/manifest-fields/json-fields/index.d.ts +2 -0
  123. package/dist/webpack/plugin-extension/data/manifest-fields/json-fields/storage.d.ts +2 -0
  124. package/dist/webpack/plugin-extension/data/manifest-fields/locales-fields/index.d.ts +1 -0
  125. package/dist/webpack/plugin-extension/data/manifest-fields/normalize.d.ts +10 -0
  126. package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/background.d.ts +2 -0
  127. package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/content_scripts.d.ts +2 -0
  128. package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/index.d.ts +2 -0
  129. package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/service_worker.d.ts +2 -0
  130. package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/user_scripts.d.ts +2 -0
  131. package/dist/webpack/plugin-extension/data/manifest-fields/web-resources-fields/index.d.ts +2 -0
  132. package/dist/webpack/plugin-extension/data/special-folders/generate-entries.d.ts +4 -0
  133. package/dist/webpack/plugin-extension/data/special-folders/index.d.ts +12 -0
  134. package/dist/webpack/plugin-extension/feature-html/__spec__/html-lib/test-utils.d.ts +18 -0
  135. package/dist/webpack/plugin-extension/feature-html/html-lib/parse-html.d.ts +8 -0
  136. package/dist/webpack/plugin-extension/feature-html/html-lib/patch-html.d.ts +8 -0
  137. package/dist/webpack/plugin-extension/feature-html/html-lib/utils.d.ts +18 -0
  138. package/dist/webpack/plugin-extension/feature-html/index.d.ts +37 -0
  139. package/dist/webpack/plugin-extension/feature-html/steps/add-assets-to-compilation.d.ts +11 -0
  140. package/dist/webpack/plugin-extension/feature-html/steps/add-scripts-and-styles-to-compilation.d.ts +10 -0
  141. package/dist/webpack/plugin-extension/feature-html/steps/add-to-file-dependencies.d.ts +10 -0
  142. package/dist/webpack/plugin-extension/feature-html/steps/emit-html-file.d.ts +9 -0
  143. package/dist/webpack/plugin-extension/feature-html/steps/ensure-hmr-for-scripts.d.ts +2 -0
  144. package/dist/webpack/plugin-extension/feature-html/steps/handle-common-errors.d.ts +10 -0
  145. package/dist/webpack/plugin-extension/feature-html/steps/minimum-script-file.d.ts +1 -0
  146. package/dist/webpack/plugin-extension/feature-html/steps/throw-if-recompile-is-needed.d.ts +13 -0
  147. package/dist/webpack/plugin-extension/feature-html/steps/update-html-file.d.ts +10 -0
  148. package/dist/webpack/plugin-extension/feature-icons/index.d.ts +25 -0
  149. package/dist/webpack/plugin-extension/feature-icons/steps/add-to-file-dependencies.d.ts +9 -0
  150. package/dist/webpack/plugin-extension/feature-icons/steps/emit-file.d.ts +9 -0
  151. package/dist/webpack/plugin-extension/feature-json/index.d.ts +18 -0
  152. package/dist/webpack/plugin-extension/feature-locales/get-locales.d.ts +1 -0
  153. package/dist/webpack/plugin-extension/feature-locales/index.d.ts +13 -0
  154. package/dist/webpack/plugin-extension/feature-manifest/index.d.ts +23 -0
  155. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/background.d.ts +10 -0
  156. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/chrome_url_overrides.d.ts +8 -0
  157. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/commands.d.ts +16 -0
  158. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/content_scripts.d.ts +7 -0
  159. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/content_security_policy.d.ts +4 -0
  160. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/devtools_page.d.ts +4 -0
  161. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/icons.d.ts +6 -0
  162. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/index.d.ts +2 -0
  163. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/omnibox.d.ts +2 -0
  164. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/options_page.d.ts +4 -0
  165. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/options_ui.d.ts +8 -0
  166. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/page_action.d.ts +8 -0
  167. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/permissions.d.ts +4 -0
  168. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/sandbox.d.ts +7 -0
  169. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/sidebar_action.d.ts +2 -0
  170. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/storage.d.ts +6 -0
  171. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/theme.d.ts +2 -0
  172. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/user_scripts.d.ts +2 -0
  173. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/web_accessible_resources.d.ts +9 -0
  174. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/index.d.ts +2 -0
  175. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/background.d.ts +10 -0
  176. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/browser_action.d.ts +12 -0
  177. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/chrome_settings_overrides.d.ts +24 -0
  178. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/index.d.ts +2 -0
  179. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/page_action.d.ts +1 -0
  180. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/sidebar_action.d.ts +1 -0
  181. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/theme_experiment.d.ts +2 -0
  182. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/action.d.ts +8 -0
  183. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/background.d.ts +10 -0
  184. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/declarative_net_request.d.ts +2 -0
  185. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/host_permissions.d.ts +2 -0
  186. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/index.d.ts +2 -0
  187. package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/side_panel.d.ts +2 -0
  188. package/dist/webpack/plugin-extension/feature-manifest/steps/add-dependencies.d.ts +6 -0
  189. package/dist/webpack/plugin-extension/feature-manifest/steps/check-manifest-files.d.ts +17 -0
  190. package/dist/webpack/plugin-extension/feature-manifest/steps/emit-manifest.d.ts +7 -0
  191. package/dist/webpack/plugin-extension/feature-manifest/steps/throw-if-recompile.d.ts +11 -0
  192. package/dist/webpack/plugin-extension/feature-manifest/steps/update-manifest.d.ts +9 -0
  193. package/dist/webpack/plugin-extension/feature-scripts/index.d.ts +27 -0
  194. package/dist/webpack/plugin-extension/feature-scripts/scripts-lib/utils.d.ts +3 -0
  195. package/dist/webpack/plugin-extension/feature-scripts/steps/add-content-script-wrapper.d.ts +2 -0
  196. package/dist/webpack/plugin-extension/feature-scripts/steps/add-hmr-accept-code.d.ts +2 -0
  197. package/dist/webpack/plugin-extension/feature-scripts/steps/add-public-path-for-main-world.d.ts +11 -0
  198. package/dist/webpack/plugin-extension/feature-scripts/steps/add-public-path-runtime-module.d.ts +4 -0
  199. package/dist/webpack/plugin-extension/feature-scripts/steps/add-scripts.d.ts +9 -0
  200. package/dist/webpack/plugin-extension/feature-scripts/steps/deprecated-shadow-root.d.ts +2 -0
  201. package/dist/webpack/plugin-extension/feature-scripts/steps/javascript-content-script-wrapper.d.ts +1 -0
  202. package/dist/webpack/plugin-extension/feature-scripts/steps/preact-content-script-wrapper.d.ts +1 -0
  203. package/dist/webpack/plugin-extension/feature-scripts/steps/react-content-script-wrapper.d.ts +1 -0
  204. package/dist/webpack/plugin-extension/feature-scripts/steps/svelte-content-script-wrapper.d.ts +1 -0
  205. package/dist/webpack/plugin-extension/feature-scripts/steps/typescript-content-script-wrapper.d.ts +1 -0
  206. package/dist/webpack/plugin-extension/feature-scripts/steps/vue-content-script-wrapper.d.ts +1 -0
  207. package/dist/webpack/plugin-extension/feature-special-folders/copy-public-folder.d.ts +14 -0
  208. package/dist/webpack/plugin-extension/feature-special-folders/index.d.ts +19 -0
  209. package/dist/webpack/plugin-extension/feature-special-folders/warn-upon-folder-changes.d.ts +7 -0
  210. package/dist/webpack/plugin-extension/feature-web-resources/clean-matches.d.ts +7 -0
  211. package/dist/webpack/plugin-extension/feature-web-resources/index.d.ts +18 -0
  212. package/dist/webpack/plugin-extension/index.d.ts +10 -0
  213. package/dist/webpack/plugin-js-frameworks/index.d.ts +13 -0
  214. package/dist/webpack/plugin-js-frameworks/js-tools/babel.d.ts +16 -0
  215. package/dist/webpack/plugin-js-frameworks/js-tools/preact.d.ts +3 -0
  216. package/dist/webpack/plugin-js-frameworks/js-tools/react.d.ts +3 -0
  217. package/dist/webpack/plugin-js-frameworks/js-tools/svelte.d.ts +3 -0
  218. package/dist/webpack/plugin-js-frameworks/js-tools/typescript.d.ts +36 -0
  219. package/dist/webpack/plugin-js-frameworks/js-tools/vue.d.ts +3 -0
  220. package/dist/webpack/plugin-js-frameworks/load-loader-options.d.ts +1 -0
  221. package/dist/webpack/plugin-reload/index.d.ts +13 -0
  222. package/dist/webpack/plugin-reload/reload-lib/messages.d.ts +106 -0
  223. package/dist/webpack/plugin-reload/reload-types.d.ts +14 -0
  224. package/dist/webpack/plugin-reload/start-server.d.ts +4 -0
  225. package/dist/webpack/plugin-reload/steps/create-web-socket-server/index.d.ts +14 -0
  226. package/dist/webpack/plugin-reload/steps/create-web-socket-server/web-socket-server/broadcast-message.d.ts +2 -0
  227. package/dist/webpack/plugin-reload/steps/create-web-socket-server/web-socket-server/message-dispatcher.d.ts +2 -0
  228. package/dist/webpack/plugin-reload/steps/create-web-socket-server/web-socket-server/servers.d.ts +2 -0
  229. package/dist/webpack/plugin-reload/steps/setup-chromium-reload-client/index.d.ts +3 -0
  230. package/dist/webpack/plugin-reload/steps/setup-chromium-reload-client/inject-chromium-client-loader.d.ts +9 -0
  231. package/dist/webpack/plugin-reload/steps/setup-firefox-reload-client/index.d.ts +3 -0
  232. package/dist/webpack/plugin-reload/steps/setup-firefox-reload-client/inject-firefox-client-loader.d.ts +9 -0
  233. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/index.d.ts +9 -0
  234. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-background.d.ts +15 -0
  235. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-csp.d.ts +5 -0
  236. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-externally-connectable.d.ts +10 -0
  237. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-web-resources.d.ts +10 -0
  238. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/generate-manager-extension.d.ts +15 -0
  239. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/index.d.ts +10 -0
  240. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/target-web-extension-plugin/index.d.ts +13 -0
  241. package/dist/webpack/plugin-static-assets/index.d.ts +12 -0
  242. package/dist/webpack/webpack-config.d.ts +14 -0
  243. package/dist/webpack/webpack-lib/auto-exit.d.ts +1 -0
  244. package/dist/webpack/webpack-lib/constants.d.ts +4 -0
  245. package/dist/webpack/webpack-lib/messages.d.ts +121 -0
  246. package/dist/webpack/webpack-lib/port-manager.d.ts +27 -0
  247. package/dist/webpack/webpack-lib/utils.d.ts +20 -0
  248. package/dist/webpack/webpack-types.d.ts +49 -0
  249. package/package.json +64 -27
  250. package/dist/depreacated-shadow-root.js +0 -34
  251. package/dist/inject-content-css-during-dev.js +0 -10
  252. package/dist/minimum-chromium-file.mjs +0 -1
  253. package/dist/minimum-content-file.mjs +0 -1
  254. package/dist/minimum-firefox-file.mjs +0 -1
  255. package/dist/resolver-loader.js +0 -1
  256. package/dist/resolver-module.mjs +0 -1
  257. package/dist/run-chrome-profile/ChromeFeatureState +0 -1
  258. package/dist/run-chrome-profile/Default/Affiliation Database +0 -0
  259. package/dist/run-chrome-profile/Default/AutofillStrikeDatabase/LOG +0 -0
  260. package/dist/run-chrome-profile/Default/AutofillStrikeDatabase/LOG.old +0 -0
  261. package/dist/run-chrome-profile/Default/BrowsingTopicsSiteData +0 -0
  262. package/dist/run-chrome-profile/Default/BrowsingTopicsSiteData-journal +0 -0
  263. package/dist/run-chrome-profile/Default/BrowsingTopicsState +0 -12
  264. package/dist/run-chrome-profile/Default/BudgetDatabase/LOCK +0 -0
  265. package/dist/run-chrome-profile/Default/BudgetDatabase/LOG +0 -0
  266. package/dist/run-chrome-profile/Default/BudgetDatabase/LOG.old +0 -0
  267. package/dist/run-chrome-profile/Default/Cache/Cache_Data/025191c01cb9560a_0 +0 -0
  268. package/dist/run-chrome-profile/Default/Cache/Cache_Data/05b7af632a0788c4_0 +0 -0
  269. package/dist/run-chrome-profile/Default/Cache/Cache_Data/06d18b346a40f753_0 +0 -0
  270. package/dist/run-chrome-profile/Default/Cache/Cache_Data/09442a94267e5d1b_0 +0 -0
  271. package/dist/run-chrome-profile/Default/Cache/Cache_Data/0a659b2fa80f7d18_0 +0 -0
  272. package/dist/run-chrome-profile/Default/Cache/Cache_Data/0c5ece120a4aa9c4_0 +0 -0
  273. package/dist/run-chrome-profile/Default/Cache/Cache_Data/0df08bba9fc5fdac_0 +0 -0
  274. package/dist/run-chrome-profile/Default/Cache/Cache_Data/15145040f7f12f31_0 +0 -0
  275. package/dist/run-chrome-profile/Default/Cache/Cache_Data/18cae013af62500a_0 +0 -0
  276. package/dist/run-chrome-profile/Default/Cache/Cache_Data/1e88f258e3680439_0 +0 -0
  277. package/dist/run-chrome-profile/Default/Cache/Cache_Data/207a53d3f4a4c4bc_0 +0 -0
  278. package/dist/run-chrome-profile/Default/Cache/Cache_Data/22b58fcf518f5674_0 +0 -0
  279. package/dist/run-chrome-profile/Default/Cache/Cache_Data/24111eb856fec6e6_0 +0 -0
  280. package/dist/run-chrome-profile/Default/Cache/Cache_Data/257b9ada9582cd59_0 +0 -0
  281. package/dist/run-chrome-profile/Default/Cache/Cache_Data/275fd93a285332c0_0 +0 -0
  282. package/dist/run-chrome-profile/Default/Cache/Cache_Data/27be01069ada1058_0 +0 -0
  283. package/dist/run-chrome-profile/Default/Cache/Cache_Data/2bd215b1cc3c8643_0 +0 -0
  284. package/dist/run-chrome-profile/Default/Cache/Cache_Data/2d6ffdfbd670a4e8_0 +0 -0
  285. package/dist/run-chrome-profile/Default/Cache/Cache_Data/30a7fd0752f0c20d_0 +0 -0
  286. package/dist/run-chrome-profile/Default/Cache/Cache_Data/3164cf42e96b9664_0 +0 -0
  287. package/dist/run-chrome-profile/Default/Cache/Cache_Data/31907c8cd5dbb0d7_0 +0 -0
  288. package/dist/run-chrome-profile/Default/Cache/Cache_Data/378470234e1889fb_0 +0 -0
  289. package/dist/run-chrome-profile/Default/Cache/Cache_Data/39b962857089ba5e_0 +0 -0
  290. package/dist/run-chrome-profile/Default/Cache/Cache_Data/3fb3b062de8f8809_0 +0 -0
  291. package/dist/run-chrome-profile/Default/Cache/Cache_Data/4496d0a64b8e2ff1_0 +0 -0
  292. package/dist/run-chrome-profile/Default/Cache/Cache_Data/459aacad64df1a20_0 +0 -0
  293. package/dist/run-chrome-profile/Default/Cache/Cache_Data/492ed577e4693e3f_0 +0 -0
  294. package/dist/run-chrome-profile/Default/Cache/Cache_Data/4cb485a7a714929a_0 +0 -0
  295. package/dist/run-chrome-profile/Default/Cache/Cache_Data/4ff29ec24ac18d79_0 +0 -0
  296. package/dist/run-chrome-profile/Default/Cache/Cache_Data/544232310d1a0a06_0 +0 -0
  297. package/dist/run-chrome-profile/Default/Cache/Cache_Data/55ed72b0b4c0b90e_0 +0 -0
  298. package/dist/run-chrome-profile/Default/Cache/Cache_Data/57c911b58ffc1b31_0 +0 -0
  299. package/dist/run-chrome-profile/Default/Cache/Cache_Data/5f883d2c96d94f47_0 +0 -0
  300. package/dist/run-chrome-profile/Default/Cache/Cache_Data/668471e493562a86_0 +0 -0
  301. package/dist/run-chrome-profile/Default/Cache/Cache_Data/686b16113c27b51c_0 +0 -0
  302. package/dist/run-chrome-profile/Default/Cache/Cache_Data/6995a7c799490d3d_0 +0 -0
  303. package/dist/run-chrome-profile/Default/Cache/Cache_Data/6f7f729885fc6405_0 +0 -0
  304. package/dist/run-chrome-profile/Default/Cache/Cache_Data/70f5010b6251d3d7_0 +0 -0
  305. package/dist/run-chrome-profile/Default/Cache/Cache_Data/78ed79bc5487503a_0 +0 -0
  306. package/dist/run-chrome-profile/Default/Cache/Cache_Data/84e415bdea6bf983_0 +0 -0
  307. package/dist/run-chrome-profile/Default/Cache/Cache_Data/9046ef8fa437e5d7_0 +0 -0
  308. package/dist/run-chrome-profile/Default/Cache/Cache_Data/93d81321f8c35eab_0 +0 -0
  309. package/dist/run-chrome-profile/Default/Cache/Cache_Data/94a5260219485fdf_0 +0 -0
  310. package/dist/run-chrome-profile/Default/Cache/Cache_Data/961c7a9dcf1d5fe3_0 +0 -0
  311. package/dist/run-chrome-profile/Default/Cache/Cache_Data/963f816968a47709_0 +0 -0
  312. package/dist/run-chrome-profile/Default/Cache/Cache_Data/97eb05d149fa8180_0 +0 -0
  313. package/dist/run-chrome-profile/Default/Cache/Cache_Data/a54fc271588d9d41_0 +0 -0
  314. package/dist/run-chrome-profile/Default/Cache/Cache_Data/a7ec2678f15b2b6d_0 +0 -0
  315. package/dist/run-chrome-profile/Default/Cache/Cache_Data/b3095246000ea960_0 +0 -0
  316. package/dist/run-chrome-profile/Default/Cache/Cache_Data/ba3f88b58ae6c933_0 +0 -0
  317. package/dist/run-chrome-profile/Default/Cache/Cache_Data/bbde820c1fee5c3c_0 +0 -0
  318. package/dist/run-chrome-profile/Default/Cache/Cache_Data/bf5945304ded8ca6_0 +0 -0
  319. package/dist/run-chrome-profile/Default/Cache/Cache_Data/c894826beba9fc11_0 +0 -0
  320. package/dist/run-chrome-profile/Default/Cache/Cache_Data/caca5541d401cf41_0 +0 -0
  321. package/dist/run-chrome-profile/Default/Cache/Cache_Data/d3c2a489bef951de_0 +0 -0
  322. package/dist/run-chrome-profile/Default/Cache/Cache_Data/d9a190d1d7d66bdd_0 +0 -0
  323. package/dist/run-chrome-profile/Default/Cache/Cache_Data/d9d9fe0a0f8883f0_0 +0 -0
  324. package/dist/run-chrome-profile/Default/Cache/Cache_Data/da5600d748a3d40d_0 +0 -0
  325. package/dist/run-chrome-profile/Default/Cache/Cache_Data/e2fbeb70759b0860_0 +0 -0
  326. package/dist/run-chrome-profile/Default/Cache/Cache_Data/e32ff760e1b4ec46_0 +0 -0
  327. package/dist/run-chrome-profile/Default/Cache/Cache_Data/e5c658ea95c0a29a_0 +0 -0
  328. package/dist/run-chrome-profile/Default/Cache/Cache_Data/e85ac8952d7783d7_0 +0 -0
  329. package/dist/run-chrome-profile/Default/Cache/Cache_Data/ea75bd91e54a494a_0 +0 -0
  330. package/dist/run-chrome-profile/Default/Cache/Cache_Data/ebadaa36379fd994_0 +0 -0
  331. package/dist/run-chrome-profile/Default/Cache/Cache_Data/f3a443b4d8db944d_0 +0 -0
  332. package/dist/run-chrome-profile/Default/Cache/Cache_Data/f3a70b90dcd40113_0 +0 -0
  333. package/dist/run-chrome-profile/Default/Cache/Cache_Data/f4f5420fc5a9003d_0 +0 -0
  334. package/dist/run-chrome-profile/Default/Cache/Cache_Data/f9e143e57946c84b_0 +0 -0
  335. package/dist/run-chrome-profile/Default/Cache/Cache_Data/index +0 -0
  336. package/dist/run-chrome-profile/Default/Cache/Cache_Data/index-dir/the-real-index +0 -0
  337. package/dist/run-chrome-profile/Default/ClientCertificates/LOCK +0 -0
  338. package/dist/run-chrome-profile/Default/ClientCertificates/LOG +0 -0
  339. package/dist/run-chrome-profile/Default/ClientCertificates/LOG.old +0 -0
  340. package/dist/run-chrome-profile/Default/Code Cache/js/0861135386d2c738_0 +0 -0
  341. package/dist/run-chrome-profile/Default/Code Cache/js/19f6466fb9b618ce_0 +0 -0
  342. package/dist/run-chrome-profile/Default/Code Cache/js/1b5a04a8f66ab70c_0 +0 -0
  343. package/dist/run-chrome-profile/Default/Code Cache/js/20a1d4f1d64a6e4a_0 +0 -0
  344. package/dist/run-chrome-profile/Default/Code Cache/js/218fe828c74bdb99_0 +0 -0
  345. package/dist/run-chrome-profile/Default/Code Cache/js/3d7a6b9ba7b8e97d_0 +0 -0
  346. package/dist/run-chrome-profile/Default/Code Cache/js/476e356260f818d6_0 +0 -0
  347. package/dist/run-chrome-profile/Default/Code Cache/js/4ade40caa2a85163_0 +0 -0
  348. package/dist/run-chrome-profile/Default/Code Cache/js/56560d269952a184_0 +0 -0
  349. package/dist/run-chrome-profile/Default/Code Cache/js/64849f954a94216e_0 +0 -0
  350. package/dist/run-chrome-profile/Default/Code Cache/js/6580147029871082_0 +0 -0
  351. package/dist/run-chrome-profile/Default/Code Cache/js/6aec1e7616284cdd_0 +0 -0
  352. package/dist/run-chrome-profile/Default/Code Cache/js/7d53e29663da0b76_0 +0 -0
  353. package/dist/run-chrome-profile/Default/Code Cache/js/838d85c38184d753_0 +0 -0
  354. package/dist/run-chrome-profile/Default/Code Cache/js/95a62562b95ac9f9_0 +0 -0
  355. package/dist/run-chrome-profile/Default/Code Cache/js/9b6ef7d7a65e720d_0 +0 -0
  356. package/dist/run-chrome-profile/Default/Code Cache/js/a096196665df2f44_0 +0 -0
  357. package/dist/run-chrome-profile/Default/Code Cache/js/a572b6bb234d4a65_0 +0 -0
  358. package/dist/run-chrome-profile/Default/Code Cache/js/a8bfd7ab3bf7adbd_0 +0 -0
  359. package/dist/run-chrome-profile/Default/Code Cache/js/b5d00710776b3b78_0 +0 -0
  360. package/dist/run-chrome-profile/Default/Code Cache/js/ba446f34fd660131_0 +0 -0
  361. package/dist/run-chrome-profile/Default/Code Cache/js/bd25d8bae4a347fb_0 +0 -0
  362. package/dist/run-chrome-profile/Default/Code Cache/js/d833cd33af1db7c6_0 +0 -0
  363. package/dist/run-chrome-profile/Default/Code Cache/js/d876d0d7d35cd53f_0 +0 -0
  364. package/dist/run-chrome-profile/Default/Code Cache/js/d91fc36c8dfd76dc_0 +0 -0
  365. package/dist/run-chrome-profile/Default/Code Cache/js/e1435a1865ecedae_0 +0 -0
  366. package/dist/run-chrome-profile/Default/Code Cache/js/index +0 -0
  367. package/dist/run-chrome-profile/Default/Code Cache/js/index-dir/the-real-index +0 -0
  368. package/dist/run-chrome-profile/Default/Code Cache/wasm/index +0 -0
  369. package/dist/run-chrome-profile/Default/Code Cache/wasm/index-dir/the-real-index +0 -0
  370. package/dist/run-chrome-profile/Default/Cookies +0 -0
  371. package/dist/run-chrome-profile/Default/Cookies-journal +0 -0
  372. package/dist/run-chrome-profile/Default/DIPS +0 -0
  373. package/dist/run-chrome-profile/Default/DawnGraphiteCache/data_0 +0 -0
  374. package/dist/run-chrome-profile/Default/DawnGraphiteCache/data_1 +0 -0
  375. package/dist/run-chrome-profile/Default/DawnGraphiteCache/data_2 +0 -0
  376. package/dist/run-chrome-profile/Default/DawnGraphiteCache/data_3 +0 -0
  377. package/dist/run-chrome-profile/Default/DawnGraphiteCache/index +0 -0
  378. package/dist/run-chrome-profile/Default/DawnWebGPUCache/data_0 +0 -0
  379. package/dist/run-chrome-profile/Default/DawnWebGPUCache/data_1 +0 -0
  380. package/dist/run-chrome-profile/Default/DawnWebGPUCache/data_2 +0 -0
  381. package/dist/run-chrome-profile/Default/DawnWebGPUCache/data_3 +0 -0
  382. package/dist/run-chrome-profile/Default/DawnWebGPUCache/index +0 -0
  383. package/dist/run-chrome-profile/Default/Download Service/EntryDB/LOCK +0 -0
  384. package/dist/run-chrome-profile/Default/Download Service/EntryDB/LOG +0 -0
  385. package/dist/run-chrome-profile/Default/Download Service/EntryDB/LOG.old +0 -0
  386. package/dist/run-chrome-profile/Default/Extension Rules/000003.log +0 -0
  387. package/dist/run-chrome-profile/Default/Extension Rules/CURRENT +0 -1
  388. package/dist/run-chrome-profile/Default/Extension Rules/LOCK +0 -0
  389. package/dist/run-chrome-profile/Default/Extension Rules/LOG +0 -3
  390. package/dist/run-chrome-profile/Default/Extension Rules/LOG.old +0 -3
  391. package/dist/run-chrome-profile/Default/Extension Rules/MANIFEST-000001 +0 -0
  392. package/dist/run-chrome-profile/Default/Extension Scripts/000003.log +0 -0
  393. package/dist/run-chrome-profile/Default/Extension Scripts/CURRENT +0 -1
  394. package/dist/run-chrome-profile/Default/Extension Scripts/LOCK +0 -0
  395. package/dist/run-chrome-profile/Default/Extension Scripts/LOG +0 -3
  396. package/dist/run-chrome-profile/Default/Extension Scripts/LOG.old +0 -3
  397. package/dist/run-chrome-profile/Default/Extension Scripts/MANIFEST-000001 +0 -0
  398. package/dist/run-chrome-profile/Default/Extension State/000003.log +0 -0
  399. package/dist/run-chrome-profile/Default/Extension State/CURRENT +0 -1
  400. package/dist/run-chrome-profile/Default/Extension State/LOCK +0 -0
  401. package/dist/run-chrome-profile/Default/Extension State/LOG +0 -3
  402. package/dist/run-chrome-profile/Default/Extension State/LOG.old +0 -3
  403. package/dist/run-chrome-profile/Default/Extension State/MANIFEST-000001 +0 -0
  404. package/dist/run-chrome-profile/Default/Favicons +0 -0
  405. package/dist/run-chrome-profile/Default/Favicons-journal +0 -0
  406. package/dist/run-chrome-profile/Default/Feature Engagement Tracker/AvailabilityDB/LOCK +0 -0
  407. package/dist/run-chrome-profile/Default/Feature Engagement Tracker/AvailabilityDB/LOG +0 -0
  408. package/dist/run-chrome-profile/Default/Feature Engagement Tracker/AvailabilityDB/LOG.old +0 -0
  409. package/dist/run-chrome-profile/Default/Feature Engagement Tracker/EventDB/LOCK +0 -0
  410. package/dist/run-chrome-profile/Default/Feature Engagement Tracker/EventDB/LOG +0 -0
  411. package/dist/run-chrome-profile/Default/Feature Engagement Tracker/EventDB/LOG.old +0 -0
  412. package/dist/run-chrome-profile/Default/GPUCache/data_0 +0 -0
  413. package/dist/run-chrome-profile/Default/GPUCache/data_1 +0 -0
  414. package/dist/run-chrome-profile/Default/GPUCache/data_2 +0 -0
  415. package/dist/run-chrome-profile/Default/GPUCache/data_3 +0 -0
  416. package/dist/run-chrome-profile/Default/GPUCache/index +0 -0
  417. package/dist/run-chrome-profile/Default/History +0 -0
  418. package/dist/run-chrome-profile/Default/History-journal +0 -0
  419. package/dist/run-chrome-profile/Default/LOCK +0 -0
  420. package/dist/run-chrome-profile/Default/LOG +0 -0
  421. package/dist/run-chrome-profile/Default/LOG.old +0 -0
  422. package/dist/run-chrome-profile/Default/Local Extension Settings/pbpgonifamlpcahjkkkfelffkegofkgg/000003.log +0 -0
  423. package/dist/run-chrome-profile/Default/Local Extension Settings/pbpgonifamlpcahjkkkfelffkegofkgg/CURRENT +0 -1
  424. package/dist/run-chrome-profile/Default/Local Extension Settings/pbpgonifamlpcahjkkkfelffkegofkgg/LOCK +0 -0
  425. package/dist/run-chrome-profile/Default/Local Extension Settings/pbpgonifamlpcahjkkkfelffkegofkgg/LOG +0 -3
  426. package/dist/run-chrome-profile/Default/Local Extension Settings/pbpgonifamlpcahjkkkfelffkegofkgg/LOG.old +0 -3
  427. package/dist/run-chrome-profile/Default/Local Extension Settings/pbpgonifamlpcahjkkkfelffkegofkgg/MANIFEST-000001 +0 -0
  428. package/dist/run-chrome-profile/Default/Local Storage/leveldb/000003.log +0 -0
  429. package/dist/run-chrome-profile/Default/Local Storage/leveldb/CURRENT +0 -1
  430. package/dist/run-chrome-profile/Default/Local Storage/leveldb/LOCK +0 -0
  431. package/dist/run-chrome-profile/Default/Local Storage/leveldb/LOG +0 -3
  432. package/dist/run-chrome-profile/Default/Local Storage/leveldb/LOG.old +0 -3
  433. package/dist/run-chrome-profile/Default/Local Storage/leveldb/MANIFEST-000001 +0 -0
  434. package/dist/run-chrome-profile/Default/Login Data +0 -0
  435. package/dist/run-chrome-profile/Default/Login Data For Account +0 -0
  436. package/dist/run-chrome-profile/Default/Login Data For Account-journal +0 -0
  437. package/dist/run-chrome-profile/Default/Login Data-journal +0 -0
  438. package/dist/run-chrome-profile/Default/Network Action Predictor +0 -0
  439. package/dist/run-chrome-profile/Default/Network Action Predictor-journal +0 -0
  440. package/dist/run-chrome-profile/Default/Network Persistent State +0 -1
  441. package/dist/run-chrome-profile/Default/PersistentOriginTrials/LOCK +0 -0
  442. package/dist/run-chrome-profile/Default/PersistentOriginTrials/LOG +0 -0
  443. package/dist/run-chrome-profile/Default/PersistentOriginTrials/LOG.old +0 -0
  444. package/dist/run-chrome-profile/Default/Platform Notifications/000003.log +0 -0
  445. package/dist/run-chrome-profile/Default/Platform Notifications/CURRENT +0 -1
  446. package/dist/run-chrome-profile/Default/Platform Notifications/LOCK +0 -0
  447. package/dist/run-chrome-profile/Default/Platform Notifications/LOG +0 -3
  448. package/dist/run-chrome-profile/Default/Platform Notifications/LOG.old +0 -3
  449. package/dist/run-chrome-profile/Default/Platform Notifications/MANIFEST-000001 +0 -0
  450. package/dist/run-chrome-profile/Default/Preferences +0 -1
  451. package/dist/run-chrome-profile/Default/PreferredApps +0 -1
  452. package/dist/run-chrome-profile/Default/README +0 -1
  453. package/dist/run-chrome-profile/Default/Reporting and NEL +0 -0
  454. package/dist/run-chrome-profile/Default/Reporting and NEL-journal +0 -0
  455. package/dist/run-chrome-profile/Default/Safe Browsing Cookies +0 -0
  456. package/dist/run-chrome-profile/Default/Safe Browsing Cookies-journal +0 -0
  457. package/dist/run-chrome-profile/Default/Secure Preferences +0 -1
  458. package/dist/run-chrome-profile/Default/Segmentation Platform/SegmentInfoDB/LOCK +0 -0
  459. package/dist/run-chrome-profile/Default/Segmentation Platform/SegmentInfoDB/LOG +0 -0
  460. package/dist/run-chrome-profile/Default/Segmentation Platform/SegmentInfoDB/LOG.old +0 -0
  461. package/dist/run-chrome-profile/Default/Segmentation Platform/SignalDB/LOCK +0 -0
  462. package/dist/run-chrome-profile/Default/Segmentation Platform/SignalDB/LOG +0 -0
  463. package/dist/run-chrome-profile/Default/Segmentation Platform/SignalDB/LOG.old +0 -0
  464. package/dist/run-chrome-profile/Default/Segmentation Platform/SignalStorageConfigDB/LOCK +0 -0
  465. package/dist/run-chrome-profile/Default/Segmentation Platform/SignalStorageConfigDB/LOG +0 -0
  466. package/dist/run-chrome-profile/Default/Segmentation Platform/SignalStorageConfigDB/LOG.old +0 -0
  467. package/dist/run-chrome-profile/Default/Service Worker/Database/000003.log +0 -0
  468. package/dist/run-chrome-profile/Default/Service Worker/Database/CURRENT +0 -1
  469. package/dist/run-chrome-profile/Default/Service Worker/Database/LOCK +0 -0
  470. package/dist/run-chrome-profile/Default/Service Worker/Database/LOG +0 -3
  471. package/dist/run-chrome-profile/Default/Service Worker/Database/LOG.old +0 -3
  472. package/dist/run-chrome-profile/Default/Service Worker/Database/MANIFEST-000001 +0 -0
  473. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/013888a1cda32b90_0 +0 -0
  474. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/013888a1cda32b90_1 +0 -0
  475. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/4cb013792b196a35_0 +0 -0
  476. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/7b4fd8111178d5b1_0 +0 -0
  477. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/7b4fd8111178d5b1_1 +0 -0
  478. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/ba23d8ecda68de77_0 +0 -0
  479. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/d0757ff92c7cde0a_0 +0 -0
  480. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/d0757ff92c7cde0a_1 +0 -0
  481. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/f1cdccba37924bda_0 +0 -0
  482. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/index +0 -0
  483. package/dist/run-chrome-profile/Default/Service Worker/ScriptCache/index-dir/the-real-index +0 -0
  484. package/dist/run-chrome-profile/Default/Session Storage/000003.log +0 -0
  485. package/dist/run-chrome-profile/Default/Session Storage/CURRENT +0 -1
  486. package/dist/run-chrome-profile/Default/Session Storage/LOCK +0 -0
  487. package/dist/run-chrome-profile/Default/Session Storage/LOG +0 -3
  488. package/dist/run-chrome-profile/Default/Session Storage/LOG.old +0 -3
  489. package/dist/run-chrome-profile/Default/Session Storage/MANIFEST-000001 +0 -0
  490. package/dist/run-chrome-profile/Default/Sessions/Session_13388296523755223 +0 -0
  491. package/dist/run-chrome-profile/Default/Sessions/Session_13388296533026691 +0 -0
  492. package/dist/run-chrome-profile/Default/Sessions/Tabs_13388296523963369 +0 -0
  493. package/dist/run-chrome-profile/Default/Sessions/Tabs_13388296533217699 +0 -0
  494. package/dist/run-chrome-profile/Default/Shared Dictionary/cache/index +0 -0
  495. package/dist/run-chrome-profile/Default/Shared Dictionary/cache/index-dir/the-real-index +0 -0
  496. package/dist/run-chrome-profile/Default/Shared Dictionary/db +0 -0
  497. package/dist/run-chrome-profile/Default/Shared Dictionary/db-journal +0 -0
  498. package/dist/run-chrome-profile/Default/SharedStorage +0 -0
  499. package/dist/run-chrome-profile/Default/Shortcuts +0 -0
  500. package/dist/run-chrome-profile/Default/Shortcuts-journal +0 -0
  501. package/dist/run-chrome-profile/Default/Site Characteristics Database/000003.log +0 -0
  502. package/dist/run-chrome-profile/Default/Site Characteristics Database/CURRENT +0 -1
  503. package/dist/run-chrome-profile/Default/Site Characteristics Database/LOCK +0 -0
  504. package/dist/run-chrome-profile/Default/Site Characteristics Database/LOG +0 -3
  505. package/dist/run-chrome-profile/Default/Site Characteristics Database/LOG.old +0 -3
  506. package/dist/run-chrome-profile/Default/Site Characteristics Database/MANIFEST-000001 +0 -0
  507. package/dist/run-chrome-profile/Default/Sync Data/LevelDB/000003.log +0 -0
  508. package/dist/run-chrome-profile/Default/Sync Data/LevelDB/CURRENT +0 -1
  509. package/dist/run-chrome-profile/Default/Sync Data/LevelDB/LOCK +0 -0
  510. package/dist/run-chrome-profile/Default/Sync Data/LevelDB/LOG +0 -3
  511. package/dist/run-chrome-profile/Default/Sync Data/LevelDB/LOG.old +0 -3
  512. package/dist/run-chrome-profile/Default/Sync Data/LevelDB/MANIFEST-000001 +0 -0
  513. package/dist/run-chrome-profile/Default/Top Sites +0 -0
  514. package/dist/run-chrome-profile/Default/Top Sites-journal +0 -0
  515. package/dist/run-chrome-profile/Default/TransportSecurity +0 -1
  516. package/dist/run-chrome-profile/Default/Trust Tokens +0 -0
  517. package/dist/run-chrome-profile/Default/Trust Tokens-journal +0 -0
  518. package/dist/run-chrome-profile/Default/Visited Links +0 -0
  519. package/dist/run-chrome-profile/Default/Web Data +0 -0
  520. package/dist/run-chrome-profile/Default/Web Data-journal +0 -0
  521. package/dist/run-chrome-profile/Default/WebStorage/QuotaManager +0 -0
  522. package/dist/run-chrome-profile/Default/WebStorage/QuotaManager-journal +0 -0
  523. package/dist/run-chrome-profile/Default/chrome_cart_db/LOCK +0 -0
  524. package/dist/run-chrome-profile/Default/chrome_cart_db/LOG +0 -0
  525. package/dist/run-chrome-profile/Default/chrome_cart_db/LOG.old +0 -0
  526. package/dist/run-chrome-profile/Default/commerce_subscription_db/LOCK +0 -0
  527. package/dist/run-chrome-profile/Default/commerce_subscription_db/LOG +0 -0
  528. package/dist/run-chrome-profile/Default/commerce_subscription_db/LOG.old +0 -0
  529. package/dist/run-chrome-profile/Default/discounts_db/LOCK +0 -0
  530. package/dist/run-chrome-profile/Default/discounts_db/LOG +0 -0
  531. package/dist/run-chrome-profile/Default/discounts_db/LOG.old +0 -0
  532. package/dist/run-chrome-profile/Default/heavy_ad_intervention_opt_out.db +0 -0
  533. package/dist/run-chrome-profile/Default/heavy_ad_intervention_opt_out.db-journal +0 -0
  534. package/dist/run-chrome-profile/Default/optimization_guide_hint_cache_store/LOCK +0 -0
  535. package/dist/run-chrome-profile/Default/optimization_guide_hint_cache_store/LOG +0 -0
  536. package/dist/run-chrome-profile/Default/optimization_guide_hint_cache_store/LOG.old +0 -0
  537. package/dist/run-chrome-profile/Default/parcel_tracking_db/LOCK +0 -0
  538. package/dist/run-chrome-profile/Default/parcel_tracking_db/LOG +0 -0
  539. package/dist/run-chrome-profile/Default/parcel_tracking_db/LOG.old +0 -0
  540. package/dist/run-chrome-profile/Default/passkey_enclave_state +0 -1
  541. package/dist/run-chrome-profile/Default/shared_proto_db/000003.log +0 -0
  542. package/dist/run-chrome-profile/Default/shared_proto_db/CURRENT +0 -1
  543. package/dist/run-chrome-profile/Default/shared_proto_db/LOCK +0 -0
  544. package/dist/run-chrome-profile/Default/shared_proto_db/LOG +0 -3
  545. package/dist/run-chrome-profile/Default/shared_proto_db/LOG.old +0 -3
  546. package/dist/run-chrome-profile/Default/shared_proto_db/MANIFEST-000001 +0 -0
  547. package/dist/run-chrome-profile/Default/shared_proto_db/metadata/000003.log +0 -0
  548. package/dist/run-chrome-profile/Default/shared_proto_db/metadata/CURRENT +0 -1
  549. package/dist/run-chrome-profile/Default/shared_proto_db/metadata/LOCK +0 -0
  550. package/dist/run-chrome-profile/Default/shared_proto_db/metadata/LOG +0 -3
  551. package/dist/run-chrome-profile/Default/shared_proto_db/metadata/LOG.old +0 -3
  552. package/dist/run-chrome-profile/Default/shared_proto_db/metadata/MANIFEST-000001 +0 -0
  553. package/dist/run-chrome-profile/Default/trusted_vault.pb +0 -2
  554. package/dist/run-chrome-profile/GrShaderCache/data_0 +0 -0
  555. package/dist/run-chrome-profile/GrShaderCache/data_1 +0 -0
  556. package/dist/run-chrome-profile/GrShaderCache/data_2 +0 -0
  557. package/dist/run-chrome-profile/GrShaderCache/data_3 +0 -0
  558. package/dist/run-chrome-profile/GrShaderCache/index +0 -0
  559. package/dist/run-chrome-profile/GraphiteDawnCache/data_0 +0 -0
  560. package/dist/run-chrome-profile/GraphiteDawnCache/data_1 +0 -0
  561. package/dist/run-chrome-profile/GraphiteDawnCache/data_2 +0 -0
  562. package/dist/run-chrome-profile/GraphiteDawnCache/data_3 +0 -0
  563. package/dist/run-chrome-profile/GraphiteDawnCache/f_000001 +0 -0
  564. package/dist/run-chrome-profile/GraphiteDawnCache/f_000002 +0 -0
  565. package/dist/run-chrome-profile/GraphiteDawnCache/f_000003 +0 -0
  566. package/dist/run-chrome-profile/GraphiteDawnCache/f_000004 +0 -0
  567. package/dist/run-chrome-profile/GraphiteDawnCache/index +0 -0
  568. package/dist/run-chrome-profile/Last Version +0 -1
  569. package/dist/run-chrome-profile/Local State +0 -1
  570. package/dist/run-chrome-profile/ShaderCache/data_0 +0 -0
  571. package/dist/run-chrome-profile/ShaderCache/data_1 +0 -0
  572. package/dist/run-chrome-profile/ShaderCache/data_2 +0 -0
  573. package/dist/run-chrome-profile/ShaderCache/data_3 +0 -0
  574. package/dist/run-chrome-profile/ShaderCache/index +0 -0
  575. package/dist/run-chrome-profile/Variations +0 -1
  576. package/dist/run-chrome-profile/first_party_sets.db +0 -0
  577. package/dist/run-chrome-profile/first_party_sets.db-journal +0 -0
  578. package/dist/run-chrome-profile/optimization_guide_model_store/13/E6DC4029A1E4B4C1/3CF18F0F16C8CE09/model-info.pb +0 -1
  579. package/dist/run-chrome-profile/optimization_guide_model_store/13/E6DC4029A1E4B4C1/3CF18F0F16C8CE09/model.tflite +0 -0
  580. package/dist/run-chrome-profile/optimization_guide_model_store/15/E6DC4029A1E4B4C1/D5BCEC4E5AAF74EA/VERSION.txt +0 -4
  581. package/dist/run-chrome-profile/optimization_guide_model_store/15/E6DC4029A1E4B4C1/D5BCEC4E5AAF74EA/model-info.pb +0 -0
  582. package/dist/run-chrome-profile/optimization_guide_model_store/15/E6DC4029A1E4B4C1/D5BCEC4E5AAF74EA/model.tflite +0 -0
  583. package/dist/run-chrome-profile/optimization_guide_model_store/15/E6DC4029A1E4B4C1/D5BCEC4E5AAF74EA/override_list.pb.gz +0 -0
  584. package/dist/run-chrome-profile/optimization_guide_model_store/2/E6DC4029A1E4B4C1/52963069BD02697B/model-info.pb +0 -1
  585. package/dist/run-chrome-profile/optimization_guide_model_store/2/E6DC4029A1E4B4C1/52963069BD02697B/model.tflite +0 -0
  586. package/dist/run-chrome-profile/optimization_guide_model_store/20/E6DC4029A1E4B4C1/AEDAEAFE1BA40A26/model-info.pb +0 -0
  587. package/dist/run-chrome-profile/optimization_guide_model_store/20/E6DC4029A1E4B4C1/AEDAEAFE1BA40A26/model.tflite +0 -0
  588. package/dist/run-chrome-profile/optimization_guide_model_store/24/E6DC4029A1E4B4C1/7C893FFC02F661B8/enus_denylist_encoded_241007.txt +0 -580
  589. package/dist/run-chrome-profile/optimization_guide_model_store/24/E6DC4029A1E4B4C1/7C893FFC02F661B8/model-info.pb +0 -5
  590. package/dist/run-chrome-profile/optimization_guide_model_store/24/E6DC4029A1E4B4C1/7C893FFC02F661B8/model.tflite +0 -0
  591. package/dist/run-chrome-profile/optimization_guide_model_store/24/E6DC4029A1E4B4C1/7C893FFC02F661B8/vocab_en-us.txt +0 -303
  592. package/dist/run-chrome-profile/optimization_guide_model_store/25/E6DC4029A1E4B4C1/F87CF299C0E14D75/model-info.pb +0 -0
  593. package/dist/run-chrome-profile/optimization_guide_model_store/25/E6DC4029A1E4B4C1/F87CF299C0E14D75/model.tflite +0 -0
  594. package/dist/run-chrome-profile/optimization_guide_model_store/25/E6DC4029A1E4B4C1/F87CF299C0E14D75/visual_model_desktop.tflite +0 -0
  595. package/dist/run-chrome-profile/optimization_guide_model_store/26/E6DC4029A1E4B4C1/92C138FC1F6BC7A5/model-info.pb +0 -0
  596. package/dist/run-chrome-profile/optimization_guide_model_store/26/E6DC4029A1E4B4C1/92C138FC1F6BC7A5/model.tflite +0 -0
  597. package/dist/run-chrome-profile/optimization_guide_model_store/45/E6DC4029A1E4B4C1/99FA23F9C3B6B1E9/model-info.pb +0 -0
  598. package/dist/run-chrome-profile/optimization_guide_model_store/45/E6DC4029A1E4B4C1/99FA23F9C3B6B1E9/model.tflite +0 -0
  599. package/dist/run-chrome-profile/optimization_guide_model_store/9/E6DC4029A1E4B4C1/201FE93993560CC9/model-info.pb +0 -0
  600. package/dist/run-chrome-profile/optimization_guide_model_store/9/E6DC4029A1E4B4C1/201FE93993560CC9/model.tflite +0 -0
  601. package/dist/run-chrome-profile/segmentation_platform/ukm_db +0 -0
  602. package/dist/run-chrome-profile/segmentation_platform/ukm_db-wal +0 -0
  603. package/dist/tailwind.config.js +0 -25
  604. /package/dist/{minimum-script-file.mjs → webpack/plugin-extension/feature-scripts/steps/minimum-content-file.d.ts} +0 -0
  605. /package/dist/{run-chrome-profile/Default/Affiliation Database-journal → webpack/plugin-reload/steps/setup-chromium-reload-client/minimum-chromium-file.d.ts} +0 -0
  606. /package/dist/{run-chrome-profile/Default/AutofillStrikeDatabase/LOCK → webpack/plugin-reload/steps/setup-firefox-reload-client/minimum-firefox-file.d.ts} +0 -0
@@ -3,10 +3,7 @@
3
3
  <head>
4
4
  <title>Welcome!</title>
5
5
  <meta charset="UTF-8" />
6
- <link
7
- rel="icon"
8
- href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🧩</text></svg>"
9
- />
6
+ <link rel="icon" type="image/png" href="../images/logo.png" />
10
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
8
  <link rel="stylesheet" href="./sakura.css" media="screen" />
12
9
  <link
@@ -37,8 +34,8 @@
37
34
  <a target="_blank" href="https://github.com/cezaraugusto/extension"
38
35
  >🧩 Extension.js</a
39
36
  >
40
- is a development tool for browser extensions with built-in support for
41
- TypeScript, WebAssembly, React, and modern JavaScript.
37
+ is a development toolkit for building cross-browser extensions with
38
+ modern web technologies.
42
39
  </p>
43
40
  <button id="learnMore">
44
41
  🧩 Learn more about developing cross-browser extensions
@@ -1,44 +1,74 @@
1
1
  const TEN_SECONDS_MS = 10 * 1000
2
+ const INSTANT_MS = 100
2
3
  let webSocket = null
3
4
 
5
+ // Get instance ID from the service worker context
6
+ const instanceId = '__INSTANCE_ID__'
7
+
4
8
  export async function connect() {
5
9
  if (webSocket) {
6
10
  // If already connected, do nothing
7
11
  return
8
12
  }
9
13
 
10
- webSocket = new WebSocket('ws://localhost:__RELOAD_PORT__')
14
+ // Get port from the placeholder that will be replaced during build
15
+ const port = '__RELOAD_PORT__'
11
16
 
12
- webSocket.onerror = (event) => {
13
- console.error(`[Reload Service] Connection error: ${JSON.stringify(event)}`)
14
- webSocket.close()
15
- }
16
-
17
- webSocket.onopen = () => {
18
- console.info(`[Reload Service] Connection opened.`)
19
- }
17
+ let reconnectAttempts = 0
18
+ const maxReconnectAttempts = 10
19
+ const baseBackoffMs = 250
20
+ const maxBackoffMs = 5000
20
21
 
21
- webSocket.onmessage = async (event) => {
22
- const message = JSON.parse(event.data)
22
+ const establish = () => {
23
+ webSocket = new WebSocket(`ws://127.0.0.1:${port}`)
23
24
 
24
- if (message.status === 'serverReady') {
25
- console.info('[Reload Service] Connection ready.')
26
- await requestInitialLoadData()
25
+ webSocket.onerror = (_event) => {
26
+ try {
27
+ webSocket && webSocket.close()
28
+ } catch {}
27
29
  }
28
30
 
29
- if (message.changedFile) {
31
+ webSocket.onopen = () => {
32
+ reconnectAttempts = 0
30
33
  console.info(
31
- `[Reload Service] Changes detected on ${message.changedFile}. Reloading extension...`
34
+ `[Extension.js] Connection opened. Listening on port ${port} for instance ${instanceId}...`
32
35
  )
36
+ }
37
+
38
+ let reloadDebounce
39
+ webSocket.onmessage = async (event) => {
40
+ const message = JSON.parse(event.data)
41
+
42
+ // Only process messages for this instance
43
+ if (message.instanceId && message.instanceId !== instanceId) {
44
+ return
45
+ }
33
46
 
34
- await messageAllExtensions(message.changedFile)
47
+ if (message.status === 'serverReady') {
48
+ await requestInitialLoadData()
49
+ }
50
+
51
+ if (message.changedFile) {
52
+ clearTimeout(reloadDebounce)
53
+ reloadDebounce = setTimeout(async () => {
54
+ await hardReloadAllExtensions(message.changedFile)
55
+ }, 200)
56
+ }
35
57
  }
36
- }
37
58
 
38
- webSocket.onclose = () => {
39
- console.info('[Reload Service] Connection closed.')
40
- webSocket = null
59
+ webSocket.onclose = () => {
60
+ webSocket = null
61
+ if (reconnectAttempts >= maxReconnectAttempts) return
62
+ reconnectAttempts++
63
+ const backoff = Math.min(
64
+ maxBackoffMs,
65
+ baseBackoffMs * 2 ** reconnectAttempts
66
+ )
67
+ setTimeout(establish, backoff)
68
+ }
41
69
  }
70
+
71
+ establish()
42
72
  }
43
73
 
44
74
  export function disconnect() {
@@ -47,6 +77,33 @@ export function disconnect() {
47
77
  }
48
78
  }
49
79
 
80
+ async function requestInitialLoadData() {
81
+ const devExtensions = await getDevExtensions()
82
+
83
+ for (const extension of devExtensions) {
84
+ try {
85
+ const response = await chrome.runtime.sendMessage(extension.id, {
86
+ initialLoadData: true
87
+ })
88
+
89
+ if (response) {
90
+ // Send the response back to the server with instance ID
91
+ webSocket.send(
92
+ JSON.stringify({
93
+ status: 'clientReady',
94
+ instanceId: instanceId,
95
+ data: response
96
+ })
97
+ )
98
+ }
99
+ } catch (error) {
100
+ console.error(
101
+ `Error sending message to ${extension.id}: ${error.message}`
102
+ )
103
+ }
104
+ }
105
+ }
106
+
50
107
  async function getDevExtensions() {
51
108
  const allExtensions = await new Promise((resolve) => {
52
109
  chrome.management.getAll(resolve)
@@ -56,24 +113,34 @@ async function getDevExtensions() {
56
113
  return (
57
114
  // Do not include itself
58
115
  extension.id !== chrome.runtime.id &&
59
- // Manager extension
60
- extension.id !== 'hkklidinfhnfidkjiknmmbmcloigimco' &&
116
+ // Reload extension
117
+ extension.id !== 'igcijhgmihmjbbahdabahfbpffalcfnn' &&
61
118
  // Show only unpackaged extensions
62
119
  extension.installType === 'development'
63
120
  )
64
121
  })
65
122
  }
66
123
 
67
- async function messageAllExtensions(changedFile) {
68
- // Check if the external extension is ready
69
- const isExtensionReady = await checkExtensionReadiness()
124
+ async function hardReloadAllExtensions(changedFile) {
125
+ // For critical files like manifest.json, skip the long delay
126
+ const isCriticalFile =
127
+ changedFile === 'manifest.json' ||
128
+ changedFile === 'service_worker' ||
129
+ changedFile === 'declarative_net_request'
130
+
131
+ // Check if the external extension is ready with optimized timing
132
+ const isExtensionReady = await checkExtensionReadiness(isCriticalFile)
70
133
 
71
134
  if (isExtensionReady) {
72
135
  const devExtensions = await getDevExtensions()
73
- const reloadAll = devExtensions.map((extension) => {
136
+ const reloadAll = devExtensions.map(async (extension) => {
137
+ await hardReloadExtension(extension.id)
138
+
74
139
  chrome.runtime.sendMessage(extension.id, {changedFile}, (response) => {
75
140
  if (response) {
76
- console.info('[Reload Service] Extension reloaded and ready.')
141
+ console.info(
142
+ `[Extension.js] Extension reloaded and ready for instance ${instanceId}.`
143
+ )
77
144
  }
78
145
  })
79
146
 
@@ -82,51 +149,22 @@ async function messageAllExtensions(changedFile) {
82
149
 
83
150
  await Promise.all(reloadAll)
84
151
  } else {
85
- console.info('[Reload Service] External extension is not ready.')
152
+ console.info(
153
+ `[Extension.js] External extension is not ready for instance ${instanceId}.`
154
+ )
86
155
  }
87
156
  }
88
157
 
89
- async function requestInitialLoadData() {
90
- const devExtensions = await getDevExtensions()
158
+ async function checkExtensionReadiness(isCriticalFile = false) {
159
+ return new Promise((resolve) => {
160
+ // For critical files like manifest.json, use minimal delay
161
+ // For regular files, use longer delay to ensure stability
162
+ const delay = isCriticalFile ? INSTANT_MS : TEN_SECONDS_MS
91
163
 
92
- const messagePromises = devExtensions.map(async (extension) => {
93
- return await new Promise((resolve) => {
94
- chrome.runtime.sendMessage(
95
- extension.id,
96
- {initialLoadData: true},
97
- (response) => {
98
- if (chrome.runtime.lastError) {
99
- console.error(
100
- `Error sending message to ${extension.id}: ${chrome.runtime.lastError.message}`
101
- )
102
- resolve(null)
103
- } else {
104
- resolve(response)
105
- }
106
- }
107
- )
108
- })
164
+ setTimeout(() => {
165
+ resolve(true)
166
+ }, delay)
109
167
  })
110
-
111
- const responses = await Promise.all(messagePromises)
112
-
113
- // We received the info from the use extension.
114
- // All good, client is ready. Inform the server.
115
- if (webSocket && webSocket.readyState === WebSocket.OPEN) {
116
- const message = JSON.stringify({
117
- status: 'clientReady',
118
- data: responses[0]
119
- })
120
-
121
- webSocket.send(message)
122
- }
123
- }
124
-
125
- async function checkExtensionReadiness() {
126
- // Delay for 1 second
127
- await delay(1000)
128
- // Assume the extension is ready
129
- return true
130
168
  }
131
169
 
132
170
  async function delay(ms) {
@@ -137,9 +175,125 @@ export function keepAlive() {
137
175
  const keepAliveIntervalId = setInterval(() => {
138
176
  if (webSocket) {
139
177
  webSocket.send(JSON.stringify({status: 'ping'}))
140
- console.info('[Reload Service] Listening for changes...')
178
+ console.info('[Extension.js] Listening for changes...')
141
179
  } else {
142
180
  clearInterval(keepAliveIntervalId)
143
181
  }
144
182
  }, TEN_SECONDS_MS)
145
183
  }
184
+
185
+ // Smart reload strategy: Try standard method first, fallback to CDP if needed
186
+ async function hardReloadExtension(extensionId) {
187
+ try {
188
+ // Try the standard enable/disable reload first (feels natural)
189
+ await chrome.management.setEnabled(extensionId, false)
190
+ await chrome.management.setEnabled(extensionId, true)
191
+
192
+ // Verify it worked with a simple health check
193
+ const isHealthy = await verifyExtensionHealth(extensionId)
194
+ if (isHealthy) {
195
+ console.info(
196
+ `[Extension.js] Standard reload successful for ${extensionId}`
197
+ )
198
+ return true
199
+ }
200
+
201
+ // If we get here, the reload "succeeded" but extension isn't healthy
202
+ throw new Error('Extension reloaded but not responding')
203
+ } catch (error) {
204
+ console.warn(
205
+ `[Extension.js] Standard reload failed for ${extensionId}, trying CDP fallback: ${error.message}`
206
+ )
207
+
208
+ // Only use CDP when the natural approach fails
209
+ return await attemptCDPFallback(extensionId)
210
+ }
211
+ }
212
+
213
+ // CDP fallback for when standard reload fails
214
+ async function attemptCDPFallback(extensionId) {
215
+ try {
216
+ // Get extension info to find its source path
217
+ const extensionInfo = await new Promise((resolve) => {
218
+ chrome.management.get(extensionId, resolve)
219
+ })
220
+
221
+ if (!extensionInfo || !extensionInfo.path) {
222
+ console.warn(
223
+ `[Extension.js] No path info for ${extensionId}, CDP fallback not possible`
224
+ )
225
+ return false
226
+ }
227
+
228
+ // Use CDP client directly for seamless fallback
229
+ const cdpClient = await getCDPClient()
230
+ if (!cdpClient) {
231
+ console.warn(`[Extension.js] CDP client not available for ${extensionId}`)
232
+ return false
233
+ }
234
+
235
+ // Use CDP to force reload the extension
236
+ const success = await cdpClient.forceReloadExtension(extensionId)
237
+ if (success) {
238
+ console.info(`[Extension.js] CDP fallback successful for ${extensionId}`)
239
+ return true
240
+ } else {
241
+ console.warn(`[Extension.js] CDP fallback failed for ${extensionId}`)
242
+ return false
243
+ }
244
+ } catch (cdpError) {
245
+ console.error(
246
+ `[Extension.js] CDP fallback also failed for ${extensionId}: ${cdpError.message}`
247
+ )
248
+ return false
249
+ }
250
+ }
251
+
252
+ // Get CDP client instance
253
+ // This will be injected by the build process
254
+ async function getCDPClient() {
255
+ try {
256
+ // The CDP client will be available globally when injected
257
+ if (typeof window !== 'undefined' && window.cdpClient) {
258
+ return window.cdpClient
259
+ }
260
+
261
+ // Fallback for service worker context
262
+ if (typeof globalThis !== 'undefined' && globalThis.cdpClient) {
263
+ return globalThis.cdpClient
264
+ }
265
+
266
+ console.warn(`[Extension.js] CDP client not found in global scope`)
267
+ return null
268
+ } catch (error) {
269
+ console.warn(`[Extension.js] Failed to get CDP client: ${error.message}`)
270
+ return null
271
+ }
272
+ }
273
+
274
+ // Simple health check to verify extension is responsive
275
+ async function verifyExtensionHealth(extensionId) {
276
+ try {
277
+ // Simple ping to see if extension responds
278
+ await new Promise((resolve, reject) => {
279
+ const timeout = setTimeout(() => {
280
+ reject(new Error('Health check timeout'))
281
+ }, 2000)
282
+
283
+ chrome.runtime.sendMessage(extensionId, {type: 'PING'}, (response) => {
284
+ clearTimeout(timeout)
285
+ if (chrome.runtime.lastError) {
286
+ reject(new Error(chrome.runtime.lastError.message))
287
+ } else {
288
+ resolve(response)
289
+ }
290
+ })
291
+ })
292
+ return true
293
+ } catch (error) {
294
+ console.warn(
295
+ `[Extension.js] Health check failed for ${extensionId}: ${error.message}`
296
+ )
297
+ return false
298
+ }
299
+ }
@@ -1,8 +1,7 @@
1
- import {handleFirstRun} from './define-initial-tab.js'
2
- import {connect, disconnect} from './reload-service.js'
1
+ // Raw background: rely on global-scope functions provided by included scripts
3
2
 
4
3
  function bgGreen(str) {
5
- return `background: #0A0C10; color: #26FFB8; ${str}`
4
+ return `background: transparent; color: #0971fe; ${str}`
6
5
  }
7
6
 
8
7
  async function handleTabOnExtensionLoad() {
@@ -39,19 +38,48 @@ MIT (c) ${new Date().getFullYear()} - Cezar Augusto and the Extension.js Authors
39
38
  try {
40
39
  await handleFirstRun()
41
40
  } catch (error) {
42
- console.error('Error handling tabs on extension load:', error)
41
+ console.error(
42
+ '[Extension.js] Error handling tabs on extension load:',
43
+ error
44
+ )
43
45
  }
46
+ try {
47
+ const [initialTab] = await browser.tabs.query({
48
+ active: true,
49
+ currentWindow: true
50
+ })
51
+ if (initialTab) {
52
+ await createFirefoxAddonsTab(initialTab, 'about:blank')
53
+ }
54
+ } catch {}
44
55
  }
45
56
 
57
+ // Run on install and on startup to ensure welcome/connection behavior is reliable
46
58
  browser.runtime.onInstalled.addListener(async () => {
47
- await handleTabOnExtensionLoad()
48
-
49
- let isConnected = false
59
+ try {
60
+ await handleFirstRun()
61
+ } catch {}
62
+ try {
63
+ await handleTabOnExtensionLoad()
64
+ } catch {}
65
+ try {
66
+ await connect()
67
+ } catch {}
68
+ })
50
69
 
51
- if (isConnected) {
52
- disconnect()
53
- } else {
70
+ browser.runtime.onStartup.addListener(async () => {
71
+ try {
72
+ await handleFirstRun()
73
+ } catch {}
74
+ try {
75
+ await handleTabOnExtensionLoad()
76
+ } catch {}
77
+ try {
54
78
  await connect()
55
- isConnected = true
56
- }
79
+ } catch {}
57
80
  })
81
+
82
+ // Attempt immediate connection for resilience
83
+ try {
84
+ connect()
85
+ } catch {}
@@ -4,24 +4,22 @@ async function getDevExtension() {
4
4
  return allExtensions.filter((extension) => {
5
5
  return (
6
6
  // Reload extension
7
- extension.name !== 'Extension Manager' &&
8
- // Show only unpackaged extensions
9
- extension.installType === 'development'
7
+ extension.name !== 'Extension.js DevTools' &&
8
+ // Show only unpackaged extensions (Firefox reports "temporary")
9
+ (extension.installType === 'development' ||
10
+ extension.installType === 'temporary')
10
11
  )
11
12
  })[0]
12
13
  }
13
14
 
14
15
  // Create a new tab and set it to background.
15
- export async function createFirefoxAddonsTab(initialTab, url) {
16
+ async function createFirefoxAddonsTab(initialTab, url) {
16
17
  try {
17
- // Check if an about:blank tab is already open
18
- const tabs = await browser.tabs.query({url: 'about:blank'})
19
- const addonsTabExist = tabs.length > 0
18
+ // If a tab with the desired URL already exists, do nothing
19
+ const existing = await browser.tabs.query({url})
20
+ if (existing && existing.length > 0) return
20
21
 
21
- // Return if url exists, meaning about:blank tab is already open
22
- if (addonsTabExist) return
23
-
24
- // Create an inactive about:blank tab
22
+ // Create an inactive tab with the requested URL
25
23
  const addonsTab = await browser.tabs.create({url, active: false})
26
24
 
27
25
  // Get the initial page tab and move the new addons tab to the first position.
@@ -36,7 +34,7 @@ export async function createFirefoxAddonsTab(initialTab, url) {
36
34
  }
37
35
 
38
36
  // Function to handle first run logic
39
- export async function handleFirstRun() {
37
+ async function handleFirstRun() {
40
38
  try {
41
39
  const devExtension = await getDevExtension()
42
40
 
@@ -1,11 +1,10 @@
1
1
  {
2
- "name": "Extension Manager",
3
- "description": "Extension.js developer tools for tabs and reload management.",
4
- "version": "1.0",
2
+ "name": "Extension.js DevTools",
3
+ "description": "Extension.js built-in developer tools for browser instance ID __INSTANCE_ID__",
4
+ "version": "1.0.0",
5
5
  "manifest_version": 2,
6
6
  "background": {
7
- "scripts": ["background.js"],
8
- "type": "module"
7
+ "scripts": ["define-initial-tab.js", "reload-service.js", "background.js"]
9
8
  },
10
9
  "icons": {
11
10
  "16": "images/logo.png",
@@ -3,10 +3,7 @@
3
3
  <head>
4
4
  <title>Welcome!</title>
5
5
  <meta charset="UTF-8" />
6
- <link
7
- rel="icon"
8
- href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🧩</text></svg>"
9
- />
6
+ <link rel="icon" type="image/png" href="../images/logo.png" />
10
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
8
  <link rel="stylesheet" href="./sakura.css" media="screen" />
12
9
  <link
@@ -37,8 +34,8 @@
37
34
  <a target="_blank" href="https://github.com/cezaraugusto/extension"
38
35
  >🧩 Extension.js</a
39
36
  >
40
- is a development tool for browser extensions with built-in support for
41
- TypeScript, WebAssembly, React, and modern JavaScript.
37
+ is a development toolkit for building cross-browser extensions with
38
+ modern web technologies.
42
39
  </p>
43
40
  <button id="learnMore">
44
41
  🧩 Learn more about developing cross-browser extensions