@kusto/monaco-kusto 12.0.1 → 12.0.3

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.
Files changed (32) hide show
  1. package/README.md +9 -1
  2. package/package.json +2 -2
  3. package/release/dev/kusto.javascript.client.min.js +1 -1
  4. package/release/dev/kustoMode.js +1771 -4
  5. package/release/dev/kustoWorker.js +2 -2
  6. package/release/dev/{main-f36cb42f.js → main-1546c7f5.js} +2 -2
  7. package/release/dev/monaco.contribution.js +73 -76
  8. package/release/dev/{schema-077630e6.js → schema-9341f93e.js} +2 -13
  9. package/release/dev/types-91878f5b.js +46 -0
  10. package/release/esm/globals-417d1e2f.js +40 -0
  11. package/release/esm/kusto.worker.js +11 -11
  12. package/release/esm/kustoMode.d.ts +8 -4
  13. package/release/esm/kustoMode.js +89 -92
  14. package/release/esm/languageFeatures.d.ts +1 -1
  15. package/release/esm/languageServiceManager/schema.d.ts +2 -2
  16. package/release/esm/monaco.contribution.js +20 -55
  17. package/release/esm/{schema-b8f0ba9b.js → schema-d4e431c7.js} +2 -12
  18. package/release/esm/syntaxHighlighting/SemanticTokensProvider.d.ts +1 -1
  19. package/release/esm/syntaxHighlighting/SemanticTokensProvider.js +3 -3
  20. package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.d.ts +2 -2
  21. package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.js +52 -4
  22. package/release/min/kusto.javascript.client.min.js +1 -1
  23. package/release/min/kustoMode.js +2 -2
  24. package/release/min/kustoWorker.js +2 -2
  25. package/release/min/{main-86d6c837.js → main-a2b9fd7b.js} +2 -2
  26. package/release/min/monaco.contribution.js +2 -2
  27. package/release/min/schema-319a2b5f.js +7 -0
  28. package/release/min/types-310c0d26.js +7 -0
  29. package/release/dev/kustoMode-d3f9e09a.js +0 -1818
  30. package/release/esm/kustoMode-349f5467.js +0 -957
  31. package/release/min/kustoMode-2dd4a01e.js +0 -7
  32. package/release/min/schema-a60c216c.js +0 -7
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.1(56b90ce0fd31e7d6792f5098d1e8204274966b6e)
3
+ * monaco-kusto version: 12.0.3(418f3d71791a9e0959cc8869c01ea6d9b94b3179)
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-f36cb42f', './schema-077630e6'], (function (exports, main, schema) { 'use strict';
8
+ define('vs/language/kusto/kustoWorker', ['exports', './main-1546c7f5', './schema-9341f93e'], (function (exports, main, schema) { 'use strict';
9
9
 
10
10
  function _slicedToArray$2(r, e) { return _arrayWithHoles$2(r) || _iterableToArrayLimit$2(r, e) || _unsupportedIterableToArray$3(r, e) || _nonIterableRest$2(); }
11
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."); }
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.1(56b90ce0fd31e7d6792f5098d1e8204274966b6e)
3
+ * monaco-kusto version: 12.0.3(418f3d71791a9e0959cc8869c01ea6d9b94b3179)
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-f36cb42f', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/main-1546c7f5', ['exports'], (function (exports) { 'use strict';
9
9
 
10
10
  /* --------------------------------------------------------------------------------------------
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.1(56b90ce0fd31e7d6792f5098d1e8204274966b6e)
3
+ * monaco-kusto version: 12.0.3(418f3d71791a9e0959cc8869c01ea6d9b94b3179)
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', ['exports', 'vs/editor/editor.main', './kustoMode-d3f9e09a', './schema-077630e6', './main-f36cb42f'], (function (exports, monaco, kustoMode, schema, main) { 'use strict';
8
+ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './types-91878f5b', './schema-9341f93e'], (function (require, exports, monaco, types, schema) { 'use strict';
9
9
 
10
10
  function _interopNamespaceDefault(e) {
11
11
  var n = Object.create(null);
@@ -218,79 +218,79 @@ define('vs/language/kusto/monaco.contribution', ['exports', 'vs/editor/editor.ma
218
218
  token: '',
219
219
  foreground: colors.black
220
220
  }, {
221
- token: kustoMode.Token.PlainText,
221
+ token: types.Token.PlainText,
222
222
  foreground: colors.black
223
223
  }, {
224
- token: kustoMode.Token.Comment,
224
+ token: types.Token.Comment,
225
225
  foreground: colors.green
226
226
  }, {
227
- token: kustoMode.Token.Punctuation,
227
+ token: types.Token.Punctuation,
228
228
  foreground: colors.black
229
229
  }, {
230
- token: kustoMode.Token.Directive,
230
+ token: types.Token.Directive,
231
231
  foreground: colors.darkViolet
232
232
  }, {
233
- token: kustoMode.Token.Literal,
233
+ token: types.Token.Literal,
234
234
  foreground: colors.black
235
235
  }, {
236
- token: kustoMode.Token.StringLiteral,
236
+ token: types.Token.StringLiteral,
237
237
  foreground: colors.firebrick
238
238
  }, {
239
- token: kustoMode.Token.Type,
239
+ token: types.Token.Type,
240
240
  foreground: colors.blue
241
241
  }, {
242
- token: kustoMode.Token.Column,
242
+ token: types.Token.Column,
243
243
  foreground: colors.mediumVioletRed
244
244
  }, {
245
- token: kustoMode.Token.Table,
245
+ token: types.Token.Table,
246
246
  foreground: colors.darkOrchid
247
247
  }, {
248
- token: kustoMode.Token.Database,
248
+ token: types.Token.Database,
249
249
  foreground: colors.darkOrchid
250
250
  }, {
251
- token: kustoMode.Token.Function,
251
+ token: types.Token.Function,
252
252
  foreground: colors.blue
253
253
  }, {
254
- token: kustoMode.Token.Parameter,
254
+ token: types.Token.Parameter,
255
255
  foreground: colors.midnightBlue
256
256
  }, {
257
- token: kustoMode.Token.Variable,
257
+ token: types.Token.Variable,
258
258
  foreground: colors.midnightBlue
259
259
  }, {
260
- token: kustoMode.Token.Identifier,
260
+ token: types.Token.Identifier,
261
261
  foreground: colors.black
262
262
  }, {
263
- token: kustoMode.Token.ClientParameter,
263
+ token: types.Token.ClientParameter,
264
264
  foreground: colors.tealBlue
265
265
  }, {
266
- token: kustoMode.Token.QueryParameter,
266
+ token: types.Token.QueryParameter,
267
267
  foreground: colors.tealBlue
268
268
  }, {
269
- token: kustoMode.Token.ScalarParameter,
269
+ token: types.Token.ScalarParameter,
270
270
  foreground: colors.blue
271
271
  }, {
272
- token: kustoMode.Token.MathOperator,
272
+ token: types.Token.MathOperator,
273
273
  foreground: colors.black
274
274
  }, {
275
- token: kustoMode.Token.QueryOperator,
275
+ token: types.Token.QueryOperator,
276
276
  foreground: colors.orangeRed
277
277
  }, {
278
- token: kustoMode.Token.Command,
278
+ token: types.Token.Command,
279
279
  foreground: colors.blue
280
280
  }, {
281
- token: kustoMode.Token.Keyword,
281
+ token: types.Token.Keyword,
282
282
  foreground: colors.blue
283
283
  }, {
284
- token: kustoMode.Token.MaterializedView,
284
+ token: types.Token.MaterializedView,
285
285
  foreground: colors.darkOrchid
286
286
  }, {
287
- token: kustoMode.Token.SchemaMember,
287
+ token: types.Token.SchemaMember,
288
288
  foreground: colors.black
289
289
  }, {
290
- token: kustoMode.Token.SignatureParameter,
290
+ token: types.Token.SignatureParameter,
291
291
  foreground: colors.black
292
292
  }, {
293
- token: kustoMode.Token.Option,
293
+ token: types.Token.Option,
294
294
  foreground: colors.black
295
295
  }],
296
296
  colors: {}
@@ -302,79 +302,79 @@ define('vs/language/kusto/monaco.contribution', ['exports', 'vs/editor/editor.ma
302
302
  token: '',
303
303
  foreground: colors.white
304
304
  }, {
305
- token: kustoMode.Token.PlainText,
305
+ token: types.Token.PlainText,
306
306
  foreground: colors.white
307
307
  }, {
308
- token: kustoMode.Token.Comment,
308
+ token: types.Token.Comment,
309
309
  foreground: colors.oliveDrab
310
310
  }, {
311
- token: kustoMode.Token.Punctuation,
311
+ token: types.Token.Punctuation,
312
312
  foreground: colors.white
313
313
  }, {
314
- token: kustoMode.Token.Directive,
314
+ token: types.Token.Directive,
315
315
  foreground: colors.lightGoldenrodYellow
316
316
  }, {
317
- token: kustoMode.Token.Literal,
317
+ token: types.Token.Literal,
318
318
  foreground: colors.white
319
319
  }, {
320
- token: kustoMode.Token.StringLiteral,
320
+ token: types.Token.StringLiteral,
321
321
  foreground: colors.paleChestnut
322
322
  }, {
323
- token: kustoMode.Token.Type,
323
+ token: types.Token.Type,
324
324
  foreground: colors.skyBlue
325
325
  }, {
326
- token: kustoMode.Token.Column,
326
+ token: types.Token.Column,
327
327
  foreground: colors.paleVioletRed
328
328
  }, {
329
- token: kustoMode.Token.Table,
329
+ token: types.Token.Table,
330
330
  foreground: colors.softGold
331
331
  }, {
332
- token: kustoMode.Token.Database,
332
+ token: types.Token.Database,
333
333
  foreground: colors.softGold
334
334
  }, {
335
- token: kustoMode.Token.Function,
335
+ token: types.Token.Function,
336
336
  foreground: colors.skyBlue
337
337
  }, {
338
- token: kustoMode.Token.Parameter,
338
+ token: types.Token.Parameter,
339
339
  foreground: colors.lightSkyBlue
340
340
  }, {
341
- token: kustoMode.Token.Variable,
341
+ token: types.Token.Variable,
342
342
  foreground: colors.lightSkyBlue
343
343
  }, {
344
- token: kustoMode.Token.Identifier,
344
+ token: types.Token.Identifier,
345
345
  foreground: colors.white
346
346
  }, {
347
- token: kustoMode.Token.ClientParameter,
347
+ token: types.Token.ClientParameter,
348
348
  foreground: colors.tealBlue
349
349
  }, {
350
- token: kustoMode.Token.QueryParameter,
350
+ token: types.Token.QueryParameter,
351
351
  foreground: colors.tealBlue
352
352
  }, {
353
- token: kustoMode.Token.ScalarParameter,
353
+ token: types.Token.ScalarParameter,
354
354
  foreground: colors.skyBlue
355
355
  }, {
356
- token: kustoMode.Token.MathOperator,
356
+ token: types.Token.MathOperator,
357
357
  foreground: colors.white
358
358
  }, {
359
- token: kustoMode.Token.QueryOperator,
359
+ token: types.Token.QueryOperator,
360
360
  foreground: colors.mediumTurquoise
361
361
  }, {
362
- token: kustoMode.Token.Command,
362
+ token: types.Token.Command,
363
363
  foreground: colors.skyBlue
364
364
  }, {
365
- token: kustoMode.Token.Keyword,
365
+ token: types.Token.Keyword,
366
366
  foreground: colors.skyBlue
367
367
  }, {
368
- token: kustoMode.Token.MaterializedView,
368
+ token: types.Token.MaterializedView,
369
369
  foreground: colors.softGold
370
370
  }, {
371
- token: kustoMode.Token.SchemaMember,
371
+ token: types.Token.SchemaMember,
372
372
  foreground: colors.black
373
373
  }, {
374
- token: kustoMode.Token.SignatureParameter,
374
+ token: types.Token.SignatureParameter,
375
375
  foreground: colors.black
376
376
  }, {
377
- token: kustoMode.Token.Option,
377
+ token: types.Token.Option,
378
378
  foreground: colors.black
379
379
  }],
380
380
  colors: {
@@ -403,18 +403,15 @@ define('vs/language/kusto/monaco.contribution', ['exports', 'vs/editor/editor.ma
403
403
  return colorizedLines.join('<br/>');
404
404
  }
405
405
 
406
- function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
407
406
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
408
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
409
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
410
- function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
411
- function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
412
407
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
413
408
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
414
409
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
415
410
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
416
411
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
417
412
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
413
+
414
+ // --- Kusto configuration and defaults ---------
418
415
  var LanguageServiceDefaultsImpl = /*#__PURE__*/function () {
419
416
  // in milliseconds. For example - this is 2 minutes 2 * 60 * 1000
420
417
 
@@ -482,28 +479,23 @@ define('vs/language/kusto/monaco.contribution', ['exports', 'vs/editor/editor.ma
482
479
  }
483
480
  };
484
481
  function getKustoWorker() {
485
- return _getKustoWorker.apply(this, arguments);
482
+ return new Promise(function (resolve, reject) {
483
+ withMode(function (mode) {
484
+ mode.getKustoWorker().then(resolve, reject);
485
+ });
486
+ });
486
487
  }
487
- function _getKustoWorker() {
488
- _getKustoWorker = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
489
- return _regeneratorRuntime().wrap(function _callee$(_context) {
490
- while (1) switch (_context.prev = _context.next) {
491
- case 0:
492
- return _context.abrupt("return", kustoMode.getKustoWorker());
493
- case 1:
494
- case "end":
495
- return _context.stop();
496
- }
497
- }, _callee);
498
- }));
499
- return _getKustoWorker.apply(this, arguments);
488
+ function withMode(callback) {
489
+ new Promise(function (resolve, reject) { require(['./kustoMode'], resolve, reject); }).then(callback);
500
490
  }
501
491
  var kustoDefaults = new LanguageServiceDefaultsImpl(defaultLanguageSettings);
502
- monaco__namespace.languages.onLanguage(kustoMode.LANGUAGE_ID, function () {
503
- kustoMode.setupMode(kustoDefaults, monaco__namespace);
492
+ monaco__namespace.languages.onLanguage('kusto', function () {
493
+ withMode(function (mode) {
494
+ return mode.setupMode(kustoDefaults, monaco__namespace);
495
+ });
504
496
  });
505
497
  monaco__namespace.languages.register({
506
- id: kustoMode.LANGUAGE_ID,
498
+ id: types.LANGUAGE_ID,
507
499
  extensions: ['.csl', '.kql']
508
500
  });
509
501
  themes.forEach(function (_ref) {
@@ -555,11 +547,16 @@ define('vs/language/kusto/monaco.contribution', ['exports', 'vs/editor/editor.ma
555
547
  function isStandaloneCodeEditor(editor) {
556
548
  return editor.addAction !== undefined;
557
549
  }
558
- var globalApi = _objectSpread(_objectSpread({}, schema.schema), {}, {
550
+ var globalApi = {
551
+ getCslTypeNameFromClrType: schema.getCslTypeNameFromClrType,
552
+ getCallName: schema.getCallName,
553
+ getExpression: schema.getExpression,
554
+ getInputParametersAsCslString: schema.getInputParametersAsCslString,
555
+ getEntityDataTypeFromCslType: schema.getEntityDataTypeFromCslType,
559
556
  kustoDefaults: kustoDefaults,
560
557
  getKustoWorker: getKustoWorker,
561
558
  getRangeHtml: getRangeHtml
562
- });
559
+ };
563
560
  monaco__namespace.languages.kusto = globalApi;
564
561
 
565
562
  exports.getCallName = schema.getCallName;
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.1(56b90ce0fd31e7d6792f5098d1e8204274966b6e)
3
+ * monaco-kusto version: 12.0.3(418f3d71791a9e0959cc8869c01ea6d9b94b3179)
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/schema-077630e6', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/schema-9341f93e', ['exports'], (function (exports) { 'use strict';
9
9
 
10
10
  // Definition of schema object in the context of language services. This model is exposed to consumers of this library.
11
11
 
@@ -99,22 +99,11 @@ define('vs/language/kusto/schema-077630e6', ['exports'], (function (exports) { '
99
99
  */
100
100
  var showSchema;
101
101
 
102
- var schema = /*#__PURE__*/Object.freeze({
103
- __proto__: null,
104
- getCallName: getCallName,
105
- getCslTypeNameFromClrType: getCslTypeNameFromClrType,
106
- getEntityDataTypeFromCslType: getEntityDataTypeFromCslType,
107
- getExpression: getExpression,
108
- getInputParametersAsCslString: getInputParametersAsCslString,
109
- showSchema: showSchema
110
- });
111
-
112
102
  exports.getCallName = getCallName;
113
103
  exports.getCslTypeNameFromClrType = getCslTypeNameFromClrType;
114
104
  exports.getEntityDataTypeFromCslType = getEntityDataTypeFromCslType;
115
105
  exports.getExpression = getExpression;
116
106
  exports.getInputParametersAsCslString = getInputParametersAsCslString;
117
- exports.schema = schema;
118
107
  exports.showSchema = showSchema;
119
108
 
120
109
  }));
@@ -0,0 +1,46 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * monaco-kusto version: 12.0.3(418f3d71791a9e0959cc8869c01ea6d9b94b3179)
4
+ * Released under the MIT license
5
+ * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
+ *-----------------------------------------------------------------------------*/
7
+
8
+ define('vs/language/kusto/types-91878f5b', ['exports'], (function (exports) { 'use strict';
9
+
10
+ var LANGUAGE_ID = 'kusto';
11
+
12
+ var Token = /*#__PURE__*/function (Token) {
13
+ Token["PlainText"] = "plainText";
14
+ Token["Comment"] = "comment";
15
+ Token["Punctuation"] = "punctuation";
16
+ Token["Directive"] = "directive";
17
+ Token["Literal"] = "literal";
18
+ Token["StringLiteral"] = "stringLiteral";
19
+ Token["Type"] = "type";
20
+ Token["Column"] = "column";
21
+ Token["Table"] = "table";
22
+ Token["Database"] = "database";
23
+ Token["Function"] = "function";
24
+ Token["Parameter"] = "parameter";
25
+ Token["Variable"] = "variable";
26
+ Token["Identifier"] = "identifier";
27
+ Token["ClientParameter"] = "clientParameter";
28
+ Token["QueryParameter"] = "queryParameter";
29
+ Token["ScalarParameter"] = "scalarParameter";
30
+ Token["MathOperator"] = "mathOperator";
31
+ Token["QueryOperator"] = "queryOperator";
32
+ Token["Command"] = "command";
33
+ Token["Keyword"] = "keyword";
34
+ Token["MaterializedView"] = "materializedView";
35
+ Token["SchemaMember"] = "schemaMember";
36
+ Token["SignatureParameter"] = "signatureParameter";
37
+ Token["Option"] = "option";
38
+ return Token;
39
+ }({});
40
+ var tokenTypes = [Token.PlainText, Token.Comment, Token.Punctuation, Token.Directive, Token.Literal, Token.StringLiteral, Token.Type, Token.Column, Token.Table, Token.Database, Token.Function, Token.Parameter, Token.Variable, Token.Identifier, Token.ClientParameter, Token.QueryParameter, Token.ScalarParameter, Token.MathOperator, Token.QueryOperator, Token.Command, Token.Keyword, Token.MaterializedView, Token.SchemaMember, Token.SignatureParameter, Token.Option];
41
+
42
+ exports.LANGUAGE_ID = LANGUAGE_ID;
43
+ exports.Token = Token;
44
+ exports.tokenTypes = tokenTypes;
45
+
46
+ }));
@@ -0,0 +1,40 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * monaco-kusto version: 12.0.3(418f3d71791a9e0959cc8869c01ea6d9b94b3179)
4
+ * Released under the MIT license
5
+ * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
+ *-----------------------------------------------------------------------------*/
7
+
8
+ let Token = /*#__PURE__*/function (Token) {
9
+ Token["PlainText"] = "plainText";
10
+ Token["Comment"] = "comment";
11
+ Token["Punctuation"] = "punctuation";
12
+ Token["Directive"] = "directive";
13
+ Token["Literal"] = "literal";
14
+ Token["StringLiteral"] = "stringLiteral";
15
+ Token["Type"] = "type";
16
+ Token["Column"] = "column";
17
+ Token["Table"] = "table";
18
+ Token["Database"] = "database";
19
+ Token["Function"] = "function";
20
+ Token["Parameter"] = "parameter";
21
+ Token["Variable"] = "variable";
22
+ Token["Identifier"] = "identifier";
23
+ Token["ClientParameter"] = "clientParameter";
24
+ Token["QueryParameter"] = "queryParameter";
25
+ Token["ScalarParameter"] = "scalarParameter";
26
+ Token["MathOperator"] = "mathOperator";
27
+ Token["QueryOperator"] = "queryOperator";
28
+ Token["Command"] = "command";
29
+ Token["Keyword"] = "keyword";
30
+ Token["MaterializedView"] = "materializedView";
31
+ Token["SchemaMember"] = "schemaMember";
32
+ Token["SignatureParameter"] = "signatureParameter";
33
+ Token["Option"] = "option";
34
+ return Token;
35
+ }({});
36
+ const tokenTypes = [Token.PlainText, Token.Comment, Token.Punctuation, Token.Directive, Token.Literal, Token.StringLiteral, Token.Type, Token.Column, Token.Table, Token.Database, Token.Function, Token.Parameter, Token.Variable, Token.Identifier, Token.ClientParameter, Token.QueryParameter, Token.ScalarParameter, Token.MathOperator, Token.QueryOperator, Token.Command, Token.Keyword, Token.MaterializedView, Token.SchemaMember, Token.SignatureParameter, Token.Option];
37
+
38
+ const LANGUAGE_ID = 'kusto';
39
+
40
+ export { LANGUAGE_ID as L, Token as T, tokenTypes as t };
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.1(56b90ce0fd31e7d6792f5098d1e8204274966b6e)
3
+ * monaco-kusto version: 12.0.3(418f3d71791a9e0959cc8869c01ea6d9b94b3179)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -8,7 +8,7 @@
8
8
  import * as worker from 'monaco-editor/esm/vs/editor/editor.worker';
9
9
  import * as ls from 'vscode-languageserver-types';
10
10
  import XRegExp from 'xregexp';
11
- import { a as getEntityDataTypeFromCslType, b as getCallName, c as getExpression, g as getCslTypeNameFromClrType } from './schema-b8f0ba9b.js';
11
+ import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-d4e431c7.js';
12
12
  import '@kusto/language-service/bridge.min';
13
13
  import '@kusto/language-service/Kusto.JavaScript.Client.min';
14
14
  import '@kusto/language-service/newtonsoft.json.min';
@@ -1219,15 +1219,15 @@ class KustoLanguageService {
1219
1219
  * Here it gets converted to the bridge.Net schema
1220
1220
  * @param schema Language Service schema
1221
1221
  */
1222
- static convertToKustoJsSchema(schema$1) {
1223
- switch (schema$1.clusterType) {
1222
+ static convertToKustoJsSchema(schema) {
1223
+ switch (schema.clusterType) {
1224
1224
  case 'Engine':
1225
- const currentDatabaseName = schema$1.database ? schema$1.database.name : undefined;
1225
+ const currentDatabaseName = schema.database ? schema.database.name : undefined;
1226
1226
  const kCluster = new k.KustoIntelliSenseClusterEntity();
1227
1227
  let kDatabaseInContext = undefined;
1228
- kCluster.ConnectionString = schema$1.cluster.connectionString;
1228
+ kCluster.ConnectionString = schema.cluster.connectionString;
1229
1229
  const databases = [];
1230
- schema$1.cluster.databases.forEach(database => {
1230
+ schema.cluster.databases.forEach(database => {
1231
1231
  const kDatabase = new k.KustoIntelliSenseDatabaseEntity();
1232
1232
  kDatabase.Name = database.name;
1233
1233
  const tables = [];
@@ -1260,17 +1260,17 @@ class KustoLanguageService {
1260
1260
  const kSchema = new k.KustoIntelliSenseQuerySchema(kCluster, kDatabaseInContext);
1261
1261
  return kSchema;
1262
1262
  case 'ClusterManager':
1263
- const accounts = schema$1.accounts.map(account => {
1263
+ const accounts = schema.accounts.map(account => {
1264
1264
  const kAccount = new k.KustoIntelliSenseAccountEntity();
1265
1265
  kAccount.Name = account;
1266
1266
  return kAccount;
1267
1267
  });
1268
- const services = schema$1.services.map(service => {
1268
+ const services = schema.services.map(service => {
1269
1269
  const kService = new k.KustoIntelliSenseServiceEntity();
1270
1270
  kService.Name = service;
1271
1271
  return kService;
1272
1272
  });
1273
- const connectionString = schema$1.connectionString;
1273
+ const connectionString = schema.connectionString;
1274
1274
  const result = {
1275
1275
  accounts,
1276
1276
  services,
@@ -1280,7 +1280,7 @@ class KustoLanguageService {
1280
1280
  case 'DataManagement':
1281
1281
  return undefined;
1282
1282
  default:
1283
- return assertNever(schema$1);
1283
+ return assertNever(schema);
1284
1284
  }
1285
1285
  }
1286
1286
 
@@ -1,10 +1,14 @@
1
1
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
2
- import { KustoWorker, LanguageServiceDefaults } from './monaco.contribution';
3
- import { IKustoWorkerImpl } from './kustoWorker';
2
+ import type { KustoWorker, LanguageServiceDefaults } from './monaco.contribution';
3
+ import type { IKustoWorkerImpl } from './kustoWorker';
4
4
  export interface AugmentedWorker extends KustoWorker, Omit<IKustoWorkerImpl, 'setSchemaFromShowSchema' | 'getReferencedSymbols'> {
5
5
  }
6
6
  export interface AugmentedWorkerAccessor {
7
- (first: monaco.Uri): Promise<AugmentedWorker>;
7
+ (first: monaco.Uri, ...more: monaco.Uri[]): Promise<AugmentedWorker>;
8
8
  }
9
- export declare function setupMode(defaults: LanguageServiceDefaults, monacoInstance: typeof monaco): Promise<AugmentedWorkerAccessor>;
9
+ /**
10
+ * Called when Kusto language is first needed (a model has the language set)
11
+ * @param defaults
12
+ */
13
+ export declare function setupMode(defaults: LanguageServiceDefaults, monacoInstance: typeof globalThis.monaco): AugmentedWorkerAccessor;
10
14
  export declare function getKustoWorker(): Promise<AugmentedWorkerAccessor>;