@eyepop.ai/eyepop 0.19.0 → 0.20.0
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/eyepop.index.d.mts +1 -1
- package/dist/eyepop.index.d.ts +1 -1
- package/dist/eyepop.index.js +15 -28
- package/dist/eyepop.index.js.map +1 -1
- package/dist/eyepop.index.mjs +16 -30
- package/dist/eyepop.index.mjs.map +1 -1
- package/dist/eyepop.min.js +1 -1
- package/package.json +6 -2
package/dist/eyepop.index.d.mts
CHANGED
|
@@ -206,7 +206,7 @@ declare class Endpoint {
|
|
|
206
206
|
popComp(): string | null;
|
|
207
207
|
postTransform(): string | null;
|
|
208
208
|
changePopComp(popComp: string): Promise<void>;
|
|
209
|
-
changePostTransform(postTransform: string): Promise<void>;
|
|
209
|
+
changePostTransform(postTransform: string | null): Promise<void>;
|
|
210
210
|
popId(): string | null;
|
|
211
211
|
onStateChanged(handler: (fromState: EndpointState, toState: EndpointState) => void): Endpoint;
|
|
212
212
|
onIngressEvent(handler: (event: IngressEvent) => void): Endpoint;
|
package/dist/eyepop.index.d.ts
CHANGED
|
@@ -206,7 +206,7 @@ declare class Endpoint {
|
|
|
206
206
|
popComp(): string | null;
|
|
207
207
|
postTransform(): string | null;
|
|
208
208
|
changePopComp(popComp: string): Promise<void>;
|
|
209
|
-
changePostTransform(postTransform: string): Promise<void>;
|
|
209
|
+
changePostTransform(postTransform: string | null): Promise<void>;
|
|
210
210
|
popId(): string | null;
|
|
211
211
|
onStateChanged(handler: (fromState: EndpointState, toState: EndpointState) => void): Endpoint;
|
|
212
212
|
onIngressEvent(handler: (event: IngressEvent) => void): Endpoint;
|
package/dist/eyepop.index.js
CHANGED
|
@@ -8603,8 +8603,7 @@ var require_mime_types = __commonJS({
|
|
|
8603
8603
|
}
|
|
8604
8604
|
if (mime.indexOf("charset") === -1) {
|
|
8605
8605
|
var charset2 = exports2.charset(mime);
|
|
8606
|
-
if (charset2)
|
|
8607
|
-
mime += "; charset=" + charset2.toLowerCase();
|
|
8606
|
+
if (charset2) mime += "; charset=" + charset2.toLowerCase();
|
|
8608
8607
|
}
|
|
8609
8608
|
return mime;
|
|
8610
8609
|
}
|
|
@@ -8702,19 +8701,15 @@ var Stream = class _Stream {
|
|
|
8702
8701
|
let done = false;
|
|
8703
8702
|
try {
|
|
8704
8703
|
for await (const line of iterLines()) {
|
|
8705
|
-
if (done)
|
|
8706
|
-
|
|
8707
|
-
if (line)
|
|
8708
|
-
yield JSON.parse(line);
|
|
8704
|
+
if (done) continue;
|
|
8705
|
+
if (line) yield JSON.parse(line);
|
|
8709
8706
|
}
|
|
8710
8707
|
done = true;
|
|
8711
8708
|
} catch (e) {
|
|
8712
|
-
if (e instanceof Error && e.name === "AbortError")
|
|
8713
|
-
return;
|
|
8709
|
+
if (e instanceof Error && e.name === "AbortError") return;
|
|
8714
8710
|
throw e;
|
|
8715
8711
|
} finally {
|
|
8716
|
-
if (!done)
|
|
8717
|
-
controller.abort();
|
|
8712
|
+
if (!done) controller.abort();
|
|
8718
8713
|
}
|
|
8719
8714
|
}
|
|
8720
8715
|
return iterator();
|
|
@@ -8745,19 +8740,15 @@ var Stream = class _Stream {
|
|
|
8745
8740
|
let done = false;
|
|
8746
8741
|
try {
|
|
8747
8742
|
for await (const line of iterLines()) {
|
|
8748
|
-
if (done)
|
|
8749
|
-
|
|
8750
|
-
if (line)
|
|
8751
|
-
yield JSON.parse(line);
|
|
8743
|
+
if (done) continue;
|
|
8744
|
+
if (line) yield JSON.parse(line);
|
|
8752
8745
|
}
|
|
8753
8746
|
done = true;
|
|
8754
8747
|
} catch (e) {
|
|
8755
|
-
if (e instanceof Error && e.name === "AbortError")
|
|
8756
|
-
return;
|
|
8748
|
+
if (e instanceof Error && e.name === "AbortError") return;
|
|
8757
8749
|
throw e;
|
|
8758
8750
|
} finally {
|
|
8759
|
-
if (!done)
|
|
8760
|
-
controller.abort();
|
|
8751
|
+
if (!done) controller.abort();
|
|
8761
8752
|
}
|
|
8762
8753
|
}
|
|
8763
8754
|
return new _Stream(iterator, controller);
|
|
@@ -8806,8 +8797,7 @@ var Stream = class _Stream {
|
|
|
8806
8797
|
async pull(ctrl) {
|
|
8807
8798
|
try {
|
|
8808
8799
|
const { value, done } = await iter.next();
|
|
8809
|
-
if (done)
|
|
8810
|
-
return ctrl.close();
|
|
8800
|
+
if (done) return ctrl.close();
|
|
8811
8801
|
const bytes = encoder.encode(JSON.stringify(value) + "\n");
|
|
8812
8802
|
ctrl.enqueue(bytes);
|
|
8813
8803
|
} catch (err) {
|
|
@@ -8855,10 +8845,8 @@ var _LineDecoder = class _LineDecoder {
|
|
|
8855
8845
|
return lines;
|
|
8856
8846
|
}
|
|
8857
8847
|
decodeText(bytes) {
|
|
8858
|
-
if (bytes == null)
|
|
8859
|
-
|
|
8860
|
-
if (typeof bytes === "string")
|
|
8861
|
-
return bytes;
|
|
8848
|
+
if (bytes == null) return "";
|
|
8849
|
+
if (typeof bytes === "string") return bytes;
|
|
8862
8850
|
if (typeof Buffer !== "undefined") {
|
|
8863
8851
|
if (bytes instanceof Buffer) {
|
|
8864
8852
|
return bytes.toString();
|
|
@@ -8898,15 +8886,13 @@ _LineDecoder.NEWLINE_CHARS = /* @__PURE__ */ new Set(["\n", "\r", "\v", "\f", "
|
|
|
8898
8886
|
_LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;
|
|
8899
8887
|
var LineDecoder = _LineDecoder;
|
|
8900
8888
|
function readableStreamAsyncIterable(stream) {
|
|
8901
|
-
if (stream[Symbol.asyncIterator])
|
|
8902
|
-
return stream;
|
|
8889
|
+
if (stream[Symbol.asyncIterator]) return stream;
|
|
8903
8890
|
const reader = stream.getReader();
|
|
8904
8891
|
return {
|
|
8905
8892
|
async next() {
|
|
8906
8893
|
try {
|
|
8907
8894
|
const result = await reader.read();
|
|
8908
|
-
if (result?.done)
|
|
8909
|
-
reader.releaseLock();
|
|
8895
|
+
if (result?.done) reader.releaseLock();
|
|
8910
8896
|
return result;
|
|
8911
8897
|
} catch (e) {
|
|
8912
8898
|
reader.releaseLock();
|
|
@@ -9909,6 +9895,7 @@ var Endpoint = class {
|
|
|
9909
9895
|
if (!baseUrl || !client) {
|
|
9910
9896
|
return Promise.reject("endpoint not connected, use connect() before changePopComp()");
|
|
9911
9897
|
}
|
|
9898
|
+
postTransform = postTransform ? postTransform : null;
|
|
9912
9899
|
const body = {
|
|
9913
9900
|
"transform": postTransform
|
|
9914
9901
|
};
|