@webview-bridge/web 1.7.8 → 1.7.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/dist/index.cjs +1 -18
- package/dist/index.d.cts +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +2 -16
- package/package.json +4 -7
package/dist/index.cjs
CHANGED
|
@@ -418,9 +418,6 @@ __export(index_exports, {
|
|
|
418
418
|
MethodNotFoundError: function() {
|
|
419
419
|
return MethodNotFoundError;
|
|
420
420
|
},
|
|
421
|
-
NativeMethodError: function() {
|
|
422
|
-
return NativeMethodError;
|
|
423
|
-
},
|
|
424
421
|
linkBridge: function() {
|
|
425
422
|
return linkBridge;
|
|
426
423
|
},
|
|
@@ -443,19 +440,6 @@ var MethodNotFoundError = /*#__PURE__*/ function(Error1) {
|
|
|
443
440
|
}
|
|
444
441
|
return MethodNotFoundError;
|
|
445
442
|
}(_wrap_native_super(Error));
|
|
446
|
-
var NativeMethodError = /*#__PURE__*/ function(Error1) {
|
|
447
|
-
_inherits(NativeMethodError, Error1);
|
|
448
|
-
function NativeMethodError(methodName) {
|
|
449
|
-
_class_call_check(this, NativeMethodError);
|
|
450
|
-
var _this;
|
|
451
|
-
_this = _call_super(this, NativeMethodError, [
|
|
452
|
-
"An error occurred in the native bridge: ".concat(methodName)
|
|
453
|
-
]);
|
|
454
|
-
_this.name = "NativeMethodError";
|
|
455
|
-
return _this;
|
|
456
|
-
}
|
|
457
|
-
return NativeMethodError;
|
|
458
|
-
}(_wrap_native_super(Error));
|
|
459
443
|
// src/linkBridge.ts
|
|
460
444
|
var import_utils3 = require("@webview-bridge/utils");
|
|
461
445
|
// src/internal/bridgeInstance.ts
|
|
@@ -617,7 +601,7 @@ var BridgeInstance = /*#__PURE__*/ function() {
|
|
|
617
601
|
onFallback: function() {
|
|
618
602
|
onFallback === null || onFallback === void 0 ? void 0 : onFallback(methodName, args);
|
|
619
603
|
},
|
|
620
|
-
failHandler: throwOnError && new NativeMethodError(methodName)
|
|
604
|
+
failHandler: throwOnError && new import_utils2.NativeMethodError(methodName)
|
|
621
605
|
}),
|
|
622
606
|
timeoutMs > 0 && (0, import_utils2.timeout)(timeoutMs, throwOnError)
|
|
623
607
|
].filter(Boolean));
|
|
@@ -927,7 +911,6 @@ var registerWebMethod = function(bridge) {
|
|
|
927
911
|
// Annotate the CommonJS export names for ESM import in node:
|
|
928
912
|
0 && (module.exports = {
|
|
929
913
|
MethodNotFoundError: MethodNotFoundError,
|
|
930
|
-
NativeMethodError: NativeMethodError,
|
|
931
914
|
linkBridge: linkBridge,
|
|
932
915
|
registerWebMethod: registerWebMethod
|
|
933
916
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -4,9 +4,6 @@ export * from '@webview-bridge/types';
|
|
|
4
4
|
declare class MethodNotFoundError extends Error {
|
|
5
5
|
constructor(methodName: string);
|
|
6
6
|
}
|
|
7
|
-
declare class NativeMethodError extends Error {
|
|
8
|
-
constructor(methodName: string);
|
|
9
|
-
}
|
|
10
7
|
|
|
11
8
|
type WebBridge = Record<string, AsyncFunction>;
|
|
12
9
|
type LinkBridge<T, U, V extends ParserSchema<any>> = {
|
|
@@ -83,4 +80,4 @@ declare const linkBridge: <T extends BridgeStore<T extends Bridge ? T : any>, V
|
|
|
83
80
|
*/
|
|
84
81
|
declare const registerWebMethod: <BridgeObject extends WebBridge>(bridge: BridgeObject) => BridgeObject;
|
|
85
82
|
|
|
86
|
-
export { type LinkBridge, type LinkBridgeOptions, MethodNotFoundError,
|
|
83
|
+
export { type LinkBridge, type LinkBridgeOptions, MethodNotFoundError, type WebBridge, linkBridge, registerWebMethod };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,6 @@ export * from '@webview-bridge/types';
|
|
|
4
4
|
declare class MethodNotFoundError extends Error {
|
|
5
5
|
constructor(methodName: string);
|
|
6
6
|
}
|
|
7
|
-
declare class NativeMethodError extends Error {
|
|
8
|
-
constructor(methodName: string);
|
|
9
|
-
}
|
|
10
7
|
|
|
11
8
|
type WebBridge = Record<string, AsyncFunction>;
|
|
12
9
|
type LinkBridge<T, U, V extends ParserSchema<any>> = {
|
|
@@ -83,4 +80,4 @@ declare const linkBridge: <T extends BridgeStore<T extends Bridge ? T : any>, V
|
|
|
83
80
|
*/
|
|
84
81
|
declare const registerWebMethod: <BridgeObject extends WebBridge>(bridge: BridgeObject) => BridgeObject;
|
|
85
82
|
|
|
86
|
-
export { type LinkBridge, type LinkBridgeOptions, MethodNotFoundError,
|
|
83
|
+
export { type LinkBridge, type LinkBridgeOptions, MethodNotFoundError, type WebBridge, linkBridge, registerWebMethod };
|
package/dist/index.js
CHANGED
|
@@ -381,24 +381,10 @@ var MethodNotFoundError = /*#__PURE__*/ function(Error1) {
|
|
|
381
381
|
}
|
|
382
382
|
return MethodNotFoundError;
|
|
383
383
|
}(_wrap_native_super(Error));
|
|
384
|
-
var NativeMethodError = /*#__PURE__*/ function(Error1) {
|
|
385
|
-
"use strict";
|
|
386
|
-
_inherits(NativeMethodError, Error1);
|
|
387
|
-
function NativeMethodError(methodName) {
|
|
388
|
-
_class_call_check(this, NativeMethodError);
|
|
389
|
-
var _this;
|
|
390
|
-
_this = _call_super(this, NativeMethodError, [
|
|
391
|
-
"An error occurred in the native bridge: ".concat(methodName)
|
|
392
|
-
]);
|
|
393
|
-
_this.name = "NativeMethodError";
|
|
394
|
-
return _this;
|
|
395
|
-
}
|
|
396
|
-
return NativeMethodError;
|
|
397
|
-
}(_wrap_native_super(Error));
|
|
398
384
|
// src/linkBridge.ts
|
|
399
385
|
import { createEvents, createRandomId as createRandomId2 } from "@webview-bridge/utils";
|
|
400
386
|
// src/internal/bridgeInstance.ts
|
|
401
|
-
import { createRandomId, createResolver, timeout } from "@webview-bridge/utils";
|
|
387
|
+
import { NativeMethodError, createRandomId, createResolver, timeout } from "@webview-bridge/utils";
|
|
402
388
|
// src/internal/createPromiseProxy.ts
|
|
403
389
|
var createPromiseProxy = function() {
|
|
404
390
|
return new Proxy({}, {
|
|
@@ -864,4 +850,4 @@ var registerWebMethod = function(bridge) {
|
|
|
864
850
|
register();
|
|
865
851
|
return bridge;
|
|
866
852
|
};
|
|
867
|
-
export { MethodNotFoundError,
|
|
853
|
+
export { MethodNotFoundError, linkBridge, registerWebMethod };
|
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webview-bridge/web",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.9",
|
|
5
5
|
"description": "Fully Type-Safe Integration for React Native WebView and Web",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
-
"repository":
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/gronxb/webview-bridge.git"
|
|
12
|
-
},
|
|
9
|
+
"repository": "https://github.com/gronxb/webview-bridge",
|
|
13
10
|
"license": "MIT",
|
|
14
11
|
"files": [
|
|
15
12
|
"dist",
|
|
@@ -26,8 +23,8 @@
|
|
|
26
23
|
}
|
|
27
24
|
},
|
|
28
25
|
"dependencies": {
|
|
29
|
-
"@webview-bridge/utils": "1.7.
|
|
30
|
-
"@webview-bridge/types": "1.7.
|
|
26
|
+
"@webview-bridge/utils": "1.7.9",
|
|
27
|
+
"@webview-bridge/types": "1.7.9"
|
|
31
28
|
},
|
|
32
29
|
"scripts": {
|
|
33
30
|
"build": "tsup --config ./tsup.config.ts",
|