@mailwoman/core 10.8.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -1
- package/THIRD_PARTY_NOTICES.md +27 -0
- package/lib/api/APIClient.ts +6 -5
- package/lib/api/arcgis.ts +6 -5
- package/lib/api/ckan.ts +8 -7
- package/lib/api/clock.ts +3 -3
- package/lib/api/content-range.ts +33 -0
- package/lib/api/defaults.ts +3 -3
- package/lib/api/disk-storage.ts +6 -6
- package/lib/api/headless.ts +3 -4
- package/lib/api/host.ts +5 -5
- package/lib/api/ogc.ts +11 -11
- package/lib/api/paced-client.ts +9 -7
- package/lib/api/pacer.ts +5 -5
- package/lib/api/responses.ts +44 -9
- package/lib/api/retry.ts +4 -4
- package/lib/api/test/clocks.ts +7 -7
- package/lib/api/test/transport.ts +5 -5
- package/lib/api.ts +3 -4
- package/lib/asset/names.ts +6 -6
- package/lib/asset/paths.ts +5 -6
- package/lib/binary-frame.ts +2 -5
- package/lib/cloudflare/tokens.ts +141 -0
- package/lib/cloudflare/wrangler.ts +98 -0
- package/lib/cloudflare.ts +10 -0
- package/lib/coarse-placer/coarse-placer.ts +6 -5
- package/lib/coarse-placer/featurize.ts +6 -6
- package/lib/coarse-placer/fnv-hash.ts +6 -6
- package/lib/coarse-placer/math.ts +10 -6
- package/lib/collections.ts +2 -5
- package/lib/crypto/base64url.ts +5 -6
- package/lib/crypto/digest.ts +7 -6
- package/lib/crypto/ed25519.ts +9 -9
- package/lib/crypto/node.ts +2 -5
- package/lib/data-root.ts +85 -11
- package/lib/decoder/build-tree.ts +14 -15
- package/lib/decoder/calibration.ts +20 -18
- package/lib/decoder/containment.ts +17 -15
- package/lib/decoder/excluded-span.ts +3 -3
- package/lib/decoder/parse-diff.ts +11 -8
- package/lib/decoder/proposals-to-tree.ts +5 -6
- package/lib/decoder/serialize/json.ts +13 -12
- package/lib/decoder/serialize/tuples.ts +7 -7
- package/lib/decoder/serialize/xml.ts +15 -12
- package/lib/decoder/tree/shape.ts +10 -11
- package/lib/decoder/tree/walk.ts +6 -6
- package/lib/decoder/types.ts +8 -7
- package/lib/decoder/unknown-spans.ts +9 -7
- package/lib/decoder/validate-tree.ts +11 -8
- package/lib/decoder.ts +2 -5
- package/lib/env/env-file.ts +4 -7
- package/lib/env/paths.ts +3 -7
- package/lib/env/schema.ts +3 -4
- package/lib/env/utils.ts +3 -4
- package/lib/env.ts +6 -9
- package/lib/errors/schema.ts +3 -4
- package/lib/fs/compression.ts +7 -4
- package/lib/fs/deflate64.ts +183 -0
- package/lib/fs/delimited.ts +4 -4
- package/lib/fs/formatters.ts +2 -5
- package/lib/fs/lock.ts +4 -4
- package/lib/fs/readers/stat.ts +12 -11
- package/lib/fs/readers.ts +22 -12
- package/lib/fs/snapshot.ts +111 -0
- package/lib/fs/streams.ts +9 -9
- package/lib/fs/temporary.ts +4 -4
- package/lib/fs/writers.ts +6 -6
- package/lib/fs/zip.ts +113 -28
- package/lib/geocode/result.ts +16 -7
- package/lib/git.ts +43 -8
- package/lib/hash.ts +13 -4
- package/lib/html/document.ts +9 -6
- package/lib/html/elements.ts +18 -14
- package/lib/html/tables.ts +5 -5
- package/lib/html/text.ts +10 -10
- package/lib/identical.ts +7 -6
- package/lib/index.ts +2 -5
- package/lib/json.ts +11 -9
- package/lib/layers/artifact.ts +14 -14
- package/lib/layers/build-command.ts +7 -7
- package/lib/layers/coverage.ts +7 -7
- package/lib/layers/feature-count.ts +3 -6
- package/lib/layers/manifest.ts +6 -7
- package/lib/layers/outcome.ts +12 -12
- package/lib/layers/publication.ts +4 -4
- package/lib/layers/recipe.ts +4 -4
- package/lib/layers/schema.ts +18 -15
- package/lib/layers/selection.ts +9 -9
- package/lib/layers.ts +5 -5
- package/lib/license/configured.ts +8 -8
- package/lib/license/decision.ts +17 -16
- package/lib/license/declaration.ts +8 -7
- package/lib/license/docs-site.ts +6 -5
- package/lib/license/install-id.ts +8 -6
- package/lib/license/key/file.ts +12 -8
- package/lib/license/key.ts +9 -8
- package/lib/license/obligations.ts +8 -9
- package/lib/license/publication.ts +9 -9
- package/lib/license/record.ts +8 -7
- package/lib/license/register.ts +12 -11
- package/lib/license/stamp.ts +5 -4
- package/lib/license/status.ts +10 -8
- package/lib/license.ts +10 -7
- package/lib/load-ledger.ts +105 -0
- package/lib/locale/locale.ts +9 -8
- package/lib/locale/profiles/en-us.ts +5 -5
- package/lib/locale/profiles/fr-fr.ts +6 -5
- package/lib/locale/profiles/ja-jp.ts +5 -5
- package/lib/locale/profiles.ts +2 -5
- package/lib/locale/registry.ts +7 -6
- package/lib/locale/zh-cn-units.ts +5 -5
- package/lib/locale.ts +2 -5
- package/lib/logging/shared.ts +4 -7
- package/lib/logging/utils.ts +3 -5
- package/lib/logging.ts +2 -5
- package/lib/memoize.ts +29 -0
- package/lib/module/checkout-locality.ts +174 -0
- package/lib/module/clean.ts +6 -5
- package/lib/module/compiled-freshness.ts +3 -3
- package/lib/module/file-url.ts +4 -5
- package/lib/module/package-command.ts +3 -0
- package/lib/module/packaged-data.ts +9 -8
- package/lib/module/resolve-from.ts +17 -12
- package/lib/module/resolvers.ts +8 -9
- package/lib/module/runtime.ts +2 -5
- package/lib/module/workspace.ts +7 -6
- package/lib/network/connectivity.ts +112 -0
- package/lib/network/reachability.ts +90 -0
- package/lib/numeric.ts +11 -11
- package/lib/objects.ts +5 -6
- package/lib/overture-pins.ts +4 -4
- package/lib/paths.ts +10 -10
- package/lib/pipeline/client-result.ts +42 -17
- package/lib/pipeline/preferences.ts +3 -2
- package/lib/pipeline/result.ts +3 -5
- package/lib/pipeline/runtime-pipeline.ts +26 -8
- package/lib/pipeline/span-proposer.ts +10 -9
- package/lib/pipeline/types.ts +33 -8
- package/lib/pipeline.ts +3 -4
- package/lib/policy/defaults.ts +5 -6
- package/lib/policy/policy.ts +3 -4
- package/lib/policy/proposal-collection.ts +3 -4
- package/lib/policy/registry.ts +9 -7
- package/lib/policy.ts +2 -5
- package/lib/postcode-prefix-files.ts +8 -7
- package/lib/process.ts +14 -14
- package/lib/promises.ts +6 -4
- package/lib/random.ts +7 -6
- package/lib/release-config.ts +12 -4
- package/lib/resolver/authoritative-provider.ts +17 -11
- package/lib/resolver/coverage-facts.ts +7 -6
- package/lib/resolver/fixture-authoritative-provider.ts +13 -11
- package/lib/resolver/lookup-types.ts +10 -5
- package/lib/resolver/referential.ts +11 -6
- package/lib/resolver/region-database-provider.ts +4 -4
- package/lib/resolver/synthetic-id-ranges.ts +4 -4
- package/lib/resolver/types.ts +75 -57
- package/lib/resolver.ts +20 -12
- package/lib/resources/debugging.ts +2 -5
- package/lib/resources/languages/types.gen.ts +3 -4
- package/lib/resources/languages.ts +2 -5
- package/lib/resources/libpostal.ts +3 -4
- package/lib/resources/locale.ts +2 -5
- package/lib/resources/set.ts +2 -5
- package/lib/resources.ts +2 -6
- package/lib/routing.ts +4 -7
- package/lib/scope-config.ts +12 -8
- package/lib/scripting/arguments.ts +10 -9
- package/lib/scripting/command.ts +6 -5
- package/lib/scripting/ingest-chunk-script.ts +5 -6
- package/lib/scripting/operation.ts +45 -5
- package/lib/scripting/utils.ts +3 -0
- package/lib/scripting.ts +4 -1
- package/lib/spdx-header.ts +314 -0
- package/lib/state-machine.ts +149 -0
- package/lib/stats.ts +3 -4
- package/lib/strings/code-points.ts +3 -4
- package/lib/strings/compare.ts +4 -4
- package/lib/strings/escape.ts +3 -3
- package/lib/strings/format.ts +3 -3
- package/lib/strings/markdown-table.ts +4 -4
- package/lib/strings/python-json.ts +11 -10
- package/lib/strings/regexp.ts +3 -3
- package/lib/strings/terminal.ts +20 -0
- package/lib/strings/unicode.ts +6 -6
- package/lib/tokenization/Graph.ts +3 -4
- package/lib/tokenization/Span.ts +3 -4
- package/lib/tokenization/normalizer.ts +3 -4
- package/lib/tokenization.ts +2 -5
- package/lib/trust-policies.ts +20 -15
- package/lib/types/Classification.ts +3 -6
- package/lib/types/classifier.ts +10 -9
- package/lib/types/mapping.ts +13 -14
- package/lib/types.ts +2 -5
- package/lib/utils/chunk-process.ts +14 -10
- package/lib/utils/collections.ts +3 -3
- package/lib/utils/events.ts +2 -5
- package/lib/utils/geodatabase-archive.ts +10 -8
- package/lib/utils/sleep.ts +2 -5
- package/lib/utils/sqlite-rows.ts +9 -7
- package/lib/utils/stream-to-disk.ts +26 -9
- package/lib/utils/system.ts +4 -4
- package/lib/utils/time.ts +3 -3
- package/lib/utils/union-find.ts +3 -3
- package/lib/utils.ts +2 -5
- package/lib/vale.ts +5 -5
- package/lib/workers.ts +10 -5
- package/lib/workspaces.ts +5 -4
- package/out/api/APIClient.d.ts +0 -7
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +5 -4
- package/out/api/APIClient.js.map +1 -1
- package/out/api/arcgis.d.ts +3 -5
- package/out/api/arcgis.d.ts.map +1 -1
- package/out/api/arcgis.js +2 -8
- package/out/api/arcgis.js.map +1 -1
- package/out/api/ckan.d.ts +5 -7
- package/out/api/ckan.d.ts.map +1 -1
- package/out/api/ckan.js +2 -11
- package/out/api/ckan.js.map +1 -1
- package/out/api/clock.d.ts +0 -3
- package/out/api/clock.d.ts.map +1 -1
- package/out/api/clock.js +2 -16
- package/out/api/clock.js.map +1 -1
- package/out/api/content-range.d.ts +17 -0
- package/out/api/content-range.d.ts.map +1 -0
- package/out/api/content-range.js +28 -0
- package/out/api/content-range.js.map +1 -0
- package/out/api/defaults.d.ts +0 -3
- package/out/api/defaults.d.ts.map +1 -1
- package/out/api/defaults.js +2 -3
- package/out/api/defaults.js.map +1 -1
- package/out/api/disk-storage.d.ts +1 -4
- package/out/api/disk-storage.d.ts.map +1 -1
- package/out/api/disk-storage.js +5 -6
- package/out/api/disk-storage.js.map +1 -1
- package/out/api/headless.d.ts +0 -4
- package/out/api/headless.d.ts.map +1 -1
- package/out/api/headless.js +2 -4
- package/out/api/headless.js.map +1 -1
- package/out/api/host.d.ts +2 -8
- package/out/api/host.d.ts.map +1 -1
- package/out/api/host.js +3 -4
- package/out/api/host.js.map +1 -1
- package/out/api/ogc.d.ts +3 -13
- package/out/api/ogc.d.ts.map +1 -1
- package/out/api/ogc.js +10 -11
- package/out/api/ogc.js.map +1 -1
- package/out/api/paced-client.d.ts +6 -7
- package/out/api/paced-client.d.ts.map +1 -1
- package/out/api/paced-client.js +2 -13
- package/out/api/paced-client.js.map +1 -1
- package/out/api/pacer.d.ts +2 -5
- package/out/api/pacer.d.ts.map +1 -1
- package/out/api/pacer.js +4 -5
- package/out/api/pacer.js.map +1 -1
- package/out/api/responses.d.ts +2 -9
- package/out/api/responses.d.ts.map +1 -1
- package/out/api/responses.js +37 -9
- package/out/api/responses.js.map +1 -1
- package/out/api/retry.d.ts +1 -7
- package/out/api/retry.d.ts.map +1 -1
- package/out/api/retry.js +3 -4
- package/out/api/retry.js.map +1 -1
- package/out/api/test/clocks.d.ts +1 -4
- package/out/api/test/clocks.d.ts.map +1 -1
- package/out/api/test/clocks.js +6 -14
- package/out/api/test/clocks.js.map +1 -1
- package/out/api/test/transport.d.ts +2 -23
- package/out/api/test/transport.d.ts.map +1 -1
- package/out/api/test/transport.js +3 -22
- package/out/api/test/transport.js.map +1 -1
- package/out/api.d.ts +0 -4
- package/out/api.d.ts.map +1 -1
- package/out/api.js +2 -4
- package/out/api.js.map +1 -1
- package/out/asset/names.d.ts +3 -6
- package/out/asset/names.d.ts.map +1 -1
- package/out/asset/names.js +5 -6
- package/out/asset/names.js.map +1 -1
- package/out/asset/paths.d.ts +2 -6
- package/out/asset/paths.d.ts.map +1 -1
- package/out/asset/paths.js +4 -6
- package/out/asset/paths.js.map +1 -1
- package/out/binary-frame.d.ts +0 -5
- package/out/binary-frame.d.ts.map +1 -1
- package/out/binary-frame.js +2 -5
- package/out/binary-frame.js.map +1 -1
- package/out/cloudflare/tokens.d.ts +61 -0
- package/out/cloudflare/tokens.d.ts.map +1 -0
- package/out/cloudflare/tokens.js +79 -0
- package/out/cloudflare/tokens.js.map +1 -0
- package/out/cloudflare/wrangler.d.ts +30 -0
- package/out/cloudflare/wrangler.d.ts.map +1 -0
- package/out/cloudflare/wrangler.js +68 -0
- package/out/cloudflare/wrangler.js.map +1 -0
- package/out/cloudflare.d.ts +7 -0
- package/out/cloudflare.d.ts.map +1 -0
- package/out/cloudflare.js +9 -0
- package/out/cloudflare.js.map +1 -0
- package/out/coarse-placer/coarse-placer.d.ts +3 -5
- package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
- package/out/coarse-placer/coarse-placer.js +2 -9
- package/out/coarse-placer/coarse-placer.js.map +1 -1
- package/out/coarse-placer/featurize.d.ts +0 -13
- package/out/coarse-placer/featurize.d.ts.map +1 -1
- package/out/coarse-placer/featurize.js +5 -6
- package/out/coarse-placer/featurize.js.map +1 -1
- package/out/coarse-placer/fnv-hash.d.ts +3 -6
- package/out/coarse-placer/fnv-hash.d.ts.map +1 -1
- package/out/coarse-placer/fnv-hash.js +5 -6
- package/out/coarse-placer/fnv-hash.js.map +1 -1
- package/out/coarse-placer/math.d.ts +7 -6
- package/out/coarse-placer/math.d.ts.map +1 -1
- package/out/coarse-placer/math.js +2 -11
- package/out/coarse-placer/math.js.map +1 -1
- package/out/collections.d.ts +0 -5
- package/out/collections.d.ts.map +1 -1
- package/out/collections.js +2 -5
- package/out/collections.js.map +1 -1
- package/out/crypto/base64url.d.ts +2 -6
- package/out/crypto/base64url.d.ts.map +1 -1
- package/out/crypto/base64url.js +4 -6
- package/out/crypto/base64url.js.map +1 -1
- package/out/crypto/digest.d.ts +4 -6
- package/out/crypto/digest.d.ts.map +1 -1
- package/out/crypto/digest.js +6 -6
- package/out/crypto/digest.js.map +1 -1
- package/out/crypto/ed25519.d.ts +1 -13
- package/out/crypto/ed25519.d.ts.map +1 -1
- package/out/crypto/ed25519.js +8 -9
- package/out/crypto/ed25519.js.map +1 -1
- package/out/crypto/node.d.ts +0 -5
- package/out/crypto/node.d.ts.map +1 -1
- package/out/crypto/node.js +2 -5
- package/out/crypto/node.js.map +1 -1
- package/out/data-root.d.ts +53 -11
- package/out/data-root.d.ts.map +1 -1
- package/out/data-root.js +76 -11
- package/out/data-root.js.map +1 -1
- package/out/decoder/build-tree.d.ts +0 -26
- package/out/decoder/build-tree.d.ts.map +1 -1
- package/out/decoder/build-tree.js +6 -30
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/calibration.d.ts +17 -18
- package/out/decoder/calibration.d.ts.map +1 -1
- package/out/decoder/calibration.js +2 -24
- package/out/decoder/calibration.js.map +1 -1
- package/out/decoder/containment.d.ts +14 -15
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +2 -29
- package/out/decoder/containment.js.map +1 -1
- package/out/decoder/excluded-span.d.ts +0 -3
- package/out/decoder/excluded-span.d.ts.map +1 -1
- package/out/decoder/excluded-span.js +2 -6
- package/out/decoder/excluded-span.js.map +1 -1
- package/out/decoder/parse-diff.d.ts +0 -21
- package/out/decoder/parse-diff.d.ts.map +1 -1
- package/out/decoder/parse-diff.js +10 -8
- package/out/decoder/parse-diff.js.map +1 -1
- package/out/decoder/proposals-to-tree.d.ts +2 -6
- package/out/decoder/proposals-to-tree.d.ts.map +1 -1
- package/out/decoder/proposals-to-tree.js +4 -9
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/serialize/json.d.ts +9 -11
- package/out/decoder/serialize/json.d.ts.map +1 -1
- package/out/decoder/serialize/json.js +4 -18
- package/out/decoder/serialize/json.js.map +1 -1
- package/out/decoder/serialize/tuples.d.ts +4 -7
- package/out/decoder/serialize/tuples.d.ts.map +1 -1
- package/out/decoder/serialize/tuples.js +2 -11
- package/out/decoder/serialize/tuples.js.map +1 -1
- package/out/decoder/serialize/xml.d.ts +12 -12
- package/out/decoder/serialize/xml.d.ts.map +1 -1
- package/out/decoder/serialize/xml.js +2 -27
- package/out/decoder/serialize/xml.js.map +1 -1
- package/out/decoder/tree/shape.d.ts +7 -11
- package/out/decoder/tree/shape.d.ts.map +1 -1
- package/out/decoder/tree/shape.js +3 -13
- package/out/decoder/tree/shape.js.map +1 -1
- package/out/decoder/tree/walk.d.ts +3 -11
- package/out/decoder/tree/walk.d.ts.map +1 -1
- package/out/decoder/tree/walk.js +5 -6
- package/out/decoder/tree/walk.js.map +1 -1
- package/out/decoder/types.d.ts +5 -7
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/types.js +3 -5
- package/out/decoder/types.js.map +1 -1
- package/out/decoder/unknown-spans.d.ts.map +1 -1
- package/out/decoder/unknown-spans.js +8 -7
- package/out/decoder/unknown-spans.js.map +1 -1
- package/out/decoder/validate-tree.d.ts +8 -8
- package/out/decoder/validate-tree.d.ts.map +1 -1
- package/out/decoder/validate-tree.js +2 -23
- package/out/decoder/validate-tree.js.map +1 -1
- package/out/decoder.d.ts +0 -5
- package/out/decoder.d.ts.map +1 -1
- package/out/decoder.js +2 -5
- package/out/decoder.js.map +1 -1
- package/out/env/env-file.d.ts +1 -6
- package/out/env/env-file.d.ts.map +1 -1
- package/out/env/env-file.js +4 -7
- package/out/env/env-file.js.map +1 -1
- package/out/env/paths.d.ts +1 -7
- package/out/env/paths.d.ts.map +1 -1
- package/out/env/paths.js +3 -7
- package/out/env/paths.js.map +1 -1
- package/out/env/schema.d.ts +0 -8
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +2 -4
- package/out/env/schema.js.map +1 -1
- package/out/env/utils.d.ts +0 -7
- package/out/env/utils.d.ts.map +1 -1
- package/out/env/utils.js +2 -4
- package/out/env/utils.js.map +1 -1
- package/out/env.d.ts +2 -7
- package/out/env.d.ts.map +1 -1
- package/out/env.js +6 -9
- package/out/env.js.map +1 -1
- package/out/errors/schema.d.ts +0 -4
- package/out/errors/schema.d.ts.map +1 -1
- package/out/errors/schema.js +2 -0
- package/out/errors/schema.js.map +1 -1
- package/out/fs/compression.d.ts +4 -4
- package/out/fs/compression.d.ts.map +1 -1
- package/out/fs/compression.js +5 -3
- package/out/fs/compression.js.map +1 -1
- package/out/fs/deflate64.d.ts +21 -0
- package/out/fs/deflate64.d.ts.map +1 -0
- package/out/fs/deflate64.js +121 -0
- package/out/fs/deflate64.js.map +1 -0
- package/out/fs/delimited.d.ts +1 -4
- package/out/fs/delimited.d.ts.map +1 -1
- package/out/fs/delimited.js +2 -23
- package/out/fs/delimited.js.map +1 -1
- package/out/fs/formatters.d.ts +0 -5
- package/out/fs/formatters.d.ts.map +1 -1
- package/out/fs/formatters.js +2 -5
- package/out/fs/formatters.js.map +1 -1
- package/out/fs/lock.d.ts +0 -3
- package/out/fs/lock.d.ts.map +1 -1
- package/out/fs/lock.js +3 -12
- package/out/fs/lock.js.map +1 -1
- package/out/fs/readers/stat.d.ts +9 -14
- package/out/fs/readers/stat.d.ts.map +1 -1
- package/out/fs/readers/stat.js +11 -11
- package/out/fs/readers/stat.js.map +1 -1
- package/out/fs/readers.d.ts +11 -16
- package/out/fs/readers.d.ts.map +1 -1
- package/out/fs/readers.js +15 -10
- package/out/fs/readers.js.map +1 -1
- package/out/fs/snapshot.d.ts +51 -0
- package/out/fs/snapshot.d.ts.map +1 -0
- package/out/fs/snapshot.js +67 -0
- package/out/fs/snapshot.js.map +1 -0
- package/out/fs/streams.d.ts +6 -9
- package/out/fs/streams.d.ts.map +1 -1
- package/out/fs/streams.js +8 -9
- package/out/fs/streams.js.map +1 -1
- package/out/fs/temporary.d.ts +1 -10
- package/out/fs/temporary.d.ts.map +1 -1
- package/out/fs/temporary.js +3 -4
- package/out/fs/temporary.js.map +1 -1
- package/out/fs/writers.d.ts +3 -11
- package/out/fs/writers.d.ts.map +1 -1
- package/out/fs/writers.js +5 -6
- package/out/fs/writers.js.map +1 -1
- package/out/fs/zip.d.ts +2 -19
- package/out/fs/zip.d.ts.map +1 -1
- package/out/fs/zip.js +82 -20
- package/out/fs/zip.js.map +1 -1
- package/out/geocode/result.d.ts +3 -11
- package/out/geocode/result.d.ts.map +1 -1
- package/out/geocode/result.js +15 -7
- package/out/geocode/result.js.map +1 -1
- package/out/git.d.ts +15 -8
- package/out/git.d.ts.map +1 -1
- package/out/git.js +34 -9
- package/out/git.js.map +1 -1
- package/out/hash.d.ts +8 -6
- package/out/hash.d.ts.map +1 -1
- package/out/hash.js +2 -4
- package/out/hash.js.map +1 -1
- package/out/html/document.d.ts +0 -13
- package/out/html/document.d.ts.map +1 -1
- package/out/html/document.js +8 -6
- package/out/html/document.js.map +1 -1
- package/out/html/elements.d.ts +1 -20
- package/out/html/elements.d.ts.map +1 -1
- package/out/html/elements.js +17 -14
- package/out/html/elements.js.map +1 -1
- package/out/html/tables.d.ts +0 -8
- package/out/html/tables.d.ts.map +1 -1
- package/out/html/tables.js +4 -5
- package/out/html/tables.js.map +1 -1
- package/out/html/text.d.ts +1 -17
- package/out/html/text.d.ts.map +1 -1
- package/out/html/text.js +9 -10
- package/out/html/text.js.map +1 -1
- package/out/identical.d.ts +0 -9
- package/out/identical.d.ts.map +1 -1
- package/out/identical.js +6 -6
- package/out/identical.js.map +1 -1
- package/out/index.d.ts +0 -5
- package/out/index.d.ts.map +1 -1
- package/out/index.js +2 -5
- package/out/index.js.map +1 -1
- package/out/json.d.ts +8 -9
- package/out/json.d.ts.map +1 -1
- package/out/json.js +6 -16
- package/out/json.js.map +1 -1
- package/out/layers/artifact.d.ts +9 -27
- package/out/layers/artifact.d.ts.map +1 -1
- package/out/layers/artifact.js +6 -7
- package/out/layers/artifact.js.map +1 -1
- package/out/layers/build-command.d.ts +0 -10
- package/out/layers/build-command.d.ts.map +1 -1
- package/out/layers/build-command.js +6 -7
- package/out/layers/build-command.js.map +1 -1
- package/out/layers/coverage.d.ts +4 -10
- package/out/layers/coverage.d.ts.map +1 -1
- package/out/layers/coverage.js +4 -5
- package/out/layers/coverage.js.map +1 -1
- package/out/layers/feature-count.d.ts +1 -6
- package/out/layers/feature-count.d.ts.map +1 -1
- package/out/layers/feature-count.js +3 -6
- package/out/layers/feature-count.js.map +1 -1
- package/out/layers/manifest.d.ts +3 -7
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +2 -4
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/outcome.d.ts +9 -12
- package/out/layers/outcome.d.ts.map +1 -1
- package/out/layers/outcome.js +11 -12
- package/out/layers/outcome.js.map +1 -1
- package/out/layers/publication.d.ts +1 -21
- package/out/layers/publication.d.ts.map +1 -1
- package/out/layers/publication.js +3 -4
- package/out/layers/publication.js.map +1 -1
- package/out/layers/recipe.d.ts +1 -4
- package/out/layers/recipe.d.ts.map +1 -1
- package/out/layers/recipe.js +2 -15
- package/out/layers/recipe.js.map +1 -1
- package/out/layers/schema.d.ts +15 -15
- package/out/layers/schema.d.ts.map +1 -1
- package/out/layers/schema.js +2 -13
- package/out/layers/schema.js.map +1 -1
- package/out/layers/selection.d.ts +4 -24
- package/out/layers/selection.d.ts.map +1 -1
- package/out/layers/selection.js +6 -7
- package/out/layers/selection.js.map +1 -1
- package/out/layers.d.ts +2 -5
- package/out/layers.d.ts.map +1 -1
- package/out/layers.js +4 -5
- package/out/layers.js.map +1 -1
- package/out/license/configured.d.ts +5 -8
- package/out/license/configured.d.ts.map +1 -1
- package/out/license/configured.js +7 -8
- package/out/license/configured.js.map +1 -1
- package/out/license/decision.d.ts +4 -20
- package/out/license/decision.d.ts.map +1 -1
- package/out/license/decision.js +15 -14
- package/out/license/decision.js.map +1 -1
- package/out/license/declaration.d.ts +5 -7
- package/out/license/declaration.d.ts.map +1 -1
- package/out/license/declaration.js +2 -9
- package/out/license/declaration.js.map +1 -1
- package/out/license/docs-site.d.ts +0 -8
- package/out/license/docs-site.d.ts.map +1 -1
- package/out/license/docs-site.js +5 -5
- package/out/license/docs-site.js.map +1 -1
- package/out/license/install-id.d.ts +0 -9
- package/out/license/install-id.d.ts.map +1 -1
- package/out/license/install-id.js +7 -6
- package/out/license/install-id.js.map +1 -1
- package/out/license/key/file.d.ts +0 -11
- package/out/license/key/file.d.ts.map +1 -1
- package/out/license/key/file.js +11 -8
- package/out/license/key/file.js.map +1 -1
- package/out/license/key.d.ts +5 -7
- package/out/license/key.d.ts.map +1 -1
- package/out/license/key.js +8 -8
- package/out/license/key.js.map +1 -1
- package/out/license/obligations.d.ts +2 -10
- package/out/license/obligations.d.ts.map +1 -1
- package/out/license/obligations.js +7 -9
- package/out/license/obligations.js.map +1 -1
- package/out/license/publication.d.ts +4 -7
- package/out/license/publication.d.ts.map +1 -1
- package/out/license/publication.js +8 -9
- package/out/license/publication.js.map +1 -1
- package/out/license/record.d.ts +2 -5
- package/out/license/record.d.ts.map +1 -1
- package/out/license/record.js +7 -7
- package/out/license/record.js.map +1 -1
- package/out/license/register.d.ts +9 -11
- package/out/license/register.d.ts.map +1 -1
- package/out/license/register.js +11 -11
- package/out/license/register.js.map +1 -1
- package/out/license/stamp.d.ts +0 -8
- package/out/license/stamp.d.ts.map +1 -1
- package/out/license/stamp.js +4 -4
- package/out/license/stamp.js.map +1 -1
- package/out/license/status.d.ts +2 -16
- package/out/license/status.d.ts.map +1 -1
- package/out/license/status.js +6 -18
- package/out/license/status.js.map +1 -1
- package/out/license.d.ts +7 -7
- package/out/license.d.ts.map +1 -1
- package/out/license.js +9 -7
- package/out/license.js.map +1 -1
- package/out/load-ledger.d.ts +80 -0
- package/out/load-ledger.d.ts.map +1 -0
- package/out/load-ledger.js +53 -0
- package/out/load-ledger.js.map +1 -0
- package/out/locale/locale.d.ts +6 -8
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/locale.js +2 -12
- package/out/locale/locale.js.map +1 -1
- package/out/locale/profiles/en-us.d.ts +2 -5
- package/out/locale/profiles/en-us.d.ts.map +1 -1
- package/out/locale/profiles/en-us.js +2 -7
- package/out/locale/profiles/en-us.js.map +1 -1
- package/out/locale/profiles/fr-fr.d.ts +3 -5
- package/out/locale/profiles/fr-fr.d.ts.map +1 -1
- package/out/locale/profiles/fr-fr.js +2 -8
- package/out/locale/profiles/fr-fr.js.map +1 -1
- package/out/locale/profiles/ja-jp.d.ts +2 -5
- package/out/locale/profiles/ja-jp.d.ts.map +1 -1
- package/out/locale/profiles/ja-jp.js +2 -7
- package/out/locale/profiles/ja-jp.js.map +1 -1
- package/out/locale/profiles.d.ts +0 -5
- package/out/locale/profiles.d.ts.map +1 -1
- package/out/locale/profiles.js +2 -5
- package/out/locale/profiles.js.map +1 -1
- package/out/locale/registry.d.ts +0 -9
- package/out/locale/registry.d.ts.map +1 -1
- package/out/locale/registry.js +6 -6
- package/out/locale/registry.js.map +1 -1
- package/out/locale/zh-cn-units.d.ts +2 -5
- package/out/locale/zh-cn-units.d.ts.map +1 -1
- package/out/locale/zh-cn-units.js +4 -5
- package/out/locale/zh-cn-units.js.map +1 -1
- package/out/locale.d.ts +0 -5
- package/out/locale.d.ts.map +1 -1
- package/out/locale.js +2 -5
- package/out/locale.js.map +1 -1
- package/out/logging/shared.d.ts +0 -5
- package/out/logging/shared.d.ts.map +1 -1
- package/out/logging/shared.js +4 -7
- package/out/logging/shared.js.map +1 -1
- package/out/logging/utils.d.ts +0 -5
- package/out/logging/utils.d.ts.map +1 -1
- package/out/logging/utils.js +2 -5
- package/out/logging/utils.js.map +1 -1
- package/out/logging.d.ts +0 -5
- package/out/logging.d.ts.map +1 -1
- package/out/logging.js +2 -5
- package/out/logging.js.map +1 -1
- package/out/memoize.d.ts +13 -0
- package/out/memoize.d.ts.map +1 -0
- package/out/memoize.js +26 -0
- package/out/memoize.js.map +1 -0
- package/out/module/checkout-locality.d.ts +102 -0
- package/out/module/checkout-locality.d.ts.map +1 -0
- package/out/module/checkout-locality.js +130 -0
- package/out/module/checkout-locality.js.map +1 -0
- package/out/module/clean.d.ts +3 -5
- package/out/module/clean.d.ts.map +1 -1
- package/out/module/clean.js +2 -8
- package/out/module/clean.js.map +1 -1
- package/out/module/compiled-freshness.d.ts +0 -3
- package/out/module/compiled-freshness.d.ts.map +1 -1
- package/out/module/compiled-freshness.js +2 -3
- package/out/module/compiled-freshness.js.map +1 -1
- package/out/module/file-url.d.ts +1 -8
- package/out/module/file-url.d.ts.map +1 -1
- package/out/module/file-url.js +3 -5
- package/out/module/file-url.js.map +1 -1
- package/out/module/package-command.d.ts +0 -3
- package/out/module/package-command.d.ts.map +1 -1
- package/out/module/package-command.js +2 -0
- package/out/module/package-command.js.map +1 -1
- package/out/module/packaged-data.d.ts +0 -11
- package/out/module/packaged-data.d.ts.map +1 -1
- package/out/module/packaged-data.js +8 -8
- package/out/module/packaged-data.js.map +1 -1
- package/out/module/resolve-from.d.ts +3 -16
- package/out/module/resolve-from.d.ts.map +1 -1
- package/out/module/resolve-from.js +16 -12
- package/out/module/resolve-from.js.map +1 -1
- package/out/module/resolvers.d.ts +5 -12
- package/out/module/resolvers.d.ts.map +1 -1
- package/out/module/resolvers.js +7 -9
- package/out/module/resolvers.js.map +1 -1
- package/out/module/runtime.d.ts +0 -5
- package/out/module/runtime.d.ts.map +1 -1
- package/out/module/runtime.js +2 -5
- package/out/module/runtime.js.map +1 -1
- package/out/module/workspace.d.ts +4 -6
- package/out/module/workspace.d.ts.map +1 -1
- package/out/module/workspace.js +6 -6
- package/out/module/workspace.js.map +1 -1
- package/out/network/connectivity.d.ts +60 -0
- package/out/network/connectivity.d.ts.map +1 -0
- package/out/network/connectivity.js +66 -0
- package/out/network/connectivity.js.map +1 -0
- package/out/network/reachability.d.ts +45 -0
- package/out/network/reachability.d.ts.map +1 -0
- package/out/network/reachability.js +79 -0
- package/out/network/reachability.js.map +1 -0
- package/out/numeric.d.ts +0 -3
- package/out/numeric.d.ts.map +1 -1
- package/out/numeric.js +10 -11
- package/out/numeric.js.map +1 -1
- package/out/objects.d.ts +2 -6
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +4 -9
- package/out/objects.js.map +1 -1
- package/out/overture-pins.d.ts +1 -4
- package/out/overture-pins.d.ts.map +1 -1
- package/out/overture-pins.js +3 -4
- package/out/overture-pins.js.map +1 -1
- package/out/paths.d.ts +4 -7
- package/out/paths.d.ts.map +1 -1
- package/out/paths.js +9 -10
- package/out/paths.js.map +1 -1
- package/out/pipeline/client-result.d.ts +38 -16
- package/out/pipeline/client-result.d.ts.map +1 -1
- package/out/pipeline/client-result.js +2 -10
- package/out/pipeline/client-result.js.map +1 -1
- package/out/pipeline/preferences.d.ts +0 -2
- package/out/pipeline/preferences.d.ts.map +1 -1
- package/out/pipeline/preferences.js +2 -5
- package/out/pipeline/preferences.js.map +1 -1
- package/out/pipeline/result.d.ts +1 -5
- package/out/pipeline/result.d.ts.map +1 -1
- package/out/pipeline/result.js +2 -4
- package/out/pipeline/result.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +10 -7
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +21 -11
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-proposer.d.ts +2 -10
- package/out/pipeline/span-proposer.d.ts.map +1 -1
- package/out/pipeline/span-proposer.js +8 -8
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +27 -6
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +5 -9
- package/out/pipeline/types.js.map +1 -1
- package/out/pipeline.d.ts +0 -4
- package/out/pipeline.d.ts.map +1 -1
- package/out/pipeline.js +2 -4
- package/out/pipeline.js.map +1 -1
- package/out/policy/defaults.d.ts +2 -6
- package/out/policy/defaults.d.ts.map +1 -1
- package/out/policy/defaults.js +4 -6
- package/out/policy/defaults.js.map +1 -1
- package/out/policy/policy.d.ts +0 -4
- package/out/policy/policy.d.ts.map +1 -1
- package/out/policy/policy.js +2 -7
- package/out/policy/policy.js.map +1 -1
- package/out/policy/proposal-collection.d.ts +0 -4
- package/out/policy/proposal-collection.d.ts.map +1 -1
- package/out/policy/proposal-collection.js +2 -7
- package/out/policy/proposal-collection.js.map +1 -1
- package/out/policy/registry.d.ts +6 -7
- package/out/policy/registry.d.ts.map +1 -1
- package/out/policy/registry.js +2 -11
- package/out/policy/registry.js.map +1 -1
- package/out/policy.d.ts +0 -5
- package/out/policy.d.ts.map +1 -1
- package/out/policy.js +2 -5
- package/out/policy.js.map +1 -1
- package/out/postcode-prefix-files.d.ts +5 -7
- package/out/postcode-prefix-files.d.ts.map +1 -1
- package/out/postcode-prefix-files.js +7 -7
- package/out/postcode-prefix-files.js.map +1 -1
- package/out/process.d.ts +10 -13
- package/out/process.d.ts.map +1 -1
- package/out/process.js +11 -12
- package/out/process.js.map +1 -1
- package/out/promises.d.ts +3 -4
- package/out/promises.d.ts.map +1 -1
- package/out/promises.js +5 -4
- package/out/promises.js.map +1 -1
- package/out/random.d.ts +0 -10
- package/out/random.d.ts.map +1 -1
- package/out/random.js +6 -6
- package/out/random.js.map +1 -1
- package/out/release-config.d.ts +9 -4
- package/out/release-config.d.ts.map +1 -1
- package/out/release-config.js +4 -4
- package/out/release-config.js.map +1 -1
- package/out/resolver/authoritative-provider.d.ts +14 -11
- package/out/resolver/authoritative-provider.d.ts.map +1 -1
- package/out/resolver/authoritative-provider.js +3 -15
- package/out/resolver/authoritative-provider.js.map +1 -1
- package/out/resolver/coverage-facts.d.ts +4 -6
- package/out/resolver/coverage-facts.d.ts.map +1 -1
- package/out/resolver/coverage-facts.js +2 -10
- package/out/resolver/coverage-facts.js.map +1 -1
- package/out/resolver/fixture-authoritative-provider.d.ts +10 -11
- package/out/resolver/fixture-authoritative-provider.d.ts.map +1 -1
- package/out/resolver/fixture-authoritative-provider.js +12 -11
- package/out/resolver/fixture-authoritative-provider.js.map +1 -1
- package/out/resolver/lookup-types.d.ts +7 -5
- package/out/resolver/lookup-types.d.ts.map +1 -1
- package/out/resolver/lookup-types.js +2 -11
- package/out/resolver/lookup-types.js.map +1 -1
- package/out/resolver/referential.d.ts +8 -6
- package/out/resolver/referential.d.ts.map +1 -1
- package/out/resolver/referential.js +10 -6
- package/out/resolver/referential.js.map +1 -1
- package/out/resolver/region-database-provider.d.ts +1 -4
- package/out/resolver/region-database-provider.d.ts.map +1 -1
- package/out/resolver/region-database-provider.js +2 -6
- package/out/resolver/region-database-provider.js.map +1 -1
- package/out/resolver/synthetic-id-ranges.d.ts +1 -4
- package/out/resolver/synthetic-id-ranges.d.ts.map +1 -1
- package/out/resolver/synthetic-id-ranges.js +3 -4
- package/out/resolver/synthetic-id-ranges.js.map +1 -1
- package/out/resolver/types.d.ts +64 -55
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +15 -7
- package/out/resolver/types.js.map +1 -1
- package/out/resolver.d.ts +8 -11
- package/out/resolver.d.ts.map +1 -1
- package/out/resolver.js +9 -10
- package/out/resolver.js.map +1 -1
- package/out/resources/debugging.d.ts +0 -5
- package/out/resources/debugging.d.ts.map +1 -1
- package/out/resources/debugging.js +2 -5
- package/out/resources/debugging.js.map +1 -1
- package/out/resources/languages/types.gen.d.ts +0 -4
- package/out/resources/languages/types.gen.d.ts.map +1 -1
- package/out/resources/languages/types.gen.js +2 -7
- package/out/resources/languages/types.gen.js.map +1 -1
- package/out/resources/languages.d.ts +0 -5
- package/out/resources/languages.d.ts.map +1 -1
- package/out/resources/languages.js +2 -5
- package/out/resources/languages.js.map +1 -1
- package/out/resources/libpostal.d.ts +0 -9
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +2 -4
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/locale.d.ts +0 -5
- package/out/resources/locale.d.ts.map +1 -1
- package/out/resources/locale.js +2 -5
- package/out/resources/locale.js.map +1 -1
- package/out/resources/set.d.ts +0 -5
- package/out/resources/set.d.ts.map +1 -1
- package/out/resources/set.js +2 -5
- package/out/resources/set.js.map +1 -1
- package/out/resources.d.ts +0 -6
- package/out/resources.d.ts.map +1 -1
- package/out/resources.js +2 -6
- package/out/resources.js.map +1 -1
- package/out/routing.d.ts +0 -5
- package/out/routing.d.ts.map +1 -1
- package/out/routing.js +3 -6
- package/out/routing.js.map +1 -1
- package/out/scope-config.d.ts +9 -8
- package/out/scope-config.d.ts.map +1 -1
- package/out/scope-config.js +3 -13
- package/out/scope-config.js.map +1 -1
- package/out/scripting/arguments.d.ts +7 -9
- package/out/scripting/arguments.d.ts.map +1 -1
- package/out/scripting/arguments.js +8 -8
- package/out/scripting/arguments.js.map +1 -1
- package/out/scripting/command.d.ts +3 -5
- package/out/scripting/command.d.ts.map +1 -1
- package/out/scripting/command.js +5 -5
- package/out/scripting/command.js.map +1 -1
- package/out/scripting/ingest-chunk-script.d.ts +2 -6
- package/out/scripting/ingest-chunk-script.d.ts.map +1 -1
- package/out/scripting/ingest-chunk-script.js +4 -6
- package/out/scripting/ingest-chunk-script.js.map +1 -1
- package/out/scripting/operation.d.ts +39 -5
- package/out/scripting/operation.d.ts.map +1 -1
- package/out/scripting/operation.js +23 -15
- package/out/scripting/operation.js.map +1 -1
- package/out/scripting/utils.d.ts.map +1 -1
- package/out/scripting/utils.js +2 -0
- package/out/scripting/utils.js.map +1 -1
- package/out/scripting.d.ts.map +1 -1
- package/out/scripting.js +3 -1
- package/out/scripting.js.map +1 -1
- package/out/spdx-header.d.ts +86 -0
- package/out/spdx-header.d.ts.map +1 -0
- package/out/spdx-header.js +244 -0
- package/out/spdx-header.js.map +1 -0
- package/out/state-machine.d.ts +98 -0
- package/out/state-machine.d.ts.map +1 -0
- package/out/state-machine.js +37 -0
- package/out/state-machine.js.map +1 -0
- package/out/stats.d.ts +0 -4
- package/out/stats.d.ts.map +1 -1
- package/out/stats.js +2 -4
- package/out/stats.js.map +1 -1
- package/out/strings/code-points.d.ts +0 -4
- package/out/strings/code-points.d.ts.map +1 -1
- package/out/strings/code-points.js +2 -4
- package/out/strings/code-points.js.map +1 -1
- package/out/strings/compare.d.ts +1 -4
- package/out/strings/compare.d.ts.map +1 -1
- package/out/strings/compare.js +3 -4
- package/out/strings/compare.js.map +1 -1
- package/out/strings/escape.d.ts +0 -6
- package/out/strings/escape.d.ts.map +1 -1
- package/out/strings/escape.js +2 -3
- package/out/strings/escape.js.map +1 -1
- package/out/strings/format.d.ts +0 -3
- package/out/strings/format.d.ts.map +1 -1
- package/out/strings/format.js +2 -3
- package/out/strings/format.js.map +1 -1
- package/out/strings/markdown-table.d.ts +1 -11
- package/out/strings/markdown-table.d.ts.map +1 -1
- package/out/strings/markdown-table.js +3 -4
- package/out/strings/markdown-table.js.map +1 -1
- package/out/strings/python-json.d.ts +8 -10
- package/out/strings/python-json.d.ts.map +1 -1
- package/out/strings/python-json.js +3 -1
- package/out/strings/python-json.js.map +1 -1
- package/out/strings/regexp.d.ts +0 -3
- package/out/strings/regexp.d.ts.map +1 -1
- package/out/strings/regexp.js +2 -3
- package/out/strings/regexp.js.map +1 -1
- package/out/strings/terminal.d.ts +5 -0
- package/out/strings/terminal.d.ts.map +1 -0
- package/out/strings/terminal.js +18 -0
- package/out/strings/terminal.js.map +1 -0
- package/out/strings/unicode.d.ts +0 -8
- package/out/strings/unicode.d.ts.map +1 -1
- package/out/strings/unicode.js +5 -6
- package/out/strings/unicode.js.map +1 -1
- package/out/tokenization/Graph.d.ts +0 -4
- package/out/tokenization/Graph.d.ts.map +1 -1
- package/out/tokenization/Graph.js +2 -4
- package/out/tokenization/Graph.js.map +1 -1
- package/out/tokenization/Span.d.ts +0 -4
- package/out/tokenization/Span.d.ts.map +1 -1
- package/out/tokenization/Span.js +2 -8
- package/out/tokenization/Span.js.map +1 -1
- package/out/tokenization/normalizer.d.ts +0 -8
- package/out/tokenization/normalizer.d.ts.map +1 -1
- package/out/tokenization/normalizer.js +2 -4
- package/out/tokenization/normalizer.js.map +1 -1
- package/out/tokenization.d.ts +0 -5
- package/out/tokenization.d.ts.map +1 -1
- package/out/tokenization.js +2 -5
- package/out/tokenization.js.map +1 -1
- package/out/tools/build-deflate64-wasm.run.d.ts +2 -0
- package/out/tools/build-deflate64-wasm.run.d.ts.map +1 -0
- package/out/tools/build-deflate64-wasm.run.js +39 -0
- package/out/tools/build-deflate64-wasm.run.js.map +1 -0
- package/out/tools/coarse-placer/build/dataset.d.ts +2 -5
- package/out/tools/coarse-placer/build/dataset.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/dataset.js +6 -7
- package/out/tools/coarse-placer/build/dataset.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.d.ts +0 -12
- package/out/tools/coarse-placer/build/outlier/exposure.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.js +7 -8
- package/out/tools/coarse-placer/build/outlier/exposure.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/latin.d.ts +16 -17
- package/out/tools/coarse-placer/build/outlier/latin.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/latin.js +19 -18
- package/out/tools/coarse-placer/build/outlier/latin.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/oa.d.ts +18 -19
- package/out/tools/coarse-placer/build/outlier/oa.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/oa.js +21 -20
- package/out/tools/coarse-placer/build/outlier/oa.js.map +1 -1
- package/out/tools/coarse-placer/country-sets.d.ts +6 -7
- package/out/tools/coarse-placer/country-sets.d.ts.map +1 -1
- package/out/tools/coarse-placer/country-sets.js +10 -8
- package/out/tools/coarse-placer/country-sets.js.map +1 -1
- package/out/tools/coarse-placer/eval/latin-offmap.d.ts +6 -8
- package/out/tools/coarse-placer/eval/latin-offmap.d.ts.map +1 -1
- package/out/tools/coarse-placer/eval/latin-offmap.js +8 -8
- package/out/tools/coarse-placer/eval/latin-offmap.js.map +1 -1
- package/out/tools/coarse-placer/eval/openset.d.ts +2 -4
- package/out/tools/coarse-placer/eval/openset.d.ts.map +1 -1
- package/out/tools/coarse-placer/eval/openset.js +4 -4
- package/out/tools/coarse-placer/eval/openset.js.map +1 -1
- package/out/tools/coarse-placer/eval/quant-compare.d.ts +5 -7
- package/out/tools/coarse-placer/eval/quant-compare.d.ts.map +1 -1
- package/out/tools/coarse-placer/eval/quant-compare.js +7 -7
- package/out/tools/coarse-placer/eval/quant-compare.js.map +1 -1
- package/out/tools/coarse-placer/eval.d.ts +5 -7
- package/out/tools/coarse-placer/eval.d.ts.map +1 -1
- package/out/tools/coarse-placer/eval.js +7 -7
- package/out/tools/coarse-placer/eval.js.map +1 -1
- package/out/tools/coarse-placer/outlier-rows.d.ts +0 -10
- package/out/tools/coarse-placer/outlier-rows.d.ts.map +1 -1
- package/out/tools/coarse-placer/outlier-rows.js +9 -8
- package/out/tools/coarse-placer/outlier-rows.js.map +1 -1
- package/out/tools/coarse-placer/paths.d.ts +3 -5
- package/out/tools/coarse-placer/paths.d.ts.map +1 -1
- package/out/tools/coarse-placer/paths.js +5 -5
- package/out/tools/coarse-placer/paths.js.map +1 -1
- package/out/tools/coarse-placer/probe-frontier.d.ts +0 -22
- package/out/tools/coarse-placer/probe-frontier.d.ts.map +1 -1
- package/out/tools/coarse-placer/probe-frontier.js +14 -12
- package/out/tools/coarse-placer/probe-frontier.js.map +1 -1
- package/out/tools/coarse-placer/quantize.d.ts +7 -8
- package/out/tools/coarse-placer/quantize.d.ts.map +1 -1
- package/out/tools/coarse-placer/quantize.js +9 -8
- package/out/tools/coarse-placer/quantize.js.map +1 -1
- package/out/tools/coarse-placer/train.d.ts +6 -8
- package/out/tools/coarse-placer/train.d.ts.map +1 -1
- package/out/tools/coarse-placer/train.js +8 -8
- package/out/tools/coarse-placer/train.js.map +1 -1
- package/out/tools/generate-language-types.d.ts +0 -23
- package/out/tools/generate-language-types.d.ts.map +1 -1
- package/out/tools/generate-language-types.js +16 -17
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/trust-policies.d.ts +0 -20
- package/out/trust-policies.d.ts.map +1 -1
- package/out/trust-policies.js +19 -15
- package/out/trust-policies.js.map +1 -1
- package/out/types/Classification.d.ts +1 -6
- package/out/types/Classification.d.ts.map +1 -1
- package/out/types/Classification.js +3 -6
- package/out/types/Classification.js.map +1 -1
- package/out/types/classifier.d.ts +7 -9
- package/out/types/classifier.d.ts.map +1 -1
- package/out/types/classifier.js +2 -12
- package/out/types/classifier.js.map +1 -1
- package/out/types/mapping.d.ts +10 -14
- package/out/types/mapping.d.ts.map +1 -1
- package/out/types/mapping.js +2 -20
- package/out/types/mapping.js.map +1 -1
- package/out/types.d.ts +0 -5
- package/out/types.d.ts.map +1 -1
- package/out/types.js +2 -5
- package/out/types.js.map +1 -1
- package/out/utils/chunk-process.d.ts +2 -23
- package/out/utils/chunk-process.d.ts.map +1 -1
- package/out/utils/chunk-process.js +13 -10
- package/out/utils/chunk-process.js.map +1 -1
- package/out/utils/collections.d.ts +0 -3
- package/out/utils/collections.d.ts.map +1 -1
- package/out/utils/collections.js +2 -3
- package/out/utils/collections.js.map +1 -1
- package/out/utils/events.d.ts +0 -5
- package/out/utils/events.d.ts.map +1 -1
- package/out/utils/events.js +2 -5
- package/out/utils/events.js.map +1 -1
- package/out/utils/geodatabase-archive.d.ts +7 -8
- package/out/utils/geodatabase-archive.d.ts.map +1 -1
- package/out/utils/geodatabase-archive.js +9 -8
- package/out/utils/geodatabase-archive.js.map +1 -1
- package/out/utils/sleep.d.ts +0 -5
- package/out/utils/sleep.d.ts.map +1 -1
- package/out/utils/sleep.js +2 -5
- package/out/utils/sleep.js.map +1 -1
- package/out/utils/sqlite-rows.d.ts +6 -7
- package/out/utils/sqlite-rows.d.ts.map +1 -1
- package/out/utils/sqlite-rows.js +2 -13
- package/out/utils/sqlite-rows.js.map +1 -1
- package/out/utils/stream-to-disk.d.ts +14 -8
- package/out/utils/stream-to-disk.d.ts.map +1 -1
- package/out/utils/stream-to-disk.js +11 -11
- package/out/utils/stream-to-disk.js.map +1 -1
- package/out/utils/system.d.ts +0 -8
- package/out/utils/system.d.ts.map +1 -1
- package/out/utils/system.js +3 -4
- package/out/utils/system.js.map +1 -1
- package/out/utils/time.d.ts +0 -3
- package/out/utils/time.d.ts.map +1 -1
- package/out/utils/time.js +2 -3
- package/out/utils/time.js.map +1 -1
- package/out/utils/union-find.d.ts +0 -3
- package/out/utils/union-find.d.ts.map +1 -1
- package/out/utils/union-find.js +2 -6
- package/out/utils/union-find.js.map +1 -1
- package/out/utils.d.ts +0 -5
- package/out/utils.d.ts.map +1 -1
- package/out/utils.js +2 -5
- package/out/utils.js.map +1 -1
- package/out/vale.d.ts +0 -9
- package/out/vale.d.ts.map +1 -1
- package/out/vale.js +4 -5
- package/out/vale.js.map +1 -1
- package/out/workers.d.ts +3 -3
- package/out/workers.d.ts.map +1 -1
- package/out/workers.js +8 -4
- package/out/workers.js.map +1 -1
- package/out/workspaces.d.ts +2 -4
- package/out/workspaces.d.ts.map +1 -1
- package/out/workspaces.js +4 -4
- package/out/workspaces.js.map +1 -1
- package/package.json +106 -47
- package/tools/build-deflate64-wasm.run.ts +50 -0
- package/tools/coarse-placer/build/dataset.ts +7 -7
- package/tools/coarse-placer/build/outlier/exposure.ts +8 -8
- package/tools/coarse-placer/build/outlier/latin.ts +21 -19
- package/tools/coarse-placer/build/outlier/oa.ts +23 -21
- package/tools/coarse-placer/country-sets.ts +11 -8
- package/tools/coarse-placer/eval/latin-offmap.ts +9 -8
- package/tools/coarse-placer/eval/openset.ts +5 -4
- package/tools/coarse-placer/eval/quant-compare.ts +8 -7
- package/tools/coarse-placer/eval.ts +8 -7
- package/tools/coarse-placer/outlier-rows.ts +10 -8
- package/tools/coarse-placer/paths.ts +6 -5
- package/tools/coarse-placer/probe-frontier.ts +15 -12
- package/tools/coarse-placer/quantize.ts +10 -8
- package/tools/coarse-placer/train.ts +9 -8
- package/tools/generate-language-types.ts +17 -17
- package/wasm/deflate64.wasm +0 -0
- package/lib/resources/git.ts +0 -69
- package/out/resources/git.d.ts +0 -36
- package/out/resources/git.d.ts.map +0 -1
- package/out/resources/git.js +0 -34
- package/out/resources/git.js.map +0 -1
package/lib/scope-config.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
+
* Reads `scope.config.json`.
|
|
6
|
+
*
|
|
7
|
+
* It lists the countries in each locale tier, the shipping locales outside any tier,
|
|
8
|
+
* and the training config behind each shipped model.
|
|
9
|
+
* Tier membership grants no release privilege: release requirements are registered
|
|
10
|
+
* in `packages/mailwoman/tools/eval-harness/release/specs/`.
|
|
5
11
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* requirements are registered in `packages/mailwoman/tools/eval-harness/release/specs/`.
|
|
12
|
+
* The config holds membership only.
|
|
13
|
+
* `docs/engineering/scope.mdx` contains the evidence for each tier.
|
|
9
14
|
*
|
|
10
|
-
* The config holds membership only. `docs/engineering/scope.mdx` contains the evidence for each tier.
|
|
11
15
|
* The `repo-health` `locale-scope` check fails when the two disagree.
|
|
12
16
|
*/
|
|
13
17
|
|
|
@@ -18,7 +22,7 @@ import { repoRootPathBuilder } from "#paths"
|
|
|
18
22
|
|
|
19
23
|
/**
|
|
20
24
|
* The tier keys, numbered as in `scope.mdx`.
|
|
21
|
-
* They
|
|
25
|
+
* They're strings because JSON object keys are strings.
|
|
22
26
|
*/
|
|
23
27
|
export const SCOPE_TIER_KEYS = ["1", "2", "3", "4", "5"] as const
|
|
24
28
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* Dependency-free accessors for process arguments.
|
|
7
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* They stay separate from script cleanup and logging so latency-sensitive CLI
|
|
8
|
+
* dispatchers can read argv without loading other graphs.
|
|
8
9
|
* ResourceError and ConsoleLogger belong to those graphs.
|
|
9
10
|
* Async initialization also belongs there.
|
|
10
11
|
*/
|
|
@@ -13,7 +14,7 @@ import { parseArgs, type ParseArgsConfig } from "node:util"
|
|
|
13
14
|
|
|
14
15
|
import { TextSpliterator } from "spliterator"
|
|
15
16
|
|
|
16
|
-
export type { ParseArgsConfig } from "node:util"
|
|
17
|
+
export type { ParseArgsConfig, ParseArgsOptionsConfig } from "node:util"
|
|
17
18
|
|
|
18
19
|
export type UnsafeCLIArgument = string & { __unsafeCLIArgumentBrand: never }
|
|
19
20
|
|
|
@@ -74,7 +75,7 @@ export function requiredArgument(scope: string, name: string, value: string | nu
|
|
|
74
75
|
/**
|
|
75
76
|
* A flag's string value read as a safe integer.
|
|
76
77
|
*
|
|
77
|
-
* @throws When the value
|
|
78
|
+
* @throws When the value isn't one, naming the flag and the value.
|
|
78
79
|
*/
|
|
79
80
|
export function integerArgument(name: string, value: string): number {
|
|
80
81
|
const parsed = Number(value)
|
|
@@ -86,7 +87,7 @@ export function integerArgument(name: string, value: string): number {
|
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
89
|
* Kebab segments whose property spelling capitalizes the whole acronym, because a
|
|
89
|
-
* segment missing here derives a property the command's own `Options`
|
|
90
|
+
* segment missing here derives a property the command's own `Options` doesn't declare:
|
|
90
91
|
* the flag still parses but reaches the component under a name no code reads,
|
|
91
92
|
* so add the segment here when a flag contains an acronym.
|
|
92
93
|
*/
|
|
@@ -150,7 +151,7 @@ export function optionPropertyName(value: string): string {
|
|
|
150
151
|
* Parse CLI arguments against a `node:util` `parseArgs` config, defaulting `args` to
|
|
151
152
|
* {@linkcode cliArguments} so a script never reads `process.argv` itself.
|
|
152
153
|
*
|
|
153
|
-
* A caller that
|
|
154
|
+
* A caller that's already taken a command name off the front passes the remainder
|
|
154
155
|
* as `config.args` and it is used as given.
|
|
155
156
|
*/
|
|
156
157
|
export function parseArguments<T extends ParseArgsConfig>(config: T): ReturnType<typeof parseArgs<T>> {
|
package/lib/scripting/command.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Dependency-light lifecycle and error primitives for user-facing CLI commands.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* This is intentionally separate from `scripting/utils`, whose service disposal
|
|
8
|
+
* and structured logging are appropriate for long-running scripts.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* Shared setup for each layer's `scripts/ingest-chunk.ts`.
|
|
7
6
|
*
|
|
8
7
|
* Each chunk runs in a new process because JavaScript cannot reset h3's WebAssembly heap.
|
|
9
|
-
* This helper parses shared flags, opens the database created by the parent,
|
|
10
|
-
* and prints its result as one JSON line.
|
|
8
|
+
* This helper parses shared flags, opens the database created by the parent,
|
|
9
|
+
* runs the chunk and prints its result as one JSON line.
|
|
11
10
|
*
|
|
12
11
|
* Standard output contains only the result.
|
|
13
12
|
* Progress goes to standard error.
|
|
@@ -1,24 +1,57 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* This module defines the shape of each operator capability.
|
|
6
|
+
*
|
|
7
7
|
* An operation has an ID and a declared effect.
|
|
8
8
|
* It accepts typed input and returns typed output.
|
|
9
|
+
*
|
|
9
10
|
* Its `run` function performs the operation.
|
|
10
11
|
* An adapter such as the private `mwops` CLI or an MCP server views a registry of operations.
|
|
11
12
|
* The adapter adds no separate logic.
|
|
12
13
|
*
|
|
13
14
|
* An operation family chooses its effect union and context.
|
|
14
|
-
* Release operations are one example.
|
|
15
|
+
* Release operations are one example.
|
|
16
|
+
*
|
|
17
|
+
* Storage and shop are two others.
|
|
15
18
|
* The family binds its effect and context through {@link operationDefiner}.
|
|
19
|
+
*
|
|
16
20
|
* A call site infers input and output types from its schemas.
|
|
17
21
|
* The `run` function receives the family's context without the caller naming it.
|
|
18
22
|
*/
|
|
19
23
|
|
|
20
24
|
import type { ZodType } from "zod"
|
|
21
25
|
|
|
26
|
+
import type { ParseArgsOptionsConfig } from "#scripting/arguments"
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* What an operation or a state machine's effect does to the world, declared rather than inferred.
|
|
30
|
+
*
|
|
31
|
+
* `external-write` marks the writes that leave this machine: a publish to npm,
|
|
32
|
+
* Hugging Face or R2, a ledger row, a Stripe call, an email.
|
|
33
|
+
*/
|
|
34
|
+
export const OperationEffect = {
|
|
35
|
+
/**
|
|
36
|
+
* Reads the checkout, the data root, a database or a registry.
|
|
37
|
+
* It makes no changes.
|
|
38
|
+
*/
|
|
39
|
+
Read: "read",
|
|
40
|
+
/**
|
|
41
|
+
* Writes inside the checkout or the data root (a staging tree, a materialized binary, a generated surface).
|
|
42
|
+
*/
|
|
43
|
+
LocalWrite: "local-write",
|
|
44
|
+
/**
|
|
45
|
+
* Writes to a system outside this machine.
|
|
46
|
+
*
|
|
47
|
+
* A release operation with this effect is irreversible and credentialed,
|
|
48
|
+
* and only the plan → execute interface can reach it.
|
|
49
|
+
*/
|
|
50
|
+
ExternalWrite: "external-write",
|
|
51
|
+
} as const
|
|
52
|
+
|
|
53
|
+
export type OperationEffect = (typeof OperationEffect)[keyof typeof OperationEffect]
|
|
54
|
+
|
|
22
55
|
/**
|
|
23
56
|
* What every operation receives beside its input, whatever its family.
|
|
24
57
|
*
|
|
@@ -52,6 +85,13 @@ export interface Operation<
|
|
|
52
85
|
* What the operation does to the world, declared rather than inferred.
|
|
53
86
|
*/
|
|
54
87
|
effect: TEffect
|
|
88
|
+
/**
|
|
89
|
+
* The command-line flags a CLI adapter passes to `parseArgs` from `node:util`, one per input key.
|
|
90
|
+
*
|
|
91
|
+
* A boolean flag is turned off with its `--no-` form.
|
|
92
|
+
* The parsed values go to `inputSchema`, which decides each value's final type.
|
|
93
|
+
*/
|
|
94
|
+
options: ParseArgsOptionsConfig
|
|
55
95
|
inputSchema: ZodType<In>
|
|
56
96
|
outputSchema: ZodType<Out>
|
|
57
97
|
run(input: In, context: TContext): Promise<Out>
|
package/lib/scripting/utils.ts
CHANGED
package/lib/scripting.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
import type { ScriptCallback } from "#scripting/utils"
|
|
2
5
|
|
|
3
6
|
export * from "#scripting/operation"
|
|
@@ -18,7 +21,7 @@ export * from "#scripting/operation"
|
|
|
18
21
|
export async function runIfScript(meta: ImportMeta, scriptCallback: ScriptCallback): Promise<void> {
|
|
19
22
|
if (typeof meta.main !== "boolean") {
|
|
20
23
|
// Vite/vitest module graphs define import.meta.env but never import.meta.main.
|
|
21
|
-
// A module imported there
|
|
24
|
+
// A module imported there's not the entry script, so importing it must stay side-effect-free.
|
|
22
25
|
if ((meta as { env?: unknown }).env) return
|
|
23
26
|
|
|
24
27
|
throw new Error("Expected import.meta.main to be a boolean. Are we on Node.js 24+?")
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file The SPDX header every first-party source file starts with, and the rewrite from the old JSDoc header.
|
|
6
|
+
*
|
|
7
|
+
* A file starts with an optional shebang, then the two SPDX lines in the file's comment syntax, then one blank line.
|
|
8
|
+
* Oxfmt's import sorter attaches a comment that touches the first import to that import.
|
|
9
|
+
* Without the blank line, a reordering of the imports moves the header away from the top of the file.
|
|
10
|
+
*
|
|
11
|
+
* The `mailwoman/spdx-header` oxlint rule, the `spdx-header` repository check and the sweep tool all call
|
|
12
|
+
* {@linkcode rewriteSourceHeader}, so each of them agrees on what a correct file is.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The copyright holders a header names.
|
|
17
|
+
*
|
|
18
|
+
* Contributors keep the copyright in their own contributions, because `CONTRIBUTING.md` asks for a license grant.
|
|
19
|
+
*/
|
|
20
|
+
export const SPDX_FILE_COPYRIGHT_TEXT = "Teffen Ellis and Mailwoman contributors"
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The license expression every `package.json`, `Cargo.toml` and `LICENSE.md` declares.
|
|
24
|
+
*/
|
|
25
|
+
export const SPDX_LICENSE_EXPRESSION = "AGPL-3.0-only OR LicenseRef-Commercial"
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The comment syntax a header is written in.
|
|
29
|
+
*/
|
|
30
|
+
export const SourceHeaderSyntax = {
|
|
31
|
+
/**
|
|
32
|
+
* `//` line comments: JavaScript, TypeScript, Rust, Java and C++.
|
|
33
|
+
*/
|
|
34
|
+
Slash: "slash",
|
|
35
|
+
/**
|
|
36
|
+
* `#` line comments: shell.
|
|
37
|
+
*/
|
|
38
|
+
Hash: "hash",
|
|
39
|
+
/**
|
|
40
|
+
* One `/* … *\/` comment per line: CSS.
|
|
41
|
+
*/
|
|
42
|
+
CSS: "css",
|
|
43
|
+
} as const
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A comment syntax from {@linkcode SourceHeaderSyntax}.
|
|
47
|
+
*/
|
|
48
|
+
export type SourceHeaderSyntax = (typeof SourceHeaderSyntax)[keyof typeof SourceHeaderSyntax]
|
|
49
|
+
|
|
50
|
+
const SYNTAX_BY_EXTENSION: ReadonlyMap<string, SourceHeaderSyntax> = new Map([
|
|
51
|
+
["ts", SourceHeaderSyntax.Slash],
|
|
52
|
+
["tsx", SourceHeaderSyntax.Slash],
|
|
53
|
+
["mts", SourceHeaderSyntax.Slash],
|
|
54
|
+
["cts", SourceHeaderSyntax.Slash],
|
|
55
|
+
["js", SourceHeaderSyntax.Slash],
|
|
56
|
+
["mjs", SourceHeaderSyntax.Slash],
|
|
57
|
+
["cjs", SourceHeaderSyntax.Slash],
|
|
58
|
+
["rs", SourceHeaderSyntax.Slash],
|
|
59
|
+
["java", SourceHeaderSyntax.Slash],
|
|
60
|
+
["cpp", SourceHeaderSyntax.Slash],
|
|
61
|
+
["sh", SourceHeaderSyntax.Hash],
|
|
62
|
+
["css", SourceHeaderSyntax.CSS],
|
|
63
|
+
])
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Repository paths whose content is generated or vendored, or whose exact lines a test reads.
|
|
67
|
+
*
|
|
68
|
+
* A directory entry ends with `/`.
|
|
69
|
+
*/
|
|
70
|
+
export const SPDX_HEADER_EXEMPT_PATHS: readonly string[] = [
|
|
71
|
+
// Yarn's own release bundle.
|
|
72
|
+
".yarn/",
|
|
73
|
+
// The Vale fixtures assert alerts by line.
|
|
74
|
+
"config/vale/fixtures/",
|
|
75
|
+
// Emscripten writes this loader; `build.sh` regenerates it.
|
|
76
|
+
"packages/sentencepiece-wasm/sentencepiece.mjs",
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The header syntax for a repository-relative path, or null when the path takes no header.
|
|
81
|
+
*/
|
|
82
|
+
export function sourceHeaderSyntax(path: string): SourceHeaderSyntax | null {
|
|
83
|
+
if (SPDX_HEADER_EXEMPT_PATHS.some((exempt) => (exempt.endsWith("/") ? path.startsWith(exempt) : path === exempt))) {
|
|
84
|
+
return null
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (path.endsWith(".d.ts")) return SourceHeaderSyntax.Slash
|
|
88
|
+
|
|
89
|
+
const extension = /\.([a-z]+)$/.exec(path)?.[1]
|
|
90
|
+
|
|
91
|
+
return extension == null ? null : (SYNTAX_BY_EXTENSION.get(extension) ?? null)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const SCRIPT_EXTENSIONS = /\.(?:ts|tsx|mts|cts|js|mjs|cjs)$/
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Whether a path is JavaScript or TypeScript.
|
|
98
|
+
*
|
|
99
|
+
* The header rewrite for such a path needs the parser's comment ranges.
|
|
100
|
+
*/
|
|
101
|
+
export function isScriptSourcePath(path: string): boolean {
|
|
102
|
+
return SCRIPT_EXTENSIONS.test(path)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The two SPDX lines for a syntax, without line endings.
|
|
107
|
+
*/
|
|
108
|
+
export function spdxHeaderLines(syntax: SourceHeaderSyntax): readonly [string, string] {
|
|
109
|
+
const tags = [
|
|
110
|
+
`SPDX-FileCopyrightText: ${SPDX_FILE_COPYRIGHT_TEXT}`,
|
|
111
|
+
`SPDX-License-Identifier: ${SPDX_LICENSE_EXPRESSION}`,
|
|
112
|
+
]
|
|
113
|
+
|
|
114
|
+
switch (syntax) {
|
|
115
|
+
case SourceHeaderSyntax.Slash:
|
|
116
|
+
return [`// ${tags[0]}`, `// ${tags[1]}`]
|
|
117
|
+
case SourceHeaderSyntax.Hash:
|
|
118
|
+
return [`# ${tags[0]}`, `# ${tags[1]}`]
|
|
119
|
+
case SourceHeaderSyntax.CSS:
|
|
120
|
+
return [`/* ${tags[0]} */`, `/* ${tags[1]} */`]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The header text a generator writes before a module's own content: both SPDX lines and the blank line.
|
|
126
|
+
*/
|
|
127
|
+
export function spdxHeaderText(syntax: SourceHeaderSyntax): string {
|
|
128
|
+
return `${spdxHeaderLines(syntax).join("\n")}\n\n`
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Matches the first line of an old header, in any of its comment forms.
|
|
133
|
+
*
|
|
134
|
+
* The match is anchored to the line, so the rewrite keeps prose that mentions the old header mid-sentence.
|
|
135
|
+
*/
|
|
136
|
+
const OLD_HEADER_COPYRIGHT_LINE = /^[\t ]*(?:\*|\/\/|#)[\t ]*@copyright Sister Software\b/
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Matches a tag line of an old header inside its comment.
|
|
140
|
+
*/
|
|
141
|
+
const OLD_HEADER_TAG_LINE = /^[\t ]*(?:\*|\/\/|#)[\t ]*@(?:copyright|license|author)\b/
|
|
142
|
+
|
|
143
|
+
const EMPTY_STAR_LINE = /^[\t ]*\*[\t ]*\r?$/
|
|
144
|
+
const EMPTY_LINE_COMMENT = /^[\t ]*(?:\/\/|#)[\t ]*\r?$/
|
|
145
|
+
const BLANK_LINE = /^[\t ]*\r?$/
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The start and end offsets of one comment, as a parser reports it.
|
|
149
|
+
*/
|
|
150
|
+
export type CommentRange = readonly [start: number, end: number]
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Removes the old header's tag lines from every comment holding them, in place.
|
|
154
|
+
*
|
|
155
|
+
* With `comments`, a tag line counts only when it lies inside one of those ranges.
|
|
156
|
+
* A generator's template literal can spell the old header as text, and that check keeps it unchanged.
|
|
157
|
+
*
|
|
158
|
+
* Without `comments`, a tag line counts when the lines around it form a comment.
|
|
159
|
+
* Comments are processed from the bottom up, so the offsets of the earlier ones stay valid.
|
|
160
|
+
*/
|
|
161
|
+
function removeOldHeaders(lines: string[], comments: readonly CommentRange[] | undefined): void {
|
|
162
|
+
const lineStarts: number[] = []
|
|
163
|
+
let offset = 0
|
|
164
|
+
|
|
165
|
+
for (const line of lines) {
|
|
166
|
+
lineStarts.push(offset)
|
|
167
|
+
offset += line.length + 1
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const isComment = (index: number): boolean => {
|
|
171
|
+
if (comments == null) return insideComment(lines, index)
|
|
172
|
+
|
|
173
|
+
const at = lineStarts[index]! + /^[\t ]*/.exec(lines[index]!)![0].length
|
|
174
|
+
|
|
175
|
+
return comments.some(([start, end]) => start <= at && at < end)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const candidates = lines.flatMap((line, index) =>
|
|
179
|
+
OLD_HEADER_COPYRIGHT_LINE.test(line) && isComment(index) ? [index] : []
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
for (const tagLine of candidates.toReversed()) {
|
|
183
|
+
removeOldHeaderAt(lines, tagLine)
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function removeOldHeaderAt(lines: string[], tagLine: number): void {
|
|
188
|
+
if (/^[\t ]*\*/.test(lines[tagLine]!)) {
|
|
189
|
+
const opener = findOpener(lines, tagLine)
|
|
190
|
+
const closer = lines.findIndex((line, index) => index >= tagLine && line.includes("*/"))
|
|
191
|
+
|
|
192
|
+
if (opener === -1 || closer === -1 || opener === closer) return
|
|
193
|
+
|
|
194
|
+
const body = lines.slice(opener + 1, closer).filter((line) => !OLD_HEADER_TAG_LINE.test(line))
|
|
195
|
+
|
|
196
|
+
while (body.length && EMPTY_STAR_LINE.test(body[0]!)) {
|
|
197
|
+
body.shift()
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if (
|
|
201
|
+
!body.length &&
|
|
202
|
+
/^[\t ]*\/\*\*?[\t ]*\r?$/.test(lines[opener]!) &&
|
|
203
|
+
/^[\t ]*\*\/[\t ]*\r?$/.test(lines[closer]!)
|
|
204
|
+
) {
|
|
205
|
+
let end = closer + 1
|
|
206
|
+
|
|
207
|
+
while (end < lines.length && BLANK_LINE.test(lines[end]!) && end < lines.length - 1) {
|
|
208
|
+
end++
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
lines.splice(opener, end - opener)
|
|
212
|
+
} else {
|
|
213
|
+
lines.splice(opener + 1, closer - opener - 1, ...body)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const marker = /^[\t ]*(\/\/|#)/.exec(lines[tagLine]!)![1]!
|
|
220
|
+
const isRunLine = (line: string) => line.trimStart().startsWith(marker) && !line.startsWith("#!")
|
|
221
|
+
let start = tagLine
|
|
222
|
+
let end = tagLine
|
|
223
|
+
|
|
224
|
+
while (start > 0 && isRunLine(lines[start - 1]!)) {
|
|
225
|
+
start--
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
while (end + 1 < lines.length && isRunLine(lines[end + 1]!)) {
|
|
229
|
+
end++
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const run = lines.slice(start, end + 1).filter((line) => !OLD_HEADER_TAG_LINE.test(line))
|
|
233
|
+
|
|
234
|
+
while (run.length && EMPTY_LINE_COMMENT.test(run[0]!)) {
|
|
235
|
+
run.shift()
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
lines.splice(start, end - start + 1, ...run)
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function findOpener(lines: readonly string[], from: number): number {
|
|
242
|
+
for (let index = from; index >= 0; index--) {
|
|
243
|
+
const line = lines[index]!
|
|
244
|
+
|
|
245
|
+
if (index < from && line.includes("*/")) return -1
|
|
246
|
+
|
|
247
|
+
if (line.includes("/*")) return index
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return -1
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function insideComment(lines: readonly string[], index: number): boolean {
|
|
254
|
+
const line = lines[index]!
|
|
255
|
+
|
|
256
|
+
if (/^[\t ]*(?:\/\/|#)/.test(line)) return true
|
|
257
|
+
|
|
258
|
+
return findOpener(lines, index) >= 0
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Returns `text` with the SPDX header as its first lines and the old JSDoc header's tags removed.
|
|
263
|
+
*
|
|
264
|
+
* The rest of the old header's comment stays where it was.
|
|
265
|
+
* A comment left empty is deleted.
|
|
266
|
+
*
|
|
267
|
+
* A file that already starts correctly comes back unchanged, so the rewrite is idempotent.
|
|
268
|
+
*
|
|
269
|
+
* A JavaScript or TypeScript caller passes `comments`, the parser's comment ranges.
|
|
270
|
+
* A template literal can spell the old header, and only the parser tells it from a comment.
|
|
271
|
+
*/
|
|
272
|
+
export function rewriteSourceHeader(
|
|
273
|
+
text: string,
|
|
274
|
+
syntax: SourceHeaderSyntax,
|
|
275
|
+
comments?: readonly CommentRange[]
|
|
276
|
+
): string {
|
|
277
|
+
const header = spdxHeaderLines(syntax)
|
|
278
|
+
// oxlint-disable-next-line mailwoman/prefer-spliterator -- one source file, already in memory, edited by line index
|
|
279
|
+
const lines = text.split("\n")
|
|
280
|
+
|
|
281
|
+
removeOldHeaders(lines, comments)
|
|
282
|
+
|
|
283
|
+
const shebang = lines[0]?.startsWith("#!") ? lines.shift()! : null
|
|
284
|
+
// A misplaced copy of the SPDX lines moves to the top rather than being written twice.
|
|
285
|
+
const rest = lines.filter((line) => line.replace(/\r$/, "") !== header[0] && line.replace(/\r$/, "") !== header[1])
|
|
286
|
+
|
|
287
|
+
while (rest.length > 1 && BLANK_LINE.test(rest[0]!)) {
|
|
288
|
+
rest.shift()
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const endsWithNewline = text.endsWith("\n")
|
|
292
|
+
const body = rest.length === 1 && rest[0] === "" ? [] : rest
|
|
293
|
+
const composed = [...(shebang == null ? [] : [shebang]), ...header, ...(body.length ? ["", ...body] : [])].join("\n")
|
|
294
|
+
|
|
295
|
+
return endsWithNewline && !composed.endsWith("\n") ? `${composed}\n` : composed
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Describes what's wrong with a file's header, or returns null when the file starts correctly.
|
|
300
|
+
*/
|
|
301
|
+
export function sourceHeaderProblem(
|
|
302
|
+
text: string,
|
|
303
|
+
syntax: SourceHeaderSyntax,
|
|
304
|
+
comments?: readonly CommentRange[]
|
|
305
|
+
): string | null {
|
|
306
|
+
if (rewriteSourceHeader(text, syntax, comments) === text) return null
|
|
307
|
+
|
|
308
|
+
const [copyright, license] = spdxHeaderLines(syntax)
|
|
309
|
+
|
|
310
|
+
return (
|
|
311
|
+
`The file must start with \`${copyright}\` and \`${license}\`, after any shebang, followed by one blank line. ` +
|
|
312
|
+
"The old `@copyright`/`@license`/`@author` JSDoc tags go. The autofix writes the header."
|
|
313
|
+
)
|
|
314
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A state machine as a pure transition function and a shell that applies its steps.
|
|
6
|
+
*
|
|
7
|
+
* `transition(state, event)` decides a step: the next state, the values its carrier
|
|
8
|
+
* writes in the same write as the state, and the effects to run once that write lands,
|
|
9
|
+
* each described rather than performed and tagged with an {@link OperationEffect}.
|
|
10
|
+
* A test reads every step without a database or a network. {@link applyStep} writes a
|
|
11
|
+
* step through a {@link StateCarrier} with compare-and-set, so a step decided from a
|
|
12
|
+
* state another writer has since left is refused rather than written over it.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { OperationEffect } from "#scripting/operation"
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A write a transition asks its shell to run after the state lands, described rather than performed.
|
|
19
|
+
*/
|
|
20
|
+
export interface MachineEffect<TKind extends string = string> {
|
|
21
|
+
readonly kind: TKind
|
|
22
|
+
/**
|
|
23
|
+
* What the write does to the world.
|
|
24
|
+
*/
|
|
25
|
+
readonly effect: OperationEffect
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* What a transition decides from one state and one event.
|
|
30
|
+
*/
|
|
31
|
+
export interface Step<TState extends string, TRecord extends object, TEffect extends MachineEffect = MachineEffect> {
|
|
32
|
+
readonly next: TState
|
|
33
|
+
/**
|
|
34
|
+
* Values the carrier writes in the same compare-and-set as the state, such as a row's other columns.
|
|
35
|
+
* A key holding `undefined` leaves its column as it was.
|
|
36
|
+
*/
|
|
37
|
+
readonly record: Readonly<Partial<TRecord>>
|
|
38
|
+
/**
|
|
39
|
+
* Writes to run, in order, once the state lands.
|
|
40
|
+
*/
|
|
41
|
+
readonly effects: readonly TEffect[]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A machine's states and its pure transition function.
|
|
46
|
+
*/
|
|
47
|
+
export interface StateMachine<
|
|
48
|
+
TState extends string,
|
|
49
|
+
TEvent,
|
|
50
|
+
TRecord extends object = Record<never, never>,
|
|
51
|
+
TEffect extends MachineEffect = MachineEffect,
|
|
52
|
+
> {
|
|
53
|
+
readonly name: string
|
|
54
|
+
readonly states: readonly TState[]
|
|
55
|
+
/**
|
|
56
|
+
* One event for each case the transition distinguishes, keyed by a label for that case.
|
|
57
|
+
*
|
|
58
|
+
* The effects register applies every event to every state to print the machine's
|
|
59
|
+
* transition table, and a test can assert the same table.
|
|
60
|
+
*/
|
|
61
|
+
readonly events?: Readonly<Record<string, TEvent>>
|
|
62
|
+
/**
|
|
63
|
+
* The step from `state` on `event`.
|
|
64
|
+
*
|
|
65
|
+
* It reads only its arguments, and its caller performs every write.
|
|
66
|
+
*/
|
|
67
|
+
transition(state: TState, event: TEvent): Step<TState, TRecord, TEffect>
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Declares a machine, keeping its types for the shell and its tests.
|
|
72
|
+
*/
|
|
73
|
+
export function defineStateMachine<
|
|
74
|
+
TState extends string,
|
|
75
|
+
TEvent,
|
|
76
|
+
TRecord extends object = Record<never, never>,
|
|
77
|
+
TEffect extends MachineEffect = MachineEffect,
|
|
78
|
+
>(machine: StateMachine<TState, TEvent, TRecord, TEffect>): StateMachine<TState, TEvent, TRecord, TEffect> {
|
|
79
|
+
return machine
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Where a machine's state is stored.
|
|
84
|
+
*
|
|
85
|
+
* `compareAndSet` writes `to` and the step's record only while the store still
|
|
86
|
+
* holds `from`, and reports whether it wrote.
|
|
87
|
+
*/
|
|
88
|
+
export interface StateCarrier<TState extends string, TRecord extends object> {
|
|
89
|
+
compareAndSet(from: TState, to: TState, record: Readonly<Partial<TRecord>>): Promise<boolean>
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* How {@link applyStep} ended.
|
|
94
|
+
*
|
|
95
|
+
* - `unchanged`: the step keeps the state with an empty record and an empty effect list,
|
|
96
|
+
* and the carrier was not called.
|
|
97
|
+
* - `applied`: the carrier wrote the step, and every effect ran.
|
|
98
|
+
* - `conflict`: the store left `from` before the write.
|
|
99
|
+
* The row keeps the other writer's values, and the effects didn't run.
|
|
100
|
+
* The caller reads the state again and decides from it.
|
|
101
|
+
*/
|
|
102
|
+
export interface StepOutcome<TState extends string, TRecord extends object, TEffect extends MachineEffect> {
|
|
103
|
+
status: "unchanged" | "applied" | "conflict"
|
|
104
|
+
from: TState
|
|
105
|
+
step: Step<TState, TRecord, TEffect>
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Whether a step leaves the store as it is: it keeps the state, its record holds
|
|
110
|
+
* only `undefined`, and its effect list is empty.
|
|
111
|
+
*/
|
|
112
|
+
export function isNoopStep<TState extends string, TRecord extends object, TEffect extends MachineEffect>(
|
|
113
|
+
from: TState,
|
|
114
|
+
step: Step<TState, TRecord, TEffect>
|
|
115
|
+
): boolean {
|
|
116
|
+
return step.next === from && Object.values(step.record).every((value) => value === undefined) && !step.effects.length
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Decides the step from `current` on `event`, writes it through `carrier`,
|
|
121
|
+
* and runs its effects with `runEffect`.
|
|
122
|
+
*
|
|
123
|
+
* @throws When the step has effects and no `runEffect` was given, or
|
|
124
|
+
* when an effect throws after the state landed.
|
|
125
|
+
*/
|
|
126
|
+
export async function applyStep<TState extends string, TEvent, TRecord extends object, TEffect extends MachineEffect>(
|
|
127
|
+
machine: StateMachine<TState, TEvent, TRecord, TEffect>,
|
|
128
|
+
carrier: StateCarrier<TState, TRecord>,
|
|
129
|
+
current: TState,
|
|
130
|
+
event: TEvent,
|
|
131
|
+
runEffect?: (effect: TEffect) => Promise<void>
|
|
132
|
+
): Promise<StepOutcome<TState, TRecord, TEffect>> {
|
|
133
|
+
const step = machine.transition(current, event)
|
|
134
|
+
|
|
135
|
+
if (isNoopStep(current, step)) return { status: "unchanged", from: current, step }
|
|
136
|
+
|
|
137
|
+
if (step.effects.length && !runEffect) {
|
|
138
|
+
throw new Error(`${machine.name}: the step from ${current} to ${step.next} has effects and no runner`)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (!(await carrier.compareAndSet(current, step.next, step.record)))
|
|
142
|
+
return { status: "conflict", from: current, step }
|
|
143
|
+
|
|
144
|
+
for (const effect of step.effects) {
|
|
145
|
+
await runEffect!(effect)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return { status: "applied", from: current, step }
|
|
149
|
+
}
|