warpgate/justfile
kekkon 3c3b843d72
Validate a TOTP code before saving it (#1055)
In order to do this, I had to remove the very old and unmaintainted
`otplib` and replace it with the well-maintained
[otpauth](https://www.npmjs.com/package/otpauth).

I kept the parameters the same, but if there is something only slightly
off between the two libraries, this could cause a major headache. I am
unsure on how to test this though, or if we can provide some sort of
migration for this.

The reason for the upgrade is two-fold:

1. As I said, the original library was unmaintained
2. It's verification mechanism relied on a Buffer class that, as far as
I can tell, can't work without some `require` statements that are
missing from the library's source files.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eugene <inbox@null.page>
2024-09-11 09:30:02 +02:00

39 lines
1.2 KiB
Makefile

projects := "warpgate warpgate-admin warpgate-common warpgate-db-entities warpgate-db-migrations warpgate-database-protocols warpgate-protocol-ssh warpgate-protocol-mysql warpgate-protocol-http warpgate-core warpgate-sso"
run $RUST_BACKTRACE='1' *ARGS='run':
cargo run --all-features -- --config config.yaml {{ARGS}}
fmt:
for p in {{projects}}; do cargo fmt -p $p -v; done
fix *ARGS:
for p in {{projects}}; do cargo fix --all-features -p $p {{ARGS}}; done
clippy *ARGS:
for p in {{projects}}; do cargo cranky --all-features -p $p {{ARGS}}; done
test:
for p in {{projects}}; do cargo test --all-features -p $p; done
yarn *ARGS:
cd warpgate-web && yarn {{ARGS}}
migrate *ARGS:
cargo run --all-features -p warpgate-db-migrations -- {{ARGS}}
lint *ARGS:
cd warpgate-web && yarn run lint {{ARGS}}
svelte-check:
cd warpgate-web && yarn run check
openapi-all:
cd warpgate-web && yarn openapi:schema:admin && yarn openapi:schema:gateway && yarn openapi:client:admin && yarn openapi:client:gateway
openapi:
cd warpgate-web && yarn openapi:client:admin && yarn openapi:client:gateway
cleanup: (fix "--allow-dirty") (clippy "--fix" "--allow-dirty") fmt svelte-check lint
udeps:
cargo udeps --all-features --all-targets