@astral-sh/ruff-wasm-nodejs 0.14.11 → 0.14.14

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
@@ -4,7 +4,7 @@
4
4
  "Charlie Marsh <charlie.r.marsh@gmail.com>"
5
5
  ],
6
6
  "description": "WebAssembly bindings for Ruff",
7
- "version": "0.14.11",
7
+ "version": "0.14.14",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
package/ruff_wasm.d.ts CHANGED
@@ -1,6 +1,20 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ /**
4
+ * Initializes the logger with the given log level.
5
+ *
6
+ * ## Panics
7
+ * If this function is called more than once.
8
+ */
9
+ export function initLogging(level: LogLevel): void;
3
10
  export function run(): void;
11
+ export enum LogLevel {
12
+ Trace = 0,
13
+ Debug = 1,
14
+ Info = 2,
15
+ Warn = 3,
16
+ Error = 4,
17
+ }
4
18
  export enum PositionEncoding {
5
19
  Utf8 = 0,
6
20
  Utf16 = 1,
package/ruff_wasm.js CHANGED
@@ -175,6 +175,16 @@ function getArrayU8FromWasm0(ptr, len) {
175
175
  ptr = ptr >>> 0;
176
176
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
177
177
  }
178
+ /**
179
+ * Initializes the logger with the given log level.
180
+ *
181
+ * ## Panics
182
+ * If this function is called more than once.
183
+ * @param {LogLevel} level
184
+ */
185
+ exports.initLogging = function(level) {
186
+ wasm.initLogging(level);
187
+ };
178
188
 
179
189
  exports.run = function() {
180
190
  wasm.run();
@@ -185,6 +195,16 @@ function takeFromExternrefTable0(idx) {
185
195
  wasm.__externref_table_dealloc(idx);
186
196
  return value;
187
197
  }
198
+ /**
199
+ * @enum {0 | 1 | 2 | 3 | 4}
200
+ */
201
+ exports.LogLevel = Object.freeze({
202
+ Trace: 0, "0": "Trace",
203
+ Debug: 1, "1": "Debug",
204
+ Info: 2, "2": "Info",
205
+ Warn: 3, "3": "Warn",
206
+ Error: 4, "4": "Error",
207
+ });
188
208
  /**
189
209
  * @enum {0 | 1 | 2}
190
210
  */
package/ruff_wasm_bg.wasm CHANGED
Binary file