qlue-ls 0.5.4 → 0.5.6

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  "Ioannis Nezis <ioannis@nezis.de>"
6
6
  ],
7
7
  "description": "A formatter for SPARQL queries",
8
- "version": "0.5.4",
8
+ "version": "0.5.6",
9
9
  "license": "SEE LICENSE IN LICENSE",
10
10
  "repository": {
11
11
  "type": "git",
package/qlue_ls.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function determine_operation_type(text: string): string;
4
- export function format_raw(text: string): string;
5
3
  export function init_language_server(writer: WritableStreamDefaultWriter): Server;
4
+ export function format_raw(text: string): string;
5
+ export function determine_operation_type(text: string): string;
6
6
  export function get_parse_tree(input: string, offset: number): any;
7
7
  export class Server {
8
8
  private constructor();
package/qlue_ls_bg.js CHANGED
@@ -43,77 +43,10 @@ function isLikeNone(x) {
43
43
  return x === undefined || x === null;
44
44
  }
45
45
 
46
- let WASM_VECTOR_LEN = 0;
47
-
48
- const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
49
-
50
- let cachedTextEncoder = new lTextEncoder('utf-8');
51
-
52
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
53
- ? function (arg, view) {
54
- return cachedTextEncoder.encodeInto(arg, view);
55
- }
56
- : function (arg, view) {
57
- const buf = cachedTextEncoder.encode(arg);
58
- view.set(buf);
59
- return {
60
- read: arg.length,
61
- written: buf.length
62
- };
63
- });
64
-
65
- function passStringToWasm0(arg, malloc, realloc) {
66
-
67
- if (realloc === undefined) {
68
- const buf = cachedTextEncoder.encode(arg);
69
- const ptr = malloc(buf.length, 1) >>> 0;
70
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
71
- WASM_VECTOR_LEN = buf.length;
72
- return ptr;
73
- }
74
-
75
- let len = arg.length;
76
- let ptr = malloc(len, 1) >>> 0;
77
-
78
- const mem = getUint8ArrayMemory0();
79
-
80
- let offset = 0;
81
-
82
- for (; offset < len; offset++) {
83
- const code = arg.charCodeAt(offset);
84
- if (code > 0x7F) break;
85
- mem[ptr + offset] = code;
86
- }
87
-
88
- if (offset !== len) {
89
- if (offset !== 0) {
90
- arg = arg.slice(offset);
91
- }
92
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
93
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
94
- const ret = encodeString(arg, view);
95
-
96
- offset += ret.written;
97
- ptr = realloc(ptr, len, offset, 1) >>> 0;
98
- }
99
-
100
- WASM_VECTOR_LEN = offset;
101
- return ptr;
102
- }
103
-
104
- let cachedDataViewMemory0 = null;
105
-
106
- function getDataViewMemory0() {
107
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
108
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
109
- }
110
- return cachedDataViewMemory0;
111
- }
112
-
113
46
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
114
47
  ? { register: () => {}, unregister: () => {} }
115
48
  : new FinalizationRegistry(state => {
116
- wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
49
+ wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b)
117
50
  });
118
51
 
