@unrdf/project-engine 5.0.1 → 26.4.2
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/package.json +16 -15
- package/src/golden-structure.mjs +2 -2
- package/src/materialize-apply.mjs +2 -2
- package/README.md +0 -53
- package/src/api-contract-validator.mjs +0 -711
- package/src/auto-test-generator.mjs +0 -444
- package/src/autonomic-mapek.mjs +0 -511
- package/src/capabilities-manifest.mjs +0 -125
- package/src/code-complexity-js.mjs +0 -368
- package/src/dependency-graph.mjs +0 -276
- package/src/doc-drift-checker.mjs +0 -172
- package/src/doc-generator.mjs +0 -229
- package/src/domain-infer.mjs +0 -966
- package/src/drift-snapshot.mjs +0 -775
- package/src/file-roles.mjs +0 -94
- package/src/fs-scan.mjs +0 -305
- package/src/gap-finder.mjs +0 -376
- package/src/hotspot-analyzer.mjs +0 -412
- package/src/index.mjs +0 -151
- package/src/initialize.mjs +0 -957
- package/src/lens/project-structure.mjs +0 -74
- package/src/mapek-orchestration.mjs +0 -665
- package/src/materialize-plan.mjs +0 -422
- package/src/materialize.mjs +0 -137
- package/src/policy-derivation.mjs +0 -869
- package/src/project-config.mjs +0 -142
- package/src/project-diff.mjs +0 -28
- package/src/project-engine/build-utils.mjs +0 -237
- package/src/project-engine/code-analyzer.mjs +0 -248
- package/src/project-engine/doc-generator.mjs +0 -407
- package/src/project-engine/infrastructure.mjs +0 -213
- package/src/project-engine/metrics.mjs +0 -146
- package/src/project-model.mjs +0 -111
- package/src/project-report.mjs +0 -348
- package/src/refactoring-guide.mjs +0 -242
- package/src/stack-detect.mjs +0 -102
- package/src/stack-linter.mjs +0 -213
- package/src/template-infer.mjs +0 -674
- package/src/type-auditor.mjs +0 -609
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Project structure lens - map low-level triple changes to semantic changes
|
|
3
|
-
* @module project-engine/lens/project-structure
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Ontology lens for project structure diff
|
|
8
|
-
* Maps triple changes to project-level semantic changes
|
|
9
|
-
*
|
|
10
|
-
* Used with diffOntologyFromDelta to convert:
|
|
11
|
-
* - Triple additions/removals → FeatureAdded/FeatureRemoved, RoleAdded/RoleRemoved
|
|
12
|
-
*
|
|
13
|
-
* @type {OntologyLensFn}
|
|
14
|
-
*/
|
|
15
|
-
export function ProjectStructureLens(triple, direction) {
|
|
16
|
-
const { subject, predicate, object } = triple;
|
|
17
|
-
|
|
18
|
-
// Rule 1: Feature type assertions
|
|
19
|
-
if (
|
|
20
|
-
predicate === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' &&
|
|
21
|
-
object === 'http://example.org/unrdf/project#Feature'
|
|
22
|
-
) {
|
|
23
|
-
return {
|
|
24
|
-
kind: direction === 'added' ? 'FeatureAdded' : 'FeatureRemoved',
|
|
25
|
-
entity: subject,
|
|
26
|
-
details: { resourceType: 'Feature' },
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Rule 2: File role assignments
|
|
31
|
-
if (predicate === 'http://example.org/unrdf/project#hasRole') {
|
|
32
|
-
return {
|
|
33
|
-
kind: direction === 'added' ? 'RoleAdded' : 'RoleRemoved',
|
|
34
|
-
entity: subject,
|
|
35
|
-
role: object,
|
|
36
|
-
details: { roleType: extractRoleName(object) },
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Rule 3: File feature membership
|
|
41
|
-
if (predicate === 'http://example.org/unrdf/project#belongsToFeature') {
|
|
42
|
-
return {
|
|
43
|
-
kind: direction === 'added' ? 'FeatureMemberAdded' : 'FeatureMemberRemoved',
|
|
44
|
-
entity: subject,
|
|
45
|
-
role: 'belongsToFeature',
|
|
46
|
-
details: { feature: object },
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Rule 4: Module changes
|
|
51
|
-
if (
|
|
52
|
-
predicate === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' &&
|
|
53
|
-
object === 'http://example.org/unrdf/project#Module'
|
|
54
|
-
) {
|
|
55
|
-
return {
|
|
56
|
-
kind: direction === 'added' ? 'ModuleAdded' : 'ModuleRemoved',
|
|
57
|
-
entity: subject,
|
|
58
|
-
details: { resourceType: 'Module' },
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Ignore other triples
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Extract role name from IRI
|
|
68
|
-
*
|
|
69
|
-
* @private
|
|
70
|
-
*/
|
|
71
|
-
function extractRoleName(iri) {
|
|
72
|
-
const match = iri.match(/#([A-Za-z]+)$/);
|
|
73
|
-
return match ? match[1] : iri;
|
|
74
|
-
}
|