@kusto/monaco-kusto 5.3.10 → 5.3.12

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": "@kusto/monaco-kusto",
3
- "version": "5.3.10",
3
+ "version": "5.3.12",
4
4
  "description": "CSL, KQL plugin for the Monaco Editor",
5
5
  "author": {
6
6
  "name": "Microsoft"
@@ -18,8 +18,8 @@
18
18
  },
19
19
  "scripts": {
20
20
  "copy_runtime_deps_to_out": "mcopy ./node_modules/@kusto/language-service/Kusto.JavaScript.Client.min.js ./out/vs/language/kusto/kusto.javascript.client.min.js && mcopy ./node_modules/@kusto/language-service-next/Kusto.Language.Bridge.min.js ./out/vs/language/kusto/Kusto.Language.Bridge.min.js && mcopy ./node_modules/@kusto/language-service/bridge.min.js ./out/vs/language/kusto/bridge.min.js && node ./node_modules/copy-dir-cli/bin/copy ./node_modules/monaco-editor-core/dev/vs ./out/vs",
21
- "compile": "tsc -p ./src/tsconfig.json && tsc -p ./src/tsconfig.esm.json",
22
- "watch": "echo dev > test/mode.txt && tsc -p ./src/tsconfig.watch.json && npm run copy_runtime_deps_to_out && concurrently \"live-server ./ \" \"tsc -w -p ./src/tsconfig.watch.json \"",
21
+ "compile": "tsc -p ./tsconfig.json && tsc -p ./tsconfig.esm.json",
22
+ "watch": "echo dev > test/mode.txt && tsc -p ./tsconfig.watch.json && npm run copy_runtime_deps_to_out && concurrently \"live-server ./ \" \"tsc -w -p ./tsconfig.watch.json \"",
23
23
  "test_release": "echo release > test/mode.txt && http-server -c-1 -p 8080 ./ -o index.html",
24
24
  "copy_types_to_release": "mcopy ./src/monaco.d.ts ./release/esm/monaco.d.ts && mcopy ./out/amd/monaco.contribution.d.ts ./release/esm/monaco.contribution.d.ts && mcopy ./src/monaco.d.ts ./release/min/monaco.d.ts && mcopy ./out/amd/monaco.contribution.d.ts ./release/min/monaco.contribution.d.ts && mcopy ./node_modules/@kusto/language-service/Kusto.JavaScript.Client.min.js ./release/min/kusto.javascript.client.min.js && mcopy ./node_modules/@kusto/language-service-next/Kusto.Language.Bridge.min.js ./release/min/Kusto.Language.Bridge.min.js && mcopy ./node_modules/@kusto/language-service/bridge.min.js ./release/min/bridge.min.js && mcopy ./node_modules/@kusto/language-service/newtonsoft.json.min.js ./release/min/newtonsoft.json.min.js",
25
25
  "prepublishOnly": "mkdirp release && npm run compile && node ./scripts/release.js && node ./scripts/bundle.js && npm run copy_runtime_deps_to_out && npm run copy_types_to_release",
@@ -46,11 +46,11 @@
46
46
  "monaco-plugin-helpers": "^1.0.3",
47
47
  "object-assign": "4.1.0",
48
48
  "requirejs": "^2.3.6",
49
- "terser": "^4.6.7",
49
+ "terser": "^5.16.2",
50
50
  "ts-jest": "^26.1.1",
51
- "typescript": "3.9.7",
52
- "vscode-languageserver-types": "3.16.0",
51
+ "typescript": "^4.0.0",
53
52
  "vscode-languageserver-textdocument": "1.0.4",
53
+ "vscode-languageserver-types": "3.16.0",
54
54
  "xregexp": "^3.2.0"
55
55
  },
56
56
  "dependencies": {
@@ -64,7 +64,7 @@
64
64
  "rootDir": "src",
65
65
  "globals": {
66
66
  "ts-jest": {
67
- "tsConfigFile": "src/tsconfig.json"
67
+ "tsConfigFile": "./tsconfig.json"
68
68
  }
69
69
  },
70
70
  "transform": {
@@ -79,10 +79,5 @@
79
79
  "json",
80
80
  "node"
81
81
  ]
82
- },
83
- "prettier": {
84
- "printWidth": 120,
85
- "tabWidth": 4,
86
- "singleQuote": true
87
82
  }
88
83
  }
