@@ -67,9 +67,9 @@ interface Option<T> {
67
67
description ?: string
68
68
69
69
/**
70
- * Whether to print this option in --help output
70
+ * If marked as beta, the option is not printed unless $CS_BETA is set.
71
71
*/
72
- hidden ?: boolean
72
+ beta ?: boolean
73
73
}
74
74
75
75
type OptionType < T > = T extends boolean
@@ -170,8 +170,10 @@ const options: Options<Required<Args>> = {
170
170
Securely bind code-server via Coder Cloud with the passed name. You'll get a URL like
171
171
https://myname.coder-cloud.com at which you can easily access your code-server instance.
172
172
Authorization is done via GitHub.
173
+ This is presently beta and requires being accepted for testing.
174
+ See https://github.com/cdr/code-server/discussions/2137
173
175
` ,
174
- hidden : true ,
176
+ beta : true ,
175
177
} ,
176
178
}
177
179
@@ -184,24 +186,32 @@ export const optionDescriptions = (): string[] => {
184
186
} ) ,
185
187
{ short : 0 , long : 0 } ,
186
188
)
187
- return entries . filter ( ( [ _ , v ] ) => ! v . hidden ) . map ( ( [ k , v ] ) => {
188
- const help = `${ " " . repeat ( widths . short - ( v . short ? v . short . length : 0 ) ) } ${ v . short ? `-${ v . short } ` : " " } --${ k } `
189
- return (
190
- help +
191
- v . description
192
- ?. trim ( )
193
- . split ( / \n / )
194
- . map ( ( line , i ) => {
195
- line = line . trim ( )
196
- if ( i === 0 ) {
197
- return " " . repeat ( widths . long - k . length ) + line
198
- }
199
- return " " . repeat ( widths . long + widths . short + 6 ) + line
200
- } )
201
- . join ( "\n" ) +
202
- ( typeof v . type === "object" ? ` [${ Object . values ( v . type ) . join ( ", " ) } ]` : "" )
203
- )
204
- } )
189
+ return entries
190
+ . filter ( ( [ , v ] ) => {
191
+ // If CS_BETA is set, we show beta options but if not, then we do not want
192
+ // to show beta options.
193
+ return process . env . CS_BETA || ! v . beta
194
+ } )
195
+ . map ( ( [ k , v ] ) => {
196
+ const help = `${ " " . repeat ( widths . short - ( v . short ? v . short . length : 0 ) ) } ${
197
+ v . short ? `-${ v . short } ` : " "
198
+ } --${ k } `
199
+ return (
200
+ help +
201
+ v . description
202
+ ?. trim ( )
203
+ . split ( / \n / )
204
+ . map ( ( line , i ) => {
205
+ line = line . trim ( )
206
+ if ( i === 0 ) {
207
+ return " " . repeat ( widths . long - k . length ) + line
208
+ }
209
+ return " " . repeat ( widths . long + widths . short + 6 ) + line
210
+ } )
211
+ . join ( "\n" ) +
212
+ ( typeof v . type === "object" ? ` [${ Object . values ( v . type ) . join ( ", " ) } ]` : "" )
213
+ )
214
+ } )
205
215
}
206
216
207
217
export const parse = (
0 commit comments