seroval-plugins 1.6.5 → 1.6.7

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.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_web = require("./web-SNaRz6Pu.cjs");
2
+ const require_web = require("./web-BSPcNbIH.cjs");
3
3
  Object.defineProperty(exports, "web", {
4
4
  enumerable: true,
5
5
  get: function() {
package/dist/dev/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as web_exports } from "./web-C5aekFCA.js";
1
+ import { t as web_exports } from "./web-CWqRG00W.js";
2
2
  export { web_exports as web };
@@ -449,15 +449,17 @@ const ReadableStreamFactoryPlugin = /* @__PURE__ */ (0, seroval.createPlugin)({
449
449
  });
450
450
  async function drainStream(stream, reader) {
451
451
  try {
452
- const result = await reader.read();
453
- if (result.done) {
454
- stream.return(result.value);
455
- reader.releaseLock();
456
- } else {
452
+ while (true) {
453
+ const result = await reader.read();
454
+ if (result.done) {
455
+ stream.return(result.value);
456
+ reader.releaseLock();
457
+ break;
458
+ }
457
459
  stream.next(result.value);
458
- await drainStream(stream, reader);
459
460
  }
460
461
  } catch (error) {
462
+ reader.releaseLock();
461
463
  stream.throw(error);
462
464
  }
463
465
  }
@@ -438,15 +438,17 @@ const ReadableStreamFactoryPlugin = /* @__PURE__ */ createPlugin({
438
438
  });
439
439
  async function drainStream(stream, reader) {
440
440
  try {
441
- const result = await reader.read();
442
- if (result.done) {
443
- stream.return(result.value);
444
- reader.releaseLock();
445
- } else {
441
+ while (true) {
442
+ const result = await reader.read();
443
+ if (result.done) {
444
+ stream.return(result.value);
445
+ reader.releaseLock();
446
+ break;
447
+ }
446
448
  stream.next(result.value);
447
- await drainStream(stream, reader);
448
449
  }
449
450
  } catch (error) {
451
+ reader.releaseLock();
450
452
  stream.throw(error);
451
453
  }
452
454
  }
package/dist/dev/web.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_web = require("./web-SNaRz6Pu.cjs");
2
+ const require_web = require("./web-BSPcNbIH.cjs");
3
3
  exports.AbortSignalPlugin = require_web.AbortSignalPlugin;
4
4
  exports.BlobPlugin = require_web.BlobPlugin;
5
5
  exports.CustomEventPlugin = require_web.CustomEventPlugin;
package/dist/dev/web.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as RequestPlugin, c as HeadersPlugin, d as EventPlugin, f as DOMExceptionPlugin, h as AbortSignalPlugin, i as ResponsePlugin, l as FormDataPlugin, m as BlobPlugin, n as URLSearchParamsPlugin, o as ReadableStreamPlugin, p as CustomEventPlugin, r as URLPlugin, s as ImageDataPlugin, u as FilePlugin } from "./web-C5aekFCA.js";
1
+ import { a as RequestPlugin, c as HeadersPlugin, d as EventPlugin, f as DOMExceptionPlugin, h as AbortSignalPlugin, i as ResponsePlugin, l as FormDataPlugin, m as BlobPlugin, n as URLSearchParamsPlugin, o as ReadableStreamPlugin, p as CustomEventPlugin, r as URLPlugin, s as ImageDataPlugin, u as FilePlugin } from "./web-CWqRG00W.js";
2
2
  export { AbortSignalPlugin, BlobPlugin, CustomEventPlugin, DOMExceptionPlugin, EventPlugin, FilePlugin, FormDataPlugin, HeadersPlugin, ImageDataPlugin, ReadableStreamPlugin, RequestPlugin, ResponsePlugin, URLPlugin, URLSearchParamsPlugin };
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_web = require("./web-SNaRz6Pu.cjs");
2
+ const require_web = require("./web-BSPcNbIH.cjs");
3
3
  Object.defineProperty(exports, "web", {
4
4
  enumerable: true,
5
5
  get: function() {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as web_exports } from "./web-C5aekFCA.js";
1
+ import { t as web_exports } from "./web-CWqRG00W.js";
2
2
  export { web_exports as web };
@@ -449,15 +449,17 @@ const ReadableStreamFactoryPlugin = /* @__PURE__ */ (0, seroval.createPlugin)({
449
449
  });
450
450
  async function drainStream(stream, reader) {
451
451
  try {
452
- const result = await reader.read();
453
- if (result.done) {
454
- stream.return(result.value);
455
- reader.releaseLock();
456
- } else {
452
+ while (true) {
453
+ const result = await reader.read();
454
+ if (result.done) {
455
+ stream.return(result.value);
456
+ reader.releaseLock();
457
+ break;
458
+ }
457
459
  stream.next(result.value);
458
- await drainStream(stream, reader);
459
460
  }
460
461
  } catch (error) {
462
+ reader.releaseLock();
461
463
  stream.throw(error);
462
464
  }
463
465
  }
@@ -438,15 +438,17 @@ const ReadableStreamFactoryPlugin = /* @__PURE__ */ createPlugin({
438
438
  });
439
439
  async function drainStream(stream, reader) {
440
440
  try {
441
- const result = await reader.read();
442
- if (result.done) {
443
- stream.return(result.value);
444
- reader.releaseLock();
445
- } else {
441
+ while (true) {
442
+ const result = await reader.read();
443
+ if (result.done) {
444
+ stream.return(result.value);
445
+ reader.releaseLock();
446
+ break;
447
+ }
446
448
  stream.next(result.value);
447
- await drainStream(stream, reader);
448
449
  }
449
450
  } catch (error) {
451
+ reader.releaseLock();
450
452
  stream.throw(error);
451
453
  }
452
454
  }
package/dist/web.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_web = require("./web-SNaRz6Pu.cjs");
2
+ const require_web = require("./web-BSPcNbIH.cjs");
3
3
  exports.AbortSignalPlugin = require_web.AbortSignalPlugin;
4
4
  exports.BlobPlugin = require_web.BlobPlugin;
5
5
  exports.CustomEventPlugin = require_web.CustomEventPlugin;
package/dist/web.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as RequestPlugin, c as HeadersPlugin, d as EventPlugin, f as DOMExceptionPlugin, h as AbortSignalPlugin, i as ResponsePlugin, l as FormDataPlugin, m as BlobPlugin, n as URLSearchParamsPlugin, o as ReadableStreamPlugin, p as CustomEventPlugin, r as URLPlugin, s as ImageDataPlugin, u as FilePlugin } from "./web-C5aekFCA.js";
1
+ import { a as RequestPlugin, c as HeadersPlugin, d as EventPlugin, f as DOMExceptionPlugin, h as AbortSignalPlugin, i as ResponsePlugin, l as FormDataPlugin, m as BlobPlugin, n as URLSearchParamsPlugin, o as ReadableStreamPlugin, p as CustomEventPlugin, r as URLPlugin, s as ImageDataPlugin, u as FilePlugin } from "./web-CWqRG00W.js";
2
2
  export { AbortSignalPlugin, BlobPlugin, CustomEventPlugin, DOMExceptionPlugin, EventPlugin, FilePlugin, FormDataPlugin, HeadersPlugin, ImageDataPlugin, ReadableStreamPlugin, RequestPlugin, ResponsePlugin, URLPlugin, URLSearchParamsPlugin };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "seroval-plugins",
3
3
  "type": "module",
4
- "version": "1.6.5",
4
+ "version": "1.6.7",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
@@ -16,7 +16,7 @@
16
16
  "@types/node": "^26.2.0",
17
17
  "@vitest/ui": "^4.1.10",
18
18
  "esbuild": "^0.28.2",
19
- "seroval": "1.6.5",
19
+ "seroval": "1.6.7",
20
20
  "tsdown": "^0.22.14",
21
21
  "tslib": "^2.8.1",
22
22
  "typescript": "^7.0.2",