extension-develop 4.1.19 → 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.
Files changed (63) hide show
  1. package/dist/832~0.mjs +26 -6
  2. package/dist/840~0.mjs +75 -6
  3. package/dist/950~0.mjs +3 -2
  4. package/dist/command-preview.d.ts +0 -8
  5. package/dist/dev-server/control-bridge/actions-file.d.ts +0 -1
  6. package/dist/dev-server/control-bridge/broker.d.ts +6 -4
  7. package/dist/dev-server/control-bridge/consumer-client.d.ts +0 -10
  8. package/dist/dev-server/control-bridge/contracts.d.ts +1 -43
  9. package/dist/dev-server/control-bridge/logs-file.d.ts +0 -1
  10. package/dist/dev-server/control-bridge/logs-query.d.ts +0 -16
  11. package/dist/dev-server/control-bridge/producer-runtime.d.ts +1 -2
  12. package/dist/dev-server~0.mjs +17 -5
  13. package/dist/extension-js-devtools/edge/manifest.json +0 -1
  14. package/dist/lib/build-summary.d.ts +0 -11
  15. package/dist/lib/constants.d.ts +1 -0
  16. package/dist/lib/ensure-develop-artifacts.d.ts +0 -7
  17. package/dist/lib/has-dependency.d.ts +0 -5
  18. package/dist/lib/merge-options.d.ts +0 -40
  19. package/dist/lib/messages.d.ts +1 -1
  20. package/dist/lib/project-manifest.d.ts +0 -1
  21. package/dist/lib/session-paths.d.ts +0 -22
  22. package/dist/plugin-browsers/index.d.ts +0 -35
  23. package/dist/plugin-browsers/safari-dev-plugin.d.ts +4 -0
  24. package/dist/plugin-compatibility/feature-polyfill.d.ts +0 -4
  25. package/dist/plugin-compilation/env.d.ts +0 -5
  26. package/dist/plugin-css/css-lib/dead-url-refs.d.ts +0 -6
  27. package/dist/plugin-css/css-lib/inline-content-script-css.d.ts +0 -15
  28. package/dist/plugin-css/css-lib/resolve-css-asset.d.ts +0 -8
  29. package/dist/plugin-perf-budgets/index.d.ts +0 -21
  30. package/dist/plugin-playwright/index.d.ts +3 -2
  31. package/dist/plugin-reload/classify-reload.d.ts +0 -4
  32. package/dist/plugin-reload/index.d.ts +1 -19
  33. package/dist/plugin-reload/reload-dispatch.d.ts +6 -3
  34. package/dist/plugin-reload/steps/setup-chunk-loading-target.d.ts +0 -13
  35. package/dist/plugin-special-folders/folder-extensions/types.d.ts +0 -13
  36. package/dist/plugin-special-folders/index.d.ts +0 -9
  37. package/dist/plugin-web-extension/feature-html/html-lib/utils.d.ts +0 -1
  38. package/dist/plugin-web-extension/feature-html/index.d.ts +0 -27
  39. package/dist/plugin-web-extension/feature-icons/index.d.ts +0 -12
  40. package/dist/plugin-web-extension/feature-json/index.d.ts +0 -9
  41. package/dist/plugin-web-extension/feature-locales/index.d.ts +0 -4
  42. package/dist/plugin-web-extension/feature-manifest/index.d.ts +0 -10
  43. package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-key-edge.d.ts +5 -0
  44. package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-keys-safari.d.ts +11 -0
  45. package/dist/plugin-web-extension/feature-manifest/manifest-lib/gecko-data-collection.d.ts +0 -12
  46. package/dist/plugin-web-extension/feature-manifest/manifest-lib/legacy-paths.d.ts +0 -13
  47. package/dist/plugin-web-extension/feature-manifest/manifest-lib/sanitize-fatal-shapes.d.ts +0 -36
  48. package/dist/plugin-web-extension/feature-manifest/messages.d.ts +19 -0
  49. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-injected-hosts.d.ts +0 -5
  50. package/dist/plugin-web-extension/feature-manifest/steps/patch-war.d.ts +0 -5
  51. package/dist/plugin-web-extension/feature-manifest/steps/patch-webkit-background.d.ts +2 -0
  52. package/dist/plugin-web-extension/feature-manifest/steps/update-manifest.d.ts +1 -0
  53. package/dist/plugin-web-extension/feature-manifest/steps/warn-gecko-unsupported-apis.d.ts +117 -13
  54. package/dist/plugin-web-extension/feature-scripts/index.d.ts +0 -10
  55. package/dist/plugin-web-extension/feature-scripts/steps/native-geturl-import-loader.d.ts +0 -3
  56. package/dist/plugin-web-extension/feature-web-resources/index.d.ts +0 -10
  57. package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/clean-matches.d.ts +0 -6
  58. package/dist/plugin-web-extension/shared/discover-devtools-panels.d.ts +0 -6
  59. package/dist/plugin-web-extension/shared/paths.d.ts +0 -1
  60. package/dist/rspack-config~0.mjs +666 -133
  61. package/dist/types.d.ts +0 -190
  62. package/package.json +1 -1
  63. package/runtime/process-shim.cjs +2 -0
