@mailwoman/registry 11.0.0 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +3 -3
  2. package/docs/data-policy.md +5 -5
  3. package/docs/performance.md +1 -1
  4. package/docs/rgy1.md +5 -5
  5. package/lib/artifacts/country-airport-collision.ts +7 -5
  6. package/lib/artifacts/iata-airport/membership.ts +7 -5
  7. package/lib/artifacts/iata-airport/records.ts +7 -5
  8. package/lib/artifacts/iso3166-1/alpha2-membership.ts +7 -5
  9. package/lib/artifacts/iso3166-1/alpha3-membership.ts +7 -5
  10. package/lib/artifacts/iso3166-1/records.ts +7 -5
  11. package/lib/errors.ts +11 -8
  12. package/lib/iata/airports/records.ts +3 -4
  13. package/lib/iata/airports/validate.ts +6 -5
  14. package/lib/index.ts +10 -6
  15. package/lib/inspect.ts +5 -5
  16. package/lib/iso3166/alpha2.ts +5 -5
  17. package/lib/iso3166/alpha3.ts +6 -6
  18. package/lib/iso3166/records.ts +9 -8
  19. package/lib/iso3166/relations.ts +5 -5
  20. package/lib/key.ts +9 -7
  21. package/lib/normalize.ts +12 -8
  22. package/lib/overlap/country-airport.ts +14 -12
  23. package/lib/rgy1/base64.ts +3 -4
  24. package/lib/rgy1/reader.ts +8 -7
  25. package/lib/rgy1/sections.generated.ts +6 -5
  26. package/lib/rgy1/views.ts +5 -6
  27. package/lib/types.ts +8 -7
  28. package/lib/wasm.ts +11 -9
  29. package/out/artifacts/country-airport-collision.d.ts +0 -8
  30. package/out/artifacts/country-airport-collision.d.ts.map +1 -1
  31. package/out/artifacts/country-airport-collision.js +6 -5
  32. package/out/artifacts/country-airport-collision.js.map +1 -1
  33. package/out/artifacts/iata-airport/membership.d.ts +0 -8
  34. package/out/artifacts/iata-airport/membership.d.ts.map +1 -1
  35. package/out/artifacts/iata-airport/membership.js +6 -5
  36. package/out/artifacts/iata-airport/membership.js.map +1 -1
  37. package/out/artifacts/iata-airport/records.d.ts +0 -8
  38. package/out/artifacts/iata-airport/records.d.ts.map +1 -1
  39. package/out/artifacts/iata-airport/records.js +6 -5
  40. package/out/artifacts/iata-airport/records.js.map +1 -1
  41. package/out/artifacts/iso3166-1/alpha2-membership.d.ts +0 -8
  42. package/out/artifacts/iso3166-1/alpha2-membership.d.ts.map +1 -1
  43. package/out/artifacts/iso3166-1/alpha2-membership.js +6 -5
  44. package/out/artifacts/iso3166-1/alpha2-membership.js.map +1 -1
  45. package/out/artifacts/iso3166-1/alpha3-membership.d.ts +0 -8
  46. package/out/artifacts/iso3166-1/alpha3-membership.d.ts.map +1 -1
  47. package/out/artifacts/iso3166-1/alpha3-membership.js +6 -5
  48. package/out/artifacts/iso3166-1/alpha3-membership.js.map +1 -1
  49. package/out/artifacts/iso3166-1/records.d.ts +0 -8
  50. package/out/artifacts/iso3166-1/records.d.ts.map +1 -1
  51. package/out/artifacts/iso3166-1/records.js +6 -5
  52. package/out/artifacts/iso3166-1/records.js.map +1 -1
  53. package/out/errors.d.ts +8 -8
  54. package/out/errors.d.ts.map +1 -1
  55. package/out/errors.js +10 -8
  56. package/out/errors.js.map +1 -1
  57. package/out/iata/airports/records.d.ts +0 -7
  58. package/out/iata/airports/records.d.ts.map +1 -1
  59. package/out/iata/airports/records.js +2 -4
  60. package/out/iata/airports/records.js.map +1 -1
  61. package/out/iata/airports/validate.d.ts +0 -8
  62. package/out/iata/airports/validate.d.ts.map +1 -1
  63. package/out/iata/airports/validate.js +5 -5
  64. package/out/iata/airports/validate.js.map +1 -1
  65. package/out/index.d.ts +5 -6
  66. package/out/index.d.ts.map +1 -1
  67. package/out/index.js +2 -11
  68. package/out/index.js.map +1 -1
  69. package/out/inspect.d.ts +2 -5
  70. package/out/inspect.d.ts.map +1 -1
  71. package/out/inspect.js +4 -5
  72. package/out/inspect.js.map +1 -1
  73. package/out/iso3166/alpha2.d.ts +0 -8
  74. package/out/iso3166/alpha2.d.ts.map +1 -1
  75. package/out/iso3166/alpha2.js +4 -5
  76. package/out/iso3166/alpha2.js.map +1 -1
  77. package/out/iso3166/alpha3.d.ts +1 -9
  78. package/out/iso3166/alpha3.d.ts.map +1 -1
  79. package/out/iso3166/alpha3.js +5 -6
  80. package/out/iso3166/alpha3.js.map +1 -1
  81. package/out/iso3166/records.d.ts +0 -11
  82. package/out/iso3166/records.d.ts.map +1 -1
  83. package/out/iso3166/records.js +8 -8
  84. package/out/iso3166/records.js.map +1 -1
  85. package/out/iso3166/relations.d.ts +0 -7
  86. package/out/iso3166/relations.d.ts.map +1 -1
  87. package/out/iso3166/relations.js +4 -5
  88. package/out/iso3166/relations.js.map +1 -1
  89. package/out/key.d.ts +6 -7
  90. package/out/key.d.ts.map +1 -1
  91. package/out/key.js +8 -7
  92. package/out/key.js.map +1 -1
  93. package/out/normalize.d.ts +9 -8
  94. package/out/normalize.d.ts.map +1 -1
  95. package/out/normalize.js +2 -12
  96. package/out/normalize.js.map +1 -1
  97. package/out/overlap/country-airport.d.ts +2 -16
  98. package/out/overlap/country-airport.d.ts.map +1 -1
  99. package/out/overlap/country-airport.js +13 -12
  100. package/out/overlap/country-airport.js.map +1 -1
  101. package/out/rgy1/base64.d.ts +0 -4
  102. package/out/rgy1/base64.d.ts.map +1 -1
  103. package/out/rgy1/base64.js +2 -4
  104. package/out/rgy1/base64.js.map +1 -1
  105. package/out/rgy1/reader.d.ts +0 -11
  106. package/out/rgy1/reader.d.ts.map +1 -1
  107. package/out/rgy1/reader.js +7 -7
  108. package/out/rgy1/reader.js.map +1 -1
  109. package/out/rgy1/sections.generated.d.ts +3 -5
  110. package/out/rgy1/sections.generated.d.ts.map +1 -1
  111. package/out/rgy1/sections.generated.js +5 -5
  112. package/out/rgy1/sections.generated.js.map +1 -1
  113. package/out/rgy1/views.d.ts +2 -9
  114. package/out/rgy1/views.d.ts.map +1 -1
  115. package/out/rgy1/views.js +4 -6
  116. package/out/rgy1/views.js.map +1 -1
  117. package/out/sdk/fetch.d.ts +1 -5
  118. package/out/sdk/fetch.d.ts.map +1 -1
  119. package/out/sdk/fetch.js +5 -7
  120. package/out/sdk/fetch.js.map +1 -1
  121. package/out/sdk/fetch.run.d.ts +0 -12
  122. package/out/sdk/fetch.run.d.ts.map +1 -1
  123. package/out/sdk/fetch.run.js +6 -7
  124. package/out/sdk/fetch.run.js.map +1 -1
  125. package/out/sdk/sources.d.ts +6 -15
  126. package/out/sdk/sources.d.ts.map +1 -1
  127. package/out/sdk/sources.js +16 -13
  128. package/out/sdk/sources.js.map +1 -1
  129. package/out/tools/artifact-path.d.ts +0 -5
  130. package/out/tools/artifact-path.d.ts.map +1 -1
  131. package/out/tools/artifact-path.js +2 -5
  132. package/out/tools/artifact-path.js.map +1 -1
  133. package/out/tools/bench.run.d.ts +0 -17
  134. package/out/tools/bench.run.d.ts.map +1 -1
  135. package/out/tools/bench.run.js +13 -10
  136. package/out/tools/bench.run.js.map +1 -1
  137. package/out/tools/build-wasm.run.d.ts +0 -16
  138. package/out/tools/build-wasm.run.d.ts.map +1 -1
  139. package/out/tools/build-wasm.run.js +8 -10
  140. package/out/tools/build-wasm.run.js.map +1 -1
  141. package/out/tools/generate-sections.run.d.ts +0 -11
  142. package/out/tools/generate-sections.run.d.ts.map +1 -1
  143. package/out/tools/generate-sections.run.js +5 -14
  144. package/out/tools/generate-sections.run.js.map +1 -1
  145. package/out/tools/generate.run.d.ts +0 -16
  146. package/out/tools/generate.run.d.ts.map +1 -1
  147. package/out/tools/generate.run.js +11 -14
  148. package/out/tools/generate.run.js.map +1 -1
  149. package/out/tools/normalize.d.ts +1 -13
  150. package/out/tools/normalize.d.ts.map +1 -1
  151. package/out/tools/normalize.js +14 -14
  152. package/out/tools/normalize.js.map +1 -1
  153. package/out/tools/normalize.run.d.ts +0 -12
  154. package/out/tools/normalize.run.d.ts.map +1 -1
  155. package/out/tools/normalize.run.js +4 -6
  156. package/out/tools/normalize.run.js.map +1 -1
  157. package/out/types.d.ts +5 -7
  158. package/out/types.d.ts.map +1 -1
  159. package/out/types.js +2 -11
  160. package/out/types.js.map +1 -1
  161. package/out/wasm.d.ts +0 -13
  162. package/out/wasm.d.ts.map +1 -1
  163. package/out/wasm.js +10 -9
  164. package/out/wasm.js.map +1 -1
  165. package/package.json +8 -3
  166. package/sdk/fetch.run.ts +7 -7
  167. package/sdk/fetch.ts +6 -7
  168. package/sdk/sources.ts +17 -13
  169. package/tools/artifact-path.ts +2 -5
  170. package/tools/bench.run.ts +19 -10
  171. package/tools/build-wasm.run.ts +9 -10
  172. package/tools/generate-sections.run.ts +6 -14
  173. package/tools/generate.run.ts +12 -14
  174. package/tools/normalize.run.ts +5 -6
  175. package/tools/normalize.ts +15 -14
