@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/bin.cjs
CHANGED
|
@@ -5571,6 +5571,24 @@ Code: ${v.code}`;
|
|
|
5571
5571
|
}
|
|
5572
5572
|
});
|
|
5573
5573
|
}
|
|
5574
|
+
if (target.targetLayer === "domain" && !target.isTargetPort) {
|
|
5575
|
+
addViolation({
|
|
5576
|
+
feature: feat.name,
|
|
5577
|
+
layer,
|
|
5578
|
+
file,
|
|
5579
|
+
relativePath: relPath,
|
|
5580
|
+
line: stmt.line,
|
|
5581
|
+
category: "Cross-Feature Domain Violation",
|
|
5582
|
+
code: stmt.rawCode,
|
|
5583
|
+
ruleId: "F1_CROSS_FEATURE_DOMAIN",
|
|
5584
|
+
severity: "error",
|
|
5585
|
+
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.`,
|
|
5586
|
+
fixExample: {
|
|
5587
|
+
bad: stmt.rawCode,
|
|
5588
|
+
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).`
|
|
5589
|
+
}
|
|
5590
|
+
});
|
|
5591
|
+
}
|
|
5574
5592
|
}
|
|
5575
5593
|
if (layer === "domain") {
|
|
5576
5594
|
if (target.targetLayer && ["useCases", "services", "infrastructure", "presentation"].includes(target.targetLayer)) {
|
|
@@ -5937,6 +5955,24 @@ Code: ${v.code}`;
|
|
|
5937
5955
|
}
|
|
5938
5956
|
});
|
|
5939
5957
|
}
|
|
5958
|
+
if (target.targetLayer === "domain" && !target.isTargetPort && !target.isTargetRepo) {
|
|
5959
|
+
addViolation({
|
|
5960
|
+
feature: feat.name,
|
|
5961
|
+
layer,
|
|
5962
|
+
file,
|
|
5963
|
+
relativePath: relPath,
|
|
5964
|
+
line: stmt.line,
|
|
5965
|
+
category: "Presentation Layer Violation",
|
|
5966
|
+
code: stmt.rawCode,
|
|
5967
|
+
ruleId: "P5_DIRECT_DOMAIN_ENTITY",
|
|
5968
|
+
severity: "error",
|
|
5969
|
+
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.",
|
|
5970
|
+
fixExample: {
|
|
5971
|
+
bad: stmt.rawCode,
|
|
5972
|
+
good: "// Construct a DTO and pass it into the injected Use Case's execute() method."
|
|
5973
|
+
}
|
|
5974
|
+
});
|
|
5975
|
+
}
|
|
5940
5976
|
}
|
|
5941
5977
|
}
|
|
5942
5978
|
}
|