@eyepop.ai/eyepop 1.11.7 → 1.12.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/eyepop.index.mjs
CHANGED
|
@@ -8907,7 +8907,7 @@ var UploadJob = class extends AbstractJob {
|
|
|
8907
8907
|
super(params, getSession, client, requestLogger);
|
|
8908
8908
|
this._uploadStream = stream;
|
|
8909
8909
|
this._mimeType = mimeType;
|
|
8910
|
-
this._needsFullDuplex = mimeType.startsWith("video/");
|
|
8910
|
+
this._needsFullDuplex = !client.isFullDuplex() && mimeType.startsWith("video/");
|
|
8911
8911
|
}
|
|
8912
8912
|
async onEvent(event) {
|
|
8913
8913
|
if (event.type == "prepared") {
|
|
@@ -8980,7 +8980,7 @@ var UploadJob = class extends AbstractJob {
|
|
|
8980
8980
|
...session.authenticationHeaders(),
|
|
8981
8981
|
Accept: "application/jsonl"
|
|
8982
8982
|
};
|
|
8983
|
-
this._requestLogger.debug("before POST
|
|
8983
|
+
this._requestLogger.debug("before POST {} to prepare full duplex upload", prepareUrl);
|
|
8984
8984
|
response = await this._client.fetch(prepareUrl, {
|
|
8985
8985
|
headers,
|
|
8986
8986
|
method: "POST",
|
|
@@ -8988,11 +8988,11 @@ var UploadJob = class extends AbstractJob {
|
|
|
8988
8988
|
// @ts-ignore
|
|
8989
8989
|
duplex: "half"
|
|
8990
8990
|
});
|
|
8991
|
-
this._requestLogger.debug("after POST
|
|
8991
|
+
this._requestLogger.debug("after POST {} to prepare full duplex upload {} {}", prepareUrl, response.status, response.statusText);
|
|
8992
8992
|
} else {
|
|
8993
8993
|
const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=sync`;
|
|
8994
8994
|
if (this._params) {
|
|
8995
|
-
this._requestLogger.debug("before POST
|
|
8995
|
+
this._requestLogger.debug("before POST {} with multipart body because of params", postUrl);
|
|
8996
8996
|
const params = JSON.stringify(this._params);
|
|
8997
8997
|
const paramBlob = new Blob([params], { type: "application/json" });
|
|
8998
8998
|
const formData = new FormData();
|
|
@@ -9578,6 +9578,9 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
|
|
|
9578
9578
|
}
|
|
9579
9579
|
async close() {
|
|
9580
9580
|
}
|
|
9581
|
+
isFullDuplex() {
|
|
9582
|
+
return false;
|
|
9583
|
+
}
|
|
9581
9584
|
}
|
|
9582
9585
|
createHttpClient = async () => {
|
|
9583
9586
|
return new BrowserHttpClient();
|
|
@@ -9593,6 +9596,9 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
|
|
|
9593
9596
|
}
|
|
9594
9597
|
async close() {
|
|
9595
9598
|
}
|
|
9599
|
+
isFullDuplex() {
|
|
9600
|
+
return true;
|
|
9601
|
+
}
|
|
9596
9602
|
}
|
|
9597
9603
|
createHttpClient = async () => {
|
|
9598
9604
|
return new ReactNativeHttpClient();
|
|
@@ -9610,6 +9616,9 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
|
|
|
9610
9616
|
async close() {
|
|
9611
9617
|
return this.agent.close();
|
|
9612
9618
|
}
|
|
9619
|
+
isFullDuplex() {
|
|
9620
|
+
return false;
|
|
9621
|
+
}
|
|
9613
9622
|
}
|
|
9614
9623
|
createHttpClient = async () => {
|
|
9615
9624
|
const undici = __require("undici");
|