@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
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file A scripted stub Axios adapter for testing {@linkcode APIClient} subclasses.
|
|
6
|
-
* It also provides the Axios-shaped error builder for rejected requests.
|
|
7
|
-
* Its sibling `./test-clocks.ts` makes time deterministic. This module makes the network deterministic.
|
|
8
|
-
* The pacing tests use both modules.
|
|
9
|
-
*
|
|
10
|
-
* The code came from `filer/sdk/sec-client.test.ts` and `bdc/sdk/client.test.ts`.
|
|
11
|
-
* Those files had near-identical copies.
|
|
12
|
-
* The duplication was expected because `agents.md` names those two as worked examples for the `APIClient` migration.
|
|
13
|
-
* The second client's tests were written from the first's.
|
|
14
|
-
* Later clients would have copied the same helpers.
|
|
15
|
-
*
|
|
16
|
-
* Everything here is built structurally with `isAxiosError: true` and `config`/`code`/`response`.
|
|
17
|
-
* The adapter uses `APIClientConfig["axios"]` because the packages under test reach Axios integrations through
|
|
18
|
-
* `@mailwoman/core`. The axios type {@linkcode stubFetchingBodies} resolves is stated here
|
|
19
|
-
* rather than by the calling test,
|
|
20
|
-
* so a workspace that stubs a request needs no `axios` dependency of its own.
|
|
21
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
22
3
|
import { stringifyJSON } from "#json";
|
|
23
4
|
const HTTP_OK = 200;
|
|
24
5
|
const HTTP_MULTIPLE_CHOICES = 300;
|
|
@@ -30,7 +11,7 @@ const HTTP_SERVER_ERROR_MIN = 500;
|
|
|
30
11
|
* that field only rather than building headers and a config.
|
|
31
12
|
* Several bodies script a reader that asks twice, such as a count checked against a page.
|
|
32
13
|
*
|
|
33
|
-
* This lives beside {@linkcode stubTransport} so that a workspace which
|
|
14
|
+
* This lives beside {@linkcode stubTransport} so that a workspace which doesn't
|
|
34
15
|
* depend on `axios` can still stub the method: the axios type is stated here,
|
|
35
16
|
* in core, rather than by the test that calls this.
|
|
36
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../lib/api/test/transport.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../lib/api/test/transport.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAk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QAAQ,CAAA;QAExE,MAAM,cAAc,CACnB,mCAAmC,MAAM,EAAE,EAC3C,MAAM,IAAI,qBAAqB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,iBAAiB,EACxE,MAAM,EACN,QAAQ,CACR,CAAA;IACF,CAAC,CAAA;IAED,iCAAiC;IACjC,sFAAsF;IACtF,+DAA+D;IAC/D,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAoB,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,CAAA;AAC/E,CAAC"}
|
package/out/api.d.ts
CHANGED
package/out/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../lib/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../lib/api.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
package/out/api.js
CHANGED
|
@@ -1,8 +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
|
-
*
|
|
6
4
|
* Core API utilities.
|
|
7
5
|
*/
|
|
8
6
|
export * from "#api/APIClient";
|
package/out/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../lib/api.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../lib/api.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;GAEG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAuB,MAAM,iBAAiB,CAAA;AACrD,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAE1B,6FAA6F;AAC7F,8FAA8F;AAC9F,qEAAqE"}
|
package/out/asset/names.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
2
|
* The names of the published Protomaps tile artifacts.
|
|
7
3
|
*
|
|
8
|
-
* The module holds only string constants, so a browser or worker bundle that needs
|
|
9
|
-
* no path builder and no environment reader.
|
|
4
|
+
* The module holds only string constants, so a browser or worker bundle that needs
|
|
5
|
+
* a tileset name loads no path builder and no environment reader.
|
|
6
|
+
* The URL builders that read those live in `asset-paths.ts`.
|
|
10
7
|
*/
|
|
11
8
|
/**
|
|
12
9
|
* The version of the Protomaps library used for tile generation.
|
package/out/asset/names.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../lib/asset/names.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../lib/asset/names.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAA;AAErC;;GAEG;AACH,eAAO,MAAM,qBAAqB,UAAU,CAAA;AAE5C;;GAEG;AACH,eAAO,MAAM,6BAA6B,cAAgC,CAAA;AAE1E;;GAEG;AACH,eAAO,MAAM,0BAA0B,sBAA6C,CAAA"}
|
package/out/asset/names.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
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
|
-
*
|
|
6
4
|
* The names of the published Protomaps tile artifacts.
|
|
7
5
|
*
|
|
8
|
-
* The module holds only string constants, so a browser or worker bundle that needs
|
|
9
|
-
* no path builder and no environment reader.
|
|
6
|
+
* The module holds only string constants, so a browser or worker bundle that needs
|
|
7
|
+
* a tileset name loads no path builder and no environment reader.
|
|
8
|
+
* The URL builders that read those live in `asset-paths.ts`.
|
|
10
9
|
*/
|
|
11
10
|
/**
|
|
12
11
|
* The version of the Protomaps library used for tile generation.
|
package/out/asset/names.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../lib/asset/names.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../lib/asset/names.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAA;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAA;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,UAAU,iBAAiB,EAAE,CAAA;AAE1E;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,6BAA6B,UAAU,CAAA"}
|
package/out/asset/paths.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
2
|
* Path builders for Mailwoman's platform-native application directories.
|
|
7
3
|
*
|
|
8
|
-
* The builders read the typed environment and `path-ts`, so this module is for Node callers.
|
|
9
|
-
* needs only a tileset name reads `asset-names.ts`, a module of string constants.
|
|
4
|
+
* The builders read the typed environment and `path-ts`, so this module is for Node callers.
|
|
5
|
+
* A bundle that needs only a tileset name reads `asset-names.ts`, a module of string constants.
|
|
10
6
|
*/
|
|
11
7
|
import { type PathBuilder } from "path-ts";
|
|
12
8
|
/**
|
package/out/asset/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../lib/asset/paths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../lib/asset/paths.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAyBrE;;GAEG;AACH,eAAO,MAAM,cAAc,6CAAkE,CAAA;AAE7F;;GAEG;AACH,eAAO,MAAM,eAAe,8CAAmE,CAAA"}
|
package/out/asset/paths.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
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
|
-
*
|
|
6
4
|
* Path builders for Mailwoman's platform-native application directories.
|
|
7
5
|
*
|
|
8
|
-
* The builders read the typed environment and `path-ts`, so this module is for Node callers.
|
|
9
|
-
* needs only a tileset name reads `asset-names.ts`, a module of string constants.
|
|
6
|
+
* The builders read the typed environment and `path-ts`, so this module is for Node callers.
|
|
7
|
+
* A bundle that needs only a tileset name reads `asset-names.ts`, a module of string constants.
|
|
10
8
|
*/
|
|
11
9
|
import { createPathBuilderResolver } from "path-ts";
|
|
12
10
|
// TODO: Move this to "path-ts/zod" once the resolver is fully typed
|
package/out/asset/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../lib/asset/paths.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../lib/asset/paths.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;;GAKG;AAEH,OAAO,EAAE,yBAAyB,EAAoB,MAAM,SAAS,CAAA;AAErE,oEAAoE;AACpE,0DAA0D;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAO9B;;;;GAIG;AACH,SAAS,4BAA4B,CAInC,KAAc;IACf,OAAO,yBAAyB,CAAC,KAAK,CAAC,CAAA;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,4BAA4B,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAE7F;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,4BAA4B,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAA"}
|
package/out/binary-frame.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-frame.d.ts","sourceRoot":"","sources":["../lib/binary-frame.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"binary-frame.d.ts","sourceRoot":"","sources":["../lib/binary-frame.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,qBAAa,UAAU;;IAGtB,MAAM,EAAE,MAAM,CAAA;IAEd,YAAY,KAAK,EAAE,UAAU,EAAE,MAAM,SAAI,EAIxC;IAED,EAAE,IAAI,MAAM,CAKX;IAED,GAAG,IAAI,MAAM,CAKZ;IAED,GAAG,IAAI,MAAM,CAKZ;IAED,GAAG,IAAI,MAAM,CAKZ;IAED,GAAG,IAAI,MAAM,CAKZ;IAED,GAAG,IAAI,MAAM,CAKZ;IAED,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAKhC;CACD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,CAU5E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EACtC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,MAAM,GACrB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CASxC"}
|
package/out/binary-frame.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
6
3
|
import { parseJSONStrict, stringifyJSON } from "#json";
|
|
7
4
|
/**
|
|
8
5
|
* Reads little-endian values sequentially from a byte buffer, advancing `offset` after each read.
|
package/out/binary-frame.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-frame.js","sourceRoot":"","sources":["../lib/binary-frame.ts"],"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,GAAG,CAAA;AACX,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC/B,KAAa,EACb,KAAiB,EACjB,eAAuB;IAEvB,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;IAEpC,IAAI,MAAM,CAAC,GAAG,EAAE,KAAK,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;IAE5D,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,EAAE,CAAA;IAC9B,MAAM,MAAM,GAAG,eAAe,CAAS,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IAEzF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AAC1B,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One permission as the API names it and as a dashboard template link keys it.
|
|
3
|
+
*/
|
|
4
|
+
export interface CloudflarePermission {
|
|
5
|
+
/**
|
|
6
|
+
* The permission group's name in `GET /accounts/:id/tokens/permission_groups`.
|
|
7
|
+
*
|
|
8
|
+
* The API spells write access "Write" and the dashboard spells it "Edit".
|
|
9
|
+
* {@linkcode resolvePermissionGroups} matches either.
|
|
10
|
+
*/
|
|
11
|
+
group: string;
|
|
12
|
+
/**
|
|
13
|
+
* The `permissionGroupKeys` entry of a dashboard template link.
|
|
14
|
+
*/
|
|
15
|
+
key: string;
|
|
16
|
+
type: "read" | "edit" | "purge";
|
|
17
|
+
scope: "account" | "zone";
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A permission group as `GET /accounts/:id/tokens/permission_groups` returns it.
|
|
21
|
+
*/
|
|
22
|
+
export interface PermissionGroup {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TokenPolicy {
|
|
27
|
+
effect: "allow";
|
|
28
|
+
resources: Record<string, string>;
|
|
29
|
+
permission_groups: PermissionGroup[];
|
|
30
|
+
}
|
|
31
|
+
export interface TokenRequest {
|
|
32
|
+
name: string;
|
|
33
|
+
policies: TokenPolicy[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A dashboard link that opens the account-owned token form with `permissions` and `name` filled in.
|
|
37
|
+
*
|
|
38
|
+
* The form asks which account when the viewer belongs to several.
|
|
39
|
+
* A template link cannot preset a zone, so a token with a zone permission asks the viewer to pick the zone.
|
|
40
|
+
*/
|
|
41
|
+
export declare function tokenTemplateLink(name: string, permissions: readonly CloudflarePermission[]): string;
|
|
42
|
+
/**
|
|
43
|
+
* The permission group of each of `permissions`, matched by name.
|
|
44
|
+
*
|
|
45
|
+
* Throws naming every permission without a group, so a renamed group stops a mint before any token exists.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolvePermissionGroups(permissions: readonly CloudflarePermission[], groups: readonly PermissionGroup[]): Map<CloudflarePermission, PermissionGroup>;
|
|
48
|
+
/**
|
|
49
|
+
* The request body that creates a token holding `permissions`.
|
|
50
|
+
*
|
|
51
|
+
* Account permissions apply to `accountID` and zone permissions to `zoneID`, one policy each.
|
|
52
|
+
* A token with no permission of a scope gets no policy for it.
|
|
53
|
+
*/
|
|
54
|
+
export declare function tokenRequestBody(options: {
|
|
55
|
+
name: string;
|
|
56
|
+
permissions: readonly CloudflarePermission[];
|
|
57
|
+
groups: Map<CloudflarePermission, PermissionGroup>;
|
|
58
|
+
accountID: string;
|
|
59
|
+
zoneID?: string;
|
|
60
|
+
}): TokenRequest;
|
|
61
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../lib/cloudflare/tokens.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IAC/B,KAAK,EAAE,SAAS,GAAG,MAAM,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,WAAW;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,iBAAiB,EAAE,eAAe,EAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,EAAE,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,oBAAoB,EAAE,GAAG,MAAM,CAMpG;AAMD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACtC,WAAW,EAAE,SAAS,oBAAoB,EAAE,EAC5C,MAAM,EAAE,SAAS,eAAe,EAAE,GAChC,GAAG,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAoB5C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,SAAS,oBAAoB,EAAE,CAAA;IAC5C,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAA;IAClD,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,YAAY,CA6Bf"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
/**
|
|
4
|
+
* @file Builds Cloudflare API token requests and the dashboard links that create the same tokens by hand.
|
|
5
|
+
* A permission is declared once with both spellings Cloudflare uses for it: the permission group name the
|
|
6
|
+
* API lists, and the short key a dashboard template link takes.
|
|
7
|
+
*/
|
|
8
|
+
import { stringifyJSON } from "#json";
|
|
9
|
+
const DASHBOARD = "https://dash.cloudflare.com/";
|
|
10
|
+
/**
|
|
11
|
+
* A dashboard link that opens the account-owned token form with `permissions` and `name` filled in.
|
|
12
|
+
*
|
|
13
|
+
* The form asks which account when the viewer belongs to several.
|
|
14
|
+
* A template link cannot preset a zone, so a token with a zone permission asks the viewer to pick the zone.
|
|
15
|
+
*/
|
|
16
|
+
export function tokenTemplateLink(name, permissions) {
|
|
17
|
+
const keys = permissions.map((permission) => ({ key: permission.key, type: permission.type }));
|
|
18
|
+
const query = new URLSearchParams({ permissionGroupKeys: stringifyJSON(keys), name });
|
|
19
|
+
// The dashboard reads `to` unencoded, as Cloudflare's own template links write it.
|
|
20
|
+
return `${DASHBOARD}?to=/:account/api-tokens&${query.toString().replaceAll("+", "%20")}`;
|
|
21
|
+
}
|
|
22
|
+
function groupNameKey(name) {
|
|
23
|
+
return name.replace(/ (Write|Edit)$/u, " write").toLowerCase();
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The permission group of each of `permissions`, matched by name.
|
|
27
|
+
*
|
|
28
|
+
* Throws naming every permission without a group, so a renamed group stops a mint before any token exists.
|
|
29
|
+
*/
|
|
30
|
+
export function resolvePermissionGroups(permissions, groups) {
|
|
31
|
+
const byName = new Map(groups.map((group) => [groupNameKey(group.name), group]));
|
|
32
|
+
const resolved = new Map();
|
|
33
|
+
const missing = [];
|
|
34
|
+
for (const permission of permissions) {
|
|
35
|
+
const group = byName.get(groupNameKey(permission.group));
|
|
36
|
+
if (group) {
|
|
37
|
+
resolved.set(permission, group);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
missing.push(permission.group);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (missing.length) {
|
|
44
|
+
throw new Error(`Cloudflare lists no permission group named ${missing.map((name) => `"${name}"`).join(", ")}`);
|
|
45
|
+
}
|
|
46
|
+
return resolved;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The request body that creates a token holding `permissions`.
|
|
50
|
+
*
|
|
51
|
+
* Account permissions apply to `accountID` and zone permissions to `zoneID`, one policy each.
|
|
52
|
+
* A token with no permission of a scope gets no policy for it.
|
|
53
|
+
*/
|
|
54
|
+
export function tokenRequestBody(options) {
|
|
55
|
+
const { name, permissions, groups, accountID, zoneID } = options;
|
|
56
|
+
if (!zoneID && permissions.some((permission) => permission.scope === "zone")) {
|
|
57
|
+
throw new Error(`token "${name}" holds a zone permission and no zone was given`);
|
|
58
|
+
}
|
|
59
|
+
const resources = {
|
|
60
|
+
account: { [`com.cloudflare.api.account.${accountID}`]: "*" },
|
|
61
|
+
zone: { [`com.cloudflare.api.account.zone.${zoneID}`]: "*" },
|
|
62
|
+
};
|
|
63
|
+
const policies = ["account", "zone"]
|
|
64
|
+
.map((scope) => ({
|
|
65
|
+
effect: "allow",
|
|
66
|
+
resources: resources[scope],
|
|
67
|
+
permission_groups: permissions
|
|
68
|
+
.filter((permission) => permission.scope === scope)
|
|
69
|
+
.map((permission) => {
|
|
70
|
+
const group = groups.get(permission);
|
|
71
|
+
if (!group)
|
|
72
|
+
throw new Error(`no permission group resolved for "${permission.group}"`);
|
|
73
|
+
return { id: group.id, name: group.name };
|
|
74
|
+
}),
|
|
75
|
+
}))
|
|
76
|
+
.filter((policy) => policy.permission_groups.length);
|
|
77
|
+
return { name, policies };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../lib/cloudflare/tokens.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,M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,EAAE;YACnB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;YAEpC,IAAI,CAAC,KAAK;gBAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAA;YAErF,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAA;QAC1C,CAAC,CAAC;KACH,CAAC,CAAC;SACF,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAErD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;AAC1B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The largest object `wrangler r2 object put` accepts.
|
|
3
|
+
* A larger file goes through rclone.
|
|
4
|
+
*/
|
|
5
|
+
export declare const WRANGLER_OBJECT_CAP_BYTES: number;
|
|
6
|
+
/**
|
|
7
|
+
* Put one local file at `bucket/key` on R2.
|
|
8
|
+
*
|
|
9
|
+
* Throws before running wrangler when the file exceeds {@linkcode WRANGLER_OBJECT_CAP_BYTES}.
|
|
10
|
+
*/
|
|
11
|
+
export declare function putR2ObjectWithWrangler({ file, bucket, key, }: {
|
|
12
|
+
file: string;
|
|
13
|
+
bucket: string;
|
|
14
|
+
key: string;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Run one SQL statement against a remote D1 database and answer the rows it changed.
|
|
18
|
+
*
|
|
19
|
+
* `config` is the `wrangler.toml` that binds `database`.
|
|
20
|
+
*
|
|
21
|
+
* @throws When wrangler exits nonzero, or answers JSON without a `changes` count to read.
|
|
22
|
+
*/
|
|
23
|
+
export declare function executeD1WithWrangler({ database, config, command, }: {
|
|
24
|
+
database: string;
|
|
25
|
+
config: string;
|
|
26
|
+
command: string;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
changes: number;
|
|
29
|
+
}>;
|
|
30
|
+
//# sourceMappingURL=wrangler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrangler.d.ts","sourceRoot":"","sources":["../../lib/cloudflare/wrangler.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAoB,CAAA;AAE1D;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,EAC7C,IAAI,EACJ,MAAM,EACN,GAAG,GACH,EAAE;IACF,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;CACX,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB;AAMD;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,EAC3C,QAAQ,EACR,MAAM,EACN,OAAO,GACP,EAAE;IACF,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA6B/B"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
/**
|
|
4
|
+
* R2 uploads through `wrangler r2 object put` and D1 statements through `wrangler d1 execute`.
|
|
5
|
+
*
|
|
6
|
+
* Wrangler reads `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` from the environment.
|
|
7
|
+
* `wrangler` is an optional peer dependency of this package, so a caller installs it.
|
|
8
|
+
*/
|
|
9
|
+
import { resolvePath } from "path-ts";
|
|
10
|
+
import { statPath } from "#fs/readers/stat";
|
|
11
|
+
import { parseJSONStrict } from "#json";
|
|
12
|
+
import { resolvePackageDirectory } from "#module/resolvers";
|
|
13
|
+
import { isPresent } from "#objects";
|
|
14
|
+
import { runFile } from "#process";
|
|
15
|
+
/**
|
|
16
|
+
* The largest object `wrangler r2 object put` accepts.
|
|
17
|
+
* A larger file goes through rclone.
|
|
18
|
+
*/
|
|
19
|
+
export const WRANGLER_OBJECT_CAP_BYTES = 300 * 1024 * 1024;
|
|
20
|
+
/**
|
|
21
|
+
* Put one local file at `bucket/key` on R2.
|
|
22
|
+
*
|
|
23
|
+
* Throws before running wrangler when the file exceeds {@linkcode WRANGLER_OBJECT_CAP_BYTES}.
|
|
24
|
+
*/
|
|
25
|
+
export async function putR2ObjectWithWrangler({ file, bucket, key, }) {
|
|
26
|
+
const { size } = await statPath(file);
|
|
27
|
+
if (size > WRANGLER_OBJECT_CAP_BYTES) {
|
|
28
|
+
throw new Error(`${file} is ${size.toLocaleString()} bytes; wrangler puts objects up to ${WRANGLER_OBJECT_CAP_BYTES.toLocaleString()}, so publish it through rclone`);
|
|
29
|
+
}
|
|
30
|
+
await runFile("node", [wranglerBin(), "r2", "object", "put", `${bucket}/${key}`, "--file", file, "--remote"]);
|
|
31
|
+
}
|
|
32
|
+
function wranglerBin() {
|
|
33
|
+
return resolvePath(resolvePackageDirectory("wrangler"), "bin", "wrangler.js").toString();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Run one SQL statement against a remote D1 database and answer the rows it changed.
|
|
37
|
+
*
|
|
38
|
+
* `config` is the `wrangler.toml` that binds `database`.
|
|
39
|
+
*
|
|
40
|
+
* @throws When wrangler exits nonzero, or answers JSON without a `changes` count to read.
|
|
41
|
+
*/
|
|
42
|
+
export async function executeD1WithWrangler({ database, config, command, }) {
|
|
43
|
+
// With `--json`, wrangler writes an API failure as JSON on stdout.
|
|
44
|
+
// The thrown message includes that output, so the operator reads the API's stated cause.
|
|
45
|
+
const { stdout } = await runFile("node", [
|
|
46
|
+
wranglerBin(),
|
|
47
|
+
"d1",
|
|
48
|
+
"execute",
|
|
49
|
+
database,
|
|
50
|
+
"--remote",
|
|
51
|
+
"--json",
|
|
52
|
+
"--config",
|
|
53
|
+
config,
|
|
54
|
+
"--command",
|
|
55
|
+
command,
|
|
56
|
+
]).catch((error) => {
|
|
57
|
+
const output = error;
|
|
58
|
+
const detail = [output.stdout, output.stderr].filter(isPresent).join("\n").trim().slice(0, 1000);
|
|
59
|
+
throw new Error(`wrangler d1 execute ${database} failed${detail ? `:\n${detail}` : ""}`, { cause: error });
|
|
60
|
+
});
|
|
61
|
+
const results = parseJSONStrict(stdout);
|
|
62
|
+
const changes = results[0]?.meta?.changes;
|
|
63
|
+
if (typeof changes !== "number") {
|
|
64
|
+
throw new TypeError(`wrangler d1 execute ${database} answered no changes count: ${stdout.slice(0, 200)}`);
|
|
65
|
+
}
|
|
66
|
+
return { changes };
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=wrangler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrangler.js","sourceRoot":"","sources":["../../lib/cloudflare/wrangler.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAC7C,IAAI,EACJ,MAAM,EACN,GAAG,GAKH;IACA,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,IA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AE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;IAC3G,CAAC,CAAC,CAAA;IAEF,MAAM,OAAO,GAAG,eAAe,CAAyC,MAAM,CAAC,CAAA;IAC/E,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAA;IAEzC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,SAAS,CAAC,uBAAuB,QAAQ,+BAA+B,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;IAC1G,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloudflare token request builders, the wrangler R2 upload and the wrangler D1 statement.
|
|
3
|
+
* API calls go through the `cloudflare` SDK.
|
|
4
|
+
*/
|
|
5
|
+
export * from "#cloudflare/tokens";
|
|
6
|
+
export * from "#cloudflare/wrangler";
|
|
7
|
+
//# sourceMappingURL=cloudflare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../lib/cloudflare.ts"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
/**
|
|
4
|
+
* Cloudflare token request builders, the wrangler R2 upload and the wrangler D1 statement.
|
|
5
|
+
* API calls go through the `cloudflare` SDK.
|
|
6
|
+
*/
|
|
7
|
+
export * from "#cloudflare/tokens";
|
|
8
|
+
export * from "#cloudflare/wrangler";
|
|
9
|
+
//# sourceMappingURL=cloudflare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudflare.js","sourceRoot":"","sources":["../lib/cloudflare.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;GAGG;AAEH,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
2
|
* A linear country classifier over hashed character n-gram and script features.
|
|
7
|
-
*
|
|
3
|
+
*
|
|
4
|
+
* Confidence is temperature-calibrated.
|
|
5
|
+
* Predictions below the threshold abstain.
|
|
8
6
|
* The module runs in Node and browsers.
|
|
9
7
|
*/
|
|
10
8
|
import type { PathBuilderLike } from "path-ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coarse-placer.d.ts","sourceRoot":"","sources":["../../lib/coarse-placer/coarse-placer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coarse-placer.d.ts","sourceRoot":"","sources":["../../lib/coarse-placer/coarse-placer.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEjF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,EAAE,CAAA;IACd;;OAEG;IACH,OAAO,EAAE,YAAY,CAAA;CACrB;AAED;;;;;GAKG;AACH,MAAM,WA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eAAe,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAEvG;IAED;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CA+EtC;CACD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC7B,UAAU,EAAE,gBAAgB,EAC5B,IAAI,CAAC,EAAE;IACN;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACrB,GACC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAiB/B;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACrC,QAAQ,EAAE;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,EACxF,OAAO,EAAE,YAAY,EACrB,IAAI,CAAC,EAAE,gBAAgB,GACrB,OAAO,CAAC,YAAY,CAAC,CAEvB"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* A linear country classifier over hashed character n-gram and script features.
|
|
7
|
-
* Confidence is temperature-calibrated. Predictions below the threshold abstain.
|
|
8
|
-
* The module runs in Node and browsers.
|
|
9
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
10
3
|
import { featurize } from "#coarse-placer/featurize";
|
|
11
4
|
import { $public } from "#env";
|
|
12
5
|
import { readLocalBuffer, readLocalJSONFile } from "#fs/readers";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coarse-placer.js","sourceRoot":"","sources":["../../lib/coarse-placer/coarse-placer.ts"],"names":[],"mappings":"AAA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O,CAAC,GAAG,UAAU,CAAC,UAAU,CAAA;IACtD,CAAC;IAED,OAAO,SAAS,CAAA;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,QAAwF,EACxF,OAAqB,EACrB,IAAuB;IAEvB,OAAO,IAAI,YAAY,CAAC,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAA;AACxD,CAAC"}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Feature extraction for the coarse-placer uses a fastText-style hashed character n-gram representation
|
|
7
|
-
* plus explicit Unicode-script presence tokens. The function is deterministic and pure.
|
|
8
|
-
* The training path and always-resident inference share it without dependencies. A string maps to a set of active
|
|
9
|
-
* feature indices in [0, FEATURE_DIM).
|
|
10
|
-
*
|
|
11
|
-
* Script is the dominant coarse-geography signal. Char n-grams separate within a script, so a
|
|
12
|
-
* linear model over both stays a few hundred KB and runs in microseconds.
|
|
13
|
-
*/
|
|
14
1
|
/**
|
|
15
2
|
* The trained classes include well-represented corpus countries and the Overture-sourced EU expansion.
|
|
16
3
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featurize.d.ts","sourceRoot":"","sources":["../../lib/coarse-placer/featurize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"featurize.d.ts","sourceRoot":"","sources":["../../lib/coarse-placer/featurize.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,YAC1B,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,CACE,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,WAAW,QAAU,CAAA;AAElC;;GAEG;AACH,QAAA,MAAM,OAAO,YACZ,OAAO,EACP,KAAK,EACL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,OAAO,EACP,OAAO,CACE,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CA2B3C;AASD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAqChD"}
|