diff --git a/package.json b/package.json index 62677515..6f1f085e 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "release": "aegir run release" }, "dependencies": { - "aegir": "^39.0.10" + "aegir": "^40.0.2" }, "workspaces": [ "packages/*" diff --git a/packages/libp2p-daemon-client/package.json b/packages/libp2p-daemon-client/package.json index 28fec522..8c1fa045 100644 --- a/packages/libp2p-daemon-client/package.json +++ b/packages/libp2p-daemon-client/package.json @@ -14,10 +14,6 @@ "keywords": [ "libp2p" ], - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - }, "type": "module", "types": "./dist/src/index.d.ts", "files": [ @@ -134,33 +130,26 @@ "release": "aegir release" }, "dependencies": { + "@chainsafe/libp2p-gossipsub": "^9.0.0", "@libp2p/daemon-protocol": "^4.0.0", - "@libp2p/interface-connection": "^5.0.1", - "@libp2p/interface-peer-id": "^2.0.0", - "@libp2p/interface-peer-info": "^1.0.1", - "@libp2p/interface-transport": "^4.0.0", - "@libp2p/interfaces": "^3.2.0", - "@libp2p/logger": "^2.0.0", - "@libp2p/peer-id": "^2.0.0", - "@libp2p/tcp": "^7.0.1", - "@multiformats/multiaddr": "^12.0.0", + "@libp2p/interface": "^0.1.0", + "@libp2p/kad-dht": "^10.0.0", + "@libp2p/logger": "^3.0.0", + "@libp2p/peer-id": "^3.0.0", + "@libp2p/tcp": "^8.0.0", + "@multiformats/multiaddr": "^12.1.3", "it-stream-types": "^2.0.1", - "multiformats": "^11.0.0", - "uint8arraylist": "^2.3.2" + "multiformats": "^12.0.1", + "uint8arraylist": "^2.4.3" }, "devDependencies": { "@libp2p/daemon-server": "^5.0.0", - "@libp2p/interface-dht": "^2.0.0", - "@libp2p/interface-libp2p": "3.0.0", - "@libp2p/interface-mocks": "^11.0.0", - "@libp2p/interface-peer-store": "^2.0.0", - "@libp2p/interface-pubsub": "^4.0.0", - "@types/sinon": "^10.0.14", - "aegir": "^39.0.10", + "@libp2p/interface-compliance-tests": "^4.0.0", + "aegir": "^40.0.1", "it-all": "^3.0.1", - "it-pipe": "^3.0.0", - "sinon": "^15.0.1", + "it-pipe": "^3.0.1", + "sinon": "^15.1.2", "sinon-ts": "^1.0.0", - "uint8arrays": "^4.0.2" + "uint8arrays": "^4.0.4" } } diff --git a/packages/libp2p-daemon-client/src/dht.ts b/packages/libp2p-daemon-client/src/dht.ts index e08ac66b..9511eaac 100644 --- a/packages/libp2p-daemon-client/src/dht.ts +++ b/packages/libp2p-daemon-client/src/dht.ts @@ -4,13 +4,13 @@ import { DHTRequest, DHTResponse } from '@libp2p/daemon-protocol' -import { isPeerId, type PeerId } from '@libp2p/interface-peer-id' -import { CodeError } from '@libp2p/interfaces/errors' +import { CodeError } from '@libp2p/interface/errors' +import { isPeerId, type PeerId } from '@libp2p/interface/peer-id' import { peerIdFromBytes } from '@libp2p/peer-id' import { multiaddr } from '@multiformats/multiaddr' import { CID } from 'multiformats/cid' import type { DaemonClient } from './index.js' -import type { PeerInfo } from '@libp2p/interface-peer-info' +import type { PeerInfo } from '@libp2p/interface/peer-info' export class DHT { private readonly client: DaemonClient diff --git a/packages/libp2p-daemon-client/src/index.ts b/packages/libp2p-daemon-client/src/index.ts index 79d37641..3ecb5ed7 100644 --- a/packages/libp2p-daemon-client/src/index.ts +++ b/packages/libp2p-daemon-client/src/index.ts @@ -1,17 +1,17 @@ import { type PSMessage, Request, Response, StreamInfo } from '@libp2p/daemon-protocol' import { StreamHandler } from '@libp2p/daemon-protocol/stream-handler' import { passThroughUpgrader } from '@libp2p/daemon-protocol/upgrader' -import { isPeerId, type PeerId } from '@libp2p/interface-peer-id' -import { CodeError } from '@libp2p/interfaces/errors' +import { CodeError } from '@libp2p/interface/errors' +import { isPeerId, type PeerId } from '@libp2p/interface/peer-id' import { logger } from '@libp2p/logger' import { peerIdFromBytes } from '@libp2p/peer-id' import { tcp } from '@libp2p/tcp' import { multiaddr, isMultiaddr } from '@multiformats/multiaddr' import { DHT } from './dht.js' import { Pubsub } from './pubsub.js' -import type { MultiaddrConnection } from '@libp2p/interface-connection' -import type { PeerInfo } from '@libp2p/interface-peer-info' -import type { Transport } from '@libp2p/interface-transport' +import type { MultiaddrConnection } from '@libp2p/interface/connection' +import type { PeerInfo } from '@libp2p/interface/peer-info' +import type { Transport } from '@libp2p/interface/transport' import type { Multiaddr } from '@multiformats/multiaddr' import type { Duplex, Source } from 'it-stream-types' import type { CID } from 'multiformats/cid' diff --git a/packages/libp2p-daemon-client/src/pubsub.ts b/packages/libp2p-daemon-client/src/pubsub.ts index 030a58a3..a6f56cda 100644 --- a/packages/libp2p-daemon-client/src/pubsub.ts +++ b/packages/libp2p-daemon-client/src/pubsub.ts @@ -4,10 +4,10 @@ import { PSRequest, PSMessage } from '@libp2p/daemon-protocol' -import { CodeError } from '@libp2p/interfaces/errors' +import { CodeError } from '@libp2p/interface/errors' import { peerIdFromBytes } from '@libp2p/peer-id' import type { DaemonClient, Subscription } from './index.js' -import type { PeerId } from '@libp2p/interface-peer-id' +import type { PeerId } from '@libp2p/interface/peer-id' export class Pubsub { private readonly client: DaemonClient diff --git a/packages/libp2p-daemon-client/test/dht.spec.ts b/packages/libp2p-daemon-client/test/dht.spec.ts index fd0e054e..9d1e5e0d 100644 --- a/packages/libp2p-daemon-client/test/dht.spec.ts +++ b/packages/libp2p-daemon-client/test/dht.spec.ts @@ -1,7 +1,7 @@ /* eslint-env mocha */ import { createServer, type Libp2pServer } from '@libp2p/daemon-server' -import { type DualDHT, type ValueEvent, type FinalPeerEvent, type PeerResponseEvent, MessageType, EventTypes, type DHT } from '@libp2p/interface-dht' +import { type DualKadDHT, type ValueEvent, type FinalPeerEvent, type PeerResponseEvent, MessageType, EventTypes, type KadDHT } from '@libp2p/kad-dht' import { peerIdFromString } from '@libp2p/peer-id' import { multiaddr } from '@multiformats/multiaddr' import { expect } from 'aegir/chai' @@ -11,8 +11,8 @@ import sinon from 'sinon' import { type StubbedInstance, stubInterface } from 'sinon-ts' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { createClient, type DaemonClient } from '../src/index.js' -import type { Libp2p } from '@libp2p/interface-libp2p' -import type { PubSub } from '@libp2p/interface-pubsub' +import type { GossipSub } from '@chainsafe/libp2p-gossipsub' +import type { Libp2p } from '@libp2p/interface' const defaultMultiaddr = multiaddr('/ip4/0.0.0.0/tcp/12345') @@ -23,14 +23,14 @@ function match (cid: CID): sinon.SinonMatcher { describe('daemon dht client', function () { this.timeout(30e3) - let libp2p: StubbedInstance> + let libp2p: StubbedInstance> let server: Libp2pServer let client: DaemonClient - let dht: StubbedInstance + let dht: StubbedInstance beforeEach(async function () { - dht = stubInterface() - libp2p = stubInterface>() + dht = stubInterface() + libp2p = stubInterface>() libp2p.services.dht = dht server = createServer(defaultMultiaddr, libp2p) diff --git a/packages/libp2p-daemon-client/test/index.spec.ts b/packages/libp2p-daemon-client/test/index.spec.ts index 628d70c8..0074446a 100644 --- a/packages/libp2p-daemon-client/test/index.spec.ts +++ b/packages/libp2p-daemon-client/test/index.spec.ts @@ -1,30 +1,30 @@ /* eslint-env mocha */ import { createServer, type Libp2pServer } from '@libp2p/daemon-server' -import { mockConnection, mockDuplex, mockMultiaddrConnection } from '@libp2p/interface-mocks' -import { isPeerId } from '@libp2p/interface-peer-id' +import { isPeerId } from '@libp2p/interface/peer-id' +import { mockConnection, mockDuplex, mockMultiaddrConnection } from '@libp2p/interface-compliance-tests/mocks' import { peerIdFromString } from '@libp2p/peer-id' import { multiaddr } from '@multiformats/multiaddr' import { expect } from 'aegir/chai' import sinon from 'sinon' import { type StubbedInstance, stubInterface } from 'sinon-ts' import { createClient, type DaemonClient } from '../src/index.js' -import type { DHT } from '@libp2p/interface-dht' -import type { Libp2p } from '@libp2p/interface-libp2p' -import type { PeerStore } from '@libp2p/interface-peer-store' -import type { PubSub } from '@libp2p/interface-pubsub' +import type { GossipSub } from '@chainsafe/libp2p-gossipsub' +import type { Libp2p } from '@libp2p/interface' +import type { PeerStore } from '@libp2p/interface/peer-store' +import type { KadDHT } from '@libp2p/kad-dht' const defaultMultiaddr = multiaddr('/ip4/0.0.0.0/tcp/0') describe('daemon client', function () { this.timeout(30e3) - let libp2p: StubbedInstance> + let libp2p: StubbedInstance> let server: Libp2pServer let client: DaemonClient beforeEach(async function () { - libp2p = stubInterface>() + libp2p = stubInterface>() libp2p.peerStore = stubInterface() server = createServer(defaultMultiaddr, libp2p) diff --git a/packages/libp2p-daemon-client/test/pubsub.spec.ts b/packages/libp2p-daemon-client/test/pubsub.spec.ts index 19f15843..39adbd7d 100644 --- a/packages/libp2p-daemon-client/test/pubsub.spec.ts +++ b/packages/libp2p-daemon-client/test/pubsub.spec.ts @@ -8,23 +8,23 @@ import sinon from 'sinon' import { type StubbedInstance, stubInterface } from 'sinon-ts' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { createClient, type DaemonClient } from '../src/index.js' -import type { DHT } from '@libp2p/interface-dht' -import type { Libp2p } from '@libp2p/interface-libp2p' -import type { PubSub } from '@libp2p/interface-pubsub' +import type { GossipSub } from '@chainsafe/libp2p-gossipsub' +import type { Libp2p } from '@libp2p/interface' +import type { KadDHT } from '@libp2p/kad-dht' const defaultMultiaddr = multiaddr('/ip4/0.0.0.0/tcp/12345') describe('daemon pubsub client', function () { this.timeout(30e3) - let libp2p: StubbedInstance> + let libp2p: StubbedInstance> let server: Libp2pServer let client: DaemonClient - let pubsub: StubbedInstance + let pubsub: StubbedInstance beforeEach(async function () { - pubsub = stubInterface() - libp2p = stubInterface>() + pubsub = stubInterface() + libp2p = stubInterface>() libp2p.services.pubsub = pubsub server = createServer(defaultMultiaddr, libp2p) diff --git a/packages/libp2p-daemon-client/test/stream.spec.ts b/packages/libp2p-daemon-client/test/stream.spec.ts index bed5c110..76e1cf59 100644 --- a/packages/libp2p-daemon-client/test/stream.spec.ts +++ b/packages/libp2p-daemon-client/test/stream.spec.ts @@ -1,7 +1,7 @@ /* eslint-env mocha */ import { createServer, type Libp2pServer } from '@libp2p/daemon-server' -import { mockRegistrar, connectionPair } from '@libp2p/interface-mocks' +import { mockRegistrar, connectionPair } from '@libp2p/interface-compliance-tests/mocks' import { peerIdFromString } from '@libp2p/peer-id' import { multiaddr } from '@multiformats/multiaddr' import { expect } from 'aegir/chai' @@ -12,22 +12,22 @@ import { type StubbedInstance, stubInterface } from 'sinon-ts' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { toString as uint8ArrayToString } from 'uint8arrays/to-string' import { createClient, type DaemonClient } from '../src/index.js' -import type { DHT } from '@libp2p/interface-dht' -import type { Libp2p } from '@libp2p/interface-libp2p' -import type { PeerStore } from '@libp2p/interface-peer-store' -import type { PubSub } from '@libp2p/interface-pubsub' +import type { GossipSub } from '@chainsafe/libp2p-gossipsub' +import type { Libp2p } from '@libp2p/interface' +import type { PeerStore } from '@libp2p/interface/peer-store' +import type { KadDHT } from '@libp2p/kad-dht' const defaultMultiaddr = multiaddr('/ip4/0.0.0.0/tcp/0') describe('daemon stream client', function () { this.timeout(50e3) - let libp2p: StubbedInstance> + let libp2p: StubbedInstance> let server: Libp2pServer let client: DaemonClient beforeEach(async function () { - libp2p = stubInterface>() + libp2p = stubInterface>() libp2p.peerStore = stubInterface() server = createServer(defaultMultiaddr, libp2p) diff --git a/packages/libp2p-daemon-client/typedoc.json b/packages/libp2p-daemon-client/typedoc.json new file mode 100644 index 00000000..f599dc72 --- /dev/null +++ b/packages/libp2p-daemon-client/typedoc.json @@ -0,0 +1,5 @@ +{ + "entryPoints": [ + "./src/index.ts" + ] +} diff --git a/packages/libp2p-daemon-protocol/package.json b/packages/libp2p-daemon-protocol/package.json index dd0965b1..7786c95d 100644 --- a/packages/libp2p-daemon-protocol/package.json +++ b/packages/libp2p-daemon-protocol/package.json @@ -12,10 +12,6 @@ "bugs": { "url": "https://github.com/libp2p/js-libp2p-daemon/issues" }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - }, "type": "module", "types": "./dist/src/index.d.ts", "typesVersions": { @@ -157,13 +153,14 @@ "release": "aegir release" }, "dependencies": { - "@libp2p/interface-transport": "^4.0.0", - "it-handshake": "^4.0.0", + "@libp2p/interface": "^0.1.0", + "@libp2p/logger": "^3.0.0", + "it-handshake": "^4.1.3", "protons-runtime": "^5.0.0", - "uint8arraylist": "^2.3.2" + "uint8arraylist": "^2.4.3" }, "devDependencies": { - "aegir": "^39.0.10", + "aegir": "^40.0.1", "protons": "^7.0.2" } } diff --git a/packages/libp2p-daemon-protocol/src/upgrader.ts b/packages/libp2p-daemon-protocol/src/upgrader.ts index 4977eb5e..33de5473 100644 --- a/packages/libp2p-daemon-protocol/src/upgrader.ts +++ b/packages/libp2p-daemon-protocol/src/upgrader.ts @@ -1,4 +1,4 @@ -import type { Upgrader } from '@libp2p/interface-transport' +import type { Upgrader } from '@libp2p/interface/transport' export const passThroughUpgrader: Upgrader = { // @ts-expect-error should return a connection diff --git a/packages/libp2p-daemon-protocol/typedoc.json b/packages/libp2p-daemon-protocol/typedoc.json new file mode 100644 index 00000000..15cd5d50 --- /dev/null +++ b/packages/libp2p-daemon-protocol/typedoc.json @@ -0,0 +1,7 @@ +{ + "entryPoints": [ + "./src/index.ts", + "./src/stream-handler.ts", + "./src/upgrader.ts" + ] +} diff --git a/packages/libp2p-daemon-server/package.json b/packages/libp2p-daemon-server/package.json index f93ead3e..5ff7bc55 100644 --- a/packages/libp2p-daemon-server/package.json +++ b/packages/libp2p-daemon-server/package.json @@ -14,10 +14,6 @@ "keywords": [ "libp2p" ], - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - }, "type": "module", "types": "./dist/src/index.d.ts", "files": [ @@ -138,26 +134,23 @@ "release": "aegir release" }, "dependencies": { + "@chainsafe/libp2p-gossipsub": "^9.0.0", "@libp2p/daemon-protocol": "^4.0.0", - "@libp2p/interface-connection": "^5.0.1", - "@libp2p/interface-dht": "^2.0.0", - "@libp2p/interface-libp2p": "^3.0.0", - "@libp2p/interface-peer-id": "^2.0.0", - "@libp2p/interface-pubsub": "^4.0.0", - "@libp2p/interface-transport": "^4.0.0", - "@libp2p/logger": "^2.0.0", - "@libp2p/peer-id": "^2.0.0", - "@libp2p/tcp": "^7.0.1", - "@multiformats/multiaddr": "^12.0.0", - "it-drain": "^3.0.1", - "it-length-prefixed": "^9.0.0", - "it-pipe": "^3.0.0", - "it-pushable": "^3.0.0", - "multiformats": "^11.0.0", - "uint8arrays": "^4.0.2" + "@libp2p/interface": "^0.1.0", + "@libp2p/kad-dht": "^10.0.0", + "@libp2p/logger": "^3.0.0", + "@libp2p/peer-id": "^3.0.0", + "@libp2p/tcp": "^8.0.0", + "@multiformats/multiaddr": "^12.1.3", + "it-drain": "^3.0.2", + "it-length-prefixed": "^9.0.1", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.0", + "multiformats": "^12.0.1", + "uint8arrays": "^4.0.4" }, "devDependencies": { - "aegir": "^39.0.10", + "aegir": "^40.0.1", "sinon-ts": "^1.0.0" } } diff --git a/packages/libp2p-daemon-server/src/dht.ts b/packages/libp2p-daemon-server/src/dht.ts index 1890b644..f256f5e9 100644 --- a/packages/libp2p-daemon-server/src/dht.ts +++ b/packages/libp2p-daemon-server/src/dht.ts @@ -6,18 +6,18 @@ import { import { logger } from '@libp2p/logger' import drain from 'it-drain' import { ErrorResponse, OkResponse } from './responses.js' -import type { DHT } from '@libp2p/interface-dht' -import type { PeerId } from '@libp2p/interface-peer-id' +import type { PeerId } from '@libp2p/interface/peer-id' +import type { KadDHT } from '@libp2p/kad-dht' import type { CID } from 'multiformats/cid' const log = logger('libp2p:daemon-server:dht') export interface DHTOperationsInit { - dht: DHT + dht: KadDHT } export class DHTOperations { - private readonly dht: DHT + private readonly dht: KadDHT constructor (init: DHTOperationsInit) { const { dht } = init diff --git a/packages/libp2p-daemon-server/src/index.ts b/packages/libp2p-daemon-server/src/index.ts index eff1eefd..acc9d260 100644 --- a/packages/libp2p-daemon-server/src/index.ts +++ b/packages/libp2p-daemon-server/src/index.ts @@ -19,11 +19,11 @@ import { CID } from 'multiformats/cid' import { DHTOperations } from './dht.js' import { PubSubOperations } from './pubsub.js' import { ErrorResponse, OkResponse } from './responses.js' -import type { Connection, MultiaddrConnection, Stream } from '@libp2p/interface-connection' -import type { DHT } from '@libp2p/interface-dht' -import type { Libp2p } from '@libp2p/interface-libp2p' -import type { PubSub } from '@libp2p/interface-pubsub' -import type { Listener, Transport } from '@libp2p/interface-transport' +import type { GossipSub } from '@chainsafe/libp2p-gossipsub' +import type { Libp2p } from '@libp2p/interface' +import type { Connection, MultiaddrConnection, Stream } from '@libp2p/interface/connection' +import type { Listener, Transport } from '@libp2p/interface/transport' +import type { KadDHT } from '@libp2p/kad-dht' import type { Multiaddr } from '@multiformats/multiaddr' const LIMIT = 1 << 22 // 4MB @@ -36,7 +36,7 @@ export interface OpenStream { export interface DaemonInit { multiaddr: Multiaddr - libp2pNode: Libp2p<{ dht: DHT, pubsub: PubSub }> + libp2pNode: Libp2p<{ dht: KadDHT, pubsub: GossipSub }> } export interface Libp2pServer { @@ -47,7 +47,7 @@ export interface Libp2pServer { export class Server implements Libp2pServer { private readonly multiaddr: Multiaddr - private readonly libp2p: Libp2p<{ dht: DHT, pubsub: PubSub }> + private readonly libp2p: Libp2p<{ dht: KadDHT, pubsub: GossipSub }> private readonly tcp: Transport private readonly listener: Listener private readonly dhtOperations?: DHTOperations @@ -103,13 +103,15 @@ export class Server implements Libp2pServer { const { peer, proto } = request.streamOpen const peerId = peerIdFromBytes(peer) const connection = await this.libp2p.dial(peerId) - const stream = await connection.newStream(proto) + const stream = await connection.newStream(proto, { + runOnTransientConnection: true + }) return { streamInfo: { peer: peerId.toBytes(), addr: connection.remoteAddr.bytes, - proto: stream.stat.protocol ?? '' + proto: stream.protocol ?? '' }, connection: stream } @@ -142,7 +144,7 @@ export class Server implements Libp2pServer { const message = StreamInfo.encode({ peer: connection.remotePeer.toBytes(), addr: connection.remoteAddr.bytes, - proto: stream.stat.protocol ?? '' + proto: stream.protocol ?? '' }) const encodedMessage = lp.encode.single(message) @@ -178,6 +180,8 @@ export class Server implements Libp2pServer { }) } }) + }, { + runOnTransientConnection: true }) } @@ -521,7 +525,7 @@ export class Server implements Libp2pServer { /** * Creates a daemon from the provided Daemon Options */ -export const createServer = (multiaddr: Multiaddr, libp2pNode: Libp2p<{ dht: DHT, pubsub: PubSub }>): Libp2pServer => { +export const createServer = (multiaddr: Multiaddr, libp2pNode: Libp2p<{ dht: KadDHT, pubsub: GossipSub }>): Libp2pServer => { const daemon = new Server({ multiaddr, libp2pNode diff --git a/packages/libp2p-daemon-server/src/pubsub.ts b/packages/libp2p-daemon-server/src/pubsub.ts index 4a438638..c59d1424 100644 --- a/packages/libp2p-daemon-server/src/pubsub.ts +++ b/packages/libp2p-daemon-server/src/pubsub.ts @@ -7,16 +7,16 @@ import { logger } from '@libp2p/logger' import { pushable } from 'it-pushable' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { ErrorResponse, OkResponse } from './responses.js' -import type { PubSub } from '@libp2p/interface-pubsub' +import type { GossipSub } from '@chainsafe/libp2p-gossipsub' const log = logger('libp2p:daemon-server:pubsub') export interface PubSubOperationsInit { - pubsub: PubSub + pubsub: GossipSub } export class PubSubOperations { - private readonly pubsub: PubSub + private readonly pubsub: GossipSub constructor (init: PubSubOperationsInit) { const { pubsub } = init diff --git a/packages/libp2p-daemon-server/test/index.spec.ts b/packages/libp2p-daemon-server/test/index.spec.ts index 3bcd482b..14db18b4 100644 --- a/packages/libp2p-daemon-server/test/index.spec.ts +++ b/packages/libp2p-daemon-server/test/index.spec.ts @@ -5,15 +5,15 @@ import { multiaddr } from '@multiformats/multiaddr' import { expect } from 'aegir/chai' import { stubInterface } from 'sinon-ts' import { createServer } from '../src/index.js' -import type { DHT } from '@libp2p/interface-dht' -import type { Libp2p } from '@libp2p/interface-libp2p' -import type { PubSub } from '@libp2p/interface-pubsub' +import type { GossipSub } from '@chainsafe/libp2p-gossipsub' +import type { Libp2p } from '@libp2p/interface' +import type { KadDHT } from '@libp2p/kad-dht' const ma = multiaddr('/ip4/0.0.0.0/tcp/0') describe('server', () => { it('should start', async () => { - const libp2p = stubInterface>() + const libp2p = stubInterface>() const server = createServer(ma, libp2p) @@ -25,7 +25,7 @@ describe('server', () => { }) it('should stop', async () => { - const libp2p = stubInterface>() + const libp2p = stubInterface>() const server = createServer(ma, libp2p) @@ -36,7 +36,7 @@ describe('server', () => { }) it('should return multiaddrs', async () => { - const libp2p = stubInterface>() + const libp2p = stubInterface>() const server = createServer(ma, libp2p) diff --git a/packages/libp2p-daemon-server/typedoc.json b/packages/libp2p-daemon-server/typedoc.json new file mode 100644 index 00000000..f599dc72 --- /dev/null +++ b/packages/libp2p-daemon-server/typedoc.json @@ -0,0 +1,5 @@ +{ + "entryPoints": [ + "./src/index.ts" + ] +} diff --git a/packages/libp2p-daemon/package.json b/packages/libp2p-daemon/package.json index 56d96236..9a196873 100644 --- a/packages/libp2p-daemon/package.json +++ b/packages/libp2p-daemon/package.json @@ -14,10 +14,6 @@ "keywords": [ "libp2p" ], - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - }, "bin": { "jsp2pd": "dist/src/index.js" }, @@ -137,13 +133,13 @@ }, "dependencies": { "@libp2p/daemon-server": "^5.0.0", - "@multiformats/multiaddr": "^12.0.0", + "@multiformats/multiaddr": "^12.1.3", "es-main": "^1.0.2", "yargs": "^17.3.1", "yargs-promise": "^1.1.0" }, "devDependencies": { - "aegir": "^39.0.10", - "sinon": "^15.0.1" + "aegir": "^40.0.1", + "sinon": "^15.1.2" } } diff --git a/packages/libp2p-daemon/typedoc.json b/packages/libp2p-daemon/typedoc.json new file mode 100644 index 00000000..f599dc72 --- /dev/null +++ b/packages/libp2p-daemon/typedoc.json @@ -0,0 +1,5 @@ +{ + "entryPoints": [ + "./src/index.ts" + ] +}