@codingame/monaco-vscode-api 1.69.9 → 1.69.10
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/dist/extHost.js +3 -105
- package/dist/polyfill.js +143 -2
- package/package.json +1 -1
package/dist/extHost.js
CHANGED
|
@@ -12,7 +12,7 @@ import { ResourceMap, TernarySearchTree } from 'monaco-editor/esm/vs/base/common
|
|
|
12
12
|
import { MarkdownString as MarkdownString$2, parseHrefAndDimensions, isMarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
|
|
13
13
|
import { marked as marked$1 } from 'monaco-editor/esm/vs/base/common/marked/marked.js';
|
|
14
14
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
15
|
-
import { E as Emitter, d as disposed, r as readonly, N as NotImplementedError, R as ResourceSet } from './polyfill.js';
|
|
15
|
+
import { E as Emitter, d as disposed, C as ConsoleMainLogger, r as readonly, N as NotImplementedError, R as ResourceSet } from './polyfill.js';
|
|
16
16
|
import { MarkerSeverity, IMarkerService } from 'monaco-editor/esm/vs/platform/markers/common/markers.js';
|
|
17
17
|
import { revive, parse } from 'monaco-editor/esm/vs/base/common/marshalling.js';
|
|
18
18
|
import { equals, cloneAndChange, deepFreeze, mixin, deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
@@ -20,7 +20,7 @@ import { once } from 'monaco-editor/esm/vs/base/common/functional.js';
|
|
|
20
20
|
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
21
21
|
import { createDecorator, IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
22
22
|
import { toErrorMessage } from 'monaco-editor/esm/vs/base/common/errorMessage.js';
|
|
23
|
-
import { ILogService, LogLevel
|
|
23
|
+
import { ILogService, LogLevel, LogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
24
24
|
import { Disposable as Disposable$1, DisposableStore, dispose, toDisposable, combinedDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
25
25
|
import { I as IExtensionService, u as unsupported, B as Barrier, c as checkProposedApiEnabled, i as isProposedApiEnabled, r as raceCancellationError } from './missing-services.js';
|
|
26
26
|
import { ICommandService, CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
@@ -682,108 +682,6 @@ function getScopes() {
|
|
|
682
682
|
const Position$2 = monaco.Position;
|
|
683
683
|
const TELEMETRY_SETTING_ID = 'telemetry.telemetryLevel';
|
|
684
684
|
const TELEMETRY_OLD_SETTING_ID = 'telemetry.enableTelemetry';
|
|
685
|
-
function now() {
|
|
686
|
-
return ( (new Date())).toISOString();
|
|
687
|
-
}
|
|
688
|
-
var LogLevel;
|
|
689
|
-
( ((function(LogLevel) {
|
|
690
|
-
LogLevel[LogLevel["Trace"] = 0] = "Trace";
|
|
691
|
-
LogLevel[LogLevel["Debug"] = 1] = "Debug";
|
|
692
|
-
LogLevel[LogLevel["Info"] = 2] = "Info";
|
|
693
|
-
LogLevel[LogLevel["Warning"] = 3] = "Warning";
|
|
694
|
-
LogLevel[LogLevel["Error"] = 4] = "Error";
|
|
695
|
-
LogLevel[LogLevel["Critical"] = 5] = "Critical";
|
|
696
|
-
LogLevel[LogLevel["Off"] = 6] = "Off";
|
|
697
|
-
})(LogLevel || (LogLevel = {}))));
|
|
698
|
-
const DEFAULT_LOG_LEVEL = LogLevel.Info;
|
|
699
|
-
class AbstractLogger extends Disposable$1 {
|
|
700
|
-
constructor() {
|
|
701
|
-
super(...arguments);
|
|
702
|
-
this.level = DEFAULT_LOG_LEVEL;
|
|
703
|
-
this._onDidChangeLogLevel = this._register(( (new Emitter())));
|
|
704
|
-
this.onDidChangeLogLevel = this._onDidChangeLogLevel.event;
|
|
705
|
-
}
|
|
706
|
-
setLevel(level) {
|
|
707
|
-
if (this.level !== level) {
|
|
708
|
-
this.level = level;
|
|
709
|
-
this._onDidChangeLogLevel.fire(this.level);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
getLevel() {
|
|
713
|
-
return this.level;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
class ConsoleMainLogger extends AbstractLogger {
|
|
717
|
-
constructor(logLevel = DEFAULT_LOG_LEVEL) {
|
|
718
|
-
super();
|
|
719
|
-
this.setLevel(logLevel);
|
|
720
|
-
this.useColors = !isWindows;
|
|
721
|
-
}
|
|
722
|
-
trace(message, ...args) {
|
|
723
|
-
if (this.getLevel() <= LogLevel.Trace) {
|
|
724
|
-
if (this.useColors) {
|
|
725
|
-
console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
|
|
726
|
-
}
|
|
727
|
-
else {
|
|
728
|
-
console.log(`[main ${now()}]`, message, ...args);
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
debug(message, ...args) {
|
|
733
|
-
if (this.getLevel() <= LogLevel.Debug) {
|
|
734
|
-
if (this.useColors) {
|
|
735
|
-
console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
|
|
736
|
-
}
|
|
737
|
-
else {
|
|
738
|
-
console.log(`[main ${now()}]`, message, ...args);
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
info(message, ...args) {
|
|
743
|
-
if (this.getLevel() <= LogLevel.Info) {
|
|
744
|
-
if (this.useColors) {
|
|
745
|
-
console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
|
|
746
|
-
}
|
|
747
|
-
else {
|
|
748
|
-
console.log(`[main ${now()}]`, message, ...args);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
warn(message, ...args) {
|
|
753
|
-
if (this.getLevel() <= LogLevel.Warning) {
|
|
754
|
-
if (this.useColors) {
|
|
755
|
-
console.warn(`\x1b[93m[main ${now()}]\x1b[0m`, message, ...args);
|
|
756
|
-
}
|
|
757
|
-
else {
|
|
758
|
-
console.warn(`[main ${now()}]`, message, ...args);
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
error(message, ...args) {
|
|
763
|
-
if (this.getLevel() <= LogLevel.Error) {
|
|
764
|
-
if (this.useColors) {
|
|
765
|
-
console.error(`\x1b[91m[main ${now()}]\x1b[0m`, message, ...args);
|
|
766
|
-
}
|
|
767
|
-
else {
|
|
768
|
-
console.error(`[main ${now()}]`, message, ...args);
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
critical(message, ...args) {
|
|
773
|
-
if (this.getLevel() <= LogLevel.Critical) {
|
|
774
|
-
if (this.useColors) {
|
|
775
|
-
console.error(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
|
|
776
|
-
}
|
|
777
|
-
else {
|
|
778
|
-
console.error(`[main ${now()}]`, message, ...args);
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
dispose() {
|
|
783
|
-
}
|
|
784
|
-
flush() {
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
685
|
const _simplePattern = /^(.+)\/(.+?)(;.+)?$/;
|
|
788
686
|
function normalizeMimeType(mimeType, strict) {
|
|
789
687
|
const match = _simplePattern.exec(mimeType);
|
|
@@ -14807,7 +14705,7 @@ function createExtHostServices() {
|
|
|
14807
14705
|
logNative: false
|
|
14808
14706
|
},
|
|
14809
14707
|
get telemetryInfo() { return unsupported(); },
|
|
14810
|
-
logLevel: LogLevel
|
|
14708
|
+
logLevel: LogLevel.Trace,
|
|
14811
14709
|
get logsLocation() { return unsupported(); },
|
|
14812
14710
|
get logFile() { return unsupported(); },
|
|
14813
14711
|
autoStart: false,
|
package/dist/polyfill.js
CHANGED
|
@@ -37,10 +37,11 @@ import { DomEmitter, stopEvent } from 'monaco-editor/esm/vs/base/browser/event.j
|
|
|
37
37
|
import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
|
|
38
38
|
import { ListError } from 'monaco-editor/esm/vs/base/browser/ui/list/list.js';
|
|
39
39
|
import { clamp } from 'monaco-editor/esm/vs/base/common/numbers.js';
|
|
40
|
-
import { isMacintosh } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
40
|
+
import { isMacintosh, isWindows } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
41
41
|
import { alert } from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
|
|
42
42
|
import { matchesPrefix } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
43
43
|
import { Gesture } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
44
|
+
import { LogService as LogService$1 } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
44
45
|
import { SnippetParser } from 'monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetParser.js';
|
|
45
46
|
import { QuickInputController } from 'monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js';
|
|
46
47
|
import { getSingletonServiceDescriptors } from 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
@@ -3090,6 +3091,145 @@ class WorkspaceFolder {
|
|
|
3090
3091
|
return { uri: this.uri, name: this.name, index: this.index };
|
|
3091
3092
|
}
|
|
3092
3093
|
}
|
|
3094
|
+
function now() {
|
|
3095
|
+
return ( (new Date())).toISOString();
|
|
3096
|
+
}
|
|
3097
|
+
var LogLevel;
|
|
3098
|
+
( ((function(LogLevel) {
|
|
3099
|
+
LogLevel[LogLevel["Trace"] = 0] = "Trace";
|
|
3100
|
+
LogLevel[LogLevel["Debug"] = 1] = "Debug";
|
|
3101
|
+
LogLevel[LogLevel["Info"] = 2] = "Info";
|
|
3102
|
+
LogLevel[LogLevel["Warning"] = 3] = "Warning";
|
|
3103
|
+
LogLevel[LogLevel["Error"] = 4] = "Error";
|
|
3104
|
+
LogLevel[LogLevel["Critical"] = 5] = "Critical";
|
|
3105
|
+
LogLevel[LogLevel["Off"] = 6] = "Off";
|
|
3106
|
+
})(LogLevel || (LogLevel = {}))));
|
|
3107
|
+
const DEFAULT_LOG_LEVEL = LogLevel.Info;
|
|
3108
|
+
class AbstractLogger extends Disposable {
|
|
3109
|
+
constructor() {
|
|
3110
|
+
super(...arguments);
|
|
3111
|
+
this.level = DEFAULT_LOG_LEVEL;
|
|
3112
|
+
this._onDidChangeLogLevel = this._register(( (new Emitter())));
|
|
3113
|
+
this.onDidChangeLogLevel = this._onDidChangeLogLevel.event;
|
|
3114
|
+
}
|
|
3115
|
+
setLevel(level) {
|
|
3116
|
+
if (this.level !== level) {
|
|
3117
|
+
this.level = level;
|
|
3118
|
+
this._onDidChangeLogLevel.fire(this.level);
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
getLevel() {
|
|
3122
|
+
return this.level;
|
|
3123
|
+
}
|
|
3124
|
+
}
|
|
3125
|
+
class ConsoleMainLogger extends AbstractLogger {
|
|
3126
|
+
constructor(logLevel = DEFAULT_LOG_LEVEL) {
|
|
3127
|
+
super();
|
|
3128
|
+
this.setLevel(logLevel);
|
|
3129
|
+
this.useColors = !isWindows;
|
|
3130
|
+
}
|
|
3131
|
+
trace(message, ...args) {
|
|
3132
|
+
if (this.getLevel() <= LogLevel.Trace) {
|
|
3133
|
+
if (this.useColors) {
|
|
3134
|
+
console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
|
|
3135
|
+
}
|
|
3136
|
+
else {
|
|
3137
|
+
console.log(`[main ${now()}]`, message, ...args);
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
debug(message, ...args) {
|
|
3142
|
+
if (this.getLevel() <= LogLevel.Debug) {
|
|
3143
|
+
if (this.useColors) {
|
|
3144
|
+
console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
|
|
3145
|
+
}
|
|
3146
|
+
else {
|
|
3147
|
+
console.log(`[main ${now()}]`, message, ...args);
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
info(message, ...args) {
|
|
3152
|
+
if (this.getLevel() <= LogLevel.Info) {
|
|
3153
|
+
if (this.useColors) {
|
|
3154
|
+
console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
|
|
3155
|
+
}
|
|
3156
|
+
else {
|
|
3157
|
+
console.log(`[main ${now()}]`, message, ...args);
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
warn(message, ...args) {
|
|
3162
|
+
if (this.getLevel() <= LogLevel.Warning) {
|
|
3163
|
+
if (this.useColors) {
|
|
3164
|
+
console.warn(`\x1b[93m[main ${now()}]\x1b[0m`, message, ...args);
|
|
3165
|
+
}
|
|
3166
|
+
else {
|
|
3167
|
+
console.warn(`[main ${now()}]`, message, ...args);
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
error(message, ...args) {
|
|
3172
|
+
if (this.getLevel() <= LogLevel.Error) {
|
|
3173
|
+
if (this.useColors) {
|
|
3174
|
+
console.error(`\x1b[91m[main ${now()}]\x1b[0m`, message, ...args);
|
|
3175
|
+
}
|
|
3176
|
+
else {
|
|
3177
|
+
console.error(`[main ${now()}]`, message, ...args);
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
critical(message, ...args) {
|
|
3182
|
+
if (this.getLevel() <= LogLevel.Critical) {
|
|
3183
|
+
if (this.useColors) {
|
|
3184
|
+
console.error(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
|
|
3185
|
+
}
|
|
3186
|
+
else {
|
|
3187
|
+
console.error(`[main ${now()}]`, message, ...args);
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
dispose() {
|
|
3192
|
+
}
|
|
3193
|
+
flush() {
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
class LogService extends Disposable {
|
|
3197
|
+
constructor(logger) {
|
|
3198
|
+
super();
|
|
3199
|
+
this.logger = logger;
|
|
3200
|
+
this._register(logger);
|
|
3201
|
+
}
|
|
3202
|
+
get onDidChangeLogLevel() {
|
|
3203
|
+
return this.logger.onDidChangeLogLevel;
|
|
3204
|
+
}
|
|
3205
|
+
setLevel(level) {
|
|
3206
|
+
this.logger.setLevel(level);
|
|
3207
|
+
}
|
|
3208
|
+
getLevel() {
|
|
3209
|
+
return this.logger.getLevel();
|
|
3210
|
+
}
|
|
3211
|
+
trace(message, ...args) {
|
|
3212
|
+
this.logger.trace(message, ...args);
|
|
3213
|
+
}
|
|
3214
|
+
debug(message, ...args) {
|
|
3215
|
+
this.logger.debug(message, ...args);
|
|
3216
|
+
}
|
|
3217
|
+
info(message, ...args) {
|
|
3218
|
+
this.logger.info(message, ...args);
|
|
3219
|
+
}
|
|
3220
|
+
warn(message, ...args) {
|
|
3221
|
+
this.logger.warn(message, ...args);
|
|
3222
|
+
}
|
|
3223
|
+
error(message, ...args) {
|
|
3224
|
+
this.logger.error(message, ...args);
|
|
3225
|
+
}
|
|
3226
|
+
critical(message, ...args) {
|
|
3227
|
+
this.logger.critical(message, ...args);
|
|
3228
|
+
}
|
|
3229
|
+
flush() {
|
|
3230
|
+
this.logger.flush();
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3093
3233
|
function isConfigurationOverrides(thing) {
|
|
3094
3234
|
return thing
|
|
3095
3235
|
&& typeof thing === 'object'
|
|
@@ -5275,6 +5415,7 @@ function polyfillPrototype(a, b, toA, toB) {
|
|
|
5275
5415
|
}
|
|
5276
5416
|
}
|
|
5277
5417
|
}
|
|
5418
|
+
polyfillPrototypeSimple(LogService$1.prototype, LogService.prototype);
|
|
5278
5419
|
polyfillPrototypeSimple(List$1.prototype, List.prototype);
|
|
5279
5420
|
polyfillPrototypeSimple(WorkspaceFolder$1.prototype, WorkspaceFolder.prototype);
|
|
5280
5421
|
polyfillPrototypeSimple(LanguagesRegistry$1.prototype, LanguagesRegistry.prototype);
|
|
@@ -5346,4 +5487,4 @@ function toVSCodeColor(value) {
|
|
|
5346
5487
|
return value;
|
|
5347
5488
|
}
|
|
5348
5489
|
polyfillPrototype(Color$1.prototype, Color.prototype, toMonacoColor, toVSCodeColor);
|
|
5349
|
-
export { Emitter as E, NotImplementedError as N, ResourceSet as R, UserSettings as U, isReadableStream as a, peekReadable as b, bufferToReadable as c, disposed as d, consumeStream as e, isReadableBufferedStream as f, bufferedStreamToBuffer as g, readableToBuffer as h, isWorkspaceIdentifier as i, newWriteableStream as j, parse as k, listenStream as l, getNodeType as m, newWriteableBufferStream as n, peekStream as p, readonly as r, streamToBuffer as s, transform as t };
|
|
5490
|
+
export { ConsoleMainLogger as C, Emitter as E, NotImplementedError as N, ResourceSet as R, UserSettings as U, isReadableStream as a, peekReadable as b, bufferToReadable as c, disposed as d, consumeStream as e, isReadableBufferedStream as f, bufferedStreamToBuffer as g, readableToBuffer as h, isWorkspaceIdentifier as i, newWriteableStream as j, parse as k, listenStream as l, getNodeType as m, newWriteableBufferStream as n, peekStream as p, readonly as r, streamToBuffer as s, transform as t };
|