Switch to monorepo setup

This commit is contained in:
Jon Staab
2024-03-25 14:22:33 -07:00
parent 74b926e227
commit 54e0775453
49 changed files with 3677 additions and 2321 deletions
+17 -9
View File
@@ -2,22 +2,32 @@
A nostr toolkit focused on creating highly a configurable client system. What paravel provides is less a library of code than a library of abstractions. Odds are you will end up creating a custom implementation of every component to suit your needs, but if you start with paravel that will be much easier than if you pile on parameters over time.
## /util
This is a monorepo which is split into several different packages.
Some general-purpose utilities used in paravel.
## @coracle.social/lib
Some general-purpose utilities used elsewhere in paravel.
- `Deferred` is just a promise with `resolve` and `reject` methods.
- `Emitter` extends EventEmitter to support `emitter.on('*', ...)`.
- `Fluent` is a wrapper around arrays with chained methods that modify and copy the underlying array.
- `Kinds` contains kind constants and related utility functions.
- `LRUCache` is an implementation of an LRU cache.
- `Queue` is an implementation of an asynchronous queue.
- `Relays` contains utilities related to relays.
- `Router` is a utility for selecting relay urls based on user preferences and protocol hints.
- `Tags` and `Tag` extend `Fluent` to provide a convenient way to access and modify tags.
- `Tools` is a collection of general-purpose utility functions.
## /connect
## @coracle.social/util
Some nostr-specific utilities. For the most part, these will not have side effects or manage state.
- `Address` contains utilities for dealing with nostr addresses.
- `Events` contains utilities for dealing with nostr events.
- `Filters` contains utilities for dealing with nostr filters.
- `Kinds` contains kind constants and related utility functions.
- `Relays` contains utilities related to relay urls.
- `Router` is a utility for selecting relay urls based on user preferences and protocol hints.
- `Tags` provides a convenient way to access and modify tags.
## @coracle.social/network
Utilities having to do with connection management and nostr messages.
@@ -28,8 +38,6 @@ Utilities having to do with connection management and nostr messages.
- `Socket` is a wrapper around isomorphic-ws that handles json parsing/serialization.
- `Subscription` is a higher-level utility for making requests against multiple nostr relays.
## /connect/target
Executor targets extend `Emitter`, and have a `send` method, a `cleanup` method, and a `connections` getter. They are intended to be passed to an `Executor` for use.
- `Multi` allows you to compose multiple targets together.