Commit Graph

46 Commits

Author SHA1 Message Date
Jax Young
90e7d28173
test: add env ATUIN_TEST_LOCAL_TIMEOUT to control test timeout of SQLite (#2337)
* test: add env ATUIN_TEST_LOCAL_TIMEOUT to control test timeout of SQLite

This make it possible to control the timeout of SQLite operations in
test. And ATUIN_TEST_LOCAL_TIMEOUT defaults to the default local_timeout,
which is actually used in the client. Instead of a small timeout (0.1),
this change makes the test less likely to fail and better imitate the
default behavior.

SQLite operation timeout was first introduced from #1590, including
connection and store timeout. The env ATUIN_TEST_SQLITE_STORE_TIMEOUT
which added by #1703 only specify the store timeout. This commit doesn't
deprecate ATUIN_TEST_SQLITE_STORE_TIMEOUT, but control it by setting its
default to the new env ATUIN_TEST_LOCAL_TIMEOUT.

* test!: replace ATUIN_TEST_SQLITE_STORE_TIMEOUT with ATUIN_TEST_LOCAL_TIMEOUT

This deprecate ATUIN_TEST_SQLITE_STORE_TIMEOUT for simplicity as the new
env ATUIN_TEST_LOCAL_TIMEOUT can control both connection and store
timeout of SQLite in test. Details see 4d88611.

Revert: #1703.
2024-08-05 14:22:40 +01:00
P T Weir
f94a284df4
fix(theme): Restore original colours (#2339)
* fix(theme): restore ratatui colors

* chore: fix up rustfmt

* typo: correct spelling in comment
2024-08-05 14:12:18 +01:00
Ellie Huxtable
3cf52990e4
chore(release): prepare for release v18.4.0-beta.3 (#2305) 2024-07-23 13:38:41 +01:00
P T Weir
17ed668aac
fix(themes): Restore default theme, refactor (#2294)
* fix(theme): let the base colour remain unchanged

* fix(theme): split out default

* fix(theme): make base theme 'default' not an empty string

* wip(theme): return styles, not colors

* wip(theme): tidy up module structure a little

* wip(theme): removed unhandled references to foreground_color

* chore: fix cargo fmt

* feat(theme): allow crossterm-deserializable colors
2024-07-23 12:03:00 +01:00
Tobias Genannt
06c8ebd310
feat(tui): Fixed preview height option (#2286)
* Added "fixed" to preview strategy

Uses max_preview_height as a fixed value to prevent the list from
"jumping".

* Added test for new setting
2024-07-17 15:19:11 +01:00
Ellie Huxtable
0e7f9b29d2
chore(release): prepare for release v18.4.0-beta.2 (#2287)
* feat(gui): add runbook list, ability to create and delete, sql storage (#2282)

* wip

* saving works :))

* functioning delete button

* persist selection properly

* update contributors

* update changelog
2024-07-16 15:19:33 +01:00
P T Weir
61c6e5e46a
feat(tui): Customizable Themes (#2236)
* wip: add theme

* feat(theme): basic theming approach

* feat(theme): adds theming support

* fix: split out palette without compact inspector

* fix(theme): tidy up implementation

* fix(theme): correct yaml to toml

* fix(theme): typo in comments

* chore: cheer up clippy

* fix(themes): ensure tests cannot hit real loading directory

* chore: rustfmt

* chore: rebase

* feat(themes): add rgb hexcode support

* fix(theme): add tests

* fix(theme): use builtin log levels and correct debug test

* feat(theme): adds the ability to derive from a non-base theme

* fix(theme): warn if the in-file name of a theme does not match the filename

* chore: tidy for rustfmt and clippy

* chore: tidy for rustfmt and clippy
2024-07-15 10:18:46 +01:00
Ellie Huxtable
8f5af526d3
chore: enable record sync by default (#2255)
I'm now pretty confident in the automatic migration. Let's cut people over so they have a better experience
2024-07-11 17:02:59 +01:00
Ellie Huxtable
8d9f677c4e
feat(gui): use fancy new side nav (#2243)
* feat(gui): use fancy new side nav

* compact only sidebar, no expand-collapse

* custom drag region, remove titlebar

* add user popup

* wire up login/logout/register, move user button to bottom and add menu

* link help and feedback to forum
2024-07-10 15:56:33 +01:00
Ellie Huxtable
5fe8ae05e5
fix: idx cache inconsistency (#2231) 2024-07-03 08:10:12 +01:00
Julien P
1b0dad0b98
feat: Add npm, Netlify and Pulumi tokens to secret patterns (#2210) 2024-07-01 12:07:52 +01:00
Chris Rose
fd3aca7cb3
feat: add several other GitHub access token patterns (#2200)
- OAuth access tokens
- refresh token
- app installation token
- PAT v2

Additionally, added support for having >1 value for testing, for cases
where the pattern for a secret has alternative formats (GitHub PAT v2
does this)
2024-06-25 21:24:31 +01:00
David Jack Wange Olrik
a223fcb718
feat: Add GitLab PAT to secret patterns (#2196) 2024-06-25 14:32:45 +01:00
Ellie Huxtable
c8b3e418a1
chore(release): prepare for release v18.4.0-beta.1 (#2195)
* chore(release): prepare for release v18.4.0-beta.1

* remove full release test
2024-06-25 12:35:12 +01:00
Ellie Huxtable
67d64ec4b3
feat: add user account verification (#2190)
* add verified column to users table

* add database functions to check if verified, or to verify

* getting there

* verification check

* use base64 urlsafe no pad

* add verification client

* clippy

* correct docs

* fix integration tests
2024-06-24 14:54:54 +01:00
David
b06b7b509a
feat(history): filter out various environment variables containing potential secrets (#2174) 2024-06-20 16:50:29 +01:00
Ellie Huxtable
9b82bba53f
feat(daemon): follow XDG_RUNTIME_DIR if set (#2171)
If XDG_RUNTIME_DIR is set, put the socket file there.

If not, default to storing it in our data dir. We cannot default to a
path such as /run/user/$UID/ because it does not exist on all systems.
Any system running systemd will set this var by default, and ensure that
the directory it points to is correctly setup.
2024-06-20 10:28:00 +01:00
Justin Su
33ef734116
Fix scroll_exits default in config.toml (#2166) 2024-06-19 11:38:39 +01:00
Ellie Huxtable
7984f9ef0c
feat(tui): configurable prefix character (#2157)
* feat(tui): configurable prefix character

* string not char because toml/json lol
2024-06-18 10:24:43 +01:00
dependabot[bot]
f06408f4f7
chore(deps): bump memchr from 2.7.2 to 2.7.4 (#2151)
Bumps [memchr](https://github.com/BurntSushi/memchr) from 2.7.2 to 2.7.4.
- [Commits](https://github.com/BurntSushi/memchr/compare/2.7.2...2.7.4)

---
updated-dependencies:
- dependency-name: memchr
  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-17 09:12:37 +01:00
Ellie Huxtable
0a6bfbba3e
fix: unitless sync_frequence = 0 not parsed by humantime (#2154)
Resolve #2147
2024-06-17 08:44:25 +01:00
dependabot[bot]
768bd2f66c
chore(deps): bump regex from 1.10.4 to 1.10.5 (#2132)
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.4 to 1.10.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5)

---
updated-dependencies:
- dependency-name: regex
  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-13 14:33:49 +01:00
Ellie Huxtable
9be49e434e
chore(release): prepare for release v18.3.0 (#2105)
* chore(release): prepare for release v18.3.0

* build full release

* Revert "build full release"

This reverts commit 65e7718b51.
2024-06-10 14:42:32 +01:00
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
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
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
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
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
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
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