@@ -74,7 +74,7 @@ interface Option<T> {
7474 description ?: string
7575
7676 /**
77- * If marked as beta, the option is not printed unless $CS_BETA is set .
77+ * If marked as beta, the option is marked as beta in help .
7878 */
7979 beta ?: boolean
8080}
@@ -193,8 +193,6 @@ const options: Options<Required<Args>> = {
193193 Securely bind code-server via Coder Cloud with the passed name. You'll get a URL like
194194 https://myname.coder-cloud.com at which you can easily access your code-server instance.
195195 Authorization is done via GitHub.
196- This is presently beta and requires being accepted for testing.
197- See https://github.com/cdr/code-server/discussions/2137
198196 ` ,
199197 beta : true ,
200198 } ,
@@ -209,32 +207,24 @@ export const optionDescriptions = (): string[] => {
209207 } ) ,
210208 { short : 0 , long : 0 } ,
211209 )
212- return entries
213- . filter ( ( [ , v ] ) => {
214- // If CS_BETA is set, we show beta options but if not, then we do not want
215- // to show beta options.
216- return process . env . CS_BETA || ! v . beta
217- } )
218- . map ( ( [ k , v ] ) => {
219- const help = `${ " " . repeat ( widths . short - ( v . short ? v . short . length : 0 ) ) } ${
220- v . short ? `-${ v . short } ` : " "
221- } --${ k } `
222- return (
223- help +
224- v . description
225- ?. trim ( )
226- . split ( / \n / )
227- . map ( ( line , i ) => {
228- line = line . trim ( )
229- if ( i === 0 ) {
230- return " " . repeat ( widths . long - k . length ) + line
231- }
232- return " " . repeat ( widths . long + widths . short + 6 ) + line
233- } )
234- . join ( "\n" ) +
235- ( typeof v . type === "object" ? ` [${ Object . values ( v . type ) . join ( ", " ) } ]` : "" )
236- )
237- } )
210+ return entries . map ( ( [ k , v ] ) => {
211+ const help = `${ " " . repeat ( widths . short - ( v . short ? v . short . length : 0 ) ) } ${ v . short ? `-${ v . short } ` : " " } --${ k } `
212+ return (
213+ help +
214+ v . description
215+ ?. trim ( )
216+ . split ( / \n / )
217+ . map ( ( line , i ) => {
218+ line = line . trim ( )
219+ if ( i === 0 ) {
220+ return " " . repeat ( widths . long - k . length ) + ( v . beta ? "(beta) " : "" ) + line
221+ }
222+ return " " . repeat ( widths . long + widths . short + 6 ) + line
223+ } )
224+ . join ( "\n" ) +
225+ ( typeof v . type === "object" ? ` [${ Object . values ( v . type ) . join ( ", " ) } ]` : "" )
226+ )
227+ } )
238228}
239229
240230export const parse = (
0 commit comments