@le-space/ui 0.3.32 → 0.4.0

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/shared/index.d.ts CHANGED
@@ -187,6 +187,7 @@ type DeploymentProgressListener = (event: DeploymentProgressEvent) => void;
187
187
 
188
188
  type SponsorRelayHealthTone = 'ok' | 'caution' | 'error' | 'idle';
189
189
  interface SponsorRelayProps {
190
+ libp2p?: unknown;
190
191
  debug?: boolean;
191
192
  manifestUrl?: string;
192
193
  manifestJson?: string;
@@ -221,6 +222,16 @@ interface SponsorRelayRootfsHealth {
221
222
  label: string;
222
223
  detail: string | null;
223
224
  }
225
+ interface RelayPingState {
226
+ tone: SponsorRelayHealthTone;
227
+ sent: boolean;
228
+ received: boolean;
229
+ lastPeerId: string | null;
230
+ lastLatencyMs: number | null;
231
+ lastSentAt: number | null;
232
+ lastReceivedAt: number | null;
233
+ error: string | null;
234
+ }
224
235
  interface CompactInstanceDetails {
225
236
  messageStatus: string;
226
237
  allocationSource: string | null;
@@ -290,6 +301,7 @@ interface SponsorRelayState {
290
301
  instances: CompactInstanceRecord[];
291
302
  bootstrapRegistrations: CompactBootstrapRegistrationRecord[];
292
303
  orphanBootstrapRegistrations: CompactBootstrapRegistrationRecord[];
304
+ relayPing: RelayPingState;
293
305
  lastDeploymentHash: string | null;
294
306
  deploymentProgress: DeploymentProgressEvent;
295
307
  }
@@ -299,8 +311,10 @@ declare const DEFAULT_INSTANCE_NAME = "sponsor-relay";
299
311
  declare const DEFAULT_MANIFEST_URL = "./rootfs-manifest.json";
300
312
  declare const DEFAULT_TIER_ID = "tier-1";
301
313
  declare const ROOTFS_MISSING_STATE: SponsorRelayRootfsHealth;
314
+ declare const RELAY_PING_IDLE_STATE: RelayPingState;
302
315
  declare const IDLE_DEPLOYMENT_PROGRESS: DeploymentProgressEvent;
303
316
  declare const REFRESH_INTERVAL_MS = 30000;
317
+ declare const RELAY_PING_INTERVAL_MS = 20000;
304
318
  declare const MANIFEST_SOURCE_REFRESH_DEBOUNCE_MS = 400;
305
319
  declare const INSTANCE_RUNTIME_READY_REFRESH_MS = 30000;
306
320
  declare const INSTANCE_RUNTIME_PENDING_REFRESH_MS = 45000;
@@ -309,7 +323,7 @@ declare const STALE_INSTANCE_ALLOCATION_COOLDOWN_MS: number;
309
323
  declare const RECENT_INSTANCE_RUNTIME_GRACE_MS: number;
310
324
  declare const DEPLOYMENT_PENDING_WARNING_MS: number;
311
325
 
312
- declare const UI_PACKAGE_VERSION = "0.3.32";
326
+ declare const UI_PACKAGE_VERSION = "0.4.0";
313
327
 
314
328
  interface RootfsRequiredPortForward {
315
329
  port: number;
@@ -350,6 +364,7 @@ declare class SponsorRelayController {
350
364
  private subscribers;
351
365
  private client;
352
366
  private refreshTimer;
367
+ private pingTimer;
353
368
  private manifestRefreshTimer;
354
369
  private stopWalletWatch;
355
370
  private props;
@@ -389,6 +404,7 @@ declare class SponsorRelayController {
389
404
  connectWallet(): Promise<void>;
390
405
  private refreshWalletDerivedState;
391
406
  refresh(): Promise<void>;
407
+ refreshRelayPing(): Promise<void>;
392
408
  deploy(): Promise<void>;
393
409
  deleteInstance(instanceHash: string): Promise<void>;
394
410
  deleteBootstrapRegistration(registrationHash: string): Promise<void>;
@@ -402,4 +418,4 @@ interface DeploymentProgressEmitter {
402
418
  }
403
419
  declare function createDeploymentProgressEmitter(): DeploymentProgressEmitter;
404
420
 
405
- export { type CompactBootstrapRegistrationRecord, type CompactInstanceDetails, type CompactInstanceRecord, DEFAULT_INSTANCE_NAME, DEFAULT_MANIFEST_URL, DEFAULT_TIER_ID, DEPLOYMENT_PENDING_WARNING_MS, type DeploymentProgressEmitter, type EthereumProviderLike, IDLE_DEPLOYMENT_PROGRESS, INSTANCE_RUNTIME_PENDING_REFRESH_MS, INSTANCE_RUNTIME_READY_REFRESH_MS, INSTANCE_RUNTIME_STALE_REFRESH_MS, MANIFEST_SOURCE_REFRESH_DEBOUNCE_MS, RECENT_INSTANCE_RUNTIME_GRACE_MS, REFRESH_INTERVAL_MS, ROOTFS_MISSING_STATE, STALE_INSTANCE_ALLOCATION_COOLDOWN_MS, SponsorRelayController, type SponsorRelayHealthTone, type SponsorRelayPricingSummary, type SponsorRelayProps, type SponsorRelayRootfsHealth, type SponsorRelayState, type SponsorRelaySubscriber, type SponsorRelayWalletState, UI_PACKAGE_VERSION, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, getEthereumProvider, joinMappedPorts, joinRequiredPortForwards, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
421
+ export { type CompactBootstrapRegistrationRecord, type CompactInstanceDetails, type CompactInstanceRecord, DEFAULT_INSTANCE_NAME, DEFAULT_MANIFEST_URL, DEFAULT_TIER_ID, DEPLOYMENT_PENDING_WARNING_MS, type DeploymentProgressEmitter, type EthereumProviderLike, IDLE_DEPLOYMENT_PROGRESS, INSTANCE_RUNTIME_PENDING_REFRESH_MS, INSTANCE_RUNTIME_READY_REFRESH_MS, INSTANCE_RUNTIME_STALE_REFRESH_MS, MANIFEST_SOURCE_REFRESH_DEBOUNCE_MS, RECENT_INSTANCE_RUNTIME_GRACE_MS, REFRESH_INTERVAL_MS, RELAY_PING_IDLE_STATE, RELAY_PING_INTERVAL_MS, ROOTFS_MISSING_STATE, type RelayPingState, STALE_INSTANCE_ALLOCATION_COOLDOWN_MS, SponsorRelayController, type SponsorRelayHealthTone, type SponsorRelayPricingSummary, type SponsorRelayProps, type SponsorRelayRootfsHealth, type SponsorRelayState, type SponsorRelaySubscriber, type SponsorRelayWalletState, UI_PACKAGE_VERSION, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, getEthereumProvider, joinMappedPorts, joinRequiredPortForwards, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };