extension-develop 4.1.16 → 4.1.17-canary.1789176231.b3d547b9

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 (224) hide show
  1. package/dist/{278.mjs → 105~0.mjs} +13 -13
  2. package/dist/177~0.mjs +37 -0
  3. package/dist/{86.mjs → 273~0.mjs} +7 -7
  4. package/dist/331~0.mjs +43 -0
  5. package/dist/{845.mjs → 524~0.mjs} +1 -1
  6. package/dist/{887.mjs → 616~0.mjs} +16 -16
  7. package/dist/{266.mjs → 672~0.mjs} +86 -4
  8. package/dist/{80.mjs → 731~0.mjs} +28 -21
  9. package/dist/{372.mjs → 747~0.mjs} +9 -9
  10. package/dist/{101.mjs → 832~0.mjs} +113 -153
  11. package/dist/{839.mjs → 840~0.mjs} +98 -97
  12. package/dist/{129.mjs → 88~0.mjs} +8 -8
  13. package/dist/{834.mjs → 938~0.mjs} +78 -44
  14. package/dist/{77.mjs → 950~0.mjs} +103 -104
  15. package/dist/bridge-entry.d.ts +10 -10
  16. package/dist/bridge.mjs +11 -11
  17. package/dist/command-build.d.ts +2 -2
  18. package/dist/command-dev.d.ts +2 -2
  19. package/dist/command-preview.d.ts +1 -1
  20. package/dist/contracts-entry.d.ts +2 -2
  21. package/dist/css-parse-guard-loader.mjs +4 -4
  22. package/dist/dead-css-url-loader.mjs +11 -11
  23. package/dist/dev-server/cleanup.d.ts +1 -1
  24. package/dist/dev-server/control-bridge/actions-file.d.ts +1 -1
  25. package/dist/dev-server/control-bridge/broker.d.ts +5 -5
  26. package/dist/dev-server/control-bridge/consumer-client.d.ts +2 -2
  27. package/dist/dev-server/control-bridge/control-port-store.d.ts +1 -1
  28. package/dist/dev-server/control-bridge/controller-client.d.ts +1 -1
  29. package/dist/dev-server/control-bridge/logs-file.d.ts +1 -1
  30. package/dist/dev-server/control-bridge/ring-buffer.d.ts +1 -1
  31. package/dist/dev-server/control-bridge/session-token.d.ts +1 -1
  32. package/dist/dev-server/control-bridge/ws-control-server.d.ts +1 -1
  33. package/dist/dev-server/index.d.ts +2 -2
  34. package/dist/dev-server/lifecycle-stream.d.ts +1 -1
  35. package/dist/{0~dev-server.mjs → dev-server~0.mjs} +44 -43
  36. package/dist/ensure-hmr-for-scripts.js +4 -28
  37. package/dist/ensure-hmr-for-scripts.mjs +4 -28
  38. package/dist/extension-js-devtools/chrome/background/service_worker.js +2 -2
  39. package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
  40. package/dist/extension-js-devtools/chrome/extension-js-session.json +1 -0
  41. package/dist/extension-js-devtools/chrome/pages/centralized-logger.js +4 -4
  42. package/dist/extension-js-devtools/chrome/shared/commons.js +1 -1
  43. package/dist/extension-js-devtools/chromium/background/service_worker.js +2 -2
  44. package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
  45. package/dist/extension-js-devtools/chromium/extension-js-session.json +1 -0
  46. package/dist/extension-js-devtools/chromium/pages/centralized-logger.js +4 -4
  47. package/dist/extension-js-devtools/chromium/shared/commons.js +1 -1
  48. package/dist/extension-js-devtools/edge/background/service_worker.js +2 -2
  49. package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
  50. package/dist/extension-js-devtools/edge/extension-js-session.json +1 -0
  51. package/dist/extension-js-devtools/edge/pages/centralized-logger.js +4 -4
  52. package/dist/extension-js-devtools/edge/shared/commons.js +1 -1
  53. package/dist/extension-js-devtools/firefox/background/scripts.js +2 -2
  54. package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
  55. package/dist/extension-js-devtools/firefox/extension-js-session.json +1 -0
  56. package/dist/extension-js-devtools/firefox/pages/centralized-logger.js +4 -4
  57. package/dist/extension-js-devtools/firefox/shared/commons.js +1 -1
  58. package/dist/feature-scripts-classic-concat-loader.js +5 -5
  59. package/dist/feature-scripts-classic-concat-loader.mjs +5 -5
  60. package/dist/feature-scripts-content-script-wrapper.js +20 -16
  61. package/dist/feature-scripts-content-script-wrapper.mjs +20 -16
  62. package/dist/feature-scripts-native-geturl-import-loader.mjs +1 -1
  63. package/dist/late-css-import-loader.mjs +4 -4
  64. package/dist/lib/config-loader.d.ts +1 -1
  65. package/dist/lib/dark-mode.d.ts +1 -1
  66. package/dist/lib/ensure-develop-artifacts.d.ts +1 -1
  67. package/dist/lib/manifest-utils.d.ts +1 -1
  68. package/dist/lib/messages.d.ts +2 -2
  69. package/dist/lib/optional-deps-contracts.d.ts +1 -1
  70. package/dist/lib/optional-deps-resolver.d.ts +1 -1
  71. package/dist/lib/package-manager.d.ts +1 -1
  72. package/dist/lib/paths.d.ts +1 -1
  73. package/dist/lib/project-manifest.d.ts +1 -1
  74. package/dist/module.d.ts +10 -10
  75. package/dist/module.mjs +2 -2
  76. package/dist/plugin-browsers/index.d.ts +1 -1
  77. package/dist/plugin-browsers/safari-dev-plugin.d.ts +1 -1
  78. package/dist/plugin-compatibility/compatibility-lib/messages.d.ts +1 -1
  79. package/dist/plugin-compatibility/feature-polyfill.d.ts +1 -1
  80. package/dist/plugin-compatibility/index.d.ts +1 -1
  81. package/dist/plugin-compilation/boring.d.ts +1 -1
  82. package/dist/plugin-compilation/env.d.ts +1 -1
  83. package/dist/plugin-compilation/index.d.ts +1 -1
  84. package/dist/plugin-compilation/zip.d.ts +1 -1
  85. package/dist/plugin-css/common-style-loaders.d.ts +1 -1
  86. package/dist/plugin-css/css-in-content-script-loader.d.ts +3 -3
  87. package/dist/plugin-css/css-in-html-loader.d.ts +3 -3
  88. package/dist/plugin-css/css-lib/build-css-rules.d.ts +1 -1
  89. package/dist/plugin-css/css-lib/is-content-script.d.ts +2 -1
  90. package/dist/plugin-css/css-tools/postcss.d.ts +2 -2
  91. package/dist/plugin-css/css-tools/sass.d.ts +1 -1
  92. package/dist/plugin-css/index.d.ts +5 -4
  93. package/dist/plugin-js-frameworks/frameworks-lib/integrations.d.ts +2 -2
  94. package/dist/plugin-js-frameworks/index.d.ts +1 -1
  95. package/dist/plugin-js-frameworks/js-frameworks-lib/load-loader-options.d.ts +1 -1
  96. package/dist/plugin-js-frameworks/js-tools/preact.d.ts +1 -1
  97. package/dist/plugin-js-frameworks/js-tools/react.d.ts +1 -1
  98. package/dist/plugin-js-frameworks/js-tools/solid.d.ts +1 -1
  99. package/dist/plugin-js-frameworks/js-tools/svelte.d.ts +1 -1
  100. package/dist/plugin-js-frameworks/js-tools/typescript.d.ts +1 -1
  101. package/dist/plugin-js-frameworks/js-tools/vue.d.ts +1 -1
  102. package/dist/plugin-js-frameworks/swc-targets.d.ts +1 -1
  103. package/dist/plugin-perf-budgets/index.d.ts +3 -3
  104. package/dist/plugin-perf-budgets/messages.d.ts +1 -1
  105. package/dist/plugin-playwright/index.d.ts +2 -2
  106. package/dist/plugin-reload/index.d.ts +4 -4
  107. package/dist/plugin-reload/reload-dispatch.d.ts +1 -1
  108. package/dist/plugin-reload/steps/setup-chunk-loading-target.d.ts +1 -1
  109. package/dist/plugin-reload/steps/setup-reload-strategy/index.d.ts +1 -1
  110. package/dist/plugin-reload/steps/setup-reload-strategy/setup-background-entry.d.ts +1 -1
  111. package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/index.d.ts +1 -1
  112. package/dist/plugin-special-folders/folder-extensions/resolve-config.d.ts +1 -1
  113. package/dist/plugin-special-folders/folder-extensions/resolve-dirs.d.ts +1 -1
  114. package/dist/plugin-special-folders/folder-extensions/utils.d.ts +1 -1
  115. package/dist/plugin-special-folders/get-data.d.ts +2 -2
  116. package/dist/plugin-static-assets/index.d.ts +1 -1
  117. package/dist/plugin-wasm/index.d.ts +1 -1
  118. package/dist/plugin-web-extension/feature-html/html-lib/assets.d.ts +2 -2
  119. package/dist/plugin-web-extension/feature-html/html-lib/patch-html.d.ts +2 -2
  120. package/dist/plugin-web-extension/feature-html/html-lib/utils.d.ts +2 -2
  121. package/dist/plugin-web-extension/feature-html/index.d.ts +1 -1
  122. package/dist/plugin-web-extension/feature-html/steps/add-assets-to-compilation.d.ts +1 -1
  123. package/dist/plugin-web-extension/feature-html/steps/add-scripts-and-styles-to-compilation.d.ts +1 -1
  124. package/dist/plugin-web-extension/feature-html/steps/add-to-file-dependencies.d.ts +1 -1
  125. package/dist/plugin-web-extension/feature-html/steps/emit-html-file.d.ts +2 -1
  126. package/dist/plugin-web-extension/feature-html/steps/ensure-hmr-for-scripts.d.ts +1 -1
  127. package/dist/plugin-web-extension/feature-html/steps/handle-common-errors.d.ts +1 -1
  128. package/dist/plugin-web-extension/feature-html/steps/throw-if-recompile-is-needed.d.ts +1 -1
  129. package/dist/plugin-web-extension/feature-html/steps/update-html-file.d.ts +1 -1
  130. package/dist/plugin-web-extension/feature-icons/extract-action-theme-icons.d.ts +2 -2
  131. package/dist/plugin-web-extension/feature-icons/index.d.ts +2 -1
  132. package/dist/plugin-web-extension/feature-icons/normalize-keys.d.ts +1 -1
  133. package/dist/plugin-web-extension/feature-icons/omnibox-fields.d.ts +2 -2
  134. package/dist/plugin-web-extension/feature-icons/steps/add-to-file-dependencies.d.ts +1 -1
  135. package/dist/plugin-web-extension/feature-icons/steps/emit-file.d.ts +1 -1
  136. package/dist/plugin-web-extension/feature-icons/theme-image-fields.d.ts +2 -2
  137. package/dist/plugin-web-extension/feature-json/index.d.ts +1 -1
  138. package/dist/plugin-web-extension/feature-locales/index.d.ts +1 -1
  139. package/dist/plugin-web-extension/feature-manifest/index.d.ts +1 -1
  140. package/dist/plugin-web-extension/feature-manifest/manifest-lib/gecko-data-collection.d.ts +1 -1
  141. package/dist/plugin-web-extension/feature-manifest/manifest-lib/manifest.d.ts +2 -2
  142. package/dist/plugin-web-extension/feature-manifest/manifest-lib/sanitize-fatal-shapes.d.ts +1 -1
  143. package/dist/plugin-web-extension/feature-manifest/manifest-lib/theme-values.d.ts +1 -1
  144. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/background.d.ts +1 -1
  145. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/chrome_url_overrides.d.ts +1 -1
  146. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/commands.d.ts +1 -1
  147. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/content_scripts.d.ts +1 -1
  148. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/content_security_policy.d.ts +1 -1
  149. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/devtools_page.d.ts +1 -1
  150. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/icons.d.ts +1 -1
  151. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/index.d.ts +1 -1
  152. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/omnibox.d.ts +1 -1
  153. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/options_page.d.ts +1 -1
  154. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/options_ui.d.ts +1 -1
  155. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/page_action.d.ts +1 -1
  156. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/permissions.d.ts +1 -1
  157. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/sandbox.d.ts +1 -1
  158. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/sidebar_action.d.ts +2 -2
  159. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/storage.d.ts +1 -1
  160. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/theme.d.ts +1 -1
  161. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/user_scripts.d.ts +1 -1
  162. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/web_accessible_resources.d.ts +1 -1
  163. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/index.d.ts +1 -1
  164. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/background.d.ts +1 -1
  165. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/browser_action.d.ts +1 -1
  166. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/chrome_settings_overrides.d.ts +1 -1
  167. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/index.d.ts +1 -1
  168. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/theme_experiment.d.ts +1 -1
  169. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/action.d.ts +1 -1
  170. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/background.d.ts +1 -1
  171. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/declarative_net_request.d.ts +1 -1
  172. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/host_permissions.d.ts +1 -1
  173. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/index.d.ts +1 -1
  174. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/side_panel.d.ts +2 -2
  175. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-injected-hosts.d.ts +25 -0
  176. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-injected-permissions.d.ts +1 -0
  177. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-background.d.ts +1 -1
  178. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-csp.d.ts +1 -1
  179. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-externally-connectable.d.ts +1 -1
  180. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-web-resources.d.ts +1 -1
  181. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults.d.ts +1 -5
  182. package/dist/plugin-web-extension/feature-manifest/steps/emit-manifest.d.ts +1 -1
  183. package/dist/plugin-web-extension/feature-manifest/steps/patch-chromium-background.d.ts +1 -1
  184. package/dist/plugin-web-extension/feature-manifest/steps/patch-chromium-theme-colors.d.ts +1 -1
  185. package/dist/plugin-web-extension/feature-manifest/steps/patch-dev-content-script-manifest-paths.d.ts +1 -1
  186. package/dist/plugin-web-extension/feature-manifest/steps/patch-gecko-background.d.ts +1 -1
  187. package/dist/plugin-web-extension/feature-manifest/steps/patch-war.d.ts +1 -1
  188. package/dist/plugin-web-extension/feature-manifest/steps/update-manifest.d.ts +1 -1
  189. package/dist/plugin-web-extension/feature-manifest/steps/validate-theme-values.d.ts +1 -1
  190. package/dist/plugin-web-extension/feature-scripts/index.d.ts +1 -1
  191. package/dist/plugin-web-extension/feature-scripts/scripts-lib/utils.d.ts +1 -1
  192. package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/content-script-wrapper.d.ts +1 -0
  193. package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/get-bridge-scripts.d.ts +1 -1
  194. package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/index.d.ts +1 -1
  195. package/dist/plugin-web-extension/feature-scripts/steps/add-scripts.d.ts +1 -1
  196. package/dist/plugin-web-extension/feature-scripts/steps/keep-geturl-imports-native.d.ts +1 -1
  197. package/dist/plugin-web-extension/feature-scripts/steps/trace-runtime-loaded-files.d.ts +3 -0
  198. package/dist/plugin-web-extension/feature-scripts/steps/warn-split-initial-chunks.d.ts +1 -1
  199. package/dist/plugin-web-extension/feature-web-resources/collect-entry-imports.d.ts +3 -1
  200. package/dist/plugin-web-extension/feature-web-resources/index.d.ts +1 -1
  201. package/dist/plugin-web-extension/feature-web-resources/steps/collect-content-entry-imports.d.ts +1 -1
  202. package/dist/plugin-web-extension/index.d.ts +1 -1
  203. package/dist/plugin-web-extension/shared/discover-devtools-panels.d.ts +2 -2
  204. package/dist/plugin-web-extension/shared/html-surfaces.d.ts +3 -1
  205. package/dist/plugin-web-extension/shared/manifest-fields-change-detector.d.ts +1 -1
  206. package/dist/plugin-web-extension/shared/manifest-fields.d.ts +1 -1
  207. package/dist/plugin-web-extension/shared/manifest-path-assets.d.ts +4 -4
  208. package/dist/plugin-web-extension/shared/paths.d.ts +1 -1
  209. package/dist/preprocessor-passthrough-loader.mjs +3 -3
  210. package/dist/preview-entry.d.ts +3 -3
  211. package/dist/preview.mjs +1 -1
  212. package/dist/public-css-url-loader.mjs +1 -36
  213. package/dist/rspack-config.d.ts +2 -2
  214. package/dist/{0~rspack-config.mjs → rspack-config~0.mjs} +851 -719
  215. package/dist/{0~stats-handler.mjs → stats-handler~0.mjs} +2 -12
  216. package/dist/types.d.ts +4 -4
  217. package/dist/{0~zip.mjs → zip~0.mjs} +20 -20
  218. package/package.json +5 -5
  219. package/dist/0~rslib-runtime.mjs +0 -28
  220. package/dist/23.mjs +0 -10
  221. package/dist/93.mjs +0 -38
  222. /package/dist/{291.mjs → 640~0.mjs} +0 -0
  223. /package/dist/{349.mjs → 852~0.mjs} +0 -0
  224. /package/dist/{292.mjs → 895~0.mjs} +0 -0
