md4x 0.0.5 → 0.0.7

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.
Binary file
Binary file
Binary file
Binary file
package/build/md4x.wasm CHANGED
Binary file
Binary file
Binary file
package/lib/cli.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { parseArgs } from "node:util";
4
4
  import { readFileSync, writeFileSync } from "node:fs";
5
- import { renderToHtml, renderToAnsi, renderToJson } from "./napi.mjs";
5
+ import { renderToHtml, renderToAnsi, renderToAST } from "./napi.mjs";
6
6
 
7
7
  const { values, positionals } = parseArgs({
8
8
  allowPositionals: true,
@@ -147,7 +147,7 @@ switch (format) {
147
147
  output = renderToHtml(input);
148
148
  break;
149
149
  case "json":
150
- output = JSON.stringify(renderToJson(input));
150
+ output = JSON.stringify(renderToAST(input));
151
151
  break;
152
152
  case "ansi":
153
153
  output = renderToAnsi(input);
package/lib/napi.d.mts CHANGED
@@ -9,6 +9,6 @@ export type {
9
9
  } from "./types.js";
10
10
 
11
11
  export declare function renderToHtml(input: string): string;
12
- export declare function renderToJson(input: string): string;
12
+ export declare function renderToAST(input: string): string;
13
13
  export declare function parseAST(input: string): ComarkTree;
14
14
  export declare function renderToAnsi(input: string): string;
package/lib/napi.mjs CHANGED
@@ -13,12 +13,12 @@ export function renderToHtml(input) {
13
13
  return binding.renderToHtml(input);
14
14
  }
15
15
 
16
- export function renderToJson(input) {
17
- return binding.renderToJson(input);
16
+ export function renderToAST(input) {
17
+ return binding.renderToAST(input);
18
18
  }
19
19
 
20
20
  export function parseAST(input) {
21
- return JSON.parse(renderToJson(input));
21
+ return JSON.parse(renderToAST(input));
22
22
  }
23
23
 
24
24
  export function renderToAnsi(input) {
package/lib/wasm.d.mts CHANGED
@@ -17,6 +17,6 @@ export declare function initWasm(
17
17
  | Promise<Response>,
18
18
  ): Promise<void>;
19
19
  export declare function renderToHtml(input: string): string;
20
- export declare function renderToJson(input: string): string;
20
+ export declare function renderToAST(input: string): string;
21
21
  export declare function parseAST(input: string): ComarkTree;
22
22
  export declare function renderToAnsi(input: string): string;
package/lib/wasm.mjs CHANGED
@@ -51,12 +51,12 @@ export function renderToHtml(input) {
51
51
  return render(getExports(), getExports().md4x_to_html, input);
52
52
  }
53
53
 
54
- export function renderToJson(input) {
55
- return render(getExports(), getExports().md4x_to_json, input);
54
+ export function renderToAST(input) {
55
+ return render(getExports(), getExports().md4x_to_ast, input);
56
56
  }
57
57
 
58
58
  export function parseAST(input) {
59
- return JSON.parse(renderToJson(input));
59
+ return JSON.parse(renderToAST(input));
60
60
  }
61
61
 
62
62
  export function renderToAnsi(input) {
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "md4x",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
+ "repository": "pi0/md4x",
6
7
  "bin": {
7
8
  "md4x": "./lib/cli.mjs"
8
9
  },
@@ -22,7 +23,7 @@
22
23
  }
23
24
  },
24
25
  "scripts": {
25
- "prepack": "rm -rf build && mkdir build && cd ../.. && bun run build"
26
+ "prepack": "cd ../.. && zig build --verbose"
26
27
  },
27
28
  "files": [
28
29
  "build",