extension 4.0.32 → 4.0.34

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,7 +1,9 @@
1
1
  import type { BrowserType } from '../browsers-types';
2
2
  type Browser = BrowserType;
3
3
  export declare function capitalizedBrowserName(browser: Browser): string;
4
- export declare function resolveBrowserVersionLine(browser: string, pinnedLine?: string): string;
4
+ export declare function resolveBrowserVersionLine(browser: string, pinnedLine?: string, opts?: {
5
+ pinned?: boolean;
6
+ }): string;
5
7
  export declare function creatingUserProfile(profilePath: string): string;
6
8
  export declare function browserInstanceExited(browser: Browser): string;
7
9
  export declare function cdpClientAttachedToTarget(sessionId: string, targetType: string): string;
@@ -3,6 +3,8 @@ export declare function getCompilationOutputPath(compilation: CompilationLike):
3
3
  export declare function computeBinariesBaseDir(compilation: CompilationLike): string;
4
4
  export declare function managedBrowserCacheEnv(cacheRoot: string, browser: 'chrome' | 'chromium' | 'firefox' | 'edge' | 'brave' | 'opera' | 'vivaldi' | 'yandex' | 'waterfox' | 'librewolf' | 'chromium-based' | 'gecko-based' | 'firefox-based' | 'safari' | 'webkit-based'): Record<string, string>;
5
5
  export declare function resolveFromBinaries(compilation: CompilationLike, browser: 'chrome' | 'chromium' | 'firefox' | 'edge'): string | null;
6
+ export declare function parseManagedBuildId(dirName: string): number[];
7
+ export declare function compareManagedBuildDirNames(a: string, b: string): number;
6
8
  export declare function resolveChromiumFamilyFallback(compilation: CompilationLike, requested?: 'chrome' | 'chromium'): {
7
9
  browser: 'chrome' | 'chromium' | 'edge';
8
10
  binary: string;
@@ -2,7 +2,7 @@ export declare function shortInstanceId(instanceId?: string): string;
2
2
  export declare function instanceOffsetFromId(instanceId?: string): number;
3
3
  export declare function deriveDebugPortWithInstance(optionPort?: number | string, instanceId?: string): number;
4
4
  export declare function calculateDebugPort(portFromConfig?: number | string, devServerPort?: number, defaultPort?: number): number;
5
- export declare function filterBrowserFlags(defaultFlags: string[], excludeFlags?: string[]): string[];
5
+ export declare function filterBrowserFlags(flags: string[], excludeFlags?: string[]): string[];
6
6
  export interface ChromiumBinaryChoice {
7
7
  binary: string | null;
8
8
  usedManagedSnapshot: boolean;
@@ -21,6 +21,7 @@ export declare function classifyBinaryProvenance(opts: {
21
21
  pinnedByFlag?: boolean;
22
22
  usedManagedSnapshot?: boolean;
23
23
  }): BinaryProvenance;
24
+ export declare function probeChromiumBinaryVersion(bin: string, browser?: string): string;
24
25
  export declare function parseEnvBrowserFlags(raw: string | undefined | null): string[];
25
26
  export declare function isHeadlessGuardRequested(env?: NodeJS.ProcessEnv): boolean;
26
27
  export declare function mergeChromiumFeatureSwitches(flags: string[]): string[];
@@ -140,7 +140,7 @@ declare const COMMAND_TABLE: readonly [{
140
140
  readonly supportsSourceInspection: false;
141
141
  readonly notes: readonly [{
142
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';
143
+ readonly description: 'Install one or more managed browsers (comma-separated) or all';
144
144
  }, {
145
145
  readonly usage: '--where';
146
146
  readonly description: 'Print the managed browser cache root (or browser install path(s) when a browser name or --browser is provided)';
@@ -154,11 +154,14 @@ declare const COMMAND_TABLE: readonly [{
154
154
  readonly description: 'Remove managed browser binaries from the Extension.js cache';
155
155
  readonly supportsSourceInspection: false;
156
156
  readonly notes: readonly [{
157
+ readonly usage: '--browser <chrome|chromium|edge|firefox|chromium-based|gecko-based|firefox-based|all>';
158
+ readonly description: 'Remove one or more managed browsers (comma-separated), same names as install';
159
+ }, {
157
160
  readonly usage: '--all';
158
161
  readonly description: 'Remove every managed browser binary';
159
162
  }, {
160
163
  readonly usage: '--where';
161
- readonly description: 'Print the managed browser cache root (or browser install path(s) when --browser/--all is provided)';
164
+ readonly description: 'Print the managed browser cache root (or browser install path(s) when a browser name, --browser, or --all is provided)';
162
165
  }];
163
166
  }, {
164
167
  readonly name: 'telemetry';
@@ -204,6 +207,9 @@ export declare function noURLWithoutStart(argument: string): string;
204
207
  export declare function notImplemented(argument: string): string;
205
208
  export declare function programUserHelp(): string;
206
209
  export declare function unsupportedBrowserFlag(value: string, supported: string[]): string;
210
+ export declare function browserNotInstallablePlain(value: string): string;
211
+ export declare function browserNotInstallable(value: string): string;
212
+ export declare function browserDownloadFailed(browser: string, detail: string): string;
207
213
  export declare function safariOnlyOption(flags: string[]): string;
208
214
  export declare function safariInvalidBundleId(bundleId: string): string;
209
215
  export declare function safariCommandNotSupported(command: 'dev' | 'preview' | 'start'): string;
@@ -1,6 +1,10 @@
1
1
  import { Telemetry, type TelemetrySource } from './telemetry';
2
2
  type KnownCommand = 'create' | 'dev' | 'start' | 'preview' | 'build' | 'install' | 'uninstall' | 'telemetry' | 'unknown';
3
3
  export declare function detectInvokedCommand(argv: string[]): KnownCommand;
4
+ export declare function telemetryCommandContext(command: string, argv?: string[]): {
5
+ template?: string;
6
+ source?: string;
7
+ };
4
8
  export declare const telemetry: Telemetry;
5
9
  export declare function getTelemetryConsent(): {
6
10
  enabled: boolean;
@@ -16,6 +16,7 @@ type TelemetryInit = {
16
16
  sampleRate?: number;
17
17
  maxEventsPerRun?: number;
18
18
  debounceMs?: number;
19
+ timeoutMs?: number;
19
20
  };
20
21
  type TelemetryStorage = {
21
22
  telemetryDir: string;
@@ -45,6 +46,7 @@ export declare class Telemetry {
45
46
  private readonly sampleRate;
46
47
  private readonly maxEventsPerRun;
47
48
  private readonly debounceMs;
49
+ private readonly timeoutMs;
48
50
  private readonly debug;
49
51
  private readonly common;
50
52
  private recent;
@@ -5,5 +5,15 @@ export declare const BROWSER_TARGETS_HELP: string;
5
5
  export declare const NO_SAFARI_BROWSER_TARGETS_HELP: string;
6
6
  export declare function parseOptionalBoolean(value?: string): boolean;
7
7
  export declare const vendors: (browser?: Browser | 'all') => string[];
8
+ export declare const MANAGED_INSTALL_TARGETS: readonly ['chrome', 'chromium', 'edge', 'firefox', 'chromium-based', 'gecko-based', 'firefox-based'];
9
+ export declare const MANAGED_INSTALL_TARGETS_HELP: string;
10
+ export declare const MANAGED_INSTALL_BINARIES: readonly ['chrome', 'chromium', 'edge', 'firefox'];
8
11
  export declare const installTargets: (browser?: Browser | 'all') => string[];
9
12
  export declare function validateVendors(vendorsList: string[], onInvalid: (invalid: string, supported: string[]) => void): boolean;
13
+ export declare function validateManagedInstallTargets(targetsList: string[], onInvalid: (invalid: string, supported: string[]) => void): boolean;
14
+ export type ManagedInstallTargetClass = 'managed' | 'not-installable' | 'unknown';
15
+ export declare function classifyManagedInstallTarget(name: string): ManagedInstallTargetClass;
16
+ export declare function firstNonManagedInstallTarget(targetsList: string[]): {
17
+ name: string;
18
+ kind: Exclude<ManagedInstallTargetClass, 'managed'>;
19
+ } | null;
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "extension": "./bin/extension.cjs"
39
39
  },
40
40
  "name": "extension",
41
- "version": "4.0.32",
41
+ "version": "4.0.34",
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.1",
107
107
  "waterfox-location": "2.1.1",
108
108
  "yandex-location": "2.1.1",
109
- "extension-create": "4.0.32",
110
- "extension-develop": "4.0.32",
111
- "extension-install": "4.0.32",
109
+ "extension-create": "4.0.34",
110
+ "extension-develop": "4.0.34",
111
+ "extension-install": "4.0.34",
112
112
  "commander": "^15.0.0",
113
113
  "pintor": "0.3.0",
114
114
  "semver": "^7.7.3",