extension-develop 4.1.31 → 4.1.32

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 (88) hide show
  1. package/README.md +2 -0
  2. package/dist/105~0.mjs +1 -1
  3. package/dist/177~0.mjs +87 -19
  4. package/dist/273~0.mjs +13 -3
  5. package/dist/363~0.mjs +1874 -0
  6. package/dist/{896~0.mjs → 469~0.mjs} +116 -586
  7. package/dist/519~0.mjs +21 -8
  8. package/dist/616~0.mjs +1 -1
  9. package/dist/771~0.mjs +103 -0
  10. package/dist/832~0.mjs +229 -463
  11. package/dist/840~0.mjs +1189 -54
  12. package/dist/846~0.mjs +453 -0
  13. package/dist/852~0.mjs +8 -6
  14. package/dist/bridge.mjs +3 -2
  15. package/dist/command-preview.d.ts +1 -0
  16. package/dist/contract/codes.json +39 -29
  17. package/dist/contract/envelope.schema.json +16 -0
  18. package/dist/contract/golden.build.compile.json +20 -3
  19. package/dist/contract/golden.eval.csp-blocks-eval.page.json +15 -0
  20. package/dist/css-parse-guard-loader.mjs +3 -1
  21. package/dist/dead-css-url-loader.mjs +129 -13
  22. package/dist/dev-server/cleanup.d.ts +1 -1
  23. package/dist/dev-server/lifecycle-stream.d.ts +14 -3
  24. package/dist/dev-server/session-start-prune.d.ts +13 -0
  25. package/dist/dev-server~0.mjs +91 -14
  26. package/dist/ensure-hmr-for-scripts.js +4 -8
  27. package/dist/ensure-hmr-for-scripts.mjs +4 -8
  28. package/dist/extension-js-devtools/build-stamp.json +2 -2
  29. package/dist/extension-js-theme/build-stamp.json +2 -2
  30. package/dist/feature-scripts-content-script-wrapper.js +7 -4
  31. package/dist/feature-scripts-content-script-wrapper.mjs +7 -4
  32. package/dist/lib/build-summary.d.ts +4 -1
  33. package/dist/lib/coded-warnings.d.ts +3 -0
  34. package/dist/lib/compilation-diagnostics.d.ts +23 -0
  35. package/dist/lib/config-loader.d.ts +2 -2
  36. package/dist/lib/config-resolved-plugin.d.ts +3 -2
  37. package/dist/lib/corepack-registry.d.ts +3 -0
  38. package/dist/lib/diagnostic-code.d.ts +6 -0
  39. package/dist/lib/merge-options.d.ts +1 -0
  40. package/dist/lib/messages.d.ts +4 -1
  41. package/dist/lib/messaging.d.ts +12 -4
  42. package/dist/lib/output-files.d.ts +11 -0
  43. package/dist/lib/package-manager.d.ts +2 -2
  44. package/dist/module.mjs +2 -1
  45. package/dist/plugin-browsers/index.d.ts +1 -0
  46. package/dist/plugin-compatibility/compatibility-lib/free-browser-references.d.ts +9 -0
  47. package/dist/plugin-css/css-lib/dead-url-refs.d.ts +5 -1
  48. package/dist/plugin-css/css-lib/inline-content-script-css.d.ts +4 -2
  49. package/dist/plugin-css/css-lib/line-rewrite-source-map.d.ts +8 -0
  50. package/dist/plugin-css/dead-css-url-loader.d.ts +0 -2
  51. package/dist/plugin-css/public-css-url-loader.d.ts +8 -3
  52. package/dist/plugin-playwright/index.d.ts +9 -4
  53. package/dist/plugin-reload/classify-reload.d.ts +2 -0
  54. package/dist/plugin-reload/messages.d.ts +1 -0
  55. package/dist/plugin-reload/reload-lib/dev-content-scripts.d.ts +4 -0
  56. package/dist/plugin-reload/steps/prune-unreachable-chunks.d.ts +5 -0
  57. package/dist/plugin-special-folders/messages.d.ts +1 -1
  58. package/dist/plugin-special-folders/prune-removed-public-files.d.ts +7 -0
  59. package/dist/plugin-static-assets/check-namespace-imports.d.ts +4 -0
  60. package/dist/plugin-static-assets/static-assets-lib/asset-output-name.d.ts +8 -0
  61. package/dist/plugin-static-assets/static-assets-lib/messages.d.ts +1 -0
  62. package/dist/plugin-web-extension/feature-html/html-lib/utils.d.ts +2 -1
  63. package/dist/plugin-web-extension/feature-icons/messages.d.ts +1 -4
  64. package/dist/plugin-web-extension/feature-locales/get-locales.d.ts +2 -0
  65. package/dist/plugin-web-extension/feature-locales/messages.d.ts +3 -1
  66. package/dist/plugin-web-extension/feature-locales/validation.d.ts +1 -0
  67. package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-keys-safari.d.ts +1 -0
  68. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/content_scripts.d.ts +1 -0
  69. package/dist/plugin-web-extension/feature-manifest/messages.d.ts +1 -0
  70. package/dist/plugin-web-extension/feature-scripts/index.d.ts +2 -0
  71. package/dist/plugin-web-extension/feature-scripts/messages.d.ts +4 -3
  72. package/dist/plugin-web-extension/feature-scripts/scripts-lib/load-time-constants.d.ts +11 -0
  73. package/dist/plugin-web-extension/feature-scripts/steps/trace-runtime-loaded-files.d.ts +4 -0
  74. package/dist/plugin-web-extension/feature-scripts/steps/warn-missing-build-constants.d.ts +24 -0
  75. package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/declared-pages.d.ts +2 -0
  76. package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/resolve-war.d.ts +5 -0
  77. package/dist/plugin-web-extension/index.d.ts +1 -0
  78. package/dist/plugin-web-extension/shared/classic-concat.d.ts +1 -0
  79. package/dist/plugin-web-extension/shared/compilation-issues.d.ts +1 -1
  80. package/dist/preprocessor-passthrough-loader.mjs +3 -1
  81. package/dist/public-css-url-loader.mjs +1 -1
  82. package/dist/rspack-config~0.mjs +4925 -5885
  83. package/dist/stats-handler~0.mjs +12 -4
  84. package/dist/types.d.ts +19 -2
  85. package/dist/zip~0.mjs +20 -2
  86. package/package.json +4 -4
  87. package/dist/300~0.mjs +0 -394
  88. package/dist/747~0.mjs +0 -90
