@astral-sh/ruff-wasm-web 0.14.3 → 0.14.5

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
  "Charlie Marsh <charlie.r.marsh@gmail.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for Ruff",
8
- "version": "0.14.3",
8
+ "version": "0.14.5",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/ruff_wasm.d.ts CHANGED
@@ -37,40 +37,41 @@ export interface Diagnostic {
37
37
 
38
38
  export class Workspace {
39
39
  free(): void;
40
- static version(): string;
41
- constructor(options: any, position_encoding: PositionEncoding);
40
+ [Symbol.dispose](): void;
42
41
  static defaultSettings(): any;
42
+ constructor(options: any, position_encoding: PositionEncoding);
43
43
  check(contents: string): any;
44
- format(contents: string): string;
45
- format_ir(contents: string): string;
46
- comments(contents: string): string;
47
44
  /**
48
45
  * Parses the content and returns its AST
49
46
  */
50
47
  parse(contents: string): string;
48
+ format(contents: string): string;
51
49
  tokens(contents: string): string;
50
+ static version(): string;
51
+ comments(contents: string): string;
52
+ format_ir(contents: string): string;
52
53
  }
53
54
 
54
55
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
55
56
 
56
57
  export interface InitOutput {
57
58
  readonly memory: WebAssembly.Memory;
58
- readonly run: () => void;
59
59
  readonly __wbg_workspace_free: (a: number, b: number) => void;
60
- readonly workspace_version: () => [number, number];
61
- readonly workspace_new: (a: any, b: number) => [number, number, number];
62
- readonly workspace_defaultSettings: () => [number, number, number];
60
+ readonly run: () => void;
63
61
  readonly workspace_check: (a: number, b: number, c: number) => [number, number, number];
62
+ readonly workspace_comments: (a: number, b: number, c: number) => [number, number, number, number];
63
+ readonly workspace_defaultSettings: () => [number, number, number];
64
64
  readonly workspace_format: (a: number, b: number, c: number) => [number, number, number, number];
65
65
  readonly workspace_format_ir: (a: number, b: number, c: number) => [number, number, number, number];
66
- readonly workspace_comments: (a: number, b: number, c: number) => [number, number, number, number];
66
+ readonly workspace_new: (a: any, b: number) => [number, number, number];
67
67
  readonly workspace_parse: (a: number, b: number, c: number) => [number, number, number, number];
68
68
  readonly workspace_tokens: (a: number, b: number, c: number) => [number, number, number, number];
69
+ readonly workspace_version: () => [number, number];
69
70
  readonly __wbindgen_malloc: (a: number, b: number) => number;
70
71
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
71
72
  readonly __wbindgen_exn_store: (a: number) => void;
72
73
  readonly __externref_table_alloc: () => number;
73
- readonly __wbindgen_export_4: WebAssembly.Table;
74
+ readonly __wbindgen_externrefs: WebAssembly.Table;
74
75
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
75
76
  readonly __externref_table_dealloc: (a: number) => void;
76
77
  readonly __wbindgen_start: () => void;
package/ruff_wasm.js CHANGED
@@ -9,16 +9,16 @@ function getUint8ArrayMemory0() {
9
9
  return cachedUint8ArrayMemory0;
10
10
  }
11
11
 
12
- let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
13
 
14
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
14
+ cachedTextDecoder.decode();
15
15
 
16
16
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
17
  let numBytesDecoded = 0;
18
18
  function decodeText(ptr, len) {
19
19
  numBytesDecoded += len;
20
20
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
- cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
22
  cachedTextDecoder.decode();
23
23
  numBytesDecoded = len;
24
24
  }
@@ -32,20 +32,18 @@ function getStringFromWasm0(ptr, len) {
32
32
 
33
33
  let WASM_VECTOR_LEN = 0;
34
34
 
35
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
35
+ const cachedTextEncoder = new TextEncoder();
36
36
 
37
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
38
- ? function (arg, view) {
39
- return cachedTextEncoder.encodeInto(arg, view);
37
+ if (!('encodeInto' in cachedTextEncoder)) {
38
+ cachedTextEncoder.encodeInto = function (arg, view) {
39
+ const buf = cachedTextEncoder.encode(arg);
40
+ view.set(buf);
41
+ return {
42
+ read: arg.length,
43
+ written: buf.length
44
+ };
45
+ }
40
46
  }
41
- : function (arg, view) {
42
- const buf = cachedTextEncoder.encode(arg);
43
- view.set(buf);
44
- return {
45
- read: arg.length,
46
- written: buf.length
47
- };
48
- });
49
47
 
50
48
  function passStringToWasm0(arg, malloc, realloc) {
51
49
 
@@ -76,7 +74,7 @@ function passStringToWasm0(arg, malloc, realloc) {
76
74
  }
77
75
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
78
76
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
79
- const ret = encodeString(arg, view);
77
+ const ret = cachedTextEncoder.encodeInto(arg, view);
80
78
 
81
79
  offset += ret.written;
82
80
  ptr = realloc(ptr, len, offset, 1) >>> 0;
@@ -95,26 +93,6 @@ function getDataViewMemory0() {
95
93
  return cachedDataViewMemory0;
96
94
  }
97
95
 
98
- function addToExternrefTable0(obj) {
99
- const idx = wasm.__externref_table_alloc();
100
- wasm.__wbindgen_export_4.set(idx, obj);
101
- return idx;
102
- }
103
-
104
- function handleError(f, args) {
105
- try {
106
- return f.apply(this, args);
107
- } catch (e) {
108
- const idx = addToExternrefTable0(e);
109
- wasm.__wbindgen_exn_store(idx);
110
- }
111
- }
112
-
113
- function getArrayU8FromWasm0(ptr, len) {
114
- ptr = ptr >>> 0;
115
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
116
- }
117
-
118
96
  function isLikeNone(x) {
119
97
  return x === undefined || x === null;
120
98
  }
@@ -184,12 +162,32 @@ function debugString(val) {
184
162
  return className;
185
163
  }
186
164
 
165
+ function addToExternrefTable0(obj) {
166
+ const idx = wasm.__externref_table_alloc();
167
+ wasm.__wbindgen_externrefs.set(idx, obj);
168
+ return idx;
169
+ }
170
+
171
+ function handleError(f, args) {
172
+ try {
173
+ return f.apply(this, args);
174
+ } catch (e) {
175
+ const idx = addToExternrefTable0(e);
176
+ wasm.__wbindgen_exn_store(idx);
177
+ }
178
+ }
179
+
180
+ function getArrayU8FromWasm0(ptr, len) {
181
+ ptr = ptr >>> 0;
182
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
183
+ }
184
+
187
185
  export function run() {
188
186
  wasm.run();
189
187
  }
190
188
 
191
189
  function takeFromExternrefTable0(idx) {
192
- const value = wasm.__wbindgen_export_4.get(idx);
190
+ const value = wasm.__wbindgen_externrefs.get(idx);
193
191
  wasm.__externref_table_dealloc(idx);
194
192
  return value;
195
193
  }
@@ -220,19 +218,14 @@ export class Workspace {
220
218
  wasm.__wbg_workspace_free(ptr, 0);
221
219
  }
222
220
  /**
223
- * @returns {string}
221
+ * @returns {any}
224
222
  */
225
- static version() {
226
- let deferred1_0;
227
- let deferred1_1;
228
- try {
229
- const ret = wasm.workspace_version();
230
- deferred1_0 = ret[0];
231
- deferred1_1 = ret[1];
232
- return getStringFromWasm0(ret[0], ret[1]);
233
- } finally {
234
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
223
+ static defaultSettings() {
224
+ const ret = wasm.workspace_defaultSettings();
225
+ if (ret[2]) {
226
+ throw takeFromExternrefTable0(ret[1]);
235
227
  }
228
+ return takeFromExternrefTable0(ret[0]);
236
229
  }
237
230
  /**
238
231
  * @param {any} options
@@ -247,16 +240,6 @@ export class Workspace {
247
240
  WorkspaceFinalization.register(this, this.__wbg_ptr, this);
248
241
  return this;
249
242
  }
250
- /**
251
- * @returns {any}
252
- */
253
- static defaultSettings() {
254
- const ret = wasm.workspace_defaultSettings();
255
- if (ret[2]) {
256
- throw takeFromExternrefTable0(ret[1]);
257
- }
258
- return takeFromExternrefTable0(ret[0]);
259
- }
260
243
  /**
261
244
  * @param {string} contents
262
245
  * @returns {any}
@@ -271,16 +254,17 @@ export class Workspace {
271
254
  return takeFromExternrefTable0(ret[0]);
272
255
  }
273
256
  /**
257
+ * Parses the content and returns its AST
274
258
  * @param {string} contents
275
259
  * @returns {string}
276
260
  */
277
- format(contents) {
261
+ parse(contents) {
278
262
  let deferred3_0;
279
263
  let deferred3_1;
280
264
  try {
281
265
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
266
  const len0 = WASM_VECTOR_LEN;
283
- const ret = wasm.workspace_format(this.__wbg_ptr, ptr0, len0);
267
+ const ret = wasm.workspace_parse(this.__wbg_ptr, ptr0, len0);
284
268
  var ptr2 = ret[0];
285
269
  var len2 = ret[1];
286
270
  if (ret[3]) {
@@ -298,13 +282,13 @@ export class Workspace {
298
282
  * @param {string} contents
299
283
  * @returns {string}
300
284
  */
301
- format_ir(contents) {
285
+ format(contents) {
302
286
  let deferred3_0;
303
287
  let deferred3_1;
304
288
  try {
305
289
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
290
  const len0 = WASM_VECTOR_LEN;
307
- const ret = wasm.workspace_format_ir(this.__wbg_ptr, ptr0, len0);
291
+ const ret = wasm.workspace_format(this.__wbg_ptr, ptr0, len0);
308
292
  var ptr2 = ret[0];
309
293
  var len2 = ret[1];
310
294
  if (ret[3]) {
@@ -322,13 +306,13 @@ export class Workspace {
322
306
  * @param {string} contents
323
307
  * @returns {string}
324
308
  */
325
- comments(contents) {
309
+ tokens(contents) {
326
310
  let deferred3_0;
327
311
  let deferred3_1;
328
312
  try {
329
313
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
330
314
  const len0 = WASM_VECTOR_LEN;
331
- const ret = wasm.workspace_comments(this.__wbg_ptr, ptr0, len0);
315
+ const ret = wasm.workspace_tokens(this.__wbg_ptr, ptr0, len0);
332
316
  var ptr2 = ret[0];
333
317
  var len2 = ret[1];
334
318
  if (ret[3]) {
@@ -343,17 +327,31 @@ export class Workspace {
343
327
  }
344
328
  }
345
329
  /**
346
- * Parses the content and returns its AST
330
+ * @returns {string}
331
+ */
332
+ static version() {
333
+ let deferred1_0;
334
+ let deferred1_1;
335
+ try {
336
+ const ret = wasm.workspace_version();
337
+ deferred1_0 = ret[0];
338
+ deferred1_1 = ret[1];
339
+ return getStringFromWasm0(ret[0], ret[1]);
340
+ } finally {
341
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
342
+ }
343
+ }
344
+ /**
347
345
  * @param {string} contents
348
346
  * @returns {string}
349
347
  */
350
- parse(contents) {
348
+ comments(contents) {
351
349
  let deferred3_0;
352
350
  let deferred3_1;
353
351
  try {
354
352
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
355
353
  const len0 = WASM_VECTOR_LEN;
356
- const ret = wasm.workspace_parse(this.__wbg_ptr, ptr0, len0);
354
+ const ret = wasm.workspace_comments(this.__wbg_ptr, ptr0, len0);
357
355
  var ptr2 = ret[0];
358
356
  var len2 = ret[1];
359
357
  if (ret[3]) {
@@ -371,13 +369,13 @@ export class Workspace {
371
369
  * @param {string} contents
372
370
  * @returns {string}
373
371
  */
374
- tokens(contents) {
372
+ format_ir(contents) {
375
373
  let deferred3_0;
376
374
  let deferred3_1;
377
375
  try {
378
376
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
379
377
  const len0 = WASM_VECTOR_LEN;
380
- const ret = wasm.workspace_tokens(this.__wbg_ptr, ptr0, len0);
378
+ const ret = wasm.workspace_format_ir(this.__wbg_ptr, ptr0, len0);
381
379
  var ptr2 = ret[0];
382
380
  var len2 = ret[1];
383
381
  if (ret[3]) {
@@ -392,6 +390,7 @@ export class Workspace {
392
390
  }
393
391
  }
394
392
  }
393
+ if (Symbol.dispose) Workspace.prototype[Symbol.dispose] = Workspace.prototype.free;
395
394
 
396
395
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
397
396
 
@@ -431,11 +430,11 @@ async function __wbg_load(module, imports) {
431
430
  function __wbg_get_imports() {
432
431
  const imports = {};
433
432
  imports.wbg = {};
434
- imports.wbg.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
433
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
435
434
  const ret = Error(getStringFromWasm0(arg0, arg1));
436
435
  return ret;
437
436
  };
438
- imports.wbg.__wbg_Number_577a493fc95ea223 = function(arg0) {
437
+ imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
439
438
  const ret = Number(arg0);
440
439
  return ret;
441
440
  };
@@ -446,28 +445,93 @@ function __wbg_get_imports() {
446
445
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
447
446
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
448
447
  };
449
- imports.wbg.__wbg_call_2f8d426a20a307fe = function() { return handleError(function (arg0, arg1) {
448
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
449
+ const v = arg1;
450
+ const ret = typeof(v) === 'bigint' ? v : undefined;
451
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
452
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
453
+ };
454
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
455
+ const v = arg0;
456
+ const ret = typeof(v) === 'boolean' ? v : undefined;
457
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
458
+ };
459
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
460
+ const ret = debugString(arg1);
461
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
+ const len1 = WASM_VECTOR_LEN;
463
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
464
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
465
+ };
466
+ imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
467
+ const ret = arg0 in arg1;
468
+ return ret;
469
+ };
470
+ imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
471
+ const ret = typeof(arg0) === 'bigint';
472
+ return ret;
473
+ };
474
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
475
+ const ret = typeof(arg0) === 'function';
476
+ return ret;
477
+ };
478
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
479
+ const val = arg0;
480
+ const ret = typeof(val) === 'object' && val !== null;
481
+ return ret;
482
+ };
483
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
484
+ const ret = typeof(arg0) === 'string';
485
+ return ret;
486
+ };
487
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
488
+ const ret = arg0 === undefined;
489
+ return ret;
490
+ };
491
+ imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
492
+ const ret = arg0 === arg1;
493
+ return ret;
494
+ };
495
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
496
+ const ret = arg0 == arg1;
497
+ return ret;
498
+ };
499
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
500
+ const obj = arg1;
501
+ const ret = typeof(obj) === 'number' ? obj : undefined;
502
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
503
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
504
+ };
505
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
506
+ const obj = arg1;
507
+ const ret = typeof(obj) === 'string' ? obj : undefined;
508
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
509
+ var len1 = WASM_VECTOR_LEN;
510
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
511
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
512
+ };
513
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
514
+ throw new Error(getStringFromWasm0(arg0, arg1));
515
+ };
516
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
450
517
  const ret = arg0.call(arg1);
451
518
  return ret;
452
519
  }, arguments) };
453
- imports.wbg.__wbg_codePointAt_12acefc1bed285e5 = function(arg0, arg1) {
520
+ imports.wbg.__wbg_codePointAt_01a186303396f7ad = function(arg0, arg1) {
454
521
  const ret = arg0.codePointAt(arg1 >>> 0);
455
522
  return ret;
456
523
  };
457
- imports.wbg.__wbg_debug_9a166dc82b4ba6a6 = function(arg0) {
524
+ imports.wbg.__wbg_debug_f4b0c59db649db48 = function(arg0) {
458
525
  console.debug(arg0);
459
526
  };
460
- imports.wbg.__wbg_done_4a7743b6f942c9f3 = function(arg0) {
527
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
461
528
  const ret = arg0.done;
462
529
  return ret;
463
530
  };
464
- imports.wbg.__wbg_entries_17f7acbc2d691c0d = function(arg0) {
531
+ imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
465
532
  const ret = Object.entries(arg0);
466
533
  return ret;
467
534
  };
468
- imports.wbg.__wbg_error_41f0589870426ea4 = function(arg0) {
469
- console.error(arg0);
470
- };
471
535
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
472
536
  let deferred0_0;
473
537
  let deferred0_1;
@@ -479,26 +543,29 @@ function __wbg_get_imports() {
479
543
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
480
544
  }
481
545
  };
482
- imports.wbg.__wbg_fromCodePoint_258371ef302abf8a = function() { return handleError(function (arg0) {
546
+ imports.wbg.__wbg_error_a7f8fbb0523dae15 = function(arg0) {
547
+ console.error(arg0);
548
+ };
549
+ imports.wbg.__wbg_fromCodePoint_a1c5bb992dc05846 = function() { return handleError(function (arg0) {
483
550
  const ret = String.fromCodePoint(arg0 >>> 0);
484
551
  return ret;
485
552
  }, arguments) };
486
- imports.wbg.__wbg_get_27b4bcbec57323ca = function() { return handleError(function (arg0, arg1) {
487
- const ret = Reflect.get(arg0, arg1);
488
- return ret;
489
- }, arguments) };
490
- imports.wbg.__wbg_get_59c6316d15f9f1d0 = function(arg0, arg1) {
553
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
491
554
  const ret = arg0[arg1 >>> 0];
492
555
  return ret;
493
556
  };
494
- imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
557
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
558
+ const ret = Reflect.get(arg0, arg1);
559
+ return ret;
560
+ }, arguments) };
561
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
495
562
  const ret = arg0[arg1];
496
563
  return ret;
497
564
  };
498
- imports.wbg.__wbg_info_ed6e390d09c09062 = function(arg0) {
565
+ imports.wbg.__wbg_info_e674a11f4f50cc0c = function(arg0) {
499
566
  console.info(arg0);
500
567
  };
501
- imports.wbg.__wbg_instanceof_ArrayBuffer_59339a3a6f0c10ea = function(arg0) {
568
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
502
569
  let result;
503
570
  try {
504
571
  result = arg0 instanceof ArrayBuffer;
@@ -508,7 +575,7 @@ function __wbg_get_imports() {
508
575
  const ret = result;
509
576
  return ret;
510
577
  };
511
- imports.wbg.__wbg_instanceof_Map_dd89a82d76d1b25f = function(arg0) {
578
+ imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
512
579
  let result;
513
580
  try {
514
581
  result = arg0 instanceof Map;
@@ -518,7 +585,7 @@ function __wbg_get_imports() {
518
585
  const ret = result;
519
586
  return ret;
520
587
  };
521
- imports.wbg.__wbg_instanceof_Uint8Array_91f3c5adee7e6672 = function(arg0) {
588
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
522
589
  let result;
523
590
  try {
524
591
  result = arg0 instanceof Uint8Array;
@@ -528,38 +595,42 @@ function __wbg_get_imports() {
528
595
  const ret = result;
529
596
  return ret;
530
597
  };
531
- imports.wbg.__wbg_isArray_bc2498eba6fcb71f = function(arg0) {
598
+ imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
532
599
  const ret = Array.isArray(arg0);
533
600
  return ret;
534
601
  };
535
- imports.wbg.__wbg_isSafeInteger_6091d6e3ee1b65fd = function(arg0) {
602
+ imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
536
603
  const ret = Number.isSafeInteger(arg0);
537
604
  return ret;
538
605
  };
539
- imports.wbg.__wbg_iterator_96378c3c9a17347c = function() {
606
+ imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
540
607
  const ret = Symbol.iterator;
541
608
  return ret;
542
609
  };
543
- imports.wbg.__wbg_length_246fa1f85a0dea5b = function(arg0) {
610
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
544
611
  const ret = arg0.length;
545
612
  return ret;
546
613
  };
547
- imports.wbg.__wbg_length_7bca5263dfc69dd1 = function(arg0) {
614
+ imports.wbg.__wbg_length_a95b69f903b746c4 = function(arg0) {
548
615
  const ret = arg0.length;
549
616
  return ret;
550
617
  };
551
- imports.wbg.__wbg_length_904c0910ed998bf3 = function(arg0) {
618
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
552
619
  const ret = arg0.length;
553
620
  return ret;
554
621
  };
555
- imports.wbg.__wbg_log_f3c04200b995730f = function(arg0) {
622
+ imports.wbg.__wbg_log_8cec76766b8c0e33 = function(arg0) {
556
623
  console.log(arg0);
557
624
  };
558
- imports.wbg.__wbg_new_1930cbb8d9ffc31b = function() {
625
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
559
626
  const ret = new Object();
560
627
  return ret;
561
628
  };
562
- imports.wbg.__wbg_new_56407f99198feff7 = function() {
629
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
630
+ const ret = new Uint8Array(arg0);
631
+ return ret;
632
+ };
633
+ imports.wbg.__wbg_new_68651c719dcda04e = function() {
563
634
  const ret = new Map();
564
635
  return ret;
565
636
  };
@@ -567,41 +638,37 @@ function __wbg_get_imports() {
567
638
  const ret = new Error();
568
639
  return ret;
569
640
  };
570
- imports.wbg.__wbg_new_9190433fb67ed635 = function(arg0) {
571
- const ret = new Uint8Array(arg0);
572
- return ret;
573
- };
574
- imports.wbg.__wbg_new_97ddeb994a38bb69 = function(arg0, arg1) {
641
+ imports.wbg.__wbg_new_a7442b4b19c1a356 = function(arg0, arg1) {
575
642
  const ret = new Error(getStringFromWasm0(arg0, arg1));
576
643
  return ret;
577
644
  };
578
- imports.wbg.__wbg_new_e969dc3f68d25093 = function() {
645
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
579
646
  const ret = new Array();
580
647
  return ret;
581
648
  };
582
- imports.wbg.__wbg_next_2e6b37020ac5fe58 = function() { return handleError(function (arg0) {
649
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
583
650
  const ret = arg0.next();
584
651
  return ret;
585
652
  }, arguments) };
586
- imports.wbg.__wbg_next_3de8f2669431a3ff = function(arg0) {
653
+ imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
587
654
  const ret = arg0.next;
588
655
  return ret;
589
656
  };
590
- imports.wbg.__wbg_now_e3057dd824ca0191 = function() {
657
+ imports.wbg.__wbg_now_793306c526e2e3b6 = function() {
591
658
  const ret = Date.now();
592
659
  return ret;
593
660
  };
594
- imports.wbg.__wbg_prototypesetcall_c5f74efd31aea86b = function(arg0, arg1, arg2) {
661
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
595
662
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
596
663
  };
597
- imports.wbg.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
598
- const ret = arg0.set(arg1, arg2);
599
- return ret;
600
- };
601
664
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
602
665
  arg0[arg1] = arg2;
603
666
  };
604
- imports.wbg.__wbg_set_d636a0463acf1dbc = function(arg0, arg1, arg2) {
667
+ imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
668
+ const ret = arg0.set(arg1, arg2);
669
+ return ret;
670
+ };
671
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
605
672
  arg0[arg1 >>> 0] = arg2;
606
673
  };
607
674
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
@@ -611,81 +678,13 @@ function __wbg_get_imports() {
611
678
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
612
679
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
613
680
  };
614
- imports.wbg.__wbg_value_09d0b4eaab48b91d = function(arg0) {
681
+ imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
615
682
  const ret = arg0.value;
616
683
  return ret;
617
684
  };
618
- imports.wbg.__wbg_warn_07ef1f61c52799fb = function(arg0) {
685
+ imports.wbg.__wbg_warn_1d74dddbe2fd1dbb = function(arg0) {
619
686
  console.warn(arg0);
620
687
  };
621
- imports.wbg.__wbg_wbindgenbigintgetasi64_7637cb1a7fb9a81e = function(arg0, arg1) {
622
- const v = arg1;
623
- const ret = typeof(v) === 'bigint' ? v : undefined;
624
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
625
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
626
- };
627
- imports.wbg.__wbg_wbindgenbooleanget_59f830b1a70d2530 = function(arg0) {
628
- const v = arg0;
629
- const ret = typeof(v) === 'boolean' ? v : undefined;
630
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
631
- };
632
- imports.wbg.__wbg_wbindgendebugstring_bb652b1bc2061b6d = function(arg0, arg1) {
633
- const ret = debugString(arg1);
634
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
635
- const len1 = WASM_VECTOR_LEN;
636
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
637
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
638
- };
639
- imports.wbg.__wbg_wbindgenin_192b210aa1c401e9 = function(arg0, arg1) {
640
- const ret = arg0 in arg1;
641
- return ret;
642
- };
643
- imports.wbg.__wbg_wbindgenisbigint_7d76a1ca6454e439 = function(arg0) {
644
- const ret = typeof(arg0) === 'bigint';
645
- return ret;
646
- };
647
- imports.wbg.__wbg_wbindgenisfunction_ea72b9d66a0e1705 = function(arg0) {
648
- const ret = typeof(arg0) === 'function';
649
- return ret;
650
- };
651
- imports.wbg.__wbg_wbindgenisobject_dfe064a121d87553 = function(arg0) {
652
- const val = arg0;
653
- const ret = typeof(val) === 'object' && val !== null;
654
- return ret;
655
- };
656
- imports.wbg.__wbg_wbindgenisstring_4b74e4111ba029e6 = function(arg0) {
657
- const ret = typeof(arg0) === 'string';
658
- return ret;
659
- };
660
- imports.wbg.__wbg_wbindgenisundefined_71f08a6ade4354e7 = function(arg0) {
661
- const ret = arg0 === undefined;
662
- return ret;
663
- };
664
- imports.wbg.__wbg_wbindgenjsvaleq_f27272c0a890df7f = function(arg0, arg1) {
665
- const ret = arg0 === arg1;
666
- return ret;
667
- };
668
- imports.wbg.__wbg_wbindgenjsvallooseeq_9dd7bb4b95ac195c = function(arg0, arg1) {
669
- const ret = arg0 == arg1;
670
- return ret;
671
- };
672
- imports.wbg.__wbg_wbindgennumberget_d855f947247a3fbc = function(arg0, arg1) {
673
- const obj = arg1;
674
- const ret = typeof(obj) === 'number' ? obj : undefined;
675
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
676
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
677
- };
678
- imports.wbg.__wbg_wbindgenstringget_43fe05afe34b0cb1 = function(arg0, arg1) {
679
- const obj = arg1;
680
- const ret = typeof(obj) === 'string' ? obj : undefined;
681
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
682
- var len1 = WASM_VECTOR_LEN;
683
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
684
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
685
- };
686
- imports.wbg.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
687
- throw new Error(getStringFromWasm0(arg0, arg1));
688
- };
689
688
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
690
689
  // Cast intrinsic for `Ref(String) -> Externref`.
691
690
  const ret = getStringFromWasm0(arg0, arg1);
@@ -707,7 +706,7 @@ function __wbg_get_imports() {
707
706
  return ret;
708
707
  };
709
708
  imports.wbg.__wbindgen_init_externref_table = function() {
710
- const table = wasm.__wbindgen_export_4;
709
+ const table = wasm.__wbindgen_externrefs;
711
710
  const offset = table.grow(4);
712
711
  table.set(0, undefined);
713
712
  table.set(offset + 0, undefined);
@@ -720,10 +719,6 @@ function __wbg_get_imports() {
720
719
  return imports;
721
720
  }
722
721
 
723
- function __wbg_init_memory(imports, memory) {
724
-
725
- }
726
-
727
722
  function __wbg_finalize_init(instance, module) {
728
723
  wasm = instance.exports;
729
724
  __wbg_init.__wbindgen_wasm_module = module;
@@ -749,8 +744,6 @@ function initSync(module) {
749
744
 
750
745
  const imports = __wbg_get_imports();
751
746
 
752
- __wbg_init_memory(imports);
753
-
754
747
  if (!(module instanceof WebAssembly.Module)) {
755
748
  module = new WebAssembly.Module(module);
756
749
  }
@@ -781,8 +774,6 @@ async function __wbg_init(module_or_path) {
781
774
  module_or_path = fetch(module_or_path);
782
775
  }
783
776
 
784
- __wbg_init_memory(imports);
785
-
786
777
  const { instance, module } = await __wbg_load(await module_or_path, imports);
787
778
 
788
779
  return __wbg_finalize_init(instance, module);
package/ruff_wasm_bg.wasm CHANGED
Binary file