qlue-ls 0.7.0 → 0.7.2

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 CHANGED
@@ -88,27 +88,29 @@ Customizable options to align with preferred query styles are also implemented.
88
88
 
89
89
  **Status**: Partial support
90
90
 
91
+ Diagnostics provide feadback on the query.
92
+ Diagnostics come in severity: error, warning and info
93
+
91
94
  ** provided diagnostics**:
92
95
 
93
- | Type | Name | Description |
94
- |:------------|:-----------------|:------------------------------|
95
- | ❌ error | undefined prefix | a used prefix is not declared |
96
- | ⚠️ warning | unused prefix | a declared prefix is not used |
97
- | ℹ️ info | uncompacted uri | a raw uncompacted uri is used |
96
+ | Type | Name | Description |
97
+ |:------------|:----------------------------|:---------------------------------|
98
+ | ❌ error | undefined prefix | a used prefix is not declared |
99
+ | error | ungrouped select variable | selected variable is not grouped |
100
+ | ❌ error | invalid projection variable | projection variable is taken |
101
+ | ⚠️ warning | unused prefix | a declared prefix is not used |
102
+ | ℹ️ info | uncompacted uri | a raw uncompacted uri is used |
98
103
 
99
104
  ## ✨ Completion
100
105
 
101
- **Status**: Partial support
106
+ **Status**: Full support
102
107
 
103
- I split auto-completion into 3 stages:
108
+ Completion provides suggestions how the query could continue.
104
109
 
105
- 1. Static (Keywords, constructs, ...)
106
- 2. Dynamic offline (local defined variables)
107
- 3. Dynamic online (with data from a knowledge-graph)
110
+ For completion of subjects, predicates or objects the language server sends
111
+ completion-queries to the backend and gets the completions from the knowledge-graph.
108
112
 
109
- The implementation is in Stage 2.8.
110
- Dynamic online completion works!
111
- At the moment the context is limited to the Tripple the completion is requested from. Next step is to introduce full context sensitivity.
113
+ **These completion queries have to be configured for each knowledge-graph.**
112
114
 
113
115
  ## 🛠️ Code Actions
114
116
 
@@ -174,50 +176,29 @@ Here is a quick guide to set this project up for development.
174
176
 
175
177
  You will only have to do this once.
176
178
 
177
- ### install node dependencies
179
+ In the `justfile` and `Makefile` you will find the target `init_dev`, run it:
178
180
 
179
181
  ```bash
180
- cd editor
181
- npm install
182
+ just init_dev
182
183
  ```
183
184
 
