@astral-sh/ruff-wasm-nodejs 0.6.9 → 0.7.1
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 +1 -1
- package/ruff_wasm.d.ts +34 -38
- package/ruff_wasm.js +195 -277
- package/ruff_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/ruff_wasm.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
*/
|
|
5
3
|
export function run(): void;
|
|
6
4
|
|
|
7
5
|
export interface Diagnostic {
|
|
@@ -32,51 +30,49 @@ export interface Diagnostic {
|
|
|
32
30
|
};
|
|
33
31
|
|
|
34
32
|
|
|
35
|
-
/**
|
|
36
|
-
*/
|
|
37
33
|
export class Workspace {
|
|
38
34
|
free(): void;
|
|
39
|
-
/**
|
|
40
|
-
* @returns {string}
|
|
41
|
-
*/
|
|
35
|
+
/**
|
|
36
|
+
* @returns {string}
|
|
37
|
+
*/
|
|
42
38
|
static version(): string;
|
|
43
|
-
/**
|
|
44
|
-
* @param {any} options
|
|
45
|
-
*/
|
|
39
|
+
/**
|
|
40
|
+
* @param {any} options
|
|
41
|
+
*/
|
|
46
42
|
constructor(options: any);
|
|
47
|
-
/**
|
|
48
|
-
* @returns {any}
|
|
49
|
-
*/
|
|
43
|
+
/**
|
|
44
|
+
* @returns {any}
|
|
45
|
+
*/
|
|
50
46
|
static defaultSettings(): any;
|
|
51
|
-
/**
|
|
52
|
-
* @param {string} contents
|
|
53
|
-
* @returns {any}
|
|
54
|
-
*/
|
|
47
|
+
/**
|
|
48
|
+
* @param {string} contents
|
|
49
|
+
* @returns {any}
|
|
50
|
+
*/
|
|
55
51
|
check(contents: string): any;
|
|
56
|
-
/**
|
|
57
|
-
* @param {string} contents
|
|
58
|
-
* @returns {string}
|
|
59
|
-
*/
|
|
52
|
+
/**
|
|
53
|
+
* @param {string} contents
|
|
54
|
+
* @returns {string}
|
|
55
|
+
*/
|
|
60
56
|
format(contents: string): string;
|
|
61
|
-
/**
|
|
62
|
-
* @param {string} contents
|
|
63
|
-
* @returns {string}
|
|
64
|
-
*/
|
|
57
|
+
/**
|
|
58
|
+
* @param {string} contents
|
|
59
|
+
* @returns {string}
|
|
60
|
+
*/
|
|
65
61
|
format_ir(contents: string): string;
|
|
66
|
-
/**
|
|
67
|
-
* @param {string} contents
|
|
68
|
-
* @returns {string}
|
|
69
|
-
*/
|
|
62
|
+
/**
|
|
63
|
+
* @param {string} contents
|
|
64
|
+
* @returns {string}
|
|
65
|
+
*/
|
|
70
66
|
comments(contents: string): string;
|
|
71
|
-
/**
|
|
72
|
-
* Parses the content and returns its AST
|
|
73
|
-
* @param {string} contents
|
|
74
|
-
* @returns {string}
|
|
75
|
-
*/
|
|
67
|
+
/**
|
|
68
|
+
* Parses the content and returns its AST
|
|
69
|
+
* @param {string} contents
|
|
70
|
+
* @returns {string}
|
|
71
|
+
*/
|
|
76
72
|
parse(contents: string): string;
|
|
77
|
-
/**
|
|
78
|
-
* @param {string} contents
|
|
79
|
-
* @returns {string}
|
|
80
|
-
*/
|
|
73
|
+
/**
|
|
74
|
+
* @param {string} contents
|
|
75
|
+
* @returns {string}
|
|
76
|
+
*/
|
|
81
77
|
tokens(contents: string): string;
|
|
82
78
|
}
|
package/ruff_wasm.js
CHANGED
|
@@ -4,26 +4,6 @@ imports['__wbindgen_placeholder__'] = module.exports;
|
|
|
4
4
|
let wasm;
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
const heap = new Array(128).fill(undefined);
|
|
8
|
-
|
|
9
|
-
heap.push(undefined, null, true, false);
|
|
10
|
-
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
|
12
|
-
|
|
13
|
-
let heap_next = heap.length;
|
|
14
|
-
|
|
15
|
-
function dropObject(idx) {
|
|
16
|
-
if (idx < 132) return;
|
|
17
|
-
heap[idx] = heap_next;
|
|
18
|
-
heap_next = idx;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function takeObject(idx) {
|
|
22
|
-
const ret = getObject(idx);
|
|
23
|
-
dropObject(idx);
|
|
24
|
-
return ret;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
7
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
28
8
|
|
|
29
9
|
cachedTextDecoder.decode();
|
|
@@ -42,15 +22,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
42
22
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
43
23
|
}
|
|
44
24
|
|
|
45
|
-
function addHeapObject(obj) {
|
|
46
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
|
-
const idx = heap_next;
|
|
48
|
-
heap_next = heap[idx];
|
|
49
|
-
|
|
50
|
-
heap[idx] = obj;
|
|
51
|
-
return idx;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
25
|
function isLikeNone(x) {
|
|
55
26
|
return x === undefined || x === null;
|
|
56
27
|
}
|
|
@@ -184,25 +155,38 @@ function debugString(val) {
|
|
|
184
155
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
185
156
|
return className;
|
|
186
157
|
}
|
|
187
|
-
|
|
188
|
-
*/
|
|
158
|
+
|
|
189
159
|
module.exports.run = function() {
|
|
190
160
|
wasm.run();
|
|
191
161
|
};
|
|
192
162
|
|
|
163
|
+
function takeFromExternrefTable0(idx) {
|
|
164
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
165
|
+
wasm.__externref_table_dealloc(idx);
|
|
166
|
+
return value;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function notDefined(what) { return () => { throw new Error(`${what} is not defined`); }; }
|
|
170
|
+
|
|
171
|
+
function addToExternrefTable0(obj) {
|
|
172
|
+
const idx = wasm.__externref_table_alloc();
|
|
173
|
+
wasm.__wbindgen_export_2.set(idx, obj);
|
|
174
|
+
return idx;
|
|
175
|
+
}
|
|
176
|
+
|
|
193
177
|
function handleError(f, args) {
|
|
194
178
|
try {
|
|
195
179
|
return f.apply(this, args);
|
|
196
180
|
} catch (e) {
|
|
197
|
-
|
|
181
|
+
const idx = addToExternrefTable0(e);
|
|
182
|
+
wasm.__wbindgen_exn_store(idx);
|
|
198
183
|
}
|
|
199
184
|
}
|
|
200
185
|
|
|
201
186
|
const WorkspaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
202
187
|
? { register: () => {}, unregister: () => {} }
|
|
203
188
|
: new FinalizationRegistry(ptr => wasm.__wbg_workspace_free(ptr >>> 0, 1));
|
|
204
|
-
|
|
205
|
-
*/
|
|
189
|
+
|
|
206
190
|
class Workspace {
|
|
207
191
|
|
|
208
192
|
__destroy_into_raw() {
|
|
@@ -217,281 +201,214 @@ class Workspace {
|
|
|
217
201
|
wasm.__wbg_workspace_free(ptr, 0);
|
|
218
202
|
}
|
|
219
203
|
/**
|
|
220
|
-
|
|
221
|
-
|
|
204
|
+
* @returns {string}
|
|
205
|
+
*/
|
|
222
206
|
static version() {
|
|
223
207
|
let deferred1_0;
|
|
224
208
|
let deferred1_1;
|
|
225
209
|
try {
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
deferred1_0 = r0;
|
|
231
|
-
deferred1_1 = r1;
|
|
232
|
-
return getStringFromWasm0(r0, r1);
|
|
210
|
+
const ret = wasm.workspace_version();
|
|
211
|
+
deferred1_0 = ret[0];
|
|
212
|
+
deferred1_1 = ret[1];
|
|
213
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
233
214
|
} finally {
|
|
234
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
235
215
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
236
216
|
}
|
|
237
217
|
}
|
|
238
218
|
/**
|
|
239
|
-
|
|
240
|
-
|
|
219
|
+
* @param {any} options
|
|
220
|
+
*/
|
|
241
221
|
constructor(options) {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
246
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
247
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
248
|
-
if (r2) {
|
|
249
|
-
throw takeObject(r1);
|
|
250
|
-
}
|
|
251
|
-
this.__wbg_ptr = r0 >>> 0;
|
|
252
|
-
WorkspaceFinalization.register(this, this.__wbg_ptr, this);
|
|
253
|
-
return this;
|
|
254
|
-
} finally {
|
|
255
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
222
|
+
const ret = wasm.workspace_new(options);
|
|
223
|
+
if (ret[2]) {
|
|
224
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
256
225
|
}
|
|
226
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
227
|
+
WorkspaceFinalization.register(this, this.__wbg_ptr, this);
|
|
228
|
+
return this;
|
|
257
229
|
}
|
|
258
230
|
/**
|
|
259
|
-
|
|
260
|
-
|
|
231
|
+
* @returns {any}
|
|
232
|
+
*/
|
|
261
233
|
static defaultSettings() {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
266
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
267
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
268
|
-
if (r2) {
|
|
269
|
-
throw takeObject(r1);
|
|
270
|
-
}
|
|
271
|
-
return takeObject(r0);
|
|
272
|
-
} finally {
|
|
273
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
234
|
+
const ret = wasm.workspace_defaultSettings();
|
|
235
|
+
if (ret[2]) {
|
|
236
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
274
237
|
}
|
|
238
|
+
return takeFromExternrefTable0(ret[0]);
|
|
275
239
|
}
|
|
276
240
|
/**
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
241
|
+
* @param {string} contents
|
|
242
|
+
* @returns {any}
|
|
243
|
+
*/
|
|
280
244
|
check(contents) {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
287
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
288
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
289
|
-
if (r2) {
|
|
290
|
-
throw takeObject(r1);
|
|
291
|
-
}
|
|
292
|
-
return takeObject(r0);
|
|
293
|
-
} finally {
|
|
294
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
245
|
+
const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
246
|
+
const len0 = WASM_VECTOR_LEN;
|
|
247
|
+
const ret = wasm.workspace_check(this.__wbg_ptr, ptr0, len0);
|
|
248
|
+
if (ret[2]) {
|
|
249
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
295
250
|
}
|
|
251
|
+
return takeFromExternrefTable0(ret[0]);
|
|
296
252
|
}
|
|
297
253
|
/**
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
254
|
+
* @param {string} contents
|
|
255
|
+
* @returns {string}
|
|
256
|
+
*/
|
|
301
257
|
format(contents) {
|
|
302
258
|
let deferred3_0;
|
|
303
259
|
let deferred3_1;
|
|
304
260
|
try {
|
|
305
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
306
261
|
const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
307
262
|
const len0 = WASM_VECTOR_LEN;
|
|
308
|
-
wasm.workspace_format(
|
|
309
|
-
var
|
|
310
|
-
var
|
|
311
|
-
|
|
312
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
313
|
-
var ptr2 = r0;
|
|
314
|
-
var len2 = r1;
|
|
315
|
-
if (r3) {
|
|
263
|
+
const ret = wasm.workspace_format(this.__wbg_ptr, ptr0, len0);
|
|
264
|
+
var ptr2 = ret[0];
|
|
265
|
+
var len2 = ret[1];
|
|
266
|
+
if (ret[3]) {
|
|
316
267
|
ptr2 = 0; len2 = 0;
|
|
317
|
-
throw
|
|
268
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
318
269
|
}
|
|
319
270
|
deferred3_0 = ptr2;
|
|
320
271
|
deferred3_1 = len2;
|
|
321
272
|
return getStringFromWasm0(ptr2, len2);
|
|
322
273
|
} finally {
|
|
323
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
324
274
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
325
275
|
}
|
|
326
276
|
}
|
|
327
277
|
/**
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
278
|
+
* @param {string} contents
|
|
279
|
+
* @returns {string}
|
|
280
|
+
*/
|
|
331
281
|
format_ir(contents) {
|
|
332
282
|
let deferred3_0;
|
|
333
283
|
let deferred3_1;
|
|
334
284
|
try {
|
|
335
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
336
285
|
const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
337
286
|
const len0 = WASM_VECTOR_LEN;
|
|
338
|
-
wasm.workspace_format_ir(
|
|
339
|
-
var
|
|
340
|
-
var
|
|
341
|
-
|
|
342
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
343
|
-
var ptr2 = r0;
|
|
344
|
-
var len2 = r1;
|
|
345
|
-
if (r3) {
|
|
287
|
+
const ret = wasm.workspace_format_ir(this.__wbg_ptr, ptr0, len0);
|
|
288
|
+
var ptr2 = ret[0];
|
|
289
|
+
var len2 = ret[1];
|
|
290
|
+
if (ret[3]) {
|
|
346
291
|
ptr2 = 0; len2 = 0;
|
|
347
|
-
throw
|
|
292
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
348
293
|
}
|
|
349
294
|
deferred3_0 = ptr2;
|
|
350
295
|
deferred3_1 = len2;
|
|
351
296
|
return getStringFromWasm0(ptr2, len2);
|
|
352
297
|
} finally {
|
|
353
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
354
298
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
355
299
|
}
|
|
356
300
|
}
|
|
357
301
|
/**
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
302
|
+
* @param {string} contents
|
|
303
|
+
* @returns {string}
|
|
304
|
+
*/
|
|
361
305
|
comments(contents) {
|
|
362
306
|
let deferred3_0;
|
|
363
307
|
let deferred3_1;
|
|
364
308
|
try {
|
|
365
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
366
309
|
const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
367
310
|
const len0 = WASM_VECTOR_LEN;
|
|
368
|
-
wasm.workspace_comments(
|
|
369
|
-
var
|
|
370
|
-
var
|
|
371
|
-
|
|
372
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
373
|
-
var ptr2 = r0;
|
|
374
|
-
var len2 = r1;
|
|
375
|
-
if (r3) {
|
|
311
|
+
const ret = wasm.workspace_comments(this.__wbg_ptr, ptr0, len0);
|
|
312
|
+
var ptr2 = ret[0];
|
|
313
|
+
var len2 = ret[1];
|
|
314
|
+
if (ret[3]) {
|
|
376
315
|
ptr2 = 0; len2 = 0;
|
|
377
|
-
throw
|
|
316
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
378
317
|
}
|
|
379
318
|
deferred3_0 = ptr2;
|
|
380
319
|
deferred3_1 = len2;
|
|
381
320
|
return getStringFromWasm0(ptr2, len2);
|
|
382
321
|
} finally {
|
|
383
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
384
322
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
385
323
|
}
|
|
386
324
|
}
|
|
387
325
|
/**
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
326
|
+
* Parses the content and returns its AST
|
|
327
|
+
* @param {string} contents
|
|
328
|
+
* @returns {string}
|
|
329
|
+
*/
|
|
392
330
|
parse(contents) {
|
|
393
331
|
let deferred3_0;
|
|
394
332
|
let deferred3_1;
|
|
395
333
|
try {
|
|
396
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
397
334
|
const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
398
335
|
const len0 = WASM_VECTOR_LEN;
|
|
399
|
-
wasm.workspace_parse(
|
|
400
|
-
var
|
|
401
|
-
var
|
|
402
|
-
|
|
403
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
404
|
-
var ptr2 = r0;
|
|
405
|
-
var len2 = r1;
|
|
406
|
-
if (r3) {
|
|
336
|
+
const ret = wasm.workspace_parse(this.__wbg_ptr, ptr0, len0);
|
|
337
|
+
var ptr2 = ret[0];
|
|
338
|
+
var len2 = ret[1];
|
|
339
|
+
if (ret[3]) {
|
|
407
340
|
ptr2 = 0; len2 = 0;
|
|
408
|
-
throw
|
|
341
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
409
342
|
}
|
|
410
343
|
deferred3_0 = ptr2;
|
|
411
344
|
deferred3_1 = len2;
|
|
412
345
|
return getStringFromWasm0(ptr2, len2);
|
|
413
346
|
} finally {
|
|
414
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
415
347
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
416
348
|
}
|
|
417
349
|
}
|
|
418
350
|
/**
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
351
|
+
* @param {string} contents
|
|
352
|
+
* @returns {string}
|
|
353
|
+
*/
|
|
422
354
|
tokens(contents) {
|
|
423
355
|
let deferred3_0;
|
|
424
356
|
let deferred3_1;
|
|
425
357
|
try {
|
|
426
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
427
358
|
const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
428
359
|
const len0 = WASM_VECTOR_LEN;
|
|
429
|
-
wasm.workspace_tokens(
|
|
430
|
-
var
|
|
431
|
-
var
|
|
432
|
-
|
|
433
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
434
|
-
var ptr2 = r0;
|
|
435
|
-
var len2 = r1;
|
|
436
|
-
if (r3) {
|
|
360
|
+
const ret = wasm.workspace_tokens(this.__wbg_ptr, ptr0, len0);
|
|
361
|
+
var ptr2 = ret[0];
|
|
362
|
+
var len2 = ret[1];
|
|
363
|
+
if (ret[3]) {
|
|
437
364
|
ptr2 = 0; len2 = 0;
|
|
438
|
-
throw
|
|
365
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
439
366
|
}
|
|
440
367
|
deferred3_0 = ptr2;
|
|
441
368
|
deferred3_1 = len2;
|
|
442
369
|
return getStringFromWasm0(ptr2, len2);
|
|
443
370
|
} finally {
|
|
444
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
445
371
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
446
372
|
}
|
|
447
373
|
}
|
|
448
374
|
}
|
|
449
375
|
module.exports.Workspace = Workspace;
|
|
450
376
|
|
|
451
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
452
|
-
takeObject(arg0);
|
|
453
|
-
};
|
|
454
|
-
|
|
455
377
|
module.exports.__wbindgen_is_string = function(arg0) {
|
|
456
|
-
const ret = typeof(
|
|
378
|
+
const ret = typeof(arg0) === 'string';
|
|
457
379
|
return ret;
|
|
458
380
|
};
|
|
459
381
|
|
|
460
382
|
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
461
383
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
462
|
-
return
|
|
384
|
+
return ret;
|
|
463
385
|
};
|
|
464
386
|
|
|
465
387
|
module.exports.__wbindgen_as_number = function(arg0) {
|
|
466
|
-
const ret = +
|
|
388
|
+
const ret = +arg0;
|
|
467
389
|
return ret;
|
|
468
390
|
};
|
|
469
391
|
|
|
470
|
-
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
471
|
-
const ret = getObject(arg0);
|
|
472
|
-
return addHeapObject(ret);
|
|
473
|
-
};
|
|
474
|
-
|
|
475
392
|
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
476
|
-
const v =
|
|
393
|
+
const v = arg0;
|
|
477
394
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
478
395
|
return ret;
|
|
479
396
|
};
|
|
480
397
|
|
|
481
398
|
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
482
|
-
const ret = typeof(
|
|
399
|
+
const ret = typeof(arg0) === 'bigint';
|
|
483
400
|
return ret;
|
|
484
401
|
};
|
|
485
402
|
|
|
486
403
|
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
487
|
-
const obj =
|
|
404
|
+
const obj = arg1;
|
|
488
405
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
489
406
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
490
407
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
491
408
|
};
|
|
492
409
|
|
|
493
410
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
494
|
-
const obj =
|
|
411
|
+
const obj = arg1;
|
|
495
412
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
496
413
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
497
414
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -500,53 +417,53 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
500
417
|
};
|
|
501
418
|
|
|
502
419
|
module.exports.__wbindgen_is_object = function(arg0) {
|
|
503
|
-
const val =
|
|
420
|
+
const val = arg0;
|
|
504
421
|
const ret = typeof(val) === 'object' && val !== null;
|
|
505
422
|
return ret;
|
|
506
423
|
};
|
|
507
424
|
|
|
508
425
|
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
509
|
-
const ret =
|
|
426
|
+
const ret = arg0 in arg1;
|
|
510
427
|
return ret;
|
|
511
428
|
};
|
|
512
429
|
|
|
513
430
|
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
514
431
|
const ret = arg0;
|
|
515
|
-
return
|
|
432
|
+
return ret;
|
|
516
433
|
};
|
|
517
434
|
|
|
518
435
|
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
519
|
-
const ret =
|
|
436
|
+
const ret = arg0 === arg1;
|
|
520
437
|
return ret;
|
|
521
438
|
};
|
|
522
439
|
|
|
523
440
|
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
524
441
|
const ret = BigInt.asUintN(64, arg0);
|
|
525
|
-
return
|
|
442
|
+
return ret;
|
|
526
443
|
};
|
|
527
444
|
|
|
528
445
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
529
|
-
const ret =
|
|
446
|
+
const ret = arg0 === undefined;
|
|
447
|
+
return ret;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
451
|
+
const ret = arg0 == arg1;
|
|
530
452
|
return ret;
|
|
531
453
|
};
|
|
532
454
|
|
|
533
455
|
module.exports.__wbindgen_number_new = function(arg0) {
|
|
534
456
|
const ret = arg0;
|
|
535
|
-
return
|
|
457
|
+
return ret;
|
|
536
458
|
};
|
|
537
459
|
|
|
538
460
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
539
461
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
540
|
-
return addHeapObject(ret);
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
544
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
545
462
|
return ret;
|
|
546
463
|
};
|
|
547
464
|
|
|
548
465
|
module.exports.__wbg_String_b9412f8799faab3e = function(arg0, arg1) {
|
|
549
|
-
const ret = String(
|
|
466
|
+
const ret = String(arg1);
|
|
550
467
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
551
468
|
const len1 = WASM_VECTOR_LEN;
|
|
552
469
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
@@ -554,41 +471,31 @@ module.exports.__wbg_String_b9412f8799faab3e = function(arg0, arg1) {
|
|
|
554
471
|
};
|
|
555
472
|
|
|
556
473
|
module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
|
|
557
|
-
const ret =
|
|
558
|
-
return
|
|
474
|
+
const ret = arg0[arg1];
|
|
475
|
+
return ret;
|
|
559
476
|
};
|
|
560
477
|
|
|
561
478
|
module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
|
|
562
|
-
|
|
479
|
+
arg0[arg1] = arg2;
|
|
563
480
|
};
|
|
564
481
|
|
|
565
|
-
module.exports.__wbg_debug_5fb96680aecf5dc8 = function(
|
|
566
|
-
console.debug(getObject(arg0));
|
|
567
|
-
};
|
|
482
|
+
module.exports.__wbg_debug_5fb96680aecf5dc8 = typeof console.debug == 'function' ? console.debug : notDefined('console.debug');
|
|
568
483
|
|
|
569
|
-
module.exports.__wbg_error_8e3928cfb8a43e2b = function(
|
|
570
|
-
console.error(getObject(arg0));
|
|
571
|
-
};
|
|
484
|
+
module.exports.__wbg_error_8e3928cfb8a43e2b = typeof console.error == 'function' ? console.error : notDefined('console.error');
|
|
572
485
|
|
|
573
|
-
module.exports.__wbg_info_530a29cb2e4e3304 = function(
|
|
574
|
-
console.info(getObject(arg0));
|
|
575
|
-
};
|
|
486
|
+
module.exports.__wbg_info_530a29cb2e4e3304 = typeof console.info == 'function' ? console.info : notDefined('console.info');
|
|
576
487
|
|
|
577
|
-
module.exports.__wbg_log_5bb5f88f245d7762 = function(
|
|
578
|
-
console.log(getObject(arg0));
|
|
579
|
-
};
|
|
488
|
+
module.exports.__wbg_log_5bb5f88f245d7762 = typeof console.log == 'function' ? console.log : notDefined('console.log');
|
|
580
489
|
|
|
581
|
-
module.exports.__wbg_warn_63bbae1730aead09 = function(
|
|
582
|
-
console.warn(getObject(arg0));
|
|
583
|
-
};
|
|
490
|
+
module.exports.__wbg_warn_63bbae1730aead09 = typeof console.warn == 'function' ? console.warn : notDefined('console.warn');
|
|
584
491
|
|
|
585
492
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
586
493
|
const ret = new Error();
|
|
587
|
-
return
|
|
494
|
+
return ret;
|
|
588
495
|
};
|
|
589
496
|
|
|
590
497
|
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
591
|
-
const ret =
|
|
498
|
+
const ret = arg1.stack;
|
|
592
499
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
593
500
|
const len1 = WASM_VECTOR_LEN;
|
|
594
501
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
@@ -608,83 +515,83 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
608
515
|
};
|
|
609
516
|
|
|
610
517
|
module.exports.__wbindgen_is_function = function(arg0) {
|
|
611
|
-
const ret = typeof(
|
|
518
|
+
const ret = typeof(arg0) === 'function';
|
|
612
519
|
return ret;
|
|
613
520
|
};
|
|
614
521
|
|
|
615
|
-
module.exports.
|
|
616
|
-
const ret =
|
|
617
|
-
return
|
|
522
|
+
module.exports.__wbg_get_5419cf6b954aa11d = function(arg0, arg1) {
|
|
523
|
+
const ret = arg0[arg1 >>> 0];
|
|
524
|
+
return ret;
|
|
618
525
|
};
|
|
619
526
|
|
|
620
|
-
module.exports.
|
|
621
|
-
const ret =
|
|
527
|
+
module.exports.__wbg_length_f217bbbf7e8e4df4 = function(arg0) {
|
|
528
|
+
const ret = arg0.length;
|
|
622
529
|
return ret;
|
|
623
530
|
};
|
|
624
531
|
|
|
625
|
-
module.exports.
|
|
532
|
+
module.exports.__wbg_new_034f913e7636e987 = function() {
|
|
626
533
|
const ret = new Array();
|
|
627
|
-
return
|
|
534
|
+
return ret;
|
|
628
535
|
};
|
|
629
536
|
|
|
630
|
-
module.exports.
|
|
537
|
+
module.exports.__wbg_new_7a87a0376e40533b = function() {
|
|
631
538
|
const ret = new Map();
|
|
632
|
-
return
|
|
539
|
+
return ret;
|
|
633
540
|
};
|
|
634
541
|
|
|
635
|
-
module.exports.
|
|
636
|
-
const ret =
|
|
637
|
-
return
|
|
542
|
+
module.exports.__wbg_next_13b477da1eaa3897 = function(arg0) {
|
|
543
|
+
const ret = arg0.next;
|
|
544
|
+
return ret;
|
|
638
545
|
};
|
|
639
546
|
|
|
640
|
-
module.exports.
|
|
641
|
-
const ret =
|
|
642
|
-
return
|
|
547
|
+
module.exports.__wbg_next_b06e115d1b01e10b = function() { return handleError(function (arg0) {
|
|
548
|
+
const ret = arg0.next();
|
|
549
|
+
return ret;
|
|
643
550
|
}, arguments) };
|
|
644
551
|
|
|
645
|
-
module.exports.
|
|
646
|
-
const ret =
|
|
552
|
+
module.exports.__wbg_done_983b5ffcaec8c583 = function(arg0) {
|
|
553
|
+
const ret = arg0.done;
|
|
647
554
|
return ret;
|
|
648
555
|
};
|
|
649
556
|
|
|
650
|
-
module.exports.
|
|
651
|
-
const ret =
|
|
652
|
-
return
|
|
557
|
+
module.exports.__wbg_value_2ab8a198c834c26a = function(arg0) {
|
|
558
|
+
const ret = arg0.value;
|
|
559
|
+
return ret;
|
|
653
560
|
};
|
|
654
561
|
|
|
655
|
-
module.exports.
|
|
562
|
+
module.exports.__wbg_iterator_695d699a44d6234c = function() {
|
|
656
563
|
const ret = Symbol.iterator;
|
|
657
|
-
return
|
|
564
|
+
return ret;
|
|
658
565
|
};
|
|
659
566
|
|
|
660
|
-
module.exports.
|
|
661
|
-
const ret = Reflect.get(
|
|
662
|
-
return
|
|
567
|
+
module.exports.__wbg_get_ef828680c64da212 = function() { return handleError(function (arg0, arg1) {
|
|
568
|
+
const ret = Reflect.get(arg0, arg1);
|
|
569
|
+
return ret;
|
|
663
570
|
}, arguments) };
|
|
664
571
|
|
|
665
|
-
module.exports.
|
|
666
|
-
const ret =
|
|
667
|
-
return
|
|
572
|
+
module.exports.__wbg_call_a9ef466721e824f2 = function() { return handleError(function (arg0, arg1) {
|
|
573
|
+
const ret = arg0.call(arg1);
|
|
574
|
+
return ret;
|
|
668
575
|
}, arguments) };
|
|
669
576
|
|
|
670
|
-
module.exports.
|
|
577
|
+
module.exports.__wbg_new_e69b5f66fda8f13c = function() {
|
|
671
578
|
const ret = new Object();
|
|
672
|
-
return
|
|
579
|
+
return ret;
|
|
673
580
|
};
|
|
674
581
|
|
|
675
|
-
module.exports.
|
|
676
|
-
|
|
582
|
+
module.exports.__wbg_set_425e70f7c64ac962 = function(arg0, arg1, arg2) {
|
|
583
|
+
arg0[arg1 >>> 0] = arg2;
|
|
677
584
|
};
|
|
678
585
|
|
|
679
|
-
module.exports.
|
|
680
|
-
const ret = Array.isArray(
|
|
586
|
+
module.exports.__wbg_isArray_6f3b47f09adb61b5 = function(arg0) {
|
|
587
|
+
const ret = Array.isArray(arg0);
|
|
681
588
|
return ret;
|
|
682
589
|
};
|
|
683
590
|
|
|
684
|
-
module.exports.
|
|
591
|
+
module.exports.__wbg_instanceof_ArrayBuffer_74945570b4a62ec7 = function(arg0) {
|
|
685
592
|
let result;
|
|
686
593
|
try {
|
|
687
|
-
result =
|
|
594
|
+
result = arg0 instanceof ArrayBuffer;
|
|
688
595
|
} catch (_) {
|
|
689
596
|
result = false;
|
|
690
597
|
}
|
|
@@ -692,15 +599,15 @@ module.exports.__wbg_instanceof_ArrayBuffer_61dfc3198373c902 = function(arg0) {
|
|
|
692
599
|
return ret;
|
|
693
600
|
};
|
|
694
601
|
|
|
695
|
-
module.exports.
|
|
602
|
+
module.exports.__wbg_new_70a2f23d1565c04c = function(arg0, arg1) {
|
|
696
603
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
697
|
-
return
|
|
604
|
+
return ret;
|
|
698
605
|
};
|
|
699
606
|
|
|
700
|
-
module.exports.
|
|
607
|
+
module.exports.__wbg_instanceof_Map_f96986929e7e89ed = function(arg0) {
|
|
701
608
|
let result;
|
|
702
609
|
try {
|
|
703
|
-
result =
|
|
610
|
+
result = arg0 instanceof Map;
|
|
704
611
|
} catch (_) {
|
|
705
612
|
result = false;
|
|
706
613
|
}
|
|
@@ -708,49 +615,49 @@ module.exports.__wbg_instanceof_Map_763ce0e95960d55e = function(arg0) {
|
|
|
708
615
|
return ret;
|
|
709
616
|
};
|
|
710
617
|
|
|
711
|
-
module.exports.
|
|
712
|
-
const ret =
|
|
713
|
-
return
|
|
618
|
+
module.exports.__wbg_set_277a63e77c89279f = function(arg0, arg1, arg2) {
|
|
619
|
+
const ret = arg0.set(arg1, arg2);
|
|
620
|
+
return ret;
|
|
714
621
|
};
|
|
715
622
|
|
|
716
|
-
module.exports.
|
|
717
|
-
const ret = Number.isSafeInteger(
|
|
623
|
+
module.exports.__wbg_isSafeInteger_b9dff570f01a9100 = function(arg0) {
|
|
624
|
+
const ret = Number.isSafeInteger(arg0);
|
|
718
625
|
return ret;
|
|
719
626
|
};
|
|
720
627
|
|
|
721
|
-
module.exports.
|
|
722
|
-
const ret = Object.entries(
|
|
723
|
-
return
|
|
628
|
+
module.exports.__wbg_entries_c02034de337d3ee2 = function(arg0) {
|
|
629
|
+
const ret = Object.entries(arg0);
|
|
630
|
+
return ret;
|
|
724
631
|
};
|
|
725
632
|
|
|
726
|
-
module.exports.
|
|
633
|
+
module.exports.__wbg_fromCodePoint_a9176a674cd93db9 = function() { return handleError(function (arg0) {
|
|
727
634
|
const ret = String.fromCodePoint(arg0 >>> 0);
|
|
728
|
-
return
|
|
635
|
+
return ret;
|
|
729
636
|
}, arguments) };
|
|
730
637
|
|
|
731
|
-
module.exports.
|
|
732
|
-
const ret =
|
|
733
|
-
return
|
|
638
|
+
module.exports.__wbg_buffer_ccaed51a635d8a2d = function(arg0) {
|
|
639
|
+
const ret = arg0.buffer;
|
|
640
|
+
return ret;
|
|
734
641
|
};
|
|
735
642
|
|
|
736
|
-
module.exports.
|
|
737
|
-
const ret = new Uint8Array(
|
|
738
|
-
return
|
|
643
|
+
module.exports.__wbg_new_fec2611eb9180f95 = function(arg0) {
|
|
644
|
+
const ret = new Uint8Array(arg0);
|
|
645
|
+
return ret;
|
|
739
646
|
};
|
|
740
647
|
|
|
741
|
-
module.exports.
|
|
742
|
-
|
|
648
|
+
module.exports.__wbg_set_ec2fcf81bc573fd9 = function(arg0, arg1, arg2) {
|
|
649
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
743
650
|
};
|
|
744
651
|
|
|
745
|
-
module.exports.
|
|
746
|
-
const ret =
|
|
652
|
+
module.exports.__wbg_length_9254c4bd3b9f23c4 = function(arg0) {
|
|
653
|
+
const ret = arg0.length;
|
|
747
654
|
return ret;
|
|
748
655
|
};
|
|
749
656
|
|
|
750
|
-
module.exports.
|
|
657
|
+
module.exports.__wbg_instanceof_Uint8Array_df0761410414ef36 = function(arg0) {
|
|
751
658
|
let result;
|
|
752
659
|
try {
|
|
753
|
-
result =
|
|
660
|
+
result = arg0 instanceof Uint8Array;
|
|
754
661
|
} catch (_) {
|
|
755
662
|
result = false;
|
|
756
663
|
}
|
|
@@ -759,14 +666,14 @@ module.exports.__wbg_instanceof_Uint8Array_247a91427532499e = function(arg0) {
|
|
|
759
666
|
};
|
|
760
667
|
|
|
761
668
|
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
762
|
-
const v =
|
|
669
|
+
const v = arg1;
|
|
763
670
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
764
671
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
765
672
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
766
673
|
};
|
|
767
674
|
|
|
768
675
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
769
|
-
const ret = debugString(
|
|
676
|
+
const ret = debugString(arg1);
|
|
770
677
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
771
678
|
const len1 = WASM_VECTOR_LEN;
|
|
772
679
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
@@ -779,7 +686,18 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
|
779
686
|
|
|
780
687
|
module.exports.__wbindgen_memory = function() {
|
|
781
688
|
const ret = wasm.memory;
|
|
782
|
-
return
|
|
689
|
+
return ret;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
module.exports.__wbindgen_init_externref_table = function() {
|
|
693
|
+
const table = wasm.__wbindgen_export_2;
|
|
694
|
+
const offset = table.grow(4);
|
|
695
|
+
table.set(0, undefined);
|
|
696
|
+
table.set(offset + 0, undefined);
|
|
697
|
+
table.set(offset + 1, null);
|
|
698
|
+
table.set(offset + 2, true);
|
|
699
|
+
table.set(offset + 3, false);
|
|
700
|
+
;
|
|
783
701
|
};
|
|
784
702
|
|
|
785
703
|
const path = require('path').join(__dirname, 'ruff_wasm_bg.wasm');
|
package/ruff_wasm_bg.wasm
CHANGED
|
Binary file
|