@@ -113,23 +113,69 @@ define('vs/language/kusto/languageService/kustoMonarchLanguageDefinition',["requ
113
113
  exports.KustoLanguageDefinition = {
114
114
  name: 'kusto',
115
115
  mimeTypes: ['text/kusto'],
116
- displayName: "Kusto",
117
- defaultToken: "invalid",
118
- brackets: [['[', ']', 'delimiter.square'],
119
- ['(', ')', 'delimiter.parenthesis']],
116
+ displayName: 'Kusto',
117
+ defaultToken: 'invalid',
118
+ brackets: [
119
+ ['[', ']', 'delimiter.square'],
120
+ ['(', ')', 'delimiter.parenthesis'],
121
+ ],
120
122
  wordDefinition: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
121
123
  // .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.
122
124
  promotedOperatorCommandTokens: Kusto.Data.IntelliSense.CslCommandParser.PromotedOperatorCommandTokens.slice(0),
123
125
  operatorCommandTokens: Kusto.Data.IntelliSense.CslCommandParser.OperatorCommandTokens.slice(0),
124
126
  keywords: [
125
- 'by', 'on', 'contains', 'notcontains', 'containscs', 'notcontainscs', 'startswith', 'has', 'matches', 'regex', 'true',
126
- 'false', 'and', 'or', 'typeof', 'int', 'string', 'date', 'datetime', 'time', 'long', 'real', '​boolean', 'bool'
127
+ 'by',
128
+ 'on',
129
+ 'contains',
130
+ 'notcontains',
131
+ 'containscs',
132
+ 'notcontainscs',
133
+ 'startswith',
134
+ 'has',
135
+ 'matches',
136
+ 'regex',
137
+ 'true',
138
+ 'false',
139
+ 'and',
140
+ 'or',
141
+ 'typeof',
142
+ 'int',
143
+ 'string',
144
+ 'date',
145
+ 'datetime',
146
+ 'time',
147
+ 'long',
148
+ 'real',
149
+ '​boolean',
150
+ 'bool',
127
151
  ],
128
152
  operators: ['+', '-', '*', '/', '>', '<', '==', '<>', '<=', '>=', '~', '!~'],
129
153
  builtinFunctions: [
130
- 'countof', 'bin', 'extentid', 'extract', 'extractjson', 'floor', 'iif', 'isnull', 'isnotnull', 'notnull', 'isempty',
131
- 'isnotempty', 'notempty', 'now', 're2', 'strcat', 'strlen', 'toupper',
132
- 'tostring', 'count', 'cnt', 'sum', 'min', 'max', 'avg'
154
+ 'countof',
155
+ 'bin',
156
+ 'extentid',
157
+ 'extract',
158
+ 'extractjson',
159
+ 'floor',
160
+ 'iif',
161
+ 'isnull',
162
+ 'isnotnull',
163
+ 'notnull',
164
+ 'isempty',
165
+ 'isnotempty',
166
+ 'notempty',
167
+ 'now',
168
+ 're2',
169
+ 'strcat',
170
+ 'strlen',
171
+ 'toupper',
172
+ 'tostring',
173
+ 'count',
174
+ 'cnt',
175
+ 'sum',
176
+ 'min',
177
+ 'max',
178
+ 'avg',
133
179
  ],
134
180
  tokenizer: {
135
181
  root: [
@@ -142,7 +188,9 @@ define('vs/language/kusto/languageService/kustoMonarchLanguageDefinition',["requ
142
188
  [/[;,.]/, 'delimiter'],
143
189
  [/[()\[\]]/, '@brackets'],
144
190
  [/[<>=!%&+\-*/|~^]/, 'operator'],
145
- [/[\w@#\-$]+/, {
191
+ [
192
+ /[\w@#\-$]+/,
193
+ {
146
194
  cases: {
147
195
  '@keywords': 'keyword',
148
196
  '@promotedOperatorCommandTokens': 'operator.sql',
@@ -150,41 +198,44 @@ define('vs/language/kusto/languageService/kustoMonarchLanguageDefinition',["requ
150
198
  '@operators': 'operator',
151
199
  '@builtinFunctions': 'predefined',
152
200
  '@default': 'identifier',
153
- }
154
- }],
201
+ },
202
+ },
203
+ ],
155
204
  ],
156
205
  whitespace: [[/\s+/, 'white']],
157
- comments: [["\\/\\/+.*", "comment"]],
206
+ comments: [['\\/\\/+.*', 'comment']],
158
207
  numbers: [
159
208
  [/0[xX][0-9a-fA-F]*/, 'number'],
160
209
  [/[$][+-]*\d*(\.\d*)?/, 'number'],
161
- [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
210
+ [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number'],
162
211
  ],
163
212
  strings: [
164
213
  [/H'/, { token: 'string.quote', bracket: '@open', next: '@string' }],
165
214
  [/h'/, { token: 'string.quote', bracket: '@open', next: '@string' }],
166
- [/'/, { token: 'string.quote', bracket: '@open', next: '@string' }]
215
+ [/'/, { token: 'string.quote', bracket: '@open', next: '@string' }],
167
216
  ],
168
217
  string: [
169
218
  [/[^']+/, 'string'],
170
219
  [/''/, 'string'],
171
- [/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
220
+ [/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
172
221
  ],
173
222
  dqstrings: [
174
223
  [/H"/, { token: 'string.quote', bracket: '@open', next: '@dqstring' }],
175
224
  [/h"/, { token: 'string.quote', bracket: '@open', next: '@dqstring' }],
176
- [/"/, { token: 'string.quote', bracket: '@open', next: '@dqstring' }]
225
+ [/"/, { token: 'string.quote', bracket: '@open', next: '@dqstring' }],
177
226
  ],
178
227
  dqstring: [
179
228
  [/[^"]+/, 'string'],
180
229
  [/""/, 'string'],
181
- [/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
230
+ [/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
182
231
  ],
183
- literals: [[/datetime\(\d{4}-\d{2}-\d{2}(\s+\d{2}:\d{2}(:\d{2}(\.\d{0,3})?)?)?\)/, 'number'],
232
+ literals: [
233
+ [/datetime\(\d{4}-\d{2}-\d{2}(\s+\d{2}:\d{2}(:\d{2}(\.\d{0,3})?)?)?\)/, 'number'],
184
234
  [/time\((\d+(s(ec(onds?)?)?|m(in(utes?)?)?|h(ours?)?|d(ays?)?)|(\s*(('[^']+')|("[^"]+"))\s*))\)/, 'number'],
185
235
  [/guid\([\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}\)/, 'number'],
186
- [/typeof\((int|string|date|datetime|time|long|real|boolean|bool)\)/, 'number']]
187
- }
236
+ [/typeof\((int|string|date|datetime|time|long|real|boolean|bool)\)/, 'number'],
237
+ ],
238
+ },
188
239
  };
189
240
  });
190
241
 
@@ -2260,7 +2311,6 @@ define('vs/language/kusto/languageFeatures',["require", "exports", "vscode-langu
2260
2311
  var Uri = monaco.Uri;
2261
2312
  var Range = monaco.Range;
2262
2313
  var ClassificationKind = Kusto.Language.Editor.ClassificationKind;
2263
- // --- diagnostics ---
2264
2314
  var DiagnosticsAdapter = /** @class */ (function () {
2265
2315
  function DiagnosticsAdapter(_monacoInstance, _languageId, _worker, defaults, onSchemaChange) {
2266
2316
  var _this = this;
@@ -2403,9 +2453,9 @@ define('vs/language/kusto/languageFeatures',["require", "exports", "vscode-langu
2403
2453
  }
2404
2454
  else {
2405
2455
  // Add custom popup for syntax error: icon, header and message as markdown
2406
- var header = syntaxErrorAsMarkDown.header ? "**" + syntaxErrorAsMarkDown.header + "** \n\n" : '';
2407
- var icon = syntaxErrorAsMarkDown.icon ? "![](" + syntaxErrorAsMarkDown.icon + ")" : '';
2408
- var popupErrorHoverHeaderMessage_1 = icon + " " + header;
2456
+ var header = syntaxErrorAsMarkDown.header ? "**".concat(syntaxErrorAsMarkDown.header, "** \n\n") : '';
2457
+ var icon = syntaxErrorAsMarkDown.icon ? "![](".concat(syntaxErrorAsMarkDown.icon, ")") : '';
2458
+ var popupErrorHoverHeaderMessage_1 = "".concat(icon, " ").concat(header);
2409
2459
  var newDecorations = markers.map(function (marker) {
2410
2460
  return {
2411
2461
  range: {
@@ -2432,8 +2482,7 @@ define('vs/language/kusto/languageFeatures',["require", "exports", "vscode-langu
2432
2482
  },
2433
2483
  };
2434
2484
  });
2435
- var oldMarkers = monaco.editor
2436
- .getModelMarkers({
2485
+ var oldMarkers = monaco.editor.getModelMarkers({
2437
2486
  owner: languageId,
2438
2487
  resource: resource,
2439
2488
  });
@@ -2739,7 +2788,7 @@ define('vs/language/kusto/languageFeatures',["require", "exports", "vscode-langu
2739
2788
  var classificationColorTriplets = getClassificationColorTriplets();
2740
2789
  var cssInnerHtml = classificationColorTriplets
2741
2790
  .map(function (pair) {
2742
- return ".vs ." + pair.classification + " {color: #" + pair.colorLight + ";} .vs-dark ." + pair.classification + " {color: #" + pair.colorDark + ";}";
2791
+ return ".vs .".concat(pair.classification, " {color: #").concat(pair.colorLight, ";} .vs-dark .").concat(pair.classification, " {color: #").concat(pair.colorDark, ";}");
2743
2792
  })
2744
2793
  .join('\n');
2745
2794
  return cssInnerHtml;
@@ -2840,7 +2889,7 @@ define('vs/language/kusto/languageFeatures',["require", "exports", "vscode-langu
2840
2889
  text: textEdit.newText,
2841
2890
  };
2842
2891
  }
2843
- var DOCS_BASE_URL = "https://learn.microsoft.com/azure/data-explorer/kusto/query";
2892
+ var DOCS_BASE_URL = 'https://learn.microsoft.com/azure/data-explorer/kusto/query';
2844
2893
  function formatDocLink(docString) {
2845
2894
  // If the docString is empty, we want to return undefined to prevent an empty documentation popup.
2846
2895
  if (!docString) {
@@ -2850,9 +2899,11 @@ define('vs/language/kusto/languageFeatures',["require", "exports", "vscode-langu
2850
2899
  var urisProxy = new Proxy(target, {
2851
2900
  get: function (_target, prop, _receiver) {
2852
2901
  // The link comes with a postfix of ".md" that we want to remove
2853
- var linkWithoutPostfix = prop.toString().replace(".md", "");
2902
+ var linkWithoutPostfix = prop.toString().replace('.md', '');
2854
2903
  // Sometimes we get the link as a full URL. For example in the main doc link of the item
2855
- var fullURL = linkWithoutPostfix.startsWith("https") ? linkWithoutPostfix : DOCS_BASE_URL + "/" + linkWithoutPostfix;
2904
+ var fullURL = linkWithoutPostfix.startsWith('https')
2905
+ ? linkWithoutPostfix
2906
+ : "".concat(DOCS_BASE_URL, "/").concat(linkWithoutPostfix);
2856
2907
  return monaco.Uri.parse(fullURL);
2857
2908
  },
2858
2909
  });
@@ -3205,7 +3256,10 @@ define('vs/language/kusto/kustoMode',["require", "exports", "./workerManager", "
3205
3256
  return (__assign(__assign({}, worker), { setSchema: function (schema) { return augmentedSetSchema(schema, worker); }, setSchemaFromShowSchema: function (schema, connection, database, globalScalarParameters, globalTabularParameters) {
3206
3257
  worker
3207
3258
  .normalizeSchema(schema, connection, database)
3208
- .then(function (schema) { return (globalScalarParameters ? __assign(__assign({}, schema), { globalScalarParameters: globalScalarParameters, globalTabularParameters: globalTabularParameters }) : schema); })
3259
+ .then(function (schema) {
3260
+ return globalScalarParameters
3261
+ ? __assign(__assign({}, schema), { globalScalarParameters: globalScalarParameters, globalTabularParameters: globalTabularParameters }) : schema;
3262
+ })
3209
3263
  .then(function (normalized) { return augmentedSetSchema(normalized, worker); });
3210
3264
  } }));
3211
3265
  });
@@ -23,9 +23,10 @@ define('vs/language/kusto/languageService/schema',["require", "exports"], functi
23
23
  'Newtonsoft.Json.Linq.JObject': 'dynamic',
24
24
  'Newtonsoft.Json.Linq.JToken': 'dynamic',
25
25
  'System.Object': 'dynamic',
26
- 'System.Data.SqlTypes.SqlDecimal': 'decimal'
26
+ 'System.Data.SqlTypes.SqlDecimal': 'decimal',
27
27
  };
28
- exports.getCslTypeNameFromClrType = function (clrType) { return dotnetTypeToKustoType[clrType] || clrType; };
28
+ var getCslTypeNameFromClrType = function (clrType) { return dotnetTypeToKustoType[clrType] || clrType; };
29
+ exports.getCslTypeNameFromClrType = getCslTypeNameFromClrType;
29
30
  var kustoTypeToEntityDataType = {
30
31
  object: 'Object',
31
32
  bool: 'Boolean',
@@ -42,28 +43,32 @@ define('vs/language/kusto/languageService/schema',["require", "exports"], functi
42
43
  datetime: 'DateTime',
43
44
  string: 'String',
44
45
  dynamic: 'Dynamic',
45
- timespan: 'TimeSpan'
46
+ timespan: 'TimeSpan',
46
47
  };
47
- exports.getEntityDataTypeFromCslType = function (cslType) { return kustoTypeToEntityDataType[cslType] || cslType; };
48
- exports.getCallName = function (fn) {
49
- return fn.name + "(" + fn.inputParameters.map(function (p) { return "{" + p.name + "}"; }).join(',') + ")";
48
+ var getEntityDataTypeFromCslType = function (cslType) { return kustoTypeToEntityDataType[cslType] || cslType; };
49
+ exports.getEntityDataTypeFromCslType = getEntityDataTypeFromCslType;
50
+ var getCallName = function (fn) {
51
+ return "".concat(fn.name, "(").concat(fn.inputParameters.map(function (p) { return "{".concat(p.name, "}"); }).join(','), ")");
50
52
  };
51
- exports.getExpression = function (fn) {
52
- return "let " + fn.name + " = " + exports.getInputParametersAsCslString(fn.inputParameters) + " " + fn.body;
53
+ exports.getCallName = getCallName;
54
+ var getExpression = function (fn) {
55
+ return "let ".concat(fn.name, " = ").concat((0, exports.getInputParametersAsCslString)(fn.inputParameters), " ").concat(fn.body);
53
56
  };
54
- exports.getInputParametersAsCslString = function (inputParameters) {
55
- return "(" + inputParameters.map(function (inputParameter) { return getInputParameterAsCslString(inputParameter); }).join(',') + ")";
57
+ exports.getExpression = getExpression;
58
+ var getInputParametersAsCslString = function (inputParameters) {
59
+ return "(".concat(inputParameters.map(function (inputParameter) { return getInputParameterAsCslString(inputParameter); }).join(','), ")");
56
60
  };
61
+ exports.getInputParametersAsCslString = getInputParametersAsCslString;
57
62
  var getInputParameterAsCslString = function (inputParameter) {
58
63
  // If this is a tabular parameter
59
64
  if (inputParameter.columns && inputParameter.columns.length > 0) {
60
65
  var attributesAsString = inputParameter.columns
61
- .map(function (col) { return col.name + ":" + (col.cslType || exports.getCslTypeNameFromClrType(col.type)); })
66
+ .map(function (col) { return "".concat(col.name, ":").concat(col.cslType || (0, exports.getCslTypeNameFromClrType)(col.type)); })
62
67
  .join(',');
63
- return inputParameter.name + ":" + (attributesAsString === '' ? '*' : attributesAsString);
68
+ return "".concat(inputParameter.name, ":").concat(attributesAsString === '' ? '*' : attributesAsString);
64
69
  }
65
70
  else {
66
- return inputParameter.name + ":" + (inputParameter.cslType || exports.getCslTypeNameFromClrType(inputParameter.type));
71
+ return "".concat(inputParameter.name, ":").concat(inputParameter.cslType || (0, exports.getCslTypeNameFromClrType)(inputParameter.type));
67
72
  }
68
73
  };
69
74
  });
@@ -6656,12 +6661,14 @@ var __assign = (this && this.__assign) || function () {
6656
6661
  };
6657
6662
  return __assign.apply(this, arguments);
6658
6663
  };
6659
- var __spreadArrays = (this && this.__spreadArrays) || function () {
6660
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
6661
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
6662
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6663
- r[k] = a[j];
6664
- return r;
6664
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
6665
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
6666
+ if (ar || !(i in from)) {
6667
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6668
+ ar[i] = from[i];
6669
+ }
6670
+ }
6671
+ return to.concat(ar || Array.prototype.slice.call(from));
6665
6672
  };
6666
6673
  define('vs/language/kusto/languageService/kustoLanguageService',["require", "exports", "./schema", "vscode-languageserver-types", "xregexp", "./schema"], function (require, exports, s, ls, XRegExp, schema_1) {
6667
6674
  "use strict";
@@ -6768,7 +6775,7 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
6768
6775
  /**
6769
6776
  * Taken from:
6770
6777
  * https://msazure.visualstudio.com/One/_git/Azure-Kusto-Service?path=/Src/Tools/Kusto.Explorer.Control/QueryEditors/KustoScriptEditor/KustoScriptEditorControl2.xaml.cs&version=GBdev&line=2075&lineEnd=2075&lineStartColumn=9&lineEndColumn=77&lineStyle=plain&_a=contents
6771
- */
6778
+ */
6772
6779
  this._toOptionKind = (_a = {},
6773
6780
  _a[k2.CompletionKind.AggregateFunction] = k.OptionKind.FunctionAggregation,
6774
6781
  _a[k2.CompletionKind.BuiltInFunction] = k.OptionKind.FunctionScalar,
@@ -6915,7 +6922,7 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
6915
6922
  this._newlineAppendPipePolicy.Text = '\n| ';
6916
6923
  }
6917
6924
  KustoLanguageService.prototype.createDatabaseUniqueName = function (clusterName, databaseName) {
6918
- return clusterName + "_" + databaseName;
6925
+ return "".concat(clusterName, "_").concat(databaseName);
6919
6926
  };
6920
6927
  Object.defineProperty(KustoLanguageService.prototype, "_kustoJsSchemaV2", {
6921
6928
  /**
@@ -6962,20 +6969,20 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
6962
6969
  */
6963
6970
  KustoLanguageService.prototype.debugGlobalState = function (globals) {
6964
6971
  // iterate over clusters
6965
- console.log("globals.Clusters.Count: " + globals.Clusters.Count);
6972
+ console.log("globals.Clusters.Count: ".concat(globals.Clusters.Count));
6966
6973
  for (var i = 0; i < globals.Clusters.Count; i++) {
6967
6974
  var cluster = globals.Clusters.getItem(i);
6968
- console.log("cluster: " + cluster.Name);
6975
+ console.log("cluster: ".concat(cluster.Name));
6969
6976
  // iterate over databases
6970
- console.log("cluster.Databases.Count: " + cluster.Databases.Count);
6977
+ console.log("cluster.Databases.Count: ".concat(cluster.Databases.Count));
6971
6978
  for (var i2 = 0; i2 < cluster.Databases.Count; i2++) {
6972
6979
  var database = cluster.Databases.getItem(i2);
6973
- console.log("cluster.database: [" + cluster.Name + "].[" + database.Name + "]");
6980
+ console.log("cluster.database: [".concat(cluster.Name, "].[").concat(database.Name, "]"));
6974
6981
  // iterate over tables
6975
- console.log("cluster.Databases.Tables.Count: " + database.Tables.Count);
6982
+ console.log("cluster.Databases.Tables.Count: ".concat(database.Tables.Count));
6976
6983
  for (var i3 = 0; i3 < database.Tables.Count; i3++) {
6977
6984
  var table = database.Tables.getItem(i3);
6978
- console.log("cluster.database.table: [" + cluster.Name + "].[" + database.Name + "].[" + table.Name + "]");
6985
+ console.log("cluster.database.table: [".concat(cluster.Name, "].[").concat(database.Name, "].[").concat(table.Name, "]"));
6979
6986
  }
6980
6987
  }
6981
6988
  }
@@ -6984,7 +6991,7 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
6984
6991
  * Prepending the doc of the actual topic at the top
6985
6992
  */
6986
6993
  KustoLanguageService.prototype.formatHelpTopic = function (helpTopic) {
6987
- return "**" + helpTopic.Name + " [(view online)](" + helpTopic.Url + ")**\n\n" + helpTopic.LongDescription;
6994
+ return "**".concat(helpTopic.Name, " [(view online)](").concat(helpTopic.Url, ")**\n\n").concat(helpTopic.LongDescription);
6988
6995
  };
6989
6996
  KustoLanguageService.prototype.doCompleteV2 = function (document, position) {
6990
6997
  var _this = this;
@@ -7026,7 +7033,7 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
7026
7033
  ? {
7027
7034
  // Need to escape dollar sign since it is used as a placeholder in snippet.
7028
7035
  // Usually dollar sign is not a valid character in a function name, but grafana uses macros that start with dollars.
7029
- textToInsert: kItem.EditText.replace('$', '\\$') + "$0" + kItem.AfterText,
7036
+ textToInsert: "".concat(kItem.EditText.replace('$', '\\$'), "$0").concat(kItem.AfterText),
7030
7037
  format: ls.InsertTextFormat.Snippet,
7031
7038
  }
7032
7039
  : {
@@ -7430,13 +7437,14 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
7430
7437
  KustoLanguageService.prototype.setSchema = function (schema) {
7431
7438
  var _this = this;
7432
7439
  this._schema = schema;
7433
- if (this._languageSettings.useIntellisenseV2) {
7434
- var kustoJsSchemaV2 = schema && schema.clusterType === 'Engine' ? this.convertToKustoJsSchemaV2(schema) : null;
7440
+ // We support intellisenseV2 only if the clusterType is "Engine", even if the setting is enabled
7441
+ if (this._languageSettings.useIntellisenseV2 && schema && schema.clusterType === 'Engine') {
7442
+ var kustoJsSchemaV2 = this.convertToKustoJsSchemaV2(schema);
7435
7443
  this._kustoJsSchemaV2 = kustoJsSchemaV2;
7436
7444
  this._script = undefined;
7437
7445
  this._parsePropertiesV2 = undefined;
7438
7446
  }
7439
- // since V2 doesn't support control commands, we're initializing V1 intellisense for both cases and we'll going to use V1 intellisense for contorl commands.
7447
+ // since V2 doesn't support control commands, we're initializing V1 intellisense for both cases and we'll going to use V1 intellisense for control commands.
7440
7448
  return new Promise(function (resolve, reject) {
7441
7449
  var kustoJsSchema = schema ? KustoLanguageService.convertToKustoJsSchema(schema) : undefined;
7442
7450
  _this._kustoJsSchema = kustoJsSchema;
@@ -7451,8 +7459,10 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
7451
7459
  this._schema.globalScalarParameters = scalarParameters;
7452
7460
  this._schema.globalTabularParameters = tabularParameters;
7453
7461
  var scalarSymbols = scalarParameters.map(function (param) { return KustoLanguageService.createParameterSymbol(param); });
7454
- var tabularSymbols = tabularParameters.map(function (param) { return KustoLanguageService.createTabularParameterSymbol(param); });
7455
- this._kustoJsSchemaV2 = this._kustoJsSchemaV2.WithParameters(KustoLanguageService.toBridgeList(__spreadArrays(scalarSymbols, tabularSymbols)));
7462
+ var tabularSymbols = tabularParameters.map(function (param) {
7463
+ return KustoLanguageService.createTabularParameterSymbol(param);
7464
+ });
7465
+ this._kustoJsSchemaV2 = this._kustoJsSchemaV2.WithParameters(KustoLanguageService.toBridgeList(__spreadArray(__spreadArray([], scalarSymbols, true), tabularSymbols, true)));
7456
7466
  return Promise.resolve(undefined);
7457
7467
  };
7458
7468
  /**
@@ -8046,7 +8056,7 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
8046
8056
  table.columns.forEach(function (column) {
8047
8057
  var kColumn = new k.KustoIntelliSenseColumnEntity();
8048
8058
  kColumn.Name = column.name;
8049
- kColumn.TypeCode = k.EntityDataType[schema_1.getEntityDataTypeFromCslType(column.type)];
8059
+ kColumn.TypeCode = k.EntityDataType[(0, schema_1.getEntityDataTypeFromCslType)(column.type)];
8050
8060
  cols.push(kColumn);
8051
8061
  });
8052
8062
  kTable.Columns = new Bridge.ArrayEnumerable(cols);
@@ -8099,8 +8109,8 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
8099
8109
  * @param params scalar parameters
8100
8110
  */
8101
8111
  KustoLanguageService.scalarParametersToSignature = function (params) {
8102
- var signatureWithoutParens = params.map(function (param) { return param.name + ": " + param.cslType; }).join(', ');
8103
- return "(" + signatureWithoutParens + ")";
8112
+ var signatureWithoutParens = params.map(function (param) { return "".concat(param.name, ": ").concat(param.cslType); }).join(', ');
8113
+ return "(".concat(signatureWithoutParens, ")");
8104
8114
  };
8105
8115
  /**
8106
8116
  * Returns something like '(x: string, T: (y: int))'
@@ -8112,14 +8122,14 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
8112
8122
  .map(function (param) {
8113
8123
  if (param.columns) {
8114
8124
  var tableSignature = _this.scalarParametersToSignature(param.columns);
8115
- return param.name + ": " + tableSignature;
8125
+ return "".concat(param.name, ": ").concat(tableSignature);
8116
8126
  }
8117
8127
  else {
8118
- return param.name + ": " + param.cslType;
8128
+ return "".concat(param.name, ": ").concat(param.cslType);
8119
8129
  }
8120
8130
  })
8121
8131
  .join(', ');
8122
- return "(" + signatureWithoutParens + ")";
8132
+ return "(".concat(signatureWithoutParens, ")");
8123
8133
  };
8124
8134
  /**
8125
8135
  * converts a function definition to a let statement.
@@ -8127,13 +8137,13 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
8127
8137
  */
8128
8138
  KustoLanguageService.toLetStatement = function (fn) {
8129
8139
  var signature = this.inputParameterToSignature(fn.inputParameters);
8130
- return "let " + fn.name + " = " + signature + " " + fn.body;
8140
+ return "let ".concat(fn.name, " = ").concat(signature, " ").concat(fn.body);
8131
8141
  };
8132
8142
  KustoLanguageService.createColumnSymbol = function (col) {
8133
- return new sym.ColumnSymbol(col.name, sym.ScalarTypes.GetSymbol(schema_1.getCslTypeNameFromClrType(col.type)), col.docstring, null, null, col.examples ? KustoLanguageService.toBridgeList(col.examples) : null);
8143
+ return new sym.ColumnSymbol(col.name, sym.ScalarTypes.GetSymbol((0, schema_1.getCslTypeNameFromClrType)(col.type)), col.docstring, null, null, col.examples ? KustoLanguageService.toBridgeList(col.examples) : null);
8134
8144
  };
8135
8145
  KustoLanguageService.createParameterSymbol = function (param) {
8136
- var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol(schema_1.getCslTypeNameFromClrType(param.type));
8146
+ var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol((0, schema_1.getCslTypeNameFromClrType)(param.type));
8137
8147
  return new sym.ParameterSymbol(param.name, paramSymbol, null);
8138
8148
  };
8139
8149
  KustoLanguageService.createTabularParameterSymbol = function (param) {
@@ -8143,7 +8153,7 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
8143
8153
  };
8144
8154
  KustoLanguageService.createParameter = function (param) {
8145
8155
  if (!param.columns) {
8146
- var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol(schema_1.getCslTypeNameFromClrType(param.type));
8156
+ var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol((0, schema_1.getCslTypeNameFromClrType)(param.type));
8147
8157
  var expression = param.cslDefaultValue && typeof param.cslDefaultValue === 'string'
8148
8158
  ? parsing.QueryParser.ParseLiteral$1(param.cslDefaultValue)
8149
8159
  : undefined;
@@ -8235,11 +8245,15 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
8235
8245
  globalState = globalState.WithDatabase(databaseInContext);
8236
8246
  }
8237
8247
  // Inject global scalar parameters to global scope.
8238
- var scalarParameters = ((_a = schema.globalScalarParameters) !== null && _a !== void 0 ? _a : []).map(function (param) { return KustoLanguageService.createParameterSymbol(param); });
8248
+ var scalarParameters = ((_a = schema.globalScalarParameters) !== null && _a !== void 0 ? _a : []).map(function (param) {
8249
+ return KustoLanguageService.createParameterSymbol(param);
8250
+ });
8239
8251
  // Inject global tabular parameters to global scope.
8240
- var tabularParameters = ((_b = schema.globalTabularParameters) !== null && _b !== void 0 ? _b : []).map(function (param) { return KustoLanguageService.createTabularParameterSymbol(param); });
8252
+ var tabularParameters = ((_b = schema.globalTabularParameters) !== null && _b !== void 0 ? _b : []).map(function (param) {
8253
+ return KustoLanguageService.createTabularParameterSymbol(param);
8254
+ });
8241
8255
  if (tabularParameters.length || scalarParameters.length) {
8242
- globalState = globalState.WithParameters(KustoLanguageService.toBridgeList(__spreadArrays(scalarParameters, tabularParameters)));
8256
+ globalState = globalState.WithParameters(KustoLanguageService.toBridgeList(__spreadArray(__spreadArray([], scalarParameters, true), tabularParameters, true)));
8243
8257
  }
8244
8258
  return globalState;
8245
8259
  };
@@ -8276,7 +8290,7 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
8276
8290
  */
8277
8291
  KustoLanguageService.prototype.getSortText = function (order) {
8278
8292
  if (order <= 0) {
8279
- throw new RangeError("order should be a number >= 1. instead got " + order);
8293
+ throw new RangeError("order should be a number >= 1. instead got ".concat(order));
8280
8294
  }
8281
8295
  var sortText = '';
8282
8296
  var numCharacters = 26; // "z" - "a" + 1;
@@ -8481,7 +8495,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8481
8495
  KustoWorker.prototype.addClusterToSchema = function (uri, clusterName, databasesNames) {
8482
8496
  var document = this._getTextDocument(uri);
8483
8497
  if (!document) {
8484
- console.error("addClusterToSchema: document is " + document + ". uri is " + uri);
8498
+ console.error("addClusterToSchema: document is ".concat(document, ". uri is ").concat(uri));
8485
8499
  return Promise.resolve();
8486
8500
  }
8487
8501
  return this._languageService.addClusterToSchema(document, clusterName, databasesNames);
@@ -8489,7 +8503,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8489
8503
  KustoWorker.prototype.addDatabaseToSchema = function (uri, clusterName, databaseSchema) {
8490
8504
  var document = this._getTextDocument(uri);
8491
8505
  if (!document) {
8492
- console.error("addDatabaseToSchema: document is " + document + ". uri is " + uri);
8506
+ console.error("addDatabaseToSchema: document is ".concat(document, ". uri is ").concat(uri));
8493
8507
  return Promise.resolve();
8494
8508
  }
8495
8509
  return this._languageService.addDatabaseToSchema(document, clusterName, databaseSchema);
@@ -8506,7 +8520,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8506
8520
  KustoWorker.prototype.getCommandInContext = function (uri, cursorOffset) {
8507
8521
  var document = this._getTextDocument(uri);
8508
8522
  if (!document) {
8509
- console.error("getCommandInContext: document is " + document + ". uri is " + uri);
8523
+ console.error("getCommandInContext: document is ".concat(document, ". uri is ").concat(uri));
8510
8524
  return null;
8511
8525
  }
8512
8526
  var commandInContext = this._languageService.getCommandInContext(document, cursorOffset);
@@ -8518,7 +8532,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8518
8532
  KustoWorker.prototype.getQueryParams = function (uri, cursorOffset) {
8519
8533
  var document = this._getTextDocument(uri);
8520
8534
  if (!document) {
8521
- console.error("getQueryParams: document is " + document + ". uri is " + uri);
8535
+ console.error("getQueryParams: document is ".concat(document, ". uri is ").concat(uri));
8522
8536
  return null;
8523
8537
  }
8524
8538
  var queryParams = this._languageService.getQueryParams(document, cursorOffset);
@@ -8530,7 +8544,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8530
8544
  KustoWorker.prototype.getGlobalParams = function (uri) {
8531
8545
  var document = this._getTextDocument(uri);
8532
8546
  if (!document) {
8533
- console.error("getGLobalParams: document is " + document + ". uri is " + uri);
8547
+ console.error("getGLobalParams: document is ".concat(document, ". uri is ").concat(uri));
8534
8548
  return null;
8535
8549
  }
8536
8550
  var globalParams = this._languageService.getGlobalParams(document);
@@ -8542,7 +8556,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8542
8556
  KustoWorker.prototype.getReferencedGlobalParams = function (uri, cursorOffest) {
8543
8557
  var document = this._getTextDocument(uri);
8544
8558
  if (!document) {
8545
- console.error("getReferencedGlobalParams: document is " + document + ". uri is " + uri);
8559
+ console.error("getReferencedGlobalParams: document is ".concat(document, ". uri is ").concat(uri));
8546
8560
  return null;
8547
8561
  }
8548
8562
  var referencedParams = this._languageService.getReferencedGlobalParams(document, cursorOffest);
@@ -8554,7 +8568,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8554
8568
  KustoWorker.prototype.getRenderInfo = function (uri, cursorOffset) {
8555
8569
  var document = this._getTextDocument(uri);
8556
8570
  if (!document) {
8557
- console.error("getRenderInfo: document is " + document + ". uri is " + uri);
8571
+ console.error("getRenderInfo: document is ".concat(document, ". uri is ").concat(uri));
8558
8572
  }
8559
8573
  return this._languageService.getRenderInfo(document, cursorOffset).then(function (result) {
8560
8574
  if (!result) {
@@ -8572,7 +8586,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8572
8586
  KustoWorker.prototype.getCommandAndLocationInContext = function (uri, cursorOffset) {
8573
8587
  var document = this._getTextDocument(uri);
8574
8588
  if (!document) {
8575
- console.error("getCommandAndLocationInContext: document is " + document + ". uri is " + uri);
8589
+ console.error("getCommandAndLocationInContext: document is ".concat(document, ". uri is ").concat(uri));
8576
8590
  return Promise.resolve(null);
8577
8591
  }
8578
8592
  return this._languageService.getCommandAndLocationInContext(document, cursorOffset).then(function (result) {
@@ -8591,7 +8605,7 @@ define('vs/language/kusto/kustoWorker',["require", "exports", "./languageService
8591
8605
  KustoWorker.prototype.getCommandsInDocument = function (uri) {
8592
8606
  var document = this._getTextDocument(uri);
8593
8607
  if (!document) {
8594
- console.error("getCommandInDocument: document is " + document + ". uri is " + uri);
8608
+ console.error("getCommandInDocument: document is ".concat(document, ". uri is ").concat(uri));
8595
8609
  return null;
8596
8610
  }
8597
8611
  return this._languageService.getCommandsInDocument(document);