package/README.md CHANGED
@@ -45,9 +45,9 @@ is the explicit step that trims and upper-cases, and it reports what it did. A m
45
45
  `not-found-in-snapshot`: the source holds no such code, and the issuing authority may still have assigned
46
46
  it. `inspectArtifact` reads an artifact's profile, sources and coverage.
47
47
 
48
- Each subpath retains its own artifact and no other. `iso3166/alpha2` carries an 85-byte bitset;
49
- `overlap/country-airport`'s `isCountryAirportCollision` carries the 2,197-byte collision bitset;
50
- `interpretCountryOrAirportCode` carries the two record artifacts (51 KB and 1.1 MB). The root entry
48
+ Each subpath retains its own artifact and no other. `iso3166/alpha2` loads an 85-byte bitset;
49
+ `overlap/country-airport`'s `isCountryAirportCollision` loads the 2,197-byte collision bitset;
50
+ `interpretCountryOrAirportCode` loads the two record artifacts (51 KB and 1.1 MB). The root entry
51
51
  re-exports the subpaths and decodes an artifact at its first call.
52
52
 
53
53
  ## Brands
@@ -1,12 +1,12 @@
1
1
  # Data policy
2
2
 
3
3
  This package compiles identifier data from published sources into lookup artifacts. This document states
