@@ -369,32 +369,17 @@ async function handleRoot(req, res) {
webConfigJSON._wrapWebWorkerExtHostInIframe=true;
}
constcredentials=[];
if(args['github-auth']){
constsessionId=uuid.v4();
credentials.push({
service:'code-oss.login',
account:'account',
password:JSON.stringify({
id:sessionId,
constauthSessionInfo=args['github-auth']?{
id:uuid.v4(),
providerId:'github',
accessToken:args['github-auth']
})
},{
service:'code-oss-github.login',
account:'account',
password:JSON.stringify([{
id:sessionId,
scopes:['user:email'],
accessToken:args['github-auth']
}])
});
}
accessToken:args['github-auth'],
scopes:[['user:email'],['repo']]
}:undefined;
constdata=(awaitreadFile(WEB_MAIN)).toString()
.replace('{{WORKBENCH_WEB_CONFIGURATION}}',()=>escapeAttribute(JSON.stringify(webConfigJSON)))// use a replace function to avoid that regexp replace patterns ($&, $0, ...) are applied