@mailwoman/core 9.1.0 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api/responses.ts +12 -0
- package/coarse-placer/featurize.ts +0 -2
- package/coarse-placer/tools/build-dataset.ts +1 -1
- package/coarse-placer/tools/build-outlier-exposure.ts +1 -1
- package/coarse-placer/tools/build-outlier-latin.ts +13 -7
- package/coarse-placer/tools/build-outlier-oa.ts +11 -5
- package/coarse-placer/tools/eval-latin-offmap.ts +3 -2
- package/coarse-placer/tools/eval-openset.ts +3 -2
- package/coarse-placer/tools/eval-quant-compare.ts +3 -2
- package/coarse-placer/tools/eval.ts +3 -2
- package/coarse-placer/tools/fnv-hash.ts +1 -6
- package/coarse-placer/tools/index.ts +1 -1
- package/coarse-placer/tools/probe-frontier.ts +3 -2
- package/coarse-placer/tools/quantize.ts +2 -2
- package/coarse-placer/tools/train.ts +2 -1
- package/crypto/node.ts +3 -1
- package/data/internal/dictionaries/languages.csv +184 -184
- package/data/libpostal/README.md +8 -2
- package/db/schema.ts +12 -3
- package/decoder/containment.ts +5 -1
- package/decoder/index.ts +1 -0
- package/decoder/parse-diff.ts +347 -0
- package/decoder/proposals-to-tree.ts +1 -1
- package/decoder/serialize-json.ts +51 -7
- package/decoder/serialize-tuples.ts +7 -1
- package/decoder/serialize-xml.ts +1 -1
- package/decoder/tree-shape.ts +144 -0
- package/decoder/types.ts +8 -0
- package/decoder/validate-tree.ts +15 -3
- package/env/index.ts +3 -1
- package/env/paths.ts +21 -33
- package/env/schema.ts +26 -3
- package/fs/utils/formatters.ts +107 -0
- package/fs/utils/index.ts +7 -0
- package/fs/zip.ts +1 -1
- package/layers/manifest.ts +56 -15
- package/layers/schema.ts +54 -2
- package/locale/locale.ts +1 -1
- package/locale/registry.ts +1 -1
- package/objects.ts +20 -8
- package/out/api/responses.d.ts +9 -0
- package/out/api/responses.d.ts.map +1 -1
- package/out/api/responses.js +11 -0
- package/out/api/responses.js.map +1 -1
- package/out/coarse-placer/featurize.d.ts +0 -1
- package/out/coarse-placer/featurize.d.ts.map +1 -1
- package/out/coarse-placer/featurize.js.map +1 -1
- package/out/coarse-placer/tools/build-dataset.js +1 -1
- package/out/coarse-placer/tools/build-dataset.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-exposure.js +1 -1
- package/out/coarse-placer/tools/build-outlier-exposure.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.js +12 -7
- package/out/coarse-placer/tools/build-outlier-latin.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.js +10 -5
- 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 -2
- 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 -2
- 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 -2
- 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 -2
- package/out/coarse-placer/tools/eval.js.map +1 -1
- package/out/coarse-placer/tools/fnv-hash.d.ts +1 -6
- package/out/coarse-placer/tools/fnv-hash.d.ts.map +1 -1
- package/out/coarse-placer/tools/fnv-hash.js +1 -6
- package/out/coarse-placer/tools/fnv-hash.js.map +1 -1
- package/out/coarse-placer/tools/index.d.ts +1 -1
- package/out/coarse-placer/tools/index.js +1 -1
- package/out/coarse-placer/tools/probe-frontier.d.ts.map +1 -1
- package/out/coarse-placer/tools/probe-frontier.js +2 -2
- package/out/coarse-placer/tools/probe-frontier.js.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 -1
- package/out/coarse-placer/tools/train.js.map +1 -1
- package/out/crypto/node.d.ts.map +1 -1
- package/out/crypto/node.js +2 -1
- package/out/crypto/node.js.map +1 -1
- package/out/db/schema.d.ts +12 -3
- package/out/db/schema.d.ts.map +1 -1
- package/out/db/schema.js +6 -0
- package/out/db/schema.js.map +1 -1
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +5 -1
- package/out/decoder/containment.js.map +1 -1
- package/out/decoder/index.d.ts +1 -0
- package/out/decoder/index.d.ts.map +1 -1
- package/out/decoder/index.js +1 -0
- package/out/decoder/index.js.map +1 -1
- package/out/decoder/parse-diff.d.ts +125 -0
- package/out/decoder/parse-diff.d.ts.map +1 -0
- package/out/decoder/parse-diff.js +219 -0
- package/out/decoder/parse-diff.js.map +1 -0
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/serialize-json.d.ts +29 -0
- package/out/decoder/serialize-json.d.ts.map +1 -1
- package/out/decoder/serialize-json.js +20 -4
- package/out/decoder/serialize-json.js.map +1 -1
- package/out/decoder/serialize-tuples.d.ts +8 -1
- package/out/decoder/serialize-tuples.d.ts.map +1 -1
- package/out/decoder/serialize-tuples.js +7 -1
- package/out/decoder/serialize-tuples.js.map +1 -1
- package/out/decoder/serialize-xml.js +1 -1
- package/out/decoder/serialize-xml.js.map +1 -1
- package/out/decoder/tree-shape.d.ts +84 -0
- package/out/decoder/tree-shape.d.ts.map +1 -0
- package/out/decoder/tree-shape.js +98 -0
- package/out/decoder/tree-shape.js.map +1 -0
- package/out/decoder/types.d.ts +11 -0
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/validate-tree.d.ts +8 -0
- package/out/decoder/validate-tree.d.ts.map +1 -1
- package/out/decoder/validate-tree.js +4 -3
- package/out/decoder/validate-tree.js.map +1 -1
- package/out/env/index.d.ts +10 -1
- package/out/env/index.d.ts.map +1 -1
- package/out/env/index.js +2 -1
- package/out/env/index.js.map +1 -1
- package/out/env/paths.d.ts +15 -8
- package/out/env/paths.d.ts.map +1 -1
- package/out/env/paths.js +19 -29
- package/out/env/paths.js.map +1 -1
- package/out/env/schema.d.ts +9 -1
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +25 -3
- package/out/env/schema.js.map +1 -1
- package/out/fs/utils/formatters.d.ts +57 -0
- package/out/fs/utils/formatters.d.ts.map +1 -0
- package/out/fs/utils/formatters.js +79 -0
- package/out/fs/utils/formatters.js.map +1 -0
- package/out/fs/utils/index.d.ts +7 -0
- package/out/fs/utils/index.d.ts.map +1 -0
- package/out/fs/utils/index.js +7 -0
- package/out/fs/utils/index.js.map +1 -0
- package/out/fs/zip.js +1 -1
- package/out/fs/zip.js.map +1 -1
- package/out/layers/manifest.d.ts +32 -7
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +31 -6
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/schema.d.ts +48 -2
- package/out/layers/schema.d.ts.map +1 -1
- package/out/layers/schema.js +32 -0
- package/out/layers/schema.js.map +1 -1
- package/out/locale/locale.d.ts +1 -1
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/registry.js +1 -1
- package/out/locale/registry.js.map +1 -1
- package/out/objects.d.ts +12 -6
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +4 -1
- package/out/objects.js.map +1 -1
- package/out/pipeline/index.d.ts +2 -6
- package/out/pipeline/index.d.ts.map +1 -1
- package/out/pipeline/index.js +1 -3
- package/out/pipeline/index.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +51 -9
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +29 -132
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-proposer.js +1 -1
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +22 -14
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js.map +1 -1
- package/out/policy/defaults.d.ts +1 -1
- package/out/policy/defaults.d.ts.map +1 -1
- package/out/policy/defaults.js +1 -1
- package/out/policy/defaults.js.map +1 -1
- package/out/policy/policy.d.ts +1 -1
- package/out/policy/policy.d.ts.map +1 -1
- package/out/policy/registry.d.ts +1 -1
- package/out/policy/registry.d.ts.map +1 -1
- package/out/resolver/coverage-facts.d.ts +89 -0
- package/out/resolver/coverage-facts.d.ts.map +1 -0
- package/out/resolver/coverage-facts.js +22 -0
- package/out/resolver/coverage-facts.js.map +1 -0
- package/out/resolver/index.d.ts +2 -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/lookup-types.d.ts +178 -0
- package/out/resolver/lookup-types.d.ts.map +1 -0
- package/out/resolver/lookup-types.js +11 -0
- package/out/resolver/lookup-types.js.map +1 -0
- package/out/resolver/placetype-map.d.ts +71 -0
- package/out/resolver/placetype-map.d.ts.map +1 -0
- package/out/resolver/placetype-map.js +98 -0
- package/out/resolver/placetype-map.js.map +1 -0
- package/out/resolver/postcode-format.d.ts +38 -0
- package/out/resolver/postcode-format.d.ts.map +1 -0
- package/out/resolver/postcode-format.js +83 -0
- package/out/resolver/postcode-format.js.map +1 -0
- package/out/resolver/types.d.ts +271 -297
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +4 -97
- package/out/resolver/types.js.map +1 -1
- package/out/resources/git.d.ts +8 -1
- package/out/resources/git.d.ts.map +1 -1
- package/out/resources/git.js +4 -3
- package/out/resources/git.js.map +1 -1
- package/out/resources/languages/types.gen.d.ts +1 -1
- package/out/resources/languages/types.gen.d.ts.map +1 -1
- package/out/resources/languages/types.gen.js +40 -0
- package/out/resources/languages/types.gen.js.map +1 -1
- package/out/resources/libpostal.d.ts +2 -2
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +2 -2
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/whosonfirst/DataSourceCache.d.ts.map +1 -1
- package/out/resources/whosonfirst/DataSourceCache.js.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +2 -2
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js +28 -3
- package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
- package/out/resources/whosonfirst/loader.d.ts +2 -2
- package/out/resources/whosonfirst/loader.d.ts.map +1 -1
- package/out/resources/whosonfirst/loader.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/placetypes/admin.d.ts +9 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/definition.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/definition.js +1 -1
- package/out/resources/whosonfirst/placetypes/definition.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/index.d.ts +1 -0
- package/out/resources/whosonfirst/placetypes/index.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/index.js +1 -0
- package/out/resources/whosonfirst/placetypes/index.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/specificity.d.ts +65 -0
- package/out/resources/whosonfirst/placetypes/specificity.d.ts.map +1 -0
- package/out/resources/whosonfirst/placetypes/specificity.js +101 -0
- package/out/resources/whosonfirst/placetypes/specificity.js.map +1 -0
- package/out/resources/whosonfirst/sharded-repo.d.ts +28 -0
- package/out/resources/whosonfirst/sharded-repo.d.ts.map +1 -1
- package/out/resources/whosonfirst/sharded-repo.js +46 -2
- package/out/resources/whosonfirst/sharded-repo.js.map +1 -1
- package/out/scripting/arguments.d.ts +27 -0
- package/out/scripting/arguments.d.ts.map +1 -0
- package/out/scripting/arguments.js +32 -0
- package/out/scripting/arguments.js.map +1 -0
- package/out/scripting/command.d.ts +28 -0
- package/out/scripting/command.d.ts.map +1 -0
- package/out/scripting/command.js +47 -0
- package/out/scripting/command.js.map +1 -0
- package/out/scripting/index.js +3 -3
- package/out/scripting/index.js.map +1 -1
- package/out/scripting/utils/index.d.ts +1 -12
- package/out/scripting/utils/index.d.ts.map +1 -1
- package/out/scripting/utils/index.js +4 -21
- package/out/scripting/utils/index.js.map +1 -1
- package/out/tools/download-libpostal-resources.d.ts.map +1 -1
- package/out/tools/download-libpostal-resources.js +4 -7
- package/out/tools/download-libpostal-resources.js.map +1 -1
- package/out/tools/download-ssl-address.d.ts +3 -3
- package/out/tools/download-ssl-address.d.ts.map +1 -1
- package/out/tools/download-ssl-address.js +26 -13
- package/out/tools/download-ssl-address.js.map +1 -1
- package/out/tools/generate-language-types.d.ts +16 -1
- package/out/tools/generate-language-types.d.ts.map +1 -1
- package/out/tools/generate-language-types.js +38 -5
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/tools/index.d.ts +1 -2
- package/out/tools/index.d.ts.map +1 -1
- package/out/tools/index.js +1 -2
- package/out/tools/index.js.map +1 -1
- package/out/utils/data-root.d.ts +27 -7
- package/out/utils/data-root.d.ts.map +1 -1
- package/out/utils/data-root.js +36 -13
- package/out/utils/data-root.js.map +1 -1
- package/out/utils/hash.d.ts +2 -3
- package/out/utils/hash.d.ts.map +1 -1
- package/out/utils/hash.js +3 -3
- package/out/utils/hash.js.map +1 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/index.js.map +1 -1
- package/out/utils/jsonl.js +1 -1
- package/out/utils/jsonl.js.map +1 -1
- package/out/utils/repo.d.ts +8 -0
- package/out/utils/repo.d.ts.map +1 -1
- package/out/utils/repo.js +10 -1
- package/out/utils/repo.js.map +1 -1
- package/out/utils/sealed-db.d.ts +11 -0
- package/out/utils/sealed-db.d.ts.map +1 -1
- package/out/utils/sealed-db.js +28 -1
- package/out/utils/sealed-db.js.map +1 -1
- package/out/utils/sqlite-rows.d.ts +34 -0
- package/out/utils/sqlite-rows.d.ts.map +1 -0
- package/out/utils/sqlite-rows.js +37 -0
- package/out/utils/sqlite-rows.js.map +1 -0
- package/out/utils/stats.d.ts +1 -6
- package/out/utils/stats.d.ts.map +1 -1
- package/out/utils/stats.js +1 -6
- package/out/utils/stats.js.map +1 -1
- package/package.json +476 -7
- package/pipeline/index.ts +12 -14
- package/pipeline/runtime-pipeline.ts +29 -183
- package/pipeline/span-proposer.ts +1 -1
- package/pipeline/types.ts +26 -15
- package/policy/defaults.ts +1 -1
- package/policy/policy.ts +1 -1
- package/policy/registry.ts +1 -1
- package/resolver/coverage-facts.ts +102 -0
- package/resolver/index.ts +5 -0
- package/resolver/lookup-types.ts +174 -0
- package/resolver/placetype-map.ts +122 -0
- package/resolver/postcode-format.ts +89 -0
- package/resolver/types.ts +293 -351
- package/resources/git.ts +18 -4
- package/resources/languages/types.gen.ts +60 -0
- package/resources/libpostal.ts +4 -3
- package/resources/whosonfirst/DataSourceCache.ts +2 -1
- package/resources/whosonfirst/PlacetypeDataSource.ts +36 -11
- package/resources/whosonfirst/loader.ts +3 -2
- package/resources/whosonfirst/placetypes/Placetype.ts +3 -2
- package/resources/whosonfirst/placetypes/admin.ts +11 -2
- package/resources/whosonfirst/placetypes/definition.ts +4 -3
- package/resources/whosonfirst/placetypes/index.ts +1 -0
- package/resources/whosonfirst/placetypes/specificity.ts +114 -0
- package/resources/whosonfirst/sharded-repo.ts +55 -2
- package/scripting/arguments.ts +38 -0
- package/scripting/command.ts +55 -0
- package/scripting/index.ts +3 -3
- package/scripting/utils/index.ts +6 -23
- package/tools/download-libpostal-resources.ts +4 -7
- package/tools/download-ssl-address.ts +28 -12
- package/tools/generate-language-types.ts +39 -5
- package/tools/index.ts +1 -2
- package/utils/data-root.ts +40 -14
- package/utils/hash.ts +5 -4
- package/utils/index.ts +1 -0
- package/utils/jsonl.ts +1 -1
- package/utils/repo.ts +12 -1
- package/utils/sealed-db.ts +30 -1
- package/utils/sqlite-rows.ts +40 -0
- package/utils/stats.ts +1 -6
- package/data/libpostal/dictionaries/all/chains.txt +0 -504
- package/kysley/adapter.ts +0 -29
- package/out/kysley/adapter.d.ts +0 -13
- package/out/kysley/adapter.d.ts.map +0 -1
- package/out/kysley/adapter.js +0 -25
- package/out/kysley/adapter.js.map +0 -1
- package/out/pipeline/reconcile-lookups.d.ts +0 -39
- package/out/pipeline/reconcile-lookups.d.ts.map +0 -1
- package/out/pipeline/reconcile-lookups.js +0 -88
- package/out/pipeline/reconcile-lookups.js.map +0 -1
- package/out/pipeline/reconcile.d.ts +0 -153
- package/out/pipeline/reconcile.d.ts.map +0 -1
- package/out/pipeline/reconcile.js +0 -388
- package/out/pipeline/reconcile.js.map +0 -1
- package/out/pipeline/span-logit-aggregation.d.ts +0 -58
- package/out/pipeline/span-logit-aggregation.d.ts.map +0 -1
- package/out/pipeline/span-logit-aggregation.js +0 -117
- package/out/pipeline/span-logit-aggregation.js.map +0 -1
- package/pipeline/reconcile-lookups.ts +0 -111
- package/pipeline/reconcile.ts +0 -583
- package/pipeline/span-logit-aggregation.ts +0 -156
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software.
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A kibibyte. Named so a `< 1024` guard reads as a threshold rather than a magic number — several fetchers use it to
|
|
8
|
+
* reject a response too small to be the archive they asked for.
|
|
9
|
+
*/
|
|
10
|
+
export declare const BYTES_PER_KIB = 1024;
|
|
11
|
+
export interface ByteFormatterOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Prefix an explicit `+` on a positive value. For a DELTA, where the sign is the information. A negative always
|
|
14
|
+
* carries its own sign.
|
|
15
|
+
*/
|
|
16
|
+
signed?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Override the formatter's locale for this call.
|
|
19
|
+
*/
|
|
20
|
+
locales?: Intl.LocalesArgument;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Byte counts as a human reads them, in whichever of the two bases the number was actually measured in.
|
|
24
|
+
*
|
|
25
|
+
* Both bases, spelled correctly. A formatter that divides by 1024 and prints `KB` is off by 2.4% at KB and 10% by TB,
|
|
26
|
+
* and the label is the only thing telling a reader which it did — so the choice is named at the call site:
|
|
27
|
+
*
|
|
28
|
+
* - {@linkcode ByteFormatter.formatIEC} for anything a MACHINE measured — heap, file size on disk, buffer length.
|
|
29
|
+
* - {@linkcode ByteFormatter.formatSI} for a size a VENDOR reports. Disk capacity, download sizes and GitHub's own API
|
|
30
|
+
* are quoted in powers of ten; rendering GitHub's `41.3 GB` as `38.5 GiB` is correct arithmetic and the wrong
|
|
31
|
+
* answer.
|
|
32
|
+
*
|
|
33
|
+
* Rendering goes through `Intl.NumberFormat`, so the unit and the decimal separator follow the locale. Pass an explicit
|
|
34
|
+
* locale when a caller needs a stable string — a test asserting an exact rendering, not a line printed for a human.
|
|
35
|
+
*/
|
|
36
|
+
export declare class ByteFormatter {
|
|
37
|
+
static SI_UNITS: readonly ["byte", "kilobyte", "megabyte", "gigabyte", "terabyte"];
|
|
38
|
+
static IEC_UNITS: readonly ["B", "KiB", "MiB", "GiB", "TiB"];
|
|
39
|
+
static shared: ByteFormatter;
|
|
40
|
+
static formatSI(bytes: number, options?: ByteFormatterOptions): string;
|
|
41
|
+
static formatIEC(bytes: number, options?: ByteFormatterOptions): string;
|
|
42
|
+
protected locales?: Intl.LocalesArgument;
|
|
43
|
+
constructor(locales?: Intl.LocalesArgument);
|
|
44
|
+
/**
|
|
45
|
+
* Formats a file size in bytes into a human-readable string with appropriate SI units (B, kB, MB, GB, TB).
|
|
46
|
+
*
|
|
47
|
+
* @param bytes The file size in bytes.
|
|
48
|
+
*/
|
|
49
|
+
formatSI(bytes: number, options?: ByteFormatterOptions): string;
|
|
50
|
+
/**
|
|
51
|
+
* Formats a file size in bytes into a human-readable string with appropriate IEC units (B, KiB, MiB, GiB, TiB).
|
|
52
|
+
*
|
|
53
|
+
* @param bytes The file size in bytes.
|
|
54
|
+
*/
|
|
55
|
+
formatIEC(bytes: number, options?: ByteFormatterOptions): string;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=formatters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../fs/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa,OAAO,CAAA;AAEjC,MAAM,WAAW,oBAAoB;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,aAAa;IACzB,OAAc,QAAQ,oEAAoE;IAC1F,OAAc,SAAS,6CAA6C;IAEpE,OAAc,MAAM,gBAAsB;WAE5B,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM;WAI/D,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM;IAI9E,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;gBAE5B,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe;IAI1C;;;;OAIG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM;IAoBtE;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM;CAkBvE"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software.
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A kibibyte. Named so a `< 1024` guard reads as a threshold rather than a magic number — several fetchers use it to
|
|
8
|
+
* reject a response too small to be the archive they asked for.
|
|
9
|
+
*/
|
|
10
|
+
export const BYTES_PER_KIB = 1024;
|
|
11
|
+
/**
|
|
12
|
+
* Byte counts as a human reads them, in whichever of the two bases the number was actually measured in.
|
|
13
|
+
*
|
|
14
|
+
* Both bases, spelled correctly. A formatter that divides by 1024 and prints `KB` is off by 2.4% at KB and 10% by TB,
|
|
15
|
+
* and the label is the only thing telling a reader which it did — so the choice is named at the call site:
|
|
16
|
+
*
|
|
17
|
+
* - {@linkcode ByteFormatter.formatIEC} for anything a MACHINE measured — heap, file size on disk, buffer length.
|
|
18
|
+
* - {@linkcode ByteFormatter.formatSI} for a size a VENDOR reports. Disk capacity, download sizes and GitHub's own API
|
|
19
|
+
* are quoted in powers of ten; rendering GitHub's `41.3 GB` as `38.5 GiB` is correct arithmetic and the wrong
|
|
20
|
+
* answer.
|
|
21
|
+
*
|
|
22
|
+
* Rendering goes through `Intl.NumberFormat`, so the unit and the decimal separator follow the locale. Pass an explicit
|
|
23
|
+
* locale when a caller needs a stable string — a test asserting an exact rendering, not a line printed for a human.
|
|
24
|
+
*/
|
|
25
|
+
export class ByteFormatter {
|
|
26
|
+
static SI_UNITS = ["byte", "kilobyte", "megabyte", "gigabyte", "terabyte"];
|
|
27
|
+
static IEC_UNITS = ["B", "KiB", "MiB", "GiB", "TiB"];
|
|
28
|
+
static shared = new ByteFormatter();
|
|
29
|
+
static formatSI(bytes, options) {
|
|
30
|
+
return ByteFormatter.shared.formatSI(bytes, options);
|
|
31
|
+
}
|
|
32
|
+
static formatIEC(bytes, options) {
|
|
33
|
+
return ByteFormatter.shared.formatIEC(bytes, options);
|
|
34
|
+
}
|
|
35
|
+
locales;
|
|
36
|
+
constructor(locales) {
|
|
37
|
+
this.locales = locales;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Formats a file size in bytes into a human-readable string with appropriate SI units (B, kB, MB, GB, TB).
|
|
41
|
+
*
|
|
42
|
+
* @param bytes The file size in bytes.
|
|
43
|
+
*/
|
|
44
|
+
formatSI(bytes, options) {
|
|
45
|
+
const units = ByteFormatter.SI_UNITS;
|
|
46
|
+
let value = bytes;
|
|
47
|
+
let unit = 0;
|
|
48
|
+
while (Math.abs(value) >= 1000 && unit < units.length - 1) {
|
|
49
|
+
value /= 1000;
|
|
50
|
+
unit++;
|
|
51
|
+
}
|
|
52
|
+
return new Intl.NumberFormat(options?.locales ?? this.locales, {
|
|
53
|
+
style: "unit",
|
|
54
|
+
unit: units[unit],
|
|
55
|
+
maximumFractionDigits: 1,
|
|
56
|
+
signDisplay: options?.signed ? "exceptZero" : "auto",
|
|
57
|
+
}).format(value);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Formats a file size in bytes into a human-readable string with appropriate IEC units (B, KiB, MiB, GiB, TiB).
|
|
61
|
+
*
|
|
62
|
+
* @param bytes The file size in bytes.
|
|
63
|
+
*/
|
|
64
|
+
formatIEC(bytes, options) {
|
|
65
|
+
let value = bytes;
|
|
66
|
+
let unit = 0;
|
|
67
|
+
// oxlint-disable-next-line sister-software/no-unnamed-threshold -- Well known.
|
|
68
|
+
while (Math.abs(value) >= 1024 && unit < ByteFormatter.IEC_UNITS.length - 1) {
|
|
69
|
+
value /= 1024;
|
|
70
|
+
unit++;
|
|
71
|
+
}
|
|
72
|
+
const formatted = new Intl.NumberFormat(options?.locales ?? this.locales, {
|
|
73
|
+
maximumFractionDigits: 1,
|
|
74
|
+
signDisplay: options?.signed ? "exceptZero" : "auto",
|
|
75
|
+
}).format(value);
|
|
76
|
+
return `${formatted} ${ByteFormatter.IEC_UNITS[unit]}`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=formatters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../fs/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAA;AAcjC;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,aAAa;IAClB,MAAM,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;IACnF,MAAM,CAAC,SAAS,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAA;IAE7D,MAAM,CAAC,MAAM,GAAG,IAAI,aAAa,EAAE,CAAA;IAEnC,MAAM,CAAC,QAAQ,CAAC,KAAa,EAAE,OAA8B;QACnE,OAAO,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IACrD,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa,EAAE,OAA8B;QACpE,OAAO,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IACtD,CAAC;IAES,OAAO,CAAuB;IAExC,YAAY,OAA8B;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACvB,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAa,EAAE,OAA8B;QAC5D,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAA;QAEpC,IAAI,KAAK,GAAG,KAAK,CAAA;QACjB,IAAI,IAAI,GAAG,CAAC,CA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|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../fs/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fs/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,iBAAiB,CAAA"}
|
package/out/fs/zip.js
CHANGED
|
@@ -48,7 +48,7 @@ export function extractSingleFileZip(data) {
|
|
|
48
48
|
const [entry] = zip.getEntries();
|
|
49
49
|
// We use the async version of getData to avoid blocking the event loop.
|
|
50
50
|
return new Promise((resolve, reject) =>
|
|
51
|
-
// oxlint-disable-next-line no-promise-executor-return
|
|
51
|
+
// oxlint-disable-next-line no-promise-executor-return -- return the callback registration from this expression-bodied executor
|
|
52
52
|
entry.getDataAsync((extractedData, error) => {
|
|
53
53
|
if (error) {
|
|
54
54
|
reject(error);
|
package/out/fs/zip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../fs/zip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAEjC,OAAO,MAAM,MAAM,SAAS,CAAA;AAE5B,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAInD;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,IAA0B;IACpD,MAAM,cAAc,GAAG,IAAI,YAAY,WAAW,CA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7,8 +7,7 @@
|
|
|
7
7
|
* camelCase face of `layer_manifest`; validation happens at BOTH ends so a hand-built or
|
|
8
8
|
* corrupted layer fails loudly at open time rather than misbehaving downstream.
|
|
9
9
|
*/
|
|
10
|
-
import type
|
|
11
|
-
import { LayerFreshnessPolicy, LayerTier, type LayerContractDatabase } from "./schema.ts";
|
|
10
|
+
import { CoverageBasis, LayerFreshnessPolicy, LayerTier, type LayerContractHandle } from "./schema.ts";
|
|
12
11
|
/**
|
|
13
12
|
* Which spine columns a layer carries. At least one key is required.
|
|
14
13
|
*/
|
|
@@ -25,6 +24,18 @@ export interface SpineKeys {
|
|
|
25
24
|
* Column name holding `@mailwoman/address-id` keys, when present.
|
|
26
25
|
*/
|
|
27
26
|
addressID?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The normalized-street column a shard is probed by, for layers keyed by STREET rather than by cell or id.
|
|
29
|
+
*
|
|
30
|
+
* Added because the contract's first three keys describe the two layer shapes that existed when it was written — a
|
|
31
|
+
* cellular one (`poi.db`, H3) and an id-joined one — and the situs shards are a third. `address_point` and
|
|
32
|
+
* `street_segment` carry no H3 cell, no WOF id and no address-id; they are probed on `(postcode | locality,
|
|
33
|
+
* street_norm, number)`. Declaring one of the other three for them would name a column that does not exist, in the
|
|
34
|
+
* field a consumer uses to join.
|
|
35
|
+
*/
|
|
36
|
+
street?: {
|
|
37
|
+
column: string;
|
|
38
|
+
};
|
|
28
39
|
}
|
|
29
40
|
/**
|
|
30
41
|
* Parsed manifest — see {@link LayerManifestTable} for the storage form.
|
|
@@ -47,18 +58,32 @@ export interface LayerManifest {
|
|
|
47
58
|
export interface CoverageCell {
|
|
48
59
|
h3Cell: number;
|
|
49
60
|
completeness: number;
|
|
61
|
+
/**
|
|
62
|
+
* What `completeness` rests on. A writer that omits it is declaring {@link CoverageBasis.SourcePresent} — the weakest
|
|
63
|
+
* reading — because a builder that has not thought about basis is recording source presence whether or not it says
|
|
64
|
+
* so.
|
|
65
|
+
*/
|
|
66
|
+
basis?: CoverageBasis;
|
|
50
67
|
observedRows: number;
|
|
51
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Whether a coverage reading can support an EXCLUSION — a claim that the thing asked for is not there.
|
|
71
|
+
*
|
|
72
|
+
* Presence is supportable from any basis. Absence is not: `source_present` records that the source returned rows, which
|
|
73
|
+
* says nothing about what it missed. Callers building negative evidence must gate on this rather than on `completeness`
|
|
74
|
+
* alone, or an exclusion fires identically on a genuinely empty cell and on one we simply never surveyed.
|
|
75
|
+
*/
|
|
76
|
+
export declare function supportsExclusion(cell: Pick<CoverageCell, "basis">): boolean;
|
|
52
77
|
/**
|
|
53
78
|
* Insert the single manifest row. Call exactly once, from the layer's build script.
|
|
54
79
|
*/
|
|
55
|
-
export declare function writeLayerManifest(db:
|
|
80
|
+
export declare function writeLayerManifest(db: LayerContractHandle, manifest: LayerManifest): Promise<void>;
|
|
56
81
|
/**
|
|
57
82
|
* Read + validate the manifest. Throws if the table is empty, multi-row, or invalid.
|
|
58
83
|
*/
|
|
59
|
-
export declare function readLayerManifest(db:
|
|
84
|
+
export declare function readLayerManifest(db: LayerContractHandle): Promise<LayerManifest>;
|
|
60
85
|
/**
|
|
61
|
-
* Rows per INSERT statement (
|
|
86
|
+
* Rows per INSERT statement (4 bound params/row = 16,000 params/statement), kept safely under SQLite's default 32,766
|
|
62
87
|
* bound-variable ceiling — a continental-scale build's res-6 coverage cell count blows past that limit in a single
|
|
63
88
|
* `.values()` call (found 2026-07-19).
|
|
64
89
|
*/
|
|
@@ -67,10 +92,10 @@ export declare const COVERAGE_INSERT_BATCH = 5000;
|
|
|
67
92
|
* Bulk-insert coverage cells (build-time; cold path, so Kysely inserts are fine), chunked to stay under SQLite's
|
|
68
93
|
* bound-variable limit.
|
|
69
94
|
*/
|
|
70
|
-
export declare function writeLayerCoverage(db:
|
|
95
|
+
export declare function writeLayerCoverage(db: LayerContractHandle, cells: CoverageCell[]): Promise<void>;
|
|
71
96
|
/**
|
|
72
97
|
* Look up coverage for one short H3 cell. `undefined` = the cell was never surveyed (UNKNOWN) — callers must not
|
|
73
98
|
* conflate this with `{completeness: 0}`.
|
|
74
99
|
*/
|
|
75
|
-
export declare function readLayerCoverage(db:
|
|
100
|
+
export declare function readLayerCoverage(db: LayerContractHandle, h3Cell: number): Promise<CoverageCell | undefined>;
|
|
76
101
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../layers/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../layers/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,SAAS,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtG;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,EAAE,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,oBAAoB,CAAA;IACrC,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,OAAO,CAE5E;AAwBD;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBxG;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CA4BvF;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,OAAO,CAAA;AAEzC;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBtG;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAalH"}
|
package/out/layers/manifest.js
CHANGED
|
@@ -8,7 +8,17 @@
|
|
|
8
8
|
* corrupted layer fails loudly at open time rather than misbehaving downstream.
|
|
9
9
|
*/
|
|
10
10
|
import { parseJSONStrict } from "../objects.js";
|
|
11
|
-
import { LayerFreshnessPolicy, LayerTier } from "./schema.js";
|
|
11
|
+
import { CoverageBasis, LayerFreshnessPolicy, LayerTier } from "./schema.js";
|
|
12
|
+
/**
|
|
13
|
+
* Whether a coverage reading can support an EXCLUSION — a claim that the thing asked for is not there.
|
|
14
|
+
*
|
|
15
|
+
* Presence is supportable from any basis. Absence is not: `source_present` records that the source returned rows, which
|
|
16
|
+
* says nothing about what it missed. Callers building negative evidence must gate on this rather than on `completeness`
|
|
17
|
+
* alone, or an exclusion fires identically on a genuinely empty cell and on one we simply never surveyed.
|
|
18
|
+
*/
|
|
19
|
+
export function supportsExclusion(cell) {
|
|
20
|
+
return cell.basis === CoverageBasis.Designated || cell.basis === CoverageBasis.Surveyed;
|
|
21
|
+
}
|
|
12
22
|
const TIERS = new Set(Object.values(LayerTier));
|
|
13
23
|
const POLICIES = new Set(Object.values(LayerFreshnessPolicy));
|
|
14
24
|
function assertManifestInvariants(manifest) {
|
|
@@ -18,8 +28,11 @@ function assertManifestInvariants(manifest) {
|
|
|
18
28
|
if (!POLICIES.has(manifest.freshnessPolicy)) {
|
|
19
29
|
throw new Error(`layer manifest: unknown freshness_policy ${JSON.stringify(manifest.freshnessPolicy)}`);
|
|
20
30
|
}
|
|
21
|
-
if (!manifest.spineKeys.h3 &&
|
|
22
|
-
|
|
31
|
+
if (!manifest.spineKeys.h3 &&
|
|
32
|
+
!manifest.spineKeys.wofID &&
|
|
33
|
+
!manifest.spineKeys.addressID &&
|
|
34
|
+
!manifest.spineKeys.street) {
|
|
35
|
+
throw new Error("layer manifest: at least one spine key (h3, wofID, addressID, street) is required");
|
|
23
36
|
}
|
|
24
37
|
}
|
|
25
38
|
/**
|
|
@@ -74,7 +87,7 @@ export async function readLayerManifest(db) {
|
|
|
74
87
|
return manifest;
|
|
75
88
|
}
|
|
76
89
|
/**
|
|
77
|
-
* Rows per INSERT statement (
|
|
90
|
+
* Rows per INSERT statement (4 bound params/row = 16,000 params/statement), kept safely under SQLite's default 32,766
|
|
78
91
|
* bound-variable ceiling — a continental-scale build's res-6 coverage cell count blows past that limit in a single
|
|
79
92
|
* `.values()` call (found 2026-07-19).
|
|
80
93
|
*/
|
|
@@ -90,7 +103,12 @@ export async function writeLayerCoverage(db, cells) {
|
|
|
90
103
|
const batch = cells.slice(i, i + COVERAGE_INSERT_BATCH);
|
|
91
104
|
await db
|
|
92
105
|
.insertInto("layer_coverage")
|
|
93
|
-
.values(batch.map((c) => ({
|
|
106
|
+
.values(batch.map((c) => ({
|
|
107
|
+
h3_cell: c.h3Cell,
|
|
108
|
+
completeness: c.completeness,
|
|
109
|
+
basis: c.basis ?? CoverageBasis.SourcePresent,
|
|
110
|
+
observed_rows: c.observedRows,
|
|
111
|
+
})))
|
|
94
112
|
.execute();
|
|
95
113
|
}
|
|
96
114
|
}
|
|
@@ -102,6 +120,13 @@ export async function readLayerCoverage(db, h3Cell) {
|
|
|
102
120
|
const row = await db.selectFrom("layer_coverage").selectAll().where("h3_cell", "=", h3Cell).executeTakeFirst();
|
|
103
121
|
if (!row)
|
|
104
122
|
return undefined;
|
|
105
|
-
return {
|
|
123
|
+
return {
|
|
124
|
+
h3Cell: row.h3_cell,
|
|
125
|
+
completeness: row.completeness,
|
|
126
|
+
// A NULL basis is an artifact built before the column existed. It was recording source presence,
|
|
127
|
+
// so that is what it reads back as — never a stronger basis than the builder actually had.
|
|
128
|
+
basis: row.basis ?? CoverageBasis.SourcePresent,
|
|
129
|
+
observedRows: row.observed_rows,
|
|
130
|
+
};
|
|
106
131
|
}
|
|
107
132
|
//# sourceMappingURL=manifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../layers/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../layers/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,SAAS,EAA4B,MAAM,aAAa,CAAA;AA0DtG;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAiC;IAClE,OAAO,IAAI,CAA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M,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAA;IAE9G,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAA;IAE1B,OAAO;QACN,MAAM,EAAE,GAAG,CAAC,OAAO;QACnB,YAAY,EAAE,GAAG,CAAC,YAAY;QAC9B,iGAAiG;QACjG,2FAA2F;QAC3F,KAAK,EAAG,GAAG,CAAC,KAA8B,IAAI,aAAa,CAAC,aAAa;QACzE,YAAY,EAAE,GAAG,CAAC,aAAa;KAC/B,CAAA;AACF,CAAC"}
|
package/out/layers/schema.d.ts
CHANGED
|
@@ -78,6 +78,33 @@ export interface LayerManifestTable {
|
|
|
78
78
|
/**
|
|
79
79
|
* Per-cell survey completeness. Missing row = unknown, NOT zero.
|
|
80
80
|
*/
|
|
81
|
+
/**
|
|
82
|
+
* What a `completeness` value RESTS ON. The magnitude alone cannot be acted on: a cell recorded at `1.0` because an
|
|
83
|
+
* authority designates the set complete, and a cell recorded at `1.0` because the source happened to return rows there,
|
|
84
|
+
* license entirely different conclusions.
|
|
85
|
+
*
|
|
86
|
+
* Only {@link CoverageBasis.Designated} and {@link CoverageBasis.Surveyed} can support an EXCLUSION — "the thing you
|
|
87
|
+
* asked for is not here". {@link CoverageBasis.SourcePresent} supports presence and nothing else: the source looked,
|
|
88
|
+
* which is not the same as the source found everything.
|
|
89
|
+
*/
|
|
90
|
+
export declare const CoverageBasis: {
|
|
91
|
+
/**
|
|
92
|
+
* An authority declares the set complete for this cell — BAN holding every address in a commune. A miss inside a
|
|
93
|
+
* designated cell IS evidence of absence.
|
|
94
|
+
*/
|
|
95
|
+
readonly Designated: "designated";
|
|
96
|
+
/**
|
|
97
|
+
* We measured completeness ourselves against an independent reference, and `completeness` carries that measurement. A
|
|
98
|
+
* miss is evidence of absence in proportion to the value.
|
|
99
|
+
*/
|
|
100
|
+
readonly Surveyed: "surveyed";
|
|
101
|
+
/**
|
|
102
|
+
* The source returned rows in this cell and we recorded that. Says nothing about what the source missed. A miss here
|
|
103
|
+
* is UNKNOWN, never absence.
|
|
104
|
+
*/
|
|
105
|
+
readonly SourcePresent: "source_present";
|
|
106
|
+
};
|
|
107
|
+
export type CoverageBasis = (typeof CoverageBasis)[keyof typeof CoverageBasis];
|
|
81
108
|
export interface LayerCoverageTable {
|
|
82
109
|
/**
|
|
83
110
|
* 48-bit short H3 cell at the resolution declared by the manifest's spine keys.
|
|
@@ -85,8 +112,17 @@ export interface LayerCoverageTable {
|
|
|
85
112
|
h3_cell: number;
|
|
86
113
|
/**
|
|
87
114
|
* Estimated completeness of the source survey in this cell, 0..1.
|
|
115
|
+
*
|
|
116
|
+
* Never read this without reading {@link LayerCoverageTable.basis} — see {@link CoverageBasis}.
|
|
88
117
|
*/
|
|
89
118
|
completeness: number;
|
|
119
|
+
/**
|
|
120
|
+
* What the `completeness` value rests on. One of {@link CoverageBasis}.
|
|
121
|
+
*
|
|
122
|
+
* NULL means the row predates this column, and must be read as {@link CoverageBasis.SourcePresent} — the weakest
|
|
123
|
+
* reading, because that is what every layer built before the column was writing.
|
|
124
|
+
*/
|
|
125
|
+
basis: CoverageBasis | null;
|
|
90
126
|
/**
|
|
91
127
|
* Rows this layer actually holds in the cell.
|
|
92
128
|
*/
|
|
@@ -99,12 +135,22 @@ export interface LayerContractDatabase {
|
|
|
99
135
|
layer_manifest: LayerManifestTable;
|
|
100
136
|
layer_coverage: LayerCoverageTable;
|
|
101
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* The slice of a Kysely handle the contract helpers touch — the parameter type every one of them takes.
|
|
140
|
+
*
|
|
141
|
+
* Kysely is invariant in its schema parameter, so a `Kysely<POIDatabase>` is NOT assignable to
|
|
142
|
+
* `Kysely<LayerContractDatabase>` even when `POIDatabase extends LayerContractDatabase`. The incompatibility is in
|
|
143
|
+
* `transaction()` and `with()`, which the contract never calls. Naming only the members it does call lets a layer pass
|
|
144
|
+
* its own handle directly. The alternative — a cast at every call site — does not merely skip one check: it disarms
|
|
145
|
+
* every column-level guarantee these two tables carry, including any added later.
|
|
146
|
+
*/
|
|
147
|
+
export type LayerContractHandle = Pick<Kysely<LayerContractDatabase>, "insertInto" | "schema" | "selectFrom">;
|
|
102
148
|
/**
|
|
103
149
|
* Create `layer_manifest`. Single row enforced by `name` PK + the writer's insert-once discipline.
|
|
104
150
|
*/
|
|
105
|
-
export declare function createLayerManifestTable(db:
|
|
151
|
+
export declare function createLayerManifestTable(db: LayerContractHandle): Promise<void>;
|
|
106
152
|
/**
|
|
107
153
|
* Create `layer_coverage` — small fixed-width rows probed by PK, the WITHOUT ROWID sweet spot.
|
|
108
154
|
*/
|
|
109
|
-
export declare function createLayerCoverageTable(db:
|
|
155
|
+
export declare function createLayerCoverageTable(db: LayerContractHandle): Promise<void>;
|
|
110
156
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../layers/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAO,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,SAAS;;IAErB;;OAEG;;IAEH;;OAEG;;CAEM,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAA;AAElE;;GAEG;AACH,eAAO,MAAM,oBAAoB;IAChC;;OAEG;;IAEH;;OAEG;;CAEM,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAA;AAEnG;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE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Refresh: "versioned-refresh",
|
|
42
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* Per-cell survey completeness. Missing row = unknown, NOT zero.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* What a `completeness` value RESTS ON. The magnitude alone cannot be acted on: a cell recorded at `1.0` because an
|
|
48
|
+
* authority designates the set complete, and a cell recorded at `1.0` because the source happened to return rows there,
|
|
49
|
+
* license entirely different conclusions.
|
|
50
|
+
*
|
|
51
|
+
* Only {@link CoverageBasis.Designated} and {@link CoverageBasis.Surveyed} can support an EXCLUSION — "the thing you
|
|
52
|
+
* asked for is not here". {@link CoverageBasis.SourcePresent} supports presence and nothing else: the source looked,
|
|
53
|
+
* which is not the same as the source found everything.
|
|
54
|
+
*/
|
|
55
|
+
export const CoverageBasis = {
|
|
56
|
+
/**
|
|
57
|
+
* An authority declares the set complete for this cell — BAN holding every address in a commune. A miss inside a
|
|
58
|
+
* designated cell IS evidence of absence.
|
|
59
|
+
*/
|
|
60
|
+
Designated: "designated",
|
|
61
|
+
/**
|
|
62
|
+
* We measured completeness ourselves against an independent reference, and `completeness` carries that measurement. A
|
|
63
|
+
* miss is evidence of absence in proportion to the value.
|
|
64
|
+
*/
|
|
65
|
+
Surveyed: "surveyed",
|
|
66
|
+
/**
|
|
67
|
+
* The source returned rows in this cell and we recorded that. Says nothing about what the source missed. A miss here
|
|
68
|
+
* is UNKNOWN, never absence.
|
|
69
|
+
*/
|
|
70
|
+
SourcePresent: "source_present",
|
|
71
|
+
};
|
|
43
72
|
/**
|
|
44
73
|
* Create `layer_manifest`. Single row enforced by `name` PK + the writer's insert-once discipline.
|
|
45
74
|
*/
|
|
@@ -69,6 +98,9 @@ export async function createLayerCoverageTable(db) {
|
|
|
69
98
|
.createTable("layer_coverage")
|
|
70
99
|
.addColumn("h3_cell", "integer", (c) => c.primaryKey())
|
|
71
100
|
.addColumn("completeness", "real", (c) => c.notNull())
|
|
101
|
+
// Nullable on purpose: artifacts built before this column exist and read back as NULL, which
|
|
102
|
+
// `readLayerCoverage` resolves to `source_present` — what they were in fact recording.
|
|
103
|
+
.addColumn("basis", "text")
|
|
72
104
|
.addColumn("observed_rows", "integer", (c) => c.notNull())
|
|
73
105
|
// `WITHOUT ROWID` has no first-class builder; the raw modifier is the idiomatic fallback.
|
|
74
106
|
.modifyEnd(sql `without rowid`)
|
package/out/layers/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../layers/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,GAAG,EAAe,MAAM,QAAQ,CAAA;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAA;AAIV;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,gBAAgB,EAAE,mBAAmB;CAC5B,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../layers/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,GAAG,EAAe,MAAM,QAAQ,CAAA;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAA;AAIV;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,gBAAgB,EAAE,mBAAmB;CAC5B,CAAA;AAsCV;;GAEG;AACH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;I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,SAAS,CAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACzD,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACnD,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACnD,OAAO,EAAE,CAAA;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAAuB;IACrE,MAAM,EAAE,CAAC,MAAM;SACb,WAAW,CAAC,gBAAgB,CAAC;SAC7B,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;SACtD,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACtD,6FAA6F;QAC7F,uFAAuF;SACtF,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;SAC1B,SAAS,CAAC,eAAe,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QAC1D,0FAA0F;SACzF,SAAS,CAAC,GAAG,CAAA,eAAe,CAAC;SAC7B,OAAO,EAAE,CAAA;AACZ,CAAC"}
|
package/out/locale/locale.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* `wrapLegacyClassifier` assigns when the legacy classifier registry lands (see the Phase 0
|
|
13
13
|
* task-3 follow-up in DECISIONS.md).
|
|
14
14
|
*/
|
|
15
|
-
import type { ComponentTag } from "
|
|
15
|
+
import type { ComponentTag } from "#types";
|
|
16
16
|
import type { ClassifierPolicy } from "../policy/policy.ts";
|
|
17
17
|
export interface LocaleProfile {
|
|
18
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../locale/locale.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../locale/locale.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;OAGG;IACH,eAAe,EAAE,MAAM,EAAE,CAAA;IAEzB;;OAEG;IACH,mBAAmB,EAAE,YAAY,EAAE,CAAA;IAEnC;;OAEG;IACH,MAAM,EAAE,gBAAgB,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;IACtC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAA;IAC9C,IAAI,IAAI,aAAa,EAAE,CAAA;CACvB"}
|
package/out/locale/registry.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* `componentsSupported`. Fails loudly at registration when either invariant is broken (#6
|
|
9
9
|
* §LocaleProfile validation rule).
|
|
10
10
|
*/
|
|
11
|
-
import { COMPONENT_TAGS } from "
|
|
11
|
+
import { COMPONENT_TAGS } from "#types";
|
|
12
12
|
const COMPONENT_TAG_SET = new Set(COMPONENT_TAGS);
|
|
13
13
|
export class InMemoryLocaleRegistry {
|
|
14
14
|
#profiles = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../locale/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAqB,MAAM,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../locale/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAqB,MAAM,QAAQ,CAAA;AAI1D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAe,cAAc,CAAC,CAAA;AAE/D,MAAM,OAAO,sBAAsB;IAClC,SAAS,GAAG,IAAI,GAAG,EAAyB,CAAA;IAE5C,QAAQ,CAAC,OAAsB;QAC9B,kBAAkB,CAAC,OAAO,CAAC,CAAA;QAC3B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5C,CAAC;IAED,GAAG,CAAC,MAAc;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;IAED,IAAI;QACH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IAC3C,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,MAAc;QACxB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC9B,CAAC;CACD;AAED,SAAS,kBAAkB,CAAC,OAAsB;IACjD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACrB,MAAM,IAAI,SAAS,CAAC,qDAAqD,CAAC,CAAA;IAC3E,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAe,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAEpE,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACjC,MAAM,I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