@codingame/monaco-vscode-lifecycle-service-override 3.2.2 → 4.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": "3.2.2",
3
+ "version": "4.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,6 +18,6 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@3.2.2"
21
+ "vscode": "npm:@codingame/monaco-vscode-api@4.0.0"
22
22
  }
23
23
  }
@@ -1,4 +1,5 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
2
3
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
3
4
  import { AbstractLifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycleService';
4
5
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
@@ -6,6 +7,7 @@ import { addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/
6
7
  import { WillSaveStateReason, IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
7
8
  import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
8
9
  import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
10
+ import { firstOrDefault } from 'vscode/vscode/vs/base/common/arrays';
9
11
 
10
12
  let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLifecycleService {
11
13
  constructor(logService, storageService) {
@@ -116,6 +118,16 @@ let BrowserLifecycleService = class BrowserLifecycleService extends AbstractLife
116
118
  }
117
119
  this.withExpectedShutdown({ disableShutdownHandling: true }, () => mainWindow.location.reload());
118
120
  }
121
+ doResolveStartupKind() {
122
+ let startupKind = super.doResolveStartupKind();
123
+ if (typeof startupKind !== 'number') {
124
+ const timing = firstOrDefault(performance.getEntriesByType('navigation'));
125
+ if (timing?.type === 'reload') {
126
+ startupKind = 3 ;
127
+ }
128
+ }
129
+ return startupKind;
130
+ }
119
131
  };
120
132
  BrowserLifecycleService = ( __decorate([
121
133
  ( __param(0, ILogService)),