@codingame/monaco-vscode-lifecycle-service-override 9.0.3 → 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-lifecycle-service-override",
3
- "version": "9.0.3",
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.3"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@10.0.0"
30
30
  }
31
31
  }
@@ -1,16 +1,13 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { ShutdownReason, StartupKind } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
3
2
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
4
3
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
5
4
  import { AbstractLifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycleService';
6
5
  import { localize } from 'vscode/vscode/vs/nls';
7
- import 'vscode/vscode/vs/platform/instantiation/common/extensions';
8
6
  import { addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/dom';
9
7
  import { WillSaveStateReason } from 'vscode/vscode/vs/platform/storage/common/storage';
10
8
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
11
9
  import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
12
10
  import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
13
- import { firstOrDefault } from 'vscode/vscode/vs/base/common/arrays';
14
11
 
15
12
  let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLifecycleService {
16
13
  constructor(logService, storageService) {
@@ -38,7 +35,7 @@ let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLife
38
35
  vetoBeforeUnload(event) {
39
36
  event.preventDefault();
40
37
  event.returnValue = ( localize(
41
- 2450,
38
+ 2404,
42
39
  "Changes that you made may not be saved. Please check press 'Cancel' and try again."
43
40
  ));
44
41
  }
@@ -82,7 +79,7 @@ let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLife
82
79
  }
83
80
  }
84
81
  this._onBeforeShutdown.fire({
85
- reason: ShutdownReason.QUIT,
82
+ reason: 2 ,
86
83
  veto(value, id) {
87
84
  handleVeto(value, id);
88
85
  },
@@ -103,7 +100,7 @@ let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLife
103
100
  this._register(addDisposableListener(mainWindow, EventType.PAGE_SHOW, (e) => this.onLoadAfterUnload(e)));
104
101
  const logService = this.logService;
105
102
  this._onWillShutdown.fire({
106
- reason: ShutdownReason.QUIT,
103
+ reason: 2 ,
107
104
  joiners: () => [],
108
105
  token: CancellationToken.None,
109
106
  join(promise, joiner) {
@@ -123,9 +120,9 @@ let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLife
123
120
  doResolveStartupKind() {
124
121
  let startupKind = super.doResolveStartupKind();
125
122
  if (typeof startupKind !== 'number') {
126
- const timing = firstOrDefault(performance.getEntriesByType('navigation'));
123
+ const timing = performance.getEntriesByType('navigation').at(0);
127
124
  if (timing?.type === 'reload') {
128
- startupKind = StartupKind.ReloadedWindow;
125
+ startupKind = 3 ;
129
126
  }
130
127
  }
131
128
  return startupKind;
@@ -1,10 +1,8 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { getMarks } from 'vscode/vscode/vs/base/common/performance';
3
- import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
4
3
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
5
4
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
6
5
  import { IUpdateService } from 'vscode/vscode/vs/platform/update/common/update.service';
7
- import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
8
6
  import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
9
7
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
10
8
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
@@ -12,7 +10,6 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
12
10
  import { Barrier, timeout } from 'vscode/vscode/vs/base/common/async';
13
11
  import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
14
12
  import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
15
- import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
16
13
  import { TelemetryTrustedValue } from 'vscode/vscode/vs/platform/telemetry/common/telemetryUtils';
17
14
  import { isWeb } from 'vscode/vscode/vs/base/common/platform';
18
15
  import { createBlobWorker } from 'vscode/vscode/vs/base/browser/defaultWorkerFactory';
@@ -69,7 +66,7 @@ let AbstractTimerService = class AbstractTimerService {
69
66
  this._rndValueShouldSendTelemetry = Math.random() < .05;
70
67
  Promise.all([
71
68
  this._extensionService.whenInstalledExtensionsRegistered(),
72
- _lifecycleService.when(LifecyclePhase.Restored),
69
+ _lifecycleService.when(3 ),
73
70
  layoutService.whenRestored,
74
71
  Promise.all(( Array.from(( ( Registry.as(TerminalExtensions.Backend)).backends.values())).map(e => e.whenReady)))
75
72
  ]).then(() => {
@@ -81,7 +78,7 @@ let AbstractTimerService = class AbstractTimerService {
81
78
  this._barrier.open();
82
79
  });
83
80
  this.perfBaseline = this._barrier.wait()
84
- .then(() => this._lifecycleService.when(LifecyclePhase.Eventually))
81
+ .then(() => this._lifecycleService.when(4 ))
85
82
  .then(() => timeout(this._startupMetrics.timers.ellapsedRequire))
86
83
  .then(() => {
87
84
  const jsSrc = ( (function () {
@@ -166,8 +163,8 @@ let AbstractTimerService = class AbstractTimerService {
166
163
  else {
167
164
  startMark = initialStartup ? 'code/didStartMain' : 'code/willOpenNewWindow';
168
165
  }
169
- const activeViewlet = this._paneCompositeService.getActivePaneComposite(ViewContainerLocation.Sidebar);
170
- const activePanel = this._paneCompositeService.getActivePaneComposite(ViewContainerLocation.Panel);
166
+ const activeViewlet = this._paneCompositeService.getActivePaneComposite(0 );
167
+ const activePanel = this._paneCompositeService.getActivePaneComposite(1 );
171
168
  const info = {
172
169
  version: 2,
173
170
  ellapsed: this._marks.getDuration(startMark, 'code/didStartWorkbench'),
@@ -217,7 +214,7 @@ let AbstractTimerService = class AbstractTimerService {
217
214
  isVMLikelyhood: undefined,
218
215
  initialStartup,
219
216
  hasAccessibilitySupport: this._accessibilityService.isScreenReaderOptimized(),
220
- emptyWorkbench: this._contextService.getWorkbenchState() === WorkbenchState.EMPTY
217
+ emptyWorkbench: this._contextService.getWorkbenchState() === 1
221
218
  };
222
219
  await this._extendStartupInfo(info);
223
220
  return info;