@libp2p/kad-dht 12.1.3 → 12.1.4-c5dba70a9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.min.js +4 -4
- package/dist/src/query/events.js +2 -2
- package/dist/src/query/events.js.map +1 -1
- package/package.json +13 -13
- package/src/query/events.ts +2 -2
- package/dist/typedoc-urls.json +0 -55
package/dist/src/query/events.js
CHANGED
@@ -16,8 +16,8 @@ export function peerResponseEvent(fields, options = {}) {
|
|
16
16
|
name: 'PEER_RESPONSE',
|
17
17
|
type: 1,
|
18
18
|
messageName: fields.messageType,
|
19
|
-
closer:
|
20
|
-
providers:
|
19
|
+
closer: fields.closer ?? [],
|
20
|
+
providers: fields.providers ?? []
|
21
21
|
};
|
22
22
|
options.onProgress?.(new CustomEvent('kad-dht:query:peer-response', { detail: event }));
|
23
23
|
return event;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/query/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAW/C,MAAM,UAAU,cAAc,CAAE,MAAwB,EAAE,UAA2B,EAAE;IACrF,MAAM,KAAK,GAAmB;QAC5B,GAAG,MAAM;QACT,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,CAAC;QACP,WAAW,EAAE,MAAM,CAAC,IAAI;QACxB,WAAW,EAAE,MAAM,CAAC,IAAI;KACzB,CAAA;IAED,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,WAAW,CAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;IAEpF,OAAO,KAAK,CAAA;AACd,CAAC;AAUD,MAAM,UAAU,iBAAiB,CAAE,MAA+B,EAAE,UAA2B,EAAE;IAC/F,MAAM,KAAK,GAAsB;QAC/B,GAAG,MAAM;QACT,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,CAAC;QACP,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,MAAM,EAAE,
|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AElF,OAAO,KAAK,CAAA;AACd,CAAC;AAMD,MAAM,UAAU,aAAa,CAAE,MAA2B,EAAE,UAA2B,EAAE;IACvF,MAAM,KAAK,GAAkB;QAC3B,GAAG,MAAM;QACT,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,CAAC;KACR,CAAA;IAED,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,WAAW,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;IAEnF,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@libp2p/kad-dht",
|
3
|
-
"version": "12.1.
|
3
|
+
"version": "12.1.4-c5dba70a9",
|
4
4
|
"description": "JavaScript implementation of the Kad-DHT for libp2p",
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/kad-dht#readme",
|
@@ -57,13 +57,13 @@
|
|
57
57
|
"doc-check": "aegir doc-check"
|
58
58
|
},
|
59
59
|
"dependencies": {
|
60
|
-
"@libp2p/crypto": "
|
61
|
-
"@libp2p/interface": "
|
62
|
-
"@libp2p/interface-internal": "
|
63
|
-
"@libp2p/peer-collections": "
|
64
|
-
"@libp2p/peer-id": "
|
65
|
-
"@libp2p/record": "
|
66
|
-
"@libp2p/utils": "
|
60
|
+
"@libp2p/crypto": "4.1.8-c5dba70a9",
|
61
|
+
"@libp2p/interface": "1.6.3-c5dba70a9",
|
62
|
+
"@libp2p/interface-internal": "1.3.3-c5dba70a9",
|
63
|
+
"@libp2p/peer-collections": "5.2.8-c5dba70a9",
|
64
|
+
"@libp2p/peer-id": "4.2.3-c5dba70a9",
|
65
|
+
"@libp2p/record": "4.0.4-c5dba70a9",
|
66
|
+
"@libp2p/utils": "5.4.8-c5dba70a9",
|
67
67
|
"@multiformats/multiaddr": "^12.2.3",
|
68
68
|
"any-signal": "^4.1.1",
|
69
69
|
"hashlru": "^2.3.0",
|
@@ -89,15 +89,15 @@
|
|
89
89
|
"uint8arrays": "^5.1.0"
|
90
90
|
},
|
91
91
|
"devDependencies": {
|
92
|
-
"@libp2p/interface-compliance-tests": "
|
93
|
-
"@libp2p/logger": "
|
94
|
-
"@libp2p/peer-id-factory": "
|
95
|
-
"@libp2p/peer-store": "
|
92
|
+
"@libp2p/interface-compliance-tests": "5.4.11-c5dba70a9",
|
93
|
+
"@libp2p/logger": "4.0.19-c5dba70a9",
|
94
|
+
"@libp2p/peer-id-factory": "4.2.3-c5dba70a9",
|
95
|
+
"@libp2p/peer-store": "10.1.4-c5dba70a9",
|
96
96
|
"@types/lodash.random": "^3.2.9",
|
97
97
|
"@types/lodash.range": "^3.2.9",
|
98
98
|
"@types/sinon": "^17.0.3",
|
99
99
|
"@types/which": "^3.0.3",
|
100
|
-
"aegir": "^
|
100
|
+
"aegir": "^44.0.1",
|
101
101
|
"datastore-core": "^9.2.9",
|
102
102
|
"datastore-level": "^10.1.8",
|
103
103
|
"delay": "^6.0.0",
|
package/src/query/events.ts
CHANGED
@@ -37,8 +37,8 @@ export function peerResponseEvent (fields: PeerResponseEventFields, options: Pro
|
|
37
37
|
name: 'PEER_RESPONSE',
|
38
38
|
type: 1,
|
39
39
|
messageName: fields.messageType,
|
40
|
-
closer:
|
41
|
-
providers:
|
40
|
+
closer: fields.closer ?? [],
|
41
|
+
providers: fields.providers ?? []
|
42
42
|
}
|
43
43
|
|
44
44
|
options.onProgress?.(new CustomEvent('kad-dht:query:peer-response', { detail: event }))
|
package/dist/typedoc-urls.json
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"codec": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad_dht.MessageType.codec.html",
|
3
|
-
"EventTypes": "https://libp2p.github.io/js-libp2p/enums/_libp2p_kad_dht.EventTypes.html",
|
4
|
-
".:EventTypes": "https://libp2p.github.io/js-libp2p/enums/_libp2p_kad_dht.EventTypes.html",
|
5
|
-
"MessageType": "https://libp2p.github.io/js-libp2p/enums/_libp2p_kad_dht.MessageType-1.html",
|
6
|
-
"AddPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.AddPeerEvent.html",
|
7
|
-
".:AddPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.AddPeerEvent.html",
|
8
|
-
"DHTRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.DHTRecord.html",
|
9
|
-
".:DHTRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.DHTRecord.html",
|
10
|
-
"DialPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.DialPeerEvent.html",
|
11
|
-
".:DialPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.DialPeerEvent.html",
|
12
|
-
"FinalPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.FinalPeerEvent.html",
|
13
|
-
".:FinalPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.FinalPeerEvent.html",
|
14
|
-
"KadDHT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.KadDHT.html",
|
15
|
-
".:KadDHT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.KadDHT.html",
|
16
|
-
"KadDHTComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.KadDHTComponents.html",
|
17
|
-
".:KadDHTComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.KadDHTComponents.html",
|
18
|
-
"KadDHTInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.KadDHTInit.html",
|
19
|
-
".:KadDHTInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.KadDHTInit.html",
|
20
|
-
"PeerInfoMapper": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.PeerInfoMapper.html",
|
21
|
-
".:PeerInfoMapper": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.PeerInfoMapper.html",
|
22
|
-
"PeerResponseEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.PeerResponseEvent.html",
|
23
|
-
".:PeerResponseEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.PeerResponseEvent.html",
|
24
|
-
"ProviderEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.ProviderEvent.html",
|
25
|
-
".:ProviderEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.ProviderEvent.html",
|
26
|
-
"QueryErrorEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.QueryErrorEvent.html",
|
27
|
-
".:QueryErrorEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.QueryErrorEvent.html",
|
28
|
-
"RoutingTable": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.RoutingTable.html",
|
29
|
-
".:RoutingTable": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.RoutingTable.html",
|
30
|
-
"SelectFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.SelectFn.html",
|
31
|
-
".:SelectFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.SelectFn.html",
|
32
|
-
"SendQueryEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.SendQueryEvent.html",
|
33
|
-
".:SendQueryEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.SendQueryEvent.html",
|
34
|
-
"SingleKadDHT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.SingleKadDHT.html",
|
35
|
-
".:SingleKadDHT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.SingleKadDHT.html",
|
36
|
-
"ValidateFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.ValidateFn.html",
|
37
|
-
".:ValidateFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.ValidateFn.html",
|
38
|
-
"ValueEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.ValueEvent.html",
|
39
|
-
".:ValueEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad_dht.ValueEvent.html",
|
40
|
-
"DHTProgressEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.DHTProgressEvents.html",
|
41
|
-
".:DHTProgressEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.DHTProgressEvents.html",
|
42
|
-
"MessageName": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.MessageName.html",
|
43
|
-
".:MessageName": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.MessageName.html",
|
44
|
-
"QueryEvent": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.QueryEvent.html",
|
45
|
-
".:QueryEvent": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.QueryEvent.html",
|
46
|
-
"Selectors": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.Selectors.html",
|
47
|
-
".:Selectors": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.Selectors.html",
|
48
|
-
"Validators": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.Validators.html",
|
49
|
-
".:Validators": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad_dht.Validators.html",
|
50
|
-
"kadDHT": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad_dht.kadDHT-1.html",
|
51
|
-
".:kadDHT": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad_dht.kadDHT-1.html",
|
52
|
-
"passthroughMapper": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad_dht.passthroughMapper.html",
|
53
|
-
"removePrivateAddressesMapper": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad_dht.removePrivateAddressesMapper.html",
|
54
|
-
"removePublicAddressesMapper": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad_dht.removePublicAddressesMapper.html"
|
55
|
-
}
|