119
52
  function makeMutClosure(arg0, arg1, dtor, f) {
@@ -129,7 +62,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
129
62
  return f(a, state.b, ...args);
130
63
  } finally {
131
64
  if (--state.cnt === 0) {
132
- wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
65
+ wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
133
66
  CLOSURE_DTORS.unregister(state);
134
67
  } else {
135
68
  state.a = a;
@@ -206,6 +139,81 @@ function debugString(val) {
206
139
  return className;
207
140
  }
208
141
 
142
+ let WASM_VECTOR_LEN = 0;
143
+
144
+ const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
145
+
146
+ let cachedTextEncoder = new lTextEncoder('utf-8');
147
+
148
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
149
+ ? function (arg, view) {
150
+ return cachedTextEncoder.encodeInto(arg, view);
151
+ }
152
+ : function (arg, view) {
153
+ const buf = cachedTextEncoder.encode(arg);
154
+ view.set(buf);
155
+ return {
156
+ read: arg.length,
157
+ written: buf.length
158
+ };
159
+ });
160
+
161
+ function passStringToWasm0(arg, malloc, realloc) {
162
+
163
+ if (realloc === undefined) {
164
+ const buf = cachedTextEncoder.encode(arg);
165
+ const ptr = malloc(buf.length, 1) >>> 0;
166
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
167
+ WASM_VECTOR_LEN = buf.length;
168
+ return ptr;
169
+ }
170
+
171
+ let len = arg.length;
172
+ let ptr = malloc(len, 1) >>> 0;
173
+
174
+ const mem = getUint8ArrayMemory0();
175
+
176
+ let offset = 0;
177
+
178
+ for (; offset < len; offset++) {
179
+ const code = arg.charCodeAt(offset);
180
+ if (code > 0x7F) break;
181
+ mem[ptr + offset] = code;
182
+ }
183
+
184
+ if (offset !== len) {
185
+ if (offset !== 0) {
186
+ arg = arg.slice(offset);
187
+ }
188
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
189
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
190
+ const ret = encodeString(arg, view);
191
+
192
+ offset += ret.written;
193
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
194
+ }
195
+
196
+ WASM_VECTOR_LEN = offset;
197
+ return ptr;
198
+ }
199
+
200
+ let cachedDataViewMemory0 = null;
201
+
202
+ function getDataViewMemory0() {
203
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
204
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
205
+ }
206
+ return cachedDataViewMemory0;
207
+ }
208
+ /**
209
+ * @param {WritableStreamDefaultWriter} writer
210
+ * @returns {Server}
211
+ */
212
+ export function init_language_server(writer) {
213
+ const ret = wasm.init_language_server(writer);
214
+ return Server.__wrap(ret);
215
+ }
216
+
209
217
  function takeFromExternrefTable0(idx) {
210
218
  const value = wasm.__wbindgen_export_2.get(idx);
211
219
  wasm.__externref_table_dealloc(idx);
@@ -215,13 +223,13 @@ function takeFromExternrefTable0(idx) {
215
223
  * @param {string} text
216
224
  * @returns {string}
217
225
  */
218
- export function determine_operation_type(text) {
226
+ export function format_raw(text) {
219
227
  let deferred3_0;
220
228
  let deferred3_1;
221
229
  try {
222
230
  const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
223
231
  const len0 = WASM_VECTOR_LEN;
224
- const ret = wasm.determine_operation_type(ptr0, len0);
232
+ const ret = wasm.format_raw(ptr0, len0);
225
233
  var ptr2 = ret[0];
226
234
  var len2 = ret[1];
227
235
  if (ret[3]) {
@@ -240,13 +248,13 @@ export function determine_operation_type(text) {
240
248
  * @param {string} text
241
249
  * @returns {string}
242
250
  */
243
- export function format_raw(text) {
251
+ export function determine_operation_type(text) {
244
252
  let deferred3_0;
245
253
  let deferred3_1;
246
254
  try {
247
255
  const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
248
256
  const len0 = WASM_VECTOR_LEN;
249
- const ret = wasm.format_raw(ptr0, len0);
257
+ const ret = wasm.determine_operation_type(ptr0, len0);
250
258
  var ptr2 = ret[0];
251
259
  var len2 = ret[1];
252
260
  if (ret[3]) {
@@ -261,15 +269,6 @@ export function format_raw(text) {
261
269
  }
262
270
  }
263
271
 
264
- /**
265
- * @param {WritableStreamDefaultWriter} writer
266
- * @returns {Server}
267
- */
268
- export function init_language_server(writer) {
269
- const ret = wasm.init_language_server(writer);
270
- return Server.__wrap(ret);
271
- }
272
-
273
272
  /**
274
273
  * @param {string} input
275
274
  * @param {number} offset
@@ -283,15 +282,13 @@ export function get_parse_tree(input, offset) {
283
282
  }
284
283
 
285
284
  function __wbg_adapter_24(arg0, arg1, arg2) {
286
- wasm.closure561_externref_shim(arg0, arg1, arg2);
285
+ wasm.closure272_externref_shim(arg0, arg1, arg2);
287
286
  }
288
287
 
289
- function __wbg_adapter_86(arg0, arg1, arg2, arg3) {
290
- wasm.closure573_externref_shim(arg0, arg1, arg2, arg3);
288
+ function __wbg_adapter_62(arg0, arg1, arg2, arg3) {
289
+ wasm.closure284_externref_shim(arg0, arg1, arg2, arg3);
291
290
  }
292
291
 
293
- const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
294
-
295
292
  const ServerFinalization = (typeof FinalizationRegistry === 'undefined')
296
293
  ? { register: () => {}, unregister: () => {} }
297
294
  : new FinalizationRegistry(ptr => wasm.__wbg_server_free(ptr >>> 0, 1));
@@ -349,36 +346,15 @@ export function __wbg_error_80de38b3f7cc3c3c(arg0, arg1, arg2, arg3) {
349
346
  console.error(arg0, arg1, arg2, arg3);
350
347
  };
351
348
 
352
- export function __wbg_fetch_509096533071c657(arg0, arg1) {
353
- const ret = arg0.fetch(arg1);
354
- return ret;
355
- };
356
-
357
349
  export function __wbg_get_67b2ba62fc30de12() { return handleError(function (arg0, arg1) {
358
350
  const ret = Reflect.get(arg0, arg1);
359
351
  return ret;
360
352
  }, arguments) };
361
353
 
362
- export function __wbg_headers_7852a8ea641c1379(arg0) {
363
- const ret = arg0.headers;
364
- return ret;
365
- };
366
-
367
354
  export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
368
355
  console.info(arg0, arg1, arg2, arg3);
369
356
  };
370
357
 
371
- export function __wbg_instanceof_Response_f2cc20d9f7dfd644(arg0) {
372
- let result;
373
- try {
374
- result = arg0 instanceof Response;
375
- } catch (_) {
376
- result = false;
377
- }
378
- const ret = result;
379
- return ret;
380
- };
381
-
382
358
  export function __wbg_log_cad59bb680daec67(arg0, arg1, arg2, arg3) {
383
359
  console.log(arg0, arg1, arg2, arg3);
384
360
  };
@@ -390,7 +366,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
390
366
  const a = state0.a;
391
367
  state0.a = 0;
392
368
  try {
393
- return __wbg_adapter_86(a, state0.b, arg0, arg1);
369
+ return __wbg_adapter_62(a, state0.b, arg0, arg1);
394
370
  } finally {
395
371
  state0.a = a;
396
372
  }
@@ -417,16 +393,6 @@ export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
417
393
  return ret;
418
394
  };
419
395
 
420
- export function __wbg_newwithstrandinit_06c535e0a867c635() { return handleError(function (arg0, arg1, arg2) {
421
- const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
422
- return ret;
423
- }, arguments) };
424
-
425
- export function __wbg_ok_3aaf32d069979723(arg0) {
426
- const ret = arg0.ok;
427
- return ret;
428
- };
429
-
430
396
  export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
431
397
  const ret = arg0.push(arg1);
432
398
  return ret;
@@ -451,27 +417,11 @@ export function __wbg_resolve_4851785c9c5f573d(arg0) {
451
417
  return ret;
452
418
  };
453
419
 
454
- export function __wbg_set_11cd83f45504cedf() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
455
- arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
456
- }, arguments) };
457
-
458
420
  export function __wbg_set_bb8cecf6a62b9f46() { return handleError(function (arg0, arg1, arg2) {
459
421
  const ret = Reflect.set(arg0, arg1, arg2);
460
422
  return ret;
461
423
  }, arguments) };
462
424
 
463
- export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
464
- arg0.body = arg1;
465
- };
466
-
467
- export function __wbg_setmethod_3c5280fe5d890842(arg0, arg1, arg2) {
468
- arg0.method = getStringFromWasm0(arg1, arg2);
469
- };
470
-
471
- export function __wbg_setmode_5dc300b865044b65(arg0, arg1) {
472
- arg0.mode = __wbindgen_enum_RequestMode[arg1];
473
- };
474
-
475
425
  export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
476
426
  const ret = typeof global === 'undefined' ? null : global;
477
427
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
@@ -492,24 +442,6 @@ export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
492
442
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
493
443
  };
494
444
 
495
- export function __wbg_statusText_207754230b39e67c(arg0, arg1) {
496
- const ret = arg1.statusText;
497
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
498
- const len1 = WASM_VECTOR_LEN;
499
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
500
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
501
- };
502
-
503
- export function __wbg_status_f6360336ca686bf0(arg0) {
504
- const ret = arg0.status;
505
- return ret;
506
- };
507
-
508
- export function __wbg_text_7805bea50de2af49() { return handleError(function (arg0) {
509
- const ret = arg0.text();
510
- return ret;
511
- }, arguments) };
512
-
513
445
  export function __wbg_then_44b73946d2fb3e7d(arg0, arg1) {
514
446
  const ret = arg0.then(arg1);
515
447
  return ret;
@@ -545,8 +477,8 @@ export function __wbindgen_cb_drop(arg0) {
545
477
  return ret;
546
478
  };
547
479
 
548
- export function __wbindgen_closure_wrapper5243(arg0, arg1, arg2) {
549
- const ret = makeMutClosure(arg0, arg1, 562, __wbg_adapter_24);
480
+ export function __wbindgen_closure_wrapper3521(arg0, arg1, arg2) {
481
+ const ret = makeMutClosure(arg0, arg1, 273, __wbg_adapter_24);
550
482
  return ret;
551
483
  };
552
484
 
package/qlue_ls_bg.wasm CHANGED
Binary file