@codingame/monaco-vscode-log-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/log.js CHANGED
@@ -30,7 +30,10 @@ _FileLoggerService = __decorate([
30
30
  const otherLoggers = [];
31
31
  let _LogService = class _LogService extends LogService {
32
32
  constructor(loggerService, environmentService) {
33
- const logger = loggerService.createLogger(environmentService.logFile, { id: windowLogId, name: rendererLogLabel });
33
+ const logger = loggerService.createLogger(environmentService.logFile, {
34
+ id: windowLogId,
35
+ name: rendererLogLabel
36
+ });
34
37
  super(logger, otherLoggers);
35
38
  }
36
39
  };
@@ -1,5 +1,5 @@
1
1
  import { localize } from 'vscode/vscode/vs/nls';
2
2
 
3
- const rendererLogLabel = ( localize(3248, 'Window'));
3
+ const rendererLogLabel = ( localize(3220, 'Window'));
4
4
 
5
5
  export { rendererLogLabel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-log-service-override",
3
- "version": "9.0.3",
3
+ "version": "10.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@9.0.3",
30
- "@codingame/monaco-vscode-environment-service-override": "9.0.3"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@10.0.0",
30
+ "@codingame/monaco-vscode-environment-service-override": "10.0.0"
31
31
  }
32
32
  }
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { ThrottledDelayer } from 'vscode/vscode/vs/base/common/async';
3
3
  import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
4
4
  import { joinPath, dirname, basename } from 'vscode/vscode/vs/base/common/resources';
5
- import { ByteSize, FileOperationResult, whenProviderRegistered } from 'vscode/vscode/vs/platform/files/common/files';
5
+ import { ByteSize, whenProviderRegistered } from 'vscode/vscode/vs/platform/files/common/files';
6
6
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
7
7
  import { BufferLogger } from 'vscode/vscode/vs/platform/log/common/bufferLog';
8
8
  import { AbstractMessageLogger, LogLevel, AbstractLoggerService } from 'vscode/vscode/vs/platform/log/common/log';
@@ -41,7 +41,7 @@ let FileLogger = class FileLogger extends AbstractMessageLogger {
41
41
  await this.fileService.createFile(this.resource);
42
42
  }
43
43
  catch (error) {
44
- if (error.fileOperationResult !== FileOperationResult.FILE_MODIFIED_SINCE) {
44
+ if (error.fileOperationResult !== 3 ) {
45
45
  throw error;
46
46
  }
47
47
  }
@@ -2,12 +2,11 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { getLogLevel, LogLevelToString, parseLogLevel } from 'vscode/vscode/vs/platform/log/common/log';
3
3
  import { ILogService, ILoggerService } from 'vscode/vscode/vs/platform/log/common/log.service';
4
4
  import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
5
- import { toFileOperationResult, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
5
+ import { toFileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
6
6
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
7
7
  import { IJSONEditingService } from 'vscode/vscode/vs/workbench/services/configuration/common/jsonEditing.service';
8
8
  import { isUndefined, isString } from 'vscode/vscode/vs/base/common/types';
9
9
  import { EXTENSION_IDENTIFIER_WITH_LOG_REGEX } from '@codingame/monaco-vscode-environment-service-override/vscode/vs/platform/environment/common/environmentService';
10
- import 'vscode/vscode/vs/platform/instantiation/common/extensions';
11
10
  import { parse } from 'vscode/vscode/vs/base/common/json';
12
11
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
13
12
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
@@ -128,7 +127,7 @@ let DefaultLogLevelsService = class DefaultLogLevelsService extends Disposable {
128
127
  return isString(argv['log-level']) ? [argv['log-level']] : Array.isArray(argv['log-level']) ? argv['log-level'] : [];
129
128
  }
130
129
  catch (error) {
131
- if (toFileOperationResult(error) !== FileOperationResult.FILE_NOT_FOUND) {
130
+ if (toFileOperationResult(error) !== 1 ) {
132
131
  this.logService.error(error);
133
132
  }
134
133
  }
@@ -12,7 +12,6 @@ import { IOutputService } from 'vscode/vscode/vs/workbench/services/output/commo
12
12
  import { Disposable, DisposableMap, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
13
13
  import { CONTEXT_LOG_LEVEL, LogLevelToString, isLogLevel } from 'vscode/vscode/vs/platform/log/common/log';
14
14
  import { ILogService, ILoggerService } from 'vscode/vscode/vs/platform/log/common/log.service';
15
- import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
16
15
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
17
16
  import { Event } from 'vscode/vscode/vs/base/common/event';
18
17
  import { showWindowLogActionId, windowLogId } from 'vscode/vscode/vs/workbench/services/log/common/logConstants';
@@ -42,7 +41,7 @@ registerAction2(class extends Action2 {
42
41
  constructor() {
43
42
  super({
44
43
  id: 'workbench.action.setDefaultLogLevel',
45
- title: ( localize2(3249, "Set Default Log Level")),
44
+ title: ( localize2(3221, "Set Default Log Level")),
46
45
  category: Categories.Developer,
47
46
  });
48
47
  }
@@ -148,7 +147,7 @@ let LogOutputChannels = class LogOutputChannels extends Disposable {
148
147
  }
149
148
  const hasToAppendRemote = existingChannel && logger.resource.scheme === Schemas.vscodeRemote;
150
149
  const id = hasToAppendRemote ? `${logger.id}.remote` : logger.id;
151
- const label = hasToAppendRemote ? ( localize(3250, "{0} (Remote)", logger.name ?? logger.id)) : logger.name ?? logger.id;
150
+ const label = hasToAppendRemote ? ( localize(3222, "{0} (Remote)", logger.name ?? logger.id)) : logger.name ?? logger.id;
152
151
  this.outputChannelRegistry.registerChannel({ id, label, file: logger.resource, log: true, extensionId: logger.extensionId });
153
152
  disposables.add(toDisposable(() => this.outputChannelRegistry.removeChannel(id)));
154
153
  if (remoteLogger) {
@@ -187,7 +186,7 @@ let LogOutputChannels = class LogOutputChannels extends Disposable {
187
186
  constructor() {
188
187
  super({
189
188
  id: showWindowLogActionId,
190
- title: ( localize2(3251, "Show Window Log")),
189
+ title: ( localize2(3223, "Show Window Log")),
191
190
  category: Categories.Developer,
192
191
  f1: true
193
192
  });
@@ -214,5 +213,5 @@ let LogLevelMigration = class LogLevelMigration {
214
213
  LogLevelMigration = ( (__decorate([
215
214
  ( (__param(0, IDefaultLogLevelsService)))
216
215
  ], LogLevelMigration)));
217
- ( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(LogOutputChannels, LifecyclePhase.Restored);
218
- ( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(LogLevelMigration, LifecyclePhase.Eventually);
216
+ ( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(LogOutputChannels, 3 );
217
+ ( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(LogLevelMigration, 4 );
@@ -18,7 +18,7 @@ var SetLogLevelAction_1;
18
18
  let SetLogLevelAction = class SetLogLevelAction extends Action {
19
19
  static { SetLogLevelAction_1 = this; }
20
20
  static { this.ID = 'workbench.action.setLogLevel'; }
21
- static { this.TITLE = ( localize2(6139, "Set Log Level...")); }
21
+ static { this.TITLE = ( localize2(6192, "Set Log Level...")); }
22
22
  constructor(id, label, quickInputService, loggerService, outputService, defaultLogLevelsService) {
23
23
  super(id, label);
24
24
  this.quickInputService = quickInputService;
@@ -55,19 +55,19 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
55
55
  }
56
56
  }
57
57
  const entries = [];
58
- entries.push({ type: 'separator', label: ( localize(6140, "All")) });
58
+ entries.push({ type: 'separator', label: ( localize(6193, "All")) });
59
59
  entries.push(...this.getLogLevelEntries(defaultLogLevels.default, this.loggerService.getLogLevel(), true));
60
60
  if (extensionLogs.length) {
61
- entries.push({ type: 'separator', label: ( localize(6141, "Extension Logs")) });
61
+ entries.push({ type: 'separator', label: ( localize(6194, "Extension Logs")) });
62
62
  entries.push(...extensionLogs.sort((a, b) => a.label.localeCompare(b.label)));
63
63
  }
64
- entries.push({ type: 'separator', label: ( localize(6142, "Logs")) });
64
+ entries.push({ type: 'separator', label: ( localize(6195, "Logs")) });
65
65
  entries.push(...logs.sort((a, b) => a.label.localeCompare(b.label)));
66
66
  return (
67
67
  (new Promise((resolve, reject) => {
68
68
  const disposables = ( (new DisposableStore()));
69
69
  const quickPick = disposables.add(this.quickInputService.createQuickPick({ useSeparators: true }));
70
- quickPick.placeholder = ( localize(6143, "Set Log Level"));
70
+ quickPick.placeholder = ( localize(6196, "Set Log Level"));
71
71
  quickPick.items = entries;
72
72
  let selectedItem;
73
73
  disposables.add(quickPick.onDidTriggerItemButton(e => {
@@ -99,7 +99,7 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
99
99
  (new Promise((resolve, reject) => {
100
100
  const disposables = ( (new DisposableStore()));
101
101
  const quickPick = disposables.add(this.quickInputService.createQuickPick());
102
- quickPick.placeholder = logChannel ? ( localize(6144, " {0}: Select log level", logChannel?.label)) : ( localize(6145, "Select log level"));
102
+ quickPick.placeholder = logChannel ? ( localize(6197, " {0}: Select log level", logChannel?.label)) : ( localize(6198, "Select log level"));
103
103
  quickPick.items = entries;
104
104
  quickPick.activeItems = entries.filter((entry) => entry.level === this.loggerService.getLogLevel());
105
105
  let selectedItem;
@@ -123,7 +123,7 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
123
123
  );
124
124
  }
125
125
  getLogLevelEntries(defaultLogLevel, currentLogLevel, canSetDefaultLogLevel) {
126
- const button = canSetDefaultLogLevel ? { iconClass: ThemeIcon.asClassName(Codicon.checkAll), tooltip: ( localize(6146, "Set as Default Log Level")) } : undefined;
126
+ const button = canSetDefaultLogLevel ? { iconClass: ThemeIcon.asClassName(Codicon.checkAll), tooltip: ( localize(6199, "Set as Default Log Level")) } : undefined;
127
127
  return [
128
128
  { label: this.getLabel(LogLevel.Trace, currentLogLevel), level: LogLevel.Trace, description: this.getDescription(LogLevel.Trace, defaultLogLevel), buttons: button && defaultLogLevel !== LogLevel.Trace ? [button] : undefined },
129
129
  { label: this.getLabel(LogLevel.Debug, currentLogLevel), level: LogLevel.Debug, description: this.getDescription(LogLevel.Debug, defaultLogLevel), buttons: button && defaultLogLevel !== LogLevel.Debug ? [button] : undefined },
@@ -138,7 +138,7 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
138
138
  return level === current ? `$(check) ${label}` : label;
139
139
  }
140
140
  getDescription(level, defaultLogLevel) {
141
- return defaultLogLevel === level ? ( localize(6147, "Default")) : undefined;
141
+ return defaultLogLevel === level ? ( localize(6200, "Default")) : undefined;
142
142
  }
143
143
  };
144
144
  SetLogLevelAction = SetLogLevelAction_1 = ( (__decorate([
@@ -149,7 +149,7 @@ SetLogLevelAction = SetLogLevelAction_1 = ( (__decorate([
149
149
  ], SetLogLevelAction)));
150
150
  (class OpenWindowSessionLogFileAction extends Action {
151
151
  static { this.ID = 'workbench.action.openSessionLogFile'; }
152
- static { this.TITLE = ( localize2(6148, "Open Window Log File (Session)...")); }
152
+ static { this.TITLE = ( localize2(6201, "Open Window Log File (Session)...")); }
153
153
  constructor(id, label, environmentService, fileService, quickInputService, editorService) {
154
154
  super(id, label);
155
155
  this.environmentService = environmentService;
@@ -161,10 +161,10 @@ SetLogLevelAction = SetLogLevelAction_1 = ( (__decorate([
161
161
  const sessionResult = await this.quickInputService.pick(this.getSessions().then(sessions => ( (sessions.map((s, index) => ({
162
162
  id: ( (s.toString())),
163
163
  label: basename(s),
164
- description: index === 0 ? ( localize(6149, "Current")) : undefined
164
+ description: index === 0 ? ( localize(6202, "Current")) : undefined
165
165
  }))))), {
166
166
  canPickMany: false,
167
- placeHolder: ( localize(6150, "Select Session"))
167
+ placeHolder: ( localize(6203, "Select Session"))
168
168
  });
169
169
  if (sessionResult) {
170
170
  const logFileResult = await this.quickInputService.pick(this.getLogFiles(( (URI.parse(sessionResult.id)))).then(logFiles => ( (logFiles.map((s) => ({
@@ -172,7 +172,7 @@ SetLogLevelAction = SetLogLevelAction_1 = ( (__decorate([
172
172
  label: basename(s)
173
173
  }))))), {
174
174
  canPickMany: false,
175
- placeHolder: ( localize(6151, "Select Log file"))
175
+ placeHolder: ( localize(6204, "Select Log file"))
176
176
  });
177
177
  if (logFileResult) {
178
178
  return this.editorService.openEditor({ resource: ( (URI.parse(logFileResult.id))), options: { pinned: true } }).then(() => undefined);