extension 4.0.16 → 4.0.17

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.
@@ -1,6 +1,4 @@
1
1
  import type { BrowserType } from '../browsers-types';
2
- export declare const BANNER_PRINTED_EVENT = "extensionjs:banner-printed";
3
- export declare function isBannerPrinted(): boolean;
4
2
  type Info = {
5
3
  extensionId?: string;
6
4
  name?: string;
@@ -4,10 +4,6 @@ export declare function capitalizedBrowserName(browser: Browser): string;
4
4
  export declare function creatingUserProfile(profilePath: string): string;
5
5
  export declare function browserInstanceExited(browser: Browser): string;
6
6
  export declare function cdpClientAttachedToTarget(sessionId: string, targetType: string): string;
7
- export declare function cdpPendingRejectFailed(message: string): string;
8
- export declare function cdpFailedToHandleMessage(message: string): string;
9
- export declare function cdpAutoAttachSetupFailed(message: string): string;
10
- export declare function cdpProtocolEventHandlerError(message: string): string;
11
7
  export declare function bestEffortBannerPrintFailed(message: string): string;
12
8
  export declare function firefoxRdpRuntimeCapabilitySummary(state: 'available' | 'unavailable'): string;
13
9
  export declare function skippingBrowserLaunchDueToCompileErrors(): string;
@@ -1,3 +1,10 @@
1
1
  export declare function stampReadyRdpPort(extensionOutputPath: string | undefined, rdpPort: number): void;
2
2
  export declare function stampReadyExtensionLoadRefused(extensionOutputPath: string | undefined, reason: string): void;
3
+ export declare function stampReadyProfileLocked(extensionOutputPath: string | undefined, details: {
4
+ message?: string;
5
+ owner?: {
6
+ host: string;
7
+ pid: number;
8
+ };
9
+ }): void;
3
10
  export declare function stampReadyBrowserExited(extensionOutputPath: string | undefined, code: number | null): void;
@@ -18,6 +18,15 @@ export declare function parseEnvBrowserFlags(raw: string | undefined | null): st
18
18
  export declare function isHeadlessGuardRequested(env?: NodeJS.ProcessEnv): boolean;
19
19
  export declare function mergeChromiumFeatureSwitches(flags: string[]): string[];
20
20
  export declare function findAvailablePortNear(startPort: number, maxAttempts?: number, host?: string): Promise<number>;
21
+ export declare const PROFILE_LOCKED_ERROR_CODE = "profile_locked";
22
+ export interface ProfileLockedError extends Error {
23
+ code: string;
24
+ profileLockOwner: {
25
+ host: string;
26
+ pid: number;
27
+ };
28
+ }
29
+ export declare function isProfileLockedError(error: unknown): error is ProfileLockedError;
21
30
  export declare function prepareChromiumProfileForLaunch(profilePath: string): {
22
31
  removedArtifacts: string[];
23
32
  };
@@ -3,4 +3,22 @@ export declare function readRecentConsole(projectPath: string, browser: string,
3
3
  context?: string;
4
4
  tabId?: number;
5
5
  }, limit: number): unknown[];
6
+ interface ActResultLike {
7
+ ok?: boolean;
8
+ value?: unknown;
9
+ truncated?: boolean;
10
+ error?: {
11
+ name?: unknown;
12
+ message?: unknown;
13
+ engine?: unknown;
14
+ };
15
+ }
16
+ /**
17
+ * Wrap an act frame in the schema-1 envelope without dropping a key. `value`,
18
+ * `truncated`, `error.name`, `error.engine`, `error.hint` and any verb
19
+ * augmentation (`inspect --with-console` merges `console`) are what the MCP
20
+ * reads today, so they keep their exact place.
21
+ */
22
+ export declare function buildActEnvelope(command: string, result: ActResultLike): Record<string, unknown>;
6
23
  export declare function registerActCommands(program: Command): void;
24
+ export {};
@@ -1,2 +1,2 @@
1
- import type { Command } from 'commander';
1
+ import { type Command } from 'commander';
2
2
  export declare function registerBuildCommand(program: Command): void;
@@ -1,2 +1,7 @@
1
1
  import type { Command } from 'commander';
2
+ export declare const CREATE_ERROR_NEEDLES: {
3
+ readonly E_DESTINATION_NOT_EMPTY: 'already contains files that would be overwritten';
4
+ readonly E_DESTINATION_NOT_WRITABLE: "Couldn't write to the destination directory";
5
+ readonly E_TEMPLATE_NOT_FOUND: 'is not in the extension-js/examples catalog';
6
+ };
2
7
  export declare function registerCreateCommand(program: Command): void;
