(length: number)
| 25 | }; |
| 26 | |
| 27 | function generatePassword(length: number) { |
| 28 | const charset = |
| 29 | 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
| 30 | let password = ''; |
| 31 | for (let i = 0, n = charset.length; i < length; ++i) { |
| 32 | password += charset.charAt(Math.floor(Math.random() * n)); |
| 33 | } |
| 34 | return password; |
| 35 | } |
| 36 | |
| 37 | function writeCaddyfile(domainName: string, basicAuthPassword: string) { |
| 38 | const caddyfileTemplatePath = path.resolve( |
no outgoing calls
no test coverage detected