@kusto/monaco-kusto 6.1.0 → 6.1.1
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/README.md +757 -0
- package/copyMonacoFilesAMD.js +28 -0
- package/package.json +14 -34
- package/release/dev/Kusto.Language.Bridge.min.js +2 -0
- package/release/dev/bridge.min.js +7 -0
- package/release/dev/commandFormatter.d.ts +1 -1
- package/release/dev/commandHighlighter.d.ts +2 -2
- package/release/dev/extendedEditor.d.ts +1 -1
- package/release/dev/kusto.javascript.client.min.js +1 -0
- package/release/dev/kustoMode.d.ts +3 -1
- package/release/dev/kustoMode.js +54 -21
- package/release/dev/kustoWorker.d.ts +5 -8
- package/release/dev/kustoWorker.js +117 -118
- package/release/dev/languageFeatures.d.ts +1 -1
- package/release/dev/languageService/kustoLanguageService.d.ts +2 -1
- package/release/dev/languageService/kustoMonarchLanguageDefinition.d.ts +2 -1
- package/release/dev/languageService/renderInfo.d.ts +5 -5
- package/release/dev/{main-ac12725e.js → main-068f3954.js} +2 -2
- package/release/dev/monaco.contribution.d.ts +3 -3
- package/release/dev/monaco.contribution.js +5 -9
- package/release/dev/newtonsoft.json.min.js +7 -0
- package/release/dev/workerManager.d.ts +1 -1
- package/release/esm/commandFormatter.d.ts +1 -1
- package/release/esm/commandHighlighter.d.ts +2 -2
- package/release/esm/extendedEditor.d.ts +1 -1
- package/release/esm/kusto.worker.js +23 -34
- package/release/esm/kustoMode.d.ts +3 -1
- package/release/esm/kustoMode.js +43 -15
- package/release/esm/kustoWorker.d.ts +5 -8
- package/release/esm/languageFeatures.d.ts +1 -1
- package/release/esm/languageService/kustoLanguageService.d.ts +2 -1
- package/release/esm/languageService/kustoMonarchLanguageDefinition.d.ts +2 -1
- package/release/esm/languageService/renderInfo.d.ts +5 -5
- package/release/esm/monaco.contribution.d.ts +3 -3
- package/release/esm/monaco.contribution.js +7 -8
- package/release/esm/workerManager.d.ts +1 -1
- package/release/min/commandFormatter.d.ts +1 -1
- package/release/min/commandHighlighter.d.ts +2 -2
- package/release/min/extendedEditor.d.ts +1 -1
- package/release/min/kustoMode.d.ts +3 -1
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.d.ts +5 -8
- package/release/min/kustoWorker.js +4 -4
- package/release/min/languageFeatures.d.ts +1 -1
- package/release/min/languageService/kustoLanguageService.d.ts +2 -1
- package/release/min/languageService/kustoMonarchLanguageDefinition.d.ts +2 -1
- package/release/min/languageService/renderInfo.d.ts +5 -5
- package/release/min/{main-5b1cc297.js → main-f5378257.js} +2 -2
- package/release/min/monaco.contribution.d.ts +3 -3
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/workerManager.d.ts +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/// <reference types="../monaco" />
|
|
2
|
+
/// <reference types="monaco-editor/monaco" />
|
|
1
3
|
import type { LanguageServiceDefaultsImpl } from './monaco.contribution';
|
|
2
4
|
import { WorkerAccessor } from './languageFeatures';
|
|
3
5
|
/**
|
|
4
6
|
* Called when Kusto language is first needed (a model has the language set)
|
|
5
7
|
* @param defaults
|
|
6
8
|
*/
|
|
7
|
-
export declare function setupMode(defaults: LanguageServiceDefaultsImpl, monacoInstance:
|
|
9
|
+
export declare function setupMode(defaults: LanguageServiceDefaultsImpl, monacoInstance: typeof monaco): WorkerAccessor;
|
|
8
10
|
export declare function getKustoWorker(): Promise<WorkerAccessor>;
|
package/release/dev/kustoMode.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 6.1.
|
|
3
|
+
* monaco-kusto version: 6.1.1(678731e78268dbe877b517e302fa7db86fd96b3c)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/kustoMode', ['exports', './main-
|
|
8
|
+
define('vs/language/kusto/kustoMode', ['exports', './main-068f3954'], (function (exports, main) { 'use strict';
|
|
9
9
|
|
|
10
10
|
var _excluded = ["onDidProvideCompletionItems"];
|
|
11
11
|
function _typeof$7(obj) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$7(obj); }
|
|
@@ -135,10 +135,13 @@ define('vs/language/kusto/kustoMode', ['exports', './main-ac12725e'], (function
|
|
|
135
135
|
displayName: 'Kusto',
|
|
136
136
|
defaultToken: 'invalid',
|
|
137
137
|
brackets: [['[', ']', 'delimiter.square'], ['(', ')', 'delimiter.parenthesis']],
|
|
138
|
+
// types are wrong
|
|
138
139
|
wordDefinition: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
139
140
|
// .slice() call is for creating a shallow copy of the array since bridge.net shoves a $type property on the array which monaco doesn't like.
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
// Kusto.Data.IntelliSense.CslCommandParser.PromotedOperatorCommandTokens.slice(0),
|
|
142
|
+
promotedOperatorCommandTokens: ['where', 'count', 'extend', 'join', 'limit', 'order', 'project', 'project-away', 'project-rename', 'project-reorder', 'project-keep', 'render', 'sort', 'summarize', 'distinct', 'take', 'top', 'top-nested', 'top-hitters', 'union', 'mv-expand', 'mv-apply', 'reduce', 'evaluate', 'parse', 'parse-where', 'parse-kv', 'sample', 'sample-distinct', 'make-series', 'getschema', 'serialize', 'invoke', 'as', 'scan'],
|
|
143
|
+
// Kusto.Data.IntelliSense.CslCommandParser.OperatorCommandTokens.slice(0),
|
|
144
|
+
operatorCommandTokens: ['filter', 'fork', 'facet', 'range', 'consume', 'find', 'search', 'print', 'partition', 'lookup', 'where', 'count', 'extend', 'join', 'limit', 'order', 'project', 'project-away', 'project-rename', 'project-reorder', 'project-keep', 'render', 'sort', 'summarize', 'distinct', 'take', 'top', 'top-nested', 'top-hitters', 'union', 'mv-expand', 'mv-apply', 'reduce', 'evaluate', 'parse', 'parse-where', 'parse-kv', 'sample', 'sample-distinct', 'make-series', 'getschema', 'serialize', 'invoke', 'as', 'scan'],
|
|
142
145
|
keywords: ['by', 'on', 'contains', 'notcontains', 'containscs', 'notcontainscs', 'startswith', 'has', 'matches', 'regex', 'true', 'false', 'and', 'or', 'typeof', 'int', 'string', 'date', 'datetime', 'time', 'long', 'real', 'boolean', 'bool'],
|
|
143
146
|
operators: ['+', '-', '*', '/', '>', '<', '==', '<>', '<=', '>=', '~', '!~'],
|
|
144
147
|
builtinFunctions: ['countof', 'bin', 'extentid', 'extract', 'extractjson', 'floor', 'iif', 'isnull', 'isnotnull', 'notnull', 'isempty', 'isnotempty', 'notempty', 'now', 're2', 'strcat', 'strlen', 'toupper', 'tostring', 'count', 'cnt', 'sum', 'min', 'max', 'avg'],
|
|
@@ -673,7 +676,11 @@ define('vs/language/kusto/kustoMode', ['exports', './main-ac12725e'], (function
|
|
|
673
676
|
return debounced;
|
|
674
677
|
}
|
|
675
678
|
|
|
676
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(
|
|
679
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
680
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest(); }
|
|
681
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
682
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
683
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
677
684
|
function _toConsumableArray$1(arr) { return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1(); }
|
|
678
685
|
function _nonIterableSpread$1() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
679
686
|
function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
|
|
@@ -696,7 +703,6 @@ define('vs/language/kusto/kustoMode', ['exports', './main-ac12725e'], (function
|
|
|
696
703
|
monaco.Thenable;
|
|
697
704
|
monaco.CancellationToken;
|
|
698
705
|
monaco.IDisposable;
|
|
699
|
-
var ClassificationKind = Kusto.Language.Editor.ClassificationKind;
|
|
700
706
|
var DiagnosticsAdapter = /*#__PURE__*/function () {
|
|
701
707
|
function DiagnosticsAdapter(_monacoInstance, _languageId, _worker, defaults, onSchemaChange) {
|
|
702
708
|
var _this = this;
|
|
@@ -1089,6 +1095,44 @@ define('vs/language/kusto/kustoMode', ['exports', './main-ac12725e'], (function
|
|
|
1089
1095
|
source: diag.source
|
|
1090
1096
|
};
|
|
1091
1097
|
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Copy of Kusto.Language.Editor.ClassificationKind we don't have to depend on it in this file
|
|
1100
|
+
*/
|
|
1101
|
+
var ClassificationKind = {
|
|
1102
|
+
PlainText: 0,
|
|
1103
|
+
Comment: 1,
|
|
1104
|
+
Punctuation: 2,
|
|
1105
|
+
Directive: 3,
|
|
1106
|
+
Literal: 4,
|
|
1107
|
+
StringLiteral: 5,
|
|
1108
|
+
Type: 6,
|
|
1109
|
+
Column: 7,
|
|
1110
|
+
Table: 8,
|
|
1111
|
+
Database: 9,
|
|
1112
|
+
Function: 10,
|
|
1113
|
+
Parameter: 11,
|
|
1114
|
+
Variable: 12,
|
|
1115
|
+
Identifier: 13,
|
|
1116
|
+
ClientParameter: 14,
|
|
1117
|
+
QueryParameter: 15,
|
|
1118
|
+
ScalarOperator: 16,
|
|
1119
|
+
MathOperator: 17,
|
|
1120
|
+
QueryOperator: 18,
|
|
1121
|
+
Command: 19,
|
|
1122
|
+
Keyword: 20,
|
|
1123
|
+
MaterializedView: 21,
|
|
1124
|
+
SchemaMember: 22,
|
|
1125
|
+
SignatureParameter: 23,
|
|
1126
|
+
Option: 24
|
|
1127
|
+
};
|
|
1128
|
+
var ClassificationKindNames = {};
|
|
1129
|
+
for (var _i = 0, _Object$entries = Object.entries(ClassificationKind); _i < _Object$entries.length; _i++) {
|
|
1130
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
1131
|
+
key = _Object$entries$_i[0],
|
|
1132
|
+
value = _Object$entries$_i[1];
|
|
1133
|
+
ClassificationKindNames[value] = key;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1092
1136
|
// commented here is the color definitions are were defined by v1 intellisense terminology:
|
|
1093
1137
|
// { token: 'comment', foreground: '008000' }, // CommentToken Green
|
|
1094
1138
|
// { token: 'variable.predefined', foreground: '800080' }, // CalculatedColumnToken Purple
|
|
@@ -1226,8 +1270,8 @@ define('vs/language/kusto/kustoMode', ['exports', './main-ac12725e'], (function
|
|
|
1226
1270
|
}));
|
|
1227
1271
|
this._disposables.push({
|
|
1228
1272
|
dispose: function dispose() {
|
|
1229
|
-
for (var
|
|
1230
|
-
_this5._contentListener[
|
|
1273
|
+
for (var _key3 in _this5._contentListener) {
|
|
1274
|
+
_this5._contentListener[_key3].dispose();
|
|
1231
1275
|
}
|
|
1232
1276
|
}
|
|
1233
1277
|
});
|
|
@@ -1323,22 +1367,11 @@ define('vs/language/kusto/kustoMode', ['exports', './main-ac12725e'], (function
|
|
|
1323
1367
|
return ColorizationAdapter;
|
|
1324
1368
|
}();
|
|
1325
1369
|
|
|
1326
|
-
/**
|
|
1327
|
-
* Gets all keys of an enum (the string keys not the numeric values).
|
|
1328
|
-
* @param e Enum type
|
|
1329
|
-
*/
|
|
1330
|
-
function getEnumKeys(e) {
|
|
1331
|
-
return Object.keys(e).filter(function (k) {
|
|
1332
|
-
return typeof e[k] === 'number';
|
|
1333
|
-
});
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
1370
|
/**
|
|
1337
1371
|
* Generates a mapping between ClassificationKind and color.
|
|
1338
1372
|
*/
|
|
1339
1373
|
function getClassificationColorTriplets() {
|
|
1340
|
-
var
|
|
1341
|
-
var result = keys.map(function (key) {
|
|
1374
|
+
var result = Object.keys(ClassificationKind).map(function (key) {
|
|
1342
1375
|
return {
|
|
1343
1376
|
classification: key,
|
|
1344
1377
|
colorLight: classificationToColorLight[key],
|
|
@@ -1379,7 +1412,7 @@ define('vs/language/kusto/kustoMode', ['exports', './main-ac12725e'], (function
|
|
|
1379
1412
|
var start = model.getPositionAt(classification.start);
|
|
1380
1413
|
var end = model.getPositionAt(classification.start + classification.length);
|
|
1381
1414
|
var range = new Range(start.lineNumber, start.column, end.lineNumber, end.column);
|
|
1382
|
-
var inlineClassName =
|
|
1415
|
+
var inlineClassName = ClassificationKindNames[classification.kind];
|
|
1383
1416
|
return {
|
|
1384
1417
|
range: range,
|
|
1385
1418
|
options: {
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
/// <reference types="monaco-editor
|
|
2
|
-
|
|
1
|
+
/// <reference types="monaco-editor/monaco" />
|
|
2
|
+
import * as ls from 'vscode-languageserver-types';
|
|
3
3
|
import * as kustoService from './languageService/kustoLanguageService';
|
|
4
4
|
import type { LanguageSettings } from './languageService/settings';
|
|
5
5
|
import { Schema, showSchema, ScalarParameter, Database, TabularParameter } from './languageService/schema';
|
|
6
|
-
import * as ls from 'vscode-languageserver-types';
|
|
7
6
|
import type { ColorizationRange } from './languageService/kustoLanguageService';
|
|
8
7
|
import type { RenderInfo } from './languageService/renderInfo';
|
|
9
|
-
import type { FoldingRange } from 'vscode-languageserver-types';
|
|
10
8
|
export declare class KustoWorker {
|
|
11
9
|
private _ctx;
|
|
12
10
|
private _languageService;
|
|
13
11
|
private _languageId;
|
|
14
12
|
private _languageSettings;
|
|
15
|
-
constructor(ctx: IWorkerContext, createData: ICreateData);
|
|
13
|
+
constructor(ctx: monaco.worker.IWorkerContext, createData: ICreateData);
|
|
16
14
|
setSchema(schema: Schema): Promise<void>;
|
|
17
15
|
addClusterToSchema(uri: string, clusterName: string, databasesNames: string[]): Promise<void>;
|
|
18
16
|
addDatabaseToSchema(uri: string, clusterName: string, databaseSchema: Database): Promise<void>;
|
|
@@ -60,7 +58,7 @@ export declare class KustoWorker {
|
|
|
60
58
|
}[], includeWarnings?: boolean, includeSuggestions?: boolean): Promise<ls.Diagnostic[]>;
|
|
61
59
|
getResultActions(uri: string, start: number, end: number): Promise<kustoService.ResultAction[]>;
|
|
62
60
|
doRangeFormat(uri: string, range: ls.Range): Promise<ls.TextEdit[]>;
|
|
63
|
-
doFolding(uri: string): Promise<FoldingRange[]>;
|
|
61
|
+
doFolding(uri: string): Promise<ls.FoldingRange[]>;
|
|
64
62
|
doDocumentFormat(uri: string): Promise<ls.TextEdit[]>;
|
|
65
63
|
doCurrentCommandFormat(uri: string, caretPosition: ls.Position): Promise<ls.TextEdit[]>;
|
|
66
64
|
doColorization(uri: string, colorizationIntervals: {
|
|
@@ -88,5 +86,4 @@ export interface ICreateData {
|
|
|
88
86
|
languageId: string;
|
|
89
87
|
languageSettings: LanguageSettings;
|
|
90
88
|
}
|
|
91
|
-
export declare function create(ctx: IWorkerContext, createData: ICreateData): KustoWorker;
|
|
92
|
-
export {};
|
|
89
|
+
export declare function create(ctx: monaco.worker.IWorkerContext, createData: ICreateData): KustoWorker;
|
|
@@ -1,94 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 6.1.
|
|
3
|
+
* monaco-kusto version: 6.1.1(678731e78268dbe877b517e302fa7db86fd96b3c)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/kustoWorker', ['exports', './main-
|
|
9
|
-
|
|
10
|
-
// Definition of schema object in the context of language services. This model is exposed to consumers of this library.
|
|
11
|
-
|
|
12
|
-
// an input parameter either be a scalar in which case it has a name, type and cslType, or it can be columnar, in which case
|
|
13
|
-
// it will have a name, and a list of scalar types which are the column types.
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Schema types:
|
|
17
|
-
* Engine – The main schema type. Contains clusters, databases, tables, table columns and functions.
|
|
18
|
-
* Cluster Manager – Internal only. A schema for clusters that manages other clusters.
|
|
19
|
-
* Data Management – Internal only. A schema for ingestion point operations.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
var dotnetTypeToKustoType = {
|
|
23
|
-
'System.SByte': 'bool',
|
|
24
|
-
'System.Byte': 'uint8',
|
|
25
|
-
'System.Int16': 'int16',
|
|
26
|
-
'System.UInt16': 'uint16',
|
|
27
|
-
'System.Int32': 'int',
|
|
28
|
-
'System.UInt32': 'uint',
|
|
29
|
-
'System.Int64': 'long',
|
|
30
|
-
'System.UInt64': 'ulong',
|
|
31
|
-
'System.String': 'string',
|
|
32
|
-
'System.Single': 'float',
|
|
33
|
-
'System.Double': 'real',
|
|
34
|
-
'System.DateTime': 'datetime',
|
|
35
|
-
'System.TimeSpan': 'timespan',
|
|
36
|
-
'System.Guid': 'guid',
|
|
37
|
-
'System.Boolean': 'bool',
|
|
38
|
-
'Newtonsoft.Json.Linq.JArray': 'dynamic',
|
|
39
|
-
'Newtonsoft.Json.Linq.JObject': 'dynamic',
|
|
40
|
-
'Newtonsoft.Json.Linq.JToken': 'dynamic',
|
|
41
|
-
'System.Object': 'dynamic',
|
|
42
|
-
'System.Data.SqlTypes.SqlDecimal': 'decimal'
|
|
43
|
-
};
|
|
44
|
-
var getCslTypeNameFromClrType = function getCslTypeNameFromClrType(clrType) {
|
|
45
|
-
return dotnetTypeToKustoType[clrType] || clrType;
|
|
46
|
-
};
|
|
47
|
-
var kustoTypeToEntityDataType = {
|
|
48
|
-
object: 'Object',
|
|
49
|
-
bool: 'Boolean',
|
|
50
|
-
uint8: 'Byte',
|
|
51
|
-
int16: 'Int16',
|
|
52
|
-
uint16: 'UInt16',
|
|
53
|
-
int: 'Int32',
|
|
54
|
-
uint: 'UInt32',
|
|
55
|
-
long: 'Int64',
|
|
56
|
-
ulong: 'UInt64',
|
|
57
|
-
float: 'Single',
|
|
58
|
-
real: 'Double',
|
|
59
|
-
decimal: 'Decimal',
|
|
60
|
-
datetime: 'DateTime',
|
|
61
|
-
string: 'String',
|
|
62
|
-
dynamic: 'Dynamic',
|
|
63
|
-
timespan: 'TimeSpan'
|
|
64
|
-
};
|
|
65
|
-
var getEntityDataTypeFromCslType = function getEntityDataTypeFromCslType(cslType) {
|
|
66
|
-
return kustoTypeToEntityDataType[cslType] || cslType;
|
|
67
|
-
};
|
|
68
|
-
var getCallName = function getCallName(fn) {
|
|
69
|
-
return "".concat(fn.name, "(").concat(fn.inputParameters.map(function (p) {
|
|
70
|
-
return "{".concat(p.name, "}");
|
|
71
|
-
}).join(','), ")");
|
|
72
|
-
};
|
|
73
|
-
var getExpression = function getExpression(fn) {
|
|
74
|
-
return "let ".concat(fn.name, " = ").concat(getInputParametersAsCslString(fn.inputParameters), " ").concat(fn.body);
|
|
75
|
-
};
|
|
76
|
-
var getInputParametersAsCslString = function getInputParametersAsCslString(inputParameters) {
|
|
77
|
-
return "(".concat(inputParameters.map(function (inputParameter) {
|
|
78
|
-
return getInputParameterAsCslString(inputParameter);
|
|
79
|
-
}).join(','), ")");
|
|
80
|
-
};
|
|
81
|
-
var getInputParameterAsCslString = function getInputParameterAsCslString(inputParameter) {
|
|
82
|
-
// If this is a tabular parameter
|
|
83
|
-
if (inputParameter.columns && inputParameter.columns.length > 0) {
|
|
84
|
-
var attributesAsString = inputParameter.columns.map(function (col) {
|
|
85
|
-
return "".concat(col.name, ":").concat(col.cslType || getCslTypeNameFromClrType(col.type));
|
|
86
|
-
}).join(',');
|
|
87
|
-
return "".concat(inputParameter.name, ":").concat(attributesAsString === '' ? '*' : attributesAsString);
|
|
88
|
-
} else {
|
|
89
|
-
return "".concat(inputParameter.name, ":").concat(inputParameter.cslType || getCslTypeNameFromClrType(inputParameter.type));
|
|
90
|
-
}
|
|
91
|
-
};
|
|
8
|
+
define('vs/language/kusto/kustoWorker', ['exports', './main-068f3954'], (function (exports, main) { 'use strict';
|
|
92
9
|
|
|
93
10
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
94
11
|
function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -3517,6 +3434,104 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-ac12725e'], (functio
|
|
|
3517
3434
|
unicodeProperties(XRegExp);
|
|
3518
3435
|
unicodeScripts(XRegExp);
|
|
3519
3436
|
|
|
3437
|
+
// Definition of schema object in the context of language services. This model is exposed to consumers of this library.
|
|
3438
|
+
|
|
3439
|
+
// an input parameter either be a scalar in which case it has a name, type and cslType, or it can be columnar, in which case
|
|
3440
|
+
// it will have a name, and a list of scalar types which are the column types.
|
|
3441
|
+
|
|
3442
|
+
/**
|
|
3443
|
+
* Schema types:
|
|
3444
|
+
* Engine – The main schema type. Contains clusters, databases, tables, table columns and functions.
|
|
3445
|
+
* Cluster Manager – Internal only. A schema for clusters that manages other clusters.
|
|
3446
|
+
* Data Management – Internal only. A schema for ingestion point operations.
|
|
3447
|
+
*/
|
|
3448
|
+
|
|
3449
|
+
var dotnetTypeToKustoType = {
|
|
3450
|
+
'System.SByte': 'bool',
|
|
3451
|
+
'System.Byte': 'uint8',
|
|
3452
|
+
'System.Int16': 'int16',
|
|
3453
|
+
'System.UInt16': 'uint16',
|
|
3454
|
+
'System.Int32': 'int',
|
|
3455
|
+
'System.UInt32': 'uint',
|
|
3456
|
+
'System.Int64': 'long',
|
|
3457
|
+
'System.UInt64': 'ulong',
|
|
3458
|
+
'System.String': 'string',
|
|
3459
|
+
'System.Single': 'float',
|
|
3460
|
+
'System.Double': 'real',
|
|
3461
|
+
'System.DateTime': 'datetime',
|
|
3462
|
+
'System.TimeSpan': 'timespan',
|
|
3463
|
+
'System.Guid': 'guid',
|
|
3464
|
+
'System.Boolean': 'bool',
|
|
3465
|
+
'Newtonsoft.Json.Linq.JArray': 'dynamic',
|
|
3466
|
+
'Newtonsoft.Json.Linq.JObject': 'dynamic',
|
|
3467
|
+
'Newtonsoft.Json.Linq.JToken': 'dynamic',
|
|
3468
|
+
'System.Object': 'dynamic',
|
|
3469
|
+
'System.Data.SqlTypes.SqlDecimal': 'decimal'
|
|
3470
|
+
};
|
|
3471
|
+
var getCslTypeNameFromClrType = function getCslTypeNameFromClrType(clrType) {
|
|
3472
|
+
return dotnetTypeToKustoType[clrType] || clrType;
|
|
3473
|
+
};
|
|
3474
|
+
var kustoTypeToEntityDataType = {
|
|
3475
|
+
object: 'Object',
|
|
3476
|
+
bool: 'Boolean',
|
|
3477
|
+
uint8: 'Byte',
|
|
3478
|
+
int16: 'Int16',
|
|
3479
|
+
uint16: 'UInt16',
|
|
3480
|
+
int: 'Int32',
|
|
3481
|
+
uint: 'UInt32',
|
|
3482
|
+
long: 'Int64',
|
|
3483
|
+
ulong: 'UInt64',
|
|
3484
|
+
float: 'Single',
|
|
3485
|
+
real: 'Double',
|
|
3486
|
+
decimal: 'Decimal',
|
|
3487
|
+
datetime: 'DateTime',
|
|
3488
|
+
string: 'String',
|
|
3489
|
+
dynamic: 'Dynamic',
|
|
3490
|
+
timespan: 'TimeSpan'
|
|
3491
|
+
};
|
|
3492
|
+
var getEntityDataTypeFromCslType = function getEntityDataTypeFromCslType(cslType) {
|
|
3493
|
+
return kustoTypeToEntityDataType[cslType] || cslType;
|
|
3494
|
+
};
|
|
3495
|
+
var getCallName = function getCallName(fn) {
|
|
3496
|
+
return "".concat(fn.name, "(").concat(fn.inputParameters.map(function (p) {
|
|
3497
|
+
return "{".concat(p.name, "}");
|
|
3498
|
+
}).join(','), ")");
|
|
3499
|
+
};
|
|
3500
|
+
var getExpression = function getExpression(fn) {
|
|
3501
|
+
return "let ".concat(fn.name, " = ").concat(getInputParametersAsCslString(fn.inputParameters), " ").concat(fn.body);
|
|
3502
|
+
};
|
|
3503
|
+
var getInputParametersAsCslString = function getInputParametersAsCslString(inputParameters) {
|
|
3504
|
+
return "(".concat(inputParameters.map(function (inputParameter) {
|
|
3505
|
+
return getInputParameterAsCslString(inputParameter);
|
|
3506
|
+
}).join(','), ")");
|
|
3507
|
+
};
|
|
3508
|
+
var getInputParameterAsCslString = function getInputParameterAsCslString(inputParameter) {
|
|
3509
|
+
// If this is a tabular parameter
|
|
3510
|
+
if (inputParameter.columns && inputParameter.columns.length > 0) {
|
|
3511
|
+
var attributesAsString = inputParameter.columns.map(function (col) {
|
|
3512
|
+
return "".concat(col.name, ":").concat(col.cslType || getCslTypeNameFromClrType(col.type));
|
|
3513
|
+
}).join(',');
|
|
3514
|
+
return "".concat(inputParameter.name, ":").concat(attributesAsString === '' ? '*' : attributesAsString);
|
|
3515
|
+
} else {
|
|
3516
|
+
return "".concat(inputParameter.name, ":").concat(inputParameter.cslType || getCslTypeNameFromClrType(inputParameter.type));
|
|
3517
|
+
}
|
|
3518
|
+
};
|
|
3519
|
+
|
|
3520
|
+
// If we're running in a web worker - which doesn't share global context with the main thread -
|
|
3521
|
+
// we need to manually load dependencies that are not explicit- meaning our non-module dependencies
|
|
3522
|
+
// generated by Bridge.Net
|
|
3523
|
+
if (typeof document == 'undefined') {
|
|
3524
|
+
// monaco will run the worker from vs/base/worker so the relative path needs
|
|
3525
|
+
// to be from there (hence going up 2 dirs) This stinks because we're
|
|
3526
|
+
// requiring the host app to put files in specific locations
|
|
3527
|
+
importScripts(
|
|
3528
|
+
'../../language/kusto/bridge.min.js',
|
|
3529
|
+
'../../language/kusto/kusto.javascript.client.min.js',
|
|
3530
|
+
'../../language/kusto/newtonsoft.json.min.js',
|
|
3531
|
+
'../../language/kusto/Kusto.Language.Bridge.min.js'
|
|
3532
|
+
);
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3520
3535
|
var _symbolKindToName;
|
|
3521
3536
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest(); }
|
|
3522
3537
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -3537,29 +3552,8 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-ac12725e'], (functio
|
|
|
3537
3552
|
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
3538
3553
|
function _toPropertyKey$1(arg) { var key = _toPrimitive$1(arg, "string"); return _typeof$1(key) === "symbol" ? key : String(key); }
|
|
3539
3554
|
function _toPrimitive$1(input, hint) { if (_typeof$1(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$1(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3540
|
-
|
|
3541
|
-
// polyfill string endsWith
|
|
3542
|
-
if (!String.prototype.endsWith) {
|
|
3543
|
-
String.prototype.endsWith = function (search, this_len) {
|
|
3544
|
-
if (this_len === undefined || this_len > this.length) {
|
|
3545
|
-
this_len = this.length;
|
|
3546
|
-
}
|
|
3547
|
-
return this.substring(this_len - search.length, this_len) === search;
|
|
3548
|
-
};
|
|
3549
|
-
}
|
|
3550
|
-
|
|
3551
|
-
// If we're running in a web worker - which doesn't share global context with the main thread -
|
|
3552
|
-
// we need to manually load dependencies that are not explicit- meaning our non-module dependencies
|
|
3553
|
-
// generated by Bridge.Net
|
|
3554
|
-
if (typeof document == 'undefined') {
|
|
3555
|
-
// monaco will run the worker from vs/base/worker so the relative path needs to be from there (hence going up 2 dirs)
|
|
3556
|
-
importScripts('../../language/kusto/bridge.min.js');
|
|
3557
|
-
importScripts('../../language/kusto/kusto.javascript.client.min.js');
|
|
3558
|
-
importScripts('../../language/kusto/Kusto.Language.Bridge.min.js');
|
|
3559
|
-
}
|
|
3560
3555
|
var k = Kusto.Data.IntelliSense;
|
|
3561
3556
|
var parsing = Kusto.Language.Parsing;
|
|
3562
|
-
Kusto.Language.Syntax;
|
|
3563
3557
|
var k2 = Kusto.Language.Editor;
|
|
3564
3558
|
var sym = Kusto.Language.Symbols;
|
|
3565
3559
|
var GlobalState = Kusto.Language.GlobalState;
|
|
@@ -3586,15 +3580,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-ac12725e'], (functio
|
|
|
3586
3580
|
}]);
|
|
3587
3581
|
return ParseProperties;
|
|
3588
3582
|
}();
|
|
3589
|
-
var TokenKind
|
|
3590
|
-
|
|
3591
|
-
/**
|
|
3592
|
-
* A plain old javascript object that is roughly equivalent to the @kusto/language-service-next object, but without
|
|
3593
|
-
* all the Bridge.Net properties and methods. this object is being sent from web worker to main thread and turns out
|
|
3594
|
-
* that when posting the message we lose all properties (and functions), thus we use a POJO instead.
|
|
3595
|
-
* This issue started happening once upgrading to 0.20.0 from 0.15.5.
|
|
3596
|
-
*/
|
|
3597
|
-
(function (TokenKind) {
|
|
3583
|
+
var TokenKind = /*#__PURE__*/function (TokenKind) {
|
|
3598
3584
|
TokenKind[TokenKind["TableToken"] = 2] = "TableToken";
|
|
3599
3585
|
TokenKind[TokenKind["TableColumnToken"] = 4] = "TableColumnToken";
|
|
3600
3586
|
TokenKind[TokenKind["OperatorToken"] = 8] = "OperatorToken";
|
|
@@ -3614,7 +3600,16 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-ac12725e'], (functio
|
|
|
3614
3600
|
TokenKind[TokenKind["PluginToken"] = 131072] = "PluginToken";
|
|
3615
3601
|
TokenKind[TokenKind["BracketRangeToken"] = 262144] = "BracketRangeToken";
|
|
3616
3602
|
TokenKind[TokenKind["ClientDirectiveToken"] = 524288] = "ClientDirectiveToken";
|
|
3617
|
-
|
|
3603
|
+
return TokenKind;
|
|
3604
|
+
}({});
|
|
3605
|
+
|
|
3606
|
+
/**
|
|
3607
|
+
* A plain old javascript object that is roughly equivalent to the @kusto/language-service-next object, but without
|
|
3608
|
+
* all the Bridge.Net properties and methods. this object is being sent from web worker to main thread and turns out
|
|
3609
|
+
* that when posting the message we lose all properties (and functions), thus we use a POJO instead.
|
|
3610
|
+
* This issue started happening once upgrading to 0.20.0 from 0.15.5.
|
|
3611
|
+
*/
|
|
3612
|
+
|
|
3618
3613
|
/**
|
|
3619
3614
|
* convert the bridge.net object to a plain javascript object that only contains data.
|
|
3620
3615
|
* @param k2Classifications @kusto/language-service-next bridge.net object
|
|
@@ -5799,9 +5794,13 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-ac12725e'], (functio
|
|
|
5799
5794
|
_result$location$rang = result.location.range,
|
|
5800
5795
|
start = _result$location$rang.start,
|
|
5801
5796
|
end = _result$location$rang.end;
|
|
5802
|
-
var range = new monaco.Range(start.line + 1, start.character + 1, end.line + 1, end.character + 1);
|
|
5803
5797
|
return {
|
|
5804
|
-
range:
|
|
5798
|
+
range: {
|
|
5799
|
+
startLineNumber: start.line + 1,
|
|
5800
|
+
startColumn: start.character + 1,
|
|
5801
|
+
endLineNumber: end.line + 1,
|
|
5802
|
+
endColumn: end.character + 1
|
|
5803
|
+
},
|
|
5805
5804
|
text: text
|
|
5806
5805
|
};
|
|
5807
5806
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="@kusto/language-service-next/Kusto.Language.Bridge" />
|
|
2
2
|
/// <reference types="@kusto/language-service/Kusto.JavaScript.Client" />
|
|
3
|
-
import * as s from './schema';
|
|
4
3
|
import * as ls from 'vscode-languageserver-types';
|
|
5
4
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
6
5
|
import type { FoldingRange } from 'vscode-languageserver-types';
|
|
6
|
+
import * as s from './schema';
|
|
7
7
|
import type { LanguageSettings } from './settings';
|
|
8
|
+
import 'language-service';
|
|
8
9
|
import k = Kusto.Data.IntelliSense;
|
|
9
10
|
import k2 = Kusto.Language.Editor;
|
|
10
11
|
import { Database } from './schema';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="monaco-editor/monaco" />
|
|
2
|
+
export declare const KustoLanguageDefinition: monaco.languages.IMonarchLanguage;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export type VisualizationType = 'anomalychart' | 'areachart' | 'barchart' | 'columnchart' | 'ladderchart' | 'linechart' | 'piechart' | 'pivotchart' | 'scatterchart' | 'stackedareachart' | 'timechart' | 'table' | 'timeline' | 'timepivot' | 'card';
|
|
2
|
+
export type Scale = 'linear' | 'log';
|
|
3
|
+
export type LegendVisibility = 'visible' | 'hidden';
|
|
4
|
+
export type YSplit = 'none' | 'axes' | 'panels';
|
|
5
|
+
export type Kind = 'default' | 'unstacked' | 'stacked' | 'stacked100' | 'map';
|
|
6
6
|
export interface RenderOptions {
|
|
7
7
|
visualization?: null | VisualizationType;
|
|
8
8
|
title?: null | string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 6.1.
|
|
3
|
+
* monaco-kusto version: 6.1.1(678731e78268dbe877b517e302fa7db86fd96b3c)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/main-
|
|
8
|
+
define('vs/language/kusto/main-068f3954', ['exports'], (function (exports) { 'use strict';
|
|
9
9
|
|
|
10
10
|
/* --------------------------------------------------------------------------------------------
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="../monaco" />
|
|
2
|
-
/// <reference types="monaco-editor
|
|
3
|
-
import
|
|
2
|
+
/// <reference types="monaco-editor/monaco" />
|
|
3
|
+
import 'monaco-editor';
|
|
4
4
|
export declare class LanguageServiceDefaultsImpl implements monaco.languages.kusto.LanguageServiceDefaults {
|
|
5
5
|
private _onDidChange;
|
|
6
6
|
private _languageSettings;
|
|
7
7
|
private _workerMaxIdleTime;
|
|
8
8
|
constructor(languageSettings: monaco.languages.kusto.LanguageSettings);
|
|
9
|
-
get onDidChange(): IEvent<monaco.languages.kusto.LanguageServiceDefaults>;
|
|
9
|
+
get onDidChange(): monaco.IEvent<monaco.languages.kusto.LanguageServiceDefaults>;
|
|
10
10
|
get languageSettings(): monaco.languages.kusto.LanguageSettings;
|
|
11
11
|
setLanguageSettings(options: monaco.languages.kusto.LanguageSettings): void;
|
|
12
12
|
setMaximumWorkerIdleTime(value: number): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 6.1.
|
|
3
|
+
* monaco-kusto version: 6.1.1(678731e78268dbe877b517e302fa7db86fd96b3c)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/monaco.contribution', ['require', 'exports'], (function (require, exports) { 'use strict';
|
|
8
|
+
define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main'], (function (require, exports, editor_main) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _typeof$2(obj) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$2(obj); }
|
|
11
11
|
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -19,7 +19,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports'], (functio
|
|
|
19
19
|
*/
|
|
20
20
|
var KustoCommandHighlighter = /*#__PURE__*/function () {
|
|
21
21
|
/**
|
|
22
|
-
* Register to cursor movement and
|
|
22
|
+
* Register to cursor movement and selection events.
|
|
23
23
|
* @param editor monaco editor instance
|
|
24
24
|
*/
|
|
25
25
|
function KustoCommandHighlighter(editor) {
|
|
@@ -28,7 +28,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports'], (functio
|
|
|
28
28
|
_defineProperty$2(this, "disposables", []);
|
|
29
29
|
_defineProperty$2(this, "decorations", []);
|
|
30
30
|
this.editor = editor;
|
|
31
|
-
// Note that selection update is triggered not only for selection changes, but also just when no text selection is
|
|
31
|
+
// Note that selection update is triggered not only for selection changes, but also just when no text selection is occurring and cursor just moves around.
|
|
32
32
|
// This case is counted as a 0-length selection starting and ending on the cursor position.
|
|
33
33
|
this.editor.onDidChangeCursorSelection(function (changeEvent) {
|
|
34
34
|
if (_this.editor.getModel().getLanguageId() !== 'kusto') {
|
|
@@ -165,17 +165,13 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports'], (functio
|
|
|
165
165
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
166
166
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
167
167
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
168
|
-
var Emitter = monaco.Emitter;
|
|
169
|
-
monaco.IEvent;
|
|
170
|
-
|
|
171
|
-
// declare var require: <T>(moduleId: [string], callback: (module: T) => void) => void;
|
|
172
168
|
|
|
173
169
|
// --- Kusto configuration and defaults ---------
|
|
174
170
|
|
|
175
171
|
var LanguageServiceDefaultsImpl = /*#__PURE__*/function () {
|
|
176
172
|
function LanguageServiceDefaultsImpl(languageSettings) {
|
|
177
173
|
_classCallCheck(this, LanguageServiceDefaultsImpl);
|
|
178
|
-
_defineProperty(this, "_onDidChange", new Emitter());
|
|
174
|
+
_defineProperty(this, "_onDidChange", new monaco.Emitter());
|
|
179
175
|
this.setLanguageSettings(languageSettings);
|
|
180
176
|
// default to never kill worker when idle.
|
|
181
177
|
// reason: when killing worker - schema gets lost. We transmit the schema back to main process when killing
|