You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
' --no-launch Do not open VSCode web in the browser\n'+
52
55
' --wrap-iframe Wrap the Web Worker Extension Host in an iframe\n'+
56
+
' --enable-sync Enable sync by default\n'+
53
57
' --scheme Protocol (https or http)\n'+
54
58
' --host Remote host\n'+
55
59
' --port Remote/Local port\n'+
56
60
' --local_port Local port override\n'+
57
61
' --extension Path of an extension to include\n'+
62
+
' --github-auth Github authentication token\n'+
58
63
' --verbose Print out more information\n'+
59
64
' --help\n'+
60
65
'[Example]\n'+
@@ -356,14 +361,38 @@ async function handleRoot(req, res) {
356
361
constwebConfigJSON={
357
362
folderUri: folderUri,
358
363
staticExtensions,
364
+
enableSyncByDefault: args['enable-sync'],
359
365
};
360
366
if(args['wrap-iframe']){
361
367
webConfigJSON._wrapWebWorkerExtHostInIframe=true;
362
368
}
363
369
370
+
constcredentials=[];
371
+
if(args['github-auth']){
372
+
constsessionId=uuid.v4();
373
+
credentials.push({
374
+
service: 'code-oss.login',
375
+
account: 'account',
376
+
password: JSON.stringify({
377
+
id: sessionId,
378
+
providerId: 'github',
379
+
accessToken: args['github-auth']
380
+
})
381
+
},{
382
+
service: 'code-oss-github.login',
383
+
account: 'account',
384
+
password: JSON.stringify([{
385
+
id: sessionId,
386
+
scopes: ['user:email'],
387
+
accessToken: args['github-auth']
388
+
}])
389
+
});
390
+
}
391
+
364
392
constdata=(awaitreadFile(WEB_MAIN)).toString()
365
393
.replace('{{WORKBENCH_WEB_CONFIGURATION}}',()=>escapeAttribute(JSON.stringify(webConfigJSON)))// use a replace function to avoid that regexp replace patterns ($&, $0, ...) are applied
0 commit comments