Compare commits

...

2 commits

Author SHA1 Message Date
fcd3379393 chore: workflow 2026-06-22 15:28:21 -05:00
83fa4290b9 feat(wip): actions 2026-06-17 10:46:36 -05:00
11 changed files with 404 additions and 31 deletions

View file

@ -1,14 +1,36 @@
on: [workflow_dispatch] on: [workflow_dispatch]
jobs: jobs:
integration-test--firefox: integration-test--firefox:
runs-on: playwright-latest runs-on: docker
container:
image: rust:trixie
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-node@v4
- run: apt-get update && apt-get install -y sqlite3 nodejs
- run: ./Taskfile _cargo build --release
- run: echo test | ./target/release/mascarpone set-password test
- run: ./target/release/mascarpone set-ephemeral test true
- run: curl https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh
- run: mise install node pnpm
- run: mise exec node pnpm -C e2e -- pnpm install
- run: mise exec node pnpm -C e2e -- npx playwright install --with-deps firefox
- run: |
./target/release/mascarpone serve &
bash ./e2e/wait-for-it.bash 127.0.0.1:3000 --timeout=2
mise exec node pnpm -C e2e -- env PROJECT_FILTER=firefox npx playwright test
- uses: actions/upload-artifact@v7
with: with:
node-version: 24 name: playwright-results
- uses: pnpm/action-setup@v4 path: |
e2e/playwright-report
e2e/test-results
- uses: actions/upload-artifact@v7
with: with:
version: 11.0.0-dev.1005 name: release
- run: cd e2e && pnpm install path: |
- run: cd e2e && env PROJECT_FILTER=firefox ./Taskfile _test e2e/playwright-report
e2e/test-results

21
Cargo.lock generated
View file

@ -141,6 +141,17 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi",
]
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.5.0" version = "1.5.0"
@ -1043,6 +1054,15 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "hex" name = "hex"
version = "0.4.3" version = "0.4.3"
@ -1563,6 +1583,7 @@ name = "mascarpone"
version = "0.2.0" version = "0.2.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"atty",
"axum", "axum",
"axum-extra", "axum-extra",
"axum-htmx", "axum-htmx",

View file

@ -9,6 +9,7 @@ lto = true
[dependencies] [dependencies]
anyhow = "1.0.100" anyhow = "1.0.100"
atty = "0.2.14"
axum = { version = "0.8.6", features = ["macros", "form"] } axum = { version = "0.8.6", features = ["macros", "form"] }
axum-extra = { version = "0.10.3", features = ["form"] } axum-extra = { version = "0.10.3", features = ["form"] }
axum-htmx = "0.8.1" axum-htmx = "0.8.1"

View file

@ -51,13 +51,13 @@ If you want an account, contact me directly or use the "self-hosting" instructio
### Example systemd service file ### Example systemd service file
``` ```
[Unit] [Unit]
Description=Mascarpone CRM Description=Entretien Task Manager
After=network.target After=network.target
[Service] [Service]
Type=simple Type=simple
WorkingDirectory=/var/local/mascarpone/ WorkingDirectory=/var/local/entretien/
ExecStart=/usr/bin/mascarpone serve ExecStart=/usr/bin/entretien serve --port 6234
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5

View file

@ -10,8 +10,8 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@playwright/test": "=1.57.0", "@playwright/test": "=1.60.0",
"@types/node": "^24.9.1" "@types/node": "^24.10.1"
}, },
"packageManager": "pnpm@10.28.1+sha512.7d7dbbca9e99447b7c3bf7a73286afaaf6be99251eb9498baefa7d406892f67b879adb3a1d7e687fc4ccc1a388c7175fbaae567a26ab44d1067b54fcb0d6a316" "packageManager": "pnpm@11.7.0+sha512.19cc852c120c7125760f2443ee6be0ca5b40f9f50598de1a09a1f177503e010e57c23c77646e01e761de59bf874fb22a3398c33ab9691fc13eb946b6f0f4d620"
} }

