@mailwoman/core 10.1.0 → 10.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.
Files changed (429) hide show
  1. package/lib/api/APIClient.ts +5 -6
  2. package/lib/api/arcgis.ts +5 -5
  3. package/lib/api/ckan.ts +2 -1
  4. package/lib/api/disk-storage.ts +3 -3
  5. package/lib/api/ogc.ts +56 -52
  6. package/lib/api/pacer.ts +1 -1
  7. package/lib/api/retry.ts +6 -4
  8. package/lib/api/test/transport.ts +20 -20
  9. package/lib/api.ts +1 -0
  10. package/lib/coarse-placer/coarse-placer.ts +4 -3
  11. package/lib/crypto/node.ts +1 -2
  12. package/lib/decoder/build-tree.ts +5 -5
  13. package/lib/decoder/parse-diff.ts +47 -31
  14. package/lib/decoder/proposals-to-tree.ts +1 -0
  15. package/lib/decoder/serialize/json.ts +9 -6
  16. package/lib/decoder/serialize/tuples.ts +2 -1
  17. package/lib/decoder/serialize/xml.ts +15 -14
  18. package/lib/decoder/tree/shape.ts +14 -14
  19. package/lib/decoder/tree/walk.ts +2 -2
  20. package/lib/decoder/types.ts +48 -2
  21. package/lib/env/schema.ts +21 -23
  22. package/lib/env/utils.ts +4 -3
  23. package/lib/env.ts +4 -4
  24. package/lib/fs/delimited.ts +35 -1
  25. package/lib/fs/readers.ts +2 -5
  26. package/lib/fs/zip.ts +1 -1
  27. package/lib/geocode/result.ts +337 -0
  28. package/lib/git.ts +1 -1
  29. package/lib/html/document.ts +6 -6
  30. package/lib/html/elements.ts +26 -23
  31. package/lib/identical.ts +20 -0
  32. package/lib/json.ts +5 -7
  33. package/lib/layers/coverage.ts +28 -1
  34. package/lib/layers/feature-count.ts +3 -3
  35. package/lib/layers/manifest.ts +22 -21
  36. package/lib/layers/schema.ts +25 -1
  37. package/lib/license/configured.ts +3 -3
  38. package/lib/license/key/file.ts +2 -1
  39. package/lib/license/key.ts +3 -3
  40. package/lib/license/stamp.ts +4 -4
  41. package/lib/locale/locale.ts +1 -1
  42. package/lib/locale/registry.ts +2 -2
  43. package/lib/module/compiled-freshness.ts +1 -1
  44. package/lib/module/package-command.ts +4 -2
  45. package/lib/module/packaged-data.ts +1 -1
  46. package/lib/module/resolve-from.ts +1 -1
  47. package/lib/numeric.ts +4 -4
  48. package/lib/objects.ts +3 -0
  49. package/lib/paths.ts +16 -1
  50. package/lib/pipeline/client-result.ts +14 -14
  51. package/lib/pipeline/result.ts +5 -4
  52. package/lib/pipeline/runtime-pipeline.ts +65 -42
  53. package/lib/pipeline/span-proposer.ts +1 -1
  54. package/lib/pipeline/types.ts +328 -161
  55. package/lib/pipeline.ts +32 -7
  56. package/lib/policy/proposal-collection.ts +1 -1
  57. package/lib/policy/registry.ts +5 -3
  58. package/lib/resolver/authoritative-provider.ts +17 -17
  59. package/lib/resolver/coverage-facts.ts +3 -3
  60. package/lib/resolver/fixture-authoritative-provider.ts +4 -0
  61. package/lib/resolver/lookup-types.ts +54 -14
  62. package/lib/resolver/postcode-format.ts +9 -9
  63. package/lib/resolver/referential.ts +2 -2
  64. package/lib/resolver/types.ts +155 -51
  65. package/lib/resolver.ts +22 -20
  66. package/lib/resources/git.ts +1 -1
  67. package/lib/resources/languages.ts +0 -2
  68. package/lib/resources/libpostal.ts +1 -1
  69. package/lib/resources/whosonfirst/PlacetypeDataSource.ts +2 -6
  70. package/lib/resources/whosonfirst/extract-repo.ts +2 -1
  71. package/lib/resources/whosonfirst/placetypes/admin.ts +20 -25
  72. package/lib/resources/whosonfirst/placetypes/mermaid.ts +4 -3
  73. package/lib/resources/whosonfirst/placetypes/specificity.ts +7 -7
  74. package/lib/resources.ts +1 -0
  75. package/lib/scripting/arguments.ts +6 -5
  76. package/lib/scripting/command.ts +3 -2
  77. package/lib/scripting/operation.ts +2 -2
  78. package/lib/scripting/utils.ts +3 -5
  79. package/lib/strings/python-json.ts +1 -1
  80. package/lib/tokenization/Span.ts +1 -1
  81. package/lib/trust-policies.ts +0 -2
  82. package/lib/types/Classification.ts +1 -1
  83. package/lib/types/classifier.ts +1 -1
  84. package/lib/utils/geodatabase-archive.ts +13 -5
  85. package/lib/utils/sqlite-rows.ts +3 -3
  86. package/lib/utils/stream-to-disk.ts +1 -3
  87. package/lib/utils/union-find.ts +1 -1
  88. package/lib/vale.ts +1 -1
  89. package/lib/workspaces.ts +2 -2
  90. package/out/api/APIClient.d.ts +3 -3
  91. package/out/api/APIClient.d.ts.map +1 -1
  92. package/out/api/APIClient.js +2 -3
  93. package/out/api/APIClient.js.map +1 -1
  94. package/out/api/arcgis.d.ts +2 -2
  95. package/out/api/arcgis.d.ts.map +1 -1
  96. package/out/api/arcgis.js +6 -6
  97. package/out/api/arcgis.js.map +1 -1
  98. package/out/api/ckan.d.ts +2 -1
  99. package/out/api/ckan.d.ts.map +1 -1
  100. package/out/api/ckan.js.map +1 -1
  101. package/out/api/disk-storage.d.ts +1 -1
  102. package/out/api/disk-storage.js +2 -2
  103. package/out/api/disk-storage.js.map +1 -1
  104. package/out/api/ogc.d.ts +32 -27
  105. package/out/api/ogc.d.ts.map +1 -1
  106. package/out/api/ogc.js +41 -46
  107. package/out/api/ogc.js.map +1 -1
  108. package/out/api/pacer.d.ts +1 -1
  109. package/out/api/pacer.js +1 -1
  110. package/out/api/retry.d.ts +6 -4
  111. package/out/api/retry.d.ts.map +1 -1
  112. package/out/api/retry.js +1 -1
  113. package/out/api/retry.js.map +1 -1
  114. package/out/api/test/transport.d.ts +11 -11
  115. package/out/api/test/transport.d.ts.map +1 -1
  116. package/out/api/test/transport.js +16 -16
  117. package/out/api/test/transport.js.map +1 -1
  118. package/out/api.d.ts +1 -0
  119. package/out/api.d.ts.map +1 -1
  120. package/out/api.js +1 -0
  121. package/out/api.js.map +1 -1
  122. package/out/coarse-placer/coarse-placer.d.ts +3 -2
  123. package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
  124. package/out/coarse-placer/coarse-placer.js +1 -1
  125. package/out/coarse-placer/coarse-placer.js.map +1 -1
  126. package/out/crypto/node.d.ts +1 -2
  127. package/out/crypto/node.d.ts.map +1 -1
  128. package/out/crypto/node.js +1 -2
  129. package/out/crypto/node.js.map +1 -1
  130. package/out/decoder/build-tree.js +5 -5
  131. package/out/decoder/build-tree.js.map +1 -1
  132. package/out/decoder/parse-diff.d.ts +19 -19
  133. package/out/decoder/parse-diff.d.ts.map +1 -1
  134. package/out/decoder/parse-diff.js +28 -12
  135. package/out/decoder/parse-diff.js.map +1 -1
  136. package/out/decoder/proposals-to-tree.d.ts.map +1 -1
  137. package/out/decoder/proposals-to-tree.js +1 -0
  138. package/out/decoder/proposals-to-tree.js.map +1 -1
  139. package/out/decoder/serialize/json.d.ts +35 -17
  140. package/out/decoder/serialize/json.d.ts.map +1 -1
  141. package/out/decoder/serialize/json.js +28 -0
  142. package/out/decoder/serialize/json.js.map +1 -1
  143. package/out/decoder/serialize/tuples.d.ts +2 -1
  144. package/out/decoder/serialize/tuples.d.ts.map +1 -1
  145. package/out/decoder/serialize/tuples.js.map +1 -1
  146. package/out/decoder/serialize/xml.d.ts +12 -11
  147. package/out/decoder/serialize/xml.d.ts.map +1 -1
  148. package/out/decoder/serialize/xml.js +3 -3
  149. package/out/decoder/serialize/xml.js.map +1 -1
  150. package/out/decoder/tree/shape.d.ts +6 -6
  151. package/out/decoder/tree/shape.d.ts.map +1 -1
  152. package/out/decoder/tree/shape.js +8 -8
  153. package/out/decoder/tree/shape.js.map +1 -1
  154. package/out/decoder/tree/walk.d.ts +1 -1
  155. package/out/decoder/tree/walk.d.ts.map +1 -1
  156. package/out/decoder/tree/walk.js +1 -1
  157. package/out/decoder/tree/walk.js.map +1 -1
  158. package/out/decoder/types.d.ts +55 -2
  159. package/out/decoder/types.d.ts.map +1 -1
  160. package/out/decoder/types.js +39 -1
  161. package/out/decoder/types.js.map +1 -1
  162. package/out/env/schema.d.ts +11 -12
  163. package/out/env/schema.d.ts.map +1 -1
  164. package/out/env/schema.js +15 -17
  165. package/out/env/schema.js.map +1 -1
  166. package/out/env/utils.d.ts +2 -2
  167. package/out/env/utils.d.ts.map +1 -1
  168. package/out/env/utils.js +2 -2
  169. package/out/env/utils.js.map +1 -1
  170. package/out/env.js +4 -4
  171. package/out/env.js.map +1 -1
  172. package/out/fs/delimited.d.ts +18 -0
  173. package/out/fs/delimited.d.ts.map +1 -1
  174. package/out/fs/delimited.js +31 -1
  175. package/out/fs/delimited.js.map +1 -1
  176. package/out/fs/readers.d.ts +2 -4
  177. package/out/fs/readers.d.ts.map +1 -1
  178. package/out/fs/readers.js +2 -4
  179. package/out/fs/readers.js.map +1 -1
  180. package/out/fs/zip.js +1 -1
  181. package/out/fs/zip.js.map +1 -1
  182. package/out/geocode/result.d.ts +475 -0
  183. package/out/geocode/result.d.ts.map +1 -0
  184. package/out/geocode/result.js +280 -0
  185. package/out/geocode/result.js.map +1 -0
  186. package/out/git.js +1 -1
  187. package/out/git.js.map +1 -1
  188. package/out/html/document.d.ts +3 -3
  189. package/out/html/document.d.ts.map +1 -1
  190. package/out/html/document.js +4 -4
  191. package/out/html/document.js.map +1 -1
  192. package/out/html/elements.d.ts +18 -15
  193. package/out/html/elements.d.ts.map +1 -1
  194. package/out/html/elements.js +17 -16
  195. package/out/html/elements.js.map +1 -1
  196. package/out/identical.d.ts +16 -0
  197. package/out/identical.d.ts.map +1 -0
  198. package/out/identical.js +19 -0
  199. package/out/identical.js.map +1 -0
  200. package/out/json.d.ts +3 -5
  201. package/out/json.d.ts.map +1 -1
  202. package/out/json.js +3 -5
  203. package/out/json.js.map +1 -1
  204. package/out/layers/coverage.d.ts +26 -1
  205. package/out/layers/coverage.d.ts.map +1 -1
  206. package/out/layers/coverage.js.map +1 -1
  207. package/out/layers/feature-count.d.ts +1 -1
  208. package/out/layers/feature-count.d.ts.map +1 -1
  209. package/out/layers/feature-count.js +2 -2
  210. package/out/layers/feature-count.js.map +1 -1
  211. package/out/layers/manifest.d.ts +11 -10
  212. package/out/layers/manifest.d.ts.map +1 -1
  213. package/out/layers/manifest.js +12 -13
  214. package/out/layers/manifest.js.map +1 -1
  215. package/out/layers/schema.d.ts +23 -0
  216. package/out/layers/schema.d.ts.map +1 -1
  217. package/out/layers/schema.js +1 -1
  218. package/out/layers/schema.js.map +1 -1
  219. package/out/license/configured.d.ts +1 -1
  220. package/out/license/configured.d.ts.map +1 -1
  221. package/out/license/configured.js +2 -2
  222. package/out/license/configured.js.map +1 -1
  223. package/out/license/key/file.d.ts.map +1 -1
  224. package/out/license/key/file.js +2 -1
  225. package/out/license/key/file.js.map +1 -1
  226. package/out/license/key.d.ts +1 -1
  227. package/out/license/key.d.ts.map +1 -1
  228. package/out/license/key.js +2 -2
  229. package/out/license/key.js.map +1 -1
  230. package/out/license/stamp.d.ts +2 -2
  231. package/out/license/stamp.d.ts.map +1 -1
  232. package/out/license/stamp.js +2 -2
  233. package/out/license/stamp.js.map +1 -1
  234. package/out/locale/locale.d.ts +1 -1
  235. package/out/locale/locale.d.ts.map +1 -1
  236. package/out/locale/registry.d.ts +1 -1
  237. package/out/locale/registry.d.ts.map +1 -1
  238. package/out/locale/registry.js +1 -1
  239. package/out/locale/registry.js.map +1 -1
  240. package/out/module/compiled-freshness.js +1 -1
  241. package/out/module/compiled-freshness.js.map +1 -1
  242. package/out/module/package-command.d.ts +3 -2
  243. package/out/module/package-command.d.ts.map +1 -1
  244. package/out/module/package-command.js +3 -2
  245. package/out/module/package-command.js.map +1 -1
  246. package/out/module/packaged-data.js +1 -1
  247. package/out/module/packaged-data.js.map +1 -1
  248. package/out/module/resolve-from.js +1 -1
  249. package/out/module/resolve-from.js.map +1 -1
  250. package/out/numeric.d.ts +1 -1
  251. package/out/numeric.d.ts.map +1 -1
  252. package/out/numeric.js +3 -3
  253. package/out/numeric.js.map +1 -1
  254. package/out/objects.d.ts +3 -0
  255. package/out/objects.d.ts.map +1 -1
  256. package/out/objects.js +3 -0
  257. package/out/objects.js.map +1 -1
  258. package/out/paths.d.ts +20 -1
  259. package/out/paths.d.ts.map +1 -1
  260. package/out/paths.js +1 -1
  261. package/out/paths.js.map +1 -1
  262. package/out/pipeline/client-result.d.ts +15 -15
  263. package/out/pipeline/client-result.d.ts.map +1 -1
  264. package/out/pipeline/client-result.js +1 -1
  265. package/out/pipeline/result.d.ts +4 -3
  266. package/out/pipeline/result.d.ts.map +1 -1
  267. package/out/pipeline/runtime-pipeline.d.ts +16 -9
  268. package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
  269. package/out/pipeline/runtime-pipeline.js +43 -27
  270. package/out/pipeline/runtime-pipeline.js.map +1 -1
  271. package/out/pipeline/span-proposer.js +1 -1
  272. package/out/pipeline/span-proposer.js.map +1 -1
  273. package/out/pipeline/types.d.ts +394 -175
  274. package/out/pipeline/types.d.ts.map +1 -1
  275. package/out/pipeline/types.js +199 -4
  276. package/out/pipeline/types.js.map +1 -1
  277. package/out/pipeline.d.ts +4 -2
  278. package/out/pipeline.d.ts.map +1 -1
  279. package/out/pipeline.js +1 -1
  280. package/out/pipeline.js.map +1 -1
  281. package/out/policy/proposal-collection.d.ts +1 -1
  282. package/out/policy/proposal-collection.d.ts.map +1 -1
  283. package/out/policy/proposal-collection.js.map +1 -1
  284. package/out/policy/registry.d.ts +3 -1
  285. package/out/policy/registry.d.ts.map +1 -1
  286. package/out/policy/registry.js +4 -2
  287. package/out/policy/registry.js.map +1 -1
  288. package/out/resolver/authoritative-provider.d.ts +17 -17
  289. package/out/resolver/authoritative-provider.d.ts.map +1 -1
  290. package/out/resolver/authoritative-provider.js +2 -2
  291. package/out/resolver/coverage-facts.d.ts +3 -3
  292. package/out/resolver/coverage-facts.d.ts.map +1 -1
  293. package/out/resolver/fixture-authoritative-provider.d.ts.map +1 -1
  294. package/out/resolver/fixture-authoritative-provider.js +4 -0
  295. package/out/resolver/fixture-authoritative-provider.js.map +1 -1
  296. package/out/resolver/lookup-types.d.ts +52 -15
  297. package/out/resolver/lookup-types.d.ts.map +1 -1
  298. package/out/resolver/postcode-format.d.ts +3 -3
  299. package/out/resolver/postcode-format.d.ts.map +1 -1
  300. package/out/resolver/postcode-format.js +7 -7
  301. package/out/resolver/postcode-format.js.map +1 -1
  302. package/out/resolver/referential.d.ts +2 -2
  303. package/out/resolver/referential.d.ts.map +1 -1
  304. package/out/resolver/types.d.ts +126 -40
  305. package/out/resolver/types.d.ts.map +1 -1
  306. package/out/resolver/types.js +43 -1
  307. package/out/resolver/types.js.map +1 -1
  308. package/out/resolver.d.ts +5 -3
  309. package/out/resolver.d.ts.map +1 -1
  310. package/out/resolver.js +2 -2
  311. package/out/resolver.js.map +1 -1
  312. package/out/resources/git.js +1 -1
  313. package/out/resources/git.js.map +1 -1
  314. package/out/resources/languages.d.ts +0 -1
  315. package/out/resources/languages.d.ts.map +1 -1
  316. package/out/resources/languages.js +0 -1
  317. package/out/resources/languages.js.map +1 -1
  318. package/out/resources/libpostal.d.ts +1 -1
  319. package/out/resources/libpostal.d.ts.map +1 -1
  320. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +1 -1
  321. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
  322. package/out/resources/whosonfirst/PlacetypeDataSource.js +2 -1
  323. package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
  324. package/out/resources/whosonfirst/extract-repo.d.ts.map +1 -1
  325. package/out/resources/whosonfirst/extract-repo.js +2 -1
  326. package/out/resources/whosonfirst/extract-repo.js.map +1 -1
  327. package/out/resources/whosonfirst/placetypes/admin.d.ts +12 -12
  328. package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
  329. package/out/resources/whosonfirst/placetypes/admin.js +9 -8
  330. package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
  331. package/out/resources/whosonfirst/placetypes/mermaid.d.ts +2 -1
  332. package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
  333. package/out/resources/whosonfirst/placetypes/mermaid.js +1 -1
  334. package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
  335. package/out/resources/whosonfirst/placetypes/specificity.d.ts +3 -3
  336. package/out/resources/whosonfirst/placetypes/specificity.d.ts.map +1 -1
  337. package/out/resources/whosonfirst/placetypes/specificity.js +6 -6
  338. package/out/resources/whosonfirst/placetypes/specificity.js.map +1 -1
  339. package/out/resources.d.ts +1 -0
  340. package/out/resources.d.ts.map +1 -1
  341. package/out/resources.js +1 -0
  342. package/out/resources.js.map +1 -1
  343. package/out/scripting/arguments.d.ts +5 -4
  344. package/out/scripting/arguments.d.ts.map +1 -1
  345. package/out/scripting/arguments.js +5 -4
  346. package/out/scripting/arguments.js.map +1 -1
  347. package/out/scripting/command.d.ts +2 -2
  348. package/out/scripting/command.d.ts.map +1 -1
  349. package/out/scripting/command.js +1 -0
  350. package/out/scripting/command.js.map +1 -1
  351. package/out/scripting/operation.d.ts +1 -1
  352. package/out/scripting/operation.d.ts.map +1 -1
  353. package/out/scripting/operation.js +1 -1
  354. package/out/scripting/operation.js.map +1 -1
  355. package/out/scripting/utils.d.ts +3 -4
  356. package/out/scripting/utils.d.ts.map +1 -1
  357. package/out/scripting/utils.js +3 -4
  358. package/out/scripting/utils.js.map +1 -1
  359. package/out/strings/python-json.js +1 -1
  360. package/out/strings/python-json.js.map +1 -1
  361. package/out/tokenization/Span.d.ts +1 -1
  362. package/out/tokenization/Span.d.ts.map +1 -1
  363. package/out/tools/coarse-placer/build/dataset.d.ts +4 -2
  364. package/out/tools/coarse-placer/build/dataset.d.ts.map +1 -1
  365. package/out/tools/coarse-placer/build/dataset.js.map +1 -1
  366. package/out/tools/coarse-placer/build/outlier/exposure.d.ts +5 -3
  367. package/out/tools/coarse-placer/build/outlier/exposure.d.ts.map +1 -1
  368. package/out/tools/coarse-placer/build/outlier/exposure.js.map +1 -1
  369. package/out/tools/coarse-placer/build/outlier/latin.d.ts +3 -3
  370. package/out/tools/coarse-placer/build/outlier/oa.d.ts +3 -3
  371. package/out/tools/coarse-placer/eval/latin-offmap.d.ts +3 -3
  372. package/out/tools/coarse-placer/eval/openset.js +2 -2
  373. package/out/tools/coarse-placer/eval/openset.js.map +1 -1
  374. package/out/tools/coarse-placer/eval/quant-compare.d.ts +4 -4
  375. package/out/tools/coarse-placer/eval.d.ts +3 -3
  376. package/out/tools/coarse-placer/paths.js +1 -1
  377. package/out/tools/coarse-placer/paths.js.map +1 -1
  378. package/out/tools/coarse-placer/probe-frontier.d.ts +2 -2
  379. package/out/tools/coarse-placer/quantize.d.ts +2 -2
  380. package/out/tools/coarse-placer/train.d.ts +5 -5
  381. package/out/tools/download/libpostal-resources.d.ts.map +1 -1
  382. package/out/tools/download/libpostal-resources.js +2 -1
  383. package/out/tools/download/libpostal-resources.js.map +1 -1
  384. package/out/tools/download/ssl-address.d.ts +2 -2
  385. package/out/tools/generate-language-types.d.ts +1 -1
  386. package/out/tools/generate-language-types.js +1 -1
  387. package/out/tools/generate-language-types.js.map +1 -1
  388. package/out/trust-policies.d.ts +0 -1
  389. package/out/trust-policies.d.ts.map +1 -1
  390. package/out/trust-policies.js +0 -1
  391. package/out/trust-policies.js.map +1 -1
  392. package/out/types/Classification.d.ts +1 -1
  393. package/out/types/Classification.d.ts.map +1 -1
  394. package/out/types/classifier.d.ts +1 -1
  395. package/out/types/classifier.d.ts.map +1 -1
  396. package/out/utils/geodatabase-archive.d.ts +11 -4
  397. package/out/utils/geodatabase-archive.d.ts.map +1 -1
  398. package/out/utils/geodatabase-archive.js +1 -1
  399. package/out/utils/geodatabase-archive.js.map +1 -1
  400. package/out/utils/sqlite-rows.d.ts +2 -2
  401. package/out/utils/sqlite-rows.d.ts.map +1 -1
  402. package/out/utils/sqlite-rows.js +2 -2
  403. package/out/utils/sqlite-rows.js.map +1 -1
  404. package/out/utils/stream-to-disk.d.ts.map +1 -1
  405. package/out/utils/stream-to-disk.js +1 -1
  406. package/out/utils/stream-to-disk.js.map +1 -1
  407. package/out/utils/union-find.js +1 -1
  408. package/out/utils/union-find.js.map +1 -1
  409. package/out/vale.js +1 -1
  410. package/out/vale.js.map +1 -1
  411. package/out/workspaces.d.ts +1 -1
  412. package/out/workspaces.js +1 -1
  413. package/out/workspaces.js.map +1 -1
  414. package/package.json +46 -14
  415. package/tools/coarse-placer/build/dataset.ts +4 -2
  416. package/tools/coarse-placer/build/outlier/exposure.ts +5 -3
  417. package/tools/coarse-placer/build/outlier/latin.ts +3 -3
  418. package/tools/coarse-placer/build/outlier/oa.ts +3 -3
  419. package/tools/coarse-placer/eval/latin-offmap.ts +3 -3
  420. package/tools/coarse-placer/eval/openset.ts +3 -3
  421. package/tools/coarse-placer/eval/quant-compare.ts +4 -4
  422. package/tools/coarse-placer/eval.ts +3 -3
  423. package/tools/coarse-placer/paths.ts +1 -1
  424. package/tools/coarse-placer/probe-frontier.ts +2 -2
  425. package/tools/coarse-placer/quantize.ts +2 -2
  426. package/tools/coarse-placer/train.ts +5 -5
  427. package/tools/download/libpostal-resources.ts +2 -1
  428. package/tools/download/ssl-address.ts +2 -2
  429. package/tools/generate-language-types.ts +3 -3
