extension-develop 2.0.0 → 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 (260) 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-chromium-reload-client/minimum-chromium-file.d.ts +0 -0
  232. package/dist/webpack/plugin-reload/steps/setup-firefox-reload-client/index.d.ts +3 -0
  233. package/dist/webpack/plugin-reload/steps/setup-firefox-reload-client/inject-firefox-client-loader.d.ts +9 -0
  234. package/dist/webpack/plugin-reload/steps/setup-firefox-reload-client/minimum-firefox-file.d.ts +0 -0
  235. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/index.d.ts +9 -0
  236. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-background.d.ts +15 -0
  237. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-csp.d.ts +5 -0
  238. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-externally-connectable.d.ts +10 -0
  239. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-web-resources.d.ts +10 -0
  240. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/generate-manager-extension.d.ts +15 -0
  241. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/index.d.ts +10 -0
  242. package/dist/webpack/plugin-reload/steps/setup-reload-strategy/target-web-extension-plugin/index.d.ts +13 -0
  243. package/dist/webpack/plugin-static-assets/index.d.ts +12 -0
  244. package/dist/webpack/webpack-config.d.ts +14 -0
  245. package/dist/webpack/webpack-lib/auto-exit.d.ts +1 -0
  246. package/dist/webpack/webpack-lib/constants.d.ts +4 -0
  247. package/dist/webpack/webpack-lib/messages.d.ts +121 -0
  248. package/dist/webpack/webpack-lib/port-manager.d.ts +27 -0
  249. package/dist/webpack/webpack-lib/utils.d.ts +20 -0
  250. package/dist/webpack/webpack-types.d.ts +49 -0
  251. package/package.json +64 -29
  252. package/dist/depreacated-shadow-root.js +0 -34
  253. package/dist/inject-content-css-during-dev.js +0 -10
  254. package/dist/minimum-chromium-file.mjs +0 -1
  255. package/dist/minimum-content-file.mjs +0 -1
  256. package/dist/minimum-firefox-file.mjs +0 -1
  257. package/dist/resolver-loader.js +0 -1
  258. package/dist/resolver-module.mjs +0 -1
  259. package/dist/tailwind.config.js +0 -25
  260. /package/dist/{minimum-script-file.mjs → webpack/plugin-extension/feature-scripts/steps/minimum-content-file.d.ts} +0 -0