View file

@ -26,7 +26,7 @@ let projects = [
/* Test against mobile viewports. */ /* Test against mobile viewports. */
{ {
name: 'Mobile Chrome', name: 'mobile-chrome',
use: { ...devices['Pixel 5'] }, use: { ...devices['Pixel 5'] },
}, },

28
e2e/pnpm-lock.yaml generated
View file

@ -9,16 +9,16 @@ importers:
.: .:
devDependencies: devDependencies:
'@playwright/test': '@playwright/test':
specifier: '=1.57.0' specifier: '=1.60.0'
version: 1.57.0 version: 1.60.0
'@types/node': '@types/node':
specifier: ^24.9.1 specifier: ^24.10.1
version: 24.10.1 version: 24.10.1
packages: packages:
'@playwright/test@1.57.0': '@playwright/test@1.60.0':
resolution: {integrity: sha512-6TyEnHgd6SArQO8UO2OMTxshln3QMWBtPGrOCgs3wVEmQmwyuNtB10IZMfmYDE0riwNR1cu4q+pPcxMVtaG3TA==} resolution: {integrity: sha512-O71yZIbAh/PxDMNGns37GHBIfrVkEVyn+AXyIa5dOTfb4/xNvRWV+Vv/NMbNCtODB/pO7vLlF2OTmMVLhmr7Ag==}
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
@ -30,13 +30,13 @@ packages:
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin] os: [darwin]
playwright-core@1.57.0: playwright-core@1.60.0:
resolution: {integrity: sha512-agTcKlMw/mjBWOnD6kFZttAAGHgi/Nw0CZ2o6JqWSbMlI219lAFLZZCyqByTsvVAJq5XA5H8cA6PrvBRpBWEuQ==} resolution: {integrity: sha512-9bW6zvX/m0lEbgTKJ6YppOKx8H3VOPBMOCFh2irXFOT4BbHgrx5hPjwJYLT40Lu+4qtD36qKc/Hn56StUW57IA==}
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
playwright@1.57.0: playwright@1.60.0:
resolution: {integrity: sha512-ilYQj1s8sr2ppEJ2YVadYBN0Mb3mdo9J0wQ+UuDhzYqURwSoW4n1Xs5vs7ORwgDGmyEh33tRMeS8KhdkMoLXQw==} resolution: {integrity: sha512-hheHdokM8cdqCb0lcE3s+zT4t4W+vvjpGxsZlDnikarzx8tSzMebh3UiFtgqwFwnTnjYQcsyMF8ei2mCO/tpeA==}
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
@ -45,9 +45,9 @@ packages:
snapshots: snapshots:
'@playwright/test@1.57.0': '@playwright/test@1.60.0':
dependencies: dependencies:
playwright: 1.57.0 playwright: 1.60.0
'@types/node@24.10.1': '@types/node@24.10.1':
dependencies: dependencies:
@ -56,11 +56,11 @@ snapshots:
fsevents@2.3.2: fsevents@2.3.2:
optional: true optional: true
playwright-core@1.57.0: {} playwright-core@1.60.0: {}
playwright@1.57.0: playwright@1.60.0:
dependencies: dependencies:
playwright-core: 1.57.0 playwright-core: 1.60.0
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.2

164
e2e/wait-for-it.bash Executable file
View file

