extension-develop 4.1.18 → 4.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/672~0.mjs +70 -14
- package/dist/832~0.mjs +26 -6
- package/dist/840~0.mjs +75 -6
- package/dist/938~0.mjs +1 -1
- package/dist/950~0.mjs +3 -2
- package/dist/command-preview.d.ts +0 -8
- package/dist/dev-server/control-bridge/actions-file.d.ts +0 -1
- package/dist/dev-server/control-bridge/broker.d.ts +6 -4
- package/dist/dev-server/control-bridge/consumer-client.d.ts +0 -10
- package/dist/dev-server/control-bridge/contracts.d.ts +1 -43
- package/dist/dev-server/control-bridge/logs-file.d.ts +0 -1
- package/dist/dev-server/control-bridge/logs-query.d.ts +0 -16
- package/dist/dev-server/control-bridge/producer-runtime.d.ts +1 -2
- package/dist/dev-server/control-bridge/ws-control-server.d.ts +1 -0
- package/dist/dev-server~0.mjs +23 -6
- package/dist/extension-js-devtools/chrome/images/icon-128.png +0 -0
- package/dist/extension-js-devtools/chrome/images/icon-16.png +0 -0
- package/dist/extension-js-devtools/chrome/images/icon-32.png +0 -0
- package/dist/extension-js-devtools/chrome/images/icon-48.png +0 -0
- package/dist/extension-js-devtools/chrome/manifest.json +4 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.html +1 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.js +2 -20
- package/dist/extension-js-devtools/chromium/images/icon-128.png +0 -0
- package/dist/extension-js-devtools/chromium/images/icon-16.png +0 -0
- package/dist/extension-js-devtools/chromium/images/icon-32.png +0 -0
- package/dist/extension-js-devtools/chromium/images/icon-48.png +0 -0
- package/dist/extension-js-devtools/chromium/manifest.json +4 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.html +1 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.js +2 -20
- package/dist/extension-js-devtools/edge/images/icon-128.png +0 -0
- package/dist/extension-js-devtools/edge/images/icon-16.png +0 -0
- package/dist/extension-js-devtools/edge/images/icon-32.png +0 -0
- package/dist/extension-js-devtools/edge/images/icon-48.png +0 -0
- package/dist/extension-js-devtools/edge/manifest.json +4 -2
- package/dist/extension-js-devtools/edge/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/edge/pages/welcome.html +1 -1
- package/dist/extension-js-devtools/edge/pages/welcome.js +2 -20
- package/dist/extension-js-devtools/firefox/images/icon-128.png +0 -0
- package/dist/extension-js-devtools/firefox/images/icon-16.png +0 -0
- package/dist/extension-js-devtools/firefox/images/icon-32.png +0 -0
- package/dist/extension-js-devtools/firefox/images/icon-48.png +0 -0
- package/dist/extension-js-devtools/firefox/manifest.json +4 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.html +1 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.js +2 -20
- package/dist/lib/build-summary.d.ts +0 -11
- package/dist/lib/constants.d.ts +1 -0
- package/dist/lib/ensure-develop-artifacts.d.ts +0 -7
- package/dist/lib/has-dependency.d.ts +0 -5
- package/dist/lib/manifest-utils.d.ts +8 -0
- package/dist/lib/merge-options.d.ts +0 -40
- package/dist/lib/messages.d.ts +1 -1
- package/dist/lib/project-manifest.d.ts +0 -1
- package/dist/lib/session-paths.d.ts +0 -22
- package/dist/plugin-browsers/index.d.ts +0 -35
- package/dist/plugin-browsers/safari-dev-plugin.d.ts +4 -0
- package/dist/plugin-compatibility/feature-polyfill.d.ts +0 -4
- package/dist/plugin-compilation/env.d.ts +1 -5
- package/dist/plugin-css/css-lib/dead-url-refs.d.ts +0 -6
- package/dist/plugin-css/css-lib/inline-content-script-css.d.ts +0 -15
- package/dist/plugin-css/css-lib/resolve-css-asset.d.ts +0 -8
- package/dist/plugin-js-frameworks/js-tools/vue.d.ts +1 -0
- package/dist/plugin-perf-budgets/index.d.ts +0 -21
- package/dist/plugin-playwright/index.d.ts +3 -2
- package/dist/plugin-reload/classify-reload.d.ts +0 -4
- package/dist/plugin-reload/index.d.ts +1 -19
- package/dist/plugin-reload/reload-dispatch.d.ts +6 -3
- package/dist/plugin-reload/steps/setup-chunk-loading-target.d.ts +0 -13
- package/dist/plugin-special-folders/folder-extensions/types.d.ts +0 -13
- package/dist/plugin-special-folders/index.d.ts +0 -9
- package/dist/plugin-web-extension/feature-html/html-lib/utils.d.ts +0 -1
- package/dist/plugin-web-extension/feature-html/index.d.ts +0 -27
- package/dist/plugin-web-extension/feature-icons/index.d.ts +0 -12
- package/dist/plugin-web-extension/feature-json/index.d.ts +0 -9
- package/dist/plugin-web-extension/feature-locales/index.d.ts +0 -4
- package/dist/plugin-web-extension/feature-manifest/index.d.ts +0 -10
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-key-edge.d.ts +5 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-keys-safari.d.ts +11 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/gecko-data-collection.d.ts +0 -12
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/legacy-paths.d.ts +0 -13
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/sanitize-fatal-shapes.d.ts +0 -36
- package/dist/plugin-web-extension/feature-manifest/messages.d.ts +20 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-injected-hosts.d.ts +0 -5
- package/dist/plugin-web-extension/feature-manifest/steps/patch-war.d.ts +0 -5
- package/dist/plugin-web-extension/feature-manifest/steps/patch-webkit-background.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/steps/update-manifest.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/steps/warn-gecko-unsupported-apis.d.ts +117 -13
- package/dist/plugin-web-extension/feature-scripts/index.d.ts +0 -10
- package/dist/plugin-web-extension/feature-scripts/steps/native-geturl-import-loader.d.ts +0 -3
- package/dist/plugin-web-extension/feature-web-resources/index.d.ts +0 -10
- package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/clean-matches.d.ts +0 -6
- package/dist/plugin-web-extension/shared/discover-devtools-panels.d.ts +0 -6
- package/dist/plugin-web-extension/shared/paths.d.ts +0 -1
- package/dist/rspack-config~0.mjs +690 -139
- package/dist/types.d.ts +0 -190
- package/package.json +3 -2
- package/runtime/process-shim.cjs +2 -0
- package/dist/extension-js-devtools/chrome/images/logo.png +0 -0
- package/dist/extension-js-devtools/chrome/shared/framework.js +0 -1
- package/dist/extension-js-devtools/chromium/images/logo.png +0 -0
- package/dist/extension-js-devtools/chromium/shared/framework.js +0 -1
- package/dist/extension-js-devtools/edge/images/logo.png +0 -0
- package/dist/extension-js-devtools/edge/shared/framework.js +0 -1
- package/dist/extension-js-devtools/firefox/images/logo.png +0 -0
- package/dist/extension-js-devtools/firefox/shared/framework.js +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { LoaderContext as RspackLoaderContext, RspackPluginInstance } from '@rspack/core';
|
|
2
2
|
/**
|
|
3
|
-
* Firefox-only `theme_experiment` manifest key.
|
|
4
|
-
* Not present in `@types/chrome`; declared here so the manifest pipeline can
|
|
5
|
-
* read it type-safely instead of casting `manifest as any`.
|
|
6
3
|
* @see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme_experiment
|
|
7
4
|
*/
|
|
8
5
|
export interface ThemeExperiment {
|
|
@@ -34,9 +31,6 @@ export type PluginInterface = {
|
|
|
34
31
|
browser?: DevOptions['browser'];
|
|
35
32
|
includeList?: FilepathList;
|
|
36
33
|
transpilePackages?: string[];
|
|
37
|
-
/** True inside `extension dev`: the one axis that turns dev instrumentation
|
|
38
|
-
* (dev CSP, injected permissions, reload client, page HMR) on. A build in
|
|
39
|
-
* development mode is shippable and keeps the author's manifest. */
|
|
40
34
|
devSession?: boolean;
|
|
41
35
|
};
|
|
42
36
|
export interface LoaderInterface extends RspackLoaderContext<LoaderInterface> {
|
|
@@ -69,21 +63,8 @@ export type BrowserType = 'chrome' | 'edge' | 'firefox' | 'chromium' | 'brave' |
|
|
|
69
63
|
export interface BrowserOptionsBase {
|
|
70
64
|
noOpen?: boolean;
|
|
71
65
|
profile?: string | false;
|
|
72
|
-
/**
|
|
73
|
-
* Opt-in persistent managed profile for development.
|
|
74
|
-
* Defaults to false (ephemeral temp profiles are used).
|
|
75
|
-
*/
|
|
76
66
|
persistProfile?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Keep the managed profile and its changes across runs (persistent `dev`
|
|
79
|
-
* profile, skipped by cleanup). Seeded once when combined with
|
|
80
|
-
* `copyFromProfile`.
|
|
81
|
-
*/
|
|
82
67
|
keepProfileChanges?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Seed the managed profile as a copy of this profile directory on first
|
|
85
|
-
* creation.
|
|
86
|
-
*/
|
|
87
68
|
copyFromProfile?: string;
|
|
88
69
|
startingUrl?: string;
|
|
89
70
|
browser: BrowserType;
|
|
@@ -99,19 +80,11 @@ export interface GeckoOptions extends BrowserOptionsBase {
|
|
|
99
80
|
export interface SafariOptions extends BrowserOptionsBase {
|
|
100
81
|
browser: 'webkit-based';
|
|
101
82
|
safariBinary?: string;
|
|
102
|
-
/** Override the Safari app name (defaults to the manifest name). */
|
|
103
83
|
appName?: string;
|
|
104
|
-
/** User-owned bundle identifier (defaults to a dev.extensionjs.* id). */
|
|
105
84
|
bundleId?: string;
|
|
106
85
|
developmentTeam?: string;
|
|
107
|
-
/** Generate the macOS-only Xcode project (default true). */
|
|
108
86
|
macOsOnly?: boolean;
|
|
109
87
|
}
|
|
110
|
-
/**
|
|
111
|
-
* Safari identity/packaging options resolved by develop (CLI flags merged
|
|
112
|
-
* with extension.config.js `browser.safari`) and forwarded to the packager
|
|
113
|
-
* the CLI injects.
|
|
114
|
-
*/
|
|
115
88
|
export interface SafariPackagerOverrides {
|
|
116
89
|
appName?: string;
|
|
117
90
|
bundleId?: string;
|
|
@@ -119,15 +92,8 @@ export interface SafariPackagerOverrides {
|
|
|
119
92
|
macOsOnly?: boolean;
|
|
120
93
|
forceRegenerate?: boolean;
|
|
121
94
|
safariBinary?: string;
|
|
122
|
-
/** When set, overrides the factory `noOpen` for this packaging call. */
|
|
123
95
|
noOpen?: boolean;
|
|
124
96
|
}
|
|
125
|
-
/**
|
|
126
|
-
* The packaging callback develop calls once the Safari dist is on disk. The
|
|
127
|
-
* CLI injects `createSafariPackager()` from `extension/browsers`; a library
|
|
128
|
-
* caller must inject the same thing or no Safari app is produced at all.
|
|
129
|
-
* Returning a summary is optional so older packagers keep type-checking.
|
|
130
|
-
*/
|
|
131
97
|
export type SafariPackagerFn = (distPath: string, mode: 'full' | 'resync', overrides?: SafariPackagerOverrides) => Promise<SafariPackageSummary | void>;
|
|
132
98
|
export interface NonBinaryOptions extends BrowserOptionsBase {
|
|
133
99
|
browser: Exclude<BrowserType, 'chromium-based' | 'gecko-based' | 'webkit-based'>;
|
|
@@ -136,26 +102,10 @@ export interface DevOptions extends BrowserOptionsBase {
|
|
|
136
102
|
mode: 'development' | 'production' | 'none';
|
|
137
103
|
polyfill?: boolean;
|
|
138
104
|
port?: string | number | undefined;
|
|
139
|
-
/**
|
|
140
|
-
* Host to bind the dev server to.
|
|
141
|
-
* Use '0.0.0.0' for Docker/devcontainer environments.
|
|
142
|
-
* Defaults to '127.0.0.1'.
|
|
143
|
-
*/
|
|
144
105
|
host?: string;
|
|
145
|
-
/**
|
|
146
|
-
* Connectable host the browser (HMR client + control-bridge producer) dials,
|
|
147
|
-
* when it differs from the bind `host` (e.g. a remote/devcontainer). Defaults
|
|
148
|
-
* to the bind host, or 127.0.0.1 when bound to a wildcard like '0.0.0.0'.
|
|
149
|
-
*/
|
|
150
106
|
publicHost?: string;
|
|
151
107
|
install?: boolean;
|
|
152
|
-
/**
|
|
153
|
-
* Companion extensions (load-only) for this command.
|
|
154
|
-
*/
|
|
155
108
|
extensions?: CompanionExtensionsConfig;
|
|
156
|
-
/**
|
|
157
|
-
* Skip launching the browser (dev server still starts).
|
|
158
|
-
*/
|
|
159
109
|
noBrowser?: boolean;
|
|
160
110
|
preferences?: Record<string, unknown>;
|
|
161
111
|
browserFlags?: string[];
|
|
@@ -175,16 +125,7 @@ export interface DevOptions extends BrowserOptionsBase {
|
|
|
175
125
|
logUrl?: string;
|
|
176
126
|
logTab?: number | string;
|
|
177
127
|
hashContentScripts?: boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Open the agent-bridge control channel for the bounded act verbs
|
|
180
|
-
* (storage/reload/open). The CLI sets this from `--allow-control`.
|
|
181
|
-
*/
|
|
182
128
|
allowControl?: boolean;
|
|
183
|
-
/**
|
|
184
|
-
* Additionally allow the `eval` verb, which runs arbitrary code inside a
|
|
185
|
-
* context and writes a 0600 session token. Implies `allowControl`, since
|
|
186
|
-
* eval is strictly stronger. The CLI sets this from `--allow-eval`.
|
|
187
|
-
*/
|
|
188
129
|
allowEval?: boolean;
|
|
189
130
|
exitOnError?: boolean;
|
|
190
131
|
appName?: SafariOptions['appName'];
|
|
@@ -200,42 +141,17 @@ export interface BuildOptions {
|
|
|
200
141
|
geckoBinary?: GeckoOptions['geckoBinary'];
|
|
201
142
|
firefoxBinary?: GeckoOptions['geckoBinary'];
|
|
202
143
|
safariBinary?: SafariOptions['safariBinary'];
|
|
203
|
-
/**
|
|
204
|
-
* Companion extensions (load-only) for this command.
|
|
205
|
-
*/
|
|
206
144
|
extensions?: CompanionExtensionsConfig;
|
|
207
145
|
zipFilename?: string;
|
|
208
146
|
zip?: boolean;
|
|
209
147
|
zipSource?: boolean;
|
|
210
148
|
polyfill?: boolean;
|
|
211
149
|
silent?: boolean;
|
|
212
|
-
/**
|
|
213
|
-
* Run Mozilla's addons-linter over the emitted dist after a production
|
|
214
|
-
* build for a Gecko target and print its findings as build warnings.
|
|
215
|
-
* Needs `addons-linter` installed in the project. Defaults to `true`.
|
|
216
|
-
*/
|
|
217
150
|
addonLint?: boolean;
|
|
218
|
-
/**
|
|
219
|
-
* Override the bundler mode (and NODE_ENV). Defaults to 'production' to
|
|
220
|
-
* preserve historical behavior. Setting 'development' is useful for
|
|
221
|
-
* staging/QA dists that should still pass through the bundler's debug
|
|
222
|
-
* pipeline (sourcemaps, looser minification). Mirrors `vite build --mode`
|
|
223
|
-
* and `webpack --mode`. The artifact stays shippable: it carries the
|
|
224
|
-
* author's CSP and permissions, no reload client, and its zip holds no
|
|
225
|
-
* maps. Only `extension dev` turns the dev instrumentation on.
|
|
226
|
-
*/
|
|
227
151
|
mode?: 'development' | 'production' | 'none';
|
|
228
|
-
/**
|
|
229
|
-
* [internal] Auto-install project dependencies when missing.
|
|
230
|
-
*/
|
|
231
152
|
install?: boolean;
|
|
232
153
|
failOnWarning?: boolean;
|
|
233
154
|
exitOnError?: boolean;
|
|
234
|
-
/**
|
|
235
|
-
* Internal: the command stamped into ready.json/events.ndjson. Defaults to
|
|
236
|
-
* 'build'; `extension start` passes 'start' for its build phase so the
|
|
237
|
-
* receipt names the command the user actually ran.
|
|
238
|
-
*/
|
|
239
155
|
metadataCommand?: 'dev' | 'start' | 'preview' | 'build';
|
|
240
156
|
appName?: SafariOptions['appName'];
|
|
241
157
|
bundleId?: SafariOptions['bundleId'];
|
|
@@ -247,47 +163,17 @@ export interface BuildOptions {
|
|
|
247
163
|
export interface PreviewOptions extends BrowserOptionsBase {
|
|
248
164
|
mode: 'production';
|
|
249
165
|
outputPath?: string;
|
|
250
|
-
/**
|
|
251
|
-
* Internal metadata command override used by start->preview delegation.
|
|
252
|
-
* (Full command union so the WebpackConfigOptions intersection with
|
|
253
|
-
* BuildOptions.metadataCommand doesn't narrow the field.)
|
|
254
|
-
*/
|
|
255
166
|
metadataCommand?: 'dev' | 'start' | 'preview' | 'build';
|
|
256
167
|
chromiumBinary?: ChromiumOptions['chromiumBinary'];
|
|
257
168
|
geckoBinary?: GeckoOptions['geckoBinary'];
|
|
258
169
|
firefoxBinary?: GeckoOptions['geckoBinary'];
|
|
259
|
-
/**
|
|
260
|
-
* Companion extensions (load-only) for this command.
|
|
261
|
-
*/
|
|
262
170
|
extensions?: CompanionExtensionsConfig;
|
|
263
|
-
/**
|
|
264
|
-
* Skip launching the browser (no preview window).
|
|
265
|
-
*/
|
|
266
171
|
noBrowser?: boolean;
|
|
267
|
-
/**
|
|
268
|
-
* Internal auto-generated instance ID, not user-configurable.
|
|
269
|
-
*/
|
|
270
172
|
instanceId?: string;
|
|
271
|
-
/**
|
|
272
|
-
* Internal: true when the instance ID came from the user, not autogenerated.
|
|
273
|
-
*/
|
|
274
173
|
instanceExplicit?: boolean;
|
|
275
|
-
/**
|
|
276
|
-
* Dry run mode (no browser launch) for diagnostics.
|
|
277
|
-
*/
|
|
278
174
|
dryRun?: boolean;
|
|
279
175
|
port?: string | number;
|
|
280
|
-
/**
|
|
281
|
-
* Host to bind the dev server to.
|
|
282
|
-
* Use '0.0.0.0' for Docker/devcontainer environments.
|
|
283
|
-
* Defaults to '127.0.0.1'.
|
|
284
|
-
*/
|
|
285
176
|
host?: string;
|
|
286
|
-
/**
|
|
287
|
-
* Connectable host the browser (HMR client + control-bridge producer) dials,
|
|
288
|
-
* when it differs from the bind `host` (e.g. a remote/devcontainer). Defaults
|
|
289
|
-
* to the bind host, or 127.0.0.1 when bound to a wildcard like '0.0.0.0'.
|
|
290
|
-
*/
|
|
291
177
|
publicHost?: string;
|
|
292
178
|
logLevel?: 'off' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'all';
|
|
293
179
|
logContexts?: ('background' | 'content' | 'page' | 'sidebar' | 'popup' | 'options' | 'devtools')[];
|
|
@@ -303,30 +189,11 @@ export interface StartOptions extends BrowserOptionsBase {
|
|
|
303
189
|
chromiumBinary?: ChromiumOptions['chromiumBinary'];
|
|
304
190
|
geckoBinary?: GeckoOptions['geckoBinary'];
|
|
305
191
|
firefoxBinary?: GeckoOptions['geckoBinary'];
|
|
306
|
-
/**
|
|
307
|
-
* Companion extensions (load-only) for this command.
|
|
308
|
-
*/
|
|
309
192
|
extensions?: CompanionExtensionsConfig;
|
|
310
|
-
/**
|
|
311
|
-
* [internal] Auto-install project dependencies when missing.
|
|
312
|
-
*/
|
|
313
193
|
install?: boolean;
|
|
314
|
-
/**
|
|
315
|
-
* Skip launching the browser (build still runs).
|
|
316
|
-
*/
|
|
317
194
|
noBrowser?: boolean;
|
|
318
195
|
port?: string | number;
|
|
319
|
-
/**
|
|
320
|
-
* Host to bind the dev server to.
|
|
321
|
-
* Use '0.0.0.0' for Docker/devcontainer environments.
|
|
322
|
-
* Defaults to '127.0.0.1'.
|
|
323
|
-
*/
|
|
324
196
|
host?: string;
|
|
325
|
-
/**
|
|
326
|
-
* Connectable host the browser (HMR client + control-bridge producer) dials,
|
|
327
|
-
* when it differs from the bind `host` (e.g. a remote/devcontainer). Defaults
|
|
328
|
-
* to the bind host, or 127.0.0.1 when bound to a wildcard like '0.0.0.0'.
|
|
329
|
-
*/
|
|
330
197
|
publicHost?: string;
|
|
331
198
|
logLevel?: 'off' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'all';
|
|
332
199
|
logContexts?: ('background' | 'content' | 'page' | 'sidebar' | 'popup' | 'options' | 'devtools')[];
|
|
@@ -348,70 +215,27 @@ export interface BrowserConfig extends BrowserOptionsBase {
|
|
|
348
215
|
bundleId?: SafariOptions['bundleId'];
|
|
349
216
|
developmentTeam?: SafariOptions['developmentTeam'];
|
|
350
217
|
macOsOnly?: SafariOptions['macOsOnly'];
|
|
351
|
-
/**
|
|
352
|
-
* Companion extensions (load-only) scoped to a browser config.
|
|
353
|
-
* Useful for per-browser store URLs or local unpacked extensions.
|
|
354
|
-
*/
|
|
355
218
|
extensions?: CompanionExtensionsConfig;
|
|
356
219
|
}
|
|
357
220
|
export type OutputConfig = {
|
|
358
221
|
clean: boolean;
|
|
359
222
|
path: string;
|
|
360
|
-
/**
|
|
361
|
-
* Internal: the final dist path when `path` points at the staging
|
|
362
|
-
* directory a one-shot build is later promoted from. Metadata surfaces
|
|
363
|
-
* (ready.json) advertise this path, never the staging directory.
|
|
364
|
-
*/
|
|
365
223
|
finalPath?: string;
|
|
366
224
|
};
|
|
367
|
-
/**
|
|
368
|
-
* Per-category asset size budgets (bytes) for the perf-budgets plugin.
|
|
369
|
-
* Set at the top level of extension.config.js (weakest), under
|
|
370
|
-
* `browser.<vendor>.perfBudgets`, or per command via
|
|
371
|
-
* `commands.dev.perfBudgets` / `commands.build.perfBudgets` (strongest
|
|
372
|
-
* below a CLI flag).
|
|
373
|
-
*/
|
|
374
225
|
export type PerfBudgetsConfig = Partial<Record<import('./plugin-perf-budgets/index.js').AssetCategory, number>>;
|
|
375
226
|
export interface CommonWebpackOptions {
|
|
376
227
|
output: OutputConfig;
|
|
377
228
|
preferences?: Record<string, unknown>;
|
|
378
229
|
browserFlags?: string[];
|
|
379
230
|
excludeBrowserFlags?: string[];
|
|
380
|
-
/**
|
|
381
|
-
* Workspace/dependency packages that should be transpiled from source.
|
|
382
|
-
* Useful for monorepos where package exports point to TS/TSX files.
|
|
383
|
-
*/
|
|
384
231
|
transpilePackages?: string[];
|
|
385
232
|
perfBudgets?: PerfBudgetsConfig;
|
|
386
|
-
/**
|
|
387
|
-
* Companion extensions (load-only). Each entry must be an unpacked extension root
|
|
388
|
-
* containing a manifest.json. These are loaded alongside the user extension in
|
|
389
|
-
* dev/preview/start (and can also be applied to build for packaging scenarios).
|
|
390
|
-
*/
|
|
391
233
|
extensions?: CompanionExtensionsConfig;
|
|
392
|
-
/**
|
|
393
|
-
* Internal auto-generated instance ID, not user-configurable
|
|
394
|
-
*/
|
|
395
234
|
instanceId?: string;
|
|
396
|
-
/**
|
|
397
|
-
* Agent-bridge control channel. Injected by dev-server so the
|
|
398
|
-
* PlaywrightPlugin can advertise them in ready.json. Not user-configurable.
|
|
399
|
-
*/
|
|
400
235
|
controlPort?: number | null;
|
|
401
236
|
controlPath?: string;
|
|
402
237
|
logsPath?: string;
|
|
403
238
|
}
|
|
404
|
-
/**
|
|
405
|
-
* Canonical options type for webpack-config consumers.
|
|
406
|
-
* Accepts any of the command option fields (dev/preview/start/build),
|
|
407
|
-
* while requiring browser and mode, and the common output settings.
|
|
408
|
-
*
|
|
409
|
-
* `mode` is omitted from the partial intersection because PreviewOptions
|
|
410
|
-
* and StartOptions narrow it to `'production'`. Without the omit the
|
|
411
|
-
* outer override below becomes ineffective: TypeScript intersects the
|
|
412
|
-
* outer `'development' | 'production' | 'none'` with the inner
|
|
413
|
-
* `'production'` and the input is locked back to `'production'`.
|
|
414
|
-
*/
|
|
415
239
|
export type WebpackConfigOptions = CommonWebpackOptions & Omit<Partial<DevOptions & PreviewOptions & StartOptions & BuildOptions>, 'mode'> & {
|
|
416
240
|
browser: BrowserType;
|
|
417
241
|
mode: 'development' | 'production' | 'none';
|
|
@@ -453,22 +277,8 @@ export interface FileConfig {
|
|
|
453
277
|
perfBudgets?: PerfBudgetsConfig;
|
|
454
278
|
};
|
|
455
279
|
};
|
|
456
|
-
/**
|
|
457
|
-
* Companion extensions (load-only) applied to commands unless overridden per-command.
|
|
458
|
-
* This is merged into `commands.dev|start|preview|build` by the config loader.
|
|
459
|
-
*/
|
|
460
280
|
extensions?: CompanionExtensionsConfig;
|
|
461
|
-
/**
|
|
462
|
-
* Default transpile allowlist for all commands, the weakest layer.
|
|
463
|
-
* `browser.<vendor>.transpilePackages` overrides it, and per-command
|
|
464
|
-
* `commands.<name>.transpilePackages` overrides both.
|
|
465
|
-
*/
|
|
466
281
|
transpilePackages?: string[];
|
|
467
|
-
/**
|
|
468
|
-
* Default per-category asset budgets for all commands, the weakest layer.
|
|
469
|
-
* `browser.<vendor>.perfBudgets` overrides it, and per-command
|
|
470
|
-
* `commands.dev|build.perfBudgets` overrides both.
|
|
471
|
-
*/
|
|
472
282
|
perfBudgets?: PerfBudgetsConfig;
|
|
473
283
|
config?: (config: Configuration) => Configuration;
|
|
474
284
|
}
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"runtime"
|
|
44
44
|
],
|
|
45
45
|
"name": "extension-develop",
|
|
46
|
-
"version": "4.1.
|
|
46
|
+
"version": "4.1.20",
|
|
47
47
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
48
48
|
"author": {
|
|
49
49
|
"name": "Cezar Augusto",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@rspack/plugin-react-refresh": "2.0.2",
|
|
100
100
|
"@vue/compiler-sfc": "3.5.26",
|
|
101
101
|
"acorn": "^8.16.0",
|
|
102
|
-
"browser-extension-manifest-fields": "^
|
|
102
|
+
"browser-extension-manifest-fields": "^3.0.1",
|
|
103
103
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
104
104
|
"content-security-policy-parser": "^0.6.0",
|
|
105
105
|
"cross-spawn": "^7.0.6",
|
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
"@types/webextension-polyfill": "0.12.4",
|
|
144
144
|
"@types/ws": "^8.18.1",
|
|
145
145
|
"addons-linter": "10.12.0",
|
|
146
|
+
"fast-check": "^4.10.0",
|
|
146
147
|
"svelte": "5.55.9",
|
|
147
148
|
"tsup": "^8.5.1",
|
|
148
149
|
"typescript": "7.0.2",
|
package/runtime/process-shim.cjs
CHANGED
|
@@ -12,9 +12,11 @@ var noop = () => {}
|
|
|
12
12
|
|
|
13
13
|
function nextTick(callback) {
|
|
14
14
|
var args = Array.prototype.slice.call(arguments, 1)
|
|
15
|
+
|
|
15
16
|
var run = () => {
|
|
16
17
|
callback.apply(null, args)
|
|
17
18
|
}
|
|
19
|
+
|
|
18
20
|
if (typeof queueMicrotask === 'function') {
|
|
19
21
|
queueMicrotask(run)
|
|
20
22
|
} else {
|
|
Binary file
|