4
- where the data comes from, under what terms, what the open profile does and does not hold, and how a
4
+ where the data comes from, under what terms, what the open profile does and doesn't hold, and how a
5
5
  source update moves through the repository.
6
6
 
7
7
  ## Profiles
8
8
 
9
- A profile is a named set of pinned sources. An artifact's header states its profile, and every
9
+ A profile is a set of pinned sources with an identifier such as `open-2026-11`. An artifact's header states its profile, and every
10
10
  predicate in this package answers for one profile. The built profile is `open-2026-11`.
11
11
 
12
12
  | Profile | Sources | Where |
@@ -51,7 +51,7 @@ pinned bytes. At the pinned publication:
51
51
  when the code is a current alpha-2 entry, `source-extension` for a code such as `XK`, `unstated` when
52
52
  the column is empty. The `airport-located-in-country` relation holds only the first kind.
53
53
 
54
- A miss means `not-found-in-snapshot`: the source holds no such code. It is not a claim that the issuing
54
+ A miss means `not-found-in-snapshot`: the source holds no such code. It isn't a claim that the issuing
55
55
  authority never assigned it.
56
56
 
57
57
  OurAirports and Wikidata disagree on the country list in a way the coverage declaration records rather
@@ -61,7 +61,7 @@ than hides: OurAirports lists `XK`, `XP` and `ZZ`, which are not ISO codes, and
61
61
  ## How a source update moves through the repository
62
62
 
63
63
  1. `node packages/registry/sdk/fetch.run.ts --repin` downloads the sources into
64
- `$MAILWOMAN_DATA_ROOT/corpus/sources/registry/` and rewrites the lock. Without `--repin`, a changed
64
+ `$MAILWOMAN_CACHE_ROOT/sources/registry/` and rewrites the lock. Without `--repin`, a changed
65
65
  publication fails the run.
