mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-23 14:01:35 +00:00
chore: update aegir (#1027)
Updates aegir, fixes all new linting errors.
This commit is contained in:
@ -106,7 +106,7 @@ class Upgrader {
|
||||
} else {
|
||||
upgradedConn = encryptedConn
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
log.error('Failed to upgrade inbound connection', err)
|
||||
await maConn.close(err)
|
||||
throw err
|
||||
@ -181,7 +181,7 @@ class Upgrader {
|
||||
} else {
|
||||
upgradedConn = encryptedConn
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
log.error('Failed to upgrade outbound connection', err)
|
||||
await maConn.close(err)
|
||||
throw err
|
||||
@ -245,7 +245,7 @@ class Upgrader {
|
||||
if (this.metrics) this.metrics.trackStream({ stream, remotePeer, protocol })
|
||||
connection.addStream(muxedStream, { protocol })
|
||||
this._onStream({ connection, stream: { ...muxedStream, ...stream }, protocol })
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
log.error(err)
|
||||
}
|
||||
},
|
||||
@ -263,7 +263,7 @@ class Upgrader {
|
||||
const { stream, protocol } = await mss.select(protocols)
|
||||
if (this.metrics) this.metrics.trackStream({ stream, remotePeer, protocol })
|
||||
return { stream: { ...muxedStream, ...stream }, protocol }
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
log.error('could not create new stream', err)
|
||||
throw errCode(err, codes.ERR_UNSUPPORTED_PROTOCOL)
|
||||
}
|
||||
@ -283,7 +283,7 @@ class Upgrader {
|
||||
if (connection.stat.status === 'open') {
|
||||
await connection.close()
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
log.error(err)
|
||||
} finally {
|
||||
this.onConnectionEnd(connection)
|
||||
@ -371,7 +371,7 @@ class Upgrader {
|
||||
...await crypto.secureInbound(localPeer, stream),
|
||||
protocol
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
throw errCode(err, codes.ERR_ENCRYPTION_FAILED)
|
||||
}
|
||||
}
|
||||
@ -406,7 +406,7 @@ class Upgrader {
|
||||
...await crypto.secureOutbound(localPeer, stream, remotePeerId),
|
||||
protocol
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
throw errCode(err, codes.ERR_ENCRYPTION_FAILED)
|
||||
}
|
||||
}
|
||||
@ -430,7 +430,7 @@ class Upgrader {
|
||||
log('%s selected as muxer protocol', protocol)
|
||||
const Muxer = muxers.get(protocol)
|
||||
return { stream, Muxer }
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
throw errCode(err, codes.ERR_MUXER_UNAVAILABLE)
|
||||
}
|
||||
}
|
||||
@ -453,7 +453,7 @@ class Upgrader {
|
||||
const { stream, protocol } = await listener.handle(protocols)
|
||||
const Muxer = muxers.get(protocol)
|
||||
return { stream, Muxer }
|
||||
} catch (err) {
|
||||
} catch (/** @type {any} */ err) {
|
||||
throw errCode(err, codes.ERR_MUXER_UNAVAILABLE)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user