extension-develop 4.0.11 → 4.0.12
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.
- package/dist/0~dev-server.mjs +1 -1
- package/dist/0~rspack-config.mjs +107 -3154
- package/dist/101.mjs +32 -4
- package/dist/266.mjs +1 -4
- package/dist/839.mjs +3156 -59
- package/dist/bridge-entry.d.ts +5 -0
- package/dist/command-build.d.ts +3 -0
- package/dist/command-dev.d.ts +5 -0
- package/dist/command-preview.d.ts +30 -0
- package/dist/dev-server/auto-exit.d.ts +1 -0
- package/dist/dev-server/cleanup.d.ts +11 -0
- package/dist/dev-server/compiler-hooks.d.ts +9 -0
- package/dist/dev-server/connectable-host.d.ts +2 -0
- package/dist/dev-server/control-bridge/actions-file.d.ts +38 -0
- package/dist/dev-server/control-bridge/broker.d.ts +122 -0
- package/dist/dev-server/control-bridge/consumer-client.d.ts +43 -0
- package/dist/dev-server/control-bridge/contracts.d.ts +164 -0
- package/dist/dev-server/control-bridge/control-port-store.d.ts +25 -0
- package/dist/dev-server/control-bridge/controller-client.d.ts +30 -0
- package/dist/dev-server/control-bridge/logs-file.d.ts +30 -0
- package/dist/dev-server/control-bridge/producer-runtime.d.ts +30 -0
- package/dist/dev-server/control-bridge/ring-buffer.d.ts +21 -0
- package/dist/dev-server/control-bridge/session-token.d.ts +18 -0
- package/dist/dev-server/control-bridge/ws-control-server.d.ts +13 -0
- package/dist/dev-server/frameworks.d.ts +2 -0
- package/dist/dev-server/index.d.ts +3 -0
- package/dist/dev-server/messages.d.ts +17 -0
- package/dist/dev-server/port-manager.d.ts +17 -0
- package/dist/extension-js-devtools/extension-js/chrome/events.ndjson +2 -6
- package/dist/extension-js-devtools/extension-js/chrome/ready.json +9 -6
- package/dist/extension-js-devtools/extension-js/chromium/events.ndjson +2 -6
- package/dist/extension-js-devtools/extension-js/chromium/ready.json +9 -6
- package/dist/extension-js-devtools/extension-js/edge/events.ndjson +2 -6
- package/dist/extension-js-devtools/extension-js/edge/ready.json +9 -6
- package/dist/extension-js-devtools/extension-js/firefox/events.ndjson +2 -6
- package/dist/extension-js-devtools/extension-js/firefox/ready.json +9 -6
- package/dist/extension-js-theme/extension-js/chrome/events.ndjson +2 -6
- package/dist/extension-js-theme/extension-js/chrome/ready.json +9 -6
- package/dist/extension-js-theme/extension-js/chromium/events.ndjson +2 -6
- package/dist/extension-js-theme/extension-js/chromium/ready.json +9 -6
- package/dist/extension-js-theme/extension-js/edge/events.ndjson +2 -6
- package/dist/extension-js-theme/extension-js/edge/ready.json +9 -6
- package/dist/extension-js-theme/extension-js/firefox/events.ndjson +2 -8
- package/dist/extension-js-theme/extension-js/firefox/ready.json +9 -6
- package/dist/lib/branding.d.ts +7 -0
- package/dist/lib/build-summary.d.ts +9 -0
- package/dist/lib/config-loader.d.ts +38 -0
- package/dist/lib/constants.d.ts +11 -0
- package/dist/lib/dark-mode.d.ts +9 -0
- package/dist/lib/dev-server-client-import.d.ts +4 -0
- package/dist/lib/develop-context.d.ts +3 -0
- package/dist/lib/ensure-develop-artifacts.d.ts +10 -0
- package/dist/lib/extensions-to-load.d.ts +1 -0
- package/dist/lib/generate-extension-types.d.ts +1 -0
- package/dist/lib/has-dependency.d.ts +6 -0
- package/dist/lib/manifest-utils.d.ts +2 -0
- package/dist/lib/messages.d.ts +55 -0
- package/dist/lib/optional-dependency-types.d.ts +14 -0
- package/dist/lib/optional-deps-contracts.d.ts +13 -0
- package/dist/lib/optional-deps-resolver.d.ts +41 -0
- package/dist/lib/package-json.d.ts +3 -0
- package/dist/lib/package-manager.d.ts +61 -0
- package/dist/lib/parse-json-safe.d.ts +13 -0
- package/dist/lib/paths.d.ts +19 -0
- package/dist/lib/project-manifest.d.ts +60 -0
- package/dist/lib/project.d.ts +7 -0
- package/dist/lib/resource-path.d.ts +4 -0
- package/dist/lib/rust-min-stack.d.ts +2 -0
- package/dist/lib/sanitize.d.ts +1 -0
- package/dist/lib/session-paths.d.ts +39 -0
- package/dist/lib/stats-handler.d.ts +1 -0
- package/dist/lib/transpile-packages.d.ts +7 -0
- package/dist/lib/validate-user-dependencies.d.ts +1 -0
- package/dist/lib/zip.d.ts +2 -0
- package/dist/module.d.ts +8 -0
- package/dist/plugin-browsers/index.d.ts +108 -0
- package/dist/plugin-browsers/safari-dev-plugin.d.ts +19 -0
- package/dist/plugin-compatibility/compatibility-lib/messages.d.ts +5 -0
- package/dist/plugin-compatibility/feature-polyfill.d.ts +11 -0
- package/dist/plugin-compatibility/index.d.ts +12 -0
- package/dist/plugin-compilation/boring.d.ts +11 -0
- package/dist/plugin-compilation/clean-dist.d.ts +8 -0
- package/dist/plugin-compilation/compilation-lib/messages.d.ts +11 -0
- package/dist/plugin-compilation/compilation-lib/shared-state.d.ts +7 -0
- package/dist/plugin-compilation/env.d.ts +17 -0
- package/dist/plugin-compilation/index.d.ts +22 -0
- package/dist/plugin-compilation/zip.d.ts +18 -0
- package/dist/plugin-css/common-style-loaders.d.ts +8 -0
- package/dist/plugin-css/css-in-content-script-loader.d.ts +4 -0
- package/dist/plugin-css/css-in-html-loader.d.ts +4 -0
- package/dist/plugin-css/css-lib/build-css-rules.d.ts +12 -0
- package/dist/plugin-css/css-lib/inject-css-link.d.ts +16 -0
- package/dist/plugin-css/css-lib/is-content-script.d.ts +1 -0
- package/dist/plugin-css/css-lib/messages.d.ts +9 -0
- package/dist/plugin-css/css-lib/resolve-css-asset.d.ts +21 -0
- package/dist/plugin-css/css-parse-guard-loader.d.ts +8 -0
- package/dist/plugin-css/css-tools/less.d.ts +7 -0
- package/dist/plugin-css/css-tools/postcss.d.ts +4 -0
- package/dist/plugin-css/css-tools/sass.d.ts +10 -0
- package/dist/plugin-css/css-tools/tailwind.d.ts +2 -0
- package/dist/plugin-css/index.d.ts +26 -0
- package/dist/plugin-css/preprocessor-passthrough-loader.d.ts +6 -0
- package/dist/plugin-js-frameworks/frameworks-lib/integrations.d.ts +4 -0
- package/dist/plugin-js-frameworks/index.d.ts +18 -0
- package/dist/plugin-js-frameworks/js-frameworks-lib/load-loader-options.d.ts +2 -0
- package/dist/plugin-js-frameworks/js-frameworks-lib/messages.d.ts +10 -0
- package/dist/plugin-js-frameworks/js-tools/preact.d.ts +3 -0
- package/dist/plugin-js-frameworks/js-tools/react.d.ts +8 -0
- package/dist/plugin-js-frameworks/js-tools/svelte.d.ts +4 -0
- package/dist/plugin-js-frameworks/js-tools/typescript.d.ts +37 -0
- package/dist/plugin-js-frameworks/js-tools/vue.d.ts +3 -0
- package/dist/plugin-perf-budgets/categorize.d.ts +3 -0
- package/dist/plugin-perf-budgets/index.d.ts +34 -0
- package/dist/plugin-perf-budgets/messages.d.ts +8 -0
- package/dist/plugin-playwright/index.d.ts +89 -0
- package/dist/plugin-reload/classify-reload.d.ts +86 -0
- package/dist/plugin-reload/index.d.ts +29 -0
- package/dist/plugin-reload/messages.d.ts +1 -0
- package/dist/plugin-reload/reload-dispatch.d.ts +46 -0
- package/dist/plugin-reload/reload-lib/minimum-files/minimum-background-file-chromium.d.ts +0 -0
- package/dist/plugin-reload/reload-lib/minimum-files/minimum-background-file-firefox.d.ts +0 -0
- package/dist/plugin-reload/reload-lib/scripts-replay-shim.d.ts +19 -0
- package/dist/plugin-reload/steps/inject-bridge-producer.d.ts +14 -0
- package/dist/plugin-reload/steps/inject-bridge-relay.d.ts +4 -0
- package/dist/plugin-reload/steps/inject-scripts-replay-shim.d.ts +10 -0
- package/dist/plugin-reload/steps/prune-stale-hot-updates.d.ts +20 -0
- package/dist/plugin-reload/steps/remove-content-script-dev-server-runtime.d.ts +2 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/index.d.ts +9 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/setup-background-entry.d.ts +13 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/index.d.ts +2 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/ChunkLoader.d.ts +9 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/HMRDevServer.d.ts +3 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/InitialChunkFile.d.ts +5 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/NoDangerNamePlugin.d.ts +3 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/AutoPublicPath.d.ts +2 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/BaseUri.d.ts +2 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/BrowserRuntime.d.ts +8 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/ChunkLoaderFallback.d.ts +1 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/EagerlyLoadChunks.d.ts +1 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/LoadScript.d.ts +4 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/PublicPath.d.ts +2 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/ServiceWorkerPlugin.d.ts +6 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/helper.d.ts +12 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/index.d.ts +5 -0
- package/dist/plugin-reload/steps/strip-content-script-dev-server-runtime.d.ts +4 -0
- package/dist/plugin-special-folders/check-manifest-in-public.d.ts +2 -0
- package/dist/plugin-special-folders/emit-root-absolute-refs.d.ts +2 -0
- package/dist/plugin-special-folders/folder-extensions/resolve-config.d.ts +6 -0
- package/dist/plugin-special-folders/folder-extensions/resolve-dirs.d.ts +5 -0
- package/dist/plugin-special-folders/folder-extensions/types.d.ts +17 -0
- package/dist/plugin-special-folders/folder-extensions/utils.d.ts +9 -0
- package/dist/plugin-special-folders/get-data.d.ts +12 -0
- package/dist/plugin-special-folders/index.d.ts +20 -0
- package/dist/plugin-special-folders/messages.d.ts +3 -0
- package/dist/plugin-special-folders/warn-upon-folder-changes.d.ts +13 -0
- package/dist/plugin-static-assets/index.d.ts +10 -0
- package/dist/plugin-static-assets/static-assets-lib/messages.d.ts +8 -0
- package/dist/plugin-wasm/index.d.ts +15 -0
- package/dist/plugin-web-extension/feature-html/html-lib/assets.d.ts +2 -0
- package/dist/plugin-web-extension/feature-html/html-lib/inject.d.ts +4 -0
- package/dist/plugin-web-extension/feature-html/html-lib/messages.d.ts +24 -0
- package/dist/plugin-web-extension/feature-html/html-lib/parse-html.d.ts +8 -0
- package/dist/plugin-web-extension/feature-html/html-lib/patch-html.d.ts +8 -0
- package/dist/plugin-web-extension/feature-html/html-lib/utils.d.ts +46 -0
- package/dist/plugin-web-extension/feature-html/index.d.ts +36 -0
- package/dist/plugin-web-extension/feature-html/steps/add-assets-to-compilation.d.ts +9 -0
- package/dist/plugin-web-extension/feature-html/steps/add-scripts-and-styles-to-compilation.d.ts +9 -0
- package/dist/plugin-web-extension/feature-html/steps/add-to-file-dependencies.d.ts +9 -0
- package/dist/plugin-web-extension/feature-html/steps/emit-html-file.d.ts +9 -0
- package/dist/plugin-web-extension/feature-html/steps/ensure-hmr-for-scripts.d.ts +2 -0
- package/dist/plugin-web-extension/feature-html/steps/handle-common-errors.d.ts +9 -0
- package/dist/plugin-web-extension/feature-html/steps/minimum-script-file.d.ts +1 -0
- package/dist/plugin-web-extension/feature-html/steps/preact-refresh-shim.d.ts +1 -0
- package/dist/plugin-web-extension/feature-html/steps/throw-if-recompile-is-needed.d.ts +12 -0
- package/dist/plugin-web-extension/feature-html/steps/update-html-file.d.ts +9 -0
- package/dist/plugin-web-extension/feature-icons/index.d.ts +22 -0
- package/dist/plugin-web-extension/feature-icons/messages.d.ts +12 -0
- package/dist/plugin-web-extension/feature-icons/normalize-keys.d.ts +3 -0
- package/dist/plugin-web-extension/feature-icons/steps/add-to-file-dependencies.d.ts +8 -0
- package/dist/plugin-web-extension/feature-icons/steps/emit-file.d.ts +8 -0
- package/dist/plugin-web-extension/feature-json/index.d.ts +18 -0
- package/dist/plugin-web-extension/feature-json/json-validation.d.ts +3 -0
- package/dist/plugin-web-extension/feature-json/messages.d.ts +17 -0
- package/dist/plugin-web-extension/feature-json/process-assets.d.ts +2 -0
- package/dist/plugin-web-extension/feature-json/track-dependencies.d.ts +2 -0
- package/dist/plugin-web-extension/feature-locales/compilation-error.d.ts +2 -0
- package/dist/plugin-web-extension/feature-locales/get-locales.d.ts +2 -0
- package/dist/plugin-web-extension/feature-locales/index.d.ts +12 -0
- package/dist/plugin-web-extension/feature-locales/messages.d.ts +13 -0
- package/dist/plugin-web-extension/feature-locales/process-assets.d.ts +2 -0
- package/dist/plugin-web-extension/feature-locales/track-dependencies.d.ts +2 -0
- package/dist/plugin-web-extension/feature-locales/validation.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/index.d.ts +21 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/manifest.d.ts +10 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/sanitize-fatal-shapes.d.ts +45 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/background.d.ts +6 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/chrome_url_overrides.d.ts +8 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/commands.d.ts +16 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/content_scripts.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/content_security_policy.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/devtools_page.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/icons.d.ts +6 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/index.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/omnibox.d.ts +9 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/options_page.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/options_ui.d.ts +8 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/page_action.d.ts +8 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/permissions.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/sandbox.d.ts +7 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/sidebar_action.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/storage.d.ts +6 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/theme.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/user_scripts.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/web_accessible_resources.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/index.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/background.d.ts +6 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/browser_action.d.ts +12 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/chrome_settings_overrides.d.ts +24 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/index.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/theme_experiment.d.ts +7 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/action.d.ts +8 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/background.d.ts +6 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/declarative_net_request.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/host_permissions.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/index.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/side_panel.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/messages.d.ts +9 -0
- package/dist/plugin-web-extension/feature-manifest/normalize-manifest-path.d.ts +3 -0
- package/dist/plugin-web-extension/feature-manifest/steps/add-dependencies.d.ts +6 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-background.d.ts +10 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-csp.d.ts +5 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-externally-connectable.d.ts +10 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-web-resources.d.ts +19 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults.d.ts +12 -0
- package/dist/plugin-web-extension/feature-manifest/steps/emit-manifest.d.ts +7 -0
- package/dist/plugin-web-extension/feature-manifest/steps/legacy-warnings.d.ts +5 -0
- package/dist/plugin-web-extension/feature-manifest/steps/patch-chromium-background.d.ts +15 -0
- package/dist/plugin-web-extension/feature-manifest/steps/patch-dev-content-script-manifest-paths.d.ts +11 -0
- package/dist/plugin-web-extension/feature-manifest/steps/patch-gecko-background.d.ts +15 -0
- package/dist/plugin-web-extension/feature-manifest/steps/patch-war.d.ts +15 -0
- package/dist/plugin-web-extension/feature-manifest/steps/persist-manifest.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/steps/update-manifest.d.ts +9 -0
- package/dist/plugin-web-extension/feature-scripts/contracts.d.ts +12 -0
- package/dist/plugin-web-extension/feature-scripts/index.d.ts +19 -0
- package/dist/plugin-web-extension/feature-scripts/messages.d.ts +7 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/utils.d.ts +2 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/classic-concat-loader.d.ts +8 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/content-script-wrapper.d.ts +13 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/get-bridge-scripts.d.ts +6 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/index.d.ts +11 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-public-path-runtime-module.d.ts +4 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-scripts.d.ts +9 -0
- package/dist/plugin-web-extension/feature-scripts/steps/keep-geturl-imports-native.d.ts +15 -0
- package/dist/plugin-web-extension/feature-scripts/steps/native-geturl-import-loader.d.ts +3 -0
- package/dist/plugin-web-extension/feature-scripts/steps/trace-runtime-loaded-files.d.ts +41 -0
- package/dist/plugin-web-extension/feature-scripts/steps/validate-content-script-syntax.d.ts +18 -0
- package/dist/plugin-web-extension/feature-web-resources/collect-entry-imports.d.ts +3 -0
- package/dist/plugin-web-extension/feature-web-resources/index.d.ts +19 -0
- package/dist/plugin-web-extension/feature-web-resources/steps/collect-content-entry-imports.d.ts +10 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/clean-matches.d.ts +7 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/generate-manifest.d.ts +11 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/messages.d.ts +10 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/resolve-war.d.ts +9 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/shared.d.ts +4 -0
- package/dist/plugin-web-extension/index.d.ts +9 -0
- package/dist/plugin-web-extension/shared/classic-concat.d.ts +18 -0
- package/dist/plugin-web-extension/shared/compilation-issues.d.ts +6 -0
- package/dist/plugin-web-extension/shared/manifest-fields-change-detector.d.ts +12 -0
- package/dist/plugin-web-extension/shared/paths.d.ts +26 -0
- package/dist/preview-entry.d.ts +3 -0
- package/dist/rslib.config.d.ts +3 -0
- package/dist/rspack-config.d.ts +4 -0
- package/dist/types.d.ts +406 -0
- package/package.json +3 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Manifest } from '../../../../types';
|
|
2
|
+
declare function patchWebResourcesV2(manifest: Manifest): string[];
|
|
3
|
+
declare function patchWebResourcesV3(manifest: Manifest): ((string & {
|
|
4
|
+
resources: string[];
|
|
5
|
+
use_dynamic_url?: boolean | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
extension_ids: string[];
|
|
8
|
+
matches?: string[] | undefined;
|
|
9
|
+
}) | (string & {
|
|
10
|
+
resources: string[];
|
|
11
|
+
use_dynamic_url?: boolean | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
matches: string[];
|
|
14
|
+
extension_ids?: string[] | undefined;
|
|
15
|
+
}) | {
|
|
16
|
+
resources: string[];
|
|
17
|
+
matches: string[];
|
|
18
|
+
})[];
|
|
19
|
+
export { patchWebResourcesV2, patchWebResourcesV3 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Compiler } from '@rspack/core';
|
|
2
|
+
import type { PluginInterface } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Applies dev-only manifest patches (CSP, permissions, background, WAR for reload).
|
|
5
|
+
* Runs only in development mode, after WAR patching (REPORT+100).
|
|
6
|
+
*/
|
|
7
|
+
export declare class ApplyDevDefaults {
|
|
8
|
+
private readonly manifestPath?;
|
|
9
|
+
private readonly browser;
|
|
10
|
+
constructor(options: PluginInterface);
|
|
11
|
+
apply(compiler: Compiler): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Manifest, type DevOptions } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Chromium does not run MV3 `background.scripts` — the extension fails to load
|
|
4
|
+
* ("The 'background.scripts' key cannot be used with manifest_version 3"),
|
|
5
|
+
* while Firefox happily uses it as an event page. The mirror of
|
|
6
|
+
* patch-gecko-background: the scripts array is bundled into a single classic
|
|
7
|
+
* file regardless of target, so for Chromium-family MV3 targets we repoint
|
|
8
|
+
* `background` at that emitted bundle via `service_worker` and drop the
|
|
9
|
+
* `scripts` key Chromium rejects. The bundle is classic (no `type: module`),
|
|
10
|
+
* which a classic service worker runs as-is.
|
|
11
|
+
*
|
|
12
|
+
* No-op for Gecko targets, MV2, manifests that already declare a
|
|
13
|
+
* `background.service_worker`, and manifests with no scripts array.
|
|
14
|
+
*/
|
|
15
|
+
export declare function patchChromiumBackground(manifest: Manifest, browser: DevOptions['browser']): Manifest;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Compilation } from '@rspack/core';
|
|
2
|
+
import type { Manifest } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* After each dev compile, canonical content bundles emit as
|
|
5
|
+
* `content_scripts/content-N.<fullhash>.js`. Point manifest `content_scripts` at those
|
|
6
|
+
* filenames so page reloads load the same bytes as reinject (avoids stale cache).
|
|
7
|
+
*
|
|
8
|
+
* Also removes stale hashed files from previous builds so resolveEmittedContentScriptFile
|
|
9
|
+
* always finds the current bundle unambiguously.
|
|
10
|
+
*/
|
|
11
|
+
export declare function patchDevContentScriptManifestPaths(compilation: Compilation, manifest: Manifest): Manifest;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Manifest, type DevOptions } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Firefox does not run MV3 `background.service_worker` — it is disabled, and the
|
|
4
|
+
* add-on fails to install ("background.service_worker is currently disabled. Add
|
|
5
|
+
* background.scripts."). Firefox uses an event page via `background.scripts`.
|
|
6
|
+
*
|
|
7
|
+
* The user's background bundle is emitted regardless of target, so for Gecko
|
|
8
|
+
* targets we repoint `background` at that emitted file via `scripts` and drop
|
|
9
|
+
* the `service_worker`/`type` keys Firefox rejects. This keeps a single
|
|
10
|
+
* `background.service_worker` source authoring cross-browser.
|
|
11
|
+
*
|
|
12
|
+
* No-op for Chromium, for manifests that already declare `background.scripts`,
|
|
13
|
+
* and for manifests with no service worker.
|
|
14
|
+
*/
|
|
15
|
+
export declare function patchGeckoBackground(manifest: Manifest, browser: DevOptions['browser']): Manifest;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Compiler } from '@rspack/core';
|
|
2
|
+
import type { PluginInterface, DevOptions } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Patches manifest.json with web_accessible_resources from content script
|
|
5
|
+
* imports. Depends on CollectContentEntryImports (feature-web-resources)
|
|
6
|
+
* populating getSharedFor(compilation).entryImports before this runs.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PatchWAR {
|
|
9
|
+
readonly manifestPath: string;
|
|
10
|
+
readonly browser?: DevOptions['browser'];
|
|
11
|
+
constructor(options: PluginInterface & {
|
|
12
|
+
browser?: DevOptions['browser'];
|
|
13
|
+
});
|
|
14
|
+
apply(compiler: Compiler): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Compiler } from '@rspack/core';
|
|
2
|
+
import { PluginInterface, DevOptions } from '../../../types';
|
|
3
|
+
export declare class UpdateManifest {
|
|
4
|
+
readonly manifestPath: string;
|
|
5
|
+
readonly browser: DevOptions['browser'];
|
|
6
|
+
constructor(options: PluginInterface);
|
|
7
|
+
private applyDevOverrides;
|
|
8
|
+
apply(compiler: Compiler): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const EXTENSIONJS_CONTENT_SCRIPT_LAYER = "extensionjs-content-script";
|
|
2
|
+
export declare const CANONICAL_CONTENT_SCRIPT_ENTRY_PREFIX = "content_scripts/content-";
|
|
3
|
+
export declare function getCanonicalContentScriptEntryName(index: number): string;
|
|
4
|
+
export declare function getCanonicalContentScriptJsAssetName(index: number): string;
|
|
5
|
+
export declare function getCanonicalContentScriptCssAssetName(index: number): string;
|
|
6
|
+
export declare function parseCanonicalContentScriptEntryIndex(entryName: string): number | undefined;
|
|
7
|
+
export declare function isCanonicalContentScriptEntryName(entryName: string): boolean;
|
|
8
|
+
export declare function parseCanonicalContentScriptAsset(assetName: string): {
|
|
9
|
+
index: number;
|
|
10
|
+
extension: 'js' | 'css';
|
|
11
|
+
} | undefined;
|
|
12
|
+
export declare function isCanonicalContentScriptAsset(assetName: string): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Compiler } from '@rspack/core';
|
|
2
|
+
import type { FilepathList, PluginInterface, DevOptions } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Feature-scripts is the official scripts pipeline:
|
|
5
|
+
* - content scripts use the inline lifecycle runtime only
|
|
6
|
+
* - targeted reinjection stays browser-owned
|
|
7
|
+
* - background/manifest changes stay on the full-reload path
|
|
8
|
+
*
|
|
9
|
+
* The dev-only reload/HMR strategy is NOT part of this feature — it lives
|
|
10
|
+
* in plugin-reload, which registers after this plugin and decorates the
|
|
11
|
+
* entries AddScripts declares here.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ScriptsPlugin {
|
|
14
|
+
readonly manifestPath: string;
|
|
15
|
+
readonly includeList?: FilepathList;
|
|
16
|
+
readonly browser?: DevOptions['browser'];
|
|
17
|
+
constructor(options: PluginInterface);
|
|
18
|
+
apply(compiler: Compiler): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function importScriptsDependencyMissing(workerPath: string, literal: string, expectedPath: string, sourceSibling?: string): string;
|
|
2
|
+
export declare function injectedFileDependencyMissing(assetName: string, literal: string, expectedPath: string, sourceSibling?: string): string;
|
|
3
|
+
export declare function fetchedFileDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
|
|
4
|
+
export declare function getURLDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
|
|
5
|
+
export declare function runtimeSetSurfaceDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
|
|
6
|
+
export declare function staticImportDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
|
|
7
|
+
export declare function reservedScriptsFolder(relPath: string, indicators: string[]): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ClassicConcatLoaderContext {
|
|
2
|
+
resourcePath: string;
|
|
3
|
+
resourceQuery: string;
|
|
4
|
+
addDependency(dep: string): void;
|
|
5
|
+
callback(err: Error | null, content?: string, sourceMap?: any): void;
|
|
6
|
+
}
|
|
7
|
+
export default function classicConcatLoader(this: ClassicConcatLoaderContext, _source: string): void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface ContentScriptLoaderContext {
|
|
2
|
+
getOptions(): {
|
|
3
|
+
manifestPath: string;
|
|
4
|
+
mode?: string;
|
|
5
|
+
};
|
|
6
|
+
_compilation?: any;
|
|
7
|
+
resourcePath: string;
|
|
8
|
+
resourceQuery?: string;
|
|
9
|
+
emitWarning?(warning: Error): void;
|
|
10
|
+
callback(err: Error | null, content?: string, sourceMap?: any): void;
|
|
11
|
+
}
|
|
12
|
+
export default function contentScriptWrapper(this: ContentScriptLoaderContext, source: string, inputSourceMap?: any): string | void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DevOptions, FilepathList } from '../../../../types';
|
|
2
|
+
export declare function resolveMainWorldBridgeSourcePath(options?: {
|
|
3
|
+
lookupDir?: string;
|
|
4
|
+
packageRoot?: string;
|
|
5
|
+
}): string | undefined;
|
|
6
|
+
export declare function getMainWorldBridgeScripts(manifestPath: string, browser?: DevOptions['browser']): FilepathList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Compiler } from '@rspack/core';
|
|
2
|
+
import type { PluginInterface, DevOptions, FilepathList } from '../../../../types';
|
|
3
|
+
export declare class AddContentScriptWrapper {
|
|
4
|
+
static getBridgeScripts(manifestPath: string, browser?: DevOptions['browser']): FilepathList;
|
|
5
|
+
private readonly manifestPath;
|
|
6
|
+
private readonly browser;
|
|
7
|
+
constructor(options: PluginInterface);
|
|
8
|
+
private resolveLoader;
|
|
9
|
+
private resolveConcatLoader;
|
|
10
|
+
apply(compiler: Compiler): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Compiler } from '@rspack/core';
|
|
2
|
+
import { type DevOptions, type FilepathList, type PluginInterface } from '../../../types';
|
|
3
|
+
export declare class AddScripts {
|
|
4
|
+
readonly manifestPath: string;
|
|
5
|
+
readonly includeList: FilepathList;
|
|
6
|
+
readonly browser: DevOptions['browser'];
|
|
7
|
+
constructor(options: PluginInterface);
|
|
8
|
+
apply(compiler: Compiler): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Compiler } from '@rspack/core';
|
|
2
|
+
import type { PluginInterface } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Registers the loader that keeps `import(chrome.runtime.getURL(...))`
|
|
5
|
+
* native. The argument is an absolute chrome-extension:// URL at runtime, so
|
|
6
|
+
* the bundler's module map can never satisfy it — lowered calls throw
|
|
7
|
+
* `Cannot find module 'chrome-extension://<id>/...'` in real Chrome while
|
|
8
|
+
* the source loads fine unpacked. TraceRuntimeLoadedFiles ships the target
|
|
9
|
+
* files; this step keeps the call site resolvable by the browser.
|
|
10
|
+
*/
|
|
11
|
+
export declare class KeepGetURLImportsNative {
|
|
12
|
+
private readonly manifestPath;
|
|
13
|
+
constructor(options: PluginInterface);
|
|
14
|
+
apply(compiler: Compiler): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Compiler } from '@rspack/core';
|
|
2
|
+
export declare class TraceRuntimeLoadedFiles {
|
|
3
|
+
readonly manifestPath: string;
|
|
4
|
+
constructor(options: {
|
|
5
|
+
manifestPath: string;
|
|
6
|
+
});
|
|
7
|
+
apply(compiler: Compiler): void;
|
|
8
|
+
private readManifest;
|
|
9
|
+
private traceWorkerImportScripts;
|
|
10
|
+
private traceFetchedFiles;
|
|
11
|
+
private traceGetURLFiles;
|
|
12
|
+
private traceWebpackChunkSiblings;
|
|
13
|
+
private traceInjectedFilePayloads;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Resolve a runtime URL literal the way the browser does — against a base
|
|
17
|
+
* path inside the extension origin — and return the extension-root-relative
|
|
18
|
+
* output path, or null for anything that isn't a same-origin file reference
|
|
19
|
+
* (remote URLs, other schemes, protocol-relative URLs).
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveExtensionPath(literal: string, basePath: string): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Extract HTML surface paths set at runtime: chrome.action.setPopup(
|
|
24
|
+
* {popup: "Alt.html"}) (plus browserAction/pageAction MV2 variants) and
|
|
25
|
+
* chrome.sidePanel.setOptions({path: "panel.html"}). Chrome resolves these
|
|
26
|
+
* against the extension root, but they are not manifest refs, so the page
|
|
27
|
+
* pipeline never compiles them — untraced they silently vanish from dist and
|
|
28
|
+
* the surface opens a 404 panel. Matching on the member chain
|
|
29
|
+
* (`action.setPopup(`) keeps user-defined functions out while surviving
|
|
30
|
+
* minification, mirroring extractGetURLLiterals.
|
|
31
|
+
*/
|
|
32
|
+
export declare function extractRuntimeSurfaceLiterals(source: string): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Extract module specifiers a raw (unbundled) ES module resolves against its
|
|
35
|
+
* own URL at runtime: static `import ... from "./x.js"`, side-effect
|
|
36
|
+
* `import "./x.js"`, re-exports (`export {a} from` / `export * from`), and
|
|
37
|
+
* literal dynamic `import("./x.js")`. Only same-origin file specifiers
|
|
38
|
+
* (./ ../ or /-anchored) qualify — bare package specifiers cannot resolve in
|
|
39
|
+
* the browser and belong to the bundler, not the copy-through path.
|
|
40
|
+
*/
|
|
41
|
+
export declare function extractStaticImportLiterals(source: string): string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Compiler } from '@rspack/core';
|
|
2
|
+
/**
|
|
3
|
+
* Parse-check every emitted content-script bundle and FAIL the compile on a
|
|
4
|
+
* SyntaxError. swc tolerates some early errors (e.g. a top-level `let x` +
|
|
5
|
+
* `const {x}` redeclaration) and happily emits them into the bundle — and the
|
|
6
|
+
* browser then silently skips the unparsable file: no console error, no
|
|
7
|
+
* injection, dev's "Reloading content_script…" reloading nothing. Real-world
|
|
8
|
+
* hit: Origin-pod__OriginBrain shipped exactly that shape and looked healthy
|
|
9
|
+
* everywhere while its content script never ran.
|
|
10
|
+
*
|
|
11
|
+
* `new Function(source)` only COMPILES the source (nothing executes), so this
|
|
12
|
+
* is a cheap, safe V8 parse — the same engine family that will load the file.
|
|
13
|
+
* Content scripts are always injected as classic scripts, so function-body
|
|
14
|
+
* parsing is the right (slightly lenient) approximation.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ValidateContentScriptSyntax {
|
|
17
|
+
apply(compiler: Compiler): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Compiler } from '@rspack/core';
|
|
2
|
+
import { type FilepathList, type PluginInterface } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ResourcesPlugin collects content script imports for manifest WAR patching.
|
|
5
|
+
* Actual manifest patching is done by ManifestPlugin (PatchWAR step) so all
|
|
6
|
+
* manifest writes stay consolidated in feature-manifest.
|
|
7
|
+
*
|
|
8
|
+
* Feature supported:
|
|
9
|
+
*
|
|
10
|
+
* - Collects assets imported from content_scripts files.
|
|
11
|
+
* - WAR patching uses this data (via getSharedFor) in manifest:patch-war.
|
|
12
|
+
*/
|
|
13
|
+
export declare class WebResourcesPlugin {
|
|
14
|
+
readonly manifestPath: string;
|
|
15
|
+
readonly includeList?: FilepathList;
|
|
16
|
+
readonly browser?: string;
|
|
17
|
+
constructor(options: PluginInterface);
|
|
18
|
+
apply(compiler: Compiler): void;
|
|
19
|
+
}
|
package/dist/plugin-web-extension/feature-web-resources/steps/collect-content-entry-imports.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Compiler } from '@rspack/core';
|
|
2
|
+
import type { FilepathList } from '../../../types';
|
|
3
|
+
export declare class CollectContentEntryImports {
|
|
4
|
+
readonly includeList?: FilepathList;
|
|
5
|
+
constructor(options: {
|
|
6
|
+
manifestPath: string;
|
|
7
|
+
includeList?: FilepathList;
|
|
8
|
+
});
|
|
9
|
+
apply(compiler: Compiler): void;
|
|
10
|
+
}
|
|
@@ -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[];
|
package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/generate-manifest.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Compilation } from '@rspack/core';
|
|
2
|
+
type WarV3Group = {
|
|
3
|
+
resources: string[];
|
|
4
|
+
matches: string[];
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
export declare function mergeIntoV3Group(groups: WarV3Group[], normalizedMatches: string[], resources: string[], options?: {
|
|
8
|
+
createGroupWhenMissing?: boolean;
|
|
9
|
+
}): void;
|
|
10
|
+
export declare function generateManifestPatches(compilation: Compilation, manifestPath: string, entryImports: Record<string, string[]>, browser?: string): void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function warFieldError(filePath: string, opts?: {
|
|
2
|
+
overrideNotFoundPath?: string;
|
|
3
|
+
publicRootHint?: boolean;
|
|
4
|
+
relativeRef?: string;
|
|
5
|
+
sourceSibling?: string;
|
|
6
|
+
}): string;
|
|
7
|
+
export declare function warStringEntryInMv3(entry: string): string;
|
|
8
|
+
export declare function warInvalidMatchPattern(pattern: string): string;
|
|
9
|
+
export declare function entryImportsSummary(entryCount: number, totalResources: number): string;
|
|
10
|
+
export declare function warPatchedSummary(v3Groups: number, v3ResourcesTotal: number, v2Resources: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Compilation } from '@rspack/core';
|
|
2
|
+
export declare function resolveUserDeclaredWAR(compilation: Compilation, manifestPath: string, manifest: unknown, browser?: string): {
|
|
3
|
+
v2: Set<string>;
|
|
4
|
+
v3: {
|
|
5
|
+
matches: string[];
|
|
6
|
+
resources: Set<string>;
|
|
7
|
+
extra?: Record<string, unknown>;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Compiler } from '@rspack/core';
|
|
2
|
+
import type { PluginInterface, DevOptions } from '../types';
|
|
3
|
+
export declare class WebExtensionPlugin {
|
|
4
|
+
static readonly name: string;
|
|
5
|
+
readonly manifestPath: string;
|
|
6
|
+
readonly browser: DevOptions['browser'];
|
|
7
|
+
constructor(options: PluginInterface);
|
|
8
|
+
apply(compiler: Compiler): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classic scripts loaded side by side (content_scripts arrays, multiple
|
|
3
|
+
* <script src> tags in one HTML page) share a single global scope in the
|
|
4
|
+
* browser: a top-level `var storage` in one file is visible to its siblings.
|
|
5
|
+
* Bundling each file as a separate ES module isolates those scopes and breaks
|
|
6
|
+
* the implicit cross-file globals. When every file in a group is classic (no
|
|
7
|
+
* top-level import/export), the group is concatenated into one module by the
|
|
8
|
+
* classic-concat loader instead — matching browser semantics.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isClassicScript(filePath: string): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Build the stub entry the classic-concat loader consumes. Instead of baking
|
|
13
|
+
* file contents into a data: URI (which rspack never watches and cannot
|
|
14
|
+
* source-map), the stub resolves to a real file (the first one) carrying a
|
|
15
|
+
* query with the full file list; the loader reads each file via addDependency
|
|
16
|
+
* (enabling watch-mode rebuilds) and generates a V3 source map.
|
|
17
|
+
*/
|
|
18
|
+
export declare function classicConcatEntry(feature: string, jsFiles: string[]): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Compilation, Compiler } from '@rspack/core';
|
|
2
|
+
export type IssueType = 'error' | 'warning';
|
|
3
|
+
export declare function createIssue(compiler: Compiler, message: string, type?: IssueType): Error & {
|
|
4
|
+
name?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function reportToCompilation(compilation: Compilation, compiler: Compiler, message: string, type?: IssueType, file?: string): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Compiler } from '@rspack/core';
|
|
2
|
+
import type { DevOptions, PluginInterface } from '../../types';
|
|
3
|
+
export declare class ManifestFieldsChangeDetector {
|
|
4
|
+
readonly manifestPath: string;
|
|
5
|
+
readonly browser: DevOptions['browser'];
|
|
6
|
+
private prev;
|
|
7
|
+
private pending;
|
|
8
|
+
constructor(options: PluginInterface);
|
|
9
|
+
private readSnapshot;
|
|
10
|
+
apply(compiler: Compiler): void;
|
|
11
|
+
private emitErrors;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type FilepathList } from '../../types';
|
|
2
|
+
export declare function isFromFilepathList(filePath: string, filepathList?: FilepathList): boolean;
|
|
3
|
+
export declare function getFilename(feature: string, filePath: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Change the path from win style to unix style
|
|
6
|
+
*/
|
|
7
|
+
export declare function unixify(filePath: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Resolve a root-absolute reference (`/nscl/main.js`, `url(/img/warn.svg)`)
|
|
10
|
+
* against the EXTENSION ROOT, the way Chrome does.
|
|
11
|
+
*
|
|
12
|
+
* Chrome resolves a leading `/` from the extension root — which, for a vanilla
|
|
13
|
+
* (non-bundled) extension, is the source directory. Extension.js only ever
|
|
14
|
+
* looked such refs up in `public/`, so wild extensions that keep their assets
|
|
15
|
+
* at the root failed to build (hackademix/noscript, mozilla/multi-account-containers).
|
|
16
|
+
*
|
|
17
|
+
* Strictly additive: `public/` still wins when it has the file, and we only
|
|
18
|
+
* claim a ref that actually exists at the root — so a ref that was already
|
|
19
|
+
* broken stays broken (and still reported).
|
|
20
|
+
*
|
|
21
|
+
* Returns the absolute source path to copy into the output root, or undefined
|
|
22
|
+
* when the ref is not ours to satisfy.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveRootAbsoluteRef(ref: string, projectRoot: string, publicRoot?: string): string | undefined;
|
|
25
|
+
/** Root-absolute refs in HTML (`src`/`href`) and CSS (`url(...)`). */
|
|
26
|
+
export declare function collectRootAbsoluteRefs(source: string): Set<string>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Configuration } from '@rspack/core';
|
|
2
|
+
import { type ProjectStructure } from './lib/project';
|
|
3
|
+
import type { WebpackConfigOptions } from './types';
|
|
4
|
+
export default function webpackConfig(projectStructure: ProjectStructure, devOptions: WebpackConfigOptions): Configuration;
|