@kusto/monaco-kusto 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/package.json +3 -6
- package/release/dev/Kusto.Language.Bridge.min.js +1 -1
- package/release/dev/kusto.javascript.client.min.js +1 -1
- package/release/dev/kustoMode.js +55 -25
- package/release/dev/kustoWorker.js +34 -105
- package/release/dev/{main-5ef10bd7.js → main-a9bd6fdf.js} +2 -2
- package/release/dev/monaco.contribution.js +36 -9
- package/release/dev/schema-9cf94ce1.js +109 -0
- package/release/esm/kusto.worker.js +11 -69
- package/release/esm/kustoMode.d.ts +10 -4
- package/release/esm/kustoMode.js +14 -9
- package/release/esm/kustoWorker.d.ts +22 -8
- package/release/esm/languageFeatures.d.ts +11 -14
- package/release/esm/languageService/kustoLanguageService.d.ts +2 -8
- package/release/esm/languageService/schema.d.ts +7 -2
- package/release/esm/languageService/settings.d.ts +2 -2
- package/release/esm/monaco.contribution.d.ts +11 -3
- package/release/esm/monaco.contribution.js +27 -9
- package/release/esm/schema-53127847.js +85 -0
- package/release/esm/types.d.ts +8 -120
- package/release/esm/workerManager.d.ts +2 -2
- package/release/min/Kusto.Language.Bridge.min.js +1 -1
- package/release/min/kusto.javascript.client.min.js +1 -1
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +4 -4
- package/release/min/{main-c8dacaab.js → main-e51f94c9.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/schema-9334f5c9.js +7 -0
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: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
|
|
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', 'vs/editor/editor.main', './main-
|
|
8
|
+
define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-a9bd6fdf'], (function (exports, monaco, main) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -707,9 +707,9 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
707
707
|
function _arrayWithoutHoles$1(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$1(arr); }
|
|
708
708
|
function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
709
709
|
function _typeof$1(obj) { "@babel/helpers - typeof"; return _typeof$1 = "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$1(obj); }
|
|
710
|
-
function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
711
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
712
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
710
|
+
function _regeneratorRuntime$1() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$1 = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
711
|
+
function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
712
|
+
function _asyncToGenerator$1(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
713
713
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
714
714
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$1(descriptor.key), descriptor); } }
|
|
715
715
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -805,9 +805,9 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
805
805
|
if (this.defaults.languageSettings.enableQuickFixes) {
|
|
806
806
|
this._disposables.push(monaco__namespace.languages.registerCodeActionProvider(this._languageId, {
|
|
807
807
|
provideCodeActions: function () {
|
|
808
|
-
var _provideCodeActions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(model, range, context, _token) {
|
|
808
|
+
var _provideCodeActions = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee(model, range, context, _token) {
|
|
809
809
|
var startOffset, endOffset, showQuickFix, actions;
|
|
810
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
810
|
+
return _regeneratorRuntime$1().wrap(function _callee$(_context) {
|
|
811
811
|
while (1) switch (_context.prev = _context.next) {
|
|
812
812
|
case 0:
|
|
813
813
|
startOffset = model.getOffsetAt(range.getStartPosition());
|
|
@@ -860,10 +860,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
860
860
|
_createClass(DiagnosticsAdapter, [{
|
|
861
861
|
key: "getMonacoCodeActions",
|
|
862
862
|
value: function () {
|
|
863
|
-
var _getMonacoCodeActions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(model, startOffset, endOffset, enableQuickFix) {
|
|
863
|
+
var _getMonacoCodeActions = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee2(model, startOffset, endOffset, enableQuickFix) {
|
|
864
864
|
var _this2 = this;
|
|
865
865
|
var actions, worker, resource, codeActions, _loop, i, _ret;
|
|
866
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context3) {
|
|
866
|
+
return _regeneratorRuntime$1().wrap(function _callee2$(_context3) {
|
|
867
867
|
while (1) switch (_context3.prev = _context3.next) {
|
|
868
868
|
case 0:
|
|
869
869
|
actions = [];
|
|
@@ -876,10 +876,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
876
876
|
return worker.getResultActions(resource.toString(), startOffset, endOffset);
|
|
877
877
|
case 7:
|
|
878
878
|
codeActions = _context3.sent;
|
|
879
|
-
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
|
|
879
|
+
_loop = /*#__PURE__*/_regeneratorRuntime$1().mark(function _loop() {
|
|
880
880
|
var _this2$defaults$langu;
|
|
881
881
|
var codeAction, codeActionKind, changes, edits;
|
|
882
|
-
return _regeneratorRuntime().wrap(function _loop$(_context2) {
|
|
882
|
+
return _regeneratorRuntime$1().wrap(function _loop$(_context2) {
|
|
883
883
|
while (1) switch (_context2.prev = _context2.next) {
|
|
884
884
|
case 0:
|
|
885
885
|
codeAction = codeActions[i];
|
|
@@ -1844,6 +1844,9 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1844
1844
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
1845
1845
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1846
1846
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
1847
|
+
function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
1848
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
1849
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
1847
1850
|
var kustoWorker;
|
|
1848
1851
|
var resolveWorker;
|
|
1849
1852
|
var workerPromise = new Promise(function (resolve, reject) {
|
|
@@ -1862,12 +1865,27 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1862
1865
|
var client = new WorkerManager(monacoInstance, defaults);
|
|
1863
1866
|
disposables.push(client);
|
|
1864
1867
|
var workerAccessor = function workerAccessor(first) {
|
|
1865
|
-
var augmentedSetSchema = function
|
|
1866
|
-
var
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1868
|
+
var augmentedSetSchema = /*#__PURE__*/function () {
|
|
1869
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(schema, worker) {
|
|
1870
|
+
var workerPromise;
|
|
1871
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1872
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1873
|
+
case 0:
|
|
1874
|
+
workerPromise = worker.setSchema(schema);
|
|
1875
|
+
_context.next = 3;
|
|
1876
|
+
return workerPromise.then(function () {
|
|
1877
|
+
onSchemaChange.fire(schema);
|
|
1878
|
+
});
|
|
1879
|
+
case 3:
|
|
1880
|
+
case "end":
|
|
1881
|
+
return _context.stop();
|
|
1882
|
+
}
|
|
1883
|
+
}, _callee);
|
|
1884
|
+
}));
|
|
1885
|
+
return function augmentedSetSchema(_x, _x2) {
|
|
1886
|
+
return _ref.apply(this, arguments);
|
|
1887
|
+
};
|
|
1888
|
+
}();
|
|
1871
1889
|
for (var _len = arguments.length, more = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1872
1890
|
more[_key - 1] = arguments[_key];
|
|
1873
1891
|
}
|
|
@@ -1878,14 +1896,26 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1878
1896
|
return augmentedSetSchema(schema, worker);
|
|
1879
1897
|
},
|
|
1880
1898
|
setSchemaFromShowSchema: function setSchemaFromShowSchema(schema, connection, database, globalScalarParameters, globalTabularParameters) {
|
|
1881
|
-
|
|
1882
|
-
return
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1899
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
1900
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1901
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
1902
|
+
case 0:
|
|
1903
|
+
_context2.next = 2;
|
|
1904
|
+
return worker.normalizeSchema(schema, connection, database).then(function (schema) {
|
|
1905
|
+
if (globalScalarParameters || globalTabularParameters) {
|
|
1906
|
+
schema = _objectSpread(_objectSpread({}, schema), {}, {
|
|
1907
|
+
globalScalarParameters: globalScalarParameters,
|
|
1908
|
+
globalTabularParameters: globalTabularParameters
|
|
1909
|
+
});
|
|
1910
|
+
}
|
|
1911
|
+
augmentedSetSchema(schema, worker);
|
|
1912
|
+
});
|
|
1913
|
+
case 2:
|
|
1914
|
+
case "end":
|
|
1915
|
+
return _context2.stop();
|
|
1916
|
+
}
|
|
1917
|
+
}, _callee2);
|
|
1918
|
+
}))();
|
|
1889
1919
|
}
|
|
1890
1920
|
});
|
|
1891
1921
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
|
|
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-
|
|
8
|
+
define('vs/language/kusto/kustoWorker', ['exports', './main-a9bd6fdf', './schema-9cf94ce1'], (function (exports, main, schema) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _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."); }
|
|
@@ -3434,87 +3434,6 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
3434
3434
|
unicodeProperties(XRegExp);
|
|
3435
3435
|
unicodeScripts(XRegExp);
|
|
3436
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
|
-
* Schema types:
|
|
3443
|
-
* Engine – The main schema type. Contains clusters, databases, tables, table columns and functions.
|
|
3444
|
-
* Cluster Manager – Internal only. A schema for clusters that manages other clusters.
|
|
3445
|
-
* Data Management – Internal only. A schema for ingestion point operations.
|
|
3446
|
-
*/
|
|
3447
|
-
var dotnetTypeToKustoType = {
|
|
3448
|
-
'System.SByte': 'bool',
|
|
3449
|
-
'System.Byte': 'uint8',
|
|
3450
|
-
'System.Int16': 'int16',
|
|
3451
|
-
'System.UInt16': 'uint16',
|
|
3452
|
-
'System.Int32': 'int',
|
|
3453
|
-
'System.UInt32': 'uint',
|
|
3454
|
-
'System.Int64': 'long',
|
|
3455
|
-
'System.UInt64': 'ulong',
|
|
3456
|
-
'System.String': 'string',
|
|
3457
|
-
'System.Single': 'float',
|
|
3458
|
-
'System.Double': 'real',
|
|
3459
|
-
'System.DateTime': 'datetime',
|
|
3460
|
-
'System.TimeSpan': 'timespan',
|
|
3461
|
-
'System.Guid': 'guid',
|
|
3462
|
-
'System.Boolean': 'bool',
|
|
3463
|
-
'Newtonsoft.Json.Linq.JArray': 'dynamic',
|
|
3464
|
-
'Newtonsoft.Json.Linq.JObject': 'dynamic',
|
|
3465
|
-
'Newtonsoft.Json.Linq.JToken': 'dynamic',
|
|
3466
|
-
'System.Object': 'dynamic',
|
|
3467
|
-
'System.Data.SqlTypes.SqlDecimal': 'decimal'
|
|
3468
|
-
};
|
|
3469
|
-
var getCslTypeNameFromClrType = function getCslTypeNameFromClrType(clrType) {
|
|
3470
|
-
return dotnetTypeToKustoType[clrType] || clrType;
|
|
3471
|
-
};
|
|
3472
|
-
var kustoTypeToEntityDataType = {
|
|
3473
|
-
object: 'Object',
|
|
3474
|
-
bool: 'Boolean',
|
|
3475
|
-
uint8: 'Byte',
|
|
3476
|
-
int16: 'Int16',
|
|
3477
|
-
uint16: 'UInt16',
|
|
3478
|
-
int: 'Int32',
|
|
3479
|
-
uint: 'UInt32',
|
|
3480
|
-
long: 'Int64',
|
|
3481
|
-
ulong: 'UInt64',
|
|
3482
|
-
float: 'Single',
|
|
3483
|
-
real: 'Double',
|
|
3484
|
-
decimal: 'Decimal',
|
|
3485
|
-
datetime: 'DateTime',
|
|
3486
|
-
string: 'String',
|
|
3487
|
-
dynamic: 'Dynamic',
|
|
3488
|
-
timespan: 'TimeSpan'
|
|
3489
|
-
};
|
|
3490
|
-
var getEntityDataTypeFromCslType = function getEntityDataTypeFromCslType(cslType) {
|
|
3491
|
-
return kustoTypeToEntityDataType[cslType] || cslType;
|
|
3492
|
-
};
|
|
3493
|
-
var getCallName = function getCallName(fn) {
|
|
3494
|
-
return "".concat(fn.name, "(").concat(fn.inputParameters.map(function (p) {
|
|
3495
|
-
return "{".concat(p.name, "}");
|
|
3496
|
-
}).join(','), ")");
|
|
3497
|
-
};
|
|
3498
|
-
var getExpression = function getExpression(fn) {
|
|
3499
|
-
return "let ".concat(fn.name, " = ").concat(getInputParametersAsCslString(fn.inputParameters), " ").concat(fn.body);
|
|
3500
|
-
};
|
|
3501
|
-
var getInputParametersAsCslString = function getInputParametersAsCslString(inputParameters) {
|
|
3502
|
-
return "(".concat(inputParameters.map(function (inputParameter) {
|
|
3503
|
-
return getInputParameterAsCslString(inputParameter);
|
|
3504
|
-
}).join(','), ")");
|
|
3505
|
-
};
|
|
3506
|
-
var getInputParameterAsCslString = function getInputParameterAsCslString(inputParameter) {
|
|
3507
|
-
// If this is a tabular parameter
|
|
3508
|
-
if (inputParameter.columns && inputParameter.columns.length > 0) {
|
|
3509
|
-
var attributesAsString = inputParameter.columns.map(function (col) {
|
|
3510
|
-
return "".concat(col.name, ":").concat(col.cslType || getCslTypeNameFromClrType(col.type));
|
|
3511
|
-
}).join(',');
|
|
3512
|
-
return "".concat(inputParameter.name, ":").concat(attributesAsString === '' ? '*' : attributesAsString);
|
|
3513
|
-
} else {
|
|
3514
|
-
return "".concat(inputParameter.name, ":").concat(inputParameter.cslType || getCslTypeNameFromClrType(inputParameter.type));
|
|
3515
|
-
}
|
|
3516
|
-
};
|
|
3517
|
-
|
|
3518
3437
|
// If we're running in a web worker - which doesn't share global context with the main thread -
|
|
3519
3438
|
// we need to manually load dependencies that are not explicit- meaning our non-module dependencies
|
|
3520
3439
|
// generated by Bridge.Net
|
|
@@ -4084,7 +4003,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
4084
4003
|
var filterredDiagnostics = _this4.toArray(warningAndSuggestionDiagnostics).filter(function (d) {
|
|
4085
4004
|
var _this4$_languageSetti;
|
|
4086
4005
|
var allowSeverity = enableWarnings && d.Severity === 'Warning' || enableSuggestions && d.Severity === 'Suggestion';
|
|
4087
|
-
var allowCode = !((_this4$_languageSetti = _this4._languageSettings.
|
|
4006
|
+
var allowCode = !((_this4$_languageSetti = _this4._languageSettings.disabledDiagnosticCodes) !== null && _this4$_languageSetti !== void 0 && _this4$_languageSetti.includes(d.Code));
|
|
4088
4007
|
return allowSeverity && allowCode;
|
|
4089
4008
|
});
|
|
4090
4009
|
diagnostics = diagnostics.concat(filterredDiagnostics);
|
|
@@ -5407,15 +5326,15 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5407
5326
|
*/
|
|
5408
5327
|
}, {
|
|
5409
5328
|
key: "convertToKustoJsSchema",
|
|
5410
|
-
value: function convertToKustoJsSchema(schema) {
|
|
5411
|
-
switch (schema.clusterType) {
|
|
5329
|
+
value: function convertToKustoJsSchema(schema$1) {
|
|
5330
|
+
switch (schema$1.clusterType) {
|
|
5412
5331
|
case 'Engine':
|
|
5413
|
-
var currentDatabaseName = schema.database ? schema.database.name : undefined;
|
|
5332
|
+
var currentDatabaseName = schema$1.database ? schema$1.database.name : undefined;
|
|
5414
5333
|
var kCluster = new k.KustoIntelliSenseClusterEntity();
|
|
5415
5334
|
var kDatabaseInContext = undefined;
|
|
5416
|
-
kCluster.ConnectionString = schema.cluster.connectionString;
|
|
5335
|
+
kCluster.ConnectionString = schema$1.cluster.connectionString;
|
|
5417
5336
|
var databases = [];
|
|
5418
|
-
schema.cluster.databases.forEach(function (database) {
|
|
5337
|
+
schema$1.cluster.databases.forEach(function (database) {
|
|
5419
5338
|
var kDatabase = new k.KustoIntelliSenseDatabaseEntity();
|
|
5420
5339
|
kDatabase.Name = database.name;
|
|
5421
5340
|
var tables = [];
|
|
@@ -5426,7 +5345,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5426
5345
|
table.columns.forEach(function (column) {
|
|
5427
5346
|
var kColumn = new k.KustoIntelliSenseColumnEntity();
|
|
5428
5347
|
kColumn.Name = column.name;
|
|
5429
|
-
kColumn.TypeCode = k.EntityDataType[getEntityDataTypeFromCslType(column.type)];
|
|
5348
|
+
kColumn.TypeCode = k.EntityDataType[schema.getEntityDataTypeFromCslType(column.type)];
|
|
5430
5349
|
cols.push(kColumn);
|
|
5431
5350
|
});
|
|
5432
5351
|
kTable.Columns = new Bridge.ArrayEnumerable(cols);
|
|
@@ -5435,7 +5354,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5435
5354
|
var functions = [];
|
|
5436
5355
|
database.functions.forEach(function (fn) {
|
|
5437
5356
|
var kFunction = new k.KustoIntelliSenseFunctionEntity();
|
|
5438
|
-
kFunction.Name = fn.name, kFunction.CallName = getCallName(fn), kFunction.Expression = getExpression(fn), functions.push(kFunction);
|
|
5357
|
+
kFunction.Name = fn.name, kFunction.CallName = schema.getCallName(fn), kFunction.Expression = schema.getExpression(fn), functions.push(kFunction);
|
|
5439
5358
|
});
|
|
5440
5359
|
kDatabase.Tables = new Bridge.ArrayEnumerable(tables);
|
|
5441
5360
|
kDatabase.Functions = new Bridge.ArrayEnumerable(functions);
|
|
@@ -5448,17 +5367,17 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5448
5367
|
var kSchema = new k.KustoIntelliSenseQuerySchema(kCluster, kDatabaseInContext);
|
|
5449
5368
|
return kSchema;
|
|
5450
5369
|
case 'ClusterManager':
|
|
5451
|
-
var accounts = schema.accounts.map(function (account) {
|
|
5370
|
+
var accounts = schema$1.accounts.map(function (account) {
|
|
5452
5371
|
var kAccount = new k.KustoIntelliSenseAccountEntity();
|
|
5453
5372
|
kAccount.Name = account;
|
|
5454
5373
|
return kAccount;
|
|
5455
5374
|
});
|
|
5456
|
-
var services = schema.services.map(function (service) {
|
|
5375
|
+
var services = schema$1.services.map(function (service) {
|
|
5457
5376
|
var kService = new k.KustoIntelliSenseServiceEntity();
|
|
5458
5377
|
kService.Name = service;
|
|
5459
5378
|
return kService;
|
|
5460
5379
|
});
|
|
5461
|
-
var connectionString = schema.connectionString;
|
|
5380
|
+
var connectionString = schema$1.connectionString;
|
|
5462
5381
|
var result = {
|
|
5463
5382
|
accounts: accounts,
|
|
5464
5383
|
services: services,
|
|
@@ -5468,7 +5387,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5468
5387
|
case 'DataManagement':
|
|
5469
5388
|
return undefined;
|
|
5470
5389
|
default:
|
|
5471
|
-
return assertNever(schema);
|
|
5390
|
+
return assertNever(schema$1);
|
|
5472
5391
|
}
|
|
5473
5392
|
}
|
|
5474
5393
|
|
|
@@ -5517,12 +5436,12 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5517
5436
|
}, {
|
|
5518
5437
|
key: "createColumnSymbol",
|
|
5519
5438
|
value: function createColumnSymbol(col) {
|
|
5520
|
-
return new sym.ColumnSymbol(col.name, sym.ScalarTypes.GetSymbol(getCslTypeNameFromClrType(col.type)), col.docstring, null, null, col.examples ? KustoLanguageService.toBridgeList(col.examples) : null);
|
|
5439
|
+
return new sym.ColumnSymbol(col.name, sym.ScalarTypes.GetSymbol(schema.getCslTypeNameFromClrType(col.type)), col.docstring, null, null, col.examples ? KustoLanguageService.toBridgeList(col.examples) : null);
|
|
5521
5440
|
}
|
|
5522
5441
|
}, {
|
|
5523
5442
|
key: "createParameterSymbol",
|
|
5524
5443
|
value: function createParameterSymbol(param) {
|
|
5525
|
-
var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol(getCslTypeNameFromClrType(param.type));
|
|
5444
|
+
var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol(schema.getCslTypeNameFromClrType(param.type));
|
|
5526
5445
|
return new sym.ParameterSymbol(param.name, paramSymbol, null);
|
|
5527
5446
|
}
|
|
5528
5447
|
}, {
|
|
@@ -5538,7 +5457,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5538
5457
|
key: "createParameter",
|
|
5539
5458
|
value: function createParameter(param) {
|
|
5540
5459
|
if (!param.columns) {
|
|
5541
|
-
var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol(getCslTypeNameFromClrType(param.type));
|
|
5460
|
+
var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol(schema.getCslTypeNameFromClrType(param.type));
|
|
5542
5461
|
var expression = param.cslDefaultValue && typeof param.cslDefaultValue === 'string' ? parsing.QueryParser.ParseLiteral$1(param.cslDefaultValue) : undefined;
|
|
5543
5462
|
return new sym.Parameter.$ctor3(param.name, paramSymbol, null, null, null, false, null, 1, 1, expression, null);
|
|
5544
5463
|
}
|
|
@@ -5635,11 +5554,18 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5635
5554
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5636
5555
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5637
5556
|
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); }
|
|
5638
|
-
|
|
5557
|
+
|
|
5558
|
+
/**
|
|
5559
|
+
* We're using this interface to send messages to a worker, so using
|
|
5560
|
+
* `InterfaceFor` to make it not nominal is more accurate. {@link KustoWorker}
|
|
5561
|
+
* is the public, more limited version of this interface.
|
|
5562
|
+
*/
|
|
5563
|
+
|
|
5564
|
+
var KustoWorkerImpl = /*#__PURE__*/function () {
|
|
5639
5565
|
// --- model sync -----------------------
|
|
5640
5566
|
|
|
5641
|
-
function
|
|
5642
|
-
_classCallCheck(this,
|
|
5567
|
+
function KustoWorkerImpl(ctx, createData) {
|
|
5568
|
+
_classCallCheck(this, KustoWorkerImpl);
|
|
5643
5569
|
this._ctx = ctx;
|
|
5644
5570
|
this._languageSettings = createData.languageSettings;
|
|
5645
5571
|
this._languageService = getKustoLanguageService();
|
|
@@ -5647,7 +5573,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5647
5573
|
}
|
|
5648
5574
|
|
|
5649
5575
|
// --- language service host ---------------
|
|
5650
|
-
_createClass(
|
|
5576
|
+
_createClass(KustoWorkerImpl, [{
|
|
5651
5577
|
key: "setSchema",
|
|
5652
5578
|
value: function setSchema(schema) {
|
|
5653
5579
|
return this._languageService.setSchema(schema);
|
|
@@ -5959,13 +5885,16 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-5ef10bd7'], (functio
|
|
|
5959
5885
|
return null;
|
|
5960
5886
|
}
|
|
5961
5887
|
}]);
|
|
5962
|
-
return
|
|
5888
|
+
return KustoWorkerImpl;
|
|
5963
5889
|
}();
|
|
5890
|
+
/**
|
|
5891
|
+
* Used when monaco-editor is resolved via amd modules
|
|
5892
|
+
*/
|
|
5964
5893
|
function create(ctx, createData) {
|
|
5965
|
-
return new
|
|
5894
|
+
return new KustoWorkerImpl(ctx, createData);
|
|
5966
5895
|
}
|
|
5967
5896
|
|
|
5968
|
-
exports.
|
|
5897
|
+
exports.KustoWorkerImpl = KustoWorkerImpl;
|
|
5969
5898
|
exports.create = create;
|
|
5970
5899
|
|
|
5971
5900
|
}));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
|
|
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-a9bd6fdf', ['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: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
|
|
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', 'vs/editor/editor.main'], (function (require, exports, monaco) { 'use strict';
|
|
8
|
+
define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-9cf94ce1'], (function (require, exports, monaco, schema) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -138,7 +138,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
138
138
|
}]);
|
|
139
139
|
return KustoCommandHighlighter;
|
|
140
140
|
}();
|
|
141
|
-
_defineProperty$2(KustoCommandHighlighter, "ID", 'editor.contrib.
|
|
141
|
+
_defineProperty$2(KustoCommandHighlighter, "ID", 'editor.contrib.kustoCommandHighlighter');
|
|
142
142
|
_defineProperty$2(KustoCommandHighlighter, "CURRENT_COMMAND_HIGHLIGHT", {
|
|
143
143
|
className: 'selectionHighlight'
|
|
144
144
|
});
|
|
@@ -269,6 +269,11 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
269
269
|
new Promise(function (resolve, reject) { require(['./kustoMode'], resolve, reject); }).then(callback);
|
|
270
270
|
}
|
|
271
271
|
var kustoDefaults = new LanguageServiceDefaultsImpl(defaultLanguageSettings);
|
|
272
|
+
var themeNames = {
|
|
273
|
+
light: 'kusto-light',
|
|
274
|
+
dark: 'kusto-dark',
|
|
275
|
+
dark2: 'kusto-dark2'
|
|
276
|
+
};
|
|
272
277
|
monaco__namespace.languages.onLanguage('kusto', function () {
|
|
273
278
|
withMode(function (mode) {
|
|
274
279
|
return mode.setupMode(kustoDefaults, monaco__namespace);
|
|
@@ -278,7 +283,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
278
283
|
id: 'kusto',
|
|
279
284
|
extensions: ['.csl', '.kql']
|
|
280
285
|
});
|
|
281
|
-
monaco__namespace.editor.defineTheme(
|
|
286
|
+
monaco__namespace.editor.defineTheme(themeNames.light, {
|
|
282
287
|
base: 'vs',
|
|
283
288
|
inherit: true,
|
|
284
289
|
rules: [{
|
|
@@ -362,7 +367,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
362
367
|
}],
|
|
363
368
|
colors: {}
|
|
364
369
|
});
|
|
365
|
-
monaco__namespace.editor.defineTheme(
|
|
370
|
+
monaco__namespace.editor.defineTheme(themeNames.dark, {
|
|
366
371
|
base: 'vs-dark',
|
|
367
372
|
inherit: true,
|
|
368
373
|
rules: [{
|
|
@@ -448,7 +453,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
448
453
|
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
449
454
|
}
|
|
450
455
|
});
|
|
451
|
-
monaco__namespace.editor.defineTheme(
|
|
456
|
+
monaco__namespace.editor.defineTheme(themeNames.dark2, {
|
|
452
457
|
base: 'vs-dark',
|
|
453
458
|
inherit: true,
|
|
454
459
|
rules: [],
|
|
@@ -463,8 +468,14 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
463
468
|
// Initialize kusto specific language features that don't currently have a natural way to extend using existing apis.
|
|
464
469
|
// Most other language features are initialized in kustoMode.ts
|
|
465
470
|
monaco__namespace.editor.onDidCreateEditor(function (editor) {
|
|
466
|
-
|
|
467
|
-
|
|
471
|
+
var _window$MonacoEnviron;
|
|
472
|
+
if ((_window$MonacoEnviron = window.MonacoEnvironment) !== null && _window$MonacoEnviron !== void 0 && _window$MonacoEnviron.globalAPI) {
|
|
473
|
+
// hook up extension methods to editor.
|
|
474
|
+
extend(editor);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// TODO: asked if there's a cleaner way to register an editor contribution. looks like monaco has an internal contribution registrar but it's no exposed in the API.
|
|
478
|
+
// https://stackoverflow.com/questions/46700245/how-to-add-an-ieditorcontribution-to-monaco-editor
|
|
468
479
|
new KustoCommandHighlighter(editor);
|
|
469
480
|
if (isStandaloneCodeEditor(editor)) {
|
|
470
481
|
new KustoCommandFormatter(editor);
|
|
@@ -498,14 +509,30 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
498
509
|
return editor.addAction !== undefined;
|
|
499
510
|
}
|
|
500
511
|
var globalApi = {
|
|
512
|
+
getCslTypeNameFromClrType: schema.getCslTypeNameFromClrType,
|
|
513
|
+
getCallName: schema.getCallName,
|
|
514
|
+
getExpression: schema.getExpression,
|
|
515
|
+
getInputParametersAsCslString: schema.getInputParametersAsCslString,
|
|
516
|
+
getEntityDataTypeFromCslType: schema.getEntityDataTypeFromCslType,
|
|
501
517
|
kustoDefaults: kustoDefaults,
|
|
502
518
|
getKustoWorker: getKustoWorker,
|
|
503
|
-
getCurrentCommandRange: getCurrentCommandRange
|
|
519
|
+
getCurrentCommandRange: getCurrentCommandRange,
|
|
520
|
+
themeNames: themeNames
|
|
504
521
|
};
|
|
505
522
|
monaco__namespace.languages.kusto = globalApi;
|
|
506
523
|
|
|
524
|
+
exports.getCallName = schema.getCallName;
|
|
525
|
+
exports.getCslTypeNameFromClrType = schema.getCslTypeNameFromClrType;
|
|
526
|
+
exports.getEntityDataTypeFromCslType = schema.getEntityDataTypeFromCslType;
|
|
527
|
+
exports.getExpression = schema.getExpression;
|
|
528
|
+
exports.getInputParametersAsCslString = schema.getInputParametersAsCslString;
|
|
529
|
+
Object.defineProperty(exports, 'showSchema', {
|
|
530
|
+
enumerable: true,
|
|
531
|
+
get: function () { return schema.showSchema; }
|
|
532
|
+
});
|
|
507
533
|
exports.getCurrentCommandRange = getCurrentCommandRange;
|
|
508
534
|
exports.getKustoWorker = getKustoWorker;
|
|
509
535
|
exports.kustoDefaults = kustoDefaults;
|
|
536
|
+
exports.themeNames = themeNames;
|
|
510
537
|
|
|
511
538
|
}));
|