@helia/block-brokers 5.0.4 → 5.0.5-eaa042eb
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.
|
@@ -31,14 +31,14 @@ export class TrustlessGatewayBlockBroker {
|
|
|
31
31
|
await options.validateFn?.(block);
|
|
32
32
|
}
|
|
33
33
|
catch (err) {
|
|
34
|
-
this.log.error('failed to validate block for %c from %s', cid, gateway.url, err);
|
|
34
|
+
this.log.error('failed to validate block for %c from %s - %e', cid, gateway.url, err);
|
|
35
35
|
// try another gateway
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
38
|
return block;
|
|
39
39
|
}
|
|
40
40
|
catch (err) {
|
|
41
|
-
this.log.error('failed to get block for %c from %s', cid, gateway.url, err);
|
|
41
|
+
this.log.error('failed to get block for %c from %s - %e', cid, gateway.url, err);
|
|
42
42
|
if (err instanceof Error) {
|
|
43
43
|
aggregateErrors.push(err);
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broker.js","sourceRoot":"","sources":["../../../src/trustless-gateway/broker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAiCxE;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IACrB,aAAa,CAAS;IACtB,UAAU,CAAS;IACnB,oBAAoB,CAAuB;IAC3C,OAAO,CAAS;IAChB,GAAG,CAAQ;IACX,MAAM,CAAiB;IAExC,YAAa,UAAiD,EAAE,OAAwC,EAAE;QACxG,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,sCAAsC,CAAC,CAAA;QACjF,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAA;QAC/B,IAAI,CAAC,O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AAC;IAED,aAAa,CAAE,UAAgD,EAAE;QAC/D,OAAO,6BAA6B,CAAC;YACnC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,EAAE;YACD,GAAG,OAAO;YACV,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;SAChD,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/block-brokers",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5-eaa042eb",
|
|
4
4
|
"description": "Block brokers for Helia",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/helia/tree/main/packages/block-brokers#readme",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"test:electron-main": "aegir test -t electron-main"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@helia/bitswap": "
|
|
51
|
-
"@helia/interface": "
|
|
52
|
-
"@helia/utils": "
|
|
50
|
+
"@helia/bitswap": "3.0.5-eaa042eb",
|
|
51
|
+
"@helia/interface": "6.0.0-eaa042eb",
|
|
52
|
+
"@helia/utils": "2.2.1-eaa042eb",
|
|
53
53
|
"@libp2p/interface": "^3.0.2",
|
|
54
54
|
"@libp2p/utils": "^7.0.5",
|
|
55
55
|
"@multiformats/multiaddr": "^13.0.1",
|
|
@@ -67,14 +67,14 @@ export class TrustlessGatewayBlockBroker implements BlockBroker<TrustlessGateway
|
|
|
67
67
|
try {
|
|
68
68
|
await options.validateFn?.(block)
|
|
69
69
|
} catch (err) {
|
|
70
|
-
this.log.error('failed to validate block for %c from %s', cid, gateway.url, err)
|
|
70
|
+
this.log.error('failed to validate block for %c from %s - %e', cid, gateway.url, err)
|
|
71
71
|
// try another gateway
|
|
72
72
|
continue
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
return block
|
|
76
76
|
} catch (err: unknown) {
|
|
77
|
-
this.log.error('failed to get block for %c from %s', cid, gateway.url, err)
|
|
77
|
+
this.log.error('failed to get block for %c from %s - %e', cid, gateway.url, err)
|
|
78
78
|
|
|
79
79
|
if (err instanceof Error) {
|
|
80
80
|
aggregateErrors.push(err)
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"BitswapBlockBrokerComponents": "https://ipfs.github.io/helia/interfaces/_helia_block-brokers.BitswapBlockBrokerComponents.html",
|
|
3
|
-
"BitswapBlockBrokerInit": "https://ipfs.github.io/helia/interfaces/_helia_block-brokers.BitswapBlockBrokerInit.html",
|
|
4
|
-
"TrustlessGatewayBlockBrokerComponents": "https://ipfs.github.io/helia/interfaces/_helia_block-brokers.TrustlessGatewayBlockBrokerComponents.html",
|
|
5
|
-
"TrustlessGatewayBlockBrokerInit": "https://ipfs.github.io/helia/interfaces/_helia_block-brokers.TrustlessGatewayBlockBrokerInit.html",
|
|
6
|
-
"TrustlessGatewayGetBlockProgressEvents": "https://ipfs.github.io/helia/types/_helia_block-brokers.TrustlessGatewayGetBlockProgressEvents.html",
|
|
7
|
-
"bitswap": "https://ipfs.github.io/helia/functions/_helia_block-brokers.bitswap.html",
|
|
8
|
-
"trustlessGateway": "https://ipfs.github.io/helia/functions/_helia_block-brokers.trustlessGateway.html"
|
|
9
|
-
}
|