feat: improve address credential connections

This commit is contained in:
Dream Hunter
2026-04-30 15:33:06 +08:00
committed by GitHub
parent 347be5c762
commit 796a5e4ac5
32 changed files with 854 additions and 118 deletions
+9 -1
View File
@@ -1,4 +1,5 @@
import { APIRequestContext } from '@playwright/test';
import type { APIRequestContext } from '@playwright/test';
import { createHash } from 'crypto';
import WebSocket from 'ws';
export const WORKER_URL = process.env.WORKER_URL!;
@@ -10,6 +11,13 @@ export const FRONTEND_URL = process.env.FRONTEND_URL!;
export const MAILPIT_API = process.env.MAILPIT_API!;
export const TEST_DOMAIN = 'test.example.com';
/**
* SHA-256 hash matching the frontend hashPassword utility.
*/
export function hashPassword(password: string): string {
return createHash('sha256').update(password).digest('hex');
}
/**
* Create a new email address via the worker API.
* Appends a timestamp suffix to avoid UNIQUE constraint collisions