@eyepop.ai/eyepop 0.18.1 → 0.18.3
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.js +9 -11
- package/dist/eyepop.index.js.map +1 -1
- package/dist/eyepop.index.mjs +9 -11
- package/dist/eyepop.index.mjs.map +1 -1
- package/dist/eyepop.min.js +1 -1
- package/package.json +1 -1
package/dist/eyepop.index.mjs
CHANGED
|
@@ -9835,16 +9835,16 @@ var Endpoint = class {
|
|
|
9835
9835
|
if (!baseUrl || !client) {
|
|
9836
9836
|
return Promise.reject("endpoint not connected, use connect() before changePopComp()");
|
|
9837
9837
|
}
|
|
9838
|
-
const patch_url = `${this._baseUrl}/pipelines/${this._pipelineId}/inferencePipeline`;
|
|
9839
9838
|
const body = {
|
|
9840
9839
|
"pipeline": popComp
|
|
9841
9840
|
};
|
|
9842
|
-
this._requestLogger.debug("before PATCH %s", patch_url);
|
|
9843
9841
|
let response = await this.fetchWithRetry(async () => {
|
|
9842
|
+
const session = await this.session();
|
|
9844
9843
|
let headers = {
|
|
9845
|
-
"Authorization":
|
|
9844
|
+
"Authorization": `Bearer ${session.accessToken}`,
|
|
9846
9845
|
"Content-Type": "application/json"
|
|
9847
9846
|
};
|
|
9847
|
+
const patch_url = `${session.baseUrl}/pipelines/${session.pipelineId}/inferencePipeline`;
|
|
9848
9848
|
return client.fetch(patch_url, {
|
|
9849
9849
|
method: "PATCH",
|
|
9850
9850
|
body: JSON.stringify(body),
|
|
@@ -9855,7 +9855,6 @@ var Endpoint = class {
|
|
|
9855
9855
|
const message = await response.text();
|
|
9856
9856
|
return Promise.reject(`Unexpected status ${response.status}: ${message}`);
|
|
9857
9857
|
}
|
|
9858
|
-
this._requestLogger.debug("after PATCH %s", patch_url);
|
|
9859
9858
|
if (this._pipeline) {
|
|
9860
9859
|
this._pipeline.inferPipeline = popComp;
|
|
9861
9860
|
}
|
|
@@ -9901,14 +9900,14 @@ var Endpoint = class {
|
|
|
9901
9900
|
const client = this._client;
|
|
9902
9901
|
let result = await this.reconnect();
|
|
9903
9902
|
if (this._baseUrl && this._options.stopJobs) {
|
|
9904
|
-
const stop_url = `${this._baseUrl}/pipelines/${this._pipelineId}/source?mode=preempt&processing=sync`;
|
|
9905
9903
|
const body = { "sourceType": "NONE" };
|
|
9906
|
-
this._requestLogger.debug("before PATCH %s", stop_url);
|
|
9907
9904
|
let response = await this.fetchWithRetry(async () => {
|
|
9905
|
+
const session = await this.session();
|
|
9908
9906
|
const headers = {
|
|
9909
|
-
"Authorization":
|
|
9907
|
+
"Authorization": session.accessToken,
|
|
9910
9908
|
"Content-Type": "application/json"
|
|
9911
9909
|
};
|
|
9910
|
+
const stop_url = `${session.baseUrl}/pipelines/${session.pipelineId}/source?mode=preempt&processing=sync`;
|
|
9912
9911
|
return client.fetch(stop_url, {
|
|
9913
9912
|
method: "PATCH",
|
|
9914
9913
|
headers,
|
|
@@ -9919,7 +9918,6 @@ var Endpoint = class {
|
|
|
9919
9918
|
const message = await response.text();
|
|
9920
9919
|
return Promise.reject(`Unexpected status ${response.status}: ${message}`);
|
|
9921
9920
|
}
|
|
9922
|
-
this._requestLogger.debug("after PATCH %s", stop_url);
|
|
9923
9921
|
}
|
|
9924
9922
|
if (!this._ingressEventWs && this._ingressEventHandler) {
|
|
9925
9923
|
await this.startIngressWs();
|
|
@@ -9999,12 +9997,12 @@ var Endpoint = class {
|
|
|
9999
9997
|
return;
|
|
10000
9998
|
}
|
|
10001
9999
|
try {
|
|
10002
|
-
const
|
|
10003
|
-
this._requestLogger.debug("before GET %s", getTokenUrl);
|
|
10000
|
+
const session = await this.session();
|
|
10004
10001
|
let response = await this.fetchWithRetry(async () => {
|
|
10005
10002
|
const headers = {
|
|
10006
|
-
"Authorization":
|
|
10003
|
+
"Authorization": `Bearer ${session.accessToken}`
|
|
10007
10004
|
};
|
|
10005
|
+
const getTokenUrl = `${session.baseUrl}/liveIngress/events/token`;
|
|
10008
10006
|
return client.fetch(getTokenUrl, { headers });
|
|
10009
10007
|
});
|
|
10010
10008
|
if (response.status != 200) {
|