@mailwoman/core 11.0.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 +3 -3
- package/lib/cloudflare/wrangler.ts +58 -7
- package/lib/cloudflare.ts +5 -5
- 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 +10 -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 +4 -4
- package/lib/network/reachability.ts +3 -3
- 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 -8
- 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 +4 -15
- package/lib/resolver.ts +9 -9
- 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 +9 -8
- package/lib/scripting/command.ts +6 -5
- package/lib/scripting/ingest-chunk-script.ts +5 -6
- package/lib/scripting/operation.ts +36 -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 +0 -8
- package/out/cloudflare/tokens.d.ts.map +1 -1
- package/out/cloudflare/tokens.js +2 -3
- package/out/cloudflare/tokens.js.map +1 -1
- package/out/cloudflare/wrangler.d.ts +14 -8
- package/out/cloudflare/wrangler.d.ts.map +1 -1
- package/out/cloudflare/wrangler.js +44 -7
- package/out/cloudflare/wrangler.js.map +1 -1
- package/out/cloudflare.d.ts +2 -5
- package/out/cloudflare.d.ts.map +1 -1
- package/out/cloudflare.js +4 -5
- package/out/cloudflare.js.map +1 -1
- 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 +1 -11
- package/out/geocode/result.d.ts.map +1 -1
- package/out/geocode/result.js +9 -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 +1 -8
- package/out/network/connectivity.d.ts.map +1 -1
- package/out/network/connectivity.js +2 -7
- package/out/network/connectivity.js.map +1 -1
- package/out/network/reachability.d.ts +0 -3
- package/out/network/reachability.d.ts.map +1 -1
- package/out/network/reachability.js +2 -3
- package/out/network/reachability.js.map +1 -1
- 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 -8
- 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 +2 -14
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +2 -6
- package/out/resolver/types.js.map +1 -1
- package/out/resolver.d.ts +6 -9
- package/out/resolver.d.ts.map +1 -1
- package/out/resolver.js +8 -9
- 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 +6 -8
- 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 +31 -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 +48 -17
- 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,121 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
/**
|
|
4
|
+
* @file A streaming Deflate64 inflater over the committed `wasm/deflate64.wasm`.
|
|
5
|
+
*
|
|
6
|
+
* Deflate64 is zip compression method 9. Node's zlib has no Deflate64 and yauzl refuses the method, so
|
|
7
|
+
* {@link inflateDeflate64} decompresses a member's raw bytes through `crates/deflate64-wasm`, an adapter over
|
|
8
|
+
* the MIT-licensed `deflate64` crate. Each call instantiates its own module, stages one compressed chunk at
|
|
9
|
+
* a time in linear memory, and copies each filled output span out before reusing it. The decoder keeps a
|
|
10
|
+
* 128 KiB window, so memory stays fixed whatever the member's size.
|
|
11
|
+
*/
|
|
12
|
+
import { readLocalBuffer } from "#fs/readers";
|
|
13
|
+
import { memoizeResettable } from "#memoize";
|
|
14
|
+
/**
|
|
15
|
+
* The location of the committed `wasm/deflate64.wasm`, resolved from this module.
|
|
16
|
+
*
|
|
17
|
+
* The same relative path holds from `lib/fs/` in the repository and from `out/fs/` in a tarball.
|
|
18
|
+
*/
|
|
19
|
+
export function deflate64WASMURL() {
|
|
20
|
+
return new URL("../../wasm/deflate64.wasm", import.meta.url);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The codes `d64_inflate` answers, equal to `deflate64_wasm::status`.
|
|
24
|
+
*/
|
|
25
|
+
const Status = {
|
|
26
|
+
More: 0,
|
|
27
|
+
Done: 1,
|
|
28
|
+
DataError: -1,
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The output span each inflate call fills before its bytes are copied out.
|
|
32
|
+
*/
|
|
33
|
+
const OUTPUT_SPAN = 256 * 1024;
|
|
34
|
+
/**
|
|
35
|
+
* The module, compiled once per process.
|
|
36
|
+
* A failed read or compile is retried by the next inflate.
|
|
37
|
+
*/
|
|
38
|
+
const compiledModule = memoizeResettable(() => readLocalBuffer(deflate64WASMURL()).then((bytes) => WebAssembly.compile(new Uint8Array(bytes))));
|
|
39
|
+
/**
|
|
40
|
+
* A staging span in linear memory, kept while it is large enough and replaced when a chunk outgrows it.
|
|
41
|
+
*/
|
|
42
|
+
class Staging {
|
|
43
|
+
ptr = 0;
|
|
44
|
+
len = 0;
|
|
45
|
+
#exports;
|
|
46
|
+
constructor(exports) {
|
|
47
|
+
this.#exports = exports;
|
|
48
|
+
}
|
|
49
|
+
reserve(len) {
|
|
50
|
+
if (len > this.len) {
|
|
51
|
+
this.release();
|
|
52
|
+
this.ptr = this.#exports.d64_alloc(len);
|
|
53
|
+
this.len = len;
|
|
54
|
+
}
|
|
55
|
+
return this.ptr;
|
|
56
|
+
}
|
|
57
|
+
release() {
|
|
58
|
+
if (this.len) {
|
|
59
|
+
this.#exports.d64_dealloc(this.ptr, this.len);
|
|
60
|
+
}
|
|
61
|
+
this.len = 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Inflate a raw Deflate64 stream.
|
|
66
|
+
*
|
|
67
|
+
* A method 9 zip member read with yauzl's `decompress: false` is such a stream.
|
|
68
|
+
* Each yielded chunk is a fresh copy the consumer may keep.
|
|
69
|
+
*
|
|
70
|
+
* A consumer that stops early ends the source's iteration.
|
|
71
|
+
* The decoder's memory is released on every exit.
|
|
72
|
+
*
|
|
73
|
+
* @category Files
|
|
74
|
+
* @throws When the bytes are not a valid Deflate64 stream, or when the source ends
|
|
75
|
+
* before the stream's final block.
|
|
76
|
+
*/
|
|
77
|
+
export async function* inflateDeflate64(source) {
|
|
78
|
+
const { exports } = await WebAssembly.instantiate(await compiledModule(), {});
|
|
79
|
+
const decoder = exports.d64_new();
|
|
80
|
+
const input = new Staging(exports);
|
|
81
|
+
const output = new Staging(exports);
|
|
82
|
+
const outputPtr = output.reserve(OUTPUT_SPAN);
|
|
83
|
+
let consumedTotal = 0;
|
|
84
|
+
try {
|
|
85
|
+
for await (const chunk of source) {
|
|
86
|
+
const inputPtr = input.reserve(chunk.byteLength);
|
|
87
|
+
// `memory.buffer` is re-read after every allocation, because growth detaches the previous buffer.
|
|
88
|
+
new Uint8Array(exports.memory.buffer, inputPtr, chunk.byteLength).set(chunk);
|
|
89
|
+
let offset = 0;
|
|
90
|
+
for (;;) {
|
|
91
|
+
const status = exports.d64_inflate(decoder, inputPtr + offset, chunk.byteLength - offset, outputPtr, OUTPUT_SPAN);
|
|
92
|
+
const consumed = exports.d64_consumed(decoder);
|
|
93
|
+
const written = exports.d64_written(decoder);
|
|
94
|
+
offset += consumed;
|
|
95
|
+
consumedTotal += consumed;
|
|
96
|
+
if (written) {
|
|
97
|
+
yield new Uint8Array(exports.memory.buffer, outputPtr, written).slice();
|
|
98
|
+
}
|
|
99
|
+
if (status === Status.DataError) {
|
|
100
|
+
throw new Error(`Deflate64 stream is invalid near compressed byte ${consumedTotal}`);
|
|
101
|
+
}
|
|
102
|
+
if (status === Status.Done)
|
|
103
|
+
return;
|
|
104
|
+
// The output span had room and the chunk is spent, so the decoder needs the next chunk.
|
|
105
|
+
if (offset >= chunk.byteLength && written < OUTPUT_SPAN)
|
|
106
|
+
break;
|
|
107
|
+
// A call that consumes zero bytes and writes zero bytes would repeat forever on the same arguments.
|
|
108
|
+
if (!consumed && !written) {
|
|
109
|
+
throw new Error(`Deflate64 decoder stalled at compressed byte ${consumedTotal}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
throw new Error(`Deflate64 stream ended after ${consumedTotal} compressed bytes, before its final block`);
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
input.release();
|
|
117
|
+
output.release();
|
|
118
|
+
exports.d64_free(decoder);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=deflate64.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deflate64.js","sourceRoot":"","sources":["../../lib/fs/deflate64.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC/B,OAAO,IAAI,GAAG,CAAC,2BAA2B,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAA;AAC7D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AC;gBAED,IAAI,MAAM,KAAK,MAAM,CAAC,SAAS,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CAAC,oDAAoD,aAAa,EAAE,CAAC,CAAA;gBACrF,CAAC;gBAED,IAAI,MAAM,KAAK,MAAM,CAAC,IAAI;oBAAE,OAAM;gBAElC,wFAAwF;gBACxF,IAAI,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,OAAO,GAAG,WAAW;oBAAE,MAAK;gBAE9D,oGAAoG;gBACpG,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;oBAC3B,MAAM,IAAI,KAAK,CAAC,gDAAgD,aAAa,EAAE,CAAC,CAAA;gBACjF,CAAC;YACF,CAAC;QACF,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,gCAAgC,aAAa,2CAA2C,CAAC,CAAA;IAC1G,CAAC;YAAS,CAAC;QACV,KAAK,CAAC,OAAO,EAAE,CAAA;QACf,MAAM,CAAC,OAAO,EAAE,CAAA;QAChB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC1B,CAAC;AACF,CAAC"}
|
package/out/fs/delimited.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
2
|
* @file Reads a delimited file whose `"` is an ordinary character.
|
|
6
3
|
*
|
|
7
4
|
* A quote-aware reader over unquoted input still returns rows.
|
|
@@ -11,7 +8,7 @@
|
|
|
11
8
|
*
|
|
12
9
|
* The GeoNames country dumps are unquoted TSV and contain `"` in place names (`Ovrag Kyzylak"on`).
|
|
13
10
|
* 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
|
|
11
|
+
* the input throws. These readers still pass `enableQuoteHandling: false` so their contract doesn't rest
|
|
15
12
|
* on a default.
|
|
16
13
|
*
|
|
17
14
|
* A quote-aware reader of CSV text indexes its header with {@linkcode headerColumnIndex} and passes its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delimited.d.ts","sourceRoot":"","sources":["../../lib/fs/delimited.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delimited.d.ts","sourceRoot":"","sources":["../../lib/fs/delimited.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAK9E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,CAKpE;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAyBvF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAU9F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAIlF"}
|
package/out/fs/delimited.js
CHANGED
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file Reads a delimited file whose `"` is an ordinary character.
|
|
6
|
-
*
|
|
7
|
-
* A quote-aware reader over unquoted input still returns rows.
|
|
8
|
-
* It joins every line between one `"` and the next into one record.
|
|
9
|
-
* The caller then sees a shorter file and reads a smaller dataset.
|
|
10
|
-
* Downstream counts cannot distinguish this result from a small source file.
|
|
11
|
-
*
|
|
12
|
-
* The GeoNames country dumps are unquoted TSV and contain `"` in place names (`Ovrag Kyzylak"on`).
|
|
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 does not rest
|
|
15
|
-
* on a default.
|
|
16
|
-
*
|
|
17
|
-
* A quote-aware reader of CSV text indexes its header with {@linkcode headerColumnIndex} and passes its
|
|
18
|
-
* record count to {@linkcode checkRecordCount}. A quote that opens and closes across lines shortens that
|
|
19
|
-
* read without an error, so the count check still applies.
|
|
20
|
-
*
|
|
21
|
-
* Compressed sources are read as given: spliterator decompresses zstd and gzip by their magic bytes, and
|
|
22
|
-
* reads a path's `.zst` sibling in its place when that exists.
|
|
23
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
24
3
|
import { TextSpliterator, TSVSpliterator } from "spliterator";
|
|
25
4
|
/**
|
|
26
5
|
* Stream the records of an unquoted tab-separated file, for any source whose `"` is literal.
|
package/out/fs/delimited.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delimited.js","sourceRoot":"","sources":["../../lib/fs/delimited.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"delimited.js","sourceRoot":"","sources":["../../lib/fs/delimited.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAwBlE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE7D;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,IAAqB;IACpD,OAAO,cAAc,CAAC,SAAS,CAAC,IAAI,EAAE;QACrC,MAAM,EAAE,KAAK;QACb,mBA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KAAK,IAAI,CAAC,CAAA;QAExF,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IAC1B,CAAC;IAED,OAAO,OAAO,CAAA;AACf,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,IAAY,EAAE,OAAe;IAC3E,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,CAAA;IAEjE,IAAI,OAAO,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,UAAU,OAAO,iBAAiB,SAAS,cAAc,CAAC,CAAA;AAC7G,CAAC"}
|
package/out/fs/formatters.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../lib/fs/formatters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../lib/fs/formatters.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,OAAO,CAAA;AAEjC,MAAM,WAAW,oBAAoB;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;CAC9B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAa;IACzB,OAAc,QAAQ,YAAI,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAU;IAC1F,OAAc,SAAS,YAAI,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAU;IAEpE,OAAc,MAAM,gBAAsB;IAE1C;;;;;OAKG;IACH,OAAc,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAE5E;IAED;;;;;;OAMG;IACH,OAAc,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAE7E;IAED,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;IAExC,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe,EAEzC;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAkBrE;IAED;;;;;OAKG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAiBtE;CACD"}
|
package/out/fs/formatters.js
CHANGED
package/out/fs/formatters.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../lib/fs/formatters.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../lib/fs/formatters.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAA;AAgBjC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,aAAa;IAClB,MAAM,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;IACnF,MAAM,CAAC,SAAS,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAA;IAE7D,MAAM,CAAC,MAAM,GAAG,IAAI,aAAa,EAAE,CAAA;IAE1C;;;;;OAKG;IACI,MAAM,CAAC,QAAQ,CAAC,KAAa,EAAE,OAA8B;QACnE,OAAO,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC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,IAAI,IAAI,CAAA;YAEb,IAAI,EAAE,CAAA;QACP,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE;YACzE,qBAAqB,EAAE,CAAC;YACxB,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM;SACpD,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAEhB,OAAO,GAAG,SAAS,IAAI,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAA;IACvD,CAAC;CACD"}
|
package/out/fs/lock.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
2
|
* @file An exclusive lock held as a directory for as long as its owner runs.
|
|
6
3
|
*
|
|
7
4
|
* The lock is a directory created with a non-recursive `mkdir`, an atomic test-and-set, holding the owner's
|
package/out/fs/lock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../lib/fs/lock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../lib/fs/lock.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAO9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,eAAe;IACrD,KAAK,EAAE,kBAAkB,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;CACZ;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAQlD;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI,KAAK,MAAM,GAClD,OAAO,CAAC,aAAa,CAAC,CA2CxB"}
|
package/out/fs/lock.js
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file An exclusive lock held as a directory for as long as its owner runs.
|
|
6
|
-
*
|
|
7
|
-
* The lock is a directory created with a non-recursive `mkdir`, an atomic test-and-set, holding the owner's
|
|
8
|
-
* pid, host and start time. A second process refuses while the owner lives. A lock whose owner was a process
|
|
9
|
-
* on this host that no longer exists was left by a killed process, and the next caller takes it over. A lock
|
|
10
|
-
* held from another host is never taken over, because its owner's liveness cannot be read from here.
|
|
11
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
12
3
|
import { tryReadLocalJSONFile } from "#fs/readers";
|
|
13
4
|
import { makeDirectoryExclusive, removePathIfPresent, writeLocalJSONFile } from "#fs/writers";
|
|
14
5
|
import { stringifyJSON } from "#json";
|
|
@@ -49,7 +40,7 @@ export async function acquireDirectoryLock(lockDir, refusal) {
|
|
|
49
40
|
throw error;
|
|
50
41
|
// A half-written owner file reads as unreadable rather than throwing, and is refused below.
|
|
51
42
|
const held = await tryReadLocalJSONFile(ownerPath).catch(() => null);
|
|
52
|
-
// An owner file that
|
|
43
|
+
// An owner file that's absent or unreadable belongs to a process between its `mkdir`
|
|
53
44
|
// and its write, or to one killed in that window.
|
|
54
45
|
// Neither can be told apart from here, so the caller refuses.
|
|
55
46
|
if (held && held.host === owner.host && held.pid !== process.pid && !processExists(held.pid)) {
|
package/out/fs/lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../lib/fs/lock.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../lib/fs/lock.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAalE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAqBxC;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACxC,IAAI,CAAC;QACJ,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QAEpB,OAAO,IAAI,CAAA;IACZ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAQ,KAA+B,CAAC,IAAI,KAAK,OAAO,CAAA;IACzD,CAAC;AACF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACzC,OAAwB,EACxB,OAAoD;IAEpD,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAA;IAC/B,MAAM,SAAS,GAAG,GAAG,IAAI,aAAa,CAAA;IACtC,MAAM,KAAK,GAAuB,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAA;IAE9G,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;QAC9C,IAAI,CAAC;YACJ,MAA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software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @file Filesystem metadata readers.
|
|
5
|
-
*/
|
|
6
1
|
import { type Dirent, type Mode, type Stats } from "node:fs";
|
|
7
2
|
import { type FileHandle } from "node:fs/promises";
|
|
8
3
|
import { type PathBuilderLike } from "path-ts";
|
|
@@ -44,7 +39,7 @@ export declare function tryStatLink(path: PathBuilderLike | URL): Promise<Stats
|
|
|
44
39
|
*/
|
|
45
40
|
export declare function pathExists(path: PathBuilderLike | URL): Promise<boolean>;
|
|
46
41
|
/**
|
|
47
|
-
* Assert that a path exists, throwing an error if it
|
|
42
|
+
* Assert that a path exists, throwing an error if it doesn't.
|
|
48
43
|
*/
|
|
49
44
|
export declare function assertPathExists(path: PathBuilderLike | URL, message?: string | null): Promise<void>;
|
|
50
45
|
/**
|
|
@@ -52,17 +47,17 @@ export declare function assertPathExists(path: PathBuilderLike | URL, message?:
|
|
|
52
47
|
*/
|
|
53
48
|
export declare function isDirectory(path: PathBuilderLike | URL): Promise<boolean>;
|
|
54
49
|
/**
|
|
55
|
-
* Assert that a path exists and is a directory, throwing an error if it
|
|
50
|
+
* Assert that a path exists and is a directory, throwing an error if it doesn't.
|
|
56
51
|
*
|
|
57
52
|
* @category Files
|
|
58
|
-
* @throws {AssertionError} If the path
|
|
53
|
+
* @throws {AssertionError} If the path doesn't exist or isn't a directory.
|
|
59
54
|
*/
|
|
60
55
|
export declare function assertIsDirectory(path: PathBuilderLike | URL, message?: string | null, cachedStats?: Stats): Promise<void>;
|
|
61
56
|
/**
|
|
62
|
-
* Assert that a path exists and is a file, throwing an error if it
|
|
57
|
+
* Assert that a path exists and is a file, throwing an error if it doesn't.
|
|
63
58
|
*
|
|
64
59
|
* @category Files
|
|
65
|
-
* @throws {AssertionError} If the path
|
|
60
|
+
* @throws {AssertionError} If the path doesn't exist or isn't a file.
|
|
66
61
|
*/
|
|
67
62
|
export declare function assertIsFile(path: PathBuilderLike | URL, message?: string | null, cachedStats?: Stats): Promise<void>;
|
|
68
63
|
/**
|
|
@@ -107,7 +102,7 @@ export declare function entryLeadsToDirectory(entry: Dirent): Promise<boolean>;
|
|
|
107
102
|
/**
|
|
108
103
|
* The size of a file in bytes.
|
|
109
104
|
*
|
|
110
|
-
* @throws Enoent when the file
|
|
105
|
+
* @throws Enoent when the file doesn't exist.
|
|
111
106
|
*/
|
|
112
107
|
export declare function readFileSize(path: PathBuilderLike | URL): Promise<number>;
|
|
113
108
|
/**
|
|
@@ -126,7 +121,7 @@ export interface FilesystemSpace {
|
|
|
126
121
|
}
|
|
127
122
|
/**
|
|
128
123
|
* The space on the filesystem that will hold `path`, read from its nearest
|
|
129
|
-
* existing ancestor when `path`
|
|
124
|
+
* existing ancestor when `path` doesn't exist yet.
|
|
130
125
|
*
|
|
131
126
|
* @throws The system error when the nearest existing ancestor cannot be read.
|
|
132
127
|
*/
|
|
@@ -134,7 +129,7 @@ export declare function readFilesystemSpace(path: PathBuilderLike): Promise<File
|
|
|
134
129
|
/**
|
|
135
130
|
* The size of a file, rendered in IEC units (`12.3 MiB`) — the unit for anything a machine measured.
|
|
136
131
|
*
|
|
137
|
-
* @throws Enoent when the file
|
|
132
|
+
* @throws Enoent when the file doesn't exist.
|
|
138
133
|
*/
|
|
139
134
|
export declare function formatFileSize(path: PathBuilderLike | URL, options?: ByteFormatterOptions): Promise<string>;
|
|
140
135
|
/**
|
|
@@ -153,7 +148,7 @@ export declare function open(path: PathBuilderLike | URL, flags?: string | numbe
|
|
|
153
148
|
/**
|
|
154
149
|
* The target a symbolic link points at, verbatim — relative if it was written relative.
|
|
155
150
|
*
|
|
156
|
-
* @throws Einval when the path
|
|
151
|
+
* @throws Einval when the path isn't a link, enoent when the path is absent.
|
|
157
152
|
*/
|
|
158
153
|
export declare function readLink(path: PathBuilderLike): Promise<string>;
|
|
159
154
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat.d.ts","sourceRoot":"","sources":["../../../lib/fs/readers/stat.ts"],"names":[],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O,CAAC,eAAe,CAAC,CAgBzF;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAEjH;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMzE;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAE3G;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAE/D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAElE"}
|
package/out/fs/readers/stat.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
1
3
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
4
|
* @file Filesystem metadata readers.
|
|
5
5
|
*/
|
|
6
6
|
import { AssertionError } from "node:assert";
|
|
@@ -67,7 +67,7 @@ export function pathExists(path) {
|
|
|
67
67
|
// #endregion
|
|
68
68
|
// #region Assertions
|
|
69
69
|
/**
|
|
70
|
-
* Assert that a path exists, throwing an error if it
|
|
70
|
+
* Assert that a path exists, throwing an error if it doesn't.
|
|
71
71
|
*/
|
|
72
72
|
export function assertPathExists(path, message) {
|
|
73
73
|
return pathExists(path).then((exists) => {
|
|
@@ -87,10 +87,10 @@ export function isDirectory(path) {
|
|
|
87
87
|
return tryStat(path).then((stats) => stats?.isDirectory() ?? false);
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* Assert that a path exists and is a directory, throwing an error if it
|
|
90
|
+
* Assert that a path exists and is a directory, throwing an error if it doesn't.
|
|
91
91
|
*
|
|
92
92
|
* @category Files
|
|
93
|
-
* @throws {AssertionError} If the path
|
|
93
|
+
* @throws {AssertionError} If the path doesn't exist or isn't a directory.
|
|
94
94
|
*/
|
|
95
95
|
export function assertIsDirectory(path, message, cachedStats) {
|
|
96
96
|
const resolved = cachedStats ? Promise.resolve(cachedStats) : statPath(path);
|
|
@@ -120,10 +120,10 @@ export function assertIsDirectory(path, message, cachedStats) {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
|
-
* Assert that a path exists and is a file, throwing an error if it
|
|
123
|
+
* Assert that a path exists and is a file, throwing an error if it doesn't.
|
|
124
124
|
*
|
|
125
125
|
* @category Files
|
|
126
|
-
* @throws {AssertionError} If the path
|
|
126
|
+
* @throws {AssertionError} If the path doesn't exist or isn't a file.
|
|
127
127
|
*/
|
|
128
128
|
export function assertIsFile(path, message, cachedStats) {
|
|
129
129
|
const resolved = cachedStats ? Promise.resolve(cachedStats) : statPath(path);
|
|
@@ -218,14 +218,14 @@ export function entryLeadsToDirectory(entry) {
|
|
|
218
218
|
/**
|
|
219
219
|
* The size of a file in bytes.
|
|
220
220
|
*
|
|
221
|
-
* @throws Enoent when the file
|
|
221
|
+
* @throws Enoent when the file doesn't exist.
|
|
222
222
|
*/
|
|
223
223
|
export function readFileSize(path) {
|
|
224
224
|
return statPath(path).then((stats) => stats.size);
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
227
227
|
* The space on the filesystem that will hold `path`, read from its nearest
|
|
228
|
-
* existing ancestor when `path`
|
|
228
|
+
* existing ancestor when `path` doesn't exist yet.
|
|
229
229
|
*
|
|
230
230
|
* @throws The system error when the nearest existing ancestor cannot be read.
|
|
231
231
|
*/
|
|
@@ -247,7 +247,7 @@ export async function readFilesystemSpace(path) {
|
|
|
247
247
|
/**
|
|
248
248
|
* The size of a file, rendered in IEC units (`12.3 MiB`) — the unit for anything a machine measured.
|
|
249
249
|
*
|
|
250
|
-
* @throws Enoent when the file
|
|
250
|
+
* @throws Enoent when the file doesn't exist.
|
|
251
251
|
*/
|
|
252
252
|
export async function formatFileSize(path, options) {
|
|
253
253
|
return ByteFormatter.formatIEC(await readFileSize(path), options);
|
|
@@ -278,7 +278,7 @@ export function open(path, flags, mode) {
|
|
|
278
278
|
/**
|
|
279
279
|
* The target a symbolic link points at, verbatim — relative if it was written relative.
|
|
280
280
|
*
|
|
281
|
-
* @throws Einval when the path
|
|
281
|
+
* @throws Einval when the path isn't a link, enoent when the path is absent.
|
|
282
282
|
*/
|
|
283
283
|
export function readLink(path) {
|
|
284
284
|
return readlink(path.toString());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat.js","sourceRoot":"","sources":["../../../lib/fs/readers/stat.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stat.js","sourceRoot":"","sources":["../../../lib/fs/readers/stat.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAsC,QAAQ,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,EACN,IAAI,IAAI,UAAU,EAClB,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,MAAM,GAEN,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAwB,WAAW,EAAE,MAAM,SAAS,CAAA;AAE3D,OAAO,EAAE,aAAa,EAA6B,MAAM,gBAAgB,CAAA;AAEzE,qBAAqB;A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* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file The asynchronous read surface. Every reader here takes a {@linkcode PathBuilderLike} and answers a promise.
|
|
6
|
-
*
|
|
7
|
-
* Repository code accesses `node:fs` through this directory. Every reader returns a promise, so executable code
|
|
8
|
-
* makes no blocking filesystem calls. The `debt` check in `lib/repo-health` counts any violations.
|
|
9
|
-
*/
|
|
10
1
|
import { type PathBuilderLike } from "path-ts";
|
|
11
2
|
export type { Dirent, PathLike, Stats } from "node:fs";
|
|
12
3
|
export type { FileHandle } from "node:fs/promises";
|
|
@@ -18,7 +9,7 @@ export type { FileHandle } from "node:fs/promises";
|
|
|
18
9
|
* That size is enough to sniff a file's format.
|
|
19
10
|
*
|
|
20
11
|
* @returns The bytes read, as a UTF-8 string.
|
|
21
|
-
* @throws Enoent when the file
|
|
12
|
+
* @throws Enoent when the file doesn't exist.
|
|
22
13
|
*/
|
|
23
14
|
export declare function readFileHead(path: PathBuilderLike, byteSize: number): Promise<string>;
|
|
24
15
|
/**
|
|
@@ -32,7 +23,7 @@ export declare function readFileHead(path: PathBuilderLike, byteSize: number): P
|
|
|
32
23
|
* The count can be smaller than the requested size.
|
|
33
24
|
* The result is shorter than `length` at end of file.
|
|
34
25
|
*
|
|
35
|
-
* @throws Enoent when the file
|
|
26
|
+
* @throws Enoent when the file doesn't exist.
|
|
36
27
|
*/
|
|
37
28
|
export declare function readFileRange(path: PathBuilderLike, offset: number, length: number): Promise<Buffer>;
|
|
38
29
|
/**
|
|
@@ -60,8 +51,8 @@ export declare function readLocalJSONFile<_T = Record<string, unknown>>(path: `$
|
|
|
60
51
|
/**
|
|
61
52
|
* Read a local JSON file.
|
|
62
53
|
*
|
|
63
|
-
* This parser is strict: a file that
|
|
64
|
-
*
|
|
54
|
+
* This parser is strict: a file that's not JSON throws here rather than returning
|
|
55
|
+
* `undefined` several frames later.
|
|
65
56
|
*
|
|
66
57
|
* @category Files
|
|
67
58
|
* @runtime node
|
|
@@ -70,9 +61,9 @@ export declare function readLocalJSONFile<_T = Record<string, unknown>>(path: `$
|
|
|
70
61
|
*/
|
|
71
62
|
export declare function readLocalJSONFile<T = Record<string, unknown>, S extends Array<PathBuilderLike | URL> = Array<PathBuilderLike | URL>>(...pathSegments: S): Promise<T>;
|
|
72
63
|
/**
|
|
73
|
-
* Read a local JSON file, answering `null` when the file
|
|
64
|
+
* Read a local JSON file, answering `null` when the file doesn't exist.
|
|
74
65
|
*
|
|
75
|
-
* This parser is strict: a file that
|
|
66
|
+
* This parser is strict: a file that's not JSON throws here rather than
|
|
76
67
|
* returning `null` several frames later.
|
|
77
68
|
*
|
|
78
69
|
* @category Files
|
|
@@ -115,6 +106,10 @@ export declare function directoryHasEntries(directory: PathBuilderLike): Promise
|
|
|
115
106
|
/**
|
|
116
107
|
* The absolute paths `pattern` matches in `directory`, in code-point order,
|
|
117
108
|
* as Python's `sorted(Path.glob())` lists one directory's files.
|
|
109
|
+
*
|
|
110
|
+
* `onlyFiles: false` also matches directories.
|
|
118
111
|
*/
|
|
119
|
-
export declare function sortedGlob(directory: PathBuilderLike, pattern: string
|
|
112
|
+
export declare function sortedGlob(directory: PathBuilderLike, pattern: string, options?: {
|
|
113
|
+
onlyFiles?: boolean;
|
|
114
|
+
}): Promise<string[]>;
|
|
120
115
|
//# sourceMappingURL=readers.d.ts.map
|
package/out/fs/readers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../lib/fs/readers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../lib/fs/readers.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,SAAS,CAAA;AAO3D,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACtD,YAAY,EAAE,UAAU,EAAE,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AG,IAAI,CAAC,CAQvC;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,EAAE,GAAG,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAM3G;AAMD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEzD;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAErF;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAUtF;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC/B,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACnC,OAAO,CAAC,MAAM,EAAE,CAAC,CAQnB"}
|
package/out/fs/readers.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
1
3
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
4
|
* @file The asynchronous read surface. Every reader here takes a {@linkcode PathBuilderLike} and answers a promise.
|
|
6
5
|
*
|
|
7
6
|
* Repository code accesses `node:fs` through this directory. Every reader returns a promise, so executable code
|
|
@@ -23,11 +22,11 @@ import { compareByScalarValue } from "#strings/compare";
|
|
|
23
22
|
* That size is enough to sniff a file's format.
|
|
24
23
|
*
|
|
25
24
|
* @returns The bytes read, as a UTF-8 string.
|
|
26
|
-
* @throws Enoent when the file
|
|
25
|
+
* @throws Enoent when the file doesn't exist.
|
|
27
26
|
*/
|
|
28
27
|
export async function readFileHead(path, byteSize) {
|
|
29
28
|
// `try`/`finally` rather than `await using`: this module is on the Docusaurus config loader's import path.
|
|
30
|
-
// Its transform
|
|
29
|
+
// Its transform doesn't parse explicit resource management.
|
|
31
30
|
const handle = await open(path, "r");
|
|
32
31
|
try {
|
|
33
32
|
const buffer = Buffer.alloc(byteSize);
|
|
@@ -49,7 +48,7 @@ export async function readFileHead(path, byteSize) {
|
|
|
49
48
|
* The count can be smaller than the requested size.
|
|
50
49
|
* The result is shorter than `length` at end of file.
|
|
51
50
|
*
|
|
52
|
-
* @throws Enoent when the file
|
|
51
|
+
* @throws Enoent when the file doesn't exist.
|
|
53
52
|
*/
|
|
54
53
|
export async function readFileRange(path, offset, length) {
|
|
55
54
|
const handle = await open(path.toString(), "r");
|
|
@@ -107,9 +106,9 @@ export function readLocalJSONFile(...pathSegments) {
|
|
|
107
106
|
return readLocalTextFile(...pathSegments).then((content) => parseJSONStrict(content));
|
|
108
107
|
}
|
|
109
108
|
/**
|
|
110
|
-
* Read a local JSON file, answering `null` when the file
|
|
109
|
+
* Read a local JSON file, answering `null` when the file doesn't exist.
|
|
111
110
|
*
|
|
112
|
-
* This parser is strict: a file that
|
|
111
|
+
* This parser is strict: a file that's not JSON throws here rather than
|
|
113
112
|
* returning `null` several frames later.
|
|
114
113
|
*
|
|
115
114
|
* @category Files
|
|
@@ -180,9 +179,15 @@ export async function directoryHasEntries(directory) {
|
|
|
180
179
|
/**
|
|
181
180
|
* The absolute paths `pattern` matches in `directory`, in code-point order,
|
|
182
181
|
* as Python's `sorted(Path.glob())` lists one directory's files.
|
|
182
|
+
*
|
|
183
|
+
* `onlyFiles: false` also matches directories.
|
|
183
184
|
*/
|
|
184
|
-
export async function sortedGlob(directory, pattern) {
|
|
185
|
-
const paths = await Globerator.from(pattern, {
|
|
185
|
+
export async function sortedGlob(directory, pattern, options = {}) {
|
|
186
|
+
const paths = await Globerator.from(pattern, {
|
|
187
|
+
cwd: directory.toString(),
|
|
188
|
+
absolute: true,
|
|
189
|
+
onlyFiles: options.onlyFiles ?? true,
|
|
190
|
+
}).toArray();
|
|
186
191
|
return paths.toSorted(compareByScalarValue);
|
|
187
192
|
}
|
|
188
193
|
// #endregion
|