Split router out into its own library

This commit is contained in:
Jon Staab
2025-04-23 13:34:04 -07:00
parent 489a307a47
commit 2996e25359
42 changed files with 604 additions and 295 deletions
+12 -11
View File
@@ -200,17 +200,18 @@ export const pull = async ({context, ...options}: PullOptions) => {
await Promise.all(
Array.from(idsByRelay.entries()).map(([relay, allIds]) => {
return Promise.all(
chunk(500, allIds).map(ids =>
new Promise<void>(resolve =>
requestOne({
relay,
context,
filters: [{ids}],
autoClose: true,
onClose: resolve,
onEvent: event => result.push(event as SignedEvent),
})
)
chunk(500, allIds).map(
ids =>
new Promise<void>(resolve =>
requestOne({
relay,
context,
filters: [{ids}],
autoClose: true,
onClose: resolve,
onEvent: event => result.push(event as SignedEvent),
}),
),
),
)
}),