93 Commits

Author SHA1 Message Date
8b6ffb1fe4 fix(deps): update all dependencies
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2025-07-20 03:29:55 +00:00
10f832c1d1 fix(deps): update rust crate serde to v1.0.219
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-06-03 03:27:44 +00:00
c57b1bc434 chore(deps): update rust crate axum to v0.8.4
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-06-03 00:28:23 +00:00
6b2cc8925a chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-03-04 01:47:13 +00:00
e9b810837e fix(deps): update rust crate uuid to v1.15.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-27 01:45:00 +00:00
12fd200185 chore(deps): update all dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-25 01:42:42 +00:00
bb4e6ba6ab fix(deps): update rust crate uuid to v1.14.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-02-21 01:44:48 +00:00
66099d5bb7 fix(deps): update rust crate serde to v1.0.218
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-20 06:54:17 +01:00
817d1db963 chore(deps): update all dependencies
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-02-20 05:43:17 +00:00
4e5ed0c27f chore(deps): update all dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-18 01:43:20 +00:00
245aa67f09 chore(deps): update rust crate tempfile to v3.17.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-17 01:38:27 +00:00
43593c5852 fix(deps): update rust crate prost to v0.13.5
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-13 01:39:33 +00:00
657b11c3f7 chore(deps): update rust crate clap to v4.5.29
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-12 01:45:19 +00:00
8ce42aac25 chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-06 01:42:13 +00:00
ada480ea02 chore(deps): update rust crate clap to v4.5.28
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-04 01:43:06 +00:00
8a995b191c fix(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-29 01:45:42 +00:00
4897e56d7d chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-22 01:40:28 +00:00
c69ebb0fe4 fix(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-20 01:39:19 +00:00
0b71fd889e fix(deps): update rust crate serde_json to v1.0.136
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-19 01:40:37 +00:00
68f6ce63e5 fix(deps): update rust crate uuid to v1.12.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-15 01:45:30 +00:00
e7e169352d fix(deps): update all dependencies to v6
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-13 01:38:50 +00:00
fc392ac43b fix(deps): update rust crate uuid to v1.11.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-10 05:34:27 +00:00
25f854f2fe chore(deps): update rust crate clap to v4.5.26
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-10 01:35:24 +00:00
eaaa63e0b6 chore(deps): update rust crate tokio to v1.43.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-09 01:37:46 +00:00
000f96f965 chore(deps): update rust crate clap to v4.5.24
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-08 01:33:50 +00:00
8870b89378 fix(deps): update rust crate serde_json to v1.0.135
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-07 01:36:16 +00:00
2704b0b0c3 fix(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-04 05:32:25 +00:00
39b05501f1 chore(deps): update rust crate axum to 0.8
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-02 01:33:14 +00:00
2d4ae16de8 chore(deps): update rust crate itertools to 0.14.0
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-01-01 01:34:55 +00:00
f036db202d fix(deps): update rust crate serde to v1.0.217
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-12-28 01:38:06 +00:00
384ee78652 chore(deps): update rust crate anyhow to v1.0.95
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-12-23 01:39:54 +00:00
f5ca5970c1 fix(deps): update rust crate serde_json to v1.0.134
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-12-22 01:33:09 +00:00
6a179f0881 chore(release): v0.5.0 (#62)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
chore(release): 0.5.0

Co-authored-by: cuddle-please <bot@cuddle.sh>
Reviewed-on: #62
2024-12-15 11:44:44 +01:00
09546907e5 feat: allow taking a local path
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-12-15 11:41:41 +01:00
83f9816cce fix(deps): update rust crate serde to v1.0.216
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-12-11 05:33:05 +00:00
c261d6cb65 fix(deps): update rust crate prost to v0.13.4
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-12-07 01:39:32 +00:00
fb01406738 chore(deps): update rust crate clap to v4.5.23
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-12-06 01:43:44 +00:00
352fd86145 chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-12-04 01:45:10 +00:00
bea5258e8f chore(deps): update rust crate tracing-subscriber to v0.3.19
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-30 02:15:38 +00:00
a0a256ac7f chore(deps): update rust crate tracing to v0.1.41
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-28 01:40:06 +00:00
9cd12f8636 chore(release): v0.4.0 (#15)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
chore(release): 0.4.0

Co-authored-by: cuddle-please <bot@cuddle.sh>
Reviewed-on: #15
2024-11-23 14:30:38 +01:00
34fba9754c feat: update hyperlog
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-11-23 14:26:11 +01:00
ee0680194b fix(deps): update rust crate tower-http to v0.6.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-19 01:28:57 +00:00
38f8db78cd chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-17 05:32:40 +00:00
02b8b8cd59 chore(deps): update rust crate axum to v0.7.8
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-16 01:38:26 +00:00
09fb11f9d9 chore(deps): update rust crate clap to v4.5.21
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-14 01:33:16 +00:00
102b35e083 fix(deps): update rust crate serde to v1.0.215
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-12 01:30:48 +00:00
986d261bd7 chore(deps): update rust crate tempfile to v3.14.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-08 05:30:54 +00:00
0f70cf9f7b chore(deps): update rust crate tokio to v1.41.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-08 01:32:34 +00:00
eb30858d9d chore(deps): update rust crate anyhow to v1.0.93
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-07 01:32:05 +00:00
22900ba92a chore(deps): update rust crate anyhow to v1.0.92
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-11-02 01:36:39 +00:00
44ef8a708c fix(deps): update rust crate serde to v1.0.214
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-29 01:39:13 +00:00
acc7e0cd6d fix(deps): update rust crate serde to v1.0.213
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-23 02:58:53 +02:00
e8d222f4ba chore(deps): update all dependencies to v1.0.91
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
2024-10-23 00:40:51 +00:00
3c5fb25fa3 fix(deps): update rust crate ratatui to 0.29.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-22 00:32:43 +00:00
b3b170c057 fix(deps): update rust crate serde_json to v1.0.132
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-20 00:38:17 +00:00
e64fc61926 feat: add hyperlog
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-10-19 11:49:32 +02:00
4eb1a8224a chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-19 00:36:20 +00:00
6dfe2bf0d6 fix(deps): update rust crate serde_json to v1.0.129
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-18 00:36:43 +00:00
0e38e23942 fix(deps): update rust crate uuid to v1.11.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-17 00:37:43 +00:00
c35aad3cf8 fix(deps): update rust crate human-panic to v2.0.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-11 00:33:58 +00:00
10c2282c78 chore(deps): update rust crate clap to v4.5.20
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-09 00:35:54 +00:00
35c4fae36a chore(deps): update rust crate futures to v0.3.31
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-06 00:32:26 +00:00
b11d72ca05 chore(deps): update rust crate clap to v4.5.19
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-10-02 00:35:30 +00:00
a97ef32ffb chore(deps): update rust crate tempfile to v3.13.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-29 00:33:52 +00:00
2873ff3d7e chore(deps): update rust crate axum to v0.7.7
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-28 00:38:27 +00:00
4096790f2a chore(deps): update tonic monorepo to v0.12.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-27 00:31:35 +00:00
0ce0e691ee fix(deps): update rust crate tower-http to v0.6.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-24 00:36:53 +00:00
40dfbcd031 fix(deps): update rust crate prost to v0.13.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-22 00:40:54 +00:00
4ff3261dbc chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-21 00:58:02 +00:00
53c2cdf018 fix(deps): update rust crate tower-http to 0.6.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-20 00:42:29 +00:00
c96eebf6f9 chore(deps): update rust crate anyhow to v1.0.89
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-15 04:31:24 +00:00
9d9d6be3b7 chore(deps): update rust crate anyhow to v1.0.88
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-12 00:33:33 +00:00
f106929cca chore(deps): update rust crate anyhow to v1.0.87
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-07 04:29:21 +00:00
d876891242 fix(deps): update rust crate serde to v1.0.210
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-07 00:31:58 +00:00
6961987a77 chore(deps): update rust crate similar-asserts to v1.6.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-06 00:30:16 +00:00
d3695eba50 chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-05 00:32:33 +00:00
f175c4ebcf fix(deps): update rust crate sqlx to v0.8.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-09-04 00:27:32 +00:00
58df153c6e fix(deps): update rust crate prost to v0.13.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-31 00:28:05 +00:00
2b7a05bc4e chore(deps): update rust crate tokio to v1.40.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-30 08:27:22 +00:00
fcb0ea7393 chore(deps): update tonic monorepo to v0.12.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-26 20:42:40 +00:00
3a1741d7dc fix(deps): update rust crate ratatui to v0.28.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-25 09:51:50 +00:00
8886af4a8f fix(deps): update rust crate sqlx to v0.8.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-24 08:07:53 +00:00
08a6f77146 fix(deps): update rust crate serde to v1.0.209
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-24 03:54:43 +00:00
c15c7f0ae2 fix(deps): update rust crate serde_json to v1.0.127
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-23 21:19:27 +00:00
04c6e97f30 fix(deps): update rust crate serde_json to v1.0.126
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-23 20:40:42 +00:00
29e0c37599 fix(deps): update rust crate prost to 0.13.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-21 23:30:14 +00:00
e655c57f21 chore(deps): update tonic monorepo to 0.12.0
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2024-08-21 22:31:50 +00:00
28fb99e6f9 fix(deps): update rust crate serde to v1.0.208
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-21 23:22:49 +02:00
3a231cea96 chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-08-21 21:02:46 +00:00
b3c1784cae Merge pull request 'chore(release): v0.3.0' (#12) from cuddle-please/release into main
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Reviewed-on: #12
2024-07-05 23:10:26 +02:00
cuddle-please
a790e7f039 chore(release): 0.3.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-06-30 15:34:55 +00:00
20190ac784 feat: add markdown editing mode
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-06-30 17:31:25 +02:00
21 changed files with 1114 additions and 585 deletions

View File

@@ -6,6 +6,83 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.5.0] - 2024-12-15
### Added
- allow taking a local path
### Fixed
- *(deps)* update rust crate serde to v1.0.216
- *(deps)* update rust crate prost to v0.13.4
### Other
- *(deps)* update rust crate clap to v4.5.23
- *(deps)* update all dependencies
- *(deps)* update rust crate tracing-subscriber to v0.3.19
- *(deps)* update rust crate tracing to v0.1.41
## [0.4.0] - 2024-11-23
### Added
- update hyperlog
- add hyperlog
### Fixed
- *(deps)* update rust crate tower-http to v0.6.2
- *(deps)* update rust crate serde to v1.0.215
- *(deps)* update rust crate serde to v1.0.214
- *(deps)* update rust crate serde to v1.0.213
- *(deps)* update rust crate ratatui to 0.29.0
- *(deps)* update rust crate serde_json to v1.0.132
- *(deps)* update rust crate serde_json to v1.0.129
- *(deps)* update rust crate uuid to v1.11.0
- *(deps)* update rust crate human-panic to v2.0.2
- *(deps)* update rust crate tower-http to v0.6.1
- *(deps)* update rust crate prost to v0.13.3
- *(deps)* update rust crate tower-http to 0.6.0
- *(deps)* update rust crate serde to v1.0.210
- *(deps)* update rust crate sqlx to v0.8.2
- *(deps)* update rust crate prost to v0.13.2
- *(deps)* update rust crate ratatui to v0.28.1
- *(deps)* update rust crate sqlx to v0.8.1
- *(deps)* update rust crate serde to v1.0.209
- *(deps)* update rust crate serde_json to v1.0.127
- *(deps)* update rust crate serde_json to v1.0.126
- *(deps)* update rust crate prost to 0.13.0
- *(deps)* update rust crate serde to v1.0.208
### Other
- *(deps)* update all dependencies
- *(deps)* update rust crate axum to v0.7.8
- *(deps)* update rust crate clap to v4.5.21
- *(deps)* update rust crate tempfile to v3.14.0
- *(deps)* update rust crate tokio to v1.41.1
- *(deps)* update rust crate anyhow to v1.0.93
- *(deps)* update rust crate anyhow to v1.0.92
- *(deps)* update all dependencies to v1.0.91
- *(deps)* update all dependencies
- *(deps)* update rust crate clap to v4.5.20
- *(deps)* update rust crate futures to v0.3.31
- *(deps)* update rust crate clap to v4.5.19
- *(deps)* update rust crate tempfile to v3.13.0
- *(deps)* update rust crate axum to v0.7.7
- *(deps)* update tonic monorepo to v0.12.3
- *(deps)* update all dependencies
- *(deps)* update rust crate anyhow to v1.0.89
- *(deps)* update rust crate anyhow to v1.0.88
- *(deps)* update rust crate anyhow to v1.0.87
- *(deps)* update rust crate similar-asserts to v1.6.0
- *(deps)* update all dependencies
- *(deps)* update rust crate tokio to v1.40.0
- *(deps)* update tonic monorepo to v0.12.2
- *(deps)* update tonic monorepo to 0.12.0
- *(deps)* update all dependencies
## [0.3.0] - 2024-06-30
### Added
- add markdown editing mode
## [0.2.0] - 2024-05-25
### Added

1073
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,13 +14,16 @@ tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
clap = { version = "4", features = ["derive", "env"] }
dotenv = { version = "0.15" }
axum = { version = "0.7" }
axum = { version = "0.8" }
serde = { version = "1.0.202", features = ["derive"] }
serde_json = "1.0.117"
itertools = "0.13.0"
itertools = "0.14.0"
uuid = { version = "1.8.0", features = ["v4"] }
tonic = { version = "0.11.0", features = ["tls", "tls-roots"] }
tonic = { version = "0.12.0", features = ["tls", "tls-roots"] }
futures = { version = "0.3.30" }
sha2 = { version = "0.10.8" }
hex = { version = "0.4.3" }
toml = { version = "0.8.14" }
[workspace.package]
version = "0.2.0"
version = "0.5.0"

4
buf.yaml Normal file
View File

@@ -0,0 +1,4 @@
version: v2
modules:
- path: crates/hyperlog-protos/proto
name: buf.build/noschemaplz/hyperlog

View File

@@ -6,7 +6,7 @@ version.workspace = true
[dependencies]
tonic.workspace = true
prost = "0.12.6"
prost = "0.13.0"
[build-dependencies]
tonic-build = "0.11.0"
tonic-build = "0.12.0"

View File

@@ -16,8 +16,8 @@ serde_json.workspace = true
uuid.workspace = true
tonic.workspace = true
tower-http = { version = "0.5.2", features = ["cors", "trace"] }
sqlx = { version = "0.7.4", features = [
tower-http = { version = "0.6.0", features = ["cors", "trace"] }
sqlx = { version = "0.8.0", features = [
"runtime-tokio",
"tls-rustls",
"postgres",

View File

@@ -17,14 +17,18 @@ serde_json.workspace = true
itertools.workspace = true
tonic.workspace = true
futures.workspace = true
sha2.workspace = true
uuid.workspace = true
hex.workspace = true
toml.workspace = true
ratatui = "0.26.2"
crossterm = { version = "0.27.0", features = ["event-stream"] }
directories = "5.0.1"
ratatui = "0.29.0"
crossterm = { version = "0.29.0", features = ["event-stream"] }
directories = "6.0.0"
human-panic = "2.0.0"
ropey = "1.6.1"
bus = "2.4.1"
dirs = "5.0.1"
dirs = "6.0.0"
[dev-dependencies]
similar-asserts = "1.5.0"

View File

@@ -1,4 +1,5 @@
use hyperlog_core::log::GraphItem;
use itertools::Itertools;
use ratatui::{
prelude::*,
widgets::{Block, Borders, Padding, Paragraph},
@@ -6,8 +7,9 @@ use ratatui::{
use crate::{
command_parser::CommandParser,
commands::{batch::BatchCommand, IntoCommand},
commands::{batch::BatchCommand, update_item::UpdateItemCommandExt, Command, IntoCommand},
components::graph_explorer::GraphExplorer,
editor,
models::IOEvent,
state::SharedState,
Msg,
@@ -102,6 +104,11 @@ impl<'a> App<'a> {
Msg::MoveUp => self.graph_explorer.move_up()?,
Msg::OpenCreateItemDialog => self.open_dialog(),
Msg::OpenCreateItemDialogBelow => self.open_dialog_below(),
Msg::OpenEditor { item } => {
if let Some(cmd) = self.open_editor(item) {
batch.with(cmd);
}
}
Msg::OpenEditItemDialog { item } => self.open_edit_item_dialog(item),
Msg::EnterInsertMode => self.mode = Mode::Insert,
Msg::EnterViewMode => self.mode = Mode::View,
@@ -212,6 +219,43 @@ impl<'a> App<'a> {
self.mode = Mode::Insert;
}
}
fn open_editor(&self, item: &GraphItem) -> Option<Command> {
tracing::info!("entering editor for session");
match editor::EditorSession::new(item).execute() {
Ok(None) => {
tracing::info!("editor returned without changes, skipping");
}
Ok(Some(item)) => {
if let GraphItem::Item {
title,
description,
state,
} = item
{
return Some(
self.state.update_item_command().command(
&self.root,
&self
.graph_explorer
.get_current_path()
.iter()
.map(|s| s.as_str())
.collect_vec(),
&title,
&description,
state,
),
);
}
}
Err(e) => {
tracing::error!("failed to run editor with: {}", e);
}
}
None
}
}
impl<'a> Widget for &mut App<'a> {

View File

@@ -9,6 +9,7 @@ pub enum Commands {
CreateItem { name: String },
CreateBelow { name: String },
Edit,
Open,
ShowAll,
HideDone,
@@ -52,6 +53,7 @@ impl CommandParser {
"show-all" => Some(Commands::ShowAll),
"hide-done" => Some(Commands::HideDone),
"test" => Some(Commands::Test),
"o" | "open" => Some(Commands::Open),
_ => None,
},
None => None,

View File

@@ -5,6 +5,7 @@ pub mod batch;
pub mod archive;
pub mod create_item;
pub mod create_section;
pub mod open_item;
pub mod open_update_item_dialog;
pub mod toggle_item;
pub mod update_graph;

View File

@@ -1,4 +1,3 @@
use hyperlog_core::log::ItemState;
use itertools::Itertools;
use crate::{

View File

@@ -0,0 +1,59 @@
use crate::{
models::{IOEvent, Msg},
querier::Querier,
state::SharedState,
};
pub struct OpenItemCommand {
querier: Querier,
}
impl OpenItemCommand {
pub fn new(querier: Querier) -> Self {
Self { querier }
}
pub fn command(self, root: &str, path: Vec<String>) -> super::Command {
let root = root.to_string();
super::Command::new(|dispatch| {
tokio::spawn(async move {
dispatch.send(Msg::OpenItem(IOEvent::Initialized));
let item = match self.querier.get_async(&root, path).await {
Ok(item) => match item {
Some(item) => {
dispatch.send(Msg::OpenItem(IOEvent::Success(())));
item
}
None => {
dispatch.send(Msg::OpenItem(IOEvent::Failure(
"failed to find a valid item for path".into(),
)));
return;
}
},
Err(e) => {
dispatch.send(Msg::OpenItem(IOEvent::Failure(e.to_string())));
return;
}
};
dispatch.send(Msg::OpenEditor { item });
});
None
})
}
}
pub trait OpenItemCommandExt {
fn open_item_command(&self) -> OpenItemCommand;
}
impl OpenItemCommandExt for SharedState {
fn open_item_command(&self) -> OpenItemCommand {
OpenItemCommand::new(self.querier.clone())
}
}

View File

@@ -7,7 +7,7 @@ use crate::{
command_parser::Commands,
commands::{
archive::ArchiveCommandExt, batch::BatchCommand, create_item::CreateItemCommandExt,
create_section::CreateSectionCommandExt,
create_section::CreateSectionCommandExt, open_item::OpenItemCommandExt,
open_update_item_dialog::OpenUpdateItemDialogCommandExt, toggle_item::ToggleItemCommandExt,
update_graph::UpdateGraphCommandExt, Command, IntoCommand,
},
@@ -144,7 +144,7 @@ impl<'a> GraphExplorer<'a> {
/// Choses: 0.1.0.0 else nothing
pub(crate) fn move_right(&mut self) -> Result<()> {
if let Some(graph) = self.linearize_graph() {
tracing::debug!("graph: {:?}", graph);
tracing::trace!("graph: {:?}", graph);
let position_items = &self.inner.current_position;
if let Some(next_item) = graph.next_right(position_items) {
@@ -338,6 +338,15 @@ impl<'a> GraphExplorer<'a> {
None
})));
}
Commands::Open => {
if self.get_current_item().is_some() {
batch.with(
self.state
.open_item_command()
.command(&self.inner.root, self.get_current_path()),
);
}
}
_ => (),
}
@@ -383,7 +392,6 @@ impl<'a> StatefulWidget for GraphExplorer<'a> {
fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) {
let Rect { height, .. } = area;
let _height = height as usize;
if let Some(graph) = &state.graph {
let movement_graph: MovementGraph =

View File

@@ -1,3 +1,5 @@
use std::path::PathBuf;
use tonic::transport::{Channel, ClientTlsConfig};
use crate::{
@@ -7,34 +9,37 @@ use crate::{
#[allow(dead_code)]
pub struct State {
engine: SharedEngine,
pub storage: Storage,
events: Events,
pub commander: Commander,
pub querier: Querier,
backend: Backend,
}
pub enum Backend {
Local,
Local { path_override: Option<PathBuf> },
Remote { url: String },
}
impl State {
pub async fn new(backend: Backend) -> anyhow::Result<Self> {
let storage = Storage::new();
let engine = storage.load()?;
let events = Events::default();
let engine = SharedEngine::from(engine);
let (querier, commander) = match backend {
Backend::Local => (
Querier::local(&engine),
Commander::local(engine.clone(), storage.clone(), events.clone())?,
),
let (querier, commander) = match &backend {
Backend::Local { path_override } => {
let mut storage = Storage::new();
if let Some(path_override) = path_override {
storage.with_base(path_override);
}
let engine = storage.load()?;
let events = Events::default();
let engine = SharedEngine::from(engine);
(
Querier::local(&engine),
Commander::local(engine.clone(), storage.clone(), events.clone())?,
)
}
Backend::Remote { url } => {
let channel = Channel::from_shared(url)?
.tls_config(ClientTlsConfig::new())?
let tls = ClientTlsConfig::new();
let channel = Channel::from_shared(url.clone())?
.tls_config(tls.with_native_roots())?
.connect()
.await?;
@@ -46,12 +51,31 @@ impl State {
};
Ok(Self {
engine: engine.clone(),
storage: storage.clone(),
events: events.clone(),
commander,
querier,
backend,
})
}
pub fn unlock(&self) {
if let Backend::Local { path_override } = &self.backend {
let mut storage = Storage::new();
if let Some(path_override) = path_override {
storage.with_base(path_override);
}
storage.clear_lock_file();
}
}
pub fn info(&self) -> Option<anyhow::Result<String>> {
if let Backend::Local { path_override } = &self.backend {
let mut storage = Storage::new();
if let Some(path_override) = path_override {
storage.with_base(path_override);
}
return Some(storage.info());
}
None
}
}

View File

@@ -0,0 +1,289 @@
use std::{
io::{Read, Write},
path::{Path, PathBuf},
time::SystemTime,
};
use anyhow::{anyhow, Context};
use crossterm::{
terminal::{disable_raw_mode, enable_raw_mode},
ExecutableCommand,
};
use hyperlog_core::log::{GraphItem, ItemState};
use itertools::Itertools;
use serde::{Deserialize, Serialize};
use sha2::Digest;
use crate::project_dirs::get_project_dir;
pub struct EditorSession<'a> {
item: &'a GraphItem,
}
struct EditorFile {
title: String,
metadata: Metadata,
body: String,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
struct Metadata {
state: ItemState,
}
impl EditorFile {
pub fn serialize(&self) -> anyhow::Result<String> {
let metadata =
toml::to_string_pretty(&self.metadata).context("failed to serialize metadata")?;
let frontmatter = format!("+++\n{}+++\n", metadata);
Ok(format!(
"{}\n# {}\n\n{}",
frontmatter, self.title, self.body
))
}
}
impl TryFrom<&GraphItem> for EditorFile {
type Error = anyhow::Error;
fn try_from(value: &GraphItem) -> Result<Self, Self::Error> {
if let GraphItem::Item {
title,
description,
state,
} = value.clone()
{
Ok(Self {
title,
metadata: Metadata { state },
body: description,
})
} else {
anyhow::bail!("can only generate a file based on items")
}
}
}
impl TryFrom<&str> for EditorFile {
type Error = anyhow::Error;
fn try_from(value: &str) -> Result<Self, Self::Error> {
let value = value.to_string();
let frontmatter_parts = value.split("+++").filter(|p| !p.is_empty()).collect_vec();
let frontmatter_content = frontmatter_parts
.first()
.ok_or(anyhow::anyhow!("no front matter parts were found"))?;
tracing::trace!("parsing frontmatter content: {}", frontmatter_content);
let metadata: Metadata = toml::from_str(frontmatter_content)?;
let line_parts = value.split("\n");
let title = line_parts
.clone()
.find(|p| p.starts_with("# "))
.map(|t| t.trim_start_matches("# "))
.ok_or(anyhow!("an editor file requires a title with heading 1"))?;
let body = line_parts
.skip_while(|p| !p.starts_with("# "))
.skip(1)
.skip_while(|p| p.is_empty())
.collect_vec()
.join("\n");
Ok(Self {
title: title.to_string(),
metadata,
body,
})
}
}
impl From<EditorFile> for GraphItem {
fn from(value: EditorFile) -> Self {
Self::Item {
title: value.title,
description: value.body,
state: value.metadata.state,
}
}
}
struct SessionFile {
path: PathBuf,
loaded: SystemTime,
}
impl SessionFile {
pub fn get_path(&self) -> &Path {
self.path.as_path()
}
pub fn is_changed(&self) -> anyhow::Result<bool> {
let modified = self.path.metadata()?.modified()?;
Ok(self.loaded < modified)
}
}
impl Drop for SessionFile {
fn drop(&mut self) {
// std::io::stdout()
// .execute(crossterm::terminal::EnterAlternateScreen)
// .expect("to be able to restore alternative mode");
// enable_raw_mode().expect("to be able to restore raw mode");
if self.path.exists() {
tracing::debug!("cleaning up file: {}", self.path.display());
if let Err(e) = std::fs::remove_file(&self.path) {
tracing::error!(
"failed to cleanup file: {}, error: {}",
self.path.display(),
e
);
}
}
}
}
impl<'a> EditorSession<'a> {
pub fn new(item: &'a GraphItem) -> Self {
Self { item }
}
fn get_file_path(&mut self) -> anyhow::Result<PathBuf> {
let name = self
.item
.get_digest()
.ok_or(anyhow::anyhow!("item doesn't have a title"))?;
let file_path = get_project_dir()
.data_dir()
.join("edit")
.join(format!("{name}.md"));
Ok(file_path)
}
fn prepare_file(&mut self) -> anyhow::Result<SessionFile> {
let file_path = self.get_file_path()?;
if let Some(parent) = file_path.parent() {
tracing::debug!("creating parent dir: {}", parent.display());
std::fs::create_dir_all(parent).context("failed to create dir for edit file")?;
}
let mut file =
std::fs::File::create(&file_path).context("failed to create file for edit file")?;
tracing::debug!("writing contents to file: {}", file_path.display());
let editor_file = EditorFile::try_from(self.item)?;
file.write_all(
editor_file
.serialize()
.context("failed to serialize item to file")?
.as_bytes(),
)
.context("failed to write to file")?;
file.flush().context("failed to flush to disk")?;
let modified_time = file.metadata()?.modified()?;
Ok(SessionFile {
path: file_path,
loaded: modified_time,
})
}
fn get_item_from_file(&self, session_file: SessionFile) -> anyhow::Result<GraphItem> {
let mut file = std::fs::File::open(&session_file.path)?;
let mut content = String::new();
file.read_to_string(&mut content)?;
let editor_file = EditorFile::try_from(content.as_str())?;
Ok(editor_file.into())
}
pub fn execute(&mut self) -> anyhow::Result<Option<GraphItem>> {
let editor = std::env::var("EDITOR").context("no editor was found for EDITOR env var")?;
let session_file = self.prepare_file()?;
tracing::debug!(
"opening editor: {} at path: {}",
editor,
session_file.get_path().display()
);
std::io::stdout().flush()?;
// disable_raw_mode()?;
// std::io::stdout().execute(crossterm::terminal::LeaveAlternateScreen)?;
let path = session_file.get_path();
if let Some(parent) = path.parent() {
if let Err(e) = std::process::Command::new(editor)
.arg(
path.file_name()
.ok_or(anyhow::anyhow!("failed to find file in the given path"))?,
)
.current_dir(parent)
.status()
{
tracing::error!("failed command with: {}", e);
return Ok(None);
}
} else if let Err(e) = std::process::Command::new(editor)
.arg(session_file.get_path())
.status()
{
tracing::error!("failed command with: {}", e);
return Ok(None);
}
tracing::debug!(
"returning from editor, checking file: {}",
session_file.get_path().display()
);
if session_file.is_changed()? {
tracing::debug!(
"file: {} changed, updating item",
session_file.get_path().display()
);
Ok(Some(self.get_item_from_file(session_file)?))
} else {
Ok(None)
}
}
}
trait ItemExt {
fn get_digest(&self) -> Option<String>;
}
impl ItemExt for &GraphItem {
fn get_digest(&self) -> Option<String> {
if let GraphItem::Item { title, .. } = self {
let digest = sha2::Sha256::digest(title.as_bytes());
let digest_hex = hex::encode(digest);
Some(format!(
"{}_{}",
title
.chars()
.filter(|c| c.is_ascii_alphanumeric())
.take(10)
.collect::<String>(),
digest_hex.chars().take(10).collect::<String>()
))
} else {
None
}
}
}

View File

@@ -31,9 +31,11 @@ pub mod state;
mod engine;
mod events;
mod querier;
mod storage;
pub mod storage;
mod editor;
mod logging;
mod project_dirs;
mod terminal;
pub async fn execute(state: State) -> Result<()> {

View File

@@ -12,6 +12,7 @@ pub enum Msg {
OpenCreateItemDialog,
OpenCreateItemDialogBelow,
OpenEditItemDialog { item: GraphItem },
OpenEditor { item: GraphItem },
Interact,
EnterInsertMode,
@@ -30,6 +31,8 @@ pub enum Msg {
Archive(IOEvent<()>),
OpenUpdateItemDialog(IOEvent<()>),
OpenItem(IOEvent<()>),
}
#[derive(Debug)]

View File

@@ -0,0 +1,5 @@
use directories::ProjectDirs;
pub fn get_project_dir() -> ProjectDirs {
ProjectDirs::from("io", "kjuulh", "hyperlog").expect("to be able to get project dirs")
}

View File

@@ -80,6 +80,13 @@ impl Storage {
pub fn clear_lock_file(self) {
let mut lock_file = self.lock_file.lock().unwrap();
if let Ok(lock) = self.state_lock() {
if lock.exists() {
tracing::info!("clearing lock file");
std::fs::remove_file(&lock).expect("to be able to remove lockfile");
}
}
if lock_file.is_some() {
*lock_file = None;
}

View File

@@ -21,7 +21,7 @@ serde_json.workspace = true
uuid.workspace = true
bus = "2.4.1"
dirs = "5.0.1"
dirs = "6.0.0"
[dev-dependencies]
similar-asserts = "1.5.0"

View File

@@ -1,3 +1,5 @@
use std::path::PathBuf;
use clap::{Parser, Subcommand, ValueEnum};
use hyperlog_tui::{
commander,
@@ -15,6 +17,9 @@ struct Command {
#[arg(long = "backend-url", required_if_eq("backend", "remote"))]
backend_url: Option<String>,
#[arg(long = "local-path")]
local_path: Option<PathBuf>,
}
#[derive(ValueEnum, Clone)]
@@ -90,7 +95,9 @@ pub async fn execute() -> anyhow::Result<()> {
let backend_url = cli.backend_url;
let backend = match backend {
BackendArg::Local => Backend::Local,
BackendArg::Local => Backend::Local {
path_override: cli.local_path.clone(),
},
BackendArg::Remote => Backend::Remote {
url: backend_url.expect("backend-url to be set"),
},
@@ -164,11 +171,13 @@ pub async fn execute() -> anyhow::Result<()> {
}
Some(Commands::Info {}) => {
let state = State::new(backend).await?;
println!("graph stored at: {}", state.storage.info()?)
if let Some(info) = state.info() {
println!("graph stored at: {}", info?);
}
}
Some(Commands::ClearLock {}) => {
let state = State::new(backend).await?;
state.storage.clear_lock_file();
state.unlock();
println!("cleared lock file");
}
None => {