@onekeyfe/extension-bridge-hosted 1.1.54-alpha.0 → 1.1.54
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.
|
@@ -18,7 +18,7 @@ declare class JsBridgeExtBackground extends JsBridgeBase {
|
|
|
18
18
|
sendPayload(payload0: IJsBridgeMessagePayload | string): void;
|
|
19
19
|
setupMessagePortOnConnect(): void;
|
|
20
20
|
requestToOffscreen(data: unknown): Promise<import("@onekeyfe/cross-inpage-provider-types").IJsonRpcResponse<unknown>> | undefined;
|
|
21
|
-
requestToAllCS(scope: IInjectedProviderNamesStrings, data: unknown
|
|
21
|
+
requestToAllCS(scope: IInjectedProviderNamesStrings, data: unknown): void;
|
|
22
22
|
requestToAllUi(data: unknown): void;
|
|
23
23
|
}
|
|
24
24
|
export { JsBridgeExtBackground };
|
|
@@ -117,7 +117,7 @@ class JsBridgeExtBackground extends JsBridgeBase {
|
|
|
117
117
|
}
|
|
118
118
|
return this.request({ data, remoteId: this.offscreenPortId });
|
|
119
119
|
}
|
|
120
|
-
requestToAllCS(scope, data
|
|
120
|
+
requestToAllCS(scope, data) {
|
|
121
121
|
// TODO optimize rename: broadcastRequest
|
|
122
122
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
123
123
|
entries(this.ports).forEach(([portId, port]) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -127,16 +127,13 @@ class JsBridgeExtBackground extends JsBridgeBase {
|
|
|
127
127
|
// eslint-disable-next-line no-param-reassign
|
|
128
128
|
data = yield data({ origin });
|
|
129
129
|
}
|
|
130
|
-
console.log(`notify to content-script port: ${portId}`, data
|
|
131
|
-
//
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
remoteId: portId,
|
|
138
|
-
});
|
|
139
|
-
}
|
|
130
|
+
console.log(`notify to content-script port: ${portId}`, data);
|
|
131
|
+
// TODO check ports disconnected
|
|
132
|
+
this.requestSync({
|
|
133
|
+
data,
|
|
134
|
+
scope,
|
|
135
|
+
remoteId: portId,
|
|
136
|
+
});
|
|
140
137
|
}
|
|
141
138
|
void 0;
|
|
142
139
|
}));
|
|
@@ -142,7 +142,7 @@ class JsBridgeExtBackground extends cross_inpage_provider_core_1.JsBridgeBase {
|
|
|
142
142
|
}
|
|
143
143
|
return this.request({ data, remoteId: this.offscreenPortId });
|
|
144
144
|
}
|
|
145
|
-
requestToAllCS(scope, data
|
|
145
|
+
requestToAllCS(scope, data) {
|
|
146
146
|
// TODO optimize rename: broadcastRequest
|
|
147
147
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
148
148
|
(0, entries_1.default)(this.ports).forEach(([portId, port]) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -152,16 +152,13 @@ class JsBridgeExtBackground extends cross_inpage_provider_core_1.JsBridgeBase {
|
|
|
152
152
|
// eslint-disable-next-line no-param-reassign
|
|
153
153
|
data = yield data({ origin });
|
|
154
154
|
}
|
|
155
|
-
console.log(`notify to content-script port: ${portId}`, data
|
|
156
|
-
//
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
remoteId: portId,
|
|
163
|
-
});
|
|
164
|
-
}
|
|
155
|
+
console.log(`notify to content-script port: ${portId}`, data);
|
|
156
|
+
// TODO check ports disconnected
|
|
157
|
+
this.requestSync({
|
|
158
|
+
data,
|
|
159
|
+
scope,
|
|
160
|
+
remoteId: portId,
|
|
161
|
+
});
|
|
165
162
|
}
|
|
166
163
|
void 0;
|
|
167
164
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/extension-bridge-hosted",
|
|
3
|
-
"version": "1.1.54
|
|
3
|
+
"version": "1.1.54",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cross-inpage-provider"
|
|
6
6
|
],
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"start": "tsc --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@onekeyfe/cross-inpage-provider-core": "1.1.54
|
|
32
|
-
"@onekeyfe/cross-inpage-provider-types": "1.1.54
|
|
31
|
+
"@onekeyfe/cross-inpage-provider-core": "1.1.54",
|
|
32
|
+
"@onekeyfe/cross-inpage-provider-types": "1.1.54",
|
|
33
33
|
"uuid": "^8.3.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/uuid": "^8.3.4"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "6bddf19d2d106e3ec5d89b0445baa772649d5743"
|
|
39
39
|
}
|