66
66
  2. `node packages/registry/tools/normalize.run.ts` rewrites `data/normalized/*.json` and
67
67
  `data/manifests/coverage.json`. The normalized files hold one record per line so the diff reads by
@@ -74,7 +74,7 @@ than hides: OurAirports lists `XK`, `XP` and `ZZ`, which are not ISO codes, and
74
74
 
75
75
  Network access happens only in step 1. A build never fetches.
76
76
 
77
- ## What is not committed
77
+ ## What's not committed
78
78
 
79
79
  The raw source files live under the data root and are not committed. The lock's digests identify them.
80
80
  `PROVENANCE.md` conventions for the corpus do not apply here because no row of these sources trains a
@@ -111,7 +111,7 @@ decode and validation of the three bitsets costs 0.6 ms.
111
111
  ## What the run shows
112
112
 
113
113
  - On strings, the JavaScript `Set` is the fastest arm at every batch size: 5 to 14 ns per code against 23
114
- to 25 ns for the TypeScript bitset, which pays for `charCodeAt` and the key arithmetic that the `Set`'s
114
+ to 25 ns for the TypeScript bitset. The bitset pays for `charCodeAt` and the key arithmetic that the `Set`'s
115
115
  interned string hash avoids. The bitset's advantage is memory and startup rather than per-probe time: 2,197
116
116
  bytes decoded in 0.6 ms against a `Set` of 201 strings built from a 2.6 MB JSON parse.
117
117
  - The wasm batch over packed bytes reaches 5.9 to 7.7 ns per code from 256 codes up, with the simd build 0.5
package/docs/rgy1.md CHANGED
@@ -14,7 +14,7 @@ no reader compares strings and no comparator has to agree across languages.
14
14
 
15
15
  Every integer is unsigned little-endian. Version 1 limits every offset and length to `u32`, so an
16
16
  artifact is smaller than 4 GiB. Every offset is relative to byte 0 of the artifact, never to a backing
17
- buffer. A reader given a subarray behaves as it would given the same bytes alone.
17
+ buffer. A reader given a subarray behaves as it would given a buffer that holds only those bytes.
18
18
 
19
19
  `align8(x)` is `x` rounded up to a multiple of 8.
20
20
 
@@ -42,10 +42,10 @@ The header is one JSON object serialized without whitespace, with its keys in by
42
42
  nested object's keys in byte order. Numbers are integers. Strings are UTF-8 with JSON's mandatory escapes
43
43
  only. The writer produces this form by serializing a `serde_json::Map`, which is a `BTreeMap`.
44
44
 
45
- The header carries no wall-clock time, host path or hash of the artifact itself. The artifact's SHA-256
45
+ The header stores no wall-clock time, host path or hash of the artifact itself. The artifact's SHA-256
46
46
  lives in `data/manifests/artifacts.json`, written by `tools/generate.run.ts` after the bytes exist.
47
47
 
48
- Fields every artifact carries:
48
+ Fields every artifact stores:
49
49
 
50
50
  | Key | Meaning |
51
51
  | ---------------------- | ---------------------------------------------------------------------------- |
@@ -84,8 +84,8 @@ Sections appear in directory order, each starting at a multiple of 8 at or after
84
84
  end, with zero bytes in any gap. The first section starts at the first payload offset. Fewer than eight
85
85
  zero bytes may follow the last section, so the total length is a multiple of 8.
86
86
 
87
- A reader refuses an unknown kind marked required and skips an unknown kind that is not. A known kind
88
- with an encoding the reader does not implement is refused.
87
+ A reader refuses an unknown kind marked required and skips an unknown kind that's not. A known kind
88
+ with an encoding the reader doesn't implement is refused.
89
89
 
90
90
  ## Keys
91
91
 
@@ -1,10 +1,12 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The `country-airport-collision` artifact of the `open-2026-11` profile, 3056 bytes,
6
+ * SHA-256 2154993ce8f65602a0000b9ca3ea0d5ed29a1f1719ce39ff6dd791d0ec8b106b.
5
7
  *
6
- * The `country-airport-collision` artifact of the `open-2026-11` profile, 3056 bytes, SHA-256 2154993ce8f65602a0000b9ca3ea0d5ed29a1f1719ce39ff6dd791d0ec8b106b.
7
- * Generated by tools/generate.run.ts from data/normalized. Edit the data or the compiler rather than this file.
8
+ * Generated by tools/generate.run.ts from data/normalized.
9
+ * Edit the data or the compiler rather than this file.
8
10
  */
9
11
 
10
12
  import { decodeBase64 } from "#rgy1/base64"