@@ -0,0 +1,3 @@
1
+ import type { ErrorCode } from './messaging.js';
2
+ export declare function recordCodedWarning(code: ErrorCode, text: string): void;
3
+ export declare function takeCodedWarnings(): string[];
@@ -0,0 +1,23 @@
1
+ import { type DiagnosticContext } from './diagnostic-code.js';
2
+ import type { Diagnostic, ErrorCode } from './messaging.js';
3
+ export interface CompilationLike {
4
+ errors?: unknown[];
5
+ warnings?: unknown[];
6
+ compiler?: {
7
+ context?: string;
8
+ };
9
+ entrypoints?: Map<string, {
10
+ chunks?: Iterable<unknown>;
11
+ }>;
12
+ chunkGraph?: {
13
+ getChunkModules?: (chunk: unknown) => Iterable<{
14
+ resource?: unknown;
15
+ }>;
16
+ };
17
+ }
18
+ export declare function toDiagnostic(issue: unknown, severity: Diagnostic['severity'], root?: string, context?: DiagnosticContext): Diagnostic;
19
+ export declare function compilationDiagnostics(input: unknown, root?: string): {
20
+ details: Diagnostic[];
21
+ truncated: boolean;
22
+ };
23
+ export declare function warningCodes(input: unknown): Map<string, ErrorCode>;
@@ -1,10 +1,10 @@
1
1
  import type { Configuration } from '@rspack/core';
2
- import type { BrowserConfig, DevOptions, FileConfig } from '../types.js';
2
+ import type { BrowserConfig, ConfigHookContext, DevOptions, FileConfig } from '../types.js';
3
3
  export declare function getPreloadedEnvKeys(): ReadonlySet<string>;
4
4
  export declare function findConfigFile(projectPath: string): string | undefined;
5
5
  export declare function projectConfigCandidatePaths(projectPath: string): string[];
6
6
  export declare function reportConfigLoadingErrorOnce(configPath: string, error: unknown): void;
7
- export declare function loadCustomConfig(projectPath: string): Promise<(config: Configuration) => Configuration>;
7
+ export declare function loadCustomConfig(projectPath: string, context: ConfigHookContext): Promise<(config: Configuration) => import("@rspack/core").RspackOptions>;
8
8
  export declare function loadConfigResolvedHook(projectPath: string): Promise<FileConfig['configResolved'] | undefined>;
9
9
  export declare function loadDefineTypes(projectPath: string): Promise<Record<string, string>>;
10
10
  export type ProjectConfigDefaults = Pick<FileConfig, 'extensions' | 'transpilePackages' | 'perfBudgets' | 'define' | 'folders'>;
@@ -1,10 +1,11 @@
1
1
  import type { Compiler } from '@rspack/core';
2
- import type { FileConfig } from '../types.js';
2
+ import type { ConfigHookContext, FileConfig } from '../types.js';
3
3
  export type ConfigResolvedHook = NonNullable<FileConfig['configResolved']>;
4
4
  export declare class ConfigResolvedPlugin {
5
5
  private readonly hook;
6
+ private readonly context;
6
7
  static readonly name: string;
7
8
  private applied;
8
- constructor(hook: ConfigResolvedHook);
9
+ constructor(hook: ConfigResolvedHook, context: ConfigHookContext);
9
10
  apply(compiler: Compiler): void;
10
11
  }