@@ -42,7 +42,7 @@ export interface LayerManifest {
42
42
  schemaVersion: number
43
43
  tier: LayerTier
44
44
  license: string
45
- attribution?: string
45
+ attribution: string | null
46
46
  source: string
47
47
  sourceVintage: string
48
48
  buildCmd: string
@@ -59,12 +59,12 @@ export interface LayerManifest {
59
59
  * Overture removes a release from its bucket once a newer one lands.
60
60
  * A build that filtered its input leaves no way to count what the input held.
61
61
  *
62
- * Absent means the build did not record it.
62
+ * `null` means the build did not record it.
63
63
  * Every artifact built before this field has that state.
64
64
  *
65
65
  * A reader distinguishes that from a recorded zero and never reports the two the same way.
66
66
  */
67
- sourceRecords?: Readonly<Record<string, number>>
67
+ sourceRecords: Readonly<Record<string, number>> | null
68
68
  }
69
69
 
70
70
  export interface CoverageCell {
@@ -72,7 +72,8 @@ export interface CoverageCell {
72
72
  completeness: number
73
73
  /**
74
74
  * Evidence basis for completeness.
75
- * Defaults to `SourcePresent`.
75
+ *
76
+ * @defaultValue `SourcePresent`
76
77
  */
77
78
  basis?: CoverageBasis
78
79
  observedRows: number
@@ -88,7 +89,7 @@ function assertCoverageCellInvariants(cell: CoverageCell): void {
88
89
  throw new Error(`layer coverage: completeness must be a finite value in [0, 1], got ${cell.completeness}`)
89
90
  }
90
91
 
91
- if (cell.basis !== undefined && !BASES.has(cell.basis)) {
92
+ if (cell.basis && !BASES.has(cell.basis)) {
92
93
  throw new Error(`layer coverage: unknown basis ${stringifyJSON(cell.basis)}`)
93
94
  }
94
95
 
@@ -140,14 +141,14 @@ export interface CoverageRow {
140
141
  /**
141
142
  * Convert a stored row to a coverage cell.
142
143
  *
143
- * Legacy NULL bases map to `SourcePresent`; missing rows remain undefined.
144
+ * Legacy NULL bases map to `SourcePresent`; missing rows map to null.
144
145
  */
145
146
  export function toCoverageCell(
146
- row: CoverageRow | undefined,
147
+ row: CoverageRow | null,
147
148
  h3CellIndex: string,
148
149
  resolution: number
149
- ): (CoverageCell & { h3CellIndex: string; resolution: number }) | undefined {
150
- if (!row) return undefined
150
+ ): (CoverageCell & { h3CellIndex: string; resolution: number }) | null {
151
+ if (!row) return null
151
152
 
152
153
  return {
153
154
  h3Cell: row.h3_cell,
@@ -184,7 +185,7 @@ export function toLayerManifest(row: Record<string, string | number | null>): La
184
185
  schemaVersion: Number(row.schema_version),
185
186
  tier: String(row.tier) as LayerTier,
186
187
  license: String(row.license),
187
- ...(row.attribution === null || row.attribution === undefined ? {} : { attribution: String(row.attribution) }),
188
+ attribution: row.attribution == null ? null : String(row.attribution),
188
189
  source: String(row.source),
189
190
  sourceVintage: String(row.source_vintage),
190
191
  buildCmd: String(row.build_cmd),
@@ -192,6 +193,8 @@ export function toLayerManifest(row: Record<string, string | number | null>): La
192
193
  freshnessPolicy: String(row.freshness_policy) as LayerFreshnessPolicy,
193
194
  spineKeys: parseJSONStrict<SpineKeys>(String(row.spine_keys)),
194
195
  createdAt: String(row.created_at),
196
+ sourceRecords:
197
+ row.source_records == null ? null : parseJSONStrict<Record<string, number>>(String(row.source_records)),
195
198
  }
196
199
 
197
200
  assertManifestInvariants(manifest)
@@ -282,7 +285,7 @@ export function polygonLayerManifest(
282
285
  */
283
286
  cellColumn: string
284
287
  /**
285
- * Defaults to `Shipped`.
288
+ * @defaultValue `Shipped`
286
289
  */
287
290
  tier?: LayerTier
288
291
  }
@@ -307,6 +310,7 @@ export function polygonLayerManifest(
307
310
  h3: { column: product.cellColumn, resolution: options.indexResolution },
308
311
  },
309
312
  createdAt: options.createdAt,
313
+ sourceRecords: null,
310
314
  }
311
315
  }
312
316
 
@@ -324,7 +328,7 @@ export async function writeLayerManifest(db: layerschemahandle, manifest: LayerM
324
328
  schema_version: manifest.schemaVersion,
325
329
  tier: manifest.tier,
326
330
  license: manifest.license,
327
- attribution: manifest.attribution ?? null,
331
+ attribution: manifest.attribution,
328
332
  source: manifest.source,
329
333
  source_vintage: manifest.sourceVintage,
330
334
  build_cmd: manifest.buildCmd,
@@ -332,7 +336,7 @@ export async function writeLayerManifest(db: layerschemahandle, manifest: LayerM
332
336
  freshness_policy: manifest.freshnessPolicy,
333
337
  spine_keys: stringifyJSON(manifest.spineKeys),
334
338
  created_at: manifest.createdAt,
335
- source_records: manifest.sourceRecords === undefined ? null : stringifyJSON(manifest.sourceRecords),
339
+ source_records: manifest.sourceRecords ? stringifyJSON(manifest.sourceRecords) : null,
336
340
  })
337
341
  .execute()
338
342
  }
@@ -355,7 +359,7 @@ export async function readLayerManifest(db: layerschemahandle): Promise<LayerMan
355
359
  schemaVersion: row.schema_version,
356
360
  tier: row.tier as LayerTier,
357
361
  license: row.license,
358
- ...(row.attribution === null ? {} : { attribution: row.attribution }),
362
+ attribution: row.attribution,
359
363
  source: row.source,
360
364
  sourceVintage: row.source_vintage,
361
365
  buildCmd: row.build_cmd,
@@ -364,11 +368,8 @@ export async function readLayerManifest(db: layerschemahandle): Promise<LayerMan
364
368
  spineKeys: parseJSONStrict<SpineKeys>(row.spine_keys),
365
369
  createdAt: row.created_at,
366
370
  // NULL and a missing column both mean the build recorded no count.
367
- // The key stays absent for either.
368
371
  // An empty object would make the build appear to have counted its publishers and found none.
369
- ...(row.source_records === null || row.source_records === undefined
370
- ? {}
371
- : { sourceRecords: parseJSONStrict<Record<string, number>>(row.source_records) }),
372
+ sourceRecords: row.source_records ? parseJSONStrict<Record<string, number>>(row.source_records) : null,
372
373
  }
373
374
 
374
375
  assertManifestInvariants(manifest)
@@ -409,12 +410,12 @@ export async function writeLayerCoverage(db: layerschemahandle, cells: CoverageC
409
410
  }
410
411
 
411
412
  /**
412
- * Read coverage for one H3 cell, or return `undefined` when no row exists.
413
+ * Read coverage for one H3 cell, or return `null` when no row exists.
413
414
  */
414
- export async function readLayerCoverage(db: layerschemahandle, h3Cell: number): Promise<CoverageCell | undefined> {
415
+ export async function readLayerCoverage(db: layerschemahandle, h3Cell: number): Promise<CoverageCell | null> {
415
416
  const row = await db.selectFrom("layer_coverage").selectAll().where("h3_cell", "=", h3Cell).executeTakeFirst()
416
417
 
417
- if (!row) return undefined
418
+ if (!row) return null
418
419
 
419
420
  const cell: CoverageCell = {
420
421
  h3Cell: row.h3_cell,
@@ -95,6 +95,30 @@ export interface LayerManifestTable {
95
95
  source_records?: string | null
96
96
  }
97
97
 
98
+ /**
99
+ * The authority's own statement of what it mapped, one row per statement.
100
+ *
101
+ * A layer reads its mapped extent from this statement rather than from the union of its polygons,
102
+ * because the union of the areas it holds differs from the area the authority surveyed.
103
+ */
104
+ export interface MappedExtentTable {
105
+ extent_id: string
106
+ /**
107
+ * Which published product this footprint came from.
108
+ */
109
+ source: string
110
+ /**
111
+ * The coverage statement, verbatim.
112
+ */
113
+ statement: string
114
+ statement_url: string
115
+ effective_date: string | null
116
+ min_lat: number
117
+ min_lon: number
118
+ max_lat: number
119
+ max_lon: number
120
+ }
121
+
98
122
  // Owned by @mailwoman/evidence so bdc, resolver and filer can check on the same function
99
123
  // rather than on matching copies of the same three strings.
100
124
  // The layer_coverage schema and its IO stay here.
@@ -174,7 +198,7 @@ export async function createLayerManifestTable(db: layerschemahandle): Promise<v
174
198
  .addColumn("spine_keys", "text", (c) => c.notNull())
175
199
  .addColumn("created_at", "text", (c) => c.notNull())
176
200
  // Keep the column nullable for artifacts built before it existed.
177
- // Those artifacts read NULL. `readLayerManifest` leaves `sourceRecords` absent.
201
+ // Those artifacts read NULL, and `readLayerManifest` returns `sourceRecords: null`.
178
202
  // A build that counted records and found no publishers writes `{}`.
179
203
  .addColumn("source_records", "text")
180
204
  .execute()
@@ -17,12 +17,12 @@ import { trustedLicenseSigningKeys } from "#license/register"
17
17
  /**
18
18
  * Verify the configured key offline, or `undefined` when neither the variable nor the key file is set.
19
19
  */
20
- export async function verifyConfiguredLicenseKey(now?: Date): Promise<LicenseKeyVerification | undefined> {
20
+ export async function verifyConfiguredLicenseKey(now?: Date): Promise<LicenseKeyVerification | null> {
21
21
  const configured = await readConfiguredLicenseToken()
22
22
 
23
- if (!configured) return undefined
23
+ if (!configured) return null
24
24
 
25
- return await verifyLicenseKey(configured.token, {
25
+ return verifyLicenseKey(configured.token, {
26
26
  trustedKeys: trustedLicenseSigningKeys(),
27
27
  ...(now ? { now } : {}),
28
28
  })
@@ -12,7 +12,8 @@
12
12
 
13
13
  import { configRootPath } from "#data-root"
14
14
  import { $public } from "#env"
15
- import { pathExists, readLocalJSONFile, readLocalTextFile } from "#fs/readers"
15
+ import { readLocalJSONFile, readLocalTextFile } from "#fs/readers"
16
+ import { pathExists } from "#fs/readers/stat"
16
17
  import { writeLocalTextFile, writePrivateTextFile } from "#fs/writers"
17
18
  import { prettyJSON } from "#json"
18
19
 
@@ -145,15 +145,15 @@ function expiryInstant(expires: string): Date {
145
145
  * Decodes a token's payload without verifying its signature.
146
146
  * Use the result only for display.
147
147
  */
148
- export function decodeLicenseKeyPayload(token: string): LicenseKeyPayload | undefined {
148
+ export function decodeLicenseKeyPayload(token: string): LicenseKeyPayload | null {
149
149
  const parts = token.trim().split(".")
150
150
 
151
- if (parts.length !== LICENSE_KEY_PARTS || parts[0] !== LICENSE_KEY_PREFIX) return undefined
151
+ if (parts.length !== LICENSE_KEY_PARTS || parts[0] !== LICENSE_KEY_PREFIX) return null
152
152
 
153
153
  try {
154
154
  return LicenseKeyPayloadSchema.parse(parseJSONStrict(utf8Text(fromBase64URL(parts[1] ?? ""))))
155
155
  } catch {
156
- return undefined
156
+ return null
157
157
  }
158
158
  }
159
159
 
@@ -36,7 +36,7 @@ export interface EngineStamp {
36
36
  */
37
37
  license: string
38
38
  license_url: string
39
- notice?: string
39
+ notice: string | null
40
40
  }
41
41
 
42
42
  export function licensePageURL(docsURL?: string): string {
@@ -66,7 +66,7 @@ export function buildEngineStamp(input: {
66
66
  version: input.version,
67
67
  license,
68
68
  license_url: licensePageURL(),
69
- ...(commercial ? {} : { notice: `${noticeSentence(license)} ${NOTICE_REMEDY}.` }),
69
+ notice: commercial ? null : `${noticeSentence(license)} ${NOTICE_REMEDY}.`,
70
70
  }
71
71
  }
72
72
 
@@ -76,8 +76,8 @@ export function buildEngineStamp(input: {
76
76
  * An expired key states its date because that tells the operator what to do,
77
77
  * while every other failed reading leaves the reason to `mailwoman doctor`.
78
78
  */
79
- export function licenseNoticeLines(stamp: EngineStamp, key?: LicenseKeyVerification): [string, string] | undefined {
80
- if (!stamp.notice) return undefined
79
+ export function licenseNoticeLines(stamp: EngineStamp, key?: LicenseKeyVerification): [string, string] | null {
80
+ if (!stamp.notice) return null
81
81
 
82
82
  const expiredOn = key?.status === "expired" ? key.payload.expires : undefined
83
83
 
@@ -44,6 +44,6 @@ export interface LocaleProfile {
44
44
 
45
45
  export interface LocaleRegistry {
46
46
  register(profile: LocaleProfile): void
47
- get(locale: string): LocaleProfile | undefined
47
+ get(locale: string): LocaleProfile | null
48
48
  list(): LocaleProfile[]
49
49
  }
@@ -23,8 +23,8 @@ export class InMemoryLocaleRegistry implements LocaleRegistry {
23
23
  this.#profiles.set(profile.locale, profile)
24
24
  }
25
25
 
26
- get(locale: string): LocaleProfile | undefined {
27
- return this.#profiles.get(locale)
26
+ get(locale: string): LocaleProfile | null {
27
+ return this.#profiles.get(locale) ?? null
28
28
  }
29
29
 
30
30
  list(): LocaleProfile[] {
@@ -14,7 +14,7 @@
14
14
  import { basename, PathBuilder, type PathBuilderLike, relative, sep } from "path-ts"
15
15
  import { Globerator } from "spliterator/node/fs"
16
16
 
17
- import { statPath } from "#fs/readers"
17
+ import { statPath } from "#fs/readers/stat"
18
18
 
19
19
  /**
20
20
  * The walk skips these directories because they hold no emitting source.
@@ -16,12 +16,13 @@ export interface PackageCommand {
16
16
  }
17
17
 
18
18
  /**
19
- * Resolves a named executable through a package's `bin` field.
19
+ * Resolves an executable through a package's `bin` field.
20
20
  *
21
21
  * The base URL identifies the caller whose dependencies should be searched.
22
22
  * Node launchers run through the current Node executable, including extensionless files with a Node shebang.
23
+ *
23
24
  * A bin entry need not be an exported module subpath.
24
- * Missing packages, bin entries, or executable files raise errors before a process starts.
25
+ * A missing package, bin entry, or executable file raises an error before a process starts.
25
26
  */
26
27
  export async function resolvePackageCommand(
27
28
  base: string,
@@ -31,6 +32,7 @@ export async function resolvePackageCommand(
31
32
  const manifestPath = resolvePackageJSON(base, packageName)
32
33
  const manifest = await readPackageJSON(manifestPath)
33
34
  const defaultBinName = manifest.name?.split("/").at(-1)
35
+
34
36
  const bin =
35
37
  typeof manifest.bin === "string" ? (binName === defaultBinName ? manifest.bin : undefined) : manifest.bin?.[binName]
36
38
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { resolvePath } from "path-ts"
14
14
 
15
- import { pathExists } from "#fs/readers"
15
+ import { pathExists } from "#fs/readers/stat"
16
16
 
17
17
  /**
18
18
  * Absolute path to `data/<filename>`, probed from `moduleDir` — the source-tree
@@ -87,7 +87,7 @@ export async function readPackageJSON<D extends object = MailwomanManifestFields
87
87
  first: PathBuilderLike,
88
88
  packageName?: string
89
89
  ): Promise<PackageJSONLike<D>> {
90
- const manifestPath = packageName === undefined ? first : resolvePackageJSON(first.toString(), packageName)
90
+ const manifestPath = packageName ? resolvePackageJSON(first.toString(), packageName) : first
91
91
 
92
92
  return readLocalJSONFile<PackageJSONLike<D>>(manifestPath)
93
93
  }
package/lib/numeric.ts CHANGED
@@ -98,7 +98,7 @@ export function pyRound(x: number, nd = 0): number {
98
98
  roundUp = true
99
99
  } else {
100
100
  // exact half → round to even
101
- const lastKept = keep.length ? keep.charCodeAt(keep.length - 1) - 48 : Number(intPart) % 10
101
+ const lastKept = keep ? keep.charCodeAt(keep.length - 1) - 48 : Number(intPart) % 10
102
102
  roundUp = lastKept % 2 === 1
103
103
  }
104
104
  }
@@ -117,8 +117,8 @@ export function pyRound(x: number, nd = 0): number {
117
117
  /**
118
118
  * Python `float()`: trimmed-empty / non-numeric → null (the build's try/except skip).
119
119
  */
120
- export function pyFloat(s: string | undefined): number | null {
121
- if (s === undefined) return null
120
+ export function pyFloat(s: string | null | undefined): number | null {
121
+ if (!s) return null
122
122
  const t = s.trim()
123
123
 
124
124
  if (t === "") return null
@@ -150,7 +150,7 @@ export function pyFixed(x: number, d: number): string {
150
150
  roundUp = true
151
151
  } else if (rest[0]! < "5") {
152
152
  roundUp = false
153
- } else if (rest.slice(1).replace(/0+$/, "").length) {
153
+ } else if (rest.slice(1).replace(/0+$/, "")) {
154
154
  roundUp = true
155
155
  } else {
156
156
  const lastKept = d > 0 ? (keep[d - 1] ?? "0") : (intPart![intPart!.length - 1] ?? "0")
package/lib/objects.ts CHANGED
@@ -21,6 +21,9 @@ export function isIterable(value: unknown): value is Iterable<unknown> {
21
21
  return Symbol.iterator in new Object(value)
22
22
  }
23
23
 
24
+ /**
25
+ * Predicate to check if a value is a plain object.
26
+ */
24
27
  export function isPlainObject(value: unknown): value is Record<string, unknown> {
25
28
  return typeof value === "object" && value !== null && !Array.isArray(value)
26
29
  }
package/lib/paths.ts CHANGED
@@ -9,7 +9,14 @@
9
9
  * ~540 consumer references through that door — 68% of everything `@mailwoman/core/utils` was asked for.
10
10
  * `repo` and `data-root` reference each other. That was the shelf's only internal edge.
11
11
  */
12
- import { createPathBuilderResolver, createPathResolver, dirname, resolvePath, type Join } from "path-ts"
12
+ import {
13
+ createPathBuilderResolver,
14
+ createPathResolver,
15
+ dirname,
16
+ resolvePath,
17
+ type Join,
18
+ type PathBuilderLike,
19
+ } from "path-ts"
13
20
 
14
21
  import { fileURLToPath } from "#module/file-url"
15
22
 
@@ -175,3 +182,11 @@ export function resourceDictionaryPath<A extends AddressResource, S extends stri
175
182
  * Absolute path to the test directory.
176
183
  */
177
184
  export const functionTestsDirectory = repoRootPathBuilder("test")
185
+
186
+ /**
187
+ * A file under a stable display or identity name, beside wherever this checkout keeps it.
188
+ */
189
+ export interface NamedPath {
190
+ name: string
191
+ path: PathBuilderLike
192
+ }
@@ -5,16 +5,16 @@
5
5
  *
6
6
  * The parse result as a client renders it. The browser runtime produces it after classify + resolve.
7
7
  * `@mailwoman/react` takes it as input. One definition prevents the producer and renderer from
8
- * drifting apart. Every field a stage may leave unset is optional here. A renderer that needs a value it
8
+ * drifting apart. Every field a stage may leave unset is `null` here. A renderer that needs a value it
9
9
  * cannot see shows absence rather than a default.
10
10
  */
11
11
 
12
12
  export interface ParsedComponent {
13
13
  tag: string
14
- value?: unknown
15
- confidence?: number
16
- start?: number
17
- end?: number
14
+ value: unknown
15
+ confidence: number | null
16
+ start: number | null
17
+ end: number | null
18
18
  }
19
19
 
20
20
  export interface ResolvedPlaceView {
@@ -24,15 +24,15 @@ export interface ResolvedPlaceView {
24
24
  lat: number
25
25
  lon: number
26
26
  score: number
27
- bbox?: { minLat: number; maxLat: number; minLon: number; maxLon: number }
27
+ bbox: { minLat: number; maxLat: number; minLon: number; maxLon: number } | null
28
28
  /**
29
29
  * How the coordinate was reached when a street-tier lookup answered: a rooftop point,
30
30
  * or an interpolation along the segment.
31
31
  *
32
- * Absent for a gazetteer place.
32
+ * `null` for a gazetteer place.
33
33
  */
34
- tier?: "address_point" | "interpolated"
35
- uncertaintyM?: number
34
+ tier: "address_point" | "interpolated" | null
35
+ uncertaintyM: number | null
36
36
  }
37
37
 
38
38
  export interface DualRoleView {
@@ -46,7 +46,7 @@ export interface DualRoleView {
46
46
  export interface StageTiming {
47
47
  shape: number
48
48
  classify: number
49
- resolve?: number
49
+ resolve: number | null
50
50
  }
51
51
 
52
52
  export interface FSTProvenance {
@@ -77,11 +77,11 @@ export interface ParseResult {
77
77
  */
78
78
  tree: unknown
79
79
  nodes: ParsedComponent[]
80
- kindResult?: KindView
81
- timing?: StageTiming
80
+ kindResult: KindView | null
81
+ timing: StageTiming | null
82
82
  resolved: ResolvedPlaceView | null
83
83
  candidates: ResolvedPlaceView[]
84
84
  fstActive: boolean
85
- fstProvenance?: FSTProvenance | null
86
- dualRoles?: DualRoleView[]
85
+ fstProvenance: FSTProvenance | null
86
+ dualRoles: DualRoleView[] | null
87
87
  }
@@ -3,17 +3,18 @@
3
3
  * @license AGPL-3.0
4
4
  */
5
5
 
6
+ import type { NormalizedInputLite } from "@mailwoman/query-shape"
7
+
6
8
  import type { AddressTree } from "#decoder/types"
7
9
  import type {
8
10
  LocaleHint,
9
- NormalizedInputLite,
10
11
  PhraseProposal,
11
12
  PipelineTiming,
12
13
  PipelineFaultStage,
13
14
  QueryIntentMarker,
14
15
  QueryKindResult,
15
16
  QueryShapeLite,
16
- POIIntentOutcome,
17
+ POIQueryResult,
17
18
  } from "#pipeline/types"
18
19
 
19
20
  /**
@@ -56,9 +57,9 @@ export interface PipelineResult {
56
57
  phraseProposals: PhraseProposal[]
57
58
  tree: AddressTree
58
59
  /**
59
- * Present only when the poi-intent stage produced an outcome.
60
+ * The poi-intent stage's result, or `null` when it produced none.
60
61
  */
61
- poiIntent?: POIIntentOutcome
62
+ poiIntent: POIQueryResult | null
62
63
  timing: PipelineTiming
63
64
  /**
64
65
  * Every stage crash the coordinator caught and degraded past, in order.