@mailwoman/core 10.8.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -1
- package/THIRD_PARTY_NOTICES.md +27 -0
- package/lib/api/APIClient.ts +6 -5
- package/lib/api/arcgis.ts +6 -5
- package/lib/api/ckan.ts +8 -7
- package/lib/api/clock.ts +3 -3
- package/lib/api/content-range.ts +33 -0
- package/lib/api/defaults.ts +3 -3
- package/lib/api/disk-storage.ts +6 -6
- package/lib/api/headless.ts +3 -4
- package/lib/api/host.ts +5 -5
- package/lib/api/ogc.ts +11 -11
- package/lib/api/paced-client.ts +9 -7
- package/lib/api/pacer.ts +5 -5
- package/lib/api/responses.ts +44 -9
- package/lib/api/retry.ts +4 -4
- package/lib/api/test/clocks.ts +7 -7
- package/lib/api/test/transport.ts +5 -5
- package/lib/api.ts +3 -4
- package/lib/asset/names.ts +6 -6
- package/lib/asset/paths.ts +5 -6
- package/lib/binary-frame.ts +2 -5
- package/lib/cloudflare/tokens.ts +141 -0
- package/lib/cloudflare/wrangler.ts +98 -0
- package/lib/cloudflare.ts +10 -0
- package/lib/coarse-placer/coarse-placer.ts +6 -5
- package/lib/coarse-placer/featurize.ts +6 -6
- package/lib/coarse-placer/fnv-hash.ts +6 -6
- package/lib/coarse-placer/math.ts +10 -6
- package/lib/collections.ts +2 -5
- package/lib/crypto/base64url.ts +5 -6
- package/lib/crypto/digest.ts +7 -6
- package/lib/crypto/ed25519.ts +9 -9
- package/lib/crypto/node.ts +2 -5
- package/lib/data-root.ts +85 -11
- package/lib/decoder/build-tree.ts +14 -15
- package/lib/decoder/calibration.ts +20 -18
- package/lib/decoder/containment.ts +17 -15
- package/lib/decoder/excluded-span.ts +3 -3
- package/lib/decoder/parse-diff.ts +11 -8
- package/lib/decoder/proposals-to-tree.ts +5 -6
- package/lib/decoder/serialize/json.ts +13 -12
- package/lib/decoder/serialize/tuples.ts +7 -7
- package/lib/decoder/serialize/xml.ts +15 -12
- package/lib/decoder/tree/shape.ts +10 -11
- package/lib/decoder/tree/walk.ts +6 -6
- package/lib/decoder/types.ts +8 -7
- package/lib/decoder/unknown-spans.ts +9 -7
- package/lib/decoder/validate-tree.ts +11 -8
- package/lib/decoder.ts +2 -5
- package/lib/env/env-file.ts +4 -7
- package/lib/env/paths.ts +3 -7
- package/lib/env/schema.ts +3 -4
- package/lib/env/utils.ts +3 -4
- package/lib/env.ts +6 -9
- package/lib/errors/schema.ts +3 -4
- package/lib/fs/compression.ts +7 -4
- package/lib/fs/deflate64.ts +183 -0
- package/lib/fs/delimited.ts +4 -4
- package/lib/fs/formatters.ts +2 -5
- package/lib/fs/lock.ts +4 -4
- package/lib/fs/readers/stat.ts +12 -11
- package/lib/fs/readers.ts +22 -12
- package/lib/fs/snapshot.ts +111 -0
- package/lib/fs/streams.ts +9 -9
- package/lib/fs/temporary.ts +4 -4
- package/lib/fs/writers.ts +6 -6
- package/lib/fs/zip.ts +113 -28
- package/lib/geocode/result.ts +16 -7
- package/lib/git.ts +43 -8
- package/lib/hash.ts +13 -4
- package/lib/html/document.ts +9 -6
- package/lib/html/elements.ts +18 -14
- package/lib/html/tables.ts +5 -5
- package/lib/html/text.ts +10 -10
- package/lib/identical.ts +7 -6
- package/lib/index.ts +2 -5
- package/lib/json.ts +11 -9
- package/lib/layers/artifact.ts +14 -14
- package/lib/layers/build-command.ts +7 -7
- package/lib/layers/coverage.ts +7 -7
- package/lib/layers/feature-count.ts +3 -6
- package/lib/layers/manifest.ts +6 -7
- package/lib/layers/outcome.ts +12 -12
- package/lib/layers/publication.ts +4 -4
- package/lib/layers/recipe.ts +4 -4
- package/lib/layers/schema.ts +18 -15
- package/lib/layers/selection.ts +9 -9
- package/lib/layers.ts +5 -5
- package/lib/license/configured.ts +8 -8
- package/lib/license/decision.ts +17 -16
- package/lib/license/declaration.ts +8 -7
- package/lib/license/docs-site.ts +6 -5
- package/lib/license/install-id.ts +8 -6
- package/lib/license/key/file.ts +12 -8
- package/lib/license/key.ts +9 -8
- package/lib/license/obligations.ts +8 -9
- package/lib/license/publication.ts +9 -9
- package/lib/license/record.ts +8 -7
- package/lib/license/register.ts +12 -11
- package/lib/license/stamp.ts +5 -4
- package/lib/license/status.ts +10 -8
- package/lib/license.ts +10 -7
- package/lib/load-ledger.ts +105 -0
- package/lib/locale/locale.ts +9 -8
- package/lib/locale/profiles/en-us.ts +5 -5
- package/lib/locale/profiles/fr-fr.ts +6 -5
- package/lib/locale/profiles/ja-jp.ts +5 -5
- package/lib/locale/profiles.ts +2 -5
- package/lib/locale/registry.ts +7 -6
- package/lib/locale/zh-cn-units.ts +5 -5
- package/lib/locale.ts +2 -5
- package/lib/logging/shared.ts +4 -7
- package/lib/logging/utils.ts +3 -5
- package/lib/logging.ts +2 -5
- package/lib/memoize.ts +29 -0
- package/lib/module/checkout-locality.ts +174 -0
- package/lib/module/clean.ts +6 -5
- package/lib/module/compiled-freshness.ts +3 -3
- package/lib/module/file-url.ts +4 -5
- package/lib/module/package-command.ts +3 -0
- package/lib/module/packaged-data.ts +9 -8
- package/lib/module/resolve-from.ts +17 -12
- package/lib/module/resolvers.ts +8 -9
- package/lib/module/runtime.ts +2 -5
- package/lib/module/workspace.ts +7 -6
- package/lib/network/connectivity.ts +112 -0
- package/lib/network/reachability.ts +90 -0
- package/lib/numeric.ts +11 -11
- package/lib/objects.ts +5 -6
- package/lib/overture-pins.ts +4 -4
- package/lib/paths.ts +10 -10
- package/lib/pipeline/client-result.ts +42 -17
- package/lib/pipeline/preferences.ts +3 -2
- package/lib/pipeline/result.ts +3 -5
- package/lib/pipeline/runtime-pipeline.ts +26 -8
- package/lib/pipeline/span-proposer.ts +10 -9
- package/lib/pipeline/types.ts +33 -8
- package/lib/pipeline.ts +3 -4
- package/lib/policy/defaults.ts +5 -6
- package/lib/policy/policy.ts +3 -4
- package/lib/policy/proposal-collection.ts +3 -4
- package/lib/policy/registry.ts +9 -7
- package/lib/policy.ts +2 -5
- package/lib/postcode-prefix-files.ts +8 -7
- package/lib/process.ts +14 -14
- package/lib/promises.ts +6 -4
- package/lib/random.ts +7 -6
- package/lib/release-config.ts +12 -4
- package/lib/resolver/authoritative-provider.ts +17 -11
- package/lib/resolver/coverage-facts.ts +7 -6
- package/lib/resolver/fixture-authoritative-provider.ts +13 -11
- package/lib/resolver/lookup-types.ts +10 -5
- package/lib/resolver/referential.ts +11 -6
- package/lib/resolver/region-database-provider.ts +4 -4
- package/lib/resolver/synthetic-id-ranges.ts +4 -4
- package/lib/resolver/types.ts +75 -57
- package/lib/resolver.ts +20 -12
- package/lib/resources/debugging.ts +2 -5
- package/lib/resources/languages/types.gen.ts +3 -4
- package/lib/resources/languages.ts +2 -5
- package/lib/resources/libpostal.ts +3 -4
- package/lib/resources/locale.ts +2 -5
- package/lib/resources/set.ts +2 -5
- package/lib/resources.ts +2 -6
- package/lib/routing.ts +4 -7
- package/lib/scope-config.ts +12 -8
- package/lib/scripting/arguments.ts +10 -9
- package/lib/scripting/command.ts +6 -5
- package/lib/scripting/ingest-chunk-script.ts +5 -6
- package/lib/scripting/operation.ts +45 -5
- package/lib/scripting/utils.ts +3 -0
- package/lib/scripting.ts +4 -1
- package/lib/spdx-header.ts +314 -0
- package/lib/state-machine.ts +149 -0
- package/lib/stats.ts +3 -4
- package/lib/strings/code-points.ts +3 -4
- package/lib/strings/compare.ts +4 -4
- package/lib/strings/escape.ts +3 -3
- package/lib/strings/format.ts +3 -3
- package/lib/strings/markdown-table.ts +4 -4
- package/lib/strings/python-json.ts +11 -10
- package/lib/strings/regexp.ts +3 -3
- package/lib/strings/terminal.ts +20 -0
- package/lib/strings/unicode.ts +6 -6
- package/lib/tokenization/Graph.ts +3 -4
- package/lib/tokenization/Span.ts +3 -4
- package/lib/tokenization/normalizer.ts +3 -4
- package/lib/tokenization.ts +2 -5
- package/lib/trust-policies.ts +20 -15
- package/lib/types/Classification.ts +3 -6
- package/lib/types/classifier.ts +10 -9
- package/lib/types/mapping.ts +13 -14
- package/lib/types.ts +2 -5
- package/lib/utils/chunk-process.ts +14 -10
- package/lib/utils/collections.ts +3 -3
- package/lib/utils/events.ts +2 -5
- package/lib/utils/geodatabase-archive.ts +10 -8
- package/lib/utils/sleep.ts +2 -5
- package/lib/utils/sqlite-rows.ts +9 -7
- package/lib/utils/stream-to-disk.ts +26 -9
- package/lib/utils/system.ts +4 -4
- package/lib/utils/time.ts +3 -3
- package/lib/utils/union-find.ts +3 -3
- package/lib/utils.ts +2 -5
- package/lib/vale.ts +5 -5
- package/lib/workers.ts +10 -5
- package/lib/workspaces.ts +5 -4
- package/out/api/APIClient.d.ts +0 -7
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +5 -4
- package/out/api/APIClient.js.map +1 -1
- package/out/api/arcgis.d.ts +3 -5
- package/out/api/arcgis.d.ts.map +1 -1
- package/out/api/arcgis.js +2 -8
- package/out/api/arcgis.js.map +1 -1
- package/out/api/ckan.d.ts +5 -7
- package/out/api/ckan.d.ts.map +1 -1
- package/out/api/ckan.js +2 -11
- package/out/api/ckan.js.map +1 -1
- package/out/api/clock.d.ts +0 -3
- package/out/api/clock.d.ts.map +1 -1
- package/out/api/clock.js +2 -16
- package/out/api/clock.js.map +1 -1
- package/out/api/content-range.d.ts +17 -0
- package/out/api/content-range.d.ts.map +1 -0
- package/out/api/content-range.js +28 -0
- package/out/api/content-range.js.map +1 -0
- package/out/api/defaults.d.ts +0 -3
- package/out/api/defaults.d.ts.map +1 -1
- package/out/api/defaults.js +2 -3
- package/out/api/defaults.js.map +1 -1
- package/out/api/disk-storage.d.ts +1 -4
- package/out/api/disk-storage.d.ts.map +1 -1
- package/out/api/disk-storage.js +5 -6
- package/out/api/disk-storage.js.map +1 -1
- package/out/api/headless.d.ts +0 -4
- package/out/api/headless.d.ts.map +1 -1
- package/out/api/headless.js +2 -4
- package/out/api/headless.js.map +1 -1
- package/out/api/host.d.ts +2 -8
- package/out/api/host.d.ts.map +1 -1
- package/out/api/host.js +3 -4
- package/out/api/host.js.map +1 -1
- package/out/api/ogc.d.ts +3 -13
- package/out/api/ogc.d.ts.map +1 -1
- package/out/api/ogc.js +10 -11
- package/out/api/ogc.js.map +1 -1
- package/out/api/paced-client.d.ts +6 -7
- package/out/api/paced-client.d.ts.map +1 -1
- package/out/api/paced-client.js +2 -13
- package/out/api/paced-client.js.map +1 -1
- package/out/api/pacer.d.ts +2 -5
- package/out/api/pacer.d.ts.map +1 -1
- package/out/api/pacer.js +4 -5
- package/out/api/pacer.js.map +1 -1
- package/out/api/responses.d.ts +2 -9
- package/out/api/responses.d.ts.map +1 -1
- package/out/api/responses.js +37 -9
- package/out/api/responses.js.map +1 -1
- package/out/api/retry.d.ts +1 -7
- package/out/api/retry.d.ts.map +1 -1
- package/out/api/retry.js +3 -4
- package/out/api/retry.js.map +1 -1
- package/out/api/test/clocks.d.ts +1 -4
- package/out/api/test/clocks.d.ts.map +1 -1
- package/out/api/test/clocks.js +6 -14
- package/out/api/test/clocks.js.map +1 -1
- package/out/api/test/transport.d.ts +2 -23
- package/out/api/test/transport.d.ts.map +1 -1
- package/out/api/test/transport.js +3 -22
- package/out/api/test/transport.js.map +1 -1
- package/out/api.d.ts +0 -4
- package/out/api.d.ts.map +1 -1
- package/out/api.js +2 -4
- package/out/api.js.map +1 -1
- package/out/asset/names.d.ts +3 -6
- package/out/asset/names.d.ts.map +1 -1
- package/out/asset/names.js +5 -6
- package/out/asset/names.js.map +1 -1
- package/out/asset/paths.d.ts +2 -6
- package/out/asset/paths.d.ts.map +1 -1
- package/out/asset/paths.js +4 -6
- package/out/asset/paths.js.map +1 -1
- package/out/binary-frame.d.ts +0 -5
- package/out/binary-frame.d.ts.map +1 -1
- package/out/binary-frame.js +2 -5
- package/out/binary-frame.js.map +1 -1
- package/out/cloudflare/tokens.d.ts +61 -0
- package/out/cloudflare/tokens.d.ts.map +1 -0
- package/out/cloudflare/tokens.js +79 -0
- package/out/cloudflare/tokens.js.map +1 -0
- package/out/cloudflare/wrangler.d.ts +30 -0
- package/out/cloudflare/wrangler.d.ts.map +1 -0
- package/out/cloudflare/wrangler.js +68 -0
- package/out/cloudflare/wrangler.js.map +1 -0
- package/out/cloudflare.d.ts +7 -0
- package/out/cloudflare.d.ts.map +1 -0
- package/out/cloudflare.js +9 -0
- package/out/cloudflare.js.map +1 -0
- package/out/coarse-placer/coarse-placer.d.ts +3 -5
- package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
- package/out/coarse-placer/coarse-placer.js +2 -9
- package/out/coarse-placer/coarse-placer.js.map +1 -1
- package/out/coarse-placer/featurize.d.ts +0 -13
- package/out/coarse-placer/featurize.d.ts.map +1 -1
- package/out/coarse-placer/featurize.js +5 -6
- package/out/coarse-placer/featurize.js.map +1 -1
- package/out/coarse-placer/fnv-hash.d.ts +3 -6
- package/out/coarse-placer/fnv-hash.d.ts.map +1 -1
- package/out/coarse-placer/fnv-hash.js +5 -6
- package/out/coarse-placer/fnv-hash.js.map +1 -1
- package/out/coarse-placer/math.d.ts +7 -6
- package/out/coarse-placer/math.d.ts.map +1 -1
- package/out/coarse-placer/math.js +2 -11
- package/out/coarse-placer/math.js.map +1 -1
- package/out/collections.d.ts +0 -5
- package/out/collections.d.ts.map +1 -1
- package/out/collections.js +2 -5
- package/out/collections.js.map +1 -1
- package/out/crypto/base64url.d.ts +2 -6
- package/out/crypto/base64url.d.ts.map +1 -1
- package/out/crypto/base64url.js +4 -6
- package/out/crypto/base64url.js.map +1 -1
- package/out/crypto/digest.d.ts +4 -6
- package/out/crypto/digest.d.ts.map +1 -1
- package/out/crypto/digest.js +6 -6
- package/out/crypto/digest.js.map +1 -1
- package/out/crypto/ed25519.d.ts +1 -13
- package/out/crypto/ed25519.d.ts.map +1 -1
- package/out/crypto/ed25519.js +8 -9
- package/out/crypto/ed25519.js.map +1 -1
- package/out/crypto/node.d.ts +0 -5
- package/out/crypto/node.d.ts.map +1 -1
- package/out/crypto/node.js +2 -5
- package/out/crypto/node.js.map +1 -1
- package/out/data-root.d.ts +53 -11
- package/out/data-root.d.ts.map +1 -1
- package/out/data-root.js +76 -11
- package/out/data-root.js.map +1 -1
- package/out/decoder/build-tree.d.ts +0 -26
- package/out/decoder/build-tree.d.ts.map +1 -1
- package/out/decoder/build-tree.js +6 -30
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/calibration.d.ts +17 -18
- package/out/decoder/calibration.d.ts.map +1 -1
- package/out/decoder/calibration.js +2 -24
- package/out/decoder/calibration.js.map +1 -1
- package/out/decoder/containment.d.ts +14 -15
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +2 -29
- package/out/decoder/containment.js.map +1 -1
- package/out/decoder/excluded-span.d.ts +0 -3
- package/out/decoder/excluded-span.d.ts.map +1 -1
- package/out/decoder/excluded-span.js +2 -6
- package/out/decoder/excluded-span.js.map +1 -1
- package/out/decoder/parse-diff.d.ts +0 -21
- package/out/decoder/parse-diff.d.ts.map +1 -1
- package/out/decoder/parse-diff.js +10 -8
- package/out/decoder/parse-diff.js.map +1 -1
- package/out/decoder/proposals-to-tree.d.ts +2 -6
- package/out/decoder/proposals-to-tree.d.ts.map +1 -1
- package/out/decoder/proposals-to-tree.js +4 -9
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/serialize/json.d.ts +9 -11
- package/out/decoder/serialize/json.d.ts.map +1 -1
- package/out/decoder/serialize/json.js +4 -18
- package/out/decoder/serialize/json.js.map +1 -1
- package/out/decoder/serialize/tuples.d.ts +4 -7
- package/out/decoder/serialize/tuples.d.ts.map +1 -1
- package/out/decoder/serialize/tuples.js +2 -11
- package/out/decoder/serialize/tuples.js.map +1 -1
- package/out/decoder/serialize/xml.d.ts +12 -12
- package/out/decoder/serialize/xml.d.ts.map +1 -1
- package/out/decoder/serialize/xml.js +2 -27
- package/out/decoder/serialize/xml.js.map +1 -1
- package/out/decoder/tree/shape.d.ts +7 -11
- package/out/decoder/tree/shape.d.ts.map +1 -1
- package/out/decoder/tree/shape.js +3 -13
- package/out/decoder/tree/shape.js.map +1 -1
- package/out/decoder/tree/walk.d.ts +3 -11
- package/out/decoder/tree/walk.d.ts.map +1 -1
- package/out/decoder/tree/walk.js +5 -6
- package/out/decoder/tree/walk.js.map +1 -1
- package/out/decoder/types.d.ts +5 -7
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/types.js +3 -5
- package/out/decoder/types.js.map +1 -1
- package/out/decoder/unknown-spans.d.ts.map +1 -1
- package/out/decoder/unknown-spans.js +8 -7
- package/out/decoder/unknown-spans.js.map +1 -1
- package/out/decoder/validate-tree.d.ts +8 -8
- package/out/decoder/validate-tree.d.ts.map +1 -1
- package/out/decoder/validate-tree.js +2 -23
- package/out/decoder/validate-tree.js.map +1 -1
- package/out/decoder.d.ts +0 -5
- package/out/decoder.d.ts.map +1 -1
- package/out/decoder.js +2 -5
- package/out/decoder.js.map +1 -1
- package/out/env/env-file.d.ts +1 -6
- package/out/env/env-file.d.ts.map +1 -1
- package/out/env/env-file.js +4 -7
- package/out/env/env-file.js.map +1 -1
- package/out/env/paths.d.ts +1 -7
- package/out/env/paths.d.ts.map +1 -1
- package/out/env/paths.js +3 -7
- package/out/env/paths.js.map +1 -1
- package/out/env/schema.d.ts +0 -8
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +2 -4
- package/out/env/schema.js.map +1 -1
- package/out/env/utils.d.ts +0 -7
- package/out/env/utils.d.ts.map +1 -1
- package/out/env/utils.js +2 -4
- package/out/env/utils.js.map +1 -1
- package/out/env.d.ts +2 -7
- package/out/env.d.ts.map +1 -1
- package/out/env.js +6 -9
- package/out/env.js.map +1 -1
- package/out/errors/schema.d.ts +0 -4
- package/out/errors/schema.d.ts.map +1 -1
- package/out/errors/schema.js +2 -0
- package/out/errors/schema.js.map +1 -1
- package/out/fs/compression.d.ts +4 -4
- package/out/fs/compression.d.ts.map +1 -1
- package/out/fs/compression.js +5 -3
- package/out/fs/compression.js.map +1 -1
- package/out/fs/deflate64.d.ts +21 -0
- package/out/fs/deflate64.d.ts.map +1 -0
- package/out/fs/deflate64.js +121 -0
- package/out/fs/deflate64.js.map +1 -0
- package/out/fs/delimited.d.ts +1 -4
- package/out/fs/delimited.d.ts.map +1 -1
- package/out/fs/delimited.js +2 -23
- package/out/fs/delimited.js.map +1 -1
- package/out/fs/formatters.d.ts +0 -5
- package/out/fs/formatters.d.ts.map +1 -1
- package/out/fs/formatters.js +2 -5
- package/out/fs/formatters.js.map +1 -1
- package/out/fs/lock.d.ts +0 -3
- package/out/fs/lock.d.ts.map +1 -1
- package/out/fs/lock.js +3 -12
- package/out/fs/lock.js.map +1 -1
- package/out/fs/readers/stat.d.ts +9 -14
- package/out/fs/readers/stat.d.ts.map +1 -1
- package/out/fs/readers/stat.js +11 -11
- package/out/fs/readers/stat.js.map +1 -1
- package/out/fs/readers.d.ts +11 -16
- package/out/fs/readers.d.ts.map +1 -1
- package/out/fs/readers.js +15 -10
- package/out/fs/readers.js.map +1 -1
- package/out/fs/snapshot.d.ts +51 -0
- package/out/fs/snapshot.d.ts.map +1 -0
- package/out/fs/snapshot.js +67 -0
- package/out/fs/snapshot.js.map +1 -0
- package/out/fs/streams.d.ts +6 -9
- package/out/fs/streams.d.ts.map +1 -1
- package/out/fs/streams.js +8 -9
- package/out/fs/streams.js.map +1 -1
- package/out/fs/temporary.d.ts +1 -10
- package/out/fs/temporary.d.ts.map +1 -1
- package/out/fs/temporary.js +3 -4
- package/out/fs/temporary.js.map +1 -1
- package/out/fs/writers.d.ts +3 -11
- package/out/fs/writers.d.ts.map +1 -1
- package/out/fs/writers.js +5 -6
- package/out/fs/writers.js.map +1 -1
- package/out/fs/zip.d.ts +2 -19
- package/out/fs/zip.d.ts.map +1 -1
- package/out/fs/zip.js +82 -20
- package/out/fs/zip.js.map +1 -1
- package/out/geocode/result.d.ts +3 -11
- package/out/geocode/result.d.ts.map +1 -1
- package/out/geocode/result.js +15 -7
- package/out/geocode/result.js.map +1 -1
- package/out/git.d.ts +15 -8
- package/out/git.d.ts.map +1 -1
- package/out/git.js +34 -9
- package/out/git.js.map +1 -1
- package/out/hash.d.ts +8 -6
- package/out/hash.d.ts.map +1 -1
- package/out/hash.js +2 -4
- package/out/hash.js.map +1 -1
- package/out/html/document.d.ts +0 -13
- package/out/html/document.d.ts.map +1 -1
- package/out/html/document.js +8 -6
- package/out/html/document.js.map +1 -1
- package/out/html/elements.d.ts +1 -20
- package/out/html/elements.d.ts.map +1 -1
- package/out/html/elements.js +17 -14
- package/out/html/elements.js.map +1 -1
- package/out/html/tables.d.ts +0 -8
- package/out/html/tables.d.ts.map +1 -1
- package/out/html/tables.js +4 -5
- package/out/html/tables.js.map +1 -1
- package/out/html/text.d.ts +1 -17
- package/out/html/text.d.ts.map +1 -1
- package/out/html/text.js +9 -10
- package/out/html/text.js.map +1 -1
- package/out/identical.d.ts +0 -9
- package/out/identical.d.ts.map +1 -1
- package/out/identical.js +6 -6
- package/out/identical.js.map +1 -1
- package/out/index.d.ts +0 -5
- package/out/index.d.ts.map +1 -1
- package/out/index.js +2 -5
- package/out/index.js.map +1 -1
- package/out/json.d.ts +8 -9
- package/out/json.d.ts.map +1 -1
- package/out/json.js +6 -16
- package/out/json.js.map +1 -1
- package/out/layers/artifact.d.ts +9 -27
- package/out/layers/artifact.d.ts.map +1 -1
- package/out/layers/artifact.js +6 -7
- package/out/layers/artifact.js.map +1 -1
- package/out/layers/build-command.d.ts +0 -10
- package/out/layers/build-command.d.ts.map +1 -1
- package/out/layers/build-command.js +6 -7
- package/out/layers/build-command.js.map +1 -1
- package/out/layers/coverage.d.ts +4 -10
- package/out/layers/coverage.d.ts.map +1 -1
- package/out/layers/coverage.js +4 -5
- package/out/layers/coverage.js.map +1 -1
- package/out/layers/feature-count.d.ts +1 -6
- package/out/layers/feature-count.d.ts.map +1 -1
- package/out/layers/feature-count.js +3 -6
- package/out/layers/feature-count.js.map +1 -1
- package/out/layers/manifest.d.ts +3 -7
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +2 -4
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/outcome.d.ts +9 -12
- package/out/layers/outcome.d.ts.map +1 -1
- package/out/layers/outcome.js +11 -12
- package/out/layers/outcome.js.map +1 -1
- package/out/layers/publication.d.ts +1 -21
- package/out/layers/publication.d.ts.map +1 -1
- package/out/layers/publication.js +3 -4
- package/out/layers/publication.js.map +1 -1
- package/out/layers/recipe.d.ts +1 -4
- package/out/layers/recipe.d.ts.map +1 -1
- package/out/layers/recipe.js +2 -15
- package/out/layers/recipe.js.map +1 -1
- package/out/layers/schema.d.ts +15 -15
- package/out/layers/schema.d.ts.map +1 -1
- package/out/layers/schema.js +2 -13
- package/out/layers/schema.js.map +1 -1
- package/out/layers/selection.d.ts +4 -24
- package/out/layers/selection.d.ts.map +1 -1
- package/out/layers/selection.js +6 -7
- package/out/layers/selection.js.map +1 -1
- package/out/layers.d.ts +2 -5
- package/out/layers.d.ts.map +1 -1
- package/out/layers.js +4 -5
- package/out/layers.js.map +1 -1
- package/out/license/configured.d.ts +5 -8
- package/out/license/configured.d.ts.map +1 -1
- package/out/license/configured.js +7 -8
- package/out/license/configured.js.map +1 -1
- package/out/license/decision.d.ts +4 -20
- package/out/license/decision.d.ts.map +1 -1
- package/out/license/decision.js +15 -14
- package/out/license/decision.js.map +1 -1
- package/out/license/declaration.d.ts +5 -7
- package/out/license/declaration.d.ts.map +1 -1
- package/out/license/declaration.js +2 -9
- package/out/license/declaration.js.map +1 -1
- package/out/license/docs-site.d.ts +0 -8
- package/out/license/docs-site.d.ts.map +1 -1
- package/out/license/docs-site.js +5 -5
- package/out/license/docs-site.js.map +1 -1
- package/out/license/install-id.d.ts +0 -9
- package/out/license/install-id.d.ts.map +1 -1
- package/out/license/install-id.js +7 -6
- package/out/license/install-id.js.map +1 -1
- package/out/license/key/file.d.ts +0 -11
- package/out/license/key/file.d.ts.map +1 -1
- package/out/license/key/file.js +11 -8
- package/out/license/key/file.js.map +1 -1
- package/out/license/key.d.ts +5 -7
- package/out/license/key.d.ts.map +1 -1
- package/out/license/key.js +8 -8
- package/out/license/key.js.map +1 -1
- package/out/license/obligations.d.ts +2 -10
- package/out/license/obligations.d.ts.map +1 -1
- package/out/license/obligations.js +7 -9
- package/out/license/obligations.js.map +1 -1
- package/out/license/publication.d.ts +4 -7
- package/out/license/publication.d.ts.map +1 -1
- package/out/license/publication.js +8 -9
- package/out/license/publication.js.map +1 -1
- package/out/license/record.d.ts +2 -5
- package/out/license/record.d.ts.map +1 -1
- package/out/license/record.js +7 -7
- package/out/license/record.js.map +1 -1
- package/out/license/register.d.ts +9 -11
- package/out/license/register.d.ts.map +1 -1
- package/out/license/register.js +11 -11
- package/out/license/register.js.map +1 -1
- package/out/license/stamp.d.ts +0 -8
- package/out/license/stamp.d.ts.map +1 -1
- package/out/license/stamp.js +4 -4
- package/out/license/stamp.js.map +1 -1
- package/out/license/status.d.ts +2 -16
- package/out/license/status.d.ts.map +1 -1
- package/out/license/status.js +6 -18
- package/out/license/status.js.map +1 -1
- package/out/license.d.ts +7 -7
- package/out/license.d.ts.map +1 -1
- package/out/license.js +9 -7
- package/out/license.js.map +1 -1
- package/out/load-ledger.d.ts +80 -0
- package/out/load-ledger.d.ts.map +1 -0
- package/out/load-ledger.js +53 -0
- package/out/load-ledger.js.map +1 -0
- package/out/locale/locale.d.ts +6 -8
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/locale.js +2 -12
- package/out/locale/locale.js.map +1 -1
- package/out/locale/profiles/en-us.d.ts +2 -5
- package/out/locale/profiles/en-us.d.ts.map +1 -1
- package/out/locale/profiles/en-us.js +2 -7
- package/out/locale/profiles/en-us.js.map +1 -1
- package/out/locale/profiles/fr-fr.d.ts +3 -5
- package/out/locale/profiles/fr-fr.d.ts.map +1 -1
- package/out/locale/profiles/fr-fr.js +2 -8
- package/out/locale/profiles/fr-fr.js.map +1 -1
- package/out/locale/profiles/ja-jp.d.ts +2 -5
- package/out/locale/profiles/ja-jp.d.ts.map +1 -1
- package/out/locale/profiles/ja-jp.js +2 -7
- package/out/locale/profiles/ja-jp.js.map +1 -1
- package/out/locale/profiles.d.ts +0 -5
- package/out/locale/profiles.d.ts.map +1 -1
- package/out/locale/profiles.js +2 -5
- package/out/locale/profiles.js.map +1 -1
- package/out/locale/registry.d.ts +0 -9
- package/out/locale/registry.d.ts.map +1 -1
- package/out/locale/registry.js +6 -6
- package/out/locale/registry.js.map +1 -1
- package/out/locale/zh-cn-units.d.ts +2 -5
- package/out/locale/zh-cn-units.d.ts.map +1 -1
- package/out/locale/zh-cn-units.js +4 -5
- package/out/locale/zh-cn-units.js.map +1 -1
- package/out/locale.d.ts +0 -5
- package/out/locale.d.ts.map +1 -1
- package/out/locale.js +2 -5
- package/out/locale.js.map +1 -1
- package/out/logging/shared.d.ts +0 -5
- package/out/logging/shared.d.ts.map +1 -1
- package/out/logging/shared.js +4 -7
- package/out/logging/shared.js.map +1 -1
- package/out/logging/utils.d.ts +0 -5
- package/out/logging/utils.d.ts.map +1 -1
- package/out/logging/utils.js +2 -5
- package/out/logging/utils.js.map +1 -1
- package/out/logging.d.ts +0 -5
- package/out/logging.d.ts.map +1 -1
- package/out/logging.js +2 -5
- package/out/logging.js.map +1 -1
- package/out/memoize.d.ts +13 -0
- package/out/memoize.d.ts.map +1 -0
- package/out/memoize.js +26 -0
- package/out/memoize.js.map +1 -0
- package/out/module/checkout-locality.d.ts +102 -0
- package/out/module/checkout-locality.d.ts.map +1 -0
- package/out/module/checkout-locality.js +130 -0
- package/out/module/checkout-locality.js.map +1 -0
- package/out/module/clean.d.ts +3 -5
- package/out/module/clean.d.ts.map +1 -1
- package/out/module/clean.js +2 -8
- package/out/module/clean.js.map +1 -1
- package/out/module/compiled-freshness.d.ts +0 -3
- package/out/module/compiled-freshness.d.ts.map +1 -1
- package/out/module/compiled-freshness.js +2 -3
- package/out/module/compiled-freshness.js.map +1 -1
- package/out/module/file-url.d.ts +1 -8
- package/out/module/file-url.d.ts.map +1 -1
- package/out/module/file-url.js +3 -5
- package/out/module/file-url.js.map +1 -1
- package/out/module/package-command.d.ts +0 -3
- package/out/module/package-command.d.ts.map +1 -1
- package/out/module/package-command.js +2 -0
- package/out/module/package-command.js.map +1 -1
- package/out/module/packaged-data.d.ts +0 -11
- package/out/module/packaged-data.d.ts.map +1 -1
- package/out/module/packaged-data.js +8 -8
- package/out/module/packaged-data.js.map +1 -1
- package/out/module/resolve-from.d.ts +3 -16
- package/out/module/resolve-from.d.ts.map +1 -1
- package/out/module/resolve-from.js +16 -12
- package/out/module/resolve-from.js.map +1 -1
- package/out/module/resolvers.d.ts +5 -12
- package/out/module/resolvers.d.ts.map +1 -1
- package/out/module/resolvers.js +7 -9
- package/out/module/resolvers.js.map +1 -1
- package/out/module/runtime.d.ts +0 -5
- package/out/module/runtime.d.ts.map +1 -1
- package/out/module/runtime.js +2 -5
- package/out/module/runtime.js.map +1 -1
- package/out/module/workspace.d.ts +4 -6
- package/out/module/workspace.d.ts.map +1 -1
- package/out/module/workspace.js +6 -6
- package/out/module/workspace.js.map +1 -1
- package/out/network/connectivity.d.ts +60 -0
- package/out/network/connectivity.d.ts.map +1 -0
- package/out/network/connectivity.js +66 -0
- package/out/network/connectivity.js.map +1 -0
- package/out/network/reachability.d.ts +45 -0
- package/out/network/reachability.d.ts.map +1 -0
- package/out/network/reachability.js +79 -0
- package/out/network/reachability.js.map +1 -0
- package/out/numeric.d.ts +0 -3
- package/out/numeric.d.ts.map +1 -1
- package/out/numeric.js +10 -11
- package/out/numeric.js.map +1 -1
- package/out/objects.d.ts +2 -6
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +4 -9
- package/out/objects.js.map +1 -1
- package/out/overture-pins.d.ts +1 -4
- package/out/overture-pins.d.ts.map +1 -1
- package/out/overture-pins.js +3 -4
- package/out/overture-pins.js.map +1 -1
- package/out/paths.d.ts +4 -7
- package/out/paths.d.ts.map +1 -1
- package/out/paths.js +9 -10
- package/out/paths.js.map +1 -1
- package/out/pipeline/client-result.d.ts +38 -16
- package/out/pipeline/client-result.d.ts.map +1 -1
- package/out/pipeline/client-result.js +2 -10
- package/out/pipeline/client-result.js.map +1 -1
- package/out/pipeline/preferences.d.ts +0 -2
- package/out/pipeline/preferences.d.ts.map +1 -1
- package/out/pipeline/preferences.js +2 -5
- package/out/pipeline/preferences.js.map +1 -1
- package/out/pipeline/result.d.ts +1 -5
- package/out/pipeline/result.d.ts.map +1 -1
- package/out/pipeline/result.js +2 -4
- package/out/pipeline/result.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +10 -7
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +21 -11
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-proposer.d.ts +2 -10
- package/out/pipeline/span-proposer.d.ts.map +1 -1
- package/out/pipeline/span-proposer.js +8 -8
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +27 -6
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +5 -9
- package/out/pipeline/types.js.map +1 -1
- package/out/pipeline.d.ts +0 -4
- package/out/pipeline.d.ts.map +1 -1
- package/out/pipeline.js +2 -4
- package/out/pipeline.js.map +1 -1
- package/out/policy/defaults.d.ts +2 -6
- package/out/policy/defaults.d.ts.map +1 -1
- package/out/policy/defaults.js +4 -6
- package/out/policy/defaults.js.map +1 -1
- package/out/policy/policy.d.ts +0 -4
- package/out/policy/policy.d.ts.map +1 -1
- package/out/policy/policy.js +2 -7
- package/out/policy/policy.js.map +1 -1
- package/out/policy/proposal-collection.d.ts +0 -4
- package/out/policy/proposal-collection.d.ts.map +1 -1
- package/out/policy/proposal-collection.js +2 -7
- package/out/policy/proposal-collection.js.map +1 -1
- package/out/policy/registry.d.ts +6 -7
- package/out/policy/registry.d.ts.map +1 -1
- package/out/policy/registry.js +2 -11
- package/out/policy/registry.js.map +1 -1
- package/out/policy.d.ts +0 -5
- package/out/policy.d.ts.map +1 -1
- package/out/policy.js +2 -5
- package/out/policy.js.map +1 -1
- package/out/postcode-prefix-files.d.ts +5 -7
- package/out/postcode-prefix-files.d.ts.map +1 -1
- package/out/postcode-prefix-files.js +7 -7
- package/out/postcode-prefix-files.js.map +1 -1
- package/out/process.d.ts +10 -13
- package/out/process.d.ts.map +1 -1
- package/out/process.js +11 -12
- package/out/process.js.map +1 -1
- package/out/promises.d.ts +3 -4
- package/out/promises.d.ts.map +1 -1
- package/out/promises.js +5 -4
- package/out/promises.js.map +1 -1
- package/out/random.d.ts +0 -10
- package/out/random.d.ts.map +1 -1
- package/out/random.js +6 -6
- package/out/random.js.map +1 -1
- package/out/release-config.d.ts +9 -4
- package/out/release-config.d.ts.map +1 -1
- package/out/release-config.js +4 -4
- package/out/release-config.js.map +1 -1
- package/out/resolver/authoritative-provider.d.ts +14 -11
- package/out/resolver/authoritative-provider.d.ts.map +1 -1
- package/out/resolver/authoritative-provider.js +3 -15
- package/out/resolver/authoritative-provider.js.map +1 -1
- package/out/resolver/coverage-facts.d.ts +4 -6
- package/out/resolver/coverage-facts.d.ts.map +1 -1
- package/out/resolver/coverage-facts.js +2 -10
- package/out/resolver/coverage-facts.js.map +1 -1
- package/out/resolver/fixture-authoritative-provider.d.ts +10 -11
- package/out/resolver/fixture-authoritative-provider.d.ts.map +1 -1
- package/out/resolver/fixture-authoritative-provider.js +12 -11
- package/out/resolver/fixture-authoritative-provider.js.map +1 -1
- package/out/resolver/lookup-types.d.ts +7 -5
- package/out/resolver/lookup-types.d.ts.map +1 -1
- package/out/resolver/lookup-types.js +2 -11
- package/out/resolver/lookup-types.js.map +1 -1
- package/out/resolver/referential.d.ts +8 -6
- package/out/resolver/referential.d.ts.map +1 -1
- package/out/resolver/referential.js +10 -6
- package/out/resolver/referential.js.map +1 -1
- package/out/resolver/region-database-provider.d.ts +1 -4
- package/out/resolver/region-database-provider.d.ts.map +1 -1
- package/out/resolver/region-database-provider.js +2 -6
- package/out/resolver/region-database-provider.js.map +1 -1
- package/out/resolver/synthetic-id-ranges.d.ts +1 -4
- package/out/resolver/synthetic-id-ranges.d.ts.map +1 -1
- package/out/resolver/synthetic-id-ranges.js +3 -4
- package/out/resolver/synthetic-id-ranges.js.map +1 -1
- package/out/resolver/types.d.ts +64 -55
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +15 -7
- package/out/resolver/types.js.map +1 -1
- package/out/resolver.d.ts +8 -11
- package/out/resolver.d.ts.map +1 -1
- package/out/resolver.js +9 -10
- package/out/resolver.js.map +1 -1
- package/out/resources/debugging.d.ts +0 -5
- package/out/resources/debugging.d.ts.map +1 -1
- package/out/resources/debugging.js +2 -5
- package/out/resources/debugging.js.map +1 -1
- package/out/resources/languages/types.gen.d.ts +0 -4
- package/out/resources/languages/types.gen.d.ts.map +1 -1
- package/out/resources/languages/types.gen.js +2 -7
- package/out/resources/languages/types.gen.js.map +1 -1
- package/out/resources/languages.d.ts +0 -5
- package/out/resources/languages.d.ts.map +1 -1
- package/out/resources/languages.js +2 -5
- package/out/resources/languages.js.map +1 -1
- package/out/resources/libpostal.d.ts +0 -9
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +2 -4
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/locale.d.ts +0 -5
- package/out/resources/locale.d.ts.map +1 -1
- package/out/resources/locale.js +2 -5
- package/out/resources/locale.js.map +1 -1
- package/out/resources/set.d.ts +0 -5
- package/out/resources/set.d.ts.map +1 -1
- package/out/resources/set.js +2 -5
- package/out/resources/set.js.map +1 -1
- package/out/resources.d.ts +0 -6
- package/out/resources.d.ts.map +1 -1
- package/out/resources.js +2 -6
- package/out/resources.js.map +1 -1
- package/out/routing.d.ts +0 -5
- package/out/routing.d.ts.map +1 -1
- package/out/routing.js +3 -6
- package/out/routing.js.map +1 -1
- package/out/scope-config.d.ts +9 -8
- package/out/scope-config.d.ts.map +1 -1
- package/out/scope-config.js +3 -13
- package/out/scope-config.js.map +1 -1
- package/out/scripting/arguments.d.ts +7 -9
- package/out/scripting/arguments.d.ts.map +1 -1
- package/out/scripting/arguments.js +8 -8
- package/out/scripting/arguments.js.map +1 -1
- package/out/scripting/command.d.ts +3 -5
- package/out/scripting/command.d.ts.map +1 -1
- package/out/scripting/command.js +5 -5
- package/out/scripting/command.js.map +1 -1
- package/out/scripting/ingest-chunk-script.d.ts +2 -6
- package/out/scripting/ingest-chunk-script.d.ts.map +1 -1
- package/out/scripting/ingest-chunk-script.js +4 -6
- package/out/scripting/ingest-chunk-script.js.map +1 -1
- package/out/scripting/operation.d.ts +39 -5
- package/out/scripting/operation.d.ts.map +1 -1
- package/out/scripting/operation.js +23 -15
- package/out/scripting/operation.js.map +1 -1
- package/out/scripting/utils.d.ts.map +1 -1
- package/out/scripting/utils.js +2 -0
- package/out/scripting/utils.js.map +1 -1
- package/out/scripting.d.ts.map +1 -1
- package/out/scripting.js +3 -1
- package/out/scripting.js.map +1 -1
- package/out/spdx-header.d.ts +86 -0
- package/out/spdx-header.d.ts.map +1 -0
- package/out/spdx-header.js +244 -0
- package/out/spdx-header.js.map +1 -0
- package/out/state-machine.d.ts +98 -0
- package/out/state-machine.d.ts.map +1 -0
- package/out/state-machine.js +37 -0
- package/out/state-machine.js.map +1 -0
- package/out/stats.d.ts +0 -4
- package/out/stats.d.ts.map +1 -1
- package/out/stats.js +2 -4
- package/out/stats.js.map +1 -1
- package/out/strings/code-points.d.ts +0 -4
- package/out/strings/code-points.d.ts.map +1 -1
- package/out/strings/code-points.js +2 -4
- package/out/strings/code-points.js.map +1 -1
- package/out/strings/compare.d.ts +1 -4
- package/out/strings/compare.d.ts.map +1 -1
- package/out/strings/compare.js +3 -4
- package/out/strings/compare.js.map +1 -1
- package/out/strings/escape.d.ts +0 -6
- package/out/strings/escape.d.ts.map +1 -1
- package/out/strings/escape.js +2 -3
- package/out/strings/escape.js.map +1 -1
- package/out/strings/format.d.ts +0 -3
- package/out/strings/format.d.ts.map +1 -1
- package/out/strings/format.js +2 -3
- package/out/strings/format.js.map +1 -1
- package/out/strings/markdown-table.d.ts +1 -11
- package/out/strings/markdown-table.d.ts.map +1 -1
- package/out/strings/markdown-table.js +3 -4
- package/out/strings/markdown-table.js.map +1 -1
- package/out/strings/python-json.d.ts +8 -10
- package/out/strings/python-json.d.ts.map +1 -1
- package/out/strings/python-json.js +3 -1
- package/out/strings/python-json.js.map +1 -1
- package/out/strings/regexp.d.ts +0 -3
- package/out/strings/regexp.d.ts.map +1 -1
- package/out/strings/regexp.js +2 -3
- package/out/strings/regexp.js.map +1 -1
- package/out/strings/terminal.d.ts +5 -0
- package/out/strings/terminal.d.ts.map +1 -0
- package/out/strings/terminal.js +18 -0
- package/out/strings/terminal.js.map +1 -0
- package/out/strings/unicode.d.ts +0 -8
- package/out/strings/unicode.d.ts.map +1 -1
- package/out/strings/unicode.js +5 -6
- package/out/strings/unicode.js.map +1 -1
- package/out/tokenization/Graph.d.ts +0 -4
- package/out/tokenization/Graph.d.ts.map +1 -1
- package/out/tokenization/Graph.js +2 -4
- package/out/tokenization/Graph.js.map +1 -1
- package/out/tokenization/Span.d.ts +0 -4
- package/out/tokenization/Span.d.ts.map +1 -1
- package/out/tokenization/Span.js +2 -8
- package/out/tokenization/Span.js.map +1 -1
- package/out/tokenization/normalizer.d.ts +0 -8
- package/out/tokenization/normalizer.d.ts.map +1 -1
- package/out/tokenization/normalizer.js +2 -4
- package/out/tokenization/normalizer.js.map +1 -1
- package/out/tokenization.d.ts +0 -5
- package/out/tokenization.d.ts.map +1 -1
- package/out/tokenization.js +2 -5
- package/out/tokenization.js.map +1 -1
- package/out/tools/build-deflate64-wasm.run.d.ts +2 -0
- package/out/tools/build-deflate64-wasm.run.d.ts.map +1 -0
- package/out/tools/build-deflate64-wasm.run.js +39 -0
- package/out/tools/build-deflate64-wasm.run.js.map +1 -0
- package/out/tools/coarse-placer/build/dataset.d.ts +2 -5
- package/out/tools/coarse-placer/build/dataset.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/dataset.js +6 -7
- package/out/tools/coarse-placer/build/dataset.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.d.ts +0 -12
- package/out/tools/coarse-placer/build/outlier/exposure.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.js +7 -8
- package/out/tools/coarse-placer/build/outlier/exposure.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/latin.d.ts +16 -17
- package/out/tools/coarse-placer/build/outlier/latin.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/latin.js +19 -18
- package/out/tools/coarse-placer/build/outlier/latin.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/oa.d.ts +18 -19
- package/out/tools/coarse-placer/build/outlier/oa.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/oa.js +21 -20
- package/out/tools/coarse-placer/build/outlier/oa.js.map +1 -1
- package/out/tools/coarse-placer/country-sets.d.ts +6 -7
- package/out/tools/coarse-placer/country-sets.d.ts.map +1 -1
- package/out/tools/coarse-placer/country-sets.js +10 -8
- package/out/tools/coarse-placer/country-sets.js.map +1 -1
- package/out/tools/coarse-placer/eval/latin-offmap.d.ts +6 -8
- package/out/tools/coarse-placer/eval/latin-offmap.d.ts.map +1 -1
- package/out/tools/coarse-placer/eval/latin-offmap.js +8 -8
- package/out/tools/coarse-placer/eval/latin-offmap.js.map +1 -1
- package/out/tools/coarse-placer/eval/openset.d.ts +2 -4
- package/out/tools/coarse-placer/eval/openset.d.ts.map +1 -1
- package/out/tools/coarse-placer/eval/openset.js +4 -4
- package/out/tools/coarse-placer/eval/openset.js.map +1 -1
- package/out/tools/coarse-placer/eval/quant-compare.d.ts +5 -7
- package/out/tools/coarse-placer/eval/quant-compare.d.ts.map +1 -1
- package/out/tools/coarse-placer/eval/quant-compare.js +7 -7
- package/out/tools/coarse-placer/eval/quant-compare.js.map +1 -1
- package/out/tools/coarse-placer/eval.d.ts +5 -7
- package/out/tools/coarse-placer/eval.d.ts.map +1 -1
- package/out/tools/coarse-placer/eval.js +7 -7
- package/out/tools/coarse-placer/eval.js.map +1 -1
- package/out/tools/coarse-placer/outlier-rows.d.ts +0 -10
- package/out/tools/coarse-placer/outlier-rows.d.ts.map +1 -1
- package/out/tools/coarse-placer/outlier-rows.js +9 -8
- package/out/tools/coarse-placer/outlier-rows.js.map +1 -1
- package/out/tools/coarse-placer/paths.d.ts +3 -5
- package/out/tools/coarse-placer/paths.d.ts.map +1 -1
- package/out/tools/coarse-placer/paths.js +5 -5
- package/out/tools/coarse-placer/paths.js.map +1 -1
- package/out/tools/coarse-placer/probe-frontier.d.ts +0 -22
- package/out/tools/coarse-placer/probe-frontier.d.ts.map +1 -1
- package/out/tools/coarse-placer/probe-frontier.js +14 -12
- package/out/tools/coarse-placer/probe-frontier.js.map +1 -1
- package/out/tools/coarse-placer/quantize.d.ts +7 -8
- package/out/tools/coarse-placer/quantize.d.ts.map +1 -1
- package/out/tools/coarse-placer/quantize.js +9 -8
- package/out/tools/coarse-placer/quantize.js.map +1 -1
- package/out/tools/coarse-placer/train.d.ts +6 -8
- package/out/tools/coarse-placer/train.d.ts.map +1 -1
- package/out/tools/coarse-placer/train.js +8 -8
- package/out/tools/coarse-placer/train.js.map +1 -1
- package/out/tools/generate-language-types.d.ts +0 -23
- package/out/tools/generate-language-types.d.ts.map +1 -1
- package/out/tools/generate-language-types.js +16 -17
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/trust-policies.d.ts +0 -20
- package/out/trust-policies.d.ts.map +1 -1
- package/out/trust-policies.js +19 -15
- package/out/trust-policies.js.map +1 -1
- package/out/types/Classification.d.ts +1 -6
- package/out/types/Classification.d.ts.map +1 -1
- package/out/types/Classification.js +3 -6
- package/out/types/Classification.js.map +1 -1
- package/out/types/classifier.d.ts +7 -9
- package/out/types/classifier.d.ts.map +1 -1
- package/out/types/classifier.js +2 -12
- package/out/types/classifier.js.map +1 -1
- package/out/types/mapping.d.ts +10 -14
- package/out/types/mapping.d.ts.map +1 -1
- package/out/types/mapping.js +2 -20
- package/out/types/mapping.js.map +1 -1
- package/out/types.d.ts +0 -5
- package/out/types.d.ts.map +1 -1
- package/out/types.js +2 -5
- package/out/types.js.map +1 -1
- package/out/utils/chunk-process.d.ts +2 -23
- package/out/utils/chunk-process.d.ts.map +1 -1
- package/out/utils/chunk-process.js +13 -10
- package/out/utils/chunk-process.js.map +1 -1
- package/out/utils/collections.d.ts +0 -3
- package/out/utils/collections.d.ts.map +1 -1
- package/out/utils/collections.js +2 -3
- package/out/utils/collections.js.map +1 -1
- package/out/utils/events.d.ts +0 -5
- package/out/utils/events.d.ts.map +1 -1
- package/out/utils/events.js +2 -5
- package/out/utils/events.js.map +1 -1
- package/out/utils/geodatabase-archive.d.ts +7 -8
- package/out/utils/geodatabase-archive.d.ts.map +1 -1
- package/out/utils/geodatabase-archive.js +9 -8
- package/out/utils/geodatabase-archive.js.map +1 -1
- package/out/utils/sleep.d.ts +0 -5
- package/out/utils/sleep.d.ts.map +1 -1
- package/out/utils/sleep.js +2 -5
- package/out/utils/sleep.js.map +1 -1
- package/out/utils/sqlite-rows.d.ts +6 -7
- package/out/utils/sqlite-rows.d.ts.map +1 -1
- package/out/utils/sqlite-rows.js +2 -13
- package/out/utils/sqlite-rows.js.map +1 -1
- package/out/utils/stream-to-disk.d.ts +14 -8
- package/out/utils/stream-to-disk.d.ts.map +1 -1
- package/out/utils/stream-to-disk.js +11 -11
- package/out/utils/stream-to-disk.js.map +1 -1
- package/out/utils/system.d.ts +0 -8
- package/out/utils/system.d.ts.map +1 -1
- package/out/utils/system.js +3 -4
- package/out/utils/system.js.map +1 -1
- package/out/utils/time.d.ts +0 -3
- package/out/utils/time.d.ts.map +1 -1
- package/out/utils/time.js +2 -3
- package/out/utils/time.js.map +1 -1
- package/out/utils/union-find.d.ts +0 -3
- package/out/utils/union-find.d.ts.map +1 -1
- package/out/utils/union-find.js +2 -6
- package/out/utils/union-find.js.map +1 -1
- package/out/utils.d.ts +0 -5
- package/out/utils.d.ts.map +1 -1
- package/out/utils.js +2 -5
- package/out/utils.js.map +1 -1
- package/out/vale.d.ts +0 -9
- package/out/vale.d.ts.map +1 -1
- package/out/vale.js +4 -5
- package/out/vale.js.map +1 -1
- package/out/workers.d.ts +3 -3
- package/out/workers.d.ts.map +1 -1
- package/out/workers.js +8 -4
- package/out/workers.js.map +1 -1
- package/out/workspaces.d.ts +2 -4
- package/out/workspaces.d.ts.map +1 -1
- package/out/workspaces.js +4 -4
- package/out/workspaces.js.map +1 -1
- package/package.json +106 -47
- package/tools/build-deflate64-wasm.run.ts +50 -0
- package/tools/coarse-placer/build/dataset.ts +7 -7
- package/tools/coarse-placer/build/outlier/exposure.ts +8 -8
- package/tools/coarse-placer/build/outlier/latin.ts +21 -19
- package/tools/coarse-placer/build/outlier/oa.ts +23 -21
- package/tools/coarse-placer/country-sets.ts +11 -8
- package/tools/coarse-placer/eval/latin-offmap.ts +9 -8
- package/tools/coarse-placer/eval/openset.ts +5 -4
- package/tools/coarse-placer/eval/quant-compare.ts +8 -7
- package/tools/coarse-placer/eval.ts +8 -7
- package/tools/coarse-placer/outlier-rows.ts +10 -8
- package/tools/coarse-placer/paths.ts +6 -5
- package/tools/coarse-placer/probe-frontier.ts +15 -12
- package/tools/coarse-placer/quantize.ts +10 -8
- package/tools/coarse-placer/train.ts +9 -8
- package/tools/generate-language-types.ts +17 -17
- package/wasm/deflate64.wasm +0 -0
- package/lib/resources/git.ts +0 -69
- package/out/resources/git.d.ts +0 -36
- package/out/resources/git.d.ts.map +0 -1
- package/out/resources/git.js +0 -34
- package/out/resources/git.js.map +0 -1
package/lib/memoize.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Memoized async loads built on `async-init`'s `Service`.
|
|
6
|
+
*
|
|
7
|
+
* This module sits apart from `@mailwoman/core/promises` so that the dependency-free
|
|
8
|
+
* promise helpers keep `async-init` off every graph that imports them,
|
|
9
|
+
* among them the launcher path of `mailwoman --version`.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { Service } from "async-init"
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Memoizes a zero-argument async load as its in-flight promise, so concurrent callers share one call.
|
|
16
|
+
*
|
|
17
|
+
* A resolved value stays cached.
|
|
18
|
+
* A rejection clears the memo, so the next call loads again rather than receiving
|
|
19
|
+
* the same failure for the rest of the process or page.
|
|
20
|
+
*
|
|
21
|
+
* The memo is an `async-init` `Service`, the lazy handle `FamilyBundles` keeps one of per weights family.
|
|
22
|
+
* The value sits in a box, because a `Service` holds objects only and calls the
|
|
23
|
+
* lifecycle hooks of an object that declares them.
|
|
24
|
+
*/
|
|
25
|
+
export function memoizeResettable<T>(load: () => Promise<T>): () => Promise<T> {
|
|
26
|
+
const service = new Service(async () => ({ value: await load() }))
|
|
27
|
+
|
|
28
|
+
return () => service.resolve().then((box) => box.value)
|
|
29
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Whether a repository entry point runs on its own checkout's packages.
|
|
6
|
+
*
|
|
7
|
+
* Node resolves a bare `@mailwoman/*` specifier by walking up parent directories
|
|
8
|
+
* to the first `node_modules` that holds it.
|
|
9
|
+
* A worktree under `.claude/worktrees/<name>` without its own install therefore
|
|
10
|
+
* resolves `@mailwoman/core` from the primary checkout above it, and a worktree
|
|
11
|
+
* whose `node_modules` links to the primary checkout's does the same.
|
|
12
|
+
* Every command then exits 0.
|
|
13
|
+
*
|
|
14
|
+
* `repoRootPath` counts up from where `@mailwoman/core` was loaded.
|
|
15
|
+
* Every repository path then points into the other checkout.
|
|
16
|
+
*
|
|
17
|
+
* Health checks grade its files, `copy-weights` and the overlay linkers write into
|
|
18
|
+
* its workspaces, and a parse probe runs its compiled `out/`.
|
|
19
|
+
* This module compares the working tree holding the entry point with the working
|
|
20
|
+
* tree `@mailwoman/core` computed as the repository root.
|
|
21
|
+
*
|
|
22
|
+
* Both sides are compared as canonical paths.
|
|
23
|
+
* The loaded side comes from `import.meta.url`, and Node and Vite report it
|
|
24
|
+
* after following symbolic links.
|
|
25
|
+
* The entry side is put through `realpath` as well.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import { dirname, resolvePath, type PathBuilderLike } from "path-ts"
|
|
29
|
+
|
|
30
|
+
import { tryRealPath, tryStatLink } from "#fs/readers/stat"
|
|
31
|
+
import { repoRootPath } from "#paths"
|
|
32
|
+
import { CommandError } from "#scripting/command"
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* What the entry checkout's `node_modules` entry is.
|
|
36
|
+
*/
|
|
37
|
+
export const NodeModulesState = {
|
|
38
|
+
/**
|
|
39
|
+
* A directory of its own, as `yarn install` leaves it.
|
|
40
|
+
*/
|
|
41
|
+
Directory: "directory",
|
|
42
|
+
/**
|
|
43
|
+
* A symbolic link, such as one to another checkout's install.
|
|
44
|
+
*/
|
|
45
|
+
Link: "link",
|
|
46
|
+
/**
|
|
47
|
+
* No entry, so resolution continues in the parent directories.
|
|
48
|
+
*/
|
|
49
|
+
Absent: "absent",
|
|
50
|
+
} as const
|
|
51
|
+
|
|
52
|
+
export type NodeModulesState = (typeof NodeModulesState)[keyof typeof NodeModulesState]
|
|
53
|
+
|
|
54
|
+
export interface CheckoutLocality {
|
|
55
|
+
/**
|
|
56
|
+
* The canonical working tree that holds the entry point.
|
|
57
|
+
*/
|
|
58
|
+
entryTree: string
|
|
59
|
+
/**
|
|
60
|
+
* The canonical repository root `@mailwoman/core` computed from where it was loaded.
|
|
61
|
+
*/
|
|
62
|
+
loadedTree: string
|
|
63
|
+
/**
|
|
64
|
+
* The entry tree's `node_modules` entry, with the canonical target of a link.
|
|
65
|
+
*/
|
|
66
|
+
nodeModules: { state: NodeModulesState; target: string | null }
|
|
67
|
+
/**
|
|
68
|
+
* Whether the entry tree and the loaded tree are the same checkout.
|
|
69
|
+
*/
|
|
70
|
+
local: boolean
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The canonical working tree that contains `directory`: the nearest ancestor holding a `.git` entry.
|
|
75
|
+
*
|
|
76
|
+
* That entry is a directory in a main checkout and a file in a worktree.
|
|
77
|
+
*
|
|
78
|
+
* @returns `null` when no ancestor holds one.
|
|
79
|
+
*/
|
|
80
|
+
export async function enclosingWorkingTree(directory: PathBuilderLike): Promise<string | null> {
|
|
81
|
+
let current = await tryRealPath(directory)
|
|
82
|
+
|
|
83
|
+
while (current) {
|
|
84
|
+
if (await tryStatLink(resolvePath(current, ".git"))) return current
|
|
85
|
+
|
|
86
|
+
const parent = dirname(current)
|
|
87
|
+
|
|
88
|
+
if (parent === current) return null
|
|
89
|
+
|
|
90
|
+
current = parent
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return null
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Compare the checkout that holds `entryDirectory` with the checkout `@mailwoman/core` was loaded from.
|
|
98
|
+
*
|
|
99
|
+
* @param entryDirectory The entry point's own directory, `import.meta.dirname`.
|
|
100
|
+
* The working directory would misreport a deliberate run of another checkout's
|
|
101
|
+
* binary from inside a worktree.
|
|
102
|
+
* @returns `null` when either side sits in no working tree.
|
|
103
|
+
* An installed copy of the package returns `null`, because its computed root is a `node_modules` directory.
|
|
104
|
+
*/
|
|
105
|
+
export async function readCheckoutLocality(entryDirectory: PathBuilderLike): Promise<CheckoutLocality | null> {
|
|
106
|
+
const entryTree = await enclosingWorkingTree(entryDirectory)
|
|
107
|
+
|
|
108
|
+
if (!entryTree) return null
|
|
109
|
+
|
|
110
|
+
const loadedTree = await tryRealPath(repoRootPath())
|
|
111
|
+
|
|
112
|
+
if (!loadedTree || !(await tryStatLink(resolvePath(loadedTree, ".git")))) return null
|
|
113
|
+
|
|
114
|
+
const nodeModulesPath = resolvePath(entryTree, "node_modules")
|
|
115
|
+
const nodeModulesStats = await tryStatLink(nodeModulesPath)
|
|
116
|
+
|
|
117
|
+
const nodeModules = !nodeModulesStats
|
|
118
|
+
? { state: NodeModulesState.Absent, target: null }
|
|
119
|
+
: nodeModulesStats.isSymbolicLink()
|
|
120
|
+
? { state: NodeModulesState.Link, target: await tryRealPath(nodeModulesPath) }
|
|
121
|
+
: { state: NodeModulesState.Directory, target: null }
|
|
122
|
+
|
|
123
|
+
return { entryTree, loadedTree, nodeModules, local: entryTree === loadedTree }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* One paragraph naming both checkouts, the cause, and the repair.
|
|
128
|
+
*/
|
|
129
|
+
export function describeCheckoutLeak(locality: CheckoutLocality): string {
|
|
130
|
+
const { entryTree, loadedTree, nodeModules } = locality
|
|
131
|
+
|
|
132
|
+
const cause =
|
|
133
|
+
nodeModules.state === NodeModulesState.Absent
|
|
134
|
+
? `${entryTree} has no node_modules, so Node walked up the parent directories and resolved @mailwoman/core from ${loadedTree}.`
|
|
135
|
+
: nodeModules.state === NodeModulesState.Link
|
|
136
|
+
? `${entryTree}/node_modules is a link to ${nodeModules.target ?? "a missing target"}, so @mailwoman/core resolved from ${loadedTree}.`
|
|
137
|
+
: `${entryTree}/node_modules resolves @mailwoman/core from ${loadedTree}.`
|
|
138
|
+
|
|
139
|
+
const repair =
|
|
140
|
+
nodeModules.state === NodeModulesState.Link
|
|
141
|
+
? `Remove the node_modules link and run \`yarn install\` in ${entryTree}.`
|
|
142
|
+
: `Run \`yarn install\` in ${entryTree}.`
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
`This entry point is in ${entryTree} but runs on the packages of ${loadedTree}. ${cause} ` +
|
|
146
|
+
`Repository paths, health checks and artifact writes would act on ${loadedTree}. ${repair}`
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Raised when an entry point would run on another checkout's packages.
|
|
152
|
+
*
|
|
153
|
+
* It is a `CommandError`, so `runCLICommand` prints the guidance without a stack.
|
|
154
|
+
*/
|
|
155
|
+
export class CheckoutLocalityError extends CommandError {
|
|
156
|
+
public readonly locality: CheckoutLocality
|
|
157
|
+
|
|
158
|
+
constructor(locality: CheckoutLocality) {
|
|
159
|
+
super(describeCheckoutLeak(locality))
|
|
160
|
+
this.name = "CheckoutLocalityError"
|
|
161
|
+
this.locality = locality
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Refuse to continue when the entry point's checkout and the loaded `@mailwoman/core`'s checkout differ.
|
|
167
|
+
*
|
|
168
|
+
* @throws CheckoutLocalityError naming both checkouts and the repair.
|
|
169
|
+
*/
|
|
170
|
+
export async function assertCheckoutLocality(entryDirectory: PathBuilderLike): Promise<void> {
|
|
171
|
+
const locality = await readCheckoutLocality(entryDirectory)
|
|
172
|
+
|
|
173
|
+
if (locality && !locality.local) throw new CheckoutLocalityError(locality)
|
|
174
|
+
}
|
package/lib/module/clean.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Fail-closed cleanup primitives.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* Callers must supply the generated roots they're authorized to mutate. a path is never
|
|
8
|
+
* considered safe merely because it isn't exactly the repository or workspace root.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
import type { Stats } from "node:fs"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
5
|
* @file Checks whether a workspace's compiled `out/` tree is older than its source.
|
|
6
6
|
*
|
|
7
7
|
* The check compares against the newest emitted `.js` file. The `out/` directory's own mtime is unreliable.
|
package/lib/module/file-url.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* Converts between `file:` URLs and filesystem paths.
|
|
7
6
|
*/
|
|
8
7
|
|
|
@@ -13,7 +12,7 @@ import type { PathBuilderLike } from "path-ts"
|
|
|
13
12
|
/**
|
|
14
13
|
* Converts a `file:` URL to a filesystem path.
|
|
15
14
|
*
|
|
16
|
-
* @throws {TypeError} When the URL
|
|
15
|
+
* @throws {TypeError} When the URL isn't a `file:` URL.
|
|
17
16
|
*/
|
|
18
17
|
export function fileURLToPath(url: string | URL): string {
|
|
19
18
|
return nativeFileURLToPath(url)
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* This resolver locates a data-only package's shipped `data/` files.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* compiled, so there are exactly two places to look.
|
|
9
|
-
*
|
|
10
|
-
* straight at.
|
|
7
|
+
* `data/` sits at the package root (it is a `files` entry), and the calling module
|
|
8
|
+
* sits either at that root — running from source — or one level down under `out/`
|
|
9
|
+
* when compiled, so there are exactly two places to look.
|
|
10
|
+
* The probe tests for the file: probing by attempting a parse folds a corrupt table into "not
|
|
11
|
+
* this candidate", and the package then reports a missing table it is looking straight at.
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import { resolvePath } from "path-ts"
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
+
* Resolves packages relative to the caller.
|
|
6
|
+
*
|
|
7
|
+
* Every helper takes `base`, the caller's `import.meta.url`, so a package resolves
|
|
8
|
+
* through the dependency graph of the calling workspace.
|
|
9
|
+
* The sibling `resolvers.ts` resolves from `@mailwoman/core`.
|
|
10
|
+
*
|
|
11
|
+
* That package cannot see a dependency declared only by a docs plugin or hook.
|
|
5
12
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `@mailwoman/core`. That package cannot see a dependency declared only by a docs plugin or hook.
|
|
13
|
+
* Docusaurus loads plugins through jiti's CommonJS transform.
|
|
14
|
+
* That transform rejects a bare `import.meta` and `import … with { type: "json" }`.
|
|
9
15
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* it instead of `resolvers.ts`.
|
|
16
|
+
* This module avoids both constructs.
|
|
17
|
+
* Docusaurus plugins must import it instead of `resolvers.ts`.
|
|
13
18
|
*/
|
|
14
19
|
|
|
15
20
|
import { createRequire, findPackageJSON } from "node:module"
|
|
@@ -23,7 +28,7 @@ import { readLocalJSONFile } from "#fs/readers"
|
|
|
23
28
|
* Returns the path to a package's `package.json`.
|
|
24
29
|
*
|
|
25
30
|
* @param base The caller's `import.meta.url`.
|
|
26
|
-
* @throws When the package
|
|
31
|
+
* @throws When the package isn't installed where `base` can see it.
|
|
27
32
|
*/
|
|
28
33
|
export function resolvePackageJSON(base: string, packageName: string): string {
|
|
29
34
|
try {
|
|
@@ -96,7 +101,7 @@ export async function readPackageJSON<D extends object = MailwomanManifestFields
|
|
|
96
101
|
* Resolves a package subpath to a filesystem path through the package's `exports` map.
|
|
97
102
|
*
|
|
98
103
|
* @param base The caller's `import.meta.url`.
|
|
99
|
-
* @throws `ERR_MODULE_NOT_FOUND` when the specifier
|
|
104
|
+
* @throws `ERR_MODULE_NOT_FOUND` when the specifier doesn't resolve.
|
|
100
105
|
*/
|
|
101
106
|
export function resolvePackageSpecifier(base: string, packageName: string, ...subpaths: (string | null)[]): string {
|
|
102
107
|
return createRequire(base).resolve(
|
|
@@ -105,7 +110,7 @@ export function resolvePackageSpecifier(base: string, packageName: string, ...su
|
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
/**
|
|
108
|
-
* Behaves like {@link resolvePackageSpecifier} but returns `null` when the specifier
|
|
113
|
+
* Behaves like {@link resolvePackageSpecifier} but returns `null` when the specifier doesn't resolve.
|
|
109
114
|
*/
|
|
110
115
|
export function tryResolvePackageSpecifier(
|
|
111
116
|
base: string,
|
package/lib/module/resolvers.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* Locates installed packages on disk through module resolution from `@mailwoman/core`.
|
|
7
6
|
*/
|
|
8
7
|
|
|
@@ -20,7 +19,7 @@ import { dirname, PathBuilder, resolvePath } from "path-ts"
|
|
|
20
19
|
* For a workspace package, the result is the real workspace directory
|
|
21
20
|
* because `import.meta.resolve` follows the symlink.
|
|
22
21
|
*
|
|
23
|
-
* @throws `ERR_MODULE_NOT_FOUND` when the package
|
|
22
|
+
* @throws `ERR_MODULE_NOT_FOUND` when the package isn't installed.
|
|
24
23
|
*/
|
|
25
24
|
export function resolvePackageDirectory<Name extends string = string>(packageName: Name): PathBuilder<Name> {
|
|
26
25
|
const manifestPath = fileURLToPath(import.meta.resolve(`${packageName}/package.json`))
|
|
@@ -35,7 +34,7 @@ export function resolvePackageDirectory<Name extends string = string>(packageNam
|
|
|
35
34
|
* `out/` tree and a published tarball.
|
|
36
35
|
* For example, `resolvePackagePath("mailwoman", "tools", "eval-harness", "baselines.json")`.
|
|
37
36
|
*
|
|
38
|
-
* @throws `ERR_MODULE_NOT_FOUND` when the package
|
|
37
|
+
* @throws `ERR_MODULE_NOT_FOUND` when the package isn't installed.
|
|
39
38
|
*/
|
|
40
39
|
export function resolvePackagePath(packageName: string, ...segments: string[]): string {
|
|
41
40
|
return resolvePath(resolvePackageDirectory(packageName), ...segments)
|
|
@@ -51,14 +50,14 @@ export function resolvePackagePath(packageName: string, ...segments: string[]):
|
|
|
51
50
|
* It cannot find a package installed only in a nested `node_modules`.
|
|
52
51
|
* Use `resolve-from.ts` for that case.
|
|
53
52
|
*
|
|
54
|
-
* @throws `ERR_MODULE_NOT_FOUND` when the specifier
|
|
53
|
+
* @throws `ERR_MODULE_NOT_FOUND` when the specifier doesn't resolve.
|
|
55
54
|
*/
|
|
56
55
|
export function resolveModulePath(specifier: string): string {
|
|
57
56
|
return fileURLToPath(import.meta.resolve(specifier))
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
|
-
* Behaves like {@link resolveModulePath} but returns `null` when the specifier
|
|
60
|
+
* Behaves like {@link resolveModulePath} but returns `null` when the specifier doesn't resolve.
|
|
62
61
|
*/
|
|
63
62
|
export function tryResolveModulePath(specifier: string): string | null {
|
|
64
63
|
try {
|
|
@@ -69,7 +68,7 @@ export function tryResolveModulePath(specifier: string): string | null {
|
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
|
-
* Behaves like {@link resolvePackageDirectory} but returns `null` when the package
|
|
71
|
+
* Behaves like {@link resolvePackageDirectory} but returns `null` when the package isn't installed.
|
|
73
72
|
*/
|
|
74
73
|
export function tryResolvePackageDirectory<Name extends string = string>(packageName: Name): PathBuilder<Name> | null {
|
|
75
74
|
try {
|
package/lib/module/runtime.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
6
3
|
|
|
7
4
|
/**
|
|
8
5
|
* Turn on Node's on-disk compile cache for this process.
|
package/lib/module/workspace.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Workspace names paired with their declared repo-relative directories.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* exact class of clean-command bug this registry exists to prevent.
|
|
7
|
+
* The root manifest is authoritative: package names are not paths
|
|
8
|
+
* (`@mailwoman/core` lives at `packages/core`), and deriving one from the other recreates
|
|
9
|
+
* the exact class of clean-command bug this registry exists to prevent.
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
import { PathBuilder, resolvePath, type PathBuilderLike } from "path-ts"
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file The two connectivity signals a browser client reads before it sends a request, and the error a client raises
|
|
6
|
+
* when they say the request cannot reach its service.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { StatusCodes } from "http-status-codes"
|
|
10
|
+
|
|
11
|
+
import { ResourceError } from "#errors/schema"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* What a client knows about its connection, from two independent sources.
|
|
15
|
+
*
|
|
16
|
+
* `null` means the source is unavailable or hasn't reported yet.
|
|
17
|
+
* A reading of `false` means the source reported a failure.
|
|
18
|
+
*/
|
|
19
|
+
export interface ConnectivityReading {
|
|
20
|
+
/**
|
|
21
|
+
* `navigator.onLine`: `false` when the device has no network interface up.
|
|
22
|
+
*
|
|
23
|
+
* `true` reports only that an interface is up.
|
|
24
|
+
* A captive portal or a network with no route out still reads `true`.
|
|
25
|
+
*/
|
|
26
|
+
online: boolean | null
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Whether the latest reachability probe of the service succeeded.
|
|
30
|
+
*/
|
|
31
|
+
reachable: boolean | null
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The reading a client assumes before either source reports: both signals unknown.
|
|
36
|
+
*/
|
|
37
|
+
export const UNKNOWN_CONNECTIVITY: ConnectivityReading = { online: null, reachable: null }
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* `navigator.onLine`, or `null` on a runtime whose `navigator` lacks it.
|
|
41
|
+
*
|
|
42
|
+
* Node 21 and later define `navigator` without `onLine`, and workerd's `navigator` lacks
|
|
43
|
+
* it too, so the absent property reads as unknown there rather than as offline.
|
|
44
|
+
*/
|
|
45
|
+
export function readNavigatorOnline(): boolean | null {
|
|
46
|
+
const navigatorLike = (globalThis as { navigator?: { onLine?: unknown } }).navigator
|
|
47
|
+
const online = navigatorLike?.onLine
|
|
48
|
+
|
|
49
|
+
return typeof online === "boolean" ? online : null
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Why a reading rules out a request to its service.
|
|
54
|
+
*/
|
|
55
|
+
export const OfflineReason = {
|
|
56
|
+
/**
|
|
57
|
+
* The device reports no network interface up.
|
|
58
|
+
*/
|
|
59
|
+
Offline: "offline",
|
|
60
|
+
/**
|
|
61
|
+
* The device has a network, and the service's reachability probe failed.
|
|
62
|
+
*/
|
|
63
|
+
Unreachable: "service-unreachable",
|
|
64
|
+
} as const
|
|
65
|
+
|
|
66
|
+
export type OfflineReason = (typeof OfflineReason)[keyof typeof OfflineReason]
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The reason a reading rules out a request, or `null` when the reading allows one or is unknown.
|
|
70
|
+
*/
|
|
71
|
+
export function offlineReason(reading: ConnectivityReading): OfflineReason | null {
|
|
72
|
+
if (reading.online === false) return OfflineReason.Offline
|
|
73
|
+
|
|
74
|
+
if (reading.reachable === false) return OfflineReason.Unreachable
|
|
75
|
+
|
|
76
|
+
return null
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The URN source segment of an error {@linkcode offlineResourceError} builds.
|
|
81
|
+
*/
|
|
82
|
+
const CONNECTIVITY_ERROR_SOURCE = "connectivity"
|
|
83
|
+
|
|
84
|
+
const OFFLINE_MESSAGES: Record<OfflineReason, string> = {
|
|
85
|
+
[OfflineReason.Offline]: "This device is offline.",
|
|
86
|
+
[OfflineReason.Unreachable]: "This device has a network connection, but the service did not answer.",
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* A 503 {@linkcode ResourceError} of kind `network` for a request that a connectivity reading ruled out.
|
|
91
|
+
*
|
|
92
|
+
* The `network` kind segment matches `ResourceErrorKind.Network`, the kind `APIClient`
|
|
93
|
+
* assigns a responseless failure, so `isTransientResourceError` reports it as transient
|
|
94
|
+
* and a caller that requeues network failures requeues this one.
|
|
95
|
+
* The URN is `connectivity:network:<reason>`, and `cause` holds the failure
|
|
96
|
+
* that prompted the check, if one did.
|
|
97
|
+
*/
|
|
98
|
+
export function offlineResourceError(reason: OfflineReason, cause?: unknown): ResourceError {
|
|
99
|
+
const error = ResourceError.from(
|
|
100
|
+
503 as StatusCodes,
|
|
101
|
+
OFFLINE_MESSAGES[reason],
|
|
102
|
+
CONNECTIVITY_ERROR_SOURCE,
|
|
103
|
+
"network",
|
|
104
|
+
reason
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
if (cause != null) {
|
|
108
|
+
error.cause = cause
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return error
|
|
112
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file Tests whether a service answers by requesting one of its routes.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The milliseconds {@linkcode ReachabilityProbe.test} waits for a response
|
|
10
|
+
* before it reports the service unreachable.
|
|
11
|
+
*/
|
|
12
|
+
export const DEFAULT_REACHABILITY_TIMEOUT_MS = 5000
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A probe that tests whether a service answers, by requesting a route on it.
|
|
16
|
+
*
|
|
17
|
+
* Probe the service the caller depends on, such as the geocoder API's `/health` route,
|
|
18
|
+
* rather than a third party's connectivity endpoint.
|
|
19
|
+
* A third-party endpoint reports whether the internet is reachable,
|
|
20
|
+
* and the service can be down while it answers.
|
|
21
|
+
*
|
|
22
|
+
* Each probe of a third-party endpoint also sends the user's IP address to that party.
|
|
23
|
+
*
|
|
24
|
+
* The request runs in `cors` mode, so the status is readable.
|
|
25
|
+
* A captive portal's interception of an HTTPS request fails the TLS handshake,
|
|
26
|
+
* and the probe reports that as unreachable.
|
|
27
|
+
*/
|
|
28
|
+
export class ReachabilityProbe implements Disposable {
|
|
29
|
+
#abortController: AbortController | null = null
|
|
30
|
+
protected readonly url: string
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param url The route to request.
|
|
34
|
+
* It must answer CORS requests from the page's origin.
|
|
35
|
+
*/
|
|
36
|
+
constructor(url: string | URL) {
|
|
37
|
+
this.url = String(url)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public [Symbol.dispose] = (): void => this.abort()
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Cancels the test in flight.
|
|
44
|
+
* The cancelled test resolves `false`.
|
|
45
|
+
*/
|
|
46
|
+
public abort = (): void => {
|
|
47
|
+
this.#abortController?.abort()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Resolves `true` when the route answers with a 2xx status, and `false` on any
|
|
52
|
+
* other status, a network failure or a timeout.
|
|
53
|
+
*
|
|
54
|
+
* A new test cancels the previous one.
|
|
55
|
+
*/
|
|
56
|
+
public test = (requestTimeout = DEFAULT_REACHABILITY_TIMEOUT_MS, requestInit?: RequestInit): Promise<boolean> => {
|
|
57
|
+
this.abort()
|
|
58
|
+
|
|
59
|
+
const controller = new AbortController()
|
|
60
|
+
this.#abortController = controller
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
// `AbortSignal.any` and `fetch` can throw synchronously, and the chain turns that into `false`.
|
|
64
|
+
Promise.resolve()
|
|
65
|
+
.then(() => {
|
|
66
|
+
const signals = [controller.signal, AbortSignal.timeout(requestTimeout)]
|
|
67
|
+
|
|
68
|
+
if (requestInit?.signal) {
|
|
69
|
+
signals.push(requestInit.signal)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return fetch(this.url, {
|
|
73
|
+
method: "GET",
|
|
74
|
+
credentials: "omit",
|
|
75
|
+
mode: "cors",
|
|
76
|
+
cache: "no-store",
|
|
77
|
+
...requestInit,
|
|
78
|
+
signal: AbortSignal.any(signals),
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
.then((response) => response.ok)
|
|
82
|
+
.catch(() => false)
|
|
83
|
+
.finally(() => {
|
|
84
|
+
if (this.#abortController === controller) {
|
|
85
|
+
this.#abortController = null
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
}
|
package/lib/numeric.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
5
|
* @file Numeric helpers with no domain attached.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -13,16 +13,16 @@ export function clamp(value: number, min: number, max: number): number {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* @copyright Sister Software
|
|
17
|
-
* @license AGPL-3.0
|
|
18
|
-
* @author Teffen Ellis, et al.
|
|
19
|
-
*
|
|
20
16
|
* Python-parity numeric helpers.
|
|
21
17
|
*
|
|
22
|
-
* These exist because the gazetteer pipeline was ported from Python
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
18
|
+
* These exist because the gazetteer pipeline was ported from Python
|
|
19
|
+
* and its outputs have to match the originals bit for bit.
|
|
20
|
+
* A postcode centroid that rounds differently is a different centroid.
|
|
21
|
+
*
|
|
22
|
+
* The extract containing it then differs from the reference.
|
|
23
|
+
* Divergence here never throws.
|
|
24
|
+
*
|
|
25
|
+
* It surfaces as an extract that disagrees with the reference and raises no error.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
/**
|