diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..4660d0f
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,75 @@
+# What software is installed by default:
+# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
+
+name: build
+
+on:
+ push:
+ pull_request:
+
+defaults:
+ run:
+ shell: bash
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os:
+ - ubuntu-22.04
+ - windows-latest
+ - macos-latest
+ - macos-13
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Check out repo
+ uses: actions/checkout@v4
+
+ - name: Set up rust
+ run: rustup update
+
+ - name: Build
+ run: cargo build --release
+
+ - name: Test
+ run: cargo test --release
+
+ - name: Record target triple
+ run: rustc -vV | awk '/^host/ { print $2 }' > target/release/host
+
+ - name: Upload
+ uses: actions/upload-artifact@v4
+ with:
+ name: cove-${{ matrix.os }}
+ path: |
+ target/release/cove
+ target/release/cove.exe
+ target/release/host
+
+ release:
+ runs-on: ubuntu-latest
+ if: ${{ startsWith(github.ref, 'refs/tags/v') }}
+ needs:
+ - build
+ permissions:
+ contents: write
+ steps:
+ - name: Download artifacts
+ uses: actions/download-artifact@v4
+
+ - name: Zip artifacts
+ run: |
+ chmod +x cove-ubuntu-22.04/cove
+ chmod +x cove-windows-latest/cove.exe
+ chmod +x cove-macos-latest/cove
+ chmod +x cove-macos-13/cove
+ zip -jr "cove-$(cat cove-ubuntu-22.04/host).zip" cove-ubuntu-22.04/cove
+ zip -jr "cove-$(cat cove-windows-latest/host).zip" cove-windows-latest/cove.exe
+ zip -jr "cove-$(cat cove-macos-latest/host).zip" cove-macos-latest/cove
+ zip -jr "cove-$(cat cove-macos-13/host).zip" cove-macos-13/cove
+
+ - name: Create new release
+ uses: softprops/action-gh-release@v2
+ with:
+ body: Automated release, see [CHANGELOG.md](CHANGELOG.md) for more details.
+ files: "*.zip"
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 7a89179..4e428aa 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -2,7 +2,7 @@
"files.insertFinalNewline": true,
"rust-analyzer.cargo.features": "all",
"rust-analyzer.imports.granularity.enforce": true,
- "rust-analyzer.imports.granularity.group": "module",
+ "rust-analyzer.imports.granularity.group": "crate",
"rust-analyzer.imports.group.enable": true,
"evenBetterToml.formatter.columnWidth": 100,
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 580a811..3f9ce8c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,20 +4,135 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Procedure when bumping the version number:
+
1. Update dependencies in a separate commit
2. Set version number in `Cargo.toml`
3. Add new section in this changelog
4. Run `cargo run help-config > CONFIG.md`
5. Commit with message `Bump version to X.Y.Z`
6. Create tag named `vX.Y.Z`
-7. Fast-forward branch `latest`
-8. Push `master`, `latest` and the new tag
+7. Push `master` and the new tag
## Unreleased
+### Changed
+
+- Display emoji user id hashes in the nick list
+- Compile linux binary with older glibc version
+
+## v0.9.3 - 2025-05-31
+
+### Added
+
+- Key bindings for emoji-based user id hashing
+
+### Fixed
+
+- `keys.rooms.action.connect_autojoin` connecting to non-autojoin rooms
+
+## v0.9.2 - 2025-03-14
+
+### Added
+
+- `bell_on_mention` config option
+
+## v0.9.1 - 2025-03-01
+
+### Fixed
+
+- Rendering glitches with unicode-based width estimation
+
+## v0.9.0 - 2025-02-23
+
+### Added
+
+- Unicode-based grapheme width estimation method
+ - `width_estimation_method` config option
+ - `--width-estimation-method` option
+- Room links are now included in the `I` message links list
+
+### Changed
+
+- Updated documentation for `time_zone` config option
+- When connecting to a room using `n` in the room list, the cursor now moves to that room
+- Updated list of emoji names
+
+### Removed
+
+- Special handling of &rl2dev
+
+### Fixed
+
+- Nick color in rare edge cases
+- Message link list rendering bug
+
+## v0.8.3 - 2024-05-20
+
+### Changed
+
+- Updated list of emoji names
+
+## v0.8.2 - 2024-04-25
+
+### Changed
+
+- Renamed `json-stream` export format to `json-lines` (see )
+- Changed `json-lines` file extension from `.json` to `.jsonl`
+
+### Fixed
+
+- Crash when window is too small while empty message editor is visible
+- Mistakes in output and docs
+- Cove not cleaning up terminal state properly
+
+## v0.8.1 - 2024-01-11
+
+### Added
+
+- Support for setting window title
+- More information to room list heading
+- Key bindings for live caesar cipher de- and encoding
+
+### Removed
+
+- Key binding to open present page
+
+## v0.8.0 - 2024-01-04
+
+### Added
+
+- Support for multiple euph server domains
+- Support for `TZ` environment variable
+- `time_zone` config option
+- `--domain` option to `cove export` command
+- `--domain` option to `cove clear-cookies` command
+- Domain field to "connect to new room" popup
+- Welcome info box next to room list
+
+### Changed
+
+- The default euph domain is now https://euphoria.leet.nu/ everywhere
+- The config file format was changed to support multiple euph servers with different domains.
+ Options previously located at `euph.rooms.*` should be reviewed and moved to `euph.servers."euphoria.leet.nu".rooms.*`.
+- Tweaked F1 popup
+- Tweaked chat message editor when nick list is foused
+- Reduced connection timeout from 30 seconds to 10 seconds
+
+### Fixed
+
+- Room deletion popup accepting any room name
+- Duplicated key presses on Windows
+
+## v0.7.1 - 2023-08-31
+
+### Changed
+
+- Updated dependencies
+
## v0.7.0 - 2023-05-14
### Added
+
- Auto-generated config documentation
- in [CONFIG.md](CONFIG.md)
- via `help-config` CLI command
@@ -25,6 +140,7 @@ Procedure when bumping the version number:
- `measure_widths` config option
### Changed
+
- Overhauled widget system and extracted generic widgets to [toss](https://github.com/Garmelon/toss)
- Overhauled config system to support auto-generating documentation
- Overhauled key binding system to make key bindings configurable
@@ -38,15 +154,18 @@ Procedure when bumping the version number:
## v0.6.1 - 2023-04-10
### Changed
+
- Improved JSON export performance
- Always show rooms from config file in room list
### Fixed
+
- Rooms reconnecting instead of showing error popups
## v0.6.0 - 2023-04-04
### Added
+
- Emoji support
- `flake.nix`, making cove available as a nix flake
- `json-stream` room export format
@@ -54,31 +173,37 @@ Procedure when bumping the version number:
- `--verbose` flag
### Changed
+
- Non-export info is now printed to stderr instead of stdout
- Recognizes links without scheme (e.g. `euphoria.io` instead of `https://euphoria.io`)
- Rooms waiting for reconnect are no longer sorted to bottom in default sort order
### Fixed
+
- Mentions not being stopped by `>`
## v0.5.2 - 2023-01-14
### Added
+
- Key binding to open present page
### Changed
+
- Always connect to &rl2dev in ephemeral mode
- Reduce amount of messages per &rl2dev log request
## v0.5.1 - 2022-11-27
### Changed
+
- Increase reconnect delay to one minute
- Print errors that occurred while cove was running more compactly
## v0.5.0 - 2022-09-26
### Added
+
- Key bindings to navigate nick list
- Room deletion confirmation popup
- Message inspection popup
@@ -87,10 +212,12 @@ Procedure when bumping the version number:
- `rooms_sort_order` config option
### Changed
+
- Use nick changes to detect sessions for nick list
- Support Unicode 15
### Fixed
+
- Cursor being visible through popups
- Cursor in lists when highlighted item moves off-screen
- User disappearing from nick list when only one of their sessions disconnects
@@ -98,6 +225,7 @@ Procedure when bumping the version number:
## v0.4.0 - 2022-09-01
### Added
+
- Config file and `--config` cli option
- `data_dir` config option
- `ephemeral` config option
@@ -113,14 +241,17 @@ Procedure when bumping the version number:
- Key bindings to view and open links in a message
### Changed
+
- Some key bindings in the rooms list
### Fixed
+
- Rooms being stuck in "Connecting" state
## v0.3.0 - 2022-08-22
### Added
+
- Account login and logout
- Authentication dialog for password-protected rooms
- Error popups in rooms when something goes wrong
@@ -128,10 +259,12 @@ Procedure when bumping the version number:
- Key binding to download more logs
### Changed
+
- Reduced amount of unnecessary redraws
- Description of `export` CLI command
### Fixed
+
- Crash when connecting to nonexistent rooms
- Crash when connecting to rooms that require authentication
- Pasting multi-line strings into the editor
@@ -139,15 +272,18 @@ Procedure when bumping the version number:
## v0.2.1 - 2022-08-11
### Added
+
- Support for modifiers on special keys via the [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/)
### Fixed
+
- Joining new rooms no longer crashes cove
- Scrolling when exiting message editor
## v0.2.0 - 2022-08-10
### Added
+
- New messages are now marked as unseen
- Sub-trees can now be folded
- Support for pasting text into editors
@@ -160,10 +296,12 @@ Procedure when bumping the version number:
- Support for exporting multiple/all rooms at once
### Changed
+
- Reorganized export command
- Slowed down room history download speed
### Fixed
+
- Chat rendering when deleting and re-joining a room
- Spacing in some popups
diff --git a/CONFIG.md b/CONFIG.md
index a3f25ac..82a7242 100644
--- a/CONFIG.md
+++ b/CONFIG.md
@@ -8,15 +8,11 @@ Here is an example config that changes a few different options:
measure_widths = true
rooms_sort_order = "importance"
-[euph.rooms.welcome]
-autojoin = true
-
-[euph.rooms.test]
-username = "badingle"
-force_username = true
-
-[euph.rooms.private]
-password = "foobar"
+[euph.servers."euphoria.leet.nu".rooms]
+welcome.autojoin = true
+test.username = "badingle"
+test.force_username = true
+private.password = "foobar"
[keys]
general.abort = ["esc", "ctrl+c"]
@@ -24,17 +20,6 @@ general.exit = "ctrl+q"
tree.action.fold_tree = "f"
```
-If you want to configure lots of rooms, TOML lets you write this in a more
-compact way:
-
-```toml
-[euph.rooms]
-foo = { autojoin = true }
-bar = { autojoin = true }
-baz = { autojoin = true }
-private = { autojoin = true, password = "foobar" }
-```
-
## Key bindings
Key bindings are specified as strings or lists of strings. Each string specifies
@@ -68,6 +53,14 @@ Available modifiers:
## Available options
+### `bell_on_mention`
+
+**Required:** yes
+**Type:** boolean
+**Default:** `false`
+
+Ring the bell (character 0x07) when you are mentioned in a room.
+
### `data_dir`
**Required:** no
@@ -94,7 +87,7 @@ any options related to the data dir.
See also the `--ephemeral` command line option.
-### `euph.rooms..autojoin`
+### `euph.servers..rooms..autojoin`
**Required:** yes
**Type:** boolean
@@ -102,17 +95,17 @@ See also the `--ephemeral` command line option.
Whether to automatically join this room on startup.
-### `euph.rooms..force_username`
+### `euph.servers..rooms..force_username`
**Required:** yes
**Type:** boolean
**Default:** `false`
-If `euph.rooms..username` is set, this will force cove to set the
-username even if there is already a different username associated with
-the current session.
+If `euph.servers..rooms..username` is set, this will force
+cove to set the username even if there is already a different username
+associated with the current session.
-### `euph.rooms..password`
+### `euph.servers..rooms..password`
**Required:** no
**Type:** string
@@ -120,7 +113,7 @@ the current session.
If set, cove will try once to use this password to authenticate, should
the room be password-protected.
-### `euph.rooms..username`
+### `euph.servers..rooms..username`
**Required:** no
**Type:** string
@@ -336,14 +329,6 @@ Download more messages.
Change nick.
-### `keys.room.action.present`
-
-**Required:** yes
-**Type:** key binding
-**Default:** `"ctrl+p"`
-
-Open room's plugh.de/present page.
-
### `keys.rooms.action.change_sort_order`
**Required:** yes
@@ -472,6 +457,14 @@ Scroll up half a screen.
Scroll up one line.
+### `keys.tree.action.decrease_caesar`
+
+**Required:** yes
+**Type:** key binding
+**Default:** `"C"`
+
+Decrease caesar cipher rotation.
+
### `keys.tree.action.fold_tree`
**Required:** yes
@@ -480,6 +473,14 @@ Scroll up one line.
Fold current message's subtree.
+### `keys.tree.action.increase_caesar`
+
+**Required:** yes
+**Type:** key binding
+**Default:** `"c"`
+
+Increase caesar cipher rotation.
+
### `keys.tree.action.inspect`
**Required:** yes
@@ -536,6 +537,14 @@ Reply to message, inline if possible.
Reply opposite to normal reply.
+### `keys.tree.action.toggle_nick_emoji`
+
+**Required:** yes
+**Type:** key binding
+**Default:** `"e"`
+
+Toggle agent id based nick emoji.
+
### `keys.tree.action.toggle_seen`
**Required:** yes
@@ -614,14 +623,13 @@ Move to root.
**Type:** boolean
**Default:** `false`
-Whether to measure the width of characters as displayed by the terminal
-emulator instead of guessing the width.
+Whether to measure the width of graphemes (i.e. characters) as displayed
+by the terminal emulator instead of estimating the width.
Enabling this makes rendering a bit slower but more accurate. The screen
-might also flash when encountering new characters (or, more accurately,
-graphemes).
+might also flash when encountering new graphemes.
-See also the `--measure-graphemes` command line option.
+See also the `--measure-widths` command line option.
### `offline`
@@ -642,15 +650,62 @@ See also the `--offline` command line option.
**Required:** yes
**Type:** string
**Values:** `"alphabet"`, `"importance"`
-**Default:** `alphabet`
+**Default:** `"alphabet"`
Initial sort order of rooms list.
-`alphabet` sorts rooms in alphabetic order.
+`"alphabet"` sorts rooms in alphabetic order.
-`importance` sorts rooms by the following criteria (in descending order
-of priority):
+`"importance"` sorts rooms by the following criteria (in descending
+order of priority):
1. connected rooms before unconnected rooms
2. rooms with unread messages before rooms without
3. alphabetic order
+
+### `time_zone`
+
+**Required:** no
+**Type:** string
+**Default:** `$TZ` or local system time zone
+
+Time zone that chat timestamps should be displayed in.
+
+This option can either be the string `"localtime"`, a [POSIX TZ string],
+or a [tz identifier] from the [tz database].
+
+When not set or when set to `"localtime"`, cove attempts to use your
+system's configured time zone, falling back to UTC.
+
+When the string begins with a colon or doesn't match the a POSIX TZ
+string format, it is interpreted as a tz identifier and looked up in
+your system's tz database (or a bundled tz database on Windows).
+
+If the `TZ` environment variable exists, it overrides this option.
+
+[POSIX TZ string]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
+[tz identifier]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+[tz database]: https://en.wikipedia.org/wiki/Tz_database
+
+### `width_estimation_method`
+
+**Required:** yes
+**Type:** string
+**Values:** `"legacy"`, `"unicode"`
+**Default:** `"legacy"`
+
+How to estimate the width of graphemes (i.e. characters) as displayed by
+the terminal emulator.
+
+`"legacy"`: Use a legacy method that should mostly work on most terminal
+emulators. This method will never be correct in all cases since every
+terminal emulator handles grapheme widths slightly differently. However,
+those cases are usually rare (unless you view a lot of emoji).
+
+`"unicode"`: Use the unicode standard in a best-effort manner to
+determine grapheme widths. Some terminals (e.g. ghostty) can make use of
+this.
+
+This method is used when `measure_widths` is set to `false`.
+
+See also the `--width-estimation-method` command line option.
diff --git a/Cargo.lock b/Cargo.lock
index 783365c..2f45a5a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,87 +1,104 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
+
+[[package]]
+name = "addr2line"
+version = "0.24.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
[[package]]
name = "ahash"
-version = "0.7.6"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
- "getrandom",
+ "cfg-if",
"once_cell",
"version_check",
+ "zerocopy 0.7.35",
]
[[package]]
name = "aho-corasick"
-version = "1.0.1"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "anstream"
-version = "0.3.2"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
- "is-terminal",
+ "is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "1.0.0"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
-version = "0.2.0"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.0.0"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
- "windows-sys 0.48.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "anstyle-wincon"
-version = "1.0.1"
+version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
+checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
- "windows-sys 0.48.0",
+ "once_cell",
+ "windows-sys 0.59.0",
]
[[package]]
name = "anyhow"
-version = "1.0.71"
+version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
+checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
[[package]]
name = "async-trait"
-version = "0.1.68"
+version = "0.1.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
+checksum = "d556ec1359574147ec0c4fc5eb525f3f23263a592b1a9c07e0a75b427de55c97"
dependencies = [
"proc-macro2",
"quote",
@@ -90,33 +107,76 @@ dependencies = [
[[package]]
name = "autocfg"
-version = "1.1.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
-name = "base64"
-version = "0.13.1"
+name = "aws-lc-rs"
+version = "1.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01"
+dependencies = [
+ "aws-lc-sys",
+ "zeroize",
+]
[[package]]
-name = "base64"
-version = "0.21.0"
+name = "aws-lc-sys"
+version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
+checksum = "6bbe221bbf523b625a4dd8585c7f38166e31167ec2ca98051dbcb4c3b6e825d2"
+dependencies = [
+ "bindgen",
+ "cc",
+ "cmake",
+ "dunce",
+ "fs_extra",
+]
+
+[[package]]
+name = "backtrace"
+version = "0.3.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
+dependencies = [
+ "addr2line",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+ "windows-targets",
+]
+
+[[package]]
+name = "bindgen"
+version = "0.69.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
+dependencies = [
+ "bitflags",
+ "cexpr",
+ "clang-sys",
+ "itertools",
+ "lazy_static",
+ "lazycell",
+ "log",
+ "prettyplease",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "rustc-hash",
+ "shlex",
+ "syn",
+ "which",
+]
[[package]]
name = "bitflags"
-version = "1.3.2"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
-
-[[package]]
-name = "bitflags"
-version = "2.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813"
+checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
[[package]]
name = "block-buffer"
@@ -127,45 +187,40 @@ dependencies = [
"generic-array",
]
-[[package]]
-name = "bumpalo"
-version = "3.12.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b"
-
-[[package]]
-name = "byteorder"
-version = "1.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
-
[[package]]
name = "bytes"
-version = "1.4.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
-
-[[package]]
-name = "case"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c"
+checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]]
name = "caseless"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "808dab3318747be122cb31d36de18d4d1c81277a76f8332a02b81a3d73463d7f"
+checksum = "8b6fd507454086c8edfd769ca6ada439193cdb209c7681712ef6275cccbfe5d8"
dependencies = [
- "regex",
"unicode-normalization",
]
[[package]]
name = "cc"
-version = "1.0.79"
+version = "1.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
+dependencies = [
+ "jobserver",
+ "libc",
+ "shlex",
+]
+
+[[package]]
+name = "cexpr"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
+dependencies = [
+ "nom",
+]
[[package]]
name = "cfg-if"
@@ -174,34 +229,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
-name = "clap"
-version = "4.2.7"
+name = "clang-sys"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938"
+checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
+dependencies = [
+ "glob",
+ "libc",
+ "libloading",
+]
+
+[[package]]
+name = "clap"
+version = "4.5.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83"
dependencies = [
"clap_builder",
"clap_derive",
- "once_cell",
]
[[package]]
name = "clap_builder"
-version = "4.2.7"
+version = "4.5.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd"
+checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8"
dependencies = [
"anstream",
"anstyle",
- "bitflags 1.3.2",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
-version = "4.2.0"
+version = "4.5.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4"
+checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7"
dependencies = [
"heck",
"proc-macro2",
@@ -211,21 +275,30 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.4.1"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1"
+checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
+
+[[package]]
+name = "cmake"
+version = "0.1.54"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
+dependencies = [
+ "cc",
+]
[[package]]
name = "colorchoice"
-version = "1.0.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "cookie"
-version = "0.17.0"
+version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24"
+checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747"
dependencies = [
"time",
"version_check",
@@ -233,9 +306,9 @@ dependencies = [
[[package]]
name = "core-foundation"
-version = "0.9.3"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
dependencies = [
"core-foundation-sys",
"libc",
@@ -243,13 +316,13 @@ dependencies = [
[[package]]
name = "core-foundation-sys"
-version = "0.8.4"
+version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cove"
-version = "0.7.0"
+version = "0.9.3"
dependencies = [
"anyhow",
"async-trait",
@@ -260,26 +333,24 @@ dependencies = [
"crossterm",
"directories",
"euphoxide",
+ "jiff",
"linkify",
"log",
- "once_cell",
"open",
"parking_lot",
"rusqlite",
+ "rustls",
"serde_json",
"thiserror",
- "time",
"tokio",
- "tokio-tungstenite",
"toss",
- "unicode-segmentation",
"unicode-width",
"vault",
]
[[package]]
name = "cove-config"
-version = "0.7.0"
+version = "0.9.3"
dependencies = [
"cove-input",
"cove-macro",
@@ -290,7 +361,7 @@ dependencies = [
[[package]]
name = "cove-input"
-version = "0.7.0"
+version = "0.9.3"
dependencies = [
"cove-macro",
"crossterm",
@@ -304,9 +375,8 @@ dependencies = [
[[package]]
name = "cove-macro"
-version = "0.7.0"
+version = "0.9.3"
dependencies = [
- "case",
"proc-macro2",
"quote",
"syn",
@@ -314,24 +384,24 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.2.7"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
dependencies = [
"libc",
]
[[package]]
name = "crossterm"
-version = "0.26.1"
+version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13"
+checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags",
"crossterm_winapi",
- "libc",
"mio",
"parking_lot",
+ "rustix 0.38.44",
"signal-hook",
"signal-hook-mio",
"winapi",
@@ -339,9 +409,9 @@ dependencies = [
[[package]]
name = "crossterm_winapi"
-version = "0.9.0"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c"
+checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
dependencies = [
"winapi",
]
@@ -357,10 +427,25 @@ dependencies = [
]
[[package]]
-name = "digest"
-version = "0.10.6"
+name = "data-encoding"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
+checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010"
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
@@ -368,30 +453,36 @@ dependencies = [
[[package]]
name = "directories"
-version = "5.0.1"
+version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35"
+checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d"
dependencies = [
"dirs-sys",
]
[[package]]
name = "dirs-sys"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
+checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
dependencies = [
"libc",
"option-ext",
"redox_users",
- "windows-sys 0.48.0",
+ "windows-sys 0.59.0",
]
[[package]]
-name = "edit"
-version = "0.1.4"
+name = "dunce"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c562aa71f7bc691fde4c6bf5f93ae5a5298b617c2eb44c76c87832299a17fbb4"
+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+
+[[package]]
+name = "edit"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f364860e764787163c8c8f58231003839be31276e821e2ad2092ddf496b1aa09"
dependencies = [
"tempfile",
"which",
@@ -399,45 +490,40 @@ dependencies = [
[[package]]
name = "either"
-version = "1.8.1"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
+
+[[package]]
+name = "equivalent"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "errno"
-version = "0.3.1"
+version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
dependencies = [
- "errno-dragonfly",
- "libc",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "errno-dragonfly"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
-dependencies = [
- "cc",
"libc",
+ "windows-sys 0.59.0",
]
[[package]]
name = "euphoxide"
-version = "0.4.0"
-source = "git+https://github.com/Garmelon/euphoxide.git?tag=v0.4.0#fa6c8cdce9dd7e5f38e333e35ca975cfcdd60cd2"
+version = "0.6.1"
+source = "git+https://github.com/Garmelon/euphoxide.git?tag=v0.6.1#7a292c429ad44aa6aa52fc381e3168841d6303b0"
dependencies = [
"async-trait",
"caseless",
"clap",
"cookie",
"futures-util",
+ "jiff",
"log",
"serde",
"serde_json",
- "time",
"tokio",
"tokio-stream",
"tokio-tungstenite",
@@ -446,9 +532,9 @@ dependencies = [
[[package]]
name = "fallible-iterator"
-version = "0.2.0"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
+checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
[[package]]
name = "fallible-streaming-iterator"
@@ -458,12 +544,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
[[package]]
name = "fastrand"
-version = "1.9.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
-dependencies = [
- "instant",
-]
+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "fnv"
@@ -472,37 +555,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
-name = "form_urlencoded"
-version = "1.1.0"
+name = "fs_extra"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
-dependencies = [
- "percent-encoding",
-]
+checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "futures-core"
-version = "0.3.28"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-sink"
-version = "0.3.28"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
[[package]]
name = "futures-task"
-version = "0.3.28"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
[[package]]
name = "futures-util"
-version = "0.3.28"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
dependencies = [
"futures-core",
"futures-sink",
@@ -524,59 +604,83 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.9"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
- "wasi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
]
[[package]]
-name = "hashbrown"
-version = "0.12.3"
+name = "getrandom"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.13.3+wasi-0.2.2",
+ "windows-targets",
+]
+
+[[package]]
+name = "gimli"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+
+[[package]]
+name = "glob"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [
"ahash",
]
[[package]]
-name = "hashlink"
-version = "0.8.1"
+name = "hashbrown"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+
+[[package]]
+name = "hashlink"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af"
dependencies = [
- "hashbrown",
+ "hashbrown 0.14.5",
]
[[package]]
name = "heck"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
-name = "hermit-abi"
-version = "0.2.6"
+name = "home"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
+checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
- "libc",
+ "windows-sys 0.59.0",
]
-[[package]]
-name = "hermit-abi"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
-
[[package]]
name = "http"
-version = "0.2.9"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
+checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
dependencies = [
"bytes",
"fnv",
@@ -585,48 +689,18 @@ dependencies = [
[[package]]
name = "httparse"
-version = "1.8.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
-
-[[package]]
-name = "idna"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
-dependencies = [
- "unicode-bidi",
- "unicode-normalization",
-]
+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
[[package]]
name = "indexmap"
-version = "1.9.3"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058"
dependencies = [
- "autocfg",
- "hashbrown",
-]
-
-[[package]]
-name = "instant"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "io-lifetimes"
-version = "1.0.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220"
-dependencies = [
- "hermit-abi 0.3.1",
- "libc",
- "windows-sys 0.48.0",
+ "equivalent",
+ "hashbrown 0.15.2",
]
[[package]]
@@ -638,18 +712,6 @@ dependencies = [
"once_cell",
]
-[[package]]
-name = "is-terminal"
-version = "0.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
-dependencies = [
- "hermit-abi 0.3.1",
- "io-lifetimes",
- "rustix",
- "windows-sys 0.48.0",
-]
-
[[package]]
name = "is-wsl"
version = "0.4.0"
@@ -661,31 +723,119 @@ dependencies = [
]
[[package]]
-name = "itoa"
-version = "1.0.6"
+name = "is_terminal_polyfill"
+version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
-name = "js-sys"
-version = "0.3.62"
+name = "itertools"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68c16e1bfd491478ab155fd8b4896b86f9ede344949b641e61501e07c2b8b4d5"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
dependencies = [
- "wasm-bindgen",
+ "either",
]
[[package]]
-name = "libc"
-version = "0.2.144"
+name = "itoa"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+
+[[package]]
+name = "jiff"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d699bc6dfc879fb1bf9bdff0d4c56f0884fc6f0d0eb0fba397a6d00cd9a6b85e"
+dependencies = [
+ "jiff-static",
+ "jiff-tzdb-platform",
+ "log",
+ "portable-atomic",
+ "portable-atomic-util",
+ "serde",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "jiff-static"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d16e75759ee0aa64c57a56acbf43916987b20c77373cb7e808979e02b93c9f9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "jiff-tzdb"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "962e1dfe9b2d75a84536cf5bf5eaaa4319aa7906c7160134a22883ac316d5f31"
+
+[[package]]
+name = "jiff-tzdb-platform"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a63c62e404e7b92979d2792352d885a7f8f83fd1d0d31eea582d77b2ceca697e"
+dependencies = [
+ "jiff-tzdb",
+]
+
+[[package]]
+name = "jobserver"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "lazycell"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+
+[[package]]
+name = "libc"
+version = "0.2.171"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
+
+[[package]]
+name = "libloading"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
+dependencies = [
+ "cfg-if",
+ "windows-targets",
+]
+
+[[package]]
+name = "libredox"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
+dependencies = [
+ "bitflags",
+ "libc",
+]
[[package]]
name = "libsqlite3-sys"
-version = "0.26.0"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326"
+checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"
dependencies = [
"cc",
"pkg-config",
@@ -694,24 +844,30 @@ dependencies = [
[[package]]
name = "linkify"
-version = "0.9.0"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96dd5884008358112bc66093362197c7248ece00d46624e2cf71e50029f8cff5"
+checksum = "f1dfa36d52c581e9ec783a7ce2a5e0143da6237be5811a0b3153fedfdbe9f780"
dependencies = [
"memchr",
]
[[package]]
name = "linux-raw-sys"
-version = "0.3.7"
+version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f"
+checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413"
[[package]]
name = "lock_api"
-version = "0.4.9"
+version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
dependencies = [
"autocfg",
"scopeguard",
@@ -719,71 +875,99 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.17"
+version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
-dependencies = [
- "cfg-if",
-]
+checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
[[package]]
name = "memchr"
-version = "2.5.0"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
-name = "mio"
-version = "0.8.6"
+name = "minimal-lexical"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
dependencies = [
- "libc",
- "log",
- "wasi",
- "windows-sys 0.45.0",
+ "adler2",
]
[[package]]
-name = "num-traits"
-version = "0.2.15"
+name = "mio"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
+dependencies = [
+ "libc",
+ "log",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
-name = "num_cpus"
-version = "1.15.0"
+name = "object"
+version = "0.36.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
dependencies = [
- "hermit-abi 0.2.6",
- "libc",
+ "memchr",
]
[[package]]
name = "once_cell"
-version = "1.17.1"
+version = "1.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
+checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
[[package]]
name = "open"
-version = "4.1.0"
+version = "5.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d16814a067484415fda653868c9be0ac5f2abd2ef5d951082a5f2fe1b3662944"
+checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95"
dependencies = [
"is-wsl",
+ "libc",
"pathdiff",
]
[[package]]
name = "openssl-probe"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
[[package]]
name = "option-ext"
@@ -793,18 +977,18 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "ordered-float"
-version = "2.10.0"
+version = "2.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87"
+checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c"
dependencies = [
"num-traits",
]
[[package]]
name = "parking_lot"
-version = "0.12.1"
+version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
"parking_lot_core",
@@ -812,34 +996,28 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.7"
+version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
- "redox_syscall 0.2.16",
+ "redox_syscall",
"smallvec",
- "windows-sys 0.45.0",
+ "windows-targets",
]
[[package]]
name = "pathdiff"
-version = "0.2.1"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd"
-
-[[package]]
-name = "percent-encoding"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
[[package]]
name = "pin-project-lite"
-version = "0.2.9"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
[[package]]
name = "pin-utils"
@@ -849,50 +1027,84 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
-version = "0.3.27"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
+
+[[package]]
+name = "portable-atomic"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
+
+[[package]]
+name = "portable-atomic-util"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
+dependencies = [
+ "portable-atomic",
+]
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "ppv-lite86"
-version = "0.2.17"
+version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
+dependencies = [
+ "zerocopy 0.8.23",
+]
+
+[[package]]
+name = "prettyplease"
+version = "0.2.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb"
+dependencies = [
+ "proc-macro2",
+ "syn",
+]
[[package]]
name = "proc-macro2"
-version = "1.0.56"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
+checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.27"
+version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
-version = "0.8.5"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
dependencies = [
- "libc",
"rand_chacha",
"rand_core",
+ "zerocopy 0.8.23",
]
[[package]]
name = "rand_chacha"
-version = "0.3.1"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
dependencies = [
"ppv-lite86",
"rand_core",
@@ -900,47 +1112,50 @@ dependencies = [
[[package]]
name = "rand_core"
-version = "0.6.4"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
dependencies = [
- "getrandom",
+ "getrandom 0.3.1",
]
[[package]]
name = "redox_syscall"
-version = "0.2.16"
+version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1"
dependencies = [
- "bitflags 1.3.2",
-]
-
-[[package]]
-name = "redox_syscall"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
-dependencies = [
- "bitflags 1.3.2",
+ "bitflags",
]
[[package]]
name = "redox_users"
-version = "0.4.3"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
+checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b"
dependencies = [
- "getrandom",
- "redox_syscall 0.2.16",
+ "getrandom 0.2.15",
+ "libredox",
"thiserror",
]
[[package]]
name = "regex"
-version = "1.8.1"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
@@ -949,32 +1164,31 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.7.1"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "ring"
-version = "0.16.20"
+version = "0.17.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
dependencies = [
"cc",
+ "cfg-if",
+ "getrandom 0.2.15",
"libc",
- "once_cell",
- "spin",
"untrusted",
- "web-sys",
- "winapi",
+ "windows-sys 0.52.0",
]
[[package]]
name = "rusqlite"
-version = "0.29.0"
+version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2"
+checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae"
dependencies = [
- "bitflags 2.2.1",
+ "bitflags",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
@@ -984,90 +1198,116 @@ dependencies = [
]
[[package]]
-name = "rustix"
-version = "0.37.19"
+name = "rustc-demangle"
+version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "rustix"
+version = "0.38.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags",
"errno",
- "io-lifetimes",
"libc",
- "linux-raw-sys",
- "windows-sys 0.48.0",
+ "linux-raw-sys 0.4.15",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "rustix"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825"
+dependencies = [
+ "bitflags",
+ "errno",
+ "libc",
+ "linux-raw-sys 0.9.3",
+ "windows-sys 0.59.0",
]
[[package]]
name = "rustls"
-version = "0.20.8"
+version = "0.23.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
+checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395"
dependencies = [
+ "aws-lc-rs",
"log",
- "ring",
- "sct",
- "webpki",
+ "once_cell",
+ "rustls-pki-types",
+ "rustls-webpki",
+ "subtle",
+ "zeroize",
]
[[package]]
name = "rustls-native-certs"
-version = "0.6.2"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50"
+checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3"
dependencies = [
"openssl-probe",
- "rustls-pemfile",
+ "rustls-pki-types",
"schannel",
"security-framework",
]
[[package]]
-name = "rustls-pemfile"
-version = "1.0.2"
+name = "rustls-pki-types"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
-dependencies = [
- "base64 0.21.0",
-]
-
-[[package]]
-name = "ryu"
-version = "1.0.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
-
-[[package]]
-name = "schannel"
-version = "0.1.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
-dependencies = [
- "windows-sys 0.42.0",
-]
-
-[[package]]
-name = "scopeguard"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
-
-[[package]]
-name = "sct"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
+
+[[package]]
+name = "rustls-webpki"
+version = "0.102.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
dependencies = [
+ "aws-lc-rs",
"ring",
+ "rustls-pki-types",
"untrusted",
]
[[package]]
-name = "security-framework"
-version = "2.9.0"
+name = "ryu"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca2855b3715770894e67cbfa3df957790aa0c9edc3bf06efa1a84d77fa0839d1"
+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
+
+[[package]]
+name = "schannel"
+version = "0.1.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
dependencies = [
- "bitflags 1.3.2",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "security-framework"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316"
+dependencies = [
+ "bitflags",
"core-foundation",
"core-foundation-sys",
"libc",
@@ -1076,9 +1316,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.9.0"
+version = "2.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7"
+checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32"
dependencies = [
"core-foundation-sys",
"libc",
@@ -1086,9 +1326,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.163"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
@@ -1105,9 +1345,9 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.163"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
@@ -1126,29 +1366,30 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.96"
+version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
+checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"itoa",
+ "memchr",
"ryu",
"serde",
]
[[package]]
name = "serde_spanned"
-version = "0.6.1"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
dependencies = [
"serde",
]
[[package]]
name = "sha1"
-version = "0.10.5"
+version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -1156,10 +1397,16 @@ dependencies = [
]
[[package]]
-name = "signal-hook"
-version = "0.3.15"
+name = "shlex"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "signal-hook"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"
dependencies = [
"libc",
"signal-hook-registry",
@@ -1167,9 +1414,9 @@ dependencies = [
[[package]]
name = "signal-hook-mio"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af"
+checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd"
dependencies = [
"libc",
"mio",
@@ -1178,55 +1425,55 @@ dependencies = [
[[package]]
name = "signal-hook-registry"
-version = "1.4.1"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
+checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
dependencies = [
"libc",
]
[[package]]
name = "slab"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
dependencies = [
"autocfg",
]
[[package]]
name = "smallvec"
-version = "1.10.0"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
[[package]]
name = "socket2"
-version = "0.4.9"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
+checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
dependencies = [
"libc",
- "winapi",
+ "windows-sys 0.52.0",
]
[[package]]
-name = "spin"
-version = "0.5.2"
+name = "strsim"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
-name = "strsim"
-version = "0.10.0"
+name = "subtle"
+version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
-version = "2.0.16"
+version = "2.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01"
+checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
dependencies = [
"proc-macro2",
"quote",
@@ -1235,31 +1482,31 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.5.0"
+version = "3.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998"
+checksum = "488960f40a3fd53d72c2a29a58722561dee8afdd175bd88e3db4677d7b2ba600"
dependencies = [
- "cfg-if",
"fastrand",
- "redox_syscall 0.3.5",
- "rustix",
- "windows-sys 0.45.0",
+ "getrandom 0.3.1",
+ "once_cell",
+ "rustix 1.0.2",
+ "windows-sys 0.59.0",
]
[[package]]
name = "thiserror"
-version = "1.0.40"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
+checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.40"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
+checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
@@ -1268,11 +1515,14 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.21"
+version = "0.3.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc"
+checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8"
dependencies = [
+ "deranged",
"itoa",
+ "num-conv",
+ "powerfmt",
"serde",
"time-core",
"time-macros",
@@ -1280,24 +1530,25 @@ dependencies = [
[[package]]
name = "time-core"
-version = "0.1.1"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
+checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef"
[[package]]
name = "time-macros"
-version = "0.2.9"
+version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b"
+checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c"
dependencies = [
+ "num-conv",
"time-core",
]
[[package]]
name = "tinyvec"
-version = "1.6.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71"
dependencies = [
"tinyvec_macros",
]
@@ -1310,28 +1561,27 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.28.1"
+version = "1.44.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105"
+checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a"
dependencies = [
- "autocfg",
+ "backtrace",
"bytes",
"libc",
"mio",
- "num_cpus",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
name = "tokio-macros"
-version = "2.1.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
+checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
@@ -1340,20 +1590,19 @@ dependencies = [
[[package]]
name = "tokio-rustls"
-version = "0.23.4"
+version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
+checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b"
dependencies = [
"rustls",
"tokio",
- "webpki",
]
[[package]]
name = "tokio-stream"
-version = "0.1.14"
+version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
+checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
dependencies = [
"futures-core",
"pin-project-lite",
@@ -1362,25 +1611,25 @@ dependencies = [
[[package]]
name = "tokio-tungstenite"
-version = "0.18.0"
+version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd"
+checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084"
dependencies = [
"futures-util",
"log",
"rustls",
"rustls-native-certs",
+ "rustls-pki-types",
"tokio",
"tokio-rustls",
"tungstenite",
- "webpki",
]
[[package]]
name = "toml"
-version = "0.7.3"
+version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21"
+checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
dependencies = [
"serde",
"serde_spanned",
@@ -1390,18 +1639,18 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.1"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
+checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
-version = "0.19.8"
+version = "0.22.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13"
+checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
dependencies = [
"indexmap",
"serde",
@@ -1412,8 +1661,8 @@ dependencies = [
[[package]]
name = "toss"
-version = "0.1.0"
-source = "git+https://github.com/Garmelon/toss.git?tag=v0.1.0#87723840df5ff75666d7270e62b943621197ce62"
+version = "0.3.4"
+source = "git+https://github.com/Garmelon/toss.git?tag=v0.3.4#57aa8c59308f6f0aa82bde415a42b56c3d6f7c4d"
dependencies = [
"async-trait",
"crossterm",
@@ -1424,90 +1673,67 @@ dependencies = [
[[package]]
name = "tungstenite"
-version = "0.18.0"
+version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788"
+checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13"
dependencies = [
- "base64 0.13.1",
- "byteorder",
"bytes",
+ "data-encoding",
"http",
"httparse",
"log",
"rand",
"rustls",
+ "rustls-pki-types",
"sha1",
"thiserror",
- "url",
"utf-8",
- "webpki",
]
[[package]]
name = "typenum"
-version = "1.16.0"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
-
-[[package]]
-name = "unicode-bidi"
-version = "0.3.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
+checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
[[package]]
name = "unicode-ident"
-version = "1.0.8"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "unicode-linebreak"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137"
-dependencies = [
- "hashbrown",
- "regex",
-]
+checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
[[package]]
name = "unicode-normalization"
-version = "0.1.22"
+version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
+checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956"
dependencies = [
"tinyvec",
]
[[package]]
name = "unicode-segmentation"
-version = "1.10.1"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
+checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
[[package]]
name = "unicode-width"
-version = "0.1.10"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
[[package]]
name = "untrusted"
-version = "0.7.1"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
-
-[[package]]
-name = "url"
-version = "2.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
-dependencies = [
- "form_urlencoded",
- "idna",
- "percent-encoding",
-]
+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "utf-8"
@@ -1517,14 +1743,14 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
[[package]]
name = "utf8parse"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "vault"
-version = "0.2.0"
-source = "git+https://github.com/Garmelon/vault.git?tag=v0.2.0#6fd284fed71ece886db9b8aab659f454ba4858b6"
+version = "0.4.0"
+source = "git+https://github.com/Garmelon/vault.git?tag=v0.4.0#a53254d2e787d15fd2d00584fddf9b84e79572ee"
dependencies = [
"rusqlite",
"tokio",
@@ -1538,9 +1764,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "version_check"
-version = "0.9.4"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
@@ -1549,88 +1775,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
-name = "wasm-bindgen"
-version = "0.2.85"
+name = "wasi"
+version = "0.13.3+wasi-0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b6cb788c4e39112fbe1822277ef6fb3c55cd86b95cb3d3c4c1c9597e4ac74b4"
+checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
dependencies = [
- "cfg-if",
- "wasm-bindgen-macro",
-]
-
-[[package]]
-name = "wasm-bindgen-backend"
-version = "0.2.85"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35e522ed4105a9d626d885b35d62501b30d9666283a5c8be12c14a8bdafe7822"
-dependencies = [
- "bumpalo",
- "log",
- "once_cell",
- "proc-macro2",
- "quote",
- "syn",
- "wasm-bindgen-shared",
-]
-
-[[package]]
-name = "wasm-bindgen-macro"
-version = "0.2.85"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "358a79a0cb89d21db8120cbfb91392335913e4890665b1a7981d9e956903b434"
-dependencies = [
- "quote",
- "wasm-bindgen-macro-support",
-]
-
-[[package]]
-name = "wasm-bindgen-macro-support"
-version = "0.2.85"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
- "wasm-bindgen-backend",
- "wasm-bindgen-shared",
-]
-
-[[package]]
-name = "wasm-bindgen-shared"
-version = "0.2.85"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a901d592cafaa4d711bc324edfaff879ac700b19c3dfd60058d2b445be2691eb"
-
-[[package]]
-name = "web-sys"
-version = "0.3.62"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16b5f940c7edfdc6d12126d98c9ef4d1b3d470011c47c76a6581df47ad9ba721"
-dependencies = [
- "js-sys",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "webpki"
-version = "0.22.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
-dependencies = [
- "ring",
- "untrusted",
+ "wit-bindgen-rt",
]
[[package]]
name = "which"
-version = "4.4.0"
+version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269"
+checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
dependencies = [
"either",
- "libc",
+ "home",
"once_cell",
+ "rustix 0.38.44",
]
[[package]]
@@ -1657,156 +1819,146 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
-version = "0.42.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
- "windows_aarch64_gnullvm 0.42.2",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm 0.42.2",
- "windows_x86_64_msvc 0.42.2",
+ "windows-targets",
]
[[package]]
name = "windows-sys"
-version = "0.45.0"
+version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
- "windows-targets 0.42.2",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
-dependencies = [
- "windows-targets 0.48.0",
+ "windows-targets",
]
[[package]]
name = "windows-targets"
-version = "0.42.2"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
- "windows_aarch64_gnullvm 0.42.2",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm 0.42.2",
- "windows_x86_64_msvc 0.42.2",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
-dependencies = [
- "windows_aarch64_gnullvm 0.48.0",
- "windows_aarch64_msvc 0.48.0",
- "windows_i686_gnu 0.48.0",
- "windows_i686_msvc 0.48.0",
- "windows_x86_64_gnu 0.48.0",
- "windows_x86_64_gnullvm 0.48.0",
- "windows_x86_64_msvc 0.48.0",
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.42.2"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.42.2"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
-version = "0.42.2"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
-name = "windows_i686_gnu"
-version = "0.48.0"
+name = "windows_i686_gnullvm"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
-version = "0.42.2"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.42.2"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.42.2"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.42.2"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
-version = "0.4.6"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699"
+checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36"
dependencies = [
"memchr",
]
+
+[[package]]
+name = "wit-bindgen-rt"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "zerocopy-derive 0.7.35",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6"
+dependencies = [
+ "zerocopy-derive 0.8.23",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
diff --git a/Cargo.toml b/Cargo.toml
index 8f5be76..33f245f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,21 +1,72 @@
[workspace]
-resolver = "2"
+resolver = "3"
members = ["cove", "cove-*"]
[workspace.package]
-version = "0.7.0"
-edition = "2021"
+version = "0.9.3"
+edition = "2024"
[workspace.dependencies]
-crossterm = "0.26.1"
-parking_lot = "0.12.1"
-serde = { version = "1.0.163", features = ["derive"] }
+anyhow = "1.0.97"
+async-trait = "0.1.87"
+clap = { version = "4.5.32", features = ["derive", "deprecated"] }
+cookie = "0.18.1"
+crossterm = "0.28.1"
+directories = "6.0.0"
+edit = "0.1.5"
+jiff = "0.2.4"
+linkify = "0.10.0"
+log = { version = "0.4.26", features = ["std"] }
+open = "5.3.2"
+parking_lot = "0.12.3"
+proc-macro2 = "1.0.94"
+quote = "1.0.40"
+rusqlite = { version = "0.31.0", features = ["bundled", "time"] }
+rustls = "0.23.23"
+serde = { version = "1.0.219", features = ["derive"] }
serde_either = "0.2.1"
-thiserror = "1.0.40"
+serde_json = "1.0.140"
+syn = "2.0.100"
+thiserror = "2.0.12"
+tokio = { version = "1.44.1", features = ["full"] }
+toml = "0.8.20"
+unicode-width = "0.2.0"
+
+[workspace.dependencies.euphoxide]
+git = "https://github.com/Garmelon/euphoxide.git"
+tag = "v0.6.1"
+features = ["bot"]
[workspace.dependencies.toss]
git = "https://github.com/Garmelon/toss.git"
-tag = "v0.1.0"
+tag = "v0.3.4"
+
+[workspace.dependencies.vault]
+git = "https://github.com/Garmelon/vault.git"
+tag = "v0.4.0"
+features = ["tokio"]
+
+[workspace.lints]
+rust.unsafe_code = { level = "forbid", priority = 1 }
+# Lint groups
+rust.deprecated_safe = "warn"
+rust.future_incompatible = "warn"
+rust.keyword_idents = "warn"
+rust.rust_2018_idioms = "warn"
+rust.unused = "warn"
+# Individual lints
+rust.non_local_definitions = "warn"
+rust.redundant_imports = "warn"
+rust.redundant_lifetimes = "warn"
+rust.single_use_lifetimes = "warn"
+rust.unit_bindings = "warn"
+rust.unnameable_types = "warn"
+rust.unused_crate_dependencies = "warn"
+rust.unused_import_braces = "warn"
+rust.unused_lifetimes = "warn"
+rust.unused_qualifications = "warn"
+# Clippy
+clippy.use_self = "warn"
[profile.dev.package."*"]
opt-level = 3
diff --git a/README.md b/README.md
index e5ee2c8..22fef83 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,17 @@
# cove
-Cove is a TUI client for [euphoria.io](https://euphoria.io/), a threaded
+Cove is a TUI client for [euphoria.leet.nu](https://euphoria.leet.nu/), a threaded
real-time chat platform.

It runs on Linux, Windows, and macOS.
+## Installing cove
+
+Download a binary of your choice from the
+[latest release on GitHub](https://github.com/Garmelon/cove/releases/latest).
+
## Using cove
To start cove, simply run `cove` in your terminal. For more info about the
@@ -26,61 +31,3 @@ file or via `cove help-config`.
When launched, cove prints the location it is loading its config file from. To
configure cove, create a config file at that location. This location can be
changed via the `--config` command line option.
-
-## Installation
-
-At this point, cove is not available via any package manager.
-
-Cove is available as a Nix Flake. To try it out, you can use
-```bash
-$ nix run --override-input nixpkgs nixpkgs github:Garmelon/cove/latest
-```
-
-## Manual installation
-
-This section contains instructions on how to install cove by compiling it yourself.
-It doesn't assume you know how to program, but it does assume basic familiarity with the command line on your platform of choice.
-Cove runs in the terminal, after all.
-
-### Installing rustup
-
-Cove is written in Rust, so the first step is to install rustup. Either install
-it from your package manager of choice (if you have one) or use the
-[installer](https://rustup.rs/).
-
-Test your installation by running `rustup --version` and `cargo --version`. If
-rustup is installed correctly, both of these should show a version number.
-
-Cove is designed on the current version of the stable toolchain. If cove doesn't
-compile, you can try switching to the stable toolchain and updating it using the
-following commands:
-```bash
-$ rustup default stable
-$ rustup update
-```
-
-### Installing cove
-
-To install or update to the latest release of cove, run the following command:
-
-```bash
-$ cargo install --force --git https://github.com/Garmelon/cove --branch latest
-```
-
-If you like to live dangerously and want to install or update to the latest,
-bleeding-edge, possibly-broken commit from the repo's main branch, run the
-following command.
-
-**Warning:** This could corrupt your vault. Make sure to make a backup before
-running the command.
-
-```bash
-$ cargo install --force --git https://github.com/Garmelon/cove
-```
-
-To install a specific version of cove, run the following command and substitute
-in the full version you want to install:
-
-```bash
-$ cargo install --force --git https://github.com/Garmelon/cove --tag v0.1.0
-```
diff --git a/cove-config/CONFIG.md b/cove-config/CONFIG.md
new file mode 100644
index 0000000..e69de29
diff --git a/cove-config/Cargo.toml b/cove-config/Cargo.toml
index a5bb70b..9102bfd 100644
--- a/cove-config/Cargo.toml
+++ b/cove-config/Cargo.toml
@@ -1,13 +1,15 @@
[package]
name = "cove-config"
-version = { workspace = true }
-edition = { workspace = true }
+version.workspace = true
+edition.workspace = true
[dependencies]
cove-input = { path = "../cove-input" }
cove-macro = { path = "../cove-macro" }
-serde = { workspace = true }
-thiserror = { workspace = true }
+serde.workspace = true
+thiserror.workspace = true
+toml.workspace = true
-toml = "0.7.3"
+[lints]
+workspace = true
diff --git a/cove-config/src/doc.rs b/cove-config/src/doc.rs
index 3221eb5..35f6074 100644
--- a/cove-config/src/doc.rs
+++ b/cove-config/src/doc.rs
@@ -1,7 +1,6 @@
//! Auto-generate markdown documentation.
-use std::collections::HashMap;
-use std::path::PathBuf;
+use std::{collections::HashMap, path::PathBuf};
use cove_input::KeyBinding;
pub use cove_macro::Document;
@@ -17,15 +16,11 @@ Here is an example config that changes a few different options:
measure_widths = true
rooms_sort_order = "importance"
-[euph.rooms.welcome]
-autojoin = true
-
-[euph.rooms.test]
-username = "badingle"
-force_username = true
-
-[euph.rooms.private]
-password = "foobar"
+[euph.servers."euphoria.leet.nu".rooms]
+welcome.autojoin = true
+test.username = "badingle"
+test.force_username = true
+private.password = "foobar"
[keys]
general.abort = ["esc", "ctrl+c"]
@@ -33,17 +28,6 @@ general.exit = "ctrl+q"
tree.action.fold_tree = "f"
```
-If you want to configure lots of rooms, TOML lets you write this in a more
-compact way:
-
-```toml
-[euph.rooms]
-foo = { autojoin = true }
-bar = { autojoin = true }
-baz = { autojoin = true }
-private = { autojoin = true, password = "foobar" }
-```
-
## Key bindings
Key bindings are specified as strings or lists of strings. Each string specifies
diff --git a/cove-config/src/euph.rs b/cove-config/src/euph.rs
index 0584933..5ed0fb5 100644
--- a/cove-config/src/euph.rs
+++ b/cove-config/src/euph.rs
@@ -23,9 +23,9 @@ pub struct EuphRoom {
/// associated with the current session.
pub username: Option,
- /// If `euph.rooms..username` is set, this will force cove to set the
- /// username even if there is already a different username associated with
- /// the current session.
+ /// If `euph.servers..rooms..username` is set, this will force
+ /// cove to set the username even if there is already a different username
+ /// associated with the current session.
#[serde(default)]
pub force_username: bool,
@@ -35,7 +35,13 @@ pub struct EuphRoom {
}
#[derive(Debug, Default, Deserialize, Document)]
-pub struct Euph {
+pub struct EuphServer {
#[document(metavar = "room")]
pub rooms: HashMap,
}
+
+#[derive(Debug, Default, Deserialize, Document)]
+pub struct Euph {
+ #[document(metavar = "domain")]
+ pub servers: HashMap,
+}
diff --git a/cove-config/src/keys.rs b/cove-config/src/keys.rs
index 3ecbb5b..47c171c 100644
--- a/cove-config/src/keys.rs
+++ b/cove-config/src/keys.rs
@@ -81,7 +81,6 @@ default_bindings! {
pub fn nick => ["n"];
pub fn more_messages => ["m"];
pub fn account => ["A"];
- pub fn present => ["ctrl+p"];
}
pub mod tree_cursor {
@@ -105,6 +104,9 @@ default_bindings! {
pub fn mark_older_seen => ["ctrl+s"];
pub fn info => ["i"];
pub fn links => ["I"];
+ pub fn toggle_nick_emoji => ["e"];
+ pub fn increase_caesar => ["c"];
+ pub fn decrease_caesar => ["C"];
}
}
@@ -122,7 +124,6 @@ pub struct General {
#[serde(default = "default::general::confirm")]
pub confirm: KeyBinding,
/// Advance focus.
- // TODO Mention examples where this is used
#[serde(default = "default::general::focus")]
pub focus: KeyBinding,
/// Show this help.
@@ -287,9 +288,6 @@ pub struct RoomAction {
/// Manage account.
#[serde(default = "default::room_action::account")]
pub account: KeyBinding,
- /// Open room's plugh.de/present page.
- #[serde(default = "default::room_action::present")]
- pub present: KeyBinding,
}
#[derive(Debug, Default, Deserialize, Document)]
@@ -359,6 +357,15 @@ pub struct TreeAction {
/// List links found in message.
#[serde(default = "default::tree_action::links")]
pub links: KeyBinding,
+ /// Toggle agent id based nick emoji.
+ #[serde(default = "default::tree_action::toggle_nick_emoji")]
+ pub toggle_nick_emoji: KeyBinding,
+ /// Increase caesar cipher rotation.
+ #[serde(default = "default::tree_action::increase_caesar")]
+ pub increase_caesar: KeyBinding,
+ /// Decrease caesar cipher rotation.
+ #[serde(default = "default::tree_action::decrease_caesar")]
+ pub decrease_caesar: KeyBinding,
}
#[derive(Debug, Default, Deserialize, Document)]
diff --git a/cove-config/src/lib.rs b/cove-config/src/lib.rs
index d2a773a..0cb6cc7 100644
--- a/cove-config/src/lib.rs
+++ b/cove-config/src/lib.rs
@@ -1,28 +1,18 @@
-#![forbid(unsafe_code)]
-// Rustc lint groups
-#![warn(future_incompatible)]
-#![warn(rust_2018_idioms)]
-#![warn(unused)]
-// Rustc lints
-#![warn(noop_method_call)]
-#![warn(single_use_lifetimes)]
-// Clippy lints
-#![warn(clippy::use_self)]
+use std::{
+ fs,
+ io::{self, ErrorKind},
+ path::{Path, PathBuf},
+};
+
+use doc::Document;
+use serde::{Deserialize, Serialize};
+
+pub use crate::{euph::*, keys::*};
pub mod doc;
mod euph;
mod keys;
-use std::io::ErrorKind;
-use std::path::{Path, PathBuf};
-use std::{fs, io};
-
-use doc::Document;
-use serde::Deserialize;
-
-pub use crate::euph::*;
-pub use crate::keys::*;
-
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("failed to read config file")]
@@ -31,6 +21,14 @@ pub enum Error {
Toml(#[from] toml::de::Error),
}
+#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, Document)]
+#[serde(rename_all = "snake_case")]
+pub enum WidthEstimationMethod {
+ #[default]
+ Legacy,
+ Unicode,
+}
+
#[derive(Debug, Default, Deserialize, Document)]
pub struct Config {
/// The directory that cove stores its data in when not running in ephemeral
@@ -49,19 +47,34 @@ pub struct Config {
///
/// See also the `--ephemeral` command line option.
#[serde(default)]
- #[document(default = "`false`")]
pub ephemeral: bool,
- /// Whether to measure the width of characters as displayed by the terminal
- /// emulator instead of guessing the width.
+ /// How to estimate the width of graphemes (i.e. characters) as displayed by
+ /// the terminal emulator.
+ ///
+ /// `"legacy"`: Use a legacy method that should mostly work on most terminal
+ /// emulators. This method will never be correct in all cases since every
+ /// terminal emulator handles grapheme widths slightly differently. However,
+ /// those cases are usually rare (unless you view a lot of emoji).
+ ///
+ /// `"unicode"`: Use the unicode standard in a best-effort manner to
+ /// determine grapheme widths. Some terminals (e.g. ghostty) can make use of
+ /// this.
+ ///
+ /// This method is used when `measure_widths` is set to `false`.
+ ///
+ /// See also the `--width-estimation-method` command line option.
+ #[serde(default)]
+ pub width_estimation_method: WidthEstimationMethod,
+
+ /// Whether to measure the width of graphemes (i.e. characters) as displayed
+ /// by the terminal emulator instead of estimating the width.
///
/// Enabling this makes rendering a bit slower but more accurate. The screen
- /// might also flash when encountering new characters (or, more accurately,
- /// graphemes).
+ /// might also flash when encountering new graphemes.
///
- /// See also the `--measure-graphemes` command line option.
+ /// See also the `--measure-widths` command line option.
#[serde(default)]
- #[document(default = "`false`")]
pub measure_widths: bool,
/// Whether to start in offline mode.
@@ -72,23 +85,46 @@ pub struct Config {
///
/// See also the `--offline` command line option.
#[serde(default)]
- #[document(default = "`false`")]
pub offline: bool,
/// Initial sort order of rooms list.
///
- /// `alphabet` sorts rooms in alphabetic order.
+ /// `"alphabet"` sorts rooms in alphabetic order.
///
- /// `importance` sorts rooms by the following criteria (in descending order
- /// of priority):
+ /// `"importance"` sorts rooms by the following criteria (in descending
+ /// order of priority):
///
/// 1. connected rooms before unconnected rooms
/// 2. rooms with unread messages before rooms without
/// 3. alphabetic order
#[serde(default)]
- #[document(default = "`alphabet`")]
pub rooms_sort_order: RoomsSortOrder,
+ /// Ring the bell (character 0x07) when you are mentioned in a room.
+ #[serde(default)]
+ pub bell_on_mention: bool,
+
+ /// Time zone that chat timestamps should be displayed in.
+ ///
+ /// This option can either be the string `"localtime"`, a [POSIX TZ string],
+ /// or a [tz identifier] from the [tz database].
+ ///
+ /// When not set or when set to `"localtime"`, cove attempts to use your
+ /// system's configured time zone, falling back to UTC.
+ ///
+ /// When the string begins with a colon or doesn't match the a POSIX TZ
+ /// string format, it is interpreted as a tz identifier and looked up in
+ /// your system's tz database (or a bundled tz database on Windows).
+ ///
+ /// If the `TZ` environment variable exists, it overrides this option.
+ ///
+ /// [POSIX TZ string]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
+ /// [tz identifier]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+ /// [tz database]: https://en.wikipedia.org/wiki/Tz_database
+ #[serde(default)]
+ #[document(default = "`$TZ` or local system time zone")]
+ pub time_zone: Option,
+
#[serde(default)]
#[document(no_default)]
pub euph: Euph,
@@ -107,7 +143,16 @@ impl Config {
})
}
- pub fn euph_room(&self, name: &str) -> EuphRoom {
- self.euph.rooms.get(name).cloned().unwrap_or_default()
+ pub fn euph_room(&self, domain: &str, name: &str) -> EuphRoom {
+ if let Some(server) = self.euph.servers.get(domain) {
+ if let Some(room) = server.rooms.get(name) {
+ return room.clone();
+ }
+ }
+ EuphRoom::default()
+ }
+
+ pub fn time_zone_ref(&self) -> Option<&str> {
+ self.time_zone.as_ref().map(|s| s as &str)
}
}
diff --git a/cove-input/Cargo.toml b/cove-input/Cargo.toml
index f3dcc64..5005be2 100644
--- a/cove-input/Cargo.toml
+++ b/cove-input/Cargo.toml
@@ -1,16 +1,18 @@
[package]
name = "cove-input"
-version = { workspace = true }
-edition = { workspace = true }
+version.workspace = true
+edition.workspace = true
[dependencies]
cove-macro = { path = "../cove-macro" }
-crossterm = { workspace = true }
-parking_lot = { workspace = true }
-serde = { workspace = true }
-serde_either = { workspace = true }
-thiserror = { workspace = true }
-toss = { workspace = true }
+crossterm.workspace = true
+edit.workspace = true
+parking_lot.workspace = true
+serde.workspace = true
+serde_either.workspace = true
+thiserror.workspace = true
+toss.workspace = true
-edit = "0.1.4"
+[lints]
+workspace = true
diff --git a/cove-input/src/keys.rs b/cove-input/src/keys.rs
index 4ede713..8d2fdf1 100644
--- a/cove-input/src/keys.rs
+++ b/cove-input/src/keys.rs
@@ -1,10 +1,7 @@
-use std::fmt;
-use std::num::ParseIntError;
-use std::str::FromStr;
+use std::{fmt, num::ParseIntError, str::FromStr};
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
-use serde::{de::Error, Deserialize, Deserializer};
-use serde::{Serialize, Serializer};
+use serde::{Deserialize, Deserializer, Serialize, Serializer, de::Error};
use serde_either::SingleOrVec;
#[derive(Debug, thiserror::Error)]
@@ -117,7 +114,7 @@ impl KeyPress {
"alt" if !self.alt => self.alt = true,
"any" if !self.shift && !self.ctrl && !self.alt => self.any = true,
m @ ("shift" | "ctrl" | "alt" | "any") => {
- return Err(ParseKeysError::ConflictingModifier(m.to_string()))
+ return Err(ParseKeysError::ConflictingModifier(m.to_string()));
}
m => return Err(ParseKeysError::UnknownModifier(m.to_string())),
}
@@ -151,7 +148,7 @@ impl FromStr for KeyPress {
let mut parts = s.split('+');
let code = parts.next_back().ok_or(ParseKeysError::NoKeyCode)?;
- let mut keys = KeyPress::parse_key_code(code)?;
+ let mut keys = Self::parse_key_code(code)?;
let shift_allowed = !conflicts_with_shift(keys.code);
for modifier in parts {
keys.parse_modifier(modifier, shift_allowed)?;
diff --git a/cove-input/src/lib.rs b/cove-input/src/lib.rs
index b42fdcb..f6b2e92 100644
--- a/cove-input/src/lib.rs
+++ b/cove-input/src/lib.rs
@@ -1,15 +1,14 @@
-mod keys;
-
-use std::io;
-use std::sync::Arc;
+use std::{io, sync::Arc};
pub use cove_macro::KeyGroup;
-use crossterm::event::{Event, KeyEvent};
+use crossterm::event::{Event, KeyEvent, KeyEventKind};
use parking_lot::FairMutex;
use toss::{Frame, Terminal, WidthDb};
pub use crate::keys::*;
+mod keys;
+
pub struct KeyBindingInfo<'a> {
pub name: &'static str,
pub binding: &'a KeyBinding,
@@ -40,7 +39,7 @@ impl<'a> KeyGroupInfo<'a> {
}
pub struct InputEvent<'a> {
- event: crossterm::event::Event,
+ event: Event,
terminal: &'a mut Terminal,
crossterm_lock: Arc>,
}
@@ -58,11 +57,15 @@ impl<'a> InputEvent<'a> {
}
}
+ /// If the current event represents a key press, returns the [`KeyEvent`]
+ /// associated with that key press.
pub fn key_event(&self) -> Option {
- match &self.event {
- Event::Key(event) => Some(*event),
- _ => None,
+ if let Event::Key(event) = &self.event {
+ if matches!(event.kind, KeyEventKind::Press | KeyEventKind::Repeat) {
+ return Some(*event);
+ }
}
+ None
}
pub fn paste_event(&self) -> Option<&str> {
diff --git a/cove-macro/Cargo.toml b/cove-macro/Cargo.toml
index 840b729..6c01b7d 100644
--- a/cove-macro/Cargo.toml
+++ b/cove-macro/Cargo.toml
@@ -1,13 +1,15 @@
[package]
name = "cove-macro"
-version = { workspace = true }
-edition = { workspace = true }
+version.workspace = true
+edition.workspace = true
[dependencies]
-case = "1.0.0"
-proc-macro2 = "1.0.56"
-quote = "1.0.27"
-syn = "2.0.16"
+proc-macro2.workspace = true
+quote.workspace = true
+syn.workspace = true
[lib]
proc-macro = true
+
+[lints]
+workspace = true
diff --git a/cove-macro/src/document.rs b/cove-macro/src/document.rs
index e8e248e..afec84d 100644
--- a/cove-macro/src/document.rs
+++ b/cove-macro/src/document.rs
@@ -1,7 +1,6 @@
use proc_macro2::TokenStream;
use quote::quote;
-use syn::spanned::Spanned;
-use syn::{Data, DataEnum, DataStruct, DeriveInput, Field, Ident, LitStr};
+use syn::{Data, DataEnum, DataStruct, DeriveInput, Field, Ident, LitStr, spanned::Spanned};
use crate::util::{self, SerdeDefault};
diff --git a/cove-macro/src/key_group.rs b/cove-macro/src/key_group.rs
index bc7bdea..832bfd3 100644
--- a/cove-macro/src/key_group.rs
+++ b/cove-macro/src/key_group.rs
@@ -1,9 +1,8 @@
use proc_macro2::TokenStream;
use quote::quote;
-use syn::spanned::Spanned;
-use syn::{Data, DeriveInput};
+use syn::{Data, DeriveInput, spanned::Spanned};
-use crate::util::{self, bail};
+use crate::util;
fn decapitalize(s: &str) -> String {
let mut chars = s.chars();
@@ -34,7 +33,7 @@ pub fn derive_impl(input: DeriveInput) -> syn::Result {
let default = util::serde_default(field)?;
let Some(default) = default else {
- return bail(field_ident.span(), "must have serde default");
+ return util::bail(field_ident.span(), "must have serde default");
};
let default_value = default.value();
diff --git a/cove-macro/src/lib.rs b/cove-macro/src/lib.rs
index 82ef61a..c655f2a 100644
--- a/cove-macro/src/lib.rs
+++ b/cove-macro/src/lib.rs
@@ -1,15 +1,4 @@
-#![forbid(unsafe_code)]
-// Rustc lint groups
-#![warn(future_incompatible)]
-#![warn(rust_2018_idioms)]
-#![warn(unused)]
-// Rustc lints
-#![warn(noop_method_call)]
-#![warn(single_use_lifetimes)]
-// Clippy lints
-#![warn(clippy::use_self)]
-
-use syn::{parse_macro_input, DeriveInput};
+use syn::{DeriveInput, parse_macro_input};
mod document;
mod key_group;
diff --git a/cove-macro/src/util.rs b/cove-macro/src/util.rs
index b7bf62a..d73b7ca 100644
--- a/cove-macro/src/util.rs
+++ b/cove-macro/src/util.rs
@@ -1,8 +1,9 @@
use proc_macro2::{Span, TokenStream};
use quote::quote;
-use syn::parse::Parse;
-use syn::punctuated::Punctuated;
-use syn::{Attribute, Expr, ExprLit, ExprPath, Field, Lit, LitStr, Path, Token, Type};
+use syn::{
+ Attribute, Expr, ExprLit, ExprPath, Field, Lit, LitStr, Path, Token, Type, parse::Parse,
+ punctuated::Punctuated,
+};
pub fn bail(span: Span, message: &str) -> syn::Result {
Err(syn::Error::new(span, message))
diff --git a/cove/Cargo.toml b/cove/Cargo.toml
index ff50048..3a60a5d 100644
--- a/cove/Cargo.toml
+++ b/cove/Cargo.toml
@@ -1,46 +1,32 @@
[package]
name = "cove"
-version = { workspace = true }
-edition = { workspace = true }
+version.workspace = true
+edition.workspace = true
[dependencies]
cove-config = { path = "../cove-config" }
cove-input = { path = "../cove-input" }
-crossterm = { workspace = true }
-parking_lot = { workspace = true }
-thiserror = { workspace = true }
-toss = { workspace = true }
+anyhow.workspace = true
+async-trait.workspace = true
+clap.workspace = true
+cookie.workspace = true
+crossterm.workspace = true
+directories.workspace = true
+euphoxide.workspace = true
+jiff.workspace = true
+linkify.workspace = true
+log.workspace = true
+open.workspace = true
+parking_lot.workspace = true
+rusqlite.workspace = true
+serde_json.workspace = true
+thiserror.workspace = true
+tokio.workspace = true
+toss.workspace = true
+unicode-width.workspace = true
+vault.workspace = true
+rustls.workspace = true
-anyhow = "1.0.71"
-async-trait = "0.1.68"
-clap = { version = "4.2.7", features = ["derive", "deprecated"] }
-cookie = "0.17.0"
-directories = "5.0.1"
-linkify = "0.9.0"
-log = { version = "0.4.17", features = ["std"] }
-once_cell = "1.17.1"
-open = "4.1.0"
-rusqlite = { version = "0.29.0", features = ["bundled", "time"] }
-serde_json = "1.0.96"
-tokio = { version = "1.28.1", features = ["full"] }
-unicode-segmentation = "1.10.1"
-unicode-width = "0.1.10"
-
-[dependencies.time]
-version = "0.3.21"
-features = ["macros", "formatting", "parsing", "serde"]
-
-[dependencies.tokio-tungstenite]
-version = "0.18.0"
-features = ["rustls-tls-native-roots"]
-
-[dependencies.euphoxide]
-git = "https://github.com/Garmelon/euphoxide.git"
-tag = "v0.4.0"
-features = ["bot"]
-
-[dependencies.vault]
-git = "https://github.com/Garmelon/vault.git"
-tag = "v0.2.0"
-features = ["tokio"]
+[lints]
+workspace = true
diff --git a/cove/src/euph.rs b/cove/src/euph.rs
index ab93753..77bf1db 100644
--- a/cove/src/euph.rs
+++ b/cove/src/euph.rs
@@ -1,7 +1,9 @@
-mod room;
-mod small_message;
-mod util;
-
+pub use highlight::*;
pub use room::*;
pub use small_message::*;
pub use util::*;
+
+mod highlight;
+mod room;
+mod small_message;
+mod util;
diff --git a/cove/src/euph/highlight.rs b/cove/src/euph/highlight.rs
new file mode 100644
index 0000000..1c9abd0
--- /dev/null
+++ b/cove/src/euph/highlight.rs
@@ -0,0 +1,211 @@
+use std::ops::Range;
+
+use crossterm::style::Stylize;
+use toss::{Style, Styled};
+
+use crate::euph::util;
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum SpanType {
+ Mention,
+ Room,
+ Emoji,
+}
+
+fn nick_char(ch: char) -> bool {
+ // Closely following the heim mention regex:
+ // https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/stores/chat.js#L14-L15
+ // `>` has been experimentally confirmed to delimit mentions as well.
+ match ch {
+ ',' | '.' | '!' | '?' | ';' | '&' | '<' | '>' | '\'' | '"' => false,
+ _ => !ch.is_whitespace(),
+ }
+}
+
+fn room_char(ch: char) -> bool {
+ // Basically just \w, see also
+ // https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/ui/MessageText.js#L66
+ ch.is_ascii_alphanumeric() || ch == '_'
+}
+
+struct SpanFinder<'a> {
+ content: &'a str,
+
+ span: Option<(SpanType, usize)>,
+ room_or_mention_possible: bool,
+
+ result: Vec<(SpanType, Range)>,
+}
+
+impl<'a> SpanFinder<'a> {
+ fn is_valid_span(&self, span: SpanType, range: Range) -> bool {
+ let text = &self.content[range.start..range.end];
+ match span {
+ SpanType::Mention => range.len() > 1 && text.starts_with('@'),
+ SpanType::Room => range.len() > 1 && text.starts_with('&'),
+ SpanType::Emoji => {
+ if range.len() <= 2 {
+ return false;
+ }
+
+ let Some(name) = Some(text)
+ .and_then(|it| it.strip_prefix(':'))
+ .and_then(|it| it.strip_suffix(':'))
+ else {
+ return false;
+ };
+
+ util::EMOJI.get(name).is_some()
+ }
+ }
+ }
+
+ fn close_span(&mut self, end: usize) {
+ let Some((span, start)) = self.span else {
+ return;
+ };
+ if self.is_valid_span(span, start..end) {
+ self.result.push((span, start..end));
+ }
+ self.span = None;
+ }
+
+ fn open_span(&mut self, span: SpanType, start: usize) {
+ self.close_span(start);
+ self.span = Some((span, start))
+ }
+
+ fn step(&mut self, idx: usize, char: char) {
+ match (char, self.span) {
+ ('@', Some((SpanType::Mention, _))) => {} // Continue the mention
+ ('@', _) if self.room_or_mention_possible => self.open_span(SpanType::Mention, idx),
+ ('&', _) if self.room_or_mention_possible => self.open_span(SpanType::Room, idx),
+ (':', None) => self.open_span(SpanType::Emoji, idx),
+ (':', Some((SpanType::Emoji, _))) => self.close_span(idx + 1),
+ (c, Some((SpanType::Mention, _))) if !nick_char(c) => self.close_span(idx),
+ (c, Some((SpanType::Room, _))) if !room_char(c) => self.close_span(idx),
+ _ => {}
+ }
+
+ // More permissive than the heim web client
+ self.room_or_mention_possible = !char.is_alphanumeric();
+ }
+
+ fn find(content: &'a str) -> Vec<(SpanType, Range)> {
+ let mut this = Self {
+ content,
+ span: None,
+ room_or_mention_possible: true,
+ result: vec![],
+ };
+
+ for (idx, char) in content.char_indices() {
+ this.step(idx, char);
+ }
+
+ this.close_span(content.len());
+
+ this.result
+ }
+}
+
+pub fn find_spans(content: &str) -> Vec<(SpanType, Range)> {
+ SpanFinder::find(content)
+}
+
+/// Highlight spans in a string.
+///
+/// The list of spans must be non-overlapping and in ascending order.
+///
+/// If `exact` is specified, colon-delimited emoji are not replaced with their
+/// unicode counterparts.
+pub fn apply_spans(
+ content: &str,
+ spans: &[(SpanType, Range)],
+ base: Style,
+ exact: bool,
+) -> Styled {
+ let mut result = Styled::default();
+ let mut i = 0;
+
+ for (span, range) in spans {
+ assert!(i <= range.start);
+ assert!(range.end <= content.len());
+
+ if i < range.start {
+ result = result.then(&content[i..range.start], base);
+ }
+
+ let text = &content[range.start..range.end];
+ result = match span {
+ SpanType::Mention if exact => result.and_then(util::style_mention_exact(text, base)),
+ SpanType::Mention => result.and_then(util::style_mention(text, base)),
+ SpanType::Room => result.then(text, base.blue().bold()),
+ SpanType::Emoji if exact => result.then(text, base.magenta()),
+ SpanType::Emoji => {
+ let name = text.strip_prefix(':').unwrap_or(text);
+ let name = name.strip_suffix(':').unwrap_or(name);
+ if let Some(Some(replacement)) = util::EMOJI.get(name) {
+ result.then(replacement, base)
+ } else {
+ result.then(text, base.magenta())
+ }
+ }
+ };
+
+ i = range.end;
+ }
+
+ if i < content.len() {
+ result = result.then(&content[i..], base);
+ }
+
+ result
+}
+
+/// Highlight an euphoria message's content.
+///
+/// If `exact` is specified, colon-delimited emoji are not replaced with their
+/// unicode counterparts.
+pub fn highlight(content: &str, base: Style, exact: bool) -> Styled {
+ apply_spans(content, &find_spans(content), base, exact)
+}
+
+#[cfg(test)]
+mod tests {
+
+ use crate::euph::SpanType;
+
+ use super::find_spans;
+
+ #[test]
+ fn mentions() {
+ assert_eq!(find_spans("@foo"), vec![(SpanType::Mention, 0..4)]);
+ assert_eq!(find_spans("&@foo"), vec![(SpanType::Mention, 1..5)]);
+ assert_eq!(find_spans("a @foo b"), vec![(SpanType::Mention, 2..6)]);
+ assert_eq!(find_spans("@@foo@@"), vec![(SpanType::Mention, 0..7)]);
+ assert_eq!(find_spans("a @b@c d"), vec![(SpanType::Mention, 2..6)]);
+ assert_eq!(
+ find_spans("a @b @c d"),
+ vec![(SpanType::Mention, 2..4), (SpanType::Mention, 5..7)]
+ );
+ }
+
+ #[test]
+ fn rooms() {
+ assert_eq!(find_spans("&foo"), vec![(SpanType::Room, 0..4)]);
+ assert_eq!(find_spans("@&foo"), vec![(SpanType::Room, 1..5)]);
+ assert_eq!(find_spans("a &foo b"), vec![(SpanType::Room, 2..6)]);
+ assert_eq!(find_spans("&&foo&&"), vec![(SpanType::Room, 1..5)]);
+ assert_eq!(find_spans("a &b&c d"), vec![(SpanType::Room, 2..4)]);
+ assert_eq!(
+ find_spans("a &b &c d"),
+ vec![(SpanType::Room, 2..4), (SpanType::Room, 5..7)]
+ );
+ }
+
+ #[test]
+ fn emoji_in_mentions() {
+ assert_eq!(find_spans(" @a:b:c "), vec![(SpanType::Mention, 1..7)]);
+ }
+}
diff --git a/cove/src/euph/room.rs b/cove/src/euph/room.rs
index 7937180..a4e29cf 100644
--- a/cove/src/euph/room.rs
+++ b/cove/src/euph/room.rs
@@ -1,24 +1,21 @@
-// TODO Stop if room does not exist (e.g. 404)
+use std::{convert::Infallible, time::Duration};
-use std::convert::Infallible;
-use std::time::Duration;
-
-use euphoxide::api::packet::ParsedPacket;
-use euphoxide::api::{
- Auth, AuthOption, Data, Log, Login, Logout, MessageId, Nick, Send, SendEvent, SendReply, Time,
- UserId,
+use euphoxide::{
+ api::{
+ Auth, AuthOption, Data, Log, Login, Logout, MessageId, Nick, Send, SendEvent, SendReply,
+ Time, UserId, packet::ParsedPacket,
+ },
+ bot::instance::{ConnSnapshot, Event, Instance, InstanceConfig},
+ conn::{self, ConnTx, Joined},
};
-use euphoxide::bot::instance::{ConnSnapshot, Event, Instance, InstanceConfig};
-use euphoxide::conn::{self, ConnTx};
-use log::{debug, error, info, warn};
-use tokio::select;
-use tokio::sync::oneshot;
+use log::{debug, info, warn};
+use tokio::{select, sync::oneshot};
-use crate::macros::logging_unwrap;
-use crate::vault::EuphRoomVault;
+use crate::{macros::logging_unwrap, vault::EuphRoomVault};
const LOG_INTERVAL: Duration = Duration::from_secs(10);
+#[allow(clippy::large_enum_variant)]
#[derive(Debug)]
pub enum State {
Disconnected,
@@ -35,6 +32,13 @@ impl State {
None
}
}
+
+ pub fn joined(&self) -> Option<&Joined> {
+ match self {
+ Self::Connected(_, conn::State::Joined(joined)) => Some(joined),
+ _ => None,
+ }
+ }
}
#[derive(Debug, thiserror::Error)]
@@ -65,19 +69,13 @@ impl Room {
where
F: Fn(Event) + std::marker::Send + Sync + 'static,
{
- // &rl2dev's message history is broken and requesting old messages past
- // a certain point results in errors. Cove should not keep retrying log
- // requests when hitting that limit, so &rl2dev is always opened in
- // ephemeral mode.
- let ephemeral = vault.vault().vault().ephemeral() || vault.room() == "rl2dev";
-
Self {
- vault,
- ephemeral,
+ ephemeral: vault.vault().vault().ephemeral(),
instance: instance_config.build(on_event),
state: State::Disconnected,
last_msg_id: None,
log_request_canary: None,
+ vault,
}
}
@@ -125,7 +123,8 @@ impl Room {
let cookies = &*self.instance.config().server.cookies;
let cookies = cookies.lock().unwrap().clone();
- logging_unwrap!(self.vault.vault().set_cookies(cookies).await);
+ let domain = self.vault.room().domain.clone();
+ logging_unwrap!(self.vault.vault().set_cookies(domain, cookies).await);
}
Event::Packet(_, packet, ConnSnapshot { conn_tx, state }) => {
self.state = State::Connected(conn_tx, state);
@@ -137,7 +136,6 @@ impl Room {
self.log_request_canary = None;
}
Event::Stopped(_) => {
- // TODO Remove room somewhere if this happens? If it doesn't already happen during stabilization
self.state = State::Stopped;
}
}
@@ -183,15 +181,9 @@ impl Room {
None => None,
};
- debug!("{}: requesting logs", vault.room());
+ debug!("{:?}: requesting logs", vault.room());
- // &rl2dev's message history is broken and requesting old messages past
- // a certain point results in errors. By reducing the amount of messages
- // in each log request, we can get closer to this point. Since &rl2dev
- // is fairly low in activity, this should be fine.
- let n = if vault.room() == "rl2dev" { 50 } else { 1000 };
-
- let _ = conn_tx.send(Log { n, before }).await;
+ let _ = conn_tx.send(Log { n: 1000, before }).await;
// The code handling incoming events and replies also handles
// `LogReply`s, so we don't need to do anything special here.
}
@@ -209,7 +201,9 @@ impl Room {
async fn on_packet(&mut self, packet: ParsedPacket) {
let room_name = &self.instance.config().room;
- let Ok(data) = &packet.content else { return; };
+ let Ok(data) = &packet.content else {
+ return;
+ };
match data {
Data::BounceEvent(_) => {}
Data::DisconnectEvent(_) => {}
diff --git a/cove/src/euph/small_message.rs b/cove/src/euph/small_message.rs
index 2751058..5db1790 100644
--- a/cove/src/euph/small_message.rs
+++ b/cove/src/euph/small_message.rs
@@ -1,212 +1,18 @@
-use std::mem;
-
use crossterm::style::Stylize;
-use euphoxide::api::{MessageId, Snowflake, Time};
-use time::OffsetDateTime;
+use euphoxide::api::{MessageId, Snowflake, Time, UserId};
+use jiff::Timestamp;
use toss::{Style, Styled};
-use crate::store::Msg;
-use crate::ui::ChatMsg;
+use crate::{store::Msg, ui::ChatMsg};
use super::util;
-fn nick_char(ch: char) -> bool {
- // Closely following the heim mention regex:
- // https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/stores/chat.js#L14-L15
- // `>` has been experimentally confirmed to delimit mentions as well.
- match ch {
- ',' | '.' | '!' | '?' | ';' | '&' | '<' | '>' | '\'' | '"' => false,
- _ => !ch.is_whitespace(),
- }
-}
-
-fn room_char(ch: char) -> bool {
- // Basically just \w, see also
- // https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/ui/MessageText.js#L66
- ch.is_ascii_alphanumeric() || ch == '_'
-}
-
-enum Span {
- Nothing,
- Mention,
- Room,
- Emoji,
-}
-
-struct Highlighter<'a> {
- content: &'a str,
- base_style: Style,
- exact: bool,
-
- span: Span,
- span_start: usize,
- room_or_mention_possible: bool,
-
- result: Styled,
-}
-
-impl<'a> Highlighter<'a> {
- /// Does *not* guarantee `self.span_start == idx` after running!
- fn close_mention(&mut self, idx: usize) {
- let span_length = idx.saturating_sub(self.span_start);
- if span_length <= 1 {
- // We can repurpose the current span
- self.span = Span::Nothing;
- return;
- }
-
- let text = &self.content[self.span_start..idx]; // Includes @
- self.result = mem::take(&mut self.result).and_then(if self.exact {
- util::style_nick_exact(text, self.base_style)
- } else {
- util::style_nick(text, self.base_style)
- });
-
- self.span = Span::Nothing;
- self.span_start = idx;
- }
-
- /// Does *not* guarantee `self.span_start == idx` after running!
- fn close_room(&mut self, idx: usize) {
- let span_length = idx.saturating_sub(self.span_start);
- if span_length <= 1 {
- // We can repurpose the current span
- self.span = Span::Nothing;
- return;
- }
-
- self.result = mem::take(&mut self.result).then(
- &self.content[self.span_start..idx],
- self.base_style.blue().bold(),
- );
-
- self.span = Span::Nothing;
- self.span_start = idx;
- }
-
- // Warning: `idx` is the index of the closing colon.
- fn close_emoji(&mut self, idx: usize) {
- let name = &self.content[self.span_start + 1..idx];
- if let Some(replace) = util::EMOJI.get(name) {
- match replace {
- Some(replace) if !self.exact => {
- self.result = mem::take(&mut self.result).then(replace, self.base_style);
- }
- _ => {
- let text = &self.content[self.span_start..=idx];
- let style = self.base_style.magenta();
- self.result = mem::take(&mut self.result).then(text, style);
- }
- }
-
- self.span = Span::Nothing;
- self.span_start = idx + 1;
- } else {
- self.close_plain(idx);
- self.span = Span::Emoji;
- }
- }
-
- /// Guarantees `self.span_start == idx` after running.
- fn close_plain(&mut self, idx: usize) {
- if self.span_start == idx {
- // Span has length 0
- return;
- }
-
- self.result =
- mem::take(&mut self.result).then(&self.content[self.span_start..idx], self.base_style);
-
- self.span = Span::Nothing;
- self.span_start = idx;
- }
-
- fn close_span_before_current_char(&mut self, idx: usize, char: char) {
- match self.span {
- Span::Mention if !nick_char(char) => self.close_mention(idx),
- Span::Room if !room_char(char) => self.close_room(idx),
- Span::Emoji if char == '&' || char == '@' => {
- self.span = Span::Nothing;
- }
- _ => {}
- }
- }
-
- fn update_span_with_current_char(&mut self, idx: usize, char: char) {
- match self.span {
- Span::Nothing if char == '@' && self.room_or_mention_possible => {
- self.close_plain(idx);
- self.span = Span::Mention;
- }
- Span::Nothing if char == '&' && self.room_or_mention_possible => {
- self.close_plain(idx);
- self.span = Span::Room;
- }
- Span::Nothing if char == ':' => {
- self.close_plain(idx);
- self.span = Span::Emoji;
- }
- Span::Emoji if char == ':' => self.close_emoji(idx),
- _ => {}
- }
- }
-
- fn close_final_span(&mut self) {
- let idx = self.content.len();
- if self.span_start >= idx {
- return; // Span has no contents
- }
-
- match self.span {
- Span::Mention => self.close_mention(idx),
- Span::Room => self.close_room(idx),
- _ => {}
- }
-
- self.close_plain(idx);
- }
-
- fn step(&mut self, idx: usize, char: char) {
- if self.span_start < idx {
- self.close_span_before_current_char(idx, char);
- }
-
- self.update_span_with_current_char(idx, char);
-
- // More permissive than the heim web client
- self.room_or_mention_possible = !char.is_alphanumeric();
- }
-
- fn highlight(content: &'a str, base_style: Style, exact: bool) -> Styled {
- let mut this = Self {
- content: if exact { content } else { content.trim() },
- base_style,
- exact,
- span: Span::Nothing,
- span_start: 0,
- room_or_mention_possible: true,
- result: Styled::default(),
- };
-
- for (idx, char) in (if exact { content } else { content.trim() }).char_indices() {
- this.step(idx, char);
- }
-
- this.close_final_span();
-
- this.result
- }
-}
-
-fn highlight_content(content: &str, base_style: Style, exact: bool) -> Styled {
- Highlighter::highlight(content, base_style, exact)
-}
-
#[derive(Debug, Clone)]
pub struct SmallMessage {
pub id: MessageId,
pub parent: Option,
pub time: Time,
+ pub user_id: UserId,
pub nick: String,
pub content: String,
pub seen: bool,
@@ -222,22 +28,22 @@ fn style_me() -> Style {
fn styled_nick(nick: &str) -> Styled {
Styled::new_plain("[")
- .and_then(util::style_nick(nick, Style::new()))
+ .and_then(super::style_nick(nick, Style::new()))
.then_plain("]")
}
fn styled_nick_me(nick: &str) -> Styled {
let style = style_me();
- Styled::new("*", style).and_then(util::style_nick(nick, style))
+ Styled::new("*", style).and_then(super::style_nick(nick, style))
}
fn styled_content(content: &str) -> Styled {
- highlight_content(content.trim(), Style::new(), false)
+ super::highlight(content.trim(), Style::new(), false)
}
fn styled_content_me(content: &str) -> Styled {
let style = style_me();
- highlight_content(content.trim(), style, false).then("*", style)
+ super::highlight(content.trim(), style, false).then("*", style)
}
fn styled_editor_content(content: &str) -> Styled {
@@ -246,7 +52,7 @@ fn styled_editor_content(content: &str) -> Styled {
} else {
Style::new()
};
- highlight_content(content, style, true)
+ super::highlight(content, style, true)
}
impl Msg for SmallMessage {
@@ -267,11 +73,15 @@ impl Msg for SmallMessage {
fn last_possible_id() -> Self::Id {
MessageId(Snowflake::MAX)
}
+
+ fn nick_emoji(&self) -> Option {
+ Some(util::user_id_emoji(&self.user_id))
+ }
}
impl ChatMsg for SmallMessage {
- fn time(&self) -> OffsetDateTime {
- self.time.0
+ fn time(&self) -> Option {
+ Some(self.time.as_timestamp())
}
fn styled(&self) -> (Styled, Styled) {
diff --git a/cove/src/euph/util.rs b/cove/src/euph/util.rs
index fdf11a3..ea1782a 100644
--- a/cove/src/euph/util.rs
+++ b/cove/src/euph/util.rs
@@ -1,9 +1,27 @@
+use std::{
+ collections::HashSet,
+ hash::{DefaultHasher, Hash, Hasher},
+ sync::LazyLock,
+};
+
use crossterm::style::{Color, Stylize};
-use euphoxide::Emoji;
-use once_cell::sync::Lazy;
+use euphoxide::{Emoji, api::UserId};
use toss::{Style, Styled};
-pub static EMOJI: Lazy = Lazy::new(Emoji::load);
+pub static EMOJI: LazyLock = LazyLock::new(Emoji::load);
+
+pub static EMOJI_LIST: LazyLock> = LazyLock::new(|| {
+ let mut list = EMOJI
+ .0
+ .values()
+ .flatten()
+ .cloned()
+ .collect::>()
+ .into_iter()
+ .collect::>();
+ list.sort_unstable();
+ list
+});
/// Convert HSL to RGB following [this approach from wikipedia][1].
///
@@ -54,3 +72,25 @@ pub fn style_nick(nick: &str, base: Style) -> Styled {
pub fn style_nick_exact(nick: &str, base: Style) -> Styled {
Styled::new(nick, nick_style(nick, base))
}
+
+pub fn style_mention(mention: &str, base: Style) -> Styled {
+ let nick = mention
+ .strip_prefix('@')
+ .expect("mention must start with @");
+ Styled::new(EMOJI.replace(mention), nick_style(nick, base))
+}
+
+pub fn style_mention_exact(mention: &str, base: Style) -> Styled {
+ let nick = mention
+ .strip_prefix('@')
+ .expect("mention must start with @");
+ Styled::new(mention, nick_style(nick, base))
+}
+
+pub fn user_id_emoji(user_id: &UserId) -> String {
+ let mut hasher = DefaultHasher::new();
+ user_id.0.hash(&mut hasher);
+ let hash = hasher.finish();
+ let emoji = &EMOJI_LIST[hash as usize % EMOJI_LIST.len()];
+ emoji.clone()
+}
diff --git a/cove/src/export.rs b/cove/src/export.rs
index 545f48b..80db7b6 100644
--- a/cove/src/export.rs
+++ b/cove/src/export.rs
@@ -1,21 +1,24 @@
//! Export logs from the vault to plain text files.
+use std::{
+ fs::File,
+ io::{self, BufWriter, Write},
+};
+
+use crate::vault::{EuphRoomVault, EuphVault, RoomIdentifier};
+
mod json;
mod text;
-use std::fs::File;
-use std::io::{self, BufWriter, Write};
-
-use crate::vault::{EuphRoomVault, EuphVault};
-
#[derive(Debug, Clone, Copy, clap::ValueEnum)]
pub enum Format {
/// Human-readable tree-structured messages.
Text,
/// Array of message objects in the same format as the euphoria API uses.
Json,
- /// Message objects in the same format as the euphoria API uses, one per line.
- JsonStream,
+ /// Message objects in the same format as the euphoria API uses, one per
+ /// line (https://jsonlines.org/).
+ JsonLines,
}
impl Format {
@@ -23,14 +26,15 @@ impl Format {
match self {
Self::Text => "text",
Self::Json => "json",
- Self::JsonStream => "json stream",
+ Self::JsonLines => "json lines",
}
}
fn extension(&self) -> &'static str {
match self {
Self::Text => "txt",
- Self::Json | Self::JsonStream => "json",
+ Self::Json => "json",
+ Self::JsonLines => "jsonl",
}
}
}
@@ -43,6 +47,10 @@ pub struct Args {
#[arg(long, short)]
all: bool,
+ /// Domain to resolve the room names with.
+ #[arg(long, short, default_value = "euphoria.leet.nu")]
+ domain: String,
+
/// Format of the output file.
#[arg(long, short, value_enum, default_value_t = Format::Text)]
format: Format,
@@ -74,7 +82,7 @@ async fn export_room(
match format {
Format::Text => text::export(vault, out).await?,
Format::Json => json::export(vault, out).await?,
- Format::JsonStream => json::export_stream(vault, out).await?,
+ Format::JsonLines => json::export_lines(vault, out).await?,
}
Ok(())
}
@@ -85,7 +93,12 @@ pub async fn export(vault: &EuphVault, mut args: Args) -> anyhow::Result<()> {
}
let rooms = if args.all {
- let mut rooms = vault.rooms().await?;
+ let mut rooms = vault
+ .rooms()
+ .await?
+ .into_iter()
+ .map(|id| id.name)
+ .collect::>();
rooms.sort_unstable();
rooms
} else {
@@ -101,14 +114,14 @@ pub async fn export(vault: &EuphVault, mut args: Args) -> anyhow::Result<()> {
for room in rooms {
if args.out == "-" {
eprintln!("Exporting &{room} as {} to stdout", args.format.name());
- let vault = vault.room(room);
+ let vault = vault.room(RoomIdentifier::new(args.domain.clone(), room));
let mut stdout = BufWriter::new(io::stdout());
export_room(&vault, &mut stdout, args.format).await?;
stdout.flush()?;
} else {
let out = format_out(&args.out, &room, args.format);
eprintln!("Exporting &{room} as {} to {out}", args.format.name());
- let vault = vault.room(room);
+ let vault = vault.room(RoomIdentifier::new(args.domain.clone(), room));
let mut file = BufWriter::new(File::create(out)?);
export_room(&vault, &mut file, args.format).await?;
file.flush()?;
diff --git a/cove/src/export/json.rs b/cove/src/export/json.rs
index e72a0b8..9c16e46 100644
--- a/cove/src/export/json.rs
+++ b/cove/src/export/json.rs
@@ -37,7 +37,7 @@ pub async fn export(vault: &EuphRoomVault, file: &mut W) -> anyhow::Re
Ok(())
}
-pub async fn export_stream(vault: &EuphRoomVault, file: &mut W) -> anyhow::Result<()> {
+pub async fn export_lines(vault: &EuphRoomVault, file: &mut W) -> anyhow::Result<()> {
let mut total = 0;
let mut last_msg_id = None;
loop {
diff --git a/cove/src/export/text.rs b/cove/src/export/text.rs
index bb3cfa1..2ca6687 100644
--- a/cove/src/export/text.rs
+++ b/cove/src/export/text.rs
@@ -1,16 +1,11 @@
use std::io::Write;
use euphoxide::api::MessageId;
-use time::format_description::FormatItem;
-use time::macros::format_description;
use unicode_width::UnicodeWidthStr;
-use crate::euph::SmallMessage;
-use crate::store::Tree;
-use crate::vault::EuphRoomVault;
+use crate::{euph::SmallMessage, store::Tree, vault::EuphRoomVault};
-const TIME_FORMAT: &[FormatItem<'_>] =
- format_description!("[year]-[month]-[day] [hour]:[minute]:[second]");
+const TIME_FORMAT: &str = "%Y-%m-%d %H:%M:%S";
const TIME_EMPTY: &str = " ";
pub async fn export(vault: &EuphRoomVault, out: &mut W) -> anyhow::Result<()> {
@@ -67,11 +62,7 @@ fn write_msg(
for (i, line) in msg.content.lines().enumerate() {
if i == 0 {
- let time = msg
- .time
- .0
- .format(TIME_FORMAT)
- .expect("time can be formatted");
+ let time = msg.time.as_timestamp().strftime(TIME_FORMAT);
writeln!(file, "{time} {indent_string}[{nick}] {line}")?;
} else {
writeln!(file, "{TIME_EMPTY} {indent_string}| {nick_empty} {line}")?;
diff --git a/cove/src/logger.rs b/cove/src/logger.rs
index 731a000..940e1a9 100644
--- a/cove/src/logger.rs
+++ b/cove/src/logger.rs
@@ -1,22 +1,22 @@
-use std::convert::Infallible;
-use std::sync::Arc;
-use std::vec;
+use std::{convert::Infallible, sync::Arc, vec};
use async_trait::async_trait;
use crossterm::style::Stylize;
+use jiff::Timestamp;
use log::{Level, LevelFilter, Log};
use parking_lot::Mutex;
-use time::OffsetDateTime;
use tokio::sync::mpsc;
use toss::{Style, Styled};
-use crate::store::{Msg, MsgStore, Path, Tree};
-use crate::ui::ChatMsg;
+use crate::{
+ store::{Msg, MsgStore, Path, Tree},
+ ui::ChatMsg,
+};
#[derive(Debug, Clone)]
pub struct LogMsg {
id: usize,
- time: OffsetDateTime,
+ time: Timestamp,
level: Level,
content: String,
}
@@ -42,8 +42,8 @@ impl Msg for LogMsg {
}
impl ChatMsg for LogMsg {
- fn time(&self) -> OffsetDateTime {
- self.time
+ fn time(&self) -> Option {
+ Some(self.time)
}
fn styled(&self) -> (Styled, Styled) {
@@ -209,7 +209,7 @@ impl Log for Logger {
let mut guard = self.messages.lock();
let msg = LogMsg {
id: guard.len(),
- time: OffsetDateTime::now_utc(),
+ time: Timestamp::now(),
level: record.level(),
content: format!("<{}> {}", record.target(), record.args()),
};
diff --git a/cove/src/macros.rs b/cove/src/macros.rs
index a20cec9..bb5834c 100644
--- a/cove/src/macros.rs
+++ b/cove/src/macros.rs
@@ -1,4 +1,3 @@
-// TODO Get rid of this macro as much as possible
macro_rules! logging_unwrap {
($e:expr) => {
match $e {
diff --git a/cove/src/main.rs b/cove/src/main.rs
index e9dc920..51bc502 100644
--- a/cove/src/main.rs
+++ b/cove/src/main.rs
@@ -1,19 +1,23 @@
-#![forbid(unsafe_code)]
-// Rustc lint groups
-#![warn(future_incompatible)]
-#![warn(rust_2018_idioms)]
-#![warn(unused)]
-// Rustc lints
-#![warn(noop_method_call)]
-#![warn(single_use_lifetimes)]
-// Clippy lints
-#![warn(clippy::use_self)]
-
-// TODO Enable warn(unreachable_pub)?
// TODO Remove unnecessary Debug impls and compare compile times
-// TODO Time zones other than UTC
// TODO Invoke external notification command?
+use std::path::PathBuf;
+
+use anyhow::Context;
+use clap::Parser;
+use cove_config::{Config, doc::Document};
+use directories::{BaseDirs, ProjectDirs};
+use log::info;
+use tokio::sync::mpsc;
+use toss::Terminal;
+
+use crate::{
+ logger::Logger,
+ ui::Ui,
+ vault::Vault,
+ version::{NAME, VERSION},
+};
+
mod euph;
mod export;
mod logger;
@@ -22,21 +26,7 @@ mod store;
mod ui;
mod util;
mod vault;
-
-use std::path::PathBuf;
-
-use clap::Parser;
-use cookie::CookieJar;
-use cove_config::doc::Document;
-use cove_config::Config;
-use directories::{BaseDirs, ProjectDirs};
-use log::info;
-use tokio::sync::mpsc;
-use toss::Terminal;
-
-use crate::logger::Logger;
-use crate::ui::Ui;
-use crate::vault::Vault;
+mod version;
#[derive(Debug, clap::Parser)]
enum Command {
@@ -47,11 +37,21 @@ enum Command {
/// Compact and clean up vault.
Gc,
/// Clear euphoria session cookies.
- ClearCookies,
+ ClearCookies {
+ /// Clear cookies for a specific domain only.
+ #[arg(long, short)]
+ domain: Option,
+ },
/// Print config documentation as markdown.
HelpConfig,
}
+#[derive(Debug, Clone, Copy, clap::ValueEnum)]
+enum WidthEstimationMethod {
+ Legacy,
+ Unicode,
+}
+
impl Default for Command {
fn default() -> Self {
Self::Run
@@ -85,6 +85,11 @@ struct Args {
#[arg(long, short)]
offline: bool,
+ /// Method for estimating the width of characters as displayed by the
+ /// terminal emulator.
+ #[arg(long, short)]
+ width_estimation_method: Option,
+
/// Measure the width of characters as displayed by the terminal emulator
/// instead of guessing the width.
#[arg(long, short)]
@@ -120,18 +125,26 @@ fn update_config_with_args(config: &mut Config, args: &Args) {
}
config.ephemeral |= args.ephemeral;
+ if let Some(method) = args.width_estimation_method {
+ config.width_estimation_method = match method {
+ WidthEstimationMethod::Legacy => cove_config::WidthEstimationMethod::Legacy,
+ WidthEstimationMethod::Unicode => cove_config::WidthEstimationMethod::Unicode,
+ }
+ }
config.measure_widths |= args.measure_widths;
config.offline |= args.offline;
}
-fn open_vault(config: &Config, dirs: &ProjectDirs) -> rusqlite::Result {
- if config.ephemeral {
- vault::launch_in_memory()
+fn open_vault(config: &Config, dirs: &ProjectDirs) -> anyhow::Result {
+ let vault = if config.ephemeral {
+ vault::launch_in_memory()?
} else {
let data_dir = data_dir(config, dirs);
eprintln!("Data dir: {}", data_dir.to_string_lossy());
- vault::launch(&data_dir.join("vault.db"))
- }
+ vault::launch(&data_dir.join("vault.db"))?
+ };
+
+ Ok(vault)
}
#[tokio::main]
@@ -141,6 +154,11 @@ async fn main() -> anyhow::Result<()> {
let (logger, logger_guard, logger_rx) = Logger::init(args.verbose);
let dirs = ProjectDirs::from("de", "plugh", "cove").expect("failed to find config directory");
+ // https://github.com/snapview/tokio-tungstenite/issues/353#issuecomment-2455247837
+ rustls::crypto::aws_lc_rs::default_provider()
+ .install_default()
+ .unwrap();
+
// Locate config
let config_path = config_path(&args, &dirs);
eprintln!("Config file: {}", config_path.to_string_lossy());
@@ -154,7 +172,7 @@ async fn main() -> anyhow::Result<()> {
Command::Run => run(logger, logger_rx, config, &dirs).await?,
Command::Export(args) => export(config, &dirs, args).await?,
Command::Gc => gc(config, &dirs).await?,
- Command::ClearCookies => clear_cookies(config, &dirs).await?,
+ Command::ClearCookies { domain } => clear_cookies(config, &dirs, domain).await?,
Command::HelpConfig => help_config(),
}
@@ -173,17 +191,19 @@ async fn run(
config: &'static Config,
dirs: &ProjectDirs,
) -> anyhow::Result<()> {
- info!(
- "Welcome to {} {}",
- env!("CARGO_PKG_NAME"),
- env!("CARGO_PKG_VERSION")
- );
+ info!("Welcome to {NAME} {VERSION}",);
+
+ let tz = util::load_time_zone(config.time_zone_ref()).context("failed to load time zone")?;
let vault = open_vault(config, dirs)?;
let mut terminal = Terminal::new()?;
terminal.set_measuring(config.measure_widths);
- Ui::run(config, &mut terminal, vault.clone(), logger, logger_rx).await?;
+ terminal.set_width_estimation_method(match config.width_estimation_method {
+ cove_config::WidthEstimationMethod::Legacy => toss::WidthEstimationMethod::Legacy,
+ cove_config::WidthEstimationMethod::Unicode => toss::WidthEstimationMethod::Unicode,
+ });
+ Ui::run(config, tz, &mut terminal, vault.clone(), logger, logger_rx).await?;
drop(terminal);
vault.close().await;
@@ -214,11 +234,15 @@ async fn gc(config: &'static Config, dirs: &ProjectDirs) -> anyhow::Result<()> {
Ok(())
}
-async fn clear_cookies(config: &'static Config, dirs: &ProjectDirs) -> anyhow::Result<()> {
+async fn clear_cookies(
+ config: &'static Config,
+ dirs: &ProjectDirs,
+ domain: Option,
+) -> anyhow::Result<()> {
let vault = open_vault(config, dirs)?;
eprintln!("Clearing cookies");
- vault.euph().set_cookies(CookieJar::new()).await?;
+ vault.euph().clear_cookies(domain).await?;
vault.close().await;
Ok(())
diff --git a/cove/src/store.rs b/cove/src/store.rs
index 35e02a6..b7031c1 100644
--- a/cove/src/store.rs
+++ b/cove/src/store.rs
@@ -1,7 +1,4 @@
-use std::collections::HashMap;
-use std::fmt::Debug;
-use std::hash::Hash;
-use std::vec;
+use std::{collections::HashMap, fmt::Debug, hash::Hash, vec};
use async_trait::async_trait;
@@ -11,6 +8,10 @@ pub trait Msg {
fn parent(&self) -> Option;
fn seen(&self) -> bool;
+ fn nick_emoji(&self) -> Option {
+ None
+ }
+
fn last_possible_id() -> Self::Id;
}
@@ -27,10 +28,6 @@ impl Path {
self.0.iter().take(self.0.len() - 1)
}
- pub fn push(&mut self, segment: I) {
- self.0.push(segment)
- }
-
pub fn first(&self) -> &I {
self.0.first().expect("path is empty")
}
@@ -134,6 +131,7 @@ impl Tree {
}
}
+#[allow(dead_code)]
#[async_trait]
pub trait MsgStore {
type Error;
diff --git a/cove/src/ui.rs b/cove/src/ui.rs
index 0dd5f93..5ebd540 100644
--- a/cove/src/ui.rs
+++ b/cove/src/ui.rs
@@ -1,3 +1,30 @@
+use std::{
+ convert::Infallible,
+ io,
+ sync::{Arc, Weak},
+ time::{Duration, Instant},
+};
+
+use cove_config::Config;
+use cove_input::InputEvent;
+use jiff::tz::TimeZone;
+use parking_lot::FairMutex;
+use tokio::{
+ sync::mpsc::{self, UnboundedReceiver, UnboundedSender, error::TryRecvError},
+ task,
+};
+use toss::{Terminal, WidgetExt, widgets::BoxedAsync};
+
+use crate::{
+ logger::{LogMsg, Logger},
+ macros::logging_unwrap,
+ util::InfallibleExt,
+ vault::Vault,
+};
+
+pub use self::chat::ChatMsg;
+use self::{chat::ChatState, rooms::Rooms, widgets::ListState};
+
mod chat;
mod euph;
mod key_bindings;
@@ -5,30 +32,6 @@ mod rooms;
mod util;
mod widgets;
-use std::convert::Infallible;
-use std::io;
-use std::sync::{Arc, Weak};
-use std::time::{Duration, Instant};
-
-use cove_config::Config;
-use cove_input::InputEvent;
-use parking_lot::FairMutex;
-use tokio::sync::mpsc::error::TryRecvError;
-use tokio::sync::mpsc::{self, UnboundedReceiver, UnboundedSender};
-use tokio::task;
-use toss::widgets::BoxedAsync;
-use toss::{Terminal, WidgetExt};
-
-use crate::logger::{LogMsg, Logger};
-use crate::macros::logging_unwrap;
-use crate::util::InfallibleExt;
-use crate::vault::Vault;
-
-pub use self::chat::ChatMsg;
-use self::chat::ChatState;
-use self::rooms::Rooms;
-use self::widgets::ListState;
-
/// Time to spend batch processing events before redrawing the screen.
const EVENT_PROCESSING_TIME: Duration = Duration::from_millis(1000 / 15); // 15 fps
@@ -47,6 +50,7 @@ impl From for UiError {
}
}
+#[expect(clippy::large_enum_variant)]
pub enum UiEvent {
GraphemeWidthsChanged,
LogChanged,
@@ -84,6 +88,7 @@ impl Ui {
pub async fn run(
config: &'static Config,
+ tz: TimeZone,
terminal: &mut Terminal,
vault: Vault,
logger: Logger,
@@ -112,8 +117,8 @@ impl Ui {
config,
event_tx: event_tx.clone(),
mode: Mode::Main,
- rooms: Rooms::new(config, vault, event_tx.clone()).await,
- log_chat: ChatState::new(logger),
+ rooms: Rooms::new(config, tz.clone(), vault, event_tx.clone()).await,
+ log_chat: ChatState::new(logger, tz),
key_bindings_visible: false,
key_bindings_list: ListState::new(),
};
@@ -128,9 +133,11 @@ impl Ui {
fn poll_crossterm_events(
tx: UnboundedSender,
lock: Weak>,
- ) -> crossterm::Result<()> {
+ ) -> io::Result<()> {
loop {
- let Some(lock) = lock.upgrade() else { return Ok(()); };
+ let Some(lock) = lock.upgrade() else {
+ return Ok(());
+ };
let _guard = lock.lock();
if crossterm::event::poll(Self::POLL_DURATION)? {
let event = crossterm::event::read()?;
@@ -179,9 +186,8 @@ impl Ui {
}
// Handle events (in batches)
- let mut event = match event_rx.recv().await {
- Some(event) => event,
- None => return Ok(()),
+ let Some(mut event) = event_rx.recv().await else {
+ return Ok(());
};
let end_time = Instant::now() + EVENT_PROCESSING_TIME;
loop {
diff --git a/cove/src/ui/chat.rs b/cove/src/ui/chat.rs
index 24ea82e..1116935 100644
--- a/cove/src/ui/chat.rs
+++ b/cove/src/ui/chat.rs
@@ -1,24 +1,28 @@
+use cove_config::Keys;
+use cove_input::InputEvent;
+use jiff::{Timestamp, tz::TimeZone};
+use toss::{
+ Styled, WidgetExt,
+ widgets::{BoxedAsync, EditorState},
+};
+
+use crate::{
+ store::{Msg, MsgStore},
+ util,
+};
+
+use super::UiError;
+
+use self::{cursor::Cursor, tree::TreeViewState};
+
mod blocks;
mod cursor;
mod renderer;
mod tree;
mod widgets;
-use cove_config::Keys;
-use cove_input::InputEvent;
-use time::OffsetDateTime;
-use toss::widgets::{BoxedAsync, EditorState};
-use toss::{Styled, WidgetExt};
-
-use crate::store::{Msg, MsgStore};
-
-use self::cursor::Cursor;
-use self::tree::TreeViewState;
-
-use super::UiError;
-
pub trait ChatMsg {
- fn time(&self) -> OffsetDateTime;
+ fn time(&self) -> Option;
fn styled(&self) -> (Styled, Styled);
fn edit(nick: &str, content: &str) -> (Styled, Styled);
fn pseudo(nick: &str, content: &str) -> (Styled, Styled);
@@ -33,23 +37,31 @@ pub struct ChatState> {
cursor: Cursor,
editor: EditorState,
+ nick_emoji: bool,
+ caesar: i8,
mode: Mode,
tree: TreeViewState,
}
impl + Clone> ChatState {
- pub fn new(store: S) -> Self {
+ pub fn new(store: S, tz: TimeZone) -> Self {
Self {
cursor: Cursor::Bottom,
editor: EditorState::new(),
+ nick_emoji: false,
+ caesar: 0,
mode: Mode::Tree,
- tree: TreeViewState::new(store.clone()),
+ tree: TreeViewState::new(store.clone(), tz),
store,
}
}
+
+ pub fn nick_emoji(&self) -> bool {
+ self.nick_emoji
+ }
}
impl> ChatState {
@@ -68,7 +80,14 @@ impl> ChatState {
match self.mode {
Mode::Tree => self
.tree
- .widget(&mut self.cursor, &mut self.editor, nick, focused)
+ .widget(
+ &mut self.cursor,
+ &mut self.editor,
+ nick,
+ focused,
+ self.nick_emoji,
+ self.caesar,
+ )
.boxed_async(),
}
}
@@ -85,7 +104,7 @@ impl> ChatState {
S: Send + Sync,
S::Error: Send,
{
- match self.mode {
+ let reaction = match self.mode {
Mode::Tree => {
self.tree
.handle_input_event(
@@ -95,9 +114,33 @@ impl> ChatState {
&mut self.editor,
can_compose,
)
- .await
+ .await?
}
- }
+ };
+
+ Ok(match reaction {
+ Reaction::Composed { parent, content } if self.caesar != 0 => {
+ let content = util::caesar(&content, self.caesar);
+ Reaction::Composed { parent, content }
+ }
+
+ Reaction::NotHandled if event.matches(&keys.tree.action.toggle_nick_emoji) => {
+ self.nick_emoji = !self.nick_emoji;
+ Reaction::Handled
+ }
+
+ Reaction::NotHandled if event.matches(&keys.tree.action.increase_caesar) => {
+ self.caesar = (self.caesar + 1).rem_euclid(26);
+ Reaction::Handled
+ }
+
+ Reaction::NotHandled if event.matches(&keys.tree.action.decrease_caesar) => {
+ self.caesar = (self.caesar - 1).rem_euclid(26);
+ Reaction::Handled
+ }
+
+ reaction => reaction,
+ })
}
pub fn cursor(&self) -> Option<&M::Id> {
diff --git a/cove/src/ui/chat/blocks.rs b/cove/src/ui/chat/blocks.rs
index 2a9eb0a..8360e83 100644
--- a/cove/src/ui/chat/blocks.rs
+++ b/cove/src/ui/chat/blocks.rs
@@ -1,6 +1,6 @@
//! Common rendering logic.
-use std::collections::{vec_deque, VecDeque};
+use std::collections::{VecDeque, vec_deque};
use toss::widgets::Predrawn;
@@ -161,14 +161,6 @@ impl Blocks {
pub fn shift(&mut self, delta: i32) {
self.range = self.range.shifted(delta);
}
-
- pub fn set_top(&mut self, top: i32) {
- self.shift(top - self.range.top);
- }
-
- pub fn set_bottom(&mut self, bottom: i32) {
- self.shift(bottom - self.range.bottom);
- }
}
pub struct Iter<'a, Id> {
diff --git a/cove/src/ui/chat/cursor.rs b/cove/src/ui/chat/cursor.rs
index 561f4ed..87bd8fc 100644
--- a/cove/src/ui/chat/cursor.rs
+++ b/cove/src/ui/chat/cursor.rs
@@ -1,7 +1,6 @@
//! Common cursor movement logic.
-use std::collections::HashSet;
-use std::hash::Hash;
+use std::{collections::HashSet, hash::Hash};
use crate::store::{Msg, MsgStore, Tree};
diff --git a/cove/src/ui/chat/renderer.rs b/cove/src/ui/chat/renderer.rs
index 1edde46..a619e7c 100644
--- a/cove/src/ui/chat/renderer.rs
+++ b/cove/src/ui/chat/renderer.rs
@@ -14,7 +14,6 @@ pub trait Renderer {
fn blocks(&self) -> &Blocks;
fn blocks_mut(&mut self) -> &mut Blocks;
- fn into_blocks(self) -> Blocks;
async fn expand_top(&mut self) -> Result<(), Self::Error>;
async fn expand_bottom(&mut self) -> Result<(), Self::Error>;
@@ -275,27 +274,6 @@ where
}
}
-pub fn clamp_scroll_biased_upwards(r: &mut R)
-where
- R: Renderer,
-{
- let area = visible_area(r);
- let blocks = r.blocks().range();
-
- // Delta that moves blocks.top to the top of the screen. If this is
- // negative, we need to move the blocks because they're too low.
- let move_to_top = blocks.top - area.top;
-
- // Delta that moves blocks.bottom to the bottom of the screen. If this is
- // positive, we need to move the blocks because they're too high.
- let move_to_bottom = blocks.bottom - area.bottom;
-
- // If the screen is higher, the blocks should rather be moved to the top
- // than the bottom because of the upwards bias.
- let delta = 0.max(move_to_bottom).min(move_to_top);
- r.blocks_mut().shift(delta);
-}
-
pub fn clamp_scroll_biased_downwards(r: &mut R)
where
R: Renderer,
diff --git a/cove/src/ui/chat/tree.rs b/cove/src/ui/chat/tree.rs
index 772363f..d9905fc 100644
--- a/cove/src/ui/chat/tree.rs
+++ b/cove/src/ui/chat/tree.rs
@@ -2,29 +2,31 @@
// TODO Focusing on sub-trees
-mod renderer;
-mod scroll;
-mod widgets;
-
use std::collections::HashSet;
use async_trait::async_trait;
use cove_config::Keys;
use cove_input::InputEvent;
-use toss::widgets::EditorState;
-use toss::{AsyncWidget, Frame, Pos, Size, WidgetExt, WidthDb};
+use jiff::tz::TimeZone;
+use toss::{AsyncWidget, Frame, Pos, Size, WidgetExt, WidthDb, widgets::EditorState};
-use crate::store::{Msg, MsgStore};
-use crate::ui::{util, ChatMsg, UiError};
-use crate::util::InfallibleExt;
+use crate::{
+ store::{Msg, MsgStore},
+ ui::{UiError, util},
+ util::InfallibleExt,
+};
+
+use super::{ChatMsg, Reaction, cursor::Cursor};
use self::renderer::{TreeContext, TreeRenderer};
-use super::cursor::Cursor;
-use super::Reaction;
+mod renderer;
+mod scroll;
+mod widgets;
pub struct TreeViewState> {
store: S,
+ tz: TimeZone,
last_size: Size,
last_nick: String,
@@ -36,9 +38,10 @@ pub struct TreeViewState> {
}
impl> TreeViewState {
- pub fn new(store: S) -> Self {
+ pub fn new(store: S, tz: TimeZone) -> Self {
Self {
store,
+ tz,
last_size: Size::ZERO,
last_nick: String::new(),
last_cursor: Cursor::Bottom,
@@ -386,6 +389,8 @@ impl> TreeViewState {
editor: &'a mut EditorState,
nick: String,
focused: bool,
+ nick_emoji: bool,
+ caesar: i8,
) -> TreeView<'a, M, S> {
TreeView {
state: self,
@@ -393,6 +398,8 @@ impl> TreeViewState {
editor,
nick,
focused,
+ nick_emoji,
+ caesar,
}
}
}
@@ -405,6 +412,9 @@ pub struct TreeView<'a, M: Msg, S: MsgStore> {
nick: String,
focused: bool,
+
+ nick_emoji: bool,
+ caesar: i8,
}
#[async_trait]
@@ -432,6 +442,8 @@ where
size,
nick: self.nick.clone(),
focused: self.focused,
+ nick_emoji: self.nick_emoji,
+ caesar: self.caesar,
last_cursor: self.state.last_cursor.clone(),
last_cursor_top: self.state.last_cursor_top,
};
@@ -439,6 +451,7 @@ where
let mut renderer = TreeRenderer::new(
context,
&self.state.store,
+ &self.state.tz,
&mut self.state.folded,
self.cursor,
self.editor,
diff --git a/cove/src/ui/chat/tree/renderer.rs b/cove/src/ui/chat/tree/renderer.rs
index 6932123..225191b 100644
--- a/cove/src/ui/chat/tree/renderer.rs
+++ b/cove/src/ui/chat/tree/renderer.rs
@@ -1,18 +1,26 @@
//! A [`Renderer`] for message trees.
-use std::collections::HashSet;
-use std::convert::Infallible;
+use std::{collections::HashSet, convert::Infallible};
use async_trait::async_trait;
-use toss::widgets::{EditorState, Empty, Predrawn, Resize};
-use toss::{Size, Widget, WidthDb};
+use jiff::tz::TimeZone;
+use toss::{
+ Size, Widget, WidthDb,
+ widgets::{EditorState, Empty, Predrawn, Resize},
+};
-use crate::store::{Msg, MsgStore, Tree};
-use crate::ui::chat::blocks::{Block, Blocks, Range};
-use crate::ui::chat::cursor::Cursor;
-use crate::ui::chat::renderer::{self, overlaps, Renderer};
-use crate::ui::ChatMsg;
-use crate::util::InfallibleExt;
+use crate::{
+ store::{Msg, MsgStore, Tree},
+ ui::{
+ ChatMsg,
+ chat::{
+ blocks::{Block, Blocks, Range},
+ cursor::Cursor,
+ renderer::{self, Renderer, overlaps},
+ },
+ },
+ util::InfallibleExt,
+};
use super::widgets;
@@ -72,6 +80,8 @@ pub struct TreeContext {
pub size: Size,
pub nick: String,
pub focused: bool,
+ pub nick_emoji: bool,
+ pub caesar: i8,
pub last_cursor: Cursor,
pub last_cursor_top: i32,
}
@@ -80,6 +90,7 @@ pub struct TreeRenderer<'a, M: Msg, S: MsgStore> {
context: TreeContext,
store: &'a S,
+ tz: &'a TimeZone,
folded: &'a mut HashSet,
cursor: &'a mut Cursor,
editor: &'a mut EditorState,
@@ -107,6 +118,7 @@ where
pub fn new(
context: TreeContext,
store: &'a S,
+ tz: &'a TimeZone,
folded: &'a mut HashSet,
cursor: &'a mut Cursor,
editor: &'a mut EditorState,
@@ -115,6 +127,7 @@ where
Self {
context,
store,
+ tz,
folded,
cursor,
editor,
@@ -148,8 +161,12 @@ where
None => TreeBlockId::Bottom,
};
- // TODO Unhighlighted version when focusing on nick list
- let widget = widgets::editor::(indent, &self.context.nick, self.editor);
+ let widget = widgets::editor::(
+ indent,
+ &self.context.nick,
+ self.context.focused,
+ self.editor,
+ );
let widget = Self::predraw(widget, self.context.size, self.widthdb);
let mut block = Block::new(id, widget, false);
@@ -167,7 +184,6 @@ where
None => TreeBlockId::Bottom,
};
- // TODO Unhighlighted version when focusing on nick list
let widget = widgets::pseudo::(indent, &self.context.nick, self.editor);
let widget = Self::predraw(widget, self.context.size, self.widthdb);
Block::new(id, widget, false)
@@ -187,7 +203,15 @@ where
};
let highlighted = highlighted && self.context.focused;
- let widget = widgets::msg(highlighted, indent, msg, folded_info);
+ let widget = widgets::msg(
+ highlighted,
+ self.tz.clone(),
+ indent,
+ msg,
+ self.context.nick_emoji,
+ self.context.caesar,
+ folded_info,
+ );
let widget = Self::predraw(widget, self.context.size, self.widthdb);
Block::new(TreeBlockId::Msg(msg_id), widget, true)
}
@@ -274,7 +298,9 @@ where
}
async fn root_id(&self, id: &TreeBlockId) -> Result