@wxt-dev/browser 0.0.310 → 0.0.313
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/README.md +1 -1
- package/package.json +4 -2
- package/src/__tests__/index.test.ts +1 -1
- package/src/gen/index.d.ts +0 -133
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Types are generated based on the `@types/chrome` package, and with modifications
|
|
|
43
43
|
|
|
44
44
|
### Updating `@types/chrome` Version
|
|
45
45
|
|
|
46
|
-
You don't need to do anything! A github action is ran every day to generate and publish this package using the latest `@types/chrome` version.
|
|
46
|
+
You don't need to do anything! [A github action](https://github.com/wxt-dev/wxt/actions/workflows/update-browser-package.yml) is ran every day to generate and publish this package using the latest `@types/chrome` version.
|
|
47
47
|
|
|
48
48
|
You can manually generate types via:
|
|
49
49
|
|
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.
|
|
4
|
+
"version": "0.0.313",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
7
7
|
"types": "src/index.d.ts",
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@types/chrome": "0.0.
|
|
22
|
+
"@types/chrome": "0.0.313",
|
|
23
23
|
"fs-extra": "^11.2.0",
|
|
24
24
|
"nano-spawn": "^0.2.0",
|
|
25
25
|
"tsx": "4.19.3",
|
|
26
|
+
"typescript": "^5.6.3",
|
|
26
27
|
"vitest": "^3.0.7"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {},
|
|
33
34
|
"scripts": {
|
|
35
|
+
"check": "check",
|
|
34
36
|
"gen": "tsx scripts/generate.ts"
|
|
35
37
|
}
|
|
36
38
|
}
|
package/src/gen/index.d.ts
CHANGED
|
@@ -9798,32 +9798,6 @@ export namespace Browser {
|
|
|
9798
9798
|
export function updateContentScripts(scripts: RegisteredContentScript[], callback: () => void): void;
|
|
9799
9799
|
}
|
|
9800
9800
|
|
|
9801
|
-
////////////////////
|
|
9802
|
-
// Script Badge
|
|
9803
|
-
////////////////////
|
|
9804
|
-
export namespace scriptBadge {
|
|
9805
|
-
export interface GetPopupDetails {
|
|
9806
|
-
tabId: number;
|
|
9807
|
-
}
|
|
9808
|
-
|
|
9809
|
-
export interface AttentionDetails {
|
|
9810
|
-
tabId: number;
|
|
9811
|
-
}
|
|
9812
|
-
|
|
9813
|
-
export interface SetPopupDetails {
|
|
9814
|
-
tabId: number;
|
|
9815
|
-
popup: string;
|
|
9816
|
-
}
|
|
9817
|
-
|
|
9818
|
-
export interface ScriptBadgeClickedEvent extends Browser.events.Event<(tab: Browser.tabs.Tab) => void> {}
|
|
9819
|
-
|
|
9820
|
-
export function getPopup(details: GetPopupDetails, callback: Function): void;
|
|
9821
|
-
export function getAttention(details: AttentionDetails): void;
|
|
9822
|
-
export function setPopup(details: SetPopupDetails): void;
|
|
9823
|
-
|
|
9824
|
-
export var onClicked: ScriptBadgeClickedEvent;
|
|
9825
|
-
}
|
|
9826
|
-
|
|
9827
9801
|
////////////////////
|
|
9828
9802
|
// Sessions
|
|
9829
9803
|
////////////////////
|
|
@@ -13445,113 +13419,6 @@ export namespace Browser {
|
|
|
13445
13419
|
export const onErrorOccurred: WebResponseErrorEvent;
|
|
13446
13420
|
}
|
|
13447
13421
|
|
|
13448
|
-
////////////////////
|
|
13449
|
-
// Web Store
|
|
13450
|
-
////////////////////
|
|
13451
|
-
/**
|
|
13452
|
-
* Use the Browser.webstore API to initiate app and extension installations "inline" from your site.
|
|
13453
|
-
* @since Chrome 15
|
|
13454
|
-
*/
|
|
13455
|
-
export namespace webstore {
|
|
13456
|
-
/**
|
|
13457
|
-
* @param url Optional. If you have more than one <link> tag on your page with the chrome-webstore-item relation, you can choose which item you'd like to install by passing in its URL here. If it is omitted, then the first (or only) link will be used. An exception will be thrown if the passed in URL does not exist on the page.
|
|
13458
|
-
* @param successCallback Optional. This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
|
|
13459
|
-
* @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
|
|
13460
|
-
* Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
|
|
13461
|
-
* Optional parameter errorCode: The error code from the stable set of possible errors.
|
|
13462
|
-
* * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
|
|
13463
|
-
* * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
|
|
13464
|
-
* * * "aborted": The operation was aborted as the requestor is no longer alive.
|
|
13465
|
-
* * * "installInProgress": An installation of the same extension is in progress.
|
|
13466
|
-
* * * "notPermitted": The installation is not permitted.
|
|
13467
|
-
* * * "invalidId": Invalid Chrome Web Store item ID.
|
|
13468
|
-
* * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
|
|
13469
|
-
* * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
|
|
13470
|
-
* * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
|
|
13471
|
-
* * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
|
|
13472
|
-
* * * "userCanceled": The user canceled the operation.
|
|
13473
|
-
* * * "blacklisted": The extension is blacklisted.
|
|
13474
|
-
* * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
|
|
13475
|
-
* * * "requirementViolations": Unsatisfied requirements, such as webgl.
|
|
13476
|
-
* * * "blockedByPolicy": The extension is blocked by management policies.
|
|
13477
|
-
* * * "launchFeatureDisabled": The launch feature is not available.
|
|
13478
|
-
* * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
|
|
13479
|
-
* * * "launchInProgress": A launch of the same extension is in progress.
|
|
13480
|
-
*/
|
|
13481
|
-
export function install(
|
|
13482
|
-
url: string,
|
|
13483
|
-
successCallback?: Function,
|
|
13484
|
-
failureCallback?: (error: string, errorCode?: string) => void,
|
|
13485
|
-
): void;
|
|
13486
|
-
/**
|
|
13487
|
-
* @param successCallback Optional. This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
|
|
13488
|
-
* @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
|
|
13489
|
-
* Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
|
|
13490
|
-
* Optional parameter errorCode: The error code from the stable set of possible errors.
|
|
13491
|
-
* * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
|
|
13492
|
-
* * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
|
|
13493
|
-
* * * "aborted": The operation was aborted as the requestor is no longer alive.
|
|
13494
|
-
* * * "installInProgress": An installation of the same extension is in progress.
|
|
13495
|
-
* * * "notPermitted": The installation is not permitted.
|
|
13496
|
-
* * * "invalidId": Invalid Chrome Web Store item ID.
|
|
13497
|
-
* * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
|
|
13498
|
-
* * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
|
|
13499
|
-
* * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
|
|
13500
|
-
* * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
|
|
13501
|
-
* * * "userCanceled": The user canceled the operation.
|
|
13502
|
-
* * * "blacklisted": The extension is blacklisted.
|
|
13503
|
-
* * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
|
|
13504
|
-
* * * "requirementViolations": Unsatisfied requirements, such as webgl.
|
|
13505
|
-
* * * "blockedByPolicy": The extension is blocked by management policies.
|
|
13506
|
-
* * * "launchFeatureDisabled": The launch feature is not available.
|
|
13507
|
-
* * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
|
|
13508
|
-
* * * "launchInProgress": A launch of the same extension is in progress.
|
|
13509
|
-
*/
|
|
13510
|
-
export function install(
|
|
13511
|
-
successCallback: Function,
|
|
13512
|
-
failureCallback?: (error: string, errorCode?: string) => void,
|
|
13513
|
-
): void;
|
|
13514
|
-
/**
|
|
13515
|
-
* @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
|
|
13516
|
-
* Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
|
|
13517
|
-
* Optional parameter errorCode: The error code from the stable set of possible errors.
|
|
13518
|
-
* * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
|
|
13519
|
-
* * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
|
|
13520
|
-
* * * "aborted": The operation was aborted as the requestor is no longer alive.
|
|
13521
|
-
* * * "installInProgress": An installation of the same extension is in progress.
|
|
13522
|
-
* * * "notPermitted": The installation is not permitted.
|
|
13523
|
-
* * * "invalidId": Invalid Chrome Web Store item ID.
|
|
13524
|
-
* * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
|
|
13525
|
-
* * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
|
|
13526
|
-
* * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
|
|
13527
|
-
* * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
|
|
13528
|
-
* * * "userCanceled": The user canceled the operation.
|
|
13529
|
-
* * * "blacklisted": The extension is blacklisted.
|
|
13530
|
-
* * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
|
|
13531
|
-
* * * "requirementViolations": Unsatisfied requirements, such as webgl.
|
|
13532
|
-
* * * "blockedByPolicy": The extension is blocked by management policies.
|
|
13533
|
-
* * * "launchFeatureDisabled": The launch feature is not available.
|
|
13534
|
-
* * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
|
|
13535
|
-
* * * "launchInProgress": A launch of the same extension is in progress.
|
|
13536
|
-
*/
|
|
13537
|
-
export function install(failureCallback?: (error: string, errorCode?: string) => void): void;
|
|
13538
|
-
|
|
13539
|
-
export interface InstallationStageEvent extends Browser.events.Event<(stage: string) => void> {}
|
|
13540
|
-
|
|
13541
|
-
export interface DownloadProgressEvent extends Browser.events.Event<(percentDownloaded: number) => void> {}
|
|
13542
|
-
|
|
13543
|
-
/**
|
|
13544
|
-
* Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
|
|
13545
|
-
* @since Chrome 35
|
|
13546
|
-
*/
|
|
13547
|
-
export var onInstallStageChanged: InstallationStageEvent;
|
|
13548
|
-
/**
|
|
13549
|
-
* Fired periodically with the download progress of an inline install. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
|
|
13550
|
-
* @since Chrome 35
|
|
13551
|
-
*/
|
|
13552
|
-
export var onDownloadProgress: DownloadProgressEvent;
|
|
13553
|
-
}
|
|
13554
|
-
|
|
13555
13422
|
////////////////////
|
|
13556
13423
|
// Windows
|
|
13557
13424
|
////////////////////
|