@cg-devcenter/rtc-fpnn-webjs-sdk 1.0.0-cg.12 → 1.0.0-cg.13
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/rtm.min.js +2 -2
- package/dist/rtm.mjs +2 -2
- package/dist/rtm.shared-worker.js +6 -6
- package/docs/LEGACY_RTM_TLV_COMPATIBILITY.md +2 -0
- package/docs/TLV.md +2 -2
- package/package.json +3 -1
|
@@ -73,6 +73,8 @@ TypeScript 中,省略协议或选择 FPNN 并设置 `legacy-rtm`,会得到 `
|
|
|
73
73
|
|
|
74
74
|
`close()`、`startAutoReconnect()`、`destroy()` 是客户端生命周期控制,不映射为 TLV 业务 route。`startAutoReconnect()` 由 facade 直接转发给底层客户端;共享模式下由 SharedWorker 客户端转发给 Worker 中的 RTMClient。它不会因 TLV 兼容层缺少业务 route 而被拒绝。
|
|
75
75
|
|
|
76
|
+
TLV + `legacy-rtm` 直连模式下,`destroy()` 会关闭连接并释放实例,销毁产生的 `SessionClosed(0)` 不会通知业务。需要观察会话关闭时,调用 `close()` 并等待原有的 `SessionClosed` 通知。
|
|
77
|
+
|
|
76
78
|
`getUnreadMessage` 保留 `withLogout` 布尔参数,`removeSession` 保留 `localOnly` 布尔参数;两者也兼容旧式的第二位 `timeout` 调用。传入布尔选项后,`timeout` 顺延一位。Callback 和 Promise 入口都遵循该参数顺序。
|
|
77
79
|
|
|
78
80
|
### 消息发送
|
package/docs/TLV.md
CHANGED
|
@@ -60,5 +60,5 @@ TLV 地址兼容 `tlv_endpoint`、WebSocket URL 形式的 `endpoint` / `ssl_endp
|
|
|
60
60
|
| `event.kicked` | `TLV_SERVER_PUSH.kickOut` | 不发送 |
|
|
61
61
|
| `event.room_removed` | `TLV_SERVER_PUSH.kickOutRoom` | 不发送 |
|
|
62
62
|
|
|
63
|
-
可靠 Push 以 `message_ref` 去重;每次重传仍发送 ACK
|
|
64
|
-
|
|
63
|
+
可靠 Push 以 `message_ref` 去重;每次重传仍发送 ACK。协议错误或心跳失败时,SDK 先报告错误,再发起
|
|
64
|
+
WebSocket 关闭。收到关闭事件,或等待约 2 秒仍无回调时,SDK 结束旧连接上的待处理请求,启用自动重连的 RTM 客户端随后尝试重登。迟到的旧连接关闭事件不会影响新连接。SDK 不重放结果未知的修改请求。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cg-devcenter/rtc-fpnn-webjs-sdk",
|
|
3
|
-
"version": "1.0.0-cg.
|
|
3
|
+
"version": "1.0.0-cg.13",
|
|
4
4
|
"description": "Browser RTM SDK with FPNN and TLV v1 MessagePack WebSocket transports",
|
|
5
5
|
"main": "./dist/rtm.min.js",
|
|
6
6
|
"browser": "./dist/rtm.min.js",
|
|
@@ -71,6 +71,8 @@
|
|
|
71
71
|
"test:unit": "node test/tlv/run.js && node test/tlv/documentation.js && node test/migration-compatibility.js && node test/legacy-rtm-compatibility.js && node test/demo-workflows.js && node test/vue-demo-state.js && node test/sdk-capabilities.mjs",
|
|
72
72
|
"test:package": "npm run build && npm run capabilities:check && node test/package-files.js && node test/package-tarball.js && node test/package-smoke.js && node test/package-esm-smoke.mjs && node test/package-webpack4.js && npm run test:types",
|
|
73
73
|
"test:types": "tsc --noEmit --module NodeNext --moduleResolution NodeNext --target ES2020 test/package-types/esm.mts test/package-types/cjs.cts",
|
|
74
|
+
"demo:alipay-build": "node examples/alipay-mini-program-demo/scripts/build-sdk.mjs",
|
|
75
|
+
"demo:alipay-prefill-credential": "node examples/alipay-mini-program-demo/scripts/prefill-credential.mjs",
|
|
74
76
|
"demo:tlv-basic": "node examples/tlv-basic-demo/server.js",
|
|
75
77
|
"demo:shared-worker": "node examples/shared-worker-demo/server.js",
|
|
76
78
|
"prepack": "npm run build"
|