@le-space/core 0.4.0 → 0.4.1
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 +1 -0
- package/index.js +4 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -724,6 +724,7 @@ declare function waitForRelayBootstrapRegistration(args: {
|
|
|
724
724
|
postType?: string;
|
|
725
725
|
attempts?: number;
|
|
726
726
|
delayMs?: number;
|
|
727
|
+
onAttempt?: (match: RelayBootstrapVisibilityResult | null, attempt: number, attempts: number) => void;
|
|
727
728
|
}): Promise<RelayBootstrapVisibilityResult | null>;
|
|
728
729
|
declare function publishRelayBootstrapRegistration(args: {
|
|
729
730
|
sender: string;
|
package/index.js
CHANGED
|
@@ -2512,7 +2512,7 @@ async function waitForRelayBootstrapRegistration(args) {
|
|
|
2512
2512
|
return false;
|
|
2513
2513
|
});
|
|
2514
2514
|
if (match?.content) {
|
|
2515
|
-
|
|
2515
|
+
const visibleRegistration = {
|
|
2516
2516
|
itemHash: match.itemHash ?? null,
|
|
2517
2517
|
hash: match.hash ?? null,
|
|
2518
2518
|
sender: typeof match.address === "string" ? match.address : null,
|
|
@@ -2521,7 +2521,10 @@ async function waitForRelayBootstrapRegistration(args) {
|
|
|
2521
2521
|
multiaddrs: Array.isArray(match.content.multiaddrs) ? match.content.multiaddrs : [],
|
|
2522
2522
|
browserMultiaddrs: Array.isArray(match.content.browserMultiaddrs) ? match.content.browserMultiaddrs : []
|
|
2523
2523
|
};
|
|
2524
|
+
args.onAttempt?.(visibleRegistration, attempt + 1, attempts);
|
|
2525
|
+
return visibleRegistration;
|
|
2524
2526
|
}
|
|
2527
|
+
args.onAttempt?.(null, attempt + 1, attempts);
|
|
2525
2528
|
if (attempt < attempts - 1) {
|
|
2526
2529
|
await sleep(delayMs);
|
|
2527
2530
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
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.4.
|
|
20
|
-
"@le-space/shared-types": "0.4.
|
|
19
|
+
"@le-space/aleph-bootstrap": "0.4.1",
|
|
20
|
+
"@le-space/shared-types": "0.4.1"
|
|
21
21
|
}
|
|
22
22
|
}
|