@ -0,0 +1,164 @@
#!/usr/bin/env bash
# Use this script to test if a given TCP host/port are available
WAITFORIT_cmdname=${0##*/}
echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
usage()
{
cat << USAGE >&2
Usage:
$WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args]
-s | --strict Only execute subcommand if the test succeeds
-q | --quiet Don't output any status messages
-t TIMEOUT | --timeout=TIMEOUT
Timeout in seconds, zero for no timeout
-- COMMAND ARGS Execute command with args after the test finishes
USAGE
exit 1
}
wait_for()
{
if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
else
echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout"
fi
local start_ts
local result
local end_ts
start_ts=$(date +%s)
while :; do
if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then
nc -z "$WAITFORIT_HOST" "$WAITFORIT_PORT"
result=$?
else
(echo -n > /dev/tcp/"$WAITFORIT_HOST"/"$WAITFORIT_PORT") >/dev/null 2>&1
result=$?
fi
if [[ $result -eq 0 ]]; then
end_ts=$(date +%s)
echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((end_ts - start_ts)) seconds"
break
fi
sleep 1
done
return "$result"
}
wait_for_wrapper()
{
# In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
if [[ $WAITFORIT_QUIET -eq 1 ]]; then
timeout $WAITFORIT_BUSYTIMEFLAG "$WAITFORIT_TIMEOUT" "$0" --quiet --child "$WAITFORIT_HOST:$WAITFORIT_PORT" --timeout="$WAITFORIT_TIMEOUT" &
else
timeout $WAITFORIT_BUSYTIMEFLAG "$WAITFORIT_TIMEOUT" "$0" --child "$WAITFORIT_HOST:$WAITFORIT_PORT" --timeout="$WAITFORIT_TIMEOUT" &
fi
WAITFORIT_PID=$!
# shellcheck disable=SC2064
trap "kill -INT -$WAITFORIT_PID" INT
wait $WAITFORIT_PID
WAITFORIT_RESULT=$?
if [[ $WAITFORIT_RESULT -ne 0 ]]; then
echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
fi
return $WAITFORIT_RESULT
}
# process arguments
while [[ $# -gt 0 ]]
do
case "$1" in
*:* )
IFS=: read -ra WAITFORIT_hostport <<< "$1"
WAITFORIT_HOST=${WAITFORIT_hostport[0]}
WAITFORIT_PORT=${WAITFORIT_hostport[1]}
shift 1
;;
--child)
WAITFORIT_CHILD=1
shift 1
;;
-q | --quiet)
WAITFORIT_QUIET=1
shift 1
;;
-s | --strict)
WAITFORIT_STRICT=1
shift 1
;;
-t)
WAITFORIT_TIMEOUT="$2"
if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi
shift 2
;;
--timeout=*)
WAITFORIT_TIMEOUT="${1#*=}"
shift 1
;;
--)
shift
WAITFORIT_CLI=("$@")
break
;;
--help)
usage
;;
*)
echoerr "Unknown argument: $1"
usage
;;
esac
done
if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then
echoerr "Error: you need to provide a host and port to test."
usage
fi
WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15}
WAITFORIT_STRICT=${WAITFORIT_STRICT:-0}
WAITFORIT_CHILD=${WAITFORIT_CHILD:-0}
WAITFORIT_QUIET=${WAITFORIT_QUIET:-0}
# Check to see if timeout is from busybox?
WAITFORIT_TIMEOUT_PATH=$(type -p timeout)
WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH)
WAITFORIT_BUSYTIMEFLAG=""
if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then
WAITFORIT_ISBUSY=1
# Check if busybox timeout uses -t flag
# (recent Alpine versions don't support -t anymore)
if timeout &>/dev/stdout | grep -q -e '-t '; then
WAITFORIT_BUSYTIMEFLAG="-t"
fi
else
WAITFORIT_ISBUSY=0
fi
if [[ $WAITFORIT_CHILD -gt 0 ]]; then
wait_for
WAITFORIT_RESULT=$?
exit $WAITFORIT_RESULT
else
if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
wait_for_wrapper
WAITFORIT_RESULT=$?
else
wait_for
WAITFORIT_RESULT=$?
fi
fi
if [[ $WAITFORIT_CLI != "" ]]; then
if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then
echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess"
exit $WAITFORIT_RESULT
fi
exec "${WAITFORIT_CLI[@]}"
else
exit $WAITFORIT_RESULT
fi

159
mise.lock Normal file
View file

