@le-space/ui 0.6.37 → 0.6.38
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 +19 -5
- package/shared/index.d.ts +1 -1
- package/shared/index.js +19 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.38",
|
|
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.38",
|
|
48
|
+
"@le-space/core": "0.6.38",
|
|
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.38";
|
|
47
47
|
|
|
48
48
|
// src/shared/format.ts
|
|
49
49
|
function shortHash(value, head = 8, tail = 6) {
|
|
@@ -4545,7 +4545,13 @@ var SponsorRelayController = class {
|
|
|
4545
4545
|
instanceItemHash: args.itemHash,
|
|
4546
4546
|
fetch: asJsonFetch,
|
|
4547
4547
|
apiHost: this.client.apiHost,
|
|
4548
|
-
|
|
4548
|
+
// The guest publishes this signal only after its describe step has a
|
|
4549
|
+
// browser-dialable address, which waits on AutoTLS for up to ~240 s.
|
|
4550
|
+
// Wait comfortably longer than that (100 × 3 s = 300 s) so the complete
|
|
4551
|
+
// signal arrives instead of timing out — a timeout here drops into the
|
|
4552
|
+
// recovery path, which used to poll the guest over plain HTTP (mixed
|
|
4553
|
+
// content on an HTTPS origin).
|
|
4554
|
+
attempts: 100,
|
|
4549
4555
|
delayMs: 3e3
|
|
4550
4556
|
});
|
|
4551
4557
|
this.trace("deploy:bootstrap-config-signal-visible", {
|
|
@@ -4597,6 +4603,12 @@ var SponsorRelayController = class {
|
|
|
4597
4603
|
browserBootstrapMultiaddrCount: relayMetadata.browserBootstrapMultiaddrs.length
|
|
4598
4604
|
});
|
|
4599
4605
|
} else {
|
|
4606
|
+
const canReadMetadataSecurely = profile === "uc-go-peer" && Boolean(runtime.proxyUrl);
|
|
4607
|
+
if (usesBootstrapConfigAggregate(this.state.manifest) && !canReadMetadataSecurely) {
|
|
4608
|
+
throw new Error(
|
|
4609
|
+
"The relay applied its bootstrap config but the acknowledgement did not carry its final multiaddrs, and this image exposes no HTTPS metadata endpoint. Reading them over plain HTTP would be blocked as mixed content on an HTTPS origin, so the deployment cannot be completed."
|
|
4610
|
+
);
|
|
4611
|
+
}
|
|
4600
4612
|
this.emitProgress({
|
|
4601
4613
|
stage: "publishing-bootstrap",
|
|
4602
4614
|
label: "Waiting for secure relay metadata",
|
|
@@ -4608,7 +4620,7 @@ var SponsorRelayController = class {
|
|
|
4608
4620
|
relayMetadata = await fetchRelayMetadataForRuntime({
|
|
4609
4621
|
runtime,
|
|
4610
4622
|
fetch: (url, init) => fetch(url, init),
|
|
4611
|
-
preferSecureMetadata:
|
|
4623
|
+
preferSecureMetadata: canReadMetadataSecurely,
|
|
4612
4624
|
attempts: 80,
|
|
4613
4625
|
delayMs: 3e3,
|
|
4614
4626
|
timeoutMs: 24e4,
|
|
@@ -5710,11 +5722,13 @@ var SponsorRelayController = class {
|
|
|
5710
5722
|
crnListUrl: this.props.crnListUrl,
|
|
5711
5723
|
requirePublicGuestIpv6ForProxy: true
|
|
5712
5724
|
});
|
|
5713
|
-
|
|
5725
|
+
const canReconcileMetadataSecurely = attemptProfile === "uc-go-peer" && Boolean(latestRuntime.proxyUrl);
|
|
5726
|
+
const mayReadMetadata = canReconcileMetadataSecurely || !usesBootstrapConfigAggregate(this.state.manifest);
|
|
5727
|
+
if (latestRuntime.diagnostics?.state === "ready" && mayReadMetadata) {
|
|
5714
5728
|
const reconciledRelayMetadata = await fetchRelayMetadataForRuntime({
|
|
5715
5729
|
runtime: latestRuntime,
|
|
5716
5730
|
fetch: (url, init) => fetch(url, init),
|
|
5717
|
-
preferSecureMetadata:
|
|
5731
|
+
preferSecureMetadata: canReconcileMetadataSecurely,
|
|
5718
5732
|
attempts: 3,
|
|
5719
5733
|
delayMs: 1e3,
|
|
5720
5734
|
timeoutMs: 15e3
|
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.38";
|
|
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.38";
|
|
46
46
|
|
|
47
47
|
// src/shared/format.ts
|
|
48
48
|
function shortHash(value, head = 8, tail = 6) {
|
|
@@ -4544,7 +4544,13 @@ var SponsorRelayController = class {
|
|
|
4544
4544
|
instanceItemHash: args.itemHash,
|
|
4545
4545
|
fetch: asJsonFetch,
|
|
4546
4546
|
apiHost: this.client.apiHost,
|
|
4547
|
-
|
|
4547
|
+
// The guest publishes this signal only after its describe step has a
|
|
4548
|
+
// browser-dialable address, which waits on AutoTLS for up to ~240 s.
|
|
4549
|
+
// Wait comfortably longer than that (100 × 3 s = 300 s) so the complete
|
|
4550
|
+
// signal arrives instead of timing out — a timeout here drops into the
|
|
4551
|
+
// recovery path, which used to poll the guest over plain HTTP (mixed
|
|
4552
|
+
// content on an HTTPS origin).
|
|
4553
|
+
attempts: 100,
|
|
4548
4554
|
delayMs: 3e3
|
|
4549
4555
|
});
|
|
4550
4556
|
this.trace("deploy:bootstrap-config-signal-visible", {
|
|
@@ -4596,6 +4602,12 @@ var SponsorRelayController = class {
|
|
|
4596
4602
|
browserBootstrapMultiaddrCount: relayMetadata.browserBootstrapMultiaddrs.length
|
|
4597
4603
|
});
|
|
4598
4604
|
} else {
|
|
4605
|
+
const canReadMetadataSecurely = profile === "uc-go-peer" && Boolean(runtime.proxyUrl);
|
|
4606
|
+
if (usesBootstrapConfigAggregate(this.state.manifest) && !canReadMetadataSecurely) {
|
|
4607
|
+
throw new Error(
|
|
4608
|
+
"The relay applied its bootstrap config but the acknowledgement did not carry its final multiaddrs, and this image exposes no HTTPS metadata endpoint. Reading them over plain HTTP would be blocked as mixed content on an HTTPS origin, so the deployment cannot be completed."
|
|
4609
|
+
);
|
|
4610
|
+
}
|
|
4599
4611
|
this.emitProgress({
|
|
4600
4612
|
stage: "publishing-bootstrap",
|
|
4601
4613
|
label: "Waiting for secure relay metadata",
|
|
@@ -4607,7 +4619,7 @@ var SponsorRelayController = class {
|
|
|
4607
4619
|
relayMetadata = await fetchRelayMetadataForRuntime({
|
|
4608
4620
|
runtime,
|
|
4609
4621
|
fetch: (url, init) => fetch(url, init),
|
|
4610
|
-
preferSecureMetadata:
|
|
4622
|
+
preferSecureMetadata: canReadMetadataSecurely,
|
|
4611
4623
|
attempts: 80,
|
|
4612
4624
|
delayMs: 3e3,
|
|
4613
4625
|
timeoutMs: 24e4,
|
|
@@ -5709,11 +5721,13 @@ var SponsorRelayController = class {
|
|
|
5709
5721
|
crnListUrl: this.props.crnListUrl,
|
|
5710
5722
|
requirePublicGuestIpv6ForProxy: true
|
|
5711
5723
|
});
|
|
5712
|
-
|
|
5724
|
+
const canReconcileMetadataSecurely = attemptProfile === "uc-go-peer" && Boolean(latestRuntime.proxyUrl);
|
|
5725
|
+
const mayReadMetadata = canReconcileMetadataSecurely || !usesBootstrapConfigAggregate(this.state.manifest);
|
|
5726
|
+
if (latestRuntime.diagnostics?.state === "ready" && mayReadMetadata) {
|
|
5713
5727
|
const reconciledRelayMetadata = await fetchRelayMetadataForRuntime({
|
|
5714
5728
|
runtime: latestRuntime,
|
|
5715
5729
|
fetch: (url, init) => fetch(url, init),
|
|
5716
|
-
preferSecureMetadata:
|
|
5730
|
+
preferSecureMetadata: canReconcileMetadataSecurely,
|
|
5717
5731
|
attempts: 3,
|
|
5718
5732
|
delayMs: 1e3,
|
|
5719
5733
|
timeoutMs: 15e3
|