@kusto/monaco-kusto 6.2.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -10
- package/globalApi.d.ts +13 -0
- package/package.json +6 -5
- package/release/dev/kustoMode.js +57 -25
- package/release/dev/kustoWorker.js +34 -105
- package/release/dev/{main-81df16b2.js → main-a33ab1e1.js} +2 -2
- package/release/dev/monaco.contribution.js +77 -56
- package/release/dev/schema-0bb01ba6.js +109 -0
- package/release/esm/commandFormatter.d.ts +1 -1
- package/release/esm/commandHighlighter.d.ts +1 -2
- package/release/esm/extendedEditor.d.ts +2 -2
- package/release/esm/kusto.worker.js +11 -69
- package/release/esm/kustoMode.d.ts +10 -6
- package/release/esm/kustoMode.js +16 -9
- package/release/esm/kustoWorker.d.ts +22 -8
- package/release/esm/languageFeatures.d.ts +12 -17
- package/release/esm/languageService/kustoLanguageService.d.ts +2 -8
- package/release/esm/languageService/kustoMonarchLanguageDefinition.d.ts +1 -1
- package/release/esm/languageService/schema.d.ts +7 -2
- package/release/esm/languageService/settings.d.ts +4 -4
- package/release/esm/monaco.contribution.d.ts +13 -8
- package/release/esm/monaco.contribution.js +73 -60
- package/release/esm/schema-cdbe085f.js +85 -0
- package/release/esm/types.d.ts +149 -0
- package/release/esm/workerManager.d.ts +5 -7
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +4 -4
- package/release/min/{main-bf0e83c5.js → main-8cd8c26d.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/schema-d831c44f.js +7 -0
- package/release/monaco.d.ts +1 -312
package/README.md
CHANGED
|
@@ -25,19 +25,25 @@ Kusto language plugin for the Monaco Editor. It provides the following features
|
|
|
25
25
|
|
|
26
26
|
Example at [/samples/amd](https://github.com/Azure/monaco-kusto/tree/master/samples/amd)
|
|
27
27
|
|
|
28
|
-
1. Run `npm run copyMonacoFilesAMD <path>` or `yarn copyMonacoFilesAMD <path>`
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
1. Run `npm run copyMonacoFilesAMD <path>` or `yarn copyMonacoFilesAMD <path>`
|
|
29
|
+
where <path> is where you want the monaco and kusto amd modules to be. These
|
|
30
|
+
files will need to be served as-in.
|
|
31
|
+
2. Using a amd module loader, import `vs/language/kusto/monaco.contribution` 1. The monaco editors included loader can be made available via a global
|
|
32
|
+
require `require` by adding the script tag: `<script src="<path>/vs/loader.js"></script>`
|
|
33
|
+
3. You should now be able to create monaco editors with `language: 'kusto'`. The
|
|
34
|
+
kusto worker can be reached via the monaco global:
|
|
35
|
+
`monaco.languages.kusto.getKustoWorker()`
|
|
36
|
+
4. If using typeScript, add "@kusto/monaco-kusto/globalApi" to compilerOptions.types in tsconfig.json`
|
|
32
37
|
|
|
33
38
|
### ESM
|
|
34
39
|
|
|
35
40
|
Parcel example at [/samples/parcel](https://github.com/Azure/monaco-kusto/tree/master/samples/parcel)
|
|
36
41
|
|
|
37
42
|
1. Configure your bundler so `@kusto/monaco-kusto/release/esm/kusto.worker` has it's own entry point
|
|
38
|
-
2. Configure
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
2. Configure the global `MonacoEnvironment` with either `getWorkerUrl` or `getWorker`
|
|
44
|
+
3. You should now be able to create monaco editors with `language: 'kusto'`. The
|
|
45
|
+
kusto worker can be reached via the monaco global:
|
|
46
|
+
`monaco.languages.kusto.getKustoWorker()`
|
|
41
47
|
|
|
42
48
|
### Setting a schema
|
|
43
49
|
|
|
@@ -45,9 +51,10 @@ There are 2 APIs to set a Kusto schema:
|
|
|
45
51
|
|
|
46
52
|
1. `setSchema` - the passed schema is of type `ClusterType` (defined in `schema.ts`).
|
|
47
53
|
The database in ROOT.database will be the one in context.
|
|
48
|
-
2. `setSchemaFromShowSchema` - a method to set a schema from the result of the
|
|
49
|
-
The result is a list of databases (see
|
|
50
|
-
|
|
54
|
+
2. `setSchemaFromShowSchema` - a method to set a schema from the result of the
|
|
55
|
+
Kusto query `.show schema as json`. The result is a list of databases (see
|
|
56
|
+
interface `Result` in `schema.ts`), so when this method is used, it also
|
|
57
|
+
requires a cluster URI and the name of the database in context.
|
|
51
58
|
|
|
52
59
|
## Contributing
|
|
53
60
|
|
|
@@ -65,6 +72,24 @@ There are 2 APIs to set a Kusto schema:
|
|
|
65
72
|
|
|
66
73
|
## Changelog
|
|
67
74
|
|
|
75
|
+
### 7.0.1
|
|
76
|
+
|
|
77
|
+
- fix: Exported types don't match types used in many cases
|
|
78
|
+
|
|
79
|
+
### 7.0.0
|
|
80
|
+
|
|
81
|
+
- BREAKING CHANGE: Bumped monaco-editor peer dependency to ~0.37.0
|
|
82
|
+
- This version of monaco-editor no longer requires a patch to work with Parcel. Details here: https://github.com/microsoft/monaco-editor/issues/2966
|
|
83
|
+
- fix: "monaco is not defined" errors when consuming esm files
|
|
84
|
+
- Moved types from global interface (`monaco.languages.kusto.*`) to esm index
|
|
85
|
+
file `import { SomeType } from '@kusto/monaco-kusto`. With this, esm
|
|
86
|
+
consumer no longer need to include
|
|
87
|
+
`@kusto/monaco-kusto/release/monaco.d.ts`.
|
|
88
|
+
- ESM output no longer requires `MonacoEnvironment.globalApi` to be `true`
|
|
89
|
+
- Moved `@kusto/monaco-kusto/release/monaco.d.ts` content to
|
|
90
|
+
`@kusto/monaco-kusto/globalApi.d.ts`. Original file now references this new
|
|
91
|
+
one, and will be removed in a future release.
|
|
92
|
+
|
|
68
93
|
### 6.2.0
|
|
69
94
|
|
|
70
95
|
- Esm output not longer requires `self.MonacoEnvironment` to be true
|
package/globalApi.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Augments monaco global types with Kusto api. Should be imported if you're using amd modules, or if you've set `MonacoEnvironment.globalApi` to true.
|
|
2
|
+
|
|
3
|
+
/// <reference types="monaco-editor/monaco" />
|
|
4
|
+
|
|
5
|
+
declare namespace monaco.editor {
|
|
6
|
+
export interface ICodeEditor {
|
|
7
|
+
getCurrentCommandRange(cursorPosition: monaco.Position): monaco.Range;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare namespace monaco.languages {
|
|
12
|
+
export const kusto: typeof import('@kusto/monaco-kusto');
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kusto/monaco-kusto",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "CSL, KQL plugin for the Monaco Editor",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Microsoft"
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"files": [
|
|
29
29
|
"release",
|
|
30
30
|
"README.md",
|
|
31
|
-
"copyMonacoFilesAMD"
|
|
31
|
+
"copyMonacoFilesAMD",
|
|
32
|
+
"globalApi.d.ts"
|
|
32
33
|
],
|
|
33
34
|
"bin": {
|
|
34
35
|
"copyMonacoFilesAMD": "./copyMonacoFilesAMD.js"
|
|
@@ -53,13 +54,13 @@
|
|
|
53
54
|
"concurrently": "^7.6.0",
|
|
54
55
|
"http-server": "^0.12.3",
|
|
55
56
|
"live-server": "^1.2.1",
|
|
56
|
-
"monaco-editor": "~0.
|
|
57
|
+
"monaco-editor": "~0.37.0",
|
|
57
58
|
"monaco-languages": "2.11.1",
|
|
58
59
|
"rimraf": "^4.1.2",
|
|
59
60
|
"rollup": "^3.17.3",
|
|
60
61
|
"terser": "^5.16.2",
|
|
61
62
|
"ts-node": "^10.9.1",
|
|
62
|
-
"typescript": "^
|
|
63
|
+
"typescript": "^5.0.4",
|
|
63
64
|
"vscode-languageserver-textdocument": "1.0.4"
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
@@ -70,6 +71,6 @@
|
|
|
70
71
|
"xregexp": "^5.1.1"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
|
-
"monaco-editor": "~0.
|
|
74
|
+
"monaco-editor": "~0.37.0"
|
|
74
75
|
}
|
|
75
76
|
}
|
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:
|
|
3
|
+
* monaco-kusto version: 7.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
|
|
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-a33ab1e1'], (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];
|
|
@@ -1569,12 +1569,14 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1569
1569
|
insertText: entry.insertText,
|
|
1570
1570
|
sortText: entry.sortText,
|
|
1571
1571
|
filterText: entry.filterText,
|
|
1572
|
+
// TODO: Is this cast safe?
|
|
1572
1573
|
documentation: formatDocLink((_entry$documentation = entry.documentation) === null || _entry$documentation === void 0 ? void 0 : _entry$documentation.value),
|
|
1573
1574
|
detail: entry.detail,
|
|
1574
1575
|
range: wordRange,
|
|
1575
1576
|
kind: toCompletionItemKind(entry.kind)
|
|
1576
1577
|
};
|
|
1577
1578
|
if (entry.textEdit) {
|
|
1579
|
+
// TODO: Where is the "range" property coming from?
|
|
1578
1580
|
item.range = toRange(entry.textEdit.range);
|
|
1579
1581
|
item.insertText = entry.textEdit.newText;
|
|
1580
1582
|
}
|
|
@@ -1842,6 +1844,9 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1842
1844
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
1843
1845
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1844
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); }); }; }
|
|
1845
1850
|
var kustoWorker;
|
|
1846
1851
|
var resolveWorker;
|
|
1847
1852
|
var workerPromise = new Promise(function (resolve, reject) {
|
|
@@ -1860,12 +1865,27 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1860
1865
|
var client = new WorkerManager(monacoInstance, defaults);
|
|
1861
1866
|
disposables.push(client);
|
|
1862
1867
|
var workerAccessor = function workerAccessor(first) {
|
|
1863
|
-
var augmentedSetSchema = function
|
|
1864
|
-
var
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
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
|
+
}();
|
|
1869
1889
|
for (var _len = arguments.length, more = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1870
1890
|
more[_key - 1] = arguments[_key];
|
|
1871
1891
|
}
|
|
@@ -1876,14 +1896,26 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1876
1896
|
return augmentedSetSchema(schema, worker);
|
|
1877
1897
|
},
|
|
1878
1898
|
setSchemaFromShowSchema: function setSchemaFromShowSchema(schema, connection, database, globalScalarParameters, globalTabularParameters) {
|
|
1879
|
-
|
|
1880
|
-
return
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
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
|
+
}))();
|
|
1887
1919
|
}
|
|
1888
1920
|
});
|
|
1889
1921
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version:
|
|
3
|
+
* monaco-kusto version: 7.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
|
|
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-a33ab1e1', './schema-0bb01ba6'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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-81df16b2'], (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
|
}));
|