184
- ### build wasm & bindings
185
-
186
- If you have [just](https://github.com/casey/just) installed:
185
+ or
187
186
 
188
187
  ```bash
189
- just build-wasm
188
+ make init_dev
190
189
  ```
191
190
 
192
- If you have [make](https://wiki.ubuntuusers.de/Makefile/) installed:
193
-
194
- ```bash
195
- make wasm
196
- ```
191
+ It will:
192
+ - install node dependencies
193
+ - build wasm binaries
194
+ - link against local packages
195
+ - run the vite dev server
197
196
 
198
197
  If you don't have [just](https://github.com/casey/just) or [make](https://wiki.ubuntuusers.de/Makefile/) installed:
199
198
 
200
199
  **Install [just](https://github.com/casey/just)**
201
200
 
202
201
 
203
- ### link against local packages
204
-
205
- ```bash
206
- cd pkg
207
- npm link
208
- cd ../editor
209
- npm link qlue-ls
210
- ```
211
-
212
- ## Run application
213
-
214
- ```bash
215
- cd editor
216
- npm run dev
217
- ```
218
-
219
- Now the webapp should be running, open the browser on `localhost:5173`.
220
-
221
202
  ## Automatically rebuild on change
222
203
 
223
204
  When developping the cycle is:
@@ -245,5 +226,3 @@ have fun!
245
226
 
246
227
  * [TJ DeVries](https://github.com/tjdevries) for the inspiration and great tutorials
247
228
  * [Chris Biscardi](https://github.com/christopherbiscardi) for teaching me Rust
248
- * [GordianDziwis](https://github.com/GordianDziwis) for providing a sparql-tree-sitter grammar
249
-
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Ioannis Nezis <ioannis@nezis.de>"
6
6
  ],
7
7
  "description": "A language server for SPARQL",
8
- "version": "0.7.0",
8
+ "version": "0.7.2",
9
9
  "license": "SEE LICENSE IN LICENSE",
10
10
  "repository": {
11
11
  "type": "git",
package/qlue_ls.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function format_raw(text: string): string;
4
+ export function determine_operation_type(input: string): string;
4
5
  export function init_language_server(writer: WritableStreamDefaultWriter): Server;
5
6
  export function listen(server: Server, reader: ReadableStreamDefaultReader): Promise<void>;
6
- export function determine_operation_type(input: string): string;
7
7
  export function get_parse_tree(input: string, offset: number): any;
8
8
  export class Server {
9
9
  private constructor();
@@ -14,11 +14,11 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
14
14
 
15
15
  export interface InitOutput {
16
16
  readonly memory: WebAssembly.Memory;
17
+ readonly __wbg_server_free: (a: number, b: number) => void;
17
18
  readonly format_raw: (a: number, b: number) => [number, number, number, number];
19
+ readonly determine_operation_type: (a: number, b: number) => [number, number];
18
20
  readonly init_language_server: (a: any) => number;
19
21
  readonly listen: (a: number, b: any) => any;
20
- readonly determine_operation_type: (a: number, b: number) => [number, number];
21
- readonly __wbg_server_free: (a: number, b: number) => void;
22
22
  readonly get_parse_tree: (a: number, b: number, c: number) => any;
23
23
  readonly __wbindgen_exn_store: (a: number) => void;
24
24
  readonly __externref_table_alloc: () => number;
@@ -28,8 +28,8 @@ export interface InitOutput {
28
28
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
29
29
  readonly __wbindgen_export_6: WebAssembly.Table;
30
30
  readonly __externref_table_dealloc: (a: number) => void;
31
- readonly closure1199_externref_shim: (a: number, b: number, c: any) => void;
32
- readonly closure1567_externref_shim: (a: number, b: number, c: any, d: any) => void;
31
+ readonly closure1196_externref_shim: (a: number, b: number, c: any) => void;
32
+ readonly closure1565_externref_shim: (a: number, b: number, c: any, d: any) => void;
33
33
  readonly __wbindgen_start: () => void;
34
34
  }
35
35
 
package/qlue_ls.js CHANGED
@@ -228,6 +228,25 @@ export function format_raw(text) {
228
228
  }
229
229
  }
230
230
 
231
+ /**
232
+ * @param {string} input
233
+ * @returns {string}
234
+ */
235
+ export function determine_operation_type(input) {
236
+ let deferred2_0;
237
+ let deferred2_1;
238
+ try {
239
+ const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
240
+ const len0 = WASM_VECTOR_LEN;
241
+ const ret = wasm.determine_operation_type(ptr0, len0);
242
+ deferred2_0 = ret[0];
243
+ deferred2_1 = ret[1];
244
+ return getStringFromWasm0(ret[0], ret[1]);
245
+ } finally {
246
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
247
+ }
248
+ }
249
+
231
250
  /**
232
251
  * @param {WritableStreamDefaultWriter} writer
233
252
  * @returns {Server}
@@ -254,25 +273,6 @@ export function listen(server, reader) {
254
273
  return ret;
255
274
  }
256
275
 
257
- /**
258
- * @param {string} input
259
- * @returns {string}
260
- */
261
- export function determine_operation_type(input) {
262
- let deferred2_0;
263
- let deferred2_1;
264
- try {
265
- const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
266
- const len0 = WASM_VECTOR_LEN;
267
- const ret = wasm.determine_operation_type(ptr0, len0);
268
- deferred2_0 = ret[0];
269
- deferred2_1 = ret[1];
270
- return getStringFromWasm0(ret[0], ret[1]);
271
- } finally {
272
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
273
- }
274
- }
275
-
276
276
  /**
277
277
  * @param {string} input
278
278
  * @param {number} offset
@@ -286,11 +286,11 @@ export function get_parse_tree(input, offset) {
286
286
  }
287
287
 
288
288
  function __wbg_adapter_24(arg0, arg1, arg2) {
289
- wasm.closure1199_externref_shim(arg0, arg1, arg2);
289
+ wasm.closure1196_externref_shim(arg0, arg1, arg2);
290
290
  }
291
291
 
292
292
  function __wbg_adapter_100(arg0, arg1, arg2, arg3) {
293
- wasm.closure1567_externref_shim(arg0, arg1, arg2, arg3);
293
+ wasm.closure1565_externref_shim(arg0, arg1, arg2, arg3);
294
294
  }
295
295
 
296
296
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
@@ -571,8 +571,8 @@ function __wbg_get_imports() {
571
571
  const ret = false;
572
572
  return ret;
573
573
  };
574
- imports.wbg.__wbindgen_closure_wrapper5302 = function(arg0, arg1, arg2) {
575
- const ret = makeMutClosure(arg0, arg1, 1200, __wbg_adapter_24);
574
+ imports.wbg.__wbindgen_closure_wrapper5324 = function(arg0, arg1, arg2) {
575
+ const ret = makeMutClosure(arg0, arg1, 1197, __wbg_adapter_24);
576
576
  return ret;
577
577
  };
578
578
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
package/qlue_ls_bg.wasm CHANGED
Binary file