@mailwoman/core 9.3.0 → 10.0.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 (441) hide show
  1. package/lib/coarse-placer/tools/{build-dataset.ts → build/dataset.ts} +2 -1
  2. package/lib/coarse-placer/tools/{build-outlier-latin.ts → build/outlier/latin.ts} +4 -3
  3. package/lib/coarse-placer/tools/{eval-openset.ts → eval/openset.ts} +11 -7
  4. package/lib/coarse-placer/tools/{eval-quant-compare.ts → eval/quant-compare.ts} +2 -1
  5. package/lib/coarse-placer/tools/eval.ts +2 -2
  6. package/lib/coarse-placer/tools/index.ts +7 -7
  7. package/lib/coarse-placer/tools/train.ts +4 -6
  8. package/lib/decoder/build-tree.ts +2 -1
  9. package/lib/decoder/containment.ts +2 -1
  10. package/lib/decoder/index.ts +5 -5
  11. package/lib/decoder/parse-diff.ts +1 -1
  12. package/lib/decoder/proposals-to-tree.ts +3 -1
  13. package/lib/decoder/{serialize-json.ts → serialize/json.ts} +3 -2
  14. package/lib/decoder/{serialize-tuples.ts → serialize/tuples.ts} +2 -1
  15. package/lib/decoder/{tree-shape.ts → tree/shape.ts} +7 -10
  16. package/lib/decoder/types.ts +1 -3
  17. package/lib/decoder/unknown-spans.ts +1 -1
  18. package/lib/decoder/validate-tree.ts +2 -1
  19. package/lib/fs/readers/stat.ts +244 -0
  20. package/lib/fs/readers.ts +38 -270
  21. package/lib/fs/streams.ts +58 -0
  22. package/lib/fs/writers.ts +5 -5
  23. package/lib/fs/zip.ts +64 -8
  24. package/lib/git.ts +26 -0
  25. package/lib/layers/coverage.ts +3 -2
  26. package/lib/layers/manifest.ts +2 -4
  27. package/lib/layers/schema.ts +0 -1
  28. package/lib/license/configured.ts +2 -2
  29. package/lib/license/docs-site.ts +1 -15
  30. package/lib/license/index.ts +2 -2
  31. package/lib/license/obligations.ts +4 -1
  32. package/lib/license/stamp.ts +1 -1
  33. package/lib/license/status.ts +1 -1
  34. package/lib/locale/locale.ts +2 -1
  35. package/lib/locale/registry.ts +2 -1
  36. package/lib/module/resolve-from.ts +16 -4
  37. package/lib/objects.ts +9 -1
  38. package/lib/overture-pins.ts +24 -0
  39. package/lib/pipeline/client-result.ts +82 -0
  40. package/lib/pipeline/index.ts +1 -1
  41. package/lib/pipeline/preferences.ts +13 -0
  42. package/lib/pipeline/result.ts +84 -0
  43. package/lib/pipeline/runtime-pipeline.ts +10 -17
  44. package/lib/pipeline/types.ts +28 -88
  45. package/lib/policy/defaults.ts +2 -1
  46. package/lib/policy/policy.ts +3 -1
  47. package/lib/policy/registry.ts +3 -1
  48. package/lib/process.ts +3 -1
  49. package/lib/resolver/authoritative-provider.ts +1 -1
  50. package/lib/resolver/index.ts +1 -8
  51. package/lib/resolver/lookup-types.ts +8 -0
  52. package/lib/resolver/synthetic-id-ranges.ts +83 -0
  53. package/lib/resolver/types.ts +2 -9
  54. package/lib/resources/whosonfirst/placetypes/Placetype.ts +7 -6
  55. package/lib/scripting/arguments.ts +34 -0
  56. package/lib/scripting/utils/index.ts +1 -1
  57. package/lib/strings/case.ts +13 -2
  58. package/lib/strings/format.ts +15 -0
  59. package/lib/tokenization/Graph.ts +3 -4
  60. package/lib/tools/{download-libpostal-resources.ts → download/libpostal-resources.ts} +3 -2
  61. package/lib/tools/generate-language-types.ts +3 -4
  62. package/lib/tools/index.ts +2 -2
  63. package/lib/types/classifier.ts +2 -1
  64. package/lib/types/index.ts +0 -1
  65. package/lib/types/mapping.ts +2 -1
  66. package/lib/workspaces.ts +104 -0
  67. package/out/api/APIClient.d.ts.map +1 -1
  68. package/out/api/arcgis.d.ts.map +1 -1
  69. package/out/api/defaults.d.ts.map +1 -1
  70. package/out/api/headless.d.ts.map +1 -1
  71. package/out/api/ogc.d.ts.map +1 -1
  72. package/out/api/paced-client.js.map +1 -1
  73. package/out/api/pacer.d.ts.map +1 -1
  74. package/out/api/pacer.js.map +1 -1
  75. package/out/api/responses.d.ts.map +1 -1
  76. package/out/api/{test-clocks.d.ts → test/clocks.d.ts} +1 -1
  77. package/out/api/test/clocks.d.ts.map +1 -0
  78. package/out/api/{test-clocks.js → test/clocks.js} +1 -1
  79. package/out/api/test/clocks.js.map +1 -0
  80. package/out/api/{test-transport.d.ts → test/transport.d.ts} +1 -1
  81. package/out/api/test/transport.d.ts.map +1 -0
  82. package/out/api/{test-transport.js → test/transport.js} +1 -1
  83. package/out/api/test/transport.js.map +1 -0
  84. package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
  85. package/out/coarse-placer/coarse-placer.js.map +1 -1
  86. package/out/coarse-placer/featurize.d.ts.map +1 -1
  87. package/out/coarse-placer/tools/{build-dataset.d.ts → build/dataset.d.ts} +1 -1
  88. package/out/coarse-placer/tools/build/dataset.d.ts.map +1 -0
  89. package/out/coarse-placer/tools/{build-dataset.js → build/dataset.js} +3 -2
  90. package/out/coarse-placer/tools/build/dataset.js.map +1 -0
  91. package/out/coarse-placer/tools/{build-outlier-exposure.d.ts → build/outlier/exposure.d.ts} +1 -1
  92. package/out/coarse-placer/tools/build/outlier/exposure.d.ts.map +1 -0
  93. package/out/coarse-placer/tools/{build-outlier-exposure.js → build/outlier/exposure.js} +1 -1
  94. package/out/coarse-placer/tools/build/outlier/exposure.js.map +1 -0
  95. package/out/coarse-placer/tools/{build-outlier-latin.d.ts → build/outlier/latin.d.ts} +3 -3
  96. package/out/coarse-placer/tools/build/outlier/latin.d.ts.map +1 -0
  97. package/out/coarse-placer/tools/{build-outlier-latin.js → build/outlier/latin.js} +4 -3
  98. package/out/coarse-placer/tools/build/outlier/latin.js.map +1 -0
  99. package/out/coarse-placer/tools/{build-outlier-oa.d.ts → build/outlier/oa.d.ts} +1 -1
  100. package/out/coarse-placer/tools/build/outlier/oa.d.ts.map +1 -0
  101. package/out/coarse-placer/tools/{build-outlier-oa.js → build/outlier/oa.js} +1 -1
  102. package/out/coarse-placer/tools/build/outlier/oa.js.map +1 -0
  103. package/out/coarse-placer/tools/country-sets.d.ts.map +1 -1
  104. package/out/coarse-placer/tools/{eval-latin-offmap.d.ts → eval/latin-offmap.d.ts} +1 -1
  105. package/out/coarse-placer/tools/eval/latin-offmap.d.ts.map +1 -0
  106. package/out/coarse-placer/tools/{eval-latin-offmap.js → eval/latin-offmap.js} +1 -1
  107. package/out/coarse-placer/tools/eval/latin-offmap.js.map +1 -0
  108. package/out/coarse-placer/tools/{eval-openset.d.ts → eval/openset.d.ts} +1 -1
  109. package/out/coarse-placer/tools/eval/openset.d.ts.map +1 -0
  110. package/out/coarse-placer/tools/{eval-openset.js → eval/openset.js} +10 -7
  111. package/out/coarse-placer/tools/eval/openset.js.map +1 -0
  112. package/out/coarse-placer/tools/{eval-quant-compare.d.ts → eval/quant-compare.d.ts} +1 -1
  113. package/out/coarse-placer/tools/eval/quant-compare.d.ts.map +1 -0
  114. package/out/coarse-placer/tools/{eval-quant-compare.js → eval/quant-compare.js} +2 -2
  115. package/out/coarse-placer/tools/eval/quant-compare.js.map +1 -0
  116. package/out/coarse-placer/tools/eval.js +2 -2
  117. package/out/coarse-placer/tools/eval.js.map +1 -1
  118. package/out/coarse-placer/tools/index.d.ts +7 -7
  119. package/out/coarse-placer/tools/index.js +7 -7
  120. package/out/coarse-placer/tools/probe-frontier.js.map +1 -1
  121. package/out/coarse-placer/tools/quantize.js.map +1 -1
  122. package/out/coarse-placer/tools/train.d.ts.map +1 -1
  123. package/out/coarse-placer/tools/train.js +2 -3
  124. package/out/coarse-placer/tools/train.js.map +1 -1
  125. package/out/data-root.js.map +1 -1
  126. package/out/decoder/build-tree.d.ts.map +1 -1
  127. package/out/decoder/build-tree.js.map +1 -1
  128. package/out/decoder/containment.d.ts +2 -2
  129. package/out/decoder/containment.d.ts.map +1 -1
  130. package/out/decoder/containment.js.map +1 -1
  131. package/out/decoder/index.d.ts +5 -5
  132. package/out/decoder/index.js +5 -5
  133. package/out/decoder/parse-diff.js +1 -1
  134. package/out/decoder/parse-diff.js.map +1 -1
  135. package/out/decoder/proposals-to-tree.d.ts +2 -1
  136. package/out/decoder/proposals-to-tree.d.ts.map +1 -1
  137. package/out/decoder/proposals-to-tree.js.map +1 -1
  138. package/out/decoder/{serialize-json.d.ts → serialize/json.d.ts} +2 -2
  139. package/out/decoder/serialize/json.d.ts.map +1 -0
  140. package/out/decoder/{serialize-json.js → serialize/json.js} +2 -2
  141. package/out/decoder/serialize/json.js.map +1 -0
  142. package/out/decoder/{serialize-tuples.d.ts → serialize/tuples.d.ts} +2 -2
  143. package/out/decoder/serialize/tuples.d.ts.map +1 -0
  144. package/out/decoder/{serialize-tuples.js → serialize/tuples.js} +1 -1
  145. package/out/decoder/serialize/tuples.js.map +1 -0
  146. package/out/decoder/{serialize-xml.d.ts → serialize/xml.d.ts} +1 -1
  147. package/out/decoder/serialize/xml.d.ts.map +1 -0
  148. package/out/decoder/{serialize-xml.js → serialize/xml.js} +1 -1
  149. package/out/decoder/serialize/xml.js.map +1 -0
  150. package/out/decoder/{tree-shape.d.ts → tree/shape.d.ts} +5 -9
  151. package/out/decoder/tree/shape.d.ts.map +1 -0
  152. package/out/decoder/{tree-shape.js → tree/shape.js} +6 -10
  153. package/out/decoder/tree/shape.js.map +1 -0
  154. package/out/decoder/{tree-walk.d.ts → tree/walk.d.ts} +1 -1
  155. package/out/decoder/tree/walk.d.ts.map +1 -0
  156. package/out/decoder/{tree-walk.js → tree/walk.js} +1 -1
  157. package/out/decoder/tree/walk.js.map +1 -0
  158. package/out/decoder/types.d.ts +1 -2
  159. package/out/decoder/types.d.ts.map +1 -1
  160. package/out/decoder/types.js +1 -1
  161. package/out/decoder/types.js.map +1 -1
  162. package/out/decoder/unknown-spans.js +1 -1
  163. package/out/decoder/validate-tree.d.ts +1 -1
  164. package/out/decoder/validate-tree.d.ts.map +1 -1
  165. package/out/decoder/validate-tree.js.map +1 -1
  166. package/out/env/index.d.ts +1 -1
  167. package/out/env/schema.d.ts +4 -4
  168. package/out/errors/schema.d.ts.map +1 -1
  169. package/out/errors/schema.js.map +1 -1
  170. package/out/fs/formatters.d.ts.map +1 -1
  171. package/out/fs/formatters.js.map +1 -1
  172. package/out/fs/readers/stat.d.ts +126 -0
  173. package/out/fs/readers/stat.d.ts.map +1 -0
  174. package/out/fs/readers/stat.js +202 -0
  175. package/out/fs/readers/stat.js.map +1 -0
  176. package/out/fs/readers.d.ts +16 -149
  177. package/out/fs/readers.d.ts.map +1 -1
  178. package/out/fs/readers.js +19 -230
  179. package/out/fs/readers.js.map +1 -1
  180. package/out/fs/streams.d.ts +33 -0
  181. package/out/fs/streams.d.ts.map +1 -1
  182. package/out/fs/streams.js +49 -0
  183. package/out/fs/streams.js.map +1 -1
  184. package/out/fs/writers.d.ts +5 -5
  185. package/out/fs/writers.js +5 -5
  186. package/out/fs/zip.d.ts +21 -2
  187. package/out/fs/zip.d.ts.map +1 -1
  188. package/out/fs/zip.js +36 -8
  189. package/out/fs/zip.js.map +1 -1
  190. package/out/git.d.ts +15 -0
  191. package/out/git.d.ts.map +1 -1
  192. package/out/git.js +22 -0
  193. package/out/git.js.map +1 -1
  194. package/out/html/document.js.map +1 -1
  195. package/out/json.d.ts.map +1 -1
  196. package/out/layers/coverage.d.ts +1 -1
  197. package/out/layers/coverage.d.ts.map +1 -1
  198. package/out/layers/coverage.js +1 -2
  199. package/out/layers/coverage.js.map +1 -1
  200. package/out/layers/manifest.d.ts +2 -2
  201. package/out/layers/manifest.d.ts.map +1 -1
  202. package/out/layers/manifest.js +2 -3
  203. package/out/layers/manifest.js.map +1 -1
  204. package/out/layers/schema.d.ts +0 -1
  205. package/out/layers/schema.d.ts.map +1 -1
  206. package/out/layers/schema.js +0 -3
  207. package/out/layers/schema.js.map +1 -1
  208. package/out/license/configured.d.ts +1 -1
  209. package/out/license/configured.d.ts.map +1 -1
  210. package/out/license/configured.js +2 -2
  211. package/out/license/configured.js.map +1 -1
  212. package/out/license/docs-site.d.ts +0 -6
  213. package/out/license/docs-site.d.ts.map +1 -1
  214. package/out/license/docs-site.js +1 -12
  215. package/out/license/docs-site.js.map +1 -1
  216. package/out/license/index.d.ts +2 -2
  217. package/out/license/index.d.ts.map +1 -1
  218. package/out/license/index.js +2 -2
  219. package/out/license/index.js.map +1 -1
  220. package/out/license/{key-file.d.ts → key/file.d.ts} +1 -1
  221. package/out/license/key/file.d.ts.map +1 -0
  222. package/out/license/{key-file.js → key/file.js} +1 -1
  223. package/out/license/key/file.js.map +1 -0
  224. package/out/license/{key.d.ts → key/index.d.ts} +1 -1
  225. package/out/license/key/index.d.ts.map +1 -0
  226. package/out/license/{key.js → key/index.js} +1 -1
  227. package/out/license/key/index.js.map +1 -0
  228. package/out/license/obligations.d.ts +1 -1
  229. package/out/license/obligations.d.ts.map +1 -1
  230. package/out/license/obligations.js +3 -0
  231. package/out/license/obligations.js.map +1 -1
  232. package/out/license/publication.js.map +1 -1
  233. package/out/license/register.d.ts.map +1 -1
  234. package/out/license/stamp.d.ts +1 -1
  235. package/out/license/stamp.d.ts.map +1 -1
  236. package/out/license/status.js +1 -1
  237. package/out/license/status.js.map +1 -1
  238. package/out/locale/locale.d.ts +1 -1
  239. package/out/locale/locale.d.ts.map +1 -1
  240. package/out/locale/registry.d.ts.map +1 -1
  241. package/out/locale/registry.js +1 -1
  242. package/out/locale/registry.js.map +1 -1
  243. package/out/locale/zh-cn-units.d.ts.map +1 -1
  244. package/out/logging/shared.d.ts.map +1 -1
  245. package/out/module/resolve-from.d.ts +12 -3
  246. package/out/module/resolve-from.d.ts.map +1 -1
  247. package/out/module/resolve-from.js.map +1 -1
  248. package/out/module/resolvers.js.map +1 -1
  249. package/out/objects.d.ts +6 -0
  250. package/out/objects.d.ts.map +1 -1
  251. package/out/objects.js +8 -1
  252. package/out/objects.js.map +1 -1
  253. package/out/overture-pins.d.ts +24 -0
  254. package/out/overture-pins.d.ts.map +1 -0
  255. package/out/overture-pins.js +24 -0
  256. package/out/overture-pins.js.map +1 -0
  257. package/out/paths.js.map +1 -1
  258. package/out/pipeline/client-result.d.ts +84 -0
  259. package/out/pipeline/client-result.d.ts.map +1 -0
  260. package/out/pipeline/client-result.js +12 -0
  261. package/out/pipeline/client-result.js.map +1 -0
  262. package/out/pipeline/index.d.ts +1 -1
  263. package/out/pipeline/index.d.ts.map +1 -1
  264. package/out/pipeline/preferences.d.ts +13 -0
  265. package/out/pipeline/preferences.d.ts.map +1 -0
  266. package/out/pipeline/preferences.js +7 -0
  267. package/out/pipeline/preferences.js.map +1 -0
  268. package/out/pipeline/result.d.ts +72 -0
  269. package/out/pipeline/result.d.ts.map +1 -0
  270. package/out/pipeline/result.js +7 -0
  271. package/out/pipeline/result.js.map +1 -0
  272. package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
  273. package/out/pipeline/runtime-pipeline.js +7 -13
  274. package/out/pipeline/runtime-pipeline.js.map +1 -1
  275. package/out/pipeline/span-proposer.js.map +1 -1
  276. package/out/pipeline/types.d.ts +23 -85
  277. package/out/pipeline/types.d.ts.map +1 -1
  278. package/out/pipeline/types.js +2 -0
  279. package/out/pipeline/types.js.map +1 -1
  280. package/out/policy/defaults.d.ts +1 -1
  281. package/out/policy/defaults.d.ts.map +1 -1
  282. package/out/policy/defaults.js +1 -1
  283. package/out/policy/defaults.js.map +1 -1
  284. package/out/policy/policy.d.ts +2 -1
  285. package/out/policy/policy.d.ts.map +1 -1
  286. package/out/policy/proposal-collection.js.map +1 -1
  287. package/out/policy/registry.d.ts +2 -1
  288. package/out/policy/registry.d.ts.map +1 -1
  289. package/out/policy/registry.js.map +1 -1
  290. package/out/process.d.ts +2 -2
  291. package/out/process.d.ts.map +1 -1
  292. package/out/process.js.map +1 -1
  293. package/out/random.d.ts.map +1 -1
  294. package/out/release-config.js.map +1 -1
  295. package/out/resolver/authoritative-provider.d.ts +1 -1
  296. package/out/resolver/authoritative-provider.d.ts.map +1 -1
  297. package/out/resolver/fixture-authoritative-provider.js.map +1 -1
  298. package/out/resolver/index.d.ts +2 -2
  299. package/out/resolver/index.d.ts.map +1 -1
  300. package/out/resolver/index.js +1 -1
  301. package/out/resolver/index.js.map +1 -1
  302. package/out/resolver/lookup-types.d.ts +8 -0
  303. package/out/resolver/lookup-types.d.ts.map +1 -1
  304. package/out/resolver/synthetic-id-ranges.d.ts +66 -0
  305. package/out/resolver/synthetic-id-ranges.d.ts.map +1 -0
  306. package/out/resolver/synthetic-id-ranges.js +73 -0
  307. package/out/resolver/synthetic-id-ranges.js.map +1 -0
  308. package/out/resolver/types.d.ts +1 -2
  309. package/out/resolver/types.d.ts.map +1 -1
  310. package/out/resolver/types.js +0 -1
  311. package/out/resolver/types.js.map +1 -1
  312. package/out/resources/languages/index.js.map +1 -1
  313. package/out/resources/languages/types.gen.d.ts.map +1 -1
  314. package/out/resources/locale.d.ts.map +1 -1
  315. package/out/resources/set.d.ts.map +1 -1
  316. package/out/resources/set.js.map +1 -1
  317. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +1 -1
  318. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
  319. package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
  320. package/out/resources/whosonfirst/placetypes/Placetype.js +7 -6
  321. package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
  322. package/out/resources/whosonfirst/placetypes/admin.d.ts +1 -1
  323. package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
  324. package/out/resources/whosonfirst/placetypes/definition.d.ts.map +1 -1
  325. package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
  326. package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
  327. package/out/routing/index.d.ts.map +1 -1
  328. package/out/routing/index.js.map +1 -1
  329. package/out/scripting/arguments.d.ts +7 -0
  330. package/out/scripting/arguments.d.ts.map +1 -1
  331. package/out/scripting/arguments.js +29 -0
  332. package/out/scripting/arguments.js.map +1 -1
  333. package/out/scripting/command.d.ts.map +1 -1
  334. package/out/scripting/ingest-chunk-script.d.ts.map +1 -1
  335. package/out/scripting/utils/index.d.ts +1 -1
  336. package/out/scripting/utils/index.d.ts.map +1 -1
  337. package/out/scripting/utils/index.js +1 -1
  338. package/out/scripting/utils/index.js.map +1 -1
  339. package/out/strings/case.d.ts +3 -0
  340. package/out/strings/case.d.ts.map +1 -1
  341. package/out/strings/case.js +12 -2
  342. package/out/strings/case.js.map +1 -1
  343. package/out/strings/format.d.ts +6 -0
  344. package/out/strings/format.d.ts.map +1 -1
  345. package/out/strings/format.js +12 -0
  346. package/out/strings/format.js.map +1 -1
  347. package/out/strings/python-json.js.map +1 -1
  348. package/out/tokenization/Graph.d.ts +3 -0
  349. package/out/tokenization/Graph.d.ts.map +1 -1
  350. package/out/tokenization/Graph.js +0 -4
  351. package/out/tokenization/Graph.js.map +1 -1
  352. package/out/tokenization/Span.d.ts.map +1 -1
  353. package/out/tokenization/Span.js.map +1 -1
  354. package/out/tokenization/normalizer.d.ts.map +1 -1
  355. package/out/tokenization/normalizer.js.map +1 -1
  356. package/out/tools/{download-libpostal-resources.d.ts → download/libpostal-resources.d.ts} +1 -1
  357. package/out/tools/download/libpostal-resources.d.ts.map +1 -0
  358. package/out/tools/{download-libpostal-resources.js → download/libpostal-resources.js} +4 -3
  359. package/out/tools/download/libpostal-resources.js.map +1 -0
  360. package/out/tools/{download-ssl-address.d.ts → download/ssl-address.d.ts} +1 -1
  361. package/out/tools/download/ssl-address.d.ts.map +1 -0
  362. package/out/tools/{download-ssl-address.js → download/ssl-address.js} +1 -1
  363. package/out/tools/download/ssl-address.js.map +1 -0
  364. package/out/tools/generate-language-types.d.ts.map +1 -1
  365. package/out/tools/generate-language-types.js +3 -4
  366. package/out/tools/generate-language-types.js.map +1 -1
  367. package/out/tools/index.d.ts +2 -2
  368. package/out/tools/index.js +2 -2
  369. package/out/types/Classification.d.ts +2 -2
  370. package/out/types/Classification.d.ts.map +1 -1
  371. package/out/types/classifier.d.ts +1 -1
  372. package/out/types/classifier.d.ts.map +1 -1
  373. package/out/types/index.d.ts +0 -1
  374. package/out/types/index.d.ts.map +1 -1
  375. package/out/types/index.js +0 -1
  376. package/out/types/index.js.map +1 -1
  377. package/out/types/mapping.d.ts +1 -1
  378. package/out/types/mapping.d.ts.map +1 -1
  379. package/out/types/mapping.js.map +1 -1
  380. package/out/utils/time.js.map +1 -1
  381. package/out/workspaces.d.ts +31 -0
  382. package/out/workspaces.d.ts.map +1 -0
  383. package/out/workspaces.js +72 -0
  384. package/out/workspaces.js.map +1 -0
  385. package/package.json +84 -55
  386. package/lib/resolver/placetype-map.ts +0 -130
  387. package/lib/types/component.ts +0 -96
  388. package/out/api/test-clocks.d.ts.map +0 -1
  389. package/out/api/test-clocks.js.map +0 -1
  390. package/out/api/test-transport.d.ts.map +0 -1
  391. package/out/api/test-transport.js.map +0 -1
  392. package/out/coarse-placer/tools/build-dataset.d.ts.map +0 -1
  393. package/out/coarse-placer/tools/build-dataset.js.map +0 -1
  394. package/out/coarse-placer/tools/build-outlier-exposure.d.ts.map +0 -1
  395. package/out/coarse-placer/tools/build-outlier-exposure.js.map +0 -1
  396. package/out/coarse-placer/tools/build-outlier-latin.d.ts.map +0 -1
  397. package/out/coarse-placer/tools/build-outlier-latin.js.map +0 -1
  398. package/out/coarse-placer/tools/build-outlier-oa.d.ts.map +0 -1
  399. package/out/coarse-placer/tools/build-outlier-oa.js.map +0 -1
  400. package/out/coarse-placer/tools/eval-latin-offmap.d.ts.map +0 -1
  401. package/out/coarse-placer/tools/eval-latin-offmap.js.map +0 -1
  402. package/out/coarse-placer/tools/eval-openset.d.ts.map +0 -1
  403. package/out/coarse-placer/tools/eval-openset.js.map +0 -1
  404. package/out/coarse-placer/tools/eval-quant-compare.d.ts.map +0 -1
  405. package/out/coarse-placer/tools/eval-quant-compare.js.map +0 -1
  406. package/out/decoder/serialize-json.d.ts.map +0 -1
  407. package/out/decoder/serialize-json.js.map +0 -1
  408. package/out/decoder/serialize-tuples.d.ts.map +0 -1
  409. package/out/decoder/serialize-tuples.js.map +0 -1
  410. package/out/decoder/serialize-xml.d.ts.map +0 -1
  411. package/out/decoder/serialize-xml.js.map +0 -1
  412. package/out/decoder/tree-shape.d.ts.map +0 -1
  413. package/out/decoder/tree-shape.js.map +0 -1
  414. package/out/decoder/tree-walk.d.ts.map +0 -1
  415. package/out/decoder/tree-walk.js.map +0 -1
  416. package/out/license/key-file.d.ts.map +0 -1
  417. package/out/license/key-file.js.map +0 -1
  418. package/out/license/key.d.ts.map +0 -1
  419. package/out/license/key.js.map +0 -1
  420. package/out/resolver/placetype-map.d.ts +0 -76
  421. package/out/resolver/placetype-map.d.ts.map +0 -1
  422. package/out/resolver/placetype-map.js +0 -106
  423. package/out/resolver/placetype-map.js.map +0 -1
  424. package/out/tools/download-libpostal-resources.d.ts.map +0 -1
  425. package/out/tools/download-libpostal-resources.js.map +0 -1
  426. package/out/tools/download-ssl-address.d.ts.map +0 -1
  427. package/out/tools/download-ssl-address.js.map +0 -1
  428. package/out/types/component.d.ts +0 -50
  429. package/out/types/component.d.ts.map +0 -1
  430. package/out/types/component.js +0 -84
  431. package/out/types/component.js.map +0 -1
  432. /package/lib/api/{test-clocks.ts → test/clocks.ts} +0 -0
  433. /package/lib/api/{test-transport.ts → test/transport.ts} +0 -0
  434. /package/lib/coarse-placer/tools/{build-outlier-exposure.ts → build/outlier/exposure.ts} +0 -0
  435. /package/lib/coarse-placer/tools/{build-outlier-oa.ts → build/outlier/oa.ts} +0 -0
  436. /package/lib/coarse-placer/tools/{eval-latin-offmap.ts → eval/latin-offmap.ts} +0 -0
  437. /package/lib/decoder/{serialize-xml.ts → serialize/xml.ts} +0 -0
  438. /package/lib/decoder/{tree-walk.ts → tree/walk.ts} +0 -0
  439. /package/lib/license/{key-file.ts → key/file.ts} +0 -0
  440. /package/lib/license/{key.ts → key/index.ts} +0 -0
  441. /package/lib/tools/{download-ssl-address.ts → download/ssl-address.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../lib/fs/readers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAA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B,iBAAiB,CAChC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3B,CAAC,SAAS,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,EACpE,GAAG,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AASjC;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CACnC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3B,CAAC,SAAS,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,EACpE,GAAG,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAQvC;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,EAAE,GAAG,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAM3G;AAMD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEzD;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAErF"}
package/out/fs/readers.js CHANGED
@@ -7,177 +7,11 @@
7
7
  * `node:fs` is reached from this directory alone, and every reader answers a promise: no executable repository
8
8
  * code makes a blocking filesystem call, and the `debt` check in `packages/repo-health` counts any that appears.
9
9
  */
10
- import { open as openNative, access, constants, glob, lstat, readFile, readdir, readlink, realpath, stat, } from "node:fs/promises";
10
+ import { readFile } from "node:fs/promises";
11
11
  import { resolvePath } from "path-ts";
12
- import { ByteFormatter } from "#fs/formatters";
12
+ import { open } from "#fs/readers/stat";
13
13
  import { parseJSONStrict } from "#json";
14
- // #region Stat utils
15
- /**
16
- * Attempts to stat a file or directory.
17
- *
18
- * A `URL` is passed through rather than stringified: `node:fs` accepts a `file:` URL object, and rejects the string it
19
- * prints — `stat("file:///etc/hostname")` is ENOENT, which this function reports as absence. Every caller that looks a
20
- * file up by URL therefore read "not there" for everything, and `cli-native/command-router.ts` answered `Unknown
21
- * command` for every command it has.
22
- *
23
- * @throws If the path exists but cannot be statted for some reason other than non-existence.
24
- */
25
- export function tryStat(pathBuilderLike) {
26
- const target = pathBuilderLike instanceof URL ? pathBuilderLike : pathBuilderLike.toString();
27
- return stat(target).catch((error) => {
28
- if (error.code === "ENOENT")
29
- return null;
30
- throw error;
31
- });
32
- }
33
- /**
34
- * Stat a file or directory, raising ENOENT when nothing is there.
35
- *
36
- * The throwing counterpart to {@linkcode tryStat}. Reach for this one where absence is a defect the caller wants
37
- * reported, and for {@linkcode tryStat} where absence is an answer.
38
- */
39
- export function statPath(path) {
40
- return stat(path instanceof URL ? path : path.toString());
41
- }
42
- /**
43
- * Stat a path without following a symbolic link, so the answer describes the link itself.
44
- */
45
- export function statLink(path) {
46
- return lstat(path instanceof URL ? path : path.toString());
47
- }
48
- /**
49
- * Stat a path without following a symbolic link, answering `null` when nothing is there.
50
- *
51
- * The link-level counterpart to {@linkcode tryStat}.
52
- */
53
- export function tryStatLink(path) {
54
- return lstat(path instanceof URL ? path : path.toString()).catch((error) => {
55
- if (error.code === "ENOENT")
56
- return null;
57
- throw error;
58
- });
59
- }
60
- /**
61
- * Whether a path exists, whatever it is.
62
- *
63
- * The asynchronous answer to `existsSync`, which is the single most-called synchronous builtin in the repository.
64
- * Prefer {@linkcode isFile} or {@linkcode isDirectory} where the caller goes on to assume one or the other: a directory
65
- * where a file was expected passes this check and fails the next line.
66
- */
67
- export function pathExists(path) {
68
- return tryStat(path).then((stats) => stats !== null);
69
- }
70
- /**
71
- * Whether a path exists and is a directory.
72
- */
73
- export function isDirectory(path) {
74
- return tryStat(path).then((stats) => stats?.isDirectory() ?? false);
75
- }
76
- /**
77
- * Whether a path exists and is a file.
78
- */
79
- export function isFile(path) {
80
- return tryStat(path).then((stats) => stats?.isFile() ?? false);
81
- }
82
- /**
83
- * Whether a path exists and is a symbolic link.
84
- */
85
- export function isSymbolicLink(path) {
86
- return tryStatLink(path).then((stats) => stats?.isSymbolicLink() ?? false);
87
- }
88
- /**
89
- * Whether a directory entry leads to a directory, symbolic links included.
90
- *
91
- * `Dirent.isDirectory()` is FALSE for a symbolic link to a directory, so a walk keyed on it alone skips every linked
92
- * tree — while a glob with `followSymbolicLinks` (the default) descends into them, and the two then describe different
93
- * trees. A link is resolved through `stat`, which also answers `false` for a dangling one.
94
- */
95
- export function entryLeadsToDirectory(entry) {
96
- if (entry.isDirectory())
97
- return Promise.resolve(true);
98
- if (!entry.isSymbolicLink())
99
- return Promise.resolve(false);
100
- return isDirectory(resolvePath(entry.parentPath, entry.name));
101
- }
102
- /**
103
- * The size of a file in bytes.
104
- *
105
- * @throws ENOENT when the file does not exist.
106
- */
107
- export function readFileSize(path) {
108
- return statPath(path).then((stats) => stats.size);
109
- }
110
- /**
111
- * The size of a file, rendered in IEC units (`12.3 MiB`) — the unit for anything a machine measured.
112
- *
113
- * @throws ENOENT when the file does not exist.
114
- */
115
- export async function formatFileSize(path, options) {
116
- return ByteFormatter.formatIEC(await readFileSize(path), options);
117
- }
118
- /**
119
- * Resolve a path to its canonical location, following every symbolic link.
120
- *
121
- * @throws ENOENT when nothing is there. {@linkcode tryRealPath} answers `null` instead.
122
- */
123
- export function realPath(path) {
124
- return realpath(path.toString());
125
- }
126
- /**
127
- * Resolve a path to its canonical location, following every symbolic link.
128
- *
129
- * @returns The canonical path, or `null` when nothing is there.
130
- */
131
- export function tryRealPath(path) {
132
- return realpath(path.toString()).catch((error) => {
133
- if (error.code === "ENOENT")
134
- return null;
135
- throw error;
136
- });
137
- }
138
- export function open(path, flags, mode) {
139
- return openNative(path instanceof URL ? path : path.toString(), flags, mode);
140
- }
141
- /**
142
- * The target a symbolic link points at, verbatim — relative if it was written relative.
143
- *
144
- * @throws EINVAL when the path is not a link, ENOENT when nothing is there.
145
- */
146
- export function readLink(path) {
147
- return readlink(path.toString());
148
- }
149
- /**
150
- * Whether the process may WRITE to a path.
151
- *
152
- * A permission question, not an existence one: `access` answers about the caller's credentials against the file as it
153
- * stands, where a stat answers about the file. Absence reads as `false` here, which is what a caller checking "can I
154
- * write here" means by it.
155
- */
156
- export function isWritable(path) {
157
- return access(path.toString(), constants.W_OK).then(() => true, () => false);
158
- }
159
- /**
160
- * Whether the process may EXECUTE a path.
161
- */
162
- export function isExecutable(path) {
163
- return access(path.toString(), constants.X_OK).then(() => true, () => false);
164
- }
165
- /**
166
- * Every path matching a glob pattern.
167
- *
168
- * Sorted, because `glob` answers in directory order and a build that names its inputs in a receipt should name them the
169
- * same way twice.
170
- */
171
- export async function globPaths(pattern) {
172
- return (await Array.fromAsync(glob(pattern))).toSorted();
173
- }
174
- /**
175
- * A `file:` URL is passed through whole: `node:fs` accepts the object and rejects the string it prints.
176
- */
177
- function asTarget(path) {
178
- return path instanceof URL ? path : path.toString();
179
- }
180
- // #endregion
14
+ export * from "#fs/readers/stat";
181
15
  // #region File Readers
182
16
  /**
183
17
  * Read the first `byteSize` bytes of a file, or the whole file if it is smaller.
@@ -239,8 +73,8 @@ function readTarget(pathSegments) {
239
73
  /**
240
74
  * Read a local text file.
241
75
  *
242
- * @category Node
243
76
  * @category Files
77
+ * @runtime node
244
78
  */
245
79
  export function readLocalTextFile(...pathSegments) {
246
80
  if (!pathSegments.length) {
@@ -248,22 +82,31 @@ export function readLocalTextFile(...pathSegments) {
248
82
  }
249
83
  return readFile(readTarget(pathSegments), "utf8");
250
84
  }
85
+ export function readLocalJSONFile(...pathSegments) {
86
+ return readLocalTextFile(...pathSegments).then((content) => parseJSONStrict(content));
87
+ }
251
88
  /**
252
- * Read a local JSON file.
89
+ * Read a local JSON file, answering `null` when the file does not exist.
253
90
  *
254
- * Parsing is strict: a file that is not JSON throws here rather than answering `undefined` several frames later.
91
+ * Parsing is strict: a file that is not JSON throws here rather than answering `null` several frames later.
255
92
  *
256
- * @category Node
257
93
  * @category Files
94
+ * @runtime node
258
95
  */
259
- export function readLocalJSONFile(...pathSegments) {
260
- return readLocalTextFile(...pathSegments).then((content) => parseJSONStrict(content));
96
+ export function tryReadLocalJSONFile(...pathSegments) {
97
+ return readLocalTextFile(...pathSegments)
98
+ .then((content) => parseJSONStrict(content))
99
+ .catch((error) => {
100
+ if (error.code === "ENOENT")
101
+ return null;
102
+ throw error;
103
+ });
261
104
  }
262
105
  /**
263
106
  * Read a local file's bytes.
264
107
  *
265
- * @category Node
266
108
  * @category Files
109
+ * @runtime node
267
110
  */
268
111
  export function readLocalBuffer(...pathSegments) {
269
112
  if (!pathSegments.length) {
@@ -271,60 +114,6 @@ export function readLocalBuffer(...pathSegments) {
271
114
  }
272
115
  return readFile(readTarget(pathSegments));
273
116
  }
274
- /**
275
- * List the entry names directly inside a directory.
276
- *
277
- * @category Node
278
- * @category Files
279
- */
280
- export function readDirectory(path) {
281
- return readdir(asTarget(path));
282
- }
283
- /**
284
- * List a directory's entries with their types, so a caller can tell a file from a directory without a stat apiece.
285
- *
286
- * @category Node
287
- * @category Files
288
- */
289
- export function readDirectoryEntries(path) {
290
- return readdir(asTarget(path), { withFileTypes: true });
291
- }
292
- /**
293
- * List every entry under a directory, at any depth, as paths relative to it.
294
- *
295
- * The recursive counterpart to {@linkcode readDirectory}. It walks the whole tree before answering, so it is the wrong
296
- * reader for a directory whose size is unknown — reach for it where the tree is a build artifact you produced.
297
- *
298
- * @category Node
299
- * @category Files
300
- */
301
- export function readDirectoryRecursive(path) {
302
- return readdir(asTarget(path), { recursive: true });
303
- }
304
- /**
305
- * List every entry under a directory, at any depth, WITH its type — `Dirent.parentPath` names the directory each was
306
- * found in, which a plain recursive read leaves the caller to reconstruct.
307
- */
308
- export function readDirectoryEntriesRecursive(path) {
309
- return readdir(asTarget(path), { recursive: true, withFileTypes: true });
310
- }
311
- /**
312
- * List a directory's entry names, answering an empty list when the directory does not exist.
313
- *
314
- * The distinction is the caller's to make and this function makes ONE of the two available: an absent directory and an
315
- * empty one are the same answer here. Where absence means something — an unbuilt artifact, a missing extract — use
316
- * {@linkcode readDirectory} and let the ENOENT reach you.
317
- *
318
- * @category Node
319
- * @category Files
320
- */
321
- export function tryReadDirectory(path) {
322
- return readdir(asTarget(path)).catch((error) => {
323
- if (error.code === "ENOENT")
324
- return [];
325
- throw error;
326
- });
327
- }
328
117
  // #endregion
329
118
  // #region Standard input
330
119
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"readers.js","sourceRoot":"","sources":["../../lib/fs/readers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACN,IAAI,IAAI,UAAU,EAClB,MAAM,EACN,SAAS,EACT,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,IAAI,GAEJ,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAwB,WAAW,EAAE,MAAM,SAAS,CAAA;AAE3D,OAAO,EAAE,aAAa,EAA6B,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAKvC,qBAAqB;AAErB;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,eAAsC;IAC7D,MAAM,MAAM,GAAG,eAAe,YAAY,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAA;IAE5F,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACnC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAA;QAExC,MAAM,KAAK,CAAA;IACZ,CAAC,CAAC,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,IAA2B;IACnD,OAAO,IAAI,CAAC,IAAI,YAAY,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,CAAC;IAED,OAAO,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAA;AAC1C,CAAC;AAED,aAAa;AAEb,yBAAyB;AAEzB;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AAC5E,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB;IAC1C,OAAO,eAAe,CAAI,MAAM,iBAAiB,EAAE,CAAC,CAAA;AACrD,CAAC;AAED,aAAa"}
@@ -34,5 +34,38 @@ export declare function openReadStream(path: PathBuilderLike, options?: Paramete
34
34
  * first chunk rather than at open time reports the missing directory somewhere the caller is no longer looking. Call
35
35
  * `makeDirectories` first where the parent may be absent.
36
36
  */
37
+ /**
38
+ * Re-encode a byte stream from a legacy encoding into UTF-8, so a UTF-8 reader can consume it.
39
+ *
40
+ * The national registers this repository reads are not all UTF-8: Korea's address portal ships CP949, Japan's postcode
41
+ * file Shift_JIS. `spliterator` splits UTF-8 bytes, so the decode happens upstream of the split rather than after it —
42
+ * a line boundary found in CP949 bytes is not a line boundary.
43
+ *
44
+ * NOT `TextDecoder`, AND THE DIFFERENCE IS NOT SMALL. Node's WHATWG `euc-kr` implements EUC-KR proper (KS X 1001) and
45
+ * not the UHC extension CP949 adds in lead bytes 0x81–0xA0. Of the 17,048 two-byte sequences Python's `cp949` accepts,
46
+ * `TextDecoder('euc-kr')` reads 8,824 differently: 6,475 become U+FFFD and 2,349 become a DIFFERENT character with no
47
+ * error raised. `iconv-lite` disagrees with `cp949` on none of the 17,048.
48
+ *
49
+ * It is not a rare corner. One row in 48,000 of the Korean address register carries such a sequence — `더샾오피스텔`, bytes
50
+ * `b4 f5 98 de bf c0 c7 c7 bd ba c5 da`, which `TextDecoder` reads as `더乍의퓰뵀�`.
51
+ *
52
+ * The decoder is STREAMING for the same reason a `TextDecoder` would need `{ stream: true }`: a multi-byte character
53
+ * split across two chunks must be held until its tail arrives, where a per-chunk decode emits a replacement character
54
+ * and corrupts the row. `iconv-lite`'s stream decoder holds that state, and `end()` flushes what is left.
55
+ *
56
+ * @category Files
57
+ * @param encoding An `iconv-lite` label — `cp949`, `shift_jis`, `gbk`.
58
+ */
59
+ export declare function decodeByteStream(source: AsyncIterable<Uint8Array>, encoding: string): AsyncGenerator<Uint8Array>;
60
+ /**
61
+ * Decode bytes already in memory from a legacy encoding, the one-shot sibling of {@link decodeByteStream}.
62
+ *
63
+ * Same reasoning, same reason not to reach for `TextDecoder`, and it lives here so a reader that finds one finds the
64
+ * other. Use this when the whole file is a bounded size the publisher fixes; use the stream when it is not.
65
+ *
66
+ * @category Files
67
+ * @param encoding An `iconv-lite` label — `cp949`, `cp932`, `gbk`.
68
+ */
69
+ export declare function decodeBytes(bytes: Uint8Array, encoding: string): string;
37
70
  export declare function openWriteStream(path: PathBuilderLike, options?: Parameters<typeof createWriteStream>[1]): WriteStream;
38
71
  //# sourceMappingURL=streams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../../lib/fs/streams.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAEhG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C;;GAEG;AACH,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEzD;;;;;GAKG;AACH,wBAA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I,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAErH"}
package/out/fs/streams.js CHANGED
@@ -13,6 +13,7 @@
13
13
  * does not reach past them for a stream.
14
14
  */
15
15
  import { createReadStream, createWriteStream } from "node:fs";
16
+ import iconv from "iconv-lite";
16
17
  export { Duplex, Readable, Transform, Writable } from "node:stream";
17
18
  export { finished, pipeline } from "node:stream/promises";
18
19
  /**
@@ -31,6 +32,54 @@ export function openReadStream(path, options) {
31
32
  * first chunk rather than at open time reports the missing directory somewhere the caller is no longer looking. Call
32
33
  * `makeDirectories` first where the parent may be absent.
33
34
  */
35
+ /**
36
+ * Re-encode a byte stream from a legacy encoding into UTF-8, so a UTF-8 reader can consume it.
37
+ *
38
+ * The national registers this repository reads are not all UTF-8: Korea's address portal ships CP949, Japan's postcode
39
+ * file Shift_JIS. `spliterator` splits UTF-8 bytes, so the decode happens upstream of the split rather than after it —
40
+ * a line boundary found in CP949 bytes is not a line boundary.
41
+ *
42
+ * NOT `TextDecoder`, AND THE DIFFERENCE IS NOT SMALL. Node's WHATWG `euc-kr` implements EUC-KR proper (KS X 1001) and
43
+ * not the UHC extension CP949 adds in lead bytes 0x81–0xA0. Of the 17,048 two-byte sequences Python's `cp949` accepts,
44
+ * `TextDecoder('euc-kr')` reads 8,824 differently: 6,475 become U+FFFD and 2,349 become a DIFFERENT character with no
45
+ * error raised. `iconv-lite` disagrees with `cp949` on none of the 17,048.
46
+ *
47
+ * It is not a rare corner. One row in 48,000 of the Korean address register carries such a sequence — `더샾오피스텔`, bytes
48
+ * `b4 f5 98 de bf c0 c7 c7 bd ba c5 da`, which `TextDecoder` reads as `더乍의퓰뵀�`.
49
+ *
50
+ * The decoder is STREAMING for the same reason a `TextDecoder` would need `{ stream: true }`: a multi-byte character
51
+ * split across two chunks must be held until its tail arrives, where a per-chunk decode emits a replacement character
52
+ * and corrupts the row. `iconv-lite`'s stream decoder holds that state, and `end()` flushes what is left.
53
+ *
54
+ * @category Files
55
+ * @param encoding An `iconv-lite` label — `cp949`, `shift_jis`, `gbk`.
56
+ */
57
+ export async function* decodeByteStream(source, encoding) {
58
+ const decoder = iconv.getDecoder(encoding);
59
+ const encoder = new TextEncoder();
60
+ for await (const chunk of source) {
61
+ const text = decoder.write(Buffer.from(chunk));
62
+ if (text) {
63
+ yield encoder.encode(text);
64
+ }
65
+ }
66
+ const tail = decoder.end();
67
+ if (tail) {
68
+ yield encoder.encode(tail);
69
+ }
70
+ }
71
+ /**
72
+ * Decode bytes already in memory from a legacy encoding, the one-shot sibling of {@link decodeByteStream}.
73
+ *
74
+ * Same reasoning, same reason not to reach for `TextDecoder`, and it lives here so a reader that finds one finds the
75
+ * other. Use this when the whole file is a bounded size the publisher fixes; use the stream when it is not.
76
+ *
77
+ * @category Files
78
+ * @param encoding An `iconv-lite` label — `cp949`, `cp932`, `gbk`.
79
+ */
80
+ export function decodeBytes(bytes, encoding) {
81
+ return iconv.decode(Buffer.from(bytes), encoding);
82
+ }
34
83
  export function openWriteStream(path, options) {
35
84
  return createWriteStream(path.toString(), options);
36
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"streams.js","sourceRoot":"","sources":["../../lib/fs/streams.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAqC,MAAM,SAAS,CAAA;AAQhG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEzD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAqB,EAAE,OAAgD;IACrG,OAAO,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAA;AAClD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,U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QACV,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;AACF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,QAAgB;IAC9D,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAA;AAClD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAqB,EAAE,OAAiD;IACvG,OAAO,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAA;AACnD,CAAC"}
@@ -39,22 +39,22 @@ export type BufferLike = NodeJS.ArrayBufferView | Iterable<string | NodeJS.Array
39
39
  /**
40
40
  * Write a local text file, creating its parent directory first.
41
41
  *
42
- * @category Node
43
42
  * @category Files
43
+ * @runtime node
44
44
  */
45
45
  export declare function writeLocalTextFile<S extends PathBuilderLike[]>(content: string | Promise<string>, ...pathSegments: S): Promise<void>;
46
46
  /**
47
47
  * Write a local JSON file, tab-indented, creating its parent directory first.
48
48
  *
49
- * @category Node
50
49
  * @category Files
50
+ * @runtime node
51
51
  */
52
52
  export declare function writeLocalJSONFile<T = Record<string, unknown>, S extends PathBuilderLike[] = PathBuilderLike[]>(content: T, ...pathSegments: S): Promise<void>;
53
53
  /**
54
54
  * Write a local file's bytes, creating its parent directory first.
55
55
  *
56
- * @category Node
57
56
  * @category Files
57
+ * @runtime node
58
58
  */
59
59
  export declare function writeLocalBuffer<S extends PathBuilderLike[]>(content: BufferLike, ...pathSegments: S): Promise<void>;
60
60
  /**
@@ -64,8 +64,8 @@ export declare function writeLocalBuffer<S extends PathBuilderLike[]>(content: B
64
64
  * then says so, and a reader does not have to follow the value back to its producer. This overload exists for the sites
65
65
  * where it genuinely does not: a payload that is a string on one branch and bytes on another.
66
66
  *
67
- * @category Node
68
67
  * @category Files
68
+ * @runtime node
69
69
  */
70
70
  /**
71
71
  * Write a UTF-8 text file readable and writable by its owner alone (`0600`), creating the parent directory. The mode is
@@ -77,8 +77,8 @@ export declare function writeLocalFile<S extends PathBuilderLike[]>(content: str
77
77
  /**
78
78
  * Append text to a local file, creating it and its parent directory when neither exists.
79
79
  *
80
- * @category Node
81
80
  * @category Files
81
+ * @runtime node
82
82
  */
83
83
  export declare function appendLocalTextFile<S extends PathBuilderLike[]>(content: string, ...pathSegments: S): Promise<void>;
84
84
  /**
package/out/fs/writers.js CHANGED
@@ -39,8 +39,8 @@ export function makeDirectoryExclusive(path) {
39
39
  /**
40
40
  * Write a local text file, creating its parent directory first.
41
41
  *
42
- * @category Node
43
42
  * @category Files
43
+ * @runtime node
44
44
  */
45
45
  export async function writeLocalTextFile(content, ...pathSegments) {
46
46
  if (!pathSegments.length) {
@@ -54,8 +54,8 @@ export async function writeLocalTextFile(content, ...pathSegments) {
54
54
  /**
55
55
  * Write a local JSON file, tab-indented, creating its parent directory first.
56
56
  *
57
- * @category Node
58
57
  * @category Files
58
+ * @runtime node
59
59
  */
60
60
  export function writeLocalJSONFile(content, ...pathSegments) {
61
61
  const normalized = typeof content === "string" ? content : JSON.stringify(content, null, "\t") + "\n";
@@ -64,8 +64,8 @@ export function writeLocalJSONFile(content, ...pathSegments) {
64
64
  /**
65
65
  * Write a local file's bytes, creating its parent directory first.
66
66
  *
67
- * @category Node
68
67
  * @category Files
68
+ * @runtime node
69
69
  */
70
70
  export async function writeLocalBuffer(content, ...pathSegments) {
71
71
  if (!pathSegments.length) {
@@ -82,8 +82,8 @@ export async function writeLocalBuffer(content, ...pathSegments) {
82
82
  * then says so, and a reader does not have to follow the value back to its producer. This overload exists for the sites
83
83
  * where it genuinely does not: a payload that is a string on one branch and bytes on another.
84
84
  *
85
- * @category Node
86
85
  * @category Files
86
+ * @runtime node
87
87
  */
88
88
  /**
89
89
  * Write a UTF-8 text file readable and writable by its owner alone (`0600`), creating the parent directory. The mode is
@@ -114,8 +114,8 @@ export async function writeLocalFile(content, ...pathSegments) {
114
114
  /**
115
115
  * Append text to a local file, creating it and its parent directory when neither exists.
116
116
  *
117
- * @category Node
118
117
  * @category Files
118
+ * @runtime node
119
119
  */
120
120
  export async function appendLocalTextFile(content, ...pathSegments) {
121
121
  if (!pathSegments.length) {
package/out/fs/zip.d.ts CHANGED
@@ -16,6 +16,25 @@
16
16
  */
17
17
  import ADMZip from "adm-zip";
18
18
  import { type PathBuilderLike } from "path-ts";
19
+ /**
20
+ * How to read member names that the archive does not declare an encoding for.
21
+ *
22
+ * A zip flags UTF-8 names with bit 11, and yauzl decodes those correctly. Without the flag the format says CP437, so a
23
+ * publisher writing CP949, Shift_JIS or GBK names produces bytes that decode to mojibake and match no selector —
24
+ * Korea's address portal writes `주소_서울특별시.txt` and the reader sees `┴╓╝╥_╝¡┐ïÆ╣▌╗π.txt`.
25
+ *
26
+ * Naming an encoding decodes the RAW bytes instead, which is not the same as recoding the mojibake back through CP437:
27
+ * that round trip needs a 256-entry table and silently mangles any byte CP437 maps to a character it cannot invert.
28
+ *
29
+ * @category Files
30
+ */
31
+ export interface ZipNameOptions {
32
+ /**
33
+ * An `iconv-lite` label — `cp949`, `shift_jis`, `gbk`. Omit when the archive's names are ASCII or properly flagged
34
+ * UTF-8, which is every other archive this repository reads.
35
+ */
36
+ filenameEncoding?: string;
37
+ }
19
38
  export type ZipEntryContentPair = [entry: ADMZip.IZipEntry, content: Buffer];
20
39
  /**
21
40
  * Extract the contents of a zip file.
@@ -52,7 +71,7 @@ export interface ZipEntryInfo {
52
71
  *
53
72
  * @category Files
54
73
  */
55
- export declare function listZipEntries(archivePath: PathBuilderLike): Promise<ZipEntryInfo[]>;
74
+ export declare function listZipEntries(archivePath: PathBuilderLike, options?: ZipNameOptions): Promise<ZipEntryInfo[]>;
56
75
  /**
57
76
  * Stream one member's decompressed bytes out of an archive on disk.
58
77
  *
@@ -63,7 +82,7 @@ export declare function listZipEntries(archivePath: PathBuilderLike): Promise<Zi
63
82
  * @category Files
64
83
  * @throws If no member matches `selector`.
65
84
  */
66
- export declare function readZipEntry(archivePath: PathBuilderLike, selector: ZipEntrySelector): AsyncGenerator<Uint8Array>;
85
+ export declare function readZipEntry(archivePath: PathBuilderLike, selector: ZipEntrySelector, options?: ZipNameOptions): AsyncGenerator<Uint8Array>;
67
86
  /**
68
87
  * Write one member's decompressed bytes to `destinationPath`.
69
88
  *
@@ -1 +1 @@
1
- {"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../lib/fs/zip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,MAAM,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAkC,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAqC9E,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAE5E;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAcpF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBhF;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAA;AAE9C;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;CACxB;AAMD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAa1F;AAED;;;;;;;;;GASG;AACH,wBAAuB,YAAY,CAClC,WAAW,EAAE,eAAe,EAC5B,QAAQ,EAAE,gBAAgB,GACxB,cAAc,CAAC,UAAU,CAAC,CAc5B;AAED;;;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