@kusto/monaco-kusto 14.0.0 → 14.1.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/README.md +85 -14
- package/package.json +2 -2
- package/release/dev/Kusto.Language.Bridge.min.js +300 -299
- package/release/dev/kustoMode.js +2 -2
- package/release/dev/kustoWorker.js +25 -5
- package/release/dev/{main-0c9da73f.js → main-374ffef1.js} +2 -2
- package/release/dev/monaco.contribution.js +2 -2
- package/release/dev/{schema-f22af8ab.js → schema-778d43e4.js} +2 -2
- package/release/dev/{types-b5d705d0.js → types-330e461e.js} +2 -2
- package/release/esm/{globals-cc147acb.js → globals-bfe000bf.js} +1 -1
- package/release/esm/kusto.worker.js +23 -5
- package/release/esm/kustoMode.js +2 -2
- package/release/esm/languageServiceManager/kustoLanguageService.js +19 -2
- package/release/esm/languageServiceManager/schema.d.ts +18 -0
- package/release/esm/monaco.contribution.js +4 -4
- package/release/esm/{schema-3165ad55.js → schema-9bf4386b.js} +1 -1
- package/release/min/Kusto.Language.Bridge.min.js +300 -299
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +4 -4
- package/release/min/{main-dd497f63.js → main-f8f8d919.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/{schema-3ad9e39b.js → schema-d1f6d06d.js} +2 -2
- package/release/min/{types-ab5d5bb2.js → types-5ec10ded.js} +2 -2
package/README.md
CHANGED
|
@@ -56,6 +56,24 @@ There are 2 APIs to set a Kusto schema:
|
|
|
56
56
|
interface `Result` in `schema.ts`), so when this method is used, it also
|
|
57
57
|
requires a cluster URI and the name of the database in context.
|
|
58
58
|
|
|
59
|
+
### Schema Parsing Flow
|
|
60
|
+
|
|
61
|
+
The schema parsing process in Monaco-Kusto involves several components, starting from the Kusto command and ending with language features in the editor. Here is how the flow works:
|
|
62
|
+
|
|
63
|
+
Below is a diagram illustrating the schema parsing flow:
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+
## Getting Started: Running the Local Demo App
|
|
68
|
+
|
|
69
|
+
To quickly try Monaco-Kusto locally, run the following command from the `package` folder:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
yarn start
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This will start a local development server and open the demo app at http://localhost:7777.
|
|
76
|
+
|
|
59
77
|
## Contributing
|
|
60
78
|
|
|
61
79
|
Every PR should come with a test that checks it.
|
|
@@ -89,8 +107,75 @@ Every PR should come with a test that checks it.
|
|
|
89
107
|
> Before running `yarn test:it` or `yarn test:it:watch`, first run `yarn test:it:serve`.
|
|
90
108
|
> These scripts (`test:it` and `test:it:watch`) do **not** automatically rebuild the project, so running the server ensures your latest code is tested.
|
|
91
109
|
|
|
110
|
+
## Running Monaco-Kusto Locally in Azure-Kusto-WebUX
|
|
111
|
+
|
|
112
|
+
To run monaco-kusto locally inside the Azure-Kusto-WebUX project (which should exist outside this project folder with the original project name `Azure-Kusto-WebUX`), you can use the provided script:
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
./debug-monaco-kusto.sh
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Script Modes: KustoWeb and Fabric
|
|
119
|
+
|
|
120
|
+
There are two ways to run the script:
|
|
121
|
+
|
|
122
|
+
- **KustoWeb (default):** The script is currently set up to run the `kustoweb` app inside Azure-Kusto-WebUX. This is the default behavior.
|
|
123
|
+
- **Fabric:** To run the Fabric app instead, simply comment out the Step 4 section for KustoWeb and uncomment the Step 4 section for Fabric in `debug-monaco-kusto.sh`.
|
|
124
|
+
|
|
125
|
+
This allows you to easily switch between running KustoWeb and Fabric for local development.
|
|
126
|
+
|
|
127
|
+
### Project Structure Requirements
|
|
128
|
+
|
|
129
|
+
For the debug-monaco-kusto.sh script to work, ensure that your project structure resembles the following, with both `monaco-kusto` and `Azure-Kusto-WebUX` as sibling folders:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
/your-workspace-root
|
|
133
|
+
|-- monaco-kusto
|
|
134
|
+
| |-- ...
|
|
135
|
+
| |-- debug-monaco-kusto.sh
|
|
136
|
+
| |-- ...
|
|
137
|
+
|
|
|
138
|
+
|-- Azure-Kusto-WebUX
|
|
139
|
+
`-- ...
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The important part is that the `Azure-Kusto-WebUX` folder is a sibling to `monaco-kusto`, and that its `node_modules` folder and `package.json` file are at its root. The script relies on this structure to copy files and run the correct build steps.
|
|
143
|
+
|
|
144
|
+
## Architecture Overview
|
|
145
|
+
|
|
146
|
+
This section provides a high-level overview of the main files and their responsibilities in the project.
|
|
147
|
+
|
|
148
|
+

|
|
149
|
+
|
|
150
|
+
- **`monaco.contribution`**
|
|
151
|
+
Declares and exports the Kusto language as a Monaco Editor contribution, making it available for registration and use externally.
|
|
152
|
+
|
|
153
|
+
- **`kustoMode`** Sets up and registers the Kusto language in Monaco Editor, wiring together language features, workers, and configuration.
|
|
154
|
+
|
|
155
|
+
- **`workerManager`** Manages the lifecycle and communication with web workers that run language services in the background.
|
|
156
|
+
|
|
157
|
+
- **`kustoWorker`** Implements the actual worker logic, handling requests for language features from the main thread.
|
|
158
|
+
|
|
159
|
+
- **`kustoLanguageService`**
|
|
160
|
+
Implements the core logic for Kusto language features such as parsing, validation, and providing language intelligence (completion, diagnostics, etc.).
|
|
161
|
+
Uses the `language-service-next` library, which was originally created in C# and migrated to TypeScript using bridgejs.
|
|
162
|
+
|
|
163
|
+
- **`languageFeatures`**
|
|
164
|
+
Contains adapters and implementations for Monaco Editor language features (completion, hover, formatting, folding, etc.) specific to Kusto.
|
|
165
|
+
|
|
166
|
+
- **`monacoInstance`**
|
|
167
|
+
Represents the Monaco Editor instance itself. It is responsible for editor creation, configuration, and interaction with the registered Kusto language features.
|
|
168
|
+
|
|
92
169
|
## Changelog
|
|
93
170
|
|
|
171
|
+
### 14.1.0
|
|
172
|
+
|
|
173
|
+
- feat: support graph schema
|
|
174
|
+
|
|
175
|
+
### 14.0.1
|
|
176
|
+
|
|
177
|
+
- chore: Update @kusto/language-service-next upgrade to 12.2.0
|
|
178
|
+
|
|
94
179
|
## 14.0.0
|
|
95
180
|
|
|
96
181
|
- feat: Add maximumDepthExceeded result kind to getReferencedGlobalParams
|
|
@@ -1010,17 +1095,3 @@ Every PR should come with a test that checks it.
|
|
|
1010
1095
|
#### Bug fixes
|
|
1011
1096
|
|
|
1012
1097
|
- setSchema does not update syntax highlighting
|
|
1013
|
-
|
|
1014
|
-
# Contributing
|
|
1015
|
-
|
|
1016
|
-
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
|
1017
|
-
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
|
1018
|
-
the rights to use your contribution. For details, visit https://cla.microsoft.com.
|
|
1019
|
-
|
|
1020
|
-
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
|
|
1021
|
-
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
|
|
1022
|
-
provided by the bot. You will only need to do this once across all repos using our CLA.
|
|
1023
|
-
|
|
1024
|
-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
|
1025
|
-
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
|
1026
|
-
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kusto/monaco-kusto",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "CSL, KQL plugin for the Monaco Editor",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Microsoft"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@kusto/language-service": "0.0.285",
|
|
80
|
-
"@kusto/language-service-next": "12.
|
|
80
|
+
"@kusto/language-service-next": "12.2.0",
|
|
81
81
|
"lodash-es": "^4.17.21",
|
|
82
82
|
"vscode-languageserver-types": "^3.17.4",
|
|
83
83
|
"xregexp": "^5.1.1"
|