@@ -0,0 +1,3 @@
1
+ type Env = Record<string, string | undefined>;
2
+ export declare function corepackRegistryEnv(source: Env, projectDir: string): Record<string, string>;
3
+ export {};
@@ -0,0 +1,6 @@
1
+ import { type ErrorCode } from './messaging.js';
2
+ export interface DiagnosticContext {
3
+ contentScripts?: ReadonlySet<string>;
4
+ }
5
+ export declare function diagnosticName(issue: unknown): string | undefined;
6
+ export declare function diagnosticCode(issue: unknown, context?: DiagnosticContext): ErrorCode | undefined;
@@ -27,3 +27,4 @@ export declare const START_BUILD_DEFAULTS: {
27
27
  export declare const CONCAT_ARRAY_KEYS: Set<string>;
28
28
  export declare const DEEP_MERGE_OBJECT_KEYS: Set<string>;
29
29
  export declare function mergeOptionLayers<T extends object>(defaults: Partial<T>, ...layers: Array<object | null | undefined>): T;
30
+ export declare function falseProfileSource(merged: unknown, fromCommandLine: unknown): 'flag' | 'config' | undefined;
@@ -1,6 +1,7 @@
1
1
  import type { Stats } from '@rspack/core';
2
2
  import type { DevOptions, Manifest } from '../types.js';
3
3
  import { fmt } from './messaging.js';
4
+ import { type OutputFile } from './output-files.js';
4
5
  export { fmt };
5
6
  export declare function resolvedWorkspaceManifest(projectPath: string, manifestPath: string): string;
6
7
  export declare function declinedProjectRoot(projectManifestPath: string, manifestPath: string): string;
@@ -22,7 +23,8 @@ export declare function projectInstallInWorkspaceRoot(workspaceRoot: string): st
22
23
  export declare function projectInstallFallbackToNpm(pmName: string): string;
23
24
  export declare function projectInstallScriptsDisabled(pmName: string): string;
24
25
  export declare function anotherDevSessionActive(browser: string, pid: number, runId: string): string;
25
- export declare function buildAssetsTree(stats: Stats | undefined): string;
26
+ export declare function anotherDevSessionRefused(browser: string, pid: number, port: number | null): string;
27
+ export declare function buildAssetsTree(stats: Stats | undefined, outputFiles?: OutputFile[]): string;
26
28
  export declare function buildComplete(browser: DevOptions['browser'], distDisplayPath: string, totalBytes?: number, mode?: 'development' | 'production' | 'none'): string;
27
29
  export declare function operaBuildUnminified(): string;
28
30
  export declare function addonLintSummary(errorCount: number, warningCount: number, distDisplay: string): string;
@@ -62,6 +64,7 @@ export declare function treeWithSourceAndDistFiles(browser: DevOptions['browser'
62
64
  export declare function treeWithDistFilesBrowser(name: string, ext: string, browser: DevOptions['browser'], zipPath: string): string;
63
65
  export declare function treeWithSourceFiles(name: string, ext: string, browser: DevOptions['browser'], zipPath: string): string;
64
66
  export declare function writingTypeDefinitions(manifest: Manifest): string;
67
+ export declare function updatingTypeDefinitions(filePath: string): string;
65
68
  export declare function writingTypeDefinitionsError(error: unknown): string;
66
69
  export declare function downloadingText(url: string): string;
67
70
  export declare function unpackagingExtension(zipFilePath: string): string;
@@ -7,6 +7,7 @@ export declare function isMachineOutput(): boolean;
7
7
  export declare function humanLine(...parts: unknown[]): void;
8
8
  export declare function humanWarn(...parts: unknown[]): void;
9
9
  export declare function humanError(...parts: unknown[]): void;
10
+ export declare function debugLine(...parts: unknown[]): void;
10
11
  export declare const fmt: {
11
12
  heading: (title: string) => string;
12
13
  label: (key: string) => string;
@@ -91,7 +92,6 @@ export declare const CODES: {
91
92
  readonly E_CONFIG_LOAD: 'E_CONFIG_LOAD';
92
93
  readonly E_MANAGED_DEP_CONFLICT: 'E_MANAGED_DEP_CONFLICT';
93
94
  readonly E_TYPES_EMIT: 'E_TYPES_EMIT';
94
- readonly E_TSCONFIG_MISSING: 'E_TSCONFIG_MISSING';
95
95
  readonly E_OPTIONAL_DEP_UNRESOLVED: 'E_OPTIONAL_DEP_UNRESOLVED';
96
96
  readonly E_OPTIONAL_DEP_LOAD: 'E_OPTIONAL_DEP_LOAD';
97
97
  readonly E_OPTIONAL_DEP_UNKNOWN: 'E_OPTIONAL_DEP_UNKNOWN';
@@ -107,11 +107,9 @@ export declare const CODES: {
107
107
  readonly E_CSS_PARSE: 'E_CSS_PARSE';
108
108
  readonly E_CSS_PREPROCESSOR_MISSING: 'E_CSS_PREPROCESSOR_MISSING';
109
109
  readonly E_CSS_DEAD_REF: 'E_CSS_DEAD_REF';
110
- readonly E_INTEGRATION_INSTALL: 'E_INTEGRATION_INSTALL';
111
110
  readonly E_POLYFILL_NOT_FOUND: 'E_POLYFILL_NOT_FOUND';
112
111
  readonly E_LOCALES_LAYOUT: 'E_LOCALES_LAYOUT';
113
112
  readonly E_WAR_INVALID: 'E_WAR_INVALID';
114
- readonly E_MATCH_PATTERN_INVALID: 'E_MATCH_PATTERN_INVALID';
115
113
  readonly E_BACKGROUND_REQUIRED: 'E_BACKGROUND_REQUIRED';
116
114
  readonly E_CONTENT_SCRIPT_SYNTAX: 'E_CONTENT_SCRIPT_SYNTAX';
117
115
  readonly E_NO_ENTRYPOINTS: 'E_NO_ENTRYPOINTS';
@@ -130,7 +128,6 @@ export declare const CODES: {
130
128
  readonly E_BROWSER_START_TIMEOUT: 'E_BROWSER_START_TIMEOUT';
131
129
  readonly E_LAUNCH_SKIPPED_COMPILE_ERRORS: 'E_LAUNCH_SKIPPED_COMPILE_ERRORS';
132
130
  readonly E_INSTANCE_AMBIGUOUS: 'E_INSTANCE_AMBIGUOUS';
133
- readonly E_WSL_INTEROP: 'E_WSL_INTEROP';
134
131
  readonly E_EXTENSION_LOAD_REFUSED: 'E_EXTENSION_LOAD_REFUSED';
135
132
  readonly E_ADDON_INSTALL: 'E_ADDON_INSTALL';
136
133
  readonly E_BROWSER_CONNECT: 'E_BROWSER_CONNECT';
@@ -142,6 +139,7 @@ export declare const CODES: {
142
139
  readonly E_RDP_PROTOCOL: 'E_RDP_PROTOCOL';
143
140
  readonly E_PORT_IN_USE: 'E_PORT_IN_USE';
144
141
  readonly E_SESSION_STOPPED: 'E_SESSION_STOPPED';
142
+ readonly E_SESSION_EXISTS: 'E_SESSION_EXISTS';
145
143
  readonly E_LOGS_STREAM_GAP: 'E_LOGS_STREAM_GAP';
146
144
  readonly E_BROWSER_INSTALL_PRIVILEGE: 'E_BROWSER_INSTALL_PRIVILEGE';
147
145
  readonly E_UNINSTALL_NOOP: 'E_UNINSTALL_NOOP';
@@ -153,6 +151,15 @@ export interface EnvelopeErrorRefs {
153
151
  path?: string;
154
152
  version?: string;
155
153
  }
154
+ export interface Diagnostic {
155
+ code?: ErrorCode;
156
+ message: string;
157
+ file?: string;
158
+ line?: number;
159
+ column?: number;
160
+ severity: 'error' | 'warning';
161
+ name?: string;
162
+ }
156
163
  export interface EnvelopeError {
157
164
  code: ErrorCode;
158
165
  message: string;
@@ -160,6 +167,7 @@ export interface EnvelopeError {
160
167
  engine?: string;
161
168
  hint?: string;
162
169
  refs?: EnvelopeErrorRefs;
170
+ details?: Diagnostic[];
163
171
  }
164
172
  export interface Envelope<T = unknown> {
165
173
  schema: typeof ENVELOPE_SCHEMA;
@@ -0,0 +1,11 @@
1
+ export interface OutputFile {
2
+ name: string;
3
+ size: number;
4
+ }
5
+ export interface FoldedOutputFiles {
6
+ count: number;
7
+ bytes: number;
8
+ sourceMapsOnly: boolean;
9
+ }
10
+ export declare function listOutputFiles(outputPath: string): OutputFile[];
11
+ export declare function foldOutputFiles(files: OutputFile[], listedNames: Iterable<string>): FoldedOutputFiles;
@@ -1,4 +1,4 @@
1
- import { type ChildProcess } from 'node:child_process';
1
+ import { type ChildProcess, type StdioOptions } from 'node:child_process';
2
2
  import { buildExecEnv } from 'prefers-yarn';
3
3
  export { buildExecEnv };
4
4
  import type { SUPPORTED_PACKAGE_MANAGERS } from './constants.js';
@@ -11,7 +11,7 @@ export type PackageManagerResolution = {
11
11
  };
12
12
  type ExecOptions = {
13
13
  cwd?: string;
14
- stdio?: 'inherit' | 'ignore' | 'pipe';
14
+ stdio?: StdioOptions;
15
15
  env?: Record<string, string>;
16
16
  };
17
17
  export declare function resolvePackageManager(opts?: {
package/dist/module.mjs CHANGED
@@ -1,3 +1,4 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
2
  export { BuildEmitter, extensionBuild, extensionDev } from "./840~0.mjs";
3
- export { extensionPreview, loadCommandConfig, loadProjectConfigDefaults } from "./832~0.mjs";
3
+ export { extensionPreview } from "./832~0.mjs";
4
+ export { loadCommandConfig, loadProjectConfigDefaults } from "./846~0.mjs";
@@ -28,6 +28,7 @@ export interface BrowserLaunchOptions {
28
28
  enableDevtools?: boolean;
29
29
  noOpen?: boolean;
30
30
  profile?: string | false;
31
+ profileSource?: 'flag' | 'config';
31
32
  persistProfile?: boolean;
32
33
  keepProfileChanges?: boolean;
33
34
  copyFromProfile?: string;
@@ -1,2 +1,11 @@
1
+ export interface AstNode {
2
+ type: string;
3
+ [key: string]: unknown;
4
+ }
5
+ export declare function isNode(value: unknown): value is AstNode;
6
+ export declare function node(value: unknown): AstNode | undefined;
7
+ export declare function list(value: unknown): AstNode[];
8
+ export declare function parse(source: string): AstNode | undefined;
9
+ export declare function children(value: AstNode): AstNode[];
1
10
  export declare function mentionsBrowserName(source: string): boolean;
2
11
  export declare function referencesBrowserGlobal(source: string): boolean;
@@ -4,5 +4,9 @@ export interface DeadUrlRefContext {
4
4
  roots: string[];
5
5
  }
6
6
  export declare function isDeadCssUrlRef(rawRequest: string, { issuerDir, roots }: DeadUrlRefContext): boolean;
7
- export declare function replaceCssUrlRefs(source: string, replacer: (request: string) => string | undefined): string;
7
+ export declare function publicOwnedOutputName(absolutePath: string, publicDir: string | undefined): string | undefined;
8
+ export interface CssUrlRef {
9
+ isImport: boolean;
10
+ }
11
+ export declare function replaceCssUrlRefs(source: string, replacer: (request: string, ref: CssUrlRef) => string | undefined): string;
8
12
  export declare function extractCssUrlRefs(source: string): string[];
@@ -1,17 +1,19 @@
1
1
  export declare const EXTENSION_ROOT_PLACEHOLDER = "__EXTENSIONJS_EXTENSION_ROOT__/";
2
+ export declare function bundledFileToken(index: number): string;
2
3
  export interface InlinedCssUrlTarget {
3
4
  request: string;
4
5
  absolutePath: string;
5
- outputName: string;
6
6
  publicOwned: boolean;
7
+ outputName?: string;
7
8
  }
8
9
  export interface RewriteInlinedCssUrlsContext {
9
10
  resourcePath: string;
10
11
  manifestDir: string;
11
12
  publicRoot: string;
13
+ publicDir?: string;
12
14
  }
13
15
  export declare function rewriteInlinedCssUrls(source: string, context: RewriteInlinedCssUrlsContext): {
14
16
  css: string;
15
17
  targets: InlinedCssUrlTarget[];
16
18
  };
17
- export declare function toRuntimeStylesheetModule(css: string): string;
19
+ export declare function toRuntimeStylesheetModule(css: string, bundledRequests?: string[]): string;
@@ -0,0 +1,8 @@
1
+ export interface LineRewriteSourceMap {
2
+ version: 3;
3
+ sources: string[];
4
+ sourcesContent: string[];
5
+ names: string[];
6
+ mappings: string;
7
+ }
8
+ export declare function lineRewriteSourceMap(original: string, rewritten: string, source: string): LineRewriteSourceMap;
@@ -5,14 +5,12 @@ interface CompilationLike {
5
5
  export interface DeadCssUrlLoaderOptions {
6
6
  manifestPath?: string;
7
7
  projectPath?: string;
8
- sheet?: 'inline' | 'chunk';
9
8
  }
10
9
  interface DeadCssUrlLoaderContext {
11
10
  resourcePath: string;
12
11
  getOptions(): DeadCssUrlLoaderOptions;
13
12
  emitWarning(warning: Error): void;
14
13
  emitError(error: Error): void;
15
- emitFile?(name: string, content: string | Buffer): void;
16
14
  addDependency?(file: string): void;
17
15
  _compilation?: CompilationLike;
18
16
  }
@@ -4,10 +4,15 @@ export interface PublicCssUrlLoaderOptions {
4
4
  projectPath?: string;
5
5
  }
6
6
  interface PublicCssUrlLoaderContext {
7
+ resourcePath?: string;
7
8
  getOptions(): PublicCssUrlLoaderOptions;
8
9
  addDependency?(file: string): void;
10
+ callback(error: null, content: string, map?: unknown): void;
9
11
  }
10
- export declare function keepPublicRootRefs(source: string, publicRoot: string): string;
11
- export declare function restorePublicRootRefs(source: string): string;
12
- export default function publicCssUrlLoader(this: PublicCssUrlLoaderContext, source: string): string;
12
+ export interface PublicRelativeRefs {
13
+ issuerDir: string;
14
+ publicDir: string;
15
+ }
16
+ export declare function keepPublicRootRefs(source: string, publicRoot: string, relative?: PublicRelativeRefs): string;
17
+ export default function publicCssUrlLoader(this: PublicCssUrlLoaderContext, source: string, map?: unknown): void;
13
18
  export {};
@@ -29,6 +29,9 @@ export type ReadyMetadata = {
29
29
  logsPath?: string;
30
30
  cdpPort?: number;
31
31
  rdpPort?: number;
32
+ webdriverPort?: number;
33
+ webdriverSessionId?: string;
34
+ webdriverUnavailableReason?: string;
32
35
  profilePath?: string;
33
36
  browserPid?: number | null;
34
37
  engine?: 'emulator';
@@ -43,6 +46,8 @@ export type ReadyMetadata = {
43
46
  browserLaunchFailedAt?: string;
44
47
  browserLaunchFailedReason?: string;
45
48
  browserLaunchFailedCode?: string;
49
+ cdpFaultCode?: string;
50
+ cdpFaultMessage?: string;
46
51
  runtime?: 'attached' | 'detached';
47
52
  executorAttachedAt?: string;
48
53
  managedExtensions?: ManagedExtensionRecord[];
@@ -95,6 +100,7 @@ type PluginOptions = {
95
100
  controlPath?: string;
96
101
  logsPath?: string;
97
102
  managedExtensionDirs?: string[];
103
+ launchFollows?: boolean;
98
104
  };
99
105
  export declare function formatStatsErrors(errors: unknown): string[];
100
106
  export declare function getSessionRunId(packageJsonDir: string, browser: string): string;
@@ -102,15 +108,12 @@ export declare function stampReadyDistExtensionId(packageJsonDir: string, browse
102
108
  export declare function stampReadyKnownExtensionId(packageJsonDir: string, browser: string, extensionId: string): void;
103
109
  export interface LiveDevSessionOwner {
104
110
  pid: number;
111
+ port?: number | null;
105
112
  runId: string;
106
113
  instanceId?: string;
107
114
  instanceExplicit?: boolean;
108
115
  }
109
116
  export declare function detectLiveDevSessionOwner(readyPath: string, isAlive?: (pid: number) => boolean): LiveDevSessionOwner | null;
110
- export declare function shouldWarnDevOverDev(owner: LiveDevSessionOwner, my: {
111
- instanceId?: string;
112
- instanceExplicit?: boolean;
113
- }): boolean;
114
117
  export declare function getPlaywrightMetadataDir(packageJsonDir: string, browser: string): AbsolutePath;
115
118
  export declare function createPlaywrightMetadataWriter(options: WriterOptions): {
116
119
  metadataDir: AbsolutePath;
@@ -119,6 +122,7 @@ export declare function createPlaywrightMetadataWriter(options: WriterOptions):
119
122
  setManagedExtensionDirs(dirs: string[]): void;
120
123
  isSuperseded: () => boolean;
121
124
  writeStarting(): void;
125
+ writeCompiled(compiledAt: string): void;
122
126
  writeReady(compiledAt?: string | null): void;
123
127
  writeError(code: string, message: string, errors?: string[]): void;
124
128
  writeShutdown(message?: string): void;
@@ -131,6 +135,7 @@ export declare class PlaywrightPlugin {
131
135
  private readonly writer;
132
136
  private readonly command;
133
137
  private readonly browser;
138
+ private readonly launchFollows;
134
139
  constructor(options: PluginOptions);
135
140
  apply(compiler: Compiler): void;
136
141
  }
@@ -2,6 +2,7 @@ export type ReloadType = 'full' | 'service-worker' | 'content-scripts';
2
2
  export interface ReloadInstruction {
3
3
  type: ReloadType | 'page';
4
4
  changedContentScriptEntries?: string[];
5
+ staticContentScriptEntries?: string[];
5
6
  changedAssets?: string[];
6
7
  changedScriptFiles?: string[];
7
8
  label?: string;
@@ -29,4 +30,5 @@ export declare function classifyReloadFromSources(opts: {
29
30
  getSourceFeatureIndex?: () => SourceFeatureIndex | null;
30
31
  outputPath?: string;
31
32
  }): ReloadInstruction | undefined;
33
+ export declare function readStaticContentScriptEntries(outputPath?: string): string[];
32
34
  export declare function readContentScriptCount(compilation: import('@rspack/core').Compilation, outputPath: string): number;
@@ -1 +1,2 @@
1
+ export declare function reloadingExtensionForStaticContentScript(label: string): string;
1
2
  export declare function backgroundIsRequiredMessageOnly(backgroundChunkName: string): string;
@@ -3,6 +3,8 @@ export declare const DEV_CONTENT_SCRIPT_REGISTRY_ASSET = "content_scripts/dev-re
3
3
  export declare const DEV_CONTENT_SCRIPT_MARKER_KEY = "__extjsDevContentScripts";
4
4
  export declare const DEV_CONTENT_SCRIPT_STUB_MESSAGE_KEY = "__extjsDevCsStub";
5
5
  export declare const DEV_CONTENT_SCRIPT_ID_PREFIX = "extjs-dev-cs-";
6
+ export declare const DEV_CONTENT_SCRIPT_STATIC_RELOAD_KEY = "__extjsDevStaticReload";
7
+ export declare const DEV_CONTENT_SCRIPT_STATIC_BUNDLES_KEY = "__extjsDevStaticBundles";
6
8
  export interface DevContentScriptRegistryEntry {
7
9
  id: string;
8
10
  entry: string;
@@ -15,6 +17,7 @@ export interface DevContentScriptRegistryEntry {
15
17
  world: 'ISOLATED' | 'MAIN';
16
18
  matchOriginAsFallback?: boolean;
17
19
  stubOnly: boolean;
20
+ static?: true;
18
21
  }
19
22
  export interface DevContentScriptRegistry {
20
23
  version: 1;
@@ -27,6 +30,7 @@ export interface DevContentScriptPlan {
27
30
  }
28
31
  export declare function devContentScriptStubAssetName(index: number): string;
29
32
  export declare function devContentScriptCssMarkerAssetName(index: number): string;
33
+ export declare function isDevContentScriptStandInAsset(assetName: string): boolean;
30
34
  export declare function contentScriptEntryForAsset(assetName: string): string | undefined;
31
35
  export declare function planDevContentScripts(manifest: Manifest): DevContentScriptPlan | undefined;
32
36
  export declare function buildDevContentScriptStubSource(entryName: string): string;
@@ -0,0 +1,5 @@
1
+ import type { Compiler } from '@rspack/core';
2
+ export declare class PruneUnreachableChunks {
3
+ static readonly name = "plugin-reload:prune-unreachable-chunks";
4
+ apply(compiler: Compiler): void;
5
+ }
@@ -4,5 +4,5 @@ export declare function publicMustBeAtProjectRoot(foundAt: string, expectedAt: s
4
4
  export declare function publicFolderShadowed(usedAt: string, ignoredAt: string, projectRoot: string): string;
5
5
  export declare function specialFoldersSetupSummary(hasPublic: boolean, copyEnabled: boolean, ignoredCount: number): string;
6
6
  export declare function specialFolderChangeDetected(action: 'add' | 'remove', folder: 'pages' | 'scripts', relativePath: string): string;
7
- export declare function unreferencedScriptDropped(relativePaths: string[]): string;
7
+ export declare function packageScriptLeftOut(relativePaths: string[]): string;
8
8
  export declare function publicFileCollidesWithEntry(publicPath: string, emittedPath: string): string;
@@ -0,0 +1,7 @@
1
+ import type { Compiler } from '@rspack/core';
2
+ export declare class PruneRemovedPublicFiles {
3
+ static readonly name: string;
4
+ private readonly publicDir;
5
+ constructor(publicDir: string);
6
+ apply(compiler: Compiler): void;
7
+ }
@@ -0,0 +1,4 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ export declare class CheckNamespaceImports {
3
+ apply(compiler: Compiler): void;
4
+ }
@@ -0,0 +1,8 @@
1
+ export declare const ASSET_FILENAME_PATTERN = "assets/[name].[contenthash:8][ext]";
2
+ export interface AssetHashOptions {
3
+ hashFunction?: string;
4
+ hashSalt?: string;
5
+ hashDigest?: string;
6
+ hashDigestLength?: number;
7
+ }
8
+ export declare function bundledAssetOutputName(absolutePath: string, content: Buffer, output?: AssetHashOptions): string;
@@ -6,3 +6,4 @@ export declare function assetsEmittedSummary(total: number, byCategory: {
6
6
  fonts: number;
7
7
  files: number;
8
8
  }): string;
9
+ export declare function namespaceImportReadAsValue(binding: string, request: string): string;
@@ -1,4 +1,5 @@
1
1
  import * as parse5utilities from 'parse5-utilities';
2
+ import { type AssetHashOptions } from '../../../plugin-static-assets/static-assets-lib/asset-output-name.js';
2
3
  import type { FilepathList } from '../../../types.js';
3
4
  import { type HtmlStaticAttribute } from './parse-html.js';
4
5
  export interface ParsedHtmlAsset {
@@ -28,7 +29,7 @@ export declare function isHttpLike(inputUrl: string): boolean;
28
29
  export declare function isSpecialScheme(u: string): boolean;
29
30
  export declare function cleanLeading(s: string): string;
30
31
  export declare function joinEmittedAssetName(prefix: string, rel: string): string;
31
- export declare function htmlStaticAssetOutputName(manifestDir: string | undefined, htmlEntry: string, absolutePath: string): string;
32
+ export declare function htmlStaticAssetOutputName(manifestDir: string | undefined, htmlEntry: string, absolutePath: string, output?: AssetHashOptions): string;
32
33
  export declare function computePosixRelative(fromPath: string, toPath: string): string;
33
34
  export declare function resolveAbsoluteFsPath(params: {
34
35
  asset: string;
@@ -1,10 +1,7 @@
1
1
  export declare function iconsMissingFile(manifestField: string, filePath: string, opts?: {
2
2
  publicRootHint?: boolean;
3
- fatal?: boolean;
4
- }): string;
5
- export declare function iconsPathIsFolder(manifestField: string, folderPath: string, opts?: {
6
- fatal?: boolean;
7
3
  }): string;
4
+ export declare function iconsPathIsFolder(manifestField: string, folderPath: string): string;
8
5
  export declare function themeImageMissingFile(manifestField: string, filePath: string, opts?: {
9
6
  publicRootHint?: boolean;
10
7
  }): string;
@@ -1,3 +1,5 @@
1
1
  export declare function resolveLocalesFolder(manifestPath: string, projectRoot?: string): string | undefined;
2
2
  export declare function localesFolderIsCopiedByPublic(manifestPath: string, projectRoot?: string): boolean;
3
+ export declare function localeDirsWithoutMessages(localesFolder: string): string[];
4
+ export declare function localeFoldersWithoutMessages(manifestPath: string, projectRoot?: string): string[];
3
5
  export declare function getLocales(manifestPath: string, projectRoot?: string): string[] | undefined;
@@ -3,11 +3,13 @@ export declare function entryNotFoundMessageOnly(manifestField: string, absPath?
3
3
  export declare function defaultLocaleSpecifiedButLocalesMissing(): string;
4
4
  export declare function defaultLocaleFolderMissing(defaultLocale: string): string;
5
5
  export declare function defaultLocaleMessagesMissing(defaultLocale: string): string;
6
+ export declare function defaultLocaleRemovedFromOutput(defaultLocale: string): string;
6
7
  export declare function localesPresentButNoDefaultLocale(): string;
7
8
  export declare function invalidMessagesJson(absPath: string): string;
9
+ export declare function localeFolderWithoutMessages(folder: string): string;
8
10
  export declare function missingManifestMessageKey(key: string, defaultLocale?: string): string;
9
11
  export declare function localesIncludeSummary(hasManifest: boolean, hasLocalesRoot: boolean, defaultLocale?: string): string;
10
12
  export declare function localesEmitSummary(emitted: number, missing: number, discovered: number): string;
11
13
  export declare function localesDepsTracked(addedCount: number): string;
12
14
  export declare function localesValidationDetected(issue: string): string;
13
- export declare function localesMustBeAtProjectRoot(foundAt: string, expectedAt: string): string;
15
+ export declare function localesMustBeAtProjectRoot(foundAt: string, expectedAt: string, projectRoot: string): string;
@@ -1,3 +1,4 @@
1
1
  import type { Compilation, Compiler } from '@rspack/core';
2
2
  import type { DevOptions } from '../../types.js';
3
+ export declare function validateDefaultLocaleEmitted(compiler: Compiler, compilation: Compilation, manifestPath: string, browser?: DevOptions['browser']): boolean;
3
4
  export declare function validateLocales(compiler: Compiler, compilation: Compilation, manifestPath: string, browser?: DevOptions['browser']): boolean;
@@ -9,5 +9,6 @@ export declare function dropWebkitUnsupportedKeys(manifest: Manifest, browser: D
9
9
  manifest: Manifest;
10
10
  dropped: WebkitDroppedKey[];
11
11
  };
12
+ export declare function omitWebkitDroppedEntries<T extends Record<string, unknown>>(entries: T, dropped: WebkitDroppedKey[]): T;
12
13
  export declare function reportWebkitDroppedKeys(dropped: WebkitDroppedKey[], browser: DevOptions['browser']): void;
13
14
  export declare function resetWebkitDropNotices(): void;
@@ -1,4 +1,5 @@
1
1
  import type { Manifest } from '../../../../types.js';
2
+ export declare function isHollowContentScript(entry: unknown): boolean;
2
3
  export declare function contentScripts(manifest: Manifest, manifestPath?: string): {
3
4
  content_scripts: {
4
5
  matches?: string[] | undefined;
@@ -39,6 +39,7 @@ export declare function safariIdleUnsupported(file: string): string;
39
39
  export declare const safariMissingMemberDetails: Record<string, string>;
40
40
  export declare function safariMemberUnsupported(file: string, api: string, member: string, kind: 'call' | 'read'): string;
41
41
  export declare function geckoActionUnsupportedOnMv2(file: string): string;
42
+ export declare function contentScriptEntryDroppedForBrowser(index: number, browser: string, prefixedKeys: string[]): string;
42
43
  export declare function webkitUnsupportedKeysDropped(browser: string, dropped: Array<{
43
44
  path: string;
44
45
  reason: string;
@@ -4,6 +4,8 @@ export declare class ScriptsPlugin {
4
4
  readonly manifestPath: string;
5
5
  readonly includeList?: FilepathList;
6
6
  readonly browser?: DevOptions['browser'];
7
+ readonly devSession?: boolean;
8
+ readonly define?: Record<string, unknown>;
7
9
  constructor(options: PluginInterface);
8
10
  apply(compiler: Compiler): void;
9
11
  }
@@ -27,9 +27,10 @@ declare const PAGE_CONTEXT_SURFACES: {
27
27
  };
28
28
  export declare function workerStartedFromPageContext(assetName: string, surface: keyof typeof PAGE_CONTEXT_SURFACES): string;
29
29
  export declare function fetchedFileDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
30
- export declare function getURLDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
31
- export declare function runtimeSetSurfaceDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
32
- export declare function staticImportDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
30
+ export declare function getURLDependencyMissing(assetName: string, literal: string, expectedPath: string, foundOutside?: string): string;
31
+ export declare function runtimeSetSurfaceDependencyMissing(assetName: string, literal: string, expectedPath: string, foundOutside?: string): string;
32
+ export declare function staticImportDependencyMissing(assetName: string, literal: string, expectedPath: string, foundOutside?: string): string;
33
+ export declare function buildConstantNeverDefined(file: string, name: string, entryName: string): string;
33
34
  export declare function reservedScriptsFolder(relPath: string, indicators: string[]): string;
34
35
  export declare function compiledSourceSpelling(assetName: string, api: string, literal: string, emittedPath: string): string;
35
36
  export {};
@@ -0,0 +1,11 @@
1
+ export declare function isConstantName(name: unknown): name is string;
2
+ export interface ConstantFacts {
3
+ seen: Set<string>;
4
+ provided: Set<string>;
5
+ dynamic: boolean;
6
+ }
7
+ export declare function constantFacts(source: string): ConstantFacts;
8
+ export interface LoadTimeConstants extends ConstantFacts {
9
+ reads: Set<string>;
10
+ }
11
+ export declare function loadTimeConstants(source: string): LoadTimeConstants;
@@ -44,6 +44,9 @@ export declare class TraceRuntimeLoadedFiles {
44
44
  private traceManifestNamedFiles;
45
45
  private traceWorkerImportScripts;
46
46
  private traceFetchedFiles;
47
+ private missingFileHint;
48
+ private surfacePageOutputs;
49
+ private webAccessibleOutputs;
47
50
  private traceGetURLFiles;
48
51
  private traceWebpackChunkSiblings;
49
52
  private traceInjectedFilePayloads;
@@ -71,6 +74,7 @@ interface LooseRule {
71
74
  export declare function withoutDevRefresh(rules: LooseRule[]): LooseRule[];
72
75
  export declare function compiledSourceEmittedPath(distRel: string): string | null;
73
76
  export declare function resolveExtensionPath(literal: string, basePath: string): string | null;
77
+ export declare function extractGetURLLiterals(source: string): string[];
74
78
  export declare function extractRuntimeSurfaceLiterals(source: string): string[];
75
79
  export declare function extractStaticImportLiterals(source: string): string[];
76
80
  export declare function extractMainWorldRegisteredFileLiterals(source: string): string[];
@@ -0,0 +1,24 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import type { DevOptions, PluginInterface } from '../../../types.js';
3
+ interface SourceModule {
4
+ resource?: string;
5
+ modules?: Iterable<SourceModule>;
6
+ originalSource?: () => {
7
+ source(): string | Buffer;
8
+ } | null;
9
+ }
10
+ interface Read {
11
+ name: string;
12
+ file: string;
13
+ }
14
+ export declare function missingConstantsOf(modules: Iterable<SourceModule>, isProvided: (name: string) => boolean): Read[];
15
+ export declare class WarnMissingBuildConstants {
16
+ readonly manifestPath: string;
17
+ readonly browser: DevOptions['browser'];
18
+ readonly devSession?: boolean;
19
+ readonly define: Record<string, unknown>;
20
+ constructor(options: PluginInterface);
21
+ apply(compiler: Compiler): void;
22
+ private warn;
23
+ }
24
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { DevOptions, FilepathList } from '../../../types.js';
2
+ export declare function discoverWebAccessiblePages(manifestPath: string, browser?: DevOptions['browser'], projectPath?: string): FilepathList;