@mailwoman/core 11.1.0 → 11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/api/arcgis.ts +194 -0
- package/lib/api/ckan.ts +1 -1
- package/lib/api/disk-storage.ts +2 -2
- package/lib/api/ogc.ts +1 -1
- package/lib/api/retry.ts +7 -2
- package/lib/api/test/transport.ts +1 -1
- package/lib/{binary-frame.ts → asset/binary-frame.ts} +1 -1
- package/lib/async/abort.ts +100 -0
- package/lib/{memoize.ts → async/memoize.ts} +2 -2
- package/lib/{promises.ts → async/promises.ts} +1 -1
- package/lib/cloudflare/tokens.ts +1 -1
- package/lib/cloudflare/wrangler.ts +3 -3
- package/lib/crypto/digest.ts +1 -1
- package/lib/crypto/ed25519.ts +8 -0
- package/lib/crypto/node.ts +1 -1
- package/lib/data-root.ts +16 -3
- package/lib/decoder/containment.ts +4 -1
- package/lib/decoder/serialize/outline.ts +50 -0
- package/lib/decoder/types.ts +9 -1
- package/lib/decoder.ts +1 -0
- package/lib/env/schema.ts +5 -0
- package/lib/fs/deflate64.ts +1 -1
- package/lib/fs/lock.ts +183 -25
- package/lib/fs/readers.ts +1 -1
- package/lib/fs/writers.ts +1 -1
- package/lib/geocode/result.ts +50 -6
- package/lib/html/text.ts +2 -2
- package/lib/index.ts +0 -1
- package/lib/layers/artifact.ts +2 -2
- package/lib/layers/coverage.ts +1 -1
- package/lib/layers/manifest.ts +94 -2
- package/lib/layers/provenance.ts +246 -0
- package/lib/layers/publication.ts +4 -3
- package/lib/layers/selection.ts +2 -2
- package/lib/license/branch.ts +66 -0
- package/lib/license/configured.ts +4 -2
- package/lib/license/declaration.ts +1 -1
- package/lib/license/key/file.ts +1 -1
- package/lib/license/key.ts +148 -201
- package/lib/license/provenance.ts +193 -0
- package/lib/license/register.ts +7 -78
- package/lib/license/stamp.ts +8 -2
- package/lib/license/text-url.ts +55 -0
- package/lib/license/training.ts +67 -0
- package/lib/license.ts +7 -6
- package/lib/locale/registry.ts +1 -1
- package/lib/locale/zh-cn-units.ts +1 -1
- package/lib/module/workspace.ts +1 -1
- package/lib/{routing.ts → network/routing.ts} +1 -1
- package/lib/pipeline/result.ts +7 -27
- package/lib/pipeline/runtime-pipeline.ts +131 -152
- package/lib/pipeline/stage.ts +290 -0
- package/lib/pipeline/types.ts +154 -20
- package/lib/pipeline.ts +14 -2
- package/lib/{git.ts → repo/git.ts} +21 -1
- package/lib/{release-config.ts → repo/release-config.ts} +8 -0
- package/lib/{scope-config.ts → repo/scope-config.ts} +8 -36
- package/lib/{spdx-header.ts → repo/spdx-header.ts} +8 -0
- package/lib/{workspaces.ts → repo/workspaces.ts} +1 -1
- package/lib/resolver/lookup-types.ts +1 -1
- package/lib/resolver/region-database-provider.ts +33 -0
- package/lib/resolver/synthetic-id-ranges.ts +76 -4
- package/lib/resolver/types.ts +231 -6
- package/lib/resolver.ts +14 -1
- package/lib/state-machine.ts +1 -1
- package/lib/strings/python-json.ts +15 -5
- package/lib/tokenization/Span.ts +12 -0
- package/lib/utils/chunk-process.ts +2 -2
- package/lib/utils/geodatabase-archive.ts +1 -1
- package/lib/utils/time.ts +190 -6
- package/lib/utils.ts +4 -4
- package/out/api/arcgis.d.ts +76 -0
- package/out/api/arcgis.d.ts.map +1 -1
- package/out/api/arcgis.js +123 -0
- package/out/api/arcgis.js.map +1 -1
- package/out/api/ckan.js +1 -1
- package/out/api/ckan.js.map +1 -1
- package/out/api/disk-storage.d.ts.map +1 -1
- package/out/api/disk-storage.js +2 -2
- package/out/api/disk-storage.js.map +1 -1
- package/out/api/ogc.js +1 -1
- package/out/api/ogc.js.map +1 -1
- package/out/api/retry.d.ts.map +1 -1
- package/out/api/retry.js +6 -2
- package/out/api/retry.js.map +1 -1
- package/out/api/test/transport.js +1 -1
- package/out/api/test/transport.js.map +1 -1
- package/out/asset/binary-frame.d.ts.map +1 -0
- package/out/{binary-frame.js → asset/binary-frame.js} +1 -1
- package/out/asset/binary-frame.js.map +1 -0
- package/out/asset/load-ledger.d.ts.map +1 -0
- package/out/asset/load-ledger.js.map +1 -0
- package/out/asset/overture-pins.d.ts.map +1 -0
- package/out/asset/overture-pins.js.map +1 -0
- package/out/asset/postcode-prefix-files.d.ts.map +1 -0
- package/out/asset/postcode-prefix-files.js.map +1 -0
- package/out/async/abort.d.ts +57 -0
- package/out/async/abort.d.ts.map +1 -0
- package/out/async/abort.js +89 -0
- package/out/async/abort.js.map +1 -0
- package/out/async/memoize.d.ts.map +1 -0
- package/out/{memoize.js → async/memoize.js} +2 -2
- package/out/async/memoize.js.map +1 -0
- package/out/{promises.d.ts → async/promises.d.ts} +1 -1
- package/out/async/promises.d.ts.map +1 -0
- package/out/{promises.js → async/promises.js} +1 -1
- package/out/async/promises.js.map +1 -0
- package/out/cloudflare/tokens.js +1 -1
- package/out/cloudflare/tokens.js.map +1 -1
- package/out/cloudflare/wrangler.js +3 -3
- package/out/cloudflare/wrangler.js.map +1 -1
- package/out/crypto/digest.d.ts +1 -1
- package/out/crypto/digest.js +1 -1
- package/out/crypto/ed25519.d.ts +7 -0
- package/out/crypto/ed25519.d.ts.map +1 -1
- package/out/crypto/ed25519.js +7 -0
- package/out/crypto/ed25519.js.map +1 -1
- package/out/crypto/hash.d.ts.map +1 -0
- package/out/crypto/hash.js.map +1 -0
- package/out/crypto/node.js +1 -1
- package/out/crypto/node.js.map +1 -1
- package/out/data-root.d.ts +11 -3
- package/out/data-root.d.ts.map +1 -1
- package/out/data-root.js +14 -3
- package/out/data-root.js.map +1 -1
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +1 -1
- package/out/decoder/containment.js.map +1 -1
- package/out/decoder/serialize/outline.d.ts +25 -0
- package/out/decoder/serialize/outline.d.ts.map +1 -0
- package/out/decoder/serialize/outline.js +37 -0
- package/out/decoder/serialize/outline.js.map +1 -0
- package/out/decoder/types.d.ts +8 -0
- 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.d.ts +1 -0
- package/out/decoder.d.ts.map +1 -1
- package/out/decoder.js +1 -0
- package/out/decoder.js.map +1 -1
- package/out/env/schema.d.ts +1 -0
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +4 -0
- package/out/env/schema.js.map +1 -1
- package/out/env.d.ts +1 -0
- package/out/env.d.ts.map +1 -1
- package/out/fs/deflate64.js +1 -1
- package/out/fs/deflate64.js.map +1 -1
- package/out/fs/lock.d.ts +73 -4
- package/out/fs/lock.d.ts.map +1 -1
- package/out/fs/lock.js +96 -19
- package/out/fs/lock.js.map +1 -1
- package/out/fs/readers.js +1 -1
- package/out/fs/readers.js.map +1 -1
- package/out/fs/writers.d.ts +1 -1
- package/out/fs/writers.d.ts.map +1 -1
- package/out/fs/writers.js +1 -1
- package/out/fs/writers.js.map +1 -1
- package/out/geocode/result.d.ts +25 -1
- package/out/geocode/result.d.ts.map +1 -1
- package/out/geocode/result.js +49 -6
- package/out/geocode/result.js.map +1 -1
- package/out/html/text.js +2 -2
- package/out/html/trust-policies.d.ts.map +1 -0
- package/out/html/trust-policies.js.map +1 -0
- package/out/index.d.ts +0 -1
- package/out/index.d.ts.map +1 -1
- package/out/index.js +0 -1
- package/out/index.js.map +1 -1
- package/out/layers/artifact.js +2 -2
- package/out/layers/artifact.js.map +1 -1
- package/out/layers/coverage.d.ts.map +1 -1
- package/out/layers/coverage.js +1 -1
- package/out/layers/coverage.js.map +1 -1
- package/out/layers/manifest.d.ts +53 -0
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +68 -2
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/provenance.d.ts +127 -0
- package/out/layers/provenance.d.ts.map +1 -0
- package/out/layers/provenance.js +122 -0
- package/out/layers/provenance.js.map +1 -0
- package/out/layers/publication.d.ts.map +1 -1
- package/out/layers/publication.js +3 -3
- package/out/layers/publication.js.map +1 -1
- package/out/layers/selection.d.ts.map +1 -1
- package/out/layers/selection.js +2 -2
- package/out/layers/selection.js.map +1 -1
- package/out/license/branch.d.ts +33 -0
- package/out/license/branch.d.ts.map +1 -0
- package/out/license/branch.js +52 -0
- package/out/license/branch.js.map +1 -0
- package/out/license/configured.d.ts +1 -1
- package/out/license/configured.d.ts.map +1 -1
- package/out/license/configured.js +1 -9
- package/out/license/configured.js.map +1 -1
- package/out/license/declaration.d.ts +1 -1
- package/out/license/declaration.d.ts.map +1 -1
- package/out/license/key/file.js +1 -1
- package/out/license/key/file.js.map +1 -1
- package/out/license/key.d.ts +27 -115
- package/out/license/key.d.ts.map +1 -1
- package/out/license/key.js +98 -164
- package/out/license/key.js.map +1 -1
- package/out/license/provenance.d.ts +47 -0
- package/out/license/provenance.d.ts.map +1 -0
- package/out/license/provenance.js +134 -0
- package/out/license/provenance.js.map +1 -0
- package/out/license/register.d.ts +6 -47
- package/out/license/register.d.ts.map +1 -1
- package/out/license/register.js +7 -58
- package/out/license/register.js.map +1 -1
- package/out/license/stamp.d.ts +7 -1
- package/out/license/stamp.d.ts.map +1 -1
- package/out/license/stamp.js +2 -2
- package/out/license/stamp.js.map +1 -1
- package/out/license/text-url.d.ts +9 -0
- package/out/license/text-url.d.ts.map +1 -0
- package/out/license/text-url.js +49 -0
- package/out/license/text-url.js.map +1 -0
- package/out/license/training.d.ts +29 -0
- package/out/license/training.d.ts.map +1 -0
- package/out/license/training.js +52 -0
- package/out/license/training.js.map +1 -0
- package/out/license.d.ts +7 -6
- package/out/license.d.ts.map +1 -1
- package/out/license.js +7 -6
- package/out/license.js.map +1 -1
- package/out/locale/registry.d.ts.map +1 -1
- package/out/locale/registry.js +1 -1
- package/out/locale/registry.js.map +1 -1
- package/out/locale/zh-cn-units.js +1 -1
- package/out/locale/zh-cn-units.js.map +1 -1
- package/out/math/numeric.d.ts.map +1 -0
- package/out/math/numeric.js.map +1 -0
- package/out/math/random.d.ts.map +1 -0
- package/out/math/random.js.map +1 -0
- package/out/math/stats.d.ts.map +1 -0
- package/out/math/stats.js.map +1 -0
- package/out/module/workspace.js +1 -1
- package/out/module/workspace.js.map +1 -1
- package/out/network/routing.d.ts.map +1 -0
- package/out/{routing.js → network/routing.js} +1 -1
- package/out/network/routing.js.map +1 -0
- package/out/pipeline/result.d.ts +7 -25
- package/out/pipeline/result.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +8 -4
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +56 -109
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/stage.d.ts +180 -0
- package/out/pipeline/stage.d.ts.map +1 -0
- package/out/pipeline/stage.js +130 -0
- package/out/pipeline/stage.js.map +1 -0
- package/out/pipeline/types.d.ts +146 -20
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +24 -8
- package/out/pipeline/types.js.map +1 -1
- package/out/pipeline.d.ts +5 -3
- package/out/pipeline.d.ts.map +1 -1
- package/out/pipeline.js +2 -1
- package/out/pipeline.js.map +1 -1
- package/out/{git.d.ts → repo/git.d.ts} +10 -1
- package/out/repo/git.d.ts.map +1 -0
- package/out/{git.js → repo/git.js} +14 -1
- package/out/repo/git.js.map +1 -0
- package/out/{release-config.d.ts → repo/release-config.d.ts} +8 -0
- package/out/repo/release-config.d.ts.map +1 -0
- package/out/repo/release-config.js.map +1 -0
- package/out/{scope-config.d.ts → repo/scope-config.d.ts} +8 -23
- package/out/repo/scope-config.d.ts.map +1 -0
- package/out/{scope-config.js → repo/scope-config.js} +0 -17
- package/out/repo/scope-config.js.map +1 -0
- package/out/repo/spdx-header.d.ts.map +1 -0
- package/out/{spdx-header.js → repo/spdx-header.js} +7 -0
- package/out/repo/spdx-header.js.map +1 -0
- package/out/repo/vale.d.ts.map +1 -0
- package/out/repo/vale.js.map +1 -0
- package/out/repo/workspaces.d.ts.map +1 -0
- package/out/{workspaces.js → repo/workspaces.js} +1 -1
- package/out/repo/workspaces.js.map +1 -0
- package/out/resolver/lookup-types.d.ts +1 -1
- package/out/resolver/region-database-provider.d.ts +30 -0
- package/out/resolver/region-database-provider.d.ts.map +1 -1
- package/out/resolver/synthetic-id-ranges.d.ts +46 -4
- package/out/resolver/synthetic-id-ranges.d.ts.map +1 -1
- package/out/resolver/synthetic-id-ranges.js +66 -4
- package/out/resolver/synthetic-id-ranges.js.map +1 -1
- package/out/resolver/types.d.ts +201 -7
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +57 -0
- package/out/resolver/types.js.map +1 -1
- package/out/resolver.d.ts +3 -3
- package/out/resolver.d.ts.map +1 -1
- package/out/resolver.js +1 -1
- package/out/resolver.js.map +1 -1
- package/out/scripting/process.d.ts.map +1 -0
- package/out/scripting/process.js.map +1 -0
- package/out/scripting/workers.d.ts.map +1 -0
- package/out/scripting/workers.js.map +1 -0
- package/out/state-machine.d.ts +1 -1
- package/out/strings/python-json.d.ts +12 -1
- package/out/strings/python-json.d.ts.map +1 -1
- package/out/strings/python-json.js +9 -4
- package/out/strings/python-json.js.map +1 -1
- package/out/tokenization/Span.d.ts +11 -0
- package/out/tokenization/Span.d.ts.map +1 -1
- package/out/tokenization/Span.js.map +1 -1
- package/out/tools/build-deflate64-wasm.run.js +2 -2
- package/out/tools/build-deflate64-wasm.run.js.map +1 -1
- package/out/tools/coarse-placer/build/dataset.js +1 -1
- package/out/tools/coarse-placer/build/dataset.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.js +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/latin.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/latin.js +5 -1
- package/out/tools/coarse-placer/build/outlier/latin.js.map +1 -1
- package/out/tools/coarse-placer/country-sets.d.ts +2 -2
- package/out/tools/coarse-placer/country-sets.js +2 -2
- package/out/tools/coarse-placer/outlier-rows.js +2 -2
- package/out/tools/coarse-placer/outlier-rows.js.map +1 -1
- package/out/tools/coarse-placer/train.js +1 -1
- package/out/tools/coarse-placer/train.js.map +1 -1
- package/out/tools/generate-language-types.js +2 -2
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/tools/license/product-fixtures.run.d.ts +2 -0
- package/out/tools/license/product-fixtures.run.d.ts.map +1 -0
- package/out/tools/license/product-fixtures.run.js +350 -0
- package/out/tools/license/product-fixtures.run.js.map +1 -0
- package/out/utils/chunk-process.js +2 -2
- package/out/utils/chunk-process.js.map +1 -1
- package/out/utils/geodatabase-archive.js +1 -1
- package/out/utils/geodatabase-archive.js.map +1 -1
- package/out/utils/time.d.ts +46 -3
- package/out/utils/time.d.ts.map +1 -1
- package/out/utils/time.js +139 -6
- package/out/utils/time.js.map +1 -1
- package/out/utils.d.ts +4 -4
- package/out/utils.d.ts.map +1 -1
- package/out/utils.js +4 -4
- package/out/utils.js.map +1 -1
- package/out/values/identical.d.ts.map +1 -0
- package/out/values/identical.js.map +1 -0
- package/out/values/json.d.ts.map +1 -0
- package/out/values/json.js.map +1 -0
- package/out/values/objects.d.ts.map +1 -0
- package/out/values/objects.js.map +1 -0
- package/package.json +278 -243
- package/tools/build-deflate64-wasm.run.ts +2 -2
- package/tools/coarse-placer/build/dataset.ts +1 -1
- package/tools/coarse-placer/build/outlier/exposure.ts +1 -1
- package/tools/coarse-placer/build/outlier/latin.ts +5 -1
- package/tools/coarse-placer/country-sets.ts +2 -2
- package/tools/coarse-placer/outlier-rows.ts +2 -2
- package/tools/coarse-placer/train.ts +1 -1
- package/tools/generate-language-types.ts +2 -2
- package/tools/license/product-fixtures.run.ts +449 -0
- package/lib/collections.ts +0 -5
- package/lib/license/decision.ts +0 -329
- package/lib/license/obligations.ts +0 -256
- package/lib/license/record.ts +0 -277
- package/lib/scripting/ingest-chunk-script.ts +0 -87
- package/out/binary-frame.d.ts.map +0 -1
- package/out/binary-frame.js.map +0 -1
- package/out/collections.d.ts +0 -2
- package/out/collections.d.ts.map +0 -1
- package/out/collections.js +0 -5
- package/out/collections.js.map +0 -1
- package/out/git.d.ts.map +0 -1
- package/out/git.js.map +0 -1
- package/out/hash.d.ts.map +0 -1
- package/out/hash.js.map +0 -1
- package/out/identical.d.ts.map +0 -1
- package/out/identical.js.map +0 -1
- package/out/json.d.ts.map +0 -1
- package/out/json.js.map +0 -1
- package/out/license/decision.d.ts +0 -179
- package/out/license/decision.d.ts.map +0 -1
- package/out/license/decision.js +0 -169
- package/out/license/decision.js.map +0 -1
- package/out/license/obligations.d.ts +0 -102
- package/out/license/obligations.d.ts.map +0 -1
- package/out/license/obligations.js +0 -188
- package/out/license/obligations.js.map +0 -1
- package/out/license/record.d.ts +0 -136
- package/out/license/record.d.ts.map +0 -1
- package/out/license/record.js +0 -222
- package/out/license/record.js.map +0 -1
- package/out/load-ledger.d.ts.map +0 -1
- package/out/load-ledger.js.map +0 -1
- package/out/memoize.d.ts.map +0 -1
- package/out/memoize.js.map +0 -1
- package/out/numeric.d.ts.map +0 -1
- package/out/numeric.js.map +0 -1
- package/out/objects.d.ts.map +0 -1
- package/out/objects.js.map +0 -1
- package/out/overture-pins.d.ts.map +0 -1
- package/out/overture-pins.js.map +0 -1
- package/out/postcode-prefix-files.d.ts.map +0 -1
- package/out/postcode-prefix-files.js.map +0 -1
- package/out/process.d.ts.map +0 -1
- package/out/process.js.map +0 -1
- package/out/promises.d.ts.map +0 -1
- package/out/promises.js.map +0 -1
- package/out/random.d.ts.map +0 -1
- package/out/random.js.map +0 -1
- package/out/release-config.d.ts.map +0 -1
- package/out/release-config.js.map +0 -1
- package/out/routing.d.ts.map +0 -1
- package/out/routing.js.map +0 -1
- package/out/scope-config.d.ts.map +0 -1
- package/out/scope-config.js.map +0 -1
- package/out/scripting/ingest-chunk-script.d.ts +0 -58
- package/out/scripting/ingest-chunk-script.d.ts.map +0 -1
- package/out/scripting/ingest-chunk-script.js +0 -47
- package/out/scripting/ingest-chunk-script.js.map +0 -1
- package/out/spdx-header.d.ts.map +0 -1
- package/out/spdx-header.js.map +0 -1
- package/out/stats.d.ts.map +0 -1
- package/out/stats.js.map +0 -1
- package/out/trust-policies.d.ts.map +0 -1
- package/out/trust-policies.js.map +0 -1
- package/out/vale.d.ts.map +0 -1
- package/out/vale.js.map +0 -1
- package/out/workers.d.ts.map +0 -1
- package/out/workers.js.map +0 -1
- package/out/workspaces.d.ts.map +0 -1
- package/out/workspaces.js.map +0 -1
- /package/lib/{load-ledger.ts → asset/load-ledger.ts} +0 -0
- /package/lib/{overture-pins.ts → asset/overture-pins.ts} +0 -0
- /package/lib/{postcode-prefix-files.ts → asset/postcode-prefix-files.ts} +0 -0
- /package/lib/{hash.ts → crypto/hash.ts} +0 -0
- /package/lib/{trust-policies.ts → html/trust-policies.ts} +0 -0
- /package/lib/{numeric.ts → math/numeric.ts} +0 -0
- /package/lib/{random.ts → math/random.ts} +0 -0
- /package/lib/{stats.ts → math/stats.ts} +0 -0
- /package/lib/{vale.ts → repo/vale.ts} +0 -0
- /package/lib/{process.ts → scripting/process.ts} +0 -0
- /package/lib/{workers.ts → scripting/workers.ts} +0 -0
- /package/lib/{identical.ts → values/identical.ts} +0 -0
- /package/lib/{json.ts → values/json.ts} +0 -0
- /package/lib/{objects.ts → values/objects.ts} +0 -0
- /package/out/{binary-frame.d.ts → asset/binary-frame.d.ts} +0 -0
- /package/out/{load-ledger.d.ts → asset/load-ledger.d.ts} +0 -0
- /package/out/{load-ledger.js → asset/load-ledger.js} +0 -0
- /package/out/{overture-pins.d.ts → asset/overture-pins.d.ts} +0 -0
- /package/out/{overture-pins.js → asset/overture-pins.js} +0 -0
- /package/out/{postcode-prefix-files.d.ts → asset/postcode-prefix-files.d.ts} +0 -0
- /package/out/{postcode-prefix-files.js → asset/postcode-prefix-files.js} +0 -0
- /package/out/{memoize.d.ts → async/memoize.d.ts} +0 -0
- /package/out/{hash.d.ts → crypto/hash.d.ts} +0 -0
- /package/out/{hash.js → crypto/hash.js} +0 -0
- /package/out/{trust-policies.d.ts → html/trust-policies.d.ts} +0 -0
- /package/out/{trust-policies.js → html/trust-policies.js} +0 -0
- /package/out/{numeric.d.ts → math/numeric.d.ts} +0 -0
- /package/out/{numeric.js → math/numeric.js} +0 -0
- /package/out/{random.d.ts → math/random.d.ts} +0 -0
- /package/out/{random.js → math/random.js} +0 -0
- /package/out/{stats.d.ts → math/stats.d.ts} +0 -0
- /package/out/{stats.js → math/stats.js} +0 -0
- /package/out/{routing.d.ts → network/routing.d.ts} +0 -0
- /package/out/{release-config.js → repo/release-config.js} +0 -0
- /package/out/{spdx-header.d.ts → repo/spdx-header.d.ts} +0 -0
- /package/out/{vale.d.ts → repo/vale.d.ts} +0 -0
- /package/out/{vale.js → repo/vale.js} +0 -0
- /package/out/{workspaces.d.ts → repo/workspaces.d.ts} +0 -0
- /package/out/{process.d.ts → scripting/process.d.ts} +0 -0
- /package/out/{process.js → scripting/process.js} +0 -0
- /package/out/{workers.d.ts → scripting/workers.d.ts} +0 -0
- /package/out/{workers.js → scripting/workers.js} +0 -0
- /package/out/{identical.d.ts → values/identical.d.ts} +0 -0
- /package/out/{identical.js → values/identical.js} +0 -0
- /package/out/{json.d.ts → values/json.d.ts} +0 -0
- /package/out/{json.js → values/json.js} +0 -0
- /package/out/{objects.d.ts → values/objects.d.ts} +0 -0
- /package/out/{objects.js → values/objects.js} +0 -0
|
@@ -7,21 +7,29 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { ComponentTag } from "@mailwoman/codex/component"
|
|
10
|
-
import type { NormalizedInputLite } from "@mailwoman/query-shape"
|
|
11
10
|
|
|
12
11
|
import { isBareTreeOf } from "#decoder/tree/shape"
|
|
13
12
|
import type { AddressNode, AddressTree } from "#decoder/types"
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
13
|
+
import type { PipelineResult } from "#pipeline/result"
|
|
14
|
+
import {
|
|
15
|
+
createRequestContext,
|
|
16
|
+
type PipelineFaultStage,
|
|
17
|
+
type PipelineStage,
|
|
18
|
+
type RequestContext,
|
|
19
|
+
runStage,
|
|
20
|
+
StageID,
|
|
21
|
+
type StageRecord,
|
|
22
|
+
} from "#pipeline/stage"
|
|
16
23
|
import {
|
|
17
24
|
DEFAULT_CASE_NORMALIZATION,
|
|
18
25
|
DEFAULT_PLACER_COUNTRY_USE,
|
|
19
|
-
PipelineFaultStage,
|
|
20
26
|
WORD_CONSISTENCY_SHIP_DEFAULT,
|
|
21
27
|
deriveInputMode,
|
|
28
|
+
isPostcodeFormat,
|
|
22
29
|
} from "#pipeline/types"
|
|
23
30
|
import type {
|
|
24
31
|
AddressClassifier,
|
|
32
|
+
NormalizedInputLite,
|
|
25
33
|
CaseNormalization,
|
|
26
34
|
AnchorRegionLookupLike,
|
|
27
35
|
FSTMatcherLike,
|
|
@@ -49,13 +57,6 @@ const SHORT_CIRCUIT_MIN_CONFIDENCE = 0.95
|
|
|
49
57
|
*/
|
|
50
58
|
const SHORT_CIRCUIT_MAX_LOCALITY_LENGTH = 30
|
|
51
59
|
|
|
52
|
-
/**
|
|
53
|
-
* Reports whether a query-shape format name denotes a postcode.
|
|
54
|
-
*/
|
|
55
|
-
function isPostcodeFormat(format: string): boolean {
|
|
56
|
-
return format === "us_zip" || format === "us_zip4" || format.endsWith("_postcode")
|
|
57
|
-
}
|
|
58
|
-
|
|
59
60
|
/**
|
|
60
61
|
* The default resolver weight for the coarse-placer country prior.
|
|
61
62
|
*/
|
|
@@ -269,35 +270,49 @@ function buildFastPathTree(text: string, kind: QueryKindResult, shape: QueryShap
|
|
|
269
270
|
/**
|
|
270
271
|
* Runs the configured stages in order and returns the decoded tree with per-stage timings and faults.
|
|
271
272
|
*
|
|
273
|
+
* Each stage runs through {@linkcode runStage}, which times it and checks the abort signal before it.
|
|
272
274
|
* A failing classifier, grouper or resolver records a fault and the run continues.
|
|
273
|
-
*
|
|
275
|
+
*
|
|
276
|
+
* A caller that runs stages of its own around the parse passes its request's `context`.
|
|
277
|
+
* The result's timing and faults are then that context's, and the context's signal cancels the run.
|
|
278
|
+
* Without one, the run builds a context from `opts.signal`.
|
|
274
279
|
*/
|
|
275
|
-
export async function runPipeline(
|
|
280
|
+
export async function runPipeline<FaultStage extends string = PipelineFaultStage>(
|
|
276
281
|
raw: string,
|
|
277
282
|
stages: RuntimePipelineStages,
|
|
278
|
-
opts?: PipelineOpts
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
+
opts?: PipelineOpts,
|
|
284
|
+
context: RequestContext<StageRecord, FaultStage | PipelineFaultStage> = createRequestContext({
|
|
285
|
+
signal: opts?.signal,
|
|
286
|
+
})
|
|
287
|
+
): Promise<PipelineResult<FaultStage | PipelineFaultStage>> {
|
|
288
|
+
const { timing, faults } = context
|
|
283
289
|
|
|
284
290
|
const normalize = stages.normalize ?? identityNormalize
|
|
285
291
|
const computeQueryShape = stages.computeQueryShape ?? emptyQueryShape
|
|
286
292
|
const detectLocale = stages.detectLocale ?? defaultDetectLocale
|
|
287
293
|
const classifyKind = stages.classifyKind ?? defaultClassifyKind
|
|
288
294
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
295
|
+
const normalized = await runStage(
|
|
296
|
+
{
|
|
297
|
+
id: StageID.Normalize,
|
|
298
|
+
run: (text: string) => rewriteLineBreaks(normalize(text, { locale: opts?.locale }), opts?.lineBreaks ?? "keep"),
|
|
299
|
+
},
|
|
300
|
+
raw,
|
|
301
|
+
context
|
|
302
|
+
)
|
|
292
303
|
|
|
293
304
|
// The coarse placer adds a country prior unless the caller already supplied one.
|
|
294
305
|
let effectiveOpts = opts
|
|
295
306
|
let placerAnchorApplied = false
|
|
296
307
|
|
|
297
308
|
if (stages.placeCountry) {
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
309
|
+
const placeCountry = stages.placeCountry
|
|
310
|
+
|
|
311
|
+
const placed = await runStage(
|
|
312
|
+
{ id: StageID.PlaceCountry, run: (text: string) => placeCountry(text) },
|
|
313
|
+
normalized.normalized,
|
|
314
|
+
context
|
|
315
|
+
)
|
|
301
316
|
|
|
302
317
|
if (placed.country && placed.country !== "OTHER" && !opts?.resolveOpts?.anchorPosterior) {
|
|
303
318
|
const hardCountry = hardCountryFor(
|
|
@@ -325,30 +340,39 @@ export async function runPipeline(
|
|
|
325
340
|
}
|
|
326
341
|
}
|
|
327
342
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
343
|
+
const queryShape = await runStage(
|
|
344
|
+
{ id: StageID.QueryShape, run: (input: NormalizedInputLite) => computeQueryShape(input) },
|
|
345
|
+
normalized,
|
|
346
|
+
context
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
const locale = await runStage(
|
|
350
|
+
{
|
|
351
|
+
id: StageID.LocaleHint,
|
|
352
|
+
run: (input: NormalizedInputLite) => detectLocale(input, queryShape, { hint: opts?.locale }),
|
|
353
|
+
},
|
|
354
|
+
normalized,
|
|
355
|
+
context
|
|
356
|
+
)
|
|
337
357
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
358
|
+
const kind = await runStage(
|
|
359
|
+
{ id: StageID.KindClassifier, run: (input: NormalizedInputLite) => classifyKind(input, queryShape, locale) },
|
|
360
|
+
normalized,
|
|
361
|
+
context
|
|
362
|
+
)
|
|
342
363
|
|
|
343
364
|
const intentMarkers: QueryIntentMarker[] = [...(kind.intentMarkers ?? [])]
|
|
344
365
|
|
|
345
366
|
// A POI-shaped query goes to the intent stage first.
|
|
346
367
|
// A null result falls through to parsing.
|
|
347
368
|
if ((kind.kind === "poi_query" || kind.kind === "poi_category") && stages.poiIntent) {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
const poiOutcome = await
|
|
351
|
-
|
|
369
|
+
const poiIntent = stages.poiIntent
|
|
370
|
+
|
|
371
|
+
const poiOutcome = await runStage(
|
|
372
|
+
{ id: StageID.POIIntent, run: (input: NormalizedInputLite) => poiIntent(input, locale, effectiveOpts) },
|
|
373
|
+
normalized,
|
|
374
|
+
context
|
|
375
|
+
)
|
|
352
376
|
|
|
353
377
|
if (poiOutcome) {
|
|
354
378
|
const emptyTree: AddressTree = { raw: normalized.normalized, roots: [] }
|
|
@@ -375,10 +399,7 @@ export async function runPipeline(
|
|
|
375
399
|
let tree = buildFastPathTree(normalized.normalized, kind, queryShape)
|
|
376
400
|
|
|
377
401
|
if (stages.resolver) {
|
|
378
|
-
|
|
379
|
-
const tResolve = performance.now()
|
|
380
|
-
tree = await safeResolve(faults, stages.resolver, tree, effectiveOpts)
|
|
381
|
-
timing["resolve"] = performance.now() - tResolve
|
|
402
|
+
tree = await runStage(resolveStage(stages.resolver, effectiveOpts), tree, context)
|
|
382
403
|
}
|
|
383
404
|
|
|
384
405
|
return {
|
|
@@ -400,50 +421,57 @@ export async function runPipeline(
|
|
|
400
421
|
let phraseProposals: PhraseProposal[] = []
|
|
401
422
|
|
|
402
423
|
if (stages.groupPhrases) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
phraseProposals = await
|
|
406
|
-
|
|
424
|
+
const groupPhrases = stages.groupPhrases
|
|
425
|
+
|
|
426
|
+
phraseProposals = await runStage(
|
|
427
|
+
{
|
|
428
|
+
id: StageID.PhraseGrouper,
|
|
429
|
+
run: (input: NormalizedInputLite) => groupPhrases(input, queryShape, locale),
|
|
430
|
+
recover: (): PhraseProposal[] => [],
|
|
431
|
+
},
|
|
432
|
+
normalized,
|
|
433
|
+
context
|
|
434
|
+
)
|
|
407
435
|
}
|
|
408
436
|
|
|
409
437
|
let tree: AddressTree = { raw: normalized.normalized, roots: [] }
|
|
410
438
|
|
|
411
439
|
if (stages.classifier) {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
timing["token-classify"] = performance.now() - tClassify
|
|
440
|
+
tree = await runStage(
|
|
441
|
+
classifyStage(stages.classifier, queryShape, {
|
|
442
|
+
fst: stages.fst ?? null,
|
|
443
|
+
caseNormalization: opts?.caseNormalization ?? DEFAULT_CASE_NORMALIZATION,
|
|
444
|
+
placetypePair: opts?.placetypePair ?? "inherit",
|
|
445
|
+
streetMorphology: stages.streetMorphology ?? null,
|
|
446
|
+
streetMorphologyPrior: stages.streetMorphologyPrior ?? false,
|
|
447
|
+
anchorRegions: stages.anchorRegions ?? null,
|
|
448
|
+
venueHead: stages.venueHead?.(locale) ?? null,
|
|
449
|
+
inputMode: deriveInputMode(opts?.inputMode ?? "auto", kind.kind),
|
|
450
|
+
localeHint: opts?.localeHint ?? null,
|
|
451
|
+
}),
|
|
452
|
+
normalized.normalized,
|
|
453
|
+
context
|
|
454
|
+
)
|
|
428
455
|
}
|
|
429
456
|
|
|
430
457
|
if (phraseProposals.length && tree.roots.length >= 0) {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
458
|
+
tree = await runStage(
|
|
459
|
+
{
|
|
460
|
+
id: StageID.GrouperAudit,
|
|
461
|
+
run: (decoded: AddressTree) => grouperAudit(decoded, phraseProposals, normalized.normalized),
|
|
462
|
+
},
|
|
463
|
+
tree,
|
|
464
|
+
context
|
|
465
|
+
)
|
|
434
466
|
}
|
|
435
467
|
|
|
436
468
|
if (stages.resolver) {
|
|
437
|
-
throwIfAborted(opts)
|
|
438
|
-
const tResolve = performance.now()
|
|
439
|
-
|
|
440
469
|
// A bare locality or postcode query resolves without the placer's prior.
|
|
441
470
|
if (placerAnchorApplied && (isBareLocalityTree(tree) || isBarePostcodeTree(tree))) {
|
|
442
471
|
effectiveOpts = opts
|
|
443
472
|
}
|
|
444
473
|
|
|
445
|
-
tree = await
|
|
446
|
-
timing["resolve"] = performance.now() - tResolve
|
|
474
|
+
tree = await runStage(resolveStage(stages.resolver, effectiveOpts), tree, context)
|
|
447
475
|
}
|
|
448
476
|
|
|
449
477
|
return {
|
|
@@ -463,36 +491,12 @@ export async function runPipeline(
|
|
|
463
491
|
}
|
|
464
492
|
|
|
465
493
|
/**
|
|
466
|
-
*
|
|
494
|
+
* The stage that runs the classifier over the normalized text.
|
|
467
495
|
*
|
|
468
|
-
*
|
|
469
|
-
*/
|
|
470
|
-
function throwIfAborted(opts?: PipelineOpts): void {
|
|
471
|
-
if (opts?.signal?.aborted) {
|
|
472
|
-
throw opts.signal.reason ?? new DOMException("Pipeline aborted", "AbortError")
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* Records a stage failure so callers can tell degraded output from a clean result.
|
|
478
|
-
*/
|
|
479
|
-
function recordFault(faults: PipelineFault[], stage: PipelineFaultStage, cause: unknown): void {
|
|
480
|
-
faults.push({
|
|
481
|
-
stage,
|
|
482
|
-
name: cause instanceof Error ? cause.name : "Error",
|
|
483
|
-
message: errorMessage(cause),
|
|
484
|
-
cause,
|
|
485
|
-
})
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* Runs the classifier.
|
|
490
|
-
* On failure it records a fault and returns an empty tree.
|
|
496
|
+
* When the classifier throws, the run continues with an empty tree.
|
|
491
497
|
*/
|
|
492
|
-
|
|
493
|
-
faults: PipelineFault[],
|
|
498
|
+
function classifyStage(
|
|
494
499
|
classifier: AddressClassifier,
|
|
495
|
-
text: string,
|
|
496
500
|
queryShape: QueryShapeLite,
|
|
497
501
|
knobs: {
|
|
498
502
|
fst: FSTMatcherLike | null
|
|
@@ -505,7 +509,7 @@ async function safeClassify(
|
|
|
505
509
|
inputMode: InputMode
|
|
506
510
|
localeHint: string | null
|
|
507
511
|
}
|
|
508
|
-
):
|
|
512
|
+
): PipelineStage<string, AddressTree> {
|
|
509
513
|
const {
|
|
510
514
|
fst,
|
|
511
515
|
caseNormalization,
|
|
@@ -518,25 +522,24 @@ async function safeClassify(
|
|
|
518
522
|
localeHint,
|
|
519
523
|
} = knobs
|
|
520
524
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
return { raw: text, roots: [] }
|
|
525
|
+
return {
|
|
526
|
+
id: StageID.TokenClassify,
|
|
527
|
+
run: (text) =>
|
|
528
|
+
classifier.parse(text, {
|
|
529
|
+
queryShape,
|
|
530
|
+
inputMode,
|
|
531
|
+
...(localeHint ? { localeHint } : {}),
|
|
532
|
+
fst,
|
|
533
|
+
postcodeRepair: true,
|
|
534
|
+
caseNormalization,
|
|
535
|
+
enforceWordConsistency: WORD_CONSISTENCY_SHIP_DEFAULT,
|
|
536
|
+
placetypePair,
|
|
537
|
+
...streetContextRequirementFor({ fst, streetMorphology }, { streetMorphologyPrior }),
|
|
538
|
+
...(fst && anchorRegions ? { anchorRegions } : {}),
|
|
539
|
+
...(venueHead ? { venueHead: venueHead.venueHead } : {}),
|
|
540
|
+
...(venueHead?.venueHeadOpts ? { venueHeadOpts: venueHead.venueHeadOpts } : {}),
|
|
541
|
+
}),
|
|
542
|
+
recover: (text) => ({ raw: text, roots: [] }),
|
|
540
543
|
}
|
|
541
544
|
}
|
|
542
545
|
|
|
@@ -591,26 +594,6 @@ export function streetContextRequirementFor(
|
|
|
591
594
|
: {}
|
|
592
595
|
}
|
|
593
596
|
|
|
594
|
-
/**
|
|
595
|
-
* Runs the phrase grouper.
|
|
596
|
-
* On failure it records a fault and returns no proposals.
|
|
597
|
-
*/
|
|
598
|
-
async function safeGroupPhrases(
|
|
599
|
-
faults: PipelineFault[],
|
|
600
|
-
groupPhrases: NonNullable<RuntimePipelineStages["groupPhrases"]>,
|
|
601
|
-
normalized: NormalizedInputLite,
|
|
602
|
-
shape: QueryShapeLite,
|
|
603
|
-
locale: LocaleHint
|
|
604
|
-
): Promise<PhraseProposal[]> {
|
|
605
|
-
try {
|
|
606
|
-
return await groupPhrases(normalized, shape, locale)
|
|
607
|
-
} catch (error) {
|
|
608
|
-
recordFault(faults, PipelineFaultStage.PhraseGrouper, error)
|
|
609
|
-
|
|
610
|
-
return []
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
597
|
// MARK: Grouper-audit pass
|
|
615
598
|
|
|
616
599
|
/**
|
|
@@ -687,21 +670,17 @@ export function grouperAudit(tree: AddressTree, proposals: PhraseProposal[], tex
|
|
|
687
670
|
}
|
|
688
671
|
|
|
689
672
|
/**
|
|
690
|
-
*
|
|
673
|
+
* The stage that resolves the decoded tree.
|
|
691
674
|
*
|
|
692
|
-
*
|
|
675
|
+
* When the resolver throws, the run continues with the unresolved tree.
|
|
693
676
|
*/
|
|
694
|
-
|
|
695
|
-
faults: PipelineFault[],
|
|
677
|
+
function resolveStage(
|
|
696
678
|
resolver: NonNullable<RuntimePipelineStages["resolver"]>,
|
|
697
|
-
tree: AddressTree,
|
|
698
679
|
opts?: PipelineOpts
|
|
699
|
-
):
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
return tree
|
|
680
|
+
): PipelineStage<AddressTree, AddressTree> {
|
|
681
|
+
return {
|
|
682
|
+
id: StageID.Resolve,
|
|
683
|
+
run: (tree) => resolver.resolveTree(tree, opts?.resolveOpts),
|
|
684
|
+
recover: (tree) => tree,
|
|
706
685
|
}
|
|
707
686
|
}
|