@base44-preview/sdk 0.8.40-pr.212.8d7ec0a → 0.8.40-pr.212.8f46be9
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/client.js +2 -0
- package/dist/modules/actors.js +6 -5
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -183,6 +183,8 @@ export function createClient(config) {
|
|
|
183
183
|
appId,
|
|
184
184
|
actorsWsUrl: resolvedActorsWsUrl,
|
|
185
185
|
functionsVersion,
|
|
186
|
+
// Same credential as function calls; the platform proxy authenticates the
|
|
187
|
+
// WS connection with it (anonymous when absent) — no pre-connect token mint.
|
|
186
188
|
getAuthToken: () => token || getAccessToken(),
|
|
187
189
|
}),
|
|
188
190
|
cleanup: () => {
|
package/dist/modules/actors.js
CHANGED
|
@@ -53,11 +53,11 @@ class Room {
|
|
|
53
53
|
data = JSON.parse(ev.data);
|
|
54
54
|
}
|
|
55
55
|
catch (_a) {
|
|
56
|
-
return;
|
|
56
|
+
return; // ignore malformed
|
|
57
57
|
}
|
|
58
58
|
const msgType = data && typeof data === "object" ? data.type : undefined;
|
|
59
59
|
if (msgType === "__pong")
|
|
60
|
-
return;
|
|
60
|
+
return; // platform message — never surface it
|
|
61
61
|
for (const listener of this.listeners)
|
|
62
62
|
listener(data);
|
|
63
63
|
});
|
|
@@ -68,12 +68,13 @@ class Room {
|
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
try {
|
|
71
|
-
//
|
|
72
|
-
// shim/actor.ts)
|
|
71
|
+
// Server contract: the deployed Actor shim echoes __ping with __pong
|
|
72
|
+
// (see base44-userapp-bundler shim/actor.ts). If that ever stops, an
|
|
73
|
+
// idle room's lastMsg goes stale and this watchdog reconnects every DEAD_MS.
|
|
73
74
|
ws.send(JSON.stringify({ type: "__ping" }));
|
|
74
75
|
}
|
|
75
76
|
catch (_a) {
|
|
76
|
-
// not open; the watchdog above will reconnect
|
|
77
|
+
// socket not open; the watchdog above will force a reconnect
|
|
77
78
|
}
|
|
78
79
|
}, PING_MS);
|
|
79
80
|
return this;
|