From 4d295e319500f5001c2e80bc3320334c29302bf2 Mon Sep 17 00:00:00 2001 From: JK Date: Sat, 5 Dec 2020 01:23:48 +0000 Subject: [PATCH 1/3] Modify link arg and its desc to not be beta --- src/node/cli.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/node/cli.ts b/src/node/cli.ts index 571f3958..9ae84878 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -186,10 +186,7 @@ const options: Options> = { Securely bind code-server via Coder Cloud with the passed name. You'll get a URL like https://myname.coder-cloud.com at which you can easily access your code-server instance. Authorization is done via GitHub. - This is presently beta and requires being accepted for testing. - See https://github.com/cdr/code-server/discussions/2137 `, - beta: true, }, } From 9e7e8c073d4bdb9eb2fa0226c1becea316ba1a74 Mon Sep 17 00:00:00 2001 From: JK Date: Sat, 5 Dec 2020 01:30:31 +0000 Subject: [PATCH 2/3] Update cloud program section of README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dd5532d1..76e03b50 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,10 @@ When done, the install script prints out instructions for running and starting c We also have an in-depth [setup and configuration](./doc/guide.md) guide. -### Alpha Program 🐣 +### Cloud Program ☁️ We're working on a cloud platform that makes deploying and managing code-server easier. -Consider updating to the latest version and running code-server with our experimental flag `--link` if you don't want to worry about +Consider running code-server with the flag `--link` if you don't want to worry about - TLS - Authentication From affb92f281fe8295694a7f4f31278b5b4751b359 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Tue, 8 Dec 2020 18:38:20 -0500 Subject: [PATCH 3/3] cli: Show beta flags in help output Looks like ``` -r --reuse-window Force to open a file or folder in an already opened window. -vvv --verbose Enable verbose logging. --link (beta) Securely bind code-server via Coder Cloud with the passed name. You'll get a URL like https://myname.coder-cloud.com at which you can easily access your code-server instance. Authorization is done via GitHub. ``` Based on commits by @JammSpread in #2405 Closes #2396 --- README.md | 2 +- src/node/cli.ts | 47 ++++++++++++++++++++--------------------------- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 76e03b50..1d18de5a 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ We also have an in-depth [setup and configuration](./doc/guide.md) guide. ### Cloud Program ☁️ We're working on a cloud platform that makes deploying and managing code-server easier. -Consider running code-server with the flag `--link` if you don't want to worry about +Consider running code-server with the beta flag `--link` if you don't want to worry about - TLS - Authentication diff --git a/src/node/cli.ts b/src/node/cli.ts index 8178d7e6..209c86a1 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -74,7 +74,7 @@ interface Option { description?: string /** - * If marked as beta, the option is not printed unless $CS_BETA is set. + * If marked as beta, the option is marked as beta in help. */ beta?: boolean } @@ -194,6 +194,7 @@ const options: Options> = { https://myname.coder-cloud.com at which you can easily access your code-server instance. Authorization is done via GitHub. `, + beta: true, }, } @@ -206,32 +207,24 @@ export const optionDescriptions = (): string[] => { }), { short: 0, long: 0 }, ) - return entries - .filter(([, v]) => { - // If CS_BETA is set, we show beta options but if not, then we do not want - // to show beta options. - return process.env.CS_BETA || !v.beta - }) - .map(([k, v]) => { - const help = `${" ".repeat(widths.short - (v.short ? v.short.length : 0))}${ - v.short ? `-${v.short}` : " " - } --${k} ` - return ( - help + - v.description - ?.trim() - .split(/\n/) - .map((line, i) => { - line = line.trim() - if (i === 0) { - return " ".repeat(widths.long - k.length) + line - } - return " ".repeat(widths.long + widths.short + 6) + line - }) - .join("\n") + - (typeof v.type === "object" ? ` [${Object.values(v.type).join(", ")}]` : "") - ) - }) + return entries.map(([k, v]) => { + const help = `${" ".repeat(widths.short - (v.short ? v.short.length : 0))}${v.short ? `-${v.short}` : " "} --${k} ` + return ( + help + + v.description + ?.trim() + .split(/\n/) + .map((line, i) => { + line = line.trim() + if (i === 0) { + return " ".repeat(widths.long - k.length) + (v.beta ? "(beta) " : "") + line + } + return " ".repeat(widths.long + widths.short + 6) + line + }) + .join("\n") + + (typeof v.type === "object" ? ` [${Object.values(v.type).join(", ")}]` : "") + ) + }) } export const parse = (