extension-develop 4.1.41 → 4.1.42-canary.468.4885aab
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/README.md +127 -92
- package/dist/3~0.mjs +1 -1
- package/dist/5h~0.mjs +5 -13
- package/dist/5~0.mjs +60 -4
- package/dist/6~0.mjs +406 -28
- package/dist/7~0.mjs +38 -0
- package/dist/8~0.mjs +1509 -0
- package/dist/9q~0.mjs +248 -0
- package/dist/9~0.mjs +5 -99
- package/dist/asset-source-maps~0.mjs +19 -0
- package/dist/bh~0.mjs +27 -2
- package/dist/bridge-entry.d.ts +2 -2
- package/dist/bridge.mjs +10 -140
- package/dist/br~0.mjs +274 -0
- package/dist/b~0.mjs +53 -8624
- package/dist/command-build~0.mjs +1543 -0
- package/dist/command-dev.d.ts +1 -0
- package/dist/command-dev~0.mjs +312 -0
- package/dist/command-preview.d.ts +5 -7
- package/dist/command-preview~0.mjs +597 -0
- package/dist/config-loader~0.mjs +718 -0
- package/dist/contract/codes.json +299 -77
- package/dist/contract/envelope.schema.json +4 -1
- package/dist/contract/golden.doctor.healthy.json +1 -1
- package/dist/contract/golden.doctor.session-not-found.json +1 -1
- package/dist/contracts.mjs +3 -1
- package/dist/css-parse-guard-loader.mjs +4 -3
- package/dist/c~0.mjs +1 -1
- package/dist/dark-mode~0.mjs +77 -0
- package/dist/dead-css-url-loader.mjs +148 -23
- package/dist/dev-content-scripts~0.mjs +589 -0
- package/dist/dev-server/auto-exit.d.ts +2 -1
- package/dist/dev-server/cleanup.d.ts +23 -1
- package/dist/dev-server/control-bridge/broker.d.ts +5 -0
- package/dist/dev-server/control-bridge/consumer-client.d.ts +1 -0
- package/dist/dev-server/control-bridge/contracts.d.ts +3 -1
- package/dist/dev-server/control-bridge/producer-runtime.d.ts +1 -1
- package/dist/dev-server/control-bridge/production-control.d.ts +1 -33
- package/dist/dev-server/control-bridge/ws-control-server.d.ts +1 -0
- package/dist/dev-server/control-bridge-start.d.ts +24 -0
- package/dist/dev-server/cors.d.ts +23 -0
- package/dist/dev-server/file-event-assist.d.ts +25 -0
- package/dist/dev-server/index.d.ts +3 -3
- package/dist/dev-server/lifecycle-stream.d.ts +22 -6
- package/dist/dev-server/main-world-restart.d.ts +14 -0
- package/dist/dev-server/messages.d.ts +9 -0
- package/dist/dev-server/port-manager.d.ts +1 -0
- package/dist/dev-server/ready-contract-codes.d.ts +3 -0
- package/dist/dev-server/server-config.d.ts +26 -0
- package/dist/dev-server/session-claim.d.ts +1 -0
- package/dist/dev-server/session-end.d.ts +6 -0
- package/dist/dev-server/session-env.d.ts +3 -0
- package/dist/dev-server/session-gone-outputs.d.ts +15 -0
- package/dist/dev-server/session-holdings.d.ts +12 -0
- package/dist/dev-server/session-restart-handler.d.ts +47 -0
- package/dist/dev-server/session-restart-holds.d.ts +4 -0
- package/dist/dev-server/session-restart.d.ts +12 -3
- package/dist/dev-server/start-bundler.d.ts +91 -0
- package/dist/dev-server~0.mjs +1029 -470
- package/dist/d~0.mjs +178 -445
- package/dist/ensure-hmr-for-scripts.mjs +6 -17
- package/dist/env-write-loader.mjs +142 -0
- package/dist/extension-js-devtools/build-stamp.json +2 -2
- package/dist/extension-js-devtools/chrome/background/service_worker.js +2 -2
- package/dist/extension-js-devtools/chrome/extension-js-session.json +1 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/chromium/background/service_worker.js +2 -2
- package/dist/extension-js-devtools/chromium/extension-js-session.json +1 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/edge/background/service_worker.js +2 -2
- package/dist/extension-js-devtools/edge/extension-js-session.json +1 -1
- package/dist/extension-js-devtools/edge/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/edge/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/firefox/background/scripts.js +2 -2
- package/dist/extension-js-devtools/firefox/extension-js-session.json +1 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.js +2 -2
- package/dist/extension-js-theme/build-stamp.json +2 -2
- package/dist/ey~0.mjs +16 -2
- package/dist/e~0.mjs +1 -1
- package/dist/feature-scripts-classic-concat-loader.mjs +21 -4
- package/dist/feature-scripts-classic-traced-globals-loader.mjs +2 -2
- package/dist/feature-scripts-content-script-wrapper.mjs +87 -89
- package/dist/feature-scripts-native-geturl-import-loader.mjs +1 -1
- package/dist/f~0.mjs +126 -0
- package/dist/g0~0.mjs +8 -9
- package/dist/g2~0.mjs +227 -0
- package/dist/g~0.mjs +407 -91
- package/dist/i~0.mjs +246 -0
- package/dist/j6~0.mjs +14 -2
- package/dist/j8~0.mjs +579 -0
- package/dist/j~0.mjs +1 -1
- package/dist/ka~0.mjs +25 -3
- package/dist/ke~0.mjs +384 -0
- package/dist/k~0.mjs +1125 -292
- package/dist/late-css-import-loader.mjs +3 -2
- package/dist/lib/addon-lint.d.ts +1 -1
- package/dist/lib/addon-reviewer-note.d.ts +0 -1
- package/dist/lib/build-output-guard.d.ts +9 -0
- package/dist/lib/build-summary.d.ts +5 -1
- package/dist/lib/coded-warnings.d.ts +5 -2
- package/dist/lib/config-loader.d.ts +10 -5
- package/dist/lib/constants.d.ts +0 -5
- package/dist/lib/corepack-registry.d.ts +5 -0
- package/dist/lib/dev-additions.d.ts +1 -1
- package/dist/lib/dev-server-client-import.d.ts +5 -1
- package/dist/lib/develop-build-entries.d.ts +6 -0
- package/dist/lib/development-artifacts.d.ts +0 -1
- package/dist/lib/diagnostic-code.d.ts +5 -0
- package/dist/lib/duplicate-output-files.d.ts +0 -1
- package/dist/lib/ensure-develop-artifacts.d.ts +11 -2
- package/dist/lib/extension-base-from-stack.d.ts +0 -1
- package/dist/lib/extension-id.d.ts +5 -0
- package/dist/lib/extensions-to-load.d.ts +24 -1
- package/dist/lib/generate-extension-types.d.ts +2 -1
- package/dist/lib/install-registry-failure.d.ts +30 -0
- package/dist/lib/launch-codes.d.ts +1 -0
- package/dist/lib/loader-source-maps.d.ts +0 -1
- package/dist/lib/machine-text.d.ts +1 -0
- package/dist/lib/manifest-utils.d.ts +3 -1
- package/dist/lib/messages.d.ts +47 -5
- package/dist/lib/messaging.d.ts +61 -12
- package/dist/lib/missing-reference-watch.d.ts +9 -0
- package/dist/lib/named-cause.d.ts +5 -0
- package/dist/lib/normalize-split-chunks.d.ts +0 -1
- package/dist/lib/optional-deps-resolver.d.ts +0 -1
- package/dist/lib/package-json.d.ts +0 -1
- package/dist/lib/package-manager.d.ts +8 -5
- package/dist/lib/parse-json-safe.d.ts +11 -0
- package/dist/lib/paths.d.ts +3 -2
- package/dist/lib/production-control/index.d.ts +38 -0
- package/dist/lib/project-manifest.d.ts +0 -2
- package/dist/lib/project.d.ts +3 -0
- package/dist/lib/real-path.d.ts +1 -0
- package/dist/lib/recorded-build-browser.d.ts +2 -0
- package/dist/lib/reload-session.d.ts +1 -0
- package/dist/lib/resource-path.d.ts +1 -0
- package/dist/lib/resource-query.d.ts +1 -0
- package/dist/lib/session-contract.d.ts +16 -0
- package/dist/lib/session-paths.d.ts +2 -13
- package/dist/lib/split-chunks.d.ts +0 -1
- package/dist/lib/thrown-location.d.ts +1 -0
- package/dist/lib/transpile-packages.d.ts +0 -1
- package/dist/lib/withheld-file.d.ts +13 -0
- package/dist/lib/zip.d.ts +0 -1
- package/dist/l~0.mjs +14 -1898
- package/dist/manifest-entry.d.ts +25 -3
- package/dist/manifest.mjs +11 -4
- package/dist/mn~0.mjs +235 -0
- package/dist/module.d.ts +12 -8
- package/dist/module.mjs +19 -4
- package/dist/m~0.mjs +188 -5907
- package/dist/o~0.mjs +19 -44
- package/dist/plugin-browsers/bounded-wait.d.ts +10 -0
- package/dist/plugin-browsers/index.d.ts +21 -12
- package/dist/plugin-browsers/launch-timeout-stamp.d.ts +2 -0
- package/dist/plugin-browsers/messages.d.ts +5 -0
- package/dist/plugin-browsers/safari-dev-plugin.d.ts +8 -3
- package/dist/plugin-browsers~0.mjs +873 -0
- package/dist/plugin-compatibility/compatibility-lib/no-extension-api-files.d.ts +4 -0
- package/dist/plugin-compatibility/feature-polyfill.d.ts +7 -2
- package/dist/plugin-compilation/boring.d.ts +7 -1
- package/dist/plugin-compilation/compilation-lib/js-literal.d.ts +1 -0
- package/dist/plugin-compilation/compilation-lib/messages.d.ts +30 -6
- package/dist/plugin-compilation/env-write-loader.d.ts +19 -0
- package/dist/plugin-compilation/env.d.ts +4 -1
- package/dist/plugin-compilation/index.d.ts +3 -4
- package/dist/plugin-compilation/process-module.d.ts +2 -0
- package/dist/plugin-compilation/zip.d.ts +16 -1
- package/dist/plugin-css/common-style-loaders.d.ts +8 -0
- package/dist/plugin-css/css-lib/build-css-rules.d.ts +4 -0
- package/dist/plugin-css/css-lib/dead-url-refs.d.ts +6 -1
- package/dist/plugin-css/css-lib/inline-content-script-css.d.ts +6 -0
- package/dist/plugin-css/css-lib/inline-css-imports.d.ts +45 -0
- package/dist/plugin-css/css-lib/messages.d.ts +26 -5
- package/dist/plugin-css/css-lib/style-diagnostics.d.ts +2 -0
- package/dist/plugin-css/css-lib/user-css-rules.d.ts +5 -0
- package/dist/plugin-css/css-lib/verbatim-css.d.ts +2 -1
- package/dist/plugin-css/css-parse-guard-loader.d.ts +1 -0
- package/dist/plugin-css/css-tools/postcss.d.ts +15 -1
- package/dist/plugin-css/css-tools/sass.d.ts +1 -1
- package/dist/plugin-css/css-tools/tailwind.d.ts +1 -0
- package/dist/plugin-css/dead-css-url-loader.d.ts +4 -0
- package/dist/plugin-css/index.d.ts +5 -3
- package/dist/plugin-css/preprocessor-passthrough-loader.d.ts +5 -0
- package/dist/plugin-css/public-css-url-loader.d.ts +7 -0
- package/dist/plugin-js-frameworks/js-frameworks-lib/load-loader-options.d.ts +3 -1
- package/dist/plugin-js-frameworks/js-frameworks-lib/messages.d.ts +0 -4
- package/dist/plugin-js-frameworks/js-tools/decorators.d.ts +7 -0
- package/dist/plugin-js-frameworks/js-tools/preact.d.ts +3 -1
- package/dist/plugin-js-frameworks/js-tools/react.d.ts +3 -1
- package/dist/plugin-js-frameworks/js-tools/solid.d.ts +3 -1
- package/dist/plugin-js-frameworks/js-tools/svelte.d.ts +13 -2
- package/dist/plugin-js-frameworks/js-tools/typescript-reach.d.ts +7 -0
- package/dist/plugin-js-frameworks/js-tools/typescript.d.ts +9 -17
- package/dist/plugin-js-frameworks/js-tools/vue.d.ts +3 -1
- package/dist/plugin-perf-budgets/categorize.d.ts +9 -1
- package/dist/plugin-perf-budgets/index.d.ts +18 -5
- package/dist/plugin-perf-budgets/messages.d.ts +9 -0
- package/dist/plugin-perf-budgets/referrers.d.ts +2 -2
- package/dist/plugin-perf-budgets~0.mjs +443 -0
- package/dist/plugin-playwright/index.d.ts +7 -0
- package/dist/plugin-reload/build-reload.d.ts +9 -0
- package/dist/plugin-reload/index.d.ts +16 -12
- package/dist/plugin-reload/messages.d.ts +2 -0
- package/dist/plugin-reload/reload-after-package.d.ts +3 -0
- package/dist/plugin-reload/reload-lib/content-script-reinject.d.ts +3 -0
- package/dist/plugin-reload/reload-lib/dev-content-scripts.d.ts +3 -4
- package/dist/plugin-reload/steps/add-content-script-reinject.d.ts +7 -0
- package/dist/plugin-reload/steps/inject-bridge-producer.d.ts +7 -0
- package/dist/plugin-reload/steps/inject-bridge-relay.d.ts +6 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/index.d.ts +1 -11
- package/dist/plugin-reload/steps/setup-reload-strategy/setup-background-entry.d.ts +4 -0
- package/dist/plugin-special-folders/emit-root-absolute-refs.d.ts +8 -2
- package/dist/plugin-special-folders/folder-extensions/resolve-config.d.ts +3 -0
- package/dist/plugin-special-folders/folder-extensions/resolve-dirs.d.ts +1 -0
- package/dist/plugin-special-folders/folders-config.d.ts +1 -2
- package/dist/plugin-special-folders/get-data.d.ts +7 -1
- package/dist/plugin-special-folders/messages.d.ts +4 -0
- package/dist/plugin-special-folders/public-private-files.d.ts +15 -0
- package/dist/plugin-special-folders/resolve-public-folder.d.ts +3 -1
- package/dist/plugin-special-folders/walked-scripts.d.ts +6 -0
- package/dist/plugin-special-folders/warn-upon-folder-changes.d.ts +14 -0
- package/dist/plugin-static-assets/index.d.ts +0 -5
- package/dist/plugin-web-extension/feature-chunk-loading/background-entry-name.d.ts +8 -0
- package/dist/plugin-web-extension/feature-chunk-loading/chunk-loading-target.d.ts +7 -0
- package/dist/plugin-web-extension/feature-chunk-loading/content-scripts-meta.d.ts +3 -0
- package/dist/plugin-web-extension/feature-chunk-loading/options.d.ts +22 -0
- package/dist/plugin-web-extension/feature-chunk-loading/runtime-modules/browser-runtime.d.ts +4 -0
- package/dist/plugin-web-extension/feature-chunk-loading/runtime-modules/chunk-loader-fallback.d.ts +2 -0
- package/dist/plugin-web-extension/feature-chunk-loading/runtime-modules/load-script.d.ts +3 -0
- package/dist/plugin-web-extension/feature-chunk-loading/runtime-modules/public-path.d.ts +2 -0
- package/dist/plugin-web-extension/feature-chunk-loading/runtime-modules/template-fn.d.ts +4 -0
- package/dist/plugin-web-extension/feature-chunk-loading/steps/chunk-loader.d.ts +12 -0
- package/dist/plugin-web-extension/feature-chunk-loading/steps/no-danger-name.d.ts +4 -0
- package/dist/plugin-web-extension/feature-html/html-lib/assets.d.ts +2 -1
- package/dist/plugin-web-extension/feature-html/html-lib/messages.d.ts +4 -3
- package/dist/plugin-web-extension/feature-html/html-lib/options-dialog-floor.d.ts +1 -0
- package/dist/plugin-web-extension/feature-html/html-lib/patch-html.d.ts +1 -1
- package/dist/plugin-web-extension/feature-html/html-lib/source-may-ship.d.ts +6 -0
- package/dist/plugin-web-extension/feature-html/html-lib/utils.d.ts +6 -2
- package/dist/plugin-web-extension/feature-html/index.d.ts +2 -0
- package/dist/plugin-web-extension/feature-html/steps/add-assets-to-compilation.d.ts +1 -0
- package/dist/plugin-web-extension/feature-html/steps/add-scripts-and-styles-to-compilation.d.ts +2 -0
- package/dist/plugin-web-extension/feature-html/steps/emit-html-file.d.ts +1 -1
- package/dist/plugin-web-extension/feature-html/steps/throw-if-recompile-is-needed.d.ts +1 -0
- package/dist/plugin-web-extension/feature-json/index.d.ts +9 -3
- package/dist/plugin-web-extension/feature-json/messages.d.ts +1 -0
- package/dist/plugin-web-extension/feature-json/process-assets.d.ts +1 -1
- package/dist/plugin-web-extension/feature-json/resolve-json-resource.d.ts +2 -0
- package/dist/plugin-web-extension/feature-json/track-dependencies.d.ts +1 -1
- package/dist/plugin-web-extension/feature-locales/get-locales.d.ts +1 -0
- package/dist/plugin-web-extension/feature-locales/index.d.ts +1 -2
- package/dist/plugin-web-extension/feature-manifest/index.d.ts +2 -2
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-keys-safari.d.ts +1 -2
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/manifest.d.ts +3 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/shadowed-declaration.d.ts +9 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/theme-values.d.ts +5 -5
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/content_scripts.d.ts +1 -1
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/index.d.ts +1 -1
- package/dist/plugin-web-extension/feature-manifest/messages.d.ts +38 -2
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-additions.d.ts +3 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-injected-hosts.d.ts +1 -1
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-injected-permissions.d.ts +4 -1
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/emitted-evidence.d.ts +1 -1
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-csp.d.ts +3 -2
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/steps/emit-manifest.d.ts +5 -1
- package/dist/plugin-web-extension/feature-manifest/steps/patch-chromium-theme-colors.d.ts +5 -0
- package/dist/plugin-web-extension/feature-manifest/steps/patch-gecko-background.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/steps/update-manifest.d.ts +4 -0
- package/dist/plugin-web-extension/feature-manifest/steps/validate-theme-values.d.ts +1 -1
- package/dist/plugin-web-extension/feature-manifest/steps/warn-gecko-unsupported-apis.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/steps/warn-ignored-host-permissions.d.ts +10 -0
- package/dist/plugin-web-extension/feature-manifest/steps/warn-webassembly.d.ts +27 -0
- package/dist/plugin-web-extension/feature-scripts/contracts.d.ts +6 -0
- package/dist/plugin-web-extension/feature-scripts/messages.d.ts +12 -1
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/default-export.d.ts +28 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/front-rules.d.ts +4 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/injected-sheet-urls.d.ts +35 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/top-level-await.d.ts +6 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/utils.d.ts +7 -1
- package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/classic-concat-loader.d.ts +1 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/content-script-wrapper.d.ts +6 -1
- package/dist/plugin-web-extension/feature-scripts/steps/add-scripts.d.ts +4 -1
- package/dist/plugin-web-extension/feature-scripts/steps/source-literals.d.ts +1 -0
- package/dist/plugin-web-extension/feature-scripts/steps/trace-runtime-loaded-files.d.ts +22 -1
- package/dist/plugin-web-extension/feature-scripts/steps/warn-main-world-registration-changed.d.ts +0 -2
- package/dist/plugin-web-extension/feature-scripts/steps/warn-split-initial-chunks.d.ts +0 -3
- package/dist/plugin-web-extension/feature-web-resources/index.d.ts +0 -1
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/messages.d.ts +0 -1
- package/dist/plugin-web-extension/index.d.ts +2 -0
- package/dist/plugin-web-extension/shared/chunk-loading-target-extensions.d.ts +10 -0
- package/dist/plugin-web-extension/shared/classic-concat.d.ts +9 -0
- package/dist/plugin-web-extension/shared/content-script-wrapper-extensions.d.ts +29 -0
- package/dist/plugin-web-extension/shared/kept-page-paths.d.ts +16 -0
- package/dist/plugin-web-extension/shared/reported-missing-pages.d.ts +2 -0
- package/dist/preprocessor-passthrough-loader.mjs +4 -3
- package/dist/preview-entry.d.ts +2 -2
- package/dist/preview.mjs +6 -2
- package/dist/producer-runtime~0.mjs +3448 -0
- package/dist/public-css-url-loader.mjs +2 -2
- package/dist/q~0.mjs +1 -3
- package/dist/rename-with-retry~0.mjs +33 -0
- package/dist/rj~0.mjs +1 -1
- package/dist/rl~0.mjs +91 -9
- package/dist/rspack-config~0.mjs +17438 -10538
- package/dist/rz~0.mjs +137 -0
- package/dist/r~0.mjs +534 -90
- package/dist/session-end~0.mjs +28 -0
- package/dist/sfc-style-block-loader.mjs +2 -2
- package/dist/solid-jsx-gate-loader.mjs +1 -1
- package/dist/stats-handler~0.mjs +7 -4
- package/dist/sy~0.mjs +4025 -0
- package/dist/s~0.mjs +948 -0
- package/dist/types.d.ts +238 -78
- package/dist/unplaced-style-import-loader.mjs +2 -2
- package/dist/u~0.mjs +312 -0
- package/dist/w~0.mjs +1 -1
- package/dist/xk~0.mjs +778 -0
- package/dist/x~0.mjs +689 -3
- package/dist/y~0.mjs +29 -12
- package/dist/zip~0.mjs +7 -6
- package/dist/z~0.mjs +59 -2208
- package/package.json +5 -17
- package/dist/6l~0.mjs +0 -55
- package/dist/cp~0.mjs +0 -1363
- package/dist/dev-server/frameworks.d.ts +0 -2
- package/dist/df~0.mjs +0 -197
- package/dist/ensure-hmr-for-scripts.js +0 -104
- package/dist/feature-scripts-classic-concat-loader.js +0 -365
- package/dist/feature-scripts-content-script-wrapper.js +0 -310
- package/dist/lib/stable-loader-paths.d.ts +0 -14
- package/dist/main-world-bridge.js +0 -178
- package/dist/minimum-chromium-file.js +0 -5
- package/dist/minimum-firefox-file.js +0 -5
- package/dist/minimum-script-file.js +0 -54
- package/dist/package.json +0 -3
- package/dist/plugin-compilation/clean-dist.d.ts +0 -8
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/index.d.ts +0 -2
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/ChunkLoader.d.ts +0 -12
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/HMRDevServer.d.ts +0 -3
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/InitialChunkFile.d.ts +0 -5
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/NoDangerNamePlugin.d.ts +0 -3
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/AutoPublicPath.d.ts +0 -2
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/BaseUri.d.ts +0 -2
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/BrowserRuntime.d.ts +0 -8
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/ChunkLoaderFallback.d.ts +0 -1
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/EagerlyLoadChunks.d.ts +0 -1
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/LoadScript.d.ts +0 -4
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/PublicPath.d.ts +0 -2
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/ServiceWorkerPlugin.d.ts +0 -6
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/helper.d.ts +0 -12
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/index.d.ts +0 -5
- package/dist/plugin-wasm/index.d.ts +0 -16
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/commands.d.ts +0 -16
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/permissions.d.ts +0 -4
- package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/host_permissions.d.ts +0 -4
- package/dist/rslib.config.d.ts +0 -3
- package/dist/tm~0.mjs +0 -71
- package/dist/t~0.mjs +0 -102
- package/runtime/process-shim.cjs +0 -53
- /package/dist/{plugin-reload/steps/setup-chunk-loading-target.d.ts → plugin-web-extension/feature-chunk-loading/index.d.ts} +0 -0
- /package/dist/plugin-web-extension/{feature-scripts → feature-chunk-loading}/steps/add-public-path-runtime-module.d.ts +0 -0
package/dist/6~0.mjs
CHANGED
|
@@ -1,33 +1,411 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "node:module";
|
|
2
|
+
import * as __rspack_external_node_path_806ed179 from "node:path";
|
|
2
3
|
import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import * as __rspack_external_node_os_4f3c9d58 from "node:os";
|
|
5
|
+
const foldersByProjectRoot = new Map();
|
|
6
|
+
function rememberSpecialFoldersConfig(projectRoot, folders) {
|
|
7
|
+
if (!projectRoot) return;
|
|
8
|
+
if (folders) foldersByProjectRoot.set(__rspack_external_node_path_806ed179.resolve(projectRoot), folders);
|
|
9
|
+
else foldersByProjectRoot.delete(__rspack_external_node_path_806ed179.resolve(projectRoot));
|
|
10
|
+
}
|
|
11
|
+
function rememberedFolders(projectRoot) {
|
|
12
|
+
if (!projectRoot) return {};
|
|
13
|
+
return foldersByProjectRoot.get(__rspack_external_node_path_806ed179.resolve(projectRoot)) || {};
|
|
14
|
+
}
|
|
15
|
+
const SCRIPTS_FOLDER_EXTENSIONS = new Set([
|
|
16
|
+
'.js',
|
|
17
|
+
'.mjs',
|
|
18
|
+
'.jsx',
|
|
19
|
+
'.mjsx',
|
|
20
|
+
'.ts',
|
|
21
|
+
'.mts',
|
|
22
|
+
'.tsx',
|
|
23
|
+
'.mtsx'
|
|
7
24
|
]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
25
|
+
function isScriptsFolderEntry(filePath) {
|
|
26
|
+
return SCRIPTS_FOLDER_EXTENSIONS.has(__rspack_external_node_path_806ed179.extname(filePath).toLowerCase());
|
|
27
|
+
}
|
|
28
|
+
const DEV_ONLY_ENTRY = /\.dev\.[^.]+$/i;
|
|
29
|
+
function isDevOnlyEntry(filePath) {
|
|
30
|
+
return DEV_ONLY_ENTRY.test(__rspack_external_node_path_806ed179.basename(String(filePath)));
|
|
31
|
+
}
|
|
32
|
+
function omitEntries(list, leftOut, dropped) {
|
|
33
|
+
const next = {};
|
|
34
|
+
for (const [key, value] of Object.entries(list || {})){
|
|
35
|
+
const files = Array.isArray(value) ? value : value ? [
|
|
36
|
+
value
|
|
37
|
+
] : [];
|
|
38
|
+
const kept = files.filter((file)=>!leftOut(String(file)));
|
|
39
|
+
for (const file of files)if (!kept.includes(file)) dropped?.push(String(file));
|
|
40
|
+
if (0 !== kept.length) next[key] = Array.isArray(value) ? kept : kept[0];
|
|
41
|
+
}
|
|
42
|
+
return next;
|
|
43
|
+
}
|
|
44
|
+
function omitDevOnlyEntries(list, dropped) {
|
|
45
|
+
return omitEntries(list, isDevOnlyEntry, dropped);
|
|
46
|
+
}
|
|
47
|
+
const excludedFilesByProjectRoot = new Map();
|
|
48
|
+
const NO_EXCLUDED_FILES = new Set();
|
|
49
|
+
function resolveExcludedFiles(projectRoot, exclude) {
|
|
50
|
+
const files = new Set();
|
|
51
|
+
for (const entry of Array.isArray(exclude) ? exclude : [])if ('string' == typeof entry && '' !== entry.trim()) files.add(__rspack_external_node_path_806ed179.resolve(projectRoot, entry.trim()));
|
|
52
|
+
return files;
|
|
53
|
+
}
|
|
54
|
+
function rememberExcludedFiles(projectRoot, exclude) {
|
|
55
|
+
if (!projectRoot) return;
|
|
56
|
+
const root = __rspack_external_node_path_806ed179.resolve(projectRoot);
|
|
57
|
+
const files = resolveExcludedFiles(root, exclude);
|
|
58
|
+
if (files.size > 0) excludedFilesByProjectRoot.set(root, files);
|
|
59
|
+
else excludedFilesByProjectRoot.delete(root);
|
|
60
|
+
}
|
|
61
|
+
function excludedFiles(projectRoot) {
|
|
62
|
+
if (!projectRoot) return NO_EXCLUDED_FILES;
|
|
63
|
+
return excludedFilesByProjectRoot.get(__rspack_external_node_path_806ed179.resolve(projectRoot)) || NO_EXCLUDED_FILES;
|
|
64
|
+
}
|
|
65
|
+
function isExcludedEntry(filePath, excluded) {
|
|
66
|
+
if (0 === excluded.size) return false;
|
|
67
|
+
return excluded.has(__rspack_external_node_path_806ed179.resolve(String(filePath)));
|
|
68
|
+
}
|
|
69
|
+
function omitExcludedEntries(list, excluded, dropped) {
|
|
70
|
+
if (0 === excluded.size) return list || {};
|
|
71
|
+
return omitEntries(list, (file)=>isExcludedEntry(file, excluded), dropped);
|
|
72
|
+
}
|
|
73
|
+
function foldersRoots(projectRoot, folders = rememberedFolders(projectRoot)) {
|
|
74
|
+
const roots = {};
|
|
75
|
+
for (const name of [
|
|
76
|
+
'pages',
|
|
77
|
+
"scripts"
|
|
78
|
+
]){
|
|
79
|
+
const setting = folders[name];
|
|
80
|
+
if (false === setting) continue;
|
|
81
|
+
const root = 'string' == typeof setting && setting.trim() ? __rspack_external_node_path_806ed179.resolve(projectRoot, setting) : __rspack_external_node_path_806ed179.join(projectRoot, name);
|
|
82
|
+
if (__rspack_external_node_path_806ed179.basename(root) === name) roots[name] = root;
|
|
83
|
+
}
|
|
84
|
+
return roots;
|
|
85
|
+
}
|
|
86
|
+
function scriptsFolderRoot(projectRoot) {
|
|
87
|
+
return projectRoot ? foldersRoots(projectRoot).scripts : void 0;
|
|
88
|
+
}
|
|
89
|
+
function publicFolderSetting(projectRoot) {
|
|
90
|
+
const setting = rememberedFolders(projectRoot).public;
|
|
91
|
+
if (false === setting) return {
|
|
92
|
+
kind: 'off'
|
|
93
|
+
};
|
|
94
|
+
if ('string' == typeof setting && setting.trim() && projectRoot) return {
|
|
95
|
+
kind: 'path',
|
|
96
|
+
dir: __rspack_external_node_path_806ed179.resolve(projectRoot, setting)
|
|
97
|
+
};
|
|
98
|
+
return {
|
|
99
|
+
kind: 'default'
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const PRIVATE_NAMES = [
|
|
103
|
+
[
|
|
104
|
+
'os',
|
|
105
|
+
'.DS_Store'
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
'os',
|
|
109
|
+
'Thumbs.db'
|
|
110
|
+
],
|
|
111
|
+
[
|
|
112
|
+
'os',
|
|
113
|
+
'desktop.ini'
|
|
114
|
+
],
|
|
115
|
+
[
|
|
116
|
+
'env',
|
|
117
|
+
'.env'
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
'env',
|
|
121
|
+
'.envrc'
|
|
122
|
+
],
|
|
123
|
+
[
|
|
124
|
+
'tooling',
|
|
125
|
+
'.git'
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
'tooling',
|
|
129
|
+
'.gitignore'
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
'tooling',
|
|
133
|
+
'.gitattributes'
|
|
134
|
+
],
|
|
135
|
+
[
|
|
136
|
+
'tooling',
|
|
137
|
+
'.gitmodules'
|
|
138
|
+
],
|
|
139
|
+
[
|
|
140
|
+
'tooling',
|
|
141
|
+
'.gitkeep'
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
'tooling',
|
|
145
|
+
'.npmrc'
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
'tooling',
|
|
149
|
+
'.yarnrc.yml'
|
|
150
|
+
],
|
|
151
|
+
[
|
|
152
|
+
'tooling',
|
|
153
|
+
'.*.swp'
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
'tooling',
|
|
157
|
+
'.*.swo'
|
|
158
|
+
],
|
|
159
|
+
[
|
|
160
|
+
'tooling',
|
|
161
|
+
'.*.swn'
|
|
162
|
+
],
|
|
163
|
+
[
|
|
164
|
+
'tooling',
|
|
165
|
+
'*~'
|
|
166
|
+
]
|
|
167
|
+
];
|
|
168
|
+
const ENV_VARIANT_PREFIX = '.env.';
|
|
169
|
+
const ENV_TEMPLATE_ENDINGS = [
|
|
170
|
+
'.example',
|
|
171
|
+
'.sample',
|
|
172
|
+
'.template'
|
|
15
173
|
];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
174
|
+
const GLOB_SPECIAL = /[[\]{}()*?]/g;
|
|
175
|
+
function escapeGlob(literal) {
|
|
176
|
+
return literal.replace(GLOB_SPECIAL, (char)=>`[${char}]`);
|
|
177
|
+
}
|
|
178
|
+
function anyCase(literal) {
|
|
179
|
+
return literal.replace(/[a-z]|[[\]{}()?]/gi, (char)=>{
|
|
180
|
+
const lower = char.toLowerCase();
|
|
181
|
+
const upper = char.toUpperCase();
|
|
182
|
+
return lower === upper ? `[${char}]` : `[${lower}${upper}]`;
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function nameToRegExp(name) {
|
|
186
|
+
const body = name.split('*').map((part)=>part.replace(/[.+?^${}()|[\]\\]/g, '\\$&')).join('.*');
|
|
187
|
+
return new RegExp(`^${body}$`, 'i');
|
|
188
|
+
}
|
|
189
|
+
const PRIVATE_MATCHERS = PRIVATE_NAMES.map(([kind, name])=>[
|
|
190
|
+
kind,
|
|
191
|
+
nameToRegExp(name)
|
|
192
|
+
]);
|
|
193
|
+
function isEnvTemplateFileName(name) {
|
|
194
|
+
const lower = name.toLowerCase();
|
|
195
|
+
return lower.startsWith(ENV_VARIANT_PREFIX) && ENV_TEMPLATE_ENDINGS.some((ending)=>lower.endsWith(ending));
|
|
196
|
+
}
|
|
197
|
+
function privateFileKind(name) {
|
|
198
|
+
if (name.toLowerCase().startsWith(ENV_VARIANT_PREFIX)) return isEnvTemplateFileName(name) ? void 0 : 'env';
|
|
199
|
+
for (const [kind, matcher] of PRIVATE_MATCHERS)if (matcher.test(name)) return kind;
|
|
200
|
+
}
|
|
201
|
+
function hasPrivateFileName(relativePath) {
|
|
202
|
+
return relativePath.split(/[\\/]+/).some((name)=>void 0 !== privateFileKind(name));
|
|
203
|
+
}
|
|
204
|
+
function browserSpellings(outputName) {
|
|
205
|
+
const spellings = [
|
|
206
|
+
outputName
|
|
207
|
+
];
|
|
208
|
+
try {
|
|
209
|
+
spellings.push(decodeURIComponent(outputName));
|
|
210
|
+
} catch {}
|
|
211
|
+
return spellings.map((spelling)=>__rspack_external_node_path_806ed179.posix.normalize(spelling.replace(/\\/g, '/')));
|
|
212
|
+
}
|
|
213
|
+
function climbsOut(normalized) {
|
|
214
|
+
return '..' === normalized || normalized.startsWith('../');
|
|
215
|
+
}
|
|
216
|
+
function rootAbsoluteClimbsOut(ref) {
|
|
217
|
+
const unix = ref.replace(/\\/g, '/');
|
|
218
|
+
return unix.startsWith('/') && browserSpellings(unix.replace(/^\/+/, '')).some(climbsOut);
|
|
219
|
+
}
|
|
220
|
+
function rootAbsolutePathIsWithheld(ref) {
|
|
221
|
+
return browserSpellings(ref.replace(/^\/+/, '')).some((name)=>climbsOut(name) || hasPrivateFileName(name));
|
|
222
|
+
}
|
|
223
|
+
function isNodeModules(name) {
|
|
224
|
+
return 'node_modules' === name.toLowerCase();
|
|
225
|
+
}
|
|
226
|
+
function isProjectContentPath(relativePath, ask) {
|
|
227
|
+
return '' !== relativePath && '..' !== relativePath && !relativePath.startsWith(`..${__rspack_external_node_path_806ed179.sep}`) && !__rspack_external_node_path_806ed179.isAbsolute(relativePath) && !hasPrivateFileName(relativePath) && ('named' === ask || !relativePath.split(/[\\/]+/).some(isNodeModules));
|
|
228
|
+
}
|
|
229
|
+
function isInAncestorNodeModules(relativePath) {
|
|
230
|
+
if (__rspack_external_node_path_806ed179.isAbsolute(relativePath)) return false;
|
|
231
|
+
const names = relativePath.split(/[\\/]+/);
|
|
232
|
+
const below = names.findIndex((name)=>'..' !== name);
|
|
233
|
+
return below > 0 && below < names.length - 1 && isNodeModules(names[below]) && !names.slice(below).some((name)=>void 0 !== privateFileKind(name));
|
|
234
|
+
}
|
|
235
|
+
function isBelow(relativePath) {
|
|
236
|
+
return '' !== relativePath && '..' !== relativePath && !relativePath.startsWith(`..${__rspack_external_node_path_806ed179.sep}`) && !__rspack_external_node_path_806ed179.isAbsolute(relativePath);
|
|
237
|
+
}
|
|
238
|
+
function isWorkspaceSharedPath(fromWorkspace) {
|
|
239
|
+
return isBelow(fromWorkspace) && !fromWorkspace.split(/[\\/]+/).some((name)=>name.startsWith('.') || isNodeModules(name));
|
|
240
|
+
}
|
|
241
|
+
const WORKSPACE_FILE = 'pnpm-workspace.yaml';
|
|
242
|
+
const workspaceRoots = new Map();
|
|
243
|
+
function realPathOf(file) {
|
|
244
|
+
try {
|
|
245
|
+
return __rspack_external_node_fs_1b05aee1.realpathSync.native(file);
|
|
246
|
+
} catch {
|
|
247
|
+
try {
|
|
248
|
+
return __rspack_external_node_fs_1b05aee1.realpathSync(file);
|
|
249
|
+
} catch {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function realOrResolved(file) {
|
|
255
|
+
return realPathOf(file) ?? __rspack_external_node_path_806ed179.resolve(file);
|
|
256
|
+
}
|
|
257
|
+
function holdsWorkspaceMarker(dir) {
|
|
258
|
+
if (__rspack_external_node_fs_1b05aee1.existsSync(__rspack_external_node_path_806ed179.join(dir, WORKSPACE_FILE))) return true;
|
|
259
|
+
let workspaces;
|
|
260
|
+
try {
|
|
261
|
+
const read = JSON.parse(__rspack_external_node_fs_1b05aee1.readFileSync(__rspack_external_node_path_806ed179.join(dir, 'package.json'), 'utf8'));
|
|
262
|
+
workspaces = read?.workspaces;
|
|
263
|
+
} catch {
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
return Array.isArray(workspaces) || 'object' == typeof workspaces && null !== workspaces && Array.isArray(workspaces.packages);
|
|
267
|
+
}
|
|
268
|
+
function workspaceRootOf(projectRoot, homeDir = __rspack_external_node_os_4f3c9d58.homedir()) {
|
|
269
|
+
const project = realOrResolved(projectRoot);
|
|
270
|
+
const home = homeDir ? realOrResolved(homeDir) : '';
|
|
271
|
+
const key = `${project}\n${home}`;
|
|
272
|
+
const cached = workspaceRoots.get(key);
|
|
273
|
+
if (void 0 !== cached) return cached;
|
|
274
|
+
const fromHome = home ? __rspack_external_node_path_806ed179.relative(home, project) : '..';
|
|
275
|
+
const insideHome = '' === fromHome || isBelow(fromHome);
|
|
276
|
+
let found = project;
|
|
277
|
+
let dir = project;
|
|
278
|
+
while(true){
|
|
279
|
+
if (insideHome && !isBelow(__rspack_external_node_path_806ed179.relative(home, dir))) break;
|
|
280
|
+
if (holdsWorkspaceMarker(dir)) {
|
|
281
|
+
found = dir;
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
const parent = __rspack_external_node_path_806ed179.dirname(dir);
|
|
285
|
+
if (parent === dir) break;
|
|
286
|
+
dir = parent;
|
|
31
287
|
}
|
|
288
|
+
workspaceRoots.set(key, found);
|
|
289
|
+
return found;
|
|
290
|
+
}
|
|
291
|
+
function sourceFileMayShip(sourcePath, projectRoots, ask = 'named') {
|
|
292
|
+
const given = __rspack_external_node_path_806ed179.resolve(sourcePath);
|
|
293
|
+
const givenInside = projectRoots.some((root)=>{
|
|
294
|
+
const fromRoot = __rspack_external_node_path_806ed179.relative(__rspack_external_node_path_806ed179.resolve(root), given);
|
|
295
|
+
if (isProjectContentPath(fromRoot, ask)) return true;
|
|
296
|
+
if ('named' !== ask || hasPrivateFileName(fromRoot)) return false;
|
|
297
|
+
const realRoot = realPathOf(root);
|
|
298
|
+
if (!realRoot) return false;
|
|
299
|
+
const fromWorkspace = __rspack_external_node_path_806ed179.relative(workspaceRootOf(realRoot), __rspack_external_node_path_806ed179.resolve(realRoot, fromRoot));
|
|
300
|
+
return isWorkspaceSharedPath(fromWorkspace) || isBelow(fromWorkspace) && isInAncestorNodeModules(fromRoot);
|
|
301
|
+
});
|
|
302
|
+
if (!givenInside) return false;
|
|
303
|
+
const real = realPathOf(sourcePath);
|
|
304
|
+
if (!real) return false;
|
|
305
|
+
return projectRoots.some((root)=>{
|
|
306
|
+
const realRoot = realPathOf(root);
|
|
307
|
+
if (!realRoot) return false;
|
|
308
|
+
const fromRoot = __rspack_external_node_path_806ed179.relative(realRoot, real);
|
|
309
|
+
if (isProjectContentPath(fromRoot, ask)) return true;
|
|
310
|
+
if ('named' !== ask) return false;
|
|
311
|
+
if (isInAncestorNodeModules(fromRoot)) return true;
|
|
312
|
+
return !hasPrivateFileName(fromRoot) && isWorkspaceSharedPath(__rspack_external_node_path_806ed179.relative(workspaceRootOf(realRoot), real));
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
function envVariantGlobs() {
|
|
316
|
+
const prefix = anyCase(ENV_VARIANT_PREFIX);
|
|
317
|
+
const tails = ENV_TEMPLATE_ENDINGS.map((ending)=>ending.slice(1));
|
|
318
|
+
const shared = new Set([
|
|
319
|
+
''
|
|
320
|
+
]);
|
|
321
|
+
for (const tail of tails)for(let length = 1; length <= tail.length; length += 1)shared.add(tail.slice(-length));
|
|
322
|
+
const globs = [];
|
|
323
|
+
for (const end of shared){
|
|
324
|
+
const whole = tails.includes(end);
|
|
325
|
+
const before = new Set();
|
|
326
|
+
for (const tail of tails)if (tail !== end && tail.endsWith(end)) before.add(tail[tail.length - end.length - 1]);
|
|
327
|
+
const letters = [
|
|
328
|
+
...before
|
|
329
|
+
].map((letter)=>letter + letter.toUpperCase()).join('');
|
|
330
|
+
globs.push(`${prefix}*[!${letters}${whole ? '.' : ''}]${anyCase(end)}`);
|
|
331
|
+
if (!whole) globs.push(prefix + anyCase(end));
|
|
332
|
+
}
|
|
333
|
+
return globs;
|
|
334
|
+
}
|
|
335
|
+
function privateFileIgnoreGlobs(publicDir) {
|
|
336
|
+
const root = escapeGlob(publicDir.replace(/\\/g, '/'));
|
|
337
|
+
const names = [
|
|
338
|
+
...PRIVATE_NAMES.map(([, name])=>name.split('*').map(anyCase).join('*')),
|
|
339
|
+
...envVariantGlobs()
|
|
340
|
+
];
|
|
341
|
+
return names.flatMap((name)=>[
|
|
342
|
+
`${root}/**/${name}`,
|
|
343
|
+
`${root}/**/${name}/**`
|
|
344
|
+
]);
|
|
345
|
+
}
|
|
346
|
+
function literalPathGlob(file) {
|
|
347
|
+
return escapeGlob(file.replace(/\\/g, '/'));
|
|
348
|
+
}
|
|
349
|
+
function findPublicEnvFiles(publicDir) {
|
|
350
|
+
const found = [];
|
|
351
|
+
const walk = (dir, prefix)=>{
|
|
352
|
+
let entries = [];
|
|
353
|
+
try {
|
|
354
|
+
entries = __rspack_external_node_fs_1b05aee1.readdirSync(dir, {
|
|
355
|
+
withFileTypes: true
|
|
356
|
+
});
|
|
357
|
+
} catch {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
for (const entry of entries){
|
|
361
|
+
const kind = privateFileKind(entry.name);
|
|
362
|
+
if ('env' === kind) found.push(`${prefix}${entry.name}${entry.isDirectory() ? '/' : ''}`);
|
|
363
|
+
else if (!kind && entry.isDirectory()) walk(__rspack_external_node_path_806ed179.join(dir, entry.name), `${prefix}${entry.name}/`);
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
walk(publicDir, '');
|
|
367
|
+
return found.sort();
|
|
368
|
+
}
|
|
369
|
+
function findPublicLinksLeftOut(publicDir, projectRoots) {
|
|
370
|
+
const found = [];
|
|
371
|
+
const seen = new Set();
|
|
372
|
+
const walk = (dir, prefix)=>{
|
|
373
|
+
let real;
|
|
374
|
+
try {
|
|
375
|
+
real = __rspack_external_node_fs_1b05aee1.realpathSync(dir);
|
|
376
|
+
} catch {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
if (seen.has(real)) return;
|
|
380
|
+
seen.add(real);
|
|
381
|
+
let entries = [];
|
|
382
|
+
try {
|
|
383
|
+
entries = __rspack_external_node_fs_1b05aee1.readdirSync(dir, {
|
|
384
|
+
withFileTypes: true
|
|
385
|
+
});
|
|
386
|
+
} catch {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
for (const entry of entries){
|
|
390
|
+
if (privateFileKind(entry.name)) continue;
|
|
391
|
+
const full = __rspack_external_node_path_806ed179.join(dir, entry.name);
|
|
392
|
+
const name = `${prefix}${entry.name}`;
|
|
393
|
+
let isDir = entry.isDirectory();
|
|
394
|
+
if (entry.isSymbolicLink()) {
|
|
395
|
+
try {
|
|
396
|
+
isDir = __rspack_external_node_fs_1b05aee1.statSync(full).isDirectory();
|
|
397
|
+
} catch {
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
if (!sourceFileMayShip(full, projectRoots, 'walked')) {
|
|
401
|
+
found.push(isDir ? `${name}/` : name);
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (isDir) walk(full, `${name}/`);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
walk(publicDir, '');
|
|
409
|
+
return found.sort();
|
|
32
410
|
}
|
|
33
|
-
export {
|
|
411
|
+
export { browserSpellings, climbsOut, excludedFiles, findPublicEnvFiles, findPublicLinksLeftOut, foldersRoots, hasPrivateFileName, isExcludedEntry, isScriptsFolderEntry, literalPathGlob, omitDevOnlyEntries, omitExcludedEntries, privateFileIgnoreGlobs, privateFileKind, publicFolderSetting, rememberExcludedFiles, rememberSpecialFoldersConfig, rememberedFolders, rootAbsoluteClimbsOut, rootAbsolutePathIsWithheld, scriptsFolderRoot, sourceFileMayShip, workspaceRootOf };
|
package/dist/7~0.mjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import * as __rspack_external_node_path_806ed179 from "node:path";
|
|
3
|
+
function sessionArtifactsRootDir(projectPath) {
|
|
4
|
+
return __rspack_external_node_path_806ed179.resolve(projectPath, 'dist', 'extension-js');
|
|
5
|
+
}
|
|
6
|
+
function browserArtifactsDir(projectPath, browser) {
|
|
7
|
+
return __rspack_external_node_path_806ed179.join(sessionArtifactsRootDir(projectPath), browser);
|
|
8
|
+
}
|
|
9
|
+
function readyContractPath(projectPath, browser) {
|
|
10
|
+
return __rspack_external_node_path_806ed179.join(browserArtifactsDir(projectPath, browser), 'ready.json');
|
|
11
|
+
}
|
|
12
|
+
function sessionArtifactsRootDirBesideBuild(buildPath) {
|
|
13
|
+
return __rspack_external_node_path_806ed179.join(__rspack_external_node_path_806ed179.dirname(buildPath), 'extension-js');
|
|
14
|
+
}
|
|
15
|
+
function readyContractPathBesideBuild(buildPath) {
|
|
16
|
+
return __rspack_external_node_path_806ed179.join(sessionArtifactsRootDirBesideBuild(buildPath), __rspack_external_node_path_806ed179.basename(buildPath), 'ready.json');
|
|
17
|
+
}
|
|
18
|
+
function rdpPortSettled(ready) {
|
|
19
|
+
return 'number' == typeof ready?.rdpPort || 'string' == typeof ready?.rdpPortError;
|
|
20
|
+
}
|
|
21
|
+
function cdpPortSettled(ready) {
|
|
22
|
+
return 'number' == typeof ready?.cdpPort || 'string' == typeof ready?.cdpFaultCode;
|
|
23
|
+
}
|
|
24
|
+
function owedPortsSettled(ready, owed) {
|
|
25
|
+
return (!owed.rdpPort || rdpPortSettled(ready)) && (!owed.cdpPort || true === owed.launchSettled || cdpPortSettled(ready));
|
|
26
|
+
}
|
|
27
|
+
function isDevSessionStarting(ready) {
|
|
28
|
+
return 'dev' === ready.command && 'starting' === ready.status;
|
|
29
|
+
}
|
|
30
|
+
function heldReadyCanRelease(ready, owed = {}) {
|
|
31
|
+
return isDevSessionStarting(ready) && 'string' == typeof ready.compiledAt && !ready.code && 'string' != typeof ready.awaitingExecutorSince && owedPortsSettled(ready, owed);
|
|
32
|
+
}
|
|
33
|
+
function releaseHeldReady(ready, owed = {}) {
|
|
34
|
+
if (!heldReadyCanRelease(ready, owed)) return false;
|
|
35
|
+
ready.status = 'ready';
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
export { browserArtifactsDir, owedPortsSettled, readyContractPath, readyContractPathBesideBuild, releaseHeldReady, sessionArtifactsRootDir };
|