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
@@ -0,0 +1,12 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function browserAction(manifest: Manifest, excludeList: FilepathList): {
3
+ browser_action: {
4
+ theme_icons?: {
5
+ dark: string;
6
+ light: string;
7
+ }[] | undefined;
8
+ default_icon?: string | chrome.runtime.ManifestIcons | undefined;
9
+ default_popup?: string | undefined;
10
+ default_title?: string | undefined;
11
+ };
12
+ } | undefined;
@@ -0,0 +1,24 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function chromeSettingsOverrides(manifest: Manifest, excludeList: FilepathList): {
3
+ chrome_settings_overrides: {
4
+ startup_pages?: string[] | undefined;
5
+ search_provider?: {
6
+ favicon_url?: string | undefined;
7
+ name?: string | undefined;
8
+ keyword?: string | undefined;
9
+ search_url: string;
10
+ encoding?: string | undefined;
11
+ suggest_url?: string | undefined;
12
+ instant_url?: string | undefined;
13
+ image_url?: string | undefined;
14
+ search_url_post_params?: string | undefined;
15
+ suggest_url_post_params?: string | undefined;
16
+ instant_url_post_params?: string | undefined;
17
+ image_url_post_params?: string | undefined;
18
+ alternate_urls?: string[] | undefined;
19
+ prepopulated_id?: number | undefined;
20
+ is_default?: boolean | undefined;
21
+ } | undefined;
22
+ homepage?: string | undefined;
23
+ };
24
+ } | undefined;
@@ -0,0 +1,2 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function manifestV2(manifest: Manifest, excludeList: FilepathList): any;
@@ -0,0 +1 @@
1
+ export { pageAction } from '../common/page_action';
@@ -0,0 +1 @@
1
+ export { sidebarAction } from '../common/sidebar_action';
@@ -0,0 +1,2 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function themeExperiment(manifest: Manifest, excludeList: FilepathList): any;
@@ -0,0 +1,8 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function action(manifest: Manifest, excludeList: FilepathList): {
3
+ action: {
4
+ default_icon?: string | chrome.runtime.ManifestIcons | undefined;
5
+ default_popup?: string | undefined;
6
+ default_title?: string | undefined;
7
+ };
8
+ } | undefined;
@@ -0,0 +1,10 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function backgroundServiceWorker(manifest: Manifest, excludeList: FilepathList): "" | {
3
+ background: {
4
+ service_worker: string;
5
+ scripts?: string[] | undefined;
6
+ page?: string | undefined;
7
+ persistent?: boolean | undefined;
8
+ type?: "module";
9
+ };
10
+ } | undefined;
@@ -0,0 +1,2 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function declarativeNetRequest(manifest: Manifest, excludeList: FilepathList): any;
@@ -0,0 +1,2 @@
1
+ import { type Manifest } from '../../../../webpack-types';
2
+ export declare function hostPermissions(manifest: Manifest): any;
@@ -0,0 +1,2 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function manifestV3(manifest: Manifest, excludeList: FilepathList): any;
@@ -0,0 +1,2 @@
1
+ import { type Manifest, type FilepathList } from '../../../../webpack-types';
2
+ export declare function sidePanel(manifest: Manifest, excludeList: FilepathList): any;
@@ -0,0 +1,6 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ export declare class AddDependencies {
3
+ private readonly dependencyList;
4
+ constructor(dependencyList: string[]);
5
+ apply(compiler: Compiler): void;
6
+ }
@@ -0,0 +1,17 @@
1
+ import { Compiler } from '@rspack/core';
2
+ import { PluginInterface, FilepathList } from '../../../webpack-types';
3
+ export declare class CheckManifestFiles {
4
+ readonly manifestPath: string;
5
+ readonly includeList?: FilepathList;
6
+ readonly excludeList?: FilepathList;
7
+ constructor(options: PluginInterface);
8
+ extractPaths(value: string | string[] | {
9
+ light: string;
10
+ dark: string;
11
+ } | {
12
+ light: string;
13
+ dark: string;
14
+ }[]): any[];
15
+ private handleErrors;
16
+ apply(compiler: Compiler): void;
17
+ }
@@ -0,0 +1,7 @@
1
+ import { Compiler } from '@rspack/core';
2
+ import { type PluginInterface } from '../../../webpack-types';
3
+ export declare class EmitManifest {
4
+ readonly manifestPath: string;
5
+ constructor(options: PluginInterface);
6
+ apply(compiler: Compiler): void;
7
+ }
@@ -0,0 +1,11 @@
1
+ import { Compiler } from '@rspack/core';
2
+ import { DevOptions } from '../../../../develop-lib/config-types';
3
+ import { PluginInterface, FilepathList } from '../../../webpack-types';
4
+ export declare class ThrowIfRecompileIsNeeded {
5
+ readonly manifestPath: string;
6
+ readonly browser: DevOptions['browser'];
7
+ readonly includeList?: FilepathList;
8
+ constructor(options: PluginInterface);
9
+ private flattenAndSort;
10
+ apply(compiler: Compiler): void;
11
+ }
@@ -0,0 +1,9 @@
1
+ import { Compiler } from '@rspack/core';
2
+ import { FilepathList, PluginInterface } from '../../../webpack-types';
3
+ export declare class UpdateManifest {
4
+ readonly manifestPath: string;
5
+ readonly excludeList?: FilepathList;
6
+ constructor(options: PluginInterface);
7
+ private applyDevOverrides;
8
+ apply(compiler: Compiler): void;
9
+ }
@@ -0,0 +1,27 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import { type FilepathList, type PluginInterface } from '../../webpack-types';
3
+ import { type DevOptions } from '../../../module';
4
+ /**
5
+ * ScriptsPlugin is responsible for handiling all possible JavaScript
6
+ * (and CSS, for content_scripts) fields in manifest.json. It also
7
+ * supports extra scripts defined via this.include option. These
8
+ * extra scripts are added to the compilation and are also HMR
9
+ * enabled. They are useful for adding extra scripts to the
10
+ * extension runtime, like content_scripts via `scripting`, for example.
11
+ *
12
+ * Features supported:
13
+ * - content_scripts.js - HMR enabled
14
+ * - content_scripts.css - HMR enabled
15
+ * - background.scripts - HMR enabled
16
+ * - service_worker - Reloaded by chrome.runtime.reload()
17
+ * - user_scripts.api_scripts - HMR enabled
18
+ * - scripts via this.include - HMR enabled
19
+ */
20
+ export declare class ScriptsPlugin {
21
+ readonly manifestPath: string;
22
+ readonly includeList?: FilepathList;
23
+ readonly excludeList?: FilepathList;
24
+ readonly browser?: DevOptions['browser'];
25
+ constructor(options: PluginInterface);
26
+ apply(compiler: Compiler): void;
27
+ }
@@ -0,0 +1,3 @@
1
+ import { FilepathList } from '../../../webpack-types';
2
+ export declare function getScriptEntries(scriptPath: string | string[] | undefined, excludeList: FilepathList): string[];
3
+ export declare function getCssEntries(scriptPath: string | string[] | undefined, excludeList: FilepathList): string[];
@@ -0,0 +1,2 @@
1
+ import { type LoaderContext } from '../../../webpack-types';
2
+ export default function (this: LoaderContext, source: string): string;
@@ -0,0 +1,2 @@
1
+ import { type LoaderContext } from '../../../webpack-types';
2
+ export default function (this: LoaderContext, source: string): string;
@@ -0,0 +1,11 @@
1
+ import { Compiler } from '@rspack/core';
2
+ import { type FilepathList, type PluginInterface } from '../../../webpack-types';
3
+ import { DevOptions } from '../../../../develop-lib/config-types';
4
+ export declare class AddPublicPathForMainWorld {
5
+ readonly manifestPath: string;
6
+ readonly browser: DevOptions['browser'];
7
+ readonly includeList: FilepathList;
8
+ readonly excludeList: FilepathList;
9
+ constructor(options: PluginInterface);
10
+ apply(_compiler: Compiler): void;
11
+ }
@@ -0,0 +1,4 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ export declare class AddPublicPathRuntimeModule {
3
+ apply(compiler: Compiler): void;
4
+ }
@@ -0,0 +1,9 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import { type FilepathList, type PluginInterface } from '../../../webpack-types';
3
+ export declare class AddScripts {
4
+ readonly manifestPath: string;
5
+ readonly includeList: FilepathList;
6
+ readonly excludeList: FilepathList;
7
+ constructor(options: PluginInterface);
8
+ apply(compiler: Compiler): void;
9
+ }
@@ -0,0 +1,2 @@
1
+ import { type LoaderContext } from '../../../webpack-types';
2
+ export default function (this: LoaderContext, source: string): string;
@@ -0,0 +1 @@
1
+ export declare function generateJavaScriptWrapperCode(source: string, resourcePath: string): string;
@@ -0,0 +1 @@
1
+ export declare function generatePreactWrapperCode(source: string, resourcePath: string): string;
@@ -0,0 +1 @@
1
+ export declare function generateReactWrapperCode(source: string, resourcePath: string): string;
@@ -0,0 +1 @@
1
+ export declare function generateSvelteWrapperCode(source: string, resourcePath: string): string;
@@ -0,0 +1 @@
1
+ export declare function generateTypeScriptWrapperCode(source: string, resourcePath: string): string;
@@ -0,0 +1 @@
1
+ export declare function generateVueWrapperCode(source: string, resourcePath: string): string;
@@ -0,0 +1,14 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ interface CopyPublicFolderOptions {
3
+ manifestPath: string;
4
+ }
5
+ export declare class CopyPublicFolder {
6
+ private readonly options;
7
+ constructor(options: CopyPublicFolderOptions);
8
+ private getPublicFolderPath;
9
+ private ensureDirectoryExistence;
10
+ private copyFile;
11
+ private copyFolder;
12
+ apply(compiler: Compiler): void;
13
+ }
14
+ export {};
@@ -0,0 +1,19 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ interface SpecialFoldersPluginOptions {
3
+ manifestPath: string;
4
+ }
5
+ /**
6
+ * SpecialFoldersPlugin is responsible for handling the
7
+ * three types of special folders in the extension:
8
+ *
9
+ * - /pages - HTML pages not included in the manifest
10
+ * - /scripts - Script files not included in the manifest
11
+ * - /public - Static files not included in the manifest
12
+ */
13
+ export declare class SpecialFoldersPlugin {
14
+ static readonly name: string;
15
+ private readonly options;
16
+ constructor(options: SpecialFoldersPluginOptions);
17
+ apply(compiler: Compiler): void;
18
+ }
19
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ export declare class WarnUponFolderChanges {
3
+ private readonly manifestPath;
4
+ constructor(manifestPath: string);
5
+ private throwCompilationError;
6
+ apply(compiler: Compiler): void;
7
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * From the docs at https://developer.chrome.com/docs/extensions/reference/manifest/web-accessible-resources#manifest_declaration
3
+ * > Google Chrome emits an "Invalid match pattern" error if the pattern has a path other than '/*'.
4
+ *
5
+ * We need to ensure that paths are cleaned up from the matches to avoid this error.
6
+ */
7
+ export declare function cleanMatches(matches: string[]): string[];
@@ -0,0 +1,18 @@
1
+ import { Compiler } from '@rspack/core';
2
+ import { type FilepathList, type PluginInterface } from '../../webpack-types';
3
+ /**
4
+ * ResourcesPlugin is responsible for adding resources required
5
+ * by the user and the content_scripts to the manifest.json file.
6
+ *
7
+ * Feature supported:
8
+ *
9
+ * - web_accessible_resources paths in the manifest.json file.
10
+ * - Assets imported from content_scripts files.
11
+ */
12
+ export declare class WebResourcesPlugin {
13
+ readonly manifestPath: string;
14
+ readonly includeList?: FilepathList;
15
+ constructor(options: PluginInterface);
16
+ private generateManifestPatches;
17
+ apply(compiler: Compiler): void;
18
+ }
@@ -0,0 +1,10 @@
1
+ import { Compiler } from '@rspack/core';
2
+ import { PluginInterface } from '../webpack-types';
3
+ import { DevOptions } from '../../develop-lib/config-types';
4
+ export declare class ExtensionPlugin {
5
+ static readonly name: string;
6
+ readonly manifestPath: string;
7
+ readonly browser: DevOptions['browser'];
8
+ constructor(options: PluginInterface);
9
+ apply(compiler: Compiler): void;
10
+ }
@@ -0,0 +1,13 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import { PluginInterface } from '../webpack-types';
3
+ import { type DevOptions } from '../../develop-lib/config-types';
4
+ export declare class JsFrameworksPlugin {
5
+ static readonly name: string;
6
+ readonly manifestPath: string;
7
+ readonly mode: DevOptions['mode'];
8
+ constructor(options: PluginInterface & {
9
+ mode: DevOptions['mode'];
10
+ });
11
+ private configureOptions;
12
+ apply(compiler: Compiler): Promise<void>;
13
+ }
@@ -0,0 +1,16 @@
1
+ import { Compiler } from '@rspack/core';
2
+ import { DevOptions } from '../../../develop-lib/config-types';
3
+ import { JsFramework } from '../../webpack-types';
4
+ export declare function isUsingBabel(projectPath: string): boolean;
5
+ export declare function getBabelConfigFile(projectPath: string): string | undefined;
6
+ export declare function babelConfig(projectPath: string, opts: {
7
+ mode: DevOptions['mode'];
8
+ typescript: boolean;
9
+ }): {
10
+ cacheDirectory: boolean;
11
+ cacheCompression: boolean;
12
+ babelrc: boolean;
13
+ configFile: string | undefined;
14
+ compact: boolean;
15
+ };
16
+ export declare function maybeUseBabel(_compiler: Compiler, projectPath: string): Promise<JsFramework | undefined>;
@@ -0,0 +1,3 @@
1
+ import { JsFramework } from '../../webpack-types';
2
+ export declare function isUsingPreact(projectPath: string): boolean;
3
+ export declare function maybeUsePreact(projectPath: string): Promise<JsFramework | undefined>;
@@ -0,0 +1,3 @@
1
+ import { JsFramework } from '../../webpack-types';
2
+ export declare function isUsingReact(projectPath: string): boolean;
3
+ export declare function maybeUseReact(projectPath: string): Promise<JsFramework | undefined>;
@@ -0,0 +1,3 @@
1
+ import { JsFramework } from '../../webpack-types';
2
+ export declare function isUsingSvelte(projectPath: string): boolean;
3
+ export declare function maybeUseSvelte(projectPath: string, mode: 'development' | 'production'): Promise<JsFramework | undefined>;
@@ -0,0 +1,36 @@
1
+ import { type DevOptions } from '../../../develop-lib/config-types';
2
+ export declare function isUsingTypeScript(projectPath: string): boolean;
3
+ export declare function defaultTypeScriptConfig(projectPath: string, _opts?: any): {
4
+ compilerOptions: {
5
+ allowJs: boolean;
6
+ allowSyntheticDefaultImports: boolean;
7
+ esModuleInterop: boolean;
8
+ forceConsistentCasingInFileNames: boolean;
9
+ jsx: string;
10
+ lib: string[];
11
+ moduleResolution: string;
12
+ module: string;
13
+ resolveJsonModule: boolean;
14
+ strict: boolean;
15
+ target: string;
16
+ isolatedModules: boolean;
17
+ skipLibCheck: boolean;
18
+ };
19
+ exclude: string[];
20
+ };
21
+ export declare function getUserTypeScriptConfigFile(projectPath: string): string | undefined;
22
+ export declare function getTypeScriptConfigOverrides(opts: {
23
+ mode: DevOptions['mode'];
24
+ }): {
25
+ compilerOptions: {
26
+ sourceMap: boolean;
27
+ skipLibCheck: boolean;
28
+ inlineSourceMap: boolean;
29
+ declarationMap: boolean;
30
+ noEmit: boolean;
31
+ incremental: boolean;
32
+ tsBuildInfoFile: string;
33
+ };
34
+ exclude: string[];
35
+ };
36
+ export declare function maybeUseTypeScript(projectPath: string): Promise<boolean>;
@@ -0,0 +1,3 @@
1
+ import { JsFramework } from '../../webpack-types';
2
+ export declare function isUsingVue(projectPath: string): boolean;
3
+ export declare function maybeUseVue(projectPath: string): Promise<JsFramework | undefined>;
@@ -0,0 +1 @@
1
+ export declare function loadLoaderOptions(projectPath: string, framework: 'vue' | 'svelte'): Promise<any>;
@@ -0,0 +1,13 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import { type PluginInterface } from './reload-types';
3
+ export declare class ReloadPlugin {
4
+ static readonly name: string;
5
+ private readonly manifestPath;
6
+ private readonly browser;
7
+ private readonly port?;
8
+ private readonly stats?;
9
+ private readonly autoReload?;
10
+ private readonly instanceId?;
11
+ constructor(options: PluginInterface);
12
+ apply(compiler: Compiler): void;
13
+ }
@@ -0,0 +1,106 @@
1
+ export declare function capitalize(browser: any): any;
2
+ export declare function sourceInspectorInitialized(): string;
3
+ export declare function sourceInspectorInitializationFailed(error: string): string;
4
+ export declare function sourceInspectorChromeDebuggingRequired(port: number): string;
5
+ export declare function sourceInspectorFirefoxDebuggingRequired(port: number): string;
6
+ export declare function sourceInspectorWaitingForFirefox(): string;
7
+ export declare function firefoxRemoteDebuggingReady(): string;
8
+ export declare function sourceInspectorFirefoxNotReadyYet(retries: number, maxRetries: number): string;
9
+ export declare function sourceInspectorWaitingForChrome(): string;
10
+ export declare function chromeRemoteDebuggingReady(): string;
11
+ export declare function sourceInspectorChromeNotReadyYet(retries: number, maxRetries: number): string;
12
+ export declare function sourceInspectorOpeningUrl(url: string): string;
13
+ export declare function sourceInspectorWaitingForPageLoad(): string;
14
+ export declare function sourceInspectorCreatingTarget(): string;
15
+ export declare function sourceInspectorFindingExistingTarget(): string;
16
+ export declare function sourceInspectorUsingExistingTarget(targetId: string): string;
17
+ export declare function sourceInspectorTargetCreated(targetId: string): string;
18
+ export declare function sourceInspectorAttachingToTarget(): string;
19
+ export declare function sourceInspectorAttachedToTarget(sessionId: string): string;
20
+ export declare function sourceInspectorExtractingHTML(): string;
21
+ export declare function sourceInspectorHTMLExtractionComplete(): string;
22
+ export declare function sourceInspectorInspectionFailed(error: string): string;
23
+ export declare function cdpClientExtensionReloaded(extensionId: string): string;
24
+ export declare function cdpClientExtensionReloadFailed(extensionId: string, error: string): string;
25
+ export declare function cdpClientExtensionUnloadFailed(extensionId: string, error: string): string;
26
+ export declare function cdpClientExtensionInfoFailed(extensionId: string, error: string): string;
27
+ export declare function cdpClientExtensionLoadFailed(path: string, error: string): string;
28
+ export declare function cdpClientConnected(host: string, port: number): string;
29
+ export declare function cdpClientConnectionError(error: string): string;
30
+ export declare function cdpClientBrowserConnectionEstablished(): string;
31
+ export declare function sourceInspectorStartingWatchMode(): string;
32
+ export declare function sourceInspectorWatchModeActive(): string;
33
+ export declare function sourceInspectorWatchModeStopped(): string;
34
+ export declare function sourceInspectorCDPConnectionMaintained(): string;
35
+ export declare function sourceInspectorNoActiveSession(): string;
36
+ export declare function sourceInspectorReExtractingHTML(): string;
37
+ export declare function sourceInspectorAttemptingReconnection(): string;
38
+ export declare function sourceInspectorCannotReconnect(): string;
39
+ export declare function sourceInspectorReconnectingToTarget(): string;
40
+ export declare function sourceInspectorReconnectedToTarget(sessionId: string): string;
41
+ export declare function sourceInspectorReconnectionFailed(error: string): string;
42
+ export declare function sourceInspectorEnsuringNavigation(): string;
43
+ export declare function sourceInspectorEnablingPageDomain(): string;
44
+ export declare function sourceInspectorWaitingForContentScripts(): string;
45
+ export declare function sourceInspectorWaitingForContentScriptReinjection(): string;
46
+ export declare function sourceInspectorFileChanged(): string;
47
+ export declare function sourceInspectorHTMLUpdateFailed(error: string): string;
48
+ export declare function sourceInspectorCleanupComplete(): string;
49
+ export declare function sourceInspectorCleanupError(error: string): string;
50
+ export declare function htmlEntrypointChangeRestarting(): string;
51
+ export declare function manifestEntrypointChangeRestarting(filePath: string): string;
52
+ export declare function sourceInspectorNotInitialized(): string;
53
+ export declare function sourceInspectorInvalidWebSocketServer(): string;
54
+ export declare function sourceInspectorUrlRequired(): string;
55
+ export declare function sourceInspectorWillInspect(url: string): string;
56
+ export declare function sourceInspectorSetupFailed(error: string): string;
57
+ export declare function sourceInspectorHTMLOutputHeader(): string;
58
+ export declare function sourceInspectorHTMLOutputTitle(title: string): string;
59
+ export declare function sourceInspectorHTMLOutputFooter(): string;
60
+ export declare function cdpClientFoundTargets(count: number): string;
61
+ export declare function cdpClientUsingTarget(title: string, url: string): string;
62
+ export declare function cdpClientTargetWebSocketUrlStored(): string;
63
+ export declare function cdpClientConnectionClosed(): string;
64
+ export declare function cdpClientMessageParseError(error: string): string;
65
+ export declare function cdpClientPageLoadEventFired(): string;
66
+ export declare function cdpClientLoadEventTimeout(): string;
67
+ export declare function cdpClientTestingEvaluation(): string;
68
+ export declare function cdpClientDocumentTitle(title: string): string;
69
+ export declare function cdpClientGettingMainHTML(): string;
70
+ export declare function cdpClientMainHTMLLength(length: number): string;
71
+ export declare function cdpClientFailedToGetMainHTML(): string;
72
+ export declare function cdpClientCheckingShadowDOM(): string;
73
+ export declare function cdpClientShadowDOMContentFound(found: boolean): string;
74
+ export declare function cdpClientShadowDOMContentLength(length: number): string;
75
+ export declare function cdpClientProcessingShadowDOM(): string;
76
+ export declare function cdpClientFinalHTMLWithShadowDOMLength(length: number): string;
77
+ export declare function cdpClientReturningMainHTML(): string;
78
+ export declare function webSocketServerInitialized(): string;
79
+ export declare function webSocketServerInitializationFailed(error: string): string;
80
+ export declare function webSocketServerPluginApplyFailed(error: string): string;
81
+ export declare function fileUpdated(relativePath: string, context: string): string;
82
+ export declare function webSocketServerNotReady(): string;
83
+ export declare function webSocketServerNotRunning(): string;
84
+ export declare function ignoringMessageFromWrongInstance(actualInstanceId: string, expectedInstanceId: string): string;
85
+ export declare function failedToUpdateInstanceWithExtensionId(error: string): string;
86
+ export declare function webSocketServerForInstanceClosed(instanceId: string): string;
87
+ export declare function webSocketError(error: any): string;
88
+ export declare function isFirstRun(browser: any): string;
89
+ export declare function certRequired(): string;
90
+ export declare function webSocketConnectionCloseError(error: unknown): string;
91
+ export declare function firefoxRdpClientFoundTargets(count: number): string;
92
+ export declare function firefoxRdpClientUsingTarget(title: string, url: string): string;
93
+ export declare function firefoxRdpClientConnected(host: string, port: number): string;
94
+ export declare function firefoxRdpClientConnectionError(error: string): string;
95
+ export declare function firefoxRdpClientConnectionClosed(): string;
96
+ export declare function firefoxRdpClientNoSuitableTargets(): string;
97
+ export declare function firefoxRdpClientPageLoadEventFired(): string;
98
+ export declare function firefoxRdpClientLoadEventTimeout(): string;
99
+ export declare function firefoxRdpClientTestingEvaluation(): string;
100
+ export declare function firefoxRdpClientDocumentTitle(title: string): string;
101
+ export declare function firefoxRdpClientFailedToGetMainHTML(): string;
102
+ export declare function firefoxRdpClientFinalHTMLLength(length: number): string;
103
+ export declare function emptyLine(): string;
104
+ export declare function runningInDevelopment(manifest: any, browser: any, message: {
105
+ data?: any;
106
+ }): string;
@@ -0,0 +1,14 @@
1
+ import { type DevOptions } from '../../develop-lib/config-types';
2
+ export interface PluginInterface extends PluginOptions {
3
+ manifestPath: string;
4
+ }
5
+ export interface PluginOptions {
6
+ browser?: DevOptions['browser'];
7
+ port?: string | number;
8
+ stats?: boolean;
9
+ autoReload?: boolean;
10
+ instanceId?: string;
11
+ source?: string;
12
+ watchSource?: boolean;
13
+ startingUrl?: string;
14
+ }
@@ -0,0 +1,4 @@
1
+ import { WebSocket } from 'ws';
2
+ import { Compiler } from '@rspack/core';
3
+ import { DevOptions } from '../../module';
4
+ export declare function startServer(compiler: Compiler, options: DevOptions): Promise<import("ws").Server<typeof WebSocket, typeof import("http").IncomingMessage>>;
@@ -0,0 +1,14 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import { PluginInterface } from '../../reload-types';
3
+ export default class CreateWebSocketServer {
4
+ private readonly manifestPath;
5
+ private readonly port;
6
+ private readonly browser;
7
+ private readonly stats;
8
+ private readonly instanceId?;
9
+ private webSocketServer;
10
+ private isServerInitialized;
11
+ constructor(options: PluginInterface);
12
+ initializeServer(compiler: Compiler): Promise<void>;
13
+ apply(compiler: Compiler): void;
14
+ }
@@ -0,0 +1,2 @@
1
+ import WebSocket, { Server } from 'ws';
2
+ export default function (server: Server<typeof WebSocket, any>, message: string): void;
@@ -0,0 +1,2 @@
1
+ import WebSocket, { Server } from 'ws';
2
+ export declare function messageDispatcher(server: Server<typeof WebSocket, any> | undefined, manifestPath: string, updatedFile: string): void;
@@ -0,0 +1,2 @@
1
+ export declare function httpsServer(defaultPort: number): any;
2
+ export declare function httpServer(defaultPort: number): any;
@@ -0,0 +1,3 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import { DevOptions } from '../../../../develop-lib/config-types';
3
+ export declare function SetupChromiumReloadClient(compiler: Compiler, browser: DevOptions['browser'], manifestPath: string): void;
@@ -0,0 +1,9 @@
1
+ import { type LoaderContext } from '@rspack/core';
2
+ interface InjectBackgroundClientContext extends LoaderContext<any> {
3
+ getOptions: () => {
4
+ manifestPath: string;
5
+ browser: string;
6
+ };
7
+ }
8
+ export default function (this: InjectBackgroundClientContext, source: string): string;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import { DevOptions } from '../../../../module';
3
+ export declare function SetupFirefoxReloadClient(compiler: Compiler, browser: DevOptions['browser'], manifestPath: string): void;