@@ -1,3 +1,4 @@
1
+ import { type ErrorCode } from '../helpers/messaging';
1
2
  export type WaitFormat = 'pretty' | 'json';
2
3
  export type WaitCommand = 'dev' | 'start';
3
4
  export declare const READY_CONTRACT_FRESHNESS_MS = 60000;
@@ -34,6 +35,18 @@ export type RunWaitModeResult = {
34
35
  browser: string;
35
36
  }>;
36
37
  };
38
+ export declare function parseWaitFormat(value?: string): WaitFormat;
39
+ export declare class WaitModeError extends Error {
40
+ readonly code: ErrorCode;
41
+ constructor(message: string, code: ErrorCode);
42
+ }
43
+ export interface WaitFailure {
44
+ code: ErrorCode;
45
+ status: string;
46
+ message: string;
47
+ hint: string;
48
+ }
49
+ export declare function describeWaitError(error: unknown): WaitFailure;
37
50
  export declare function isFreshContractPayload(payload: ReadyContractPayload): boolean;
38
51
  export declare function runWaitMode(options: RunWaitModeOptions): Promise<RunWaitModeResult>;
39
52
  export declare function runDevWaitMode(options: Omit<RunWaitModeOptions, 'command'>): Promise<RunWaitModeResult>;
@@ -1,2 +1,2 @@
1
- import type { Command } from 'commander';
1
+ import { type Command } from 'commander';
2
2
  export declare function registerDevCommand(program: Command): void;
@@ -1,2 +1,3 @@
1
- import type { Command } from 'commander';
1
+ import { type Command } from 'commander';
2
+ export declare const PREVIEW_NOT_FOUND_NEEDLES: readonly ['Preview is run-only', 'Manifest file not found'];
2
3
  export declare function registerPreviewCommand(program: Command): void;
@@ -1,2 +1,2 @@
1
- import type { Command } from 'commander';
1
+ import { type Command } from 'commander';
2
2
  export declare function registerStartCommand(program: Command): void;
