@@ -252,7 +252,7 @@ index da4fa3e9d0..50f3e1144f 100644
252252
253253 function processLib() {
254254diff --git a/package.json b/package.json
255- index 86e3d5140d..2e52256e49 100644
255+ index 86e3d5140d..962050280c 100644
256256--- a/package.json
257257+++ b/package.json
258258@@ -42,6 +42,9 @@
@@ -265,6 +265,15 @@ index 86e3d5140d..2e52256e49 100644
265265 "applicationinsights": "1.0.8",
266266 "chokidar": "3.2.3",
267267 "graceful-fs": "4.2.3",
268+ @@ -185,5 +188,8 @@
269+ "windows-foreground-love": "0.2.0",
270+ "windows-mutex": "0.3.0",
271+ "windows-process-tree": "0.2.4"
272+ + },
273+ + "resolutions": {
274+ + "minimist": "^1.2.5"
275+ }
276+ }
268277diff --git a/product.json b/product.json
269278index 5378b017c8..afdadda974 100644
270279--- a/product.json
@@ -713,18 +722,17 @@ index eab8591492..26668701f7 100644
713722 options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`);
714723diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
715724new file mode 100644
716- index 0000000000..649cf32f0a
725+ index 0000000000..8fb2a87303
717726--- /dev/null
718727+++ b/src/vs/server/browser/client.ts
719- @@ -0,0 +1,264 @@
728+ @@ -0,0 +1,208 @@
720729+ import { Emitter } from 'vs/base/common/event';
721730+ import { URI } from 'vs/base/common/uri';
722731+ import { localize } from 'vs/nls';
723732+ import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry';
724733+ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
725734+ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
726735+ import { ILocalizationsService } from 'vs/platform/localizations/common/localizations';
727- + import { ILogService } from 'vs/platform/log/common/log';
728736+ import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
729737+ import { Registry } from 'vs/platform/registry/common/platform';
730738+ import { PersistentConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection';
@@ -886,61 +894,6 @@ index 0000000000..649cf32f0a
886894+ });
887895+ }
888896+
889- + const applyUpdate = async (): Promise<void> => {
890- + (services.get(ILogService) as ILogService).debug("Applying update...");
891- +
892- + const response = await fetch(normalize(`${options.base}/update/apply`), {
893- + headers: { "content-type": "application/json" },
894- + });
895- + const json = await response.json();
896- + if (response.status !== 200 || json.error) {
897- + throw new Error(json.error || response.statusText);
898- + }
899- + (services.get(INotificationService) as INotificationService).info(`Updated to ${json.version}`);
900- + };
901- +
902- + const getUpdate = async (): Promise<void> => {
903- + (services.get(ILogService) as ILogService).debug("Checking for update...");
904- +
905- + const response = await fetch(normalize(`${options.base}/update`), {
906- + headers: { "content-type": "application/json" },
907- + });
908- + const json = await response.json();
909- + if (response.status !== 200 || json.error) {
910- + throw new Error(json.error || response.statusText);
911- + }
912- + if (json.isLatest) {
913- + return;
914- + }
915- +
916- + (services.get(INotificationService) as INotificationService).notify({
917- + severity: Severity.Info,
918- + message: `code-server has an update: ${json.version}`,
919- + actions: {
920- + primary: [{
921- + id: 'update',
922- + label: 'Apply Update',
923- + tooltip: '',
924- + class: undefined,
925- + enabled: true,
926- + checked: true,
927- + dispose: () => undefined,
928- + run: applyUpdate,
929- + }],
930- + }
931- + });
932- + };
933- +
934- + const updateLoop = (): void => {
935- + getUpdate().catch((error) => {
936- + (services.get(ILogService) as ILogService).warn(error);
937- + }).finally(() => {
938- + setTimeout(updateLoop, 300000);
939- + });
940- + };
941- +
942- + updateLoop();
943- +
944897+ // This will be used to set the background color while VS Code loads.
945898+ const theme = (services.get(IStorageService) as IStorageService).get("colorThemeData", StorageScope.GLOBAL);
946899+ if (theme) {
@@ -3465,7 +3418,7 @@ index 153ac595d0..a6eb49c5dd 100644
34653418 import 'vs/workbench/services/credentials/browser/credentialsService';
34663419 import 'vs/workbench/services/url/browser/urlService';
34673420diff --git a/yarn.lock b/yarn.lock
3468- index 6bc96e8377..585401f144 100644
3421+ index 6bc96e8377..a2baf909d6 100644
34693422--- a/yarn.lock
34703423+++ b/yarn.lock
34713424@@ -140,6 +140,23 @@
@@ -3506,7 +3459,35 @@ index 6bc96e8377..585401f144 100644
35063459 just-debounce@^1.0.0:
35073460 version "1.0.0"
35083461 resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea"
3509- @@ -6798,6 +6822,11 @@ p-try@^2.0.0:
3462+ @@ -6009,26 +6033,11 @@ minimatch@0.3:
3463+ dependencies:
3464+ brace-expansion "^1.1.7"
3465+
3466+ - minimist@0.0.8:
3467+ - version "0.0.8"
3468+ - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
3469+ - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
3470+ -
3471+ - minimist@^1.2.0:
3472+ - version "1.2.0"
3473+ - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
3474+ - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
3475+ -
3476+ - minimist@^1.2.5:
3477+ + minimist@0.0.8, minimist@^1.2.0, minimist@^1.2.5, minimist@~0.0.1:
3478+ version "1.2.5"
3479+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
3480+ integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
3481+
3482+ - minimist@~0.0.1:
3483+ - version "0.0.10"
3484+ - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
3485+ - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
3486+ -
3487+ minipass@^2.2.1, minipass@^2.3.3:
3488+ version "2.3.3"
3489+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233"
3490+ @@ -6798,6 +6807,11 @@ p-try@^2.0.0:
35103491 resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1"
35113492 integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==
35123493
0 commit comments