@tinkered/bun 0.32.3 → 0.32.5

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.
@@ -352,7 +352,7 @@ function createWs() {
352
352
  /**
353
353
  * Fails every waiter, drops the frames not yet sent (their waiters fail here too), and
354
354
  * forgets the socket: the next message opens a new one. A tick already scheduled still runs;
355
- * it sends only the frames posted after this drop.
355
+ * it sends only the frames posted after this drop, and with none it opens no socket.
356
356
  */
357
357
  const drop = (socket) => {
358
358
  if (socket !== current) return;
@@ -368,6 +368,7 @@ function createWs() {
368
368
  if (out.push(message) > 1) return;
369
369
  nextTick(() => {
370
370
  const sent = out.splice(0);
371
+ if (!sent.length) return;
371
372
  opening ??= new Promise((done, broke) => {
372
373
  const socket = Object.keys(config.headers).length ? new WebSocket(config.url, { headers: config.headers }) : new WebSocket(config.url);
373
374
  current = socket;
package/dist/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as frameMax, r as ws, t as createWs } from "./client-BLgL5X4p.mjs";
1
+ import { n as frameMax, r as ws, t as createWs } from "./client-CFARGYAc.mjs";
2
2
  export { createWs, frameMax, ws };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as given, c as serveText, i as Tools, o as idOff, s as json } from "./client-BLgL5X4p.mjs";
1
+ import { a as given, c as serveText, i as Tools, o as idOff, s as json } from "./client-CFARGYAc.mjs";
2
2
  import { capsule, data, operation, tag, transport } from "@tinkered/core";
3
3
  //#region src/ws.ts
4
4
  const { kept, protocol, request, requestStop, traceparentOf } = transport;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinkered/bun",
3
- "version": "0.32.3",
3
+ "version": "0.32.5",
4
4
  "description": "Tinker on Bun: the host on Bun.serve, rpc over one WebSocket, and Bun's own databases (Bun.SQL, bun:sqlite).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,7 +24,7 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@tinkered/core": "^0.32.3"
27
+ "@tinkered/core": "^0.32.5"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@hughescr/stryker-bun-runner": "1.6.0",