@mailwoman/core 8.0.0 → 8.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/api/APIClient.ts +3 -4
- package/api/responses.ts +6 -3
- package/coarse-placer/coarse-placer.ts +26 -11
- package/coarse-placer/featurize.ts +25 -16
- package/coarse-placer/tools/build-dataset.ts +42 -18
- package/coarse-placer/tools/build-outlier-exposure.ts +51 -18
- package/coarse-placer/tools/build-outlier-latin.ts +48 -22
- package/coarse-placer/tools/build-outlier-oa.ts +52 -20
- package/coarse-placer/tools/eval-latin-offmap.ts +37 -12
- package/coarse-placer/tools/eval-openset.ts +104 -37
- package/coarse-placer/tools/eval-quant-compare.ts +41 -11
- package/coarse-placer/tools/eval.ts +51 -13
- package/coarse-placer/tools/fnv-hash.ts +5 -3
- package/coarse-placer/tools/probe-frontier.ts +63 -32
- package/coarse-placer/tools/quantize.ts +30 -8
- package/coarse-placer/tools/train.ts +63 -17
- package/collections.ts +2 -2
- package/decoder/build-tree.ts +16 -3
- package/decoder/calibration.ts +23 -7
- package/decoder/containment.ts +3 -1
- package/decoder/proposals-to-tree.ts +2 -0
- package/decoder/resolve-proposal-overlaps.ts +5 -1
- package/decoder/serialize-json.ts +8 -2
- package/decoder/serialize-tuples.ts +7 -2
- package/decoder/serialize-xml.ts +29 -11
- package/decoder/types.ts +34 -12
- package/decoder/unknown-spans.ts +14 -5
- package/decoder/validate-tree.ts +6 -1
- package/env/index.ts +1 -1
- package/env/load.ts +1 -1
- package/env/paths.ts +1 -1
- package/env/schema.ts +12 -4
- package/errors/schema.ts +1 -1
- package/fs/node.ts +9 -10
- package/identifiers.ts +3 -3
- package/kysley/adapter.ts +1 -1
- package/layers/manifest.ts +22 -8
- package/layers/schema.ts +59 -19
- package/locale/locale.ts +6 -2
- package/locale/profiles/en-us.ts +3 -0
- package/locale/profiles/fr-fr.ts +3 -0
- package/locale/profiles/ja-jp.ts +3 -0
- package/locale/registry.ts +3 -1
- package/logging/shared.ts +1 -0
- package/logging/utils.ts +1 -1
- package/objects.ts +7 -2
- package/out/api/APIClient.d.ts +1 -1
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +3 -2
- package/out/api/APIClient.js.map +1 -1
- package/out/api/responses.d.ts.map +1 -1
- package/out/api/responses.js +3 -3
- package/out/api/responses.js.map +1 -1
- package/out/coarse-placer/coarse-placer.d.ts +19 -9
- package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
- package/out/coarse-placer/coarse-placer.js +6 -4
- package/out/coarse-placer/coarse-placer.js.map +1 -1
- package/out/coarse-placer/featurize.d.ts.map +1 -1
- package/out/coarse-placer/featurize.js +20 -16
- package/out/coarse-placer/featurize.js.map +1 -1
- package/out/coarse-placer/tools/build-dataset.d.ts +15 -5
- package/out/coarse-placer/tools/build-dataset.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-dataset.js +19 -14
- package/out/coarse-placer/tools/build-dataset.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-exposure.d.ts +21 -7
- package/out/coarse-placer/tools/build-outlier-exposure.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-exposure.js +24 -12
- package/out/coarse-placer/tools/build-outlier-exposure.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.d.ts +18 -6
- package/out/coarse-placer/tools/build-outlier-latin.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.js +27 -17
- package/out/coarse-placer/tools/build-outlier-latin.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.d.ts +18 -6
- package/out/coarse-placer/tools/build-outlier-oa.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.js +29 -15
- package/out/coarse-placer/tools/build-outlier-oa.js.map +1 -1
- package/out/coarse-placer/tools/eval-latin-offmap.d.ts +18 -6
- package/out/coarse-placer/tools/eval-latin-offmap.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-latin-offmap.js +13 -7
- package/out/coarse-placer/tools/eval-latin-offmap.js.map +1 -1
- package/out/coarse-placer/tools/eval-openset.d.ts +24 -8
- package/out/coarse-placer/tools/eval-openset.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-openset.js +52 -31
- package/out/coarse-placer/tools/eval-openset.js.map +1 -1
- package/out/coarse-placer/tools/eval-quant-compare.d.ts +30 -10
- package/out/coarse-placer/tools/eval-quant-compare.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-quant-compare.js +4 -2
- package/out/coarse-placer/tools/eval-quant-compare.js.map +1 -1
- package/out/coarse-placer/tools/eval.d.ts +24 -8
- package/out/coarse-placer/tools/eval.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval.js +16 -6
- package/out/coarse-placer/tools/eval.js.map +1 -1
- package/out/coarse-placer/tools/fnv-hash.d.ts +3 -1
- package/out/coarse-placer/tools/fnv-hash.d.ts.map +1 -1
- package/out/coarse-placer/tools/fnv-hash.js +5 -3
- package/out/coarse-placer/tools/fnv-hash.js.map +1 -1
- package/out/coarse-placer/tools/probe-frontier.d.ts +18 -6
- package/out/coarse-placer/tools/probe-frontier.d.ts.map +1 -1
- package/out/coarse-placer/tools/probe-frontier.js +39 -23
- package/out/coarse-placer/tools/probe-frontier.js.map +1 -1
- package/out/coarse-placer/tools/quantize.d.ts +15 -5
- package/out/coarse-placer/tools/quantize.d.ts.map +1 -1
- package/out/coarse-placer/tools/quantize.js +11 -4
- package/out/coarse-placer/tools/quantize.js.map +1 -1
- package/out/coarse-placer/tools/train.d.ts +24 -8
- package/out/coarse-placer/tools/train.d.ts.map +1 -1
- package/out/coarse-placer/tools/train.js +24 -10
- package/out/coarse-placer/tools/train.js.map +1 -1
- package/out/collections.js +2 -2
- package/out/collections.js.map +1 -1
- package/out/decoder/build-tree.d.ts.map +1 -1
- package/out/decoder/build-tree.js +9 -3
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/calibration.d.ts +17 -3
- package/out/decoder/calibration.d.ts.map +1 -1
- package/out/decoder/calibration.js +12 -4
- package/out/decoder/calibration.js.map +1 -1
- package/out/decoder/containment.d.ts +3 -1
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +3 -1
- package/out/decoder/containment.js.map +1 -1
- package/out/decoder/proposals-to-tree.d.ts.map +1 -1
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/resolve-proposal-overlaps.d.ts.map +1 -1
- package/out/decoder/resolve-proposal-overlaps.js +5 -1
- package/out/decoder/resolve-proposal-overlaps.js.map +1 -1
- package/out/decoder/serialize-json.d.ts +6 -2
- package/out/decoder/serialize-json.d.ts.map +1 -1
- package/out/decoder/serialize-json.js.map +1 -1
- package/out/decoder/serialize-tuples.d.ts +6 -2
- package/out/decoder/serialize-tuples.d.ts.map +1 -1
- package/out/decoder/serialize-tuples.js.map +1 -1
- package/out/decoder/serialize-xml.d.ts +21 -7
- package/out/decoder/serialize-xml.d.ts.map +1 -1
- package/out/decoder/serialize-xml.js +7 -5
- package/out/decoder/serialize-xml.js.map +1 -1
- package/out/decoder/types.d.ts +34 -12
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/types.js +1 -1
- package/out/decoder/types.js.map +1 -1
- package/out/decoder/unknown-spans.d.ts +9 -3
- package/out/decoder/unknown-spans.d.ts.map +1 -1
- package/out/decoder/unknown-spans.js +4 -2
- package/out/decoder/unknown-spans.js.map +1 -1
- package/out/decoder/validate-tree.d.ts +3 -1
- package/out/decoder/validate-tree.d.ts.map +1 -1
- package/out/decoder/validate-tree.js +3 -1
- package/out/decoder/validate-tree.js.map +1 -1
- package/out/env/index.js +0 -1
- package/out/env/index.js.map +1 -1
- package/out/env/load.js +1 -1
- package/out/env/load.js.map +1 -1
- package/out/env/paths.js +1 -1
- package/out/env/paths.js.map +1 -1
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +12 -4
- package/out/env/schema.js.map +1 -1
- package/out/errors/schema.js +1 -1
- package/out/errors/schema.js.map +1 -1
- package/out/fs/node.d.ts +1 -2
- package/out/fs/node.d.ts.map +1 -1
- package/out/fs/node.js +7 -8
- package/out/fs/node.js.map +1 -1
- package/out/identifiers.js +3 -3
- package/out/identifiers.js.map +1 -1
- package/out/kysley/adapter.d.ts +1 -1
- package/out/kysley/adapter.d.ts.map +1 -1
- package/out/kysley/adapter.js +1 -1
- package/out/kysley/adapter.js.map +1 -1
- package/out/layers/manifest.d.ts +18 -6
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +8 -4
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/schema.d.ts +57 -19
- package/out/layers/schema.d.ts.map +1 -1
- package/out/layers/schema.js +24 -8
- package/out/layers/schema.js.map +1 -1
- package/out/locale/locale.d.ts +6 -2
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/profiles/en-us.d.ts +3 -0
- package/out/locale/profiles/en-us.d.ts.map +1 -1
- package/out/locale/profiles/en-us.js +3 -0
- package/out/locale/profiles/en-us.js.map +1 -1
- package/out/locale/profiles/fr-fr.d.ts +3 -0
- package/out/locale/profiles/fr-fr.d.ts.map +1 -1
- package/out/locale/profiles/fr-fr.js +3 -0
- package/out/locale/profiles/fr-fr.js.map +1 -1
- package/out/locale/profiles/ja-jp.d.ts +3 -0
- package/out/locale/profiles/ja-jp.d.ts.map +1 -1
- package/out/locale/profiles/ja-jp.js +3 -0
- package/out/locale/profiles/ja-jp.js.map +1 -1
- package/out/locale/registry.d.ts +3 -1
- package/out/locale/registry.d.ts.map +1 -1
- package/out/locale/registry.js +3 -1
- package/out/locale/registry.js.map +1 -1
- package/out/logging/shared.d.ts.map +1 -1
- package/out/logging/shared.js +1 -0
- package/out/logging/shared.js.map +1 -1
- package/out/logging/utils.js +1 -1
- package/out/logging/utils.js.map +1 -1
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +2 -2
- package/out/objects.js.map +1 -1
- 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/reconcile-lookups.d.ts.map +1 -1
- package/out/pipeline/reconcile-lookups.js.map +1 -1
- package/out/pipeline/reconcile.d.ts +30 -10
- package/out/pipeline/reconcile.d.ts.map +1 -1
- package/out/pipeline/reconcile.js +12 -9
- package/out/pipeline/reconcile.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +22 -0
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +94 -42
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-logit-aggregation.d.ts.map +1 -1
- package/out/pipeline/span-logit-aggregation.js +5 -2
- package/out/pipeline/span-logit-aggregation.js.map +1 -1
- package/out/pipeline/span-proposer.d.ts +19 -9
- package/out/pipeline/span-proposer.d.ts.map +1 -1
- package/out/pipeline/span-proposer.js +42 -22
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +82 -23
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +16 -0
- package/out/pipeline/types.js.map +1 -1
- package/out/policy/proposal-collection.d.ts +1 -1
- package/out/policy/proposal-collection.d.ts.map +1 -1
- package/out/policy/proposal-collection.js +2 -3
- package/out/policy/proposal-collection.js.map +1 -1
- package/out/policy/registry.d.ts +9 -3
- package/out/policy/registry.d.ts.map +1 -1
- package/out/policy/registry.js +9 -3
- package/out/policy/registry.js.map +1 -1
- package/out/resolver/index.d.ts +2 -2
- package/out/resolver/index.d.ts.map +1 -1
- package/out/resolver/index.js +1 -1
- package/out/resolver/index.js.map +1 -1
- package/out/resolver/types.d.ts +172 -25
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +16 -0
- package/out/resolver/types.js.map +1 -1
- package/out/resources/LocaleIndex.d.ts +1 -1
- package/out/resources/LocaleIndex.d.ts.map +1 -1
- package/out/resources/LocaleIndex.js +1 -2
- package/out/resources/LocaleIndex.js.map +1 -1
- package/out/resources/ResourceMapCache.d.ts.map +1 -1
- package/out/resources/ResourceMapCache.js +1 -1
- package/out/resources/ResourceMapCache.js.map +1 -1
- package/out/resources/collections.d.ts.map +1 -1
- package/out/resources/collections.js +3 -1
- package/out/resources/collections.js.map +1 -1
- package/out/resources/languages/index.d.ts +1 -1
- package/out/resources/languages/index.d.ts.map +1 -1
- package/out/resources/languages/index.js +1 -1
- package/out/resources/languages/index.js.map +1 -1
- package/out/resources/libpostal.d.ts +1 -1
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +7 -5
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/set.js +6 -6
- package/out/resources/set.js.map +1 -1
- package/out/resources/whosonfirst/DataSourceCache.d.ts +1 -4
- package/out/resources/whosonfirst/DataSourceCache.d.ts.map +1 -1
- package/out/resources/whosonfirst/DataSourceCache.js +1 -20
- package/out/resources/whosonfirst/DataSourceCache.js.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js +2 -2
- package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
- package/out/resources/whosonfirst/backoff.d.ts +19 -0
- package/out/resources/whosonfirst/backoff.d.ts.map +1 -0
- package/out/resources/whosonfirst/backoff.js +35 -0
- package/out/resources/whosonfirst/backoff.js.map +1 -0
- package/out/resources/whosonfirst/loader.d.ts +1 -1
- package/out/resources/whosonfirst/loader.d.ts.map +1 -1
- package/out/resources/whosonfirst/loader.js +0 -1
- package/out/resources/whosonfirst/loader.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts +4 -1
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.js +8 -6
- package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts +6 -4
- package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js +8 -4
- package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/definition.d.ts +5 -6
- package/out/resources/whosonfirst/placetypes/definition.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/definition.js +3 -0
- package/out/resources/whosonfirst/placetypes/definition.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/graph.d.ts +4 -2
- package/out/resources/whosonfirst/placetypes/graph.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/graph.js +0 -0
- package/out/resources/whosonfirst/placetypes/graph.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts +4 -2
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.js +0 -1
- package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/tree.d.ts +1 -1
- package/out/resources/whosonfirst/placetypes/tree.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/tree.js +0 -1
- package/out/resources/whosonfirst/placetypes/tree.js.map +1 -1
- package/out/routing/index.d.ts.map +1 -1
- package/out/routing/index.js +1 -1
- package/out/routing/index.js.map +1 -1
- package/out/scripting/utils/index.d.ts +3 -1
- package/out/scripting/utils/index.d.ts.map +1 -1
- package/out/scripting/utils/index.js +3 -1
- package/out/scripting/utils/index.js.map +1 -1
- package/out/tokenization/Span.js.map +1 -1
- package/out/tokenization/normalizer.js +11 -11
- package/out/tokenization/normalizer.js.map +1 -1
- package/out/tools/download-libpostal-resources.d.ts.map +1 -1
- package/out/tools/download-libpostal-resources.js.map +1 -1
- package/out/tools/download-ssl-address.d.ts +9 -3
- package/out/tools/download-ssl-address.d.ts.map +1 -1
- package/out/tools/download-ssl-address.js +8 -4
- package/out/tools/download-ssl-address.js.map +1 -1
- package/out/tools/generate-language-types.d.ts +12 -4
- package/out/tools/generate-language-types.d.ts.map +1 -1
- package/out/tools/generate-language-types.js +3 -1
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/types/Classification.d.ts.map +1 -1
- package/out/types/Classification.js.map +1 -1
- package/out/types/classifier.d.ts +27 -9
- package/out/types/classifier.d.ts.map +1 -1
- package/out/types/component.d.ts +6 -2
- package/out/types/component.d.ts.map +1 -1
- package/out/types/component.js.map +1 -1
- package/out/utils/data-root.d.ts +3 -1
- package/out/utils/data-root.d.ts.map +1 -1
- package/out/utils/data-root.js +3 -1
- package/out/utils/data-root.js.map +1 -1
- package/out/utils/hash.d.ts +6 -2
- package/out/utils/hash.d.ts.map +1 -1
- package/out/utils/hash.js +6 -2
- package/out/utils/hash.js.map +1 -1
- package/out/utils/jsonl.d.ts +9 -3
- package/out/utils/jsonl.d.ts.map +1 -1
- package/out/utils/jsonl.js +9 -3
- package/out/utils/jsonl.js.map +1 -1
- package/out/utils/python-json.d.ts +6 -2
- package/out/utils/python-json.d.ts.map +1 -1
- package/out/utils/python-json.js +9 -3
- package/out/utils/python-json.js.map +1 -1
- package/out/utils/python-random.d.ts +15 -5
- package/out/utils/python-random.d.ts.map +1 -1
- package/out/utils/python-random.js +17 -7
- package/out/utils/python-random.js.map +1 -1
- package/out/utils/repo.d.ts +4 -0
- package/out/utils/repo.d.ts.map +1 -1
- package/out/utils/repo.js +4 -0
- package/out/utils/repo.js.map +1 -1
- package/out/utils/sealed-db.d.ts +6 -2
- package/out/utils/sealed-db.d.ts.map +1 -1
- package/out/utils/sealed-db.js +6 -2
- package/out/utils/sealed-db.js.map +1 -1
- package/out/utils/stats.d.ts +9 -3
- package/out/utils/stats.d.ts.map +1 -1
- package/out/utils/stats.js +11 -5
- package/out/utils/stats.js.map +1 -1
- package/package.json +2 -2
- package/pipeline/index.ts +5 -1
- package/pipeline/reconcile-lookups.ts +3 -0
- package/pipeline/reconcile.ts +65 -24
- package/pipeline/runtime-pipeline.ts +118 -42
- package/pipeline/span-logit-aggregation.ts +7 -2
- package/pipeline/span-proposer.ts +95 -34
- package/pipeline/types.ts +93 -23
- package/policy/proposal-collection.ts +4 -3
- package/policy/registry.ts +13 -3
- package/resolver/index.ts +11 -1
- package/resolver/types.ts +187 -25
- package/resources/LocaleIndex.ts +2 -2
- package/resources/ResourceMapCache.ts +3 -2
- package/resources/collections.ts +4 -1
- package/resources/languages/index.ts +2 -1
- package/resources/libpostal.ts +6 -3
- package/resources/set.ts +6 -6
- package/resources/whosonfirst/DataSourceCache.ts +2 -24
- package/resources/whosonfirst/PlacetypeDataSource.ts +2 -2
- package/resources/whosonfirst/backoff.ts +39 -0
- package/resources/whosonfirst/loader.ts +2 -1
- package/resources/whosonfirst/placetypes/Placetype.ts +9 -6
- package/resources/whosonfirst/placetypes/admin.ts +12 -7
- package/resources/whosonfirst/placetypes/definition.ts +6 -6
- package/resources/whosonfirst/placetypes/graph.ts +0 -0
- package/resources/whosonfirst/placetypes/mermaid.ts +5 -2
- package/resources/whosonfirst/placetypes/tree.ts +1 -1
- package/routing/index.ts +5 -1
- package/scripting/utils/index.ts +3 -1
- package/tokenization/Span.ts +1 -1
- package/tokenization/normalizer.ts +11 -11
- package/tools/download-libpostal-resources.ts +1 -0
- package/tools/download-ssl-address.ts +19 -7
- package/tools/generate-language-types.ts +12 -4
- package/types/Classification.ts +5 -0
- package/types/classifier.ts +27 -9
- package/types/component.ts +6 -2
- package/utils/data-root.ts +3 -1
- package/utils/hash.ts +6 -2
- package/utils/jsonl.ts +11 -3
- package/utils/python-json.ts +13 -4
- package/utils/python-random.ts +17 -7
- package/utils/repo.ts +8 -0
- package/utils/sealed-db.ts +10 -2
- package/utils/stats.ts +11 -5
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Pure module: no resource imports, no top-level await. Safe to import from anywhere.
|
|
17
17
|
*/
|
|
18
|
-
import {} from "../types/index.js";
|
|
19
18
|
/**
|
|
20
19
|
* Run every classifier against every section, concatenate the results.
|
|
21
20
|
*
|
|
@@ -27,8 +26,8 @@ export async function collectProposals(sections, classifiers, context = {}) {
|
|
|
27
26
|
const tasks = [];
|
|
28
27
|
for (const classifier of classifiers) {
|
|
29
28
|
for (const section of sections) {
|
|
30
|
-
tasks.push(classifier.classify(section, context).catch((
|
|
31
|
-
console.warn(`[proposal-collection] ${classifier.id} threw on section "${section.body}":`,
|
|
29
|
+
tasks.push(classifier.classify(section, context).catch((error) => {
|
|
30
|
+
console.warn(`[proposal-collection] ${classifier.id} threw on section "${section.body}":`, error);
|
|
32
31
|
return [];
|
|
33
32
|
}));
|
|
34
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposal-collection.js","sourceRoot":"","sources":["../../policy/proposal-collection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"proposal-collection.js","sourceRoot":"","sources":["../../policy/proposal-collection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,QAA4B,EAC5B,WAA0C,EAC1C,UAA6B,EAAE;IAE/B,MAAM,KAAK,GAA6C,EAAE,CAAA;IAE1D,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACtC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CACT,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBACrD,OAAO,CAAC,IAAI,CAAC,yBAAyB,UAAU,CAAC,EAAE,sBAAsB,OAAO,CAAC,IAAI,IAAI,EAAE,KAAK,CAAC,CAAA;gBAEjG,OAAO,EAAE,CAAA;YACV,CAAC,CAAC,CACF,CAAA;QACF,CAAC;IACF,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAExC,OAAO,OAAO,CAAC,IAAI,EAAE,CAAA;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAC7B,SAA4C,EAC5C,MAAkC,EAClC,MAA0B;IAE1B,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAAA;IAElC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC"}
|
package/out/policy/registry.d.ts
CHANGED
|
@@ -22,11 +22,17 @@ export declare class InMemoryPolicyRegistry implements PolicyRegistry {
|
|
|
22
22
|
* passes a shape-derived default so the whole table starts from the routed prior.
|
|
23
23
|
*/
|
|
24
24
|
static withDefaults(mode?: PolicyMode): InMemoryPolicyRegistry;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Install a policy entry. Replaces any prior entry with the same key.
|
|
27
|
+
*/
|
|
26
28
|
set(policy: ClassifierPolicy): void;
|
|
27
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Remove a policy entry, if present.
|
|
31
|
+
*/
|
|
28
32
|
remove(component: ComponentTag, locale?: string): void;
|
|
29
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* All current entries, in insertion order.
|
|
35
|
+
*/
|
|
30
36
|
entries(): ClassifierPolicy[];
|
|
31
37
|
lookup(component: ComponentTag, locale?: string): ClassifierPolicy;
|
|
32
38
|
apply(proposals: readonly ClassificationProposal[], locale?: string): ClassificationProposal[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../policy/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAQ/E;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,cAAc;;IAG5D;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,GAAE,UAAwB,GAAG,sBAAsB;IAU3E
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../policy/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAQ/E;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,cAAc;;IAG5D;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,GAAE,UAAwB,GAAG,sBAAsB;IAU3E;;OAEG;IACH,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAInC;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAItD;;OAEG;IACH,OAAO,IAAI,gBAAgB,EAAE;IAI7B,MAAM,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,gBAAgB;IAclE,KAAK,CAAC,SAAS,EAAE,SAAS,sBAAsB,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,sBAAsB,EAAE;CAmB9F"}
|
package/out/policy/registry.js
CHANGED
|
@@ -31,15 +31,21 @@ export class InMemoryPolicyRegistry {
|
|
|
31
31
|
}
|
|
32
32
|
return registry;
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Install a policy entry. Replaces any prior entry with the same key.
|
|
36
|
+
*/
|
|
35
37
|
set(policy) {
|
|
36
38
|
this.#entries.set(policyKey(policy.component, policy.locale), policy);
|
|
37
39
|
}
|
|
38
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Remove a policy entry, if present.
|
|
42
|
+
*/
|
|
39
43
|
remove(component, locale) {
|
|
40
44
|
this.#entries.delete(policyKey(component, locale));
|
|
41
45
|
}
|
|
42
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* All current entries, in insertion order.
|
|
48
|
+
*/
|
|
43
49
|
entries() {
|
|
44
50
|
return Array.from(this.#entries.values());
|
|
45
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../policy/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAGtE,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAE7B,SAAS,SAAS,CAAC,SAAuB,EAAE,MAA0B;IACrE,OAAO,GAAG,SAAS,KAAK,MAAM,IAAI,iBAAiB,EAAE,CAAA;AACtD,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IAClC,QAAQ,GAAG,IAAI,GAAG,EAA4B,CAAA;IAE9C;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,OAAmB,WAAW;QACjD,MAAM,QAAQ,GAAG,IAAI,sBAAsB,EAAE,CAAA;QAE7C,KAAK,MAAM,MAAM,IAAI,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;YACjD,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACrB,CAAC;QAED,OAAO,QAAQ,CAAA;IAChB,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../policy/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAGtE,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAE7B,SAAS,SAAS,CAAC,SAAuB,EAAE,MAA0B;IACrE,OAAO,GAAG,SAAS,KAAK,MAAM,IAAI,iBAAiB,EAAE,CAAA;AACt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M,CAAC,CAAA;YACrD,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;YAEzE,SAAQ;QACT,CAAC;QAED,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;IAClB,CAAC;IAED,OAAO,GAAG,CAAA;AACX,CAAC"}
|
package/out/resolver/index.d.ts
CHANGED
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
* `@mailwoman/resolver` (#215), which depends on this + `@mailwoman/spatial` +
|
|
11
11
|
* `@mailwoman/codex`.
|
|
12
12
|
*/
|
|
13
|
-
export { DEFAULT_PLACETYPE_MAP, PLACETYPE_FILTER_GROUPS, expandPlacetypeFilter, isPlacetypeFallback } from "./types.ts";
|
|
14
|
-
export type { AddressPointHit, AddressPointLookup, Ancestor, CoincidentLocality, InterpolatedPointHit, InterpolationLookup, PlacetypeMap, ResolveOpts, ResolvedPlace, Resolver, ResolverBackend, StreetCentroidHit, StreetCentroidLookup, } from "./types.ts";
|
|
13
|
+
export { DEFAULT_PLACETYPE_MAP, PLACETYPE_FILTER_GROUPS, expandPlacetypeFilter, hardCountrySafelistFromCoverage, isPlacetypeFallback, } from "./types.ts";
|
|
14
|
+
export type { AddressPointHit, AddressPointLookup, Ancestor, CoincidentLocality, CountryBBoxFact, CountryCoverageFact, GazetteerArtifactCoverage, InterpolatedPointHit, InterpolationLookup, PlacetypeMap, ResolveOpts, ResolvedPlace, Resolver, ResolverBackend, StreetCentroidHit, StreetCentroidLookup, } from "./types.ts";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../resolver/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../resolver/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,+BAA+B,EAC/B,mBAAmB,GACnB,MAAM,YAAY,CAAA;AAEnB,YAAY,EACX,eAAe,EACf,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,oBAAoB,GACpB,MAAM,YAAY,CAAA"}
|
package/out/resolver/index.js
CHANGED
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
* `@mailwoman/resolver` (#215), which depends on this + `@mailwoman/spatial` +
|
|
11
11
|
* `@mailwoman/codex`.
|
|
12
12
|
*/
|
|
13
|
-
export { DEFAULT_PLACETYPE_MAP, PLACETYPE_FILTER_GROUPS, expandPlacetypeFilter, isPlacetypeFallback } from "./types.js";
|
|
13
|
+
export { DEFAULT_PLACETYPE_MAP, PLACETYPE_FILTER_GROUPS, expandPlacetypeFilter, hardCountrySafelistFromCoverage, isPlacetypeFallback, } from "./types.js";
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../resolver/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../resolver/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,+BAA+B,EAC/B,mBAAmB,GACnB,MAAM,YAAY,CAAA"}
|
package/out/resolver/types.d.ts
CHANGED
|
@@ -19,19 +19,33 @@ import type { AddressTree, ComponentTag } from "../decoder/types.ts";
|
|
|
19
19
|
* `ResolvedPlace` is expected.
|
|
20
20
|
*/
|
|
21
21
|
export interface ResolvedPlace {
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Resolver-specific place identifier (e.g. WOF id).
|
|
24
|
+
*/
|
|
23
25
|
id: number | string;
|
|
24
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Canonical name of the place as the resolver knows it.
|
|
28
|
+
*/
|
|
25
29
|
name: string;
|
|
26
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Resolver's placetype taxonomy label (e.g. WOF's `country` / `region` / `locality`).
|
|
32
|
+
*/
|
|
27
33
|
placetype: string;
|
|
28
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* ISO 3166-1 alpha-2 country code, if known.
|
|
36
|
+
*/
|
|
29
37
|
country: string;
|
|
30
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Centroid latitude in WGS-84 decimal degrees.
|
|
40
|
+
*/
|
|
31
41
|
lat: number;
|
|
32
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Centroid longitude in WGS-84 decimal degrees.
|
|
44
|
+
*/
|
|
33
45
|
lon: number;
|
|
34
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Parent place id within the resolver's hierarchy, if any.
|
|
48
|
+
*/
|
|
35
49
|
parent_id?: number | string;
|
|
36
50
|
/**
|
|
37
51
|
* Resolver-defined ranking score. Higher = better fit for the query. Scale is implementation- defined; callers should
|
|
@@ -80,6 +94,85 @@ export interface ResolvedPlace {
|
|
|
80
94
|
* Structurally compatible with `PlaceLookup` from `@mailwoman/core/resolver-wof-sqlite` so the latter satisfies this
|
|
81
95
|
* interface without an adapter shim.
|
|
82
96
|
*/
|
|
97
|
+
/**
|
|
98
|
+
* One country's measured hard-filter coverage fact, as recorded at a promote gate. Facts about the gazetteer artifact
|
|
99
|
+
* live IN the artifact (the `country_coverage` table the gazetteer build emits) — code constants are only the fallback
|
|
100
|
+
* for artifacts that predate the manifest.
|
|
101
|
+
*
|
|
102
|
+
* Meaning-of-zero discipline: a country ABSENT from the coverage map was never measured — never "measured and failed".
|
|
103
|
+
* A measured-and-failed country is PRESENT with `hardFilterSafe: false` (e.g. FI at 69.5% hard-resolve), so the
|
|
104
|
+
* negative result is a first-class record, distinguishable from ignorance.
|
|
105
|
+
*/
|
|
106
|
+
export interface CountryCoverageFact {
|
|
107
|
+
/**
|
|
108
|
+
* ISO 3166-1 alpha-2, uppercase.
|
|
109
|
+
*/
|
|
110
|
+
country: string;
|
|
111
|
+
/**
|
|
112
|
+
* The promote-gate VERDICT: hard-filtering this country is a pure win (a hard-filter miss is almost always a genuine
|
|
113
|
+
* non-match, not a coverage gap). Stored as a verdict — not re-derived from `hardResolveRate` at read time — because
|
|
114
|
+
* the gate is a judgment over a panel, not a pure rate function (CA cleared at the #928 promote on the
|
|
115
|
+
* postcode-format-prior rationale despite a sub-95% panel resolve rate).
|
|
116
|
+
*/
|
|
117
|
+
hardFilterSafe: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Measured hard-resolve rate (0..1) on the panel named in `source`, when the receipt recorded one.
|
|
120
|
+
*/
|
|
121
|
+
hardResolveRate?: number;
|
|
122
|
+
/**
|
|
123
|
+
* Panel size behind `hardResolveRate`, when recorded.
|
|
124
|
+
*/
|
|
125
|
+
sampleSize?: number;
|
|
126
|
+
/**
|
|
127
|
+
* ISO-8601 date of the measurement / promote gate.
|
|
128
|
+
*/
|
|
129
|
+
measuredAt: string;
|
|
130
|
+
/**
|
|
131
|
+
* The receipt: which panel/gate produced this row (issue + date, human-readable).
|
|
132
|
+
*/
|
|
133
|
+
source: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* One country's coarse guard-B bounding box, as carried by the gazetteer artifact's `country_bbox` table.
|
|
137
|
+
*/
|
|
138
|
+
export interface CountryBBoxFact {
|
|
139
|
+
/**
|
|
140
|
+
* ISO 3166-1 alpha-2, uppercase.
|
|
141
|
+
*/
|
|
142
|
+
country: string;
|
|
143
|
+
latMin: number;
|
|
144
|
+
latMax: number;
|
|
145
|
+
lonMin: number;
|
|
146
|
+
lonMax: number;
|
|
147
|
+
/**
|
|
148
|
+
* Provenance of the box (harness + date).
|
|
149
|
+
*/
|
|
150
|
+
source: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Facts a loaded gazetteer artifact declares about itself — read from the artifact's own manifest tables at open time,
|
|
154
|
+
* carried on the {@link ResolverBackend}/{@link Resolver} handle so consumers read the facts from the artifact they are
|
|
155
|
+
* actually resolving against. `undefined` on the handle = the artifact predates the manifest → consumers fall back to
|
|
156
|
+
* the code constants (byte-identical legacy behavior).
|
|
157
|
+
*/
|
|
158
|
+
export interface GazetteerArtifactCoverage {
|
|
159
|
+
/**
|
|
160
|
+
* Country → measured coverage fact. ABSENCE = never measured (meaning-of-zero), never "failed".
|
|
161
|
+
*/
|
|
162
|
+
countryCoverage: ReadonlyMap<string, CountryCoverageFact>;
|
|
163
|
+
/**
|
|
164
|
+
* Country → guard-B bbox. ABSENCE = no box → the plausibility guard fails open for that country.
|
|
165
|
+
*/
|
|
166
|
+
countryBBoxes: ReadonlyMap<string, CountryBBoxFact>;
|
|
167
|
+
/**
|
|
168
|
+
* Derived at load: the countries whose fact says `hardFilterSafe` — the artifact's hard-country safelist.
|
|
169
|
+
*/
|
|
170
|
+
hardCountrySafelist: ReadonlySet<string>;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Derive the hard-country safelist from coverage facts — the ONE derivation both the reader and the build share.
|
|
174
|
+
*/
|
|
175
|
+
export declare function hardCountrySafelistFromCoverage(facts: Iterable<CountryCoverageFact>): ReadonlySet<string>;
|
|
83
176
|
export interface ResolverBackend {
|
|
84
177
|
findPlace(query: {
|
|
85
178
|
text: string;
|
|
@@ -92,7 +185,9 @@ export interface ResolverBackend {
|
|
|
92
185
|
* recovering localities the name-match alone misses. Backends without postcode support ignore it.
|
|
93
186
|
*/
|
|
94
187
|
postcode?: string;
|
|
95
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* Proximity-bias points — a SOFT prominence re-rank; backends without support ignore it.
|
|
190
|
+
*/
|
|
96
191
|
bias?: Array<{
|
|
97
192
|
lat: number;
|
|
98
193
|
lon: number;
|
|
@@ -114,8 +209,15 @@ export interface ResolverBackend {
|
|
|
114
209
|
* `ancestors` table.
|
|
115
210
|
*/
|
|
116
211
|
ancestors?(id: number | string): Ancestor[];
|
|
212
|
+
/**
|
|
213
|
+
* Facts the loaded gazetteer artifact declares about itself (its coverage-manifest tables, read at open). OPTIONAL —
|
|
214
|
+
* absent when the artifact predates the manifest, and consumers fall back to the code constants.
|
|
215
|
+
*/
|
|
216
|
+
artifactCoverage?: GazetteerArtifactCoverage;
|
|
117
217
|
}
|
|
118
|
-
/**
|
|
218
|
+
/**
|
|
219
|
+
* One link in a resolved place's containment lineage ({@link ResolverBackend.ancestors}, #404).
|
|
220
|
+
*/
|
|
119
221
|
export interface Ancestor {
|
|
120
222
|
id: number | string;
|
|
121
223
|
placetype: string;
|
|
@@ -130,9 +232,13 @@ export interface CoincidentLocality extends ResolvedPlace {
|
|
|
130
232
|
* `city-state` / `capital-seat` / `consolidated-county` — surfaced as `metadata.relationship_type`.
|
|
131
233
|
*/
|
|
132
234
|
relationshipType: string;
|
|
133
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* Locality population (0 when unknown) — the PRIMARY disambiguator when an admin has several.
|
|
237
|
+
*/
|
|
134
238
|
population: number;
|
|
135
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* Centroid distance (km) admin↔locality from the relation — the population tiebreak.
|
|
241
|
+
*/
|
|
136
242
|
distanceKm: number;
|
|
137
243
|
}
|
|
138
244
|
/**
|
|
@@ -145,9 +251,13 @@ export interface CoincidentLocality extends ResolvedPlace {
|
|
|
145
251
|
export interface AddressPointHit {
|
|
146
252
|
lat: number;
|
|
147
253
|
lon: number;
|
|
148
|
-
/**
|
|
254
|
+
/**
|
|
255
|
+
* Provenance, e.g. `"overture:NAD"`.
|
|
256
|
+
*/
|
|
149
257
|
source: string;
|
|
150
|
-
/**
|
|
258
|
+
/**
|
|
259
|
+
* Pinned data release the point came from, e.g. `"2026-05-20.0"`.
|
|
260
|
+
*/
|
|
151
261
|
release: string;
|
|
152
262
|
}
|
|
153
263
|
/**
|
|
@@ -188,11 +298,17 @@ export interface InterpolatedPointHit {
|
|
|
188
298
|
* `address_point` = bracketed between real neighbor points; `tiger_range` = linear within a segment range.
|
|
189
299
|
*/
|
|
190
300
|
method: "address_point" | "tiger_range";
|
|
191
|
-
/**
|
|
301
|
+
/**
|
|
302
|
+
* False when only the opposite side's range contained the number (right block, wrong side).
|
|
303
|
+
*/
|
|
192
304
|
parityMatched?: boolean;
|
|
193
|
-
/**
|
|
305
|
+
/**
|
|
306
|
+
* `both` = neighbors bracketed it; `single` = one-sided extrapolation (larger uncertainty).
|
|
307
|
+
*/
|
|
194
308
|
bracket?: "both" | "single";
|
|
195
|
-
/**
|
|
309
|
+
/**
|
|
310
|
+
* Honest uncertainty radius in METERS (half the matched segment length).
|
|
311
|
+
*/
|
|
196
312
|
uncertaintyM: number;
|
|
197
313
|
source: string;
|
|
198
314
|
release: string;
|
|
@@ -208,6 +324,17 @@ export interface InterpolationLookup {
|
|
|
208
324
|
number: string;
|
|
209
325
|
postcode?: string;
|
|
210
326
|
}): InterpolatedPointHit | null;
|
|
327
|
+
/**
|
|
328
|
+
* The ARTIFACT's own conformal radius multiplier for `uncertaintyM` (#374), read from the shard's
|
|
329
|
+
* `interp_calibration` metadata table at open time (the pair-index δ/transitionBeta header precedent): the multiplier
|
|
330
|
+
* is a property of the calibration set the artifact was built against, so it ships in the artifact, not in caller
|
|
331
|
+
* code. The resolver applies it as the DEFAULT whenever `ResolveOpts.interpolationRadiusCalibration` is absent.
|
|
332
|
+
* `undefined` (or an implementation without the property) = the artifact carries none — shards built before the
|
|
333
|
+
* metadata table existed; behavior is then exactly the pre-artifact ladder (caller-supplied factor or raw).
|
|
334
|
+
* Implementations must read this at OPEN time (constructor/factory), never per-lookup — `find()` is synchronous by
|
|
335
|
+
* design.
|
|
336
|
+
*/
|
|
337
|
+
readonly radiusCalibration?: number;
|
|
211
338
|
}
|
|
212
339
|
/**
|
|
213
340
|
* One street-CENTROID hit (#1042) — the street-level tier BELOW the exact address-point tier and ABOVE admin-centroid
|
|
@@ -219,7 +346,9 @@ export interface InterpolationLookup {
|
|
|
219
346
|
export interface StreetCentroidHit {
|
|
220
347
|
lat: number;
|
|
221
348
|
lon: number;
|
|
222
|
-
/**
|
|
349
|
+
/**
|
|
350
|
+
* Honest coarse radius in METERS — half the street's bounding-box diagonal.
|
|
351
|
+
*/
|
|
223
352
|
uncertaintyM: number;
|
|
224
353
|
source: string;
|
|
225
354
|
release: string;
|
|
@@ -359,14 +488,20 @@ export interface ResolveOpts {
|
|
|
359
488
|
*/
|
|
360
489
|
interpolation?: InterpolationLookup;
|
|
361
490
|
/**
|
|
362
|
-
* Conformal calibration multiplier for the interpolation tier's `uncertainty_m` (#374). The raw radius is
|
|
363
|
-
* matched TIGER segment length — an honest-but-TIGHT prior: a split-conformal calibration on 1562
|
|
364
|
-
* interp hits (2026-06-14) found it covers only ~72% of true errors, and that multiplying by **Q̂ ≈
|
|
365
|
-
* calibrated 90% bound (91.5% empirical). When
|
|
366
|
-
* and preserves the raw value under `uncertainty_raw_m`.
|
|
367
|
-
*
|
|
368
|
-
*
|
|
491
|
+
* Conformal calibration multiplier OVERRIDE for the interpolation tier's `uncertainty_m` (#374). The raw radius is
|
|
492
|
+
* half the matched TIGER segment length — an honest-but-TIGHT prior: a split-conformal calibration on 1562
|
|
493
|
+
* Travis-County interp hits (2026-06-14) found it covers only ~72% of true errors, and that multiplying by **Q̂ ≈
|
|
494
|
+
* 1.70** yields a calibrated 90% bound (91.5% empirical). When a factor applies, `applyInterpolation` reports
|
|
495
|
+
* `uncertainty_m = round(raw × factor)` and preserves the raw value under `uncertainty_raw_m`.
|
|
496
|
+
*
|
|
497
|
+
* The factor is a property of the CALIBRATION SET the artifact was built against, so it ships IN the artifact:
|
|
498
|
+
* {@link InterpolationLookup.radiusCalibration} (the shard's `interp_calibration` metadata table, read at open time)
|
|
499
|
+
* is the default whenever this option is absent. Absent + artifact-silent = raw heuristic (byte-stable — shards
|
|
500
|
+
* predating the metadata table; production callers fall back to their in-code per-region table for those). Report:
|
|
369
501
|
* docs/articles/evals/calibration/2026-06-14-interp-radius-calibration.md.
|
|
502
|
+
*
|
|
503
|
+
* @internal Instrument knob (D3) — measurement decomposition + legacy-shard fallback only; the artifact header IS
|
|
504
|
+
* the shipped calibration. Set it only to override the artifact's value.
|
|
370
505
|
*/
|
|
371
506
|
interpolationRadiusCalibration?: number;
|
|
372
507
|
/**
|
|
@@ -459,7 +594,9 @@ export interface ResolveOpts {
|
|
|
459
594
|
*/
|
|
460
595
|
adminCoherence?: boolean;
|
|
461
596
|
hierarchyCompletion?: boolean;
|
|
462
|
-
/**
|
|
597
|
+
/**
|
|
598
|
+
* @deprecated Renamed to {@link hierarchyCompletion} (#405 generalized #387). Still honored.
|
|
599
|
+
*/
|
|
463
600
|
cityStateFallback?: boolean;
|
|
464
601
|
/**
|
|
465
602
|
* Attach each resolved node's ancestor lineage (#404) — the containment chain (county → region → country) the
|
|
@@ -483,6 +620,10 @@ export interface ResolveOpts {
|
|
|
483
620
|
* - Non-US JP-specific tags wait on a different shard entirely.
|
|
484
621
|
*/
|
|
485
622
|
export type PlacetypeMap = Partial<Record<ComponentTag, string>>;
|
|
623
|
+
/**
|
|
624
|
+
* Placetype equivalences applied when a backend does not supply its own. A `locality` query must also reach `borough`
|
|
625
|
+
* and `localadmin` rows — Brooklyn is a borough, and a strict filter made it unreachable.
|
|
626
|
+
*/
|
|
486
627
|
export declare const DEFAULT_PLACETYPE_MAP: PlacetypeMap;
|
|
487
628
|
/**
|
|
488
629
|
* Placetype-equivalence groups for lookup FILTERING. WOF splits a single addressing tier across several placetypes, but
|
|
@@ -539,5 +680,11 @@ export declare function isPlacetypeFallback(requestedPlacetype: string, candidat
|
|
|
539
680
|
*/
|
|
540
681
|
export interface Resolver {
|
|
541
682
|
resolveTree(tree: AddressTree, opts?: ResolveOpts): Promise<AddressTree>;
|
|
683
|
+
/**
|
|
684
|
+
* Facts the loaded gazetteer artifact declares about itself, passed through from the {@link ResolverBackend} so
|
|
685
|
+
* pipeline-level consumers (the hard-country coverage gate, guard-B plausibility) read them from the handle they
|
|
686
|
+
* already hold. Absent = artifact predates the manifest → code-constant fallback.
|
|
687
|
+
*/
|
|
688
|
+
artifactCoverage?: GazetteerArtifactCoverage;
|
|
542
689
|
}
|
|
543
690
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../resolver/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEpE;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../resolver/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEpE;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,MAA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B,qBAAqB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAAA;AAC9E,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,MAAM,EAAE,GAAG,IAAI,CAAA;AA0B5F;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAQnG;AAED;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACxB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IACxE;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;CAC5C"}
|
package/out/resolver/types.js
CHANGED
|
@@ -12,6 +12,22 @@
|
|
|
12
12
|
*
|
|
13
13
|
* See `docs/plan/phases/PHASE_4_3_resolver_integration.md` for the design intent.
|
|
14
14
|
*/
|
|
15
|
+
/**
|
|
16
|
+
* Derive the hard-country safelist from coverage facts — the ONE derivation both the reader and the build share.
|
|
17
|
+
*/
|
|
18
|
+
export function hardCountrySafelistFromCoverage(facts) {
|
|
19
|
+
const out = new Set();
|
|
20
|
+
for (const fact of facts) {
|
|
21
|
+
if (fact.hardFilterSafe) {
|
|
22
|
+
out.add(fact.country.toUpperCase());
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Placetype equivalences applied when a backend does not supply its own. A `locality` query must also reach `borough`
|
|
29
|
+
* and `localadmin` rows — Brooklyn is a borough, and a strict filter made it unreachable.
|
|
30
|
+
*/
|
|
15
31
|
export const DEFAULT_PLACETYPE_MAP = {
|
|
16
32
|
country: "country",
|
|
17
33
|
region: "region",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../resolver/types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AAC,SAAS,CAAC,EAAE,CAAC;YAC1E,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC7B,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACnB,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAA;AACX,CAAC;AAED;;;;;;GAMG;AACH,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAA;AAE9F;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,kBAA0B,EAAE,kBAA0B;IACzF,MAAM,KAAK,GAAG,uBAAuB,CAAC,kBAAkB,CAAC,CAAA;IAEzD,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IAExB,IAAI,kBAAkB,KAAK,kBAAkB;QAAE,OAAO,KAAK,CAAA;IAE3D,OAAO,yBAAyB,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAA;AAC/F,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*/
|
|
6
|
-
import { TextNormalizer } from "../tokenization/normalizer.ts";
|
|
6
|
+
import type { TextNormalizer } from "../tokenization/normalizer.ts";
|
|
7
7
|
import type { Displayable } from "./debugging.ts";
|
|
8
8
|
/**
|
|
9
9
|
* Options for the locale index.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleIndex.d.ts","sourceRoot":"","sources":["../../resources/LocaleIndex.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"LocaleIndex.d.ts","sourceRoot":"","sources":["../../resources/LocaleIndex.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,cAAc,CAAA;CAC3B;AAED;;;;GAIG;AACH,qBAAa,WAAW,CAAC,aAAa,SAAS,MAAM,CAAE,SAAQ,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IAC7F;;OAEG;IACH,SAAgB,UAAU,CAAC,EAAE,cAAc,CAAA;IAE3C;;OAEG;IACI,WAAW,EAAE,MAAM,CAAA;gBAEd,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,YAAK,EAAE,OAAO,EAAE,kBAAkB;IAW3G;;;;;OAKG;IACI,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,aAAa,EAAE,GAAG,IAAI;IAsBtE;;;;OAIG;IACI,MAAM,CAAC,SAAS,EAAE,MAAM;IAUxB,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAmB/D;;OAEG;IACK,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,GAAG,SAAS,CAAA;IAE/E;;OAEG;IACI,MAAM;CASb"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*/
|
|
6
|
-
import { TextNormalizer } from "../tokenization/normalizer.js";
|
|
7
6
|
/**
|
|
8
7
|
* Index mapping a specific value to originating languages.
|
|
9
8
|
*
|
|
@@ -33,7 +32,7 @@ export class LocaleIndex extends Map {
|
|
|
33
32
|
* @param languageCodes The language codes to associate with the placename.
|
|
34
33
|
*/
|
|
35
34
|
add(placename, ...languageCodes) {
|
|
36
|
-
if (languageCodes.length
|
|
35
|
+
if (!languageCodes.length) {
|
|
37
36
|
throw new Error(`At least one language code must be provided for "${placename}".`);
|
|
38
37
|
}
|
|
39
38
|
if (this.normalizer) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleIndex.js","sourceRoot":"","sources":["../../resources/LocaleIndex.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"LocaleIndex.js","sourceRoot":"","sources":["../../resources/LocaleIndex.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH;;;;GAIG;AACH,MAAM,OAAO,WAA0C,SAAQ,GAA+B;IAC7F;;OAEG;IACa,UAAU,CAAiB;IAE3C;;OAEG;IACI,WAAW,CAAQ;IAE1B,YAAY,UAAgE,EAAE,EAAE,OAA2B;QAC1G,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,SAAS,CAAA;QACpD,IAAI,CAAC,UAAU,GAAG,OAAO,EAAE,UAAU,CAAA;QAErC,KAAK,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,IAAI,OAAO,EAAE,CAAC;YAClD,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,aAAa,CAAC,CAAA;QACtC,CAAC;IACF,CAAC;IAED;;;;;OAKG;IACI,GAAG,CAAC,SAAiB,EAAE,GAAG,aAA8B;QAC9D,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,oDAAoD,SAAS,IAAI,CAAC,CAAA;QACnF,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;YAEhD,IAAI,CAAC,IAAI,CAAC,UAAU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,IAAI,EAAE,CAAC;YAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;QACjD,CAAC;QAED,OAAO,OAAO,CAAA;IACf,CAAC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceMapCache.d.ts","sourceRoot":"","sources":["../../resources/ResourceMapCache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,eAAe,CAAA;AAEzD,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,cAAc,IAAI,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"ResourceMapCache.d.ts","sourceRoot":"","sources":["../../resources/ResourceMapCache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,eAAe,CAAA;AAEzD,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,cAAc,IAAI,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AAEpG,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,cAAc,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AAEzG,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,CAAC,SAAS,cAAc,GAAG,cAAc,IAC3G,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GACzB,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAExB,MAAM,MAAM,aAAa,CAAC,CAAC,IAC1B,CAAC,SAAS,mBAAmB,CAAC,MAAM,EAAE,EAAE,MAAM,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async [Symbol.asyncDispose]() {
|
|
68
|
-
const resourceKeys = Array.from(super.keys()).
|
|
68
|
+
const resourceKeys = Array.from(super.keys()).toReversed();
|
|
69
69
|
for (const resourceKey of resourceKeys) {
|
|
70
70
|
this.close(resourceKey);
|
|
71
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceMapCache.js","sourceRoot":"","sources":["../../resources/ResourceMapCache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"ResourceMapCache.js","sourceRoot":"","sources":["../../resources/ResourceMapCache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyBH;;GAEG;AACH,SAAS,aAAa,CAAI,KAAc;IACvC,IAAI,OAAO,KAAK,KAAK,UAAU;QAAE,OAAO,KAAK,CAAA;IAE7C,OAAO,OAAO,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,WAAW,KAAK,KAAK,CAAC,CAAA;AACzE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAI,KAAc;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAA;IAE7D,OAAO,OAAQ,KAAwB,CAAC,IAAI,KAAK,UAAU,CAAA;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,gBAKZ,SAAQ,GAAS;IAGjB;;OAEG;IACI,WAAW,GAAG,kBAAkB,CAAA;IAEpB,WAAW,CAAG;IAIjC,YAAY,WAAc;QACzB,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAC/B,CAAC;IAED;;OAEG;IACI,IAAI,CAAC,GAAM;QACjB,MAAM,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAEvC,IAAI,gBAAgB;YAAE,OAAO,gBAAyC,CAAA;QAEtE,IAAI,aAAa,CAA4B,IAAI,CAAC,WA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@@
|
|
|
1
|
-
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../resources/collections.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,wBAAuB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,EAChF,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,EAC1C,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,EACX,WAAW,CAAC,EAAE,WAAW,GACvB,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../resources/collections.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,wBAAuB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,EAChF,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,EAC1C,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,EACX,WAAW,CAAC,EAAE,WAAW,GACvB,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAoDvC;AAED;;;;GAIG;AACH,wBAAuB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAgBvG"}
|
|
@@ -17,6 +17,7 @@ export async function* takeInParallel(collection, batchSize, callback, abortSign
|
|
|
17
17
|
const runningTasks = new Map();
|
|
18
18
|
const results = new Map();
|
|
19
19
|
let iterationResult = await iterator.next();
|
|
20
|
+
// oxlint-disable-next-line eslint/no-unmodified-loop-condition -- `abortSignal.aborted` is flipped by the controller, not by this loop
|
|
20
21
|
while ((!iterationResult.done || results.size) && !abortSignal?.aborted) {
|
|
21
22
|
for (const [key, result] of results) {
|
|
22
23
|
yield result;
|
|
@@ -31,6 +32,7 @@ export async function* takeInParallel(collection, batchSize, callback, abortSign
|
|
|
31
32
|
break;
|
|
32
33
|
}
|
|
33
34
|
const entry = iterationResult.value;
|
|
35
|
+
// oxlint-disable-next-line promise/always-return -- the handle tracks completion, not a value
|
|
34
36
|
const futureResult = callback(entry).then((result) => {
|
|
35
37
|
runningTasks.delete(entry);
|
|
36
38
|
results.set(entry, result);
|
|
@@ -60,7 +62,7 @@ export async function* takeAsync(collection, batchSize) {
|
|
|
60
62
|
buffer = [];
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
|
-
if (buffer.length
|
|
65
|
+
if (buffer.length) {
|
|
64
66
|
yield buffer;
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.js","sourceRoot":"","sources":["../../resources/collections.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,cAAc,CACpC,UAA0C,EAC1C,SAAiB,EACjB,QAAW,EACX,WAAyB;IAEzB,MAAM,QAAQ,GACb,MAAM,CAAC,aAAa,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAExG,MAAM,YAAY,GAAG,IAAI,GAAG,EAAuB,CAAA;IACnD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAoB,CAAA;IAE3C,IAAI,eAAe,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAE3C,OAAO,CAAC,CAAC,eAAe,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAA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