20 lines
691 B
JavaScript
20 lines
691 B
JavaScript
import { resolve } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
import { scanImportBoundaries } from './lib/import-boundaries.mjs';
|
|
|
|
const projectDir = resolve(fileURLToPath(new URL('..', import.meta.url)));
|
|
const violations = scanImportBoundaries({
|
|
frameworkDir: resolve(projectDir, 'YouleNexus/assets/framework'),
|
|
gamesDir: resolve(projectDir, 'games'),
|
|
tsconfigPath: resolve(projectDir, 'tsconfig.framework.json'),
|
|
});
|
|
|
|
if (violations.length > 0) {
|
|
for (const { file, specifier, message } of violations) {
|
|
console.error(`[import-boundaries] ${file}: ${specifier} — ${message}`);
|
|
}
|
|
process.exitCode = 1;
|
|
} else {
|
|
console.log('[import-boundaries] OK');
|
|
}
|