@@ -1,13 +1,124 @@
1
1
  import { type Compilation, type Compiler } from '@rspack/core';
2
2
  import type { DevOptions, Manifest } from '../../../types.js';
3
- export type GeckoUnsupportedApi = 'sidePanel' | 'action';
3
+ import * as messages from '../messages.js';
4
+ declare const webkitUnsupportedApis: {
5
+ readonly sidePanel: typeof messages.safariSidePanelUnsupported;
6
+ readonly offscreen: typeof messages.safariOffscreenUnsupported;
7
+ readonly tabGroups: typeof messages.safariTabGroupsUnsupported;
8
+ readonly management: typeof messages.safariManagementUnsupported;
9
+ readonly userScripts: typeof messages.safariUserScriptsUnsupported;
10
+ readonly identity: typeof messages.safariIdentityUnsupported;
11
+ readonly notifications: typeof messages.safariNotificationsUnsupported;
12
+ readonly omnibox: typeof messages.safariOmniboxUnsupported;
13
+ readonly bookmarks: typeof messages.safariBookmarksUnsupported;
14
+ readonly history: typeof messages.safariHistoryUnsupported;
15
+ readonly downloads: typeof messages.safariDownloadsUnsupported;
16
+ readonly idle: typeof messages.safariIdleUnsupported;
17
+ };
18
+ type WebkitUnsupportedApi = keyof typeof webkitUnsupportedApis;
19
+ export type GeckoUnsupportedApi = WebkitUnsupportedApi | 'action';
20
+ export interface WebkitUnsupportedMember {
21
+ api: string;
22
+ member: string;
23
+ kind: 'call' | 'read';
24
+ }
25
+ export declare const webkitUnsupportedMembers: readonly [{
26
+ readonly api: 'action';
27
+ readonly member: 'getUserSettings';
28
+ readonly kind: 'call';
29
+ }, {
30
+ readonly api: 'action';
31
+ readonly member: 'getBadgeTextColor';
32
+ readonly kind: 'call';
33
+ }, {
34
+ readonly api: 'action';
35
+ readonly member: 'setBadgeTextColor';
36
+ readonly kind: 'call';
37
+ }, {
38
+ readonly api: 'action';
39
+ readonly member: 'onUserSettingsChanged';
40
+ readonly kind: 'read';
41
+ }, {
42
+ readonly api: 'storage';
43
+ readonly member: 'managed';
44
+ readonly kind: 'read';
45
+ }, {
46
+ readonly api: 'runtime';
47
+ readonly member: 'getContexts';
48
+ readonly kind: 'call';
49
+ }, {
50
+ readonly api: 'runtime';
51
+ readonly member: 'onSuspend';
52
+ readonly kind: 'read';
53
+ }, {
54
+ readonly api: 'runtime';
55
+ readonly member: 'onSuspendCanceled';
56
+ readonly kind: 'read';
57
+ }, {
58
+ readonly api: 'runtime';
59
+ readonly member: 'onUpdateAvailable';
60
+ readonly kind: 'read';
61
+ }, {
62
+ readonly api: 'declarativeNetRequest';
63
+ readonly member: 'getAvailableStaticRuleCount';
64
+ readonly kind: 'call';
65
+ }, {
66
+ readonly api: 'declarativeNetRequest';
67
+ readonly member: 'getDisabledRuleIds';
68
+ readonly kind: 'call';
69
+ }, {
70
+ readonly api: 'declarativeNetRequest';
71
+ readonly member: 'updateStaticRules';
72
+ readonly kind: 'call';
73
+ }, {
74
+ readonly api: 'declarativeNetRequest';
75
+ readonly member: 'testMatchOutcome';
76
+ readonly kind: 'call';
77
+ }, {
78
+ readonly api: 'declarativeNetRequest';
79
+ readonly member: 'onRuleMatchedDebug';
80
+ readonly kind: 'read';
81
+ }, {
82
+ readonly api: 'tabs';
83
+ readonly member: 'group';
84
+ readonly kind: 'call';
85
+ }, {
86
+ readonly api: 'tabs';
87
+ readonly member: 'ungroup';
88
+ readonly kind: 'call';
89
+ }, {
90
+ readonly api: 'webNavigation';
91
+ readonly member: 'onCreatedNavigationTarget';
92
+ readonly kind: 'read';
93
+ }, {
94
+ readonly api: 'webNavigation';
95
+ readonly member: 'onHistoryStateUpdated';
96
+ readonly kind: 'read';
97
+ }, {
98
+ readonly api: 'webNavigation';
99
+ readonly member: 'onReferenceFragmentUpdated';
100
+ readonly kind: 'read';
101
+ }, {
102
+ readonly api: 'webNavigation';
103
+ readonly member: 'onTabReplaced';
104
+ readonly kind: 'read';
105
+ }, {
106
+ readonly api: 'windows';
107
+ readonly member: 'onBoundsChanged';
108
+ readonly kind: 'read';
109
+ }];
110
+ export type WebkitMemberApi = (typeof webkitUnsupportedMembers)[number]['api'];
111
+ export type UnsupportedApiName = GeckoUnsupportedApi | WebkitMemberApi;
112
+ export type UnsupportedApiEngine = 'gecko' | 'webkit';
4
113
  export interface GeckoUnsupportedApiUse {
5
- api: GeckoUnsupportedApi;
114
+ api: UnsupportedApiName;
115
+ member?: string;
6
116
  file: string;
7
117
  emitted: boolean;
8
118
  }
