// The last item is _ which is like -- so our options need to come before it.
constlast=options.pop()!;
// Remove options that won't work or don't make sense.
leti=options.length;
while(i--){
switch(options[i].id){
case"add":
case"diff":
case"file-uri":
case"folder-uri":
case"goto":
case"new-window":
case"reuse-window":
case"wait":
case"disable-gpu":
// TODO: pretty sure these don't work but not 100%.
case"max-memory":
case"prof-startup":
case"inspect-extensions":
case"inspect-brk-extensions":
options.splice(i,1);
break;
constgetArgs=():Args=>{
// The last item is _ which is like -- so our options need to come before it.
constlast=options.pop()!;
// Remove options that won't work or don't make sense.
leti=options.length;
while(i--){
switch(options[i].id){
case"add":
case"diff":
case"file-uri":
case"folder-uri":
case"goto":
case"new-window":
case"reuse-window":
case"wait":
case"disable-gpu":
// TODO: pretty sure these don't work but not 100%.
case"max-memory":
case"prof-startup":
case"inspect-extensions":
case"inspect-brk-extensions":
options.splice(i,1);
break;
}
}
}
options.push({id:"base-path",type:"string",cat:"o",description:"Base path of the URL at which code-server is hosted (used for login redirects)."});
options.push({id:"cert",type:"string",cat:"o",description:"Path to certificate. If the path is omitted, both this and --cert-key will be generated."});
options.push({id:"cert-key",type:"string",cat:"o",description:"Path to the certificate's key if one was provided."});
options.push({id:"extra-builtin-extensions-dir",type:"string",cat:"o",description:"Path to an extra builtin extension directory."});
options.push({id:"extra-extensions-dir",type:"string",cat:"o",description:"Path to an extra user extension directory."});
options.push({id:"host",type:"string",cat:"o",description:"Host for the server."});
options.push({id:"auth",type:"string",cat:"o",description:`The type of authentication to use. ${buildAllowedMessage(AuthType)}.`});
options.push({id:"open",type:"boolean",cat:"o",description:"Open in the browser on startup."});
options.push({id:"port",type:"string",cat:"o",description:"Port for the main server."});
options.push({id:"socket",type:"string",cat:"o",description:"Listen on a socket instead of host:port."});
options.push({id:"base-path",type:"string",cat:"o",description:"Base path of the URL at which code-server is hosted (used for login redirects)."});
options.push({id:"cert",type:"string",cat:"o",description:"Path to certificate. If the path is omitted, both this and --cert-key will be generated."});
options.push({id:"cert-key",type:"string",cat:"o",description:"Path to the certificate's key if one was provided."});
options.push({id:"extra-builtin-extensions-dir",type:"string",cat:"o",description:"Path to an extra builtin extension directory."});
options.push({id:"extra-extensions-dir",type:"string",cat:"o",description:"Path to an extra user extension directory."});
options.push({id:"host",type:"string",cat:"o",description:"Host for the server."});
options.push({id:"auth",type:"string",cat:"o",description:`The type of authentication to use. ${buildAllowedMessage(AuthType)}.`});
options.push({id:"open",type:"boolean",cat:"o",description:"Open in the browser on startup."});
options.push({id:"port",type:"string",cat:"o",description:"Port for the main server."});
options.push({id:"socket",type:"string",cat:"o",description:"Listen on a socket instead of host:port."});