@codingame/monaco-vscode-host-service-override 9.0.2 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-host-service-override",
3
- "version": "9.0.2",
3
+ "version": "10.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@9.0.2"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@10.0.0"
30
30
  }
31
31
  }
@@ -1,7 +1,6 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
3
3
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
4
- import 'vscode/vscode/vs/platform/instantiation/common/extensions';
5
4
  import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService.service';
6
5
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
7
6
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
@@ -9,7 +8,6 @@ import { isFolderToOpen, isWorkspaceToOpen, isFileToOpen } from 'vscode/vscode/v
9
8
  import { pathsToEditors, isResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor';
10
9
  import { whenEditorClosed } from 'vscode/vscode/vs/workbench/browser/editor';
11
10
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
12
- import { Verbosity } from 'vscode/vscode/vs/platform/label/common/label';
13
11
  import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
14
12
  import { ModifierKeyEmitter, onDidRegisterWindow, trackFocus, getActiveDocument, getWindowId, disposableWindowInterval, detectFullscreen, EventType, addDisposableListener, addDisposableThrottledListener } from 'vscode/vscode/vs/base/browser/dom';
15
13
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
@@ -17,7 +15,6 @@ import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/
17
15
  import { memoize } from 'vscode/vscode/vs/base/common/decorators';
18
16
  import { parseLineAndColumnAware } from 'vscode/vscode/vs/base/common/extpath';
19
17
  import { IWorkspaceEditingService } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceEditing.service';
20
- import { ShutdownReason } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
21
18
  import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
22
19
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
23
20
  import { getWorkspaceIdentifier } from 'vscode/vscode/vs/workbench/services/workspaces/browser/workspaces';
@@ -29,7 +26,6 @@ import { isUndefined } from 'vscode/vscode/vs/base/common/types';
29
26
  import { isTemporaryWorkspace } from 'vscode/vscode/vs/platform/workspace/common/workspace';
30
27
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
31
28
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
32
- import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
33
29
  import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
34
30
  import { mainWindow, isAuxiliaryWindow } from 'vscode/vscode/vs/base/browser/window';
35
31
  import { isIOS, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
@@ -42,7 +38,7 @@ var HostShutdownReason;
42
38
  HostShutdownReason[HostShutdownReason["Api"] = 3] = "Api";
43
39
  })(HostShutdownReason || (HostShutdownReason = {}))));
44
40
  let BrowserHostService = class BrowserHostService extends Disposable {
45
- constructor(layoutService, configurationService, fileService, labelService, environmentService, instantiationService, lifecycleService, logService, dialogService, contextService, userDataProfileService, userDataProfilesService) {
41
+ constructor(layoutService, configurationService, fileService, labelService, environmentService, instantiationService, lifecycleService, logService, dialogService, contextService, userDataProfilesService) {
46
42
  super();
47
43
  this.layoutService = layoutService;
48
44
  this.configurationService = configurationService;
@@ -54,7 +50,6 @@ let BrowserHostService = class BrowserHostService extends Disposable {
54
50
  this.logService = logService;
55
51
  this.dialogService = dialogService;
56
52
  this.contextService = contextService;
57
- this.userDataProfileService = userDataProfileService;
58
53
  this.userDataProfilesService = userDataProfilesService;
59
54
  this.shutdownReason = HostShutdownReason.Unknown;
60
55
  if (environmentService.options?.workspaceProvider) {
@@ -281,20 +276,20 @@ let BrowserHostService = class BrowserHostService extends Disposable {
281
276
  newPayload.push(['inspect-brk-extensions', String(this.environmentService.debugExtensionHost.port)]);
282
277
  }
283
278
  }
284
- const newWindowProfile = (options?.forceProfile
279
+ const newWindowProfile = options?.forceProfile
285
280
  ? this.userDataProfilesService.profiles.find(profile => profile.name === options?.forceProfile)
286
- : undefined) ?? this.userDataProfileService.currentProfile;
287
- if (!newWindowProfile.isDefault) {
281
+ : undefined;
282
+ if (newWindowProfile && !newWindowProfile.isDefault) {
288
283
  newPayload.push(['profile', newWindowProfile.name]);
289
284
  }
290
285
  return newPayload.length ? newPayload : undefined;
291
286
  }
292
287
  getRecentLabel(openable) {
293
288
  if (isFolderToOpen(openable)) {
294
- return this.labelService.getWorkspaceLabel(openable.folderUri, { verbose: Verbosity.LONG });
289
+ return this.labelService.getWorkspaceLabel(openable.folderUri, { verbose: 2 });
295
290
  }
296
291
  if (isWorkspaceToOpen(openable)) {
297
- return this.labelService.getWorkspaceLabel(getWorkspaceIdentifier(openable.workspaceUri), { verbose: Verbosity.LONG });
292
+ return this.labelService.getWorkspaceLabel(getWorkspaceIdentifier(openable.workspaceUri), { verbose: 2 });
298
293
  }
299
294
  return this.labelService.getUriLabel(openable.fileUri);
300
295
  }
@@ -325,17 +320,17 @@ let BrowserHostService = class BrowserHostService extends Disposable {
325
320
  return;
326
321
  }
327
322
  if (options?.reuse) {
328
- await this.handleExpectedShutdown(ShutdownReason.LOAD);
323
+ await this.handleExpectedShutdown(4 );
329
324
  }
330
325
  const opened = await this.workspaceProvider.open(workspace, options);
331
326
  if (!opened) {
332
327
  const { confirmed } = await this.dialogService.confirm({
333
328
  type: Severity$1.Warning,
334
329
  message: ( localize(
335
- 790,
330
+ 802,
336
331
  "The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
337
332
  )),
338
- primaryButton: ( localize(791, "&&Open"))
333
+ primaryButton: ( localize(803, "&&Open"))
339
334
  });
340
335
  if (confirmed) {
341
336
  await this.workspaceProvider.open(workspace, options);
@@ -385,11 +380,11 @@ let BrowserHostService = class BrowserHostService extends Disposable {
385
380
  this.reload();
386
381
  }
387
382
  async reload() {
388
- await this.handleExpectedShutdown(ShutdownReason.RELOAD);
383
+ await this.handleExpectedShutdown(3 );
389
384
  mainWindow.location.reload();
390
385
  }
391
386
  async close() {
392
- await this.handleExpectedShutdown(ShutdownReason.CLOSE);
387
+ await this.handleExpectedShutdown(1 );
393
388
  mainWindow.close();
394
389
  }
395
390
  async withExpectedShutdown(expectedShutdownTask) {
@@ -430,8 +425,7 @@ BrowserHostService = ( (__decorate([
430
425
  ( (__param(7, ILogService))),
431
426
  ( (__param(8, IDialogService))),
432
427
  ( (__param(9, IWorkspaceContextService))),
433
- ( (__param(10, IUserDataProfileService))),
434
- ( (__param(11, IUserDataProfilesService)))
428
+ ( (__param(10, IUserDataProfilesService)))
435
429
  ], BrowserHostService)));
436
430
 
437
431
  export { BrowserHostService };
@@ -1,6 +1,5 @@
1
1
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
2
2
  import { addMatchMediaChangeListener } from 'vscode/vscode/vs/base/browser/browser';
3
- import 'vscode/vscode/vs/platform/instantiation/common/extensions';
4
3
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
5
4
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
5
  import { mainWindow } from 'vscode/vscode/vs/base/browser/window';