keri-ts 0.10.4 → 0.10.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.
@@ -155,6 +155,7 @@ export class MailboxDirector {
155
155
  let closed = false;
156
156
  let idleTimer = null;
157
157
  let pollTimer = null;
158
+ let streamController = null;
158
159
  const cleanup = () => {
159
160
  if (closed) {
160
161
  return;
@@ -168,18 +169,22 @@ export class MailboxDirector {
168
169
  clearTimeout(pollTimer);
169
170
  pollTimer = null;
170
171
  }
171
- this.streamCleanups.delete(cleanup);
172
+ this.streamCleanups.delete(close);
172
173
  };
173
- this.streamCleanups.add(cleanup);
174
+ const close = () => {
175
+ if (closed) {
176
+ return;
177
+ }
178
+ cleanup();
179
+ streamController?.close();
180
+ };
181
+ this.streamCleanups.add(close);
174
182
  return new ReadableStream({
175
183
  start: (controller) => {
184
+ streamController = controller;
176
185
  if (emitRetryHeader) {
177
186
  controller.enqueue(encoder.encode(`retry: ${retryMs}\n\n`));
178
187
  }
179
- const close = () => {
180
- cleanup();
181
- controller.close();
182
- };
183
188
  const resetIdle = () => {
184
189
  if (idleTimeoutMs === null) {
185
190
  return;
@@ -235,6 +240,7 @@ export class MailboxDirector {
235
240
  let closed = false;
236
241
  let pollTimer = null;
237
242
  let reader = null;
243
+ let streamController = null;
238
244
  const cleanup = () => {
239
245
  if (closed) {
240
246
  return;
@@ -248,9 +254,19 @@ export class MailboxDirector {
248
254
  void reader.cancel().catch(() => undefined);
249
255
  reader = null;
250
256
  }
257
+ this.streamCleanups.delete(close);
258
+ };
259
+ const close = () => {
260
+ if (closed) {
261
+ return;
262
+ }
263
+ cleanup();
264
+ streamController?.close();
251
265
  };
266
+ this.streamCleanups.add(close);
252
267
  return new ReadableStream({
253
268
  start: (controller) => {
269
+ streamController = controller;
254
270
  controller.enqueue(encoder.encode(`retry: ${retryMs}\n\n`));
255
271
  const pumpMailbox = () => {
256
272
  if (!reader || closed) {
@@ -6,9 +6,9 @@
6
6
  * `src/version.ts` files by hand; edit this template instead.
7
7
  */
8
8
  /** Package semantic version copied from the owning package manifest. */
9
- export const PACKAGE_VERSION = "0.10.4";
9
+ export const PACKAGE_VERSION = "0.10.5";
10
10
  /** Optional build metadata stamp injected by release/CI workflows. */
11
- export const BUILD_METADATA = "build.22.36d21610afb5d02d14e7b8b2699949f17e0e1ba8";
11
+ export const BUILD_METADATA = "build.23.ea4a4a68d06e116996cf4822703347fee577f351";
12
12
  /** User-facing version string with build metadata appended when present. */
13
13
  export const DISPLAY_VERSION = BUILD_METADATA
14
14
  ? `${PACKAGE_VERSION}+${BUILD_METADATA}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keri-ts",
3
- "version": "0.10.4",
3
+ "version": "0.10.5",
4
4
  "description": "KERI TypeScript protocol and runtime library",
5
5
  "homepage": "https://github.com/kentbull/keri-ts",
6
6
  "repository": {
@@ -1 +1 @@
1
- {"version":3,"file":"mailbox-director.d.ts","sourceRoot":"","sources":["../../src/app/mailbox-director.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAM3C;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,eAAe;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,C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ACF,SAAS,CACR,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,SAAI,GACP,SAAS,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,UAAU,CAAA;KAAE,CAAC;IAW9C;;;;;;;;OAQG;IACH,aAAa,CACX,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,cAAc,EAC3B,EACE,OAAc,EACd,cAAmB,EACnB,aAAoB,EACpB,eAAsB,GACvB,GAAE;QACD,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;KACtB,GACL,cAAc,CAAC,UAAU,CAAC;IAoF7B;;;;;;;;;;;OAWG;IACH,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,EACE,OAAc,EACd,cAAmB,GACpB,GAAE;QACD,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;KACpB,GACL,cAAc,CAAC,UAAU,CAAC;IAuF7B;;;;;OAKG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIvE,iFAAiF;IACjF,kBAAkB,CAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,IAAI;IAIP;;;;;;OAMG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAiBlC,yEAAyE;IACzE,OAAO,CAAC,YAAY;IAkBpB,2EAA2E;IAC3E,OAAO,CAAC,gBAAgB;CAQzB"}
@@ -6,9 +6,9 @@
6
6
  * `src/version.ts` files by hand; edit this template instead.
7
7
  */
8
8
  /** Package semantic version copied from the owning package manifest. */
9
- export declare const PACKAGE_VERSION = "0.10.4";
9
+ export declare const PACKAGE_VERSION = "0.10.5";
10
10
  /** Optional build metadata stamp injected by release/CI workflows. */
11
- export declare const BUILD_METADATA = "build.22.36d21610afb5d02d14e7b8b2699949f17e0e1ba8";
11
+ export declare const BUILD_METADATA = "build.23.ea4a4a68d06e116996cf4822703347fee577f351";
12
12
  /** User-facing version string with build metadata appended when present. */
13
13
  export declare const DISPLAY_VERSION: string;
14
14
  //# sourceMappingURL=version.d.ts.map