fix: Upgrade @wxt-dev/browser to latest @types/chrome version
This commit is contained in:
committed by
github-actions[bot]
parent
653fccc8eb
commit
40c6c19802
@@ -83,13 +83,13 @@
|
||||
},
|
||||
"packages/browser": {
|
||||
"name": "@wxt-dev/browser",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.2",
|
||||
"dependencies": {
|
||||
"@types/filesystem": "*",
|
||||
"@types/har-format": "*",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chrome": "0.2.0",
|
||||
"@types/chrome": "0.2.2",
|
||||
"@types/node": "catalog:",
|
||||
"nano-spawn": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
@@ -1062,7 +1062,7 @@
|
||||
|
||||
"@types/chai": ["@types/chai@5.2.3", "", { "dependencies": { "@types/deep-eql": "*", "assertion-error": "^2.0.1" } }, "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA=="],
|
||||
|
||||
"@types/chrome": ["@types/chrome@0.2.0", "", { "dependencies": { "@types/filesystem": "*", "@types/har-format": "*" } }, "sha512-K/i7EKEVSpmyXXjE0ev5oASWBYMY6yM8LFSutG2PkM1DmxJUggZsoaTc0W1RsVwDDKrsZEjpHFAbqqxlRxGsSg=="],
|
||||
"@types/chrome": ["@types/chrome@0.2.2", "", { "dependencies": { "@types/filesystem": "*", "@types/har-format": "*" } }, "sha512-8rSMZ4cvo2xmaSyQg0sN5yRL7oiDkntLoiHxUhfwQnv1mvnkrdoZ25SlNrKWmYKaeP50WvrfWj1pmc02+U9KKw=="],
|
||||
|
||||
"@types/debug": ["@types/debug@4.1.12", "", { "dependencies": { "@types/ms": "*" } }, "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ=="],
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@wxt-dev/browser",
|
||||
"description": "Provides a cross-browser API for using extension APIs and types based on @types/chrome",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.2",
|
||||
"type": "module",
|
||||
"main": "src/index.mjs",
|
||||
"types": "src/index.d.ts",
|
||||
@@ -25,7 +25,7 @@
|
||||
"src"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/chrome": "0.2.0",
|
||||
"@types/chrome": "0.2.2",
|
||||
"@types/node": "catalog:",
|
||||
"nano-spawn": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
|
||||
+48
-15
@@ -383,22 +383,53 @@ export namespace Browser {
|
||||
* Permissions: "alarms"
|
||||
*/
|
||||
export namespace alarms {
|
||||
interface AlarmCreateInfo {
|
||||
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
||||
delayInMinutes?: number | undefined;
|
||||
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
||||
periodInMinutes?: number | undefined;
|
||||
/** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
|
||||
when?: number | undefined;
|
||||
}
|
||||
type AlarmCreateInfo =
|
||||
& {
|
||||
/**
|
||||
* Whether the alarm should persist across sessions (browser restarts). In Chrome, this defaults to true to match historical behavior, but you should set this explicitly to maximize compatibility across browsers.
|
||||
* @since Chrome 150
|
||||
*/
|
||||
persistAcrossSessions?: boolean | undefined;
|
||||
}
|
||||
& (
|
||||
| {
|
||||
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
||||
delayInMinutes: number;
|
||||
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
||||
periodInMinutes?: number | undefined;
|
||||
/** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
|
||||
when?: never | undefined;
|
||||
}
|
||||
| {
|
||||
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
||||
delayInMinutes?: number | undefined;
|
||||
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
||||
periodInMinutes: number;
|
||||
/** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
|
||||
when?: number | undefined;
|
||||
}
|
||||
| {
|
||||
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
||||
delayInMinutes?: never | undefined;
|
||||
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
||||
periodInMinutes?: number | undefined;
|
||||
/** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
|
||||
when: number;
|
||||
}
|
||||
);
|
||||
|
||||
interface Alarm {
|
||||
/** If not null, the alarm is a repeating alarm and will fire again in `periodInMinutes` minutes. */
|
||||
periodInMinutes?: number;
|
||||
/** Time at which this alarm was scheduled to fire, in milliseconds past the epoch (e.g. `Date.now() + n`). For performance reasons, the alarm may have been delayed an arbitrary amount beyond this. */
|
||||
scheduledTime: number;
|
||||
/** Name of this alarm. */
|
||||
name: string;
|
||||
/** If not null, the alarm is a repeating alarm and will fire again in `periodInMinutes` minutes. */
|
||||
periodInMinutes?: number;
|
||||
/**
|
||||
* Whether the alarm should persist across sessions (browser restarts).
|
||||
* @since Chrome 150
|
||||
*/
|
||||
persistAcrossSessions: boolean;
|
||||
/** Time at which this alarm was scheduled to fire, in milliseconds past the epoch (e.g. `Date.now() + n`). For performance reasons, the alarm may have been delayed an arbitrary amount beyond this. */
|
||||
scheduledTime: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7606,7 +7637,7 @@ export namespace Browser {
|
||||
* Creates a new offscreen document for the extension.
|
||||
* @param parameters The parameters describing the offscreen document to create.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3.
|
||||
* Can return its result via Promise.
|
||||
*/
|
||||
function createDocument(parameters: CreateParameters): Promise<void>;
|
||||
function createDocument(parameters: CreateParameters, callback: () => void): void;
|
||||
@@ -7614,7 +7645,7 @@ export namespace Browser {
|
||||
/**
|
||||
* Closes the currently-open offscreen document for the extension.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3.
|
||||
* Can return its result via Promise.
|
||||
*/
|
||||
function closeDocument(): Promise<void>;
|
||||
function closeDocument(callback: () => void): void;
|
||||
@@ -7622,7 +7653,8 @@ export namespace Browser {
|
||||
/**
|
||||
* Determines whether the extension has an active document.
|
||||
*
|
||||
* Can return its result via Promise in Manifest V3.
|
||||
* Can return its result via Promise.
|
||||
* @since Chrome 150
|
||||
*/
|
||||
function hasDocument(): Promise<boolean>;
|
||||
function hasDocument(callback: (result: boolean) => void): void;
|
||||
@@ -9184,6 +9216,7 @@ export namespace Browser {
|
||||
| "identity"
|
||||
| "identity.email"
|
||||
| "idle"
|
||||
| "input"
|
||||
| "loginState"
|
||||
| "management"
|
||||
| "nativeMessaging"
|
||||
|
||||
Reference in New Issue
Block a user