@le-space/ui 0.6.43 → 0.6.44
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 +3 -3
- package/react/index.js +52 -3
- package/shared/index.d.ts +1 -1
- package/shared/index.js +52 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.44",
|
|
4
4
|
"description": "Floating Aleph Relay Button UI components for Svelte and React.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"url": "https://github.com/NiKrause/relay-button/issues"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@le-space/browser": "0.6.
|
|
48
|
-
"@le-space/core": "0.6.
|
|
47
|
+
"@le-space/browser": "0.6.44",
|
|
48
|
+
"@le-space/core": "0.6.44",
|
|
49
49
|
"viem": "^2.53.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
package/react/index.js
CHANGED
|
@@ -43,7 +43,7 @@ var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
|
|
|
43
43
|
var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
|
|
44
44
|
|
|
45
45
|
// src/shared/package-version.ts
|
|
46
|
-
var UI_PACKAGE_VERSION = "0.6.
|
|
46
|
+
var UI_PACKAGE_VERSION = "0.6.44";
|
|
47
47
|
|
|
48
48
|
// src/shared/format.ts
|
|
49
49
|
function shortHash(value, head = 8, tail = 6) {
|
|
@@ -3425,12 +3425,30 @@ async function waitForVmBootstrapConfigSignal(args) {
|
|
|
3425
3425
|
}).catch(() => []);
|
|
3426
3426
|
const match = signals.find((entry) => entry.status === expectedStatus) ?? null;
|
|
3427
3427
|
if (match) return match;
|
|
3428
|
+
if (args.shouldAbort && await args.shouldAbort().catch(() => false)) {
|
|
3429
|
+
return null;
|
|
3430
|
+
}
|
|
3428
3431
|
if (attempt < attempts - 1) {
|
|
3429
3432
|
await sleep2(delayMs);
|
|
3430
3433
|
}
|
|
3431
3434
|
}
|
|
3432
3435
|
return null;
|
|
3433
3436
|
}
|
|
3437
|
+
async function crnExecutionAbsent(args) {
|
|
3438
|
+
const base = String(args.crnUrl ?? "").trim();
|
|
3439
|
+
if (!base) return false;
|
|
3440
|
+
try {
|
|
3441
|
+
const response = await args.fetch(new URL("/about/executions/list", base).toString(), {
|
|
3442
|
+
cache: "no-store"
|
|
3443
|
+
});
|
|
3444
|
+
if (!response.ok) return false;
|
|
3445
|
+
const payload = await response.json();
|
|
3446
|
+
if (!payload || typeof payload !== "object") return false;
|
|
3447
|
+
return !(args.itemHash in payload);
|
|
3448
|
+
} catch {
|
|
3449
|
+
return false;
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3434
3452
|
|
|
3435
3453
|
// ../core/src/bootstrap-reconcile.ts
|
|
3436
3454
|
function createRelayBootstrapRegistrationId(profile, instanceName, itemHash) {
|
|
@@ -4552,7 +4570,37 @@ var SponsorRelayController = class {
|
|
|
4552
4570
|
// recovery path, which used to poll the guest over plain HTTP (mixed
|
|
4553
4571
|
// content on an HTTPS origin).
|
|
4554
4572
|
attempts: 100,
|
|
4555
|
-
delayMs: 3e3
|
|
4573
|
+
delayMs: 3e3,
|
|
4574
|
+
// Early failover (relay-button#83): a silently broken CRN accepts the
|
|
4575
|
+
// allocation but never schedules the VM. Probe the CRN's execution
|
|
4576
|
+
// list alongside the signal wait; after 4 consecutive "absent"
|
|
4577
|
+
// sightings (~2 min into the window) stop waiting — the full window
|
|
4578
|
+
// costs ~5 min and the VM will never publish a signal.
|
|
4579
|
+
shouldAbort: /* @__PURE__ */ (() => {
|
|
4580
|
+
let absentStreak = 0;
|
|
4581
|
+
let probeCountdown = 0;
|
|
4582
|
+
return async () => {
|
|
4583
|
+
if (probeCountdown > 0) {
|
|
4584
|
+
probeCountdown -= 1;
|
|
4585
|
+
return false;
|
|
4586
|
+
}
|
|
4587
|
+
probeCountdown = 9;
|
|
4588
|
+
const absent = await crnExecutionAbsent({
|
|
4589
|
+
crnUrl: args.crnUrl,
|
|
4590
|
+
itemHash: args.itemHash,
|
|
4591
|
+
fetch: asJsonFetch
|
|
4592
|
+
});
|
|
4593
|
+
absentStreak = absent ? absentStreak + 1 : 0;
|
|
4594
|
+
if (absentStreak >= 4) {
|
|
4595
|
+
this.trace("deploy:crn-execution-absent-abort", {
|
|
4596
|
+
itemHash: args.itemHash,
|
|
4597
|
+
crnUrl: args.crnUrl ?? null
|
|
4598
|
+
});
|
|
4599
|
+
return true;
|
|
4600
|
+
}
|
|
4601
|
+
return false;
|
|
4602
|
+
};
|
|
4603
|
+
})()
|
|
4556
4604
|
});
|
|
4557
4605
|
this.trace("deploy:bootstrap-config-signal-visible", {
|
|
4558
4606
|
itemHash: args.itemHash,
|
|
@@ -5738,7 +5786,8 @@ var SponsorRelayController = class {
|
|
|
5738
5786
|
await this.configureRelayBootstrapRegistration({
|
|
5739
5787
|
itemHash: result.itemHash,
|
|
5740
5788
|
runtime,
|
|
5741
|
-
deploymentToken: attemptDeploymentToken
|
|
5789
|
+
deploymentToken: attemptDeploymentToken,
|
|
5790
|
+
crnUrl: candidateCrn.address ?? null
|
|
5742
5791
|
});
|
|
5743
5792
|
this.patch({
|
|
5744
5793
|
busy: { deploying: false }
|
package/shared/index.d.ts
CHANGED
|
@@ -341,7 +341,7 @@ declare const STALE_INSTANCE_ALLOCATION_COOLDOWN_MS: number;
|
|
|
341
341
|
declare const RECENT_INSTANCE_RUNTIME_GRACE_MS: number;
|
|
342
342
|
declare const DEPLOYMENT_PENDING_WARNING_MS: number;
|
|
343
343
|
|
|
344
|
-
declare const UI_PACKAGE_VERSION = "0.6.
|
|
344
|
+
declare const UI_PACKAGE_VERSION = "0.6.44";
|
|
345
345
|
|
|
346
346
|
interface RootfsRequiredPortForward {
|
|
347
347
|
port: number;
|
package/shared/index.js
CHANGED
|
@@ -42,7 +42,7 @@ var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
|
|
|
42
42
|
var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
|
|
43
43
|
|
|
44
44
|
// src/shared/package-version.ts
|
|
45
|
-
var UI_PACKAGE_VERSION = "0.6.
|
|
45
|
+
var UI_PACKAGE_VERSION = "0.6.44";
|
|
46
46
|
|
|
47
47
|
// src/shared/format.ts
|
|
48
48
|
function shortHash(value, head = 8, tail = 6) {
|
|
@@ -3424,12 +3424,30 @@ async function waitForVmBootstrapConfigSignal(args) {
|
|
|
3424
3424
|
}).catch(() => []);
|
|
3425
3425
|
const match = signals.find((entry) => entry.status === expectedStatus) ?? null;
|
|
3426
3426
|
if (match) return match;
|
|
3427
|
+
if (args.shouldAbort && await args.shouldAbort().catch(() => false)) {
|
|
3428
|
+
return null;
|
|
3429
|
+
}
|
|
3427
3430
|
if (attempt < attempts - 1) {
|
|
3428
3431
|
await sleep2(delayMs);
|
|
3429
3432
|
}
|
|
3430
3433
|
}
|
|
3431
3434
|
return null;
|
|
3432
3435
|
}
|
|
3436
|
+
async function crnExecutionAbsent(args) {
|
|
3437
|
+
const base = String(args.crnUrl ?? "").trim();
|
|
3438
|
+
if (!base) return false;
|
|
3439
|
+
try {
|
|
3440
|
+
const response = await args.fetch(new URL("/about/executions/list", base).toString(), {
|
|
3441
|
+
cache: "no-store"
|
|
3442
|
+
});
|
|
3443
|
+
if (!response.ok) return false;
|
|
3444
|
+
const payload = await response.json();
|
|
3445
|
+
if (!payload || typeof payload !== "object") return false;
|
|
3446
|
+
return !(args.itemHash in payload);
|
|
3447
|
+
} catch {
|
|
3448
|
+
return false;
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3433
3451
|
|
|
3434
3452
|
// ../core/src/bootstrap-reconcile.ts
|
|
3435
3453
|
function createRelayBootstrapRegistrationId(profile, instanceName, itemHash) {
|
|
@@ -4551,7 +4569,37 @@ var SponsorRelayController = class {
|
|
|
4551
4569
|
// recovery path, which used to poll the guest over plain HTTP (mixed
|
|
4552
4570
|
// content on an HTTPS origin).
|
|
4553
4571
|
attempts: 100,
|
|
4554
|
-
delayMs: 3e3
|
|
4572
|
+
delayMs: 3e3,
|
|
4573
|
+
// Early failover (relay-button#83): a silently broken CRN accepts the
|
|
4574
|
+
// allocation but never schedules the VM. Probe the CRN's execution
|
|
4575
|
+
// list alongside the signal wait; after 4 consecutive "absent"
|
|
4576
|
+
// sightings (~2 min into the window) stop waiting — the full window
|
|
4577
|
+
// costs ~5 min and the VM will never publish a signal.
|
|
4578
|
+
shouldAbort: /* @__PURE__ */ (() => {
|
|
4579
|
+
let absentStreak = 0;
|
|
4580
|
+
let probeCountdown = 0;
|
|
4581
|
+
return async () => {
|
|
4582
|
+
if (probeCountdown > 0) {
|
|
4583
|
+
probeCountdown -= 1;
|
|
4584
|
+
return false;
|
|
4585
|
+
}
|
|
4586
|
+
probeCountdown = 9;
|
|
4587
|
+
const absent = await crnExecutionAbsent({
|
|
4588
|
+
crnUrl: args.crnUrl,
|
|
4589
|
+
itemHash: args.itemHash,
|
|
4590
|
+
fetch: asJsonFetch
|
|
4591
|
+
});
|
|
4592
|
+
absentStreak = absent ? absentStreak + 1 : 0;
|
|
4593
|
+
if (absentStreak >= 4) {
|
|
4594
|
+
this.trace("deploy:crn-execution-absent-abort", {
|
|
4595
|
+
itemHash: args.itemHash,
|
|
4596
|
+
crnUrl: args.crnUrl ?? null
|
|
4597
|
+
});
|
|
4598
|
+
return true;
|
|
4599
|
+
}
|
|
4600
|
+
return false;
|
|
4601
|
+
};
|
|
4602
|
+
})()
|
|
4555
4603
|
});
|
|
4556
4604
|
this.trace("deploy:bootstrap-config-signal-visible", {
|
|
4557
4605
|
itemHash: args.itemHash,
|
|
@@ -5737,7 +5785,8 @@ var SponsorRelayController = class {
|
|
|
5737
5785
|
await this.configureRelayBootstrapRegistration({
|
|
5738
5786
|
itemHash: result.itemHash,
|
|
5739
5787
|
runtime,
|
|
5740
|
-
deploymentToken: attemptDeploymentToken
|
|
5788
|
+
deploymentToken: attemptDeploymentToken,
|
|
5789
|
+
crnUrl: candidateCrn.address ?? null
|
|
5741
5790
|
});
|
|
5742
5791
|
this.patch({
|
|
5743
5792
|
busy: { deploying: false }
|