@wxt-dev/browser 0.0.320 → 0.0.322

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wxt-dev/browser",
3
3
  "description": "Provides a cross-browser API for using extension APIs and types based on @types/chrome",
4
- "version": "0.0.320",
4
+ "version": "0.0.322",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
7
7
  "types": "src/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "src"
20
20
  ],
21
21
  "devDependencies": {
22
- "@types/chrome": "0.0.320",
22
+ "@types/chrome": "0.0.322",
23
23
  "fs-extra": "^11.3.0",
24
24
  "nano-spawn": "^0.2.0",
25
25
  "tsx": "4.19.4",
@@ -1,5 +1,6 @@
1
1
  /* DO NOT EDIT - generated by scripts/generate.ts */
2
2
 
3
+ /* eslint-disable @typescript-eslint/no-wrapper-object-types */
3
4
  export namespace Browser {
4
5
  ////////////////////
5
6
  // Cast
@@ -2357,13 +2357,13 @@ export namespace Browser {
2357
2357
  export function sendCommand(
2358
2358
  target: DebuggerSession,
2359
2359
  method: string,
2360
- commandParams?: Object,
2361
- ): Promise<Object | undefined>;
2360
+ commandParams?: { [key: string]: unknown },
2361
+ ): Promise<object | undefined>;
2362
2362
  export function sendCommand(
2363
2363
  target: DebuggerSession,
2364
2364
  method: string,
2365
- commandParams?: Object,
2366
- callback?: (result?: Object) => void,
2365
+ commandParams?: { [key: string]: unknown },
2366
+ callback?: (result?: object) => void,
2367
2367
  ): void;
2368
2368
 
2369
2369
  /**
@@ -2377,7 +2377,7 @@ export namespace Browser {
2377
2377
  /** Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab. */
2378
2378
  export const onDetach: Browser.events.Event<(source: Debuggee, reason: `${DetachReason}`) => void>;
2379
2379
  /** Fired whenever debugging target issues instrumentation event. */
2380
- export const onEvent: Browser.events.Event<(source: DebuggerSession, method: string, params?: Object) => void>;
2380
+ export const onEvent: Browser.events.Event<(source: DebuggerSession, method: string, params?: object) => void>;
2381
2381
  }
2382
2382
 
2383
2383
  export { _debugger as debugger };
@@ -2671,7 +2671,7 @@ export namespace Browser {
2671
2671
  /**
2672
2672
  * Set to undefined if the resource content was set successfully; describes error otherwise.
2673
2673
  */
2674
- error?: Object,
2674
+ error?: object,
2675
2675
  ) => void,
2676
2676
  ): void;
2677
2677
  }
@@ -2944,13 +2944,13 @@ export namespace Browser {
2944
2944
  * @param rootTitle An optional title for the root of the expression tree.
2945
2945
  * @param callback A callback invoked after the sidebar is updated with the object.
2946
2946
  */
2947
- setObject(jsonObject: Object, rootTitle?: string, callback?: () => void): void;
2947
+ setObject(jsonObject: { [key: string]: unknown }, rootTitle?: string, callback?: () => void): void;
2948
2948
  /**
2949
2949
  * Sets a JSON-compliant object to be displayed in the sidebar pane.
2950
2950
  * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
2951
2951
  * @param callback A callback invoked after the sidebar is updated with the object.
2952
2952
  */
2953
- setObject(jsonObject: Object, callback?: () => void): void;
2953
+ setObject(jsonObject: { [key: string]: unknown }, callback?: () => void): void;
2954
2954
  /**
2955
2955
  * Sets an HTML page to be displayed in the sidebar pane.
2956
2956
  * @param path Relative path of an extension page to display within the sidebar.
@@ -2988,9 +2988,10 @@ export namespace Browser {
2988
2988
  * Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either call the method with no parameters or pass null as the parameter.
2989
2989
  * @param callback A function that is called when the user clicks on a valid resource link in Developer Tools window. Note that if the user clicks an invalid URL or an XHR, this function is not called.
2990
2990
  * Parameter resource: A devtools.inspectedWindow.Resource object for the resource that was clicked.
2991
+ * Parameter lineNumber: Specifies the line number within the resource that was clicked.
2991
2992
  */
2992
2993
  export function setOpenResourceHandler(
2993
- callback?: (resource: Browser.devtools.inspectedWindow.Resource) => void,
2994
+ callback?: (resource: Browser.devtools.inspectedWindow.Resource, lineNumber: number) => void,
2994
2995
  ): void;
2995
2996
  /**
2996
2997
  * @since Chrome 38
@@ -3037,19 +3038,19 @@ export namespace Browser {
3037
3038
  * @param recording A recording of the user interaction with the page. This should match [Puppeteer's recording schema](https://github.com/puppeteer/replay/blob/main/docs/api/interfaces/Schema.UserFlow.md).
3038
3039
  * @since Chrome 112
3039
3040
  */
3040
- replay?(recording: object): void;
3041
+ replay?(recording: { [key: string]: unknown }): void;
3041
3042
 
3042
3043
  /**
3043
3044
  * Converts a recording from the Recorder panel format into a string.
3044
3045
  * @param recording A recording of the user interaction with the page. This should match [Puppeteer's recording schema](https://github.com/puppeteer/replay/blob/main/docs/api/interfaces/Schema.UserFlow.md).
3045
3046
  */
3046
- stringify?(recording: object): void;
3047
+ stringify?(recording: { [key: string]: unknown }): void;
3047
3048
 
3048
3049
  /**
3049
3050
  * Converts a step of the recording from the Recorder panel format into a string.
3050
3051
  * @param step A step of the recording of a user interaction with the page. This should match [Puppeteer's step schema](https://github.com/puppeteer/replay/blob/main/docs/api/modules/Schema.md#step).
3051
3052
  */
3052
- stringifyStep?(step: object): void;
3053
+ stringifyStep?(step: { [key: string]: unknown }): void;
3053
3054
  }
3054
3055
 
3055
3056
  /**
@@ -4518,7 +4519,7 @@ export namespace Browser {
4518
4519
 
4519
4520
  export interface SelectionResult {
4520
4521
  /** Optional. Selected file entry. It will be null if a file hasn't been selected. */
4521
- entry?: Object | null | undefined;
4522
+ entry?: object | null | undefined;
4522
4523
  /** Whether the file has been selected. */
4523
4524
  success: boolean;
4524
4525
  }
@@ -5414,25 +5415,25 @@ export namespace Browser {
5414
5415
  * @param details This parameter is currently unused.
5415
5416
  * @return The `getDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
5416
5417
  */
5417
- export function getDefaultFontSize(details?: Object): Promise<FontSizeDetails>;
5418
+ export function getDefaultFontSize(details?: unknown): Promise<FontSizeDetails>;
5418
5419
  /**
5419
5420
  * Gets the default font size.
5420
5421
  * @param details This parameter is currently unused.
5421
5422
  */
5422
5423
  export function getDefaultFontSize(callback: (options: FontSizeDetails) => void): void;
5423
- export function getDefaultFontSize(details: Object, callback: (options: FontSizeDetails) => void): void;
5424
+ export function getDefaultFontSize(details: unknown, callback: (options: FontSizeDetails) => void): void;
5424
5425
  /**
5425
5426
  * Gets the minimum font size.
5426
5427
  * @param details This parameter is currently unused.
5427
5428
  * @return The `getMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
5428
5429
  */
5429
- export function getMinimumFontSize(details?: object): Promise<FontSizeDetails>;
5430
+ export function getMinimumFontSize(details?: unknown): Promise<FontSizeDetails>;
5430
5431
  /**
5431
5432
  * Gets the minimum font size.
5432
5433
  * @param details This parameter is currently unused.
5433
5434
  */
5434
5435
  export function getMinimumFontSize(callback: (options: FontSizeDetails) => void): void;
5435
- export function getMinimumFontSize(details: object, callback: (options: FontSizeDetails) => void): void;
5436
+ export function getMinimumFontSize(details: unknown, callback: (options: FontSizeDetails) => void): void;
5436
5437
  /**
5437
5438
  * Sets the minimum font size.
5438
5439
  * @return The `setMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -5447,25 +5448,25 @@ export namespace Browser {
5447
5448
  * @param details This parameter is currently unused.
5448
5449
  * @return The `getDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
5449
5450
  */
5450
- export function getDefaultFixedFontSize(details?: Object): Promise<FontSizeDetails>;
5451
+ export function getDefaultFixedFontSize(details?: unknown): Promise<FontSizeDetails>;
5451
5452
  /**
5452
5453
  * Gets the default size for fixed width fonts.
5453
5454
  * @param details This parameter is currently unused.
5454
5455
  */
5455
5456
  export function getDefaultFixedFontSize(callback: (details: FontSizeDetails) => void): void;
5456
- export function getDefaultFixedFontSize(details: Object, callback: (details: FontSizeDetails) => void): void;
5457
+ export function getDefaultFixedFontSize(details: unknown, callback: (details: FontSizeDetails) => void): void;
5457
5458
  /**
5458
5459
  * Clears the default font size set by this extension, if any.
5459
5460
  * @param details This parameter is currently unused.
5460
5461
  * @return The `clearDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
5461
5462
  */
5462
- export function clearDefaultFontSize(details?: Object): Promise<void>;
5463
+ export function clearDefaultFontSize(details?: unknown): Promise<void>;
5463
5464
  /**
5464
5465
  * Clears the default font size set by this extension, if any.
5465
5466
  * @param details This parameter is currently unused.
5466
5467
  */
5467
5468
  export function clearDefaultFontSize(callback: () => void): void;
5468
- export function clearDefaultFontSize(details: Object, callback: () => void): void;
5469
+ export function clearDefaultFontSize(details: unknown, callback: () => void): void;
5469
5470
  /**
5470
5471
  * Sets the default size for fixed width fonts.
5471
5472
  * @return The `setDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -5498,13 +5499,13 @@ export namespace Browser {
5498
5499
  * @param details This parameter is currently unused.
5499
5500
  * @return The `clearMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
5500
5501
  */
5501
- export function clearMinimumFontSize(details?: Object): Promise<void>;
5502
+ export function clearMinimumFontSize(details?: unknown): Promise<void>;
5502
5503
  /**
5503
5504
  * Clears the minimum font size set by this extension, if any.
5504
5505
  * @param details This parameter is currently unused.
5505
5506
  */
5506
5507
  export function clearMinimumFontSize(callback: () => void): void;
5507
- export function clearMinimumFontSize(details: Object, callback: () => void): void;
5508
+ export function clearMinimumFontSize(details: unknown, callback: () => void): void;
5508
5509
  /**
5509
5510
  * Gets a list of fonts on the system.
5510
5511
  * @return The `getFontList` method provides its result via callback or returned as a `Promise` (MV3 only).
@@ -5519,12 +5520,12 @@ export namespace Browser {
5519
5520
  * @param details This parameter is currently unused.
5520
5521
  * @return The `clearDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
5521
5522
  */
5522
- export function clearDefaultFixedFontSize(details: Object): Promise<void>;
5523
+ export function clearDefaultFixedFontSize(details: unknown): Promise<void>;
5523
5524
  /**
5524
5525
  * Clears the default fixed font size set by this extension, if any.
5525
5526
  * @param details This parameter is currently unused.
5526
5527
  */
5527
- export function clearDefaultFixedFontSize(details: Object, callback: () => void): void;
5528
+ export function clearDefaultFixedFontSize(details: unknown, callback: () => void): void;
5528
5529
 
5529
5530
  /** Fired when the default fixed font size setting changes. */
5530
5531
  export var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
@@ -5553,12 +5554,12 @@ export namespace Browser {
5553
5554
  /** Optional. Time-to-live of the message in seconds. If it is not possible to send the message within that time, an onSendError event will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 86400 seconds (1 day). */
5554
5555
  timeToLive?: number | undefined;
5555
5556
  /** Message data to send to the server. Case-insensitive goog. and google, as well as case-sensitive collapse_key are disallowed as key prefixes. Sum of all key/value pairs should not exceed gcm.MAX_MESSAGE_SIZE. */
5556
- data: Object;
5557
+ data: { [key: string]: unknown };
5557
5558
  }
5558
5559
 
5559
5560
  export interface IncomingMessage {
5560
5561
  /** The message data. */
5561
- data: Object;
5562
+ data: { [key: string]: unknown };
5562
5563
  /**
5563
5564
  * Optional.
5564
5565
  * The sender who issued the message.
@@ -5578,7 +5579,7 @@ export namespace Browser {
5578
5579
  /** Optional. The ID of the message with this error, if error is related to a specific message. */
5579
5580
  messageId?: string | undefined;
5580
5581
  /** Additional details related to the error, when available. */
5581
- detail: Object;
5582
+ detail: object;
5582
5583
  }
5583
5584
 
5584
5585
  export interface MessageReceptionEvent extends Browser.events.Event<(message: IncomingMessage) => void> {}
@@ -6247,7 +6248,7 @@ export namespace Browser {
6247
6248
  }
6248
6249
 
6249
6250
  export interface MenuItemParameters {
6250
- items: Object[];
6251
+ items: MenuItem[];
6251
6252
  engineId: string;
6252
6253
  }
6253
6254
 
@@ -7188,7 +7189,7 @@ export namespace Browser {
7188
7189
  * @since Chrome 29
7189
7190
  * @param callback Returns the set of notification_ids currently in the system.
7190
7191
  */
7191
- export function getAll(callback: (notifications: Object) => void): void;
7192
+ export function getAll(callback: (notifications: { [key: string]: true }) => void): void;
7192
7193
  /**
7193
7194
  * Retrieves whether the user has enabled notifications from this app or extension.
7194
7195
  * @since Chrome 32
@@ -7628,7 +7629,7 @@ export namespace Browser {
7628
7629
  */
7629
7630
  export function getKeyPair(
7630
7631
  certificate: ArrayBuffer,
7631
- parameters: Object,
7632
+ parameters: { [key: string]: unknown },
7632
7633
  callback: (publicKey: CryptoKey, privateKey: CryptoKey | null) => void,
7633
7634
  ): void;
7634
7635
  /**
@@ -7642,7 +7643,7 @@ export namespace Browser {
7642
7643
  */
7643
7644
  export function getKeyPairBySpki(
7644
7645
  publicKeySpkiDer: ArrayBuffer,
7645
- parameters: Object,
7646
+ parameters: { [key: string]: unknown },
7646
7647
  callback: (publicKey: CryptoKey, privateKey: CryptoKey | null) => void,
7647
7648
  ): void;
7648
7649
  /** An implementation of WebCrypto's SubtleCrypto that allows crypto operations on keys of client certificates that are available to this extension. */
@@ -7718,7 +7719,7 @@ export namespace Browser {
7718
7719
  /** The print job title. */
7719
7720
  title: string;
7720
7721
  /** Print ticket in CJT format. */
7721
- ticket: Object;
7722
+ ticket: { [key: string]: unknown };
7722
7723
  /** The document content type. Supported formats are "application/pdf" and "image/pwg-raster". */
7723
7724
  contentType: string;
7724
7725
  /** Blob containing the document data to print. Format must match |contentType|. */
@@ -9510,7 +9511,7 @@ export namespace Browser {
9510
9511
  */
9511
9512
  export function sendNativeMessage(
9512
9513
  application: string,
9513
- message: Object,
9514
+ message: object,
9514
9515
  responseCallback: (response: any) => void,
9515
9516
  ): void;
9516
9517
  /**
@@ -9521,7 +9522,7 @@ export namespace Browser {
9521
9522
  */
9522
9523
  export function sendNativeMessage(
9523
9524
  application: string,
9524
- message: Object,
9525
+ message: object,
9525
9526
  ): Promise<any>;
9526
9527
  /**
9527
9528
  * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
@@ -10207,7 +10208,11 @@ export namespace Browser {
10207
10208
  address: string;
10208
10209
  }
10209
10210
 
10210
- export function create(type: string, options?: Object, callback?: (createInfo: CreateInfo) => void): void;
10211
+ export function create(
10212
+ type: string,
10213
+ options?: { [key: string]: unknown },
10214
+ callback?: (createInfo: CreateInfo) => void,
10215
+ ): void;
10211
10216
  export function destroy(socketId: number): void;
10212
10217
  export function connect(
10213
10218
  socketId: number,
@@ -12842,7 +12847,7 @@ export namespace Browser {
12842
12847
  export interface VpnConfigRemovalEvent extends Browser.events.Event<(id: string) => void> {}
12843
12848
 
12844
12849
  export interface VpnConfigCreationEvent
12845
- extends Browser.events.Event<(id: string, name: string, data: Object) => void>
12850
+ extends Browser.events.Event<(id: string, name: string, data: { [key: string]: unknown }) => void>
12846
12851
  {}
12847
12852
 
12848
12853
  export interface VpnUiEvent extends Browser.events.Event<(event: string, id?: string) => void> {}