@le-space/ui 0.1.60 → 0.1.61
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/package.json +1 -1
- package/react/index.js +9 -4
- package/shared/index.d.ts +2 -1
- package/shared/index.js +10 -4
package/package.json
CHANGED
package/react/index.js
CHANGED
|
@@ -35,6 +35,7 @@ var RELAY_PING_INTERVAL_MS = 2e4;
|
|
|
35
35
|
var INSTANCE_RUNTIME_STALE_REFRESH_MS = 5 * 6e4;
|
|
36
36
|
var STALE_INSTANCE_ALLOCATION_COOLDOWN_MS = 5 * 60 * 1e3;
|
|
37
37
|
var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
|
|
38
|
+
var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
|
|
38
39
|
|
|
39
40
|
// src/shared/format.ts
|
|
40
41
|
function shortHash(value, head = 8, tail = 6) {
|
|
@@ -1654,7 +1655,9 @@ var SponsorRelayController = class {
|
|
|
1654
1655
|
if (!itemHash) {
|
|
1655
1656
|
return;
|
|
1656
1657
|
}
|
|
1657
|
-
const latest = instances.find(
|
|
1658
|
+
const latest = instances.find(
|
|
1659
|
+
(entry) => entry.instance.item_hash === itemHash
|
|
1660
|
+
);
|
|
1658
1661
|
if (!latest) {
|
|
1659
1662
|
return;
|
|
1660
1663
|
}
|
|
@@ -1672,13 +1675,15 @@ var SponsorRelayController = class {
|
|
|
1672
1675
|
return;
|
|
1673
1676
|
}
|
|
1674
1677
|
if (status !== "processed") {
|
|
1678
|
+
const submittedAtMs = instanceTimestampMs(latest.instance);
|
|
1679
|
+
const pendingTooLong = submittedAtMs != null && Date.now() - submittedAtMs >= DEPLOYMENT_PENDING_WARNING_MS;
|
|
1675
1680
|
this.emitProgress({
|
|
1676
1681
|
stage: "waiting-for-aleph",
|
|
1677
|
-
label: "Waiting for Aleph",
|
|
1682
|
+
label: pendingTooLong ? "Aleph processing delayed" : "Waiting for Aleph",
|
|
1678
1683
|
progress: 76,
|
|
1679
|
-
status: "info",
|
|
1684
|
+
status: pendingTooLong ? "warning" : "info",
|
|
1680
1685
|
itemHash,
|
|
1681
|
-
detail: "Deployment submitted. Waiting for Aleph to process the instance message."
|
|
1686
|
+
detail: pendingTooLong ? "The instance is still pending on Aleph after several minutes. Retry, inspect the Aleph message, or delete and redeploy." : "Deployment submitted. Waiting for Aleph to process the instance message."
|
|
1682
1687
|
});
|
|
1683
1688
|
return;
|
|
1684
1689
|
}
|
package/shared/index.d.ts
CHANGED
|
@@ -298,6 +298,7 @@ declare const INSTANCE_RUNTIME_PENDING_REFRESH_MS = 45000;
|
|
|
298
298
|
declare const INSTANCE_RUNTIME_STALE_REFRESH_MS: number;
|
|
299
299
|
declare const STALE_INSTANCE_ALLOCATION_COOLDOWN_MS: number;
|
|
300
300
|
declare const RECENT_INSTANCE_RUNTIME_GRACE_MS: number;
|
|
301
|
+
declare const DEPLOYMENT_PENDING_WARNING_MS: number;
|
|
301
302
|
|
|
302
303
|
declare function shortHash(value: string | null | undefined, head?: number, tail?: number): string;
|
|
303
304
|
declare function formatNumber(value: number | null | undefined, digits?: number): string;
|
|
@@ -371,4 +372,4 @@ interface DeploymentProgressEmitter {
|
|
|
371
372
|
}
|
|
372
373
|
declare function createDeploymentProgressEmitter(): DeploymentProgressEmitter;
|
|
373
374
|
|
|
374
|
-
export { type CompactInstanceDetails, type CompactInstanceRecord, DEFAULT_INSTANCE_NAME, DEFAULT_MANIFEST_URL, DEFAULT_TIER_ID, type DeploymentProgressEmitter, type EthereumProviderLike, IDLE_DEPLOYMENT_PROGRESS, INSTANCE_RUNTIME_PENDING_REFRESH_MS, INSTANCE_RUNTIME_READY_REFRESH_MS, INSTANCE_RUNTIME_STALE_REFRESH_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, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, getEthereumProvider, joinMappedPorts, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|
|
375
|
+
export { 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, 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, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, getEthereumProvider, joinMappedPorts, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|
package/shared/index.js
CHANGED
|
@@ -34,6 +34,7 @@ var INSTANCE_RUNTIME_PENDING_REFRESH_MS = 45e3;
|
|
|
34
34
|
var INSTANCE_RUNTIME_STALE_REFRESH_MS = 5 * 6e4;
|
|
35
35
|
var STALE_INSTANCE_ALLOCATION_COOLDOWN_MS = 5 * 60 * 1e3;
|
|
36
36
|
var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
|
|
37
|
+
var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
|
|
37
38
|
|
|
38
39
|
// src/shared/format.ts
|
|
39
40
|
function shortHash(value, head = 8, tail = 6) {
|
|
@@ -1653,7 +1654,9 @@ var SponsorRelayController = class {
|
|
|
1653
1654
|
if (!itemHash) {
|
|
1654
1655
|
return;
|
|
1655
1656
|
}
|
|
1656
|
-
const latest = instances.find(
|
|
1657
|
+
const latest = instances.find(
|
|
1658
|
+
(entry) => entry.instance.item_hash === itemHash
|
|
1659
|
+
);
|
|
1657
1660
|
if (!latest) {
|
|
1658
1661
|
return;
|
|
1659
1662
|
}
|
|
@@ -1671,13 +1674,15 @@ var SponsorRelayController = class {
|
|
|
1671
1674
|
return;
|
|
1672
1675
|
}
|
|
1673
1676
|
if (status !== "processed") {
|
|
1677
|
+
const submittedAtMs = instanceTimestampMs(latest.instance);
|
|
1678
|
+
const pendingTooLong = submittedAtMs != null && Date.now() - submittedAtMs >= DEPLOYMENT_PENDING_WARNING_MS;
|
|
1674
1679
|
this.emitProgress({
|
|
1675
1680
|
stage: "waiting-for-aleph",
|
|
1676
|
-
label: "Waiting for Aleph",
|
|
1681
|
+
label: pendingTooLong ? "Aleph processing delayed" : "Waiting for Aleph",
|
|
1677
1682
|
progress: 76,
|
|
1678
|
-
status: "info",
|
|
1683
|
+
status: pendingTooLong ? "warning" : "info",
|
|
1679
1684
|
itemHash,
|
|
1680
|
-
detail: "Deployment submitted. Waiting for Aleph to process the instance message."
|
|
1685
|
+
detail: pendingTooLong ? "The instance is still pending on Aleph after several minutes. Retry, inspect the Aleph message, or delete and redeploy." : "Deployment submitted. Waiting for Aleph to process the instance message."
|
|
1681
1686
|
});
|
|
1682
1687
|
return;
|
|
1683
1688
|
}
|
|
@@ -2112,6 +2117,7 @@ export {
|
|
|
2112
2117
|
DEFAULT_INSTANCE_NAME,
|
|
2113
2118
|
DEFAULT_MANIFEST_URL,
|
|
2114
2119
|
DEFAULT_TIER_ID,
|
|
2120
|
+
DEPLOYMENT_PENDING_WARNING_MS,
|
|
2115
2121
|
IDLE_DEPLOYMENT_PROGRESS,
|
|
2116
2122
|
INSTANCE_RUNTIME_PENDING_REFRESH_MS,
|
|
2117
2123
|
INSTANCE_RUNTIME_READY_REFRESH_MS,
|