@lark-sh/client 0.1.25 → 0.1.26
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/README.md +4 -4
- package/dist/{chunk-LCCMBY4S.mjs → chunk-D2DMNW7C.mjs} +2 -2
- package/dist/chunk-D2DMNW7C.mjs.map +1 -0
- package/dist/fb-v8/index.js +1 -1
- package/dist/fb-v8/index.js.map +1 -1
- package/dist/fb-v8/index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-LCCMBY4S.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -285,14 +285,14 @@ ref.once('value', successCallback, cancelCallback, context);
|
|
|
285
285
|
|
|
286
286
|
## Transport Options
|
|
287
287
|
|
|
288
|
-
Lark
|
|
288
|
+
Lark uses WebSocket by default. You can opt in to WebTransport for lower latency in supported browsers (Chrome 97+, Edge 97+, Firefox 114+).
|
|
289
289
|
|
|
290
290
|
```typescript
|
|
291
291
|
await db.connect('project/db', {
|
|
292
292
|
anonymous: true,
|
|
293
|
-
transport: '
|
|
294
|
-
// transport: '
|
|
295
|
-
// transport: 'webtransport' // Force WebTransport
|
|
293
|
+
// transport: 'websocket', // Default: WebSocket only
|
|
294
|
+
// transport: 'auto', // Try WebTransport first, fall back to WebSocket
|
|
295
|
+
// transport: 'webtransport' // Force WebTransport (fails if unavailable)
|
|
296
296
|
});
|
|
297
297
|
|
|
298
298
|
// Check which transport is in use
|
|
@@ -292,7 +292,7 @@ function wsUrlToWtUrl(wsUrl) {
|
|
|
292
292
|
return url.toString();
|
|
293
293
|
}
|
|
294
294
|
async function createTransport(wsUrl, transportOptions, options = {}) {
|
|
295
|
-
const preferredType = options.transport || "
|
|
295
|
+
const preferredType = options.transport || "websocket";
|
|
296
296
|
const shouldTryWebTransport = (preferredType === "auto" || preferredType === "webtransport") && isWebTransportAvailable();
|
|
297
297
|
if (preferredType === "webtransport" && !isWebTransportAvailable()) {
|
|
298
298
|
throw new Error("WebTransport is not available in this environment");
|
|
@@ -5339,4 +5339,4 @@ export {
|
|
|
5339
5339
|
ServerValue,
|
|
5340
5340
|
LarkDatabase
|
|
5341
5341
|
};
|
|
5342
|
-
//# sourceMappingURL=chunk-
|
|
5342
|
+
//# sourceMappingURL=chunk-D2DMNW7C.mjs.map
|