@mailwoman/corpus 10.1.0 → 10.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/data/licenses/cdla-permissive-2.0.md +1 -1
- package/lib/adapters/cordis/adapter.ts +13 -7
- package/lib/adapters/dedup-key.ts +1 -1
- package/lib/adapters/geonames/adapter.ts +1 -1
- package/lib/adapters/gleif/adapter.ts +17 -16
- package/lib/adapters/libpostal-dictionary.ts +0 -2
- package/lib/adapters/openaddresses/adapter.ts +4 -3
- package/lib/adapters/osm/adapter.ts +22 -21
- package/lib/adapters/po-box/adapter.ts +10 -5
- package/lib/adapters/registry.ts +4 -4
- package/lib/adapters/source-id.ts +2 -2
- package/lib/adapters/street-line.ts +7 -6
- package/lib/adapters/wof/admin/json/adapter.ts +2 -2
- package/lib/adapters/wof/json-rows.ts +2 -1
- package/lib/adapters/wof/postalcode-json/adapter.ts +6 -2
- package/lib/adapters.ts +5 -5
- package/lib/au/adapters/gnaf/adapter.ts +1 -1
- package/lib/be/adapters/brussels/adapter.ts +22 -22
- package/lib/be/adapters/vlaanderen/adapter.ts +54 -57
- package/lib/be/adapters/wallonie/adapter.ts +17 -17
- package/lib/be/tools/fetch/brussels.ts +13 -10
- package/lib/be/tools/fetch/wallonie.ts +8 -7
- package/lib/build/adapters.ts +2 -1
- package/lib/build/align.ts +5 -4
- package/lib/build/checkpoint.ts +5 -3
- package/lib/build/eligibility.ts +3 -3
- package/lib/build/types.ts +8 -6
- package/lib/cz/adapters/cuzk/adapter.ts +41 -38
- package/lib/cz/tools/fetch/cuzk.ts +42 -31
- package/lib/de/recipes/locale.ts +1 -1
- package/lib/dk/adapters/inspire/adapter.ts +38 -38
- package/lib/dk/tools/fetch/inspire.ts +16 -14
- package/lib/ee/adapters/ads/adapter.ts +26 -32
- package/lib/ee/tools/fetch/ads.ts +10 -8
- package/lib/es/adapters/bizkaia/adapter.ts +47 -47
- package/lib/es/adapters/catastro/adapter.ts +36 -34
- package/lib/es/adapters/gipuzkoa/adapter.ts +38 -45
- package/lib/es/adapters/navarra/adapter.ts +28 -27
- package/lib/es/cadastre.ts +31 -31
- package/lib/es/tools/fetch/bizkaia.ts +40 -36
- package/lib/es/tools/fetch/catastro.ts +51 -40
- package/lib/es/tools/fetch/gipuzkoa.ts +13 -11
- package/lib/es/tools/fetch/navarra.ts +33 -25
- package/lib/fi/adapters/ryhti/adapter.ts +22 -26
- package/lib/fi/tools/fetch/ryhti.ts +31 -31
- package/lib/fr/adapters/annuaire-education/adapter.ts +13 -11
- package/lib/fr/adapters/ban/adapter.ts +6 -6
- package/lib/fr/adapters/finess/adapter.ts +16 -15
- package/lib/fr/adapters/finess/voie-type.ts +4 -3
- package/lib/fr/insee-country.ts +2 -2
- package/lib/fr/recipes/lieudit.ts +8 -6
- package/lib/fr/tools/fetch/annuaire-education.ts +11 -8
- package/lib/fr/tools/fetch/ban.ts +3 -2
- package/lib/fr/tools/fetch/finess.ts +14 -13
- package/lib/inspire/address.ts +86 -78
- package/lib/inspire/errors.ts +9 -8
- package/lib/inspire/stream.ts +29 -26
- package/lib/international/recipes/locale.ts +13 -9
- package/lib/it/adapters/anac/adapter.ts +51 -46
- package/lib/it/tools/fetch/anac.ts +22 -25
- package/lib/jp/adapters/wof-admin/adapter.ts +2 -6
- package/lib/jp/tools/fetch/houjin.ts +3 -3
- package/lib/kr/adapters/localdata/permit-rows.ts +1 -1
- package/lib/kr/tools/fetch/juso.ts +1 -1
- package/lib/kr/tools/fetch/localdata.ts +2 -2
- package/lib/lu/adapters/bd-adresses/adapter.ts +10 -10
- package/lib/lu/tools/fetch/bd-adresses.ts +15 -13
- package/lib/lv/adapters/varis/adapter.ts +24 -23
- package/lib/lv/tools/fetch/varis.ts +3 -2
- package/lib/nl/adapters/kadaster/adapter.ts +29 -29
- package/lib/nl/tools/fetch/kadaster.ts +16 -12
- package/lib/no/adapters/matrikkelen/adapter.ts +6 -5
- package/lib/no/tools/fetch/matrikkelen.ts +59 -47
- package/lib/parquet/duckdb.ts +7 -4
- package/lib/parquet/readers.ts +3 -3
- package/lib/parquet/schema.ts +1 -1
- package/lib/parquet/writers.ts +3 -2
- package/lib/pl/adapters/emuia/adapter.ts +12 -12
- package/lib/pl/tools/fetch/emuia.ts +10 -9
- package/lib/recipes/bare/postcode.ts +1 -1
- package/lib/recipes/boundary-stress.ts +1 -1
- package/lib/recipes/house-venue.ts +7 -3
- package/lib/recipes/intersection.ts +2 -2
- package/lib/recipes/po/box/cedex/recipe.ts +3 -3
- package/lib/recipes/po/box/cedex/sources.ts +13 -1
- package/lib/recipes/scaffold.ts +31 -21
- package/lib/recipes/sources.ts +16 -3
- package/lib/recipes/street/bare.ts +2 -2
- package/lib/recipes/street.ts +3 -1
- package/lib/recipes/sub/venue/context.ts +2 -0
- package/lib/recipes/sub/venue/render.ts +1 -1
- package/lib/recipes/sub/venue/sources.ts +24 -29
- package/lib/recipes/sub/venue.ts +12 -18
- package/lib/recipes/trailing-region.ts +6 -2
- package/lib/recipes/unit.ts +3 -3
- package/lib/recipes/venue.ts +347 -0
- package/lib/recipes.ts +4 -2
- package/lib/registers.ts +8 -6
- package/lib/ro/adapters/retea-scolara/adapter.ts +5 -5
- package/lib/ro/tools/fetch/retea-scolara.ts +1 -1
- package/lib/runner.ts +4 -3
- package/lib/sg/recipes/register.ts +1 -1
- package/lib/sg/tools/fetch/acra.ts +3 -3
- package/lib/sk/adapters/inspire/adapter.ts +25 -27
- package/lib/sk/tools/fetch/inspire.ts +15 -14
- package/lib/source-register/effective-manifest.ts +3 -3
- package/lib/source-register/register.ts +3 -3
- package/lib/source-register/training-manifest.ts +1 -1
- package/lib/source-register/types.ts +12 -13
- package/lib/subvenue/promotions.ts +1 -1
- package/lib/subvenue/table.ts +4 -4
- package/lib/surfaces/locale.ts +2 -0
- package/lib/synthesizers/anchor-absorption.ts +2 -1
- package/lib/synthesizers/boundary-stress.ts +20 -26
- package/lib/synthesizers/house-venue.ts +26 -30
- package/lib/synthesizers/no-street.ts +2 -1
- package/lib/synthesizers/po-box.ts +6 -3
- package/lib/synthesizers/tail.ts +55 -0
- package/lib/synthesizers/utils.ts +19 -2
- package/lib/test-kit.ts +2 -2
- package/lib/tools/audit.ts +7 -5
- package/lib/tools/corpus-stats.ts +1 -1
- package/lib/tools/fetch/atom.ts +10 -10
- package/lib/tools/fetch/cordis.ts +11 -9
- package/lib/tools/fetch/download/manifest.ts +2 -1
- package/lib/tools/fetch/download/network.ts +4 -4
- package/lib/tools/fetch/download/retry.ts +4 -4
- package/lib/tools/fetch/geonames/dump.ts +5 -3
- package/lib/tools/fetch/geonames/postal.ts +2 -2
- package/lib/tools/fetch/gleif.ts +6 -4
- package/lib/tools/fetch/header.ts +8 -6
- package/lib/tools/fetch/inspire-addresses.ts +41 -36
- package/lib/tools/fetch/openaddresses.ts +1 -1
- package/lib/tools/fetch/vlaanderen-ad.ts +17 -17
- package/lib/tools/fetch/wfs-harvest.ts +39 -28
- package/lib/tools/fetch.ts +0 -42
- package/lib/tools/golden/expand.ts +8 -8
- package/lib/tools/golden/promote.ts +12 -8
- package/lib/tools/golden/relabel-street/directory.ts +7 -6
- package/lib/tools/golden/relabel-street/row.ts +7 -6
- package/lib/tools/ingest-csv.ts +3 -3
- package/lib/tools/jsonl-to-parquet.ts +1 -1
- package/lib/tools/lint/recipe-output/vocab.ts +10 -5
- package/lib/tools/lint/recipe-output.ts +26 -8
- package/lib/tools/overlay/kryptonite.ts +4 -3
- package/lib/tools/overlay/manifest.ts +4 -2
- package/lib/tools/overlay/merge-source.ts +2 -1
- package/lib/tools/overlay/split-slice.ts +2 -2
- package/lib/tools/overlay/translit.ts +6 -4
- package/lib/tools/overture-subvenue.ts +1 -1
- package/lib/tools/postcode-triples.ts +5 -4
- package/lib/tools/source-register/build.ts +17 -14
- package/lib/tools/sub/venue/lexicon.ts +4 -8
- package/lib/tw/tools/fetch/gcis.ts +4 -4
- package/lib/types.ts +4 -3
- package/lib/us/adapters/state/hi-schools/workbook.ts +1 -1
- package/lib/us/adapters/usgov/nad/adapter.ts +11 -11
- package/lib/us/adapters/usgov/samhsa-treatment-locator/adapter.ts +4 -4
- package/lib/us/fips-state.ts +2 -2
- package/lib/{synthesizers → us/synthesizers}/intersection.ts +12 -13
- package/lib/{synthesizers → us/synthesizers}/street.ts +16 -15
- package/lib/us/tools/fetch/imls-pls.ts +1 -1
- package/lib/us/tools/fetch/nad.ts +7 -7
- package/lib/us/tools/fetch/nppes.ts +5 -5
- package/lib/us/tools/fetch/state/hi-schools.ts +3 -2
- package/lib/us/tools/fetch/tiger-full.ts +1 -1
- package/lib/utils/align.ts +13 -10
- package/lib/utils/golden.ts +2 -2
- package/lib/utils/license.ts +3 -3
- package/lib/utils/split.ts +19 -15
- package/lib/utils/tokenize.ts +7 -26
- package/lib/utils/wof-json.ts +4 -4
- package/out/adapters/cordis/adapter.d.ts +5 -3
- package/out/adapters/cordis/adapter.d.ts.map +1 -1
- package/out/adapters/cordis/adapter.js +13 -7
- package/out/adapters/cordis/adapter.js.map +1 -1
- package/out/adapters/dedup-key.d.ts +1 -1
- package/out/adapters/dedup-key.js +1 -1
- package/out/adapters/geonames/adapter.js +1 -1
- package/out/adapters/geonames/adapter.js.map +1 -1
- package/out/adapters/gleif/adapter.d.ts +9 -9
- package/out/adapters/gleif/adapter.d.ts.map +1 -1
- package/out/adapters/gleif/adapter.js +15 -14
- package/out/adapters/gleif/adapter.js.map +1 -1
- package/out/adapters/libpostal-dictionary.d.ts +0 -2
- package/out/adapters/libpostal-dictionary.d.ts.map +1 -1
- package/out/adapters/libpostal-dictionary.js +0 -2
- package/out/adapters/libpostal-dictionary.js.map +1 -1
- package/out/adapters/openaddresses/adapter.d.ts +3 -2
- package/out/adapters/openaddresses/adapter.d.ts.map +1 -1
- package/out/adapters/openaddresses/adapter.js +1 -1
- package/out/adapters/openaddresses/adapter.js.map +1 -1
- package/out/adapters/osm/adapter.d.ts +17 -16
- package/out/adapters/osm/adapter.d.ts.map +1 -1
- package/out/adapters/osm/adapter.js +10 -9
- package/out/adapters/osm/adapter.js.map +1 -1
- package/out/adapters/po-box/adapter.d.ts +6 -3
- package/out/adapters/po-box/adapter.d.ts.map +1 -1
- package/out/adapters/po-box/adapter.js +4 -2
- package/out/adapters/po-box/adapter.js.map +1 -1
- package/out/adapters/registry.d.ts +3 -3
- package/out/adapters/registry.d.ts.map +1 -1
- package/out/adapters/registry.js +1 -1
- package/out/adapters/registry.js.map +1 -1
- package/out/adapters/source-id.d.ts +2 -2
- package/out/adapters/source-id.js +2 -2
- package/out/adapters/street-line.d.ts +7 -6
- package/out/adapters/street-line.d.ts.map +1 -1
- package/out/adapters/street-line.js +7 -6
- package/out/adapters/street-line.js.map +1 -1
- package/out/adapters/wof/admin/json/adapter.js +1 -1
- package/out/adapters/wof/admin/json/adapter.js.map +1 -1
- package/out/adapters/wof/json-rows.d.ts +2 -1
- package/out/adapters/wof/json-rows.d.ts.map +1 -1
- package/out/adapters/wof/json-rows.js.map +1 -1
- package/out/adapters/wof/postalcode-json/adapter.d.ts.map +1 -1
- package/out/adapters/wof/postalcode-json/adapter.js +5 -1
- package/out/adapters/wof/postalcode-json/adapter.js.map +1 -1
- package/out/adapters.d.ts +5 -5
- package/out/adapters.js +5 -5
- package/out/au/adapters/gnaf/adapter.js +1 -1
- package/out/au/adapters/gnaf/adapter.js.map +1 -1
- package/out/be/adapters/brussels/adapter.d.ts +9 -9
- package/out/be/adapters/brussels/adapter.d.ts.map +1 -1
- package/out/be/adapters/brussels/adapter.js +21 -21
- package/out/be/adapters/brussels/adapter.js.map +1 -1
- package/out/be/adapters/vlaanderen/adapter.d.ts +34 -37
- package/out/be/adapters/vlaanderen/adapter.d.ts.map +1 -1
- package/out/be/adapters/vlaanderen/adapter.js +40 -38
- package/out/be/adapters/vlaanderen/adapter.js.map +1 -1
- package/out/be/adapters/wallonie/adapter.d.ts +2 -2
- package/out/be/adapters/wallonie/adapter.js +17 -17
- package/out/be/adapters/wallonie/adapter.js.map +1 -1
- package/out/be/tools/fetch/brussels.d.ts +11 -8
- package/out/be/tools/fetch/brussels.d.ts.map +1 -1
- package/out/be/tools/fetch/brussels.js +10 -8
- package/out/be/tools/fetch/brussels.js.map +1 -1
- package/out/be/tools/fetch/wallonie.d.ts +6 -5
- package/out/be/tools/fetch/wallonie.d.ts.map +1 -1
- package/out/be/tools/fetch/wallonie.js +4 -4
- package/out/be/tools/fetch/wallonie.js.map +1 -1
- package/out/build/adapters.d.ts.map +1 -1
- package/out/build/adapters.js +2 -1
- package/out/build/adapters.js.map +1 -1
- package/out/build/align.d.ts +3 -2
- package/out/build/align.d.ts.map +1 -1
- package/out/build/align.js +2 -2
- package/out/build/align.js.map +1 -1
- package/out/build/checkpoint.d.ts +1 -1
- package/out/build/checkpoint.d.ts.map +1 -1
- package/out/build/checkpoint.js +4 -2
- package/out/build/checkpoint.js.map +1 -1
- package/out/build/eligibility.d.ts +2 -2
- package/out/build/eligibility.js +3 -3
- package/out/build/eligibility.js.map +1 -1
- package/out/build/types.d.ts +8 -6
- package/out/build/types.d.ts.map +1 -1
- package/out/cz/adapters/cuzk/adapter.d.ts +14 -14
- package/out/cz/adapters/cuzk/adapter.d.ts.map +1 -1
- package/out/cz/adapters/cuzk/adapter.js +38 -35
- package/out/cz/adapters/cuzk/adapter.js.map +1 -1
- package/out/cz/tools/fetch/cuzk.d.ts +31 -22
- package/out/cz/tools/fetch/cuzk.d.ts.map +1 -1
- package/out/cz/tools/fetch/cuzk.js +21 -19
- package/out/cz/tools/fetch/cuzk.js.map +1 -1
- package/out/de/recipes/locale.js +1 -1
- package/out/de/recipes/locale.js.map +1 -1
- package/out/dk/adapters/inspire/adapter.d.ts +32 -33
- package/out/dk/adapters/inspire/adapter.d.ts.map +1 -1
- package/out/dk/adapters/inspire/adapter.js +38 -38
- package/out/dk/adapters/inspire/adapter.js.map +1 -1
- package/out/dk/tools/fetch/inspire.d.ts +6 -5
- package/out/dk/tools/fetch/inspire.d.ts.map +1 -1
- package/out/dk/tools/fetch/inspire.js +15 -13
- package/out/dk/tools/fetch/inspire.js.map +1 -1
- package/out/ee/adapters/ads/adapter.d.ts +19 -26
- package/out/ee/adapters/ads/adapter.d.ts.map +1 -1
- package/out/ee/adapters/ads/adapter.js +22 -28
- package/out/ee/adapters/ads/adapter.js.map +1 -1
- package/out/ee/tools/fetch/ads.d.ts +3 -3
- package/out/ee/tools/fetch/ads.d.ts.map +1 -1
- package/out/ee/tools/fetch/ads.js +10 -8
- package/out/ee/tools/fetch/ads.js.map +1 -1
- package/out/es/adapters/bizkaia/adapter.d.ts +28 -28
- package/out/es/adapters/bizkaia/adapter.d.ts.map +1 -1
- package/out/es/adapters/bizkaia/adapter.js +43 -43
- package/out/es/adapters/bizkaia/adapter.js.map +1 -1
- package/out/es/adapters/catastro/adapter.d.ts +22 -23
- package/out/es/adapters/catastro/adapter.d.ts.map +1 -1
- package/out/es/adapters/catastro/adapter.js +35 -33
- package/out/es/adapters/catastro/adapter.js.map +1 -1
- package/out/es/adapters/gipuzkoa/adapter.d.ts +31 -38
- package/out/es/adapters/gipuzkoa/adapter.d.ts.map +1 -1
- package/out/es/adapters/gipuzkoa/adapter.js +40 -47
- package/out/es/adapters/gipuzkoa/adapter.js.map +1 -1
- package/out/es/adapters/navarra/adapter.d.ts +20 -19
- package/out/es/adapters/navarra/adapter.d.ts.map +1 -1
- package/out/es/adapters/navarra/adapter.js +23 -22
- package/out/es/adapters/navarra/adapter.js.map +1 -1
- package/out/es/cadastre.d.ts +21 -20
- package/out/es/cadastre.d.ts.map +1 -1
- package/out/es/cadastre.js +19 -21
- package/out/es/cadastre.js.map +1 -1
- package/out/es/tools/fetch/bizkaia.d.ts +28 -25
- package/out/es/tools/fetch/bizkaia.d.ts.map +1 -1
- package/out/es/tools/fetch/bizkaia.js +25 -24
- package/out/es/tools/fetch/bizkaia.js.map +1 -1
- package/out/es/tools/fetch/catastro.d.ts +28 -20
- package/out/es/tools/fetch/catastro.d.ts.map +1 -1
- package/out/es/tools/fetch/catastro.js +36 -31
- package/out/es/tools/fetch/catastro.js.map +1 -1
- package/out/es/tools/fetch/gipuzkoa.d.ts +11 -9
- package/out/es/tools/fetch/gipuzkoa.d.ts.map +1 -1
- package/out/es/tools/fetch/gipuzkoa.js +9 -8
- package/out/es/tools/fetch/gipuzkoa.js.map +1 -1
- package/out/es/tools/fetch/navarra.d.ts +20 -15
- package/out/es/tools/fetch/navarra.d.ts.map +1 -1
- package/out/es/tools/fetch/navarra.js +21 -16
- package/out/es/tools/fetch/navarra.js.map +1 -1
- package/out/fi/adapters/ryhti/adapter.d.ts +16 -20
- package/out/fi/adapters/ryhti/adapter.d.ts.map +1 -1
- package/out/fi/adapters/ryhti/adapter.js +21 -25
- package/out/fi/adapters/ryhti/adapter.js.map +1 -1
- package/out/fi/tools/fetch/ryhti.d.ts +24 -24
- package/out/fi/tools/fetch/ryhti.d.ts.map +1 -1
- package/out/fi/tools/fetch/ryhti.js +21 -24
- package/out/fi/tools/fetch/ryhti.js.map +1 -1
- package/out/fr/adapters/annuaire-education/adapter.d.ts +8 -8
- package/out/fr/adapters/annuaire-education/adapter.d.ts.map +1 -1
- package/out/fr/adapters/annuaire-education/adapter.js +13 -11
- package/out/fr/adapters/annuaire-education/adapter.js.map +1 -1
- package/out/fr/adapters/ban/adapter.d.ts +4 -4
- package/out/fr/adapters/ban/adapter.js +6 -6
- package/out/fr/adapters/ban/adapter.js.map +1 -1
- package/out/fr/adapters/finess/adapter.d.ts +12 -11
- package/out/fr/adapters/finess/adapter.d.ts.map +1 -1
- package/out/fr/adapters/finess/adapter.js +16 -15
- package/out/fr/adapters/finess/adapter.js.map +1 -1
- package/out/fr/adapters/finess/voie-type.d.ts +2 -2
- package/out/fr/adapters/finess/voie-type.d.ts.map +1 -1
- package/out/fr/adapters/finess/voie-type.js +4 -3
- package/out/fr/adapters/finess/voie-type.js.map +1 -1
- package/out/fr/insee-country.d.ts +2 -2
- package/out/fr/insee-country.js +2 -2
- package/out/fr/recipes/lieudit.d.ts.map +1 -1
- package/out/fr/recipes/lieudit.js +5 -4
- package/out/fr/recipes/lieudit.js.map +1 -1
- package/out/fr/tools/fetch/annuaire-education.d.ts +7 -4
- package/out/fr/tools/fetch/annuaire-education.d.ts.map +1 -1
- package/out/fr/tools/fetch/annuaire-education.js +9 -7
- package/out/fr/tools/fetch/annuaire-education.js.map +1 -1
- package/out/fr/tools/fetch/ban.d.ts +1 -1
- package/out/fr/tools/fetch/ban.d.ts.map +1 -1
- package/out/fr/tools/fetch/ban.js +3 -2
- package/out/fr/tools/fetch/ban.js.map +1 -1
- package/out/fr/tools/fetch/finess.d.ts +5 -5
- package/out/fr/tools/fetch/finess.d.ts.map +1 -1
- package/out/fr/tools/fetch/finess.js +13 -12
- package/out/fr/tools/fetch/finess.js.map +1 -1
- package/out/inspire/address.d.ts +62 -52
- package/out/inspire/address.d.ts.map +1 -1
- package/out/inspire/address.js +71 -60
- package/out/inspire/address.js.map +1 -1
- package/out/inspire/errors.d.ts +9 -8
- package/out/inspire/errors.d.ts.map +1 -1
- package/out/inspire/errors.js +7 -6
- package/out/inspire/errors.js.map +1 -1
- package/out/inspire/stream.d.ts +25 -22
- package/out/inspire/stream.d.ts.map +1 -1
- package/out/inspire/stream.js +10 -12
- package/out/inspire/stream.js.map +1 -1
- package/out/international/recipes/locale.d.ts +2 -2
- package/out/international/recipes/locale.d.ts.map +1 -1
- package/out/international/recipes/locale.js +11 -7
- package/out/international/recipes/locale.js.map +1 -1
- package/out/it/adapters/anac/adapter.d.ts +45 -43
- package/out/it/adapters/anac/adapter.d.ts.map +1 -1
- package/out/it/adapters/anac/adapter.js +48 -43
- package/out/it/adapters/anac/adapter.js.map +1 -1
- package/out/it/tools/fetch/anac.d.ts +16 -19
- package/out/it/tools/fetch/anac.d.ts.map +1 -1
- package/out/it/tools/fetch/anac.js +20 -23
- package/out/it/tools/fetch/anac.js.map +1 -1
- package/out/jp/adapters/wof-admin/adapter.d.ts.map +1 -1
- package/out/jp/adapters/wof-admin/adapter.js.map +1 -1
- package/out/jp/tools/fetch/houjin.js +2 -2
- package/out/jp/tools/fetch/houjin.js.map +1 -1
- package/out/kr/adapters/localdata/permit-rows.js +1 -1
- package/out/kr/adapters/localdata/permit-rows.js.map +1 -1
- package/out/kr/tools/fetch/juso.d.ts +1 -1
- package/out/kr/tools/fetch/localdata.d.ts +1 -1
- package/out/kr/tools/fetch/localdata.js +1 -1
- package/out/kr/tools/fetch/localdata.js.map +1 -1
- package/out/lu/adapters/bd-adresses/adapter.d.ts +9 -9
- package/out/lu/adapters/bd-adresses/adapter.js +10 -10
- package/out/lu/tools/fetch/bd-adresses.d.ts +11 -9
- package/out/lu/tools/fetch/bd-adresses.d.ts.map +1 -1
- package/out/lu/tools/fetch/bd-adresses.js +11 -11
- package/out/lu/tools/fetch/bd-adresses.js.map +1 -1
- package/out/lv/adapters/varis/adapter.d.ts +24 -23
- package/out/lv/adapters/varis/adapter.d.ts.map +1 -1
- package/out/lv/adapters/varis/adapter.js +24 -23
- package/out/lv/adapters/varis/adapter.js.map +1 -1
- package/out/lv/tools/fetch/varis.d.ts +2 -1
- package/out/lv/tools/fetch/varis.d.ts.map +1 -1
- package/out/lv/tools/fetch/varis.js +1 -1
- package/out/lv/tools/fetch/varis.js.map +1 -1
- package/out/nl/adapters/kadaster/adapter.d.ts +12 -12
- package/out/nl/adapters/kadaster/adapter.d.ts.map +1 -1
- package/out/nl/adapters/kadaster/adapter.js +22 -23
- package/out/nl/adapters/kadaster/adapter.js.map +1 -1
- package/out/nl/tools/fetch/kadaster.d.ts +14 -10
- package/out/nl/tools/fetch/kadaster.d.ts.map +1 -1
- package/out/nl/tools/fetch/kadaster.js +12 -9
- package/out/nl/tools/fetch/kadaster.js.map +1 -1
- package/out/no/adapters/matrikkelen/adapter.d.ts +1 -1
- package/out/no/adapters/matrikkelen/adapter.d.ts.map +1 -1
- package/out/no/adapters/matrikkelen/adapter.js +3 -3
- package/out/no/adapters/matrikkelen/adapter.js.map +1 -1
- package/out/no/tools/fetch/matrikkelen.d.ts +50 -38
- package/out/no/tools/fetch/matrikkelen.d.ts.map +1 -1
- package/out/no/tools/fetch/matrikkelen.js +44 -36
- package/out/no/tools/fetch/matrikkelen.js.map +1 -1
- package/out/parquet/duckdb.d.ts +7 -4
- package/out/parquet/duckdb.d.ts.map +1 -1
- package/out/parquet/duckdb.js +2 -1
- package/out/parquet/duckdb.js.map +1 -1
- package/out/parquet/readers.js +3 -3
- package/out/parquet/readers.js.map +1 -1
- package/out/parquet/schema.js +1 -1
- package/out/parquet/schema.js.map +1 -1
- package/out/parquet/writers.d.ts +1 -1
- package/out/parquet/writers.d.ts.map +1 -1
- package/out/parquet/writers.js +2 -1
- package/out/parquet/writers.js.map +1 -1
- package/out/pl/adapters/emuia/adapter.d.ts +8 -8
- package/out/pl/adapters/emuia/adapter.js +12 -12
- package/out/pl/adapters/emuia/adapter.js.map +1 -1
- package/out/pl/tools/fetch/emuia.d.ts +5 -4
- package/out/pl/tools/fetch/emuia.d.ts.map +1 -1
- package/out/pl/tools/fetch/emuia.js +10 -9
- package/out/pl/tools/fetch/emuia.js.map +1 -1
- package/out/recipes/bare/postcode.js +1 -1
- package/out/recipes/bare/postcode.js.map +1 -1
- package/out/recipes/boundary-stress.js +1 -1
- package/out/recipes/boundary-stress.js.map +1 -1
- package/out/recipes/house-venue.d.ts.map +1 -1
- package/out/recipes/house-venue.js +6 -3
- package/out/recipes/house-venue.js.map +1 -1
- package/out/recipes/intersection.js +2 -2
- package/out/recipes/intersection.js.map +1 -1
- package/out/recipes/po/box/cedex/recipe.js +2 -1
- package/out/recipes/po/box/cedex/recipe.js.map +1 -1
- package/out/recipes/po/box/cedex/sources.d.ts +8 -2
- package/out/recipes/po/box/cedex/sources.d.ts.map +1 -1
- package/out/recipes/po/box/cedex/sources.js +1 -1
- package/out/recipes/po/box/cedex/sources.js.map +1 -1
- package/out/recipes/scaffold.d.ts +28 -19
- package/out/recipes/scaffold.d.ts.map +1 -1
- package/out/recipes/scaffold.js +3 -2
- package/out/recipes/scaffold.js.map +1 -1
- package/out/recipes/sources.d.ts +1 -1
- package/out/recipes/sources.d.ts.map +1 -1
- package/out/recipes/sources.js +15 -2
- package/out/recipes/sources.js.map +1 -1
- package/out/recipes/street/bare.js +2 -2
- package/out/recipes/street/bare.js.map +1 -1
- package/out/recipes/street.d.ts.map +1 -1
- package/out/recipes/street.js +3 -1
- package/out/recipes/street.js.map +1 -1
- package/out/recipes/sub/venue/context.d.ts.map +1 -1
- package/out/recipes/sub/venue/context.js +2 -0
- package/out/recipes/sub/venue/context.js.map +1 -1
- package/out/recipes/sub/venue/render.js +1 -1
- package/out/recipes/sub/venue/render.js.map +1 -1
- package/out/recipes/sub/venue/sources.d.ts +6 -3
- package/out/recipes/sub/venue/sources.d.ts.map +1 -1
- package/out/recipes/sub/venue/sources.js +16 -20
- package/out/recipes/sub/venue/sources.js.map +1 -1
- package/out/recipes/sub/venue.d.ts +2 -5
- package/out/recipes/sub/venue.d.ts.map +1 -1
- package/out/recipes/sub/venue.js +10 -14
- package/out/recipes/sub/venue.js.map +1 -1
- package/out/recipes/trailing-region.d.ts.map +1 -1
- package/out/recipes/trailing-region.js +6 -1
- package/out/recipes/trailing-region.js.map +1 -1
- package/out/recipes/unit.js +2 -2
- package/out/recipes/unit.js.map +1 -1
- package/out/recipes/venue.d.ts +119 -0
- package/out/recipes/venue.d.ts.map +1 -0
- package/out/recipes/venue.js +245 -0
- package/out/recipes/venue.js.map +1 -0
- package/out/recipes.d.ts +1 -1
- package/out/recipes.d.ts.map +1 -1
- package/out/recipes.js +3 -1
- package/out/recipes.js.map +1 -1
- package/out/registers.d.ts +8 -6
- package/out/registers.d.ts.map +1 -1
- package/out/registers.js +8 -6
- package/out/registers.js.map +1 -1
- package/out/ro/adapters/retea-scolara/adapter.d.ts +5 -5
- package/out/ro/adapters/retea-scolara/adapter.js +5 -5
- package/out/ro/tools/fetch/retea-scolara.js +1 -1
- package/out/ro/tools/fetch/retea-scolara.js.map +1 -1
- package/out/runner.d.ts +3 -2
- package/out/runner.d.ts.map +1 -1
- package/out/runner.js +1 -1
- package/out/runner.js.map +1 -1
- package/out/sg/recipes/register.js +1 -1
- package/out/sg/recipes/register.js.map +1 -1
- package/out/sg/tools/fetch/acra.js +2 -2
- package/out/sg/tools/fetch/acra.js.map +1 -1
- package/out/sk/adapters/inspire/adapter.d.ts +5 -5
- package/out/sk/adapters/inspire/adapter.d.ts.map +1 -1
- package/out/sk/adapters/inspire/adapter.js +18 -18
- package/out/sk/adapters/inspire/adapter.js.map +1 -1
- package/out/sk/tools/fetch/inspire.d.ts +11 -10
- package/out/sk/tools/fetch/inspire.d.ts.map +1 -1
- package/out/sk/tools/fetch/inspire.js +15 -14
- package/out/sk/tools/fetch/inspire.js.map +1 -1
- package/out/source-register/effective-manifest.js +3 -3
- package/out/source-register/effective-manifest.js.map +1 -1
- package/out/source-register/register.d.ts +2 -2
- package/out/source-register/register.d.ts.map +1 -1
- package/out/source-register/register.js +2 -2
- package/out/source-register/register.js.map +1 -1
- package/out/source-register/training-manifest.d.ts +1 -1
- package/out/source-register/types.d.ts +12 -13
- package/out/source-register/types.d.ts.map +1 -1
- package/out/source-register/types.js +2 -2
- package/out/source-register/types.js.map +1 -1
- package/out/subvenue/promotions.d.ts +1 -1
- package/out/subvenue/promotions.js +1 -1
- package/out/subvenue/table.d.ts +4 -4
- package/out/subvenue/table.js +3 -3
- package/out/surfaces/locale.d.ts.map +1 -1
- package/out/surfaces/locale.js +2 -0
- package/out/surfaces/locale.js.map +1 -1
- package/out/synthesizers/anchor-absorption.d.ts +2 -1
- package/out/synthesizers/anchor-absorption.d.ts.map +1 -1
- package/out/synthesizers/anchor-absorption.js.map +1 -1
- package/out/synthesizers/boundary-stress.d.ts +1 -1
- package/out/synthesizers/boundary-stress.d.ts.map +1 -1
- package/out/synthesizers/boundary-stress.js +20 -23
- package/out/synthesizers/boundary-stress.js.map +1 -1
- package/out/synthesizers/house-venue.d.ts +3 -2
- package/out/synthesizers/house-venue.d.ts.map +1 -1
- package/out/synthesizers/house-venue.js +24 -26
- package/out/synthesizers/house-venue.js.map +1 -1
- package/out/synthesizers/no-street.d.ts.map +1 -1
- package/out/synthesizers/no-street.js.map +1 -1
- package/out/synthesizers/po-box.d.ts +4 -2
- package/out/synthesizers/po-box.d.ts.map +1 -1
- package/out/synthesizers/po-box.js.map +1 -1
- package/out/synthesizers/tail.d.ts +36 -0
- package/out/synthesizers/tail.d.ts.map +1 -0
- package/out/synthesizers/tail.js +32 -0
- package/out/synthesizers/tail.js.map +1 -0
- package/out/synthesizers/utils.d.ts +2 -1
- package/out/synthesizers/utils.d.ts.map +1 -1
- package/out/synthesizers/utils.js +17 -1
- package/out/synthesizers/utils.js.map +1 -1
- package/out/test-kit.js +2 -2
- package/out/test-kit.js.map +1 -1
- package/out/tools/audit.d.ts +2 -1
- package/out/tools/audit.d.ts.map +1 -1
- package/out/tools/audit.js +4 -3
- package/out/tools/audit.js.map +1 -1
- package/out/tools/corpus-stats.js +1 -1
- package/out/tools/corpus-stats.js.map +1 -1
- package/out/tools/fetch/atom.d.ts +8 -8
- package/out/tools/fetch/atom.d.ts.map +1 -1
- package/out/tools/fetch/atom.js +7 -8
- package/out/tools/fetch/atom.js.map +1 -1
- package/out/tools/fetch/cordis.d.ts +4 -3
- package/out/tools/fetch/cordis.d.ts.map +1 -1
- package/out/tools/fetch/cordis.js +9 -7
- package/out/tools/fetch/cordis.js.map +1 -1
- package/out/tools/fetch/download/manifest.d.ts.map +1 -1
- package/out/tools/fetch/download/manifest.js +2 -1
- package/out/tools/fetch/download/manifest.js.map +1 -1
- package/out/tools/fetch/download/network.d.ts +4 -4
- package/out/tools/fetch/download/retry.js +4 -4
- package/out/tools/fetch/download/retry.js.map +1 -1
- package/out/tools/fetch/geonames/dump.d.ts +3 -2
- package/out/tools/fetch/geonames/dump.d.ts.map +1 -1
- package/out/tools/fetch/geonames/dump.js +2 -1
- package/out/tools/fetch/geonames/dump.js.map +1 -1
- package/out/tools/fetch/geonames/postal.d.ts +2 -2
- package/out/tools/fetch/gleif.d.ts +3 -2
- package/out/tools/fetch/gleif.d.ts.map +1 -1
- package/out/tools/fetch/gleif.js +6 -4
- package/out/tools/fetch/gleif.js.map +1 -1
- package/out/tools/fetch/header.d.ts +7 -5
- package/out/tools/fetch/header.d.ts.map +1 -1
- package/out/tools/fetch/header.js +8 -6
- package/out/tools/fetch/header.js.map +1 -1
- package/out/tools/fetch/inspire-addresses.d.ts +32 -27
- package/out/tools/fetch/inspire-addresses.d.ts.map +1 -1
- package/out/tools/fetch/inspire-addresses.js +25 -24
- package/out/tools/fetch/inspire-addresses.js.map +1 -1
- package/out/tools/fetch/openaddresses.js +1 -1
- package/out/tools/fetch/openaddresses.js.map +1 -1
- package/out/tools/fetch/vlaanderen-ad.d.ts +5 -5
- package/out/tools/fetch/vlaanderen-ad.d.ts.map +1 -1
- package/out/tools/fetch/vlaanderen-ad.js +16 -16
- package/out/tools/fetch/vlaanderen-ad.js.map +1 -1
- package/out/tools/fetch/wfs-harvest.d.ts +26 -16
- package/out/tools/fetch/wfs-harvest.d.ts.map +1 -1
- package/out/tools/fetch/wfs-harvest.js +21 -18
- package/out/tools/fetch/wfs-harvest.js.map +1 -1
- package/out/tools/fetch.d.ts +0 -41
- package/out/tools/fetch.d.ts.map +1 -1
- package/out/tools/fetch.js +0 -41
- package/out/tools/fetch.js.map +1 -1
- package/out/tools/golden/expand.d.ts +7 -7
- package/out/tools/golden/expand.js +1 -1
- package/out/tools/golden/expand.js.map +1 -1
- package/out/tools/golden/promote.d.ts +2 -2
- package/out/tools/golden/promote.d.ts.map +1 -1
- package/out/tools/golden/promote.js +9 -6
- package/out/tools/golden/promote.js.map +1 -1
- package/out/tools/golden/relabel-street/directory.d.ts +4 -4
- package/out/tools/golden/relabel-street/directory.d.ts.map +1 -1
- package/out/tools/golden/relabel-street/directory.js +3 -2
- package/out/tools/golden/relabel-street/directory.js.map +1 -1
- package/out/tools/golden/relabel-street/row.d.ts +4 -3
- package/out/tools/golden/relabel-street/row.d.ts.map +1 -1
- package/out/tools/golden/relabel-street/row.js +3 -3
- package/out/tools/golden/relabel-street/row.js.map +1 -1
- package/out/tools/ingest-csv.js +3 -3
- package/out/tools/ingest-csv.js.map +1 -1
- package/out/tools/jsonl-to-parquet.d.ts +1 -1
- package/out/tools/lint/recipe-output/vocab.d.ts +10 -5
- package/out/tools/lint/recipe-output/vocab.d.ts.map +1 -1
- package/out/tools/lint/recipe-output/vocab.js.map +1 -1
- package/out/tools/lint/recipe-output.d.ts +8 -8
- package/out/tools/lint/recipe-output.d.ts.map +1 -1
- package/out/tools/lint/recipe-output.js +17 -0
- package/out/tools/lint/recipe-output.js.map +1 -1
- package/out/tools/overlay/kryptonite.d.ts +2 -2
- package/out/tools/overlay/kryptonite.d.ts.map +1 -1
- package/out/tools/overlay/kryptonite.js +2 -1
- package/out/tools/overlay/kryptonite.js.map +1 -1
- package/out/tools/overlay/manifest.d.ts +2 -1
- package/out/tools/overlay/manifest.d.ts.map +1 -1
- package/out/tools/overlay/manifest.js +2 -1
- package/out/tools/overlay/manifest.js.map +1 -1
- package/out/tools/overlay/merge-source.d.ts +2 -1
- package/out/tools/overlay/merge-source.d.ts.map +1 -1
- package/out/tools/overlay/merge-source.js.map +1 -1
- package/out/tools/overlay/split-slice.d.ts +1 -1
- package/out/tools/overlay/split-slice.js +1 -1
- package/out/tools/overlay/split-slice.js.map +1 -1
- package/out/tools/overlay/translit.d.ts +4 -3
- package/out/tools/overlay/translit.d.ts.map +1 -1
- package/out/tools/overlay/translit.js +2 -1
- package/out/tools/overlay/translit.js.map +1 -1
- package/out/tools/overture-subvenue.d.ts +1 -1
- package/out/tools/overture-subvenue.d.ts.map +1 -1
- package/out/tools/postcode-triples.d.ts +1 -1
- package/out/tools/postcode-triples.d.ts.map +1 -1
- package/out/tools/postcode-triples.js +4 -3
- package/out/tools/postcode-triples.js.map +1 -1
- package/out/tools/source-register/build.d.ts +10 -8
- package/out/tools/source-register/build.d.ts.map +1 -1
- package/out/tools/source-register/build.js +10 -8
- package/out/tools/source-register/build.js.map +1 -1
- package/out/tools/sub/venue/lexicon.d.ts +2 -6
- package/out/tools/sub/venue/lexicon.d.ts.map +1 -1
- package/out/tools/sub/venue/lexicon.js +2 -6
- package/out/tools/sub/venue/lexicon.js.map +1 -1
- package/out/tw/tools/fetch/gcis.js +3 -3
- package/out/tw/tools/fetch/gcis.js.map +1 -1
- package/out/types.d.ts +4 -3
- package/out/types.d.ts.map +1 -1
- package/out/types.js.map +1 -1
- package/out/us/adapters/state/hi-schools/workbook.d.ts +1 -1
- package/out/us/adapters/state/hi-schools/workbook.d.ts.map +1 -1
- package/out/us/adapters/state/hi-schools/workbook.js.map +1 -1
- package/out/us/adapters/usgov/nad/adapter.js +6 -6
- package/out/us/adapters/usgov/nad/adapter.js.map +1 -1
- package/out/us/adapters/usgov/samhsa-treatment-locator/adapter.js +2 -2
- package/out/us/adapters/usgov/samhsa-treatment-locator/adapter.js.map +1 -1
- package/out/us/fips-state.d.ts +2 -2
- package/out/us/fips-state.d.ts.map +1 -1
- package/out/us/fips-state.js.map +1 -1
- package/out/us/synthesizers/intersection.d.ts.map +1 -0
- package/out/{synthesizers → us/synthesizers}/intersection.js +13 -9
- package/out/us/synthesizers/intersection.js.map +1 -0
- package/out/{synthesizers → us/synthesizers}/street.d.ts +3 -2
- package/out/us/synthesizers/street.d.ts.map +1 -0
- package/out/{synthesizers → us/synthesizers}/street.js +12 -12
- package/out/us/synthesizers/street.js.map +1 -0
- package/out/us/tools/fetch/imls-pls.js +1 -1
- package/out/us/tools/fetch/imls-pls.js.map +1 -1
- package/out/us/tools/fetch/nad.d.ts +6 -6
- package/out/us/tools/fetch/nad.js +1 -1
- package/out/us/tools/fetch/nad.js.map +1 -1
- package/out/us/tools/fetch/nppes.js +3 -3
- package/out/us/tools/fetch/nppes.js.map +1 -1
- package/out/us/tools/fetch/state/hi-schools.d.ts +2 -1
- package/out/us/tools/fetch/state/hi-schools.d.ts.map +1 -1
- package/out/us/tools/fetch/state/hi-schools.js +1 -1
- package/out/us/tools/fetch/state/hi-schools.js.map +1 -1
- package/out/us/tools/fetch/tiger-full.js +1 -1
- package/out/us/tools/fetch/tiger-full.js.map +1 -1
- package/out/utils/align.d.ts +5 -3
- package/out/utils/align.d.ts.map +1 -1
- package/out/utils/align.js +5 -5
- package/out/utils/align.js.map +1 -1
- package/out/utils/golden.js +2 -2
- package/out/utils/golden.js.map +1 -1
- package/out/utils/license.d.ts +3 -3
- package/out/utils/license.d.ts.map +1 -1
- package/out/utils/license.js.map +1 -1
- package/out/utils/split.d.ts +1 -1
- package/out/utils/split.d.ts.map +1 -1
- package/out/utils/split.js +18 -14
- package/out/utils/split.js.map +1 -1
- package/out/utils/tokenize.d.ts +3 -20
- package/out/utils/tokenize.d.ts.map +1 -1
- package/out/utils/tokenize.js.map +1 -1
- package/out/utils/wof-json.js +3 -3
- package/out/utils/wof-json.js.map +1 -1
- package/package.json +18 -27
- package/lib/tools.ts +0 -31
- package/out/synthesizers/intersection.d.ts.map +0 -1
- package/out/synthesizers/intersection.js.map +0 -1
- package/out/synthesizers/street.d.ts.map +0 -1
- package/out/synthesizers/street.js.map +0 -1
- package/out/tools.d.ts +0 -31
- package/out/tools.d.ts.map +0 -1
- package/out/tools.js +0 -31
- package/out/tools.js.map +0 -1
- /package/out/{synthesizers → us/synthesizers}/intersection.d.ts +0 -0
|
@@ -8,38 +8,36 @@
|
|
|
8
8
|
* The Open Contracting Partnership's Data Registry serves publication 117 at
|
|
9
9
|
* `https://data.open-contracting.org/en/publication/117/download?name=<edition>.jsonl.gz`, where an
|
|
10
10
|
* edition is a year, `undated`, or `full` for every year in one file. Each file is JSON Lines, one
|
|
11
|
-
* OCDS release per line
|
|
11
|
+
* OCDS release per line. That is the shape `#it/adapters/anac/adapter` reads.
|
|
12
12
|
*
|
|
13
13
|
* The acquisition belongs under a `tools/` root. `@mailwoman/corpus` is one of the
|
|
14
14
|
* `TOOLING_PACKAGES` in `dependency-cruiser.config.mjs`, which keep their tooling under `lib/`, so
|
|
15
15
|
* this module sits beside `#fi/tools/fetch/ryhti` rather than in an `sdk/` root the workspace does
|
|
16
16
|
* not declare.
|
|
17
17
|
*
|
|
18
|
-
* Three
|
|
18
|
+
* Three host behaviors decide what this module does:
|
|
19
19
|
*
|
|
20
20
|
* 1. **The host honors `Range`.** It answers `accept-ranges: bytes`, so an interrupted transfer
|
|
21
|
-
* resumes through {@linkcode resumableDownload} rather than restarting. That matters for
|
|
22
|
-
* `full` edition
|
|
23
|
-
* 2. **An edition's length and modification time are both served by `HEAD`.**
|
|
24
|
-
*
|
|
25
|
-
* Sep 2026 03:31:23 GMT` with `content-length` 3,963,957. The re-run check compares the pair
|
|
26
|
-
* against the manifest, which costs one small request per edition instead of the body.
|
|
21
|
+
* resumes through {@linkcode resumableDownload} rather than restarting. That matters most for
|
|
22
|
+
* the `full` edition.
|
|
23
|
+
* 2. **An edition's length and modification time are both served by `HEAD`.** The re-run check
|
|
24
|
+
* compares the pair against the manifest, so one small request per edition replaces the body.
|
|
27
25
|
* 3. **This module moves bytes and decodes none of them.** The compressed body is streamed to disk
|
|
28
26
|
* and then decompressed stream to stream, so no chunk boundary is interpreted as a character
|
|
29
|
-
* boundary. ANAC's data
|
|
30
|
-
* gzip chunk
|
|
27
|
+
* boundary. ANAC's data holds accented Italian place names, and a `chunk.toString("utf8")` per
|
|
28
|
+
* gzip chunk would write U+FFFD at every split multi-byte character.
|
|
31
29
|
*
|
|
32
|
-
* ANAC updates the publication monthly, on the second of the month
|
|
30
|
+
* ANAC updates the publication monthly, on the second of the month. The current year's
|
|
33
31
|
* edition is re-fetched on a `HEAD` disagreement rather than treated as final.
|
|
34
32
|
*
|
|
35
|
-
* The registry publishes this release under CC BY 4.0
|
|
33
|
+
* The registry publishes this release under CC BY 4.0. The address-source register elected it.
|
|
36
34
|
* The manifest records the license and the attribution, and the adapter records the license on every
|
|
37
35
|
* row.
|
|
38
36
|
*/
|
|
39
37
|
import { APIClient } from "@mailwoman/core/api";
|
|
40
38
|
import { gunzipChunks } from "@mailwoman/core/fs/compression";
|
|
41
39
|
import { ByteFormatter } from "@mailwoman/core/fs/formatters";
|
|
42
|
-
import { tryStat } from "@mailwoman/core/fs/readers";
|
|
40
|
+
import { tryStat } from "@mailwoman/core/fs/readers/stat";
|
|
43
41
|
import { openReadStream, openWriteStream, pipeline, Readable } from "@mailwoman/core/fs/streams";
|
|
44
42
|
import { makeDirectories, removePathIfPresent } from "@mailwoman/core/fs/writers";
|
|
45
43
|
import { sha256File } from "@mailwoman/core/hash";
|
|
@@ -50,10 +48,8 @@ import { loadCollectionFiles, resumableDownload, writeManifest } from "#tools/fe
|
|
|
50
48
|
* The publication the registry serves this release under.
|
|
51
49
|
*
|
|
52
50
|
* Italy has four publications on the registry and id 117 is ANAC's.
|
|
53
|
-
* Id 87 is OpenTender's Italian publication
|
|
54
|
-
*
|
|
55
|
-
* It runs to March 2024 and comes from a different body.
|
|
56
|
-
* Reading the country alone would take the wrong publication.
|
|
51
|
+
* Id 87 is OpenTender's Italian publication, so a reader that filters by country
|
|
52
|
+
* would take the wrong publication.
|
|
57
53
|
*/
|
|
58
54
|
export const IT_ANAC_PUBLICATION_ID = 117;
|
|
59
55
|
/**
|
|
@@ -63,13 +59,14 @@ export function anacEditionURL(edition) {
|
|
|
63
59
|
return `https://data.open-contracting.org/en/publication/${IT_ANAC_PUBLICATION_ID}/download?name=${edition}.jsonl.gz`;
|
|
64
60
|
}
|
|
65
61
|
/**
|
|
66
|
-
* The directory the editions are written under,
|
|
62
|
+
* The directory the editions are written under, the adapter's `inputPath`.
|
|
67
63
|
*/
|
|
68
64
|
const SLUG = IT_ANAC_ADAPTER_ID;
|
|
69
65
|
/**
|
|
70
66
|
* The edition fetched when a caller names none.
|
|
71
67
|
*
|
|
72
|
-
* `full` is every year in one file
|
|
68
|
+
* `full` is every year in one file.
|
|
69
|
+
* A corpus build reads that edition.
|
|
73
70
|
* A caller measuring one year names that year instead.
|
|
74
71
|
*/
|
|
75
72
|
export const IT_ANAC_DEFAULT_EDITIONS = ["full"];
|
|
@@ -88,7 +85,7 @@ export async function readANACEditionHead(client, edition) {
|
|
|
88
85
|
const length = headers?.["content-length"];
|
|
89
86
|
return {
|
|
90
87
|
lastModified: headers?.["last-modified"] ?? null,
|
|
91
|
-
contentLength: length
|
|
88
|
+
contentLength: length && /^\d+$/u.test(length) ? Number(length) : null,
|
|
92
89
|
contentType: headers?.["content-type"] ?? null,
|
|
93
90
|
};
|
|
94
91
|
}
|
|
@@ -116,9 +113,9 @@ export async function isANACEditionCurrent(recorded, head, path, verifyDigest) {
|
|
|
116
113
|
if (!recorded)
|
|
117
114
|
return false;
|
|
118
115
|
// A host that states neither cannot be compared against, so the edition is downloaded.
|
|
119
|
-
if (head.lastModified
|
|
116
|
+
if (!head.lastModified && head.contentLength === null)
|
|
120
117
|
return false;
|
|
121
|
-
if (head.lastModified
|
|
118
|
+
if (head.lastModified && head.lastModified !== recorded.last_modified)
|
|
122
119
|
return false;
|
|
123
120
|
if (head.contentLength !== null && head.contentLength !== recorded.compressed_bytes)
|
|
124
121
|
return false;
|
|
@@ -163,7 +160,7 @@ export async function downloadITANAC(client, options) {
|
|
|
163
160
|
report?.(` ${edition}: ${head.contentLength === null ? "no content-length" : `${ByteFormatter.formatIEC(head.contentLength)} compressed`}` +
|
|
164
161
|
`, last-modified ${head.lastModified ?? "absent"}`);
|
|
165
162
|
const current = !options.force &&
|
|
166
|
-
(await isANACEditionCurrent(recorded.get(filename), head, editionPath, options.verifyDigest ?? false));
|
|
163
|
+
(await isANACEditionCurrent(recorded.get(filename) ?? null, head, editionPath, options.verifyDigest ?? false));
|
|
167
164
|
if (current) {
|
|
168
165
|
report?.(` ✓ ${edition} already current — no download.`);
|
|
169
166
|
summary.skipped++;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anac.js","sourceRoot":"","sources":["../../../../lib/it/tools/fetch/anac.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version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AE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CACf;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../lib/jp/adapters/wof-admin/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAQH,OAAO,EAAoC,KAAK,YAAY,EAAE,KAAK,aAAa,EAAiB,MAAM,QAAQ,CAAA;AAO/G;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,iBAAiB,CAAA;AAErD,UAAU,QAAQ;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CACf;AAmCD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,QAAQ,EAAE,EACjB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B;IACF,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;CACtC,GAAG,IAAI,CAyBP;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,aAAa,CA4EvD;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAA4B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../lib/jp/adapters/wof-admin/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CA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oBAC5B,OAAO,EAAE,IAAI;oBACb,MAAM,EAAE,OAAO;oBACf,MAAM,EAAE,uBAAuB;oBAC/B,SAAS,EAAE,GAAG,uBAAuB,IAAI,IAAI,CAAC,EAAE,EAAE;oBAClD,cAAc,EAAE,EAAE;oBAClB,OAAO,EAAE,WAAW;iBACpB,CAAA;gBAED,OAAO,EAAE,CAAA;YACV,CAAC;QACF,CAAC;KACD,CAAA;AACF,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,EAAE,CAAA"}
|
|
@@ -37,10 +37,10 @@ const USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) mailwoman-corpus-fetch";
|
|
|
37
37
|
function nationwideUnicodeFileNumber(html) {
|
|
38
38
|
const start = html.indexOf('id="csv-unicode"');
|
|
39
39
|
if (start === -1)
|
|
40
|
-
return
|
|
40
|
+
return null;
|
|
41
41
|
const section = html.slice(start, html.indexOf('id="xml-unicode"', start));
|
|
42
42
|
const row = /全国[\s\S]{0,600}?doDownload\((\d+)\)/.exec(section);
|
|
43
|
-
return row?.[1];
|
|
43
|
+
return row?.[1] ?? null;
|
|
44
44
|
}
|
|
45
45
|
export async function fetchHoujinJP(options, report) {
|
|
46
46
|
const destDir = options.outRoot(SLUG);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"houjin.js","sourceRoot":"","sources":["../../../../lib/jp/tools/fetch/houjin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAEtH,MAAM,IAAI,GAAG,WAAW,CAAA;AACxB,MAAM,QAAQ,GAAG,sDAAsD,CAAA;AACvE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,aAAa,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;KACxG,CAAA;IAED,MAAM,aAAa,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAC,CAAA;IAEvD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAA;AAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permit-rows.js","sourceRoot":"","sources":["../../../../lib/kr/adapters/localdata/permit-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAwB,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAIhD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAA;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAA;AAE3B;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAA;AAElC;;;;GAIG;AACH,MAAM,QAAQ,GAAG,OAAO,CAAA;AAoBxB;;;;;;GAMG;AACH,SAAS,WAAW,CAAC,GAAuC,EAAE,GAAG,KAAwB;IACxF,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAA;QAEvB,IAAI,KAAK
|
|
1
|
+
{"version":3,"file":"permit-rows.js","sourceRoot":"","sources":["../../../../lib/kr/adapters/localdata/permit-rows.ts"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AAI,CAAC,EAAE,CAAA;gBAErC,MAAK;YACN,CAAC;QACF,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAClB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACnB,CAAC;IAED,OAAO;QACN,GAAG;QACH,MAAM;QACN,MAAM;QACN,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACpC,SAAS,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;QAChC,SAAS,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;QAChC,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC1B,CAAA;AACF,CAAC"}
|
|
@@ -25,7 +25,7 @@ export interface FetchJusoKROptions extends BaseFetchOptions {
|
|
|
25
25
|
/**
|
|
26
26
|
* The month to fetch as `yyyymm`.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
28
|
+
* @defaultValue the latest month the portal lists as present.
|
|
29
29
|
*/
|
|
30
30
|
month?: string;
|
|
31
31
|
}
|
|
@@ -29,7 +29,7 @@ export interface FetchLocaldataKROptions extends BaseFetchOptions {
|
|
|
29
29
|
/**
|
|
30
30
|
* Category slugs to fetch (the path segment of `/file/<slug>/info`).
|
|
31
31
|
*
|
|
32
|
-
*
|
|
32
|
+
* @defaultValue every category the portal lists.
|
|
33
33
|
*/
|
|
34
34
|
categories?: string[];
|
|
35
35
|
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* `--categories general_restaurants,rest_cafes`.
|
|
26
26
|
*/
|
|
27
27
|
import { BYTES_PER_KIB } from "@mailwoman/core/fs/formatters";
|
|
28
|
-
import { pathExists } from "@mailwoman/core/fs/readers";
|
|
28
|
+
import { pathExists } from "@mailwoman/core/fs/readers/stat";
|
|
29
29
|
import { makeDirectories } from "@mailwoman/core/fs/writers";
|
|
30
30
|
import { sha256File } from "@mailwoman/core/hash";
|
|
31
31
|
import { sleep } from "@mailwoman/core/utils/sleep";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localdata.js","sourceRoot":"","sources":["../../../../lib/kr/tools/fetch/localdata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"localdata.js","sourceRoot":"","sources":["../../../../lib/kr/tools/fetch/localdata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AAGnD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAEvH,MAAM,IAAI,GAAG,cAAc,CAAA;AAC3B,MAAM,MAAM,GAAG,8BAA8B,CAAA;AAC7C,MAAM,SAAS,GAAG,GAAG,MAAM,gCAAgC,CAAA;AAC3D,MAAM,OAAO,GAAG,4EAA4E,CAAA;AAC5F,MAAM,WAAW,GAAG,yDAAyD,CAAA;AAC7E,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAClC,MAAM,aAAa,GAAG,MAAM,CAAA;AAsB5B,MAAM,UAAU,GAAG,wDAAwD,CAAA;AAE3E;;;GAGG;AACH,KAAK,UAAU,WAAW;IACzB,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,SAAS,EAAE;QAClC,OAAO,EAAE,EAAE,YAA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CAAC,MAAM,EAAE,CAAC;SAC1B,CAAA;QAED,MAAM,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;IAC5C,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,CAAA;AACrE,CAAC"}
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
* `CC0-1.0` for `lu-property-building-1` on that statement, so the adapter records that license on
|
|
20
20
|
* every row.
|
|
21
21
|
*
|
|
22
|
-
* Luxembourg writes the house number before the street
|
|
22
|
+
* Luxembourg writes the house number before the street. `STREET_ORDERS` records that order as
|
|
23
23
|
* `number-first`, and `COMMA_JOINED_STREET_COUNTRIES` does not list it. `formatAddressRow` therefore
|
|
24
24
|
* renders `20 Kaesfurterstrooss, L-9755 Hupperdange`.
|
|
25
25
|
*
|
|
26
|
-
* ## The file
|
|
26
|
+
* ## The file holds one street name, in no single language
|
|
27
27
|
*
|
|
28
28
|
* Luxembourg is trilingual, and the CSV declares one street column.
|
|
29
29
|
* There is no `rue_fr`, `rue_de` or `rue_lb` to choose between, so the adapter emits `rue` as the
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* No column marks a row's language, so `locale` reads `und-LU`.
|
|
39
39
|
* `und` is BCP-47's undetermined language subtag, and the repository already stores it in
|
|
40
40
|
* `#recipes/bare/country` and `#tools/postcode-triples`.
|
|
41
|
-
*
|
|
41
|
+
* A `fr-LU` or `lb-LU` label would assert a language for a name the publisher did not
|
|
42
42
|
* tag.
|
|
43
43
|
*
|
|
44
44
|
* ## The number comes from `numero`, and never from the street line
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
* `rue` and `numero` are separate columns and the publisher never composes them, so neither
|
|
47
47
|
* `splitStreetLine` nor `composeHouseNumber` applies here: there is no line to split and no second
|
|
48
48
|
* column to join.
|
|
49
|
-
*
|
|
49
|
+
* A street split would also be wrong in both directions.
|
|
50
50
|
* 175 `rue` values end in a digit, among them `Route Nationale 1`, `Rue du 9 août 2019` and
|
|
51
51
|
* `Cité des Sacrifiés 1940-1945`.
|
|
52
|
-
* `numero` already
|
|
52
|
+
* `numero` already holds its own suffix as one token: 162,273 rows hold bare digits, 17,087 a
|
|
53
53
|
* trailing letter such as `12A`, 239 a hyphenated range such as `22-26`, eight the word `BIS` or
|
|
54
54
|
* `bis`, and 15 are empty.
|
|
55
55
|
*
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
* The file publishes no preformatted address line, so a rendered single line has no publisher-side
|
|
60
60
|
* counterpart to be asserted against.
|
|
61
61
|
*
|
|
62
|
-
* ##
|
|
62
|
+
* ## The file needs a quote-aware parser
|
|
63
63
|
*
|
|
64
64
|
* 22 rows RFC 4180-quote `rue` and double its interior quotes:
|
|
65
65
|
* `"Cité ""Pënscherbierg""";3;Wilwerwiltz;…`.
|
|
66
|
-
* Those rows
|
|
66
|
+
* Those rows hold no semicolon inside the quotes, so a naive split on `;` still yields 13 fields
|
|
67
67
|
* and passes a field-count check while handing the street to the corpus as
|
|
68
68
|
* `"Cité ""Pënscherbierg"""`.
|
|
69
69
|
* `CSVSpliterator` unescapes it to `Cité "Pënscherbierg"`.
|
|
70
|
-
* The same edition
|
|
70
|
+
* The same edition holds 0 fields with an embedded newline and 0 carriage returns in the whole
|
|
71
71
|
* file.
|
|
72
72
|
*
|
|
73
73
|
* The file opens with a UTF-8 byte-order mark, the three bytes `EF BB BF`, which the reader strips.
|
|
@@ -92,7 +92,7 @@ export declare const BD_ADRESSES_DEFAULT_LICENSE = "CC0-1.0";
|
|
|
92
92
|
* Every jurisdiction this adapter emits, checked against a caller's `--country`.
|
|
93
93
|
*
|
|
94
94
|
* BD-Adresses is one national file and Luxembourg has no dependency, so this is a single entry
|
|
95
|
-
* where `ban`, `matrikkelen` and `ryhti` each
|
|
95
|
+
* where `ban`, `matrikkelen` and `ryhti` each hold more than one.
|
|
96
96
|
*/
|
|
97
97
|
export declare const BD_ADRESSES_COUNTRIES: readonly string[];
|
|
98
98
|
/**
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
* `CC0-1.0` for `lu-property-building-1` on that statement, so the adapter records that license on
|
|
20
20
|
* every row.
|
|
21
21
|
*
|
|
22
|
-
* Luxembourg writes the house number before the street
|
|
22
|
+
* Luxembourg writes the house number before the street. `STREET_ORDERS` records that order as
|
|
23
23
|
* `number-first`, and `COMMA_JOINED_STREET_COUNTRIES` does not list it. `formatAddressRow` therefore
|
|
24
24
|
* renders `20 Kaesfurterstrooss, L-9755 Hupperdange`.
|
|
25
25
|
*
|
|
26
|
-
* ## The file
|
|
26
|
+
* ## The file holds one street name, in no single language
|
|
27
27
|
*
|
|
28
28
|
* Luxembourg is trilingual, and the CSV declares one street column.
|
|
29
29
|
* There is no `rue_fr`, `rue_de` or `rue_lb` to choose between, so the adapter emits `rue` as the
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* No column marks a row's language, so `locale` reads `und-LU`.
|
|
39
39
|
* `und` is BCP-47's undetermined language subtag, and the repository already stores it in
|
|
40
40
|
* `#recipes/bare/country` and `#tools/postcode-triples`.
|
|
41
|
-
*
|
|
41
|
+
* A `fr-LU` or `lb-LU` label would assert a language for a name the publisher did not
|
|
42
42
|
* tag.
|
|
43
43
|
*
|
|
44
44
|
* ## The number comes from `numero`, and never from the street line
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
* `rue` and `numero` are separate columns and the publisher never composes them, so neither
|
|
47
47
|
* `splitStreetLine` nor `composeHouseNumber` applies here: there is no line to split and no second
|
|
48
48
|
* column to join.
|
|
49
|
-
*
|
|
49
|
+
* A street split would also be wrong in both directions.
|
|
50
50
|
* 175 `rue` values end in a digit, among them `Route Nationale 1`, `Rue du 9 août 2019` and
|
|
51
51
|
* `Cité des Sacrifiés 1940-1945`.
|
|
52
|
-
* `numero` already
|
|
52
|
+
* `numero` already holds its own suffix as one token: 162,273 rows hold bare digits, 17,087 a
|
|
53
53
|
* trailing letter such as `12A`, 239 a hyphenated range such as `22-26`, eight the word `BIS` or
|
|
54
54
|
* `bis`, and 15 are empty.
|
|
55
55
|
*
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
* The file publishes no preformatted address line, so a rendered single line has no publisher-side
|
|
60
60
|
* counterpart to be asserted against.
|
|
61
61
|
*
|
|
62
|
-
* ##
|
|
62
|
+
* ## The file needs a quote-aware parser
|
|
63
63
|
*
|
|
64
64
|
* 22 rows RFC 4180-quote `rue` and double its interior quotes:
|
|
65
65
|
* `"Cité ""Pënscherbierg""";3;Wilwerwiltz;…`.
|
|
66
|
-
* Those rows
|
|
66
|
+
* Those rows hold no semicolon inside the quotes, so a naive split on `;` still yields 13 fields
|
|
67
67
|
* and passes a field-count check while handing the street to the corpus as
|
|
68
68
|
* `"Cité ""Pënscherbierg"""`.
|
|
69
69
|
* `CSVSpliterator` unescapes it to `Cité "Pënscherbierg"`.
|
|
70
|
-
* The same edition
|
|
70
|
+
* The same edition holds 0 fields with an embedded newline and 0 carriage returns in the whole
|
|
71
71
|
* file.
|
|
72
72
|
*
|
|
73
73
|
* The file opens with a UTF-8 byte-order mark, the three bytes `EF BB BF`, which the reader strips.
|
|
@@ -97,7 +97,7 @@ export const BD_ADRESSES_DEFAULT_LICENSE = "CC0-1.0";
|
|
|
97
97
|
* Every jurisdiction this adapter emits, checked against a caller's `--country`.
|
|
98
98
|
*
|
|
99
99
|
* BD-Adresses is one national file and Luxembourg has no dependency, so this is a single entry
|
|
100
|
-
* where `ban`, `matrikkelen` and `ryhti` each
|
|
100
|
+
* where `ban`, `matrikkelen` and `ryhti` each hold more than one.
|
|
101
101
|
*/
|
|
102
102
|
export const BD_ADRESSES_COUNTRIES = ["LU"];
|
|
103
103
|
/**
|
|
@@ -150,7 +150,7 @@ export function createBDAdressesAdapter() {
|
|
|
150
150
|
const components = {};
|
|
151
151
|
// 15 of the 179,622 rows publish an empty `numero`, among them `Al Géidgen`
|
|
152
152
|
// in Goedange and `Jaanshaff` in Walferdange.
|
|
153
|
-
//
|
|
153
|
+
// These describe a place, so they keep their street and postcode
|
|
154
154
|
// rather than being assigned a number.
|
|
155
155
|
if (house) {
|
|
156
156
|
components.house_number = house;
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
* this module sits beside `#fi/tools/fetch/ryhti` rather than in an `sdk/` root the workspace does
|
|
12
12
|
* not declare.
|
|
13
13
|
*
|
|
14
|
-
* `data.public.lu` states `cc-zero` for this dataset
|
|
15
|
-
* `CC0-1.0` under `lu-property-building-1`. CC0 asks for no attribution, and crediting the ACT
|
|
14
|
+
* `data.public.lu` states `cc-zero` for this dataset. The address-source register elects
|
|
15
|
+
* `CC0-1.0` for it under `lu-property-building-1`. CC0 asks for no attribution, and crediting the ACT
|
|
16
16
|
* remains good practice, so the manifest records the publisher beside the license.
|
|
17
17
|
*
|
|
18
18
|
* Four measured properties decide what this module does:
|
|
19
19
|
*
|
|
20
|
-
* 1. **The download URL
|
|
20
|
+
* 1. **The download URL holds the edition's own timestamp.** The dataset is republished weekly
|
|
21
21
|
* and the CSV resource's `url` reads
|
|
22
22
|
* `https://download.data.public.lu/resources/adresses-georeferencees-bd-adresses/20260928-023119/addresses.csv`,
|
|
23
23
|
* where the path segment is the publication time. A hardcoded URL therefore pins one edition and
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
* `https://data.public.lu/fr/datasets/r/<resource id>`, answers http 302 to the same dated path,
|
|
27
27
|
* and the dated path is the one downloaded, so the bytes and the checksum recorded beside them
|
|
28
28
|
* belong to one edition.
|
|
29
|
-
* 2. **The publisher states an md5 for the file.** The resource
|
|
29
|
+
* 2. **The publisher states an md5 for the file.** The resource records
|
|
30
30
|
* `checksum: {type: "md5", value: "…"}` and a `filesize`, measured as
|
|
31
31
|
* `c2df2f3c18b846144bb5d5dc57fc14ca` and 28,186,970 on the 2026-09-28 edition. The transfer is
|
|
32
32
|
* checked against both, so a truncated body is a reported failure rather than a short CSV that
|
|
33
33
|
* parses. A publisher that one day states a digest of another type is reported rather than
|
|
34
34
|
* skipped silently.
|
|
35
|
-
* 3. **The file opens with a UTF-8 byte-order mark**, `EF BB BF`. The portal's `filesize` counts it
|
|
36
|
-
*
|
|
35
|
+
* 3. **The file opens with a UTF-8 byte-order mark**, `EF BB BF`. The portal's `filesize` counts it.
|
|
36
|
+
* A reader that discards the mark therefore reports three bytes fewer than the portal does.
|
|
37
37
|
* The module writes the body to disk unaltered and checks the digest over the bytes as delivered.
|
|
38
38
|
* 4. **The re-run check is the stated checksum against the manifest.** The dataset API answer is
|
|
39
39
|
* roughly 15 KB, so comparing it costs one small request instead of 28 MB.
|
|
@@ -68,7 +68,8 @@ export declare const LU_BD_ADRESSES_DELIMITER = ";";
|
|
|
68
68
|
*/
|
|
69
69
|
export interface BDAdressesResource {
|
|
70
70
|
/**
|
|
71
|
-
* The dated download URL
|
|
71
|
+
* The dated download URL.
|
|
72
|
+
* It identifies one edition.
|
|
72
73
|
*/
|
|
73
74
|
url: string;
|
|
74
75
|
/**
|
|
@@ -92,7 +93,8 @@ export interface BDAdressesManifest extends SourceManifest {
|
|
|
92
93
|
attribution: string;
|
|
93
94
|
dataset_url: string;
|
|
94
95
|
/**
|
|
95
|
-
* The md5 the dataset record stated
|
|
96
|
+
* The md5 the dataset record stated.
|
|
97
|
+
* The downloaded bytes were checked against it.
|
|
96
98
|
*/
|
|
97
99
|
publisher_md5: string | null;
|
|
98
100
|
/**
|
|
@@ -120,7 +122,7 @@ interface DatasetRecord {
|
|
|
120
122
|
/**
|
|
121
123
|
* The CSV resource of a dataset record.
|
|
122
124
|
*
|
|
123
|
-
* @throws When the record
|
|
125
|
+
* @throws When the record holds no `csv` resource with a URL, because the publisher
|
|
124
126
|
* having moved the file is a reported failure rather than an empty transfer.
|
|
125
127
|
*/
|
|
126
128
|
export declare function readBDAdressesResource(record: DatasetRecord): BDAdressesResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bd-adresses.d.ts","sourceRoot":"","sources":["../../../../lib/l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AKG;AACH,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAChC,OAAO,EAAE,yBAAyB,GAChC,OAAO,CAAC,YAAY,CAAC,CAwHvB;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC/D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,WAAW,CAAA;CACpB;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACpC,OAAO,EAAE,sBAAsB,EAC/B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC,YAAY,CAAC,CAavB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAErE"}
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
* this module sits beside `#fi/tools/fetch/ryhti` rather than in an `sdk/` root the workspace does
|
|
12
12
|
* not declare.
|
|
13
13
|
*
|
|
14
|
-
* `data.public.lu` states `cc-zero` for this dataset
|
|
15
|
-
* `CC0-1.0` under `lu-property-building-1`. CC0 asks for no attribution, and crediting the ACT
|
|
14
|
+
* `data.public.lu` states `cc-zero` for this dataset. The address-source register elects
|
|
15
|
+
* `CC0-1.0` for it under `lu-property-building-1`. CC0 asks for no attribution, and crediting the ACT
|
|
16
16
|
* remains good practice, so the manifest records the publisher beside the license.
|
|
17
17
|
*
|
|
18
18
|
* Four measured properties decide what this module does:
|
|
19
19
|
*
|
|
20
|
-
* 1. **The download URL
|
|
20
|
+
* 1. **The download URL holds the edition's own timestamp.** The dataset is republished weekly
|
|
21
21
|
* and the CSV resource's `url` reads
|
|
22
22
|
* `https://download.data.public.lu/resources/adresses-georeferencees-bd-adresses/20260928-023119/addresses.csv`,
|
|
23
23
|
* where the path segment is the publication time. A hardcoded URL therefore pins one edition and
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
* `https://data.public.lu/fr/datasets/r/<resource id>`, answers http 302 to the same dated path,
|
|
27
27
|
* and the dated path is the one downloaded, so the bytes and the checksum recorded beside them
|
|
28
28
|
* belong to one edition.
|
|
29
|
-
* 2. **The publisher states an md5 for the file.** The resource
|
|
29
|
+
* 2. **The publisher states an md5 for the file.** The resource records
|
|
30
30
|
* `checksum: {type: "md5", value: "…"}` and a `filesize`, measured as
|
|
31
31
|
* `c2df2f3c18b846144bb5d5dc57fc14ca` and 28,186,970 on the 2026-09-28 edition. The transfer is
|
|
32
32
|
* checked against both, so a truncated body is a reported failure rather than a short CSV that
|
|
33
33
|
* parses. A publisher that one day states a digest of another type is reported rather than
|
|
34
34
|
* skipped silently.
|
|
35
|
-
* 3. **The file opens with a UTF-8 byte-order mark**, `EF BB BF`. The portal's `filesize` counts it
|
|
36
|
-
*
|
|
35
|
+
* 3. **The file opens with a UTF-8 byte-order mark**, `EF BB BF`. The portal's `filesize` counts it.
|
|
36
|
+
* A reader that discards the mark therefore reports three bytes fewer than the portal does.
|
|
37
37
|
* The module writes the body to disk unaltered and checks the digest over the bytes as delivered.
|
|
38
38
|
* 4. **The re-run check is the stated checksum against the manifest.** The dataset API answer is
|
|
39
39
|
* roughly 15 KB, so comparing it costs one small request instead of 28 MB.
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
*/
|
|
45
45
|
import { APIClient } from "@mailwoman/core/api";
|
|
46
46
|
import { ByteFormatter } from "@mailwoman/core/fs/formatters";
|
|
47
|
-
import { tryStat } from "@mailwoman/core/fs/readers";
|
|
47
|
+
import { tryStat } from "@mailwoman/core/fs/readers/stat";
|
|
48
48
|
import { makeDirectories, removePathIfPresent } from "@mailwoman/core/fs/writers";
|
|
49
49
|
import { md5File, sha256File } from "@mailwoman/core/hash";
|
|
50
50
|
import { PathBuilder } from "path-ts";
|
|
@@ -56,7 +56,7 @@ import { assertHeaderColumns, readDelimitedHeader } from "#tools/fetch/header";
|
|
|
56
56
|
*/
|
|
57
57
|
export const LU_BD_ADRESSES_DATASET_URL = "https://data.public.lu/api/1/datasets/adresses-georeferencees-bd-adresses/";
|
|
58
58
|
/**
|
|
59
|
-
* The directory the download is written under,
|
|
59
|
+
* The directory the download is written under, the adapter's `inputPath`'s parent.
|
|
60
60
|
*/
|
|
61
61
|
const SLUG = BD_ADRESSES_ADAPTER_ID;
|
|
62
62
|
/**
|
|
@@ -76,7 +76,7 @@ export const LU_BD_ADRESSES_DELIMITER = ";";
|
|
|
76
76
|
/**
|
|
77
77
|
* The CSV resource of a dataset record.
|
|
78
78
|
*
|
|
79
|
-
* @throws When the record
|
|
79
|
+
* @throws When the record holds no `csv` resource with a URL, because the publisher
|
|
80
80
|
* having moved the file is a reported failure rather than an empty transfer.
|
|
81
81
|
*/
|
|
82
82
|
export function readBDAdressesResource(record) {
|
|
@@ -127,7 +127,7 @@ export async function downloadBDAdresses(client, options) {
|
|
|
127
127
|
if (!options.force &&
|
|
128
128
|
present &&
|
|
129
129
|
existing &&
|
|
130
|
-
resource.md5
|
|
130
|
+
resource.md5 &&
|
|
131
131
|
existing.publisher_md5 === resource.md5 &&
|
|
132
132
|
existing.source_url === resource.url) {
|
|
133
133
|
report?.(` Already at md5 ${resource.md5}, so nothing was transferred`);
|
|
@@ -161,7 +161,7 @@ export async function downloadBDAdresses(client, options) {
|
|
|
161
161
|
return { fetched: 0, skipped: 0, failed: 1, failedCodes: [SLUG] };
|
|
162
162
|
}
|
|
163
163
|
const md5 = await md5File(csvPath);
|
|
164
|
-
if (resource.md5
|
|
164
|
+
if (resource.md5 && resource.md5 !== md5) {
|
|
165
165
|
report?.(` ✗ the dataset record states md5 ${resource.md5} and the bytes hash to ${md5}`);
|
|
166
166
|
await removePathIfPresent(csvPath);
|
|
167
167
|
return { fetched: 0, skipped: 0, failed: 1, failedCodes: [SLUG] };
|