comfy-ts 2.4.0 → 2.4.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/cli.js +2 -2
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/{run-tui-cawSJuuh.js → run-tui-8si-rVW0.js} +2 -2
- package/dist/{run-tui-cawSJuuh.js.map → run-tui-8si-rVW0.js.map} +1 -1
- package/dist/{state-BbKuSDCV.js → state-C0ARiFFM.js} +10 -2
- package/dist/{state-BbKuSDCV.js.map → state-C0ARiFFM.js.map} +1 -1
- package/dist/web.d.ts +18 -0
- package/dist/web.js +9 -1
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
- package/src/host/ComfyHost.ts +9 -0
- package/src/host/ResilientWebsocket.ts +20 -0
|
@@ -815,7 +815,7 @@ var ComfySchema = class {
|
|
|
815
815
|
};
|
|
816
816
|
//#endregion
|
|
817
817
|
//#region package.json
|
|
818
|
-
var version = "2.4.
|
|
818
|
+
var version = "2.4.1";
|
|
819
819
|
//#endregion
|
|
820
820
|
//#region src/litegraph/LiteGraphLinkID.ts
|
|
821
821
|
const asLiteGraphLinkID = (id) => id;
|
|
@@ -3601,6 +3601,7 @@ var ResilientWebSocketClient = class {
|
|
|
3601
3601
|
this.messageBuffer = [];
|
|
3602
3602
|
this.isOpen = false;
|
|
3603
3603
|
this.debugMessages = [];
|
|
3604
|
+
this.hasEverOpened = false;
|
|
3604
3605
|
this.permanentlyClosed = false;
|
|
3605
3606
|
this.url = options.url();
|
|
3606
3607
|
this.connect();
|
|
@@ -3652,6 +3653,7 @@ var ResilientWebSocketClient = class {
|
|
|
3652
3653
|
ws.onopen = () => {
|
|
3653
3654
|
if (ws !== this.currentWS) return;
|
|
3654
3655
|
this.addInfo("✅ WebSocket connected to " + this.url);
|
|
3656
|
+
this.hasEverOpened = true;
|
|
3655
3657
|
this.isOpen = true;
|
|
3656
3658
|
this.options.onConnectOrReconnect();
|
|
3657
3659
|
this.flushMessageBuffer();
|
|
@@ -3662,6 +3664,11 @@ var ResilientWebSocketClient = class {
|
|
|
3662
3664
|
this.options.onClose();
|
|
3663
3665
|
if (this.permanentlyClosed) return;
|
|
3664
3666
|
this.addError(`WebSocket closed (reason=${JSON.stringify(event.reason)}, code=${event.code})`);
|
|
3667
|
+
if (!this.hasEverOpened && this.options.onFirstConnectFailed != null) {
|
|
3668
|
+
this.permanentlyClosed = true;
|
|
3669
|
+
this.options.onFirstConnectFailed(/* @__PURE__ */ new Error(`connection refused (code=${event.code}${event.reason === "" ? "" : `, ${event.reason}`})`));
|
|
3670
|
+
return;
|
|
3671
|
+
}
|
|
3665
3672
|
this.addInfo("⏱️ reconnecting in 2 seconds...");
|
|
3666
3673
|
this.reconnectTimeout = setTimeout(() => void this.connect(), 2e3);
|
|
3667
3674
|
};
|
|
@@ -4076,6 +4083,7 @@ var ComfyHost = class {
|
|
|
4076
4083
|
url: () => this.getWSUrl(),
|
|
4077
4084
|
headers: () => this.authHeaders(),
|
|
4078
4085
|
onTransportDead: (e) => this.markFailed(e),
|
|
4086
|
+
onFirstConnectFailed: (e) => this.markFailed(new ComfyHostUnreachableError(`host '${this.data.id}' is not reachable at ${this.getWSUrl()} — ${extractErrorMessage(e)}. Is ComfyUI running there ?`)),
|
|
4079
4087
|
onClose: () => {
|
|
4080
4088
|
logInfo(`[👢] WEBSOCKET: closed connection to ComfyUI host ${this.data.id}`);
|
|
4081
4089
|
}
|
|
@@ -4861,4 +4869,4 @@ var ComfyTS = class ComfyTS {
|
|
|
4861
4869
|
//#endregion
|
|
4862
4870
|
export { importSharp as a, stripAnsi as i, settingsPathFor as n, ComfySchema as o, readableStringify as r, ComfyTS as t };
|
|
4863
4871
|
|
|
4864
|
-
//# sourceMappingURL=state-
|
|
4872
|
+
//# sourceMappingURL=state-C0ARiFFM.js.map
|