@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
@@ -1,19 +1,23 @@
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
  * Measures the readers on this host and prints a Markdown report for `docs/performance.md`.
7
6
  *
8
- * Arms: a JavaScript `Set` of strings as the baseline, the TypeScript bitset reader, and the WebAssembly batch
9
- * kernels, scalar and simd. Inputs: strings end to end, and packed bytes where an arm takes them. Batch sizes 1, 16,
10
- * 256, 4,096 and the whole 17,576-key domain. Distributions: hits, misses, and a shuffled sweep of the domain. Startup:
11
- * module import, artifact decode and validation, wasm compile and instantiate, first query. Every result is consumed
12
- * so the work is kept.
7
+ * Arms: a JavaScript `Set` of strings as the baseline, the TypeScript bitset reader,
8
+ * and the WebAssembly batch kernels, scalar and simd.
9
+ * Inputs: strings end to end, and packed bytes where an arm takes them.
10
+ *
11
+ * Batch sizes 1, 16, 256, 4,096 and the whole 17,576-key domain.
12
+ * Distributions: hits, misses, and a shuffled sweep of the domain.
13
+ *
14
+ * Startup: module import, artifact decode and validation, wasm compile and instantiate, first query.
15
+ * Every result is consumed so the work is kept.
13
16
  *
14
17
  * Usage: `node packages/registry/tools/bench.run.ts [--json]`
15
18
  *
16
- * The numbers describe one host and one run. The report records the host, Node and the artifact digests beside them.
19
+ * The numbers describe one host and one run.
20
+ * The report records the host, Node and the artifact digests beside them.
17
21
  */
18
22
 
19
23
  import { readLocalBuffer, readLocalJSONFile } from "@mailwoman/core/fs/readers"
@@ -85,13 +89,17 @@ const firstQueryNs = nanoseconds(firstQueryStart)
85
89
  const countries = await readLocalJSONFile<{ records: Array<{ alpha3: string; status: string }> }>(
86
90
  workspacePath("registry", "data", "normalized", "iso3166-1.json")
87
91
  )
92
+
88
93
  const airports = await readLocalJSONFile<{ records: Array<{ iata: string }> }>(
89
94
  workspacePath("registry", "data", "normalized", "iata-airports.json")
90
95
  )
96
+
91
97
  const setStart = process.hrtime.bigint()
98
+
92
99
  const countrySet = new Set(
93
100
  countries.records.filter((record) => record.status === "officially-assigned").map((record) => record.alpha3)
94
101
  )
102
+
95
103
  const airportSet = new Set(airports.records.map((record) => record.iata))
96
104
  const collisionSet = new Set([...countrySet].filter((code) => airportSet.has(code)))
97
105
  const setBuildNs = nanoseconds(setStart)
