Skip to content

Commit

Permalink
deps: bump aegir from 40.0.13 to 41.1.6 (#232)
Browse files Browse the repository at this point in the history
Bumps [aegir](https://github.com/ipfs/aegir) from 40.0.13 to 41.1.6.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](ipfs/aegir@v40.0.13...v41.1.6)

---
updated-dependencies:
- dependency-name: aegir
  dependency-type: direct:production
  update-type: version-update:semver-major
...

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain authored Nov 2, 2023
1 parent 408f934 commit 653c74b
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 118 deletions.
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
# js-libp2p-daemon <!-- omit in toc -->

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-daemon.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-daemon)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-daemon/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-daemon/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> Standalone libp2p executable
## Table of contents <!-- omit in toc -->

- [Structure](#structure)
- [API Docs](#api-docs)
- [License](#license)
- [Contribution](#contribution)

## Structure
# Packages

- [`/packages/libp2p-daemon`](./packages/libp2p-daemon) libp2p-daemon JavaScript implementation
- [`/packages/libp2p-daemon-client`](./packages/libp2p-daemon-client) libp2p-daemon client implementation
- [`/packages/libp2p-daemon-protocol`](./packages/libp2p-daemon-protocol) Communication protocol between libp2p daemons and clients
- [`/packages/libp2p-daemon-server`](./packages/libp2p-daemon-server) API server for libp2p-daemon instances

## API Docs
# API Docs

- <https://libp2p.github.io/js-libp2p-daemon>

## License
# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution
# Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"build": "aegir run build",
"lint": "aegir run lint",
"clean": "aegir run clean",
"docs": "NODE_OPTIONS=--max_old_space_size=4096 aegir docs",
"docs": "aegir docs",
"docs:no-publish": "npm run docs -- --publish false",
"dep-check": "aegir run dep-check",
"release": "npm run docs:no-publish && aegir run release && npm run docs"
},
"dependencies": {
"aegir": "^40.0.2"
"aegir": "^41.1.6"
},
"workspaces": [
"packages/*"
Expand Down
48 changes: 11 additions & 37 deletions packages/libp2p-daemon-client/README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,30 @@
# @libp2p/daemon-client <!-- omit in toc -->

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-daemon.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-daemon)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-daemon/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-daemon/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> libp2p-daemon client implementation
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Specs](#specs)
- [Usage](#usage)
- [Run a daemon process](#run-a-daemon-process)
- [Interact with the daemon process using the client](#interact-with-the-daemon-process-using-the-client)
- [API](#api)
- [License](#license)
- [Contribution](#contribution)

## Install
# Install

```console
$ npm i @libp2p/daemon-client
```

## Specs
# Specs

The specs for the daemon are currently housed in the go implementation. You can read them at [libp2p/go-libp2p-daemon](https://github.com/libp2p/go-libp2p-daemon/blob/master/specs/README.md)

## Usage
# Usage

### Run a daemon process
## Run a daemon process

There are currently two implementations of the `libp2p-daemon`:

- [js-libp2p-daemon](https://github.com/libp2p/js-libp2p-daemon)
- [go-libp2p-daemon](https://github.com/libp2p/go-libp2p-daemon)

### Interact with the daemon process using the client
## Interact with the daemon process using the client

```js
import { createClient } from '@libp2p/daemon-client'
Expand All @@ -58,30 +45,17 @@ try {
await client.close()
```

## API

- [Getting started](API.md#getting-started)
- [`close`](API.md#close)
- [`connect`](API.md#connect)
- [`identify`](API.md#identify)
- [`listPeers`](API.md#listPeers)
- [`openStream`](API.md#openStream)
- [`registerStream`](API.md#registerStream)
- [`dht.put`](API.md#dht.put)
- [`dht.get`](API.md#dht.get)
- [`dht.findPeer`](API.md#dht.findPeer)
- [`dht.provide`](API.md#dht.provide)
- [`dht.findProviders`](API.md#dht.findProviders)
- [`dht.getClosestPeers`](API.md#dht.getClosestPeers)
- [`dht.getPublicKey`](API.md#dht.getPublicKey)

## License
# API Docs

- <https://libp2p.github.io/js-libp2p-daemon/modules/_libp2p_daemon_client.html>

# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution
# Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
3 changes: 2 additions & 1 deletion packages/libp2p-daemon-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down Expand Up @@ -145,7 +146,7 @@
"devDependencies": {
"@libp2p/daemon-server": "^6.0.0",
"@libp2p/interface-compliance-tests": "^4.0.0",
"aegir": "^40.0.1",
"aegir": "^41.1.6",
"it-all": "^3.0.1",
"it-pipe": "^3.0.1",
"sinon": "^15.1.2",
Expand Down
36 changes: 18 additions & 18 deletions packages/libp2p-daemon-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,36 +286,36 @@ export interface StreamHandlerFunction {
}

export interface DHTClient {
put: (key: Uint8Array, value: Uint8Array) => Promise<void>
get: (key: Uint8Array) => Promise<Uint8Array>
provide: (cid: CID) => Promise<void>
findProviders: (cid: CID, count?: number) => AsyncIterable<PeerInfo>
findPeer: (peerId: PeerId) => Promise<PeerInfo>
getClosestPeers: (key: Uint8Array) => AsyncIterable<PeerInfo>
put(key: Uint8Array, value: Uint8Array): Promise<void>
get(key: Uint8Array): Promise<Uint8Array>
provide(cid: CID): Promise<void>
findProviders(cid: CID, count?: number): AsyncIterable<PeerInfo>
findPeer(peerId: PeerId): Promise<PeerInfo>
getClosestPeers(key: Uint8Array): AsyncIterable<PeerInfo>
}

export interface Subscription {
messages: () => AsyncIterable<PSMessage>
cancel: () => Promise<void>
messages(): AsyncIterable<PSMessage>
cancel(): Promise<void>
}

export interface PubSubClient {
publish: (topic: string, data: Uint8Array) => Promise<void>
subscribe: (topic: string) => Promise<Subscription>
getTopics: () => Promise<string[]>
getSubscribers: (topic: string) => Promise<PeerId[]>
publish(topic: string, data: Uint8Array): Promise<void>
subscribe(topic: string): Promise<Subscription>
getTopics(): Promise<string[]>
getSubscribers(topic: string): Promise<PeerId[]>
}

export interface DaemonClient {
identify: () => Promise<IdentifyResult>
listPeers: () => Promise<PeerId[]>
connect: (peerId: PeerId, addrs: Multiaddr[]) => Promise<void>
identify(): Promise<IdentifyResult>
listPeers(): Promise<PeerId[]>
connect(peerId: PeerId, addrs: Multiaddr[]): Promise<void>
dht: DHTClient
pubsub: PubSubClient

send: (request: Request) => Promise<StreamHandler>
openStream: (peerId: PeerId, protocol: string) => Promise<Duplex<AsyncGenerator<Uint8Array | Uint8ArrayList>, Source<Uint8Array>, Promise<void>>>
registerStreamHandler: (protocol: string, handler: StreamHandlerFunction) => Promise<void>
send(request: Request): Promise<StreamHandler>
openStream(peerId: PeerId, protocol: string): Promise<Duplex<AsyncGenerator<Uint8Array | Uint8ArrayList>, Source<Uint8Array>, Promise<void>>>
registerStreamHandler(protocol: string, handler: StreamHandlerFunction): Promise<void>
}

export function createClient (multiaddr: Multiaddr): DaemonClient {
Expand Down
18 changes: 7 additions & 11 deletions packages/libp2p-daemon-protocol/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
# @libp2p/daemon-protocol <!-- omit in toc -->

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-daemon.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-daemon)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-daemon/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-daemon/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> Communication protocol between libp2p daemons and clients
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [License](#license)
- [Contribution](#contribution)

## Install
# Install

```console
$ npm i @libp2p/daemon-protocol
```

## License
# API Docs

- <https://libp2p.github.io/js-libp2p-daemon/modules/_libp2p_daemon_protocol.html>

# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution
# Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
3 changes: 2 additions & 1 deletion packages/libp2p-daemon-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
Expand Down Expand Up @@ -160,7 +161,7 @@
"uint8arraylist": "^2.4.3"
},
"devDependencies": {
"aegir": "^40.0.1",
"aegir": "^41.1.6",
"protons": "^7.0.2"
}
}
24 changes: 9 additions & 15 deletions packages/libp2p-daemon-server/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
# @libp2p/daemon-server <!-- omit in toc -->

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-daemon.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-daemon)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-daemon/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-daemon/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> API server for libp2p-daemon instances
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Specs](#specs)
- [Usage](#usage)
- [License](#license)
- [Contribution](#contribution)

## Install
# Install

```console
$ npm i @libp2p/daemon-server
```

## Specs
# Specs

The specs for the daemon are currently housed in the go implementation. You can read them at [libp2p/go-libp2p-daemon](https://github.com/libp2p/go-libp2p-daemon/blob/master/specs/README.md)

## Usage
# Usage

```js
import { createServer } from '@libp2p/daemon-server'
Expand All @@ -42,13 +32,17 @@ const server = await createServer(multiaddr, libp2p)
await server.start()
```

## License
# API Docs

- <https://libp2p.github.io/js-libp2p-daemon/modules/_libp2p_daemon_server.html>

# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution
# Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
3 changes: 2 additions & 1 deletion packages/libp2p-daemon-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
Expand Down Expand Up @@ -150,7 +151,7 @@
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"aegir": "^40.0.1",
"aegir": "^41.1.6",
"sinon-ts": "^1.0.0"
}
}
6 changes: 3 additions & 3 deletions packages/libp2p-daemon-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export interface DaemonInit {
}

export interface Libp2pServer {
start: () => Promise<void>
stop: () => Promise<void>
getMultiaddr: () => Multiaddr
start(): Promise<void>
stop(): Promise<void>
getMultiaddr(): Multiaddr
}

export class Server implements Libp2pServer {
Expand Down
Loading

0 comments on commit 653c74b

Please sign in to comment.