From fb2625dbe85b8da930dbb4872d8d87192128d99e Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 28 Sep 2021 15:38:59 -0700 Subject: [PATCH] chore(cli): export defaultConfigFile + add JSDoc --- src/node/cli.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/node/cli.ts b/src/node/cli.ts index 2433ddf2..91260604 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -502,7 +502,17 @@ export async function setDefaults(cliArgs: Args, configArgs?: ConfigArgs): Promi } as DefaultedArgs // TODO: Technically no guarantee this is fulfilled. } -async function defaultConfigFile(): Promise { +/** + * Helper function to return the default config file. + * + * @returns The default config file: + * + * - bind-addr: 127.0.0.1:8080 + * - auth: password + * - password: + * - cert: false + */ +export async function defaultConfigFile(): Promise { return `bind-addr: 127.0.0.1:8080 auth: password password: ${await generatePassword()}