@kusto/monaco-kusto 7.2.1 → 7.3.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/package.json +5 -5
- 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 +34 -25
- package/release/dev/kustoWorker.js +2 -2
- package/release/dev/{main-919033b0.js → main-6985c66e.js} +2 -2
- package/release/dev/monaco.contribution.js +2 -2
- package/release/dev/{schema-ee65b25b.js → schema-e48afa44.js} +2 -2
- package/release/esm/kusto.worker.js +2 -2
- package/release/esm/kustoMode.js +30 -24
- package/release/esm/languageFeatures.d.ts +1 -0
- package/release/esm/languageService/settings.d.ts +2 -0
- package/release/esm/monaco.contribution.js +3 -3
- package/release/esm/{schema-cdd9848d.js → schema-da29f26c.js} +1 -1
- 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 +2 -2
- package/release/min/{main-c7341389.js → main-f46974ac.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/{schema-d866b467.js → schema-cd2b8c24.js} +2 -2
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.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
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-6985c66e'], (function (exports, monaco, main) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -1514,28 +1514,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1514
1514
|
text: textEdit.newText
|
|
1515
1515
|
};
|
|
1516
1516
|
}
|
|
1517
|
-
var
|
|
1518
|
-
function formatDocLink(docString) {
|
|
1519
|
-
// If the docString is empty, we want to return undefined to prevent an empty documentation popup.
|
|
1520
|
-
if (!docString) {
|
|
1521
|
-
return undefined;
|
|
1522
|
-
}
|
|
1523
|
-
var target = {};
|
|
1524
|
-
var urisProxy = new Proxy(target, {
|
|
1525
|
-
get: function get(_target, prop, _receiver) {
|
|
1526
|
-
// The link comes with a postfix of ".md" that we want to remove
|
|
1527
|
-
var linkWithoutPostfix = prop.toString().replace('.md', '');
|
|
1528
|
-
// Sometimes we get the link as a full URL. For example in the main doc link of the item
|
|
1529
|
-
var fullURL = linkWithoutPostfix.startsWith('https') ? linkWithoutPostfix : "".concat(DOCS_BASE_URL, "/").concat(linkWithoutPostfix);
|
|
1530
|
-
return monaco__namespace.Uri.parse(fullURL);
|
|
1531
|
-
}
|
|
1532
|
-
});
|
|
1533
|
-
return {
|
|
1534
|
-
value: docString,
|
|
1535
|
-
isTrusted: true,
|
|
1536
|
-
uris: urisProxy
|
|
1537
|
-
};
|
|
1538
|
-
}
|
|
1517
|
+
var DEFAULT_DOCS_BASE_URL = 'https://learn.microsoft.com/azure/data-explorer/kusto/query';
|
|
1539
1518
|
var CompletionAdapter = /*#__PURE__*/function () {
|
|
1540
1519
|
function CompletionAdapter(_worker, languageSettings) {
|
|
1541
1520
|
_classCallCheck(this, CompletionAdapter);
|
|
@@ -1550,6 +1529,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1550
1529
|
}, {
|
|
1551
1530
|
key: "provideCompletionItems",
|
|
1552
1531
|
value: function provideCompletionItems(model, position, context, token) {
|
|
1532
|
+
var _this7 = this;
|
|
1553
1533
|
var wordInfo = model.getWordUntilPosition(position);
|
|
1554
1534
|
var wordRange = new monaco__namespace.Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);
|
|
1555
1535
|
var resource = model.uri;
|
|
@@ -1570,7 +1550,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1570
1550
|
sortText: entry.sortText,
|
|
1571
1551
|
filterText: entry.filterText,
|
|
1572
1552
|
// TODO: Is this cast safe?
|
|
1573
|
-
documentation: formatDocLink((_entry$documentation = entry.documentation) === null || _entry$documentation === void 0 ? void 0 : _entry$documentation.value),
|
|
1553
|
+
documentation: _this7.formatDocLink((_entry$documentation = entry.documentation) === null || _entry$documentation === void 0 ? void 0 : _entry$documentation.value),
|
|
1574
1554
|
detail: entry.detail,
|
|
1575
1555
|
range: wordRange,
|
|
1576
1556
|
kind: toCompletionItemKind(entry.kind)
|
|
@@ -1591,6 +1571,35 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1591
1571
|
};
|
|
1592
1572
|
});
|
|
1593
1573
|
}
|
|
1574
|
+
}, {
|
|
1575
|
+
key: "formatDocLink",
|
|
1576
|
+
value: function formatDocLink(docString) {
|
|
1577
|
+
// If the docString is empty, we want to return undefined to prevent an empty documentation popup.
|
|
1578
|
+
if (!docString) {
|
|
1579
|
+
return undefined;
|
|
1580
|
+
}
|
|
1581
|
+
var _this$languageSetting = this.languageSettings,
|
|
1582
|
+
_this$languageSetting2 = _this$languageSetting.documentationBaseUrl,
|
|
1583
|
+
documentationBaseUrl = _this$languageSetting2 === void 0 ? DEFAULT_DOCS_BASE_URL : _this$languageSetting2,
|
|
1584
|
+
documentationDocUriTransformer = _this$languageSetting.documentationDocUriTransformer;
|
|
1585
|
+
var urisProxy = new Proxy({}, {
|
|
1586
|
+
get: function get(_target, prop, _receiver) {
|
|
1587
|
+
// The link comes with a postfix of ".md" that we want to remove
|
|
1588
|
+
var linkWithoutPostfix = prop.toString().replace('.md', '');
|
|
1589
|
+
// Sometimes we get the link as a full URL. For example in the main doc link of the item
|
|
1590
|
+
var fullURL = linkWithoutPostfix.startsWith('https') ? linkWithoutPostfix : "".concat(documentationBaseUrl, "/").concat(linkWithoutPostfix);
|
|
1591
|
+
if (documentationDocUriTransformer) {
|
|
1592
|
+
fullURL = documentationDocUriTransformer(fullURL, prop.toString());
|
|
1593
|
+
}
|
|
1594
|
+
return monaco__namespace.Uri.parse(fullURL);
|
|
1595
|
+
}
|
|
1596
|
+
});
|
|
1597
|
+
return {
|
|
1598
|
+
value: docString,
|
|
1599
|
+
isTrusted: true,
|
|
1600
|
+
uris: urisProxy
|
|
1601
|
+
};
|
|
1602
|
+
}
|
|
1594
1603
|
}]);
|
|
1595
1604
|
return CompletionAdapter;
|
|
1596
1605
|
}();
|
|
@@ -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.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
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-6985c66e', './schema-e48afa44'], (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."); }
|
|
@@ -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.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
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-6985c66e', ['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.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
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', './schema-
|
|
8
|
+
define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-e48afa44'], (function (require, exports, monaco, schema) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -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.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/schema-
|
|
8
|
+
define('vs/language/kusto/schema-e48afa44', ['exports'], (function (exports) { 'use strict';
|
|
9
9
|
|
|
10
10
|
// Definition of schema object in the context of language services. This model is exposed to consumers of this library.
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as worker from 'monaco-editor/esm/vs/editor/editor.worker';
|
|
9
9
|
import * as ls from 'vscode-languageserver-types';
|
|
10
10
|
import XRegExp from 'xregexp';
|
|
11
|
-
import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-
|
|
11
|
+
import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-da29f26c.js';
|
|
12
12
|
import '@kusto/language-service/bridge.min';
|
|
13
13
|
import '@kusto/language-service/Kusto.JavaScript.Client.min';
|
|
14
14
|
import '@kusto/language-service/newtonsoft.json.min';
|
package/release/esm/kustoMode.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
@@ -815,28 +815,7 @@ function toTextEdit(textEdit) {
|
|
|
815
815
|
text: textEdit.newText
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
const
|
|
819
|
-
function formatDocLink(docString) {
|
|
820
|
-
// If the docString is empty, we want to return undefined to prevent an empty documentation popup.
|
|
821
|
-
if (!docString) {
|
|
822
|
-
return undefined;
|
|
823
|
-
}
|
|
824
|
-
const target = {};
|
|
825
|
-
const urisProxy = new Proxy(target, {
|
|
826
|
-
get(_target, prop, _receiver) {
|
|
827
|
-
// The link comes with a postfix of ".md" that we want to remove
|
|
828
|
-
const linkWithoutPostfix = prop.toString().replace('.md', '');
|
|
829
|
-
// Sometimes we get the link as a full URL. For example in the main doc link of the item
|
|
830
|
-
const fullURL = linkWithoutPostfix.startsWith('https') ? linkWithoutPostfix : `${DOCS_BASE_URL}/${linkWithoutPostfix}`;
|
|
831
|
-
return monaco.Uri.parse(fullURL);
|
|
832
|
-
}
|
|
833
|
-
});
|
|
834
|
-
return {
|
|
835
|
-
value: docString,
|
|
836
|
-
isTrusted: true,
|
|
837
|
-
uris: urisProxy
|
|
838
|
-
};
|
|
839
|
-
}
|
|
818
|
+
const DEFAULT_DOCS_BASE_URL = 'https://learn.microsoft.com/azure/data-explorer/kusto/query';
|
|
840
819
|
class CompletionAdapter {
|
|
841
820
|
constructor(_worker, languageSettings) {
|
|
842
821
|
this._worker = _worker;
|
|
@@ -863,7 +842,7 @@ class CompletionAdapter {
|
|
|
863
842
|
sortText: entry.sortText,
|
|
864
843
|
filterText: entry.filterText,
|
|
865
844
|
// TODO: Is this cast safe?
|
|
866
|
-
documentation: formatDocLink(entry.documentation?.value),
|
|
845
|
+
documentation: this.formatDocLink(entry.documentation?.value),
|
|
867
846
|
detail: entry.detail,
|
|
868
847
|
range: wordRange,
|
|
869
848
|
kind: toCompletionItemKind(entry.kind)
|
|
@@ -884,6 +863,33 @@ class CompletionAdapter {
|
|
|
884
863
|
};
|
|
885
864
|
});
|
|
886
865
|
}
|
|
866
|
+
formatDocLink(docString) {
|
|
867
|
+
// If the docString is empty, we want to return undefined to prevent an empty documentation popup.
|
|
868
|
+
if (!docString) {
|
|
869
|
+
return undefined;
|
|
870
|
+
}
|
|
871
|
+
const {
|
|
872
|
+
documentationBaseUrl = DEFAULT_DOCS_BASE_URL,
|
|
873
|
+
documentationDocUriTransformer
|
|
874
|
+
} = this.languageSettings;
|
|
875
|
+
const urisProxy = new Proxy({}, {
|
|
876
|
+
get(_target, prop, _receiver) {
|
|
877
|
+
// The link comes with a postfix of ".md" that we want to remove
|
|
878
|
+
const linkWithoutPostfix = prop.toString().replace('.md', '');
|
|
879
|
+
// Sometimes we get the link as a full URL. For example in the main doc link of the item
|
|
880
|
+
let fullURL = linkWithoutPostfix.startsWith('https') ? linkWithoutPostfix : `${documentationBaseUrl}/${linkWithoutPostfix}`;
|
|
881
|
+
if (documentationDocUriTransformer) {
|
|
882
|
+
fullURL = documentationDocUriTransformer(fullURL, prop.toString());
|
|
883
|
+
}
|
|
884
|
+
return monaco.Uri.parse(fullURL);
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
return {
|
|
888
|
+
value: docString,
|
|
889
|
+
isTrusted: true,
|
|
890
|
+
uris: urisProxy
|
|
891
|
+
};
|
|
892
|
+
}
|
|
887
893
|
}
|
|
888
894
|
function isMarkupContent(thing) {
|
|
889
895
|
return thing && typeof thing === 'object' && typeof thing.kind === 'string';
|
|
@@ -44,6 +44,7 @@ export declare class CompletionAdapter implements monaco.languages.CompletionIte
|
|
|
44
44
|
constructor(_worker: AugmentedWorkerAccessor, languageSettings: LanguageSettings);
|
|
45
45
|
get triggerCharacters(): string[];
|
|
46
46
|
provideCompletionItems(model: monaco.editor.IReadOnlyModel, position: monaco.Position, context: monaco.languages.CompletionContext, token: monaco.CancellationToken): monaco.Thenable<monaco.languages.CompletionList>;
|
|
47
|
+
private formatDocLink;
|
|
47
48
|
}
|
|
48
49
|
export declare class DefinitionAdapter {
|
|
49
50
|
private _worker;
|
|
@@ -16,6 +16,8 @@ export interface LanguageSettings {
|
|
|
16
16
|
disabledDiagnosticCodes?: string[];
|
|
17
17
|
quickFixCodeActions?: QuickFixCodeActionOptions[];
|
|
18
18
|
enableQuickFixes?: boolean;
|
|
19
|
+
documentationBaseUrl?: boolean;
|
|
20
|
+
documentationDocUriTransformer?: (href: string, rawUrl: string) => string;
|
|
19
21
|
}
|
|
20
22
|
export interface FormatterOptions {
|
|
21
23
|
indentationSize?: number;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
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
8
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
9
|
-
import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-
|
|
10
|
-
export { s as showSchema } from './schema-
|
|
9
|
+
import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-da29f26c.js';
|
|
10
|
+
export { s as showSchema } from './schema-da29f26c.js';
|
|
11
11
|
|
|
12
12
|
function getCurrentCommandRange(editor, cursorPosition) {
|
|
13
13
|
const zeroBasedCursorLineNumber = cursorPosition.lineNumber - 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.3.0(2180bebed1cf1ca23d0ec30598c9cb66cffbef03)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|