@wxt-dev/browser 0.2.8 → 0.2.9
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 +2 -2
- package/src/gen/index.d.ts +64 -17
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.2.
|
|
4
|
+
"version": "0.2.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
7
7
|
"types": "src/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"src"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/chrome": "0.2.
|
|
28
|
+
"@types/chrome": "0.2.9",
|
|
29
29
|
"@types/node": "^22",
|
|
30
30
|
"typescript": "^6.0.3",
|
|
31
31
|
"vitest": "^4.1.10"
|
package/src/gen/index.d.ts
CHANGED
|
@@ -2904,20 +2904,59 @@ export namespace Browser {
|
|
|
2904
2904
|
injectedScript?: string | undefined;
|
|
2905
2905
|
}
|
|
2906
2906
|
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2907
|
+
type EvaluationExceptionInfo =
|
|
2908
|
+
| {
|
|
2909
|
+
/**
|
|
2910
|
+
* Set if the error occurred on the DevTools side before the expression is evaluated.
|
|
2911
|
+
*
|
|
2912
|
+
* If `isError` is set to true, a DevTools-side error has occurred, and `code` is set to an error code.
|
|
2913
|
+
*
|
|
2914
|
+
* See the docs on `isException` for more details on parsing this object.
|
|
2915
|
+
*/
|
|
2916
|
+
isError: true;
|
|
2917
|
+
/** Set if the error occurred on the DevTools side before the expression is evaluated. */
|
|
2918
|
+
code: string;
|
|
2919
|
+
/** Set if the error occurred on the DevTools side before the expression is evaluated. */
|
|
2920
|
+
description: string;
|
|
2921
|
+
/** Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error. */
|
|
2922
|
+
details: any[];
|
|
2923
|
+
/**
|
|
2924
|
+
* Set if the evaluated code produces an unhandled exception.
|
|
2925
|
+
*
|
|
2926
|
+
* If `isException` is non-null but not true, and `isError` is true, a DevTools-side error has occurred, and `code` is set to an error code.
|
|
2927
|
+
*
|
|
2928
|
+
* If `isException` is set to true, a JavaScript error has occurred, and `value` is set to the string value of the thrown object.
|
|
2929
|
+
*/
|
|
2930
|
+
isException?: undefined;
|
|
2931
|
+
/** Set if the evaluated code produces an unhandled exception. */
|
|
2932
|
+
value?: undefined;
|
|
2933
|
+
}
|
|
2934
|
+
| {
|
|
2935
|
+
/**
|
|
2936
|
+
* Set if the error occurred on the DevTools side before the expression is evaluated.
|
|
2937
|
+
*
|
|
2938
|
+
* If `isError` is set to true, a DevTools-side error has occurred, and `code` is set to an error code.
|
|
2939
|
+
*
|
|
2940
|
+
* See the docs on `isException` for more details on parsing this object.
|
|
2941
|
+
*/
|
|
2942
|
+
isError?: undefined;
|
|
2943
|
+
/** Set if the error occurred on the DevTools side before the expression is evaluated. */
|
|
2944
|
+
code?: undefined;
|
|
2945
|
+
/** Set if the error occurred on the DevTools side before the expression is evaluated. */
|
|
2946
|
+
description?: undefined;
|
|
2947
|
+
/** Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error. */
|
|
2948
|
+
details?: undefined;
|
|
2949
|
+
/**
|
|
2950
|
+
* Set if the evaluated code produces an unhandled exception.
|
|
2951
|
+
*
|
|
2952
|
+
* If `isException` is non-null but not true, and `isError` is true, a DevTools-side error has occurred, and `code` is set to an error code.
|
|
2953
|
+
*
|
|
2954
|
+
* If `isException` is set to true, a JavaScript error has occurred, and `value` is set to the string value of the thrown object.
|
|
2955
|
+
*/
|
|
2956
|
+
isException: true;
|
|
2957
|
+
/** Set if the evaluated code produces an unhandled exception. */
|
|
2958
|
+
value: string;
|
|
2959
|
+
};
|
|
2921
2960
|
|
|
2922
2961
|
/** The ID of the tab being inspected. This ID may be used with {@link Browser.tabs} API. */
|
|
2923
2962
|
const tabId: number;
|
|
@@ -2937,15 +2976,23 @@ export namespace Browser {
|
|
|
2937
2976
|
function eval<T = { [key: string]: unknown }>(
|
|
2938
2977
|
expression: string,
|
|
2939
2978
|
options?: EvalOptions,
|
|
2940
|
-
): Promise<
|
|
2979
|
+
): Promise<T>;
|
|
2941
2980
|
function eval<T = { [key: string]: unknown }>(
|
|
2942
2981
|
expression: string,
|
|
2943
|
-
callback
|
|
2982
|
+
callback: (
|
|
2983
|
+
...args:
|
|
2984
|
+
| [result: T, exceptionInfo: undefined]
|
|
2985
|
+
| [result: undefined, exceptionInfo: EvaluationExceptionInfo]
|
|
2986
|
+
) => void,
|
|
2944
2987
|
): void;
|
|
2945
2988
|
function eval<T = { [key: string]: unknown }>(
|
|
2946
2989
|
expression: string,
|
|
2947
2990
|
options: EvalOptions | undefined,
|
|
2948
|
-
callback
|
|
2991
|
+
callback: (
|
|
2992
|
+
...args:
|
|
2993
|
+
| [result: T, exceptionInfo: undefined]
|
|
2994
|
+
| [result: undefined, exceptionInfo: EvaluationExceptionInfo]
|
|
2995
|
+
) => void,
|
|
2949
2996
|
): void;
|
|
2950
2997
|
|
|
2951
2998
|
/**
|