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

View File

@@ -349,7 +349,7 @@ describe("processTemplate", () => {
{
serviceName: "plausible",
port: 8000,
host: "${randomDomain}",
host: "${hash}",
},
],
env: {
@@ -367,6 +367,7 @@ describe("processTemplate", () => {
};
const result = processTemplate(template, mockSchema);
console.log(result);
expect(result.envs).toHaveLength(3);
expect(result.domains).toHaveLength(1);
expect(result.mounts).toHaveLength(1);