extension-develop 4.1.20 → 4.1.21
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 +24 -1
- package/dist/747~0.mjs +4 -2
- package/dist/832~0.mjs +1 -1
- package/dist/840~0.mjs +432 -20
- package/dist/950~0.mjs +15 -24
- package/dist/command-preview.d.ts +8 -0
- package/dist/dev-server/control-bridge/consumer-client.d.ts +10 -0
- package/dist/dev-server/control-bridge/contracts.d.ts +42 -0
- package/dist/dev-server/control-bridge/logs-query.d.ts +16 -0
- package/dist/dev-server~0.mjs +2 -0
- package/dist/lib/addon-lint.d.ts +4 -1
- package/dist/lib/build-summary.d.ts +11 -0
- package/dist/lib/chunk-dependency-provenance.d.ts +14 -0
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/manifest-utils.d.ts +2 -0
- package/dist/lib/messages.d.ts +3 -3
- package/dist/lib/package-manager.d.ts +2 -0
- package/dist/plugin-browsers/index.d.ts +28 -0
- package/dist/plugin-compilation/env.d.ts +2 -0
- package/dist/plugin-js-frameworks/js-frameworks-lib/messages.d.ts +1 -0
- package/dist/plugin-js-frameworks/js-tools/solid.d.ts +3 -0
- package/dist/plugin-js-frameworks/js-tools/typescript.d.ts +16 -0
- package/dist/plugin-perf-budgets/categorize.d.ts +2 -1
- package/dist/plugin-perf-budgets/index.d.ts +1 -1
- package/dist/plugin-reload/classify-reload.d.ts +4 -0
- package/dist/plugin-reload/index.d.ts +18 -0
- package/dist/plugin-special-folders/folder-extensions/types.d.ts +13 -0
- package/dist/plugin-web-extension/feature-manifest/messages.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/emitted-evidence.d.ts +22 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-background.d.ts +9 -0
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-web-resources.d.ts +7 -16
- package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults.d.ts +6 -2
- package/dist/plugin-web-extension/feature-manifest/steps/warn-gecko-unsupported-apis.d.ts +2 -13
- package/dist/plugin-web-extension/feature-scripts/messages.d.ts +5 -0
- package/dist/plugin-web-extension/feature-scripts/steps/warn-page-context-worker.d.ts +5 -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/unreachable-resources.d.ts +9 -0
- package/dist/rspack-config.d.ts +1 -1
- package/dist/rspack-config~0.mjs +430 -463
- package/dist/types.d.ts +190 -0
- package/package.json +1 -1
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import type { Manifest } from '../../../../types.js';
|
|
2
|
+
export declare const DEV_RUNTIME_RESOURCES: string[];
|
|
2
3
|
declare function patchWebResourcesV2(manifest: Manifest): string[];
|
|
3
|
-
declare function patchWebResourcesV3(manifest: Manifest):
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} |
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} & {
|
|
10
|
-
extension_ids: string[];
|
|
11
|
-
matches?: string[] | undefined;
|
|
12
|
-
}) | (string & {
|
|
13
|
-
resources: string[];
|
|
14
|
-
use_dynamic_url?: boolean | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
matches: string[];
|
|
17
|
-
extension_ids?: string[] | undefined;
|
|
18
|
-
}))[];
|
|
4
|
+
declare function patchWebResourcesV3(manifest: Manifest): unknown[];
|
|
5
|
+
export declare function patchWebResources(manifest: Manifest): {
|
|
6
|
+
web_accessible_resources?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
web_accessible_resources: Manifest['web_accessible_resources'];
|
|
9
|
+
};
|
|
19
10
|
export { patchWebResourcesV2, patchWebResourcesV3 };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type Compiler } from '@rspack/core';
|
|
2
2
|
import type { PluginInterface } from '../../../types.js';
|
|
3
|
-
|
|
3
|
+
import { type EmittedCompilation, type EmittedModule } from './apply-dev-defaults-lib/emitted-evidence.js';
|
|
4
|
+
export interface PermissionScanCompilation extends EmittedCompilation {
|
|
5
|
+
modules: Iterable<EmittedModule>;
|
|
6
|
+
}
|
|
7
|
+
export declare function findInjectedOnlyPermissionUses(compilation: PermissionScanCompilation, declared: Set<string>, injected: readonly string[]): Map<string, string>;
|
|
4
8
|
export declare class ApplyDevDefaults {
|
|
5
9
|
private readonly manifestPath?;
|
|
6
10
|
private readonly browser;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Compilation, type Compiler } from '@rspack/core';
|
|
2
2
|
import type { DevOptions, Manifest } from '../../../types.js';
|
|
3
3
|
import * as messages from '../messages.js';
|
|
4
|
+
import { type EmittedCompilation } from './apply-dev-defaults-lib/emitted-evidence.js';
|
|
4
5
|
declare const webkitUnsupportedApis: {
|
|
5
6
|
readonly sidePanel: typeof messages.safariSidePanelUnsupported;
|
|
6
7
|
readonly offscreen: typeof messages.safariOffscreenUnsupported;
|
|
@@ -124,20 +125,8 @@ interface ScannableModule {
|
|
|
124
125
|
modules?: Iterable<ScannableModule>;
|
|
125
126
|
rootModule?: ScannableModule;
|
|
126
127
|
}
|
|
127
|
-
interface
|
|
128
|
-
files?: Iterable<string>;
|
|
129
|
-
}
|
|
130
|
-
export interface ScannableCompilation {
|
|
128
|
+
export interface ScannableCompilation extends EmittedCompilation {
|
|
131
129
|
modules: Iterable<ScannableModule>;
|
|
132
|
-
getAssets?: () => readonly {
|
|
133
|
-
name: string;
|
|
134
|
-
source: {
|
|
135
|
-
source(): string | Buffer;
|
|
136
|
-
};
|
|
137
|
-
}[];
|
|
138
|
-
chunkGraph?: {
|
|
139
|
-
getModuleChunksIterable(module: ScannableModule): Iterable<ScannableChunk>;
|
|
140
|
-
};
|
|
141
130
|
}
|
|
142
131
|
export declare function findGeckoUnsupportedApiUses(compilation: ScannableCompilation, manifestVersion: unknown, engine?: UnsupportedApiEngine, requireEmittedEvidence?: boolean): GeckoUnsupportedApiUse[];
|
|
143
132
|
export declare function reportGeckoUnsupportedApis(compilation: Compilation, compiler: Compiler, browser: DevOptions['browser'], manifest: Manifest, projectPath: string, reported?: Set<string>): void;
|
|
@@ -20,6 +20,11 @@ declare const SPLIT_ENTRY_SURFACES: {
|
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
export declare function entrySplitAcrossInitialFiles(entryName: string, surface: keyof typeof SPLIT_ENTRY_SURFACES, ownFile: string, extraFiles: string[]): string;
|
|
23
|
+
declare const PAGE_CONTEXT_SURFACES: {
|
|
24
|
+
readonly content_script: 'a content script';
|
|
25
|
+
readonly script: 'an injected script';
|
|
26
|
+
};
|
|
27
|
+
export declare function workerStartedFromPageContext(assetName: string, surface: keyof typeof PAGE_CONTEXT_SURFACES): string;
|
|
23
28
|
export declare function fetchedFileDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
|
|
24
29
|
export declare function getURLDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
|
|
25
30
|
export declare function runtimeSetSurfaceDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
|
|
@@ -6,4 +6,5 @@ export declare const EMITTED_ASSET_REF_PATTERN: RegExp;
|
|
|
6
6
|
export declare function listEmittedAssetNames(compilation: Compilation): string[];
|
|
7
7
|
export declare function collectReferencedRuntimePayloads(source: string, emittedAssetNames: string[]): string[];
|
|
8
8
|
export declare function collectContentScriptAsyncChunkFiles(compilation: Compilation): Record<string, string[]>;
|
|
9
|
+
export declare function collectPageContextEntryFiles(compilation: Compilation): Record<string, string[]>;
|
|
9
10
|
export declare function collectContentScriptEntryImports(compilation: Compilation, includeList?: FilepathList): Record<string, string[]>;
|
|
@@ -6,5 +6,6 @@ export declare function warFieldError(filePath: string, opts?: {
|
|
|
6
6
|
}): string;
|
|
7
7
|
export declare function warStringEntryInMv3(entry: string): string;
|
|
8
8
|
export declare function warInvalidMatchPattern(pattern: string): string;
|
|
9
|
+
export declare function warUnreachableResource(resource: string, entryName: string): string;
|
|
9
10
|
export declare function entryImportsSummary(entryCount: number, totalResources: number): string;
|
|
10
11
|
export declare function warPatchedSummary(v3Groups: number, v3ResourcesTotal: number, v2Resources: number): string;
|
package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/unreachable-resources.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function normalizeResourcePath(value: string): string;
|
|
2
|
+
export declare function isResourceCovered(declared: readonly string[], candidate: string): boolean;
|
|
3
|
+
export declare const GET_URL_LITERAL_PATTERN: RegExp;
|
|
4
|
+
export declare function collectGetUrlLiterals(source: string): string[];
|
|
5
|
+
export declare function findUnreachableRuntimeResources(options: {
|
|
6
|
+
source: string;
|
|
7
|
+
emittedAssetNames: readonly string[];
|
|
8
|
+
declaredResources: readonly string[];
|
|
9
|
+
}): string[];
|
package/dist/rspack-config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Configuration } from '@rspack/core';
|
|
2
2
|
import type { ProjectStructure } from './lib/project.js';
|
|
3
3
|
import type { WebpackConfigOptions } from './types.js';
|
|
4
4
|
export default function webpackConfig(projectStructure: ProjectStructure, devOptions: WebpackConfigOptions): Configuration;
|