@@ -1,30 +1,192 @@
1
- export declare const fmt: {
2
- heading: (title: string) => string;
3
- label: (k: string) => string;
4
- val: (v: string) => string;
5
- code: (v: string) => string;
6
- bullet: (s: string) => string;
7
- block(title: string, rows: Array<[string, string]>): string;
8
- truncate(input: unknown, max?: number): string;
9
- };
10
- export declare const commandDescriptions: {
11
- readonly create: 'Creates a new extension from a template (React, TypeScript, Vue, Svelte, etc.)';
12
- readonly dev: 'Starts the development server with hot reloading';
13
- readonly start: 'Builds and starts the extension in production mode';
14
- readonly preview: 'Previews the extension in production mode without building';
15
- readonly build: 'Builds the extension for packaging/distribution';
16
- readonly logs: 'Prints or streams logs from every context of a running dev session';
17
- readonly eval: 'Evaluates an expression in a running extension context (requires --allow-eval)';
18
- readonly storage: 'Reads or writes chrome.storage in a running extension (requires --allow-control)';
19
- readonly reload: 'Reloads a running extension or tab (requires --allow-control)';
20
- readonly open: 'Opens an extension surface: popup, options, sidebar, action, or command (requires --allow-control)';
21
- readonly inspect: 'Inspects a page/content DOM via the agent bridge (CDP-free; requires --allow-control)';
22
- readonly publish: 'Publishes to extension.dev and prints a shareable URL (requires EXTENSION_DEV_TOKEN)';
23
- readonly install: 'Installs a managed browser binary into Extension.js cache';
24
- readonly uninstall: 'Removes managed browser binaries from Extension.js cache';
25
- readonly telemetry: 'Manage anonymous telemetry consent (enable, disable, or show status)';
26
- readonly doctor: 'Diagnoses a dev session: ready contract, control channel, token, executor, browser';
27
- };
1
+ import { fmt } from './messaging';
2
+ export { fmt };
3
+ export interface CommandArgSpec {
4
+ readonly name: string;
5
+ readonly required: boolean;
6
+ readonly values?: readonly string[];
7
+ readonly label?: string;
8
+ }
9
+ export interface CommandNoteSpec {
10
+ readonly usage: string;
11
+ readonly description: string;
12
+ }
13
+ interface CommandTableEntry {
14
+ readonly name: string;
15
+ readonly positionals: readonly CommandArgSpec[];
16
+ readonly description: string;
17
+ readonly detail?: string;
18
+ readonly supportsSourceInspection: boolean;
19
+ readonly notes?: readonly CommandNoteSpec[];
20
+ }
21
+ export declare function commandArgSignature(positionals: readonly CommandArgSpec[]): string;
22
+ export declare function registeredArgSignature(positionals: readonly CommandArgSpec[]): string;
23
+ declare const COMMAND_TABLE: readonly [{
24
+ readonly name: 'create';
25
+ readonly positionals: readonly [{
26
+ readonly name: 'project-name|project-path';
27
+ readonly required: true;
28
+ }];
29
+ readonly description: 'Create a new extension from a template (React, TypeScript, Vue, Svelte, etc.)';
30
+ readonly supportsSourceInspection: false;
31
+ }, {
32
+ readonly name: 'dev';
33
+ readonly positionals: readonly [{
34
+ readonly name: 'project-path|remote-url';
35
+ readonly required: false;
36
+ }];
37
+ readonly description: 'Start the development server with hot reloading';
38
+ readonly supportsSourceInspection: true;
39
+ }, {
40
+ readonly name: 'start';
41
+ readonly positionals: readonly [{
42
+ readonly name: 'project-path|remote-url';
43
+ readonly required: false;
44
+ }];
45
+ readonly description: 'Build and start the extension in production mode';
46
+ readonly supportsSourceInspection: false;
47
+ }, {
48
+ readonly name: 'preview';
49
+ readonly positionals: readonly [{
50
+ readonly name: 'project-name';
51
+ readonly required: false;
52
+ readonly label: 'project-path|remote-url';
53
+ }];
54
+ readonly description: 'Preview the extension in production mode without building';
55
+ readonly supportsSourceInspection: false;
56
+ }, {
57
+ readonly name: 'build';
58
+ readonly positionals: readonly [{
59
+ readonly name: 'project-name';
60
+ readonly required: false;
61
+ readonly label: 'project-path|remote-url';
62
+ }];
63
+ readonly description: 'Build the extension for packaging and distribution';
64
+ readonly supportsSourceInspection: false;
65
+ }, {
66
+ readonly name: 'logs';
67
+ readonly positionals: readonly [{
68
+ readonly name: 'project-path';
69
+ readonly required: false;
70
+ }];
71
+ readonly description: 'Print or stream logs from every context of a running dev session';
72
+ readonly supportsSourceInspection: false;
73
+ }, {
74
+ readonly name: 'eval';
75
+ readonly positionals: readonly [{
76
+ readonly name: 'expression';
77
+ readonly required: true;
78
+ }, {
79
+ readonly name: 'project-path';
80
+ readonly required: false;
81
+ }];
82
+ readonly description: 'Evaluate an expression in a running extension context (requires --allow-eval)';
83
+ readonly supportsSourceInspection: false;
84
+ }, {
85
+ readonly name: 'storage';
86
+ readonly positionals: readonly [{
87
+ readonly name: 'action';
88
+ readonly required: true;
89
+ readonly values: readonly ["get", "set"];
90
+ }, {
91
+ readonly name: 'project-path';
92
+ readonly required: false;
93
+ }];
94
+ readonly description: 'Read or write chrome.storage in a running extension (requires --allow-control)';
95
+ readonly supportsSourceInspection: false;
96
+ }, {
97
+ readonly name: 'reload';
98
+ readonly positionals: readonly [{
99
+ readonly name: 'project-path';
100
+ readonly required: false;
101
+ }];
102
+ readonly description: 'Reload a running extension or tab (requires --allow-control)';
103
+ readonly supportsSourceInspection: false;
104
+ }, {
105
+ readonly name: 'open';
106
+ readonly positionals: readonly [{
107
+ readonly name: 'surface';
108
+ readonly required: true;
109
+ readonly values: readonly ["popup", "options", "sidebar", "action", "command"];
110
+ }, {
111
+ readonly name: 'project-path';
112
+ readonly required: false;
113
+ }];
114
+ readonly description: 'Open an extension surface: popup, options, sidebar, action, or command (requires --allow-control)';
115
+ readonly supportsSourceInspection: false;
116
+ }, {
117
+ readonly name: 'inspect';
118
+ readonly positionals: readonly [{
119
+ readonly name: 'project-path';
120
+ readonly required: false;
121
+ }];
122
+ readonly description: 'Inspect a page or content DOM through the agent bridge (CDP-free; requires --allow-control)';
123
+ readonly supportsSourceInspection: true;
124
+ }, {
125
+ readonly name: 'publish';
126
+ readonly positionals: readonly [{
127
+ readonly name: 'project-path';
128
+ readonly required: false;
129
+ }];
130
+ readonly description: 'Publish to extension.dev and print a shareable URL (requires EXTENSION_DEV_TOKEN)';
131
+ readonly supportsSourceInspection: false;
132
+ }, {
133
+ readonly name: 'install';
134
+ readonly positionals: readonly [{
135
+ readonly name: 'browser-name';
136
+ readonly required: false;
137
+ }];
138
+ readonly description: 'Install a managed browser binary into the Extension.js cache';
139
+ readonly detail: 'Defaults to chromium when no browser is named.';
140
+ readonly supportsSourceInspection: false;
141
+ readonly notes: readonly [{
142
+ readonly usage: '--browser <chrome|chromium|edge|firefox|chromium-based|gecko-based|firefox-based|all>';
143
+ readonly description: 'Install multiple browsers, browser families, or all';
144
+ }, {
145
+ readonly usage: '--where';
146
+ readonly description: 'Print the managed browser cache root (or browser install path(s) when a browser name or --browser is provided)';
147
+ }];
148
+ }, {
149
+ readonly name: 'uninstall';
150
+ readonly positionals: readonly [{
151
+ readonly name: 'browser-name';
152
+ readonly required: false;
153
+ }];
154
+ readonly description: 'Remove managed browser binaries from the Extension.js cache';
155
+ readonly supportsSourceInspection: false;
156
+ readonly notes: readonly [{
157
+ readonly usage: '--all';
158
+ readonly description: 'Remove every managed browser binary';
159
+ }, {
160
+ readonly usage: '--where';
161
+ readonly description: 'Print the managed browser cache root (or browser install path(s) when --browser/--all is provided)';
162
+ }];
163
+ }, {
164
+ readonly name: 'telemetry';
165
+ readonly positionals: readonly [{
166
+ readonly name: 'action';
167
+ readonly required: false;
168
+ readonly values: readonly ["enable", "disable", "status"];
169
+ }];
170
+ readonly description: 'Manage anonymous telemetry consent (enable, disable, or show status)';
171
+ readonly supportsSourceInspection: false;
172
+ }, {
173
+ readonly name: 'doctor';
174
+ readonly positionals: readonly [{
175
+ readonly name: 'project-path';
176
+ readonly required: false;
177
+ }];
178
+ readonly description: 'Diagnose a dev session: ready contract, control channel, token, executor, browser';
179
+ readonly supportsSourceInspection: false;
180
+ }];
181
+ export type CommandName = (typeof COMMAND_TABLE)[number]['name'];
182
+ export interface CommandSpec extends CommandTableEntry {
183
+ readonly name: CommandName;
184
+ readonly args: string;
185
+ }
186
+ export declare const COMMANDS: readonly CommandSpec[];
187
+ export declare function commandSpec(name: CommandName): CommandSpec;
188
+ export declare const commandDescriptions: Record<CommandName, string>;
189
+ export declare function availableCommandsBlock(): string;
28
190
  export declare function unhandledError(err: unknown): string;
