extension-develop 4.1.39 → 4.1.40-canary.458.001a6a0
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 +7 -4
- package/dist/{771~0.mjs → 5h~0.mjs} +13 -3
- package/dist/{273~0.mjs → 6l~0.mjs} +1 -1
- package/dist/{524~0.mjs → 9~0.mjs} +18 -2
- package/dist/{640~0.mjs → bh~0.mjs} +6 -1
- package/dist/bridge.mjs +14 -8
- package/dist/b~0.mjs +8568 -0
- package/dist/command-dev.d.ts +2 -0
- package/dist/command-preview.d.ts +2 -0
- package/dist/contracts.mjs +2 -1
- package/dist/{469~0.mjs → cp~0.mjs} +30 -18
- package/dist/css-parse-guard-loader.mjs +2 -2
- package/dist/c~0.mjs +56 -0
- package/dist/dead-css-url-loader.mjs +20 -119
- package/dist/dev-server/control-bridge/actions-file.d.ts +7 -0
- package/dist/dev-server/control-bridge/broker.d.ts +42 -2
- package/dist/dev-server/control-bridge/consumer-client.d.ts +7 -0
- package/dist/dev-server/control-bridge/contracts.d.ts +29 -1
- package/dist/dev-server/control-bridge/logs-file.d.ts +6 -0
- package/dist/dev-server/control-bridge/loopback.d.ts +1 -0
- package/dist/dev-server/control-bridge/producer-runtime.d.ts +5 -2
- package/dist/dev-server/control-bridge/production-control.d.ts +1 -0
- package/dist/dev-server/control-bridge/session-token.d.ts +5 -2
- package/dist/dev-server/cors.d.ts +4 -2
- package/dist/dev-server/messages.d.ts +6 -0
- package/dist/dev-server/session-restart.d.ts +3 -1
- package/dist/dev-server~0.mjs +71 -129
- package/dist/df~0.mjs +197 -0
- package/dist/{846~0.mjs → d~0.mjs} +4 -3
- package/dist/ensure-hmr-for-scripts.js +3 -3
- package/dist/ensure-hmr-for-scripts.mjs +3 -3
- 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/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/chromium/background/service_worker.js +2 -2
- 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/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/firefox/background/scripts.js +2 -2
- package/dist/extension-js-devtools/firefox/pages/welcome.js +2 -2
- package/dist/extension-js-theme/build-stamp.json +2 -2
- package/dist/{143~0.mjs → ey~0.mjs} +2 -2
- package/dist/e~0.mjs +33 -0
- package/dist/feature-scripts-classic-traced-globals-loader.mjs +7 -2
- package/dist/feature-scripts-content-script-wrapper.js +55 -17
- package/dist/feature-scripts-content-script-wrapper.mjs +55 -17
- package/dist/feature-scripts-native-geturl-import-loader.mjs +1 -1
- package/dist/{105~0.mjs → g0~0.mjs} +1 -1
- package/dist/{88~0.mjs → j6~0.mjs} +9 -1
- package/dist/{731~0.mjs → j~0.mjs} +2 -2
- package/dist/{712~0.mjs → ka~0.mjs} +18 -2
- package/dist/{852~0.mjs → k~0.mjs} +4 -2
- package/dist/late-css-import-loader.mjs +1 -1
- package/dist/lib/addon-lint.d.ts +6 -0
- package/dist/lib/build-summary.d.ts +6 -0
- package/dist/lib/dev-additions.d.ts +12 -0
- package/dist/lib/extension-base-from-stack.d.ts +16 -0
- package/dist/lib/localized-manifest-name.d.ts +9 -0
- package/dist/lib/messages.d.ts +5 -2
- package/dist/lib/process-started-at.d.ts +1 -0
- package/dist/lib/real-path.d.ts +8 -0
- package/dist/lib/resource-path.d.ts +1 -0
- package/dist/lib/session-paths.d.ts +2 -0
- package/dist/lib/split-chunks.d.ts +2 -1
- package/dist/lib/stats-handler.d.ts +1 -0
- package/dist/lib/tsconfig-includes-file.d.ts +1 -0
- package/dist/l~0.mjs +2290 -0
- package/dist/main-world-bridge.js +92 -23
- package/dist/main-world-bridge.mjs +92 -23
- package/dist/manifest-entry.d.ts +2 -0
- package/dist/manifest.mjs +3 -1
- package/dist/module.mjs +3 -3
- package/dist/{832~0.mjs → m~0.mjs} +2242 -286
- package/dist/o~0.mjs +47 -0
- package/dist/plugin-browsers/index.d.ts +7 -0
- package/dist/plugin-browsers/safari-dev-plugin.d.ts +2 -0
- package/dist/plugin-compatibility/compatibility-lib/messages.d.ts +1 -1
- package/dist/plugin-compatibility/compatibility-lib/native-browser-namespace.d.ts +5 -0
- package/dist/plugin-compatibility/feature-browser-global.d.ts +4 -0
- package/dist/plugin-compilation/compilation-lib/messages.d.ts +4 -1
- package/dist/plugin-compilation/env.d.ts +1 -0
- package/dist/plugin-compilation/index.d.ts +2 -0
- package/dist/plugin-compilation/node-builtins.d.ts +5 -0
- package/dist/plugin-compilation/one-diagnostic-per-location.d.ts +13 -0
- package/dist/plugin-compilation/resolve-file-requests.d.ts +16 -0
- package/dist/plugin-compilation/warm-ancestor-watchers.d.ts +19 -0
- package/dist/plugin-compilation/watch-real-project-path.d.ts +27 -0
- package/dist/plugin-compilation/zip.d.ts +2 -0
- package/dist/plugin-css/css-in-content-script-loader.d.ts +1 -1
- package/dist/plugin-css/css-lib/build-css-rules.d.ts +3 -0
- package/dist/plugin-css/css-lib/inline-content-script-css.d.ts +3 -1
- package/dist/plugin-css/css-lib/messages.d.ts +4 -0
- package/dist/plugin-css/css-lib/sfc-style-block.d.ts +26 -0
- package/dist/plugin-css/css-lib/unplaced-style-imports.d.ts +7 -0
- package/dist/plugin-css/css-lib/verbatim-css.d.ts +1 -0
- package/dist/plugin-css/dead-css-url-loader.d.ts +9 -1
- package/dist/plugin-css/index.d.ts +1 -0
- package/dist/plugin-css/sfc-style-block-loader.d.ts +18 -0
- package/dist/plugin-css/unplaced-style-import-loader.d.ts +16 -0
- package/dist/plugin-playwright/index.d.ts +22 -0
- package/dist/plugin-reload/classify-reload.d.ts +20 -0
- package/dist/plugin-reload/index.d.ts +4 -2
- package/dist/plugin-reload/messages.d.ts +1 -0
- package/dist/plugin-reload/reload-dispatch.d.ts +21 -2
- package/dist/plugin-reload/reload-lib/dev-content-scripts.d.ts +6 -0
- package/dist/plugin-reload/reload-lib/scripts-replay-shim.d.ts +1 -1
- package/dist/plugin-reload/steps/inject-bridge-producer.d.ts +6 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/ChunkLoader.d.ts +3 -0
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/AutoPublicPath.d.ts +1 -1
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/BaseUri.d.ts +1 -1
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/LoadScript.d.ts +1 -1
- package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/PublicPath.d.ts +1 -1
- package/dist/plugin-special-folders/get-data.d.ts +2 -0
- package/dist/plugin-special-folders/hint-import-only-scripts.d.ts +4 -0
- package/dist/plugin-special-folders/include-files.d.ts +2 -0
- package/dist/plugin-special-folders/messages.d.ts +1 -0
- package/dist/plugin-web-extension/feature-html/html-lib/inject.d.ts +1 -1
- package/dist/plugin-web-extension/feature-html/html-lib/patch-html.d.ts +1 -0
- package/dist/plugin-web-extension/feature-html/steps/update-html-file.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-keys-gecko.d.ts +21 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-keys-safari.d.ts +1 -1
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/webkit-unsupported-keys.d.ts +15 -0
- package/dist/plugin-web-extension/feature-manifest/messages.d.ts +7 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-additions.d.ts +8 -0
- package/dist/plugin-web-extension/feature-manifest/steps/warn-description-length.d.ts +25 -0
- package/dist/plugin-web-extension/feature-manifest/steps/warn-gecko-unsupported-apis.d.ts +2 -2
- package/dist/plugin-web-extension/feature-scripts/contracts.d.ts +3 -0
- package/dist/plugin-web-extension/feature-scripts/index.d.ts +1 -0
- package/dist/plugin-web-extension/feature-scripts/messages.d.ts +9 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/completion-value.d.ts +13 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/injected-sheet-urls.d.ts +5 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/main-world-bridge-pairing.d.ts +5 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/main-world-copy-routing.d.ts +2 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/registration-worlds.d.ts +10 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/runtime-main-world-scripts.d.ts +25 -2
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/runtime-script-sheet.d.ts +14 -0
- package/dist/plugin-web-extension/feature-scripts/scripts-lib/taken-extension-base.d.ts +10 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-base-uri-runtime-module.d.ts +7 -1
- package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/content-script-wrapper.d.ts +2 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/index.d.ts +2 -0
- package/dist/plugin-web-extension/feature-scripts/steps/add-public-path-runtime-module.d.ts +6 -0
- package/dist/plugin-web-extension/feature-scripts/steps/classic-traced-globals-loader.d.ts +1 -0
- package/dist/plugin-web-extension/feature-scripts/steps/compile-main-world-scripts.d.ts +4 -0
- package/dist/plugin-web-extension/feature-scripts/steps/keep-completion-value.d.ts +6 -0
- package/dist/plugin-web-extension/feature-scripts/steps/pair-runtime-main-world-bridges.d.ts +12 -0
- package/dist/plugin-web-extension/feature-scripts/steps/place-runtime-script-sheets.d.ts +12 -0
- package/dist/plugin-web-extension/feature-scripts/steps/prune-main-world-bridges.d.ts +1 -0
- package/dist/plugin-web-extension/feature-scripts/steps/root-injected-sheet-urls.d.ts +9 -0
- package/dist/plugin-web-extension/feature-scripts/steps/route-main-world-copies.d.ts +10 -0
- package/dist/plugin-web-extension/feature-scripts/steps/source-literals.d.ts +24 -0
- package/dist/plugin-web-extension/feature-scripts/steps/take-extension-base.d.ts +11 -0
- package/dist/plugin-web-extension/feature-scripts/steps/trace-runtime-loaded-files.d.ts +18 -3
- package/dist/plugin-web-extension/feature-scripts/steps/warn-main-world-registration-changed.d.ts +12 -0
- package/dist/plugin-web-extension/feature-scripts/steps/warn-moved-page-relative-urls.d.ts +30 -0
- package/dist/plugin-web-extension/feature-scripts/steps/warn-page-relative-script-path.d.ts +10 -0
- package/dist/plugin-web-extension/feature-scripts/steps/warn-unknown-registration-world.d.ts +10 -0
- package/dist/plugin-web-extension/feature-web-resources/collect-entry-imports.d.ts +1 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/messages.d.ts +1 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/page-requests.d.ts +5 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/resolve-war.d.ts +1 -0
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/unreachable-resources.d.ts +1 -0
- package/dist/plugin-web-extension/shared/script-graph.d.ts +12 -0
- package/dist/preprocessor-passthrough-loader.mjs +1 -1
- package/dist/preview.mjs +1 -1
- package/dist/public-css-url-loader.mjs +1 -1
- package/dist/{331~0.mjs → q~0.mjs} +2 -2
- package/dist/rj~0.mjs +125 -0
- package/dist/{519~0.mjs → rl~0.mjs} +53 -3
- package/dist/rspack-config~0.mjs +2768 -3256
- package/dist/{177~0.mjs → r~0.mjs} +2 -2
- package/dist/sfc-style-block-loader.mjs +49 -0
- package/dist/stats-handler~0.mjs +15 -7
- package/dist/tm~0.mjs +71 -0
- package/dist/types.d.ts +43 -3
- package/dist/{285~0.mjs → t~0.mjs} +41 -26
- package/dist/unplaced-style-import-loader.mjs +131 -0
- package/dist/x~0.mjs +3 -0
- package/dist/y~0.mjs +234 -0
- package/dist/zip~0.mjs +5 -4
- package/dist/{363~0.mjs → z~0.mjs} +360 -267
- package/package.json +5 -5
- package/dist/527~0.mjs +0 -3
- package/dist/840~0.mjs +0 -5635
- /package/dist/{895~0.mjs → 3~0.mjs} +0 -0
- /package/dist/{374~0.mjs → 5~0.mjs} +0 -0
- /package/dist/{206~0.mjs → 6~0.mjs} +0 -0
- /package/dist/{471~0.mjs → g~0.mjs} +0 -0
- /package/dist/{117~0.mjs → w~0.mjs} +0 -0
|
@@ -2,20 +2,218 @@ import { createRequire as __extjsCreateRequire } from "node:module"; const requi
|
|
|
2
2
|
import { Compilation, DefinePlugin, ProvidePlugin, WebpackError, sources } from "@rspack/core";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import pintor from "pintor";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { real_path_isOsPathUnder } from "./tm~0.mjs";
|
|
6
|
+
import { publicRelativePath, findPublicFile, inspectPublicFolders } from "./g0~0.mjs";
|
|
7
|
+
import { isChromiumBasedBrowser, CHROMIUM_FAMILY_ALIASES, GECKO_FAMILY_ALIASES, SUPPORTED_BROWSERS, isWebkitBasedBrowser, WEBKIT_BASED_BROWSERS, isGeckoBasedBrowser } from "./q~0.mjs";
|
|
8
|
+
import { parseCanonicalContentScriptAsset, getCanonicalContentScriptJsAssetName, getCanonicalContentScriptCssAssetName } from "./bh~0.mjs";
|
|
9
|
+
import { stripBom, parseJsonSafe } from "./5~0.mjs";
|
|
10
|
+
import { debugLine, isDebug, humanLine, prefix as messaging_prefix } from "./k~0.mjs";
|
|
11
|
+
import { WEBKIT_UNSUPPORTED_TOP_LEVEL_KEYS, WEBKIT_UNSUPPORTED_OPTIONS_UI_KEYS, WEBKIT_UNSUPPORTED_PERMISSIONS } from "./rj~0.mjs";
|
|
12
|
+
import { filterKeysForThisBrowser } from "./ey~0.mjs";
|
|
13
|
+
import { displayPath } from "./cp~0.mjs";
|
|
14
|
+
import { getPreloadedEnvKeys } from "./d~0.mjs";
|
|
13
15
|
import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
|
|
14
16
|
import { dirname as __rspack_dirname } from "node:path";
|
|
15
17
|
var __rspack_import_meta_dirname__ = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
16
18
|
import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
|
|
17
19
|
import * as __rspack_external_node_path_806ed179 from "node:path";
|
|
18
20
|
import * as __rspack_external_dotenv from "dotenv";
|
|
21
|
+
const DEV_SESSION_RESTART_DEBOUNCE_MS = 300;
|
|
22
|
+
class DevSessionRestartScheduler {
|
|
23
|
+
debounceMs;
|
|
24
|
+
handler = null;
|
|
25
|
+
timer;
|
|
26
|
+
latest = null;
|
|
27
|
+
inFlight = false;
|
|
28
|
+
constructor(debounceMs = DEV_SESSION_RESTART_DEBOUNCE_MS){
|
|
29
|
+
this.debounceMs = Math.max(0, debounceMs);
|
|
30
|
+
}
|
|
31
|
+
setHandler(handler) {
|
|
32
|
+
this.handler = handler;
|
|
33
|
+
}
|
|
34
|
+
request(request) {
|
|
35
|
+
this.latest = request;
|
|
36
|
+
if (this.inFlight) return;
|
|
37
|
+
this.schedule();
|
|
38
|
+
}
|
|
39
|
+
isPending() {
|
|
40
|
+
return null != this.latest || this.inFlight;
|
|
41
|
+
}
|
|
42
|
+
dispose() {
|
|
43
|
+
if (this.timer) clearTimeout(this.timer);
|
|
44
|
+
this.timer = void 0;
|
|
45
|
+
this.latest = null;
|
|
46
|
+
this.handler = null;
|
|
47
|
+
}
|
|
48
|
+
schedule() {
|
|
49
|
+
if (this.timer) clearTimeout(this.timer);
|
|
50
|
+
if (0 === this.debounceMs) return void this.flush();
|
|
51
|
+
this.timer = setTimeout(()=>{
|
|
52
|
+
this.timer = void 0;
|
|
53
|
+
this.flush();
|
|
54
|
+
}, this.debounceMs);
|
|
55
|
+
this.timer.unref?.();
|
|
56
|
+
}
|
|
57
|
+
async flush() {
|
|
58
|
+
if (this.inFlight) return;
|
|
59
|
+
const request = this.latest;
|
|
60
|
+
const handler = this.handler;
|
|
61
|
+
if (!request || !handler) return;
|
|
62
|
+
this.latest = null;
|
|
63
|
+
this.inFlight = true;
|
|
64
|
+
try {
|
|
65
|
+
await handler(request);
|
|
66
|
+
} catch {} finally{
|
|
67
|
+
this.inFlight = false;
|
|
68
|
+
if (this.latest) this.schedule();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
let boundScheduler = null;
|
|
73
|
+
const restartingCompilers = new WeakSet();
|
|
74
|
+
function bindDevSessionRestart(scheduler) {
|
|
75
|
+
boundScheduler = scheduler;
|
|
76
|
+
}
|
|
77
|
+
function unbindDevSessionRestart() {
|
|
78
|
+
boundScheduler = null;
|
|
79
|
+
}
|
|
80
|
+
function canAutoRestartDevSession() {
|
|
81
|
+
return null != boundScheduler;
|
|
82
|
+
}
|
|
83
|
+
function requestDevSessionRestart(compiler, request) {
|
|
84
|
+
if (!boundScheduler) return false;
|
|
85
|
+
if (compiler) restartingCompilers.add(compiler);
|
|
86
|
+
boundScheduler.request(request);
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
function isCompilerRestarting(compiler) {
|
|
90
|
+
return null != compiler && restartingCompilers.has(compiler);
|
|
91
|
+
}
|
|
92
|
+
function isFromFilepathList(filePath, filepathList) {
|
|
93
|
+
return Object.values(filepathList || {}).some((value)=>value === filePath);
|
|
94
|
+
}
|
|
95
|
+
function isFolder(filePath) {
|
|
96
|
+
try {
|
|
97
|
+
return __rspack_external_node_fs_1b05aee1.statSync(filePath).isDirectory();
|
|
98
|
+
} catch {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function getFilename(feature, filePath) {
|
|
103
|
+
const entryExt = __rspack_external_node_path_806ed179.extname(filePath);
|
|
104
|
+
let fileOutputpath = feature;
|
|
105
|
+
if ([
|
|
106
|
+
'.js',
|
|
107
|
+
'.jsx',
|
|
108
|
+
'.tsx',
|
|
109
|
+
'.ts',
|
|
110
|
+
'.vue',
|
|
111
|
+
'.svelte'
|
|
112
|
+
].includes(entryExt)) fileOutputpath = fileOutputpath.replace(entryExt, '.js');
|
|
113
|
+
if ([
|
|
114
|
+
'.html',
|
|
115
|
+
'.njk',
|
|
116
|
+
'.nunjucks'
|
|
117
|
+
].includes(entryExt)) fileOutputpath = fileOutputpath.replace(entryExt, '.html');
|
|
118
|
+
if ([
|
|
119
|
+
'.css',
|
|
120
|
+
'.scss',
|
|
121
|
+
'.sass',
|
|
122
|
+
'.less'
|
|
123
|
+
].includes(entryExt)) fileOutputpath = fileOutputpath.replace(entryExt, '.css');
|
|
124
|
+
return unixify(fileOutputpath || '');
|
|
125
|
+
}
|
|
126
|
+
function unixify(filePath) {
|
|
127
|
+
return filePath.replace(/\\/g, '/');
|
|
128
|
+
}
|
|
129
|
+
function resolveRootAbsoluteRef(ref, projectRoot, publicRoot) {
|
|
130
|
+
if (!ref || !ref.startsWith('/')) return;
|
|
131
|
+
if (projectRoot && real_path_isOsPathUnder(projectRoot, ref)) return;
|
|
132
|
+
if (ref.startsWith('//')) return;
|
|
133
|
+
const trimmed = ref.replace(/^\/+/, '');
|
|
134
|
+
if (!trimmed) return;
|
|
135
|
+
if (publicRoot && __rspack_external_node_fs_1b05aee1.existsSync(__rspack_external_node_path_806ed179.join(publicRoot, trimmed))) return;
|
|
136
|
+
const candidate = __rspack_external_node_path_806ed179.resolve(projectRoot, trimmed);
|
|
137
|
+
const rel = __rspack_external_node_path_806ed179.relative(projectRoot, candidate);
|
|
138
|
+
if (rel.startsWith('..') || __rspack_external_node_path_806ed179.isAbsolute(rel)) return;
|
|
139
|
+
if (!__rspack_external_node_fs_1b05aee1.existsSync(candidate) || !__rspack_external_node_fs_1b05aee1.statSync(candidate).isFile()) return;
|
|
140
|
+
return candidate;
|
|
141
|
+
}
|
|
142
|
+
function collectRootAbsoluteRefs(source) {
|
|
143
|
+
const refs = new Set();
|
|
144
|
+
const attrRe = /(?:src|href)\s*=\s*["'](\/[^"'#?]*)["']/gi;
|
|
145
|
+
const urlRe = /url\(\s*["']?(\/[^"')#?]+)["']?\s*\)/gi;
|
|
146
|
+
let m;
|
|
147
|
+
while(m = attrRe.exec(source))refs.add(m[1]);
|
|
148
|
+
while(m = urlRe.exec(source))refs.add(m[1]);
|
|
149
|
+
return refs;
|
|
150
|
+
}
|
|
151
|
+
function isManifestAddress(value) {
|
|
152
|
+
if ('string' != typeof value) return false;
|
|
153
|
+
const trimmed = value.trim();
|
|
154
|
+
return /^[a-z][a-z0-9+.-]+:/i.test(trimmed) || trimmed.startsWith('//');
|
|
155
|
+
}
|
|
156
|
+
function normalizeManifestOutputPath(originalPath) {
|
|
157
|
+
if (!originalPath) return originalPath;
|
|
158
|
+
const unixPath = originalPath.replace(/\\/g, '/');
|
|
159
|
+
if (/^\/public\//i.test(unixPath)) return unixPath.replace(/^\/public\//i, '');
|
|
160
|
+
if (/^(?:\.\/)?public\//i.test(unixPath)) return unixPath.replace(/^(?:\.\/)?public\//i, '');
|
|
161
|
+
if (/^\//.test(unixPath)) return unixPath.replace(/^\//, '');
|
|
162
|
+
return unixPath;
|
|
163
|
+
}
|
|
164
|
+
function manifestPageOutputTarget(raw, compiledTarget, manifestPath, projectPath) {
|
|
165
|
+
const unixPath = raw.replace(/\\/g, '/');
|
|
166
|
+
if (/^(?:\/public\/|(?:\.\/)?public\/)/i.test(unixPath)) return normalizeManifestOutputPath(unixPath);
|
|
167
|
+
if (/^\//.test(unixPath)) {
|
|
168
|
+
const rest = unixPath.replace(/^\/+/, '');
|
|
169
|
+
if (manifestPath && rest) {
|
|
170
|
+
const manifestDir = __rspack_external_node_path_806ed179.dirname(manifestPath);
|
|
171
|
+
const inPublic = Boolean(findPublicFile(manifestPath, projectPath, rest));
|
|
172
|
+
const inRoot = __rspack_external_node_fs_1b05aee1.existsSync(__rspack_external_node_path_806ed179.join(manifestDir, rest));
|
|
173
|
+
if (inRoot && !inPublic) return compiledTarget;
|
|
174
|
+
}
|
|
175
|
+
return normalizeManifestOutputPath(unixPath);
|
|
176
|
+
}
|
|
177
|
+
const rest = unixPath.replace(/^\.\//, '');
|
|
178
|
+
if (!manifestPath || !rest || rest.split('/').includes('..')) return compiledTarget;
|
|
179
|
+
if (__rspack_external_node_fs_1b05aee1.existsSync(__rspack_external_node_path_806ed179.join(__rspack_external_node_path_806ed179.dirname(manifestPath), rest))) return compiledTarget;
|
|
180
|
+
if (findPublicFile(manifestPath, projectPath, rest)) return rest;
|
|
181
|
+
return compiledTarget;
|
|
182
|
+
}
|
|
183
|
+
function manifestJsonOutputTarget(raw, compiledTarget, manifestPath, projectPath) {
|
|
184
|
+
return manifestPageOutputTarget(raw, compiledTarget, manifestPath, projectPath);
|
|
185
|
+
}
|
|
186
|
+
function pathEscapesExtensionRoot(normalized) {
|
|
187
|
+
return !normalized || normalized.split('/').includes('..') || /^[A-Za-z]:/.test(normalized);
|
|
188
|
+
}
|
|
189
|
+
function externalAssetOutputPath(normalized, root) {
|
|
190
|
+
const unix = normalized.replace(/\\/g, '/');
|
|
191
|
+
const noDrive = unix.replace(/^([A-Za-z]):(?:\/|$)/, '_drive_$1/');
|
|
192
|
+
const safe = noDrive.split('/').map((segment)=>{
|
|
193
|
+
if ('..' === segment) return '_';
|
|
194
|
+
if ('.' === segment || !segment) return '';
|
|
195
|
+
return segment.replace(/[<>:"|?*\x00-\x1F]/g, '_');
|
|
196
|
+
}).filter(Boolean).join('/');
|
|
197
|
+
return safe ? `${root}/${safe}` : `${root}/external`;
|
|
198
|
+
}
|
|
199
|
+
function iconOutputPath(raw) {
|
|
200
|
+
if (/^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw)) return normalizeManifestOutputPath(raw);
|
|
201
|
+
const normalized = normalizeManifestOutputPath(raw).replace(/^\.\//, '');
|
|
202
|
+
if (!pathEscapesExtensionRoot(normalized)) return normalized;
|
|
203
|
+
return externalAssetOutputPath(normalized, 'icons');
|
|
204
|
+
}
|
|
205
|
+
function themeIconOutputPath(raw, folder) {
|
|
206
|
+
return featureAssetOutputPath(raw, folder);
|
|
207
|
+
}
|
|
208
|
+
function themeImageOutputPath(raw) {
|
|
209
|
+
return featureAssetOutputPath(raw, 'theme/images');
|
|
210
|
+
}
|
|
211
|
+
function featureAssetOutputPath(raw, folder) {
|
|
212
|
+
if (/^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw)) return normalizeManifestOutputPath(raw);
|
|
213
|
+
const normalized = normalizeManifestOutputPath(raw).replace(/^\.\//, '');
|
|
214
|
+
if (!pathEscapesExtensionRoot(normalized)) return `${folder}/${normalized}`;
|
|
215
|
+
return externalAssetOutputPath(normalized, folder);
|
|
216
|
+
}
|
|
19
217
|
const ACTION_HTML_FEATURE = 'action/index';
|
|
20
218
|
const BROWSER_ACTION_HTML_FEATURE = 'browser_action/index';
|
|
21
219
|
const PAGE_ACTION_HTML_FEATURE = 'page_action/index';
|
|
@@ -268,70 +466,6 @@ function leavePublicPagesToCopier(html, context, projectPath) {
|
|
|
268
466
|
}
|
|
269
467
|
return html;
|
|
270
468
|
}
|
|
271
|
-
function isFromFilepathList(filePath, filepathList) {
|
|
272
|
-
return Object.values(filepathList || {}).some((value)=>value === filePath);
|
|
273
|
-
}
|
|
274
|
-
function isFolder(filePath) {
|
|
275
|
-
try {
|
|
276
|
-
return __rspack_external_node_fs_1b05aee1.statSync(filePath).isDirectory();
|
|
277
|
-
} catch {
|
|
278
|
-
return false;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
function getFilename(feature, filePath) {
|
|
282
|
-
const entryExt = __rspack_external_node_path_806ed179.extname(filePath);
|
|
283
|
-
let fileOutputpath = feature;
|
|
284
|
-
if ([
|
|
285
|
-
'.js',
|
|
286
|
-
'.jsx',
|
|
287
|
-
'.tsx',
|
|
288
|
-
'.ts',
|
|
289
|
-
'.vue',
|
|
290
|
-
'.svelte'
|
|
291
|
-
].includes(entryExt)) fileOutputpath = fileOutputpath.replace(entryExt, '.js');
|
|
292
|
-
if ([
|
|
293
|
-
'.html',
|
|
294
|
-
'.njk',
|
|
295
|
-
'.nunjucks'
|
|
296
|
-
].includes(entryExt)) fileOutputpath = fileOutputpath.replace(entryExt, '.html');
|
|
297
|
-
if ([
|
|
298
|
-
'.css',
|
|
299
|
-
'.scss',
|
|
300
|
-
'.sass',
|
|
301
|
-
'.less'
|
|
302
|
-
].includes(entryExt)) fileOutputpath = fileOutputpath.replace(entryExt, '.css');
|
|
303
|
-
return unixify(fileOutputpath || '');
|
|
304
|
-
}
|
|
305
|
-
function unixify(filePath) {
|
|
306
|
-
return filePath.replace(/\\/g, '/');
|
|
307
|
-
}
|
|
308
|
-
function resolveRootAbsoluteRef(ref, projectRoot, publicRoot) {
|
|
309
|
-
if (!ref || !ref.startsWith('/')) return;
|
|
310
|
-
if (projectRoot && ref.startsWith(projectRoot)) return;
|
|
311
|
-
if (ref.startsWith('//')) return;
|
|
312
|
-
const trimmed = ref.replace(/^\/+/, '');
|
|
313
|
-
if (!trimmed) return;
|
|
314
|
-
if (publicRoot && __rspack_external_node_fs_1b05aee1.existsSync(__rspack_external_node_path_806ed179.join(publicRoot, trimmed))) return;
|
|
315
|
-
const candidate = __rspack_external_node_path_806ed179.resolve(projectRoot, trimmed);
|
|
316
|
-
const rel = __rspack_external_node_path_806ed179.relative(projectRoot, candidate);
|
|
317
|
-
if (rel.startsWith('..') || __rspack_external_node_path_806ed179.isAbsolute(rel)) return;
|
|
318
|
-
if (!__rspack_external_node_fs_1b05aee1.existsSync(candidate) || !__rspack_external_node_fs_1b05aee1.statSync(candidate).isFile()) return;
|
|
319
|
-
return candidate;
|
|
320
|
-
}
|
|
321
|
-
function collectRootAbsoluteRefs(source) {
|
|
322
|
-
const refs = new Set();
|
|
323
|
-
const attrRe = /(?:src|href)\s*=\s*["'](\/[^"'#?]*)["']/gi;
|
|
324
|
-
const urlRe = /url\(\s*["']?(\/[^"')#?]+)["']?\s*\)/gi;
|
|
325
|
-
let m;
|
|
326
|
-
while(m = attrRe.exec(source))refs.add(m[1]);
|
|
327
|
-
while(m = urlRe.exec(source))refs.add(m[1]);
|
|
328
|
-
return refs;
|
|
329
|
-
}
|
|
330
|
-
function isManifestAddress(value) {
|
|
331
|
-
if ('string' != typeof value) return false;
|
|
332
|
-
const trimmed = value.trim();
|
|
333
|
-
return /^[a-z][a-z0-9+.-]+:/i.test(trimmed) || trimmed.startsWith('//');
|
|
334
|
-
}
|
|
335
469
|
function backgroundPage(manifest) {
|
|
336
470
|
return manifest.background?.page && {
|
|
337
471
|
background: {
|
|
@@ -342,67 +476,6 @@ function backgroundPage(manifest) {
|
|
|
342
476
|
}
|
|
343
477
|
};
|
|
344
478
|
}
|
|
345
|
-
function normalizeManifestOutputPath(originalPath) {
|
|
346
|
-
if (!originalPath) return originalPath;
|
|
347
|
-
const unixPath = originalPath.replace(/\\/g, '/');
|
|
348
|
-
if (/^\/public\//i.test(unixPath)) return unixPath.replace(/^\/public\//i, '');
|
|
349
|
-
if (/^(?:\.\/)?public\//i.test(unixPath)) return unixPath.replace(/^(?:\.\/)?public\//i, '');
|
|
350
|
-
if (/^\//.test(unixPath)) return unixPath.replace(/^\//, '');
|
|
351
|
-
return unixPath;
|
|
352
|
-
}
|
|
353
|
-
function manifestPageOutputTarget(raw, compiledTarget, manifestPath, projectPath) {
|
|
354
|
-
const unixPath = raw.replace(/\\/g, '/');
|
|
355
|
-
if (/^(?:\/public\/|(?:\.\/)?public\/)/i.test(unixPath)) return normalizeManifestOutputPath(unixPath);
|
|
356
|
-
if (/^\//.test(unixPath)) {
|
|
357
|
-
const rest = unixPath.replace(/^\/+/, '');
|
|
358
|
-
if (manifestPath && rest) {
|
|
359
|
-
const manifestDir = __rspack_external_node_path_806ed179.dirname(manifestPath);
|
|
360
|
-
const inPublic = Boolean(findPublicFile(manifestPath, projectPath, rest));
|
|
361
|
-
const inRoot = __rspack_external_node_fs_1b05aee1.existsSync(__rspack_external_node_path_806ed179.join(manifestDir, rest));
|
|
362
|
-
if (inRoot && !inPublic) return compiledTarget;
|
|
363
|
-
}
|
|
364
|
-
return normalizeManifestOutputPath(unixPath);
|
|
365
|
-
}
|
|
366
|
-
const rest = unixPath.replace(/^\.\//, '');
|
|
367
|
-
if (!manifestPath || !rest || rest.split('/').includes('..')) return compiledTarget;
|
|
368
|
-
if (__rspack_external_node_fs_1b05aee1.existsSync(__rspack_external_node_path_806ed179.join(__rspack_external_node_path_806ed179.dirname(manifestPath), rest))) return compiledTarget;
|
|
369
|
-
if (findPublicFile(manifestPath, projectPath, rest)) return rest;
|
|
370
|
-
return compiledTarget;
|
|
371
|
-
}
|
|
372
|
-
function manifestJsonOutputTarget(raw, compiledTarget, manifestPath, projectPath) {
|
|
373
|
-
return manifestPageOutputTarget(raw, compiledTarget, manifestPath, projectPath);
|
|
374
|
-
}
|
|
375
|
-
function pathEscapesExtensionRoot(normalized) {
|
|
376
|
-
return !normalized || normalized.split('/').includes('..') || /^[A-Za-z]:/.test(normalized);
|
|
377
|
-
}
|
|
378
|
-
function externalAssetOutputPath(normalized, root) {
|
|
379
|
-
const unix = normalized.replace(/\\/g, '/');
|
|
380
|
-
const noDrive = unix.replace(/^([A-Za-z]):(?:\/|$)/, '_drive_$1/');
|
|
381
|
-
const safe = noDrive.split('/').map((segment)=>{
|
|
382
|
-
if ('..' === segment) return '_';
|
|
383
|
-
if ('.' === segment || !segment) return '';
|
|
384
|
-
return segment.replace(/[<>:"|?*\x00-\x1F]/g, '_');
|
|
385
|
-
}).filter(Boolean).join('/');
|
|
386
|
-
return safe ? `${root}/${safe}` : `${root}/external`;
|
|
387
|
-
}
|
|
388
|
-
function iconOutputPath(raw) {
|
|
389
|
-
if (/^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw)) return normalizeManifestOutputPath(raw);
|
|
390
|
-
const normalized = normalizeManifestOutputPath(raw).replace(/^\.\//, '');
|
|
391
|
-
if (!pathEscapesExtensionRoot(normalized)) return normalized;
|
|
392
|
-
return externalAssetOutputPath(normalized, 'icons');
|
|
393
|
-
}
|
|
394
|
-
function themeIconOutputPath(raw, folder) {
|
|
395
|
-
return featureAssetOutputPath(raw, folder);
|
|
396
|
-
}
|
|
397
|
-
function themeImageOutputPath(raw) {
|
|
398
|
-
return featureAssetOutputPath(raw, 'theme/images');
|
|
399
|
-
}
|
|
400
|
-
function featureAssetOutputPath(raw, folder) {
|
|
401
|
-
if (/^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw)) return normalizeManifestOutputPath(raw);
|
|
402
|
-
const normalized = normalizeManifestOutputPath(raw).replace(/^\.\//, '');
|
|
403
|
-
if (!pathEscapesExtensionRoot(normalized)) return `${folder}/${normalized}`;
|
|
404
|
-
return externalAssetOutputPath(normalized, folder);
|
|
405
|
-
}
|
|
406
479
|
function chromeUrlOverrides(manifest, manifestPath, projectPath) {
|
|
407
480
|
return manifest.chrome_url_overrides && {
|
|
408
481
|
chrome_url_overrides: {
|
|
@@ -1096,14 +1169,17 @@ function geckoSidePanelUnsupported(file) {
|
|
|
1096
1169
|
const lines = [];
|
|
1097
1170
|
lines.push(`${messaging_prefix('warn')} ${pintor.underline(file)} uses chrome.sidePanel, which is Chromium only.`);
|
|
1098
1171
|
lines.push(`Firefox opens a sidebar through the ${pintor.yellow('sidebar_action')} manifest key on every manifest version, and addons-linter flags the call as UNSUPPORTED_API.`);
|
|
1099
|
-
lines.push(
|
|
1172
|
+
lines.push(`${runtimeGuardAdvice('sidePanel')} Only the build-time branch drops the call from the Firefox bundle, which is what clears the linter.`);
|
|
1100
1173
|
return lines.join('\n');
|
|
1101
1174
|
}
|
|
1175
|
+
function runtimeGuardAdvice(api) {
|
|
1176
|
+
return `Move the call behind a build-time branch on ${pintor.blue('import.meta.env.EXTENSION_PUBLIC_BROWSER')}, guard it with ${pintor.yellow(`chrome.${api}?.`)}, or keep it inside an ${pintor.yellow(`if (chrome.${api})`)} branch.`;
|
|
1177
|
+
}
|
|
1102
1178
|
function safariUnsupportedApi(file, api, detail) {
|
|
1103
1179
|
const lines = [];
|
|
1104
1180
|
lines.push(`${messaging_prefix('warn')} ${pintor.underline(file)} calls chrome.${api}, which Safari does not have.`);
|
|
1105
1181
|
lines.push(detail);
|
|
1106
|
-
lines.push(
|
|
1182
|
+
lines.push(runtimeGuardAdvice(api));
|
|
1107
1183
|
return lines.join('\n');
|
|
1108
1184
|
}
|
|
1109
1185
|
const safariBackgroundDies = "The call throws when the script runs, Safari drops the background, and nothing reports an error.";
|
|
@@ -1191,21 +1267,44 @@ function edgeEmbeddedOptionsDialog() {
|
|
|
1191
1267
|
return `${messaging_prefix('warn')} Edge shows an embedded settings page in a dialog at most 400px wide (368px for the page), so a wider settings page is clipped on Edge.\nAdd ${pintor.yellow('edge:options_ui')} with ${pintor.yellow('"open_in_tab": true')} to open settings in a tab on Edge only.`;
|
|
1192
1268
|
}
|
|
1193
1269
|
function webkitUnsupportedKeysDropped(browser, dropped) {
|
|
1270
|
+
return unsupportedKeysDropped('Safari', 'app', 'safari:', browser, dropped);
|
|
1271
|
+
}
|
|
1272
|
+
function geckoUnsupportedKeysDropped(browser, dropped) {
|
|
1273
|
+
return unsupportedKeysDropped('Firefox', 'extension', 'firefox:', browser, dropped);
|
|
1274
|
+
}
|
|
1275
|
+
function unsupportedKeysDropped(engine, product, vendorPrefix, browser, dropped) {
|
|
1194
1276
|
const count = dropped.length;
|
|
1195
1277
|
const target = pintor.blue(browser);
|
|
1196
|
-
const replacement = `Declare a
|
|
1278
|
+
const replacement = `Declare a ${engine}-only replacement with the ${pintor.yellow(vendorPrefix)} prefix if you have one.`;
|
|
1197
1279
|
if (1 === count) {
|
|
1198
1280
|
const [entry] = dropped;
|
|
1199
|
-
return `${messaging_prefix('warn')}
|
|
1281
|
+
return `${messaging_prefix('warn')} ${engine} has no support for ${pintor.yellow(entry.path)} (${entry.reason}), so the ${target} build dropped it, and nothing the ${product} could have run was lost. ${replacement}`;
|
|
1200
1282
|
}
|
|
1201
1283
|
const bar = `${pintor.gray('│')} `;
|
|
1202
1284
|
const lines = [
|
|
1203
|
-
`${messaging_prefix('warn')}
|
|
1285
|
+
`${messaging_prefix('warn')} ${engine} has no support for ${String(count)} manifest keys this project declares, so the ${target} build dropped them:`
|
|
1204
1286
|
];
|
|
1205
1287
|
for (const entry of dropped)lines.push(`${bar}${pintor.yellow(entry.path)} ${pintor.gray(entry.reason)}`);
|
|
1206
|
-
lines.push(`${bar}These ${String(count)} keys are inert on
|
|
1288
|
+
lines.push(`${bar}These ${String(count)} keys are inert on ${engine}, so the built ${product} lost nothing it could have run. ${replacement}`);
|
|
1207
1289
|
return lines.join('\n');
|
|
1208
1290
|
}
|
|
1291
|
+
function geckoIncognitoSplitNotAllowed(browser) {
|
|
1292
|
+
return `${messaging_prefix('warn')} Firefox has no split mode, so it reads ${pintor.yellow('incognito: "split"')} as ${pintor.yellow('"not_allowed"')} and the ${pintor.blue(browser)} build never runs in private windows. The build kept the value as declared. Set ${pintor.yellow('firefox:incognito')} to ${pintor.yellow('"spanning"')} or ${pintor.yellow('"not_allowed"')} to choose.`;
|
|
1293
|
+
}
|
|
1294
|
+
function manifestDescriptionOverStoreLimit(browser, length, limit, store) {
|
|
1295
|
+
const apple = 112 === limit ? ' (Apple error 90849)' : '';
|
|
1296
|
+
return [
|
|
1297
|
+
`${messaging_prefix('warn')} manifest.json ${pintor.blue("description")} runs ${length} characters, and ${store} refuses a ${browser} build whose description is over ${limit}${apple}.`,
|
|
1298
|
+
`${pintor.gray('LIMIT')} ${limit} characters, ${pintor.gray('GOT')} ${length}`,
|
|
1299
|
+
`Shorten it to ${limit} characters or fewer, the store reads this field from the manifest.`
|
|
1300
|
+
].join('\n');
|
|
1301
|
+
}
|
|
1302
|
+
function manifestDescriptionMissingForStore(browser, store, limit) {
|
|
1303
|
+
return [
|
|
1304
|
+
`${messaging_prefix('warn')} manifest.json has no ${pintor.blue("description")}, and ${store} refuses a ${browser} build without one (Apple error 90849).`,
|
|
1305
|
+
`Add a description of ${limit} characters or fewer.`
|
|
1306
|
+
].join('\n');
|
|
1307
|
+
}
|
|
1209
1308
|
function edgeEmbedsOptionsPage(manifest, browser) {
|
|
1210
1309
|
if ('edge' !== String(browser)) return false;
|
|
1211
1310
|
const optionsUi = manifest.options_ui;
|
|
@@ -1219,66 +1318,37 @@ function reportEdgeEmbeddedOptions(manifest, browser) {
|
|
|
1219
1318
|
reported = true;
|
|
1220
1319
|
humanLine(edgeEmbeddedOptionsDialog());
|
|
1221
1320
|
}
|
|
1222
|
-
const
|
|
1223
|
-
side_panel: 'Safari has no side panel surface',
|
|
1224
|
-
sidebar_action: 'Safari has no sidebar surface',
|
|
1225
|
-
sandbox: 'Safari cannot run sandboxed extension pages',
|
|
1226
|
-
user_scripts: 'Safari has no userScripts API',
|
|
1227
|
-
omnibox: 'Safari has no omnibox keyword API',
|
|
1228
|
-
chrome_settings_overrides: 'Safari lets no extension override these settings',
|
|
1229
|
-
tts_engine: 'Safari has no speech engine API',
|
|
1230
|
-
file_browser_handlers: 'ChromeOS only',
|
|
1231
|
-
input_components: 'ChromeOS only',
|
|
1232
|
-
cross_origin_embedder_policy: 'Safari reads no COEP key from a manifest',
|
|
1233
|
-
cross_origin_opener_policy: 'Safari reads no COOP key from a manifest',
|
|
1234
|
-
requirements: 'Chrome Web Store only',
|
|
1235
|
-
oauth2: 'Safari has no identity API to consume it',
|
|
1236
|
-
nacl_modules: 'Native Client is Chrome only',
|
|
1237
|
-
replacement_web_app: 'Chrome Web Store only',
|
|
1238
|
-
offline_enabled: 'Chrome Web Store only',
|
|
1239
|
-
differential_fingerprint: 'Chrome Web Store only',
|
|
1240
|
-
incognito: 'Safari always runs extensions in spanning mode and ignores the declared value'
|
|
1241
|
-
};
|
|
1242
|
-
const UNSUPPORTED_PERMISSIONS = new Set([
|
|
1321
|
+
const GECKO_UNSUPPORTED_PERMISSIONS = new Set([
|
|
1243
1322
|
'accessibilityFeatures.modify',
|
|
1244
1323
|
'accessibilityFeatures.read',
|
|
1245
1324
|
'audio',
|
|
1246
1325
|
'background',
|
|
1247
|
-
'bookmarks',
|
|
1248
|
-
'browsingData',
|
|
1249
1326
|
'certificateProvider',
|
|
1250
|
-
'clipboardRead',
|
|
1251
1327
|
'contentSettings',
|
|
1252
1328
|
'debugger',
|
|
1253
1329
|
'declarativeContent',
|
|
1254
1330
|
'desktopCapture',
|
|
1255
1331
|
'documentScan',
|
|
1256
|
-
'downloads',
|
|
1332
|
+
'downloads.ui',
|
|
1257
1333
|
'enterprise.deviceAttributes',
|
|
1258
1334
|
'enterprise.platformKeys',
|
|
1259
1335
|
'experimental',
|
|
1260
1336
|
'favicon',
|
|
1337
|
+
'fileBrowserHandler',
|
|
1261
1338
|
'fileSystemProvider',
|
|
1262
1339
|
'fontSettings',
|
|
1263
1340
|
'gcm',
|
|
1264
|
-
'geolocation',
|
|
1265
|
-
'history',
|
|
1266
|
-
'identity',
|
|
1267
1341
|
'identity.email',
|
|
1268
|
-
'
|
|
1269
|
-
'management',
|
|
1270
|
-
'notifications',
|
|
1342
|
+
'loginState',
|
|
1271
1343
|
'offscreen',
|
|
1272
1344
|
'pageCapture',
|
|
1273
1345
|
'platformKeys',
|
|
1274
1346
|
'power',
|
|
1275
1347
|
'printerProvider',
|
|
1276
|
-
'
|
|
1348
|
+
'printing',
|
|
1349
|
+
'printingMetrics',
|
|
1277
1350
|
'processes',
|
|
1278
|
-
'proxy',
|
|
1279
1351
|
'readingList',
|
|
1280
|
-
'search',
|
|
1281
|
-
'sessions',
|
|
1282
1352
|
'sidePanel',
|
|
1283
1353
|
'system.cpu',
|
|
1284
1354
|
'system.display',
|
|
@@ -1286,26 +1356,77 @@ const UNSUPPORTED_PERMISSIONS = new Set([
|
|
|
1286
1356
|
'system.storage',
|
|
1287
1357
|
'systemLog',
|
|
1288
1358
|
'tabCapture',
|
|
1289
|
-
'tabGroups',
|
|
1290
|
-
'topSites',
|
|
1291
1359
|
'tts',
|
|
1292
1360
|
'ttsEngine',
|
|
1293
|
-
'userScripts',
|
|
1294
1361
|
'vpnProvider',
|
|
1295
1362
|
'wallpaper',
|
|
1296
|
-
'webAuthenticationProxy'
|
|
1297
|
-
'webRequestBlocking'
|
|
1363
|
+
'webAuthenticationProxy'
|
|
1298
1364
|
]);
|
|
1299
1365
|
const PERMISSION_LISTS = [
|
|
1300
1366
|
'permissions',
|
|
1301
1367
|
'optional_permissions'
|
|
1302
1368
|
];
|
|
1369
|
+
function dropGeckoUnsupportedKeys(manifest, browser) {
|
|
1370
|
+
const dropped = [];
|
|
1371
|
+
const reinterpreted = [];
|
|
1372
|
+
if (!isGeckoBasedBrowser(String(browser))) return {
|
|
1373
|
+
manifest,
|
|
1374
|
+
dropped,
|
|
1375
|
+
reinterpreted
|
|
1376
|
+
};
|
|
1377
|
+
const next = {
|
|
1378
|
+
...manifest
|
|
1379
|
+
};
|
|
1380
|
+
for (const listName of PERMISSION_LISTS){
|
|
1381
|
+
const list = next[listName];
|
|
1382
|
+
if (!Array.isArray(list)) continue;
|
|
1383
|
+
const kept = list.filter((entry)=>{
|
|
1384
|
+
if ('string' != typeof entry || !GECKO_UNSUPPORTED_PERMISSIONS.has(entry)) return true;
|
|
1385
|
+
dropped.push({
|
|
1386
|
+
path: `${listName}.${entry}`,
|
|
1387
|
+
reason: `Firefox has no ${entry} permission`
|
|
1388
|
+
});
|
|
1389
|
+
return false;
|
|
1390
|
+
});
|
|
1391
|
+
if (kept.length !== list.length) if (0 === kept.length) delete next[listName];
|
|
1392
|
+
else next[listName] = kept;
|
|
1393
|
+
}
|
|
1394
|
+
if ('split' === next.incognito) reinterpreted.push({
|
|
1395
|
+
path: 'incognito',
|
|
1396
|
+
declared: 'split',
|
|
1397
|
+
effective: 'not_allowed'
|
|
1398
|
+
});
|
|
1399
|
+
return {
|
|
1400
|
+
manifest: next,
|
|
1401
|
+
dropped,
|
|
1402
|
+
reinterpreted
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
const filter_keys_gecko_reported = new Set();
|
|
1406
|
+
function reportGeckoUnsupportedKeys(found, browser) {
|
|
1407
|
+
const target = String(browser);
|
|
1408
|
+
if (found.dropped.length > 0) {
|
|
1409
|
+
const signature = `${target}\0${found.dropped.map((entry)=>entry.path).join(',')}`;
|
|
1410
|
+
if (!filter_keys_gecko_reported.has(signature)) {
|
|
1411
|
+
filter_keys_gecko_reported.add(signature);
|
|
1412
|
+
humanLine(geckoUnsupportedKeysDropped(target, found.dropped));
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
for (const entry of found.reinterpreted){
|
|
1416
|
+
const signature = `${target}\0${entry.path}=${entry.declared}`;
|
|
1417
|
+
if (!filter_keys_gecko_reported.has(signature)) {
|
|
1418
|
+
filter_keys_gecko_reported.add(signature);
|
|
1419
|
+
humanLine(geckoIncognitoSplitNotAllowed(target));
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
const filter_keys_safari_PERMISSION_LISTS = [
|
|
1424
|
+
'permissions',
|
|
1425
|
+
'optional_permissions'
|
|
1426
|
+
];
|
|
1303
1427
|
function isWebkitUnsupportedPermission(permission, browser) {
|
|
1304
|
-
return isWebkitBasedBrowser(String(browser)) &&
|
|
1428
|
+
return isWebkitBasedBrowser(String(browser)) && WEBKIT_UNSUPPORTED_PERMISSIONS.has(permission);
|
|
1305
1429
|
}
|
|
1306
|
-
const UNSUPPORTED_OPTIONS_UI_KEYS = {
|
|
1307
|
-
open_in_tab: 'Safari always opens the options page in a tab'
|
|
1308
|
-
};
|
|
1309
1430
|
function isPlainObject(value) {
|
|
1310
1431
|
return !!value && 'object' == typeof value && !Array.isArray(value);
|
|
1311
1432
|
}
|
|
@@ -1318,18 +1439,18 @@ function dropWebkitUnsupportedKeys(manifest, browser) {
|
|
|
1318
1439
|
const next = {
|
|
1319
1440
|
...manifest
|
|
1320
1441
|
};
|
|
1321
|
-
for (const [key, reason] of Object.entries(
|
|
1442
|
+
for (const [key, reason] of Object.entries(WEBKIT_UNSUPPORTED_TOP_LEVEL_KEYS))if (key in next) {
|
|
1322
1443
|
delete next[key];
|
|
1323
1444
|
dropped.push({
|
|
1324
1445
|
path: key,
|
|
1325
1446
|
reason
|
|
1326
1447
|
});
|
|
1327
1448
|
}
|
|
1328
|
-
for (const listName of
|
|
1449
|
+
for (const listName of filter_keys_safari_PERMISSION_LISTS){
|
|
1329
1450
|
const list = next[listName];
|
|
1330
1451
|
if (!Array.isArray(list)) continue;
|
|
1331
1452
|
const kept = list.filter((entry)=>{
|
|
1332
|
-
if ('string' != typeof entry || !
|
|
1453
|
+
if ('string' != typeof entry || !WEBKIT_UNSUPPORTED_PERMISSIONS.has(entry)) return true;
|
|
1333
1454
|
dropped.push({
|
|
1334
1455
|
path: `${listName}.${entry}`,
|
|
1335
1456
|
reason: `Safari has no ${entry} API`
|
|
@@ -1345,7 +1466,7 @@ function dropWebkitUnsupportedKeys(manifest, browser) {
|
|
|
1345
1466
|
...optionsUi
|
|
1346
1467
|
};
|
|
1347
1468
|
let changed = false;
|
|
1348
|
-
for (const [key, reason] of Object.entries(
|
|
1469
|
+
for (const [key, reason] of Object.entries(WEBKIT_UNSUPPORTED_OPTIONS_UI_KEYS))if (key in patched) {
|
|
1349
1470
|
delete patched[key];
|
|
1350
1471
|
changed = true;
|
|
1351
1472
|
dropped.push({
|
|
@@ -1449,8 +1570,10 @@ function buildCanonicalManifestWithOverrides(manifestPath, manifest, browser, pr
|
|
|
1449
1570
|
const webkit = dropWebkitUnsupportedKeys(translated, browser);
|
|
1450
1571
|
reportWebkitDroppedKeys(webkit.dropped, browser);
|
|
1451
1572
|
reportEdgeEmbeddedOptions(webkit.manifest, browser);
|
|
1573
|
+
const gecko = dropGeckoUnsupportedKeys(webkit.manifest, browser);
|
|
1574
|
+
reportGeckoUnsupportedKeys(gecko, browser);
|
|
1452
1575
|
return {
|
|
1453
|
-
manifest:
|
|
1576
|
+
manifest: gecko.manifest,
|
|
1454
1577
|
overrides
|
|
1455
1578
|
};
|
|
1456
1579
|
}
|
|
@@ -1499,76 +1622,23 @@ function envPublicSecretName(names) {
|
|
|
1499
1622
|
const one = 1 === names.length;
|
|
1500
1623
|
return `${names.map((name)=>pintor.yellow(name)).join(', ')} ${one ? 'looks' : 'look'} like ${one ? 'a secret' : 'secrets'}, and every ${pintor.yellow('EXTENSION_PUBLIC_*')} value is written into the built JavaScript that every user and every store review can read.\nKeep the secret on a server the extension calls, under a name without the ${pintor.yellow('EXTENSION_PUBLIC_')} prefix. If the value is public by design, such as a Firebase web API key, this warning does not apply to it.`;
|
|
1501
1624
|
}
|
|
1502
|
-
function
|
|
1503
|
-
return
|
|
1504
|
-
}
|
|
1505
|
-
const DEV_SESSION_RESTART_DEBOUNCE_MS = 300;
|
|
1506
|
-
class DevSessionRestartScheduler {
|
|
1507
|
-
debounceMs;
|
|
1508
|
-
handler = null;
|
|
1509
|
-
timer;
|
|
1510
|
-
latest = null;
|
|
1511
|
-
inFlight = false;
|
|
1512
|
-
constructor(debounceMs = DEV_SESSION_RESTART_DEBOUNCE_MS){
|
|
1513
|
-
this.debounceMs = Math.max(0, debounceMs);
|
|
1514
|
-
}
|
|
1515
|
-
setHandler(handler) {
|
|
1516
|
-
this.handler = handler;
|
|
1517
|
-
}
|
|
1518
|
-
request(request) {
|
|
1519
|
-
this.latest = request;
|
|
1520
|
-
if (this.inFlight) return;
|
|
1521
|
-
this.schedule();
|
|
1522
|
-
}
|
|
1523
|
-
isPending() {
|
|
1524
|
-
return null != this.latest || this.inFlight;
|
|
1525
|
-
}
|
|
1526
|
-
dispose() {
|
|
1527
|
-
if (this.timer) clearTimeout(this.timer);
|
|
1528
|
-
this.timer = void 0;
|
|
1529
|
-
this.latest = null;
|
|
1530
|
-
this.handler = null;
|
|
1531
|
-
}
|
|
1532
|
-
schedule() {
|
|
1533
|
-
if (this.timer) clearTimeout(this.timer);
|
|
1534
|
-
if (0 === this.debounceMs) return void this.flush();
|
|
1535
|
-
this.timer = setTimeout(()=>{
|
|
1536
|
-
this.timer = void 0;
|
|
1537
|
-
this.flush();
|
|
1538
|
-
}, this.debounceMs);
|
|
1539
|
-
this.timer.unref?.();
|
|
1540
|
-
}
|
|
1541
|
-
async flush() {
|
|
1542
|
-
if (this.inFlight) return;
|
|
1543
|
-
const request = this.latest;
|
|
1544
|
-
const handler = this.handler;
|
|
1545
|
-
if (!request || !handler) return;
|
|
1546
|
-
this.latest = null;
|
|
1547
|
-
this.inFlight = true;
|
|
1548
|
-
try {
|
|
1549
|
-
await handler(request);
|
|
1550
|
-
} catch {} finally{
|
|
1551
|
-
this.inFlight = false;
|
|
1552
|
-
if (this.latest) this.schedule();
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
let boundScheduler = null;
|
|
1557
|
-
const restartingCompilers = new WeakSet();
|
|
1558
|
-
function bindDevSessionRestart(scheduler) {
|
|
1559
|
-
boundScheduler = scheduler;
|
|
1625
|
+
function envIgnoredFiles(files, mode) {
|
|
1626
|
+
return `${messaging_prefix('debug')} env ignored=${files.join(',')} mode=${mode}`;
|
|
1560
1627
|
}
|
|
1561
|
-
function
|
|
1562
|
-
|
|
1628
|
+
function envNoMatchingFile(browser, mode, presentFiles, expectedCandidates, publicValuesDefined = false) {
|
|
1629
|
+
const undefinedLine = publicValuesDefined ? '' : `EXTENSION_PUBLIC_* variables read from code are ${pintor.yellow('undefined')} in this build.\n`;
|
|
1630
|
+
return `Found ${presentFiles.map((file)=>pintor.yellow(file)).join(', ')}, but none match browser ${pintor.yellow(browser)} in mode ${pintor.yellow(mode)}.\n` + undefinedLine + "Rename the file to one of these, in priority order: " + `${expectedCandidates.map((file)=>pintor.gray(file)).join(', ')}.\n` + "Family names apply to every family member, so " + `${pintor.yellow('.env.chrome')} also matches ${pintor.yellow('chromium')} and ${pintor.yellow('edge')} targets.`;
|
|
1563
1631
|
}
|
|
1564
|
-
function
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
boundScheduler.request(request);
|
|
1568
|
-
return true;
|
|
1632
|
+
function nodeBuiltinStandInHint(builtin) {
|
|
1633
|
+
const root = builtin.split('/')[0];
|
|
1634
|
+
return `In ${pintor.yellow('extension.config.js')}, set ${pintor.yellow('resolve.fallback')} from the ${pintor.yellow('config')} hook: ${pintor.yellow(`{'${root}': false}`)} for an empty module, or the path of a browser polyfill you installed, such as ${pintor.yellow(`require.resolve('${root}/')`)}. ${pintor.yellow(`node:${root}`)} and ${pintor.yellow(root)} read the same key.`;
|
|
1569
1635
|
}
|
|
1570
|
-
function
|
|
1571
|
-
|
|
1636
|
+
function nodeBuiltinHasNoStandIn(builtin, issuer, stubbed, upstream) {
|
|
1637
|
+
const from = issuer ? ` ${pintor.yellow(displayPath(issuer))} imports it.` : '';
|
|
1638
|
+
const head = `The Node.js built-in ${pintor.yellow(builtin)} does not exist in a browser, and this build has no stand-in for it.${from}`;
|
|
1639
|
+
if (builtin.startsWith('node:')) return `${head}\nIt has no bare name, so ${pintor.yellow('resolve.fallback')} cannot reach it. In ${pintor.yellow('extension.config.js')}, push ${pintor.yellow(`new rspack.NormalModuleReplacementPlugin(/^${builtin}$/, yourModulePath)`)} onto ${pintor.yellow('config.plugins')} from the ${pintor.yellow('config')} hook, where ${pintor.yellow('yourModulePath')} is the absolute path of a module of yours. The hook's second argument carries the class: ${pintor.yellow('config: (config, {rspack}) => config')}.`;
|
|
1640
|
+
const stubs = stubbed.length > 0 ? `Only ${stubbed.map((name)=>pintor.yellow(name)).join(', ')} ${1 === stubbed.length ? 'is' : 'are'} replaced with an empty module. ` : '';
|
|
1641
|
+
return `${head}\n${stubs}${nodeBuiltinStandInHint(builtin)}\n${upstream}`;
|
|
1572
1642
|
}
|
|
1573
1643
|
class WatchEnvFilesPlugin {
|
|
1574
1644
|
static name = 'plugin-compilation:watch-env-files';
|
|
@@ -1765,6 +1835,23 @@ function getEnvFileCandidates(browser, mode) {
|
|
|
1765
1835
|
'.env'
|
|
1766
1836
|
];
|
|
1767
1837
|
}
|
|
1838
|
+
const KNOWN_ENV_MODES = new Set([
|
|
1839
|
+
'development',
|
|
1840
|
+
'production',
|
|
1841
|
+
'test',
|
|
1842
|
+
'none'
|
|
1843
|
+
]);
|
|
1844
|
+
const KNOWN_ENV_BROWSERS = new Set([
|
|
1845
|
+
...SUPPORTED_BROWSERS,
|
|
1846
|
+
...CHROMIUM_FAMILY_ALIASES,
|
|
1847
|
+
...GECKO_FAMILY_ALIASES,
|
|
1848
|
+
...WEBKIT_BASED_BROWSERS
|
|
1849
|
+
]);
|
|
1850
|
+
function isEnvFileForAnotherTarget(file) {
|
|
1851
|
+
const parts = file.split('.').slice(2);
|
|
1852
|
+
if (1 === parts.length) return KNOWN_ENV_MODES.has(parts[0]) || KNOWN_ENV_BROWSERS.has(parts[0]);
|
|
1853
|
+
return 2 === parts.length && KNOWN_ENV_BROWSERS.has(parts[0]) && KNOWN_ENV_MODES.has(parts[1]);
|
|
1854
|
+
}
|
|
1768
1855
|
const SECRET_SEGMENTS = new Set([
|
|
1769
1856
|
'SECRET',
|
|
1770
1857
|
'TOKEN',
|
|
@@ -1807,17 +1894,6 @@ class EnvPlugin {
|
|
|
1807
1894
|
defaultsPath,
|
|
1808
1895
|
fallbackDefaultsPath
|
|
1809
1896
|
]).apply(compiler);
|
|
1810
|
-
if (!envPath && projectPath) {
|
|
1811
|
-
let unmatchedEnvFiles = [];
|
|
1812
|
-
try {
|
|
1813
|
-
unmatchedEnvFiles = __rspack_external_node_fs_1b05aee1.readdirSync(projectPath).filter((file)=>file.startsWith('.env') && '.env.defaults' !== file && '.env.example' !== file).sort();
|
|
1814
|
-
} catch {}
|
|
1815
|
-
if (unmatchedEnvFiles.length > 0) compiler.hooks.thisCompilation.tap('env:warn-unmatched', (compilation)=>{
|
|
1816
|
-
const warn = new WebpackError(envNoMatchingFile(String(this.browser), String(mode), unmatchedEnvFiles, envFiles));
|
|
1817
|
-
warn.name = 'EnvNoMatchingFile';
|
|
1818
|
-
compilation.warnings.push(warn);
|
|
1819
|
-
});
|
|
1820
|
-
}
|
|
1821
1897
|
const envVars = envPath ? __rspack_external_dotenv.parse(__rspack_external_node_fs_1b05aee1.readFileSync(envPath)) : {};
|
|
1822
1898
|
const readDefaults = (filePath)=>filePath && __rspack_external_node_fs_1b05aee1.existsSync(filePath) ? __rspack_external_dotenv.parse(__rspack_external_node_fs_1b05aee1.readFileSync(filePath)) : {};
|
|
1823
1899
|
const defaultsVars = {
|
|
@@ -1831,6 +1907,23 @@ class EnvPlugin {
|
|
|
1831
1907
|
...envVars,
|
|
1832
1908
|
...systemEnv
|
|
1833
1909
|
};
|
|
1910
|
+
if (!envPath && projectPath) {
|
|
1911
|
+
let presentEnvFiles = [];
|
|
1912
|
+
try {
|
|
1913
|
+
presentEnvFiles = __rspack_external_node_fs_1b05aee1.readdirSync(projectPath).filter((file)=>file.startsWith('.env') && '.env.defaults' !== file && '.env.example' !== file).sort();
|
|
1914
|
+
} catch {}
|
|
1915
|
+
const ignoredEnvFiles = presentEnvFiles.filter(isEnvFileForAnotherTarget);
|
|
1916
|
+
const unmatchedEnvFiles = presentEnvFiles.filter((file)=>!isEnvFileForAnotherTarget(file));
|
|
1917
|
+
if (ignoredEnvFiles.length > 0 && isDebug()) debugLine(envIgnoredFiles(ignoredEnvFiles, String(mode)));
|
|
1918
|
+
if (unmatchedEnvFiles.length > 0) {
|
|
1919
|
+
const publicValuesDefined = Object.keys(combinedVars).some((key)=>key.startsWith('EXTENSION_PUBLIC_') && '' !== String(combinedVars[key] ?? ''));
|
|
1920
|
+
compiler.hooks.thisCompilation.tap('env:warn-unmatched', (compilation)=>{
|
|
1921
|
+
const warn = new WebpackError(envNoMatchingFile(String(this.browser), String(mode), unmatchedEnvFiles, envFiles, publicValuesDefined));
|
|
1922
|
+
warn.name = 'EnvNoMatchingFile';
|
|
1923
|
+
compilation.warnings.push(warn);
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1834
1927
|
if ('production' === mode) {
|
|
1835
1928
|
const secretLooking = Object.keys(combinedVars).filter((key)=>key.startsWith('EXTENSION_PUBLIC_')).filter((key)=>'' !== String(combinedVars[key] ?? '')).filter(looksLikeSecretName).sort();
|
|
1836
1929
|
if (secretLooking.length > 0) compiler.hooks.thisCompilation.tap('env:warn-public-secret', (compilation)=>{
|
|
@@ -1926,4 +2019,4 @@ function buildTemplateVars(combinedVars, browser, mode) {
|
|
|
1926
2019
|
vars.EXTENSION_PUBLIC_MODE = modeValue;
|
|
1927
2020
|
return vars;
|
|
1928
2021
|
}
|
|
1929
|
-
export { DevSessionRestartScheduler, EnvPlugin, OPTIONS_HTML_FEATURE, applyIndependentHtmlSurfaces, bindDevSessionRestart, boring, buildCanonicalManifestWithOverrides, cleanDistRemovedSummary, cleanDistSkippedNotFound, cleanDistStarting, collectRootAbsoluteRefs, contentScriptEntryDroppedForBrowser, dropWebkitUnsupportedKeys, externalAssetOutputPath, fatalManifestShapeFixed, geckoActionUnsupportedOnMv2, geckoSidePanelUnsupported, getCurrentManifestContent, getManifestContent, getOriginalManifestContent, hasMv2SandboxPolicy, hasMv3StringPolicy, iconOutputPath, importMetaUrlForEmitPath, invalidThemeValue, isCompilerRestarting, isFolder, isFromFilepathList, isHollowContentScript, isManifestAddress, isWebkitUnsupportedPermission, legacyManifestPathWarning, manifestDepsTracked, manifestEmitSuccess, manifestFieldMistyped, manifestFilesInTurnedOffPublic, manifestIncludeSummary, manifestInvalidError, manifestLegacyWarningsSummary, manifestOverridesSummary, manifestVersionLostForBrowser, missingGeckoDataCollectionPermissions, mv2ActionFoldedIntoBrowserAction, mv2SandboxPolicyDropped, mv3BackgroundPageUnsupported, mv3BrowserActionFoldedIntoAction, mv3StringPolicyRewritten, normalizeManifestOutputPath, omitWebkitDroppedEntries, pageActionDropReason, pageActionDroppedForBrowserAction, pageActionNotSupportedByBrowser, projectConfigChangedRestartRequired, requestDevSessionRestart, resolveRootAbsoluteRef, safariBookmarksUnsupported, safariDownloadsUnsupported, safariHistoryUnsupported, safariIdentityUnsupported, safariIdleUnsupported, safariManagementUnsupported, safariMemberUnsupported, safariNotificationsUnsupported, safariOffscreenUnsupported, safariOmniboxUnsupported, safariSidePanelUnsupported, safariTabGroupsUnsupported, safariUserScriptsUnsupported, serverRestartRequiredFromManifestError, setCurrentManifestContent, setOriginalManifestContent, shouldFoldActionIntoBrowserAction, shouldFoldBrowserActionIntoAction, sidebarFoldTarget, sidebarKeyTranslatedForBrowser, themeIconOutputPath, themeImageOutputPath, themeNotSupportedByBrowser, toJsStringLiteral, unbindDevSessionRestart, unixify, vendorPrefixedKeyDropped, zipPackagingSkipped };
|
|
2022
|
+
export { DevSessionRestartScheduler, EnvPlugin, OPTIONS_HTML_FEATURE, applyIndependentHtmlSurfaces, bindDevSessionRestart, boring, buildCanonicalManifestWithOverrides, canAutoRestartDevSession, cleanDistRemovedSummary, cleanDistSkippedNotFound, cleanDistStarting, collectRootAbsoluteRefs, contentScriptEntryDroppedForBrowser, dropWebkitUnsupportedKeys, externalAssetOutputPath, fatalManifestShapeFixed, geckoActionUnsupportedOnMv2, geckoSidePanelUnsupported, getCurrentManifestContent, getManifestContent, getOriginalManifestContent, hasMv2SandboxPolicy, hasMv3StringPolicy, iconOutputPath, importMetaUrlForEmitPath, invalidThemeValue, isCompilerRestarting, isFolder, isFromFilepathList, isHollowContentScript, isManifestAddress, isWebkitUnsupportedPermission, legacyManifestPathWarning, manifestDepsTracked, manifestDescriptionMissingForStore, manifestDescriptionOverStoreLimit, manifestEmitSuccess, manifestFieldMistyped, manifestFilesInTurnedOffPublic, manifestIncludeSummary, manifestInvalidError, manifestLegacyWarningsSummary, manifestOverridesSummary, manifestVersionLostForBrowser, missingGeckoDataCollectionPermissions, mv2ActionFoldedIntoBrowserAction, mv2SandboxPolicyDropped, mv3BackgroundPageUnsupported, mv3BrowserActionFoldedIntoAction, mv3StringPolicyRewritten, nodeBuiltinHasNoStandIn, nodeBuiltinStandInHint, normalizeManifestOutputPath, omitWebkitDroppedEntries, pageActionDropReason, pageActionDroppedForBrowserAction, pageActionNotSupportedByBrowser, projectConfigChangedRestartRequired, requestDevSessionRestart, resolveRootAbsoluteRef, safariBookmarksUnsupported, safariDownloadsUnsupported, safariHistoryUnsupported, safariIdentityUnsupported, safariIdleUnsupported, safariManagementUnsupported, safariMemberUnsupported, safariNotificationsUnsupported, safariOffscreenUnsupported, safariOmniboxUnsupported, safariSidePanelUnsupported, safariTabGroupsUnsupported, safariUserScriptsUnsupported, serverRestartRequiredFromManifestError, setCurrentManifestContent, setOriginalManifestContent, shouldFoldActionIntoBrowserAction, shouldFoldBrowserActionIntoAction, sidebarFoldTarget, sidebarKeyTranslatedForBrowser, themeIconOutputPath, themeImageOutputPath, themeNotSupportedByBrowser, toJsStringLiteral, unbindDevSessionRestart, unixify, vendorPrefixedKeyDropped, zipPackagingSkipped };
|