@@ -1,10 +1,12 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The `iata-airport-membership` artifact of the `open-2026-11` profile, 2792 bytes,
6
+ * SHA-256 01b6677cd90b33574ce988b169c85445e378c82216f60c7888fce51e451525d9.
5
7
  *
6
- * The `iata-airport-membership` artifact of the `open-2026-11` profile, 2792 bytes, SHA-256 01b6677cd90b33574ce988b169c85445e378c82216f60c7888fce51e451525d9.
7
- * Generated by tools/generate.run.ts from data/normalized. Edit the data or the compiler rather than this file.
8
+ * Generated by tools/generate.run.ts from data/normalized.
9
+ * Edit the data or the compiler rather than this file.
8
10
  */
9
11
 
10
12
  import { decodeBase64 } from "#rgy1/base64"
@@ -1,10 +1,12 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The `iata-airport-records` artifact of the `open-2026-11` profile, 1123320 bytes,
6
+ * SHA-256 c93d306a490f652f20d1867dfdd33532413e9638e4509ca6d2ce08e68332a972.
5
7
  *
6
- * The `iata-airport-records` artifact of the `open-2026-11` profile, 1123320 bytes, SHA-256 c93d306a490f652f20d1867dfdd33532413e9638e4509ca6d2ce08e68332a972.
7
- * Generated by tools/generate.run.ts from data/normalized. Edit the data or the compiler rather than this file.
8
+ * Generated by tools/generate.run.ts from data/normalized.
9
+ * Edit the data or the compiler rather than this file.
8
10
  */
9
11
 
10
12
  import { decodeBase64 } from "#rgy1/base64"
@@ -1,10 +1,12 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The `iso3166-1-alpha2-membership` artifact of the `open-2026-11` profile, 672 bytes,
6
+ * SHA-256 7daca3d6e81761ac09a2ddb8940ec8d09ffdf8f02fd7c56e04f2b30bb894022a.
5
7
  *
6
- * The `iso3166-1-alpha2-membership` artifact of the `open-2026-11` profile, 672 bytes, SHA-256 7daca3d6e81761ac09a2ddb8940ec8d09ffdf8f02fd7c56e04f2b30bb894022a.
7
- * Generated by tools/generate.run.ts from data/normalized. Edit the data or the compiler rather than this file.
8
+ * Generated by tools/generate.run.ts from data/normalized.
9
+ * Edit the data or the compiler rather than this file.
8
10
  */
9
11
 
10
12
  import { decodeBase64 } from "#rgy1/base64"
@@ -1,10 +1,12 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The `iso3166-1-alpha3-membership` artifact of the `open-2026-11` profile, 2784 bytes,
6
+ * SHA-256 2fe14e6fe8677e47a5aeb1079cbc4be78b05e55dd2e00c952ad44ab133269beb.
5
7
  *
6
- * The `iso3166-1-alpha3-membership` artifact of the `open-2026-11` profile, 2784 bytes, SHA-256 2fe14e6fe8677e47a5aeb1079cbc4be78b05e55dd2e00c952ad44ab133269beb.
7
- * Generated by tools/generate.run.ts from data/normalized. Edit the data or the compiler rather than this file.
8
+ * Generated by tools/generate.run.ts from data/normalized.
9
+ * Edit the data or the compiler rather than this file.
8
10
  */
9
11
 
10
12
  import { decodeBase64 } from "#rgy1/base64"
@@ -1,10 +1,12 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The `iso3166-1-records` artifact of the `open-2026-11` profile, 51624 bytes,
6
+ * SHA-256 6d04f2396d2a6189b8bb6c4da3c8fa621805db2e375b9d17af343b800a00f597.
5
7
  *
6
- * The `iso3166-1-records` artifact of the `open-2026-11` profile, 51624 bytes, SHA-256 6d04f2396d2a6189b8bb6c4da3c8fa621805db2e375b9d17af343b800a00f597.
7
- * Generated by tools/generate.run.ts from data/normalized. Edit the data or the compiler rather than this file.
8
+ * Generated by tools/generate.run.ts from data/normalized.
9
+ * Edit the data or the compiler rather than this file.
8
10
  */
9
11
 
10
12
  import { decodeBase64 } from "#rgy1/base64"
package/lib/errors.ts CHANGED
@@ -1,14 +1,17 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * The small error vocabulary a strict parse answers with.
7
6
  *
