@mailwoman/core 10.3.0 → 10.5.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.
- package/data/PROVENANCE.md +14 -14
- package/data/libpostal/README.md +15 -15
- package/data/libpostal/dictionaries/README.md +3 -3
- package/lib/api/APIClient.ts +3 -3
- package/lib/api/ckan.ts +1 -1
- package/lib/api/clock.ts +1 -1
- package/lib/api/disk-storage.ts +4 -4
- package/lib/api/ogc.ts +9 -9
- package/lib/api/pacer.ts +1 -1
- package/lib/api/responses.ts +6 -6
- package/lib/api/retry.ts +2 -2
- package/lib/api/test/clocks.ts +2 -2
- package/lib/api/test/transport.ts +1 -1
- package/lib/coarse-placer/coarse-placer.ts +1 -1
- package/lib/decoder/build-tree.ts +1 -1
- package/lib/decoder/parse-diff.ts +3 -3
- package/lib/decoder/serialize/json.ts +1 -1
- package/lib/decoder/serialize/xml.ts +1 -1
- package/lib/env/env-file.ts +71 -0
- package/lib/env.ts +15 -9
- package/lib/fs/delimited.ts +3 -3
- package/lib/fs/formatters.ts +1 -1
- package/lib/fs/readers/stat.ts +16 -1
- package/lib/fs/readers.ts +18 -2
- package/lib/fs/zip.ts +1 -1
- package/lib/geocode/result.ts +8 -4
- package/lib/html/document.ts +1 -1
- package/lib/html/elements.ts +3 -3
- package/lib/json.ts +1 -1
- package/lib/layers/coverage.ts +3 -3
- package/lib/layers/manifest.ts +2 -2
- package/lib/layers/publication.ts +1 -1
- package/lib/layers/schema.ts +1 -1
- package/lib/license/docs-site.ts +1 -1
- package/lib/license/record.ts +3 -4
- package/lib/module/compiled-freshness.ts +6 -2
- package/lib/numeric.ts +2 -2
- package/lib/pipeline/runtime-pipeline.ts +47 -9
- package/lib/pipeline/span-proposer.ts +2 -2
- package/lib/pipeline/types.ts +153 -6
- package/lib/pipeline.ts +6 -0
- package/lib/postcode-prefix-files.ts +87 -0
- package/lib/promises.ts +12 -0
- package/lib/release-config.ts +7 -0
- package/lib/resolver/coverage-facts.ts +3 -3
- package/lib/resolver/lookup-types.ts +7 -6
- package/lib/resolver/referential.ts +1 -1
- package/lib/resolver/types.ts +6 -0
- package/lib/resources/libpostal.ts +51 -3
- package/lib/resources/whosonfirst/placetypes/graph.ts +2 -2
- package/lib/resources/whosonfirst/placetypes/specificity.ts +2 -2
- package/lib/scripting/utils.ts +1 -1
- package/lib/tokenization/normalizer.ts +1 -1
- package/lib/trust-policies.ts +1 -1
- package/lib/types/classifier.ts +1 -1
- package/lib/utils/chunk-process.ts +1 -1
- package/lib/utils/system.ts +1 -1
- package/out/api/APIClient.d.ts +2 -2
- package/out/api/APIClient.js +1 -1
- package/out/api/APIClient.js.map +1 -1
- package/out/api/ckan.d.ts +1 -1
- package/out/api/clock.d.ts +1 -1
- package/out/api/clock.js +1 -1
- package/out/api/disk-storage.js +4 -4
- package/out/api/disk-storage.js.map +1 -1
- package/out/api/ogc.d.ts +8 -8
- package/out/api/ogc.js +8 -8
- package/out/api/ogc.js.map +1 -1
- package/out/api/pacer.d.ts +1 -1
- package/out/api/pacer.js +1 -1
- package/out/api/responses.d.ts +4 -4
- package/out/api/responses.js +6 -6
- package/out/api/responses.js.map +1 -1
- package/out/api/retry.d.ts +2 -2
- package/out/api/retry.js +1 -1
- package/out/api/test/clocks.js +2 -2
- package/out/api/test/transport.d.ts +1 -1
- package/out/coarse-placer/coarse-placer.d.ts +1 -1
- package/out/coarse-placer/coarse-placer.js +1 -1
- package/out/decoder/build-tree.js +1 -1
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/parse-diff.d.ts +3 -3
- package/out/decoder/parse-diff.js +2 -2
- package/out/decoder/serialize/json.js +1 -1
- package/out/decoder/serialize/xml.d.ts +1 -1
- package/out/decoder/serialize/xml.js +1 -1
- package/out/env/env-file.d.ts +26 -0
- package/out/env/env-file.d.ts.map +1 -0
- package/out/env/env-file.js +60 -0
- package/out/env/env-file.js.map +1 -0
- package/out/env.d.ts.map +1 -1
- package/out/env.js +15 -10
- package/out/env.js.map +1 -1
- package/out/fs/delimited.d.ts +3 -3
- package/out/fs/delimited.js +3 -3
- package/out/fs/formatters.d.ts +1 -1
- package/out/fs/formatters.js +1 -1
- package/out/fs/readers/stat.d.ts +9 -1
- package/out/fs/readers/stat.d.ts.map +1 -1
- package/out/fs/readers/stat.js +16 -0
- package/out/fs/readers/stat.js.map +1 -1
- package/out/fs/readers.d.ts +14 -2
- package/out/fs/readers.d.ts.map +1 -1
- package/out/fs/readers.js +17 -2
- package/out/fs/readers.js.map +1 -1
- package/out/fs/zip.d.ts +1 -1
- package/out/fs/zip.js +1 -1
- package/out/geocode/result.d.ts +17 -5
- package/out/geocode/result.d.ts.map +1 -1
- package/out/geocode/result.js +8 -4
- package/out/geocode/result.js.map +1 -1
- package/out/html/document.d.ts +1 -1
- package/out/html/document.js +1 -1
- package/out/html/elements.d.ts +2 -2
- package/out/html/elements.js +3 -3
- package/out/json.d.ts +1 -1
- package/out/json.js +1 -1
- package/out/layers/coverage.d.ts +3 -3
- package/out/layers/coverage.js +2 -2
- package/out/layers/manifest.d.ts +2 -2
- package/out/layers/publication.d.ts +1 -1
- package/out/layers/publication.js +1 -1
- package/out/layers/schema.d.ts +1 -1
- package/out/license/docs-site.d.ts +1 -1
- package/out/license/docs-site.js +1 -1
- package/out/license/record.d.ts.map +1 -1
- package/out/license/record.js +3 -4
- package/out/license/record.js.map +1 -1
- package/out/module/compiled-freshness.d.ts +1 -1
- package/out/module/compiled-freshness.d.ts.map +1 -1
- package/out/module/compiled-freshness.js +6 -2
- package/out/module/compiled-freshness.js.map +1 -1
- package/out/numeric.js +2 -2
- package/out/pipeline/runtime-pipeline.d.ts +15 -0
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +25 -5
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-proposer.d.ts +1 -1
- package/out/pipeline/span-proposer.js +1 -1
- package/out/pipeline/types.d.ts +150 -6
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +1 -1
- package/out/pipeline/types.js.map +1 -1
- package/out/pipeline.d.ts +2 -2
- package/out/pipeline.d.ts.map +1 -1
- package/out/pipeline.js +1 -1
- package/out/pipeline.js.map +1 -1
- package/out/postcode-prefix-files.d.ts +45 -0
- package/out/postcode-prefix-files.d.ts.map +1 -0
- package/out/postcode-prefix-files.js +64 -0
- package/out/postcode-prefix-files.js.map +1 -0
- package/out/promises.d.ts +7 -0
- package/out/promises.d.ts.map +1 -1
- package/out/promises.js +10 -0
- package/out/promises.js.map +1 -1
- package/out/release-config.d.ts +7 -0
- package/out/release-config.d.ts.map +1 -1
- package/out/release-config.js.map +1 -1
- package/out/resolver/coverage-facts.d.ts +3 -3
- package/out/resolver/lookup-types.d.ts +7 -6
- package/out/resolver/lookup-types.d.ts.map +1 -1
- package/out/resolver/referential.d.ts +1 -1
- package/out/resolver/referential.js +1 -1
- package/out/resolver/types.d.ts +11 -1
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js.map +1 -1
- package/out/resources/libpostal.d.ts +22 -3
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +44 -4
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/graph.d.ts +2 -2
- package/out/resources/whosonfirst/placetypes/graph.js +1 -1
- package/out/resources/whosonfirst/placetypes/specificity.d.ts +2 -2
- package/out/resources/whosonfirst/placetypes/specificity.js +2 -2
- package/out/scripting/utils.d.ts +1 -1
- package/out/scripting/utils.js +1 -1
- package/out/tokenization/normalizer.js +1 -1
- package/out/tools/coarse-placer/outlier-rows.js +1 -1
- package/out/tools/coarse-placer/paths.d.ts +2 -2
- package/out/tools/coarse-placer/paths.js +2 -2
- package/out/trust-policies.d.ts +1 -1
- package/out/trust-policies.js +1 -1
- package/out/types/classifier.d.ts +1 -1
- package/out/utils/chunk-process.d.ts +1 -1
- package/out/utils/chunk-process.js +1 -1
- package/out/utils/system.d.ts +1 -1
- package/out/utils/system.js +1 -1
- package/package.json +28 -8
- package/tools/coarse-placer/outlier-rows.ts +1 -1
- package/tools/coarse-placer/paths.ts +2 -2
package/out/trust-policies.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* keep this module A leaf. The Node build constructs its jsdom window at import time — measured at
|
|
18
18
|
* 0.45 s and ~130 MB over a bare Node process — so an import from a barrel (`core/utils`, the CLI
|
|
19
|
-
* graph) would
|
|
19
|
+
* graph) would add that time and memory to every process in the repo. Only modules that sanitize import it.
|
|
20
20
|
*/
|
|
21
21
|
import DOMPurify, {} from "isomorphic-dompurify";
|
|
22
22
|
import { trustedTypes } from "trusted-types";
|
|
@@ -31,7 +31,7 @@ export type Section = Span;
|
|
|
31
31
|
*/
|
|
32
32
|
export type ClassificationProposalSource = "neural" | "merged";
|
|
33
33
|
/**
|
|
34
|
-
* A typed classification candidate
|
|
34
|
+
* A classifier produces this typed classification candidate.
|
|
35
35
|
*
|
|
36
36
|
* `source` and `source_id` identify the origin of each proposal without external state.
|
|
37
37
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* The function reads only the last stdout line, so a child can print diagnostics before its result.
|
|
14
14
|
*
|
|
15
15
|
* A non-zero exit throws.
|
|
16
|
-
* A chunk that exits
|
|
16
|
+
* A chunk that exits with code 0 without rows also throws.
|
|
17
17
|
* A chunk that dies mid-range has already written part of its rows into the shared artifact.
|
|
18
18
|
* The parent process must stop before it seals a database
|
|
19
19
|
* missing rows without identifiers.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* The function reads only the last stdout line, so a child can print diagnostics before its result.
|
|
14
14
|
*
|
|
15
15
|
* A non-zero exit throws.
|
|
16
|
-
* A chunk that exits
|
|
16
|
+
* A chunk that exits with code 0 without rows also throws.
|
|
17
17
|
* A chunk that dies mid-range has already written part of its rows into the shared artifact.
|
|
18
18
|
* The parent process must stop before it seals a database
|
|
19
19
|
* missing rows without identifiers.
|
package/out/utils/system.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* This is the only module that reads those values from `node:os` or the heap ceiling from `node:v8`.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* The number of threads that can run at once, as the runtime measures it — the ceiling for a worker pool.
|
|
11
11
|
*/
|
|
12
12
|
export declare function availableParallelism(): number;
|
|
13
13
|
/**
|
package/out/utils/system.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { arch, availableParallelism as nativeAvailableParallelism, cpus, platform, totalmem } from "node:os";
|
|
10
10
|
import { getHeapStatistics } from "node:v8";
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* The number of threads that can run at once, as the runtime measures it — the ceiling for a worker pool.
|
|
13
13
|
*/
|
|
14
14
|
export function availableParallelism() {
|
|
15
15
|
return nativeAvailableParallelism();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/core",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.0",
|
|
4
4
|
"description": "Mailwoman core: tokenization, decoder, formatter, resources, filters, utils.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
@@ -176,6 +176,11 @@
|
|
|
176
176
|
"node": "./out/resources/whosonfirst.js",
|
|
177
177
|
"default": "./out/resources/whosonfirst.js"
|
|
178
178
|
},
|
|
179
|
+
"./resources/libpostal": {
|
|
180
|
+
"types": "./out/resources/libpostal.d.ts",
|
|
181
|
+
"node": "./out/resources/libpostal.js",
|
|
182
|
+
"default": "./out/resources/libpostal.js"
|
|
183
|
+
},
|
|
179
184
|
"./resources/whosonfirst/specificity": {
|
|
180
185
|
"types": "./out/resources/whosonfirst/placetypes/specificity.d.ts",
|
|
181
186
|
"node": "./out/resources/whosonfirst/placetypes/specificity.js",
|
|
@@ -561,6 +566,11 @@
|
|
|
561
566
|
"node": "./out/data-root.js",
|
|
562
567
|
"default": "./out/data-root.js"
|
|
563
568
|
},
|
|
569
|
+
"./postcode-prefix-files": {
|
|
570
|
+
"types": "./out/postcode-prefix-files.d.ts",
|
|
571
|
+
"node": "./out/postcode-prefix-files.js",
|
|
572
|
+
"default": "./out/postcode-prefix-files.js"
|
|
573
|
+
},
|
|
564
574
|
"./overture-pins": {
|
|
565
575
|
"types": "./out/overture-pins.d.ts",
|
|
566
576
|
"node": "./out/overture-pins.js",
|
|
@@ -731,6 +741,11 @@
|
|
|
731
741
|
"node": "./out/resources/whosonfirst.js",
|
|
732
742
|
"default": "./out/resources/whosonfirst.js"
|
|
733
743
|
},
|
|
744
|
+
"./resources/libpostal": {
|
|
745
|
+
"types": "./out/resources/libpostal.d.ts",
|
|
746
|
+
"node": "./out/resources/libpostal.js",
|
|
747
|
+
"default": "./out/resources/libpostal.js"
|
|
748
|
+
},
|
|
734
749
|
"./resources/whosonfirst/specificity": {
|
|
735
750
|
"types": "./out/resources/whosonfirst/placetypes/specificity.d.ts",
|
|
736
751
|
"node": "./out/resources/whosonfirst/placetypes/specificity.js",
|
|
@@ -1116,6 +1131,11 @@
|
|
|
1116
1131
|
"node": "./out/data-root.js",
|
|
1117
1132
|
"default": "./out/data-root.js"
|
|
1118
1133
|
},
|
|
1134
|
+
"./postcode-prefix-files": {
|
|
1135
|
+
"types": "./out/postcode-prefix-files.d.ts",
|
|
1136
|
+
"node": "./out/postcode-prefix-files.js",
|
|
1137
|
+
"default": "./out/postcode-prefix-files.js"
|
|
1138
|
+
},
|
|
1119
1139
|
"./overture-pins": {
|
|
1120
1140
|
"types": "./out/overture-pins.d.ts",
|
|
1121
1141
|
"node": "./out/overture-pins.js",
|
|
@@ -1236,11 +1256,11 @@
|
|
|
1236
1256
|
}
|
|
1237
1257
|
},
|
|
1238
1258
|
"dependencies": {
|
|
1239
|
-
"@mailwoman/annotations": "10.
|
|
1240
|
-
"@mailwoman/codex": "10.
|
|
1241
|
-
"@mailwoman/evidence": "10.
|
|
1242
|
-
"@mailwoman/query-shape": "10.
|
|
1243
|
-
"@mailwoman/sqlite": "10.
|
|
1259
|
+
"@mailwoman/annotations": "10.5.0",
|
|
1260
|
+
"@mailwoman/codex": "10.5.0",
|
|
1261
|
+
"@mailwoman/evidence": "10.5.0",
|
|
1262
|
+
"@mailwoman/query-shape": "10.5.0",
|
|
1263
|
+
"@mailwoman/sqlite": "10.5.0",
|
|
1244
1264
|
"adm-zip": "^0.6.1",
|
|
1245
1265
|
"async-init": "^1.0.0",
|
|
1246
1266
|
"axios": "^1.20.0",
|
|
@@ -1261,7 +1281,7 @@
|
|
|
1261
1281
|
"path-ts": "^2.5.0",
|
|
1262
1282
|
"pino": "^10.4.0",
|
|
1263
1283
|
"regenerate": "^1.5.0",
|
|
1264
|
-
"spliterator": "^9.2.
|
|
1284
|
+
"spliterator": "^9.2.1",
|
|
1265
1285
|
"trusted-types": "^2.0.0",
|
|
1266
1286
|
"type-fest": "^5.10.0",
|
|
1267
1287
|
"yauzl-promise": "^4.0.0",
|
|
@@ -1269,7 +1289,7 @@
|
|
|
1269
1289
|
},
|
|
1270
1290
|
"devDependencies": {
|
|
1271
1291
|
"@duckdb/node-api": "1.5.6-r.1",
|
|
1272
|
-
"@mailwoman/spatial": "10.
|
|
1292
|
+
"@mailwoman/spatial": "10.5.0",
|
|
1273
1293
|
"@types/d3-color": "^3.1.3",
|
|
1274
1294
|
"@types/d3-scale-chromatic": "^3.1.0",
|
|
1275
1295
|
"@types/trusted-types": "^2.0.7",
|
|
@@ -15,7 +15,7 @@ import { stringifyJSON } from "#json"
|
|
|
15
15
|
import { isPresent } from "#objects"
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Shortest raw string
|
|
18
|
+
* Shortest raw string kept as an outlier example.
|
|
19
19
|
* Below it there is no example to learn from.
|
|
20
20
|
*/
|
|
21
21
|
const MIN_OUTLIER_LENGTH = 6
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The default artifact and dataset locations the coarse-placer tools share.
|
|
7
|
-
* a relocated artifact is a one-line change rather than a sweep of every tool's option default.
|
|
6
|
+
* The default artifact and dataset locations the coarse-placer tools share. Each location has one
|
|
7
|
+
* spelling, so a relocated artifact is a one-line change rather than a sweep of every tool's option default.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { type PathBuilder, type PathBuilderLike, resolvePath } from "path-ts"
|