rumdl-wasm 0.1.8 → 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.8",
8
+ "version": "0.1.10",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/rumdl_lib.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Get the rumdl version
4
+ * Initialize the WASM module with better panic messages
5
5
  */
6
- export function get_version(): string;
6
+ export function init(): void;
7
7
  /**
8
8
  * Get list of available rules as JSON
9
9
  *
@@ -13,9 +13,9 @@ export function get_version(): string;
13
13
  */
14
14
  export function get_available_rules(): string;
15
15
  /**
16
- * Initialize the WASM module with better panic messages
16
+ * Get the rumdl version
17
17
  */
18
- export function init(): void;
18
+ export function get_version(): string;
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
@@ -204,15 +204,26 @@ function takeObject(idx) {
204
204
  return ret;
205
205
  }
206
206
  /**
207
- * Get the rumdl version
207
+ * Initialize the WASM module with better panic messages
208
+ */
209
+ export function init() {
210
+ wasm.init();
211
+ }
212
+
213
+ /**
214
+ * Get list of available rules as JSON
215
+ *
216
+ * Returns a JSON array of rule info objects, each with:
217
+ * - `name`: Rule name (e.g., "MD001")
218
+ * - `description`: Rule description
208
219
  * @returns {string}
209
220
  */
210
- export function get_version() {
221
+ export function get_available_rules() {
211
222
  let deferred1_0;
212
223
  let deferred1_1;
213
224
  try {
214
225
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
215
- wasm.get_version(retptr);
226
+ wasm.get_available_rules(retptr);
216
227
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
217
228
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
218
229
  deferred1_0 = r0;
@@ -225,19 +236,15 @@ export function get_version() {
225
236
  }
226
237
 
227
238
  /**
228
- * Get list of available rules as JSON
229
- *
230
- * Returns a JSON array of rule info objects, each with:
231
- * - `name`: Rule name (e.g., "MD001")
232
- * - `description`: Rule description
239
+ * Get the rumdl version
233
240
  * @returns {string}
234
241
  */
235
- export function get_available_rules() {
242
+ export function get_version() {
236
243
  let deferred1_0;
237
244
  let deferred1_1;
238
245
  try {
239
246
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
240
- wasm.get_available_rules(retptr);
247
+ wasm.get_version(retptr);
241
248
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
242
249
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
243
250
  deferred1_0 = r0;
@@ -249,13 +256,6 @@ export function get_available_rules() {
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