feat(sdk): define single-game public contracts
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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'),
|
||||
});
|
||||
|
||||
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');
|
||||
}
|
||||
Reference in New Issue
Block a user