@le-space/ui 0.3.20 → 0.3.21
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.d.ts +1 -1
- package/react/index.js +25 -17
- package/shared/index.d.ts +2 -2
- package/shared/index.js +25 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
4
4
|
"description": "Floating Aleph sponsor relay UI components for Svelte and React.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@le-space/browser": "0.3.
|
|
40
|
-
"@le-space/core": "0.3.
|
|
39
|
+
"@le-space/browser": "0.3.21",
|
|
40
|
+
"@le-space/core": "0.3.21",
|
|
41
41
|
"viem": "^2.38.5"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
package/react/index.d.ts
CHANGED
|
@@ -303,7 +303,7 @@ declare class SponsorRelayController {
|
|
|
303
303
|
private runtimeCooldownByHash;
|
|
304
304
|
private runtimeDetailsByHash;
|
|
305
305
|
private debugEnabled;
|
|
306
|
-
private
|
|
306
|
+
private lastCompletedDeploymentHash;
|
|
307
307
|
constructor(props?: SponsorRelayProps);
|
|
308
308
|
subscribeToDeploymentProgress(listener: DeploymentProgressListener): () => void;
|
|
309
309
|
subscribe(subscriber: SponsorRelaySubscriber): () => void;
|
package/react/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
|
|
|
39
39
|
var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
|
|
40
40
|
|
|
41
41
|
// src/shared/package-version.ts
|
|
42
|
-
var UI_PACKAGE_VERSION = "0.3.
|
|
42
|
+
var UI_PACKAGE_VERSION = "0.3.21";
|
|
43
43
|
|
|
44
44
|
// src/shared/format.ts
|
|
45
45
|
function shortHash(value, head = 8, tail = 6) {
|
|
@@ -2951,7 +2951,7 @@ var SponsorRelayController = class {
|
|
|
2951
2951
|
runtimeCooldownByHash = /* @__PURE__ */ new Map();
|
|
2952
2952
|
runtimeDetailsByHash = /* @__PURE__ */ new Map();
|
|
2953
2953
|
debugEnabled;
|
|
2954
|
-
|
|
2954
|
+
lastCompletedDeploymentHash = null;
|
|
2955
2955
|
constructor(props = {}) {
|
|
2956
2956
|
this.props = props;
|
|
2957
2957
|
this.state = defaultState(props);
|
|
@@ -3063,7 +3063,7 @@ var SponsorRelayController = class {
|
|
|
3063
3063
|
this.emitProgress({
|
|
3064
3064
|
stage: "deployment-confirmed",
|
|
3065
3065
|
label: "Applying relay networking",
|
|
3066
|
-
progress:
|
|
3066
|
+
progress: 93,
|
|
3067
3067
|
status: "info",
|
|
3068
3068
|
itemHash: args.itemHash,
|
|
3069
3069
|
detail: "Publishing the host port mapping into the guest relay configuration."
|
|
@@ -3099,7 +3099,7 @@ var SponsorRelayController = class {
|
|
|
3099
3099
|
this.emitProgress({
|
|
3100
3100
|
stage: "deployment-confirmed",
|
|
3101
3101
|
label: "Publishing relay config",
|
|
3102
|
-
progress:
|
|
3102
|
+
progress: 93,
|
|
3103
3103
|
status: "info",
|
|
3104
3104
|
itemHash: args.itemHash,
|
|
3105
3105
|
detail: "Publishing runtime networking into the Aleph guest bootstrap config aggregate."
|
|
@@ -3196,7 +3196,7 @@ var SponsorRelayController = class {
|
|
|
3196
3196
|
this.emitProgress({
|
|
3197
3197
|
stage: "publishing-bootstrap",
|
|
3198
3198
|
label: "Waiting for guest bootstrap registration",
|
|
3199
|
-
progress:
|
|
3199
|
+
progress: 97,
|
|
3200
3200
|
status: "info",
|
|
3201
3201
|
itemHash: args.itemHash,
|
|
3202
3202
|
detail: "Waiting for the relay VM to publish its own bootstrap registration to Aleph."
|
|
@@ -3251,7 +3251,7 @@ var SponsorRelayController = class {
|
|
|
3251
3251
|
}
|
|
3252
3252
|
const currentProgress = this.state.deploymentProgress;
|
|
3253
3253
|
const currentProgressIsForLatestHash = currentProgress.itemHash === itemHash || currentProgress.itemHash == null && currentProgress.stage !== "idle" && currentProgress.stage !== "error";
|
|
3254
|
-
const keepTerminalSuccess = this.
|
|
3254
|
+
const keepTerminalSuccess = this.lastCompletedDeploymentHash === itemHash || currentProgressIsForLatestHash && currentProgress.stage === "completed" && currentProgress.status === "success";
|
|
3255
3255
|
const status = latest.details.messageStatus;
|
|
3256
3256
|
if (status === "rejected") {
|
|
3257
3257
|
this.emitProgress({
|
|
@@ -3305,12 +3305,12 @@ var SponsorRelayController = class {
|
|
|
3305
3305
|
return;
|
|
3306
3306
|
}
|
|
3307
3307
|
this.emitProgress({
|
|
3308
|
-
stage: "
|
|
3308
|
+
stage: "deployment-confirmed",
|
|
3309
3309
|
label: "Runtime ready",
|
|
3310
|
-
progress:
|
|
3311
|
-
status: "
|
|
3310
|
+
progress: 92,
|
|
3311
|
+
status: "info",
|
|
3312
3312
|
itemHash,
|
|
3313
|
-
detail: "Deployment processed and runtime networking is available."
|
|
3313
|
+
detail: "Deployment processed and runtime networking is available. Finishing relay setup and bootstrap verification."
|
|
3314
3314
|
});
|
|
3315
3315
|
}
|
|
3316
3316
|
canSkipRuntimeRefresh(instance) {
|
|
@@ -3761,7 +3761,7 @@ var SponsorRelayController = class {
|
|
|
3761
3761
|
crnHash: candidateCrn.hash,
|
|
3762
3762
|
crnName: candidateCrn.name
|
|
3763
3763
|
});
|
|
3764
|
-
this.
|
|
3764
|
+
this.lastCompletedDeploymentHash = null;
|
|
3765
3765
|
const inspection = await waitForDeploymentResult2(result.itemHash, {
|
|
3766
3766
|
rootfsRef: this.state.manifest.rootfsItemHash,
|
|
3767
3767
|
apiHost: this.client.apiHost,
|
|
@@ -3867,12 +3867,12 @@ var SponsorRelayController = class {
|
|
|
3867
3867
|
onAttempt: (runtime2) => {
|
|
3868
3868
|
if (runtime2.hostIpv4 && Object.keys(runtime2.mappedPorts ?? {}).length > 0) {
|
|
3869
3869
|
this.emitProgress({
|
|
3870
|
-
stage: "
|
|
3870
|
+
stage: "deployment-confirmed",
|
|
3871
3871
|
label: "Runtime ready",
|
|
3872
|
-
progress:
|
|
3873
|
-
status: "
|
|
3872
|
+
progress: 92,
|
|
3873
|
+
status: "info",
|
|
3874
3874
|
itemHash: result.itemHash,
|
|
3875
|
-
detail: "Runtime networking and mapped ports are now available."
|
|
3875
|
+
detail: "Runtime networking and mapped ports are now available. Finishing relay setup and bootstrap verification."
|
|
3876
3876
|
});
|
|
3877
3877
|
return;
|
|
3878
3878
|
}
|
|
@@ -3892,7 +3892,6 @@ var SponsorRelayController = class {
|
|
|
3892
3892
|
);
|
|
3893
3893
|
}
|
|
3894
3894
|
this.trace("deploy:runtime-ready", runtime);
|
|
3895
|
-
this.lastRuntimeReadyHash = result.itemHash;
|
|
3896
3895
|
this.rememberRuntimeDetails(result.itemHash, {
|
|
3897
3896
|
messageStatus: "processed",
|
|
3898
3897
|
allocationSource: runtime.allocation?.source ?? null,
|
|
@@ -3917,12 +3916,21 @@ var SponsorRelayController = class {
|
|
|
3917
3916
|
this.emitProgress({
|
|
3918
3917
|
stage: "refreshing-instances",
|
|
3919
3918
|
label: "Refreshing instances",
|
|
3920
|
-
progress:
|
|
3919
|
+
progress: 99,
|
|
3921
3920
|
status: "info",
|
|
3922
3921
|
itemHash: result.itemHash,
|
|
3923
3922
|
detail: "Reloading deployments and runtime state."
|
|
3924
3923
|
});
|
|
3925
3924
|
await this.refresh();
|
|
3925
|
+
this.lastCompletedDeploymentHash = result.itemHash;
|
|
3926
|
+
this.emitProgress({
|
|
3927
|
+
stage: "completed",
|
|
3928
|
+
label: "Relay ready",
|
|
3929
|
+
progress: 100,
|
|
3930
|
+
status: "success",
|
|
3931
|
+
itemHash: result.itemHash,
|
|
3932
|
+
detail: "Relay runtime, setup, metadata, and bootstrap registration are confirmed."
|
|
3933
|
+
});
|
|
3926
3934
|
return;
|
|
3927
3935
|
} catch (error) {
|
|
3928
3936
|
lastError = error instanceof Error ? error : new Error(String(error));
|
package/shared/index.d.ts
CHANGED
|
@@ -304,7 +304,7 @@ declare const STALE_INSTANCE_ALLOCATION_COOLDOWN_MS: number;
|
|
|
304
304
|
declare const RECENT_INSTANCE_RUNTIME_GRACE_MS: number;
|
|
305
305
|
declare const DEPLOYMENT_PENDING_WARNING_MS: number;
|
|
306
306
|
|
|
307
|
-
declare const UI_PACKAGE_VERSION = "0.3.
|
|
307
|
+
declare const UI_PACKAGE_VERSION = "0.3.21";
|
|
308
308
|
|
|
309
309
|
interface RootfsRequiredPortForward {
|
|
310
310
|
port: number;
|
|
@@ -353,7 +353,7 @@ declare class SponsorRelayController {
|
|
|
353
353
|
private runtimeCooldownByHash;
|
|
354
354
|
private runtimeDetailsByHash;
|
|
355
355
|
private debugEnabled;
|
|
356
|
-
private
|
|
356
|
+
private lastCompletedDeploymentHash;
|
|
357
357
|
constructor(props?: SponsorRelayProps);
|
|
358
358
|
subscribeToDeploymentProgress(listener: DeploymentProgressListener): () => void;
|
|
359
359
|
subscribe(subscriber: SponsorRelaySubscriber): () => void;
|
package/shared/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
|
|
|
38
38
|
var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
|
|
39
39
|
|
|
40
40
|
// src/shared/package-version.ts
|
|
41
|
-
var UI_PACKAGE_VERSION = "0.3.
|
|
41
|
+
var UI_PACKAGE_VERSION = "0.3.21";
|
|
42
42
|
|
|
43
43
|
// src/shared/format.ts
|
|
44
44
|
function shortHash(value, head = 8, tail = 6) {
|
|
@@ -2950,7 +2950,7 @@ var SponsorRelayController = class {
|
|
|
2950
2950
|
runtimeCooldownByHash = /* @__PURE__ */ new Map();
|
|
2951
2951
|
runtimeDetailsByHash = /* @__PURE__ */ new Map();
|
|
2952
2952
|
debugEnabled;
|
|
2953
|
-
|
|
2953
|
+
lastCompletedDeploymentHash = null;
|
|
2954
2954
|
constructor(props = {}) {
|
|
2955
2955
|
this.props = props;
|
|
2956
2956
|
this.state = defaultState(props);
|
|
@@ -3062,7 +3062,7 @@ var SponsorRelayController = class {
|
|
|
3062
3062
|
this.emitProgress({
|
|
3063
3063
|
stage: "deployment-confirmed",
|
|
3064
3064
|
label: "Applying relay networking",
|
|
3065
|
-
progress:
|
|
3065
|
+
progress: 93,
|
|
3066
3066
|
status: "info",
|
|
3067
3067
|
itemHash: args.itemHash,
|
|
3068
3068
|
detail: "Publishing the host port mapping into the guest relay configuration."
|
|
@@ -3098,7 +3098,7 @@ var SponsorRelayController = class {
|
|
|
3098
3098
|
this.emitProgress({
|
|
3099
3099
|
stage: "deployment-confirmed",
|
|
3100
3100
|
label: "Publishing relay config",
|
|
3101
|
-
progress:
|
|
3101
|
+
progress: 93,
|
|
3102
3102
|
status: "info",
|
|
3103
3103
|
itemHash: args.itemHash,
|
|
3104
3104
|
detail: "Publishing runtime networking into the Aleph guest bootstrap config aggregate."
|
|
@@ -3195,7 +3195,7 @@ var SponsorRelayController = class {
|
|
|
3195
3195
|
this.emitProgress({
|
|
3196
3196
|
stage: "publishing-bootstrap",
|
|
3197
3197
|
label: "Waiting for guest bootstrap registration",
|
|
3198
|
-
progress:
|
|
3198
|
+
progress: 97,
|
|
3199
3199
|
status: "info",
|
|
3200
3200
|
itemHash: args.itemHash,
|
|
3201
3201
|
detail: "Waiting for the relay VM to publish its own bootstrap registration to Aleph."
|
|
@@ -3250,7 +3250,7 @@ var SponsorRelayController = class {
|
|
|
3250
3250
|
}
|
|
3251
3251
|
const currentProgress = this.state.deploymentProgress;
|
|
3252
3252
|
const currentProgressIsForLatestHash = currentProgress.itemHash === itemHash || currentProgress.itemHash == null && currentProgress.stage !== "idle" && currentProgress.stage !== "error";
|
|
3253
|
-
const keepTerminalSuccess = this.
|
|
3253
|
+
const keepTerminalSuccess = this.lastCompletedDeploymentHash === itemHash || currentProgressIsForLatestHash && currentProgress.stage === "completed" && currentProgress.status === "success";
|
|
3254
3254
|
const status = latest.details.messageStatus;
|
|
3255
3255
|
if (status === "rejected") {
|
|
3256
3256
|
this.emitProgress({
|
|
@@ -3304,12 +3304,12 @@ var SponsorRelayController = class {
|
|
|
3304
3304
|
return;
|
|
3305
3305
|
}
|
|
3306
3306
|
this.emitProgress({
|
|
3307
|
-
stage: "
|
|
3307
|
+
stage: "deployment-confirmed",
|
|
3308
3308
|
label: "Runtime ready",
|
|
3309
|
-
progress:
|
|
3310
|
-
status: "
|
|
3309
|
+
progress: 92,
|
|
3310
|
+
status: "info",
|
|
3311
3311
|
itemHash,
|
|
3312
|
-
detail: "Deployment processed and runtime networking is available."
|
|
3312
|
+
detail: "Deployment processed and runtime networking is available. Finishing relay setup and bootstrap verification."
|
|
3313
3313
|
});
|
|
3314
3314
|
}
|
|
3315
3315
|
canSkipRuntimeRefresh(instance) {
|
|
@@ -3760,7 +3760,7 @@ var SponsorRelayController = class {
|
|
|
3760
3760
|
crnHash: candidateCrn.hash,
|
|
3761
3761
|
crnName: candidateCrn.name
|
|
3762
3762
|
});
|
|
3763
|
-
this.
|
|
3763
|
+
this.lastCompletedDeploymentHash = null;
|
|
3764
3764
|
const inspection = await waitForDeploymentResult2(result.itemHash, {
|
|
3765
3765
|
rootfsRef: this.state.manifest.rootfsItemHash,
|
|
3766
3766
|
apiHost: this.client.apiHost,
|
|
@@ -3866,12 +3866,12 @@ var SponsorRelayController = class {
|
|
|
3866
3866
|
onAttempt: (runtime2) => {
|
|
3867
3867
|
if (runtime2.hostIpv4 && Object.keys(runtime2.mappedPorts ?? {}).length > 0) {
|
|
3868
3868
|
this.emitProgress({
|
|
3869
|
-
stage: "
|
|
3869
|
+
stage: "deployment-confirmed",
|
|
3870
3870
|
label: "Runtime ready",
|
|
3871
|
-
progress:
|
|
3872
|
-
status: "
|
|
3871
|
+
progress: 92,
|
|
3872
|
+
status: "info",
|
|
3873
3873
|
itemHash: result.itemHash,
|
|
3874
|
-
detail: "Runtime networking and mapped ports are now available."
|
|
3874
|
+
detail: "Runtime networking and mapped ports are now available. Finishing relay setup and bootstrap verification."
|
|
3875
3875
|
});
|
|
3876
3876
|
return;
|
|
3877
3877
|
}
|
|
@@ -3891,7 +3891,6 @@ var SponsorRelayController = class {
|
|
|
3891
3891
|
);
|
|
3892
3892
|
}
|
|
3893
3893
|
this.trace("deploy:runtime-ready", runtime);
|
|
3894
|
-
this.lastRuntimeReadyHash = result.itemHash;
|
|
3895
3894
|
this.rememberRuntimeDetails(result.itemHash, {
|
|
3896
3895
|
messageStatus: "processed",
|
|
3897
3896
|
allocationSource: runtime.allocation?.source ?? null,
|
|
@@ -3916,12 +3915,21 @@ var SponsorRelayController = class {
|
|
|
3916
3915
|
this.emitProgress({
|
|
3917
3916
|
stage: "refreshing-instances",
|
|
3918
3917
|
label: "Refreshing instances",
|
|
3919
|
-
progress:
|
|
3918
|
+
progress: 99,
|
|
3920
3919
|
status: "info",
|
|
3921
3920
|
itemHash: result.itemHash,
|
|
3922
3921
|
detail: "Reloading deployments and runtime state."
|
|
3923
3922
|
});
|
|
3924
3923
|
await this.refresh();
|
|
3924
|
+
this.lastCompletedDeploymentHash = result.itemHash;
|
|
3925
|
+
this.emitProgress({
|
|
3926
|
+
stage: "completed",
|
|
3927
|
+
label: "Relay ready",
|
|
3928
|
+
progress: 100,
|
|
3929
|
+
status: "success",
|
|
3930
|
+
itemHash: result.itemHash,
|
|
3931
|
+
detail: "Relay runtime, setup, metadata, and bootstrap registration are confirmed."
|
|
3932
|
+
});
|
|
3925
3933
|
return;
|
|
3926
3934
|
} catch (error) {
|
|
3927
3935
|
lastError = error instanceof Error ? error : new Error(String(error));
|