feat(cli): add cli command to recreate credentials admin (#2779)

* feat(cli): add cli command to recreate credentials admin

* fix: add missing username validation

* fix: deepsource issue
This commit is contained in:
Meier Lukas
2025-04-03 23:22:31 +02:00
committed by GitHub
parent f9aeb8ffe3
commit 674253262b
6 changed files with 103 additions and 3 deletions

View File

@@ -37,6 +37,6 @@ export {
type BoardItemIntegration,
} from "./shared";
export { superRefineCertificateFile } from "./certificates";
export { passwordRequirements } from "./user";
export { passwordRequirements, usernameSchema } from "./user";
export { supportedMediaUploadFormats } from "./media";
export { zodEnumFromArray, zodUnionFromArray } from "./enums";

View File

@@ -8,7 +8,7 @@ import { zodEnumFromArray } from "./enums";
import { createCustomErrorParams } from "./form/i18n";
// We always want the lowercase version of the username to compare it in a case-insensitive way
const usernameSchema = z.string().trim().toLowerCase().min(3).max(255);
export const usernameSchema = z.string().trim().toLowerCase().min(3).max(255);
const regexCheck = (regex: RegExp) => (value: string) => regex.test(value);
export const passwordRequirements = [