@mailwoman/core 9.0.0 → 9.2.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 +1 -1
- package/api/responses.ts +12 -0
- package/coarse-placer/featurize.ts +0 -2
- package/coarse-placer/tools/build-dataset.ts +2 -2
- package/coarse-placer/tools/build-outlier-exposure.ts +2 -2
- package/coarse-placer/tools/build-outlier-latin.ts +14 -8
- package/coarse-placer/tools/build-outlier-oa.ts +12 -6
- package/coarse-placer/tools/eval-latin-offmap.ts +3 -4
- package/coarse-placer/tools/eval-openset.ts +3 -3
- package/coarse-placer/tools/eval-quant-compare.ts +3 -3
- package/coarse-placer/tools/eval.ts +3 -3
- package/coarse-placer/tools/fnv-hash.ts +1 -6
- package/coarse-placer/tools/index.ts +1 -1
- package/coarse-placer/tools/probe-frontier.ts +3 -4
- package/coarse-placer/tools/quantize.ts +3 -2
- package/coarse-placer/tools/train.ts +2 -2
- package/crypto/node.ts +3 -1
- package/data/internal/dictionaries/languages.csv +184 -184
- package/data/libpostal/README.md +8 -2
- package/db/schema.ts +12 -3
- package/decoder/build-tree.ts +19 -0
- package/decoder/containment.ts +5 -1
- package/decoder/index.ts +1 -0
- package/decoder/parse-diff.ts +347 -0
- package/decoder/proposals-to-tree.ts +1 -1
- package/decoder/serialize-json.ts +51 -7
- package/decoder/serialize-tuples.ts +7 -1
- package/decoder/serialize-xml.ts +1 -1
- package/decoder/tree-shape.ts +144 -0
- package/decoder/types.ts +8 -0
- package/decoder/validate-tree.ts +15 -3
- package/env/index.ts +3 -1
- package/env/paths.ts +21 -33
- package/env/schema.ts +35 -3
- package/fs/utils/formatters.ts +107 -0
- package/fs/utils/index.ts +7 -0
- package/fs/zip.ts +297 -0
- package/layers/manifest.ts +56 -15
- package/layers/schema.ts +54 -2
- package/locale/locale.ts +1 -1
- package/locale/registry.ts +1 -1
- package/objects.ts +20 -8
- package/out/api/responses.d.ts +9 -0
- package/out/api/responses.d.ts.map +1 -1
- package/out/api/responses.js +11 -0
- package/out/api/responses.js.map +1 -1
- package/out/coarse-placer/featurize.d.ts +0 -1
- package/out/coarse-placer/featurize.d.ts.map +1 -1
- package/out/coarse-placer/featurize.js.map +1 -1
- package/out/coarse-placer/tools/build-dataset.js +1 -2
- package/out/coarse-placer/tools/build-dataset.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-exposure.js +1 -2
- package/out/coarse-placer/tools/build-outlier-exposure.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.js +12 -8
- package/out/coarse-placer/tools/build-outlier-latin.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.js +10 -6
- package/out/coarse-placer/tools/build-outlier-oa.js.map +1 -1
- package/out/coarse-placer/tools/eval-latin-offmap.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-latin-offmap.js +2 -4
- package/out/coarse-placer/tools/eval-latin-offmap.js.map +1 -1
- package/out/coarse-placer/tools/eval-openset.js +2 -3
- package/out/coarse-placer/tools/eval-openset.js.map +1 -1
- package/out/coarse-placer/tools/eval-quant-compare.js +2 -3
- package/out/coarse-placer/tools/eval-quant-compare.js.map +1 -1
- package/out/coarse-placer/tools/eval.js +2 -3
- package/out/coarse-placer/tools/eval.js.map +1 -1
- package/out/coarse-placer/tools/fnv-hash.d.ts +1 -6
- package/out/coarse-placer/tools/fnv-hash.d.ts.map +1 -1
- package/out/coarse-placer/tools/fnv-hash.js +1 -6
- package/out/coarse-placer/tools/fnv-hash.js.map +1 -1
- package/out/coarse-placer/tools/index.d.ts +1 -1
- package/out/coarse-placer/tools/index.js +1 -1
- package/out/coarse-placer/tools/probe-frontier.d.ts.map +1 -1
- package/out/coarse-placer/tools/probe-frontier.js +2 -4
- package/out/coarse-placer/tools/probe-frontier.js.map +1 -1
- package/out/coarse-placer/tools/quantize.d.ts.map +1 -1
- package/out/coarse-placer/tools/quantize.js +2 -2
- package/out/coarse-placer/tools/quantize.js.map +1 -1
- package/out/coarse-placer/tools/train.js +1 -2
- package/out/coarse-placer/tools/train.js.map +1 -1
- package/out/crypto/node.d.ts.map +1 -1
- package/out/crypto/node.js +2 -1
- package/out/crypto/node.js.map +1 -1
- package/out/db/schema.d.ts +12 -3
- package/out/db/schema.d.ts.map +1 -1
- package/out/db/schema.js +6 -0
- package/out/db/schema.js.map +1 -1
- package/out/decoder/build-tree.d.ts.map +1 -1
- package/out/decoder/build-tree.js +17 -0
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +5 -1
- package/out/decoder/containment.js.map +1 -1
- package/out/decoder/index.d.ts +1 -0
- package/out/decoder/index.d.ts.map +1 -1
- package/out/decoder/index.js +1 -0
- package/out/decoder/index.js.map +1 -1
- package/out/decoder/parse-diff.d.ts +125 -0
- package/out/decoder/parse-diff.d.ts.map +1 -0
- package/out/decoder/parse-diff.js +219 -0
- package/out/decoder/parse-diff.js.map +1 -0
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/serialize-json.d.ts +29 -0
- package/out/decoder/serialize-json.d.ts.map +1 -1
- package/out/decoder/serialize-json.js +20 -4
- package/out/decoder/serialize-json.js.map +1 -1
- package/out/decoder/serialize-tuples.d.ts +8 -1
- package/out/decoder/serialize-tuples.d.ts.map +1 -1
- package/out/decoder/serialize-tuples.js +7 -1
- package/out/decoder/serialize-tuples.js.map +1 -1
- package/out/decoder/serialize-xml.js +1 -1
- package/out/decoder/serialize-xml.js.map +1 -1
- package/out/decoder/tree-shape.d.ts +84 -0
- package/out/decoder/tree-shape.d.ts.map +1 -0
- package/out/decoder/tree-shape.js +98 -0
- package/out/decoder/tree-shape.js.map +1 -0
- package/out/decoder/types.d.ts +11 -0
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/validate-tree.d.ts +8 -0
- package/out/decoder/validate-tree.d.ts.map +1 -1
- package/out/decoder/validate-tree.js +4 -3
- package/out/decoder/validate-tree.js.map +1 -1
- package/out/env/index.d.ts +13 -1
- package/out/env/index.d.ts.map +1 -1
- package/out/env/index.js +2 -1
- package/out/env/index.js.map +1 -1
- package/out/env/paths.d.ts +15 -8
- package/out/env/paths.d.ts.map +1 -1
- package/out/env/paths.js +19 -29
- package/out/env/paths.js.map +1 -1
- package/out/env/schema.d.ts +12 -1
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +33 -3
- package/out/env/schema.js.map +1 -1
- package/out/fs/utils/formatters.d.ts +57 -0
- package/out/fs/utils/formatters.d.ts.map +1 -0
- package/out/fs/utils/formatters.js +79 -0
- package/out/fs/utils/formatters.js.map +1 -0
- package/out/fs/utils/index.d.ts +7 -0
- package/out/fs/utils/index.d.ts.map +1 -0
- package/out/fs/utils/index.js +7 -0
- package/out/fs/utils/index.js.map +1 -0
- package/out/fs/zip.d.ts +116 -0
- package/out/fs/zip.d.ts.map +1 -0
- package/out/fs/zip.js +216 -0
- package/out/fs/zip.js.map +1 -0
- package/out/layers/manifest.d.ts +32 -7
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +31 -6
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/schema.d.ts +48 -2
- package/out/layers/schema.d.ts.map +1 -1
- package/out/layers/schema.js +32 -0
- package/out/layers/schema.js.map +1 -1
- package/out/locale/locale.d.ts +1 -1
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/registry.js +1 -1
- package/out/locale/registry.js.map +1 -1
- package/out/objects.d.ts +12 -6
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +4 -1
- package/out/objects.js.map +1 -1
- package/out/pipeline/index.d.ts +3 -7
- package/out/pipeline/index.d.ts.map +1 -1
- package/out/pipeline/index.js +2 -4
- package/out/pipeline/index.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +51 -9
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +46 -133
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-proposer.js +1 -1
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +137 -16
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +30 -0
- package/out/pipeline/types.js.map +1 -1
- package/out/policy/defaults.d.ts +1 -1
- package/out/policy/defaults.d.ts.map +1 -1
- package/out/policy/defaults.js +1 -1
- package/out/policy/defaults.js.map +1 -1
- package/out/policy/policy.d.ts +1 -1
- package/out/policy/policy.d.ts.map +1 -1
- package/out/policy/registry.d.ts +1 -1
- package/out/policy/registry.d.ts.map +1 -1
- package/out/resolver/coverage-facts.d.ts +89 -0
- package/out/resolver/coverage-facts.d.ts.map +1 -0
- package/out/resolver/coverage-facts.js +22 -0
- package/out/resolver/coverage-facts.js.map +1 -0
- package/out/resolver/index.d.ts +4 -1
- package/out/resolver/index.d.ts.map +1 -1
- package/out/resolver/index.js +2 -0
- package/out/resolver/index.js.map +1 -1
- package/out/resolver/lookup-types.d.ts +178 -0
- package/out/resolver/lookup-types.d.ts.map +1 -0
- package/out/resolver/lookup-types.js +11 -0
- package/out/resolver/lookup-types.js.map +1 -0
- package/out/resolver/placetype-map.d.ts +71 -0
- package/out/resolver/placetype-map.d.ts.map +1 -0
- package/out/resolver/placetype-map.js +98 -0
- package/out/resolver/placetype-map.js.map +1 -0
- package/out/resolver/postcode-format.d.ts +38 -0
- package/out/resolver/postcode-format.d.ts.map +1 -0
- package/out/resolver/postcode-format.js +83 -0
- package/out/resolver/postcode-format.js.map +1 -0
- package/out/resolver/referential.d.ts +73 -0
- package/out/resolver/referential.d.ts.map +1 -0
- package/out/resolver/referential.js +71 -0
- package/out/resolver/referential.js.map +1 -0
- package/out/resolver/types.d.ts +401 -264
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +4 -97
- package/out/resolver/types.js.map +1 -1
- package/out/resources/git.d.ts +8 -1
- package/out/resources/git.d.ts.map +1 -1
- package/out/resources/git.js +4 -3
- package/out/resources/git.js.map +1 -1
- package/out/resources/languages/types.gen.d.ts +1 -1
- package/out/resources/languages/types.gen.d.ts.map +1 -1
- package/out/resources/languages/types.gen.js +40 -0
- package/out/resources/languages/types.gen.js.map +1 -1
- package/out/resources/libpostal.d.ts +2 -2
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +2 -2
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/whosonfirst/DataSourceCache.d.ts.map +1 -1
- package/out/resources/whosonfirst/DataSourceCache.js.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +2 -2
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js +28 -3
- package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
- package/out/resources/whosonfirst/loader.d.ts +2 -2
- package/out/resources/whosonfirst/loader.d.ts.map +1 -1
- package/out/resources/whosonfirst/loader.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.js +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts +9 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/definition.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/definition.js +1 -1
- package/out/resources/whosonfirst/placetypes/definition.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/index.d.ts +1 -0
- package/out/resources/whosonfirst/placetypes/index.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/index.js +1 -0
- package/out/resources/whosonfirst/placetypes/index.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/specificity.d.ts +65 -0
- package/out/resources/whosonfirst/placetypes/specificity.d.ts.map +1 -0
- package/out/resources/whosonfirst/placetypes/specificity.js +101 -0
- package/out/resources/whosonfirst/placetypes/specificity.js.map +1 -0
- package/out/resources/whosonfirst/sharded-repo.d.ts +28 -0
- package/out/resources/whosonfirst/sharded-repo.d.ts.map +1 -1
- package/out/resources/whosonfirst/sharded-repo.js +46 -2
- package/out/resources/whosonfirst/sharded-repo.js.map +1 -1
- package/out/scripting/arguments.d.ts +27 -0
- package/out/scripting/arguments.d.ts.map +1 -0
- package/out/scripting/arguments.js +32 -0
- package/out/scripting/arguments.js.map +1 -0
- package/out/scripting/command.d.ts +28 -0
- package/out/scripting/command.d.ts.map +1 -0
- package/out/scripting/command.js +47 -0
- package/out/scripting/command.js.map +1 -0
- package/out/scripting/index.js +3 -3
- package/out/scripting/index.js.map +1 -1
- package/out/scripting/utils/index.d.ts +1 -12
- package/out/scripting/utils/index.d.ts.map +1 -1
- package/out/scripting/utils/index.js +4 -21
- package/out/scripting/utils/index.js.map +1 -1
- package/out/tools/download-libpostal-resources.d.ts.map +1 -1
- package/out/tools/download-libpostal-resources.js +4 -7
- package/out/tools/download-libpostal-resources.js.map +1 -1
- package/out/tools/download-ssl-address.d.ts +3 -3
- package/out/tools/download-ssl-address.d.ts.map +1 -1
- package/out/tools/download-ssl-address.js +26 -13
- package/out/tools/download-ssl-address.js.map +1 -1
- package/out/tools/generate-language-types.d.ts +16 -1
- package/out/tools/generate-language-types.d.ts.map +1 -1
- package/out/tools/generate-language-types.js +38 -5
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/tools/index.d.ts +1 -2
- package/out/tools/index.d.ts.map +1 -1
- package/out/tools/index.js +1 -2
- package/out/tools/index.js.map +1 -1
- package/out/utils/data-root.d.ts +27 -7
- package/out/utils/data-root.d.ts.map +1 -1
- package/out/utils/data-root.js +36 -13
- package/out/utils/data-root.js.map +1 -1
- package/out/utils/hash.d.ts +2 -3
- package/out/utils/hash.d.ts.map +1 -1
- package/out/utils/hash.js +3 -3
- package/out/utils/hash.js.map +1 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/index.js.map +1 -1
- package/out/utils/jsonl.js +1 -1
- package/out/utils/jsonl.js.map +1 -1
- package/out/utils/repo.d.ts +8 -0
- package/out/utils/repo.d.ts.map +1 -1
- package/out/utils/repo.js +10 -1
- package/out/utils/repo.js.map +1 -1
- package/out/utils/sealed-db.d.ts +11 -0
- package/out/utils/sealed-db.d.ts.map +1 -1
- package/out/utils/sealed-db.js +28 -1
- package/out/utils/sealed-db.js.map +1 -1
- package/out/utils/sqlite-rows.d.ts +34 -0
- package/out/utils/sqlite-rows.d.ts.map +1 -0
- package/out/utils/sqlite-rows.js +37 -0
- package/out/utils/sqlite-rows.js.map +1 -0
- package/out/utils/stats.d.ts +1 -6
- package/out/utils/stats.d.ts.map +1 -1
- package/out/utils/stats.js +1 -6
- package/out/utils/stats.js.map +1 -1
- package/package.json +488 -8
- package/pipeline/index.ts +14 -15
- package/pipeline/runtime-pipeline.ts +48 -184
- package/pipeline/span-proposer.ts +1 -1
- package/pipeline/types.ts +143 -16
- package/policy/defaults.ts +1 -1
- package/policy/policy.ts +1 -1
- package/policy/registry.ts +1 -1
- package/resolver/coverage-facts.ts +102 -0
- package/resolver/index.ts +18 -0
- package/resolver/lookup-types.ts +174 -0
- package/resolver/placetype-map.ts +122 -0
- package/resolver/postcode-format.ts +89 -0
- package/resolver/referential.ts +84 -0
- package/resolver/types.ts +423 -315
- package/resources/git.ts +18 -4
- package/resources/languages/types.gen.ts +60 -0
- package/resources/libpostal.ts +4 -3
- package/resources/whosonfirst/DataSourceCache.ts +2 -1
- package/resources/whosonfirst/PlacetypeDataSource.ts +36 -11
- package/resources/whosonfirst/loader.ts +3 -2
- package/resources/whosonfirst/placetypes/Placetype.ts +2 -1
- package/resources/whosonfirst/placetypes/admin.ts +11 -2
- package/resources/whosonfirst/placetypes/definition.ts +4 -3
- package/resources/whosonfirst/placetypes/index.ts +1 -0
- package/resources/whosonfirst/placetypes/specificity.ts +114 -0
- package/resources/whosonfirst/sharded-repo.ts +55 -2
- package/scripting/arguments.ts +38 -0
- package/scripting/command.ts +55 -0
- package/scripting/index.ts +3 -3
- package/scripting/utils/index.ts +5 -23
- package/tools/download-libpostal-resources.ts +4 -7
- package/tools/download-ssl-address.ts +28 -12
- package/tools/generate-language-types.ts +39 -5
- package/tools/index.ts +1 -2
- package/utils/data-root.ts +40 -14
- package/utils/hash.ts +5 -4
- package/utils/index.ts +1 -0
- package/utils/jsonl.ts +1 -1
- package/utils/repo.ts +12 -1
- package/utils/sealed-db.ts +30 -1
- package/utils/sqlite-rows.ts +40 -0
- package/utils/stats.ts +1 -6
- package/data/libpostal/dictionaries/all/chains.txt +0 -504
- package/kysley/adapter.ts +0 -29
- package/out/kysley/adapter.d.ts +0 -13
- package/out/kysley/adapter.d.ts.map +0 -1
- package/out/kysley/adapter.js +0 -25
- package/out/kysley/adapter.js.map +0 -1
- package/out/pipeline/reconcile-lookups.d.ts +0 -39
- package/out/pipeline/reconcile-lookups.d.ts.map +0 -1
- package/out/pipeline/reconcile-lookups.js +0 -88
- package/out/pipeline/reconcile-lookups.js.map +0 -1
- package/out/pipeline/reconcile.d.ts +0 -153
- package/out/pipeline/reconcile.d.ts.map +0 -1
- package/out/pipeline/reconcile.js +0 -388
- package/out/pipeline/reconcile.js.map +0 -1
- package/out/pipeline/span-logit-aggregation.d.ts +0 -58
- package/out/pipeline/span-logit-aggregation.d.ts.map +0 -1
- package/out/pipeline/span-logit-aggregation.js +0 -117
- package/out/pipeline/span-logit-aggregation.js.map +0 -1
- package/pipeline/reconcile-lookups.ts +0 -111
- package/pipeline/reconcile.ts +0 -583
- package/pipeline/span-logit-aggregation.ts +0 -156
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* use `decodeAsXML` when containment matters.
|
|
11
11
|
*/
|
|
12
12
|
import type { ComponentTag } from "../types/component.ts";
|
|
13
|
-
import type { AddressTree } from "./types.ts";
|
|
13
|
+
import type { AddressNode, AddressTree } from "./types.ts";
|
|
14
14
|
/**
|
|
15
15
|
* Options for {@link decodeAsTuples}.
|
|
16
16
|
*/
|
|
@@ -21,6 +21,13 @@ export interface SerializeTuplesOpts {
|
|
|
21
21
|
*/
|
|
22
22
|
includeUnknown?: boolean;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Recursively flattens an `AddressNode` tree into a source-ordered list of nodes.
|
|
26
|
+
*
|
|
27
|
+
* @param node The root node to flatten.
|
|
28
|
+
* @param out The output array to which flattened nodes will be appended.
|
|
29
|
+
*/
|
|
30
|
+
export declare function flatten(node: AddressNode, out: AddressNode[]): void;
|
|
24
31
|
/**
|
|
25
32
|
* Project an `AddressTree` to a source-ordered list of (tag, value) pairs.
|
|
26
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize-tuples.d.ts","sourceRoot":"","sources":["../../decoder/serialize-tuples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"serialize-tuples.d.ts","sourceRoot":"","sources":["../../decoder/serialize-tuples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAG1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,CAMnE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,KAAK,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;AAChF,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,GAAG,KAAK,CAAC,CAAC,YAAY,GAAG,SAAS,EAAE,MAAM,CAAC,CAAC,CAAA"}
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
* use `decodeAsXML` when containment matters.
|
|
11
11
|
*/
|
|
12
12
|
import { unknownSpans } from "./unknown-spans.js";
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Recursively flattens an `AddressNode` tree into a source-ordered list of nodes.
|
|
15
|
+
*
|
|
16
|
+
* @param node The root node to flatten.
|
|
17
|
+
* @param out The output array to which flattened nodes will be appended.
|
|
18
|
+
*/
|
|
19
|
+
export function flatten(node, out) {
|
|
14
20
|
out.push(node);
|
|
15
21
|
for (const child of node.children) {
|
|
16
22
|
flatten(child, out);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize-tuples.js","sourceRoot":"","sources":["../../decoder/serialize-tuples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAajD,
|
|
1
|
+
{"version":3,"file":"serialize-tuples.js","sourceRoot":"","sources":["../../decoder/serialize-tuples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAajD;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,IAAiB,EAAE,GAAkB;IAC5D,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEd,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QACnC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IACpB,CAAC;AACF,CAAC;AAQD,MAAM,UAAU,cAAc,CAC7B,IAAiB,EACjB,OAA4B,EAAE;IAE9B,MAAM,GAAG,GAAkB,EAAE,CAAA;IAE7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC/B,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,MAAM,OAAO,GAAwE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACpG,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC;KACvB,CAAC,CAAC,CAAA;IAEH,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;QACzB,KAAK,MAAM,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAC9D,CAAC;IACF,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAA;IAEzC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -107,7 +107,7 @@ function serializeNode(node, indent, opts) {
|
|
|
107
107
|
return `${indent}<${node.tag}${a}>${text}</${node.tag}>`;
|
|
108
108
|
}
|
|
109
109
|
const childrenStr = node.children.map((c) => serializeNode(c, childIndent, opts)).join(nl);
|
|
110
|
-
const inner = [childrenStr, altsBlock].filter(
|
|
110
|
+
const inner = [childrenStr, altsBlock].filter((part) => part.length > 0).join(nl);
|
|
111
111
|
return `${indent}<${node.tag}${a}>${text}${nl}${inner}${nl}${ind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|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Tree-SHAPE predicates over an `AddressTree` — the one stack walk behind the pipeline's bare-tree
|
|
7
|
+
* guards and the "lone bare toponym" gates. Two quantifiers cover every consumer:
|
|
8
|
+
*
|
|
9
|
+
* - {@link isBareTreeOf} — every value-bearing node carries the given tag (several allowed). The
|
|
10
|
+
* #912 / #1589 posture guards (`isBareLocalityTree`, `isBarePostcodeTree`) are this with the tag
|
|
11
|
+
* bound.
|
|
12
|
+
* - {@link loneValueBearingNode} — the tree has EXACTLY one value-bearing node. The street-miss
|
|
13
|
+
* fallback and the resolver's bare-country race bind the tag at the call site.
|
|
14
|
+
*
|
|
15
|
+
* The distinction is load-bearing: a two-segment parse can satisfy the first and never the second,
|
|
16
|
+
* and both behaviors are pinned by their consumers' boards.
|
|
17
|
+
*/
|
|
18
|
+
import type { ComponentTag } from "../types/component.ts";
|
|
19
|
+
import type { AddressNode, AddressTree } from "./types.ts";
|
|
20
|
+
/**
|
|
21
|
+
* True when every node in the tree either carries `tag` or bears no value — i.e. the only EVIDENCE in the parse is
|
|
22
|
+
* `tag`-shaped. A tag-matching node counts even when its value is empty (the guard asks "did the parser emit this
|
|
23
|
+
* shape", not "is the span non-blank"); any OTHER tag with a non-empty value disqualifies. False for a tree with no
|
|
24
|
+
* `tag` node at all.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isBareTreeOf(tree: AddressTree, tag: ComponentTag): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The tree's single value-bearing node, or null when the tree holds none or more than one. Callers gate on the returned
|
|
29
|
+
* node's `tag` — the quantifier ("this is the WHOLE query") is what this walk answers.
|
|
30
|
+
*/
|
|
31
|
+
export declare function loneValueBearingNode(tree: AddressTree): AddressNode | null;
|
|
32
|
+
/**
|
|
33
|
+
* One flattened node, projected for display.
|
|
34
|
+
*
|
|
35
|
+
* A structural copy rather than the `AddressNode` itself: a consumer rendering a span list must not be handed the live
|
|
36
|
+
* node, whose `children` and `metadata` invite a walk it has already been given the result of.
|
|
37
|
+
*/
|
|
38
|
+
export interface FlatTreeNode {
|
|
39
|
+
tag: ComponentTag;
|
|
40
|
+
value: string;
|
|
41
|
+
confidence: number;
|
|
42
|
+
start: number;
|
|
43
|
+
end: number;
|
|
44
|
+
/**
|
|
45
|
+
* Where the assertion came from — `rule`, `neural`, `resolver`.
|
|
46
|
+
*
|
|
47
|
+
* Carried because a span that keeps its tag, its text and its confidence while its source moves from `resolver` to
|
|
48
|
+
* `neural` has lost its gazetteer backing, and a projection that drops this reports that span as unchanged.
|
|
49
|
+
*/
|
|
50
|
+
source?: string;
|
|
51
|
+
sourceID?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The resolver's answer for this span, when one won.
|
|
54
|
+
*
|
|
55
|
+
* Carried for the same reason `source` is: a projection that keeps only the text and the tag cannot tell a span that
|
|
56
|
+
* resolved to a DIFFERENT place from one that did not move at all, and those are a ranking problem and a non-event
|
|
57
|
+
* respectively. `alternatives` is reduced to its LENGTH — the retrieval breadth is what a consumer reads, and handing
|
|
58
|
+
* over the candidate objects invites a walk this projection exists to have already done.
|
|
59
|
+
*/
|
|
60
|
+
placeID?: string;
|
|
61
|
+
lat?: number;
|
|
62
|
+
lon?: number;
|
|
63
|
+
alternatives?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Flatten a tree to its nodes in SOURCE order — sorted by `start`, the same order `decodeAsTuples` means by it.
|
|
67
|
+
*
|
|
68
|
+
* The two copies this replaces (the demo's `demo-helpers.ts` and the `demo-cascade-smoke` mirror of it) relied on
|
|
69
|
+
* TRAVERSAL order instead: depth-first onto a stack, then reversed. That coincides with source order only while every
|
|
70
|
+
* parent's span precedes its children's, and the decoder does not promise it — measured, the two orders disagree on **7
|
|
71
|
+
* of 10** ordinary addresses, always with a child ahead of its parent:
|
|
72
|
+
*
|
|
73
|
+
* Queen Street, Bristol street_suffix@6 before street@0
|
|
74
|
+
* Via Roma, 5, 50123 Firenze, … house_number@10 before street@0
|
|
75
|
+
* 30 St Mary Axe …, London EC3A 8BF postcode@37 before locality@30
|
|
76
|
+
*
|
|
77
|
+
* Sorting is what the tuple projection already does, so this makes a rendered span list and `decodeAsTuples` agree by
|
|
78
|
+
* construction rather than by luck.
|
|
79
|
+
*
|
|
80
|
+
* The smoke test could not import the demo's copy (that would be a `mailwoman` → `docs` project reference, and `docs`
|
|
81
|
+
* already depends on `mailwoman`), which is why a third home was the only way to collapse them.
|
|
82
|
+
*/
|
|
83
|
+
export declare function flattenTreeNodes(tree?: AddressTree | null): FlatTreeNode[];
|
|
84
|
+
//# sourceMappingURL=tree-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-shape.d.ts","sourceRoot":"","sources":["../../decoder/tree-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE1D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,GAAG,OAAO,CAe1E;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAgB1E;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,YAAY,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,YAAY,EAAE,CAwB1E"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Tree-SHAPE predicates over an `AddressTree` — the one stack walk behind the pipeline's bare-tree
|
|
7
|
+
* guards and the "lone bare toponym" gates. Two quantifiers cover every consumer:
|
|
8
|
+
*
|
|
9
|
+
* - {@link isBareTreeOf} — every value-bearing node carries the given tag (several allowed). The
|
|
10
|
+
* #912 / #1589 posture guards (`isBareLocalityTree`, `isBarePostcodeTree`) are this with the tag
|
|
11
|
+
* bound.
|
|
12
|
+
* - {@link loneValueBearingNode} — the tree has EXACTLY one value-bearing node. The street-miss
|
|
13
|
+
* fallback and the resolver's bare-country race bind the tag at the call site.
|
|
14
|
+
*
|
|
15
|
+
* The distinction is load-bearing: a two-segment parse can satisfy the first and never the second,
|
|
16
|
+
* and both behaviors are pinned by their consumers' boards.
|
|
17
|
+
*/
|
|
18
|
+
import { flatten } from "./serialize-tuples.js";
|
|
19
|
+
/**
|
|
20
|
+
* True when every node in the tree either carries `tag` or bears no value — i.e. the only EVIDENCE in the parse is
|
|
21
|
+
* `tag`-shaped. A tag-matching node counts even when its value is empty (the guard asks "did the parser emit this
|
|
22
|
+
* shape", not "is the span non-blank"); any OTHER tag with a non-empty value disqualifies. False for a tree with no
|
|
23
|
+
* `tag` node at all.
|
|
24
|
+
*/
|
|
25
|
+
export function isBareTreeOf(tree, tag) {
|
|
26
|
+
let sawTag = false;
|
|
27
|
+
const stack = [...tree.roots];
|
|
28
|
+
while (stack.length) {
|
|
29
|
+
const node = stack.pop();
|
|
30
|
+
if (node.tag === tag) {
|
|
31
|
+
sawTag = true;
|
|
32
|
+
}
|
|
33
|
+
else if (node.value.trim() !== "")
|
|
34
|
+
return false;
|
|
35
|
+
stack.push(...node.children);
|
|
36
|
+
}
|
|
37
|
+
return sawTag;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The tree's single value-bearing node, or null when the tree holds none or more than one. Callers gate on the returned
|
|
41
|
+
* node's `tag` — the quantifier ("this is the WHOLE query") is what this walk answers.
|
|
42
|
+
*/
|
|
43
|
+
export function loneValueBearingNode(tree) {
|
|
44
|
+
let lone = null;
|
|
45
|
+
const stack = [...tree.roots];
|
|
46
|
+
while (stack.length) {
|
|
47
|
+
const node = stack.pop();
|
|
48
|
+
if (node.value.trim().length) {
|
|
49
|
+
if (lone !== null)
|
|
50
|
+
return null;
|
|
51
|
+
lone = node;
|
|
52
|
+
}
|
|
53
|
+
stack.push(...node.children);
|
|
54
|
+
}
|
|
55
|
+
return lone;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Flatten a tree to its nodes in SOURCE order — sorted by `start`, the same order `decodeAsTuples` means by it.
|
|
59
|
+
*
|
|
60
|
+
* The two copies this replaces (the demo's `demo-helpers.ts` and the `demo-cascade-smoke` mirror of it) relied on
|
|
61
|
+
* TRAVERSAL order instead: depth-first onto a stack, then reversed. That coincides with source order only while every
|
|
62
|
+
* parent's span precedes its children's, and the decoder does not promise it — measured, the two orders disagree on **7
|
|
63
|
+
* of 10** ordinary addresses, always with a child ahead of its parent:
|
|
64
|
+
*
|
|
65
|
+
* Queen Street, Bristol street_suffix@6 before street@0
|
|
66
|
+
* Via Roma, 5, 50123 Firenze, … house_number@10 before street@0
|
|
67
|
+
* 30 St Mary Axe …, London EC3A 8BF postcode@37 before locality@30
|
|
68
|
+
*
|
|
69
|
+
* Sorting is what the tuple projection already does, so this makes a rendered span list and `decodeAsTuples` agree by
|
|
70
|
+
* construction rather than by luck.
|
|
71
|
+
*
|
|
72
|
+
* The smoke test could not import the demo's copy (that would be a `mailwoman` → `docs` project reference, and `docs`
|
|
73
|
+
* already depends on `mailwoman`), which is why a third home was the only way to collapse them.
|
|
74
|
+
*/
|
|
75
|
+
export function flattenTreeNodes(tree) {
|
|
76
|
+
if (!tree)
|
|
77
|
+
return [];
|
|
78
|
+
const all = [];
|
|
79
|
+
for (const root of tree.roots) {
|
|
80
|
+
flatten(root, all);
|
|
81
|
+
}
|
|
82
|
+
return all
|
|
83
|
+
.map((node) => ({
|
|
84
|
+
tag: node.tag,
|
|
85
|
+
value: node.value,
|
|
86
|
+
confidence: node.confidence,
|
|
87
|
+
start: node.start,
|
|
88
|
+
end: node.end,
|
|
89
|
+
...(node.source === undefined ? {} : { source: node.source }),
|
|
90
|
+
...(node.sourceID === undefined ? {} : { sourceID: node.sourceID }),
|
|
91
|
+
...(node.placeID === undefined ? {} : { placeID: node.placeID }),
|
|
92
|
+
...(node.lat === undefined ? {} : { lat: node.lat }),
|
|
93
|
+
...(node.lon === undefined ? {} : { lon: node.lon }),
|
|
94
|
+
...(node.alternatives === undefined ? {} : { alternatives: node.alternatives.length }),
|
|
95
|
+
}))
|
|
96
|
+
.toSorted((a, b) => a.start - b.start);
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=tree-shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-shape.js","sourceRoot":"","sources":["../../decoder/tree-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAG/C;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAiB,EAAE,GAAiB;IAChE,IAAI,MAAM,GAAG,KAAK,CAAA;IAClB,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;IAE7B,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;QACrB,MAAM,IA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
|
163
163
|
* pre-classifier (Phase 6+) is the intended source of this value.
|
|
164
164
|
*/
|
|
165
165
|
system?: AddressSystem;
|
|
166
|
+
/**
|
|
167
|
+
* The parse-time locale-head verdict when it was CONFIDENT (softmax >= the action threshold): the model's own read of
|
|
168
|
+
* which country's addressing this text is shaped like. Absent = under threshold or the head never ran — unknown,
|
|
169
|
+
* never "domestic". Evidence about the TEXT, not a resolved country: the head is a 9-way classifier, so a Chinese
|
|
170
|
+
* address may read GB — right about "not the locale's country", wrong about which. The scope gate this exists for
|
|
171
|
+
* (#1684) therefore only ever DROPS an inferred scope on a mismatch; it never re-points one.
|
|
172
|
+
*/
|
|
173
|
+
localeCountry?: {
|
|
174
|
+
country: string;
|
|
175
|
+
confidence: number;
|
|
176
|
+
};
|
|
166
177
|
}
|
|
167
178
|
/**
|
|
168
179
|
* The addressing system a tree was decoded under — selects the containment hierarchy. Western covers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../decoder/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEnE,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAExE;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAA;IACf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC3B,GAAG,EAAE,YAAY,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IAC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M,CAAA;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CACvD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
|
|
@@ -24,6 +24,14 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import type { ComponentTag } from "../types/component.ts";
|
|
26
26
|
import type { AddressTree } from "./types.ts";
|
|
27
|
+
/**
|
|
28
|
+
* Tags that cannot stand alone: each is a sub-component of a specific structural anchor (street / locality / venue /
|
|
29
|
+
* postcode). If none of a tag's allowed parents appear anywhere in the tree, the node is an orphan fragment.
|
|
30
|
+
*
|
|
31
|
+
* This set is also the DENOMINATOR of the stranded-dependent check — the classes that CAN fire — so a caller counting
|
|
32
|
+
* which ones do reads it here rather than re-listing the tags, which would drift the moment one is added.
|
|
33
|
+
*/
|
|
34
|
+
export declare const STRICT_DEPENDENTS: ReadonlySet<ComponentTag>;
|
|
27
35
|
export interface TreeViolation {
|
|
28
36
|
type: "illegal-edge" | "stranded-dependent";
|
|
29
37
|
tag: ComponentTag;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-tree.d.ts","sourceRoot":"","sources":["../../decoder/validate-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"validate-tree.d.ts","sourceRoot":"","sources":["../../decoder/validate-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,YAAY,CAAA;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,YAAY,CAStD,CAAA;AAaF,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,cAAc,GAAG,oBAAoB,CAAA;IAC3C,GAAG,EAAE,YAAY,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,aAAa,EAAE,CAAA;CAC3B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,YAAY,CA2C5D"}
|
|
@@ -26,8 +26,11 @@ import { containmentFor } from "./containment.js";
|
|
|
26
26
|
/**
|
|
27
27
|
* Tags that cannot stand alone: each is a sub-component of a specific structural anchor (street / locality / venue /
|
|
28
28
|
* postcode). If none of a tag's allowed parents appear anywhere in the tree, the node is an orphan fragment.
|
|
29
|
+
*
|
|
30
|
+
* This set is also the DENOMINATOR of the stranded-dependent check — the classes that CAN fire — so a caller counting
|
|
31
|
+
* which ones do reads it here rather than re-listing the tags, which would drift the moment one is added.
|
|
29
32
|
*/
|
|
30
|
-
const STRICT_DEPENDENTS = new Set([
|
|
33
|
+
export const STRICT_DEPENDENTS = new Set([
|
|
31
34
|
"street_prefix",
|
|
32
35
|
"street_prefix_particle",
|
|
33
36
|
"street_suffix",
|
|
@@ -36,8 +39,6 @@ const STRICT_DEPENDENTS = new Set([
|
|
|
36
39
|
"dependent_locality",
|
|
37
40
|
"attention",
|
|
38
41
|
"cedex",
|
|
39
|
-
"intersection_a",
|
|
40
|
-
"intersection_b",
|
|
41
42
|
]);
|
|
42
43
|
/**
|
|
43
44
|
* Validate an `AddressTree`'s structural coherence. See module docstring.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-tree.js","sourceRoot":"","sources":["../../decoder/validate-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD
|
|
1
|
+
{"version":3,"file":"validate-tree.js","sourceRoot":"","sources":["../../decoder/validate-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA8B,IAAI,GAAG,CAAe;IACjF,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,cAAc;IACd,MAAM;IACN,oBAAoB;IACpB,WAAW;IACX,OAAO;CACP,CAAC,CAAA;AAyBF;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAiB;IAC7C,MAAM,UAAU,GAAoB,EAAE,CAAA;IACtC,uFAAuF;IACvF,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAE5C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAgB,CAAA;IAEvC,MAAM,OAAO,GAAG,CAAC,CAAc,EAAQ,EAAE;QACxC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QAClB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAA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AAC,CAAA;IAC5C,CAAC,CAAA;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAExC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,UAAU,EAAE,CAAA;AACtD,CAAC"}
|
package/out/env/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { defaultMailwomanPaths } from "./paths.ts";
|
|
1
2
|
/**
|
|
2
3
|
* Publicly accessible environment — non-secret operational config (DB paths, batch tuning, `NODE_ENV`). Safe to log. A
|
|
3
4
|
* live, typed view over `process.env` layered on an optional `.env`; only keys in {@link PublicEnvSchema} appear.
|
|
@@ -8,6 +9,13 @@ export declare const $public: {
|
|
|
8
9
|
NODE_ENV: "test" | "development" | "production";
|
|
9
10
|
CI: boolean;
|
|
10
11
|
MAILWOMAN_BATCH_MAX: number;
|
|
12
|
+
MAILWOMAN_DATA_ROOT: string;
|
|
13
|
+
MAILWOMAN_CONFIG_ROOT: string;
|
|
14
|
+
MAILWOMAN_CACHE_ROOT: string;
|
|
15
|
+
MAILWOMAN_LOG_ROOT: string;
|
|
16
|
+
MAILWOMAN_TEMP_ROOT: string;
|
|
17
|
+
GITHUB_ACTIONS: boolean;
|
|
18
|
+
MW_LOCALE?: string | undefined;
|
|
11
19
|
MAILWOMAN_WOF_DB?: string | undefined;
|
|
12
20
|
MAILWOMAN_WOF_ADMIN_DB?: string | undefined;
|
|
13
21
|
MAILWOMAN_WOF_POLYGONS_DB?: string | undefined;
|
|
@@ -16,9 +24,9 @@ export declare const $public: {
|
|
|
16
24
|
MAILWOMAN_FST_BIN?: string | undefined;
|
|
17
25
|
MAILWOMAN_MODEL_CARD?: string | undefined;
|
|
18
26
|
MAILWOMAN_COARSE_PLACER_DIR?: string | undefined;
|
|
27
|
+
MAILWOMAN_TILES?: string | undefined;
|
|
19
28
|
MAILWOMAN_INTRA_OP_THREADS?: number | undefined;
|
|
20
29
|
WOF_DATA_DIR?: string | undefined;
|
|
21
|
-
MAILWOMAN_DATA_ROOT?: string | undefined;
|
|
22
30
|
OUT_ROOT?: string | undefined;
|
|
23
31
|
NAD_MODE?: string | undefined;
|
|
24
32
|
NAD_URL?: string | undefined;
|
|
@@ -65,6 +73,7 @@ export declare const $public: {
|
|
|
65
73
|
MW_DUMP_REGRESSIONS?: string | undefined;
|
|
66
74
|
PROBE_N?: string | undefined;
|
|
67
75
|
DEBUG?: string | undefined;
|
|
76
|
+
NO_COLOR?: string | undefined;
|
|
68
77
|
};
|
|
69
78
|
/**
|
|
70
79
|
* Privately accessible environment — secrets and credentials (HF token, API keys, rclone S3 creds). Do NOT log. A live,
|
|
@@ -91,6 +100,9 @@ export declare const $private: {
|
|
|
91
100
|
FCC_MAP_USERNAME?: string | undefined;
|
|
92
101
|
FCC_MAP_API_KEY?: string | undefined;
|
|
93
102
|
SEC_EDGAR_USER_AGENT?: string | undefined;
|
|
103
|
+
FCC_CORES_USER_AGENT?: string | undefined;
|
|
104
|
+
USAC_API_KEY_ID?: string | undefined;
|
|
105
|
+
USAC_API_SECRET_KEY?: string | undefined;
|
|
94
106
|
GOOGLE_MAPS_API_KEY?: string | undefined;
|
|
95
107
|
};
|
|
96
108
|
//# sourceMappingURL=index.d.ts.map
|
package/out/env/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../env/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../env/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAuBlD;;;;;GAKG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA2B,CAAA;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;CAA4B,CAAA"}
|
package/out/env/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { loadEnvFile } from "./load.js";
|
|
2
2
|
import { cwdPathBuilder } from "./paths.js";
|
|
3
3
|
import { PrivateEnvSchema, PublicEnvSchema } from "./schema.js";
|
|
4
|
+
export { defaultMailwomanPaths } from "./paths.js";
|
|
4
5
|
// The optional `.env` is read once (it can't change mid-process); the real environment is layered on top
|
|
5
6
|
// LIVE. `process.env` can change during a process — a test stubbing a var, a late setter — and `$public` /
|
|
6
7
|
// `$private` must reflect it, exactly like `process.env` itself. So each key is a getter that re-parses the
|
|
@@ -12,7 +13,7 @@ function liveEnv(schema) {
|
|
|
12
13
|
for (const key of Object.keys(schema.shape)) {
|
|
13
14
|
Object.defineProperty(view, key, {
|
|
14
15
|
enumerable: true,
|
|
15
|
-
// oxlint-disable-next-line sister-software/no-process-globals
|
|
16
|
+
// oxlint-disable-next-line sister-software/no-process-globals -- this module is the typed process.env boundary
|
|
16
17
|
get: () => schema.parse({ ...dotEnv, ...process.env })[key],
|
|
17
18
|
});
|
|
18
19
|
}
|
package/out/env/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../env/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE/D,yGAAyG;AACzG,2GAA2G;AAC3G,4GAA4G;AAC5G,8GAA8G;AAC9G,+EAA+E;AAC/E,MAAM,MAAM,GAAG,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;AAElD,SAAS,OAAO,CAA8B,MAA0B;IACvE,MAAM,IAAI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C,gBAAgB,CAAC,CAAA"}
|
package/out/env/paths.d.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
5
|
*/
|
|
6
|
-
export declare function cwdPathBuilder(...paths: string[]): string;
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
* Platform-native filesystem defaults used by the typed environment schema.
|
|
8
|
+
*/
|
|
9
|
+
export declare const defaultMailwomanPaths: {
|
|
10
|
+
readonly data: `/{$CWD}/${string}`;
|
|
11
|
+
readonly config: `/{$CWD}/${string}`;
|
|
12
|
+
readonly cache: `/{$CWD}/${string}`;
|
|
13
|
+
readonly log: `/{$CWD}/${string}`;
|
|
14
|
+
readonly temp: `/{$CWD}/${string}`;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a path relative to the current working directory.
|
|
11
18
|
*/
|
|
12
|
-
export declare function
|
|
19
|
+
export declare function cwdPathBuilder(...paths: string[]): string;
|
|
13
20
|
//# sourceMappingURL=paths.d.ts.map
|
package/out/env/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../env/paths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../env/paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAMxB,CAAA;AAEV;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAEzD"}
|
package/out/env/paths.js
CHANGED
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
|
-
import { dirname, resolve } from "node:path";
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
8
5
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
6
|
+
import envPaths from "env-paths";
|
|
7
|
+
import { resolvePath } from "path-ts";
|
|
8
|
+
const platformPaths = envPaths("mailwoman", { suffix: "" });
|
|
12
9
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @returns An array of `.env` file paths, ordered from shallowest to deepest (cwd last).
|
|
10
|
+
* Platform-native filesystem defaults used by the typed environment schema.
|
|
16
11
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
break;
|
|
30
|
-
dir = parent;
|
|
31
|
-
}
|
|
32
|
-
// `found` is deepest-first (cwd first); reverse so cwd is applied last and wins.
|
|
33
|
-
return found.toReversed();
|
|
12
|
+
export const defaultMailwomanPaths = {
|
|
13
|
+
data: resolvePath(platformPaths.data),
|
|
14
|
+
config: resolvePath(platformPaths.config),
|
|
15
|
+
cache: resolvePath(platformPaths.cache),
|
|
16
|
+
log: resolvePath(platformPaths.log),
|
|
17
|
+
temp: resolvePath(platformPaths.temp),
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Resolve a path relative to the current working directory.
|
|
21
|
+
*/
|
|
22
|
+
export function cwdPathBuilder(...paths) {
|
|
23
|
+
return resolvePath(process.cwd(), ...paths);
|
|
34
24
|
}
|
|
35
25
|
//# sourceMappingURL=paths.js.map
|
package/out/env/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../env/paths.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../env/paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,QAAQ,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAA;AAE3D;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC,IAAI,EAAE,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC;IACrC,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC;IACvC,GAAG,EAAE,WAAW,CAAC,aAAa,CAAC,GAAG,CAAC;IACnC,IAAI,EAAE,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC;CAC5B,CAAA;AAEV;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,GAAG,KAAe;IAChD,OAAO,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC,CAAA;AAC5C,CAAC"}
|
package/out/env/schema.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const PublicEnvSchema: z.ZodObject<{
|
|
|
10
10
|
production: "production";
|
|
11
11
|
}>>;
|
|
12
12
|
CI: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
|
|
13
|
+
MW_LOCALE: z.ZodOptional<z.ZodString>;
|
|
13
14
|
MAILWOMAN_WOF_DB: z.ZodOptional<z.ZodString>;
|
|
14
15
|
MAILWOMAN_WOF_ADMIN_DB: z.ZodOptional<z.ZodString>;
|
|
15
16
|
MAILWOMAN_WOF_POLYGONS_DB: z.ZodOptional<z.ZodString>;
|
|
@@ -18,10 +19,15 @@ export declare const PublicEnvSchema: z.ZodObject<{
|
|
|
18
19
|
MAILWOMAN_FST_BIN: z.ZodOptional<z.ZodString>;
|
|
19
20
|
MAILWOMAN_MODEL_CARD: z.ZodOptional<z.ZodString>;
|
|
20
21
|
MAILWOMAN_COARSE_PLACER_DIR: z.ZodOptional<z.ZodString>;
|
|
22
|
+
MAILWOMAN_TILES: z.ZodOptional<z.ZodString>;
|
|
21
23
|
MAILWOMAN_INTRA_OP_THREADS: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
22
24
|
WOF_DATA_DIR: z.ZodOptional<z.ZodString>;
|
|
23
25
|
MAILWOMAN_BATCH_MAX: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
24
|
-
MAILWOMAN_DATA_ROOT: z.
|
|
26
|
+
MAILWOMAN_DATA_ROOT: z.ZodDefault<z.ZodString>;
|
|
27
|
+
MAILWOMAN_CONFIG_ROOT: z.ZodDefault<z.ZodString>;
|
|
28
|
+
MAILWOMAN_CACHE_ROOT: z.ZodDefault<z.ZodString>;
|
|
29
|
+
MAILWOMAN_LOG_ROOT: z.ZodDefault<z.ZodString>;
|
|
30
|
+
MAILWOMAN_TEMP_ROOT: z.ZodDefault<z.ZodString>;
|
|
25
31
|
OUT_ROOT: z.ZodOptional<z.ZodString>;
|
|
26
32
|
NAD_MODE: z.ZodOptional<z.ZodString>;
|
|
27
33
|
NAD_URL: z.ZodOptional<z.ZodString>;
|
|
@@ -46,6 +52,7 @@ export declare const PublicEnvSchema: z.ZodObject<{
|
|
|
46
52
|
MAILWOMAN_SKIP_WEIGHTS_COPY: z.ZodOptional<z.ZodString>;
|
|
47
53
|
MAILWOMAN_SKIP_WEIGHTS: z.ZodOptional<z.ZodString>;
|
|
48
54
|
MAILWOMAN_NPM_PROVENANCE: z.ZodOptional<z.ZodString>;
|
|
55
|
+
GITHUB_ACTIONS: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
|
|
49
56
|
RELEASE_IT_WORKSPACES_PATH_TO_WORKSPACE: z.ZodOptional<z.ZodString>;
|
|
50
57
|
RELEASE_IT_WORKSPACES_TAG: z.ZodOptional<z.ZodString>;
|
|
51
58
|
RELEASE_IT_WORKSPACES_ACCESS: z.ZodOptional<z.ZodString>;
|
|
@@ -68,6 +75,7 @@ export declare const PublicEnvSchema: z.ZodObject<{
|
|
|
68
75
|
MW_DUMP_REGRESSIONS: z.ZodOptional<z.ZodString>;
|
|
69
76
|
PROBE_N: z.ZodOptional<z.ZodString>;
|
|
70
77
|
DEBUG: z.ZodOptional<z.ZodString>;
|
|
78
|
+
NO_COLOR: z.ZodOptional<z.ZodString>;
|
|
71
79
|
}, z.core.$strip>;
|
|
72
80
|
/**
|
|
73
81
|
* Secrets and credentials, exposed via `$private`. Never log these. Add a key here to make it available; anything not
|
|
@@ -92,6 +100,9 @@ export declare const PrivateEnvSchema: z.ZodObject<{
|
|
|
92
100
|
FCC_MAP_USERNAME: z.ZodOptional<z.ZodString>;
|
|
93
101
|
FCC_MAP_API_KEY: z.ZodOptional<z.ZodString>;
|
|
94
102
|
SEC_EDGAR_USER_AGENT: z.ZodOptional<z.ZodString>;
|
|
103
|
+
FCC_CORES_USER_AGENT: z.ZodOptional<z.ZodString>;
|
|
104
|
+
USAC_API_KEY_ID: z.ZodOptional<z.ZodString>;
|
|
105
|
+
USAC_API_SECRET_KEY: z.ZodOptional<z.ZodString>;
|
|
95
106
|
GOOGLE_MAPS_API_KEY: z.ZodOptional<z.ZodString>;
|
|
96
107
|
}, z.core.$strip>;
|
|
97
108
|
//# sourceMappingURL=schema.d.ts.map
|
package/out/env/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../env/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../env/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmBvB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+I1B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;iBAiD3B,CAAA"}
|