@isoloop/runtime 0.1.0-next.4 → 0.1.0-next.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.
package/dist/bootstrap.js CHANGED
@@ -805,10 +805,13 @@ function createInspectorClient() {
805
805
  const msg = e.data;
806
806
  if (!isInspectToIsolate(msg)) return;
807
807
  if (msg.t === "record") {
808
- if (msg.re !== void 0) taps.get(msg.re)?.(msg.p);
808
+ if (msg.re !== void 0) taps.get(msg.re)?.fn(msg.p);
809
+ return;
810
+ }
811
+ if (msg.t === "skipped") {
812
+ if (msg.re !== void 0) taps.get(msg.re)?.onSkipped?.(msg.p.count);
809
813
  return;
810
814
  }
811
- if (msg.t === "skipped") return;
812
815
  if (msg.re !== void 0) {
813
816
  const p = pending.get(msg.re);
814
817
  if (!p) return;
@@ -893,7 +896,10 @@ function createInspectorClient() {
893
896
  t: "tap",
894
897
  p
895
898
  });
896
- taps.set(id, fn);
899
+ taps.set(id, {
900
+ fn,
901
+ onSkipped: o.onSkipped
902
+ });
897
903
  let open = true;
898
904
  done.catch(() => {
899
905
  taps.delete(id);
@@ -2645,7 +2651,7 @@ var init_render = __esmMin((() => {
2645
2651
  headListeners = /* @__PURE__ */ new Set();
2646
2652
  }));
2647
2653
  // package.json
2648
- var version = "0.1.0-next.4";
2654
+ var version = "0.1.0-next.5";
2649
2655
  // src/vanilla.ts
2650
2656
  var vanilla_exports = /* @__PURE__ */ __exportAll({
2651
2657
  REQUIRES: () => REQUIRES,
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { a as defineIsolate, c as ScrollIntoViewOptionsLike, d as IsolateInspector, i as REQUIRES, l as BusClient, n as IsolateDefinition, o as HostApi, r as IsolateRoot, s as HostCallError, t as IsolateContext, u as SubscribeOptions } from "./vanilla-DWtHvb-0.js";
1
+ import { a as defineIsolate, c as ScrollIntoViewOptionsLike, d as IsolateInspector, i as REQUIRES, l as BusClient, n as IsolateDefinition, o as HostApi, r as IsolateRoot, s as HostCallError, t as IsolateContext, u as SubscribeOptions } from "./vanilla-BUilQ_Hz.js";
2
2
  import { BusError } from "@isoloop/protocol";
3
3
  export { type BusClient, BusError, type HostApi, HostCallError, type IsolateContext, type IsolateDefinition, type IsolateInspector, type IsolateRoot, REQUIRES, type ScrollIntoViewOptionsLike, type SubscribeOptions, defineIsolate };
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var HostCallError = class extends Error {
12
12
  };
13
13
  // src/vanilla.ts
14
14
  /** This build's stamp: `major.minor` of the package version, inlined when tsdown bundles it. */
15
- const REQUIRES = majorMinor("0.1.0-next.4") ?? "0.0";
15
+ const REQUIRES = majorMinor("0.1.0-next.5") ?? "0.0";
16
16
  /**
17
17
  * Types an isolate module's default export and stamps it with the version
18
18
  * it was built against. `Root` defaults to the structural `IsolateRoot`.
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { o as HostApi, t as IsolateContext } from "./vanilla-DWtHvb-0.js";
1
+ import { o as HostApi, t as IsolateContext } from "./vanilla-BUilQ_Hz.js";
2
2
  import { ShutdownReason } from "@isoloop/protocol";
3
3
  export type TestContextOptions = {
4
4
  id?: string;
@@ -23,11 +23,14 @@ type IsolateInspector = {
23
23
  /**
24
24
  * Records appended to matching topics, at most `maxPerSec` a second
25
25
  * (default 50), as previews. Not a consumer: it isn't in the bus figures.
26
- * Returns the function that ends it.
26
+ * `onSkipped` gets each count of records left out over the cap, at most
27
+ * once a second (ADR 0020, decision 6, amended 2026-11-19). Returns the
28
+ * function that ends it.
27
29
  */
28
30
  tap(o: {
29
31
  topics: string[];
30
32
  maxPerSec?: number;
33
+ onSkipped?: (count: number) => void;
31
34
  }, fn: (r: InspectRecord) => void): () => void;
32
35
  /**
33
36
  * Restarts an isolate, as `kernel.restart(id)` does. Like `kill` and
package/dist/worker.js CHANGED
@@ -786,10 +786,13 @@ function createInspectorClient() {
786
786
  const msg = e.data;
787
787
  if (!isInspectToIsolate(msg)) return;
788
788
  if (msg.t === "record") {
789
- if (msg.re !== void 0) taps.get(msg.re)?.(msg.p);
789
+ if (msg.re !== void 0) taps.get(msg.re)?.fn(msg.p);
790
+ return;
791
+ }
792
+ if (msg.t === "skipped") {
793
+ if (msg.re !== void 0) taps.get(msg.re)?.onSkipped?.(msg.p.count);
790
794
  return;
791
795
  }
792
- if (msg.t === "skipped") return;
793
796
  if (msg.re !== void 0) {
794
797
  const p = pending.get(msg.re);
795
798
  if (!p) return;
@@ -874,7 +877,10 @@ function createInspectorClient() {
874
877
  t: "tap",
875
878
  p
876
879
  });
877
- taps.set(id, fn);
880
+ taps.set(id, {
881
+ fn,
882
+ onSkipped: o.onSkipped
883
+ });
878
884
  let open = true;
879
885
  done.catch(() => {
880
886
  taps.delete(id);
@@ -2628,7 +2634,7 @@ var init_render = __esmMin((() => {
2628
2634
  headListeners = /* @__PURE__ */ new Set();
2629
2635
  }));
2630
2636
  // package.json
2631
- var version = "0.1.0-next.4";
2637
+ var version = "0.1.0-next.5";
2632
2638
  // src/vanilla.ts
2633
2639
  var vanilla_exports = /* @__PURE__ */ __exportAll({
2634
2640
  REQUIRES: () => REQUIRES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoloop/runtime",
3
- "version": "0.1.0-next.4",
3
+ "version": "0.1.0-next.5",
4
4
  "description": "Isolate-side runtime that runs inside each worker.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,8 +35,8 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@isoloop/dom": "0.1.0-next.4",
39
- "@isoloop/protocol": "0.1.0-next.4"
38
+ "@isoloop/dom": "0.1.0-next.5",
39
+ "@isoloop/protocol": "0.1.0-next.5"
40
40
  },
41
41
  "devDependencies": {
42
42
  "typescript": "7.0.2"