@mailwoman/nominatim 6.0.0 → 6.2.0

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.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Phase-0: golden `/search` wire responses from the CURRENT nominatim drop-in (neural geocode +
7
+ * rules streetParts recovery). Spawns its own server child on a scratch port and kills ONLY that
8
+ * PID (house rule: never kill by pattern). Needs the lab data-root (weights + gazetteer).
9
+ * Run from the repo root AFTER `yarn compile`:
10
+ * `node nominatim/dev-tools/capture-search-golden.run.ts`
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=capture-search-golden.run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-search-golden.run.d.ts","sourceRoot":"","sources":["../../dev-tools/capture-search-golden.run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Phase-0: golden `/search` wire responses from the CURRENT nominatim drop-in (neural geocode +
7
+ * rules streetParts recovery). Spawns its own server child on a scratch port and kills ONLY that
8
+ * PID (house rule: never kill by pattern). Needs the lab data-root (weights + gazetteer).
9
+ * Run from the repo root AFTER `yarn compile`:
10
+ * `node nominatim/dev-tools/capture-search-golden.run.ts`
11
+ */
12
+ import { spawn } from "node:child_process";
13
+ import { readFileSync, writeFileSync } from "node:fs";
14
+ const PORT = 8199;
15
+ const BASE = `http://127.0.0.1:${PORT}`;
16
+ const PARITY_PATH = "mailwoman/test-fixtures/legacy-golden/parity-inputs.jsonl";
17
+ const SYNTHETIC_PATH = "mailwoman/test-fixtures/legacy-golden/synthetic-inputs.txt";
18
+ const OUT_PATH = "nominatim/test-fixtures/search-golden.jsonl";
19
+ const parity = readFileSync(PARITY_PATH, "utf8")
20
+ .split("\n")
21
+ .filter(Boolean)
22
+ .map((line) => JSON.parse(line));
23
+ // The streetParts leg only fires when a house number is in play — feed it the cases that have one.
24
+ const withHouseNumber = parity
25
+ .filter((row) => row.expected.some((record) => typeof record === "object" && record !== null && "house_number" in record))
26
+ .map((row) => row.input);
27
+ const syntheticInputs = readFileSync(SYNTHETIC_PATH, "utf8")
28
+ .split("\n")
29
+ .map((line) => line.trim())
30
+ .filter(Boolean);
31
+ const queries = [...new Set([...withHouseNumber.slice(0, 172), ...syntheticInputs])];
32
+ const child = spawn("node", ["nominatim/out/cli.js", "serve", "--port", String(PORT)], {
33
+ stdio: ["ignore", "inherit", "inherit"],
34
+ });
35
+ try {
36
+ const deadline = Date.now() + 180_000;
37
+ // Model + gazetteer boot takes a while; poll /status until the server answers.
38
+ for (;;) {
39
+ try {
40
+ const res = await fetch(`${BASE}/status`);
41
+ if (res.ok)
42
+ break;
43
+ }
44
+ catch {
45
+ // Not listening yet.
46
+ }
47
+ if (Date.now() > deadline)
48
+ throw new Error("nominatim serve did not become ready within 180s");
49
+ await new Promise((resolve) => setTimeout(resolve, 1000));
50
+ }
51
+ const rows = [];
52
+ for (const query of queries) {
53
+ const res = await fetch(`${BASE}/search?q=${encodeURIComponent(query)}&format=jsonv2&addressdetails=1`);
54
+ rows.push(JSON.stringify({ query, status: res.status, body: await res.json() }));
55
+ }
56
+ writeFileSync(OUT_PATH, rows.join("\n") + "\n");
57
+ console.error(`captured ${rows.length} /search responses (${withHouseNumber.length} house-number parity cases available)`);
58
+ }
59
+ finally {
60
+ child.kill("SIGTERM");
61
+ }
62
+ //# sourceMappingURL=capture-search-golden.run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-search-golden.run.js","sourceRoot":"","sources":["../../dev-tools/capture-search-golden.run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,YAAY,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CAAC;QAAS,CAAC;IACV,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AACtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/nominatim",
3
- "version": "6.0.0",
3
+ "version": "6.2.0",
4
4
  "description": "Nominatim drop-in — a Nominatim-compatible HTTP geocoding API (search / reverse / lookup / status) over the Mailwoman engine. Run it with `npx @mailwoman/nominatim serve`.",
5
5
  "license": "AGPL-3.0-only OR LicenseRef-Commercial",
6
6
  "repository": {
@@ -36,20 +36,20 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@hono/zod-openapi": "^1.4.0",
39
- "@mailwoman/annotations": "6.0.0",
40
- "@mailwoman/api-kit": "6.0.0",
41
- "@mailwoman/ban": "6.0.0",
42
- "@mailwoman/codex": "6.0.0",
43
- "@mailwoman/neural": "6.0.0",
44
- "@mailwoman/neural-weights-en-us": "6.0.0",
45
- "@mailwoman/nuts-lookup": "6.0.0",
46
- "@mailwoman/resolver": "6.0.0",
47
- "@mailwoman/resolver-wof-sqlite": "6.0.0",
48
- "@mailwoman/spatial": "6.0.0",
49
- "@mailwoman/timezone-lookup": "6.0.0",
50
- "@mailwoman/un-locode-lookup": "6.0.0",
39
+ "@mailwoman/annotations": "6.2.0",
40
+ "@mailwoman/api-kit": "6.2.0",
41
+ "@mailwoman/ban": "6.2.0",
42
+ "@mailwoman/codex": "6.2.0",
43
+ "@mailwoman/neural": "6.2.0",
44
+ "@mailwoman/neural-weights-en-us": "6.2.0",
45
+ "@mailwoman/nuts-lookup": "6.2.0",
46
+ "@mailwoman/resolver": "6.2.0",
47
+ "@mailwoman/resolver-wof-sqlite": "6.2.0",
48
+ "@mailwoman/spatial": "6.2.0",
49
+ "@mailwoman/timezone-lookup": "6.2.0",
50
+ "@mailwoman/un-locode-lookup": "6.2.0",
51
51
  "hono": "^4.12.29",
52
- "mailwoman": "6.0.0",
52
+ "mailwoman": "6.2.0",
53
53
  "zod": "^4.4.3"
54
54
  }
55
55
  }