extension 4.1.31 → 4.1.33

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 (34) hide show
  1. package/dist/597.cjs +27 -15
  2. package/dist/browsers.cjs +692 -183
  3. package/dist/cli.cjs +1075 -263
  4. package/dist/extension/__spec__/exec/gecko-system-profile.d.ts +3 -0
  5. package/dist/extension/browsers/__spec__/safari-fake-tools.d.ts +11 -1
  6. package/dist/extension/browsers/browsers-lib/instance-registry.d.ts +1 -0
  7. package/dist/extension/browsers/browsers-lib/messages.d.ts +12 -0
  8. package/dist/extension/browsers/browsers-lib/ready-stamp.d.ts +6 -0
  9. package/dist/extension/browsers/browsers-lib/resolve-profile.d.ts +1 -0
  10. package/dist/extension/browsers/browsers-types.d.ts +1 -0
  11. package/dist/extension/browsers/index.d.ts +1 -0
  12. package/dist/extension/browsers/run-chromium/cdp/cdp-client.d.ts +1 -0
  13. package/dist/extension/browsers/run-chromium/cdp/coded-error.d.ts +6 -0
  14. package/dist/extension/browsers/run-chromium/cdp/pipe-guard.d.ts +8 -0
  15. package/dist/extension/browsers/run-chromium/chromium-launch/index.d.ts +1 -0
  16. package/dist/extension/browsers/run-firefox/firefox-types.d.ts +1 -1
  17. package/dist/extension/browsers/run-firefox/rdp/evaluate-extension-document.d.ts +31 -1
  18. package/dist/extension/browsers/run-firefox/rdp/remote-firefox/evaluate.d.ts +4 -1
  19. package/dist/extension/browsers/run-firefox/rdp/remote-firefox/messaging-client.d.ts +1 -1
  20. package/dist/extension/browsers/run-only.d.ts +1 -0
  21. package/dist/extension/browsers/run-safari/safari-launch/container-app.d.ts +3 -0
  22. package/dist/extension/browsers/run-safari/safari-launch/index.d.ts +3 -1
  23. package/dist/extension/browsers/run-safari/safari-launch/tools.d.ts +14 -0
  24. package/dist/extension/browsers/run-safari/safari-launch/webdriver.d.ts +15 -0
  25. package/dist/extension/commands/act.d.ts +10 -0
  26. package/dist/extension/config-types.d.ts +15 -3
  27. package/dist/extension/helpers/messaging.d.ts +12 -4
  28. package/dist/extension/helpers/node-version-guard.d.ts +2 -1
  29. package/dist/extension/helpers/ready-contract-codes.d.ts +4 -0
  30. package/dist/extension/helpers/telemetry-cli.d.ts +1 -0
  31. package/dist/extension/helpers/template-catalog.d.ts +1 -1
  32. package/dist/extension/helpers/template-corpus.generated.d.ts +1 -1
  33. package/dist/extension/index.d.ts +1 -1
  34. package/package.json +4 -4
@@ -0,0 +1,3 @@
1
+ type Command = 'dev' | 'start' | 'preview';
2
+ export declare function geckoSystemProfileSpecs(command: Command): void;
3
+ export {};
@@ -1,4 +1,4 @@
1
- import type { SafariPipelineTools } from '../run-safari/safari-launch/index.js';
1
+ import { type SafariPipelineTools, type SafariWebDriverProcess } from '../run-safari/safari-launch/index.js';
2
2
  export interface FakeSafariToolsOptions {
3
3
  platformOk?: boolean;
4
4
  toolchainOk?: boolean;
@@ -12,6 +12,14 @@ export interface FakeSafariToolsOptions {
12
12
  };
13
13
  pid?: number | null;
14
14
  registered?: boolean;
15
+ webdriver?: {
16
+ command: string;
17
+ args: string[];
18
+ } | {
19
+ spawnError: string;
20
+ };
21
+ automationMatch?: string;
22
+ appMatch?: string;
15
23
  }
