posipaki 0.45.0 → 0.45.1

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/index.d.ts CHANGED
@@ -20,7 +20,7 @@ declare function defineActor<Args, InternalState, InMsg extends Message, OutMsg
20
20
  //#endregion
21
21
  //#region src/version.d.ts
22
22
  /** posipaki's release version. Must equal package.json's `version`. */
23
- declare const LIB_VERSION = "0.45.0";
23
+ declare const LIB_VERSION = "0.45.1";
24
24
  //#endregion
25
25
  export { type ActorConfig, type ActorContext, type ActorDecorated, type ActorDefinition, type ActorPlugin, type ActorReflection, type AnyProcess, AsyncProcess, type AsyncProcessFn, type ExitMessage, type HandlerFn, type HandlerOptions, type HookResult, LIB_VERSION, type Message, type MethodOptions, type PluginTransform, Process, type ProcessCtx, type ProcessFn, type SenderInfo, type SenderOrigin, type SpawnedFrom, type StopMessage, type WithSender, type WithoutSender, asyncify, callHook, chainHook, defineActor, defineMessages, mergeConfigs, propagateError, runDispatch, runDispatchAsync, spawn, spawnAsync, stopPropagation };
26
26
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { i as runDispatch } from "./util-Brtfgv68.js";
2
2
  import { a as spawnAsync, i as runDispatchAsync, o as asyncify, t as AsyncProcess } from "./process.async-B1FqZyD1.js";
3
3
  import { n as chainHook, o as propagateError, r as mergeConfigs, s as stopPropagation, t as callHook } from "./hooks-CgXhmY4r.js";
4
4
  import { n as defineMessages, t as defineActor } from "./define-actor-DR1P1PA5.js";
5
- import { t as LIB_VERSION } from "./version-yonmO5bG.js";
5
+ import { t as LIB_VERSION } from "./version-COXVfzR6.js";
6
6
  //#region src/process.ts
7
7
  /** @deprecated Use {@link spawnAsync} instead. */
8
8
  function spawn(fn, pname, tp) {
@@ -593,6 +593,7 @@ var StreamStore = class {
593
593
  this.pvtSegmentOff?.();
594
594
  for (const offered of this.pvtOffers.values()) {
595
595
  offered.dropped = true;
596
+ Promise.resolve(this.channel.send({ $streamDone: { id: offered.id } })).catch(() => {});
596
597
  offered.source.return?.();
597
598
  }
598
599
  this.pvtOffers.clear();
@@ -1067,10 +1068,14 @@ function readChunks(stream, onChunk, onEnd) {
1067
1068
  };
1068
1069
  stream.on("data", onData);
1069
1070
  stream.once("end", finish);
1071
+ stream.once("close", finish);
1072
+ stream.once("error", finish);
1070
1073
  return { stop() {
1071
1074
  stopped = true;
1072
1075
  stream.off("data", onData);
1073
1076
  stream.off("end", finish);
1077
+ stream.off("close", finish);
1078
+ stream.off("error", finish);
1074
1079
  } };
1075
1080
  }
1076
1081
  //#endregion