extension-develop 4.0.26 → 4.0.28
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 +5 -1
- package/dist/0~dev-server.mjs +81 -19
- package/dist/0~rspack-config.mjs +399 -184
- package/dist/101.mjs +1099 -972
- package/dist/494.mjs +12 -1
- package/dist/839.mjs +108 -27
- package/dist/bridge.mjs +1 -1
- package/dist/command-preview.d.ts +7 -0
- package/dist/dev-server/control-bridge/controller-client.d.ts +1 -0
- package/dist/dev-server/control-bridge/producer-runtime.d.ts +2 -1
- package/dist/dev-server/index.d.ts +2 -0
- package/dist/extension-js-devtools/chrome/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.js +1 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chromium/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.js +1 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/edge/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/edge/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/edge/pages/centralized-logger.js +1 -1
- package/dist/extension-js-devtools/edge/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/firefox/background/scripts.js +1 -1
- package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/firefox/manifest.json +6 -1
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.js +1 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.css +1 -1
- package/dist/extension-js-theme/chrome/manifest.json +20 -5
- package/dist/extension-js-theme/chromium/manifest.json +20 -5
- package/dist/extension-js-theme/edge/manifest.json +20 -5
- package/dist/extension-js-theme/firefox/manifest.json +47 -12
- package/dist/feature-scripts-content-script-wrapper.js +2 -1
- package/dist/feature-scripts-content-script-wrapper.mjs +2 -1
- package/dist/lib/atomic-dist.d.ts +5 -0
- package/dist/lib/config-loader.d.ts +12 -12
- package/dist/lib/constants.d.ts +2 -0
- package/dist/lib/merge-options.d.ts +67 -0
- package/dist/lib/paths.d.ts +1 -1
- package/dist/lib/session-paths.d.ts +1 -0
- package/dist/plugin-compilation/boring.d.ts +1 -0
- package/dist/plugin-compilation/zip.d.ts +2 -0
- package/dist/plugin-playwright/index.d.ts +2 -0
- package/dist/plugin-web-extension/feature-html/html-lib/utils.d.ts +2 -1
- package/dist/plugin-web-extension/feature-json/messages.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/theme-values.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/messages.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/steps/patch-chromium-theme-colors.d.ts +2 -0
- package/dist/plugin-web-extension/feature-web-resources/collect-entry-imports.d.ts +1 -0
- package/dist/types.d.ts +26 -5
- package/package.json +1 -1
package/dist/lib/paths.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export declare function normalizeBrowser(browser: BrowserInput, chromiumBinary?:
|
|
|
16
16
|
export declare function getDistPath(packageJsonDir: AbsolutePath, browser: string): AbsolutePath;
|
|
17
17
|
export declare function computePreviewOutputPath(struct: ProjectStructure, browser: string, explicitOutputPath?: string): AbsolutePath;
|
|
18
18
|
export declare function ensureDirSync(dir: AbsolutePath): void;
|
|
19
|
-
export declare function devtoolsEngineFor(browser: unknown): 'chrome' | 'edge' | 'chromium' | 'firefox';
|
|
19
|
+
export declare function devtoolsEngineFor(browser: unknown): 'chrome' | 'edge' | 'chromium' | 'firefox' | 'safari';
|
|
@@ -29,6 +29,7 @@ export declare function sessionArtifactsRootDir(projectPath: string): string;
|
|
|
29
29
|
export declare const SESSION_ARTIFACTS_IGNORE_CONTENT: string;
|
|
30
30
|
export declare function sessionArtifactsIgnoreFilePath(projectPath: string): string;
|
|
31
31
|
export declare function ensureSessionArtifactsIgnoreFile(projectPath: string): void;
|
|
32
|
+
export declare function ensureSessionStateInProjectGitignore(projectPath: string): void;
|
|
32
33
|
export declare function browserArtifactsDir(projectPath: string, browser: string): string;
|
|
33
34
|
export declare function browserProfileRootDir(projectPath: string, browser: string): string;
|
|
34
35
|
export declare function browserDistDir(projectPath: string, browser: string): string;
|
|
@@ -6,6 +6,7 @@ export declare class BoringPlugin {
|
|
|
6
6
|
readonly browser: PluginInterface['browser'];
|
|
7
7
|
private sawUserInvalidation;
|
|
8
8
|
private printedStartupSuccess;
|
|
9
|
+
private printedStartupWarning;
|
|
9
10
|
private lastKnownManifestName?;
|
|
10
11
|
constructor(options: PluginInterface);
|
|
11
12
|
apply(compiler: Compiler): void;
|
|
@@ -9,6 +9,8 @@ export interface ZipPluginOptions {
|
|
|
9
9
|
zipFilename?: string;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
+
export declare function isDeniedFromSourceZip(file: string): boolean;
|
|
13
|
+
export declare function getFilesToZip(projectDir: string): Promise<string[]>;
|
|
12
14
|
export declare class ZipPlugin {
|
|
13
15
|
private readonly options;
|
|
14
16
|
private readonly browser;
|
|
@@ -83,6 +83,8 @@ type PluginOptions = {
|
|
|
83
83
|
};
|
|
84
84
|
export declare function formatStatsErrors(errors: unknown): string[];
|
|
85
85
|
export declare function getSessionRunId(packageJsonDir: string, browser: string): string;
|
|
86
|
+
export declare function stampReadyDistExtensionId(packageJsonDir: string, browser: string, distPath: string): void;
|
|
87
|
+
export declare function stampReadyKnownExtensionId(packageJsonDir: string, browser: string, extensionId: string): void;
|
|
86
88
|
export interface LiveDevSessionOwner {
|
|
87
89
|
pid: number;
|
|
88
90
|
runId: string;
|
|
@@ -5,7 +5,8 @@ export interface ParsedHtmlAsset {
|
|
|
5
5
|
moduleJs?: string[];
|
|
6
6
|
static?: string[];
|
|
7
7
|
}
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function evictAssetsFromHtmlCache(htmlFilePath?: string): void;
|
|
9
|
+
export declare function getAssetsFromHtml(htmlFilePath: string | undefined, htmlContent?: string): ParsedHtmlAsset;
|
|
9
10
|
export declare function getHtmlPageDeclaredAssetPath(filepathList: FilepathList, filePath: string, extension: string): string;
|
|
10
11
|
export declare function getExtname(filePath: string): string;
|
|
11
12
|
export declare function getFilePath(filePath: string, extension: string, isPublic: boolean): string;
|
|
@@ -5,6 +5,8 @@ export declare function jsonMissingFile(manifestField: string, filePath: string,
|
|
|
5
5
|
}): string;
|
|
6
6
|
export declare function invalidJsonSyntax(manifestField: string, file: string, cause: string): string;
|
|
7
7
|
export declare function invalidRulesetStructure(manifestField: string, file: string): string;
|
|
8
|
+
export declare function invalidRulesetRule(manifestField: string, file: string, ruleIndex: number, reason: string): string;
|
|
9
|
+
export declare function rulesetRuleShapeIssue(manifestField: string, file: string, ruleIndex: number, reason: string): string;
|
|
8
10
|
export declare function invalidManagedSchemaStructure(manifestField: string, file: string): string;
|
|
9
11
|
export declare function jsonEmitSummary(feature: string, stats: {
|
|
10
12
|
entries: number;
|
|
@@ -2,6 +2,7 @@ export declare function serverRestartRequiredFromManifestError(fileAdded: string
|
|
|
2
2
|
export declare function legacyManifestPathWarning(legacyPath: string): string;
|
|
3
3
|
export declare function fatalManifestShapeFixed(field: string, detail: string): string;
|
|
4
4
|
export declare function invalidThemeValue(field: string, detail: string, value: string): string;
|
|
5
|
+
export declare function themeNotSupportedByBrowser(browser: string): string;
|
|
5
6
|
export declare function missingGeckoDataCollectionPermissions(): string;
|
|
6
7
|
export declare function manifestInvalidError(error: NodeJS.ErrnoException): string;
|
|
7
8
|
export declare function manifestIncludeSummary(browser: string, manifestPath: string): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Compilation } from '@rspack/core';
|
|
2
2
|
import type { FilepathList } from '../../types';
|
|
3
|
+
export declare const EMITTED_ASSET_REF_PATTERN: RegExp;
|
|
3
4
|
export declare function collectContentScriptEntryImports(compilation: Compilation, includeList?: FilepathList): Record<string, string[]>;
|
package/dist/types.d.ts
CHANGED
|
@@ -110,6 +110,8 @@ export interface SafariPackagerOverrides {
|
|
|
110
110
|
macOsOnly?: boolean;
|
|
111
111
|
forceRegenerate?: boolean;
|
|
112
112
|
safariBinary?: string;
|
|
113
|
+
/** When set, overrides the factory `noOpen` for this packaging call. */
|
|
114
|
+
noOpen?: boolean;
|
|
113
115
|
}
|
|
114
116
|
/**
|
|
115
117
|
* The packaging callback develop calls once the Safari dist is on disk. The
|
|
@@ -171,8 +173,8 @@ export interface DevOptions extends BrowserOptionsBase {
|
|
|
171
173
|
allowControl?: boolean;
|
|
172
174
|
/**
|
|
173
175
|
* Additionally allow the `eval` verb, which runs arbitrary code inside a
|
|
174
|
-
* context and writes a 0600 session token.
|
|
175
|
-
*
|
|
176
|
+
* context and writes a 0600 session token. Implies `allowControl`, since
|
|
177
|
+
* eval is strictly stronger. The CLI sets this from `--allow-eval`.
|
|
176
178
|
*/
|
|
177
179
|
allowEval?: boolean;
|
|
178
180
|
exitOnError?: boolean;
|
|
@@ -335,7 +337,19 @@ export interface BrowserConfig extends BrowserOptionsBase {
|
|
|
335
337
|
export type OutputConfig = {
|
|
336
338
|
clean: boolean;
|
|
337
339
|
path: string;
|
|
340
|
+
/**
|
|
341
|
+
* Internal: the final dist path when `path` points at the staging
|
|
342
|
+
* directory a one-shot build is later promoted from. Metadata surfaces
|
|
343
|
+
* (ready.json) advertise this path, never the staging directory.
|
|
344
|
+
*/
|
|
345
|
+
finalPath?: string;
|
|
338
346
|
};
|
|
347
|
+
/**
|
|
348
|
+
* Per-category asset size budgets (bytes) for the perf-budgets plugin.
|
|
349
|
+
* Set at the top level of extension.config.js, or per command via
|
|
350
|
+
* `commands.dev.perfBudgets` / `commands.build.perfBudgets`.
|
|
351
|
+
*/
|
|
352
|
+
export type PerfBudgetsConfig = Partial<Record<import('./plugin-perf-budgets').AssetCategory, number>>;
|
|
339
353
|
export interface CommonWebpackOptions {
|
|
340
354
|
output: OutputConfig;
|
|
341
355
|
preferences?: Record<string, unknown>;
|
|
@@ -346,7 +360,7 @@ export interface CommonWebpackOptions {
|
|
|
346
360
|
* Useful for monorepos where package exports point to TS/TSX files.
|
|
347
361
|
*/
|
|
348
362
|
transpilePackages?: string[];
|
|
349
|
-
perfBudgets?:
|
|
363
|
+
perfBudgets?: PerfBudgetsConfig;
|
|
350
364
|
/**
|
|
351
365
|
* Companion extensions (load-only). Each entry must be an unpacked extension root
|
|
352
366
|
* containing a manifest.json. These are loaded alongside the user extension in
|
|
@@ -386,13 +400,14 @@ export interface FileConfig {
|
|
|
386
400
|
[K in BrowserType]?: BrowserConfig;
|
|
387
401
|
};
|
|
388
402
|
commands?: {
|
|
389
|
-
dev?: Pick<DevOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'noOpen' | 'noBrowser' | 'polyfill'> & Pick<DevOptions, 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab' | 'hashContentScripts'> & {
|
|
403
|
+
dev?: Pick<DevOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'safariBinary' | 'appName' | 'bundleId' | 'macOsOnly' | 'noOpen' | 'noBrowser' | 'polyfill'> & Pick<DevOptions, 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab' | 'hashContentScripts'> & {
|
|
390
404
|
browserFlags?: string[];
|
|
391
405
|
excludeBrowserFlags?: string[];
|
|
392
406
|
preferences?: Record<string, unknown>;
|
|
393
407
|
persistProfile?: boolean;
|
|
394
408
|
extensions?: CompanionExtensionsConfig;
|
|
395
409
|
transpilePackages?: string[];
|
|
410
|
+
perfBudgets?: PerfBudgetsConfig;
|
|
396
411
|
};
|
|
397
412
|
start?: Pick<StartOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'polyfill' | 'noBrowser' | 'port' | 'host' | 'publicHost' | 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab'> & {
|
|
398
413
|
browserFlags?: string[];
|
|
@@ -410,9 +425,10 @@ export interface FileConfig {
|
|
|
410
425
|
extensions?: CompanionExtensionsConfig;
|
|
411
426
|
transpilePackages?: string[];
|
|
412
427
|
};
|
|
413
|
-
build?: Pick<BuildOptions, 'browser' | 'zipFilename' | 'zip' | 'zipSource' | 'polyfill'> & {
|
|
428
|
+
build?: Pick<BuildOptions, 'browser' | 'zipFilename' | 'zip' | 'zipSource' | 'polyfill' | 'silent' | 'safariBinary' | 'appName' | 'bundleId' | 'macOsOnly'> & {
|
|
414
429
|
extensions?: CompanionExtensionsConfig;
|
|
415
430
|
transpilePackages?: string[];
|
|
431
|
+
perfBudgets?: PerfBudgetsConfig;
|
|
416
432
|
};
|
|
417
433
|
};
|
|
418
434
|
/**
|
|
@@ -425,5 +441,10 @@ export interface FileConfig {
|
|
|
425
441
|
* Per-command `commands.<name>.transpilePackages` overrides this value.
|
|
426
442
|
*/
|
|
427
443
|
transpilePackages?: string[];
|
|
444
|
+
/**
|
|
445
|
+
* Default per-category asset budgets for all commands.
|
|
446
|
+
* Per-command `commands.dev|build.perfBudgets` overrides this value.
|
|
447
|
+
*/
|
|
448
|
+
perfBudgets?: PerfBudgetsConfig;
|
|
428
449
|
config?: (config: Configuration) => Configuration;
|
|
429
450
|
}
|