@mailwoman/geographic-model 10.1.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/artifact.ts +4 -4
- package/lib/compile.ts +3 -3
- package/lib/index.ts +1 -0
- package/lib/load.ts +14 -11
- package/lib/packaged.ts +2 -1
- package/lib/validate.ts +20 -22
- package/lib/validation/issues.ts +20 -20
- package/lib/validation/references.ts +18 -18
- package/out/artifact.js +3 -3
- package/out/artifact.js.map +1 -1
- package/out/compile.js +1 -1
- package/out/compile.js.map +1 -1
- package/out/index.d.ts +1 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -0
- package/out/index.js.map +1 -1
- package/out/load.d.ts +1 -1
- package/out/load.d.ts.map +1 -1
- package/out/load.js +9 -6
- package/out/load.js.map +1 -1
- package/out/packaged.d.ts.map +1 -1
- package/out/packaged.js +2 -1
- package/out/packaged.js.map +1 -1
- package/out/validate.d.ts +20 -21
- package/out/validate.d.ts.map +1 -1
- package/out/validate.js +0 -1
- package/out/validate.js.map +1 -1
- package/out/validation/issues.d.ts +7 -7
- package/out/validation/issues.d.ts.map +1 -1
- package/out/validation/issues.js +15 -15
- package/out/validation/issues.js.map +1 -1
- package/out/validation/references.js +14 -14
- package/out/validation/references.js.map +1 -1
- package/package.json +4 -4
package/lib/artifact.ts
CHANGED
|
@@ -130,22 +130,22 @@ const ARTIFACT_TABLES = [
|
|
|
130
130
|
] as const
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* Returns the reason `value` is not a compiled artifact, or `
|
|
133
|
+
* Returns the reason `value` is not a compiled artifact, or `null` when it is one.
|
|
134
134
|
*/
|
|
135
|
-
function artifactProblem(value: unknown): string |
|
|
135
|
+
function artifactProblem(value: unknown): string | null {
|
|
136
136
|
if (!isPlainObject(value)) return "a compiled geographic model must be an object"
|
|
137
137
|
|
|
138
138
|
if (value.schemaVersion !== ARTIFACT_SCHEMA_VERSION) {
|
|
139
139
|
return `this reader understands artifact schema version ${ARTIFACT_SCHEMA_VERSION}; the artifact declares ${stringifyJSON(value.schemaVersion)}`
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
if (typeof value.modelVersion !== "string" || !value.modelVersion.trim()
|
|
142
|
+
if (typeof value.modelVersion !== "string" || !value.modelVersion.trim()) {
|
|
143
143
|
return "`modelVersion` must be a non-blank string"
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
const missing = ARTIFACT_TABLES.filter((table) => !Array.isArray(value[table]))
|
|
147
147
|
|
|
148
|
-
if (!missing.length) return
|
|
148
|
+
if (!missing.length) return null
|
|
149
149
|
|
|
150
150
|
return `the artifact is missing ${missing.map((table) => `\`${table}\``).join(", ")}`
|
|
151
151
|
}
|
package/lib/compile.ts
CHANGED
|
@@ -153,7 +153,7 @@ function ancestorsOfConcept(
|
|
|
153
153
|
interface DerivedDraft {
|
|
154
154
|
subject: ConceptID
|
|
155
155
|
assertion: RelationAssertion
|
|
156
|
-
countries
|
|
156
|
+
countries: readonly string[] | null
|
|
157
157
|
inputs: Map<string, DerivationInput>
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -190,7 +190,7 @@ function edgeKey(assertion: RelationAssertion): string {
|
|
|
190
190
|
return `${assertion.relation}${KEY_SEPARATOR}${assertion.target}`
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
function draftKey(subject: ConceptID, assertion: RelationAssertion, countries: readonly string[] |
|
|
193
|
+
function draftKey(subject: ConceptID, assertion: RelationAssertion, countries: readonly string[] | null): string {
|
|
194
194
|
const scope = countries?.join(COUNTRY_SEPARATOR) ?? ""
|
|
195
195
|
|
|
196
196
|
return `${subject}${KEY_SEPARATOR}${edgeKey(assertion)}${KEY_SEPARATOR}${assertion.modality}${KEY_SEPARATOR}${scope}`
|
|
@@ -243,7 +243,7 @@ function deriveInheritedFacts(
|
|
|
243
243
|
continue
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
const countries = assertion.countries?.length ? assertion.countries.toSorted(compareIdentifiers) :
|
|
246
|
+
const countries = assertion.countries?.length ? assertion.countries.toSorted(compareIdentifiers) : null
|
|
247
247
|
const key = draftKey(concept.id, assertion, countries)
|
|
248
248
|
const existing = drafts.get(key)
|
|
249
249
|
const draft: DerivedDraft = existing ?? { subject: concept.id, assertion, countries, inputs: new Map() }
|
package/lib/index.ts
CHANGED
package/lib/load.ts
CHANGED
|
@@ -86,7 +86,7 @@ export interface SourcedIssue {
|
|
|
86
86
|
/**
|
|
87
87
|
* For a duplicate identifier, the file that used the identifier first.
|
|
88
88
|
*/
|
|
89
|
-
otherFile
|
|
89
|
+
otherFile: string | null
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/**
|
|
@@ -135,7 +135,7 @@ interface RecordOrigin {
|
|
|
135
135
|
* Identifiers are unique within a table.
|
|
136
136
|
*/
|
|
137
137
|
table: string
|
|
138
|
-
id
|
|
138
|
+
id: string | null
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
interface MergeState {
|
|
@@ -147,11 +147,11 @@ interface MergeState {
|
|
|
147
147
|
* The validator reports only the second use.
|
|
148
148
|
*/
|
|
149
149
|
firstClaims: Map<string, Map<string, string>>
|
|
150
|
-
version
|
|
150
|
+
version: string | null
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
function sourced(file: string, issues: readonly ValidationIssue[]): SourcedIssue[] {
|
|
154
|
-
return issues.map((issue) => ({ file, path: issue.path, code: issue.code, message: issue.message }))
|
|
154
|
+
return issues.map((issue) => ({ file, path: issue.path, code: issue.code, message: issue.message, otherFile: null }))
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
/**
|
|
@@ -169,14 +169,15 @@ function readSourceJSON(file: GeographicModelSourceFile, issues: SourcedIssue[])
|
|
|
169
169
|
path: "$",
|
|
170
170
|
code: LoadIssueCode.MalformedJSON,
|
|
171
171
|
message: error instanceof Error ? error.message : String(error),
|
|
172
|
+
otherFile: null,
|
|
172
173
|
})
|
|
173
174
|
|
|
174
175
|
return undefined
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
|
|
178
|
-
function claim(state: MergeState, table: string, id: string |
|
|
179
|
-
if (id
|
|
179
|
+
function claim(state: MergeState, table: string, id: string | null, file: string): void {
|
|
180
|
+
if (!id) return
|
|
180
181
|
|
|
181
182
|
const claims = state.firstClaims.get(table) ?? new Map<string, string>()
|
|
182
183
|
|
|
@@ -187,10 +188,10 @@ function claim(state: MergeState, table: string, id: string | undefined, file: s
|
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
190
|
|
|
190
|
-
function recordID(entry: unknown): string |
|
|
191
|
-
if (!isPlainObject(entry)) return
|
|
191
|
+
function recordID(entry: unknown): string | null {
|
|
192
|
+
if (!isPlainObject(entry)) return null
|
|
192
193
|
|
|
193
|
-
return typeof entry.id === "string" ? entry.id :
|
|
194
|
+
return typeof entry.id === "string" ? entry.id : null
|
|
194
195
|
}
|
|
195
196
|
|
|
196
197
|
function readManifestFile(state: MergeState, file: GeographicModelSourceFile, value: unknown): void {
|
|
@@ -279,14 +280,14 @@ function attribute(state: MergeState, issue: ValidationIssue): SourcedIssue {
|
|
|
279
280
|
const claimant =
|
|
280
281
|
issue.code === ValidationIssueCode.DuplicateID && origin?.id
|
|
281
282
|
? state.firstClaims.get(origin.table)?.get(origin.id)
|
|
282
|
-
:
|
|
283
|
+
: null
|
|
283
284
|
|
|
284
285
|
return {
|
|
285
286
|
file,
|
|
286
287
|
path: issue.path,
|
|
287
288
|
code: issue.code,
|
|
288
289
|
message: issue.message,
|
|
289
|
-
|
|
290
|
+
otherFile: claimant ?? null,
|
|
290
291
|
}
|
|
291
292
|
}
|
|
292
293
|
|
|
@@ -303,6 +304,7 @@ export function mergeGeographicModelFiles(files: readonly GeographicModelSourceF
|
|
|
303
304
|
tables: { relations: [], concepts: [], mappings: [], observations: [], derivedFacts: [] },
|
|
304
305
|
origins: new Map(),
|
|
305
306
|
firstClaims: new Map(),
|
|
307
|
+
version: null,
|
|
306
308
|
}
|
|
307
309
|
|
|
308
310
|
const ordered = files.toSorted((left, right) => compareIdentifiers(left.path, right.path))
|
|
@@ -314,6 +316,7 @@ export function mergeGeographicModelFiles(files: readonly GeographicModelSourceF
|
|
|
314
316
|
path: "$",
|
|
315
317
|
code: LoadIssueCode.MissingField,
|
|
316
318
|
message: `a model directory carries \`${MODEL_MANIFEST_FILENAME}\`, holding the document's \`version\``,
|
|
319
|
+
otherFile: null,
|
|
317
320
|
})
|
|
318
321
|
}
|
|
319
322
|
|
package/lib/packaged.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* @file Reads the compiled model this package ships in `data/geographic-model.json`.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { readLocalTextFile } from "@mailwoman/core/fs/readers"
|
|
9
|
+
import { pathExists } from "@mailwoman/core/fs/readers/stat"
|
|
9
10
|
import { resolvePackagePath } from "@mailwoman/core/module/resolvers"
|
|
10
11
|
import { resolvePath } from "path-ts"
|
|
11
12
|
|
package/lib/validate.ts
CHANGED
|
@@ -35,8 +35,6 @@ import {
|
|
|
35
35
|
} from "#validation/issues"
|
|
36
36
|
import { checkReferences } from "#validation/references"
|
|
37
37
|
|
|
38
|
-
export { type ValidationIssue, ValidationIssueCode } from "#validation/issues"
|
|
39
|
-
|
|
40
38
|
/**
|
|
41
39
|
* The whole document, or every reason it is not one.
|
|
42
40
|
*/
|
|
@@ -85,47 +83,47 @@ const COUNTRY_PATTERN = /^[A-Z]{2}$/
|
|
|
85
83
|
|
|
86
84
|
export interface AssertionView {
|
|
87
85
|
path: string
|
|
88
|
-
id
|
|
89
|
-
relation
|
|
90
|
-
target
|
|
86
|
+
id: string | null
|
|
87
|
+
relation: string | null
|
|
88
|
+
target: string | null
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
export interface ConceptView {
|
|
94
92
|
path: string
|
|
95
|
-
id
|
|
96
|
-
kind
|
|
97
|
-
isA
|
|
93
|
+
id: string | null
|
|
94
|
+
kind: ConceptKind | null
|
|
95
|
+
isA: string[] | null
|
|
98
96
|
assertions: AssertionView[]
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
export interface RelationView {
|
|
102
100
|
path: string
|
|
103
|
-
id
|
|
104
|
-
domainKinds
|
|
105
|
-
rangeKinds
|
|
106
|
-
transitive
|
|
107
|
-
symmetric
|
|
108
|
-
inverse
|
|
101
|
+
id: string | null
|
|
102
|
+
domainKinds: ConceptKind[] | null
|
|
103
|
+
rangeKinds: ConceptKind[] | null
|
|
104
|
+
transitive: boolean | null
|
|
105
|
+
symmetric: boolean | null
|
|
106
|
+
inverse: string | null
|
|
109
107
|
}
|
|
110
108
|
|
|
111
109
|
export interface MappingView {
|
|
112
110
|
path: string
|
|
113
|
-
id
|
|
114
|
-
concept
|
|
111
|
+
id: string | null
|
|
112
|
+
concept: string | null
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
export interface TripleView {
|
|
118
116
|
path: string
|
|
119
|
-
id
|
|
120
|
-
subject
|
|
121
|
-
relation
|
|
122
|
-
object
|
|
117
|
+
id: string | null
|
|
118
|
+
subject: string | null
|
|
119
|
+
relation: string | null
|
|
120
|
+
object: string | null
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
export interface DerivationInputView {
|
|
126
124
|
path: string
|
|
127
|
-
kind
|
|
128
|
-
id
|
|
125
|
+
kind: DerivationInputKind | null
|
|
126
|
+
id: string | null
|
|
129
127
|
}
|
|
130
128
|
|
|
131
129
|
export interface DerivedFactView extends TripleView {
|
package/lib/validation/issues.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The issue vocabulary and the primitive field readers `./validate.ts` is built from.
|
|
7
7
|
*
|
|
8
|
-
* Every reader appends issues to the supplied list and returns `
|
|
8
|
+
* Every reader appends issues to the supplied list and returns `null` when it cannot read a field.
|
|
9
9
|
* The pass records each defect and continues.
|
|
10
10
|
* A default would turn an unreadable field into a value and invent data at the validation boundary.
|
|
11
11
|
*/
|
|
@@ -134,7 +134,7 @@ export function readString(
|
|
|
134
134
|
container: Record<string, unknown>,
|
|
135
135
|
key: string,
|
|
136
136
|
required: boolean
|
|
137
|
-
): string |
|
|
137
|
+
): string | null {
|
|
138
138
|
const value = container[key]
|
|
139
139
|
const fieldPath = `${path}.${key}`
|
|
140
140
|
|
|
@@ -143,19 +143,19 @@ export function readString(
|
|
|
143
143
|
add(issues, fieldPath, ValidationIssueCode.MissingField, `\`${key}\` is required`)
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
return
|
|
146
|
+
return null
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
if (typeof value !== "string") {
|
|
150
150
|
add(issues, fieldPath, ValidationIssueCode.WrongType, `\`${key}\` must be a string`)
|
|
151
151
|
|
|
152
|
-
return
|
|
152
|
+
return null
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
if (!value.trim()
|
|
155
|
+
if (!value.trim()) {
|
|
156
156
|
add(issues, fieldPath, ValidationIssueCode.EmptyValue, `\`${key}\` must not be blank`)
|
|
157
157
|
|
|
158
|
-
return
|
|
158
|
+
return null
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
return value
|
|
@@ -166,20 +166,20 @@ export function readBoolean(
|
|
|
166
166
|
path: string,
|
|
167
167
|
container: Record<string, unknown>,
|
|
168
168
|
key: string
|
|
169
|
-
): boolean |
|
|
169
|
+
): boolean | null {
|
|
170
170
|
const value = container[key]
|
|
171
171
|
const fieldPath = `${path}.${key}`
|
|
172
172
|
|
|
173
173
|
if (value === undefined) {
|
|
174
174
|
add(issues, fieldPath, ValidationIssueCode.MissingField, `\`${key}\` is required`)
|
|
175
175
|
|
|
176
|
-
return
|
|
176
|
+
return null
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
if (typeof value !== "boolean") {
|
|
180
180
|
add(issues, fieldPath, ValidationIssueCode.WrongType, `\`${key}\` must be a boolean`)
|
|
181
181
|
|
|
182
|
-
return
|
|
182
|
+
return null
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
return value
|
|
@@ -191,7 +191,7 @@ export function readArray(
|
|
|
191
191
|
container: Record<string, unknown>,
|
|
192
192
|
key: string,
|
|
193
193
|
required: boolean
|
|
194
|
-
): unknown[] |
|
|
194
|
+
): unknown[] | null {
|
|
195
195
|
const value = container[key]
|
|
196
196
|
const fieldPath = `${path}.${key}`
|
|
197
197
|
|
|
@@ -200,13 +200,13 @@ export function readArray(
|
|
|
200
200
|
add(issues, fieldPath, ValidationIssueCode.MissingField, `\`${key}\` is required`)
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
return
|
|
203
|
+
return null
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
if (!Array.isArray(value)) {
|
|
207
207
|
add(issues, fieldPath, ValidationIssueCode.WrongType, `\`${key}\` must be an array`)
|
|
208
208
|
|
|
209
|
-
return
|
|
209
|
+
return null
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
return value
|
|
@@ -218,10 +218,10 @@ export function readStringArray(
|
|
|
218
218
|
container: Record<string, unknown>,
|
|
219
219
|
key: string,
|
|
220
220
|
required: boolean
|
|
221
|
-
): string[] |
|
|
221
|
+
): string[] | null {
|
|
222
222
|
const entries = readArray(issues, path, container, key, required)
|
|
223
223
|
|
|
224
|
-
if (!entries) return
|
|
224
|
+
if (!entries) return null
|
|
225
225
|
|
|
226
226
|
const values: string[] = []
|
|
227
227
|
|
|
@@ -234,7 +234,7 @@ export function readStringArray(
|
|
|
234
234
|
continue
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
if (!entry.trim()
|
|
237
|
+
if (!entry.trim()) {
|
|
238
238
|
add(issues, entryPath, ValidationIssueCode.EmptyValue, "must not be blank")
|
|
239
239
|
|
|
240
240
|
continue
|
|
@@ -253,10 +253,10 @@ export function readVocabularyValue<T extends string>(
|
|
|
253
253
|
key: string,
|
|
254
254
|
allowed: readonly T[],
|
|
255
255
|
code: ValidationIssueCode
|
|
256
|
-
): T |
|
|
256
|
+
): T | null {
|
|
257
257
|
const value = readString(issues, path, container, key, true)
|
|
258
258
|
|
|
259
|
-
if (value
|
|
259
|
+
if (!value) return null
|
|
260
260
|
|
|
261
261
|
const match = allowed.find((candidate) => candidate === value)
|
|
262
262
|
|
|
@@ -264,7 +264,7 @@ export function readVocabularyValue<T extends string>(
|
|
|
264
264
|
add(issues, `${path}.${key}`, code, `\`${value}\` is not one of ${listVocabulary(allowed)}`)
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
return match
|
|
267
|
+
return match ?? null
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
export function readVocabularyArray<T extends string>(
|
|
@@ -274,10 +274,10 @@ export function readVocabularyArray<T extends string>(
|
|
|
274
274
|
key: string,
|
|
275
275
|
allowed: readonly T[],
|
|
276
276
|
code: ValidationIssueCode
|
|
277
|
-
): T[] |
|
|
277
|
+
): T[] | null {
|
|
278
278
|
const values = readStringArray(issues, path, container, key, true)
|
|
279
279
|
|
|
280
|
-
if (!values) return
|
|
280
|
+
if (!values) return null
|
|
281
281
|
|
|
282
282
|
const matched: T[] = []
|
|
283
283
|
|
|
@@ -21,7 +21,7 @@ import { add, listVocabulary, type ValidationIssue, ValidationIssueCode } from "
|
|
|
21
21
|
* Index a table by identifier, reporting every record after the first that
|
|
22
22
|
* claims an identifier already taken.
|
|
23
23
|
*/
|
|
24
|
-
function indexByID<T extends { path: string; id
|
|
24
|
+
function indexByID<T extends { path: string; id: string | null }>(
|
|
25
25
|
issues: ValidationIssue[],
|
|
26
26
|
records: readonly T[],
|
|
27
27
|
label: string
|
|
@@ -29,7 +29,7 @@ function indexByID<T extends { path: string; id?: string }>(
|
|
|
29
29
|
const index = new Map<string, T>()
|
|
30
30
|
|
|
31
31
|
for (const record of records) {
|
|
32
|
-
if (record.id
|
|
32
|
+
if (!record.id) continue
|
|
33
33
|
|
|
34
34
|
if (index.has(record.id)) {
|
|
35
35
|
add(
|
|
@@ -49,11 +49,11 @@ function indexByID<T extends { path: string; id?: string }>(
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
interface EdgeCheck {
|
|
52
|
-
subjectKind
|
|
52
|
+
subjectKind: ConceptKind | null
|
|
53
53
|
subjectPath: string
|
|
54
|
-
relationID
|
|
54
|
+
relationID: string | null
|
|
55
55
|
relationPath: string
|
|
56
|
-
objectID
|
|
56
|
+
objectID: string | null
|
|
57
57
|
objectPath: string
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -62,9 +62,9 @@ interface EdgeCheck {
|
|
|
62
62
|
* and range kinds shared by authored assertions, source observations and derived facts.
|
|
63
63
|
*/
|
|
64
64
|
function checkEdge(issues: ValidationIssue[], edge: EdgeCheck, tables: ReferenceTables): void {
|
|
65
|
-
const relation = edge.relationID
|
|
65
|
+
const relation = edge.relationID ? tables.relations.get(edge.relationID) : null
|
|
66
66
|
|
|
67
|
-
if (edge.relationID
|
|
67
|
+
if (edge.relationID && !relation) {
|
|
68
68
|
add(
|
|
69
69
|
issues,
|
|
70
70
|
edge.relationPath,
|
|
@@ -73,9 +73,9 @@ function checkEdge(issues: ValidationIssue[], edge: EdgeCheck, tables: Reference
|
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const object = edge.objectID
|
|
76
|
+
const object = edge.objectID ? tables.concepts.get(edge.objectID) : null
|
|
77
77
|
|
|
78
|
-
if (edge.objectID
|
|
78
|
+
if (edge.objectID && !object) {
|
|
79
79
|
add(
|
|
80
80
|
issues,
|
|
81
81
|
edge.objectPath,
|
|
@@ -132,7 +132,7 @@ function checkRelation(
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
if (relation.inverse
|
|
135
|
+
if (!relation.inverse) return
|
|
136
136
|
|
|
137
137
|
const inverse = index.get(relation.inverse)
|
|
138
138
|
|
|
@@ -188,8 +188,8 @@ function checkRelation(
|
|
|
188
188
|
* Follow `isA` upward from one concept and report the trail if it returns to where it started,
|
|
189
189
|
* leaving the direct self-edge to `checkIsA`'s self-reference report.
|
|
190
190
|
*/
|
|
191
|
-
function findIsACycle(start: ConceptView, concepts: ReadonlyMap<string, ConceptView>): string[] |
|
|
192
|
-
if (start.id
|
|
191
|
+
function findIsACycle(start: ConceptView, concepts: ReadonlyMap<string, ConceptView>): string[] | null {
|
|
192
|
+
if (!start.id) return null
|
|
193
193
|
|
|
194
194
|
const startID = start.id
|
|
195
195
|
const visited = new Set<string>()
|
|
@@ -214,7 +214,7 @@ function findIsACycle(start: ConceptView, concepts: ReadonlyMap<string, ConceptV
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
return
|
|
217
|
+
return null
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
function checkIsA(issues: ValidationIssue[], concept: ConceptView, concepts: ReadonlyMap<string, ConceptView>): void {
|
|
@@ -257,7 +257,7 @@ function checkDerivationInputs(issues: ValidationIssue[], fact: DerivedFactView,
|
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
for (const input of fact.inputs) {
|
|
260
|
-
if (input.kind
|
|
260
|
+
if (!input.kind || !input.id) continue
|
|
261
261
|
|
|
262
262
|
if (input.kind === DerivationInputKind.DerivedFact && input.id === fact.id) {
|
|
263
263
|
add(issues, `${input.path}.id`, ValidationIssueCode.SelfReference, "a derived fact is not one of its own inputs")
|
|
@@ -319,7 +319,7 @@ export function checkReferences(issues: ValidationIssue[], view: DocumentView):
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
for (const mapping of view.mappings) {
|
|
322
|
-
if (mapping.concept
|
|
322
|
+
if (mapping.concept && !concepts.has(mapping.concept)) {
|
|
323
323
|
add(
|
|
324
324
|
issues,
|
|
325
325
|
`${mapping.path}.concept`,
|
|
@@ -330,9 +330,9 @@ export function checkReferences(issues: ValidationIssue[], view: DocumentView):
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
for (const triple of [...view.observations, ...view.derivedFacts]) {
|
|
333
|
-
const subject = triple.subject
|
|
333
|
+
const subject = triple.subject ? concepts.get(triple.subject) : null
|
|
334
334
|
|
|
335
|
-
if (triple.subject
|
|
335
|
+
if (triple.subject && !subject) {
|
|
336
336
|
add(
|
|
337
337
|
issues,
|
|
338
338
|
`${triple.path}.subject`,
|
|
@@ -344,7 +344,7 @@ export function checkReferences(issues: ValidationIssue[], view: DocumentView):
|
|
|
344
344
|
checkEdge(
|
|
345
345
|
issues,
|
|
346
346
|
{
|
|
347
|
-
subjectKind: subject?.kind,
|
|
347
|
+
subjectKind: subject?.kind ?? null,
|
|
348
348
|
subjectPath: `${triple.path}.subject`,
|
|
349
349
|
relationID: triple.relation,
|
|
350
350
|
relationPath: `${triple.path}.relation`,
|
package/out/artifact.js
CHANGED
|
@@ -71,7 +71,7 @@ const ARTIFACT_TABLES = [
|
|
|
71
71
|
"relations",
|
|
72
72
|
];
|
|
73
73
|
/**
|
|
74
|
-
* Returns the reason `value` is not a compiled artifact, or `
|
|
74
|
+
* Returns the reason `value` is not a compiled artifact, or `null` when it is one.
|
|
75
75
|
*/
|
|
76
76
|
function artifactProblem(value) {
|
|
77
77
|
if (!isPlainObject(value))
|
|
@@ -79,12 +79,12 @@ function artifactProblem(value) {
|
|
|
79
79
|
if (value.schemaVersion !== ARTIFACT_SCHEMA_VERSION) {
|
|
80
80
|
return `this reader understands artifact schema version ${ARTIFACT_SCHEMA_VERSION}; the artifact declares ${stringifyJSON(value.schemaVersion)}`;
|
|
81
81
|
}
|
|
82
|
-
if (typeof value.modelVersion !== "string" || !value.modelVersion.trim()
|
|
82
|
+
if (typeof value.modelVersion !== "string" || !value.modelVersion.trim()) {
|
|
83
83
|
return "`modelVersion` must be a non-blank string";
|
|
84
84
|
}
|
|
85
85
|
const missing = ARTIFACT_TABLES.filter((table) => !Array.isArray(value[table]));
|
|
86
86
|
if (!missing.length)
|
|
87
|
-
return
|
|
87
|
+
return null;
|
|
88
88
|
return `the artifact is missing ${missing.map((table) => `\`${table}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AAM;QAAE,OAAO,IAAI,CAAA;IAEhC,OAAO,2BAA2B,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAA;AACtF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAAC,KAAc;IAC1D,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IAEtC,IAAI,OAAO;QAAE,MAAM,IAAI,4BAA4B,CAAC,OAAO,CAAC,CAAA;IAE5D,OAAO,KAAgC,CAAA;AACxC,CAAC"}
|
package/out/compile.js
CHANGED
|
@@ -162,7 +162,7 @@ function deriveInheritedFacts(concepts, closure, relations, issues) {
|
|
|
162
162
|
});
|
|
163
163
|
continue;
|
|
164
164
|
}
|
|
165
|
-
const countries = assertion.countries?.length ? assertion.countries.toSorted(compareIdentifiers) :
|
|
165
|
+
const countries = assertion.countries?.length ? assertion.countries.toSorted(compareIdentifiers) : null;
|
|
166
166
|
const key = draftKey(concept.id, assertion, countries);
|
|
167
167
|
const existing = drafts.get(key);
|
|
168
168
|
const draft = existing ?? { subject: concept.id, assertion, countries, inputs: new Map() };
|
package/out/compile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../lib/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAE1F,OAAO,EAAE,uBAAuB,EAA8D,MAAM,WAAW,CAAA;AAC/G,OAAO,EAIN,mBAAmB,EAKnB,WAAW,EACX,eAAe,GACf,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAA;AACxD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,2BAA2B,CAAA;AAErE;;;;;GA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d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,KAAK,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA"}
|
package/out/index.js
CHANGED
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,OAAO,EAAwB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA"}
|
package/out/load.d.ts
CHANGED
package/out/load.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":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