@kusto/monaco-kusto 10.0.6 → 10.0.8
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 +1 -1
- package/package.json +3 -3
- 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 +2 -2
- package/release/dev/kustoWorker.js +45 -31
- package/release/dev/{main-f70a1720.js → main-5c133770.js} +2 -2
- package/release/dev/monaco.contribution.js +2 -2
- package/release/dev/{schema-43c4cc5e.js → schema-5549fea4.js} +2 -2
- package/release/esm/kusto.worker.js +29 -13
- package/release/esm/kustoMode.js +1158 -139
- package/release/esm/languageService/kustoLanguageService.js +23 -12
- package/release/esm/{schema-fbf2f106.js → schema-0961786c.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 +4 -4
- package/release/min/{main-22f9065c.js → main-48530ed8.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/{schema-0b8567a7.js → schema-9e266625.js} +2 -2
|
@@ -879,7 +879,6 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
879
879
|
return Promise.resolve();
|
|
880
880
|
};
|
|
881
881
|
KustoLanguageService.prototype.setSchema = function (schema) {
|
|
882
|
-
var _this = this;
|
|
883
882
|
this._schema = schema;
|
|
884
883
|
// We support intellisenseV2 only if the clusterType is "Engine", even if the setting is enabled
|
|
885
884
|
if (this._languageSettings.useIntellisenseV2 && schema && schema.clusterType === 'Engine') {
|
|
@@ -889,12 +888,10 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
889
888
|
this._parsePropertiesV2 = undefined;
|
|
890
889
|
}
|
|
891
890
|
// since V2 doesn't support control commands, we're initializing V1 intellisense for both cases and we'll going to use V1 intellisense for control commands.
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
resolve(undefined);
|
|
897
|
-
});
|
|
891
|
+
var kustoJsSchema = schema ? KustoLanguageService.convertToKustoJsSchema(schema) : undefined;
|
|
892
|
+
this._kustoJsSchema = kustoJsSchema;
|
|
893
|
+
this.createRulesProvider(kustoJsSchema, schema.clusterType);
|
|
894
|
+
return Promise.resolve();
|
|
898
895
|
};
|
|
899
896
|
KustoLanguageService.prototype.setParameters = function (scalarParameters, tabularParameters) {
|
|
900
897
|
var _a;
|
|
@@ -909,6 +906,11 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
909
906
|
});
|
|
910
907
|
this._kustoJsSchemaV2 = this._kustoJsSchemaV2.WithParameters(KustoLanguageService.toBridgeList(__spreadArray(__spreadArray([], scalarSymbols, true), tabularSymbols, true)));
|
|
911
908
|
this._script = (_a = this._script) === null || _a === void 0 ? void 0 : _a.WithGlobals(this._kustoJsSchemaV2);
|
|
909
|
+
// Set parameters is only working with the below code. It didn't used to need this, why does it now?!?
|
|
910
|
+
// Copy+pasted from setSchema
|
|
911
|
+
var kustoJsSchema = KustoLanguageService.convertToKustoJsSchema(this._schema);
|
|
912
|
+
this._kustoJsSchema = kustoJsSchema;
|
|
913
|
+
this.createRulesProvider(kustoJsSchema, this._schema.clusterType);
|
|
912
914
|
return Promise.resolve(undefined);
|
|
913
915
|
};
|
|
914
916
|
/**
|
|
@@ -921,8 +923,8 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
921
923
|
* @param databaseInContextAlternateName alternate name of database in context
|
|
922
924
|
*/
|
|
923
925
|
KustoLanguageService.prototype.setSchemaFromShowSchema = function (schema, clusterConnectionString, databaseInContextName, globalScalarParameters, globalTabularParameters, databaseInContextAlternateName) {
|
|
924
|
-
var
|
|
925
|
-
return this.
|
|
926
|
+
var normalized = this._normalizeSchema(schema, clusterConnectionString, databaseInContextName, databaseInContextAlternateName);
|
|
927
|
+
return this.setSchema(__assign(__assign({}, normalized), { globalScalarParameters: globalScalarParameters, globalTabularParameters: globalTabularParameters }));
|
|
926
928
|
};
|
|
927
929
|
/**
|
|
928
930
|
* Converts the result of .show schema as json to a normalized schema used by kusto language service.
|
|
@@ -931,7 +933,7 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
931
933
|
* @param databaseInContextName database in context name
|
|
932
934
|
* @param databaseInContextAlternateName database in context alternate name
|
|
933
935
|
*/
|
|
934
|
-
KustoLanguageService.prototype.
|
|
936
|
+
KustoLanguageService.prototype._normalizeSchema = function (schema, clusterConnectionString, databaseInContextName, databaseInContextAlternateName) {
|
|
935
937
|
var databases = Object.keys(schema.Databases)
|
|
936
938
|
.map(function (key) { return schema.Databases[key]; })
|
|
937
939
|
.map(function (_a) {
|
|
@@ -1002,7 +1004,7 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
1002
1004
|
}),
|
|
1003
1005
|
});
|
|
1004
1006
|
});
|
|
1005
|
-
|
|
1007
|
+
return {
|
|
1006
1008
|
clusterType: 'Engine',
|
|
1007
1009
|
cluster: {
|
|
1008
1010
|
connectionString: clusterConnectionString,
|
|
@@ -1010,7 +1012,16 @@ var KustoLanguageService = /** @class */ (function () {
|
|
|
1010
1012
|
},
|
|
1011
1013
|
database: databases.filter(function (db) { return db.name === databaseInContextName; })[0],
|
|
1012
1014
|
};
|
|
1013
|
-
|
|
1015
|
+
};
|
|
1016
|
+
/**
|
|
1017
|
+
* Converts the result of .show schema as json to a normalized schema used by kusto language service.
|
|
1018
|
+
* @param schema result of show schema
|
|
1019
|
+
* @param clusterConnectionString cluster connection string`
|
|
1020
|
+
* @param databaseInContextName database in context name
|
|
1021
|
+
* @param databaseInContextAlternateName database in context alternate name
|
|
1022
|
+
*/
|
|
1023
|
+
KustoLanguageService.prototype.normalizeSchema = function (schema, clusterConnectionString, databaseInContextName, databaseInContextAlternateName) {
|
|
1024
|
+
return Promise.resolve(this._normalizeSchema(schema, clusterConnectionString, databaseInContextName, databaseInContextAlternateName));
|
|
1014
1025
|
};
|
|
1015
1026
|
KustoLanguageService.prototype.getSchema = function () {
|
|
1016
1027
|
return Promise.resolve(this._schema);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 10.0.
|
|
3
|
+
* monaco-kusto version: 10.0.8(134ff03184264a9900737e4b5cf93f69540e1c8e)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|