@kusto/monaco-kusto 3.2.6 → 3.2.7
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 +2 -2
- package/release/dev/kustoWorker.js +14 -4
- package/release/esm/languageService/kustoLanguageService.js +14 -4
- package/release/min/Kusto.Language.Bridge.min.js +1 -1
- package/release/min/kustoMode.js +1 -1
- package/release/min/kustoWorker.js +2 -2
- package/release/min/monaco.contribution.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kusto/monaco-kusto",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"description": "CSL, KQL plugin for the Monaco Editor",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Microsoft"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@kusto/language-service": "2.0.0-beta.0",
|
|
58
|
-
"@kusto/language-service-next": "0.0.
|
|
58
|
+
"@kusto/language-service-next": "0.0.42"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"monaco-editor": "^0.20.0"
|
|
@@ -7180,7 +7180,7 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
|
|
|
7180
7180
|
// Start and end relative to block start.
|
|
7181
7181
|
var startOffset = renderStatement.TextStart;
|
|
7182
7182
|
var endOffset = renderStatement.End;
|
|
7183
|
-
var visualization = renderStatement.ChartType.
|
|
7183
|
+
var visualization = renderStatement.ChartType.Text;
|
|
7184
7184
|
var withClause = renderStatement.WithClause;
|
|
7185
7185
|
if (!withClause) {
|
|
7186
7186
|
var info = {
|
|
@@ -7327,12 +7327,21 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
|
|
|
7327
7327
|
return Promise.resolve(undefined);
|
|
7328
7328
|
}
|
|
7329
7329
|
var quickInfo = currentBLock.Service.GetQuickInfo(cursorOffset);
|
|
7330
|
-
if (!quickInfo || !quickInfo.
|
|
7330
|
+
if (!quickInfo || !quickInfo.Items) {
|
|
7331
7331
|
return Promise.resolve(undefined);
|
|
7332
7332
|
}
|
|
7333
|
+
var items = this.toArray(quickInfo.Items);
|
|
7334
|
+
if (!items) {
|
|
7335
|
+
return Promise.resolve(undefined);
|
|
7336
|
+
}
|
|
7337
|
+
// Errors are already shown in getDiagnostics. we don't want them in doHover.
|
|
7338
|
+
items = items.filter(function (item) { return item.Kind !== k2.QuickInfoKind.Error; });
|
|
7339
|
+
var itemsText = items.map(function (item) { return item.Text.replace('\n\n', '\n* * *\n'); });
|
|
7340
|
+
// separate items by horizontal line.
|
|
7341
|
+
var text = itemsText.join("\n* * *\n");
|
|
7333
7342
|
// Instead of just an empty line between the first line (the signature) and the second line (the description)
|
|
7334
7343
|
// add an horizontal line (* * * in markdown) between them.
|
|
7335
|
-
return Promise.resolve({ contents:
|
|
7344
|
+
return Promise.resolve({ contents: text });
|
|
7336
7345
|
};
|
|
7337
7346
|
Object.defineProperty(KustoLanguageService, "dummySchema", {
|
|
7338
7347
|
//#region dummy schema for manual testing
|
|
@@ -7526,7 +7535,8 @@ define('vs/language/kusto/languageService/kustoLanguageService',["require", "exp
|
|
|
7526
7535
|
var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol(schema_1.getCslTypeNameFromClrType(param.type));
|
|
7527
7536
|
var expression = void 0;
|
|
7528
7537
|
if (param.cslDefaultValue && typeof param.cslDefaultValue === "string") {
|
|
7529
|
-
|
|
7538
|
+
var parser = parsing.QueryGrammar.From(Kusto.Language.GlobalState.Default).ConstantExpression;
|
|
7539
|
+
expression = parsing.SyntaxParsers.ParseFirst({ prototype: parser }, parser, param.cslDefaultValue);
|
|
7530
7540
|
}
|
|
7531
7541
|
return new sym.Parameter.$ctor3(param.name, paramSymbol, null, null, null, false, null, 1, 1, expression, null);
|
|
7532
7542
|
}
|
|
@@ -918,7 +918,7 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
918
918
|
// Start and end relative to block start.
|
|
919
919
|
var startOffset = renderStatement.TextStart;
|
|
920
920
|
var endOffset = renderStatement.End;
|
|
921
|
-
var visualization = renderStatement.ChartType.
|
|
921
|
+
var visualization = renderStatement.ChartType.Text;
|
|
922
922
|
var withClause = renderStatement.WithClause;
|
|
923
923
|
if (!withClause) {
|
|
924
924
|
var info = {
|
|
@@ -1065,12 +1065,21 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
1065
1065
|
return Promise.resolve(undefined);
|
|
1066
1066
|
}
|
|
1067
1067
|
var quickInfo = currentBLock.Service.GetQuickInfo(cursorOffset);
|
|
1068
|
-
if (!quickInfo || !quickInfo.
|
|
1068
|
+
if (!quickInfo || !quickInfo.Items) {
|
|
1069
1069
|
return Promise.resolve(undefined);
|
|
1070
1070
|
}
|
|
1071
|
+
var items = this.toArray(quickInfo.Items);
|
|
1072
|
+
if (!items) {
|
|
1073
|
+
return Promise.resolve(undefined);
|
|
1074
|
+
}
|
|
1075
|
+
// Errors are already shown in getDiagnostics. we don't want them in doHover.
|
|
1076
|
+
items = items.filter(function (item) { return item.Kind !== k2.QuickInfoKind.Error; });
|
|
1077
|
+
var itemsText = items.map(function (item) { return item.Text.replace('\n\n', '\n* * *\n'); });
|
|
1078
|
+
// separate items by horizontal line.
|
|
1079
|
+
var text = itemsText.join("\n* * *\n");
|
|
1071
1080
|
// Instead of just an empty line between the first line (the signature) and the second line (the description)
|
|
1072
1081
|
// add an horizontal line (* * * in markdown) between them.
|
|
1073
|
-
return Promise.resolve({ contents:
|
|
1082
|
+
return Promise.resolve({ contents: text });
|
|
1074
1083
|
};
|
|
1075
1084
|
Object.defineProperty(KustoLanguageService, "dummySchema", {
|
|
1076
1085
|
//#region dummy schema for manual testing
|
|
@@ -1264,7 +1273,8 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
1264
1273
|
var paramSymbol = Kusto.Language.Symbols.ScalarTypes.GetSymbol(getCslTypeNameFromClrType(param.type));
|
|
1265
1274
|
var expression = void 0;
|
|
1266
1275
|
if (param.cslDefaultValue && typeof param.cslDefaultValue === "string") {
|
|
1267
|
-
|
|
1276
|
+
var parser = parsing.QueryGrammar.From(Kusto.Language.GlobalState.Default).ConstantExpression;
|
|
1277
|
+
expression = parsing.SyntaxParsers.ParseFirst({ prototype: parser }, parser, param.cslDefaultValue);
|
|
1268
1278
|
}
|
|
1269
1279
|
return new sym.Parameter.$ctor3(param.name, paramSymbol, null, null, null, false, null, 1, 1, expression, null);
|
|
1270
1280
|
}
|