diff --git a/package.json b/package.json index 81e6db3..3f93d91 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "docs:no-publish": "aegir docs --publish false" }, "devDependencies": { - "aegir": "^42.2.0", + "aegir": "^43.0.1", "npm-run-all": "^4.1.5" }, "type": "module", diff --git a/packages/client/package.json b/packages/client/package.json index 0e3514f..5daf43f 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -61,7 +61,7 @@ }, "devDependencies": { "@libp2p/peer-id-factory": "^4.0.4", - "aegir": "^42.2.0", + "aegir": "^43.0.1", "body-parser": "^1.20.2", "it-all": "^3.0.2" }, diff --git a/packages/client/src/client.ts b/packages/client/src/client.ts index 0d8d7c4..706e05d 100644 --- a/packages/client/src/client.ts +++ b/packages/client/src/client.ts @@ -301,24 +301,28 @@ export class DefaultDelegatedRoutingV1HttpApiClient implements DelegatedRoutingV } #conformToPeerSchema (record: any): PeerRecord | undefined { - const protocols: string[] = [] - const multiaddrs: Multiaddr[] = record.Addrs?.map(multiaddr) ?? [] + try { + const protocols: string[] = [] + const multiaddrs: Multiaddr[] = record.Addrs?.map(multiaddr) ?? [] - if (record.Protocols != null) { - protocols.push(...record.Protocols) - } + if (record.Protocols != null) { + protocols.push(...record.Protocols) + } - if (record.Protocol != null) { - protocols.push(record.Protocol) - delete record.Protocol - } + if (record.Protocol != null) { + protocols.push(record.Protocol) + delete record.Protocol + } - return { - ...record, - Schema: 'peer', - ID: peerIdFromString(record.ID), - Addrs: multiaddrs, - Protocols: protocols + return { + ...record, + Schema: 'peer', + ID: peerIdFromString(record.ID), + Addrs: multiaddrs, + Protocols: protocols + } + } catch (err) { + log.error('could not conform record to peer schema', err) } } } diff --git a/packages/interop/package.json b/packages/interop/package.json index f524839..914b43f 100644 --- a/packages/interop/package.json +++ b/packages/interop/package.json @@ -41,11 +41,11 @@ "@helia/delegated-routing-v1-http-api-client": "^3.0.0", "@helia/delegated-routing-v1-http-api-server": "^3.0.0", "@helia/ipns": "^7.1.0", - "@libp2p/identify": "^1.0.10", + "@libp2p/identify": "^2.1.0", "@libp2p/interface": "^1.1.1", "@libp2p/kad-dht": "^12.0.3", "@libp2p/peer-id-factory": "^4.0.4", - "aegir": "^42.2.0", + "aegir": "^43.0.1", "fastify": "^4.17.0", "helia": "^4.0.0", "ipns": "^9.0.0", diff --git a/packages/interop/test/index.spec.ts b/packages/interop/test/index.spec.ts index dfe452c..7521b16 100644 --- a/packages/interop/test/index.spec.ts +++ b/packages/interop/test/index.spec.ts @@ -63,6 +63,7 @@ describe('delegated-routing-v1-http-api interop', () => { const cid = CID.createV1(raw.code, digest) await network[1].blockstore.put(cid, input) + await network[1].routing.provide(cid) let foundProvider = false diff --git a/packages/server/package.json b/packages/server/package.json index b93b161..a072cf3 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -77,7 +77,7 @@ "@libp2p/peer-id-factory": "^4.0.4", "@multiformats/multiaddr": "^12.1.3", "@types/sinon": "^17.0.0", - "aegir": "^42.2.0", + "aegir": "^43.0.1", "sinon": "^17.0.0", "sinon-ts": "^2.0.0" }