mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(templates): add username and email generation using faker
This commit is contained in:
parent
b9de05015f
commit
9a839de022
@ -1,3 +1,4 @@
|
||||
import { faker } from "@faker-js/faker";
|
||||
import type { Schema } from "./index";
|
||||
import {
|
||||
generateBase64,
|
||||
@ -117,6 +118,14 @@ function processValue(
|
||||
return generateJwt(length);
|
||||
}
|
||||
|
||||
if (varName === "username") {
|
||||
return faker.internet.userName().toLowerCase();
|
||||
}
|
||||
|
||||
if (varName === "email") {
|
||||
return faker.internet.email().toLowerCase();
|
||||
}
|
||||
|
||||
// If not a utility function, try to get from variables
|
||||
return variables[varName] || match;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user