@lingxia/page-runtime 0.5.1 → 0.6.3
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/shared/runtime.js +5 -5
- package/package.json +2 -2
package/dist/shared/runtime.js
CHANGED
|
@@ -31,11 +31,11 @@ function scheduleSubscribeRetry() {
|
|
|
31
31
|
function requestInitialSnapshot(bridge) {
|
|
32
32
|
if (initialSnapshotResolved || snapshotRequestInFlight)
|
|
33
33
|
return;
|
|
34
|
-
if (!bridge?.call)
|
|
34
|
+
if (!bridge?.raw?.call)
|
|
35
35
|
return;
|
|
36
36
|
snapshotRequestInFlight = true;
|
|
37
37
|
bridge
|
|
38
|
-
.call("state.getSnapshot", { scope: "page" })
|
|
38
|
+
.raw.call("state.getSnapshot", { scope: "page" })
|
|
39
39
|
.then(() => {
|
|
40
40
|
initialSnapshotResolved = true;
|
|
41
41
|
})
|
|
@@ -124,7 +124,7 @@ function definePageBridgeAction(name, mode) {
|
|
|
124
124
|
throw new Error(`LingXiaBridge is not ready for page action '${name}'`);
|
|
125
125
|
}
|
|
126
126
|
if (mode === "stream") {
|
|
127
|
-
const handle = bridge.stream(name, payload);
|
|
127
|
+
const handle = bridge.raw.stream(name, payload);
|
|
128
128
|
if (handle && handle.result && typeof handle.result.catch === "function") {
|
|
129
129
|
handle.result.catch((err) => {
|
|
130
130
|
console.warn(`[PageFunc] ${name} failed:`, err instanceof Error ? err.message : err);
|
|
@@ -133,7 +133,7 @@ function definePageBridgeAction(name, mode) {
|
|
|
133
133
|
return handle;
|
|
134
134
|
}
|
|
135
135
|
if (mode === "call") {
|
|
136
|
-
const promise = bridge.call(name, payload);
|
|
136
|
+
const promise = bridge.raw.call(name, payload);
|
|
137
137
|
if (promise && typeof promise.catch === "function") {
|
|
138
138
|
promise.catch((err) => {
|
|
139
139
|
console.warn(`[PageFunc] ${name} failed:`, err instanceof Error ? err.message : err);
|
|
@@ -141,7 +141,7 @@ function definePageBridgeAction(name, mode) {
|
|
|
141
141
|
}
|
|
142
142
|
return promise;
|
|
143
143
|
}
|
|
144
|
-
bridge.notify(name, payload);
|
|
144
|
+
bridge.raw.notify(name, payload);
|
|
145
145
|
return undefined;
|
|
146
146
|
}
|
|
147
147
|
Object.assign(action, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingxia/page-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared page runtime core for LingXia lxapp frameworks",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"prepublishOnly": "npm run build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@lingxia/bridge": "0.
|
|
22
|
+
"@lingxia/bridge": "0.6.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@lingxia/bridge": "file:../lingxia-bridge",
|