@@ -1,4 +1,96 @@
1
- "use strict";var b=Object.create;var f=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var r in e)f(t,r,{get:e[r],enumerable:!0})},m=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of v(e))!j.call(t,s)&&s!==r&&f(t,s,{get:()=>e[s],enumerable:!(o=k(e,s))||o.enumerable});return t};var d=(t,e,r)=>(r=t!=null?b(S(t)):{},m(e||!t||!t.__esModule?f(r,"default",{value:t,enumerable:!0}):r,t)),P=t=>m(f({},"__esModule",{value:!0}),t);var D={};y(D,{default:()=>x});module.exports=P(D);var u=d(require("fs")),c=d(require("path")),l=require("loader-utils"),g=require("schema-utils");function $(t){let e=c.default.join(t,"package.json");if(!u.default.existsSync(e))return!1;let r=JSON.parse(u.default.readFileSync(e,"utf-8")),o=["react","vue","@angular/core","svelte","solid-js","preact"],s=r.dependencies||{},a=r.devDependencies||{};for(let n of o)if(s[n]||a[n])return!0;return!1}var w={type:"object",properties:{test:{type:"string"},manifestPath:{type:"string"},mode:{type:"string"}}};function x(t){let e=this.getOptions(),r=e.manifestPath,o=c.default.dirname(r),s=require(r);(0,g.validate)(w,e,{name:"scripts:add-hmr-accept-code",baseDataPath:"options"});let a=(0,l.urlToRequest)(this.resourcePath),n=`
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.d = (exports1, definition)=>{
14
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
+ enumerable: true,
16
+ get: definition[key]
17
+ });
18
+ };
19
+ })();
20
+ (()=>{
21
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
22
+ })();
23
+ (()=>{
24
+ __webpack_require__.r = (exports1)=>{
25
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
26
+ value: 'Module'
27
+ });
28
+ Object.defineProperty(exports1, '__esModule', {
29
+ value: true
30
+ });
31
+ };
32
+ })();
33
+ var __webpack_exports__ = {};
34
+ __webpack_require__.r(__webpack_exports__);
35
+ __webpack_require__.d(__webpack_exports__, {
36
+ default: ()=>add_hmr_accept_code
37
+ });
38
+ const external_fs_namespaceObject = require("fs");
39
+ var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
40
+ const external_path_namespaceObject = require("path");
41
+ var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
42
+ const external_loader_utils_namespaceObject = require("loader-utils");
43
+ const external_schema_utils_namespaceObject = require("schema-utils");
44
+ const schema = {
45
+ type: 'object',
46
+ properties: {
47
+ test: {
48
+ type: 'string'
49
+ },
50
+ manifestPath: {
51
+ type: 'string'
52
+ },
53
+ mode: {
54
+ type: 'string'
55
+ }
56
+ }
57
+ };
58
+ function add_hmr_accept_code(source) {
59
+ const options = this.getOptions();
60
+ const manifestPath = options.manifestPath;
61
+ const projectPath = external_path_default().dirname(manifestPath);
62
+ const manifest = JSON.parse(external_fs_default().readFileSync(manifestPath, 'utf-8'));
63
+ (0, external_schema_utils_namespaceObject.validate)(schema, options, {
64
+ name: "scripts:add-hmr-accept-code",
65
+ baseDataPath: 'options'
66
+ });
67
+ const url = (0, external_loader_utils_namespaceObject.urlToRequest)(this.resourcePath);
68
+ const reloadCode = `
2
69
  // TODO: cezaraugusto re-visit this
3
- // if (import.meta.webpackHot) { import.meta.webpackHot.accept() };
4
- `;if(s.background&&s.background.scripts)for(let i of s.background.scripts){let p=c.default.resolve(o,i);if(a.includes(p))return`${n}${t}`}if(s.content_scripts&&!$(o)){for(let i of s.content_scripts)if(i.js)for(let p of i.js){let h=c.default.resolve(o,p);if(a.includes(h))return`${n}${t}`}}if(s.user_scripts)for(let i of s.user_scripts){let p=c.default.resolve(o,i);if(a.includes(p))return`${n}${t}`}return t}
70
+ if (import.meta.webpackHot) { import.meta.webpackHot.accept() };
71
+ `;
72
+ if (manifest.background) {
73
+ if (manifest.background.scripts) for (const bgScript of manifest.background.scripts){
74
+ const absoluteUrl = external_path_default().resolve(projectPath, bgScript);
75
+ if (url.includes(absoluteUrl)) return `${reloadCode}${source}`;
76
+ }
77
+ }
78
+ if (manifest.content_scripts) {
79
+ for (const contentScript of manifest.content_scripts)if (contentScript.js) for (const js of contentScript.js){
80
+ const absoluteUrl = external_path_default().resolve(projectPath, js);
81
+ if (url.includes(absoluteUrl)) return `${reloadCode}${source}`;
82
+ }
83
+ }
84
+ if (manifest.user_scripts) for (const userScript of manifest.user_scripts){
85
+ const absoluteUrl = external_path_default().resolve(projectPath, userScript);
86
+ if (url.includes(absoluteUrl)) return `${reloadCode}${source}`;
87
+ }
88
+ return source;
89
+ }
90
+ exports["default"] = __webpack_exports__["default"];
91
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
92
+ "default"
93
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
94
+ Object.defineProperty(exports, '__esModule', {
95
+ value: true
96
+ });
@@ -0,0 +1,2 @@
1
+ import { BuildOptions } from './develop-lib/config-types';
2
+ export declare function extensionBuild(pathOrRemoteUrl: string | undefined, buildOptions?: BuildOptions): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function cleanupCommand(): Promise<void>;
@@ -1,16 +1,96 @@
1
- "use strict";var y=Object.create;var i=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var T=(e,n)=>{for(var r in n)i(e,r,{get:n[r],enumerable:!0})},l=(e,n,r,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of b(n))!v.call(e,o)&&o!==r&&i(e,o,{get:()=>n[o],enumerable:!(s=E(n,o))||s.enumerable});return e};var a=(e,n,r)=>(r=e!=null?y(w(e)):{},l(n||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),S=e=>l(i({},"__esModule",{value:!0}),e);var k={};T(k,{default:()=>I});module.exports=S(k);var c=a(require("path")),f=require("loader-utils"),m=require("schema-utils");var F=a(require("path")),t=require("@colors/colors/safe");var p=a(require("path")),O=p.default.join(process.cwd(),"node_modules/extension-develop/dist/certs"),N=["chrome","edge"],R=["firefox"],U=[...N,...R];var M=require("console");function _(e,n){return n==="error"?`${(0,t.bold)((0,t.red)("ERROR"))} in ${e} ${(0,t.red)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")}`:n==="warn"?`${e} ${(0,t.brightYellow)("\u2716\uFE0E\u2716\uFE0E\u2716\uFE0E")}`:`${n==="info"?(0,t.cyan)("\u25BA\u25BA\u25BA"):(0,t.brightGreen)("\u25BA\u25BA\u25BA")} ${(0,t.cyan)(e)}`}function d(){return`${_("DEPRECATION","warn")} Using ${(0,t.brightYellow)("window.__EXTENSION_SHADOW_ROOT__")} in content_scripts is deprecated
2
- and will be removed in a future version of Extension.js. To use content_scripts with
3
- the shadow DOM, see one of the many examples at:
4
- https://github.com/extension-js/extension.js/tree/main/examples
5
-
6
- If you really need to use the shadow DOM as-is, the latest version of Extension.js
7
- to support it is extension@2.0.0-beta.9.
8
- `}var D={type:"object",properties:{test:{type:"string"},manifestPath:{type:"string"}}};function I(e){let n=this.getOptions(),r=n.manifestPath,s=c.default.dirname(r),o=require(r);(0,m.validate)(D,n,{name:"scripts:deprecated-shadow-root",baseDataPath:"options"});let $=(0,f.urlToRequest)(this.resourcePath),h=`
9
- ;const appendStyleElementForLegacyShadowRoot = (legacyShadowRoot, stylesheets) => {
10
- const styleElement = document.createElement('link')
11
- styleElement.rel = 'stylesheet'
12
- styleElement.href = (typeof chrome !== 'undefined' ? chrome : browser).runtime.getURL('content_scripts/content-0.css')
13
- legacyShadowRoot.appendChild(styleElement)
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.d = (exports1, definition)=>{
14
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
+ enumerable: true,
16
+ get: definition[key]
17
+ });
18
+ };
19
+ })();
20
+ (()=>{
21
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
22
+ })();
23
+ (()=>{
24
+ __webpack_require__.r = (exports1)=>{
25
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
26
+ value: 'Module'
27
+ });
28
+ Object.defineProperty(exports1, '__esModule', {
29
+ value: true
30
+ });
31
+ };
32
+ })();
33
+ var __webpack_exports__ = {};
34
+ __webpack_require__.r(__webpack_exports__);
35
+ __webpack_require__.d(__webpack_exports__, {
36
+ default: ()=>deprecated_shadow_root
37
+ });
38
+ const external_path_namespaceObject = require("path");
39
+ const external_fs_namespaceObject = require("fs");
40
+ const external_loader_utils_namespaceObject = require("loader-utils");
41
+ const external_schema_utils_namespaceObject = require("schema-utils");
42
+ const external_pintor_namespaceObject = require("pintor");
43
+ var external_pintor_default = /*#__PURE__*/ __webpack_require__.n(external_pintor_namespaceObject);
44
+ external_path_namespaceObject.join(process.cwd(), 'node_modules/extension-develop/dist/certs');
45
+ const CHROMIUM_BASED_BROWSERS = [
46
+ 'chrome',
47
+ 'edge'
48
+ ];
49
+ const GECKO_BASED_BROWSERS = [
50
+ 'firefox'
51
+ ];
52
+ [
53
+ ...CHROMIUM_BASED_BROWSERS,
54
+ ...GECKO_BASED_BROWSERS
55
+ ];
56
+ function getLoggingPrefix(feature, type) {
57
+ if ('error' === type) return `${external_pintor_default().red('ERROR')} ${feature}`;
58
+ if ('warn' === type) return `${external_pintor_default().brightYellow("\u25BA\u25BA\u25BA")} ${feature}`;
59
+ const arrow = 'info' === type ? external_pintor_default().blue("\u25BA\u25BA\u25BA") : external_pintor_default().green("\u25BA\u25BA\u25BA");
60
+ return `${arrow} ${feature}`;
61
+ }
62
+ function deprecatedShadowRoot() {
63
+ return `${getLoggingPrefix('DEPRECATION', 'warn')} Using ${external_pintor_default().yellow('window.__EXTENSION_SHADOW_ROOT__')} in content_scripts is deprecated\nand will be removed in a future version of Extension.js. To use content_scripts with\nthe shadow DOM, see one of the many examples at:\nhttps://github.com/extension-js/extension.js/tree/main/examples\n\nIf you really need to use the shadow DOM as-is, the latest version of Extension.js\nto support it is ${external_pintor_default().gray('extension@2.0.0-beta.9')}.\n`;
64
+ }
65
+ const schema = {
66
+ type: 'object',
67
+ properties: {
68
+ test: {
69
+ type: 'string'
70
+ },
71
+ manifestPath: {
72
+ type: 'string'
73
+ }
74
+ }
75
+ };
76
+ function deprecated_shadow_root(source) {
77
+ const options = this.getOptions();
78
+ const manifestPath = options.manifestPath;
79
+ const projectPath = external_path_namespaceObject.dirname(manifestPath);
80
+ const manifest = JSON.parse(external_fs_namespaceObject.readFileSync(manifestPath, 'utf8'));
81
+ (0, external_schema_utils_namespaceObject.validate)(schema, options, {
82
+ name: "scripts:deprecated-shadow-root",
83
+ baseDataPath: 'options'
84
+ });
85
+ const url = (0, external_loader_utils_namespaceObject.urlToRequest)(this.resourcePath);
86
+ const patchCssTag = `
87
+ ;const appendStyleElementForLegacyShadowRoot = (legacyShadowRoot, stylesheets) => {
88
+ if (typeof chrome !== 'undefined' || typeof browser !== 'undefined') {
89
+ const styleElement = document.createElement('link')
90
+ styleElement.rel = 'stylesheet'
91
+ styleElement.href = (typeof chrome !== 'undefined' ? chrome : browser).runtime.getURL('content_scripts/content-0.css')
92
+ legacyShadowRoot.appendChild(styleElement)
93
+ }
14
94
  }
15
95
 
16
96
  function injectStyles() {
@@ -31,4 +111,25 @@ function injectStyles() {
31
111
 
32
112
  observer.observe(document.body, { childList: true, subtree: true })
33
113
  }
34
- };injectStyles();`;if(o.content_scripts){for(let u of o.content_scripts)if(u.js)for(let g of u.js){let x=c.default.resolve(s,g);if($.includes(x))return e.includes("__EXTENSION_SHADOW_ROOT__")?(console.warn(d()),`${h}${e}`):`${e}`}}return e}
114
+ };injectStyles();`;
115
+ if (manifest.content_scripts) {
116
+ for (const contentScript of manifest.content_scripts)if (contentScript.js) for (const js of contentScript.js){
117
+ const absoluteUrl = external_path_namespaceObject.resolve(projectPath, js);
118
+ if (url.includes(absoluteUrl)) {
119
+ if (source.includes('__EXTENSION_SHADOW_ROOT__')) {
120
+ if ('development' === process.env.EXTENSION_ENV) console.warn(deprecatedShadowRoot());
121
+ return `${patchCssTag}${source}`;
122
+ }
123
+ return `${source}`;
124
+ }
125
+ }
126
+ }
127
+ return source;
128
+ }
129
+ exports["default"] = __webpack_exports__["default"];
130
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
131
+ "default"
132
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
133
+ Object.defineProperty(exports, '__esModule', {
134
+ value: true
135
+ });
package/dist/dev.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { DevOptions } from './develop-lib/config-types';
2
+ export declare function extensionDev(pathOrRemoteUrl: string | undefined, devOptions: DevOptions): Promise<void>;
@@ -0,0 +1,85 @@
1
+ import { Configuration } from '@rspack/core';
2
+ export type BrowserType = 'chrome' | 'edge' | 'firefox' | 'chromium-based' | 'gecko-based';
3
+ export interface BrowserOptionsBase {
4
+ open?: boolean;
5
+ profile?: string | false;
6
+ startingUrl?: string;
7
+ browser: BrowserType;
8
+ }
9
+ export interface ChromiumOptions extends BrowserOptionsBase {
10
+ browser: 'chromium-based';
11
+ chromiumBinary?: string;
12
+ }
13
+ export interface GeckoOptions extends BrowserOptionsBase {
14
+ browser: 'gecko-based';
15
+ geckoBinary?: string;
16
+ }
17
+ export interface NonBinaryOptions extends BrowserOptionsBase {
18
+ browser: Exclude<BrowserType, 'chromium-based' | 'gecko-based'>;
19
+ }
20
+ export type ExtendedBrowserOptions = ChromiumOptions | GeckoOptions | NonBinaryOptions;
21
+ export interface DevOptions extends BrowserOptionsBase {
22
+ mode: 'development' | 'production' | 'none';
23
+ polyfill?: boolean;
24
+ port?: string | number | undefined;
25
+ chromiumBinary?: ChromiumOptions['chromiumBinary'];
26
+ geckoBinary?: GeckoOptions['geckoBinary'];
27
+ source?: string;
28
+ watchSource?: boolean;
29
+ }
30
+ export interface BuildOptions {
31
+ browser: BrowserOptionsBase['browser'];
32
+ zipFilename?: string;
33
+ zip?: boolean;
34
+ zipSource?: boolean;
35
+ polyfill?: boolean;
36
+ silent?: boolean;
37
+ }
38
+ export interface PreviewOptions extends BrowserOptionsBase {
39
+ mode: 'production';
40
+ outputPath?: string;
41
+ chromiumBinary?: ChromiumOptions['chromiumBinary'];
42
+ geckoBinary?: GeckoOptions['geckoBinary'];
43
+ }
44
+ export interface StartOptions extends BrowserOptionsBase {
45
+ mode: 'production';
46
+ polyfill?: boolean;
47
+ chromiumBinary?: ChromiumOptions['chromiumBinary'];
48
+ geckoBinary?: GeckoOptions['geckoBinary'];
49
+ }
50
+ export interface BrowserConfig extends BrowserOptionsBase {
51
+ browserFlags?: string[];
52
+ excludeBrowserFlags?: string[];
53
+ preferences?: Record<string, unknown>;
54
+ chromiumBinary?: ChromiumOptions['chromiumBinary'];
55
+ geckoBinary?: GeckoOptions['geckoBinary'];
56
+ reuseProfile?: boolean;
57
+ }
58
+ export interface FileConfig {
59
+ browser?: {
60
+ chrome?: BrowserConfig;
61
+ firefox?: BrowserConfig;
62
+ edge?: BrowserConfig;
63
+ 'chromium-based'?: BrowserConfig;
64
+ 'gecko-based'?: BrowserConfig;
65
+ };
66
+ commands?: {
67
+ dev?: Pick<DevOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'open' | 'polyfill'> & {
68
+ browserFlags?: string[];
69
+ excludeBrowserFlags?: string[];
70
+ preferences?: Record<string, unknown>;
71
+ };
72
+ start?: Pick<StartOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'polyfill'> & {
73
+ browserFlags?: string[];
74
+ excludeBrowserFlags?: string[];
75
+ preferences?: Record<string, unknown>;
76
+ };
77
+ preview?: Pick<PreviewOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary'> & {
78
+ browserFlags?: string[];
79
+ excludeBrowserFlags?: string[];
80
+ preferences?: Record<string, unknown>;
81
+ };
82
+ build?: Pick<BuildOptions, 'browser' | 'zipFilename' | 'zip' | 'zipSource' | 'polyfill'>;
83
+ };
84
+ config?: (config: Configuration) => Configuration;
85
+ }
@@ -0,0 +1 @@
1
+ export declare function downloadAndExtractZip(url: string, targetPath: string): Promise<string>;
@@ -0,0 +1,2 @@
1
+ export declare function findNearestPackageJson(manifestPath: string): Promise<string | null>;
2
+ export declare function validatePackageJson(packageJsonPath: string): boolean;
@@ -0,0 +1 @@
1
+ export declare function generateExtensionTypes(projectPath: string): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { type BuildOptions } from './config-types';
2
+ export declare function generateZip(projectDir: string, { browser, ...options }: BuildOptions): Promise<void>;
@@ -0,0 +1,6 @@
1
+ import { Configuration } from '@rspack/core';
2
+ import { BrowserConfig, DevOptions } from './config-types';
3
+ export declare function loadCustomWebpackConfig(projectPath: string): Promise<(config: Configuration) => Configuration>;
4
+ export declare function loadCommandConfig(projectPath: string, command: 'dev' | 'build' | 'start' | 'preview'): Promise<{}>;
5
+ export declare function loadBrowserConfig(projectPath: string, browser?: DevOptions['browser']): Promise<BrowserConfig>;
6
+ export declare function isUsingExperimentalConfig(projectPath: string): Promise<boolean>;
@@ -0,0 +1,6 @@
1
+ export interface ProjectStructure {
2
+ manifestPath: string;
3
+ packageJsonPath: string;
4
+ }
5
+ export declare function getProjectPath(pathOrRemoteUrl: string | undefined): Promise<string>;
6
+ export declare function getProjectStructure(pathOrRemoteUrl: string | undefined): Promise<ProjectStructure>;
@@ -0,0 +1,2 @@
1
+ export declare function getInstallCommand(): Promise<string>;
2
+ export declare function installDependencies(projectPath: string): Promise<void>;
@@ -0,0 +1,35 @@
1
+ import { Manifest } from '../webpack/webpack-types';
2
+ import { type DevOptions } from './config-types';
3
+ export declare function manifestNotFoundError(manifestPath: string): string;
4
+ export declare function packageJsonNotFoundError(manifestPath: string): string;
5
+ export declare function building(browser: DevOptions['browser']): string;
6
+ export declare function runningInProduction(outputPath: string): string;
7
+ export declare function ready(mode: DevOptions['mode'], browser: DevOptions['browser']): string;
8
+ export declare function previewing(browser: DevOptions['browser']): string;
9
+ export declare function previewWebpack(): string;
10
+ export declare function buildWebpack(projectDir: string, stats: any, browser: DevOptions['browser']): string;
11
+ export declare function buildSuccess(): string;
12
+ export declare function fetchingProjectPath(owner: string, project: string): string;
13
+ export declare function downloadingProjectPath(projectName: string): string;
14
+ export declare function creatingProjectPath(projectPath: string): string;
15
+ export declare function noGitIgnoreFound(projectDir: string): string;
16
+ export declare function packagingSourceFiles(zipPath: string): string;
17
+ export declare function packagingDistributionFiles(zipPath: string): string;
18
+ export declare function treeWithSourceAndDistFiles(browser: DevOptions['browser'], name: string, sourceZip: string, destZip: string): string;
19
+ export declare function treeWithDistFilesbrowser(name: string, ext: string, browser: DevOptions['browser'], zipPath: string): string;
20
+ export declare function treeWithSourceFiles(name: string, ext: string, browser: DevOptions['browser'], zipPath: string): string;
21
+ export declare function failedToCompressError(error: any): string;
22
+ export declare function writingTypeDefinitions(manifest: Manifest): string;
23
+ export declare function writingTypeDefinitionsError(error: any): string;
24
+ export declare function downloadingText(url: string): string;
25
+ export declare function unpackagingExtension(zipFilePath: string): string;
26
+ export declare function unpackagedSuccessfully(): string;
27
+ export declare function failedToDownloadOrExtractZIPFileError(error: any): string;
28
+ export declare function isUsingExperimentalConfig(integration: any): string;
29
+ export declare function installingDependencies(): string;
30
+ export declare function installingDependenciesFailed(gitCommand: string, gitArgs: string[], code: number | null): string;
31
+ export declare function installingDependenciesProcessError(error: any): string;
32
+ export declare function cantInstallDependencies(error: any): string;
33
+ export declare function portInUse(requestedPort: number, newPort: number): string;
34
+ export declare function configLoadingError(configPath: string, error: unknown): string;
35
+ export declare function managedDependencyConflict(duplicates: string[], userPackageJsonPath: string): string;
@@ -0,0 +1 @@
1
+ export declare function assertNoManagedDependencyConflicts(userPackageJsonPath: string, projectPath: string): void;
@@ -1,3 +1,74 @@
1
- "use strict";var I=Object.create;var m=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var U=(t,n)=>{for(var s in n)m(t,s,{get:n[s],enumerable:!0})},b=(t,n,s,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of A(n))!C.call(t,r)&&r!==s&&m(t,r,{get:()=>n[r],enumerable:!(e=R(n,r))||e.enumerable});return t};var a=(t,n,s)=>(s=t!=null?I(P(t)):{},b(n||!t||!t.__esModule?m(s,"default",{value:t,enumerable:!0}):s,t)),L=t=>b(m({},"__esModule",{value:!0}),t);var X={};U(X,{default:()=>k});module.exports=L(X);var x=a(require("path")),O=a(require("fs")),S=require("loader-utils"),M=require("schema-utils");var v=a(require("fs")),d=a(require("path")),N=a(require("parse5-utils"));var p=a(require("parse5-utils"));function g(t){try{return new URL(t),!0}catch{return!1}}function h(t,n){let{childNodes:s=[]}=t;for(let e of s)if(e.nodeName==="script"){let r=p.default.getAttribute(e,"src");if(!r||g(r))continue;n({filePath:r,childNode:e,assetType:"script"})}else if(e.nodeName==="link"){let r=p.default.getAttribute(e,"href"),o=p.default.getAttribute(e,"rel");if(!r||g(r))continue;n(o==="dns-prefetch"||o==="icon"||o==="manifest"||o==="modulepreload"||o==="preconnect"||o==="prefetch"||o==="preload"||o==="prerender"?{filePath:r,childNode:e,assetType:"staticHref"}:{filePath:r,childNode:e,assetType:"css"})}else if(e.nodeName==="a"||e.nodeName==="area"){let r=p.default.getAttribute(e,"href");if(!r||g(r))continue;n({filePath:r,childNode:e,assetType:"staticHref"})}else if(e.nodeName==="audio"||e.nodeName==="embed"||e.nodeName==="iframe"||e.nodeName==="img"||e.nodeName==="input"||e.nodeName==="source"||e.nodeName==="track"||e.nodeName==="video"){let r=p.default.getAttribute(e,"src");if(!r||g(r))continue;n({filePath:r,childNode:e,assetType:"staticSrc"})}else h(e,n)}function j(t,n){let s={css:[],js:[],static:[]};if(!t)return s;let e=n||v.default.readFileSync(t,{encoding:"utf8"}),r=N.default.parse(e),o=(i,c)=>d.default.join(d.default.dirname(i),c.startsWith("/")?d.default.relative(d.default.dirname(i),c):c);for(let i of r.childNodes)if(i.nodeName==="html"){for(let c of i.childNodes)(c.nodeName==="head"||c.nodeName==="body")&&h(c,({filePath:u,assetType:y})=>{let f=o(t,u);switch(y){case"script":s.js?.push(f);break;case"css":s.css?.push(f);break;case"staticSrc":case"staticHref":if(u.startsWith("#"))break;s.static?.push(f);break;default:break}});return{css:s.css,js:s.js,static:s.static}}}var T=a(require("path")),$=a(require("fs")),J=require("child_process"),V=require("package-manager-detector");var q=a(require("path")),l=require("@colors/colors/safe");var E=a(require("path")),H=E.default.join(process.cwd(),"node_modules/extension-develop/dist/certs"),F=["chrome","edge"],W=["firefox"],ee=[...F,...W];var z=require("console");function w(t){let n=T.default.join(t,"package.json");if(!$.default.existsSync(n))return!1;let s=JSON.parse($.default.readFileSync(n,"utf-8")),e=["react","vue","@angular/core","svelte","solid-js","preact"],r=s.dependencies||{},o=s.devDependencies||{};for(let i of e)if(r[i]||o[i])return!0;return!1}var G={type:"object",properties:{test:{type:"string"},manifestPath:{type:"string"},includeList:{type:"object"},excludeList:{type:"object"}}};function k(t){let n=this.getOptions(),s=n.manifestPath,e=x.default.dirname(s);(0,M.validate)(G,n,{name:"html:ensure-hmr-for-scripts",baseDataPath:"options"});let r=(0,S.urlToRequest)(this.resourcePath),o=`
2
- if (import.meta.webpackHot) { import.meta.webpackHot.accept() };
3
- `;if(w(e))return t;let i=n.includeList||{};for(let c of Object.entries(i)){let[,u]=c;if(u){if(!O.default.existsSync(u))return;let f=j(u)?.js||[];for(let D of f){let _=x.default.resolve(e,D);if(r.includes(_))return`${o}${t}`}}}return t}
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ default: ()=>ensureHMRForScripts
28
+ });
29
+ const external_path_namespaceObject = require("path");
30
+ const external_loader_utils_namespaceObject = require("loader-utils");
31
+ const external_schema_utils_namespaceObject = require("schema-utils");
32
+ const schema = {
33
+ type: 'object',
34
+ properties: {
35
+ test: {
36
+ type: 'string'
37
+ },
38
+ manifestPath: {
39
+ type: 'string'
40
+ },
41
+ includeList: {
42
+ type: 'object'
43
+ },
44
+ excludeList: {
45
+ type: 'object'
46
+ }
47
+ }
48
+ };
49
+ function ensureHMRForScripts(source) {
50
+ const options = this.getOptions();
51
+ const manifestPath = options.manifestPath;
52
+ external_path_namespaceObject.dirname(manifestPath);
53
+ try {
54
+ (0, external_schema_utils_namespaceObject.validate)(schema, options, {
55
+ name: "html:ensure-hmr-for-scripts",
56
+ baseDataPath: 'options'
57
+ });
58
+ } catch (error) {
59
+ throw error;
60
+ }
61
+ const resourcePath = this.resourcePath || '';
62
+ (0, external_loader_utils_namespaceObject.urlToRequest)(resourcePath);
63
+ const reloadCode = `
64
+ if (import.meta.webpackHot) { import.meta.webpackHot.accept() }
65
+ `;
66
+ return `${reloadCode}${source}`;
67
+ }
68
+ exports["default"] = __webpack_exports__["default"];
69
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
70
+ "default"
71
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
72
+ Object.defineProperty(exports, '__esModule', {
73
+ value: true
74
+ });
@@ -2,7 +2,7 @@ import {createExtensionsPageTab, handleFirstRun} from './define-initial-tab.js'
2
2
  import {connect, disconnect, keepAlive} from './reload-service.js'
3
3
 
4
4
  function bgGreen(str) {
5
- return `background: #0A0C10; color: #26FFB8; ${str}`
5
+ return `background: transparent; color: #0971fe; ${str}`
6
6
  }
7
7
  chrome.tabs.query({active: true}, async ([initialTab]) => {
8
8
  console.log(
@@ -1,7 +1,7 @@
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": 3,
6
6
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAolEJq/DBHxY5dBpOqBRWNCl7vRPBvJPlpEzF19fYFVzzaH44AF6+sKjN3jwIKlsgI82F3TIuwoNFiN1yBu5Unf8SVBE4BTO92P02/ACcGYQxicgCLFUGQKlq4uSrwSPaBYl7FHcYl5SERgxnIGCGnaGMdL2vC7waCj2/U/iKoBF9I1lBH9/aKCSjTd3h2UYo7gg6n5nY/ENbzylDt42T3ATmvnVJfYhSNKA9Dv/zryknfnHYYgBKHtz7pDZwWnYdxs78n2VEKwGj7TgbXuIPDpCkrMnU9PTKpHbXFYARA4H9qYORQmYazfIxUZRnKQNSR+GAOGrb8JK+ijeQdwzDAwIDAQAB",
7
7
  "background": {
@@ -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