8
- * The four reasons are distinct so a caller can tell a misspelling from an absence. `shape` is the wrong length or
9
- * alphabet. `case` is the right letters in the wrong case. `not-found-in-snapshot` is a canonical spelling the profile
10
- * holds no record for. `status-excluded` is a code the profile holds under a status the strict brand leaves out. The
11
- * messages name no record, so a membership-only import pulls in no name dictionary.
7
+ * The four reasons are distinct so a caller can tell a misspelling from an absence.
8
+ * `shape` is the wrong length or alphabet.
9
+ *
10
+ * `case` is the right letters in the wrong case.
11
+ * `not-found-in-snapshot` is a canonical spelling the profile holds no record for.
12
+ *
13
+ * `status-excluded` is a code the profile holds under a status the strict brand leaves out.
14
+ * The messages name no record, so a membership-only import pulls in no name dictionary.
12
15
  */
13
16
 
14
17
  /**
@@ -1,8 +1,7 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * Airport record retrieval and the located-in-country relation over the `iata-airport-records` artifact.
7
6
  */
8
7
 
@@ -1,10 +1,11 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The strict airport-code predicate over the `iata-airport-membership` bitset.
5
6
  *
6
- * The strict airport-code predicate over the `iata-airport-membership` bitset. An import of it retains that
7
- * 2,197-byte bitset and the reader, and no airport record, coordinate or name.
7
+ * An import of it retains that 2,197-byte bitset and the reader,
8
+ * and no airport record, coordinate or name.
8
9
  */
9
10
 
10
11
  import { iataAirportMembershipArtifact } from "#artifacts/iata-airport/membership"
package/lib/index.ts CHANGED
@@ -1,12 +1,14 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * `@mailwoman/registry`: standardized identifiers and their relationships,
6
+ * compiled from pinned open sources.
5
7
  *
6
- * `@mailwoman/registry`: standardized identifiers and their relationships, compiled from pinned open sources.
8
+ * The root entry re-exports the narrow modules.
9
+ * Every export is a function or a type, and no module decodes an artifact until its
10
+ * first call, so importing the root costs the modules the bundler keeps and no table.
7
11
  *
8
- * The root entry re-exports the narrow modules. Every export is a function or a type, and no module decodes an
9
- * artifact until its first call, so importing the root costs the modules the bundler keeps and no table.
10
12
  * Import a subpath such as `@mailwoman/registry/iso3166/alpha2` when a bundle must retain one table only.
11
13
  */
12
14
 
@@ -17,6 +19,7 @@ export type { ArtifactInspection } from "#inspect"
17
19
  export { inspectArtifact } from "#inspect"
18
20
  export { isCountryCodeAlpha2, parseCountryCodeAlpha2 } from "#iso3166/alpha2"
19
21
  export { isCountryCodeAlpha3, parseCountryCodeAlpha3 } from "#iso3166/alpha3"
