@solid-stack/mason 1.0.29 → 1.0.30
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/bin.cjs +36 -0
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +36 -0
- package/dist/bin.js.map +1 -1
- package/dist/core/lintEngine.d.ts.map +1 -1
- package/dist/index.cjs +36 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/dist/types/lint.d.ts +1 -1
- package/dist/types/lint.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5551,6 +5551,24 @@ Code: ${v.code}`;
|
|
|
5551
5551
|
}
|
|
5552
5552
|
});
|
|
5553
5553
|
}
|
|
5554
|
+
if (target.targetLayer === "domain" && !target.isTargetPort) {
|
|
5555
|
+
addViolation({
|
|
5556
|
+
feature: feat.name,
|
|
5557
|
+
layer,
|
|
5558
|
+
file,
|
|
5559
|
+
relativePath: relPath,
|
|
5560
|
+
line: stmt.line,
|
|
5561
|
+
category: "Cross-Feature Domain Violation",
|
|
5562
|
+
code: stmt.rawCode,
|
|
5563
|
+
ruleId: "F1_CROSS_FEATURE_DOMAIN",
|
|
5564
|
+
severity: "error",
|
|
5565
|
+
advice: `Cannot import domain entities/factories directly from foreign feature '${target.targetFeature}'. This bypasses its use cases and breaks Bounded Context encapsulation. Communicate via ports instead.`,
|
|
5566
|
+
fixExample: {
|
|
5567
|
+
bad: stmt.rawCode,
|
|
5568
|
+
good: `// Define a Port in ${feat.name}/domain/ and implement the cross-feature communication in ${feat.name}/infrastructure/ (which can then call ${target.targetFeature}'s Use Case).`
|
|
5569
|
+
}
|
|
5570
|
+
});
|
|
5571
|
+
}
|
|
5554
5572
|
}
|
|
5555
5573
|
if (layer === "domain") {
|
|
5556
5574
|
if (target.targetLayer && ["useCases", "services", "infrastructure", "presentation"].includes(target.targetLayer)) {
|
|
@@ -5917,6 +5935,24 @@ Code: ${v.code}`;
|
|
|
5917
5935
|
}
|
|
5918
5936
|
});
|
|
5919
5937
|
}
|
|
5938
|
+
if (target.targetLayer === "domain" && !target.isTargetPort && !target.isTargetRepo) {
|
|
5939
|
+
addViolation({
|
|
5940
|
+
feature: feat.name,
|
|
5941
|
+
layer,
|
|
5942
|
+
file,
|
|
5943
|
+
relativePath: relPath,
|
|
5944
|
+
line: stmt.line,
|
|
5945
|
+
category: "Presentation Layer Violation",
|
|
5946
|
+
code: stmt.rawCode,
|
|
5947
|
+
ruleId: "P5_DIRECT_DOMAIN_ENTITY",
|
|
5948
|
+
severity: "error",
|
|
5949
|
+
advice: "Presentation handlers must not directly instantiate or import domain entities/factories. They must map requests to flat DTOs and pass them to the Use Case.",
|
|
5950
|
+
fixExample: {
|
|
5951
|
+
bad: stmt.rawCode,
|
|
5952
|
+
good: "// Construct a DTO and pass it into the injected Use Case's execute() method."
|
|
5953
|
+
}
|
|
5954
|
+
});
|
|
5955
|
+
}
|
|
5920
5956
|
}
|
|
5921
5957
|
}
|
|
5922
5958
|
}
|