@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
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file A streaming Deflate64 inflater over the committed `wasm/deflate64.wasm`.
|
|
6
|
+
*
|
|
7
|
+
* Deflate64 is zip compression method 9. Node's zlib has no Deflate64 and yauzl refuses the method, so
|
|
8
|
+
* {@link inflateDeflate64} decompresses a member's raw bytes through `crates/deflate64-wasm`, an adapter over
|
|
9
|
+
* the MIT-licensed `deflate64` crate. Each call instantiates its own module, stages one compressed chunk at
|
|
10
|
+
* a time in linear memory, and copies each filled output span out before reusing it. The decoder keeps a
|
|
11
|
+
* 128 KiB window, so memory stays fixed whatever the member's size.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { readLocalBuffer } from "#fs/readers"
|
|
15
|
+
import { memoizeResettable } from "#memoize"
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The location of the committed `wasm/deflate64.wasm`, resolved from this module.
|
|
19
|
+
*
|
|
20
|
+
* The same relative path holds from `lib/fs/` in the repository and from `out/fs/` in a tarball.
|
|
21
|
+
*/
|
|
22
|
+
export function deflate64WASMURL(): URL {
|
|
23
|
+
return new URL("../../wasm/deflate64.wasm", import.meta.url)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A compiled WebAssembly module.
|
|
28
|
+
*
|
|
29
|
+
* The type is opaque because the Node type preset omits the DOM library that declares `WebAssembly`.
|
|
30
|
+
*/
|
|
31
|
+
interface CompiledModule {
|
|
32
|
+
readonly [Symbol.toStringTag]: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The C ABI that `crates/deflate64-wasm` exports.
|
|
37
|
+
*/
|
|
38
|
+
interface Deflate64Exports {
|
|
39
|
+
memory: { readonly buffer: ArrayBuffer }
|
|
40
|
+
d64_alloc(len: number): number
|
|
41
|
+
d64_dealloc(ptr: number, len: number): void
|
|
42
|
+
d64_new(): number
|
|
43
|
+
d64_free(decoder: number): void
|
|
44
|
+
d64_inflate(decoder: number, input: number, inputLength: number, output: number, outputLength: number): number
|
|
45
|
+
d64_consumed(decoder: number): number
|
|
46
|
+
d64_written(decoder: number): number
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The members of the global `WebAssembly` object this module calls.
|
|
51
|
+
*/
|
|
52
|
+
interface WebAssemblyAPI {
|
|
53
|
+
compile(bytes: Uint8Array<ArrayBuffer>): Promise<CompiledModule>
|
|
54
|
+
instantiate(module: CompiledModule, imports: object): Promise<{ exports: Deflate64Exports }>
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const WebAssembly: WebAssemblyAPI
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The codes `d64_inflate` answers, equal to `deflate64_wasm::status`.
|
|
61
|
+
*/
|
|
62
|
+
const Status = {
|
|
63
|
+
More: 0,
|
|
64
|
+
Done: 1,
|
|
65
|
+
DataError: -1,
|
|
66
|
+
} as const
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The output span each inflate call fills before its bytes are copied out.
|
|
70
|
+
*/
|
|
71
|
+
const OUTPUT_SPAN = 256 * 1024
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The module, compiled once per process.
|
|
75
|
+
* A failed read or compile is retried by the next inflate.
|
|
76
|
+
*/
|
|
77
|
+
const compiledModule = memoizeResettable((): Promise<CompiledModule> =>
|
|
78
|
+
readLocalBuffer(deflate64WASMURL()).then((bytes) => WebAssembly.compile(new Uint8Array(bytes)))
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* A staging span in linear memory, kept while it is large enough and replaced when a chunk outgrows it.
|
|
83
|
+
*/
|
|
84
|
+
class Staging {
|
|
85
|
+
ptr = 0
|
|
86
|
+
len = 0
|
|
87
|
+
readonly #exports: Deflate64Exports
|
|
88
|
+
|
|
89
|
+
constructor(exports: Deflate64Exports) {
|
|
90
|
+
this.#exports = exports
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
reserve(len: number): number {
|
|
94
|
+
if (len > this.len) {
|
|
95
|
+
this.release()
|
|
96
|
+
this.ptr = this.#exports.d64_alloc(len)
|
|
97
|
+
this.len = len
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return this.ptr
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
release(): void {
|
|
104
|
+
if (this.len) {
|
|
105
|
+
this.#exports.d64_dealloc(this.ptr, this.len)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
this.len = 0
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Inflate a raw Deflate64 stream.
|
|
114
|
+
*
|
|
115
|
+
* A method 9 zip member read with yauzl's `decompress: false` is such a stream.
|
|
116
|
+
* Each yielded chunk is a fresh copy the consumer may keep.
|
|
117
|
+
*
|
|
118
|
+
* A consumer that stops early ends the source's iteration.
|
|
119
|
+
* The decoder's memory is released on every exit.
|
|
120
|
+
*
|
|
121
|
+
* @category Files
|
|
122
|
+
* @throws When the bytes are not a valid Deflate64 stream, or when the source ends
|
|
123
|
+
* before the stream's final block.
|
|
124
|
+
*/
|
|
125
|
+
export async function* inflateDeflate64(source: AsyncIterable<Uint8Array>): AsyncGenerator<Uint8Array> {
|
|
126
|
+
const { exports } = await WebAssembly.instantiate(await compiledModule(), {})
|
|
127
|
+
const decoder = exports.d64_new()
|
|
128
|
+
const input = new Staging(exports)
|
|
129
|
+
const output = new Staging(exports)
|
|
130
|
+
const outputPtr = output.reserve(OUTPUT_SPAN)
|
|
131
|
+
let consumedTotal = 0
|
|
132
|
+
|
|
133
|
+
try {
|
|
134
|
+
for await (const chunk of source) {
|
|
135
|
+
const inputPtr = input.reserve(chunk.byteLength)
|
|
136
|
+
|
|
137
|
+
// `memory.buffer` is re-read after every allocation, because growth detaches the previous buffer.
|
|
138
|
+
new Uint8Array(exports.memory.buffer, inputPtr, chunk.byteLength).set(chunk)
|
|
139
|
+
|
|
140
|
+
let offset = 0
|
|
141
|
+
|
|
142
|
+
for (;;) {
|
|
143
|
+
const status = exports.d64_inflate(
|
|
144
|
+
decoder,
|
|
145
|
+
inputPtr + offset,
|
|
146
|
+
chunk.byteLength - offset,
|
|
147
|
+
outputPtr,
|
|
148
|
+
OUTPUT_SPAN
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
const consumed = exports.d64_consumed(decoder)
|
|
152
|
+
const written = exports.d64_written(decoder)
|
|
153
|
+
|
|
154
|
+
offset += consumed
|
|
155
|
+
consumedTotal += consumed
|
|
156
|
+
|
|
157
|
+
if (written) {
|
|
158
|
+
yield new Uint8Array(exports.memory.buffer, outputPtr, written).slice()
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (status === Status.DataError) {
|
|
162
|
+
throw new Error(`Deflate64 stream is invalid near compressed byte ${consumedTotal}`)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (status === Status.Done) return
|
|
166
|
+
|
|
167
|
+
// The output span had room and the chunk is spent, so the decoder needs the next chunk.
|
|
168
|
+
if (offset >= chunk.byteLength && written < OUTPUT_SPAN) break
|
|
169
|
+
|
|
170
|
+
// A call that consumes zero bytes and writes zero bytes would repeat forever on the same arguments.
|
|
171
|
+
if (!consumed && !written) {
|
|
172
|
+
throw new Error(`Deflate64 decoder stalled at compressed byte ${consumedTotal}`)
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
throw new Error(`Deflate64 stream ended after ${consumedTotal} compressed bytes, before its final block`)
|
|
178
|
+
} finally {
|
|
179
|
+
input.release()
|
|
180
|
+
output.release()
|
|
181
|
+
exports.d64_free(decoder)
|
|
182
|
+
}
|
|
183
|
+
}
|
package/lib/fs/delimited.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 Reads a delimited file whose `"` is an ordinary character.
|
|
6
6
|
*
|
|
7
7
|
* A quote-aware reader over unquoted input still returns rows.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* The GeoNames country dumps are unquoted TSV and contain `"` in place names (`Ovrag Kyzylak"on`).
|
|
13
13
|
* Since spliterator 10, `TSVSpliterator` reads `"` as data by default, and a quote left open at the end of
|
|
14
|
-
* the input throws. These readers still pass `enableQuoteHandling: false` so their contract
|
|
14
|
+
* the input throws. These readers still pass `enableQuoteHandling: false` so their contract doesn't rest
|
|
15
15
|
* on a default.
|
|
16
16
|
*
|
|
17
17
|
* A quote-aware reader of CSV text indexes its header with {@linkcode headerColumnIndex} and passes its
|
package/lib/fs/formatters.ts
CHANGED
package/lib/fs/lock.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 An exclusive lock held as a directory for as long as its owner runs.
|
|
6
6
|
*
|
|
7
7
|
* The lock is a directory created with a non-recursive `mkdir`, an atomic test-and-set, holding the owner's
|
|
@@ -77,7 +77,7 @@ export async function acquireDirectoryLock(
|
|
|
77
77
|
// A half-written owner file reads as unreadable rather than throwing, and is refused below.
|
|
78
78
|
const held = await tryReadLocalJSONFile<DirectoryLockOwner>(ownerPath).catch(() => null)
|
|
79
79
|
|
|
80
|
-
// An owner file that
|
|
80
|
+
// An owner file that's absent or unreadable belongs to a process between its `mkdir`
|
|
81
81
|
// and its write, or to one killed in that window.
|
|
82
82
|
// Neither can be told apart from here, so the caller refuses.
|
|
83
83
|
if (held && held.host === owner.host && held.pid !== process.pid && !processExists(held.pid)) {
|
package/lib/fs/readers/stat.ts
CHANGED
|
@@ -1,6 +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
5
|
* @file Filesystem metadata readers.
|
|
5
6
|
*/
|
|
6
7
|
|
|
@@ -90,7 +91,7 @@ export function pathExists(path: PathBuilderLike | URL): Promise<boolean> {
|
|
|
90
91
|
// #region Assertions
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
|
-
* Assert that a path exists, throwing an error if it
|
|
94
|
+
* Assert that a path exists, throwing an error if it doesn't.
|
|
94
95
|
*/
|
|
95
96
|
export function assertPathExists(path: PathBuilderLike | URL, message?: string | null): Promise<void> {
|
|
96
97
|
return pathExists(path).then((exists) => {
|
|
@@ -112,10 +113,10 @@ export function isDirectory(path: PathBuilderLike | URL): Promise<boolean> {
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
/**
|
|
115
|
-
* Assert that a path exists and is a directory, throwing an error if it
|
|
116
|
+
* Assert that a path exists and is a directory, throwing an error if it doesn't.
|
|
116
117
|
*
|
|
117
118
|
* @category Files
|
|
118
|
-
* @throws {AssertionError} If the path
|
|
119
|
+
* @throws {AssertionError} If the path doesn't exist or isn't a directory.
|
|
119
120
|
*/
|
|
120
121
|
export function assertIsDirectory(
|
|
121
122
|
path: PathBuilderLike | URL,
|
|
@@ -154,10 +155,10 @@ export function assertIsDirectory(
|
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
/**
|
|
157
|
-
* Assert that a path exists and is a file, throwing an error if it
|
|
158
|
+
* Assert that a path exists and is a file, throwing an error if it doesn't.
|
|
158
159
|
*
|
|
159
160
|
* @category Files
|
|
160
|
-
* @throws {AssertionError} If the path
|
|
161
|
+
* @throws {AssertionError} If the path doesn't exist or isn't a file.
|
|
161
162
|
*/
|
|
162
163
|
export function assertIsFile(path: PathBuilderLike | URL, message?: string | null, cachedStats?: Stats): Promise<void> {
|
|
163
164
|
const resolved = cachedStats ? Promise.resolve(cachedStats) : statPath(path)
|
|
@@ -271,7 +272,7 @@ export function entryLeadsToDirectory(entry: Dirent): Promise<boolean> {
|
|
|
271
272
|
/**
|
|
272
273
|
* The size of a file in bytes.
|
|
273
274
|
*
|
|
274
|
-
* @throws Enoent when the file
|
|
275
|
+
* @throws Enoent when the file doesn't exist.
|
|
275
276
|
*/
|
|
276
277
|
export function readFileSize(path: PathBuilderLike | URL): Promise<number> {
|
|
277
278
|
return statPath(path).then((stats) => stats.size)
|
|
@@ -294,7 +295,7 @@ export interface FilesystemSpace {
|
|
|
294
295
|
|
|
295
296
|
/**
|
|
296
297
|
* The space on the filesystem that will hold `path`, read from its nearest
|
|
297
|
-
* existing ancestor when `path`
|
|
298
|
+
* existing ancestor when `path` doesn't exist yet.
|
|
298
299
|
*
|
|
299
300
|
* @throws The system error when the nearest existing ancestor cannot be read.
|
|
300
301
|
*/
|
|
@@ -319,7 +320,7 @@ export async function readFilesystemSpace(path: PathBuilderLike): Promise<Filesy
|
|
|
319
320
|
/**
|
|
320
321
|
* The size of a file, rendered in IEC units (`12.3 MiB`) — the unit for anything a machine measured.
|
|
321
322
|
*
|
|
322
|
-
* @throws Enoent when the file
|
|
323
|
+
* @throws Enoent when the file doesn't exist.
|
|
323
324
|
*/
|
|
324
325
|
export async function formatFileSize(path: PathBuilderLike | URL, options?: ByteFormatterOptions): Promise<string> {
|
|
325
326
|
return ByteFormatter.formatIEC(await readFileSize(path), options)
|
|
@@ -354,7 +355,7 @@ export function open(path: PathBuilderLike | URL, flags?: string | number, mode?
|
|
|
354
355
|
/**
|
|
355
356
|
* The target a symbolic link points at, verbatim — relative if it was written relative.
|
|
356
357
|
*
|
|
357
|
-
* @throws Einval when the path
|
|
358
|
+
* @throws Einval when the path isn't a link, enoent when the path is absent.
|
|
358
359
|
*/
|
|
359
360
|
export function readLink(path: PathBuilderLike): Promise<string> {
|
|
360
361
|
return readlink(path.toString())
|
package/lib/fs/readers.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 The asynchronous read surface. Every reader here takes a {@linkcode PathBuilderLike} and answers a promise.
|
|
6
6
|
*
|
|
7
7
|
* Repository code accesses `node:fs` through this directory. Every reader returns a promise, so executable code
|
|
@@ -31,11 +31,11 @@ export type { FileHandle } from "node:fs/promises"
|
|
|
31
31
|
* That size is enough to sniff a file's format.
|
|
32
32
|
*
|
|
33
33
|
* @returns The bytes read, as a UTF-8 string.
|
|
34
|
-
* @throws Enoent when the file
|
|
34
|
+
* @throws Enoent when the file doesn't exist.
|
|
35
35
|
*/
|
|
36
36
|
export async function readFileHead(path: PathBuilderLike, byteSize: number): Promise<string> {
|
|
37
37
|
// `try`/`finally` rather than `await using`: this module is on the Docusaurus config loader's import path.
|
|
38
|
-
// Its transform
|
|
38
|
+
// Its transform doesn't parse explicit resource management.
|
|
39
39
|
const handle = await open(path, "r")
|
|
40
40
|
|
|
41
41
|
try {
|
|
@@ -59,7 +59,7 @@ export async function readFileHead(path: PathBuilderLike, byteSize: number): Pro
|
|
|
59
59
|
* The count can be smaller than the requested size.
|
|
60
60
|
* The result is shorter than `length` at end of file.
|
|
61
61
|
*
|
|
62
|
-
* @throws Enoent when the file
|
|
62
|
+
* @throws Enoent when the file doesn't exist.
|
|
63
63
|
*/
|
|
64
64
|
export async function readFileRange(path: PathBuilderLike, offset: number, length: number): Promise<Buffer> {
|
|
65
65
|
const handle = await open(path.toString(), "r")
|
|
@@ -129,8 +129,8 @@ export function readLocalJSONFile<_T = Record<string, unknown>>(path: `${string}
|
|
|
129
129
|
/**
|
|
130
130
|
* Read a local JSON file.
|
|
131
131
|
*
|
|
132
|
-
* This parser is strict: a file that
|
|
133
|
-
*
|
|
132
|
+
* This parser is strict: a file that's not JSON throws here rather than returning
|
|
133
|
+
* `undefined` several frames later.
|
|
134
134
|
*
|
|
135
135
|
* @category Files
|
|
136
136
|
* @runtime node
|
|
@@ -150,9 +150,9 @@ export function readLocalJSONFile<
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* Read a local JSON file, answering `null` when the file
|
|
153
|
+
* Read a local JSON file, answering `null` when the file doesn't exist.
|
|
154
154
|
*
|
|
155
|
-
* This parser is strict: a file that
|
|
155
|
+
* This parser is strict: a file that's not JSON throws here rather than
|
|
156
156
|
* returning `null` several frames later.
|
|
157
157
|
*
|
|
158
158
|
* @category Files
|
|
@@ -235,9 +235,19 @@ export async function directoryHasEntries(directory: PathBuilderLike): Promise<b
|
|
|
235
235
|
/**
|
|
236
236
|
* The absolute paths `pattern` matches in `directory`, in code-point order,
|
|
237
237
|
* as Python's `sorted(Path.glob())` lists one directory's files.
|
|
238
|
+
*
|
|
239
|
+
* `onlyFiles: false` also matches directories.
|
|
238
240
|
*/
|
|
239
|
-
export async function sortedGlob(
|
|
240
|
-
|
|
241
|
+
export async function sortedGlob(
|
|
242
|
+
directory: PathBuilderLike,
|
|
243
|
+
pattern: string,
|
|
244
|
+
options: { onlyFiles?: boolean } = {}
|
|
245
|
+
): Promise<string[]> {
|
|
246
|
+
const paths: string[] = await Globerator.from(pattern, {
|
|
247
|
+
cwd: directory.toString(),
|
|
248
|
+
absolute: true,
|
|
249
|
+
onlyFiles: options.onlyFiles ?? true,
|
|
250
|
+
}).toArray()
|
|
241
251
|
|
|
242
252
|
return paths.toSorted(compareByScalarValue)
|
|
243
253
|
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Writes one vintage of a snapshot source.
|
|
6
|
+
*
|
|
7
|
+
* A vintage is read-only once written, and a newer vintage sits beside it.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { PathBuilderLike } from "path-ts"
|
|
11
|
+
|
|
12
|
+
import { pathExists } from "#fs/readers/stat"
|
|
13
|
+
import { makeDirectories, movePath, removePath, removePathIfPresent } from "#fs/writers"
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* How a caller may write a vintage that already exists.
|
|
17
|
+
*/
|
|
18
|
+
export interface SnapshotWriteOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Whether the caller stated the vintage, such as with `--vintage 2026-08-31`.
|
|
21
|
+
*
|
|
22
|
+
* A vintage the command resolved itself, from the date or the publisher's
|
|
23
|
+
* newest release, is never overwritten.
|
|
24
|
+
*/
|
|
25
|
+
vintageFromCaller: boolean
|
|
26
|
+
/**
|
|
27
|
+
* Whether the caller asked to overwrite an existing vintage, such as with `--force`.
|
|
28
|
+
*/
|
|
29
|
+
force?: boolean
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Thrown when a write would replace a vintage that already exists.
|
|
34
|
+
*/
|
|
35
|
+
export class SnapshotExistsError extends Error {
|
|
36
|
+
public readonly path: string
|
|
37
|
+
|
|
38
|
+
constructor(path: string, vintageFromCaller: boolean) {
|
|
39
|
+
super(
|
|
40
|
+
vintageFromCaller
|
|
41
|
+
? `${path} already exists; pass --force to replace this vintage`
|
|
42
|
+
: `${path} already exists; to replace it, state the vintage with --vintage and pass --force`
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
this.name = "SnapshotExistsError"
|
|
46
|
+
this.path = path
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Throws unless {@link writeSnapshot} would accept `target` under `options`.
|
|
52
|
+
*
|
|
53
|
+
* A fetch whose download is long checks this before downloading, so a refused vintage costs no transfer.
|
|
54
|
+
*
|
|
55
|
+
* @returns Whether `target` exists.
|
|
56
|
+
* A `true` answer means the caller may replace it.
|
|
57
|
+
* @throws {SnapshotExistsError} When `target` exists, unless the caller stated
|
|
58
|
+
* the vintage and passed `force`.
|
|
59
|
+
*/
|
|
60
|
+
export async function assertSnapshotWritable(target: PathBuilderLike, options: SnapshotWriteOptions): Promise<boolean> {
|
|
61
|
+
const path = target.toString()
|
|
62
|
+
const exists = await pathExists(path)
|
|
63
|
+
|
|
64
|
+
if (exists && !(options.force && options.vintageFromCaller)) {
|
|
65
|
+
throw new SnapshotExistsError(path, options.vintageFromCaller)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return exists
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Writes the vintage directory `target` through `fill`, which writes into a staging directory beside it.
|
|
73
|
+
*
|
|
74
|
+
* The staging directory replaces `target` only after `fill` resolves, so a failed write
|
|
75
|
+
* leaves an existing vintage as it was and leaves no partial vintage behind.
|
|
76
|
+
*
|
|
77
|
+
* @throws {SnapshotExistsError} When `target` exists, unless the caller stated
|
|
78
|
+
* the vintage and passed `force`.
|
|
79
|
+
*/
|
|
80
|
+
export async function writeSnapshot(
|
|
81
|
+
target: PathBuilderLike,
|
|
82
|
+
options: SnapshotWriteOptions,
|
|
83
|
+
fill: (staging: string) => Promise<void>
|
|
84
|
+
): Promise<void> {
|
|
85
|
+
const path = target.toString()
|
|
86
|
+
const exists = await assertSnapshotWritable(path, options)
|
|
87
|
+
const staging = `${path}.staging-${process.pid}`
|
|
88
|
+
|
|
89
|
+
await removePathIfPresent(staging)
|
|
90
|
+
await makeDirectories(staging)
|
|
91
|
+
|
|
92
|
+
try {
|
|
93
|
+
await fill(staging)
|
|
94
|
+
} catch (error) {
|
|
95
|
+
await removePathIfPresent(staging)
|
|
96
|
+
|
|
97
|
+
throw error
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (!exists) {
|
|
101
|
+
await movePath(staging, path)
|
|
102
|
+
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const replaced = `${path}.replaced-${process.pid}`
|
|
107
|
+
|
|
108
|
+
await movePath(path, replaced)
|
|
109
|
+
await movePath(staging, path)
|
|
110
|
+
await removePath(replaced)
|
|
111
|
+
}
|
package/lib/fs/streams.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 Byte streams over a path, taking a {@linkcode PathBuilderLike} like the rest of `@mailwoman/core/fs`.
|
|
6
6
|
*
|
|
7
7
|
* `createReadStream` returns immediately. The work happens as the consumer pulls from the stream.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `packages/core/lib/fs/*` is the only directory that imports it.
|
|
11
11
|
*
|
|
12
12
|
* These are thin. What they add is the path type and one import site, so a caller that already imports the readers
|
|
13
|
-
*
|
|
13
|
+
* doesn't reach past them for a stream.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { createReadStream, createWriteStream, type ReadStream, type WriteStream } from "node:fs"
|
|
@@ -38,7 +38,7 @@ export function openReadStream(path: PathBuilderLike, options?: Parameters<typeo
|
|
|
38
38
|
/**
|
|
39
39
|
* Open a path for streaming writes.
|
|
40
40
|
*
|
|
41
|
-
* Unlike the file writers in `./writers.ts`, this
|
|
41
|
+
* Unlike the file writers in `./writers.ts`, this doesn't create the parent directory:
|
|
42
42
|
* a stream that fails on the first chunk rather than at open time reports the missing
|
|
43
43
|
* directory somewhere the caller is no longer looking.
|
|
44
44
|
* Call `makeDirectories` first where the parent may be absent.
|
|
@@ -50,9 +50,9 @@ export function openReadStream(path: PathBuilderLike, options?: Parameters<typeo
|
|
|
50
50
|
* portal ships CP949, Japan's postcode file Shift_JIS.
|
|
51
51
|
* `spliterator` splits UTF-8 bytes, so the decode happens upstream of the split rather than after it.
|
|
52
52
|
*
|
|
53
|
-
* A line boundary found in CP949 bytes
|
|
53
|
+
* A line boundary found in CP949 bytes isn't a line boundary.
|
|
54
54
|
*
|
|
55
|
-
* Not `TextDecoder`, and the difference
|
|
55
|
+
* Not `TextDecoder`, and the difference isn't small.
|
|
56
56
|
* Node's whatwg `euc-kr` implements EUC-KR proper (KS X 1001) and not the UHC
|
|
57
57
|
* extension CP949 adds in lead bytes 0x81–0xA0.
|
|
58
58
|
*
|
|
@@ -60,7 +60,7 @@ export function openReadStream(path: PathBuilderLike, options?: Parameters<typeo
|
|
|
60
60
|
* differently: 6,475 become U+fffd and 2,349 become a different character with no error raised.
|
|
61
61
|
* `iconv-lite` disagrees with `cp949` on none of the 17,048.
|
|
62
62
|
*
|
|
63
|
-
* It
|
|
63
|
+
* It isn't a rare corner.
|
|
64
64
|
* One row in 48,000 of the Korean address register contains such a sequence.
|
|
65
65
|
*
|
|
66
66
|
* `더샾오피스텔`, bytes `b4 f5 98 de bf c0 c7 c7 bd ba c5 da`, which `TextDecoder` reads as `더乍의퓰뵀�`.
|
|
@@ -102,7 +102,7 @@ export async function* decodeByteStream(
|
|
|
102
102
|
* Same reasoning, same reason not to reach for `TextDecoder`, and it lives here
|
|
103
103
|
* so a reader that finds one finds the other.
|
|
104
104
|
* Use this when the whole file is a bounded size the publisher fixes.
|
|
105
|
-
* Use the stream when it
|
|
105
|
+
* Use the stream when it isn't.
|
|
106
106
|
*
|
|
107
107
|
* @category Files
|
|
108
108
|
* @param encoding An `iconv-lite` label — `cp949`, `cp932`, `gbk`.
|
package/lib/fs/temporary.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 Scratch directories that remove themselves.
|
|
6
6
|
*
|
|
7
7
|
* Rooted at `$MAILWOMAN_TEMP_ROOT` rather than the operating system's `tmpdir()`, which is why this lives in
|
|
@@ -65,7 +65,7 @@ function asTemporaryDirectory(_path: PathBuilderLike, resources: AsyncDisposable
|
|
|
65
65
|
/**
|
|
66
66
|
* Create a new temporary directory under `$MAILWOMAN_TEMP_ROOT`, removed when the owning scope ends.
|
|
67
67
|
*
|
|
68
|
-
* The root is created if it
|
|
68
|
+
* The root is created if it doesn't exist, because `mkdtemp` fails on a missing parent.
|
|
69
69
|
*/
|
|
70
70
|
export async function temporaryDirectory(prefix = "mailwoman-"): Promise<TemporaryDirectory> {
|
|
71
71
|
const root = tempRootPathBuilder()
|
package/lib/fs/writers.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 Asynchronous file-system writers that take a {@linkcode PathBuilderLike} and return a promise.
|
|
6
6
|
*
|
|
7
7
|
* Every file writer creates the parent directory first.
|
|
@@ -262,7 +262,7 @@ export async function appendLocalTextFile<S extends PathBuilderLike[]>(
|
|
|
262
262
|
/**
|
|
263
263
|
* Removes a file, or a directory and everything under it.
|
|
264
264
|
*
|
|
265
|
-
* @throws {Error} If the path
|
|
265
|
+
* @throws {Error} If the path doesn't exist.
|
|
266
266
|
* @see {@linkcode removePathIfPresent} for a version that ignores a missing path.
|
|
267
267
|
*/
|
|
268
268
|
export function removePath(path: PathBuilderLike): Promise<void> {
|
|
@@ -273,7 +273,7 @@ export function removePath(path: PathBuilderLike): Promise<void> {
|
|
|
273
273
|
* Removes a directory only when it is empty, and reports whether it did.
|
|
274
274
|
*
|
|
275
275
|
* A directory that still holds an entry is kept and returns `false`, so a caller
|
|
276
|
-
* that deleted the files it owns never removes one it
|
|
276
|
+
* that deleted the files it owns never removes one it doesn't.
|
|
277
277
|
* A missing directory raises.
|
|
278
278
|
*/
|
|
279
279
|
export async function removeEmptyDirectory(path: PathBuilderLike): Promise<boolean> {
|
|
@@ -338,7 +338,7 @@ export function removePathIfPresent(path: PathBuilderLike): Promise<void> {
|
|
|
338
338
|
* so the bytes a partial run wrote after the checkpoint are removed rather than duplicated.
|
|
339
339
|
*
|
|
340
340
|
* @throws {Error} If the file is shorter than `length`, because the checkpoint then describes
|
|
341
|
-
* bytes the file
|
|
341
|
+
* bytes the file doesn't have and extending it with zeroes would corrupt the output.
|
|
342
342
|
*/
|
|
343
343
|
export async function truncateFile(path: PathBuilderLike, length: number): Promise<void> {
|
|
344
344
|
const stats = await statPath(path)
|