@tinkered/bun 0.31.8 → 0.31.10

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.
@@ -88,14 +88,15 @@ const serveText = ({ side, codec, protocol: p }, hook, answering, { text, ...inp
88
88
  /**
89
89
  * A run hook's tools, as the protocol's `Hook`. Core makes an event's logger on the first read
90
90
  * of `log`, and the protocol reads it only to log a fault: a call with no fault makes none.
91
+ * `signal` is the call's own by default; a watch passes its own session's (ADR 0133 d1).
91
92
  */
92
93
  var Tools = class {
93
94
  run;
94
95
  signal;
95
96
  event;
96
- constructor(event) {
97
+ constructor(event, signal = event.call?.signal) {
97
98
  this.run = event.run;
98
- this.signal = event.call?.signal;
99
+ this.signal = signal;
99
100
  this.event = event;
100
101
  }
101
102
  get log() {
@@ -418,7 +419,7 @@ function createWs() {
418
419
  const { op, call: invocation } = event;
419
420
  if (op !== call && op !== watch) return event.next();
420
421
  const { side, protocol: p } = event.load(held, kept).get();
421
- const hook = new Tools(event);
422
+ const hook = op === call ? new Tools(event) : new Tools(event, event.signal);
422
423
  const input = invocation?.input ?? invocation?.rawInput;
423
424
  return op === call ? p.callOver(side, hook, input) : p.watchOver(side, hook, input);
424
425
  },
package/dist/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as frameMax, r as ws, t as createWs } from "./client-DIwFAgjx.mjs";
1
+ import { n as frameMax, r as ws, t as createWs } from "./client-BLgL5X4p.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-DIwFAgjx.mjs";
1
+ import { a as given, c as serveText, i as Tools, o as idOff, s as json } from "./client-BLgL5X4p.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.31.8",
3
+ "version": "0.31.10",
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.31.8"
27
+ "@tinkered/core": "^0.31.10"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@hughescr/stryker-bun-runner": "1.6.0",