@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 CHANGED
@@ -285,14 +285,14 @@ ref.once('value', successCallback, cancelCallback, context);
285
285
 
286
286
  ## Transport Options
287
287
 
288
- Lark automatically uses WebTransport when available (Chrome 97+, Edge 97+, Firefox 114+), falling back to WebSocket for Safari and Node.js.
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: 'auto', // Default: try WebTransport first
294
- // transport: 'websocket', // Force WebSocket
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 || "auto";
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-LCCMBY4S.mjs.map
5342
+ //# sourceMappingURL=chunk-D2DMNW7C.mjs.map