- Create @reviq/virtual-authenticator package with cryptographically valid WebAuthn credential generation for testing - Add e2e tests for WebAuthn registration, authentication, passkey management - Add unit tests for passkey-helpers and VirtualAuthenticator - Add security tests for counter replay and tampered responses - Configure test database environment in devenv.nix - Add turbo.json test tasks and workspace configuration Test results: 98 tests passing (54 virtual-authenticator, 25 e2e, 19 unit) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
packages = with pkgs; [
|
|
nixfmt-rfc-style
|
|
biome
|
|
git
|
|
dbmate
|
|
ast-grep
|
|
];
|
|
|
|
dotenv.enable = true;
|
|
|
|
languages.javascript = {
|
|
enable = true;
|
|
bun.enable = true;
|
|
};
|
|
|
|
services.postgres = {
|
|
enable = true;
|
|
initialDatabases = [
|
|
{ name = "reviq-dashboard"; }
|
|
{ name = "reviq-dashboard_test"; }
|
|
];
|
|
initialScript = ''
|
|
CREATE USER reviq WITH PASSWORD 'reviq' SUPERUSER;
|
|
GRANT ALL PRIVILEGES ON DATABASE "reviq-dashboard" TO reviq;
|
|
GRANT ALL PRIVILEGES ON DATABASE "reviq-dashboard_test" TO reviq;
|
|
'';
|
|
listen_addresses = "localhost";
|
|
};
|
|
|
|
processes = {
|
|
"dev-publisher-dashboard".exec = "bun run --cwd apps/publisher-dashboard dev";
|
|
"build-watch".exec = "bun run build:watch:packages";
|
|
"api-server".exec = "bun run --cwd apps/api-server dev";
|
|
};
|
|
|
|
env.DATABASE_URL = "postgres://reviq:reviq@localhost/reviq-dashboard";
|
|
env.TEST_DATABASE_URL = "postgres://reviq:reviq@localhost/reviq-dashboard_test";
|
|
|
|
scripts = {
|
|
"db-up".exec = "dbmate up";
|
|
"db-new".exec = "dbmate new \"$1\"";
|
|
"db-status".exec = "dbmate status";
|
|
"db-gen".exec = "bun run --cwd packages/db-schema generate";
|
|
};
|
|
}
|