libp2p 0.46.12 → 0.46.13
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/dist/index.min.js +12 -12
- package/dist/src/connection/index.d.ts +4 -4
- package/dist/src/connection/index.d.ts.map +1 -1
- package/dist/src/connection/index.js +5 -2
- package/dist/src/connection/index.js.map +1 -1
- package/dist/src/connection-manager/dial-queue.d.ts +2 -2
- package/dist/src/connection-manager/dial-queue.d.ts.map +1 -1
- package/dist/src/dcutr/dcutr.d.ts.map +1 -1
- package/dist/src/dcutr/dcutr.js +3 -1
- package/dist/src/dcutr/dcutr.js.map +1 -1
- package/dist/src/fetch/index.d.ts +3 -3
- package/dist/src/fetch/index.d.ts.map +1 -1
- package/dist/src/identify/consts.d.ts +1 -1
- package/dist/src/identify/index.d.ts +2 -2
- package/dist/src/identify/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/ping/index.d.ts +1 -1
- package/dist/src/ping/index.d.ts.map +1 -1
- package/dist/src/upgrader.d.ts.map +1 -1
- package/dist/src/upgrader.js +5 -1
- package/dist/src/upgrader.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +25 -23
- package/src/connection/index.ts +12 -6
- package/src/connection-manager/dial-queue.ts +2 -2
- package/src/dcutr/dcutr.ts +4 -1
- package/src/fetch/index.ts +3 -3
- package/src/identify/index.ts +2 -2
- package/src/index.ts +2 -2
- package/src/ping/index.ts +1 -1
- package/src/upgrader.ts +6 -1
- package/src/version.ts +1 -1
package/src/index.ts
CHANGED
|
@@ -97,12 +97,12 @@ export interface Libp2pInit<T extends ServiceMap = { x: Record<string, unknown>
|
|
|
97
97
|
/**
|
|
98
98
|
* A Metrics implementation can be supplied to collect metrics on this node
|
|
99
99
|
*/
|
|
100
|
-
metrics
|
|
100
|
+
metrics?(components: Components): Metrics
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* A ConnectionProtector can be used to create a secure overlay on top of the network using pre-shared keys
|
|
104
104
|
*/
|
|
105
|
-
connectionProtector
|
|
105
|
+
connectionProtector?(components: Components): ConnectionProtector
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* Arbitrary libp2p modules
|
package/src/ping/index.ts
CHANGED
|
@@ -17,7 +17,7 @@ import type { Multiaddr } from '@multiformats/multiaddr'
|
|
|
17
17
|
const log = logger('libp2p:ping')
|
|
18
18
|
|
|
19
19
|
export interface PingService {
|
|
20
|
-
ping
|
|
20
|
+
ping(peer: PeerId | Multiaddr | Multiaddr[], options?: AbortOptions): Promise<number>
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface PingServiceInit {
|
package/src/upgrader.ts
CHANGED
|
@@ -545,11 +545,16 @@ export class DefaultUpgrader implements Upgrader {
|
|
|
545
545
|
newStream: newStream ?? errConnectionNotMultiplexed,
|
|
546
546
|
getStreams: () => { if (muxer != null) { return muxer.streams } else { return [] } },
|
|
547
547
|
close: async (options?: AbortOptions) => {
|
|
548
|
-
await maConn.close(options)
|
|
549
548
|
// Ensure remaining streams are closed gracefully
|
|
550
549
|
if (muxer != null) {
|
|
550
|
+
log.trace('close muxer')
|
|
551
551
|
await muxer.close(options)
|
|
552
552
|
}
|
|
553
|
+
|
|
554
|
+
log.trace('close maconn')
|
|
555
|
+
// close the underlying transport
|
|
556
|
+
await maConn.close(options)
|
|
557
|
+
log.trace('closed maconn')
|
|
553
558
|
},
|
|
554
559
|
abort: (err) => {
|
|
555
560
|
maConn.abort(err)
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '0.46.
|
|
1
|
+
export const version = '0.46.13'
|
|
2
2
|
export const name = 'libp2p'
|