// Directory input
await resolveOutputPath({ out: './certs/', defaultFilename: 'cert.pem' })
// → { filePath: './certs/cert.pem', directory: './certs', filename: 'cert.pem' }
// File path input
await resolveOutputPath({ out: './certs/my-cert.pem', defaultFilename: 'cert.pem' })
// → { filePath: './certs/my-cert.pem', directory: './certs', filename: 'my-cert.pem' }
// No input (use defaults)
await resolveOutputPath({ defaultDir: './certs', defaultFilename: 'cert.pem' })
// → { filePath: './certs/cert.pem', directory: './certs', filename: 'cert.pem' }
Resolve output path from --out option.
Behavior: