(args: UserProvidedArgs)
| 499 | * Redact sensitive information from arguments for logging. |
| 500 | */ |
| 501 | export const redactArgs = (args: UserProvidedArgs): UserProvidedArgs => { |
| 502 | return { |
| 503 | ...args, |
| 504 | password: args.password ? "<redacted>" : undefined, |
| 505 | "hashed-password": args["hashed-password"] ? "<redacted>" : undefined, |
| 506 | "github-auth": args["github-auth"] ? "<redacted>" : undefined, |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | /** |
| 511 | * User-provided arguments with defaults. The distinction between user-provided |