@kusto/monaco-kusto 10.0.8 → 10.0.10

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.
@@ -172,6 +172,7 @@ var KustoLanguageService = /** @class */ (function () {
172
172
  _a[k2.CompletionKind.Variable] = k.OptionKind.Parameter,
173
173
  _a[k2.CompletionKind.Option] = k.OptionKind.Option,
174
174
  _a[k2.CompletionKind.Graph] = k.OptionKind.Graph,
175
+ _a[k2.CompletionKind.EntityGroup] = k.OptionKind.EntityGroup,
175
176
  _a);
176
177
  this.disabledCompletionItemsV2 = {
177
178
  // render charts
@@ -257,6 +258,7 @@ var KustoLanguageService = /** @class */ (function () {
257
258
  _c[k2.CompletionKind.Variable] = ls.CompletionItemKind.Variable,
258
259
  _c[k2.CompletionKind.Option] = ls.CompletionItemKind.Text,
259
260
  _c[k2.CompletionKind.Graph] = ls.CompletionItemKind.Class,
261
+ _c[k2.CompletionKind.EntityGroup] = ls.CompletionItemKind.Class,
260
262
  _c);
261
263
  this._tokenKindToClassificationKind = (_d = {},
262
264
  _d[TokenKind.TableToken] = k2.ClassificationKind.Table,
@@ -1442,69 +1444,13 @@ var KustoLanguageService = /** @class */ (function () {
1442
1444
  Object.defineProperty(KustoLanguageService, "dummySchema", {
1443
1445
  //#region dummy schema for manual testing
1444
1446
  get: function () {
1445
- var database = {
1446
- majorVersion: 0,
1447
- minorVersion: 0,
1448
- entityGroups: [],
1449
- name: 'Kuskus',
1450
- tables: [
1451
- {
1452
- name: 'KustoLogs',
1453
- columns: [
1454
- {
1455
- name: 'Source',
1456
- type: 'string',
1457
- },
1458
- {
1459
- name: 'Timestamp',
1460
- type: 'datetime',
1461
- },
1462
- {
1463
- name: 'Directory',
1464
- type: 'string',
1465
- },
1466
- ],
1467
- docstring: 'A dummy description to test that docstring shows as expected when hovering over a table',
1468
- },
1469
- ],
1470
- functions: [
1471
- {
1472
- name: 'HowBig',
1473
- inputParameters: [
1474
- {
1475
- name: 'T',
1476
- columns: [
1477
- {
1478
- name: 'Timestamp',
1479
- type: 'System.DateTime',
1480
- cslType: 'datetime',
1481
- },
1482
- ],
1483
- },
1484
- ],
1485
- docstring: 'A dummy description to test that docstring shows as expected when hovering over a function',
1486
- body: "{\r\n union \r\n (T | count | project V='Volume', Metric = strcat(Count/1e9, ' Billion records')),\r\n (T | summarize FirstRecord=min(Timestamp)| project V='Volume', Metric = strcat(toint((now()-FirstRecord)/1d), ' Days of data (from: ', format_datetime(FirstRecord, 'yyyy-MM-dd'),')')),\r\n (T | where Timestamp > ago(1h) | count | project V='Velocity', Metric = strcat(Count/1e6, ' Million records / hour')),\r\n (T | summarize Latency=now()-max(Timestamp) | project V='Velocity', Metric = strcat(Latency / 1sec, ' seconds latency')),\r\n (T | take 1 | project V='Variety', Metric=tostring(pack_all()))\r\n | order by V \r\n}",
1487
- },
1488
- {
1489
- name: 'FindCIDPast24h',
1490
- inputParameters: [
1491
- {
1492
- name: 'clientActivityId',
1493
- type: 'System.String',
1494
- cslType: 'string',
1495
- },
1496
- ],
1497
- body: '{ KustoLogs | where Timestamp > now(-1d) | where ClientActivityId == clientActivityId} ',
1498
- },
1499
- ],
1500
- };
1501
1447
  var languageServiceSchema = {
1502
1448
  clusterType: 'Engine',
1503
1449
  cluster: {
1504
- connectionString: 'https://kuskus.kusto.windows.net;fed=true',
1505
- databases: [database],
1450
+ connectionString: '',
1451
+ databases: [],
1506
1452
  },
1507
- database: database,
1453
+ database: undefined,
1508
1454
  };
1509
1455
  return languageServiceSchema;
1510
1456
  },
@@ -1,31 +1,31 @@
1
1
  export interface Column {
2
- name: string;
3
- type: string;
4
- docstring?: string;
5
- examples?: string[];
2
+ readonly name: string;
3
+ readonly type: string;
4
+ readonly docstring?: string;
5
+ readonly examples?: readonly string[];
6
6
  }
7
7
  export interface Table {
8
- name: string;
9
- entityType?: TableEntityType;
10
- columns: Column[];
11
- docstring?: string;
8
+ readonly name: string;
9
+ readonly entityType?: TableEntityType;
10
+ readonly columns: readonly Column[];
11
+ readonly docstring?: string;
12
12
  }
13
13
  export interface MaterializedViewTable extends Table {
14
- entityType: 'MaterializedViewTable';
15
- mvQuery?: string;
14
+ readonly entityType: 'MaterializedViewTable';
15
+ readonly mvQuery?: string;
16
16
  }
17
17
  export interface ScalarParameter {
18
- name: string;
19
- type?: string;
20
- cslType?: string;
21
- docstring?: string;
22
- cslDefaultValue?: string;
23
- examples?: string[];
18
+ readonly name: string;
19
+ readonly type?: string;
20
+ readonly cslType?: string;
21
+ readonly docstring?: string;
22
+ readonly cslDefaultValue?: string;
23
+ readonly examples?: readonly string[];
24
24
  }
25
25
  export interface TabularParameter {
26
- name: string;
27
- columns: Column[];
28
- docstring?: string;
26
+ readonly name: string;
27
+ readonly columns: readonly Column[];
28
+ readonly docstring?: string;
29
29
  }
30
30
  /**
31
31
  * An input parameter either be a scalar in which case it has a name, type and
@@ -33,47 +33,47 @@ export interface TabularParameter {
33
33
  * of scalar types which are the column types.
34
34
  */
35
35
  export interface InputParameter extends ScalarParameter {
36
- columns?: ScalarParameter[];
36
+ readonly columns?: ScalarParameter[];
37
37
  }
38
38
  export interface Function {
39
- name: string;
40
- body: string;
41
- inputParameters: InputParameter[];
42
- docstring?: string;
39
+ readonly name: string;
40
+ readonly body: string;
41
+ readonly inputParameters: readonly InputParameter[];
42
+ readonly docstring?: string;
43
43
  }
44
44
  export interface EntityGroup {
45
- name: string;
46
- members: string[];
45
+ readonly name: string;
46
+ readonly members: readonly string[];
47
47
  }
48
48
  export interface Database {
49
- name: string;
50
- alternateName?: string;
51
- tables: Table[];
52
- functions: Function[];
53
- entityGroups: EntityGroup[];
54
- majorVersion: number;
55
- minorVersion: number;
49
+ readonly name: string;
50
+ readonly alternateName?: string;
51
+ readonly tables: readonly Table[];
52
+ readonly functions: readonly Function[];
53
+ readonly entityGroups: readonly EntityGroup[];
54
+ readonly majorVersion: number;
55
+ readonly minorVersion: number;
56
56
  }
57
57
  export type ClusterType = 'Engine' | 'DataManagement' | 'ClusterManager';
58
58
  export interface EngineSchema {
59
- clusterType: 'Engine';
60
- cluster: {
61
- connectionString: string;
62
- databases: Database[];
59
+ readonly clusterType: 'Engine';
60
+ readonly cluster: {
61
+ readonly connectionString: string;
62
+ readonly databases: readonly Database[];
63
63
  };
64
- database: Database | undefined;
65
- globalScalarParameters?: ScalarParameter[];
66
- globalTabularParameters?: TabularParameter[];
64
+ readonly database: Database | undefined;
65
+ readonly globalScalarParameters?: readonly ScalarParameter[];
66
+ readonly globalTabularParameters?: readonly TabularParameter[];
67
67
  }
68
68
  export type TableEntityType = 'Table' | 'ExternalTable' | 'MaterializedViewTable';
69
69
  export interface ClusterMangerSchema {
70
- clusterType: 'ClusterManager';
71
- accounts: string[];
72
- services: string[];
73
- connectionString: string;
70
+ readonly clusterType: 'ClusterManager';
71
+ readonly accounts: readonly string[];
72
+ readonly services: readonly string[];
73
+ readonly connectionString: string;
74
74
  }
75
75
  export interface DataManagementSchema {
76
- clusterType: 'DataManagement';
76
+ readonly clusterType: 'DataManagement';
77
77
  }
78
78
  /**
79
79
  * Schema types:
@@ -86,71 +86,71 @@ export declare const getCslTypeNameFromClrType: (clrType: string) => string;
86
86
  export declare const getEntityDataTypeFromCslType: (cslType: string) => string;
87
87
  export declare const getCallName: (fn: Function) => string;
88
88
  export declare const getExpression: (fn: Function) => string;
89
- export declare const getInputParametersAsCslString: (inputParameters: InputParameter[]) => any;
89
+ export declare const getInputParametersAsCslString: (inputParameters: readonly InputParameter[]) => any;
90
90
  /**
91
91
  * This is the schema of the output of kusto command
92
92
  * .show schema as json
93
93
  */
94
94
  export declare namespace showSchema {
95
95
  interface Column {
96
- Name: string;
97
- Type: string;
98
- CslType: string;
99
- DocString?: string;
100
- Examples?: string[];
96
+ readonly Name: string;
97
+ readonly Type: string;
98
+ readonly CslType: string;
99
+ readonly DocString?: string;
100
+ readonly Examples?: readonly string[];
101
101
  }
102
102
  interface Table {
103
- Name: string;
104
- EntityType: TableEntityType;
105
- OrderedColumns: Column[];
106
- DocString?: string;
103
+ readonly Name: string;
104
+ readonly EntityType: TableEntityType;
105
+ readonly OrderedColumns: readonly Column[];
106
+ readonly DocString?: string;
107
107
  }
108
108
  interface Tables {
109
- [tableName: string]: Table;
109
+ readonly [tableName: string]: Table;
110
110
  }
111
111
  interface ScalarParameter {
112
- Name: string;
113
- Type?: string;
114
- CslType?: string;
115
- DocString?: string;
116
- CslDefaultValue?: string;
112
+ readonly Name: string;
113
+ readonly Type?: string;
114
+ readonly CslType?: string;
115
+ readonly DocString?: string;
116
+ readonly CslDefaultValue?: string;
117
117
  }
118
118
  interface TabularParameter {
119
- Name: string;
120
- Columns: Column[];
121
- DocString?: string;
119
+ readonly Name: string;
120
+ readonly Columns: readonly Column[];
121
+ readonly DocString?: string;
122
+ }
123
+ interface InputParameter extends ScalarParameter {
124
+ readonly Columns?: readonly ScalarParameter[];
122
125
  }
123
- type InputParameter = ScalarParameter & {
124
- Columns?: ScalarParameter[];
125
- };
126
126
  interface Function {
127
- Name: string;
128
- InputParameters: InputParameter[];
129
- Body: string;
130
- Folder: string;
131
- DocString: string;
132
- FunctionKind: string;
133
- OutputColumns: any[];
127
+ readonly Name: string;
128
+ readonly InputParameters: readonly InputParameter[];
129
+ readonly Body: string;
130
+ readonly Folder: string;
131
+ readonly DocString: string;
132
+ readonly FunctionKind: string;
133
+ readonly OutputColumns: readonly any[];
134
134
  }
135
135
  interface Functions {
136
- [functionName: string]: Function;
136
+ readonly [functionName: string]: Function;
137
137
  }
138
138
  interface Database {
139
- Name: string;
140
- Tables: Tables;
141
- ExternalTables: Tables;
142
- MaterializedViews: Table;
143
- EntityGroups: Record<string, string[]>;
144
- MajorVersion: number;
145
- MinorVersion: number;
146
- Functions: Functions;
147
- DatabaseAccessMode: string;
139
+ readonly Name: string;
140
+ readonly Tables: Tables;
141
+ readonly ExternalTables: Tables;
142
+ readonly MaterializedViews: Table;
143
+ readonly EntityGroups: Readonly<Record<string, readonly string[]>>;
144
+ readonly MajorVersion: number;
145
+ readonly MinorVersion: number;
146
+ readonly Functions: Functions;
147
+ readonly DatabaseAccessMode: string;
148
148
  }
149
149
  interface Databases {
150
- [dbName: string]: Database;
150
+ readonly [dbName: string]: Database;
151
151
  }
152
152
  interface Result {
153
- Plugins: Plugin[];
154
- Databases: Databases;
153
+ readonly Plugins: readonly unknown[];
154
+ readonly Databases: Databases;
155
155
  }
156
156
  }
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 10.0.8(134ff03184264a9900737e4b5cf93f69540e1c8e)
3
+ * monaco-kusto version: 10.0.10(67c6016410fef559024cfe9456a1f53d2e3ba1d7)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -0,0 +1,3 @@
1
+ export type Mutable<T> = {
2
+ -readonly [P in keyof T]: T[P];
3
+ };
@@ -0,0 +1 @@
1
+ export {};