feat(templates): add JWT generation and expand template variable processing

- Implement generateJwt function for creating JWT tokens
- Add support for 'jwt' and 'jwt:length' template variables
- Introduce new base64 and password generation shortcuts
- Enhance template variable processing with additional utility functions
This commit is contained in:
Mauricio Siu
2025-03-09 21:27:45 -06:00
parent 3a1fa95d17
commit d42a859679
3 changed files with 25 additions and 1 deletions
+4
View File
@@ -63,6 +63,10 @@ export function generateBase64(length: number): string {
.substring(0, length);
}
export function generateJwt(length = 256): string {
return randomBytes(length).toString("hex");
}
/**
* Reads a template's docker-compose.yml file
* First tries to fetch from GitHub, falls back to local cache if fetch fails