rumdl-wasm 0.0.185 → 0.0.186

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.0.185",
8
+ "version": "0.0.186",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/rumdl_lib.d.ts CHANGED
@@ -1,13 +1,9 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Get list of available rules as JSON
5
- *
6
- * Returns a JSON array of rule info objects, each with:
7
- * - `name`: Rule name (e.g., "MD001")
8
- * - `description`: Rule description
4
+ * Get the rumdl version
9
5
  */
10
- export function get_available_rules(): string;
6
+ export function get_version(): string;
11
7
  /**
12
8
  * Lint markdown content and return warnings as JSON
13
9
  *
@@ -22,6 +18,13 @@ export function get_available_rules(): string;
22
18
  * - `fix`: Optional fix object with `start`, `end`, `replacement`
23
19
  */
24
20
  export function lint_markdown(content: string): string;
21
+ /**
22
+ * Apply a single fix to the content
23
+ *
24
+ * Takes a JSON-encoded fix object with `start`, `end`, `replacement` fields.
25
+ * Returns the content with the fix applied.
26
+ */
27
+ export function apply_fix(content: string, fix_json: string): string;
25
28
  /**
26
29
  * Apply all auto-fixes to the content and return the fixed content
27
30
  *
@@ -30,20 +33,17 @@ export function lint_markdown(content: string): string;
30
33
  */
31
34
  export function apply_all_fixes(content: string): string;
32
35
  /**
33
- * Initialize the WASM module with better panic messages
34
- */
35
- export function init(): void;
36
- /**
37
- * Get the rumdl version
36
+ * Get list of available rules as JSON
37
+ *
38
+ * Returns a JSON array of rule info objects, each with:
39
+ * - `name`: Rule name (e.g., "MD001")
40
+ * - `description`: Rule description
38
41
  */
39
- export function get_version(): string;
42
+ export function get_available_rules(): string;
40
43
  /**
41
- * Apply a single fix to the content
42
- *
43
- * Takes a JSON-encoded fix object with `start`, `end`, `replacement` fields.
44
- * Returns the content with the fix applied.
44
+ * Initialize the WASM module with better panic messages
45
45
  */
46
- export function apply_fix(content: string, fix_json: string): string;
46
+ export function init(): void;
47
47
 
48
48
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
49
49
 
package/rumdl_lib.js CHANGED
@@ -122,19 +122,15 @@ function takeObject(idx) {
122
122
  return ret;
123
123
  }
124
124
  /**
125
- * Get list of available rules as JSON
126
- *
127
- * Returns a JSON array of rule info objects, each with:
128
- * - `name`: Rule name (e.g., "MD001")
129
- * - `description`: Rule description
125
+ * Get the rumdl version
130
126
  * @returns {string}
131
127
  */
132
- export function get_available_rules() {
128
+ export function get_version() {
133
129
  let deferred1_0;
134
130
  let deferred1_1;
135
131
  try {
136
132
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
137
- wasm.get_available_rules(retptr);
133
+ wasm.get_version(retptr);
138
134
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
139
135
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
140
136
  deferred1_0 = r0;
@@ -180,6 +176,36 @@ export function lint_markdown(content) {
180
176
  }
181
177
  }
182
178
 
179
+ /**
180
+ * Apply a single fix to the content
181
+ *
182
+ * Takes a JSON-encoded fix object with `start`, `end`, `replacement` fields.
183
+ * Returns the content with the fix applied.
184
+ * @param {string} content
185
+ * @param {string} fix_json
186
+ * @returns {string}
187
+ */
188
+ export function apply_fix(content, fix_json) {
189
+ let deferred3_0;
190
+ let deferred3_1;
191
+ try {
192
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
193
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
194
+ const len0 = WASM_VECTOR_LEN;
195
+ const ptr1 = passStringToWasm0(fix_json, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
196
+ const len1 = WASM_VECTOR_LEN;
197
+ wasm.apply_fix(retptr, ptr0, len0, ptr1, len1);
198
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
199
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
200
+ deferred3_0 = r0;
201
+ deferred3_1 = r1;
202
+ return getStringFromWasm0(r0, r1);
203
+ } finally {
204
+ wasm.__wbindgen_add_to_stack_pointer(16);
205
+ wasm.__wbindgen_export(deferred3_0, deferred3_1, 1);
206
+ }
207
+ }
208
+
183
209
  /**
184
210
  * Apply all auto-fixes to the content and return the fixed content
185
211
  *
@@ -208,22 +234,19 @@ export function apply_all_fixes(content) {
208
234
  }
209
235
 
210
236
  /**
211
- * Initialize the WASM module with better panic messages
212
- */
213
- export function init() {
214
- wasm.init();
215
- }
216
-
217
- /**
218
- * Get the rumdl version
237
+ * Get list of available rules as JSON
238
+ *
239
+ * Returns a JSON array of rule info objects, each with:
240
+ * - `name`: Rule name (e.g., "MD001")
241
+ * - `description`: Rule description
219
242
  * @returns {string}
220
243
  */
221
- export function get_version() {
244
+ export function get_available_rules() {
222
245
  let deferred1_0;
223
246
  let deferred1_1;
224
247
  try {
225
248
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
226
- wasm.get_version(retptr);
249
+ wasm.get_available_rules(retptr);
227
250
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
228
251
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
229
252
  deferred1_0 = r0;
@@ -236,33 +259,10 @@ export function get_version() {
236
259
  }
237
260
 
238
261
  /**
239
- * Apply a single fix to the content
240
- *
241
- * Takes a JSON-encoded fix object with `start`, `end`, `replacement` fields.
242
- * Returns the content with the fix applied.
243
- * @param {string} content
244
- * @param {string} fix_json
245
- * @returns {string}
262
+ * Initialize the WASM module with better panic messages
246
263
  */
247
- export function apply_fix(content, fix_json) {
248
- let deferred3_0;
249
- let deferred3_1;
250
- try {
251
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
252
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
253
- const len0 = WASM_VECTOR_LEN;
254
- const ptr1 = passStringToWasm0(fix_json, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
255
- const len1 = WASM_VECTOR_LEN;
256
- wasm.apply_fix(retptr, ptr0, len0, ptr1, len1);
257
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
258
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
259
- deferred3_0 = r0;
260
- deferred3_1 = r1;
261
- return getStringFromWasm0(r0, r1);
262
- } finally {
263
- wasm.__wbindgen_add_to_stack_pointer(16);
264
- wasm.__wbindgen_export(deferred3_0, deferred3_1, 1);
265
- }
264
+ export function init() {
265
+ wasm.init();
266
266
  }
267
267
 
268
268
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
package/rumdl_lib_bg.wasm CHANGED
Binary file