@omercnet/paseo-omp 0.4.0-next.138.1 → 0.4.0-next.139.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/index.client.tsx +21 -2
- package/package.json +1 -1
- package/server/package-version.ts +1 -1
package/index.client.tsx
CHANGED
|
@@ -452,7 +452,25 @@ export default function contribute(client: PluginClientContext) {
|
|
|
452
452
|
}, RECONCILE_DEBOUNCE_MS);
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
|
|
455
|
+
let unsubscribeAgentDirectory = () => {};
|
|
456
|
+
let releaseAgentDirectory: (() => Promise<void>) | undefined;
|
|
457
|
+
void client.paseo.agents
|
|
458
|
+
.list({ subscribe: {} })
|
|
459
|
+
.then(({ subscription }) => {
|
|
460
|
+
if (!subscription) return;
|
|
461
|
+
if (disposed) {
|
|
462
|
+
void subscription.release().catch(() => {});
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
unsubscribeAgentDirectory = subscription.subscribe({
|
|
466
|
+
snapshot: scheduleReconcile,
|
|
467
|
+
update: scheduleReconcile,
|
|
468
|
+
error: () => {},
|
|
469
|
+
});
|
|
470
|
+
releaseAgentDirectory = () => subscription.release();
|
|
471
|
+
void subscription.ready.catch(() => {});
|
|
472
|
+
})
|
|
473
|
+
.catch(() => {});
|
|
456
474
|
const hubPoll = setInterval(() => {
|
|
457
475
|
void refreshHubStatus();
|
|
458
476
|
}, STATUS_POLL_MS);
|
|
@@ -467,7 +485,8 @@ export default function contribute(client: PluginClientContext) {
|
|
|
467
485
|
return () => {
|
|
468
486
|
disposed = true;
|
|
469
487
|
settingsGeneration += 1;
|
|
470
|
-
|
|
488
|
+
unsubscribeAgentDirectory();
|
|
489
|
+
if (releaseAgentDirectory) void releaseAgentDirectory().catch(() => {});
|
|
471
490
|
clearTimeout(reconcileTimer);
|
|
472
491
|
clearInterval(hubPoll);
|
|
473
492
|
clearInterval(quotaPoll);
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Release Please keeps this bundle-safe constant aligned with package.json. */
|
|
2
|
-
export const PASEO_OMP_PACKAGE_VERSION = "0.4.0-next.
|
|
2
|
+
export const PASEO_OMP_PACKAGE_VERSION = "0.4.0-next.139.1"; // x-release-please-version
|