9
- export declare function geckoUnsupportedApis(manifestVersion: unknown): GeckoUnsupportedApi[];
10
- export declare function usesGeckoUnsupportedApi(source: string, api: GeckoUnsupportedApi): boolean;
119
+ export declare function geckoUnsupportedApis(manifestVersion: unknown, engine?: UnsupportedApiEngine): GeckoUnsupportedApi[];
120
+ export declare function usesGeckoUnsupportedApi(source: string, api: GeckoUnsupportedApi, engine?: UnsupportedApiEngine): boolean;
121
+ export declare function usesWebkitUnsupportedMember(source: string, entry: WebkitUnsupportedMember): boolean;
11
122
  interface ScannableModule {
12
123
  resource?: string;
13
124
  modules?: Iterable<ScannableModule>;
@@ -28,13 +139,6 @@ export interface ScannableCompilation {
28
139
  getModuleChunksIterable(module: ScannableModule): Iterable<ScannableChunk>;
29
140
  };
30
141
  }
31
- /**
32
- * Finds project source that reads a Chromium-only API and still ships in the
33
- * built Gecko bundle. The source scan names the file, the emitted-asset check
34
- * clears a call the bundler compiled out behind a build-time browser branch,
35
- * and an emitted script nobody explains is reported under its own name so
36
- * nothing addons-linter would flag goes unmentioned.
37
- */
38
- export declare function findGeckoUnsupportedApiUses(compilation: ScannableCompilation, manifestVersion: unknown): GeckoUnsupportedApiUse[];
39
- export declare function reportGeckoUnsupportedApis(compilation: Compilation, compiler: Compiler, browser: DevOptions['browser'], manifest: Manifest, projectPath: string): void;
142
+ export declare function findGeckoUnsupportedApiUses(compilation: ScannableCompilation, manifestVersion: unknown, engine?: UnsupportedApiEngine, requireEmittedEvidence?: boolean): GeckoUnsupportedApiUse[];
143
+ export declare function reportGeckoUnsupportedApis(compilation: Compilation, compiler: Compiler, browser: DevOptions['browser'], manifest: Manifest, projectPath: string, reported?: Set<string>): void;
40
144
  export {};