@@ -1,19 +1,19 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
- import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
3
- import * as __rspack_external_node_path_c5b9b54f from "node:path";
2
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
3
+ import * as __rspack_external_node_path_806ed179 from "node:path";
4
4
  function isUsableDir(candidate) {
5
5
  try {
6
- if (!__rspack_external_node_fs_5ea92f0c.existsSync(candidate)) return false;
7
- const stat = __rspack_external_node_fs_5ea92f0c.statSync(candidate);
6
+ if (!__rspack_external_node_fs_1b05aee1.existsSync(candidate)) return false;
7
+ const stat = __rspack_external_node_fs_1b05aee1.statSync(candidate);
8
8
  return 'function' == typeof stat?.isDirectory ? stat.isDirectory() : true;
9
9
  } catch {
10
10
  return false;
11
11
  }
12
12
  }
13
13
  function inspectPublicFolders(manifestPath, projectRoot) {
14
- const fromManifest = __rspack_external_node_path_c5b9b54f.join(__rspack_external_node_path_c5b9b54f.dirname(manifestPath), 'public');
15
- const fromRoot = projectRoot ? __rspack_external_node_path_c5b9b54f.join(projectRoot, 'public') : fromManifest;
16
- const sameLocation = __rspack_external_node_path_c5b9b54f.resolve(fromRoot) === __rspack_external_node_path_c5b9b54f.resolve(fromManifest);
14
+ const fromManifest = __rspack_external_node_path_806ed179.join(__rspack_external_node_path_806ed179.dirname(manifestPath), 'public');
15
+ const fromRoot = projectRoot ? __rspack_external_node_path_806ed179.join(projectRoot, 'public') : fromManifest;
16
+ const sameLocation = __rspack_external_node_path_806ed179.resolve(fromRoot) === __rspack_external_node_path_806ed179.resolve(fromManifest);
17
17
  const rootOk = isUsableDir(fromRoot);
18
18
  const manifestOk = !sameLocation && isUsableDir(fromManifest);
19
19
  return {
@@ -28,22 +28,22 @@ function resolvePublicFolder(manifestPath, projectRoot) {
28
28
  return inspectPublicFolders(manifestPath, projectRoot).publicDir;
29
29
  }
30
30
  function publicFolderOrDefault(manifestPath, projectRoot) {
31
- return resolvePublicFolder(manifestPath, projectRoot) || __rspack_external_node_path_c5b9b54f.join(projectRoot, 'public');
31
+ return resolvePublicFolder(manifestPath, projectRoot) || __rspack_external_node_path_806ed179.join(projectRoot, 'public');
32
32
  }
33
33
  function publicResolveRoots(projectRoot, manifestPath) {
34
- const manifestDir = __rspack_external_node_path_c5b9b54f.dirname(manifestPath);
35
- const fromRoot = __rspack_external_node_path_c5b9b54f.join(projectRoot, 'public');
36
- const fromManifest = __rspack_external_node_path_c5b9b54f.join(manifestDir, 'public');
34
+ const manifestDir = __rspack_external_node_path_806ed179.dirname(manifestPath);
35
+ const fromRoot = __rspack_external_node_path_806ed179.join(projectRoot, 'public');
36
+ const fromManifest = __rspack_external_node_path_806ed179.join(manifestDir, 'public');
37
37
  const roots = [
38
38
  fromRoot,
39
39
  manifestDir
40
40
  ];
41
- if (__rspack_external_node_path_c5b9b54f.resolve(fromManifest) !== __rspack_external_node_path_c5b9b54f.resolve(fromRoot)) roots.push(fromManifest);
41
+ if (__rspack_external_node_path_806ed179.resolve(fromManifest) !== __rspack_external_node_path_806ed179.resolve(fromRoot)) roots.push(fromManifest);
42
42
  return roots;
43
43
  }
44
44
  const publicRootsByCompiler = new WeakMap();
45
45
  function rememberPublicRoots(compiler, roots) {
46
- publicRootsByCompiler.set(compiler, roots.filter(Boolean).map((root)=>__rspack_external_node_path_c5b9b54f.resolve(root)));
46
+ publicRootsByCompiler.set(compiler, roots.filter(Boolean).map((root)=>__rspack_external_node_path_806ed179.resolve(root)));
47
47
  }
48
48
  function publicRootsFor(compiler) {
49
49
  if (!compiler) return [];
package/dist/177~0.mjs ADDED
@@ -0,0 +1,37 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ import { publicFolderOrDefault } from "./105~0.mjs";
3
+ import { replaceCssUrlRefs } from "./273~0.mjs";
4
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
5
+ import * as __rspack_external_node_path_806ed179 from "node:path";
6
+ const PUBLIC_ROOT_SCHEME = 'https://extensionjs-public.invalid';
7
+ function isFile(candidate) {
8
+ try {
9
+ return __rspack_external_node_fs_1b05aee1.statSync(candidate).isFile();
10
+ } catch {
11
+ return false;
12
+ }
13
+ }
14
+ function keepPublicRootRefs(source, publicRoot) {
15
+ return replaceCssUrlRefs(source, (request)=>{
16
+ if (!request.startsWith('/') || request.startsWith('//')) return;
17
+ const suffixAt = request.search(/[?#]/);
18
+ const rel = (-1 === suffixAt ? request : request.slice(0, suffixAt)).slice(1);
19
+ if (!rel || !isFile(__rspack_external_node_path_806ed179.join(publicRoot, rel))) return;
20
+ return `${PUBLIC_ROOT_SCHEME}${request}`;
21
+ });
22
+ }
23
+ function restorePublicRootRefs(source) {
24
+ return source.split(PUBLIC_ROOT_SCHEME).join('');
25
+ }
26
+ function publicCssUrlLoader(source) {
27
+ const { manifestPath, projectPath } = this.getOptions() || {};
28
+ if (!manifestPath || !projectPath) return source;
29
+ try {
30
+ const publicRoot = publicFolderOrDefault(manifestPath, projectPath);
31
+ return keepPublicRootRefs(source, publicRoot);
32
+ } catch {
33
+ return source;
34
+ }
35
+ }
36
+ export default publicCssUrlLoader;
37
+ export { PUBLIC_ROOT_SCHEME, keepPublicRootRefs, restorePublicRootRefs };
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
- import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
3
- import * as __rspack_external_node_path_c5b9b54f from "node:path";
2
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
3
+ import * as __rspack_external_node_path_806ed179 from "node:path";
4
4
  const ASSET_EXT = /\.(png|jpe?g|gif|webp|svg|avif|ico|bmp|cur|woff2?|ttf|otf|eot|mp3|mp4|webm|ogg|wav)$/i;
5
5
  const URL_REF = /url\(\s*(?:"([^"\n]*)"|'([^'\n]*)'|([^)'"\s]*))\s*\)/g;
6
6
  function toPosixPath(value) {
7
- return String(value).split(__rspack_external_node_path_c5b9b54f.sep).join('/');
7
+ return String(value).split(__rspack_external_node_path_806ed179.sep).join('/');
8
8
  }
9
9
  function isDeadCssUrlRef(rawRequest, { issuerDir, roots }) {
10
10
  const req = String(rawRequest).split('?')[0].split('#')[0];
@@ -14,11 +14,11 @@ function isDeadCssUrlRef(rawRequest, { issuerDir, roots }) {
14
14
  const isRelativeRef = req.startsWith('./') || req.startsWith('../');
15
15
  const isBareAssetRef = !isRootRef && !isRelativeRef && ASSET_EXT.test(req);
16
16
  if (!isRootRef && !isRelativeRef && !isBareAssetRef) return false;
17
- const candidates = isRootRef ? roots.map((root)=>__rspack_external_node_path_c5b9b54f.join(root, req.slice(1))) : [
18
- __rspack_external_node_path_c5b9b54f.resolve(issuerDir, req),
19
- ...isBareAssetRef ? roots.map((root)=>__rspack_external_node_path_c5b9b54f.join(root, req)) : []
17
+ const candidates = isRootRef ? roots.map((root)=>__rspack_external_node_path_806ed179.join(root, req.slice(1))) : [
18
+ __rspack_external_node_path_806ed179.resolve(issuerDir, req),
19
+ ...isBareAssetRef ? roots.map((root)=>__rspack_external_node_path_806ed179.join(root, req)) : []
20
20
  ];
21
- return !candidates.some((candidate)=>__rspack_external_node_fs_5ea92f0c.existsSync(candidate));
21
+ return !candidates.some((candidate)=>__rspack_external_node_fs_1b05aee1.existsSync(candidate));
22
22
  }
23
23
  function replaceCssUrlRefs(source, replacer) {
24
24
  return source.replace(URL_REF, (whole, dq, sq, bare)=>{
package/dist/331~0.mjs ADDED
@@ -0,0 +1,43 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ import * as __rspack_external_node_path_806ed179 from "node:path";
3
+ __rspack_external_node_path_806ed179.join(process.cwd(), 'node_modules/extension-develop/dist/certs');
4
+ const CHROMIUM_BASED_BROWSERS = [
5
+ 'chrome',
6
+ 'edge',
7
+ 'brave',
8
+ 'opera',
9
+ 'vivaldi',
10
+ 'yandex'
11
+ ];
12
+ const GECKO_BASED_BROWSERS = [
13
+ 'firefox',
14
+ 'waterfox',
15
+ 'librewolf'
16
+ ];
17
+ const WEBKIT_BASED_BROWSERS = [
18
+ 'safari'
19
+ ];
20
+ const CHROMIUM_FAMILY_ALIASES = [
21
+ 'chromium',
22
+ 'chrome',
23
+ 'edge',
24
+ 'chromium-based'
25
+ ];
26
+ const GECKO_FAMILY_ALIASES = [
27
+ 'firefox',
28
+ 'gecko-based'
29
+ ];
30
+ [
31
+ ...CHROMIUM_BASED_BROWSERS,
32
+ ...GECKO_BASED_BROWSERS
33
+ ];
34
+ function isChromiumBasedBrowser(browser) {
35
+ return CHROMIUM_BASED_BROWSERS.includes(browser) || String(browser).includes('chromium');
36
+ }
37
+ function isGeckoBasedBrowser(browser) {
38
+ return GECKO_BASED_BROWSERS.includes(browser) || String(browser).includes('gecko') || String(browser).includes('firefox');
39
+ }
40
+ function isWebkitBasedBrowser(browser) {
41
+ return WEBKIT_BASED_BROWSERS.includes(browser) || String(browser).includes('webkit');
42
+ }
43
+ export { CHROMIUM_FAMILY_ALIASES, GECKO_FAMILY_ALIASES, isChromiumBasedBrowser, isGeckoBasedBrowser, isWebkitBasedBrowser };
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
2
  import pintor from "pintor";
3
- import { prefix as messaging_prefix } from "./349.mjs";
3
+ import { prefix as messaging_prefix } from "./852~0.mjs";
4
4
  function cssIntegrationsEnabled(integrations) {
5
5
  const names = integrations.length > 0 ? integrations.join(',') : 'none';
6
6
  return `${messaging_prefix('debug')} css integrations=${integrations.length} names=${names}`;
@@ -1,8 +1,8 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
- import { controlTokenPath, legacyControlTokenPath } from "./77.mjs";
3
- import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
4
- import * as __rspack_external_node_path_c5b9b54f from "node:path";
5
- import * as __rspack_external_node_crypto_9ba42079 from "node:crypto";
2
+ import { controlTokenPath, legacyControlTokenPath } from "./950~0.mjs";
3
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
4
+ import * as __rspack_external_node_path_806ed179 from "node:path";
5
+ import * as __rspack_external_node_crypto_2e7c4b46 from "node:crypto";
6
6
  const REFUSAL_NEEDS_HEADED_WINDOW = 'needs_headed_window';
7
7
  const REFUSAL_NEEDS_USER_GESTURE = 'needs_user_gesture';
8
8
  const REFUSAL_SURFACE_NOT_OPEN = 'surface_not_open';
@@ -10,7 +10,7 @@ const REFUSAL_API_UNAVAILABLE = 'api_unavailable';
10
10
  const CONTROL_WS_PATH = '/extjs-control';
11
11
  function readPersistedControlPort(filePath) {
12
12
  try {
13
- const port = parseInt(__rspack_external_node_fs_5ea92f0c.readFileSync(filePath, 'utf8').trim(), 10);
13
+ const port = parseInt(__rspack_external_node_fs_1b05aee1.readFileSync(filePath, 'utf8').trim(), 10);
14
14
  return Number.isInteger(port) && port > 0 && port < 65536 ? port : null;
15
15
  } catch {
16
16
  return null;
@@ -18,27 +18,27 @@ function readPersistedControlPort(filePath) {
18
18
  }
19
19
  function writePersistedControlPort(filePath, port) {
20
20
  try {
21
- __rspack_external_node_fs_5ea92f0c.mkdirSync(__rspack_external_node_path_c5b9b54f.dirname(filePath), {
21
+ __rspack_external_node_fs_1b05aee1.mkdirSync(__rspack_external_node_path_806ed179.dirname(filePath), {
22
22
  recursive: true
23
23
  });
24
- __rspack_external_node_fs_5ea92f0c.writeFileSync(filePath, `${port}\n`);
24
+ __rspack_external_node_fs_1b05aee1.writeFileSync(filePath, `${port}\n`);
25
25
  } catch {}
26
26
  }
27
27
  function writeControlToken(projectPath, browser) {
28
- const token = __rspack_external_node_crypto_9ba42079.randomBytes(32).toString('hex');
28
+ const token = __rspack_external_node_crypto_2e7c4b46.randomBytes(32).toString('hex');
29
29
  const file = controlTokenPath(projectPath, browser);
30
- __rspack_external_node_fs_5ea92f0c.mkdirSync(__rspack_external_node_path_c5b9b54f.dirname(file), {
30
+ __rspack_external_node_fs_1b05aee1.mkdirSync(__rspack_external_node_path_806ed179.dirname(file), {
31
31
  recursive: true
32
32
  });
33
- __rspack_external_node_fs_5ea92f0c.writeFileSync(file, token, {
33
+ __rspack_external_node_fs_1b05aee1.writeFileSync(file, token, {
34
34
  encoding: 'utf-8',
35
35
  mode: 384
36
36
  });
37
37
  try {
38
- __rspack_external_node_fs_5ea92f0c.chmodSync(file, 384);
38
+ __rspack_external_node_fs_1b05aee1.chmodSync(file, 384);
39
39
  } catch {}
40
40
  try {
41
- __rspack_external_node_fs_5ea92f0c.writeFileSync(legacyControlTokenPath(projectPath), token, {
41
+ __rspack_external_node_fs_1b05aee1.writeFileSync(legacyControlTokenPath(projectPath), token, {
42
42
  encoding: 'utf-8',
43
43
  mode: 384
44
44
  });
@@ -50,7 +50,7 @@ function readControlToken(projectPath, browser) {
50
50
  controlTokenPath(projectPath, browser),
51
51
  legacyControlTokenPath(projectPath)
52
52
  ])try {
53
- const token = __rspack_external_node_fs_5ea92f0c.readFileSync(file, 'utf-8').trim();
53
+ const token = __rspack_external_node_fs_1b05aee1.readFileSync(file, 'utf-8').trim();
54
54
  if (token.length) return token;
55
55
  } catch {}
56
56
  return null;
@@ -59,16 +59,16 @@ function clearControlToken(projectPath, browser) {
59
59
  const file = controlTokenPath(projectPath, browser);
60
60
  let token = null;
61
61
  try {
62
- token = __rspack_external_node_fs_5ea92f0c.readFileSync(file, 'utf-8').trim() || null;
62
+ token = __rspack_external_node_fs_1b05aee1.readFileSync(file, 'utf-8').trim() || null;
63
63
  } catch {}
64
64
  try {
65
- __rspack_external_node_fs_5ea92f0c.rmSync(file, {
65
+ __rspack_external_node_fs_1b05aee1.rmSync(file, {
66
66
  force: true
67
67
  });
68
68
  } catch {}
69
69
  try {
70
70
  const legacy = legacyControlTokenPath(projectPath);
71
- if (token && __rspack_external_node_fs_5ea92f0c.readFileSync(legacy, 'utf-8').trim() === token) __rspack_external_node_fs_5ea92f0c.rmSync(legacy, {
71
+ if (token && __rspack_external_node_fs_1b05aee1.readFileSync(legacy, 'utf-8').trim() === token) __rspack_external_node_fs_1b05aee1.rmSync(legacy, {
72
72
  force: true
73
73
  });
74
74
  } catch {}
@@ -1,6 +1,88 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
2
  import pintor from "pintor";
3
- import { prefix } from "./349.mjs";
3
+ import { isChromiumBasedBrowser, isGeckoBasedBrowser } from "./331~0.mjs";
4
+ import { parseJsonSafe } from "./731~0.mjs";
5
+ import { prefix as messaging_prefix } from "./852~0.mjs";
6
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
7
+ function filterKeysForThisBrowser(manifest, browser) {
8
+ const isSafariTarget = 'safari' === browser || 'webkit-based' === browser || String(browser).includes('webkit');
9
+ const isChromiumTarget = isChromiumBasedBrowser(String(browser)) || isSafariTarget;
10
+ const isGeckoTarget = isGeckoBasedBrowser(String(browser));
11
+ const chromiumPrefixes = new Set([
12
+ 'chromium',
13
+ 'chrome',
14
+ 'edge'
15
+ ]);
16
+ const geckoPrefixes = new Set([
17
+ 'gecko',
18
+ 'firefox'
19
+ ]);
20
+ const webkitPrefixes = new Set([
21
+ 'safari',
22
+ 'webkit'
23
+ ]);
24
+ const isFamilyPrefix = (prefix)=>isChromiumTarget && chromiumPrefixes.has(prefix) || isGeckoTarget && geckoPrefixes.has(prefix);
25
+ const isSpecificPrefix = (prefix)=>prefix === browser || isSafariTarget && webkitPrefixes.has(prefix);
26
+ const resolve = (node)=>{
27
+ if (Array.isArray(node)) return node.map((item)=>resolve(item));
28
+ if (node && 'object' == typeof node) {
29
+ const result = {};
30
+ const familyMatches = {};
31
+ const specificMatches = {};
32
+ for (const [key, value] of Object.entries(node)){
33
+ const indexOfColon = key.indexOf(':');
34
+ if (-1 === indexOfColon) {
35
+ result[key] = resolve(value);
36
+ continue;
37
+ }
38
+ const prefix = key.substring(0, indexOfColon);
39
+ const strippedKey = key.substring(indexOfColon + 1);
40
+ if (isSpecificPrefix(prefix)) specificMatches[strippedKey] = resolve(value);
41
+ else if (isFamilyPrefix(prefix)) familyMatches[strippedKey] = resolve(value);
42
+ }
43
+ for (const [strippedKey, value] of Object.entries(familyMatches))result[strippedKey] = value;
44
+ for (const [strippedKey, value] of Object.entries(specificMatches))result[strippedKey] = value;
45
+ return result;
46
+ }
47
+ return node;
48
+ };
49
+ return resolve(manifest);
50
+ }
51
+ const THEME_DISQUALIFYING_KEYS = [
52
+ 'background',
53
+ "content_scripts",
54
+ 'action',
55
+ 'browser_action',
56
+ 'page_action',
57
+ 'sidebar_action',
58
+ 'side_panel',
59
+ 'options_page',
60
+ 'options_ui',
61
+ 'devtools_page',
62
+ 'chrome_url_overrides',
63
+ 'sandbox',
64
+ "user_scripts",
65
+ 'declarative_net_request',
66
+ 'web_accessible_resources'
67
+ ];
68
+ function isStaticTheme(manifest) {
69
+ if (!manifest || 'object' != typeof manifest) return false;
70
+ const theme = manifest.theme;
71
+ if (!theme || 'object' != typeof theme) return false;
72
+ return !THEME_DISQUALIFYING_KEYS.some((key)=>{
73
+ const value = manifest[key];
74
+ return null != value;
75
+ });
76
+ }
77
+ function isStaticThemeSource(manifestPath, browser) {
78
+ if (!manifestPath) return false;
79
+ try {
80
+ const parsed = parseJsonSafe(__rspack_external_node_fs_1b05aee1.readFileSync(manifestPath, 'utf-8'));
81
+ return isStaticTheme(filterKeysForThisBrowser(parsed, browser));
82
+ } catch {
83
+ return false;
84
+ }
85
+ }
4
86
  function importScriptsDependencyMissing(workerPath, literal, expectedPath, sourceSibling) {
5
87
  const lines = [];
6
88
  lines.push(`The background service worker calls importScripts('${literal}'), but the file isn't in the output.`);
@@ -45,7 +127,7 @@ const SPLIT_ENTRY_SURFACES = {
45
127
  effect: "the content script never runs on the page"
46
128
  },
47
129
  script: {
48
- loads: ()=>'the runtime injection loads only',
130
+ loads: ()=>'the browser injects only',
49
131
  effect: "the script never runs"
50
132
  }
51
133
  };
@@ -94,6 +176,6 @@ function staticImportDependencyMissing(assetName, literal, expectedPath) {
94
176
  }
95
177
  function reservedScriptsFolder(relPath, indicators) {
96
178
  const reasons = indicators.map((r)=>`- ${pintor.gray(r)}`).join('\n');
97
- return `${prefix('error')} scripts/ is a reserved folder in Extension.js.\n${pintor.gray('PATH')} ${pintor.underline(relPath)}\nEvery file under ${pintor.blue("scripts/")} is wrapped with the browser content-script mount runtime, so Node.js-only files placed here fail to parse or run.\nThis file looks Node.js-only:\n${reasons}\nRename the folder at the project root (for example ${pintor.blue('bin/')}, ${pintor.blue('tools/')}, or ${pintor.blue('tasks/')}), or move the file out of scripts/.`;
179
+ return `${messaging_prefix('error')} scripts/ is a reserved folder in Extension.js.\n${pintor.gray('PATH')} ${pintor.underline(relPath)}\nEvery file under ${pintor.blue("scripts/")} is wrapped with the browser content-script mount runtime, so Node.js-only files placed here fail to parse or run.\nThis file looks Node.js-only:\n${reasons}\nRename the folder at the project root (for example ${pintor.blue('bin/')}, ${pintor.blue('tools/')}, or ${pintor.blue('tasks/')}), or move the file out of scripts/.`;
98
180
  }
99
- export { entrySplitAcrossInitialFiles, fetchedFileDependencyMissing, getURLDependencyMissing, importScriptsDependencyMissing, injectedCompiledSourceLiteral, injectedFileDependencyMissing, reservedScriptsFolder, runtimeSetSurfaceDependencyMissing, staticImportDependencyMissing };
181
+ export { entrySplitAcrossInitialFiles, fetchedFileDependencyMissing, filterKeysForThisBrowser, getURLDependencyMissing, importScriptsDependencyMissing, injectedCompiledSourceLiteral, injectedFileDependencyMissing, isStaticTheme, isStaticThemeSource, reservedScriptsFolder, runtimeSetSurfaceDependencyMissing, staticImportDependencyMissing };
@@ -1,7 +1,14 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
- import { stripBom } from "./23.mjs";
3
- import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
4
- import * as __rspack_external_node_path_c5b9b54f from "node:path";
2
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
3
+ import * as __rspack_external_node_path_806ed179 from "node:path";
4
+ function stripBom(text) {
5
+ const raw = 'string' == typeof text ? text : String(text || '');
6
+ return raw && 0xfeff === raw.charCodeAt(0) ? raw.slice(1) : raw;
7
+ }
8
+ function parseJsonSafe(text) {
9
+ const s = stripBom(text);
10
+ return JSON.parse(s || '{}');
11
+ }
5
12
  const PROJECT_MANIFEST_FILENAMES = [
6
13
  'package.json',
7
14
  'deno.jsonc',
@@ -102,9 +109,9 @@ function parseNpmSpecifier(specifier) {
102
109
  }
103
110
  function findDenoConfigPath(projectDir) {
104
111
  for (const filename of DENO_CONFIG_FILENAMES){
105
- const candidate = __rspack_external_node_path_c5b9b54f.join(projectDir, filename);
112
+ const candidate = __rspack_external_node_path_806ed179.join(projectDir, filename);
106
113
  try {
107
- if (__rspack_external_node_fs_5ea92f0c.statSync(candidate).isFile()) return candidate;
114
+ if (__rspack_external_node_fs_1b05aee1.statSync(candidate).isFile()) return candidate;
108
115
  } catch {}
109
116
  }
110
117
  }
@@ -112,7 +119,7 @@ function readDenoConfigDependencies(denoConfigPath) {
112
119
  const dependencies = {};
113
120
  let config;
114
121
  try {
115
- config = parseJsoncSafe(__rspack_external_node_fs_5ea92f0c.readFileSync(denoConfigPath, 'utf8'));
122
+ config = parseJsoncSafe(__rspack_external_node_fs_1b05aee1.readFileSync(denoConfigPath, 'utf8'));
116
123
  } catch {
117
124
  return dependencies;
118
125
  }
@@ -129,7 +136,7 @@ function readDenoConfigDependencies(denoConfigPath) {
129
136
  }
130
137
  function readPackageJsonDependencies(packageJsonPath) {
131
138
  try {
132
- const pkg = JSON.parse(stripBom(__rspack_external_node_fs_5ea92f0c.readFileSync(packageJsonPath, 'utf8')) || '{}');
139
+ const pkg = JSON.parse(stripBom(__rspack_external_node_fs_1b05aee1.readFileSync(packageJsonPath, 'utf8')) || '{}');
133
140
  const sections = [
134
141
  pkg.dependencies,
135
142
  pkg.devDependencies,
@@ -148,7 +155,7 @@ function readPackageJsonDependencies(packageJsonPath) {
148
155
  function readProjectDependencies(projectDir) {
149
156
  const denoConfigPath = findDenoConfigPath(projectDir);
150
157
  const denoDependencies = denoConfigPath ? readDenoConfigDependencies(denoConfigPath) : {};
151
- const packageJsonDependencies = readPackageJsonDependencies(__rspack_external_node_path_c5b9b54f.join(projectDir, 'package.json'));
158
+ const packageJsonDependencies = readPackageJsonDependencies(__rspack_external_node_path_806ed179.join(projectDir, 'package.json'));
152
159
  return {
153
160
  ...denoDependencies,
154
161
  ...packageJsonDependencies
@@ -160,45 +167,45 @@ function hasProjectDependency(projectDir, packageName) {
160
167
  function findNearestProjectManifestDirSync(startPath, maxDepth = 6) {
161
168
  let currentDirectory = startPath;
162
169
  for(let i = 0; i < maxDepth; i++){
163
- if (PROJECT_MANIFEST_FILENAMES.some((filename)=>__rspack_external_node_fs_5ea92f0c.existsSync(__rspack_external_node_path_c5b9b54f.join(currentDirectory, filename)))) return currentDirectory;
164
- const parentDirectory = __rspack_external_node_path_c5b9b54f.dirname(currentDirectory);
170
+ if (PROJECT_MANIFEST_FILENAMES.some((filename)=>__rspack_external_node_fs_1b05aee1.existsSync(__rspack_external_node_path_806ed179.join(currentDirectory, filename)))) return currentDirectory;
171
+ const parentDirectory = __rspack_external_node_path_806ed179.dirname(currentDirectory);
165
172
  if (parentDirectory === currentDirectory) break;
166
173
  currentDirectory = parentDirectory;
167
174
  }
168
175
  }
169
176
  function findNearestProjectManifestSync(manifestPath) {
170
- const root = __rspack_external_node_path_c5b9b54f.parse(manifestPath).root;
171
- let currentDir = __rspack_external_node_path_c5b9b54f.dirname(manifestPath);
177
+ const root = __rspack_external_node_path_806ed179.parse(manifestPath).root;
178
+ let currentDir = __rspack_external_node_path_806ed179.dirname(manifestPath);
172
179
  while(true){
173
180
  for (const filename of PROJECT_MANIFEST_FILENAMES){
174
- const candidate = __rspack_external_node_path_c5b9b54f.join(currentDir, filename);
181
+ const candidate = __rspack_external_node_path_806ed179.join(currentDir, filename);
175
182
  try {
176
- if (__rspack_external_node_fs_5ea92f0c.statSync(candidate).isFile()) return candidate;
183
+ if (__rspack_external_node_fs_1b05aee1.statSync(candidate).isFile()) return candidate;
177
184
  } catch {}
178
185
  }
179
186
  if (currentDir === root) return null;
180
- currentDir = __rspack_external_node_path_c5b9b54f.dirname(currentDir);
187
+ currentDir = __rspack_external_node_path_806ed179.dirname(currentDir);
181
188
  }
182
189
  }
183
190
  function findNearestDenoConfigSync(manifestPath) {
184
191
  if (/^(?:\.[\\/])?[a-z][a-z0-9+.-]+:[\\/]+/i.test(manifestPath)) return null;
185
- const root = __rspack_external_node_path_c5b9b54f.parse(__rspack_external_node_path_c5b9b54f.resolve(manifestPath)).root;
186
- let currentDir = __rspack_external_node_path_c5b9b54f.dirname(__rspack_external_node_path_c5b9b54f.resolve(manifestPath));
192
+ const root = __rspack_external_node_path_806ed179.parse(__rspack_external_node_path_806ed179.resolve(manifestPath)).root;
193
+ let currentDir = __rspack_external_node_path_806ed179.dirname(__rspack_external_node_path_806ed179.resolve(manifestPath));
187
194
  while(true){
188
195
  const found = findDenoConfigPath(currentDir);
189
196
  if (found) return found;
190
- const parentDir = __rspack_external_node_path_c5b9b54f.dirname(currentDir);
197
+ const parentDir = __rspack_external_node_path_806ed179.dirname(currentDir);
191
198
  if (currentDir === root || parentDir === currentDir) return null;
192
199
  currentDir = parentDir;
193
200
  }
194
201
  }
195
202
  function validateDenoConfig(denoConfigPath) {
196
203
  try {
197
- if (!__rspack_external_node_fs_5ea92f0c.existsSync(denoConfigPath)) return false;
198
- parseJsoncSafe(__rspack_external_node_fs_5ea92f0c.readFileSync(denoConfigPath, 'utf8'));
204
+ if (!__rspack_external_node_fs_1b05aee1.existsSync(denoConfigPath)) return false;
205
+ parseJsoncSafe(__rspack_external_node_fs_1b05aee1.readFileSync(denoConfigPath, 'utf8'));
199
206
  return true;
200
207
  } catch {
201
208
  return false;
202
209
  }
203
210
  }
204
- export { PROJECT_MANIFEST_FILENAMES, findNearestDenoConfigSync, findNearestProjectManifestDirSync, findNearestProjectManifestSync, hasProjectDependency, readProjectDependencies, validateDenoConfig };
211
+ export { PROJECT_MANIFEST_FILENAMES, findNearestDenoConfigSync, findNearestProjectManifestDirSync, findNearestProjectManifestSync, hasProjectDependency, parseJsonSafe, readProjectDependencies, stripBom, validateDenoConfig };
@@ -1,12 +1,12 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
- import { htmlStaticAssetOutputName } from "./834.mjs";
3
- import { replaceCssUrlRefs, toPosixPath } from "./86.mjs";
4
- import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
5
- import * as __rspack_external_node_path_c5b9b54f from "node:path";
2
+ import { htmlStaticAssetOutputName } from "./938~0.mjs";
3
+ import { replaceCssUrlRefs, toPosixPath } from "./273~0.mjs";
4
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
5
+ import * as __rspack_external_node_path_806ed179 from "node:path";
6
6
  const EXTENSION_ROOT_PLACEHOLDER = '__EXTENSIONJS_EXTENSION_ROOT__/';
7
7
  function isFile(candidate) {
8
8
  try {
9
- return __rspack_external_node_fs_5ea92f0c.statSync(candidate).isFile();
9
+ return __rspack_external_node_fs_1b05aee1.statSync(candidate).isFile();
10
10
  } catch {
11
11
  return false;
12
12
  }
@@ -14,13 +14,13 @@ function isFile(candidate) {
14
14
  function resolveTarget(req, { resourcePath, manifestDir, publicRoot }) {
15
15
  if (req.startsWith('/')) {
16
16
  const rel = req.slice(1);
17
- const fromPublic = __rspack_external_node_path_c5b9b54f.join(publicRoot, rel);
17
+ const fromPublic = __rspack_external_node_path_806ed179.join(publicRoot, rel);
18
18
  if (isFile(fromPublic)) return {
19
19
  absolutePath: fromPublic,
20
- outputName: toPosixPath(__rspack_external_node_path_c5b9b54f.normalize(rel)),
20
+ outputName: toPosixPath(__rspack_external_node_path_806ed179.normalize(rel)),
21
21
  publicOwned: true
22
22
  };
23
- const fromManifest = __rspack_external_node_path_c5b9b54f.join(manifestDir, rel);
23
+ const fromManifest = __rspack_external_node_path_806ed179.join(manifestDir, rel);
24
24
  if (!isFile(fromManifest)) return;
25
25
  return {
26
26
  absolutePath: fromManifest,
@@ -28,7 +28,7 @@ function resolveTarget(req, { resourcePath, manifestDir, publicRoot }) {
28
28
  publicOwned: false
29
29
  };
30
30
  }
31
- const absolutePath = __rspack_external_node_path_c5b9b54f.resolve(__rspack_external_node_path_c5b9b54f.dirname(resourcePath), req);
31
+ const absolutePath = __rspack_external_node_path_806ed179.resolve(__rspack_external_node_path_806ed179.dirname(resourcePath), req);
32
32
  if (!isFile(absolutePath)) return;
33
33
  return {
34
34
  absolutePath,