1
+ diff --git a/.eslintrc.json b/.eslintrc.json
2
+ index 055bc22f8e48e7dee559b83ac56c12a54c6ad544..14c026c04a7df5ac94bea2856e3a7a513c213775 100644
3
+ --- a/.eslintrc.json
4
+ +++ b/.eslintrc.json
5
+ @@ -64,7 +64,7 @@
6
+ "code-no-standalone-editor": "warn",
7
+ "code-no-unexternalized-strings": "warn",
8
+ "code-layering": [
9
+ - "warn",
10
+ + "off",
11
+ {
12
+ "common": [],
13
+ "node": [
14
+ @@ -90,7 +90,7 @@
15
+ }
16
+ ],
17
+ "code-import-patterns": [
18
+ - "warn",
19
+ + "off",
20
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21
+ // !!! Do not relax these rules !!!
22
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1
23
diff --git a/.gitignore b/.gitignore
2
24
index b7f5b58c8ede171be547c56b61ce76f79a3accc3..856fbd8c67460fe099d7fbee1475e906b500f053 100644
3
25
--- a/.gitignore
@@ -437,7 +459,7 @@ index ef2291d49b13c9c995afc90eab9c92afabc2b3b4..29b2f9dfc2b7fa998ac1188db06dee95
437
459
\ No newline at end of file
438
460
+ }
439
461
diff --git a/src/vs/base/node/languagePacks.js b/src/vs/base/node/languagePacks.js
440
- index 2c64061da7b01aef0bfe3cec851da232ca9461c8..c0ef8faedd406c38bf9c55bbbdbbb060046492d9 100644
462
+ index 2c64061da7b01aef0bfe3cec851da232ca9461c8..db47fe2eb1cded1e9c33b42fe700421c36a1d481 100644
441
463
--- a/src/vs/base/node/languagePacks.js
442
464
+++ b/src/vs/base/node/languagePacks.js
443
465
@@ -128,7 +128,10 @@ function factory(nodeRequire, path, fs, perf) {
@@ -448,12 +470,12 @@ index 2c64061da7b01aef0bfe3cec851da232ca9461c8..c0ef8faedd406c38bf9c55bbbdbbb060
448
470
+ // NOTE@coder: Swapped require with readFile since require is cached and
449
471
+ // we don't restart the server-side portion of code-server when the
450
472
+ // language changes.
451
- + return JSON.parse(fs.readFileSync(configFile, " utf8" ));
473
+ + return JSON.parse(fs.readFileSync(configFile, ' utf8' ));
452
474
} catch (err) {
453
475
// Do nothing. If we can't read the file we have no
454
476
// language pack config.
455
477
diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts
456
- index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..62a79602a831bca0dc62ad57dc10a9375f8b9cdb 100644
478
+ index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..e490cf7449623f96c780a65d538fad72cf9306e4 100644
457
479
--- a/src/vs/code/browser/workbench/workbench.ts
458
480
+++ b/src/vs/code/browser/workbench/workbench.ts
459
481
@@ -17,6 +17,7 @@ import { isStandalone } from 'vs/base/browser/browser';
@@ -496,7 +518,7 @@ index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..62a79602a831bca0dc62ad57dc10a937
496
518
+ };
497
519
+
498
520
+ // Strip the protocol from the authority if it exists.
499
- + const normalizeAuthority = (authority: string): string => authority.replace(/^https?:\/\//, "" );
521
+ + const normalizeAuthority = (authority: string): string => authority.replace(/^https?:\/\//, '' );
500
522
+ if (config.remoteAuthority) {
501
523
+ (config as any).remoteAuthority = normalizeAuthority(config.remoteAuthority);
502
524
+ }
@@ -769,7 +791,7 @@ index 096b9e23493539c9937940a56e555d95bbae38d9..ef37e614004f550f7b64eacd362f6894
769
791
remove(key: string, scope: StorageScope): void {
770
792
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
771
793
new file mode 100644
772
- index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84a892f49d
794
+ index 0000000000000000000000000000000000000000..ead6a3cd5e98fdde074f19ee5043f152ed407146
773
795
--- /dev/null
774
796
+++ b/src/vs/server/browser/client.ts
775
797
@@ -0,0 +1,240 @@
@@ -806,15 +828,15 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
806
828
+ * Remove extra slashes in a URL.
807
829
+ */
808
830
+ export const normalize = (url: string, keepTrailing = false): string => {
809
- + return url.replace(/\/\/+/g, "/" ).replace(/\/+$/, keepTrailing ? "/" : "" );
831
+ + return url.replace(/\/\/+/g, '/' ).replace(/\/+$/, keepTrailing ? '/' : '' );
810
832
+ };
811
833
+
812
834
+ /**
813
835
+ * Get options embedded in the HTML.
814
836
+ */
815
837
+ export const getOptions = <T extends Options>(): T => {
816
838
+ try {
817
- + return JSON.parse(document.getElementById(" coder-options" )!.getAttribute(" data-settings" )!);
839
+ + return JSON.parse(document.getElementById(' coder-options' )!.getAttribute(' data-settings' )!);
818
840
+ } catch (error) {
819
841
+ return {} as T;
820
842
+ }
@@ -927,12 +949,12 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
927
949
+ const logService = (services.get(ILogService) as ILogService);
928
950
+ const storageService = (services.get(IStorageService) as IStorageService);
929
951
+ // We set this here first in case the path changes.
930
- + const updateCheckEndpoint = path.join(window.location.pathname, " /update/check")
952
+ + const updateCheckEndpoint = path.join(window.location.pathname, ' /update/check');
931
953
+ const getUpdate = async (): Promise<void> => {
932
- + logService.debug(" Checking for update..." );
954
+ + logService.debug(' Checking for update...' );
933
955
+
934
956
+ const response = await fetch(updateCheckEndpoint, {
935
- + headers: { " Accept": " application/json" },
957
+ + headers: { ' Accept': ' application/json' },
936
958
+ });
937
959
+ if (!response.ok) {
938
960
+ throw new Error(response.statusText);
@@ -945,7 +967,7 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
945
967
+ return;
946
968
+ }
947
969
+
948
- + const lastNoti = storageService.getNumber(" csLastUpdateNotification" , StorageScope.GLOBAL);
970
+ + const lastNoti = storageService.getNumber(' csLastUpdateNotification' , StorageScope.GLOBAL);
949
971
+ if (lastNoti) {
950
972
+ // Only remind them again after two days.
951
973
+ const timeout = 1000*60*24*2;
@@ -955,7 +977,7 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
955
977
+ }
956
978
+ }
957
979
+
958
- + storageService.store(" csLastUpdateNotification" , Date.now(), StorageScope.GLOBAL);
980
+ + storageService.store(' csLastUpdateNotification' , Date.now(), StorageScope.GLOBAL);
959
981
+ (services.get(INotificationService) as INotificationService).notify({
960
982
+ severity: Severity.Info,
961
983
+ message: `[code-server v${json.latest}](https://github.com/cdr/code-server/releases/tag/v${json.latest}) has been released!`,
@@ -974,9 +996,9 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
974
996
+ updateLoop();
975
997
+
976
998
+ // This will be used to set the background color while VS Code loads.
977
- + const theme = storageService.get(" colorThemeData" , StorageScope.GLOBAL);
999
+ + const theme = storageService.get(' colorThemeData' , StorageScope.GLOBAL);
978
1000
+ if (theme) {
979
- + localStorage.setItem(" colorThemeData" , theme);
1001
+ + localStorage.setItem(' colorThemeData' , theme);
980
1002
+ }
981
1003
+ };
982
1004
+
@@ -1072,7 +1094,7 @@ index 0000000000000000000000000000000000000000..5dd5406befcb593ad6366d9e98f46485
1072
1094
+ export const IExtHostNodeProxy = createDecorator<IExtHostNodeProxy>('IExtHostNodeProxy');
1073
1095
diff --git a/src/vs/server/browser/mainThreadNodeProxy.ts b/src/vs/server/browser/mainThreadNodeProxy.ts
1074
1096
new file mode 100644
1075
- index 0000000000000000000000000000000000000000..21a139288e5b8f56016491879d69d01da929decb
1097
+ index 0000000000000000000000000000000000000000..acabf8c167cabc954b8611a77f57641f3ca0b444
1076
1098
--- /dev/null
1077
1099
+++ b/src/vs/server/browser/mainThreadNodeProxy.ts
1078
1100
@@ -0,0 +1,55 @@
@@ -1115,7 +1137,7 @@ index 0000000000000000000000000000000000000000..21a139288e5b8f56016491879d69d01d
1115
1137
+ scheme: window.location.protocol.replace(':', ''),
1116
1138
+ authority: window.location.host,
1117
1139
+ // Use FileAccess to get the static base path.
1118
- + path: FileAccess.asBrowserUri("" , require).path,
1140
+ + path: FileAccess.asBrowserUri('' , require).path,
1119
1141
+ query: `tar=${encodeURIComponent(extensionUri.path)}`,
1120
1142
+ });
1121
1143
+ const response = await fetch(fetchUri.toString(true));
@@ -1405,7 +1427,7 @@ index 0000000000000000000000000000000000000000..56331ff1fc32bbd82e769aaecb551e42
1405
1427
+ require('../../bootstrap-amd').load('vs/server/entry');
1406
1428
diff --git a/src/vs/server/ipc.d.ts b/src/vs/server/ipc.d.ts
1407
1429
new file mode 100644
1408
- index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78fc72a5c6
1430
+ index 0000000000000000000000000000000000000000..0a4a91e5e36bda7f888feedda348aaff5fe32d27
1409
1431
--- /dev/null
1410
1432
+++ b/src/vs/server/ipc.d.ts
1411
1433
@@ -0,0 +1,131 @@
@@ -1518,8 +1540,8 @@ index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78
1518
1540
+ readonly logLevel?: number;
1519
1541
+ readonly workspaceProvider?: {
1520
1542
+ payload: [
1521
- + [" userDataPath" , string],
1522
- + [" enableProposedApi" , string],
1543
+ + [' userDataPath' , string],
1544
+ + [' enableProposedApi' , string],
1523
1545
+ ];
1524
1546
+ };
1525
1547
+ };
@@ -1542,7 +1564,7 @@ index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78
1542
1564
+ }
1543
1565
diff --git a/src/vs/server/node/channel.ts b/src/vs/server/node/channel.ts
1544
1566
new file mode 100644
1545
- index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1e95c3b9d
1567
+ index 0000000000000000000000000000000000000000..4827b2da780b66e6dfd65c2a2f1c938cb23f6c26
1546
1568
--- /dev/null
1547
1569
+++ b/src/vs/server/node/channel.ts
1548
1570
@@ -0,0 +1,897 @@
@@ -1976,7 +1998,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
1976
1998
+ class Terminal {
1977
1999
+ private readonly process: TerminalProcess;
1978
2000
+ private _pid: number = -1;
1979
- + private _title: string = "" ;
2001
+ + private _title: string = '' ;
1980
2002
+ public readonly workspaceId: string;
1981
2003
+ public readonly workspaceName: string;
1982
2004
+ private readonly persist: boolean;
@@ -2013,7 +2035,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
2013
2035
+ onFirstListenerDidAdd: () => {
2014
2036
+ // We only need to replay if the terminal is being reconnected which is
2015
2037
+ // true if there is a dispose timeout.
2016
- + if (typeof this.disposeTimeout !== " undefined" ) {
2038
+ + if (typeof this.disposeTimeout !== ' undefined' ) {
2017
2039
+ return;
2018
2040
+ }
2019
2041
+
@@ -2026,7 +2048,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
2026
2048
+ events: [{
2027
2049
+ cols: this.cols,
2028
2050
+ rows: this.rows,
2029
- + data: this.replayData.join("" ),
2051
+ + data: this.replayData.join('' ),
2030
2052
+ }]
2031
2053
+ });
2032
2054
+ },
@@ -2245,15 +2267,15 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
2245
2267
+
2246
2268
+ private async createTerminalProcess(remoteAuthority: string, args: terminal.ICreateTerminalProcessArguments): Promise<terminal.ICreateTerminalProcessResult> {
2247
2269
+ const terminalId = this.id++;
2248
- + logger.debug('Creating terminal', field('id', terminalId), field(" terminals" , this.terminals.size));
2270
+ + logger.debug('Creating terminal', field('id', terminalId), field(' terminals' , this.terminals.size));
2249
2271
+
2250
2272
+ const shellLaunchConfig: IShellLaunchConfig = {
2251
2273
+ name: args.shellLaunchConfig.name,
2252
2274
+ executable: args.shellLaunchConfig.executable,
2253
2275
+ args: args.shellLaunchConfig.args,
2254
2276
+ // TODO: Should we transform if it's a string as well? The incoming
2255
2277
+ // transform only takes `UriComponents` so I suspect it's not necessary.
2256
- + cwd: typeof args.shellLaunchConfig.cwd !== " string"
2278
+ + cwd: typeof args.shellLaunchConfig.cwd !== ' string'
2257
2279
+ ? transformIncoming(remoteAuthority, args.shellLaunchConfig.cwd)
2258
2280
+ : args.shellLaunchConfig.cwd,
2259
2281
+ env: args.shellLaunchConfig.env,
@@ -2445,7 +2467,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
2445
2467
+ }
2446
2468
diff --git a/src/vs/server/node/connection.ts b/src/vs/server/node/connection.ts
2447
2469
new file mode 100644
2448
- index 0000000000000000000000000000000000000000..93062cadc627c61e0829c27a72894b81e6a0e039
2470
+ index 0000000000000000000000000000000000000000..51f10fec9486a5f4b8ce04140a42b8cdcebe1ad6
2449
2471
--- /dev/null
2450
2472
+++ b/src/vs/server/node/connection.ts
2451
2473
@@ -0,0 +1,171 @@
@@ -2529,7 +2551,7 @@ index 0000000000000000000000000000000000000000..93062cadc627c61e0829c27a72894b81
2529
2551
+ private readonly environment: INativeEnvironmentService,
2530
2552
+ ) {
2531
2553
+ super(protocol, token);
2532
- + this.logger = logger.named(" exthost" , field(" token" , token));
2554
+ + this.logger = logger.named(' exthost' , field(' token' , token));
2533
2555
+ this.protocol.dispose();
2534
2556
+ this.spawn(locale, buffer).then((p) => this.process = p);
2535
2557
+ this.protocol.getUnderlyingSocket().pause();
@@ -2611,7 +2633,7 @@ index 0000000000000000000000000000000000000000..93062cadc627c61e0829c27a72894b81
2611
2633
+ this.sendInitMessage(buffer);
2612
2634
+ break;
2613
2635
+ default:
2614
- + this.logger.error('Unexpected message', field(" event" , event));
2636
+ + this.logger.error('Unexpected message', field(' event' , event));
2615
2637
+ break;
2616
2638
+ }
2617
2639
+ });
@@ -3101,7 +3123,7 @@ index 0000000000000000000000000000000000000000..3d428a57d31f29c40f9c3ce45f715b44
3101
3123
+ };
3102
3124
diff --git a/src/vs/server/node/protocol.ts b/src/vs/server/node/protocol.ts
3103
3125
new file mode 100644
3104
- index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84924213db
3126
+ index 0000000000000000000000000000000000000000..57213f92828fafefcab0e3c401a1e8ede472c9cc
3105
3127
--- /dev/null
3106
3128
+++ b/src/vs/server/node/protocol.ts
3107
3129
@@ -0,0 +1,91 @@
@@ -3143,7 +3165,7 @@ index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84
3143
3165
+ return new Promise((resolve, reject) => {
3144
3166
+ const timeout = setTimeout(() => {
3145
3167
+ logger.error('Handshake timed out', field('token', this.options.reconnectionToken));
3146
- + reject(new Error(" timed out" ));
3168
+ + reject(new Error(' timed out' ));
3147
3169
+ }, 10000); // Matches the client timeout.
3148
3170
+
3149
3171
+ const handler = this.onControlMessage((rawMessage) => {
@@ -3198,7 +3220,7 @@ index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84
3198
3220
+ }
3199
3221
diff --git a/src/vs/server/node/server.ts b/src/vs/server/node/server.ts
3200
3222
new file mode 100644
3201
- index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb1261051c71e08b
3223
+ index 0000000000000000000000000000000000000000..5521d51a92d1b1e3469e890bae41277b560d08a2
3202
3224
--- /dev/null
3203
3225
+++ b/src/vs/server/node/server.ts
3204
3226
@@ -0,0 +1,302 @@
@@ -3212,7 +3234,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
3212
3234
+ import { getMachineId } from 'vs/base/node/id';
3213
3235
+ import { ClientConnectionEvent, createChannelReceiver, IPCServer, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
3214
3236
+ import { LogsDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner';
3215
- + import { main } from " vs/code/node/cliProcessMain" ;
3237
+ + import { main } from ' vs/code/node/cliProcessMain' ;
3216
3238
+ import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
3217
3239
+ import { ConfigurationService } from 'vs/platform/configuration/common/configurationService';
3218
3240
+ import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc';
@@ -3260,7 +3282,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
3260
3282
+ import { Protocol } from 'vs/server/node/protocol';
3261
3283
+ import { getUriTransformer } from 'vs/server/node/util';
3262
3284
+ import { REMOTE_TERMINAL_CHANNEL_NAME } from 'vs/workbench/contrib/terminal/common/remoteTerminalChannel';
3263
- + import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from " vs/workbench/services/remote/common/remoteAgentFileSystemChannel" ;
3285
+ + import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from ' vs/workbench/services/remote/common/remoteAgentFileSystemChannel' ;
3264
3286
+ import { RemoteExtensionLogFileName } from 'vs/workbench/services/remote/common/remoteAgentService';
3265
3287
+
3266
3288
+ export class Vscode {
@@ -3306,8 +3328,8 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
3306
3328
+ logLevel: getLogLevel(environment),
3307
3329
+ workspaceProvider: {
3308
3330
+ payload: [
3309
- + [" userDataPath" , environment.userDataPath],
3310
- + [" enableProposedApi" , JSON.stringify(options.args[" enable-proposed-api" ] || [])]
3331
+ + [' userDataPath' , environment.userDataPath],
3332
+ + [' enableProposedApi' , JSON.stringify(options.args[' enable-proposed-api' ] || [])]
3311
3333
+ ],
3312
3334
+ },
3313
3335
+ },
@@ -3407,7 +3429,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
3407
3429
+ const offline = Array.from(connections.values())
3408
3430
+ .filter((connection) => typeof connection.offline !== 'undefined');
3409
3431
+ for (let i = 0, max = offline.length - this.maxExtraOfflineConnections; i < max; ++i) {
3410
- + logger.debug('Disposing offline connection', field(" token" , offline[i].token));
3432
+ + logger.debug('Disposing offline connection', field(' token' , offline[i].token));
3411
3433
+ offline[i].dispose();
3412
3434
+ }
3413
3435
+ }
@@ -3506,7 +3528,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
3506
3528
+ }
3507
3529
diff --git a/src/vs/server/node/util.ts b/src/vs/server/node/util.ts
3508
3530
new file mode 100644
3509
- index 0000000000000000000000000000000000000000..fa47e993b46802f1a26457649e9e8bc467a73bf2
3531
+ index 0000000000000000000000000000000000000000..d76f655e36647b1c9d38d2f7986f2b78a4bcfb50
3510
3532
--- /dev/null
3511
3533
+++ b/src/vs/server/node/util.ts
3512
3534
@@ -0,0 +1,13 @@
@@ -3521,7 +3543,7 @@ index 0000000000000000000000000000000000000000..fa47e993b46802f1a26457649e9e8bc4
3521
3543
+ * preserves slashes so it can be edited by hand more easily.
3522
3544
+ */
3523
3545
+ export const encodePath = (path: string): string => {
3524
- + return path.split("/" ).map((p) => encodeURIComponent(p)).join("/" );
3546
+ + return path.split('/' ).map((p) => encodeURIComponent(p)).join('/' );
3525
3547
+ };
3526
3548
diff --git a/src/vs/workbench/api/browser/extensionHost.contribution.ts b/src/vs/workbench/api/browser/extensionHost.contribution.ts
3527
3549
index a4df8523631563a498c9ab6e51105074616a481a..f03da094e9080544102bbd3f037a71b348e5bd83 100644
@@ -3692,7 +3714,7 @@ index b3c89e51cfc25a53293a352a2a8ad50d5f26d595..e21abe4e13bc25a5b72f556bbfb61085
3692
3714
registerSingleton(IExtHostTunnelService, ExtHostTunnelService);
3693
3715
+ registerSingleton(IExtHostNodeProxy, class extends NotImplementedProxy<IExtHostNodeProxy>(String(IExtHostNodeProxy)) { whenReady = Promise.resolve(); });
3694
3716
diff --git a/src/vs/workbench/api/node/extHostCLIServer.ts b/src/vs/workbench/api/node/extHostCLIServer.ts
3695
- index b3857616f7006127c423dcef7020ae4653da5ff6..1c1b80a2767bf77f30ca5bfee715c337120d3625 100644
3717
+ index b3857616f7006127c423dcef7020ae4653da5ff6..594cd75b546a4b845e56122c846f63e29dc5f948 100644
3696
3718
--- a/src/vs/workbench/api/node/extHostCLIServer.ts
3697
3719
+++ b/src/vs/workbench/api/node/extHostCLIServer.ts
3698
3720
@@ -11,6 +11,8 @@ import { IWindowOpenable, IOpenWindowOptions } from 'vs/platform/windows/common/
@@ -3709,7 +3731,7 @@ index b3857616f7006127c423dcef7020ae4653da5ff6..1c1b80a2767bf77f30ca5bfee715c337
3709
3731
3710
3732
private async setup(): Promise<string> {
3711
3733
+ // NOTE@coder: Write this out so we can get the most recent path.
3712
- + fs.promises.writeFile(join(tmpdir(), " vscode-ipc" ), this._ipcHandlePath).catch((error) => {
3734
+ + fs.promises.writeFile(join(tmpdir(), ' vscode-ipc' ), this._ipcHandlePath).catch((error) => {
3713
3735
+ this.logService.error(error);
3714
3736
+ });
3715
3737
+
@@ -3734,7 +3756,7 @@ index 3843fdec386edc09a1d361b63de892a04e0070ed..8aac4df527857e964798362a69f5591b
3734
3756
registerSingleton(ILogService, ExtHostLogService);
3735
3757
+ registerSingleton(IExtHostNodeProxy, ExtHostNodeProxy);
3736
3758
diff --git a/src/vs/workbench/api/worker/extHostExtensionService.ts b/src/vs/workbench/api/worker/extHostExtensionService.ts
3737
- index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..814dd0ff2fa7737e07833d8092c8f48953c73c47 100644
3759
+ index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..4474a93beba03365709c3cda98b682131ad4745f 100644
3738
3760
--- a/src/vs/workbench/api/worker/extHostExtensionService.ts
3739
3761
+++ b/src/vs/workbench/api/worker/extHostExtensionService.ts
3740
3762
@@ -11,6 +11,7 @@ import { RequireInterceptor } from 'vs/workbench/api/common/extHostRequireInterc
@@ -3752,7 +3774,7 @@ index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..814dd0ff2fa7737e07833d8092c8f489
3752
3774
- return extensionDescription.browser;
3753
3775
+ // NOTE@coder: We can support regular Node modules as well. These will just
3754
3776
+ // require the root of the extension.
3755
- + return extensionDescription.browser || "." ;
3777
+ + return extensionDescription.browser || '.' ;
3756
3778
}
3757
3779
3758
3780
- protected async _loadCommonJSModule<T>(module: URI, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
@@ -3954,7 +3976,7 @@ index 85d83f37da179a1e39266cf72a02e971f590308e..0659738b36df1747c9afcabf8d9abf26
3954
3976
};
3955
3977
3956
3978
diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts
3957
- index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..8e122c761ac7ddfee11f9dda2ac5e845b893cc28 100644
3979
+ index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..d051473515e35b331672b780109bd40229153c8c 100644
3958
3980
--- a/src/vs/workbench/services/environment/browser/environmentService.ts
3959
3981
+++ b/src/vs/workbench/services/environment/browser/environmentService.ts
3960
3982
@@ -119,8 +119,25 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
@@ -3975,9 +3997,9 @@ index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..8e122c761ac7ddfee11f9dda2ac5e845
3975
3997
+ get userRoamingDataHome(): URI { return joinPath(URI.file(this.userDataPath).with({ scheme: Schemas.vscodeRemote }), 'User'); }
3976
3998
+ @memoize
3977
3999
+ get userDataPath(): string {
3978
- + const dataPath = this.payload?.get(" userDataPath" );
4000
+ + const dataPath = this.payload?.get(' userDataPath' );
3979
4001
+ if (!dataPath) {
3980
- + throw new Error(" userDataPath was not provided to environment service" );
4002
+ + throw new Error(' userDataPath was not provided to environment service' );
3981
4003
+ }
3982
4004
+ return dataPath;
3983
4005
+ }
@@ -4039,9 +4061,18 @@ index de7e301d3f0c67ce662827f61427a5a7b3616b9f..877ea8e11e6e6d34b9a8fe16287af309
4039
4061
}
4040
4062
4041
4063
diff --git a/src/vs/workbench/services/extensions/browser/extensionService.ts b/src/vs/workbench/services/extensions/browser/extensionService.ts
4042
- index 1dff19bf177eff24f722b748b79835a653241c4d..0f59ad290c82cc4c9d09c565c1018cc275ca0249 100644
4064
+ index 1dff19bf177eff24f722b748b79835a653241c4d..01ce9bc00cc39c27e75db006425c359f813a4719 100644
4043
4065
--- a/src/vs/workbench/services/extensions/browser/extensionService.ts
4044
4066
+++ b/src/vs/workbench/services/extensions/browser/extensionService.ts
4067
+ @@ -87,7 +87,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
4068
+ if (code === ExtensionHostExitCode.StartTimeout10s) {
4069
+ this._notificationService.prompt(
4070
+ Severity.Error,
4071
+ - nls.localize('extensionService.startTimeout', "The Web Worker Extension Host did not start in 10s."),
4072
+ + nls.localize('extensionService.startTimeout', 'The Web Worker Extension Host did not start in 10s.'),
4073
+ []
4074
+ );
4075
+ return;
4045
4076
@@ -177,8 +177,10 @@ export class ExtensionService extends AbstractExtensionService implements IExten
4046
4077
this._remoteAgentService.getEnvironment(),
4047
4078
this._remoteAgentService.scanExtensions()
@@ -4050,10 +4081,19 @@ index 1dff19bf177eff24f722b748b79835a653241c4d..0f59ad290c82cc4c9d09c565c1018cc2
4050
4081
remoteExtensions = this._checkEnabledAndProposedAPI(remoteExtensions);
4051
4082
+ // NOTE@coder: Include remotely hosted extensions that should run locally.
4052
4083
+ localExtensions = this._checkEnabledAndProposedAPI(localExtensions)
4053
- + .concat(remoteExtensions.filter(ext => !ext.browser && ext.extensionKind && (ext.extensionKind === " web" || ext.extensionKind.includes(" web" ))));
4084
+ + .concat(remoteExtensions.filter(ext => !ext.browser && ext.extensionKind && (ext.extensionKind === ' web' || ext.extensionKind.includes(' web' ))));
4054
4085
4055
4086
const remoteAgentConnection = this._remoteAgentService.getConnection();
4056
4087
this._runningLocation = this._runningLocationClassifier.determineRunningLocation(localExtensions, remoteExtensions);
4088
+ @@ -188,7 +190,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
4089
+
4090
+ const result = this._registry.deltaExtensions(remoteExtensions.concat(localExtensions), []);
4091
+ if (result.removedDueToLooping.length > 0) {
4092
+ - this._logOrShowMessage(Severity.Error, nls.localize('looping', "The following extensions contain dependency loops and have been disabled: {0}", result.removedDueToLooping.map(e => `'${e.identifier.value}'`).join(', ')));
4093
+ + this._logOrShowMessage(Severity.Error, nls.localize('looping', 'The following extensions contain dependency loops and have been disabled: {0}', result.removedDueToLooping.map(e => `'${e.identifier.value}'`).join(', ')));
4094
+ }
4095
+
4096
+ if (remoteEnv && remoteAgentConnection) {
4057
4097
diff --git a/src/vs/workbench/services/extensions/common/extensionsUtil.ts b/src/vs/workbench/services/extensions/common/extensionsUtil.ts
4058
4098
index 65e532ee58dfc06ed944846d01b885cb8f260ebc..0b6282fde7ad03c7ea9872a777cbf487253abed1 100644
4059
4099
--- a/src/vs/workbench/services/extensions/common/extensionsUtil.ts
0 commit comments