@mailwoman/core 9.0.0 → 9.1.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/coarse-placer/tools/build-dataset.ts +2 -2
- package/coarse-placer/tools/build-outlier-exposure.ts +2 -2
- package/coarse-placer/tools/build-outlier-latin.ts +2 -2
- package/coarse-placer/tools/build-outlier-oa.ts +2 -2
- package/coarse-placer/tools/eval-latin-offmap.ts +2 -4
- package/coarse-placer/tools/eval-openset.ts +2 -3
- package/coarse-placer/tools/eval-quant-compare.ts +2 -3
- package/coarse-placer/tools/eval.ts +2 -3
- package/coarse-placer/tools/probe-frontier.ts +2 -4
- package/coarse-placer/tools/quantize.ts +3 -2
- package/coarse-placer/tools/train.ts +1 -2
- package/decoder/build-tree.ts +19 -0
- package/env/schema.ts +9 -0
- package/fs/zip.ts +297 -0
- package/out/coarse-placer/tools/build-dataset.js +1 -2
- package/out/coarse-placer/tools/build-dataset.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-exposure.js +1 -2
- package/out/coarse-placer/tools/build-outlier-exposure.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.js +1 -2
- package/out/coarse-placer/tools/build-outlier-latin.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.js +1 -2
- package/out/coarse-placer/tools/build-outlier-oa.js.map +1 -1
- package/out/coarse-placer/tools/eval-latin-offmap.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-latin-offmap.js +2 -4
- package/out/coarse-placer/tools/eval-latin-offmap.js.map +1 -1
- package/out/coarse-placer/tools/eval-openset.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-openset.js +2 -3
- package/out/coarse-placer/tools/eval-openset.js.map +1 -1
- package/out/coarse-placer/tools/eval-quant-compare.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-quant-compare.js +2 -3
- package/out/coarse-placer/tools/eval-quant-compare.js.map +1 -1
- package/out/coarse-placer/tools/eval.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval.js +2 -3
- package/out/coarse-placer/tools/eval.js.map +1 -1
- package/out/coarse-placer/tools/probe-frontier.d.ts.map +1 -1
- package/out/coarse-placer/tools/probe-frontier.js +2 -4
- package/out/coarse-placer/tools/probe-frontier.js.map +1 -1
- package/out/coarse-placer/tools/quantize.d.ts.map +1 -1
- package/out/coarse-placer/tools/quantize.js +2 -2
- package/out/coarse-placer/tools/quantize.js.map +1 -1
- package/out/coarse-placer/tools/train.d.ts.map +1 -1
- package/out/coarse-placer/tools/train.js +1 -2
- package/out/coarse-placer/tools/train.js.map +1 -1
- package/out/decoder/build-tree.d.ts.map +1 -1
- package/out/decoder/build-tree.js +17 -0
- package/out/decoder/build-tree.js.map +1 -1
- package/out/env/index.d.ts +3 -0
- package/out/env/index.d.ts.map +1 -1
- package/out/env/schema.d.ts +3 -0
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +8 -0
- package/out/env/schema.js.map +1 -1
- package/out/fs/zip.d.ts +116 -0
- package/out/fs/zip.d.ts.map +1 -0
- package/out/fs/zip.js +216 -0
- package/out/fs/zip.js.map +1 -0
- package/out/pipeline/index.d.ts +2 -2
- package/out/pipeline/index.d.ts.map +1 -1
- package/out/pipeline/index.js +1 -1
- package/out/pipeline/index.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +17 -1
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/types.d.ts +115 -2
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +30 -0
- package/out/pipeline/types.js.map +1 -1
- package/out/resolver/index.d.ts +3 -1
- package/out/resolver/index.d.ts.map +1 -1
- package/out/resolver/index.js +1 -0
- package/out/resolver/index.js.map +1 -1
- package/out/resolver/referential.d.ts +73 -0
- package/out/resolver/referential.d.ts.map +1 -0
- package/out/resolver/referential.js +71 -0
- package/out/resolver/referential.js.map +1 -0
- package/out/resolver/types.d.ts +163 -0
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.js +2 -2
- package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
- package/out/resources/whosonfirst/sharded-repo.js +1 -1
- package/out/resources/whosonfirst/sharded-repo.js.map +1 -1
- package/out/scripting/utils/index.d.ts.map +1 -1
- package/out/scripting/utils/index.js +2 -2
- package/out/scripting/utils/index.js.map +1 -1
- package/package.json +16 -5
- package/pipeline/index.ts +2 -1
- package/pipeline/runtime-pipeline.ts +19 -1
- package/pipeline/types.ts +117 -1
- package/resolver/index.ts +13 -0
- package/resolver/referential.ts +84 -0
- package/resolver/types.ts +166 -0
- package/resources/whosonfirst/placetypes/Placetype.ts +2 -2
- package/resources/whosonfirst/sharded-repo.ts +1 -1
- package/scripting/utils/index.ts +2 -3
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
import { mkdirSync, writeFileSync } from "node:fs"
|
|
22
22
|
import * as path from "node:path"
|
|
23
23
|
|
|
24
|
-
import { dataRootPath } from "
|
|
25
|
-
|
|
24
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils"
|
|
25
|
+
|
|
26
26
|
import { hashFNV1a } from "./fnv-hash.ts"
|
|
27
27
|
|
|
28
28
|
interface DatasetRow {
|
|
@@ -20,8 +20,8 @@ import { appendFileSync } from "node:fs"
|
|
|
20
20
|
import * as path from "node:path"
|
|
21
21
|
import { DatabaseSync } from "node:sqlite"
|
|
22
22
|
|
|
23
|
-
import { dataRootPath } from "
|
|
24
|
-
|
|
23
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils"
|
|
24
|
+
|
|
25
25
|
import { hashFNV1a } from "./fnv-hash.ts"
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
import { appendFileSync, writeFileSync } from "node:fs"
|
|
27
27
|
import * as path from "node:path"
|
|
28
28
|
|
|
29
|
-
import { dataRootPath } from "
|
|
30
|
-
|
|
29
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils"
|
|
30
|
+
|
|
31
31
|
import { hashFNV1a } from "./fnv-hash.ts"
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
import { appendFileSync, writeFileSync } from "node:fs"
|
|
33
33
|
import * as path from "node:path"
|
|
34
34
|
|
|
35
|
-
import { dataRootPath } from "
|
|
36
|
-
|
|
35
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils"
|
|
36
|
+
|
|
37
37
|
import { hashFNV1a } from "./fnv-hash.ts"
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -16,12 +16,10 @@
|
|
|
16
16
|
import { readFileSync } from "node:fs"
|
|
17
17
|
import * as path from "node:path"
|
|
18
18
|
|
|
19
|
+
import { parseJSONStrict } from "@mailwoman/core/objects"
|
|
20
|
+
import { dataRootPath, repoRootPath, formatPercent } from "@mailwoman/core/utils"
|
|
19
21
|
import { JSONSpliterator } from "spliterator"
|
|
20
22
|
|
|
21
|
-
import { parseJSONStrict } from "../../objects.ts"
|
|
22
|
-
import { dataRootPath } from "../../utils/data-root.ts"
|
|
23
|
-
import { repoRootPath } from "../../utils/repo.ts"
|
|
24
|
-
import { formatPercent } from "../../utils/stats.ts"
|
|
25
23
|
import { CoarsePlacer, type CoarsePlacerMeta, type CoarsePrediction } from "../coarse-placer.ts"
|
|
26
24
|
|
|
27
25
|
/**
|
|
@@ -36,11 +36,10 @@
|
|
|
36
36
|
import { readFileSync, writeFileSync } from "node:fs"
|
|
37
37
|
import * as path from "node:path"
|
|
38
38
|
|
|
39
|
+
import { parseJSONStrict } from "@mailwoman/core/objects"
|
|
40
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils"
|
|
39
41
|
import { JSONSpliterator } from "spliterator"
|
|
40
42
|
|
|
41
|
-
import { parseJSONStrict } from "../../objects.ts"
|
|
42
|
-
import { dataRootPath } from "../../utils/data-root.ts"
|
|
43
|
-
import { repoRootPath } from "../../utils/repo.ts"
|
|
44
43
|
import type { CoarsePlacerMeta } from "../coarse-placer.ts"
|
|
45
44
|
import { COARSE_CLASSES, featurize } from "../featurize.ts"
|
|
46
45
|
|
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
import { readFileSync } from "node:fs"
|
|
15
15
|
import * as path from "node:path"
|
|
16
16
|
|
|
17
|
+
import { parseJSONStrict } from "@mailwoman/core/objects"
|
|
18
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils"
|
|
17
19
|
import { JSONSpliterator } from "spliterator"
|
|
18
20
|
|
|
19
|
-
import { parseJSONStrict } from "../../objects.ts"
|
|
20
|
-
import { dataRootPath } from "../../utils/data-root.ts"
|
|
21
|
-
import { repoRootPath } from "../../utils/repo.ts"
|
|
22
21
|
import { CoarsePlacer, type CoarsePlacerMeta } from "../coarse-placer.ts"
|
|
23
22
|
|
|
24
23
|
interface TestRow {
|
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
import { readFileSync } from "node:fs"
|
|
15
15
|
import * as path from "node:path"
|
|
16
16
|
|
|
17
|
+
import { parseJSONStrict } from "@mailwoman/core/objects"
|
|
18
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils"
|
|
17
19
|
import { JSONSpliterator } from "spliterator"
|
|
18
20
|
|
|
19
|
-
import { parseJSONStrict } from "../../objects.ts"
|
|
20
|
-
import { dataRootPath } from "../../utils/data-root.ts"
|
|
21
|
-
import { repoRootPath } from "../../utils/repo.ts"
|
|
22
21
|
import { CoarsePlacer, type CoarsePlacerMeta, type CoarsePrediction } from "../coarse-placer.ts"
|
|
23
22
|
|
|
24
23
|
/**
|
|
@@ -21,13 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
import { readFileSync, writeFileSync } from "node:fs"
|
|
23
23
|
|
|
24
|
+
import { parseJSONStrict } from "@mailwoman/core/objects"
|
|
25
|
+
import { dataRootPath, corePackagePath, median } from "@mailwoman/core/utils"
|
|
24
26
|
import { join } from "path-ts"
|
|
25
27
|
import { TSVSpliterator } from "spliterator"
|
|
26
28
|
|
|
27
|
-
import { parseJSONStrict } from "../../objects.ts"
|
|
28
|
-
import { dataRootPath } from "../../utils/data-root.ts"
|
|
29
|
-
import { corePackagePath } from "../../utils/repo.ts"
|
|
30
|
-
import { median } from "../../utils/stats.ts"
|
|
31
29
|
import { CoarsePlacer, type CoarsePlacerMeta } from "../coarse-placer.ts"
|
|
32
30
|
|
|
33
31
|
/**
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs"
|
|
20
20
|
import * as path from "node:path"
|
|
21
21
|
|
|
22
|
-
import { parseJSONStrict } from "
|
|
23
|
-
import { dataRootPath } from "
|
|
22
|
+
import { parseJSONStrict } from "@mailwoman/core/objects"
|
|
23
|
+
import { dataRootPath } from "@mailwoman/core/utils"
|
|
24
|
+
|
|
24
25
|
import type { CoarsePlacerMeta } from "../coarse-placer.ts"
|
|
25
26
|
|
|
26
27
|
/**
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
import { mkdirSync, writeFileSync } from "node:fs"
|
|
16
16
|
import * as path from "node:path"
|
|
17
17
|
|
|
18
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils"
|
|
18
19
|
import { JSONSpliterator } from "spliterator"
|
|
19
20
|
|
|
20
|
-
import { dataRootPath } from "../../utils/data-root.ts"
|
|
21
|
-
import { repoRootPath } from "../../utils/repo.ts"
|
|
22
21
|
import { COARSE_CLASSES, FEATURE_DIM, featurize } from "../featurize.ts"
|
|
23
22
|
|
|
24
23
|
/**
|
package/decoder/build-tree.ts
CHANGED
|
@@ -72,16 +72,35 @@ function bioParts(label: BIOLabel): { prefix: "B" | "I" | "O"; tag: ComponentTag
|
|
|
72
72
|
// v0.4.0 entry). The model's tag attribution is correct, only the boundary is fuzzy. Trimming
|
|
73
73
|
// produces a clean canonical value AND clean start/end offsets so downstream consumers slicing
|
|
74
74
|
// raw[start:end] get the same string as node.value.
|
|
75
|
+
//
|
|
76
|
+
// EXCEPTION: a trailing period directly adjacent to a word character is an abbreviation marker
|
|
77
|
+
// ("Str." / "St." / "Ave."). The model includes these in the span correctly; stripping them loses
|
|
78
|
+
// the abbreviation suffix. We preserve the period when it is immediately preceded by \p{L}\p{N}
|
|
79
|
+
// and NOT separated by whitespace — the slip pattern we guard against is ", 22220" / "Paris 75004,"
|
|
80
|
+
// / wrapping quotes, where the punctuation is isolated from the word body. (#1519 trailing-dot half)
|
|
75
81
|
function trimBoundary(raw: string, start: number, end: number): { start: number; end: number } {
|
|
76
82
|
let s = start
|
|
77
83
|
let e = end
|
|
78
84
|
const isWordChar = (i: number): boolean => /[\p{L}\p{N}]/u.test(raw[i] ?? "")
|
|
79
85
|
|
|
86
|
+
// Leading trim: skip punctuation not part of an abbreviation prefix (e.g. leading "." before a
|
|
87
|
+
// word char is rare but symmetric — preserve it).
|
|
80
88
|
while (s < e && !isWordChar(s)) {
|
|
89
|
+
if (raw[s] === "." && s + 1 < e && isWordChar(s + 1)) {
|
|
90
|
+
// Abbreviation-dot prefix: ".com" style — preserve.
|
|
91
|
+
break
|
|
92
|
+
}
|
|
93
|
+
|
|
81
94
|
s++
|
|
82
95
|
}
|
|
83
96
|
|
|
97
|
+
// Trailing trim: skip punctuation, but preserve a trailing abbreviation period.
|
|
84
98
|
while (e > s && !isWordChar(e - 1)) {
|
|
99
|
+
if (raw[e - 1] === "." && e - 2 >= s && isWordChar(e - 2)) {
|
|
100
|
+
// Abbreviation-dot suffix: "Str." / "Ave." — adjacent to the last word char, preserve.
|
|
101
|
+
break
|
|
102
|
+
}
|
|
103
|
+
|
|
85
104
|
e--
|
|
86
105
|
}
|
|
87
106
|
|
package/env/schema.ts
CHANGED
|
@@ -181,6 +181,15 @@ export const PrivateEnvSchema = z.object({
|
|
|
181
181
|
|
|
182
182
|
// SEC EDGAR fair-access User-Agent (`filer/sdk/sec-client.ts`) — "Company Name AdminContact@domain.com".
|
|
183
183
|
SEC_EDGAR_USER_AGENT: z.string().optional(),
|
|
184
|
+
/**
|
|
185
|
+
* Descriptive User-Agent for the FCC CORES lookup (`filer/sdk/cores-client.ts`). Optional in a way
|
|
186
|
+
* `SEC_EDGAR_USER_AGENT` is not: SEC 403s a request that fails to identify itself, FCC does not. Falls back to
|
|
187
|
+
* `SEC_EDGAR_USER_AGENT` — the same contact address — when unset.
|
|
188
|
+
*/
|
|
189
|
+
FCC_CORES_USER_AGENT: z.string().optional(),
|
|
190
|
+
|
|
191
|
+
USAC_API_KEY_ID: z.string().optional(),
|
|
192
|
+
USAC_API_SECRET_KEY: z.string().optional(),
|
|
184
193
|
|
|
185
194
|
// Google Maps Platform key for the reference-geocoder ORACLE (`geocode-oracle/sdk/google-client.ts`).
|
|
186
195
|
// Verification tooling only — nothing on the parse path reads this, and `@mailwoman/geocode-oracle` is
|
package/fs/zip.ts
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software.
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file Zip readers, in two flavours — buffer-in for archives already in memory, path-in for archives on disk.
|
|
6
|
+
*
|
|
7
|
+
* {@link extractZip} and {@link extractSingleFileZip} take the whole archive as a `Buffer`, which is the right shape
|
|
8
|
+
* when a client has just downloaded one (`bdc/sdk/download.ts`) and the wrong shape for anything sizable: adm-zip
|
|
9
|
+
* holds the archive AND the decompressed member resident at once. The national address dumps under
|
|
10
|
+
* `$MAILWOMAN_DATA_ROOT` are 0.5–2.9 GB compressed and up to 9 GB unpacked, so the path-in readers below stream —
|
|
11
|
+
* yauzl seeks the central directory over a file handle and inflates one member on demand, at constant memory
|
|
12
|
+
* regardless of archive size.
|
|
13
|
+
*
|
|
14
|
+
* The path-in readers also handle ZIP64, which the dumps need: a member above 4 GB parks `0xFFFFFFFF` in the 32-bit
|
|
15
|
+
* size and offset slots and carries the real values in the entry's extra field.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { createWriteStream } from "node:fs"
|
|
19
|
+
import { mkdir } from "node:fs/promises"
|
|
20
|
+
import { basename, dirname, join } from "node:path"
|
|
21
|
+
import { pipeline } from "node:stream/promises"
|
|
22
|
+
import { crc32 } from "node:zlib"
|
|
23
|
+
|
|
24
|
+
import ADMZip from "adm-zip"
|
|
25
|
+
import type { PathBuilderLike } from "path-ts"
|
|
26
|
+
import { open as openArchive } from "yauzl-promise"
|
|
27
|
+
|
|
28
|
+
export type ZipEntryContentPair = [entry: ADMZip.IZipEntry, content: Buffer]
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Extract the contents of a zip file.
|
|
32
|
+
*
|
|
33
|
+
* @category Files
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export function extractZip(data: ArrayBuffer | Buffer): Map<ADMZip.IZipEntry, Buffer> {
|
|
37
|
+
const normalizedData = data instanceof ArrayBuffer ? Buffer.from(data) : data
|
|
38
|
+
const zip = new ADMZip(normalizedData)
|
|
39
|
+
|
|
40
|
+
const pairs = zip
|
|
41
|
+
.getEntries()
|
|
42
|
+
.map((entry) => [entry, zip.readFile(entry)])
|
|
43
|
+
.filter((pair): pair is ZipEntryContentPair => pair[1] !== null)
|
|
44
|
+
|
|
45
|
+
if (!pairs.length) {
|
|
46
|
+
throw new Error("No entry pairs found in zip file.")
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return new Map<ADMZip.IZipEntry, Buffer>(pairs)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Extract the contents of a zip file and return the first entry.
|
|
54
|
+
*/
|
|
55
|
+
export function extractSingleFileZip(data: ArrayBuffer | Buffer): Promise<Buffer> {
|
|
56
|
+
const normalizedData = data instanceof ArrayBuffer ? Buffer.from(data) : data
|
|
57
|
+
const zip = new ADMZip(normalizedData)
|
|
58
|
+
|
|
59
|
+
const [entry] = zip.getEntries()
|
|
60
|
+
|
|
61
|
+
// We use the async version of getData to avoid blocking the event loop.
|
|
62
|
+
return new Promise<Buffer>((resolve, reject) =>
|
|
63
|
+
// oxlint-disable-next-line no-promise-executor-return
|
|
64
|
+
entry!.getDataAsync((extractedData, error) => {
|
|
65
|
+
if (error) {
|
|
66
|
+
reject(error)
|
|
67
|
+
} else {
|
|
68
|
+
resolve(extractedData)
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Names a member of an archive, either exactly or by pattern.
|
|
76
|
+
*
|
|
77
|
+
* A pattern matches the FIRST entry whose full archive-internal path tests true, in central-directory order.
|
|
78
|
+
*/
|
|
79
|
+
export type ZipEntrySelector = string | RegExp
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* One archive member, as reported by the central directory.
|
|
83
|
+
*
|
|
84
|
+
* @category Files
|
|
85
|
+
*/
|
|
86
|
+
export interface ZipEntryInfo {
|
|
87
|
+
/**
|
|
88
|
+
* The archive-internal path, e.g. `it/countrywide.csv`. Directory entries keep their trailing slash.
|
|
89
|
+
*/
|
|
90
|
+
name: string
|
|
91
|
+
compressedSize: number
|
|
92
|
+
uncompressedSize: number
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function selectorMatches(selector: ZipEntrySelector, name: string): boolean {
|
|
96
|
+
return typeof selector === "string" ? name === selector : selector.test(name)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* List an archive's members without decompressing any of them.
|
|
101
|
+
*
|
|
102
|
+
* @category Files
|
|
103
|
+
*/
|
|
104
|
+
export async function listZipEntries(archivePath: PathBuilderLike): Promise<ZipEntryInfo[]> {
|
|
105
|
+
const archive = await openArchive(String(archivePath))
|
|
106
|
+
const entries: ZipEntryInfo[] = []
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
for await (const entry of archive) {
|
|
110
|
+
entries.push({
|
|
111
|
+
name: entry.filename,
|
|
112
|
+
compressedSize: entry.compressedSize,
|
|
113
|
+
uncompressedSize: entry.uncompressedSize,
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
} finally {
|
|
117
|
+
await archive.close()
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return entries
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Stream one member's decompressed bytes out of an archive on disk.
|
|
125
|
+
*
|
|
126
|
+
* Nothing beyond the central directory and the inflate window is held in memory, so this is bounded by the consumer
|
|
127
|
+
* rather than by the member's size. A consumer that stops early — a `take`, a `break` — destroys the member stream and
|
|
128
|
+
* closes the archive on the way out.
|
|
129
|
+
*
|
|
130
|
+
* @category Files
|
|
131
|
+
* @throws If no member matches `selector`.
|
|
132
|
+
*/
|
|
133
|
+
export async function* readZipEntry(
|
|
134
|
+
archivePath: PathBuilderLike,
|
|
135
|
+
selector: ZipEntrySelector
|
|
136
|
+
): AsyncGenerator<Uint8Array> {
|
|
137
|
+
const archive = await openArchive(String(archivePath))
|
|
138
|
+
|
|
139
|
+
try {
|
|
140
|
+
for await (const entry of archive) {
|
|
141
|
+
if (!selectorMatches(selector, entry.filename)) continue
|
|
142
|
+
|
|
143
|
+
const contents = await entry.openReadStream()
|
|
144
|
+
|
|
145
|
+
try {
|
|
146
|
+
yield* contents
|
|
147
|
+
} finally {
|
|
148
|
+
contents.destroy()
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
throw new Error(`No entry matching ${selector} in ${archivePath}`)
|
|
155
|
+
} finally {
|
|
156
|
+
await archive.close()
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Write one member's decompressed bytes to `destinationPath`.
|
|
162
|
+
*
|
|
163
|
+
* @category Files
|
|
164
|
+
*
|
|
165
|
+
* @returns The number of bytes written, as the central directory reports them.
|
|
166
|
+
* @throws If no member matches `selector`.
|
|
167
|
+
*/
|
|
168
|
+
export async function extractZipEntry(
|
|
169
|
+
archivePath: PathBuilderLike,
|
|
170
|
+
selector: ZipEntrySelector,
|
|
171
|
+
destinationPath: PathBuilderLike
|
|
172
|
+
): Promise<number> {
|
|
173
|
+
const archive = await openArchive(String(archivePath))
|
|
174
|
+
|
|
175
|
+
try {
|
|
176
|
+
for await (const entry of archive) {
|
|
177
|
+
if (!selectorMatches(selector, entry.filename)) continue
|
|
178
|
+
|
|
179
|
+
await pipeline(await entry.openReadStream(), createWriteStream(String(destinationPath)))
|
|
180
|
+
|
|
181
|
+
return entry.uncompressedSize
|
|
182
|
+
}
|
|
183
|
+
} finally {
|
|
184
|
+
await archive.close()
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
throw new Error(`No entry matching ${selector} in ${archivePath}`)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface ExtractZipEntriesOptions {
|
|
191
|
+
/**
|
|
192
|
+
* Which members to write. Omit for every member.
|
|
193
|
+
*/
|
|
194
|
+
selector?: ZipEntrySelector
|
|
195
|
+
/**
|
|
196
|
+
* Write each member under its basename rather than its archive-internal path, flattening the tree — `unzip -j`.
|
|
197
|
+
*
|
|
198
|
+
* The shapefile archives this exists for carry their siblings in one directory, and the readers downstream expect
|
|
199
|
+
* them flat.
|
|
200
|
+
*/
|
|
201
|
+
flatten?: boolean
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Extract members of an archive into `destinationDirectory`.
|
|
206
|
+
*
|
|
207
|
+
* Directory entries are skipped; a nested path is created as needed unless `flatten` is set. Members stream one at a
|
|
208
|
+
* time, so this is bounded by the largest member rather than by the archive.
|
|
209
|
+
*
|
|
210
|
+
* @category Files
|
|
211
|
+
*
|
|
212
|
+
* @returns The archive-internal names of everything written, in central-directory order.
|
|
213
|
+
*/
|
|
214
|
+
export async function extractZipEntries(
|
|
215
|
+
archivePath: PathBuilderLike,
|
|
216
|
+
destinationDirectory: PathBuilderLike,
|
|
217
|
+
{ selector, flatten = false }: ExtractZipEntriesOptions = {}
|
|
218
|
+
): Promise<string[]> {
|
|
219
|
+
const archive = await openArchive(String(archivePath))
|
|
220
|
+
const written: string[] = []
|
|
221
|
+
|
|
222
|
+
try {
|
|
223
|
+
for await (const entry of archive) {
|
|
224
|
+
if (entry.filename.endsWith("/")) continue
|
|
225
|
+
|
|
226
|
+
if (selector && !selectorMatches(selector, entry.filename)) continue
|
|
227
|
+
|
|
228
|
+
const relative = flatten ? basename(entry.filename) : entry.filename
|
|
229
|
+
const destination = join(String(destinationDirectory), relative)
|
|
230
|
+
|
|
231
|
+
if (!flatten) {
|
|
232
|
+
await mkdir(dirname(destination), { recursive: true })
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
await pipeline(await entry.openReadStream(), createWriteStream(destination))
|
|
236
|
+
|
|
237
|
+
written.push(entry.filename)
|
|
238
|
+
}
|
|
239
|
+
} finally {
|
|
240
|
+
await archive.close()
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return written
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Verify every member's CRC-32 against the value its central-directory header claims — what `unzip -t` is for.
|
|
248
|
+
*
|
|
249
|
+
* This is a corruption check on a download, so it decompresses everything and keeps nothing; the archive is read one
|
|
250
|
+
* member at a time and the checksum is folded chunk by chunk, so memory is bounded by the inflate window.
|
|
251
|
+
*
|
|
252
|
+
* The CRC is computed here rather than delegated to yauzl's `validateCrc32`, which asserts `Cannot validate CRC32 for
|
|
253
|
+
* uncompressed data` on a STORED member — and a corrupt stored member is precisely what this is meant to catch. Folding
|
|
254
|
+
* it locally covers both storage methods with one path.
|
|
255
|
+
*
|
|
256
|
+
* @category Files
|
|
257
|
+
*
|
|
258
|
+
* @returns The number of members checked. @throws If the archive is unreadable, or any member's checksum or length
|
|
259
|
+
* disagrees with its header.
|
|
260
|
+
*/
|
|
261
|
+
export async function verifyZipIntegrity(archivePath: PathBuilderLike): Promise<number> {
|
|
262
|
+
const archive = await openArchive(String(archivePath))
|
|
263
|
+
let checked = 0
|
|
264
|
+
|
|
265
|
+
try {
|
|
266
|
+
for await (const entry of archive) {
|
|
267
|
+
if (entry.filename.endsWith("/")) continue
|
|
268
|
+
|
|
269
|
+
const contents = await entry.openReadStream({ validateCrc32: false })
|
|
270
|
+
let checksum = 0
|
|
271
|
+
let length = 0
|
|
272
|
+
|
|
273
|
+
for await (const chunk of contents) {
|
|
274
|
+
checksum = crc32(chunk as Uint8Array, checksum)
|
|
275
|
+
length += (chunk as Uint8Array).length
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (checksum !== entry.crc32) {
|
|
279
|
+
throw new Error(
|
|
280
|
+
`CRC mismatch in ${archivePath}: ${entry.filename} is 0x${checksum.toString(16)}, header claims 0x${entry.crc32.toString(16)}`
|
|
281
|
+
)
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (length !== entry.uncompressedSize) {
|
|
285
|
+
throw new Error(
|
|
286
|
+
`Length mismatch in ${archivePath}: ${entry.filename} is ${length} bytes, header claims ${entry.uncompressedSize}`
|
|
287
|
+
)
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
checked++
|
|
291
|
+
}
|
|
292
|
+
} finally {
|
|
293
|
+
await archive.close()
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return checked
|
|
297
|
+
}
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
21
21
|
import * as path from "node:path";
|
|
22
|
-
import { dataRootPath } from "
|
|
23
|
-
import { repoRootPath } from "../../utils/repo.js";
|
|
22
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils";
|
|
24
23
|
import { hashFNV1a } from "./fnv-hash.js";
|
|
25
24
|
const VAL_FRAC = 0.1;
|
|
26
25
|
const TEST_FRAC = 0.1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-dataset.js","sourceRoot":"","sources":["../../../coarse-placer/tools/build-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"build-dataset.js","sourceRoot":"","sources":["../../../coarse-placer/tools/build-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AA+BzC,MAAM,QAAQ,GAAG,GAAG,CAAA;AACpB,MAAM,SAAS,GAAG,GAAG,CAAA;AAErB,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAEpF;;;;;GAKG;AACH,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAC/G;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;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
|
|
19
19
|
import * as path from "node:path";
|
|
20
20
|
import { DatabaseSync } from "node:sqlite";
|
|
21
|
-
import { dataRootPath } from "
|
|
22
|
-
import { repoRootPath } from "../../utils/repo.js";
|
|
21
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils";
|
|
23
22
|
import { hashFNV1a } from "./fnv-hash.js";
|
|
24
23
|
/**
|
|
25
24
|
* Share of a bucket that must be off-map before it is treated as an exposure case rather than noise.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-outlier-exposure.js","sourceRoot":"","sources":["../../../coarse-placer/tools/build-outlier-exposure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"build-outlier-exposure.js","sourceRoot":"","sources":["../../../coarse-placer/tools/build-outlier-exposure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;GAEG;AACH,MAAM,gBAAgB,GAAG,GAAG,CAAA;AA8B5B;;GAEG;AACH,MAAM,aAAa,GAAG;IACrB,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,QAAQ;IACf,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KA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K,CAAC,CAAC,EAAE,IAAI,CAAC;QACxB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC;QACpC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC;KAC/B,CAAA;IAED,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACrD,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;QAC7F,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAA;QAC3D,MAAM,EAAE,CAAC,YAAY,KAAK,CAAC,MAAM,YAAY,KAAK,QAAQ,CAAC,CAAA;IAC5D,CAAC;IAED,MAAM,EAAE,CAAC,qBAAqB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IAE5C,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAA;AAC9B,CAAC"}
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
26
26
|
import * as path from "node:path";
|
|
27
|
-
import { dataRootPath } from "
|
|
28
|
-
import { repoRootPath } from "../../utils/repo.js";
|
|
27
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils";
|
|
29
28
|
import { hashFNV1a } from "./fnv-hash.js";
|
|
30
29
|
/**
|
|
31
30
|
* Shortest raw string worth keeping as an outlier example; below it there is nothing to learn from.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-outlier-latin.js","sourceRoot":"","sources":["../../../coarse-placer/tools/build-outlier-latin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"build-outlier-latin.js","sourceRoot":"","sources":["../../../coarse-placer/tools/build-outlier-latin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;GAEG;AACH,MAAM,kBAAkB,GAAG,CAAC,CAAA;AAoC5B;;;;;;;;GAQG;AACH,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACpC,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AAEtC;;GAEG;AACH,SAAS,WAAW,CAAC,EAAW;IAC/B,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAClG,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1B,MAAM,GAAG,GAAa,EAAE,CAAA;IAExB,KAAK,MAAM,CAAC,IAAI,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AAC,MAAM,iBAAiB,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,MAAM,cAAc,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,MAAM,GAAG,CAC1L,CAAA;IAED,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAA;AACnF,CAAC"}
|
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
32
32
|
import * as path from "node:path";
|
|
33
|
-
import { dataRootPath } from "
|
|
34
|
-
import { repoRootPath } from "../../utils/repo.js";
|
|
33
|
+
import { dataRootPath, repoRootPath } from "@mailwoman/core/utils";
|
|
35
34
|
import { hashFNV1a } from "./fnv-hash.js";
|
|
36
35
|
/**
|
|
37
36
|
* Shortest raw string worth keeping as an outlier example; below it there is nothing to learn from.
|