@@ -162,6 +170,7 @@ for (const [distribution, codes] of [
162
170
  }
163
171
 
164
172
  const variants = wasm.preferredWasmVariant() === "simd" ? (["scalar", "simd"] as const) : (["scalar"] as const)
173
+
165
174
  const startup: Record<string, number> = {
166
175
  "module import": importNs,
167
176
  "artifact decode + validate (3 bitsets)": decodeNs,
@@ -1,16 +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
- *
6
- * Builds `crates/registry-wasm` for `wasm32-unknown-unknown` twice, once with `simd128` and once without, and
7
- * writes `wasm/registry-simd.wasm` and `wasm/registry.wasm`.
5
+ * Builds `crates/registry-wasm` for `wasm32-unknown-unknown` twice, once with `simd128`
6
+ * and once without, and writes `wasm/registry-simd.wasm` and `wasm/registry.wasm`.
8
7
  *
9
- * The two builds use separate target directories, because a `RUSTFLAGS` change would otherwise invalidate every
10
- * crate in the shared target directory.
8
+ * The two builds use separate target directories, because a `RUSTFLAGS` change would
9
+ * otherwise invalidate every crate in the shared target directory.
11
10
  *
12
- * With `--check`, the tool builds without writing and exits non-zero when a build's SHA-256 differs from the
13
- * committed binary's.
11
+ * With `--check`, the tool builds without writing and exits non-zero
12
+ * when a build's SHA-256 differs from the committed binary's.
14
13
  *
15
14
  * Usage: `node packages/registry/tools/build-wasm.run.ts [--check]`
16
15
  */
@@ -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
  * Writes the section-kind constants TypeScript and Rust share from `definitions/sections.json`.
7
6
  *
8
7
  * Usage: `node packages/registry/tools/generate-sections.run.ts [--check]`
@@ -15,6 +14,7 @@ import { writeLocalFile } from "@mailwoman/core/fs/writers"
15
14
  import { stringifyJSON } from "@mailwoman/core/json"
16
15
  import { workspacePath } from "@mailwoman/core/paths"
17
16
  import { parseArguments } from "@mailwoman/core/scripting/arguments"
17
+ import { SourceHeaderSyntax, spdxHeaderText } from "@mailwoman/core/spdx-header"
18
18
 
19
19
  interface SectionDefinitions {
20
20
  envelope: { magic: string; version: number; headerOffset: number; directoryEntryBytes: number; alignment: number }
@@ -28,11 +28,7 @@ const definitions = await readLocalJSONFile<SectionDefinitions>(registry("defini
28
28
 
29
29
  const constant = (name: string): string => name.toUpperCase().replaceAll("-", "_")
30
30
 
31
- const typescript = `/**
32
- * @copyright Sister Software
33
- * @license AGPL-3.0
34
- * @author Teffen Ellis, et al.
35
- *
31
+ const typescript = `${spdxHeaderText(SourceHeaderSyntax.Slash)}/**
36
32
  * The RGY1 section kinds. Generated from definitions/sections.json by tools/generate-sections.run.ts. Edit the
37
33
  * definition rather than this file.
38
34
  */
@@ -91,11 +87,7 @@ ${definitions.kinds.map((kind) => `\t[SectionKind.${constant(kind.name)}]: ${str
91
87
  }
92
88
  `
93
89
 
94
- const rust = `// @copyright Sister Software
95
- // @license AGPL-3.0
96
- // @author Teffen Ellis, et al.
97
-
98
- //! The RGY1 section kinds. Generated from \`definitions/sections.json\` by
90
+ const rust = `${spdxHeaderText(SourceHeaderSyntax.Slash)}//! The RGY1 section kinds. Generated from \`definitions/sections.json\` by
99
91
  //! \`tools/generate-sections.run.ts\`. Edit the definition rather than this file.
100
92
 
101
93
  pub const MAGIC: &[u8; 4] = b${stringifyJSON(definitions.envelope.magic)};
@@ -1,14 +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
- *
6
- * Compiles the normalized data into RGY1 artifacts with `crates/registry-build`, writes each artifact as a
7
- * TypeScript module under `lib/artifacts/`, and records every artifact's SHA-256 in `data/manifests/artifacts.json`.
5
+ * Compiles the normalized data into RGY1 artifacts with `crates/registry-build`,
6
+ * writes each artifact as a TypeScript module under `lib/artifacts/`, and records
7
+ * every artifact's SHA-256 in `data/manifests/artifacts.json`.
8
8
  *
9
- * Each artifact is its own module exporting one lazily decoded getter, so a bundle that imports the collision
10
- * predicate holds the collision bitset and no airport record. The fixture profile under `test/fixtures/` is compiled
11
- * too, into `test/fixtures/artifacts/*.rgy1`, so the committed fixtures stay equal to the compiler's output.
9
+ * Each artifact is its own module exporting one lazily decoded getter, so a bundle that
10
+ * imports the collision predicate holds the collision bitset and no airport record.
11
+ * The fixture profile under `test/fixtures/` is compiled too, into `test/fixtures/artifacts/*.rgy1`,
12
+ * so the committed fixtures stay equal to the compiler's output.
12
13
  *
13
14
  * Usage: `node packages/registry/tools/generate.run.ts [--check]`
14
15
  *
@@ -23,6 +24,7 @@ import { prettyJSON } from "@mailwoman/core/json"
23
24
  import { repoRootPath, workspacePath } from "@mailwoman/core/paths"
24
25
  import { runFile } from "@mailwoman/core/process"
25
26
  import { parseArguments } from "@mailwoman/core/scripting/arguments"
27
+ import { SourceHeaderSyntax, spdxHeaderText } from "@mailwoman/core/spdx-header"
26
28
 
27
29
  import { artifactModulePath } from "#tools/artifact-path"
28
30
 
@@ -82,11 +84,7 @@ for (const name of ARTIFACTS) {
82
84
 
83
85
  manifest[name] = { sha256, bytes: bytes.byteLength, profile: profile.profile }
84
86
 
85
- const module = `/**
86
- * @copyright Sister Software
87
- * @license AGPL-3.0
88
- * @author Teffen Ellis, et al.
89
- *
87
+ const module = `${spdxHeaderText(SourceHeaderSyntax.Slash)}/**
90
88
  * The \`${name}\` artifact of the \`${profile.profile}\` profile, ${bytes.byteLength} bytes, SHA-256 ${sha256}.
91
89
  * Generated by tools/generate.run.ts from data/normalized. Edit the data or the compiler rather than this file.
92
90
  */
@@ -1,10 +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
- * Writes `data/normalized/iso3166-1.json`, `data/normalized/iata-airports.json` and
7
- * `data/manifests/coverage.json` from the pinned sources.
5
+ * Writes `data/normalized/iso3166-1.json`, `data/normalized/iata-airports.json`
6
+ * and `data/manifests/coverage.json` from the pinned sources.
8
7
  *
9
8
  * Usage: `node packages/registry/tools/normalize.run.ts`
10
9
  *
@@ -1,14 +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
- *
6
5
  * Turns the pinned sources into the reviewable normalized JSON the compiler reads.
7
6
  *
8
- * Every record keeps the source's own identity (`entityID`), the code as the source spells it, and the source's
9
- * status words. Each record comes from one source: a country record from Wikidata, an airport record from
10
- * OurAirports. An airport's `country` is the alpha-2 string OurAirports states, with a status that records whether
11
- * that string is an officially assigned ISO code, a source extension such as `XK`, or absent.
7
+ * Every record keeps the source's own identity (`entityID`), the code as the
8
+ * source spells it, and the source's status words.
9
+ * Each record comes from one source: a country record from Wikidata, an airport record from OurAirports.
10
+ *
11
+ * An airport's `country` is the alpha-2 string OurAirports states, with a status that records
12
+ * whether that string is an officially assigned ISO code, a source extension such as `XK`, or absent.
12
13
  */
13
14
 
14
15
  import { readLocalJSONFile, readLocalTextFile } from "@mailwoman/core/fs/readers"
@@ -16,7 +17,7 @@ import { sha256File } from "@mailwoman/core/hash"
16
17
  import { stringifyJSON } from "@mailwoman/core/json"
17
18
  import { TextSpliterator } from "spliterator"
18
19
 
19
- import { type SourceDefinition, type SourceLock, sourcePath, SOURCES } from "#sdk/sources"
20
+ import { pinnedSourceFile, type SourceDefinition, type SourceLock, SOURCES } from "#sdk/sources"
20
21
 
21
22
  /**
22
23
  * One ISO 3166-1 entry.
@@ -434,7 +435,7 @@ export function formatNormalized(collection: NormalizedCountries | NormalizedAir
434
435
  }
435
436
 
436
437
  /**
437
- * Reads the three pinned sources and normalizes them, refusing bytes the lock does not describe.
438
+ * Reads the three pinned sources and normalizes them, refusing bytes the lock doesn't describe.
438
439
  */
439
440
  export async function normalizeFromLock(lock: SourceLock): Promise<{
440
441
  countries: NormalizedCountries
@@ -443,7 +444,7 @@ export async function normalizeFromLock(lock: SourceLock): Promise<{
443
444
  }> {
444
445
  for (const definition of SOURCES.filter((candidate) => candidate.terms.elected)) {
445
446
  const locked = lock.sources[definition.id]
446
- const digest = await sha256File(sourcePath(definition))
447
+ const digest = await sha256File(pinnedSourceFile(definition))
447
448
 
448
449
  if (!locked) throw new Error(`${definition.id} is outside the lock`)
449
450
 
@@ -452,7 +453,7 @@ export async function normalizeFromLock(lock: SourceLock): Promise<{
452
453
  }
453
454
  }
454
455
 
455
- const results = await readLocalJSONFile<SPARQLResults>(sourcePath(sourceDefinition("wikidata-iso3166-1")))
456
+ const results = await readLocalJSONFile<SPARQLResults>(pinnedSourceFile(sourceDefinition("wikidata-iso3166-1")))
456
457
  const countries = normalizeCountries(results, lock.profile)
457
458
 
458
459
  const current = new Set(
@@ -460,14 +461,14 @@ export async function normalizeFromLock(lock: SourceLock): Promise<{
460
461
  )
461
462
 
462
463
  const airports = normalizeAirports(
463
- await readLocalTextFile(sourcePath(sourceDefinition("ourairports-airports"))),
464
+ await readLocalTextFile(pinnedSourceFile(sourceDefinition("ourairports-airports"))),
464
465
  current,
465
466
  lock.profile
466
467
  )
467
468
 
468
469
  const comparison = compareCountryLists(
469
470
  countries.records,
470
- await readLocalTextFile(sourcePath(sourceDefinition("ourairports-countries")))
471
+ await readLocalTextFile(pinnedSourceFile(sourceDefinition("ourairports-countries")))
471
472
  )
472
473
 
473
474
  return { countries, airports, coverage: declareCoverage(countries, airports, comparison) }