@miadi/relational-git-repository-mapper 0.6.2 → 0.6.3
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/dist/read.js +8 -7
- package/package.json +3 -3
package/dist/read.js
CHANGED
|
@@ -119,12 +119,14 @@ function readCapabilities(path = process.env.MIADI_REPOSITORY_CAPABILITIES?.trim
|
|
|
119
119
|
issues.push({ severity: "error", file: source, line: index + 1, message: parsed.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ") });
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
// One row per capability and provider: two repositories with one id (a fork and its upstream) each keep their own words.
|
|
123
|
+
const key = `${parsed.data.nodeId}|${parsed.data.providedBy.map((p) => p.toLowerCase()).sort().join(",")}`;
|
|
124
|
+
const earlier = seen.get(key);
|
|
123
125
|
if (earlier) {
|
|
124
|
-
issues.push({ severity: "warning", file: source, nodeId: parsed.data.nodeId, message: `${parsed.data.nodeId} is already read from ${earlier}; skipped` });
|
|
126
|
+
issues.push({ severity: "warning", file: source, nodeId: parsed.data.nodeId, message: `${parsed.data.nodeId} of ${parsed.data.providedBy.join(", ")} is already read from ${earlier}; skipped` });
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
|
-
seen.set(
|
|
129
|
+
seen.set(key, source);
|
|
128
130
|
capabilities.push(parsed.data);
|
|
129
131
|
});
|
|
130
132
|
}
|
|
@@ -161,10 +163,9 @@ function findCapability(parts, options = {}) {
|
|
|
161
163
|
if (!provider)
|
|
162
164
|
continue;
|
|
163
165
|
// The provider's own reading: a fork, or another repository with a package of the same name, never speaks for it.
|
|
164
|
-
const { packages
|
|
165
|
-
const own =
|
|
166
|
-
const
|
|
167
|
-
const impact = kind === "package" && own ? (0, impact_1.impactOf)(c.name, packages) : undefined;
|
|
166
|
+
const { packages } = readPackages();
|
|
167
|
+
const own = packages.find((p) => p.name === c.name && p.repository.toLowerCase() === repository);
|
|
168
|
+
const impact = kind === "package" && own ? (0, impact_1.impactOf)(c.name, packages, undefined, { repository: own.repository }) : undefined;
|
|
168
169
|
const related = [];
|
|
169
170
|
const version = (v) => (v ? { version: v } : {});
|
|
170
171
|
if (impact) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miadi/relational-git-repository-mapper",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "A git repository as Miadi sees it (git, never a database Repository or Data Mapper): the rows its owner hub holds (@medicine-wheel/developer-repository-mapping) beside the agent sessions that worked in it (the witness team's session inventory), joined by owner/name; which git repository learned from which (a lineage, never a dependency); what each provides, its packages, CLIs and skills as capability nodes; where each lives; and what a version bump touches downstream.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Miadi",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"README.md"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@medicine-wheel/capabilities": "^0.27.
|
|
32
|
-
"@medicine-wheel/developer-repository-mapping": "^0.27.
|
|
31
|
+
"@medicine-wheel/capabilities": "^0.27.12",
|
|
32
|
+
"@medicine-wheel/developer-repository-mapping": "^0.27.12",
|
|
33
33
|
"@miadi/hooks-interpreter": "^0.11.0",
|
|
34
34
|
"zod": "^3.23.0"
|
|
35
35
|
},
|