extension-develop 4.0.19 → 4.0.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/0~dev-server.mjs +8 -3
- package/dist/0~rspack-config.mjs +3759 -205
- package/dist/101.mjs +65 -2
- package/dist/349.mjs +2 -0
- package/dist/494.mjs +7 -1
- package/dist/839.mjs +164 -3619
- package/dist/887.mjs +5 -1
- package/dist/bridge-entry.d.ts +5 -4
- package/dist/bridge.mjs +25 -5
- package/dist/contract/codes.json +19 -2
- package/dist/contract/envelope.schema.json +10 -1
- package/dist/contract/golden.eval.target-not-found.json +14 -0
- package/dist/contract/golden.open.headed-window-required.json +14 -0
- package/dist/contracts-entry.d.ts +2 -0
- package/dist/contracts.mjs +12 -0
- package/dist/dev-server/control-bridge/consumer-client.d.ts +15 -1
- package/dist/dev-server/control-bridge/contracts.d.ts +6 -0
- package/dist/dev-server/control-bridge/producer-runtime.d.ts +1 -1
- package/dist/ensure-hmr-for-scripts.js +1 -1
- package/dist/ensure-hmr-for-scripts.mjs +1 -1
- package/dist/feature-scripts-content-script-wrapper.js +2 -2
- package/dist/feature-scripts-content-script-wrapper.mjs +2 -2
- package/dist/lib/extension-id.d.ts +9 -0
- package/dist/lib/messaging.d.ts +9 -0
- package/dist/lib/session-paths.d.ts +2 -0
- package/dist/plugin-playwright/index.d.ts +7 -0
- package/dist/plugin-web-extension/feature-icons/messages.d.ts +3 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/theme-values.d.ts +7 -0
- package/dist/plugin-web-extension/feature-manifest/messages.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/steps/validate-theme-values.d.ts +9 -0
- package/package.json +10 -1
package/dist/lib/messaging.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export declare const CODES: {
|
|
|
54
54
|
readonly E_SESSION_NOT_FOUND: 'E_SESSION_NOT_FOUND';
|
|
55
55
|
readonly E_EVAL_REFUSED: 'E_EVAL_REFUSED';
|
|
56
56
|
readonly E_TARGET_NOT_FOUND: 'E_TARGET_NOT_FOUND';
|
|
57
|
+
readonly E_HEADED_WINDOW_REQUIRED: 'E_HEADED_WINDOW_REQUIRED';
|
|
58
|
+
readonly E_USER_GESTURE_REQUIRED: 'E_USER_GESTURE_REQUIRED';
|
|
57
59
|
readonly E_TIMEOUT: 'E_TIMEOUT';
|
|
58
60
|
readonly E_PUBLISH_REJECTED: 'E_PUBLISH_REJECTED';
|
|
59
61
|
readonly E_AUTH_REQUIRED: 'E_AUTH_REQUIRED';
|
|
@@ -149,12 +151,19 @@ export declare const CODES: {
|
|
|
149
151
|
readonly E_UNINSTALL_NOOP: 'E_UNINSTALL_NOOP';
|
|
150
152
|
};
|
|
151
153
|
export type ErrorCode = (typeof CODES)[keyof typeof CODES];
|
|
154
|
+
export interface EnvelopeErrorRefs {
|
|
155
|
+
flag?: string;
|
|
156
|
+
command?: string;
|
|
157
|
+
path?: string;
|
|
158
|
+
version?: string;
|
|
159
|
+
}
|
|
152
160
|
export interface EnvelopeError {
|
|
153
161
|
code: ErrorCode;
|
|
154
162
|
message: string;
|
|
155
163
|
name?: string;
|
|
156
164
|
engine?: string;
|
|
157
165
|
hint?: string;
|
|
166
|
+
refs?: EnvelopeErrorRefs;
|
|
158
167
|
}
|
|
159
168
|
export interface Envelope<T = unknown> {
|
|
160
169
|
schema: typeof ENVELOPE_SCHEMA;
|
|
@@ -30,6 +30,8 @@ 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
32
|
export declare function browserArtifactsDir(projectPath: string, browser: string): string;
|
|
33
|
+
export declare function browserProfileRootDir(projectPath: string, browser: string): string;
|
|
34
|
+
export declare function browserDistDir(projectPath: string, browser: string): string;
|
|
33
35
|
export declare function readyContractPath(projectPath: string, browser: string): string;
|
|
34
36
|
export declare function eventsPath(projectPath: string, browser: string): string;
|
|
35
37
|
export declare function logsPath(projectPath: string, browser: string): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Compiler } from '@rspack/core';
|
|
2
|
+
import { type ManagedExtensionRecord } from '../lib/extension-id';
|
|
2
3
|
import { type AbsolutePath } from '../lib/paths';
|
|
3
4
|
export type PlaywrightAutomationCommand = 'dev' | 'start' | 'preview' | 'build';
|
|
4
5
|
export type ReadyStatus = 'starting' | 'ready' | 'error' | 'stopped';
|
|
@@ -26,6 +27,8 @@ export type ReadyMetadata = {
|
|
|
26
27
|
logsPath?: string;
|
|
27
28
|
cdpPort?: number;
|
|
28
29
|
rdpPort?: number;
|
|
30
|
+
profilePath?: string;
|
|
31
|
+
browserPid?: number;
|
|
29
32
|
toolchainVersion: string;
|
|
30
33
|
extensionName?: string;
|
|
31
34
|
extensionVersion?: string;
|
|
@@ -33,6 +36,7 @@ export type ReadyMetadata = {
|
|
|
33
36
|
browserExitCode?: number | null;
|
|
34
37
|
runtime?: 'attached';
|
|
35
38
|
executorAttachedAt?: string;
|
|
39
|
+
managedExtensions?: ManagedExtensionRecord[];
|
|
36
40
|
};
|
|
37
41
|
export type PlaywrightAutomationEvent = {
|
|
38
42
|
type: 'compile_start' | 'compile_success' | 'compile_error' | 'shutdown';
|
|
@@ -56,6 +60,7 @@ type WriterOptions = {
|
|
|
56
60
|
controlPort?: number | string | null;
|
|
57
61
|
controlPath?: string;
|
|
58
62
|
logsPath?: string;
|
|
63
|
+
managedExtensionDirs?: string[];
|
|
59
64
|
};
|
|
60
65
|
type PluginOptions = {
|
|
61
66
|
packageJsonDir: string;
|
|
@@ -70,6 +75,7 @@ type PluginOptions = {
|
|
|
70
75
|
controlPort?: number | string | null;
|
|
71
76
|
controlPath?: string;
|
|
72
77
|
logsPath?: string;
|
|
78
|
+
managedExtensionDirs?: string[];
|
|
73
79
|
};
|
|
74
80
|
export declare function formatStatsErrors(errors: unknown): string[];
|
|
75
81
|
export declare function getSessionRunId(packageJsonDir: string, browser: string): string;
|
|
@@ -78,6 +84,7 @@ export declare function createPlaywrightMetadataWriter(options: WriterOptions):
|
|
|
78
84
|
metadataDir: AbsolutePath;
|
|
79
85
|
readyPath: AbsolutePath;
|
|
80
86
|
eventsPath: AbsolutePath;
|
|
87
|
+
setManagedExtensionDirs(dirs: string[]): void;
|
|
81
88
|
writeStarting(): void;
|
|
82
89
|
writeReady(compiledAt?: string | null): void;
|
|
83
90
|
writeError(code: string, message: string, errors?: string[]): void;
|
|
@@ -2,6 +2,9 @@ export declare function iconsMissingFile(manifestField: string, filePath: string
|
|
|
2
2
|
publicRootHint?: boolean;
|
|
3
3
|
fatal?: boolean;
|
|
4
4
|
}): string;
|
|
5
|
+
export declare function themeImageMissingFile(manifestField: string, filePath: string, opts?: {
|
|
6
|
+
publicRootHint?: boolean;
|
|
7
|
+
}): string;
|
|
5
8
|
export declare function themeImageIsEmpty(manifestField: string, filePath: string): string;
|
|
6
9
|
export declare function manifestIconsEntrypointChange(manifestField?: string, pathAfter?: string, pathBefore?: string): string;
|
|
7
10
|
export declare function iconsEmitSummary(feature: string, stats: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare function serverRestartRequiredFromManifestError(fileAdded: string, fileRemoved: string): string;
|
|
2
2
|
export declare function legacyManifestPathWarning(legacyPath: string): string;
|
|
3
3
|
export declare function fatalManifestShapeFixed(field: string, detail: string): string;
|
|
4
|
+
export declare function invalidThemeValue(field: string, detail: string, value: string): string;
|
|
4
5
|
export declare function missingGeckoDataCollectionPermissions(): string;
|
|
5
6
|
export declare function manifestInvalidError(error: NodeJS.ErrnoException): string;
|
|
6
7
|
export declare function manifestIncludeSummary(browser: string, manifestPath: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Compiler } from '@rspack/core';
|
|
2
|
+
import type { DevOptions, PluginInterface } from '../../../types';
|
|
3
|
+
export declare class ValidateThemeValues {
|
|
4
|
+
static readonly name: string;
|
|
5
|
+
readonly manifestPath: string;
|
|
6
|
+
readonly browser: DevOptions['browser'];
|
|
7
|
+
constructor(options: PluginInterface);
|
|
8
|
+
apply(compiler: Compiler): void;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -25,16 +25,25 @@
|
|
|
25
25
|
"types": "./dist/bridge-entry.d.ts",
|
|
26
26
|
"import": "./dist/bridge.mjs"
|
|
27
27
|
},
|
|
28
|
+
"./contracts": {
|
|
29
|
+
"development": "./contracts-entry.ts",
|
|
30
|
+
"types": "./dist/contracts-entry.d.ts",
|
|
31
|
+
"browser": "./dist/contracts.mjs",
|
|
32
|
+
"import": "./dist/contracts.mjs",
|
|
33
|
+
"default": "./dist/contracts.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./contract/*": "./dist/contract/*",
|
|
28
36
|
"./package.json": "./package.json"
|
|
29
37
|
},
|
|
30
38
|
"main": "./dist/module.mjs",
|
|
31
39
|
"types": "./dist/module.d.ts",
|
|
40
|
+
"sideEffects": false,
|
|
32
41
|
"files": [
|
|
33
42
|
"dist",
|
|
34
43
|
"runtime"
|
|
35
44
|
],
|
|
36
45
|
"name": "extension-develop",
|
|
37
|
-
"version": "4.0.
|
|
46
|
+
"version": "4.0.20",
|
|
38
47
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
39
48
|
"author": {
|
|
40
49
|
"name": "Cezar Augusto",
|