@le-space/core 0.3.11 → 0.3.13
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/index.d.ts +132 -13
- package/index.js +405 -9
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _le_space_shared_types from '@le-space/shared-types';
|
|
2
|
-
import { RootfsResolution, RootfsManifest, RootfsManifestState, CrnRecord, RootfsRequiredPortForward, PortForwardAggregate, PortForwardFlags, PortForwardAggregateEntry, MessageReference, InstanceExecution, MessageStatus, DeploymentInspectionResult, MessageInspectionResult, AlephBroadcastMessage, AlephBroadcastResponse, MessageSigner, MessageHasher, DeploymentProgressListener, AlephAggregateContent, AlephInstanceContent, DeploymentIntentEnvelope, DeploymentResult, InstanceAllocation, InstanceRuntimeDetails, InstanceWebAccess, RuntimeDiagnostics, PortMapping } from '@le-space/shared-types';
|
|
2
|
+
import { RootfsResolution, RootfsManifest, RootfsManifestState, CrnRecord, RootfsRequiredPortForward, PortForwardAggregate, PortForwardFlags, PortForwardAggregateEntry, MessageReference, InstanceExecution, MessageStatus, DeploymentInspectionResult, MessageInspectionResult, AlephBroadcastMessage, AlephBroadcastResponse, MessageSigner, MessageHasher, DeploymentProgressListener, AlephAggregateContent, AlephInstanceContent, DeploymentIntentEnvelope, DeploymentResult, InstanceAllocation, InstanceRuntimeDetails, InstanceWebAccess, RuntimeDiagnostics, PortMapping, VmBootstrapConfigRecord, VmBootstrapConfigAggregate } from '@le-space/shared-types';
|
|
3
3
|
|
|
4
4
|
declare const DEFAULT_ALEPH_CHANNEL = "TEST";
|
|
5
5
|
|
|
@@ -197,7 +197,7 @@ interface JsonFetchLikeResponse {
|
|
|
197
197
|
status: number;
|
|
198
198
|
json(): Promise<unknown>;
|
|
199
199
|
}
|
|
200
|
-
type JsonFetchLike = (url: string, init?: RequestInit) => Promise<JsonFetchLikeResponse>;
|
|
200
|
+
type JsonFetchLike$1 = (url: string, init?: RequestInit) => Promise<JsonFetchLikeResponse>;
|
|
201
201
|
declare function signaturePayload(message: Pick<AlephBroadcastMessage, 'chain' | 'sender' | 'type' | 'item_hash'>): string;
|
|
202
202
|
declare function signAlephMessage(unsignedMessage: Omit<AlephBroadcastMessage, 'signature'>, signer: MessageSigner): Promise<AlephBroadcastMessage>;
|
|
203
203
|
declare function normalizeBroadcastStatus(httpStatus: number, responseStatus: unknown): MessageStatus;
|
|
@@ -209,7 +209,7 @@ declare function isRetryableBroadcastFailure(response: {
|
|
|
209
209
|
}, payload: AlephBroadcastResponse): boolean;
|
|
210
210
|
declare function postBroadcastPayload(body: Record<string, unknown>, options: {
|
|
211
211
|
apiHost?: string;
|
|
212
|
-
fetch: JsonFetchLike;
|
|
212
|
+
fetch: JsonFetchLike$1;
|
|
213
213
|
}): Promise<{
|
|
214
214
|
response: AlephBroadcastResponse;
|
|
215
215
|
httpStatus: number;
|
|
@@ -217,7 +217,7 @@ declare function postBroadcastPayload(body: Record<string, unknown>, options: {
|
|
|
217
217
|
declare function broadcastAlephMessage(message: AlephBroadcastMessage, options: {
|
|
218
218
|
apiHost?: string;
|
|
219
219
|
sync?: boolean;
|
|
220
|
-
fetch: JsonFetchLike;
|
|
220
|
+
fetch: JsonFetchLike$1;
|
|
221
221
|
}): Promise<{
|
|
222
222
|
response: AlephBroadcastResponse;
|
|
223
223
|
httpStatus: number;
|
|
@@ -239,7 +239,7 @@ declare function forgetAlephMessages(args: {
|
|
|
239
239
|
reason?: string;
|
|
240
240
|
signer: MessageSigner;
|
|
241
241
|
hasher: MessageHasher;
|
|
242
|
-
fetch: JsonFetchLike;
|
|
242
|
+
fetch: JsonFetchLike$1;
|
|
243
243
|
channel?: string;
|
|
244
244
|
apiHost?: string;
|
|
245
245
|
sync?: boolean;
|
|
@@ -258,7 +258,7 @@ declare function cleanupFailedDeployment(args: {
|
|
|
258
258
|
reason?: string;
|
|
259
259
|
signer: MessageSigner;
|
|
260
260
|
hasher: MessageHasher;
|
|
261
|
-
fetch: JsonFetchLike;
|
|
261
|
+
fetch: JsonFetchLike$1;
|
|
262
262
|
channel?: string;
|
|
263
263
|
apiHost?: string;
|
|
264
264
|
}): Promise<{
|
|
@@ -286,7 +286,7 @@ interface RetentionRecord {
|
|
|
286
286
|
declare function fetchAggregateKey(args: {
|
|
287
287
|
address: string;
|
|
288
288
|
key: string;
|
|
289
|
-
fetch: JsonFetchLike;
|
|
289
|
+
fetch: JsonFetchLike$1;
|
|
290
290
|
apiHost?: string;
|
|
291
291
|
}): Promise<unknown>;
|
|
292
292
|
declare function publishAggregateKey(args: {
|
|
@@ -295,7 +295,7 @@ declare function publishAggregateKey(args: {
|
|
|
295
295
|
content: Record<string, unknown>;
|
|
296
296
|
signer: MessageSigner;
|
|
297
297
|
hasher: MessageHasher;
|
|
298
|
-
fetch: JsonFetchLike;
|
|
298
|
+
fetch: JsonFetchLike$1;
|
|
299
299
|
channel?: string;
|
|
300
300
|
apiHost?: string;
|
|
301
301
|
now?: number;
|
|
@@ -311,7 +311,7 @@ declare function retainSuccessfulDeployments(args: {
|
|
|
311
311
|
keepCount: number;
|
|
312
312
|
signer: MessageSigner;
|
|
313
313
|
hasher: MessageHasher;
|
|
314
|
-
fetch: JsonFetchLike;
|
|
314
|
+
fetch: JsonFetchLike$1;
|
|
315
315
|
aggregateKey?: string;
|
|
316
316
|
extraForgetHashes?: string[];
|
|
317
317
|
reason?: string;
|
|
@@ -381,7 +381,7 @@ declare function ensureInstancePortForwards(args: {
|
|
|
381
381
|
manifest: RootfsManifest | null;
|
|
382
382
|
signer: MessageSigner;
|
|
383
383
|
hasher: MessageHasher;
|
|
384
|
-
fetch: JsonFetchLike;
|
|
384
|
+
fetch: JsonFetchLike$1;
|
|
385
385
|
channel?: string;
|
|
386
386
|
apiHost?: string;
|
|
387
387
|
sync?: boolean;
|
|
@@ -406,6 +406,8 @@ interface PaymentQuote {
|
|
|
406
406
|
}
|
|
407
407
|
declare function normalizeSshPublicKey(value: string): string;
|
|
408
408
|
declare function isValidSshPublicKey(value: string): boolean;
|
|
409
|
+
declare function createDeploymentToken(): string;
|
|
410
|
+
declare function appendDeploymentTokenToSshPublicKey(sshPublicKey: string, ownerAddress: string, deploymentToken: string): string;
|
|
409
411
|
declare function createReleaseMetadata(name: string, rootfsVersion: string, deployer?: string): {
|
|
410
412
|
name: string;
|
|
411
413
|
rootfs_version: string;
|
|
@@ -619,12 +621,22 @@ declare function configureOrbitdbRelaySetup(args: {
|
|
|
619
621
|
declare function fetchUcGoPeerMetadata(args: {
|
|
620
622
|
hostIpv4: string;
|
|
621
623
|
setupPort: number;
|
|
624
|
+
metadataUrl?: string | null;
|
|
622
625
|
fetch: FetchLike;
|
|
623
626
|
attempts?: number;
|
|
624
627
|
delayMs?: number;
|
|
625
628
|
timeoutMs?: number;
|
|
626
629
|
sleep?: (ms: number) => Promise<void>;
|
|
627
|
-
onAttempt?: (
|
|
630
|
+
onAttempt?: (result: {
|
|
631
|
+
payload: unknown;
|
|
632
|
+
ready: boolean;
|
|
633
|
+
attempt: number;
|
|
634
|
+
attempts: number;
|
|
635
|
+
requestUrl: string;
|
|
636
|
+
ok: boolean;
|
|
637
|
+
status: number | null;
|
|
638
|
+
error?: string | null;
|
|
639
|
+
}) => void;
|
|
628
640
|
}): Promise<unknown>;
|
|
629
641
|
declare function verifyUcGoPeerReachability(args: {
|
|
630
642
|
hostIpv4?: string | null;
|
|
@@ -690,7 +702,7 @@ declare function publishRelayBootstrapRegistration(args: {
|
|
|
690
702
|
sender: string;
|
|
691
703
|
signer: MessageSigner;
|
|
692
704
|
hasher: MessageHasher;
|
|
693
|
-
fetch: JsonFetchLike;
|
|
705
|
+
fetch: JsonFetchLike$1;
|
|
694
706
|
peerId: string;
|
|
695
707
|
multiaddrs: string[];
|
|
696
708
|
browserMultiaddrs?: string[];
|
|
@@ -716,4 +728,111 @@ declare function publishRelayBootstrapRegistration(args: {
|
|
|
716
728
|
now?: number;
|
|
717
729
|
}): Promise<RelayBootstrapPublicationResult>;
|
|
718
730
|
|
|
719
|
-
|
|
731
|
+
declare const VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY = "vm-bootstrap-config";
|
|
732
|
+
declare function fetchVmBootstrapConfigAggregate(address: string, options: {
|
|
733
|
+
apiHost?: string;
|
|
734
|
+
fetch: JsonFetchLike$1;
|
|
735
|
+
}): Promise<VmBootstrapConfigAggregate>;
|
|
736
|
+
declare function createVmBootstrapConfigAggregateContent(args: {
|
|
737
|
+
sender: string;
|
|
738
|
+
record: VmBootstrapConfigRecord;
|
|
739
|
+
existingAggregate?: VmBootstrapConfigAggregate | null;
|
|
740
|
+
now?: number;
|
|
741
|
+
}): AlephAggregateContent<VmBootstrapConfigAggregate>;
|
|
742
|
+
declare function publishVmBootstrapConfig(args: {
|
|
743
|
+
sender: string;
|
|
744
|
+
record: VmBootstrapConfigRecord;
|
|
745
|
+
signer: MessageSigner;
|
|
746
|
+
hasher: MessageHasher;
|
|
747
|
+
fetch: JsonFetchLike$1;
|
|
748
|
+
channel?: string;
|
|
749
|
+
apiHost?: string;
|
|
750
|
+
sync?: boolean;
|
|
751
|
+
}): Promise<{
|
|
752
|
+
aggregateItemHash: string;
|
|
753
|
+
aggregateStatus: MessageStatus;
|
|
754
|
+
aggregate: VmBootstrapConfigAggregate;
|
|
755
|
+
}>;
|
|
756
|
+
declare function deleteVmBootstrapConfig(args: {
|
|
757
|
+
sender: string;
|
|
758
|
+
deploymentToken: string;
|
|
759
|
+
signer: MessageSigner;
|
|
760
|
+
hasher: MessageHasher;
|
|
761
|
+
fetch: JsonFetchLike$1;
|
|
762
|
+
channel?: string;
|
|
763
|
+
apiHost?: string;
|
|
764
|
+
sync?: boolean;
|
|
765
|
+
}): Promise<{
|
|
766
|
+
aggregateItemHash: string;
|
|
767
|
+
aggregateStatus: MessageStatus;
|
|
768
|
+
aggregate: VmBootstrapConfigAggregate;
|
|
769
|
+
}>;
|
|
770
|
+
|
|
771
|
+
type JsonFetchLike = FetchLike;
|
|
772
|
+
type RelayMetadataShape = {
|
|
773
|
+
peerId: string;
|
|
774
|
+
probeMultiaddrs: string[];
|
|
775
|
+
browserBootstrapMultiaddrs: string[];
|
|
776
|
+
};
|
|
777
|
+
interface OwnerRelayBootstrapReconcileResult {
|
|
778
|
+
refreshedRegistrations: string[];
|
|
779
|
+
forgottenHashes: string[];
|
|
780
|
+
skippedInstanceHashes: string[];
|
|
781
|
+
errors: Array<{
|
|
782
|
+
phase: string;
|
|
783
|
+
itemHash?: string;
|
|
784
|
+
registrationId?: string;
|
|
785
|
+
message: string;
|
|
786
|
+
}>;
|
|
787
|
+
}
|
|
788
|
+
declare function createRelayBootstrapRegistrationId(profile: string, instanceName: string | null | undefined, itemHash: string): string;
|
|
789
|
+
declare function fetchRelayMetadataForRuntime(args: {
|
|
790
|
+
runtime: Awaited<ReturnType<typeof fetchVmRuntime>>;
|
|
791
|
+
fetch: JsonFetchLike;
|
|
792
|
+
preferSecureMetadata?: boolean;
|
|
793
|
+
attempts?: number;
|
|
794
|
+
delayMs?: number;
|
|
795
|
+
timeoutMs?: number;
|
|
796
|
+
onAttempt?: (result: {
|
|
797
|
+
payload: unknown;
|
|
798
|
+
ready: boolean;
|
|
799
|
+
attempt: number;
|
|
800
|
+
attempts: number;
|
|
801
|
+
requestUrl: string;
|
|
802
|
+
ok: boolean;
|
|
803
|
+
status: number | null;
|
|
804
|
+
error?: string | null;
|
|
805
|
+
metadataUrl: string | null;
|
|
806
|
+
hostIpv4: string | null;
|
|
807
|
+
setupPort: number;
|
|
808
|
+
}) => void;
|
|
809
|
+
}): Promise<RelayMetadataShape | null>;
|
|
810
|
+
declare function reconcileOwnerRelayBootstrapRegistrations(args: {
|
|
811
|
+
instanceOwnerAddress: string;
|
|
812
|
+
sender: string;
|
|
813
|
+
signer: MessageSigner;
|
|
814
|
+
hasher: MessageHasher;
|
|
815
|
+
fetch: JsonFetchLike;
|
|
816
|
+
profile: string;
|
|
817
|
+
apiHost?: string;
|
|
818
|
+
channel?: string;
|
|
819
|
+
ref?: string;
|
|
820
|
+
postType?: string;
|
|
821
|
+
version?: string;
|
|
822
|
+
ownerAddress?: string;
|
|
823
|
+
ownerSigner?: MessageSigner;
|
|
824
|
+
publisherAddress?: string;
|
|
825
|
+
publisherSigner?: MessageSigner;
|
|
826
|
+
crns?: CrnRecord[];
|
|
827
|
+
crnListUrl?: string;
|
|
828
|
+
preferSecureMetadata?: boolean;
|
|
829
|
+
current?: {
|
|
830
|
+
itemHash: string;
|
|
831
|
+
registrationId: string;
|
|
832
|
+
peerId: string;
|
|
833
|
+
probeMultiaddrs: string[];
|
|
834
|
+
browserBootstrapMultiaddrs?: string[];
|
|
835
|
+
} | null;
|
|
836
|
+
}): Promise<OwnerRelayBootstrapReconcileResult>;
|
|
837
|
+
|
|
838
|
+
export { type CrnCapacitySpec, DEFAULT_ALEPH_API_HOST, DEFAULT_ALEPH_CHANNEL, DEFAULT_COUNTRY_LOOKUP_BASE_URL, DEFAULT_CRN_LIST_URL, DEFAULT_DNS_RESOLVE_URL, DEFAULT_INSTANCE_PORT_FORWARDS, DEFAULT_IPFS_GATEWAY_BASE_URL, DEFAULT_SCHEDULER_ALLOCATION_URL, DEFAULT_TWO_N_SIX_HASH_URL, type FetchLike, type FetchLikeResponse, type HttpProbeResult, ITEM_HASH_RE, type JsonFetchLike$1 as JsonFetchLike, type JsonFetchLikeResponse, type OwnerRelayBootstrapReconcileResult, type PaymentQuote, type RelayBootstrapPublicationResult, type RelayMetadataShape, type RetentionRecord, SSH_PUBLIC_KEY_PATTERN, SUCCESSFUL_DEPLOYMENTS_AGGREGATE_KEY, type TcpProbeResult, type TierSpec, VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY, appendDeploymentTokenToSshPublicKey, broadcastAlephMessage, buildPaymentQuote, cleanupFailedDeployment, configureOrbitdbRelaySetup, configureUcGoPeer, createDeploymentIntent, createDeploymentToken, createInstanceContent, createPortForwardAggregateContent, createRelayBootstrapRegistrationId, createReleaseMetadata, createUnsignedAggregateMessage, createUnsignedForgetMessage, createUnsignedInstanceMessage, createVmBootstrapConfigAggregateContent, deleteVmBootstrapConfig, deployInstance, describeRejectedDeployment, describeRuntimeAvailability, enrichCrnsWithGeo, ensureInstancePortForwards, extractInsufficientBalanceMessage, extractProxyUrl, extractReferenceHashes, fetch2n6WebAccessUrl, fetchAggregateKey, fetchCrnExecutionMap, fetchCrns, fetchMessageEnvelope, fetchPortForwardAggregate, fetchRelayMetadataForRuntime, fetchSchedulerAllocation, fetchUcGoPeerMetadata, fetchVmBootstrapConfigAggregate, fetchVmRuntime, filterDeployableCrns, findCrnByHash, forgetAlephMessages, inspectDeploymentResult, inspectMessageResult, isInvalidMessageFormatResponse, isRetryableBroadcastFailure, isValidSshPublicKey, listGeocodedCrns, mergePortFlagMaps, mergeRequiredPortForwards, messageTypeFromEnvelope, normalizeBroadcastStatus, normalizeExecution, normalizeExistingPortForwardEntry, normalizeMessageStatus, normalizeProxyUrl, normalizeSshPublicKey, notifyCrnAllocation, notifyCrnAllocationWithRetry, portForwardLabel, postBroadcastPayload, probeRootfsGateway, publishAggregateKey, publishRelayBootstrapRegistration, publishVmBootstrapConfig, quoteRequiredBudgetUnits, rankCandidateCrns, reconcileOwnerRelayBootstrapRegistrations, requestedPortFlags, requiredInstancePortForwards, resolveRootfsReference, retainSuccessfulDeployments, selectPreferredCrn, selectedTier, signAlephMessage, signaturePayload, tierSpec, validateRootfsManifest, verifyRootfsExists, verifyUcGoPeerReachability, waitForDeploymentResult, waitForSetupEndpoint, waitForVmRuntime };
|
package/index.js
CHANGED
|
@@ -1289,6 +1289,24 @@ function normalizeSshPublicKey(value) {
|
|
|
1289
1289
|
function isValidSshPublicKey(value) {
|
|
1290
1290
|
return SSH_PUBLIC_KEY_PATTERN.test(normalizeSshPublicKey(value));
|
|
1291
1291
|
}
|
|
1292
|
+
function createDeploymentToken() {
|
|
1293
|
+
const randomUuid = globalThis.crypto?.randomUUID?.();
|
|
1294
|
+
if (typeof randomUuid === "string" && randomUuid.trim()) {
|
|
1295
|
+
return randomUuid;
|
|
1296
|
+
}
|
|
1297
|
+
return `deploy-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`;
|
|
1298
|
+
}
|
|
1299
|
+
function appendDeploymentTokenToSshPublicKey(sshPublicKey, ownerAddress, deploymentToken) {
|
|
1300
|
+
const normalized = normalizeSshPublicKey(sshPublicKey);
|
|
1301
|
+
if (!normalized) return normalized;
|
|
1302
|
+
const [algorithm = "", key = ""] = normalized.split(/\s+/, 3);
|
|
1303
|
+
const owner = ownerAddress.trim().toLowerCase();
|
|
1304
|
+
const token = deploymentToken.trim();
|
|
1305
|
+
if (!algorithm || !key || !owner || !token) {
|
|
1306
|
+
return normalized;
|
|
1307
|
+
}
|
|
1308
|
+
return `${algorithm} ${key} aleph-bootstrap-config:${owner}:${token}`;
|
|
1309
|
+
}
|
|
1292
1310
|
function createReleaseMetadata(name, rootfsVersion, deployer = "shared-aleph-tooling") {
|
|
1293
1311
|
return {
|
|
1294
1312
|
name,
|
|
@@ -1964,24 +1982,30 @@ async function fetchUcGoPeerMetadata(args) {
|
|
|
1964
1982
|
() => controller.abort(),
|
|
1965
1983
|
Number(args.timeoutMs ?? 18e4)
|
|
1966
1984
|
);
|
|
1985
|
+
const requestUrl = args.metadataUrl && args.metadataUrl.trim() ? args.metadataUrl : `http://${args.hostIpv4}:${args.setupPort}/metadata`;
|
|
1967
1986
|
try {
|
|
1968
1987
|
const response = await args.fetch(
|
|
1969
|
-
|
|
1988
|
+
requestUrl,
|
|
1970
1989
|
{
|
|
1971
1990
|
signal: controller.signal
|
|
1972
1991
|
}
|
|
1973
1992
|
);
|
|
1974
1993
|
const payload = await response.json().catch(() => null);
|
|
1975
1994
|
lastPayload = payload;
|
|
1976
|
-
|
|
1977
|
-
payload
|
|
1978
|
-
Boolean(
|
|
1979
|
-
response.ok && payload && typeof payload === "object" && payload.status === "ready"
|
|
1980
|
-
),
|
|
1981
|
-
attempt + 1,
|
|
1982
|
-
attempts
|
|
1995
|
+
const ready = Boolean(
|
|
1996
|
+
response.ok && payload && typeof payload === "object" && payload.status === "ready"
|
|
1983
1997
|
);
|
|
1984
|
-
|
|
1998
|
+
args.onAttempt?.({
|
|
1999
|
+
payload,
|
|
2000
|
+
ready,
|
|
2001
|
+
attempt: attempt + 1,
|
|
2002
|
+
attempts,
|
|
2003
|
+
requestUrl,
|
|
2004
|
+
ok: response.ok,
|
|
2005
|
+
status: response.status,
|
|
2006
|
+
error: null
|
|
2007
|
+
});
|
|
2008
|
+
if (ready) {
|
|
1985
2009
|
return payload;
|
|
1986
2010
|
}
|
|
1987
2011
|
if (response.status >= 500) {
|
|
@@ -1989,6 +2013,18 @@ async function fetchUcGoPeerMetadata(args) {
|
|
|
1989
2013
|
`Relay metadata request failed: ${response.status} ${typeof payload === "string" ? payload : JSON.stringify(payload ?? {})}`
|
|
1990
2014
|
);
|
|
1991
2015
|
}
|
|
2016
|
+
} catch (error) {
|
|
2017
|
+
args.onAttempt?.({
|
|
2018
|
+
payload: null,
|
|
2019
|
+
ready: false,
|
|
2020
|
+
attempt: attempt + 1,
|
|
2021
|
+
attempts,
|
|
2022
|
+
requestUrl,
|
|
2023
|
+
ok: false,
|
|
2024
|
+
status: null,
|
|
2025
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2026
|
+
});
|
|
2027
|
+
throw error;
|
|
1992
2028
|
} finally {
|
|
1993
2029
|
clearTimeout(timeout);
|
|
1994
2030
|
}
|
|
@@ -2100,6 +2136,9 @@ function asNumber3(value) {
|
|
|
2100
2136
|
function normalizeHost(host) {
|
|
2101
2137
|
return host.trim().toLowerCase();
|
|
2102
2138
|
}
|
|
2139
|
+
function normalizeAddress(address) {
|
|
2140
|
+
return address.trim().toLowerCase();
|
|
2141
|
+
}
|
|
2103
2142
|
function normalizeSignature(signature) {
|
|
2104
2143
|
const trimmed = signature.trim();
|
|
2105
2144
|
return trimmed.startsWith("0x") ? trimmed : `0x${trimmed}`;
|
|
@@ -2401,6 +2440,40 @@ async function fetchAlephBootstrapPosts(options = {}) {
|
|
|
2401
2440
|
const payload = await response.json();
|
|
2402
2441
|
return (payload.posts ?? []).map((entry) => normalizeRelayBootstrapPostRecord(entry)).filter((entry) => entry != null);
|
|
2403
2442
|
}
|
|
2443
|
+
function compareRelayBootstrapPostRecency(left, right) {
|
|
2444
|
+
const leftUpdatedAt = left.content?.updatedAt ?? 0;
|
|
2445
|
+
const rightUpdatedAt = right.content?.updatedAt ?? 0;
|
|
2446
|
+
if (leftUpdatedAt !== rightUpdatedAt) return leftUpdatedAt - rightUpdatedAt;
|
|
2447
|
+
const leftTime = left.time ?? 0;
|
|
2448
|
+
const rightTime = right.time ?? 0;
|
|
2449
|
+
return leftTime - rightTime;
|
|
2450
|
+
}
|
|
2451
|
+
function relayBootstrapRecordIdentity(post) {
|
|
2452
|
+
const content = post.content;
|
|
2453
|
+
if (!content) return null;
|
|
2454
|
+
if (content.registrationId) return `registration:${content.registrationId}`;
|
|
2455
|
+
if (post.address) return `sender:${normalizeAddress(post.address)}`;
|
|
2456
|
+
return content.peerId ? `peer:${content.peerId}` : null;
|
|
2457
|
+
}
|
|
2458
|
+
function selectCurrentRelayBootstrapPosts(posts, options = {}) {
|
|
2459
|
+
const maxAgeMs = options.maxAgeMs ?? DEFAULT_BOOTSTRAP_MAX_AGE_MS;
|
|
2460
|
+
const now = options.now ?? Date.now();
|
|
2461
|
+
const selected = /* @__PURE__ */ new Map();
|
|
2462
|
+
for (const post of posts) {
|
|
2463
|
+
const content = post.content;
|
|
2464
|
+
if (!content) continue;
|
|
2465
|
+
if (now - content.updatedAt > maxAgeMs) continue;
|
|
2466
|
+
const identity = relayBootstrapRecordIdentity(post);
|
|
2467
|
+
if (!identity) continue;
|
|
2468
|
+
const previous = selected.get(identity);
|
|
2469
|
+
if (!previous || compareRelayBootstrapPostRecency(post, previous) > 0) {
|
|
2470
|
+
selected.set(identity, post);
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
return [...selected.values()].sort(
|
|
2474
|
+
(left, right) => compareRelayBootstrapPostRecency(right, left)
|
|
2475
|
+
);
|
|
2476
|
+
}
|
|
2404
2477
|
|
|
2405
2478
|
// src/bootstrap-registration.ts
|
|
2406
2479
|
async function publishRelayBootstrapRegistration(args) {
|
|
@@ -2506,6 +2579,319 @@ async function publishRelayBootstrapRegistration(args) {
|
|
|
2506
2579
|
forgetResult
|
|
2507
2580
|
};
|
|
2508
2581
|
}
|
|
2582
|
+
|
|
2583
|
+
// src/bootstrap-config.ts
|
|
2584
|
+
var VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY = "vm-bootstrap-config";
|
|
2585
|
+
async function fetchVmBootstrapConfigAggregate(address, options) {
|
|
2586
|
+
const requestUrl = new URL(`/api/v0/aggregates/${address}.json`, options.apiHost ?? DEFAULT_ALEPH_API_HOST);
|
|
2587
|
+
requestUrl.searchParams.set("keys", VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY);
|
|
2588
|
+
const response = await options.fetch(requestUrl.toString(), { cache: "no-cache" });
|
|
2589
|
+
if (response.status === 404) return {};
|
|
2590
|
+
if (!response.ok) {
|
|
2591
|
+
throw new Error(`VM bootstrap config aggregate request failed: ${response.status}`);
|
|
2592
|
+
}
|
|
2593
|
+
const payload = await response.json();
|
|
2594
|
+
const aggregate = payload.data?.[VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY];
|
|
2595
|
+
if (!aggregate || typeof aggregate !== "object" || Array.isArray(aggregate)) return {};
|
|
2596
|
+
return aggregate;
|
|
2597
|
+
}
|
|
2598
|
+
function normalizeVmBootstrapConfigAggregate(aggregate) {
|
|
2599
|
+
if (!aggregate || typeof aggregate !== "object") return {};
|
|
2600
|
+
return Object.fromEntries(
|
|
2601
|
+
Object.entries(aggregate).filter(
|
|
2602
|
+
(entry) => Boolean(entry[1] && typeof entry[1] === "object" && !Array.isArray(entry[1]))
|
|
2603
|
+
)
|
|
2604
|
+
);
|
|
2605
|
+
}
|
|
2606
|
+
function createVmBootstrapConfigAggregateContent(args) {
|
|
2607
|
+
const content = normalizeVmBootstrapConfigAggregate(args.existingAggregate);
|
|
2608
|
+
content[args.record.deploymentToken] = args.record;
|
|
2609
|
+
return {
|
|
2610
|
+
address: args.sender,
|
|
2611
|
+
key: VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY,
|
|
2612
|
+
content,
|
|
2613
|
+
time: args.now ?? Date.now() / 1e3
|
|
2614
|
+
};
|
|
2615
|
+
}
|
|
2616
|
+
async function createUnsignedVmBootstrapConfigAggregateMessage(args) {
|
|
2617
|
+
const itemContent = JSON.stringify(args.content);
|
|
2618
|
+
const itemHash = await args.hasher(itemContent);
|
|
2619
|
+
return {
|
|
2620
|
+
sender: args.sender,
|
|
2621
|
+
chain: "ETH",
|
|
2622
|
+
type: "AGGREGATE",
|
|
2623
|
+
item_hash: itemHash,
|
|
2624
|
+
item_type: "inline",
|
|
2625
|
+
item_content: itemContent,
|
|
2626
|
+
time: args.now ?? Date.now() / 1e3,
|
|
2627
|
+
channel: args.channel ?? DEFAULT_ALEPH_CHANNEL
|
|
2628
|
+
};
|
|
2629
|
+
}
|
|
2630
|
+
async function publishVmBootstrapConfigAggregate(args) {
|
|
2631
|
+
const unsignedMessage = await createUnsignedVmBootstrapConfigAggregateMessage({
|
|
2632
|
+
sender: args.sender,
|
|
2633
|
+
content: args.content,
|
|
2634
|
+
hasher: args.hasher,
|
|
2635
|
+
channel: args.channel
|
|
2636
|
+
});
|
|
2637
|
+
const message = await signAlephMessage(unsignedMessage, args.signer);
|
|
2638
|
+
const { response, httpStatus } = await broadcastAlephMessage(message, {
|
|
2639
|
+
apiHost: args.apiHost,
|
|
2640
|
+
sync: args.sync,
|
|
2641
|
+
fetch: args.fetch
|
|
2642
|
+
});
|
|
2643
|
+
const aggregateStatus = httpStatus >= 200 && httpStatus < 300 ? response.message_status ?? "processed" : "unknown";
|
|
2644
|
+
if (aggregateStatus === "rejected") {
|
|
2645
|
+
throw new Error(`VM bootstrap config aggregate was rejected by Aleph: ${JSON.stringify(response.details ?? response)}`);
|
|
2646
|
+
}
|
|
2647
|
+
return {
|
|
2648
|
+
aggregateItemHash: message.item_hash,
|
|
2649
|
+
aggregateStatus
|
|
2650
|
+
};
|
|
2651
|
+
}
|
|
2652
|
+
async function publishVmBootstrapConfig(args) {
|
|
2653
|
+
const aggregate = await fetchVmBootstrapConfigAggregate(args.sender, {
|
|
2654
|
+
apiHost: args.apiHost,
|
|
2655
|
+
fetch: args.fetch
|
|
2656
|
+
});
|
|
2657
|
+
const content = createVmBootstrapConfigAggregateContent({
|
|
2658
|
+
sender: args.sender,
|
|
2659
|
+
record: args.record,
|
|
2660
|
+
existingAggregate: aggregate
|
|
2661
|
+
});
|
|
2662
|
+
const result = await publishVmBootstrapConfigAggregate({
|
|
2663
|
+
sender: args.sender,
|
|
2664
|
+
content,
|
|
2665
|
+
signer: args.signer,
|
|
2666
|
+
hasher: args.hasher,
|
|
2667
|
+
fetch: args.fetch,
|
|
2668
|
+
channel: args.channel,
|
|
2669
|
+
apiHost: args.apiHost,
|
|
2670
|
+
sync: args.sync
|
|
2671
|
+
});
|
|
2672
|
+
return {
|
|
2673
|
+
...result,
|
|
2674
|
+
aggregate: content.content
|
|
2675
|
+
};
|
|
2676
|
+
}
|
|
2677
|
+
async function deleteVmBootstrapConfig(args) {
|
|
2678
|
+
const aggregate = await fetchVmBootstrapConfigAggregate(args.sender, {
|
|
2679
|
+
apiHost: args.apiHost,
|
|
2680
|
+
fetch: args.fetch
|
|
2681
|
+
});
|
|
2682
|
+
const content = normalizeVmBootstrapConfigAggregate(aggregate);
|
|
2683
|
+
delete content[args.deploymentToken];
|
|
2684
|
+
const publishResult = await publishVmBootstrapConfigAggregate({
|
|
2685
|
+
sender: args.sender,
|
|
2686
|
+
content: {
|
|
2687
|
+
address: args.sender,
|
|
2688
|
+
key: VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY,
|
|
2689
|
+
content,
|
|
2690
|
+
time: Date.now() / 1e3
|
|
2691
|
+
},
|
|
2692
|
+
signer: args.signer,
|
|
2693
|
+
hasher: args.hasher,
|
|
2694
|
+
fetch: args.fetch,
|
|
2695
|
+
channel: args.channel,
|
|
2696
|
+
apiHost: args.apiHost,
|
|
2697
|
+
sync: args.sync
|
|
2698
|
+
});
|
|
2699
|
+
return {
|
|
2700
|
+
...publishResult,
|
|
2701
|
+
aggregate: content
|
|
2702
|
+
};
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
// src/bootstrap-reconcile.ts
|
|
2706
|
+
function createRelayBootstrapRegistrationId(profile, instanceName, itemHash) {
|
|
2707
|
+
const normalizedName = String(instanceName ?? "").trim();
|
|
2708
|
+
const normalizedHash = String(itemHash ?? "").trim();
|
|
2709
|
+
if (!normalizedHash) {
|
|
2710
|
+
return `relay:${profile}:${normalizedName || "instance"}`;
|
|
2711
|
+
}
|
|
2712
|
+
return `relay:${profile}:${normalizedName || normalizedHash}:${normalizedHash}`;
|
|
2713
|
+
}
|
|
2714
|
+
function secureBootstrapMetadataUrl(proxyUrl) {
|
|
2715
|
+
const normalized = String(proxyUrl ?? "").trim();
|
|
2716
|
+
if (!normalized) return null;
|
|
2717
|
+
try {
|
|
2718
|
+
return new URL("/bootstrap/metadata", normalized).toString();
|
|
2719
|
+
} catch {
|
|
2720
|
+
return null;
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
function extractRelayMetadata(payload) {
|
|
2724
|
+
const metadata = payload && typeof payload === "object" && payload.metadata && typeof payload.metadata === "object" ? payload.metadata : null;
|
|
2725
|
+
const peerId = typeof metadata?.peer_id === "string" ? metadata.peer_id : null;
|
|
2726
|
+
const probeMultiaddrs = Array.isArray(metadata?.probe_multiaddrs) ? metadata.probe_multiaddrs.filter((entry) => typeof entry === "string") : [];
|
|
2727
|
+
const browserBootstrapMultiaddrs = Array.isArray(metadata?.browser_bootstrap_multiaddrs) ? metadata.browser_bootstrap_multiaddrs.filter((entry) => typeof entry === "string") : [];
|
|
2728
|
+
if (!peerId || probeMultiaddrs.length === 0) return null;
|
|
2729
|
+
return {
|
|
2730
|
+
peerId,
|
|
2731
|
+
probeMultiaddrs,
|
|
2732
|
+
browserBootstrapMultiaddrs
|
|
2733
|
+
};
|
|
2734
|
+
}
|
|
2735
|
+
async function fetchOwnerInstances(address, options) {
|
|
2736
|
+
const url = new URL("/api/v0/messages.json", options.apiHost ?? DEFAULT_ALEPH_API_HOST);
|
|
2737
|
+
url.searchParams.set("msgTypes", "INSTANCE");
|
|
2738
|
+
url.searchParams.set("addresses", address);
|
|
2739
|
+
url.searchParams.set("message_statuses", "processed,pending,rejected,removing");
|
|
2740
|
+
url.searchParams.set("pagination", "100");
|
|
2741
|
+
url.searchParams.set("page", "1");
|
|
2742
|
+
url.searchParams.set("sortOrder", "-1");
|
|
2743
|
+
const response = await options.fetch(url.toString(), { cache: "no-cache" });
|
|
2744
|
+
if (!response.ok) {
|
|
2745
|
+
throw new Error(`Instance list request failed: ${response.status}`);
|
|
2746
|
+
}
|
|
2747
|
+
const payload = await response.json();
|
|
2748
|
+
return (payload.messages ?? []).map((message) => ({
|
|
2749
|
+
...message,
|
|
2750
|
+
status: typeof message.status === "string" && message.status.trim() ? message.status : message.confirmed ? "processed" : "pending"
|
|
2751
|
+
}));
|
|
2752
|
+
}
|
|
2753
|
+
async function fetchRelayMetadataForRuntime(args) {
|
|
2754
|
+
const setupPort = args.runtime.mappedPorts?.["80"]?.host ?? 80;
|
|
2755
|
+
const metadataUrl = args.preferSecureMetadata ? secureBootstrapMetadataUrl(args.runtime.proxyUrl) : null;
|
|
2756
|
+
if (args.preferSecureMetadata && !metadataUrl) {
|
|
2757
|
+
return null;
|
|
2758
|
+
}
|
|
2759
|
+
const payload = await fetchUcGoPeerMetadata({
|
|
2760
|
+
hostIpv4: args.runtime.hostIpv4 ?? "",
|
|
2761
|
+
setupPort,
|
|
2762
|
+
metadataUrl,
|
|
2763
|
+
fetch: args.fetch,
|
|
2764
|
+
attempts: args.attempts,
|
|
2765
|
+
delayMs: args.delayMs,
|
|
2766
|
+
timeoutMs: args.timeoutMs,
|
|
2767
|
+
onAttempt: (result) => {
|
|
2768
|
+
args.onAttempt?.({
|
|
2769
|
+
...result,
|
|
2770
|
+
metadataUrl,
|
|
2771
|
+
hostIpv4: args.runtime.hostIpv4 ?? null,
|
|
2772
|
+
setupPort
|
|
2773
|
+
});
|
|
2774
|
+
}
|
|
2775
|
+
}).catch(() => null);
|
|
2776
|
+
return extractRelayMetadata(payload);
|
|
2777
|
+
}
|
|
2778
|
+
async function reconcileOwnerRelayBootstrapRegistrations(args) {
|
|
2779
|
+
const result = {
|
|
2780
|
+
refreshedRegistrations: [],
|
|
2781
|
+
forgottenHashes: [],
|
|
2782
|
+
skippedInstanceHashes: [],
|
|
2783
|
+
errors: []
|
|
2784
|
+
};
|
|
2785
|
+
const liveRegistrationIds = /* @__PURE__ */ new Set();
|
|
2786
|
+
if (args.current?.registrationId) {
|
|
2787
|
+
liveRegistrationIds.add(args.current.registrationId);
|
|
2788
|
+
result.refreshedRegistrations.push(args.current.registrationId);
|
|
2789
|
+
}
|
|
2790
|
+
const instances = await fetchOwnerInstances(args.instanceOwnerAddress, {
|
|
2791
|
+
apiHost: args.apiHost,
|
|
2792
|
+
fetch: args.fetch
|
|
2793
|
+
});
|
|
2794
|
+
const processedInstances = instances.filter((instance) => {
|
|
2795
|
+
const status = String(instance.status ?? "").trim().toLowerCase();
|
|
2796
|
+
return status === "processed";
|
|
2797
|
+
});
|
|
2798
|
+
for (const instance of processedInstances) {
|
|
2799
|
+
if (instance.item_hash === args.current?.itemHash) continue;
|
|
2800
|
+
const registrationId = createRelayBootstrapRegistrationId(
|
|
2801
|
+
args.profile,
|
|
2802
|
+
instance.content?.metadata?.name,
|
|
2803
|
+
instance.item_hash
|
|
2804
|
+
);
|
|
2805
|
+
try {
|
|
2806
|
+
const runtime = await fetchVmRuntime({
|
|
2807
|
+
itemHash: instance.item_hash,
|
|
2808
|
+
fetch: args.fetch,
|
|
2809
|
+
crns: args.crns,
|
|
2810
|
+
crnListUrl: args.crnListUrl
|
|
2811
|
+
});
|
|
2812
|
+
if (!runtime.hostIpv4 || Object.keys(runtime.mappedPorts ?? {}).length === 0) {
|
|
2813
|
+
result.skippedInstanceHashes.push(instance.item_hash);
|
|
2814
|
+
continue;
|
|
2815
|
+
}
|
|
2816
|
+
const relayMetadata = await fetchRelayMetadataForRuntime({
|
|
2817
|
+
runtime,
|
|
2818
|
+
fetch: args.fetch,
|
|
2819
|
+
preferSecureMetadata: args.preferSecureMetadata,
|
|
2820
|
+
attempts: 3,
|
|
2821
|
+
delayMs: 1e3,
|
|
2822
|
+
timeoutMs: 1e4
|
|
2823
|
+
});
|
|
2824
|
+
if (!relayMetadata) {
|
|
2825
|
+
result.skippedInstanceHashes.push(instance.item_hash);
|
|
2826
|
+
continue;
|
|
2827
|
+
}
|
|
2828
|
+
liveRegistrationIds.add(registrationId);
|
|
2829
|
+
await publishRelayBootstrapRegistration({
|
|
2830
|
+
sender: args.sender,
|
|
2831
|
+
signer: args.signer,
|
|
2832
|
+
hasher: args.hasher,
|
|
2833
|
+
fetch: args.fetch,
|
|
2834
|
+
apiHost: args.apiHost,
|
|
2835
|
+
channel: args.channel,
|
|
2836
|
+
ref: args.ref,
|
|
2837
|
+
postType: args.postType,
|
|
2838
|
+
peerId: relayMetadata.peerId,
|
|
2839
|
+
multiaddrs: relayMetadata.probeMultiaddrs,
|
|
2840
|
+
browserMultiaddrs: relayMetadata.browserBootstrapMultiaddrs,
|
|
2841
|
+
registrationId,
|
|
2842
|
+
ownerAddress: args.ownerAddress,
|
|
2843
|
+
publisherAddress: args.publisherAddress,
|
|
2844
|
+
ownerSigner: args.ownerSigner,
|
|
2845
|
+
publisherSigner: args.publisherSigner,
|
|
2846
|
+
forgetPrevious: true,
|
|
2847
|
+
profile: args.profile,
|
|
2848
|
+
version: args.version,
|
|
2849
|
+
instanceItemHash: instance.item_hash,
|
|
2850
|
+
sync: true
|
|
2851
|
+
});
|
|
2852
|
+
result.refreshedRegistrations.push(registrationId);
|
|
2853
|
+
} catch (error) {
|
|
2854
|
+
result.errors.push({
|
|
2855
|
+
phase: "publish",
|
|
2856
|
+
itemHash: instance.item_hash,
|
|
2857
|
+
registrationId,
|
|
2858
|
+
message: error instanceof Error ? error.message : String(error)
|
|
2859
|
+
});
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
try {
|
|
2863
|
+
const bootstrapPosts = await fetchAlephBootstrapPosts({
|
|
2864
|
+
apiHost: args.apiHost ?? DEFAULT_ALEPH_API_HOST,
|
|
2865
|
+
channel: args.channel,
|
|
2866
|
+
ref: args.ref,
|
|
2867
|
+
postType: args.postType,
|
|
2868
|
+
fetch: args.fetch
|
|
2869
|
+
});
|
|
2870
|
+
const currentPosts = selectCurrentRelayBootstrapPosts(bootstrapPosts);
|
|
2871
|
+
const staleHashes = currentPosts.filter(
|
|
2872
|
+
(post) => post.address?.toLowerCase() === args.sender.toLowerCase() && post.content?.profile === args.profile && post.content?.registrationId && !liveRegistrationIds.has(post.content.registrationId)
|
|
2873
|
+
).map((post) => post.itemHash ?? post.hash ?? "").filter(Boolean);
|
|
2874
|
+
if (staleHashes.length > 0) {
|
|
2875
|
+
await forgetAlephMessages({
|
|
2876
|
+
sender: args.sender,
|
|
2877
|
+
hashes: staleHashes,
|
|
2878
|
+
reason: `Forget stale ${args.profile} relay bootstrap registrations after owner reconcile`,
|
|
2879
|
+
signer: args.signer,
|
|
2880
|
+
hasher: args.hasher,
|
|
2881
|
+
fetch: args.fetch,
|
|
2882
|
+
apiHost: args.apiHost ?? DEFAULT_ALEPH_API_HOST,
|
|
2883
|
+
sync: true
|
|
2884
|
+
});
|
|
2885
|
+
result.forgottenHashes.push(...staleHashes);
|
|
2886
|
+
}
|
|
2887
|
+
} catch (error) {
|
|
2888
|
+
result.errors.push({
|
|
2889
|
+
phase: "forget",
|
|
2890
|
+
message: error instanceof Error ? error.message : String(error)
|
|
2891
|
+
});
|
|
2892
|
+
}
|
|
2893
|
+
return result;
|
|
2894
|
+
}
|
|
2509
2895
|
export {
|
|
2510
2896
|
DEFAULT_ALEPH_API_HOST,
|
|
2511
2897
|
DEFAULT_ALEPH_CHANNEL,
|
|
@@ -2519,18 +2905,24 @@ export {
|
|
|
2519
2905
|
ITEM_HASH_RE,
|
|
2520
2906
|
SSH_PUBLIC_KEY_PATTERN,
|
|
2521
2907
|
SUCCESSFUL_DEPLOYMENTS_AGGREGATE_KEY,
|
|
2908
|
+
VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY,
|
|
2909
|
+
appendDeploymentTokenToSshPublicKey,
|
|
2522
2910
|
broadcastAlephMessage,
|
|
2523
2911
|
buildPaymentQuote,
|
|
2524
2912
|
cleanupFailedDeployment,
|
|
2525
2913
|
configureOrbitdbRelaySetup,
|
|
2526
2914
|
configureUcGoPeer,
|
|
2527
2915
|
createDeploymentIntent,
|
|
2916
|
+
createDeploymentToken,
|
|
2528
2917
|
createInstanceContent,
|
|
2529
2918
|
createPortForwardAggregateContent,
|
|
2919
|
+
createRelayBootstrapRegistrationId,
|
|
2530
2920
|
createReleaseMetadata,
|
|
2531
2921
|
createUnsignedAggregateMessage2 as createUnsignedAggregateMessage,
|
|
2532
2922
|
createUnsignedForgetMessage,
|
|
2533
2923
|
createUnsignedInstanceMessage,
|
|
2924
|
+
createVmBootstrapConfigAggregateContent,
|
|
2925
|
+
deleteVmBootstrapConfig,
|
|
2534
2926
|
deployInstance,
|
|
2535
2927
|
describeRejectedDeployment,
|
|
2536
2928
|
describeRuntimeAvailability,
|
|
@@ -2545,8 +2937,10 @@ export {
|
|
|
2545
2937
|
fetchCrns,
|
|
2546
2938
|
fetchMessageEnvelope,
|
|
2547
2939
|
fetchPortForwardAggregate,
|
|
2940
|
+
fetchRelayMetadataForRuntime,
|
|
2548
2941
|
fetchSchedulerAllocation,
|
|
2549
2942
|
fetchUcGoPeerMetadata,
|
|
2943
|
+
fetchVmBootstrapConfigAggregate,
|
|
2550
2944
|
fetchVmRuntime,
|
|
2551
2945
|
filterDeployableCrns,
|
|
2552
2946
|
findCrnByHash,
|
|
@@ -2573,8 +2967,10 @@ export {
|
|
|
2573
2967
|
probeRootfsGateway,
|
|
2574
2968
|
publishAggregateKey,
|
|
2575
2969
|
publishRelayBootstrapRegistration,
|
|
2970
|
+
publishVmBootstrapConfig,
|
|
2576
2971
|
quoteRequiredBudgetUnits,
|
|
2577
2972
|
rankCandidateCrns,
|
|
2973
|
+
reconcileOwnerRelayBootstrapRegistrations,
|
|
2578
2974
|
requestedPortFlags,
|
|
2579
2975
|
requiredInstancePortForwards,
|
|
2580
2976
|
resolveRootfsReference,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"description": "Reusable Aleph deployment, runtime, and guest lifecycle logic.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@le-space/aleph-bootstrap": "0.3.
|
|
20
|
-
"@le-space/shared-types": "0.3.
|
|
19
|
+
"@le-space/aleph-bootstrap": "0.3.13",
|
|
20
|
+
"@le-space/shared-types": "0.3.13"
|
|
21
21
|
}
|
|
22
22
|
}
|