22
+
20
23
  export {
21
24
  countryRecordCount,
22
25
  countryRecordsHeader,
@@ -24,6 +27,7 @@ export {
24
27
  getCountryByAlpha3,
25
28
  getCountryByNumeric,
26
29
  } from "#iso3166/records"
30
+
27
31
  export { alpha2ForAlpha3, alpha2ForNumeric, alpha3ForAlpha2 } from "#iso3166/relations"
28
32
  export type { Normalization } from "#normalize"
29
33
  export { canonicalSpelling } from "#normalize"
package/lib/inspect.ts CHANGED
@@ -1,9 +1,9 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * Coverage and provenance inspection: what an artifact's profile holds, read from its header and directory.
5
+ * Coverage and provenance inspection: what an artifact's profile holds,
6
+ * read from its header and directory.
7
7
  */
8
8
 
9
9
  import { type Artifact, type ArtifactHeader, Artifact as RGY1Artifact } from "#rgy1/reader"
@@ -1,10 +1,10 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The strict alpha-2 country-code predicate over the `iso3166-1-alpha2-membership` bitset.
5
6
  *
6
- * The strict alpha-2 country-code predicate over the `iso3166-1-alpha2-membership` bitset. An import of it retains
7
- * that 85-byte bitset and the reader, and no name, airport or record.
7
+ * An import of it retains that 85-byte bitset and the reader, and no name, airport or record.
8
8
  */
9
9
 
10
10
  import { iso31661Alpha2MembershipArtifact } from "#artifacts/iso3166-1/alpha2-membership"
@@ -1,10 +1,10 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The strict alpha-3 country-code predicate over the `iso3166-1-alpha3-membership` bitset.
5
6
  *
6
- * The strict alpha-3 country-code predicate over the `iso3166-1-alpha3-membership` bitset. An import of it retains
7
- * that 2,197-byte bitset and the reader, and no name, airport or record.
7
+ * An import of it retains that 2,197-byte bitset and the reader, and no name, airport or record.
8
8
  */
9
9
 
10
10
  import { iso31661Alpha3MembershipArtifact } from "#artifacts/iso3166-1/alpha3-membership"
@@ -31,7 +31,7 @@ export function alpha3Membership(): BitsetView {
31
31
  * `AUS` is one.
32
32
  * `aus` and `AU` are not.
33
33
  *
34
- * A former code such as `DDR` is not: the records artifact still describes it.
34
+ * A former code such as `DDR` isn't: the records artifact still describes it.
35
35
  */
36
36
  export function isCountryCodeAlpha3(input: string): input is ISO.CountryCode_3166_1_Alpha3 {
37
37
  return alpha3Membership().test(encode3(input))
@@ -1,13 +1,14 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * Country record retrieval over the `iso3166-1-records` artifact: three id tables, six columns and a string pool.
5
+ * Country record retrieval over the `iso3166-1-records` artifact: three id tables,
6
+ * six columns and a string pool.
7
7
  *
8
- * A record is materialized on request and cached by row, so a repeated read of one country returns one object. The
9
- * artifact holds every status; `getCountry*` answers a record of any status and reports it, while the brands and the
10
- * membership predicates cover officially assigned codes only.
8
+ * A record is materialized on request and cached by row, so a repeated read
9
+ * of one country returns one object.
10
+ * The artifact holds every status; `getCountry*` answers a record of any status and reports it,
11
+ * while the brands and the membership predicates cover officially assigned codes only.
11
12
  */
12
13
 
13
14
  import { iso31661RecordsArtifact } from "#artifacts/iso3166-1/records"
@@ -1,9 +1,9 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * The code-equivalence relations of one country entity: alpha-2, alpha-3 and numeric codes of the same record.
5
+ * The code-equivalence relations of one country entity: alpha-2, alpha-3
6
+ * and numeric codes of the same record.
7
7
  */
8
8
 
9
9
  import { getCountryByAlpha2, getCountryByAlpha3, getCountryByNumeric } from "#iso3166/records"
package/lib/key.ts CHANGED
@@ -1,13 +1,15 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * Key encodings: the position of a code in its direct-address key space,
6
+ * mirroring `crates/registry-core/src/key.rs`.
5
7
  *
6
- * Key encodings: the position of a code in its direct-address key space, mirroring `crates/registry-core/src/key.rs`.
8
+ * Two or three upper-case ASCII letters encode base-26 with the first letter in the highest place.
9
+ * A three-digit numeric code encodes as its decimal value.
7
10
  *
8
- * Two or three upper-case ASCII letters encode base-26 with the first letter in the highest place. A three-digit
9
- * numeric code encodes as its decimal value. Every encoder checks length and alphabet first and answers `-1` for
10
- * anything else. A caller normalizes case or whitespace before calling, never here.
11
+ * Every encoder checks length and alphabet first and answers `-1` for anything else.
12
+ * A caller normalizes case or whitespace before calling, never here.
11
13
  */
12
14
 
13
15
  /**
package/lib/normalize.ts CHANGED
@@ -1,14 +1,18 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * Explicit input normalization, separate from the strict predicates.
7
6
  *
8
- * `canonicalSpelling` trims ASCII whitespace and upper-cases ASCII letters. It reports each change. A caller who
9
- * wants `" aus "` to reach `AUS` asks for that step. Every other character stays as written. A dot, a dash or a
10
- * non-ASCII letter reaches the strict predicate unchanged and is refused there with `shape`. Free-text tokenization
11
- * belongs to Mailwoman, outside this package.
7
+ * `canonicalSpelling` trims ASCII whitespace and upper-cases ASCII letters.
8
+ * It reports each change.
9
+ *
10
+ * A caller who wants `" aus "` to reach `AUS` asks for that step.
11
+ * Every other character stays as written.
12
+ *
13
+ * A dot, a dash or a non-ASCII letter reaches the strict predicate unchanged
14
+ * and is refused there with `shape`.
15
+ * Free-text tokenization belongs to Mailwoman, outside this package.
12
16
  */
13
17
 
14
18
  /**
@@ -1,16 +1,18 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The country/airport collision index: codes that are both an officially assigned
6
+ * ISO 3166-1 alpha-3 code and an IATA airport code in the profile.
5
7
  *
6
- * The country/airport collision index: codes that are both an officially assigned ISO 3166-1 alpha-3 code and an
7
- * IATA airport code in the profile.
8
+ * `isCountryAirportCollision` reads only the 2,197-byte collision bitset.
9
+ * `interpretCountryOrAirportCode` reads the records artifacts and answers every
10
+ * interpretation as a discriminated union, each branch with its own brand and entity,
11
+ * so `AUS` is Australia under one namespace and an airport in the United States under another.
8
12
  *
9
- * `isCountryAirportCollision` reads only the 2,197-byte collision bitset. `interpretCountryOrAirportCode` reads the
10
- * records artifacts and answers every interpretation as a discriminated union, each branch with its own brand and
11
- * entity, so `AUS` is Australia under one namespace and an airport in the United States under another. The two
12
- * relations are separate: `same-spelling-as` is the collision, `located-in` is each branch's `country`. The caller
13
- * ranks the interpretations, and the resolver in Mailwoman does it.
13
+ * The two relations are separate: `same-spelling-as` is the collision,
14
+ * `located-in` is each branch's `country`.
15
+ * The caller ranks the interpretations, and the resolver in Mailwoman does it.
14
16
  */
15
17
 
16
18
  import { countryAirportCollisionArtifact } from "#artifacts/country-airport-collision"
@@ -69,9 +71,9 @@ export type CodeMatch =
69
71
  /**
70
72
  * Every namespace that holds the spelling, in namespace order: country first, then airport.
71
73
  *
72
- * The order is the namespace list's and is not a ranking.
74
+ * The order is the namespace list's and isn't a ranking.
73
75
  * An empty array is `not-found-in-snapshot` in every namespace, and a former country code
74
- * is not an interpretation here because the current-assignment brand leaves it out.
76
+ * isn't an interpretation here because the current-assignment brand leaves it out.
75
77
  */
76
78
  export function interpretCountryOrAirportCode(input: string): CodeMatch[] {
77
79
  const matches: CodeMatch[] = []
@@ -1,8 +1,7 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * Decodes a generated artifact module's base64 text into bytes, on the platforms the readers run on.
7
6
  */
8
7
 
@@ -1,13 +1,14 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * The synchronous RGY1 reader: validate an artifact once, then probe its tables in place.
7
6
  *
8
- * The reader mirrors `crates/registry-core/src/artifact.rs` and follows `docs/rgy1.md`. It reads through a
9
- * `DataView` over the caller's bytes, honoring `byteOffset`, so an artifact handed over as a subarray behaves as the
10
- * same bytes would in their own buffer. No `Map` is rebuilt: a probe is an arithmetic index into the section's payload.
7
+ * The reader mirrors `crates/registry-core/src/artifact.rs` and follows `docs/rgy1.md`.
8
+ * It reads through a `DataView` over the caller's bytes, honoring `byteOffset`, so an
9
+ * artifact handed over as a subarray behaves as the same bytes would in their own buffer.
10
+ *
11
+ * No `Map` is rebuilt: a probe is an arithmetic index into the section's payload.
11
12
  */
12
13
 
13
14
  import {
@@ -1,10 +1,11 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * The RGY1 section kinds.
5
6
  *
6
- * The RGY1 section kinds. Generated from definitions/sections.json by tools/generate-sections.run.ts. Edit the
7
- * definition rather than this file.
7
+ * Generated from definitions/sections.json by tools/generate-sections.run.ts.
8
+ * Edit the definition rather than this file.
8
9
  */
9
10
 
10
11
  /**
package/lib/rgy1/views.ts CHANGED
@@ -1,8 +1,7 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * Typed views over an artifact's sections: bitset, id table, column, string pool and relation.
7
6
  */
8
7
 
@@ -33,7 +32,7 @@ export class BitsetView {
33
32
 
34
33
  /**
35
34
  * Whether `key` is a member.
36
- * A key outside the space is not.
35
+ * A key outside the space isn't.
37
36
  */
38
37
  test(key: number): boolean {
39
38
  if (key < 0) return false
@@ -45,7 +44,7 @@ export class BitsetView {
45
44
 
46
45
  /**
47
46
  * Whether a code in its canonical spelling is a member.
48
- * A code outside the grammar is not.
47
+ * A code outside the grammar isn't.
49
48
  */
50
49
  contains(code: string): boolean {
51
50
  return this.test(encodeForArity(this.arity, code))
package/lib/types.ts CHANGED
@@ -1,13 +1,14 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * Branded identifier types.
5
6
  *
6
- * Branded identifier types. A brand is a declaration-only unique symbol, so a branded value is a plain string at
7
- * runtime and the compiler refuses to pass one namespace's code where another's is expected.
7
+ * A brand is a declaration-only unique symbol, so a branded value is a plain string at runtime
8
+ * and the compiler refuses to pass one namespace's code where another's is expected.
8
9
  *
9
- * A branded value records that a validator accepted it under a documented profile at the time of the call. The
10
- * issuing authority's later assignments are outside what the brand records.
10
+ * A branded value records that a validator accepted it under a documented profile at the time of the call.
11
+ * The issuing authority's later assignments are outside what the brand records.
11
12
  */
12
13
 
13
14
  /**