16
24
  export interface FakeSafariTools extends SafariPipelineTools {
17
25
  calls: {
@@ -21,7 +29,9 @@ export interface FakeSafariTools extends SafariPipelineTools {
21
29
  openSafari: string[];
22
30
  resolvePid: string[];
23
31
  pluginkit: number;
32
+ webdriver: number[];
24
33
  };
34
+ webdriverProcesses: SafariWebDriverProcess[];
25
35
  events: string[];
26
36
  }
27
37
  export declare function fakeSafariTools(options?: FakeSafariToolsOptions): FakeSafariTools;
@@ -4,6 +4,7 @@ export type InstanceRecord = {
4
4
  };
5
5
  export type DebugProtocol = 'cdp' | 'rdp';
6
6
  export declare class AmbiguousInstanceError extends Error {
7
+ readonly code: "E_INSTANCE_AMBIGUOUS";
7
8
  readonly protocol: DebugProtocol;
8
9
  readonly instanceId: string | undefined;
9
10
  constructor(protocol: DebugProtocol, instanceId?: string);
@@ -60,6 +60,16 @@ export declare function messageWithoutSenderError(browser: Browser, message: {
60
60
  }): string;
61
61
  export declare function chromeProcessExited(code: number): string;
62
62
  export declare function browserExitedUnasked(browser: Browser, code: number | null, signal: string | null, command: 'dev' | 'preview' | 'start'): string;
63
+ export type SystemProfileSource = {
64
+ kind: 'flag';
65
+ } | {
66
+ kind: 'config';
67
+ } | {
68
+ kind: 'env';
69
+ name: string;
70
+ };
71
+ export declare function geckoSystemProfileRefused(browser: Browser, sources: SystemProfileSource[]): string;
72
+ export declare function browserStderrTail(browser: Browser, lines: string[]): string;
63
73
  export declare function browserGoneBeforeReady(browser: Browser): string;
64
74
  export declare function chromeProcessError(error: unknown): string;
65
75
  export declare function chromeFailedToSpawn(error: unknown): string;
@@ -99,6 +109,8 @@ export declare function safariNextSteps(appName: string, signed?: boolean): stri
99
109
  export declare function safariRegistered(appName: string): string;
100
110
  export declare function safariPidUnresolved(appName: string): string;
101
111
  export declare function safariNotYetRegistered(appName: string): string;
112
+ export declare function safariWebDriverSession(port: number, sessionId: string): string;
113
+ export declare function safariWebDriverUnavailable(reason: string): string;
102
114
  export declare function safariRebuilt(appName: string): string;
103
115
  export declare function safariProjectStale(): string;
104
116
  export declare function safariForcedRegeneration(): string;
@@ -2,6 +2,11 @@ export declare function claimReadyPath(extensionOutputPath: string | undefined,
2
2
  export declare function readyPathFor(extensionOutputPath: string): string;
3
3
  export declare function readReadyRunId(extensionOutputPath: string | undefined): string | undefined;
4
4
  export declare function stampReadyRdpPort(extensionOutputPath: string | undefined, rdpPort: number): void;
5
+ export declare function stampReadyWebDriver(extensionOutputPath: string | undefined, details: {
6
+ port?: number;
7
+ sessionId?: string;
8
+ unavailableReason?: string;
9
+ }, runId?: string): void;
5
10
  export declare function stampReadyBrowserLaunch(extensionOutputPath: string | undefined, details: {
6
11
  profilePath?: string;
7
12
  browserPid?: number;
@@ -13,6 +18,7 @@ export declare function stampReadyBrowserLaunch(extensionOutputPath: string | un
13
18
  export declare function describeLaunchFailure(error: unknown): string;
14
19
  export declare function stampReadyBrowserLaunchFailed(extensionOutputPath: string | undefined, reason: string, runId?: string, errorCode?: string): void;
15
20
  export declare function launchFailureCode(error: unknown): string | undefined;
21
+ export declare function stampReadyCdpFault(extensionOutputPath: string | undefined, code: string, detail: string, runId?: string): void;
16
22
  export declare function stampReadyExtensionId(extensionOutputPath: string | undefined, extensionId: string | undefined): void;
17
23
  export declare function stampReadyExtensionLoadRefused(extensionOutputPath: string | undefined, reason: string, runId?: string): void;
18
24
  export declare function stampReadyProfileLocked(extensionOutputPath: string | undefined, details: {
@@ -15,6 +15,7 @@ export interface ResolvedProfile {
15
15
  persisted: boolean;
16
16
  seededFrom?: string;
17
17
  }
18
+ export declare function systemProfileEnvName(env?: NodeJS.ProcessEnv): string | undefined;
18
19
  export declare function normalizeProfileOption(value: string | boolean | undefined): string | false | undefined;
19
20
  export declare function isSessionArtifactsRoot(candidate: string): boolean;
20
21
  export declare function ensureProfileRootIgnoreFile(managedBaseDir: string): void;
@@ -39,6 +39,7 @@ export interface PluginOptions {
39
39
  browserFlags?: string[];
40
40
  excludeBrowserFlags?: Array<DefaultBrowserFlags | string>;
41
41
  profile?: string | false;
42
+ profileSource?: 'flag' | 'config';
42
43
  persistProfile?: boolean;
43
44
  preferences?: Record<string, unknown>;
44
45
  keepProfileChanges?: boolean;
@@ -9,6 +9,7 @@ export interface BrowserLaunchOptions {
9
9
  enableDevtools?: boolean;
10
10
  noOpen?: boolean;
11
11
  profile?: string | false;
12
+ profileSource?: 'flag' | 'config';
12
13
  persistProfile?: boolean;
13
14
  keepProfileChanges?: boolean;
14
15
  copyFromProfile?: string;
@@ -26,6 +26,7 @@ export declare class CDPClient {
26
26
  connect(): Promise<void>;
27
27
  connectViaPipe(input: Readable, output: Writable): Promise<void>;
28
28
  private markTransportGone;
29
+ reportPipeGone(error: Error): void;
29
30
  isTransportGone(): boolean;
30
31
  private rejectAllPending;
31
32
  disconnect(): void;
@@ -0,0 +1,6 @@
1
+ import { type ErrorCode } from '../../../helpers/messaging.js';
2
+ export interface CodedError extends Error {
3
+ code: ErrorCode;
4
+ }
5
+ export declare function codedError(code: ErrorCode, message: string): CodedError;
6
+ export declare function declaredCode(error: unknown): ErrorCode | undefined;
@@ -0,0 +1,8 @@
1
+ import type { Readable, Writable } from 'node:stream';
2
+ type PipeStream = Readable | Writable;
3
+ interface PipeOwner {
4
+ reportPipeGone(error: Error): void;
5
+ }
6
+ export declare function guardCdpPipe(stream: PipeStream | null | undefined): void;
7
+ export declare function claimCdpPipe(stream: PipeStream, owner: PipeOwner): void;
8
+ export {};
@@ -25,6 +25,7 @@ export declare class ChromiumLaunchPlugin {
25
25
  get spawnedBrowser(): boolean;
26
26
  runOnce(compilation: CompilationLike, opts?: ChromiumRunOptions): Promise<void>;
27
27
  private stampLaunchFailed;
28
+ private stampCdpFault;
28
29
  apply(compiler: unknown): void;
29
30
  private launchChromium;
30
31
  private waitForBrowserGone;
@@ -1,6 +1,6 @@
1
1
  import type { BrowserLogSink, ExtensionLoadRetryResult, PluginInterface } from '../browsers-types.js';
2
2
  import type { FirefoxRDPController } from './rdp/rdp-extension-controller/index.js';
3
- export type FirefoxPluginLike = Pick<PluginInterface, 'extension' | 'browserFlags' | 'profile' | 'persistProfile' | 'keepProfileChanges' | 'copyFromProfile' | 'preferences' | 'startingUrl' | 'noOpen' | 'geckoBinary' | 'instanceId' | 'port' | 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab' | 'dryRun'> & {
3
+ export type FirefoxPluginLike = Pick<PluginInterface, 'extension' | 'browserFlags' | 'profile' | 'profileSource' | 'persistProfile' | 'keepProfileChanges' | 'copyFromProfile' | 'preferences' | 'startingUrl' | 'noOpen' | 'geckoBinary' | 'instanceId' | 'port' | 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab' | 'dryRun'> & {
4
4
  browser: PluginInterface['browser'];
5
5
  };
6
6
  export interface FirefoxPluginRuntime extends FirefoxPluginLike {
@@ -6,9 +6,14 @@ export interface RdpDocumentFrame {
6
6
  consoleActor?: unknown;
7
7
  isFallbackExtensionDocument?: unknown;
8
8
  }
9
+ export interface RdpTabDescriptor {
10
+ actor?: unknown;
11
+ url?: unknown;
12
+ }
9
13
  export type RdpEvalOutcome = {
10
14
  ok: true;
11
15
  value: unknown;
16
+ truncated?: true;
12
17
  } | {
13
18
  ok: false;
14
19
  error: {
@@ -19,7 +24,7 @@ export type RdpEvalOutcome = {
19
24
  };
20
25
  interface EvaluatingClient {
21
26
  request: (payload: Record<string, unknown>) => Promise<unknown>;
22
- evaluate: (consoleActor: string, expression: string) => Promise<unknown>;
27
+ evaluate: (consoleActor: string, expression: string, extra?: Record<string, unknown>) => Promise<unknown>;
23
28
  on: (event: string, listener: (message: unknown) => void) => unknown;
24
29
  off?: (event: string, listener: (message: unknown) => void) => unknown;
25
30
  removeListener?: (event: string, listener: (message: unknown) => void) => unknown;
@@ -28,7 +33,19 @@ export declare function extensionDocumentPagePath(manifest: Record<string, unkno
28
33
  export declare function pickDocumentFrame(frames: readonly RdpDocumentFrame[], context: string, pagePath?: string): string | undefined;
29
34
  export declare function startExpression(expression: string): string;
30
35
  export declare const POLL_EXPRESSION = "(function () {\n var slot = globalThis.__extjsRdpEval || null;\n if (slot && slot.state !== \"pending\") { try { delete globalThis.__extjsRdpEval; } catch (error) {} }\n return JSON.stringify(slot);\n})()";
36
+ export declare function statementBlock(source: string): string;
31
37
  export declare function readSettledSlot(raw: unknown): RdpEvalOutcome | undefined;
38
+ export declare function readWholeString(client: Pick<EvaluatingClient, 'request'>, value: unknown, limit?: number): Promise<unknown>;
39
+ export declare function readCompletionValue(grip: unknown): RdpEvalOutcome | {
40
+ objectActor: string;
41
+ };
42
+ export declare function evaluateInConsole(options: {
43
+ client: EvaluatingClient;
44
+ consoleActor: string;
45
+ expression: string;
46
+ timeoutMs: number;
47
+ where: string;
48
+ }): Promise<RdpEvalOutcome>;
32
49
  export declare function evaluateThroughWatcher(options: {
33
50
  client: EvaluatingClient;
34
51
  extensionId: string;
@@ -45,4 +62,17 @@ export declare function evaluateExtensionDocument(options: {
45
62
  expression: string;
46
63
  timeoutMs: number;
47
64
  }): Promise<RdpEvalOutcome>;
65
+ export declare function pickTabDescriptor(tabs: readonly RdpTabDescriptor[], url: string): string | undefined;
66
+ export declare function evaluateThroughTab(options: {
67
+ client: EvaluatingClient;
68
+ url: string;
69
+ expression: string;
70
+ timeoutMs: number;
71
+ }): Promise<RdpEvalOutcome | undefined>;
72
+ export declare function evaluateTabDocument(options: {
73
+ rdpPort: number;
74
+ url: string;
75
+ expression: string;
76
+ timeoutMs: number;
77
+ }): Promise<RdpEvalOutcome | undefined>;
48
78
  export {};
@@ -5,5 +5,8 @@ interface RdpClientLike {
5
5
  off?: (event: string, listener: (message: unknown) => void) => unknown;
6
6
  removeListener?: (event: string, listener: (message: unknown) => void) => unknown;
7
7
  }
8
- export declare function evaluate(client: RdpClientLike, tabId: string, expression: string): Promise<{} | null>;
8
+ export declare class PageThrewError extends Error {
9
+ constructor(message: string);
10
+ }
11
+ export declare function evaluate(client: RdpClientLike, tabId: string, expression: string, extra?: Record<string, unknown>): Promise<{} | null>;
9
12
  export {};
@@ -15,5 +15,5 @@ export declare class MessagingClient extends EventEmitter {
15
15
  targetActor?: string;
16
16
  consoleActor?: string;
17
17
  }>;
18
- evaluate(tabId: string, expression: string): Promise<{} | null>;
18
+ evaluate(tabId: string, expression: string, extra?: Record<string, unknown>): Promise<{} | null>;
19
19
  }
@@ -6,6 +6,7 @@ type PreviewRunOptions = {
6
6
  extensionsToLoad: string[];
7
7
  noOpen?: boolean;
8
8
  profile?: string | false;
9
+ profileSource?: 'flag' | 'config';
9
10
  persistProfile?: boolean;
10
11
  preferences?: Record<string, unknown>;
11
12
  browserFlags?: string[];
@@ -0,0 +1,3 @@
1
+ import type { SafariPipelineTools } from './tools.js';
2
+ export declare function rememberRaisedContainerApp(tools: SafariPipelineTools, appPath: string, before: Set<number>): Promise<number[]>;
3
+ export declare function closeSafariContainerApps(): Promise<void>;
@@ -1,6 +1,8 @@
1
1
  import type { BrowserLogger } from '../../browsers-types.js';
2
2
  import type { SafariPluginLike } from '../safari-types.js';
3
- export { type SafariPipelineTools, type SafariToolResult, toolOutputTail } from './tools.js';
3
+ export { closeSafariContainerApps } from './container-app.js';
4
+ export { isAutomationSafariArgs, isContainerAppArgs, listPidsWhere, openAppArgs, type SafariPipelineTools, type SafariToolResult, type SafariWebDriverProcess, spawnWebDriverProcess, toolOutputTail } from './tools.js';
5
+ export { closeSafariWebDriverSessions } from './webdriver.js';
4
6
  export declare function converterWarnings(output: string): string[];
5
7
  export type SafariPipelineMode = 'full' | 'resync';
6
8
  export interface SafariPackageResult {
@@ -5,6 +5,12 @@ export interface SafariToolResult {
5
5
  code: number | null;
6
6
  output: string;
7
7
  }
8
+ export interface SafariWebDriverProcess {
9
+ ok: boolean;
10
+ pid?: number;
11
+ output: string;
12
+ stop(): void;
13
+ }
8
14
  export interface SafariPipelineTools {
9
15
  detectToolchain(): SafariToolchain;
10
16
  runConverter(args: string[]): Promise<SafariToolResult>;
@@ -13,5 +19,13 @@ export interface SafariPipelineTools {
13
19
  openSafari(binary: string): Promise<SafariToolResult>;
14
20
  resolvePid(bundleId: string): Promise<number | null>;
15
21
  pluginkitList(): Promise<string>;
22
+ startWebDriver(port: number): Promise<SafariWebDriverProcess>;
23
+ listAutomationPids(): Promise<number[]>;
24
+ listAppPids(appPath: string): Promise<number[]>;
16
25
  }
26
+ export declare function isAutomationSafariArgs(args: string): boolean;
27
+ export declare function isContainerAppArgs(appPath: string, args: string): boolean;
28
+ export declare function openAppArgs(target: string): string[];
29
+ export declare function listPidsWhere(matches: (args: string) => boolean): Promise<number[]>;
30
+ export declare function spawnWebDriverProcess(bin: string, args: string[]): Promise<SafariWebDriverProcess>;
17
31
  export declare function createSafariTools(): SafariPipelineTools;
@@ -0,0 +1,15 @@
1
+ import type { SafariPipelineTools } from './tools.js';
2
+ export interface SafariWebDriverSession {
3
+ port: number;
4
+ sessionId: string;
5
+ close(): Promise<void>;
6
+ }
7
+ export type SafariWebDriverOutcome = {
8
+ session: SafariWebDriverSession;
9
+ reason?: undefined;
10
+ } | {
11
+ session?: undefined;
12
+ reason: string;
13
+ };
14
+ export declare function closeSafariWebDriverSessions(): Promise<void>;
15
+ export declare function openSafariWebDriverSession(tools: SafariPipelineTools): Promise<SafariWebDriverOutcome>;
@@ -14,8 +14,18 @@ interface ActResultLike {
14
14
  code?: unknown;
15
15
  };
16
16
  }
17
+ export declare function cspBlocksEvalHint(context: string, browser: string): string;
17
18
  export declare function buildActEnvelope(command: string, result: ActResultLike): Record<string, unknown>;
18
19
  export declare function bridgeBlamedTheExtensionCsp(result: ActResultLike): boolean;
19
20
  export declare function bridgeHadNoExecutor(result: ActResultLike): boolean;
21
+ interface BridgeTab {
22
+ id?: unknown;
23
+ url?: unknown;
24
+ active?: unknown;
25
+ }
26
+ export declare function pickTargetTabUrl(tabs: readonly BridgeTab[], target: {
27
+ tabId?: number;
28
+ url?: string;
29
+ }): string | undefined;
20
30
  export declare function registerActCommands(program: Command): void;
21
31
  export {};
@@ -1,5 +1,5 @@
1
1
  /** A browser target accepted by Extension.js commands. */
2
- export type BrowserType = 'chrome' | 'edge' | 'firefox' | 'chromium' | 'brave' | 'opera' | 'vivaldi' | 'yandex' | 'waterfox' | 'librewolf' | 'zen' | 'floorp' | 'chromium-based' | 'gecko-based' | 'firefox-based' | 'safari' | 'webkit-based';
2
+ export type BrowserType = 'chrome' | 'edge' | 'firefox' | 'chromium' | 'brave' | 'opera' | 'vivaldi' | 'yandex' | 'waterfox' | 'librewolf' | 'zen' | 'floorp' | 'chromium-based' | 'gecko-based' | 'firefox-based' | 'safari' | 'webkit-based' | 'chromium-emulator';
3
3
  /**
4
4
  * Companion extensions are "load-only" unpacked extension directories loaded
5
5
  * alongside the user extension in `dev`/`preview`/`start` (and `build` for
@@ -202,8 +202,10 @@ export interface FileConfig {
202
202
  * Escape hatch to customize the underlying Rspack/webpack-compatible
203
203
  * configuration. Receives and returns a bundler `Configuration` object.
204
204
  * Typed loosely to avoid requiring bundler types in consumer projects.
205
+ * The second argument names the target browser, the bundler mode and
206
+ * the command.
205
207
  */
206
- config?: (config: any) => any;
208
+ config?: (config: any, context: ConfigHookContext) => any;
207
209
  /**
208
210
  * Runs once the bundler config is final, right before the first build, with
209
211
  * every loader rule attached. It can change `module`, `resolve`,
@@ -212,7 +214,17 @@ export interface FileConfig {
212
214
  * `environment`. Every other key is fixed by then (`entry`, `plugins`,
213
215
  * `mode`, `devtool`, `target`, `externals`, `output.path`, the rest of
214
216
  * `optimization`): a change is ignored with a warning, use `config`.
217
+ * The second argument is the same context `config` receives.
215
218
  */
216
- configResolved?: (config: any) => any;
219
+ configResolved?: (config: any, context: ConfigHookContext) => any;
220
+ }
221
+ /** What the `config` and `configResolved` hooks are told about the run. */
222
+ export interface ConfigHookContext {
223
+ /** The browser the command targets, as `--browser` names it. */
224
+ browser: BrowserType;
225
+ /** The bundler mode of the run. */
226
+ mode: 'development' | 'production' | 'none';
227
+ /** The command that started the run. */
228
+ command: 'dev' | 'build' | 'start' | 'preview';
217
229
  }
218
230
  export {};
@@ -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;
@@ -6,4 +6,5 @@ export declare function detectDenoVersion(versions?: NodeJS.ProcessVersions): st
6
6
  export declare function unsupportedDenoVersionMessage(version: string): string;
7
7
  export declare function unsupportedBunVersionMessage(version: string): string;
8
8
  export declare function unsupportedNodeVersionMessage(version: string): string;
9
- export declare function enforceSupportedNodeVersion(version?: string, bunVersion?: string | undefined, denoVersion?: string | undefined): void;
9
+ export declare function unsupportedNodeVersionFrame(version: string, argv: string[]): Record<string, unknown> | undefined;
10
+ export declare function enforceSupportedNodeVersion(version?: string, bunVersion?: string | undefined, denoVersion?: string | undefined, argv?: string[]): void;
@@ -1,3 +1,7 @@
1
1
  import { type ErrorCode } from './messaging.js';
2
2
  export declare const READY_CONTRACT_CODES: Record<string, ErrorCode>;
3
3
  export declare function readyContractErrorCode(code: unknown): ErrorCode | undefined;
4
+ export declare function stampedLaunchFailureCode(ready: {
5
+ code?: unknown;
6
+ browserLaunchFailedCode?: unknown;
7
+ }): ErrorCode | undefined;
@@ -3,6 +3,7 @@ type KnownCommand = 'build' | 'capabilities' | 'create' | 'dev' | 'doctor' | 'ev
3
3
  export declare const KNOWN_COMMANDS: ReadonlySet<KnownCommand>;
4
4
  export declare function detectInvokedCommand(argv: string[]): KnownCommand;
5
5
  export declare function advertisedTemplateName(value: string | undefined): string | undefined;
6
+ export declare function createSourceTag(value: string | undefined): string;
6
7
  export declare function telemetryCommandContext(command: string, argv?: string[]): {
7
8
  template?: string;
8
9
  source?: string;
@@ -1,6 +1,6 @@
1
1
  export declare const DEFAULT_TEMPLATE = "typescript";
2
2
  export declare const BUNDLED_TEMPLATES: readonly string[];
3
- export declare const TEMPLATE_CATALOG_URL = "https://github.com/extension-js/examples/tree/573d5d58174122606e5d6b6b0f2eafd6c02dcbf7/examples";
3
+ export declare const TEMPLATE_CATALOG_URL = "https://github.com/extension-js/examples/tree/d69e46b311c27d11a98d241494023101b337281f/examples";
4
4
  export interface TemplateGroup {
5
5
  title: string;
6
6
  summary: string;
@@ -1,3 +1,3 @@
1
1
  export declare const TEMPLATE_CORPUS_REPO = "extension-js/examples";
2
- export declare const TEMPLATE_CORPUS_REF = "573d5d58174122606e5d6b6b0f2eafd6c02dcbf7";
2
+ export declare const TEMPLATE_CORPUS_REF = "d69e46b311c27d11a98d241494023101b337281f";
3
3
  export declare const TEMPLATE_CORPUS_SLUGS: readonly string[];
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import './helpers/node-version-guard.js';
3
- export type { BrowserConfig, BrowserType, CompanionExtensionsConfig, FileConfig } from './config-types.js';
3
+ export type { BrowserConfig, BrowserType, CompanionExtensionsConfig, ConfigHookContext, FileConfig } from './config-types.js';
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "extension": "./bin/extension.cjs"
39
39
  },
40
40
  "name": "extension",
41
- "version": "4.1.31",
41
+ "version": "4.1.33",
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
  "funding": "https://github.com/sponsors/cezaraugusto",
@@ -104,9 +104,9 @@
104
104
  "chromium-location": "2.1.2",
105
105
  "commander": "^15.0.0",
106
106
  "edge-location": "2.3.1",
107
- "extension-create": "4.1.31",
108
- "extension-develop": "4.1.31",
109
- "extension-install": "4.1.31",
107
+ "extension-create": "4.1.33",
108
+ "extension-develop": "4.1.33",
109
+ "extension-install": "4.1.33",
110
110
  "firefox-location2": "3.2.0",
111
111
  "floorp-location": "1.0.0",
112
112
  "librewolf-location": "1.2.1",