29
191
  export declare function updateFailed(err: unknown): string;
30
192
  export declare function checkUpdates(packageJson: Record<string, unknown>, update: {
@@ -44,7 +206,7 @@ export declare function programAIHelp(): string;
44
206
  export type ProgramAIHelpJSON = {
45
207
  version: string;
46
208
  commands: Array<{
47
- name: 'create' | 'dev' | 'start' | 'preview' | 'build' | 'logs' | 'eval' | 'storage' | 'reload' | 'open' | 'inspect' | 'publish' | 'install' | 'uninstall' | 'telemetry' | 'doctor';
209
+ name: CommandName;
48
210
  summary: string;
49
211
  supportsSourceInspection: boolean;
50
212
  }>;
@@ -85,4 +247,5 @@ export type ProgramAIHelpJSON = {
85
247
  export declare function programAIHelpJSON(version: string): ProgramAIHelpJSON;
86
248
  export declare function invalidAIHelpFormat(value: string): string;
87
249
  export declare function removedNoRunnerFlag(): string;
250
+ export declare function deprecatedOutputAlias(flag: string): string;
88
251
  export declare function noBrowserNotSupportedForCommand(command?: string): string;
@@ -0,0 +1,180 @@
1
+ export type Channel = 'info' | 'success' | 'warn' | 'error' | 'debug';
2
+ export declare function isDebug(): boolean;
3
+ export declare function prefix(type: Channel): string;
4
+ export declare const fmt: {
5
+ heading: (title: string) => string;
6
+ label: (key: string) => string;
7
+ val: (value: string) => string;
8
+ code: (value: string) => string;
9
+ bullet: (value: string) => string;
10
+ block(title: string, rows: Array<[string, string]>): string;
11
+ truncate(input: unknown, max?: number): string;
12
+ };
13
+ export interface CardRow {
14
+ label: string;
15
+ value?: string;
16
+ }
17
+ export interface CardInput {
18
+ version?: string;
19
+ suffix?: string;
20
+ rows?: CardRow[];
21
+ }
22
+ export declare function card(input?: CardInput): string;
23
+ export declare function isCardKeyClaimed(key: string): boolean;
24
+ export declare function claimCardKey(key: string): boolean;
25
+ export declare function artifactNoun(browser: string): 'Add-on' | 'Extension';
26
+ export declare const ENVELOPE_SCHEMA = 1;
27
+ export declare const CODES: {
28
+ readonly E_ARGS: 'E_ARGS';
29
+ readonly E_PROJECT_NOT_FOUND: 'E_PROJECT_NOT_FOUND';
30
+ readonly E_MANIFEST_NOT_FOUND: 'E_MANIFEST_NOT_FOUND';
31
+ readonly E_MANIFEST_INVALID: 'E_MANIFEST_INVALID';
32
+ readonly E_FIRST_COMPILE: 'E_FIRST_COMPILE';
33
+ readonly E_COMPILE: 'E_COMPILE';
34
+ readonly E_BROWSER_NOT_FOUND: 'E_BROWSER_NOT_FOUND';
35
+ readonly E_BROWSER_LAUNCH: 'E_BROWSER_LAUNCH';
36
+ readonly E_PROFILE_LOCKED: 'E_PROFILE_LOCKED';
37
+ readonly E_READY_TIMEOUT: 'E_READY_TIMEOUT';
38
+ readonly E_SESSION_EXISTS: 'E_SESSION_EXISTS';
39
+ readonly E_CONTROL_DENIED: 'E_CONTROL_DENIED';
40
+ readonly E_CONTROL_UNAVAILABLE: 'E_CONTROL_UNAVAILABLE';
41
+ readonly E_TOKEN_MISSING: 'E_TOKEN_MISSING';
42
+ readonly E_NETWORK: 'E_NETWORK';
43
+ readonly E_INTERRUPTED: 'E_INTERRUPTED';
44
+ readonly E_NOT_IMPLEMENTED: 'E_NOT_IMPLEMENTED';
45
+ readonly E_INTERNAL: 'E_INTERNAL';
46
+ readonly E_UNSUPPORTED_BROWSER: 'E_UNSUPPORTED_BROWSER';
47
+ readonly E_INVALID_OPTION: 'E_INVALID_OPTION';
48
+ readonly E_PORT_UNAVAILABLE: 'E_PORT_UNAVAILABLE';
49
+ readonly E_DEPENDENCY_INSTALL: 'E_DEPENDENCY_INSTALL';
50
+ readonly E_TEMPLATE_NOT_FOUND: 'E_TEMPLATE_NOT_FOUND';
51
+ readonly E_DESTINATION_NOT_EMPTY: 'E_DESTINATION_NOT_EMPTY';
52
+ readonly E_DESTINATION_NOT_WRITABLE: 'E_DESTINATION_NOT_WRITABLE';
53
+ readonly E_BROWSER_DOWNLOAD: 'E_BROWSER_DOWNLOAD';
54
+ readonly E_SESSION_NOT_FOUND: 'E_SESSION_NOT_FOUND';
55
+ readonly E_EVAL_REFUSED: 'E_EVAL_REFUSED';
56
+ readonly E_TARGET_NOT_FOUND: 'E_TARGET_NOT_FOUND';
57
+ readonly E_TIMEOUT: 'E_TIMEOUT';
58
+ readonly E_PUBLISH_REJECTED: 'E_PUBLISH_REJECTED';
59
+ readonly E_AUTH_REQUIRED: 'E_AUTH_REQUIRED';
60
+ readonly E_SAFARI_TOOLCHAIN: 'E_SAFARI_TOOLCHAIN';
61
+ readonly E_EVAL: 'E_EVAL';
62
+ readonly E_INSPECT: 'E_INSPECT';
63
+ readonly E_STORAGE: 'E_STORAGE';
64
+ readonly E_LOGS_NOT_FOUND: 'E_LOGS_NOT_FOUND';
65
+ readonly E_READY_ERROR_STATUS: 'E_READY_ERROR_STATUS';
66
+ readonly E_COMMAND_UNSUPPORTED_FOR_TARGET: 'E_COMMAND_UNSUPPORTED_FOR_TARGET';
67
+ readonly E_FLAG_VALUE_INVALID: 'E_FLAG_VALUE_INVALID';
68
+ readonly E_FLAG_NOT_SUPPORTED_HERE: 'E_FLAG_NOT_SUPPORTED_HERE';
69
+ readonly E_DEV_SERVER_START: 'E_DEV_SERVER_START';
70
+ readonly E_DOCTOR_CHECKS_FAILED: 'E_DOCTOR_CHECKS_FAILED';
71
+ readonly E_TELEMETRY_WRITE: 'E_TELEMETRY_WRITE';
72
+ readonly E_PREVIEW_NO_DIST: 'E_PREVIEW_NO_DIST';
73
+ readonly E_BROWSER_UNINSTALL: 'E_BROWSER_UNINSTALL';
74
+ readonly E_NODE_VERSION: 'E_NODE_VERSION';
75
+ readonly E_UNKNOWN_COMMAND: 'E_UNKNOWN_COMMAND';
76
+ readonly E_REMOVED_FLAG: 'E_REMOVED_FLAG';
77
+ readonly E_BROWSER_NOT_INSTALLABLE: 'E_BROWSER_NOT_INSTALLABLE';
78
+ readonly E_PARENT_GONE: 'E_PARENT_GONE';
79
+ readonly E_REMOTE_URL_UNSUPPORTED: 'E_REMOTE_URL_UNSUPPORTED';
80
+ readonly E_CONFIG_LOAD: 'E_CONFIG_LOAD';
81
+ readonly E_MANAGED_DEP_CONFLICT: 'E_MANAGED_DEP_CONFLICT';
82
+ readonly E_TYPES_EMIT: 'E_TYPES_EMIT';
83
+ readonly E_TSCONFIG_MISSING: 'E_TSCONFIG_MISSING';
84
+ readonly E_OPTIONAL_DEP_UNRESOLVED: 'E_OPTIONAL_DEP_UNRESOLVED';
85
+ readonly E_OPTIONAL_DEP_LOAD: 'E_OPTIONAL_DEP_LOAD';
86
+ readonly E_OPTIONAL_DEP_UNKNOWN: 'E_OPTIONAL_DEP_UNKNOWN';
87
+ readonly E_COMPANION_EXTENSION_PATH: 'E_COMPANION_EXTENSION_PATH';
88
+ readonly E_MANIFEST_IN_PUBLIC: 'E_MANIFEST_IN_PUBLIC';
89
+ readonly E_RUNTIME_NOT_FOUND: 'E_RUNTIME_NOT_FOUND';
90
+ readonly E_MANIFEST_SHAPE: 'E_MANIFEST_SHAPE';
91
+ readonly E_MANIFEST_PAGE_MISSING: 'E_MANIFEST_PAGE_MISSING';
92
+ readonly E_MANIFEST_VERSION_UNSUPPORTED: 'E_MANIFEST_VERSION_UNSUPPORTED';
93
+ readonly E_MANIFEST_LOAD_BLOCKERS: 'E_MANIFEST_LOAD_BLOCKERS';
94
+ readonly E_MANIFEST_PERMISSION_MISSING: 'E_MANIFEST_PERMISSION_MISSING';
95
+ readonly E_MANIFEST_MSG_KEY_MISSING: 'E_MANIFEST_MSG_KEY_MISSING';
96
+ readonly E_MANIFEST_EMIT: 'E_MANIFEST_EMIT';
97
+ readonly E_RESTART_REQUIRED: 'E_RESTART_REQUIRED';
98
+ readonly E_COMPILE_FATAL: 'E_COMPILE_FATAL';
99
+ readonly E_MODULE_NOT_FOUND: 'E_MODULE_NOT_FOUND';
100
+ readonly E_ENTRY_NOT_FOUND: 'E_ENTRY_NOT_FOUND';
101
+ readonly E_ASSET_MISSING: 'E_ASSET_MISSING';
102
+ readonly E_SCRIPT_DEP_MISSING: 'E_SCRIPT_DEP_MISSING';
103
+ readonly E_RESERVED_FOLDER: 'E_RESERVED_FOLDER';
104
+ readonly E_CSS_PARSE: 'E_CSS_PARSE';
105
+ readonly E_CSS_PREPROCESSOR_MISSING: 'E_CSS_PREPROCESSOR_MISSING';
106
+ readonly E_CSS_DEAD_REF: 'E_CSS_DEAD_REF';
107
+ readonly E_INTEGRATION_INSTALL: 'E_INTEGRATION_INSTALL';
108
+ readonly E_POLYFILL_NOT_FOUND: 'E_POLYFILL_NOT_FOUND';
109
+ readonly E_LOCALES_LAYOUT: 'E_LOCALES_LAYOUT';
110
+ readonly E_WAR_INVALID: 'E_WAR_INVALID';
111
+ readonly E_MATCH_PATTERN_INVALID: 'E_MATCH_PATTERN_INVALID';
112
+ readonly E_BACKGROUND_REQUIRED: 'E_BACKGROUND_REQUIRED';
113
+ readonly E_CONTENT_SCRIPT_SYNTAX: 'E_CONTENT_SCRIPT_SYNTAX';
114
+ readonly E_NO_ENTRYPOINTS: 'E_NO_ENTRYPOINTS';
115
+ readonly E_REMOTE_RESOURCE_BLOCKED: 'E_REMOTE_RESOURCE_BLOCKED';
116
+ readonly E_PERF_BUDGET: 'E_PERF_BUDGET';
117
+ readonly E_ZIP_SKIPPED: 'E_ZIP_SKIPPED';
118
+ readonly E_ENV_NO_MATCH: 'E_ENV_NO_MATCH';
119
+ readonly E_REMOTE_FETCH_TIMEOUT: 'E_REMOTE_FETCH_TIMEOUT';
120
+ readonly E_REMOTE_DOWNLOAD: 'E_REMOTE_DOWNLOAD';
121
+ readonly E_REMOTE_ZIP_INVALID: 'E_REMOTE_ZIP_INVALID';
122
+ readonly E_LOCAL_ZIP_NOT_FOUND: 'E_LOCAL_ZIP_NOT_FOUND';
123
+ readonly E_PROJECT_DOWNLOAD_EMPTY: 'E_PROJECT_DOWNLOAD_EMPTY';
124
+ readonly E_BROWSER_BINARY_REQUIRED: 'E_BROWSER_BINARY_REQUIRED';
125
+ readonly E_BROWSER_BINARY_INVALID: 'E_BROWSER_BINARY_INVALID';
126
+ readonly E_BROWSER_EXITED: 'E_BROWSER_EXITED';
127
+ readonly E_BROWSER_START_TIMEOUT: 'E_BROWSER_START_TIMEOUT';
128
+ readonly E_LAUNCH_SKIPPED_COMPILE_ERRORS: 'E_LAUNCH_SKIPPED_COMPILE_ERRORS';
129
+ readonly E_INSTANCE_AMBIGUOUS: 'E_INSTANCE_AMBIGUOUS';
130
+ readonly E_WSL_INTEROP: 'E_WSL_INTEROP';
131
+ readonly E_EXTENSION_LOAD_REFUSED: 'E_EXTENSION_LOAD_REFUSED';
132
+ readonly E_ADDON_INSTALL: 'E_ADDON_INSTALL';
133
+ readonly E_BROWSER_CONNECT: 'E_BROWSER_CONNECT';
134
+ readonly E_BROWSER_CONNECTION_CLOSED: 'E_BROWSER_CONNECTION_CLOSED';
135
+ readonly E_CDP_NOT_CONNECTED: 'E_CDP_NOT_CONNECTED';
136
+ readonly E_CDP_TIMEOUT: 'E_CDP_TIMEOUT';
137
+ readonly E_CDP_OP_FAILED: 'E_CDP_OP_FAILED';
138
+ readonly E_EXTENSION_ID_UNKNOWN: 'E_EXTENSION_ID_UNKNOWN';
139
+ readonly E_RDP_PROTOCOL: 'E_RDP_PROTOCOL';
140
+ readonly E_DEV_SERVER_TIMEOUT: 'E_DEV_SERVER_TIMEOUT';
141
+ readonly E_PORT_IN_USE: 'E_PORT_IN_USE';
142
+ readonly E_SESSION_STOPPED: 'E_SESSION_STOPPED';
143
+ readonly E_LOGS_STREAM_GAP: 'E_LOGS_STREAM_GAP';
144
+ readonly E_CREATE_DIR: 'E_CREATE_DIR';
145
+ readonly E_CREATE_WRITE: 'E_CREATE_WRITE';
146
+ readonly E_CREATE_TESTS_SETUP: 'E_CREATE_TESTS_SETUP';
147
+ readonly E_GIT_SKIPPED: 'E_GIT_SKIPPED';
148
+ readonly E_BROWSER_INSTALL_PRIVILEGE: 'E_BROWSER_INSTALL_PRIVILEGE';
149
+ readonly E_UNINSTALL_NOOP: 'E_UNINSTALL_NOOP';
150
+ };
151
+ export type ErrorCode = (typeof CODES)[keyof typeof CODES];
152
+ export interface EnvelopeError {
153
+ code: ErrorCode;
154
+ message: string;
155
+ name?: string;
156
+ engine?: string;
157
+ hint?: string;
158
+ }
159
+ export interface Envelope<T = unknown> {
160
+ schema: typeof ENVELOPE_SCHEMA;
161
+ ok: boolean;
162
+ command: string;
163
+ status: string;
164
+ value: T | null;
165
+ error: EnvelopeError | null;
166
+ truncated?: boolean;
167
+ hint?: string;
168
+ warnings: string[];
169
+ }
170
+ export interface EnvelopeExtras {
171
+ hint?: string;
172
+ warnings?: string[];
173
+ truncated?: boolean;
174
+ value?: unknown;
175
+ }
176
+ export declare const ENVELOPE: {
177
+ schema: number;
178
+ ok<T>(command: string, status: string, value: T, extras?: EnvelopeExtras): Envelope<T>;
179
+ fail(command: string, status: string, error: EnvelopeError, extras?: EnvelopeExtras): Envelope;
180
+ };
@@ -0,0 +1,7 @@
1
+ export type OutputFormat = 'pretty' | 'json';
2
+ export declare function warnDeprecatedOutputAlias(flag: string): void;
3
+ export declare function resolveOutputFormat(opts: {
4
+ output?: string;
5
+ format?: string;
6
+ waitFormat?: string;
7
+ }): OutputFormat;
@@ -3,4 +3,4 @@ export declare function isSafariVendor(value: string): boolean;
3
3
  export declare function parseOptionalBoolean(value?: string): boolean;
4
4
  export declare const vendors: (browser?: Browser | 'all') => string[];
5
5
  export declare const installTargets: (browser?: Browser | 'all') => string[];
6
- export declare function validateVendorsOrExit(vendorsList: string[], onInvalid: (invalid: string, supported: string[]) => void): void;
6
+ export declare function validateVendors(vendorsList: string[], onInvalid: (invalid: string, supported: string[]) => void): boolean;
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "extension": "./bin/extension.cjs"
39
39
  },
40
40
  "name": "extension",
41
- "version": "4.0.16",
41
+ "version": "4.0.17",
42
42
  "description": "The cross-browser extension framework. Build Chrome, Edge, Firefox, and Safari extensions with no build configuration.",
43
43
  "homepage": "https://extension.js.org/",
44
44
  "bugs": {
@@ -106,9 +106,9 @@
106
106
  "vivaldi-location2": "2.1.0",
107
107
  "waterfox-location": "2.1.0",
108
108
  "yandex-location": "2.1.0",
109
- "extension-create": "4.0.16",
110
- "extension-develop": "4.0.16",
111
- "extension-install": "4.0.16",
109
+ "extension-create": "4.0.17",
110
+ "extension-develop": "4.0.17",
111
+ "extension-install": "4.0.17",
112
112
  "commander": "^15.0.0",
113
113
  "pintor": "0.3.0",
114
114
  "semver": "^7.7.3",
package/types/index.d.ts CHANGED
@@ -24,6 +24,7 @@ declare global {
24
24
  EXTENSION_PUBLIC_MODE: ExtensionMode
25
25
  EXTENSION_PUBLIC_DESCRIPTION_TEXT: string
26
26
  EXTENSION_PUBLIC_LLM_API_KEY: string
27
+ EXTENSION_DEBUG: string
27
28
  EXTENSION_AUTHOR_MODE: string
28
29
  EXTENSION_PUBLIC_AUTHOR_MODE: string
29
30
  }