rumdl-wasm 0.1.9 → 0.1.10

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
  "Ruben J. Jongejan <ruben.jongejan@gmail.com>"
6
6
  ],
7
7
  "description": "Fast markdown linter with 60+ rules - WebAssembly build",
8
- "version": "0.1.9",
8
+ "version": "0.1.10",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/rumdl_lib.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ /**
4
+ * Initialize the WASM module with better panic messages
5
+ */
6
+ export function init(): void;
3
7
  /**
4
8
  * Get list of available rules as JSON
5
9
  *
@@ -12,10 +16,6 @@ export function get_available_rules(): string;
12
16
  * Get the rumdl version
13
17
  */
14
18
  export function get_version(): string;
15
- /**
16
- * Initialize the WASM module with better panic messages
17
- */
18
- export function init(): void;
19
19
  /**
20
20
  * A markdown linter with configuration
21
21
  *
@@ -27,8 +27,19 @@ export class Linter {
27
27
  [Symbol.dispose](): void;
28
28
  /**
29
29
  * Get the current configuration as JSON
30
+ *
31
+ * Returns an object with global settings and rule-specific configurations.
30
32
  */
31
33
  get_config(): string;
34
+ /**
35
+ * Get any warnings generated during configuration parsing
36
+ *
37
+ * Returns a JSON array of warning strings. Each warning is prefixed
38
+ * with the rule name (e.g., "[MD060] Invalid severity: critical").
39
+ *
40
+ * Useful for debugging configuration issues or providing user feedback.
41
+ */
42
+ get_config_warnings(): string;
32
43
  /**
33
44
  * Apply all auto-fixes to the content and return the fixed content
34
45
  *
@@ -79,6 +90,7 @@ export interface InitOutput {
79
90
  readonly linter_check: (a: number, b: number, c: number, d: number) => void;
80
91
  readonly linter_fix: (a: number, b: number, c: number, d: number) => void;
81
92
  readonly linter_get_config: (a: number, b: number) => void;
93
+ readonly linter_get_config_warnings: (a: number, b: number) => void;
82
94
  readonly linter_new: (a: number, b: number) => void;
83
95
  readonly __wbindgen_export: (a: number, b: number) => number;
84
96
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
package/rumdl_lib.js CHANGED
@@ -203,6 +203,13 @@ function takeObject(idx) {
203
203
  dropObject(idx);
204
204
  return ret;
205
205
  }
206
+ /**
207
+ * Initialize the WASM module with better panic messages
208
+ */
209
+ export function init() {
210
+ wasm.init();
211
+ }
212
+
206
213
  /**
207
214
  * Get list of available rules as JSON
208
215
  *
@@ -249,13 +256,6 @@ export function get_version() {
249
256
  }
250
257
  }
251
258
 
252
- /**
253
- * Initialize the WASM module with better panic messages
254
- */
255
- export function init() {
256
- wasm.init();
257
- }
258
-
259
259
  const LinterFinalization = (typeof FinalizationRegistry === 'undefined')
260
260
  ? { register: () => {}, unregister: () => {} }
261
261
  : new FinalizationRegistry(ptr => wasm.__wbg_linter_free(ptr >>> 0, 1));
@@ -280,6 +280,8 @@ export class Linter {
280
280
  }
281
281
  /**
282
282
  * Get the current configuration as JSON
283
+ *
284
+ * Returns an object with global settings and rule-specific configurations.
283
285
  * @returns {string}
284
286
  */
285
287
  get_config() {
@@ -298,6 +300,31 @@ export class Linter {
298
300
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
299
301
  }
300
302
  }
303
+ /**
304
+ * Get any warnings generated during configuration parsing
305
+ *
306
+ * Returns a JSON array of warning strings. Each warning is prefixed
307
+ * with the rule name (e.g., "[MD060] Invalid severity: critical").
308
+ *
309
+ * Useful for debugging configuration issues or providing user feedback.
310
+ * @returns {string}
311
+ */
312
+ get_config_warnings() {
313
+ let deferred1_0;
314
+ let deferred1_1;
315
+ try {
316
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
317
+ wasm.linter_get_config_warnings(retptr, this.__wbg_ptr);
318
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
319
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
320
+ deferred1_0 = r0;
321
+ deferred1_1 = r1;
322
+ return getStringFromWasm0(r0, r1);
323
+ } finally {
324
+ wasm.__wbindgen_add_to_stack_pointer(16);
325
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
326
+ }
327
+ }
301
328
  /**
302
329
  * Apply all auto-fixes to the content and return the fixed content
303
330
  *
@@ -522,6 +549,10 @@ function __wbg_get_imports() {
522
549
  const ret = getObject(arg0).done;
523
550
  return ret;
524
551
  };
552
+ imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
553
+ const ret = Object.entries(getObject(arg0));
554
+ return addHeapObject(ret);
555
+ };
525
556
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
526
557
  let deferred0_0;
527
558
  let deferred0_1;
@@ -541,10 +572,6 @@ function __wbg_get_imports() {
541
572
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
542
573
  return addHeapObject(ret);
543
574
  }, arguments) };
544
- imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
545
- const ret = getObject(arg0)[getObject(arg1)];
546
- return addHeapObject(ret);
547
- };
548
575
  imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
549
576
  let result;
550
577
  try {
@@ -555,6 +582,16 @@ function __wbg_get_imports() {
555
582
  const ret = result;
556
583
  return ret;
557
584
  };
585
+ imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
586
+ let result;
587
+ try {
588
+ result = getObject(arg0) instanceof Map;
589
+ } catch (_) {
590
+ result = false;
591
+ }
592
+ const ret = result;
593
+ return ret;
594
+ };
558
595
  imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
559
596
  let result;
560
597
  try {
@@ -625,8 +662,9 @@ function __wbg_get_imports() {
625
662
  const ret = BigInt.asUintN(64, arg0);
626
663
  return addHeapObject(ret);
627
664
  };
628
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
629
- const ret = getObject(arg0);
665
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
666
+ // Cast intrinsic for `I64 -> Externref`.
667
+ const ret = arg0;
630
668
  return addHeapObject(ret);
631
669
  };
632
670
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
package/rumdl_lib_bg.wasm CHANGED
Binary file