@sdd-method/verify-cli 5.1.0 → 5.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.
|
@@ -721,7 +721,7 @@ enums:
|
|
|
721
721
|
- value: zero-or-one
|
|
722
722
|
- value: one-or-more
|
|
723
723
|
- value: zero-or-more
|
|
724
|
-
description: "How many entities one end of a relationship holds for one entity at the other end (M-ADR 0230 §4.3): a Mermaid ER end marker (|| exactly one, |o or o| zero or one, }| or |{ one or more, }o or o{ zero or more). A TypeQL relationship is
|
|
724
|
+
description: "How many entities one end of a relationship holds for one entity at the other end (M-ADR 0230 §4.3): a Mermaid ER end marker (|| exactly one, |o or o| zero or one, }| or |{ one or more, }o or o{ zero or more). A TypeQL relationship's end is the other player's participation: B plays R:b @card(1..1) makes A's end exactly-one, @card(0..1) zero-or-one, and an unannotated plays zero-or-more; a role's @card is a cardinality invariant (domain_invariants). Replaced entity_relationship_cardinality in schema 6.0.0."
|
|
725
725
|
domain_invariant_kind:
|
|
726
726
|
values:
|
|
727
727
|
- value: unique
|
|
@@ -175,11 +175,10 @@ export function parseTypes(text, fileLabel = "catalogue-schema.tql", options = {
|
|
|
175
175
|
if (decl.plays.has(w[1]))
|
|
176
176
|
throw new ParseError(`${where}: ${lab} plays ${w[1]} twice`);
|
|
177
177
|
const ann = parseAnnotations(w.slice(2), where);
|
|
178
|
-
// A plays clause's cardinality constrains participation,
|
|
179
|
-
//
|
|
180
|
-
if (ann.key
|
|
181
|
-
throw new ParseError(`${where}: ${lab} plays ${w[1]}
|
|
182
|
-
}
|
|
178
|
+
// A plays clause's cardinality constrains participation, and is kept: a reader that can hold it does, and a
|
|
179
|
+
// projection that cannot refuses it there (schema-projection), never here, so no reader drops it silently.
|
|
180
|
+
if (ann.key)
|
|
181
|
+
throw new ParseError(`${where}: ${lab} plays ${w[1]} @key; a role is not a key`);
|
|
183
182
|
decl.plays.set(w[1], ann);
|
|
184
183
|
}
|
|
185
184
|
else if (head === "relates") {
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
// a source-built row with a change_id that change
|
|
9
9
|
// a contract row the change whose record agrees its file as new
|
|
10
10
|
// a row naming such a contract that change
|
|
11
|
+
// a row built from the change's files that change (its spec_path lies in openspec/changes/<change>/, as a
|
|
12
|
+
// requirement the change ADDS does)
|
|
11
13
|
// Pure but for reading agreement records.
|
|
12
14
|
import { readdir, readFile } from "node:fs/promises";
|
|
13
15
|
import { join } from "node:path";
|
|
@@ -125,7 +127,7 @@ export class Additions {
|
|
|
125
127
|
out.add(k.slice(CONTRACTS.length + 1));
|
|
126
128
|
return out;
|
|
127
129
|
}
|
|
128
|
-
/** The open changes a source-built row belongs to: its change_id, or a new contract it is or names. */
|
|
130
|
+
/** The open changes a source-built row belongs to: its change_id, the change whose files it is built from, or a new contract it is or names. */
|
|
129
131
|
ownersOf(schema, catalogue, row, sddId) {
|
|
130
132
|
const out = new Set();
|
|
131
133
|
const changeId = cell(row["change_id"]);
|
|
@@ -134,6 +136,9 @@ export class Additions {
|
|
|
134
136
|
if (this.open.has(name))
|
|
135
137
|
out.add(name);
|
|
136
138
|
}
|
|
139
|
+
const from = /^openspec\/changes\/([^/]+)\//.exec(cell(row["spec_path"]))?.[1];
|
|
140
|
+
if (from !== undefined && this.open.has(from))
|
|
141
|
+
out.add(from);
|
|
137
142
|
const contractOwner = (id) => {
|
|
138
143
|
const by = this.adder.get(elementKey(CONTRACTS, id));
|
|
139
144
|
if (by !== undefined)
|
package/dist/verify-version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdd-method/verify-cli",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"sddCliVersion": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
|
+
"sddCliVersion": "5.2.0",
|
|
5
5
|
"description": "Verify an SDD repository without changing it — validate, list, and read-only catalogue and pack checks. Ships only the code those verbs reach; it cannot write to the repository it is pointed at. Authoring and maintenance are in @sdd-method/sdd-cli.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|