bitfab-cli 0.2.98 → 0.2.100
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/index.js +22 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10188,6 +10188,19 @@ var DaemonClient = class {
|
|
|
10188
10188
|
throw new Error(res.error);
|
|
10189
10189
|
}
|
|
10190
10190
|
}
|
|
10191
|
+
/**
|
|
10192
|
+
* Forget a session from the daemon's in-memory map (the recovery path after
|
|
10193
|
+
* a `not-responding` gate). Matched daemon-side on the studio sessionId, so a
|
|
10194
|
+
* session re-bound under the same key is never touched. Returns how many
|
|
10195
|
+
* entries were dropped (0 or 1).
|
|
10196
|
+
*/
|
|
10197
|
+
async clear(sessionId) {
|
|
10198
|
+
const res = await this.sendCommand({ cmd: "clear", sessionId });
|
|
10199
|
+
if (!res.ok) {
|
|
10200
|
+
throw new Error(res.error);
|
|
10201
|
+
}
|
|
10202
|
+
return res.cleared;
|
|
10203
|
+
}
|
|
10191
10204
|
async detach(key) {
|
|
10192
10205
|
const res = await this.sendCommand({ cmd: "detach", key });
|
|
10193
10206
|
if (!res.ok) {
|
|
@@ -10299,6 +10312,8 @@ var DirectChannel = class {
|
|
|
10299
10312
|
forceCloseWindow(sessionId) {
|
|
10300
10313
|
closeStudioWindowsBySession(sessionId);
|
|
10301
10314
|
}
|
|
10315
|
+
async clearSession(_sessionId) {
|
|
10316
|
+
}
|
|
10302
10317
|
subscribe(sessionId, onEvent, onError) {
|
|
10303
10318
|
const abortController = new AbortController();
|
|
10304
10319
|
const done = (async () => {
|
|
@@ -10390,6 +10405,10 @@ var DaemonChannel = class _DaemonChannel {
|
|
|
10390
10405
|
}
|
|
10391
10406
|
forceCloseWindow(_sessionId) {
|
|
10392
10407
|
}
|
|
10408
|
+
async clearSession(sessionId) {
|
|
10409
|
+
await this.client.clear(sessionId).catch(() => {
|
|
10410
|
+
});
|
|
10411
|
+
}
|
|
10393
10412
|
subscribe(_sessionId, onEvent, onError) {
|
|
10394
10413
|
const done = new Promise((resolve) => {
|
|
10395
10414
|
this.doneResolve = resolve;
|
|
@@ -10445,6 +10464,9 @@ function withDirectFallback(primary, apiKey, serviceUrl) {
|
|
|
10445
10464
|
forceCloseWindow(sessionId) {
|
|
10446
10465
|
active.forceCloseWindow(sessionId);
|
|
10447
10466
|
},
|
|
10467
|
+
async clearSession(sessionId) {
|
|
10468
|
+
await active.clearSession(sessionId);
|
|
10469
|
+
},
|
|
10448
10470
|
subscribe(sessionId, onEvent, onError) {
|
|
10449
10471
|
return active.subscribe(sessionId, onEvent, onError);
|
|
10450
10472
|
},
|