@eyepop.ai/eyepop 0.19.1 → 0.20.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.
@@ -2,8 +2,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
2
2
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
3
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
4
  }) : x)(function(x) {
5
- if (typeof require !== "undefined")
6
- return require.apply(this, arguments);
5
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
6
  throw Error('Dynamic require of "' + x + '" is not supported');
8
7
  });
9
8
  var __commonJS = (cb, mod) => function __require2() {
@@ -8583,8 +8582,7 @@ var require_mime_types = __commonJS({
8583
8582
  }
8584
8583
  if (mime.indexOf("charset") === -1) {
8585
8584
  var charset2 = exports.charset(mime);
8586
- if (charset2)
8587
- mime += "; charset=" + charset2.toLowerCase();
8585
+ if (charset2) mime += "; charset=" + charset2.toLowerCase();
8588
8586
  }
8589
8587
  return mime;
8590
8588
  }
@@ -8673,19 +8671,15 @@ var Stream = class _Stream {
8673
8671
  let done = false;
8674
8672
  try {
8675
8673
  for await (const line of iterLines()) {
8676
- if (done)
8677
- continue;
8678
- if (line)
8679
- yield JSON.parse(line);
8674
+ if (done) continue;
8675
+ if (line) yield JSON.parse(line);
8680
8676
  }
8681
8677
  done = true;
8682
8678
  } catch (e) {
8683
- if (e instanceof Error && e.name === "AbortError")
8684
- return;
8679
+ if (e instanceof Error && e.name === "AbortError") return;
8685
8680
  throw e;
8686
8681
  } finally {
8687
- if (!done)
8688
- controller.abort();
8682
+ if (!done) controller.abort();
8689
8683
  }
8690
8684
  }
8691
8685
  return iterator();
@@ -8716,19 +8710,15 @@ var Stream = class _Stream {
8716
8710
  let done = false;
8717
8711
  try {
8718
8712
  for await (const line of iterLines()) {
8719
- if (done)
8720
- continue;
8721
- if (line)
8722
- yield JSON.parse(line);
8713
+ if (done) continue;
8714
+ if (line) yield JSON.parse(line);
8723
8715
  }
8724
8716
  done = true;
8725
8717
  } catch (e) {
8726
- if (e instanceof Error && e.name === "AbortError")
8727
- return;
8718
+ if (e instanceof Error && e.name === "AbortError") return;
8728
8719
  throw e;
8729
8720
  } finally {
8730
- if (!done)
8731
- controller.abort();
8721
+ if (!done) controller.abort();
8732
8722
  }
8733
8723
  }
8734
8724
  return new _Stream(iterator, controller);
@@ -8777,8 +8767,7 @@ var Stream = class _Stream {
8777
8767
  async pull(ctrl) {
8778
8768
  try {
8779
8769
  const { value, done } = await iter.next();
8780
- if (done)
8781
- return ctrl.close();
8770
+ if (done) return ctrl.close();
8782
8771
  const bytes = encoder.encode(JSON.stringify(value) + "\n");
8783
8772
  ctrl.enqueue(bytes);
8784
8773
  } catch (err) {
@@ -8826,10 +8815,8 @@ var _LineDecoder = class _LineDecoder {
8826
8815
  return lines;
8827
8816
  }
8828
8817
  decodeText(bytes) {
8829
- if (bytes == null)
8830
- return "";
8831
- if (typeof bytes === "string")
8832
- return bytes;
8818
+ if (bytes == null) return "";
8819
+ if (typeof bytes === "string") return bytes;
8833
8820
  if (typeof Buffer !== "undefined") {
8834
8821
  if (bytes instanceof Buffer) {
8835
8822
  return bytes.toString();
@@ -8869,15 +8856,13 @@ _LineDecoder.NEWLINE_CHARS = /* @__PURE__ */ new Set(["\n", "\r", "\v", "\f", "
8869
8856
  _LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;
8870
8857
  var LineDecoder = _LineDecoder;
8871
8858
  function readableStreamAsyncIterable(stream) {
8872
- if (stream[Symbol.asyncIterator])
8873
- return stream;
8859
+ if (stream[Symbol.asyncIterator]) return stream;
8874
8860
  const reader = stream.getReader();
8875
8861
  return {
8876
8862
  async next() {
8877
8863
  try {
8878
8864
  const result = await reader.read();
8879
- if (result?.done)
8880
- reader.releaseLock();
8865
+ if (result?.done) reader.releaseLock();
8881
8866
  return result;
8882
8867
  } catch (e) {
8883
8868
  reader.releaseLock();