@@ -1,15 +1,5 @@
1
1
  import type { Compiler } from '@rspack/core';
2
2
  import type { DevOptions, FilepathList, PluginInterface } from '../../types.js';
3
- /**
4
- * Feature-scripts is the official scripts pipeline:
5
- * - content scripts use the inline lifecycle runtime only
6
- * - targeted reinjection stays browser-owned
7
- * - background/manifest changes stay on the full-reload path
8
- *
9
- * The dev-only reload/HMR strategy is NOT part of this feature. It lives
10
- * in plugin-reload, which registers after this plugin and decorates the
11
- * entries AddScripts declares here.
12
- */
13
3
  export declare class ScriptsPlugin {
14
4
  readonly manifestPath: string;
15
5
  readonly includeList?: FilepathList;
@@ -1,7 +1,4 @@
1
1
  export declare function annotateGetURLDynamicImports(source: string): string;
2
- /** Loader entry: source-to-source, before the swc transform. The map that
3
- * arrived travels on: the annotation adds a comment inside a line, never a
4
- * line, so the line map of the loader before this one still holds. */
5
2
  export default function nativeGetURLImportLoader(this: {
6
3
  callback?: (error: Error | null, content: string, map?: unknown) => void;
7
4
  resourcePath?: string;
@@ -1,15 +1,5 @@
1
1
  import type { Compiler } from '@rspack/core';
2
2
  import type { FilepathList, PluginInterface } from '../../types.js';
3
- /**
4
- * ResourcesPlugin collects content script imports for manifest WAR patching.
5
- * Actual manifest patching is done by ManifestPlugin (PatchWAR step) so all
6
- * manifest writes stay consolidated in feature-manifest.
7
- *
8
- * Feature supported:
9
- *
10
- * - Collects assets imported from content_scripts files.
11
- * - WAR patching uses this data (via getSharedFor) in manifest:patch-war.
12
- */
13
3
  export declare class WebResourcesPlugin {
14
4
  readonly manifestPath: string;
15
5
  readonly includeList?: FilepathList;
@@ -1,7 +1 @@
1
- /**
2
- * From the docs at https://developer.chrome.com/docs/extensions/reference/manifest/web-accessible-resources#manifest_declaration
3
- * > Google Chrome emits an "Invalid match pattern" error if the pattern has a path other than '/*'.
4
- *
5
- * We need to ensure that paths are cleaned up from the matches to avoid this error.
6
- */
7
1
  export declare function cleanMatches(matches: string[]): string[];
@@ -1,8 +1,2 @@
1
1
  import type { DevOptions, FilepathList } from '../../types.js';
2
- /**
3
- * Statically discovers HTML pages referenced only through
4
- * chrome.devtools.panels.create in the devtools page's scripts, and returns
5
- * them as extra HTML entries keyed by their extension-root-relative path so
6
- * the emitted dist serves the exact URL Chrome will request.
7
- */
8
2
  export declare function discoverDevtoolsPanelPages(manifestPath: string, browser?: DevOptions['browser']): FilepathList;
@@ -3,6 +3,5 @@ export declare function isFromFilepathList(filePath: string, filepathList?: File
3
3
  export declare function getFilename(feature: string, filePath: string): string;
4
4
  export declare function unixify(filePath: string): string;
5
5
  export declare function resolveRootAbsoluteRef(ref: string, projectRoot: string, publicRoot?: string): string | undefined;
6
- /** Root-absolute refs in HTML (`src`/`href`) and CSS (`url(...)`). */
7
6
  export declare function collectRootAbsoluteRefs(source: string): Set<string>;
8
7
  export declare function isManifestAddress(value: unknown): boolean;