Commit Graph

44 Commits

Author SHA1 Message Date
Ellie Huxtable
c102851e29
chore(release): v18.3.0-prerelease.1 (#2090)
* chore(release): v18.3.0-prerelease.1

* update contributors

* changelog, plan only on prs
2024-06-05 14:56:10 +01:00
Hesam Pakdaman
9943c53a70
fix: Replace serde_yaml::to_string with serde_json::to_string_yaml (#2087) 2024-06-04 21:44:51 +01:00
dependabot[bot]
511d84ce8d
chore(deps): bump serde_yaml from 0.9.32 to 0.9.34+deprecated (#2078)
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.32 to 0.9.34+deprecated.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.32...0.9.34)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 11:07:46 +01:00
Xavier Vello
b05761bb37
fix(client): better error reporting on login/registration (#2076) 2024-06-03 10:57:31 +01:00
Xavier Vello
96163c5591
feat(doctor): report sqlite version (#2075) 2024-06-03 10:51:31 +01:00
dependabot[bot]
928dce4a8c
chore(deps): bump rmp from 0.8.12 to 0.8.14 (#2079)
Bumps [rmp](https://github.com/3Hren/msgpack-rust) from 0.8.12 to 0.8.14.
- [Release notes](https://github.com/3Hren/msgpack-rust/releases)
- [Commits](https://github.com/3Hren/msgpack-rust/commits/rmp/v0.8.14)

---
updated-dependencies:
- dependency-name: rmp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 09:59:15 +01:00
Blair Noctis
b0b1d07cb5
fix(deps): replace parse_duration with humantime (#2074)
The former is no longer maintained, with a long standing security
advisory (RUSTSEC-2021-0041).
2024-06-03 09:03:23 +01:00
Cristian Le
c694a0a67f
chore(deps): relax sqlx and argon2 dependencies (#2065)
* Bump sqlx dependency

* Relax dependencies for Fedora
2024-05-31 09:44:55 +01:00
Koichi Murase
f6918d9d13
fix(bash): fix a workaround for bash-5.2 keybindings (#2060) 2024-05-30 19:32:26 +01:00
Sandro
21109517c0
fix(stats): generation for commands starting with a pipe (#2058)
Closes #1882
2024-05-30 15:55:29 +01:00
Ellie Huxtable
4d74e38a51
chore: handle rate limited responses (#2057)
For Atuin Cloud, we rate limit login attempts (and a few other endpoints). Ensure that the user gets a descriptive response

For self hosted users, if you wish to rate limit, I'd suggest
configuring this with your reverse proxy.
2024-05-30 13:03:15 +01:00
Ellie Huxtable
467f89c104
feat(ui): add login/register dialog (#2056) 2024-05-30 12:49:22 +01:00
Conrad Ludgate
15618f19ab
chore(deps): bump rusty_paseto and rusty_paserk (#2054) 2024-05-29 17:19:37 +00:00
Nemo157
2e88321aec
feat: support systemd socket activation for daemon (#2039)
This avoids issues with clients attempting to connect to the daemon
while it's starting, systemd creates the socket early and will queue
connections up until the daemon is ready to accept them.
2024-05-25 13:03:55 +01:00
Ellie Huxtable
40543eb8f9
perf: only open the database for commands if strictly required (#2043)
The client commands would open sqlite, even if not 100% required

Remove this for

1. history start/end
2. shell init

Init seems to be around 2ms faster on my system, with this change.
2024-05-25 11:58:52 +01:00
Amos Bird
413d3e3626
feat: support importing from replxx history files (#2024)
* Support importing from replxx history files

* Fix clippy error.

Also Remove auto-detect for replxx which makes no sense.

* Add some tests
2024-05-21 11:12:17 +07:00
Ellie Huxtable
8dc8448de0
fix(daemon): do not try to sync if logged out (#2037)
* fix(daemon): do not try to sync if logged out

I've also added Settings::logged_in, as there are a few places where we
switch on login state.

* make session_token a function
2024-05-21 10:43:08 +07:00
Jeremy Cline
32930846e6
fix: redact password in database URI when logging (#2032)
Previously, in the event that there was a configuration issue and the
atuin server failed to connect to PostgreSQL, it would log the password.

For example, if the password authentication failed the following log
message would be printed:

Error: failed to connect to db: PostgresSettings { db_uri:
    "postgres://atuin:definitelymypassword@db.example.com/atuin" }

This change sets the password to "****" when printing it via Debug:

Error: failed to connect to db: PostgresSettings { db_uri:
    "postgres://atuin:****@db.example.com/atuin" }

Hopefully few people use **** as the actual password.
2024-05-21 09:25:17 +07:00
Ellie Huxtable
95c9168944
fix: save sync time in daemon (#2029) 2024-05-18 09:46:48 +07:00
Ellie Huxtable
64b7581644
chore: clarify default config file (#2026) 2024-05-17 09:50:13 +07:00
Caleb Maclennan
2e35af1c86
fix: bogus error message wording (#1283) 2024-05-16 07:51:25 +07:00
Ellie Huxtable
58f0bd61e6
fix: alias enable/enabled in settings (#2021) 2024-05-14 10:23:05 +07:00
YummyOreo
ce67e52772
feat(daemon): add support for daemon on windows (#2014)
* fix: gracefully exit on windows

* feat(daemon): tcp support for windows

* feat(daemon): add tcp port configuration

* fix: logging and fix compiler error

* docs: add build dependency to the readme

fix(docs): move a line up

* fix: missing field error

* docs: adds the daemon section to the default config

* fix: clippy and fmt

* feat: Update README.md

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>

* refactor: changes tcp port and other stuff as per request

* fix(config): update default tcp port in example config

* fix: complier error on unix

* refactor: make the cfg stuff look better

---------

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2024-05-13 09:35:34 +07:00
Ellie Huxtable
0da534d524
fix: add incremental rebuild to daemon loop (#2010) 2024-05-08 17:28:52 +01:00
Ellie Huxtable
bce0faa1c2
feat: add background daemon (#2006)
* init daemon crate

* wip

* minimal functioning daemon, needs cleanup for sure

* better errors

* add signal cleanup

* logging

* things

* add sync worker

* move daemon crate

* 30s -> 5mins

* make clippy happy

* fix stuff maybe?

* fmt

* trim packages

* rate limit fix

* more protoc huh

* this makes no sense, why linux why

* can it install literally just curl

* windows in ci is slow, and all the newer things will not work there. disable the daemon feature and it will build

* add daemon feature

* maybe this

* ok wut where is protoc

* try setting protoc

* hm

* try copying protoc

* remove optional

* add cross config

* idk nix

* does nix want this?

* some random pkg I found does this

* uh oh

* hack, be gone!

* update contributing
2024-05-08 12:09:04 +01:00
Helmut K. C. Tessarek
eebfd04879
fix(config): add quotes for strategy value in comment (#1993) 2024-05-06 08:31:23 +01:00
Poliorcetics
467b575007
fix: adapt help to enter_accept config (#2001) 2024-05-06 08:14:51 +01:00
Ellie Huxtable
754ddeaa8d
feat(ui): scroll history infinitely (#1999)
* wip, history scrolls right!

* wip

* virtual scroll fucking worksssss

* paging works :)

* scroll search results now too
2024-05-06 08:11:47 +01:00
dependabot[bot]
851e581e16
chore(deps): bump serde_with from 3.7.0 to 3.8.1 (#2002)
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.7.0...v3.8.1)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 08:09:55 +01:00
Ellie Huxtable
0639ff4960
fix(dotfiles): allow clearing aliases, disable import (#1995)
* fix(dotfiles): allow clearing aliases, disable import

At the moment there are far too many edge cases to handle importing
aliases.

1. We need an interactive shell to print aliases. Without it, most
   shells won't report much.
2. Many people have their shells print things on startup (graphics,
   fortunes, etc). This could be detected as an attempt to set an alias.

 Rather than spend the next year finding import edge cases, I'm
 disabling it for now. There's probably a better way we can do this?

* clippy
2024-05-02 16:53:38 +01:00
Helmut K. C. Tessarek
831dd783ed
refactor: preview_auto to use enum and different option (#1991)
* refactor: preview_auto to use enum and different option

* fix: typo
2024-05-01 10:51:22 +01:00
Ellie Huxtable
d1ce01679b
feat(history): create atuin-history, add stats to it (#1990)
* feat(history): create atuin-history, add stats to it

I'd like to eventually pull all the history stuff into this crate. Stats
are a nice start, as I'd like to use them from the UI anyways.

* lock

* clippy
2024-04-30 13:16:50 +01:00
Poliorcetics
36ddd98b6e
perf(nushell): use version.(major|minor|patch) if available (#1963) 2024-04-26 12:30:06 +01:00
Ellie Huxtable
fc5522f45e
chore: add some more debug logs (#1979)
P99 is usually <100ms which is excellent, but occasionally has big
spikes to 1000ms. This is only on the record index.

I don't want this to get out of hand. I've ran a few test queries and
they all complete very fast, and are purely index scans.

Hopefully this helps figure out if it's a specific user with tonnes of
stores or something? Otherwise there could be something up with my db.

I should probably also figure out some proper log levels or tracing lol.
2024-04-25 10:42:04 +01:00
Ellie Huxtable
d020c815c1
feat(dotfiles): support syncing shell/env vars (#1977)
There's a bunch of duplication here!

I'd also like to support syncing shell "snippets", aka just bits of
shell config that don't fit into the structure here. Potentially special
handling for PATH too.

Rather than come up with some abstraction in the beginning, which
inevitably will not fit future uses, I'm duplicating code _for now_.

Once all the functionality is there, I can tidy things up and sort a
proper abstraction out.

Something in atuin-client for map/list style synced structures would
probably work best.
2024-04-25 07:52:23 +01:00
Ellie Huxtable
bf88b42cec
fix(dotfiles): unquote aliases before quoting (#1976)
* fix(dotfiles): unquote aliases before quoting

* tests
2024-04-23 14:45:07 +01:00
Tobias Genannt
8b8844887b
chore(deps): Fix ratatui update (#1975)
* chore(deps): bump ratatui from 0.25.0 to 0.26.2

Bumps [ratatui](https://github.com/ratatui-org/ratatui) from 0.25.0 to 0.26.2.
- [Release notes](https://github.com/ratatui-org/ratatui/releases)
- [Changelog](https://github.com/ratatui-org/ratatui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ratatui-org/ratatui/compare/v0.25.0...v0.26.2)

---
updated-dependencies:
- dependency-name: ratatui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build with ratatuin 0.26.2

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 20:22:11 +01:00
Ellie Huxtable
822593e77b
fix(dotfiles): more fish alias import (#1974)
Serves me right for assuming fish mostly is POSIX.
2024-04-22 17:37:07 +01:00
Ellie Huxtable
18f33b81f6
fix(dotfiles): fish alias import (#1972) 2024-04-22 14:27:38 +01:00
Ellie Huxtable
bbf83801e6
chore: add some more logging to handlers (#1971) 2024-04-22 10:37:16 +01:00
Ellie Huxtable
d239a67b37
fix(dotfiles): alias import with init output (#1970) 2024-04-22 10:32:56 +01:00
Ellie Huxtable
98350f52df
fix: support not-mac for default shell (#1960) 2024-04-19 09:58:25 +01:00
Ellie Huxtable
00dfc034ed
chore: fix atuin crate readme (#1959) 2024-04-18 16:42:47 +01:00
Ellie Huxtable
95cc472037
chore: move crates into crates/ dir (#1958)
I'd like to tidy up the root a little, and it's nice to have all the
rust crates in one place
2024-04-18 16:41:28 +01:00