@mailwoman/core 4.16.1 → 5.0.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/data/chromium-i18n/ssl-address-download.ts +110 -0
- package/data/libpostal/resources-download.ts +121 -0
- package/out/api/APIClient.d.ts +2 -2
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +2 -2
- package/out/api/APIClient.js.map +1 -1
- package/out/api/responses.d.ts.map +1 -1
- package/out/api/responses.js.map +1 -1
- package/out/classification/Classification.d.ts +3 -4
- package/out/classification/Classification.d.ts.map +1 -1
- package/out/classification/Classification.js.map +1 -1
- package/out/classification/CompositeClassifier.d.ts +1 -1
- package/out/classification/CompositeClassifier.d.ts.map +1 -1
- package/out/classification/CompositeClassifier.js +1 -1
- package/out/classification/CompositeClassifier.js.map +1 -1
- package/out/classification/PhraseClassifier.d.ts.map +1 -1
- package/out/classification/PhraseClassifier.js.map +1 -1
- package/out/classification/SectionClassifier.d.ts.map +1 -1
- package/out/classification/SectionClassifier.js.map +1 -1
- package/out/classification/WordClassifier.d.ts.map +1 -1
- package/out/classification/WordClassifier.js.map +1 -1
- package/out/classification/scheme.d.ts.map +1 -1
- package/out/classification/scheme.js.map +1 -1
- package/out/coarse-placer/coarse-placer.d.ts +28 -34
- package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
- package/out/coarse-placer/coarse-placer.js +17 -20
- package/out/coarse-placer/coarse-placer.js.map +1 -1
- package/out/coarse-placer/featurize.d.ts +17 -19
- package/out/coarse-placer/featurize.d.ts.map +1 -1
- package/out/coarse-placer/featurize.js +17 -19
- package/out/coarse-placer/featurize.js.map +1 -1
- package/out/collections.d.ts +1 -2
- package/out/collections.d.ts.map +1 -1
- package/out/collections.js +1 -2
- package/out/collections.js.map +1 -1
- package/out/data/chromium-i18n/ssl-address-download.d.ts +30 -0
- package/out/data/chromium-i18n/ssl-address-download.d.ts.map +1 -0
- package/out/data/chromium-i18n/ssl-address-download.js +98 -0
- package/out/data/chromium-i18n/ssl-address-download.js.map +1 -0
- package/out/data/libpostal/resources-download.d.ts +29 -0
- package/out/data/libpostal/resources-download.d.ts.map +1 -0
- package/out/data/libpostal/resources-download.js +107 -0
- package/out/data/libpostal/resources-download.js.map +1 -0
- package/out/db/schema.d.ts +2 -2
- package/out/decoder/arbitrate-tree.d.ts +3 -3
- package/out/decoder/arbitrate-tree.d.ts.map +1 -1
- package/out/decoder/arbitrate-tree.js +5 -5
- package/out/decoder/arbitrate-tree.js.map +1 -1
- package/out/decoder/build-tree.d.ts +12 -14
- package/out/decoder/build-tree.d.ts.map +1 -1
- package/out/decoder/build-tree.js +4 -5
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/calibration.d.ts +3 -4
- package/out/decoder/calibration.d.ts.map +1 -1
- package/out/decoder/calibration.js +3 -4
- package/out/decoder/calibration.js.map +1 -1
- package/out/decoder/containment.d.ts +5 -6
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +5 -6
- 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/proposals-to-tree.d.ts +9 -9
- package/out/decoder/proposals-to-tree.d.ts.map +1 -1
- package/out/decoder/proposals-to-tree.js +11 -11
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/resolve-proposal-overlaps.d.ts +3 -5
- package/out/decoder/resolve-proposal-overlaps.d.ts.map +1 -1
- package/out/decoder/resolve-proposal-overlaps.js +5 -6
- package/out/decoder/resolve-proposal-overlaps.js.map +1 -1
- package/out/decoder/serialize-json.d.ts +13 -1
- package/out/decoder/serialize-json.d.ts.map +1 -1
- package/out/decoder/serialize-json.js +6 -2
- package/out/decoder/serialize-json.js.map +1 -1
- package/out/decoder/serialize-tuples.d.ts +10 -1
- package/out/decoder/serialize-tuples.d.ts.map +1 -1
- package/out/decoder/serialize-tuples.js +13 -5
- package/out/decoder/serialize-tuples.js.map +1 -1
- package/out/decoder/serialize-xml.d.ts +15 -9
- package/out/decoder/serialize-xml.d.ts.map +1 -1
- package/out/decoder/serialize-xml.js +29 -12
- package/out/decoder/serialize-xml.js.map +1 -1
- package/out/decoder/types.d.ts +52 -61
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/types.js +2 -2
- package/out/decoder/unknown-spans.d.ts +46 -0
- package/out/decoder/unknown-spans.d.ts.map +1 -0
- package/out/decoder/unknown-spans.js +56 -0
- package/out/decoder/unknown-spans.js.map +1 -0
- package/out/decoder/validate-tree.d.ts.map +1 -1
- package/out/decoder/validate-tree.js +2 -3
- package/out/decoder/validate-tree.js.map +1 -1
- package/out/errors/schema.d.ts +1 -2
- package/out/errors/schema.d.ts.map +1 -1
- package/out/errors/schema.js +1 -2
- package/out/errors/schema.js.map +1 -1
- package/out/filters/RelationshipFilter.d.ts.map +1 -1
- package/out/filters/RelationshipFilter.js.map +1 -1
- package/out/formatter/index.d.ts.map +1 -1
- package/out/formatter/index.js.map +1 -1
- package/out/identifiers.d.ts.map +1 -1
- package/out/identifiers.js.map +1 -1
- package/out/kysley/client.d.ts +3 -4
- package/out/kysley/client.d.ts.map +1 -1
- package/out/kysley/client.js +3 -4
- package/out/kysley/client.js.map +1 -1
- package/out/kysley/dialect-config.d.ts +1 -1
- package/out/kysley/dialect-config.d.ts.map +1 -1
- package/out/kysley/dialect.d.ts +4 -4
- package/out/kysley/dialect.js +4 -4
- package/out/kysley/driver.d.ts.map +1 -1
- package/out/kysley/driver.js +1 -1
- package/out/kysley/driver.js.map +1 -1
- package/out/lifecycle/ServiceSymbol.d.ts +2 -4
- package/out/lifecycle/ServiceSymbol.d.ts.map +1 -1
- package/out/lifecycle/ServiceSymbol.js +2 -4
- package/out/lifecycle/ServiceSymbol.js.map +1 -1
- package/out/lifecycle/services.d.ts +7 -8
- package/out/lifecycle/services.d.ts.map +1 -1
- package/out/lifecycle/services.js +5 -4
- package/out/lifecycle/services.js.map +1 -1
- package/out/locale/locale.d.ts +5 -6
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/registry.d.ts.map +1 -1
- package/out/locale/registry.js.map +1 -1
- package/out/logging/index.d.ts +1 -0
- package/out/logging/index.d.ts.map +1 -1
- package/out/logging/index.js +1 -0
- package/out/logging/index.js.map +1 -1
- package/out/logging/shared.d.ts +2 -2
- package/out/logging/shared.js +2 -2
- package/out/logging/utils.d.ts +30 -0
- package/out/logging/utils.d.ts.map +1 -0
- package/out/logging/utils.js +30 -0
- package/out/logging/utils.js.map +1 -0
- package/out/objects.d.ts +3 -4
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +1 -2
- package/out/objects.js.map +1 -1
- package/out/parser/AddressParser.d.ts +12 -16
- package/out/parser/AddressParser.d.ts.map +1 -1
- package/out/parser/AddressParser.js.map +1 -1
- package/out/parser/proposal-pipeline.d.ts +12 -12
- package/out/parser/proposal-pipeline.d.ts.map +1 -1
- package/out/parser/proposal-pipeline.js +12 -12
- package/out/parser/proposal-pipeline.js.map +1 -1
- package/out/parser/solution-to-proposals.d.ts +4 -4
- package/out/parser/solution-to-proposals.d.ts.map +1 -1
- package/out/parser/solution-to-proposals.js +5 -5
- package/out/parser/solution-to-proposals.js.map +1 -1
- package/out/pipeline/index.d.ts +1 -1
- package/out/pipeline/reconcile-lookups.d.ts +4 -4
- package/out/pipeline/reconcile-lookups.d.ts.map +1 -1
- package/out/pipeline/reconcile-lookups.js +4 -4
- package/out/pipeline/reconcile-lookups.js.map +1 -1
- package/out/pipeline/reconcile.d.ts +21 -23
- package/out/pipeline/reconcile.d.ts.map +1 -1
- package/out/pipeline/reconcile.js +49 -51
- package/out/pipeline/reconcile.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +14 -16
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +33 -37
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-logit-aggregation.d.ts +5 -6
- package/out/pipeline/span-logit-aggregation.d.ts.map +1 -1
- package/out/pipeline/span-logit-aggregation.js +7 -8
- package/out/pipeline/span-logit-aggregation.js.map +1 -1
- package/out/pipeline/span-proposer.d.ts +18 -22
- package/out/pipeline/span-proposer.d.ts.map +1 -1
- package/out/pipeline/span-proposer.js +21 -22
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +77 -86
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/policy/defaults.d.ts +5 -6
- package/out/policy/defaults.d.ts.map +1 -1
- package/out/policy/defaults.js +5 -6
- package/out/policy/defaults.js.map +1 -1
- package/out/policy/from-config.d.ts +8 -9
- package/out/policy/from-config.d.ts.map +1 -1
- package/out/policy/from-config.js +8 -9
- package/out/policy/from-config.js.map +1 -1
- package/out/policy/input-shape-router.d.ts +15 -19
- package/out/policy/input-shape-router.d.ts.map +1 -1
- package/out/policy/input-shape-router.js +11 -14
- package/out/policy/input-shape-router.js.map +1 -1
- package/out/policy/policy.d.ts +10 -13
- package/out/policy/policy.d.ts.map +1 -1
- package/out/policy/registry.d.ts +4 -5
- package/out/policy/registry.d.ts.map +1 -1
- package/out/policy/registry.js +6 -7
- package/out/policy/registry.js.map +1 -1
- package/out/resolver/index.d.ts +1 -1
- package/out/resolver/index.js +1 -1
- package/out/resolver/types.d.ts +212 -216
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +32 -39
- package/out/resolver/types.js.map +1 -1
- package/out/resources/LocaleIndex.d.ts +1 -2
- package/out/resources/LocaleIndex.d.ts.map +1 -1
- package/out/resources/LocaleIndex.js +1 -2
- package/out/resources/LocaleIndex.js.map +1 -1
- package/out/resources/ResourceMapCache.d.ts.map +1 -1
- package/out/resources/ResourceMapCache.js.map +1 -1
- package/out/resources/collections.d.ts +1 -2
- package/out/resources/collections.d.ts.map +1 -1
- package/out/resources/collections.js +1 -2
- package/out/resources/collections.js.map +1 -1
- package/out/resources/fs.d.ts.map +1 -1
- package/out/resources/fs.js.map +1 -1
- package/out/resources/git.d.ts.map +1 -1
- package/out/resources/git.js.map +1 -1
- package/out/resources/libaddressinput.d.ts +2 -2
- package/out/resources/libaddressinput.js +2 -2
- package/out/resources/libpostal.d.ts +4 -5
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +6 -7
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/set.d.ts +1 -2
- package/out/resources/set.d.ts.map +1 -1
- package/out/resources/set.js +1 -2
- package/out/resources/set.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 +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
- package/out/resources/whosonfirst/loader.d.ts +1 -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 +6 -9
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.js +7 -10
- package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts +1 -2
- package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js +1 -2
- package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/graph.d.ts +10 -10
- package/out/resources/whosonfirst/placetypes/graph.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/graph.js +0 -0
- package/out/resources/whosonfirst/placetypes/graph.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts +16 -19
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.js +15 -16
- package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/tree.d.ts +6 -7
- package/out/resources/whosonfirst/placetypes/tree.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/tree.js +3 -4
- package/out/resources/whosonfirst/placetypes/tree.js.map +1 -1
- package/out/routing/index.d.ts +2 -3
- package/out/routing/index.d.ts.map +1 -1
- package/out/routing/index.js +1 -1
- package/out/routing/index.js.map +1 -1
- package/out/solver/HashMapSolver.d.ts.map +1 -1
- package/out/solver/HashMapSolver.js.map +1 -1
- package/out/solver/Solution.d.ts +2 -2
- package/out/solver/Solution.d.ts.map +1 -1
- package/out/solver/Solution.js +2 -2
- package/out/solver/Solution.js.map +1 -1
- package/out/solver/mask.d.ts.map +1 -1
- package/out/solver/mask.js.map +1 -1
- package/out/solvers/LeadingAreaDeclassifier.d.ts.map +1 -1
- package/out/solvers/LeadingAreaDeclassifier.js.map +1 -1
- package/out/solvers/MultiStreetSolver.d.ts +10 -15
- package/out/solvers/MultiStreetSolver.d.ts.map +1 -1
- package/out/solvers/MultiStreetSolver.js +10 -15
- package/out/solvers/MultiStreetSolver.js.map +1 -1
- package/out/solvers/PostcodePositionPenalty.d.ts +2 -2
- package/out/solvers/PostcodePositionPenalty.d.ts.map +1 -1
- package/out/solvers/PostcodePositionPenalty.js +2 -2
- package/out/solvers/PostcodePositionPenalty.js.map +1 -1
- package/out/tokenization/Span.d.ts +1 -3
- package/out/tokenization/Span.d.ts.map +1 -1
- package/out/tokenization/Span.js +1 -3
- package/out/tokenization/Span.js.map +1 -1
- package/out/tokenization/context.d.ts +1 -2
- package/out/tokenization/context.d.ts.map +1 -1
- package/out/tokenization/context.js +1 -2
- package/out/tokenization/context.js.map +1 -1
- package/out/tokenization/normalizer.js +2 -2
- package/out/tokenization/permutate.d.ts +2 -3
- package/out/tokenization/permutate.d.ts.map +1 -1
- package/out/tokenization/permutate.js +4 -5
- package/out/tokenization/permutate.js.map +1 -1
- package/out/types/classifier.d.ts +21 -23
- package/out/types/classifier.d.ts.map +1 -1
- package/out/types/component.d.ts +6 -7
- package/out/types/component.d.ts.map +1 -1
- package/out/types/component.js +5 -6
- package/out/types/component.js.map +1 -1
- package/out/types/mapping.d.ts +8 -8
- package/out/types/mapping.d.ts.map +1 -1
- package/out/types/mapping.js +13 -13
- package/out/types/mapping.js.map +1 -1
- package/out/utils/data-root.d.ts +5 -5
- package/out/utils/data-root.js +7 -7
- package/out/utils/repo.d.ts +3 -3
- package/out/utils/repo.d.ts.map +1 -1
- package/out/utils/repo.js +16 -19
- package/out/utils/repo.js.map +1 -1
- package/out/vitest.config.d.ts.map +1 -1
- package/out/vitest.config.js.map +1 -1
- package/package.json +18 -18
- package/data/chromium-i18n/ssl-address-download.sh +0 -15
- package/data/libpostal/resources-download.sh +0 -44
- package/out/logging/tables.d.ts +0 -7
- package/out/logging/tables.d.ts.map +0 -1
- package/out/logging/tables.js +0 -75
- package/out/logging/tables.js.map +0 -1
- package/out/sets.d.ts +0 -2
- package/out/sets.d.ts.map +0 -1
- package/out/sets.js +0 -2
- package/out/sets.js.map +0 -1
package/out/types/mapping.js
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* schema natively distinguishes them.
|
|
17
17
|
*/
|
|
18
18
|
/**
|
|
19
|
-
* Static mapping table. Tags not in this table map to `null` (treated as "not a component" —
|
|
20
|
-
*
|
|
19
|
+
* Static mapping table. Tags not in this table map to `null` (treated as "not a component" — internal classifier
|
|
20
|
+
* state).
|
|
21
21
|
*/
|
|
22
22
|
const LEGACY_TO_COMPONENT = {
|
|
23
23
|
country: "country",
|
|
@@ -34,21 +34,21 @@ const LEGACY_TO_COMPONENT = {
|
|
|
34
34
|
intersection: "intersection_a",
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* Translate a legacy classification tag into a canonical {@link ComponentTag}, or `null` if the
|
|
38
|
-
*
|
|
37
|
+
* Translate a legacy classification tag into a canonical {@link ComponentTag}, or `null` if the legacy tag has no
|
|
38
|
+
* externally visible component equivalent.
|
|
39
39
|
*/
|
|
40
40
|
export function legacyClassificationToComponentTag(legacy) {
|
|
41
41
|
return LEGACY_TO_COMPONENT[legacy] ?? null;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* The full set of legacy tags that have a `ComponentTag` mapping. Useful for adapter wrappers that
|
|
45
|
-
*
|
|
44
|
+
* The full set of legacy tags that have a `ComponentTag` mapping. Useful for adapter wrappers that filter the span
|
|
45
|
+
* graph by "which legacy tags do I expect this classifier to produce."
|
|
46
46
|
*/
|
|
47
47
|
export const MAPPED_LEGACY_CLASSIFICATIONS = Object.keys(LEGACY_TO_COMPONENT);
|
|
48
48
|
/**
|
|
49
|
-
* Inverse of {@link LEGACY_TO_COMPONENT}. Picks the FIRST legacy entry that maps to each component —
|
|
50
|
-
*
|
|
51
|
-
*
|
|
49
|
+
* Inverse of {@link LEGACY_TO_COMPONENT}. Picks the FIRST legacy entry that maps to each component — for tags with
|
|
50
|
+
* multiple legacy aliases (e.g. `intersection_a` and `intersection_b` both come from legacy `intersection`), the
|
|
51
|
+
* deterministic "first wins" rule is documented and tested.
|
|
52
52
|
*/
|
|
53
53
|
const COMPONENT_TO_LEGACY = (() => {
|
|
54
54
|
const out = {};
|
|
@@ -59,11 +59,11 @@ const COMPONENT_TO_LEGACY = (() => {
|
|
|
59
59
|
return out;
|
|
60
60
|
})();
|
|
61
61
|
/**
|
|
62
|
-
* Translate a canonical {@link ComponentTag} into a legacy {@link Classification}, or `null` when the
|
|
63
|
-
*
|
|
62
|
+
* Translate a canonical {@link ComponentTag} into a legacy {@link Classification}, or `null` when the component has no
|
|
63
|
+
* legacy equivalent (e.g. JP-specific tags that don't exist in the rule path).
|
|
64
64
|
*
|
|
65
|
-
* Used by the parser-level proposal pipeline to write surviving neural proposals back into the
|
|
66
|
-
*
|
|
65
|
+
* Used by the parser-level proposal pipeline to write surviving neural proposals back into the `TokenContext`'s span
|
|
66
|
+
* graph as classifications the solver can read.
|
|
67
67
|
*/
|
|
68
68
|
export function componentTagToLegacyClassification(component) {
|
|
69
69
|
return COMPONENT_TO_LEGACY[component] ?? null;
|
package/out/types/mapping.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../types/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;GAGG;AACH,MAAM,mBAAmB,GAAkD;IAC1E,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,gBAAgB;CAC9B,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAAC,MAAsB;IACxE,OAAO,mBAAmB,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAqB,CAAA;AAEjG;;;;GAIG;AACH,MAAM,mBAAmB,GAAkD,CAAC,GAAG,EAAE;IAChF,MAAM,GAAG,GAAkD,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../types/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;GAGG;AACH,MAAM,mBAAmB,GAAkD;IAC1E,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,gBAAgB;CAC9B,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAAC,MAAsB;IACxE,OAAO,mBAAmB,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAqB,CAAA;AAEjG;;;;GAIG;AACH,MAAM,mBAAmB,GAAkD,CAAC,GAAG,EAAE;IAChF,MAAM,GAAG,GAAkD,EAAE,CAAA;IAE7D,KAAK,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAA0C,EAAE,CAAC;QAChH,IAAI,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC;YAAE,GAAG,CAAC,SAAS,CAAC,GAAG,MAAM,CAAA;IACjD,CAAC;IAED,OAAO,GAAG,CAAA;AACX,CAAC,CAAC,EAAE,CAAA;AAEJ;;;;;;GAMG;AACH,MAAM,UAAU,kCAAkC,CAAC,SAAuB;IACzE,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,IAAI,CAAA;AAC9C,CAAC"}
|
package/out/utils/data-root.d.ts
CHANGED
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
/** The Mailwoman data root: `$MAILWOMAN_DATA_ROOT` when set, else the lab default. */
|
|
14
14
|
export declare function mailwomanDataRoot(): string;
|
|
15
15
|
/**
|
|
16
|
-
* Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`.
|
|
17
|
-
*
|
|
16
|
+
* Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`. Reads the env on
|
|
17
|
+
* each call, so a late `process.env` change (or a test) is honored.
|
|
18
18
|
*/
|
|
19
19
|
export declare function dataRootPath(...segments: string[]): string;
|
|
20
20
|
/**
|
|
21
|
-
* The default WOF shard list the FTS backend probes when no single `--wof-db` is given: the global
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* The default WOF shard list the FTS backend probes when no single `--wof-db` is given: the global admin-priority shard
|
|
22
|
+
* + the US postcode shard, both under `dataRoot` (defaults to the configured {@link mailwomanDataRoot}; callers thread a
|
|
23
|
+
* `--data-root` option through). A fresh array each call.
|
|
24
24
|
*/
|
|
25
25
|
export declare function wofShardPaths(dataRoot?: string): [string, string];
|
|
26
26
|
//# sourceMappingURL=data-root.d.ts.map
|
package/out/utils/data-root.js
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { resolvePathBuilder } from "path-ts";
|
|
14
14
|
/**
|
|
15
|
-
* The lab default data root — the ONE place this literal appears. Everything else builds on
|
|
16
|
-
* {@link
|
|
15
|
+
* The lab default data root — the ONE place this literal appears. Everything else builds on {@link dataRootPath} /
|
|
16
|
+
* {@link mailwomanDataRoot}; override per-deployment with `$MAILWOMAN_DATA_ROOT`.
|
|
17
17
|
*/
|
|
18
18
|
const DEFAULT_MAILWOMAN_DATA_ROOT = "/mnt/playpen/mailwoman-data";
|
|
19
19
|
/** The Mailwoman data root: `$MAILWOMAN_DATA_ROOT` when set, else the lab default. */
|
|
@@ -21,16 +21,16 @@ export function mailwomanDataRoot() {
|
|
|
21
21
|
return process.env["MAILWOMAN_DATA_ROOT"] ?? DEFAULT_MAILWOMAN_DATA_ROOT;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`.
|
|
25
|
-
*
|
|
24
|
+
* Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`. Reads the env on
|
|
25
|
+
* each call, so a late `process.env` change (or a test) is honored.
|
|
26
26
|
*/
|
|
27
27
|
export function dataRootPath(...segments) {
|
|
28
28
|
return String(resolvePathBuilder(mailwomanDataRoot(), ...segments));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* The default WOF shard list the FTS backend probes when no single `--wof-db` is given: the global
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* The default WOF shard list the FTS backend probes when no single `--wof-db` is given: the global admin-priority shard
|
|
32
|
+
* + the US postcode shard, both under `dataRoot` (defaults to the configured {@link mailwomanDataRoot}; callers thread a
|
|
33
|
+
* `--data-root` option through). A fresh array each call.
|
|
34
34
|
*/
|
|
35
35
|
export function wofShardPaths(dataRoot = mailwomanDataRoot()) {
|
|
36
36
|
return [
|
package/out/utils/repo.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ export type AddressResource = "chromium-i18n/ssl-address" | "libpostal" | "inter
|
|
|
29
29
|
/**
|
|
30
30
|
* Path builder relative to a address resource dictionary directory.
|
|
31
31
|
*
|
|
32
|
-
* Data lives at `core/data/<resource>/dictionaries/...` so the @mailwoman/core npm package ships
|
|
33
|
-
*
|
|
34
|
-
*
|
|
32
|
+
* Data lives at `core/data/<resource>/dictionaries/...` so the @mailwoman/core npm package ships dictionaries via its
|
|
33
|
+
* `files` glob. Use {@link corePackagePathBuilder} directly for non- dictionary assets (e.g. chromium-i18n/ssl-address)
|
|
34
|
+
* that don't have the `dictionaries/` subdir.
|
|
35
35
|
*/
|
|
36
36
|
export declare function resourceDictionaryPathBuilder<A extends AddressResource, S extends string[]>(resource: A, ...pathSegments: S): PathBuilder<`mailwoman/${Join<["data", A, "dictionaries", ...S], "/">}`>;
|
|
37
37
|
/**
|
package/out/utils/repo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../utils/repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../utils/repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAA6B,KAAK,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAEhF;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AACrC,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAA;AAEtD,QAAA,MAAM,aAAa,EAAG,WAAoB,CAAA;AAC1C,KAAK,aAAa,GAAG,OAAO,aAAa,CAAA;AA2BzC;;GAEG;AACH,eAAO,MAAM,mBAAmB,oDAAiE,CAAA;AAYjG,eAAO,MAAM,sBAAsB,oDAAoE,CAAA;AAEvG;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,EAClD,GAAG,YAAY,EAAE,CAAC,GAChB,WAAW,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,gBAAgB,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAGjE;AAED,MAAM,MAAM,eAAe,GAAG,2BAA2B,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,CAAA;AAEpG;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,MAAM,EAAE,EAC1F,QAAQ,EAAE,CAAC,EACX,GAAG,YAAY,EAAE,CAAC,4EAGlB;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,+BAA8B,CAAA"}
|
package/out/utils/repo.js
CHANGED
|
@@ -24,16 +24,14 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
24
24
|
/**
|
|
25
25
|
* The absolute path to the root of the repository.
|
|
26
26
|
*
|
|
27
|
-
* In compiled mode this file lives at `core/out/utils/repo.js` (so the PARENT of `utils` is `out/`)
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* renames.
|
|
27
|
+
* In compiled mode this file lives at `core/out/utils/repo.js` (so the PARENT of `utils` is `out/`) and in source mode
|
|
28
|
+
* at `core/utils/repo.ts` (the parent is `core/`). Detect the mode by checking whether the parent directory
|
|
29
|
+
* (`resolve("..")`) is `out/` — uses `basename` on the resolved path rather than a substring match on `__dirname`, so
|
|
30
|
+
* it survives symlinks and output-directory renames.
|
|
32
31
|
*
|
|
33
|
-
* (Earlier this checked `resolve("..", "..")`, which overshoots `out/` to `core/` and so was always
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* symlink bridge to find `core/data`. #481.)
|
|
32
|
+
* (Earlier this checked `resolve("..", "..")`, which overshoots `out/` to `core/` and so was always false — the
|
|
33
|
+
* compiled tree then resolved `CorePackageAbsolutePath` to `core/out` instead of `core/`, landing dictionary reads at
|
|
34
|
+
* the nonexistent `core/out/data` and requiring an external symlink bridge to find `core/data`. #481.)
|
|
37
35
|
*/
|
|
38
36
|
const __isCompiledTree = basename(resolve(__dirname, "..")) === OutDirectoryName;
|
|
39
37
|
const __upCount = __isCompiledTree ? PathReflection.length : PathReflection.length - 1;
|
|
@@ -43,14 +41,13 @@ const RepoRootAbsolutePath = resolve(__dirname, ...Array.from({ length: __upCoun
|
|
|
43
41
|
*/
|
|
44
42
|
export const repoRootPathBuilder = createPathBuilderResolver(RepoRootAbsolutePath);
|
|
45
43
|
/**
|
|
46
|
-
* Path builder relative to the `@mailwoman/core` workspace root (the directory containing
|
|
47
|
-
*
|
|
44
|
+
* Path builder relative to the `@mailwoman/core` workspace root (the directory containing `package.json` for this
|
|
45
|
+
* package).
|
|
48
46
|
*
|
|
49
|
-
* In compiled mode this resolves to `core/` (one level above `core/out/utils/repo.js`'s `out/`). In
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* post-install copy step.
|
|
47
|
+
* In compiled mode this resolves to `core/` (one level above `core/out/utils/repo.js`'s `out/`). In source mode it's
|
|
48
|
+
* the same `core/` directly above `core/utils/repo.ts`. Used to locate package-bundled assets (dictionary data) that
|
|
49
|
+
* live under the workspace root, NOT the repo root — so that `npm install @mailwoman/core` ships those assets alongside
|
|
50
|
+
* the JS without any post-install copy step.
|
|
54
51
|
*/
|
|
55
52
|
const CorePackageAbsolutePath = resolve(__dirname, "..", __isCompiledTree ? ".." : "");
|
|
56
53
|
export const corePackagePathBuilder = createPathBuilderResolver(CorePackageAbsolutePath);
|
|
@@ -64,9 +61,9 @@ export function tsOutPathBuilder(...pathSegments) {
|
|
|
64
61
|
/**
|
|
65
62
|
* Path builder relative to a address resource dictionary directory.
|
|
66
63
|
*
|
|
67
|
-
* Data lives at `core/data/<resource>/dictionaries/...` so the @mailwoman/core npm package ships
|
|
68
|
-
*
|
|
69
|
-
*
|
|
64
|
+
* Data lives at `core/data/<resource>/dictionaries/...` so the @mailwoman/core npm package ships dictionaries via its
|
|
65
|
+
* `files` glob. Use {@link corePackagePathBuilder} directly for non- dictionary assets (e.g. chromium-i18n/ssl-address)
|
|
66
|
+
* that don't have the `dictionaries/` subdir.
|
|
70
67
|
*/
|
|
71
68
|
export function resourceDictionaryPathBuilder(resource, ...pathSegments) {
|
|
72
69
|
return corePackagePathBuilder("data", resource, "dictionaries", ...pathSegments);
|
package/out/utils/repo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.js","sourceRoot":"","sources":["../../utils/repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"repo.js","sourceRoot":"","sources":["../../utils/repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,yBAAyB,EAA+B,MAAM,SAAS,CAAA;AAEhF;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA;AAGrC,MAAM,aAAa,GAAG,WAAoB,CAAA;AAG1C,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAU,CAAA;AAGxD;;GAEG;AACH,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAkD,CAAA;AAE1G;;;;;;;;;;;GAWG;AACH,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,KAAK,gBAAgB,CAAA;AAChF,MAAM,SAAS,GAAG,gBAAgB,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAA;AACtF,MAAM,oBAAoB,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;AAGjG;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAgB,oBAAoB,CAAC,CAAA;AAEjG;;;;;;;;GAQG;AACH,MAAM,uBAAuB,GAAG,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACtF,MAAM,CAAC,MAAM,sBAAsB,GAAG,yBAAyB,CAAgB,uBAAuB,CAAC,CAAA;AAEvG;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC/B,GAAG,YAAe;IAElB,8DAA8D;IAC9D,OAAO,mBAAmB,CAAC,gBAAgB,EAAE,GAAG,YAAY,CAAQ,CAAA;AACrE,CAAC;AAID;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B,CAC5C,QAAW,EACX,GAAG,YAAe;IAElB,OAAO,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,YAAY,CAAC,CAAA;AACjF,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;
|
|
1
|
+
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;AAYH,wBA0BE"}
|
package/out/vitest.config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,gGAAgG;AAChG,mGAAmG;AACnG,8FAA8F;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAEzD,eAAe,YAAY,CAAC;IAC3B,OAAO,EAAE;QACR,KAAK,EAAE;YACN,+CAA+C;YAC/C,EAAE,IAAI,EAAE,mCAAmC,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE;YACvF,EAAE,IAAI,EAAE,mCAAmC,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE;YACvF,mFAAmF;YACnF,EAAE,IAAI,EAAE,0BAA0B,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,EAAE;YAC/E,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE;YACtE,sBAAsB;YACtB,EAAE,IAAI,EAAE,2BAA2B,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,yBAAyB,CAAC,EAAE;YAC5F,EAAE,IAAI,EAAE,4BAA4B,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,qBAAqB,CAAC,EAAE;YACzF,EAAE,IAAI,EAAE,sBAAsB,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,wBAAwB,CAAC,EAAE;YACtF,qFAAqF;YACrF,mFAAmF;YACnF,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,gCAAgC,CAAC,EAAE;YAC5F,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,uBAAuB,CAAC,EAAE;SAC5E;KACD;IACD,IAAI,EAAE;QACL,uFAAuF;QACvF,mFAAmF;QACnF,uDAAuD;QACvD,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC,oBAAoB,EAAE,WAAW,EAAE,YAAY,CAAC;KAC1D;CACD,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Mailwoman core: tokenization, classification primitives, solver, formatter, resources, filters, solvers, utils.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,21 @@
|
|
|
8
8
|
"url": "https://github.com/sister-software/mailwoman.git",
|
|
9
9
|
"directory": "core"
|
|
10
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"out/**/*.js",
|
|
13
|
+
"out/**/*.js.map",
|
|
14
|
+
"out/**/*.d.ts",
|
|
15
|
+
"out/**/*.d.ts.map",
|
|
16
|
+
"data/**/*",
|
|
17
|
+
"THIRD_PARTY_NOTICES.md"
|
|
18
|
+
],
|
|
11
19
|
"type": "module",
|
|
20
|
+
"imports": {
|
|
21
|
+
"#*": {
|
|
22
|
+
"development": "./*.ts",
|
|
23
|
+
"default": "./out/*.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
12
26
|
"exports": {
|
|
13
27
|
"./package.json": "./package.json",
|
|
14
28
|
".": "./out/index.js",
|
|
@@ -44,11 +58,8 @@
|
|
|
44
58
|
"./filters": "./out/filters/index.js",
|
|
45
59
|
"./filters/*": "./out/filters/*"
|
|
46
60
|
},
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"development": "./*.ts",
|
|
50
|
-
"default": "./out/*.js"
|
|
51
|
-
}
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
52
63
|
},
|
|
53
64
|
"dependencies": {
|
|
54
65
|
"@fragaria/address-formatter": "^6.7.1",
|
|
@@ -67,22 +78,11 @@
|
|
|
67
78
|
"pino-pretty": "^13.1.3",
|
|
68
79
|
"pluralize": "^8.0.0",
|
|
69
80
|
"regenerate": "^1.4.2",
|
|
70
|
-
"spliterator": "^
|
|
81
|
+
"spliterator": "^3.1.0",
|
|
71
82
|
"table": "^6.9.0"
|
|
72
83
|
},
|
|
73
84
|
"devDependencies": {
|
|
74
85
|
"@types/d3-color": "^3.1.3",
|
|
75
86
|
"@types/d3-scale-chromatic": "^3.1.0"
|
|
76
|
-
},
|
|
77
|
-
"files": [
|
|
78
|
-
"out/**/*.js",
|
|
79
|
-
"out/**/*.js.map",
|
|
80
|
-
"out/**/*.d.ts",
|
|
81
|
-
"out/**/*.d.ts.map",
|
|
82
|
-
"data/**/*",
|
|
83
|
-
"THIRD_PARTY_NOTICES.md"
|
|
84
|
-
],
|
|
85
|
-
"publishConfig": {
|
|
86
|
-
"access": "public"
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# see: https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata
|
|
4
|
-
|
|
5
|
-
COUNTRY_CODES=$(curl -sLo- 'https://chromium-i18n.appspot.com/ssl-address/data' \
|
|
6
|
-
| jq -r .countries);
|
|
7
|
-
|
|
8
|
-
TARGET_DIR='./ssl-address'
|
|
9
|
-
mkdir -p "${TARGET_DIR}"
|
|
10
|
-
|
|
11
|
-
IFS='~'
|
|
12
|
-
for CC in $COUNTRY_CODES; do
|
|
13
|
-
echo "-- ${CC} --"
|
|
14
|
-
curl -sLo- "https://chromium-i18n.appspot.com/ssl-address/data/${CC}" >> "${TARGET_DIR}/${CC}.json"
|
|
15
|
-
done
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
force_flag=false
|
|
6
|
-
|
|
7
|
-
# Parse command line arguments
|
|
8
|
-
while [[ "$#" -gt 0 ]]; do
|
|
9
|
-
case $1 in
|
|
10
|
-
--force) force_flag=true ;;
|
|
11
|
-
*) echo "Unknown parameter passed: $1"; exit 1 ;;
|
|
12
|
-
esac
|
|
13
|
-
shift
|
|
14
|
-
done
|
|
15
|
-
|
|
16
|
-
# Check if the dictionaries directory exists
|
|
17
|
-
if [ -d "./dictionaries" ]; then
|
|
18
|
-
if [ "$force_flag" = true ]; then
|
|
19
|
-
echo "Warning: The dictionaries directory already exists. Deleting it due to --force flag."
|
|
20
|
-
rm -rf "./dictionaries"
|
|
21
|
-
else
|
|
22
|
-
echo "Error: The dictionaries directory already exists. Please remove it first or use the --force flag."
|
|
23
|
-
exit 1
|
|
24
|
-
fi
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
# Create a temporary directory
|
|
28
|
-
temp_dir=$(mktemp -d)
|
|
29
|
-
|
|
30
|
-
# Clone the libpostal repository into the temporary directory
|
|
31
|
-
git clone --depth 1 https://github.com/openvenues/libpostal.git "$temp_dir/libpostal"
|
|
32
|
-
|
|
33
|
-
# Alphabetize the contents of each file in the dictionaries directory inside the clone
|
|
34
|
-
for file in "$temp_dir/libpostal/resources/dictionaries/"*; do
|
|
35
|
-
if [ -f "$file" ]; then
|
|
36
|
-
sort "$file" -o "$file"
|
|
37
|
-
fi
|
|
38
|
-
done
|
|
39
|
-
|
|
40
|
-
# Copy the dictionaries directory from the cloned repository
|
|
41
|
-
cp -r "$temp_dir/libpostal/resources/dictionaries" .
|
|
42
|
-
|
|
43
|
-
# Remove the temporary directory
|
|
44
|
-
rm -rf "$temp_dir"
|
package/out/logging/tables.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../logging/tables.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/out/logging/tables.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
6
|
-
export {};
|
|
7
|
-
// import * as Colorette from "colorette"
|
|
8
|
-
// import jsonColorizer from "json-colorizer"
|
|
9
|
-
// import { table, type TableUserConfig } from "table"
|
|
10
|
-
// /**
|
|
11
|
-
// * Options for formatting a JSON object as a table.
|
|
12
|
-
// *
|
|
13
|
-
// * @category Logging
|
|
14
|
-
// */
|
|
15
|
-
// export interface TableFormatOptions extends TableUserConfig {
|
|
16
|
-
// alphabetize?: boolean
|
|
17
|
-
// }
|
|
18
|
-
// export type TableDataEntry = [string | number, ...unknown[]]
|
|
19
|
-
// /**
|
|
20
|
-
// * Convert a JSON object to a loggable table.
|
|
21
|
-
// *
|
|
22
|
-
// * @category Logging
|
|
23
|
-
// */
|
|
24
|
-
// export function printJSONAsTable(json: object, options?: TableFormatOptions) {
|
|
25
|
-
// const entries = Object.entries(json)
|
|
26
|
-
// return printEntriesAsTable(entries, options)
|
|
27
|
-
// }
|
|
28
|
-
// /**
|
|
29
|
-
// * Convert a map of key-value pairs to a loggable table.
|
|
30
|
-
// *
|
|
31
|
-
// * @category Logging
|
|
32
|
-
// */
|
|
33
|
-
// export function printEntriesAsTable(
|
|
34
|
-
// dataRow: Iterable<TableDataEntry>,
|
|
35
|
-
// { alphabetize, ...options }: TableFormatOptions = {}
|
|
36
|
-
// ) {
|
|
37
|
-
// let formattedRows: unknown[][] = []
|
|
38
|
-
// for (const cells of dataRow) {
|
|
39
|
-
// if (cells.length === 0) continue
|
|
40
|
-
// const formattedRow: unknown[] = []
|
|
41
|
-
// if (cells.length === 1) {
|
|
42
|
-
// formattedRow.push(Colorette.bold(Colorette.bgRed(cells[0])))
|
|
43
|
-
// formattedRows.push(formattedRow)
|
|
44
|
-
// continue
|
|
45
|
-
// }
|
|
46
|
-
// if (cells.length === 2 && (typeof cells[1] === "undefined" || cells[1] === null)) {
|
|
47
|
-
// continue
|
|
48
|
-
// }
|
|
49
|
-
// formattedRow.push(Colorette.magenta(cells[0]))
|
|
50
|
-
// for (const cell of cells.slice(1)) {
|
|
51
|
-
// if (typeof cell === "undefined" || cell === null) continue
|
|
52
|
-
// if (Array.isArray(cell)) {
|
|
53
|
-
// formattedRow.push(Colorette.yellow(cell.join(", ")))
|
|
54
|
-
// } else if (typeof cell === "object") {
|
|
55
|
-
// formattedRow.push(jsonColorizer.colorize(cell))
|
|
56
|
-
// } else {
|
|
57
|
-
// formattedRow.push(Colorette.yellow(String(cell)))
|
|
58
|
-
// }
|
|
59
|
-
// }
|
|
60
|
-
// formattedRows.push(formattedRow)
|
|
61
|
-
// }
|
|
62
|
-
// // Table must have a consistent number of cells...
|
|
63
|
-
// const maxCells = Math.max(...formattedRows.map((row) => row.length))
|
|
64
|
-
// formattedRows = formattedRows.map((row) => {
|
|
65
|
-
// if (row.length < maxCells) {
|
|
66
|
-
// return [...row, ...new Array(maxCells - row.length).fill("")]
|
|
67
|
-
// }
|
|
68
|
-
// return row
|
|
69
|
-
// })
|
|
70
|
-
// if (alphabetize) {
|
|
71
|
-
// formattedRows = formattedRows.sort(([a], [b]) => String(a).localeCompare(String(b)))
|
|
72
|
-
// }
|
|
73
|
-
// return "\n" + table(formattedRows, options)
|
|
74
|
-
// }
|
|
75
|
-
//# sourceMappingURL=tables.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../logging/tables.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,yCAAyC;AACzC,6CAA6C;AAC7C,sDAAsD;AAEtD,MAAM;AACN,sDAAsD;AACtD,KAAK;AACL,uBAAuB;AACvB,MAAM;AACN,gEAAgE;AAChE,yBAAyB;AACzB,IAAI;AAEJ,+DAA+D;AAE/D,MAAM;AACN,gDAAgD;AAChD,KAAK;AACL,uBAAuB;AACvB,MAAM;AACN,iFAAiF;AACjF,wCAAwC;AAExC,gDAAgD;AAChD,IAAI;AAEJ,MAAM;AACN,2DAA2D;AAC3D,KAAK;AACL,uBAAuB;AACvB,MAAM;AACN,uCAAuC;AACvC,sCAAsC;AACtC,wDAAwD;AACxD,MAAM;AACN,uCAAuC;AAEvC,kCAAkC;AAClC,qCAAqC;AAErC,uCAAuC;AAEvC,8BAA8B;AAC9B,kEAAkE;AAClE,sCAAsC;AACtC,cAAc;AACd,MAAM;AAEN,wFAAwF;AACxF,cAAc;AACd,MAAM;AAEN,mDAAmD;AAEnD,yCAAyC;AACzC,gEAAgE;AAEhE,gCAAgC;AAChC,2DAA2D;AAC3D,4CAA4C;AAC5C,sDAAsD;AACtD,cAAc;AACd,wDAAwD;AACxD,OAAO;AACP,MAAM;AAEN,qCAAqC;AACrC,KAAK;AAEL,sDAAsD;AACtD,wEAAwE;AACxE,gDAAgD;AAChD,iCAAiC;AACjC,mEAAmE;AACnE,MAAM;AAEN,eAAe;AACf,MAAM;AAEN,sBAAsB;AACtB,yFAAyF;AACzF,KAAK;AAEL,+CAA+C;AAC/C,IAAI"}
|
package/out/sets.d.ts
DELETED
package/out/sets.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sets.d.ts","sourceRoot":"","sources":["../sets.ts"],"names":[],"mappings":""}
|
package/out/sets.js
DELETED
package/out/sets.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sets.js","sourceRoot":"","sources":["../sets.ts"],"names":[],"mappings":""}
|