laterite 0.4.0 → 0.5.1

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/README.md CHANGED
@@ -26,7 +26,7 @@ One clean-room Rust AGS4 engine, surfaced for every stack:
26
26
  ```ts
27
27
  import { read, validate } from "laterite";
28
28
 
29
- const ags = read("delivery.ags"); // or read(undefined, { text })
29
+ const ags = read("delivery.ags"); // path, or read(bytes) / read(undefined, { text })
30
30
  ags.groups; // ["PROJ", "LOCA", "SAMP", …]
31
31
  const loca = ags.table("LOCA"); // a born-typed apache-arrow Table
32
32
  loca.getChild("LOCA_GL")?.get(0); // → 12.3 (a number)
@@ -42,28 +42,28 @@ report.toJson(); // byte-identical to `lat-check --json
42
42
  From per-group data (arrow-js Tables or plain row objects):
43
43
 
44
44
  ```ts
45
- import { emitAgs4 } from "laterite";
45
+ import { buildAgs4 } from "laterite";
46
46
 
47
- const res = emitAgs4(new Map([
47
+ const res = buildAgs4(new Map([
48
48
  ["PROJ", [{ PROJ_ID: "P1", PROJ_NAME: "Demo" }]],
49
49
  ["LOCA", [{ LOCA_ID: "BH01", LOCA_GL: 12.3 }]],
50
50
  ]), { edition: "4.1.1", mode: "autofix" });
51
51
 
52
52
  res.text; // the AGS4 document
53
- res.write("out.ags");
53
+ res.save("out.ags");
54
54
  ```
55
55
 
56
56
  …or from a **typed builder graph** (`import { PROJ, LOCA } from "laterite"`):
57
57
 
58
58
  ```ts
59
- import { PROJ, LOCA, emitAgs4 } from "laterite";
59
+ import { PROJ, LOCA, buildAgs4 } from "laterite";
60
60
 
61
61
  const proj = new PROJ({
62
62
  PROJ_ID: "P1",
63
63
  PROJ_NAME: "Demo",
64
64
  locas: [new LOCA({ LOCA_ID: "BH01", LOCA_GL: 12.3 })],
65
65
  });
66
- emitAgs4(proj); // walks the tree → valid AGS4
66
+ buildAgs4(proj); // walks the tree → valid AGS4
67
67
  ```
68
68
 
69
69
  ## SQL across groups (optional)