@ -0,0 +1,159 @@
# @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html
[[tools.git-cliff]]
version = "2.13.1"
backend = "aqua:orhun/git-cliff"
[tools.git-cliff."platforms.linux-arm64"]
checksum = "sha256:4054c124b926c117f3fa048939bc8be0a954f29f3b6f367627e8cb22c1971882"
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-aarch64-unknown-linux-musl.tar.gz"
[tools.git-cliff."platforms.linux-arm64-musl"]
checksum = "sha256:4054c124b926c117f3fa048939bc8be0a954f29f3b6f367627e8cb22c1971882"
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-aarch64-unknown-linux-musl.tar.gz"
[tools.git-cliff."platforms.linux-x64"]
checksum = "sha256:200d2535da6d9703f3bcc8a4d159c3b55eacdb01cf2148c55b3eee9dd04d5249"
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-x86_64-unknown-linux-musl.tar.gz"
[tools.git-cliff."platforms.linux-x64-musl"]
checksum = "sha256:200d2535da6d9703f3bcc8a4d159c3b55eacdb01cf2148c55b3eee9dd04d5249"
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-x86_64-unknown-linux-musl.tar.gz"
[tools.git-cliff."platforms.macos-arm64"]
checksum = "sha256:21547ae4a0421164070ab75c2522864ea5565858a011fabc5f583061b20f1226"
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-aarch64-apple-darwin.tar.gz"
[tools.git-cliff."platforms.macos-x64"]
checksum = "sha256:6e60ae390d375cecb9d8008c49f0e724a8dfe40390b532ef5501e421d2cc8acb"
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-x86_64-apple-darwin.tar.gz"
[tools.git-cliff."platforms.windows-x64"]
checksum = "sha256:3ae3a5549e85c7ad5b20192ebcfee4371269deca51255f6f2f2e051c6541f5ca"
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-x86_64-pc-windows-msvc.zip"
[[tools.jj]]
version = "0.34.0"
backend = "aqua:jj-vcs/jj"
[tools.jj."platforms.linux-arm64"]
checksum = "sha256:39b5d689bcdc37256fe5f9ed9caccf5e73b310d1f86848fdf610a7bea9d75c14"
url = "https://github.com/jj-vcs/jj/releases/download/v0.34.0/jj-v0.34.0-aarch64-unknown-linux-musl.tar.gz"
[tools.jj."platforms.linux-arm64-musl"]
checksum = "sha256:39b5d689bcdc37256fe5f9ed9caccf5e73b310d1f86848fdf610a7bea9d75c14"
url = "https://github.com/jj-vcs/jj/releases/download/v0.34.0/jj-v0.34.0-aarch64-unknown-linux-musl.tar.gz"
[tools.jj."platforms.linux-x64"]
checksum = "sha256:1e8e1ede656fecba91ceb8248a76402a110017ad677d0ecfd1f2040f5543cfa3"
url = "https://github.com/jj-vcs/jj/releases/download/v0.34.0/jj-v0.34.0-x86_64-unknown-linux-musl.tar.gz"
[tools.jj."platforms.linux-x64-musl"]
checksum = "sha256:1e8e1ede656fecba91ceb8248a76402a110017ad677d0ecfd1f2040f5543cfa3"
url = "https://github.com/jj-vcs/jj/releases/download/v0.34.0/jj-v0.34.0-x86_64-unknown-linux-musl.tar.gz"
[tools.jj."platforms.macos-arm64"]
checksum = "sha256:8893d34ff0c76e16fdf46ba8771ea2498294957aec5efb0618de15cc493aee27"
url = "https://github.com/jj-vcs/jj/releases/download/v0.34.0/jj-v0.34.0-aarch64-apple-darwin.tar.gz"
[tools.jj."platforms.macos-x64"]
checksum = "sha256:807417125e574432b71c4568a0e2d6168c30af3b59e64ce02a45a54cf0880bd7"
url = "https://github.com/jj-vcs/jj/releases/download/v0.34.0/jj-v0.34.0-x86_64-apple-darwin.tar.gz"
[tools.jj."platforms.windows-x64"]
checksum = "sha256:138f2642a99afb08aff0f7dc54b2076dcdc625d07a9a2e21b52895ea72db900e"
url = "https://github.com/jj-vcs/jj/releases/download/v0.34.0/jj-v0.34.0-x86_64-pc-windows-msvc.zip"
[[tools.node]]
version = "24.16.0"
backend = "core:node"
[tools.node."platforms.linux-arm64"]
checksum = "sha256:589f5b6dd4fcfee4dfda73013903c966abaa8abd93dbc9d436544e472b4f0e74"
url = "https://nodejs.org/dist/v24.16.0/node-v24.16.0-linux-arm64.tar.gz"
[tools.node."platforms.linux-arm64-musl"]
checksum = "sha256:85dde27aa73503b03dadfa0410a800067b4e3f702fb7fcaa3beaf284dfcc69e9"
url = "https://unofficial-builds.nodejs.org/download/release/v24.16.0/node-v24.16.0-linux-arm64-musl.tar.gz"
[tools.node."platforms.linux-x64"]
checksum = "sha256:2faf6a387e9b62b888e21c54f01249fb27537ffecf1842f29f4c919d0a59a0ff"
url = "https://nodejs.org/dist/v24.16.0/node-v24.16.0-linux-x64.tar.gz"
[tools.node."platforms.linux-x64-musl"]
checksum = "sha256:50df5d8d474892d4f7b906167df36f77f5b93908f63dc532dc568219cab65841"
url = "https://unofficial-builds.nodejs.org/download/release/v24.16.0/node-v24.16.0-linux-x64-musl.tar.gz"
[tools.node."platforms.macos-arm64"]
checksum = "sha256:39189dab4eeb15706c424af0ac08a3044c9e48f7db12a7d77f6b7aafc7dd5df6"
url = "https://nodejs.org/dist/v24.16.0/node-v24.16.0-darwin-arm64.tar.gz"
[tools.node."platforms.macos-x64"]
checksum = "sha256:298b4c7b3cb80765c8703e42b90324a4ece3b6634947b89e769c3c980ab55185"
url = "https://nodejs.org/dist/v24.16.0/node-v24.16.0-darwin-x64.tar.gz"
[tools.node."platforms.windows-x64"]
checksum = "sha256:edaca9bd58ec8e92037dac4e877d52f6b8f430b81c18b57e264b4e2fb111cd56"
url = "https://nodejs.org/dist/v24.16.0/node-v24.16.0-win-x64.zip"
[[tools.pnpm]]
version = "11.7.0"
backend = "aqua:pnpm/pnpm"
[tools.pnpm."platforms.linux-arm64"]
checksum = "sha256:a110731cf0f46cf89eb5659b42c9f5c3a2361d30087e2eed921c8378b1fe64a0"
url = "https://github.com/pnpm/pnpm/releases/download/v11.7.0/pnpm-linux-arm64.tar.gz"
provenance = "github-attestations"
[tools.pnpm."platforms.linux-arm64-musl"]
checksum = "sha256:9c82a83d0fa6dbcd4757f7846f20e73f77d451d6282b32602d9f933b5e2f4052"
url = "https://github.com/pnpm/pnpm/releases/download/v11.7.0/pnpm-linux-arm64-musl.tar.gz"
provenance = "github-attestations"
[tools.pnpm."platforms.linux-x64"]
checksum = "sha256:752e31654c6f24bc945db784d12831b80b29f533b43105575ce30dd3c8658609"
url = "https://github.com/pnpm/pnpm/releases/download/v11.7.0/pnpm-linux-x64.tar.gz"
provenance = "github-attestations"
[tools.pnpm."platforms.linux-x64-musl"]
checksum = "sha256:6fa3052e350a1aceeeac90c9f9b59ed048312cab04b34c0472b018e71b243885"
url = "https://github.com/pnpm/pnpm/releases/download/v11.7.0/pnpm-linux-x64-musl.tar.gz"
provenance = "github-attestations"
[tools.pnpm."platforms.macos-arm64"]
checksum = "sha256:97d077cca1225ae6ab492e5b6d0e6737ab7149c34813e70f25f67c6c2bf274a2"
url = "https://github.com/pnpm/pnpm/releases/download/v11.7.0/pnpm-darwin-arm64.tar.gz"
provenance = "github-attestations"
[tools.pnpm."platforms.windows-x64"]
checksum = "sha256:08acc088646c1dbf3030984918266058d23c5acf4c518dc7502bd539fc99c280"
url = "https://github.com/pnpm/pnpm/releases/download/v11.7.0/pnpm-win32-x64.zip"
provenance = "github-attestations"
[[tools.rust-analyzer]]
version = "2025-08-25"
backend = "aqua:rust-lang/rust-analyzer"
[tools.rust-analyzer."platforms.linux-arm64"]
checksum = "sha256:c738e00a5caa712f9d9c8f81f9661884c7108ef94db6df48985c11fe3c2695bd"
url = "https://github.com/rust-lang/rust-analyzer/releases/download/2025-08-25/rust-analyzer-aarch64-unknown-linux-gnu.gz"
[tools.rust-analyzer."platforms.linux-x64"]
checksum = "sha256:487fb1cb99e567fd6b818cc88a7c1452d5260da57dbc171fc1359a4b604348ae"
url = "https://github.com/rust-lang/rust-analyzer/releases/download/2025-08-25/rust-analyzer-x86_64-unknown-linux-gnu.gz"
[tools.rust-analyzer."platforms.linux-x64-musl"]
checksum = "sha256:afedc9ba4b25364430b731d52c03d34029bd37e001bcbb546d1c36b3c1b5fcb8"
url = "https://github.com/rust-lang/rust-analyzer/releases/download/2025-08-25/rust-analyzer-x86_64-unknown-linux-musl.gz"
[tools.rust-analyzer."platforms.macos-arm64"]
checksum = "sha256:1a8bc7d6be8c1bc12bdf4300f4c3370ec894e6b536c80605cfeccefcda2b8fb9"
url = "https://github.com/rust-lang/rust-analyzer/releases/download/2025-08-25/rust-analyzer-aarch64-apple-darwin.gz"
[tools.rust-analyzer."platforms.macos-x64"]
checksum = "sha256:eff297832fb36215cbd750cbd34814b0725f97dcdec235d2dd2d8a14d85cc2fc"
url = "https://github.com/rust-lang/rust-analyzer/releases/download/2025-08-25/rust-analyzer-x86_64-apple-darwin.gz"
[tools.rust-analyzer."platforms.windows-x64"]
checksum = "sha256:f0a7c451e495a184f0b379cce3c3c77af35ccb69ab9eeafbd2c67317ba16d5ae"
url = "https://github.com/rust-lang/rust-analyzer/releases/download/2025-08-25/rust-analyzer-x86_64-pc-windows-msvc.zip"

View file

@ -2,4 +2,5 @@
"rust-analyzer" = "latest" "rust-analyzer" = "latest"
"jj" = "latest" "jj" = "latest"
node = "24" node = "24"
pnpm = "11.7.0"
git-cliff = "latest" git-cliff = "latest"

View file

@ -229,8 +229,13 @@ async fn main() -> Result<(), anyhow::Error> {
db db
}; };
let password = let password: String = if atty::is(atty::Stream::Stdin) {
rpassword::prompt_password(format!("New password for {}: ", username)).unwrap(); rpassword::prompt_password(format!("New password for {}: ", username)).unwrap()
} else {
let out = std::io::stdin().lines().next().unwrap().unwrap();
println!("Received new password from stdin.");
out
};
let update = sqlx::query( let update = sqlx::query(
"insert into users (username, password) values ($1, $2) on conflict do update set password=excluded.password", "insert into users (username, password) values ($1, $2) on conflict do update set password=excluded.password",