build: verify resolved module boundaries (#862)

This commit is contained in:
N0zoM1z0
2026-10-07 13:02:28 +08:00
committed by GitHub
parent 3b92a2bced
commit 3427593daf
10 changed files with 365 additions and 141 deletions
+18
View File
@@ -0,0 +1,18 @@
/** One dependency crossing a settled source ownership boundary. */
export interface ModuleBoundaryViolation {
readonly file: string;
readonly line: number;
readonly specifier: string;
readonly target: string;
readonly boundary:
| "pure-layer"
| "application-composition"
| "provider-construction";
}
/** Check resolved source ownership, including type imports and reexports. */
export function inspectModuleBoundaries(
file: string,
source: string,
root: string,
): readonly ModuleBoundaryViolation[];