mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 18:34:02 +00:00
Extract instance-owned civil-flight components
This commit is contained in:
1 parent
cf149ecfc0
commit
7c7e83c9e3
33 files changed
+6190
-5284
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { readFileSync, readdirSync } from 'node:fs';
|
||||
import { dirname, join, basename } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
/** Read actual component owners for structural regression assertions. */
|
||||
export function readLayerSource(file) {
|
||||
const path = file instanceof URL ? fileURLToPath(file) : file;
|
||||
if (basename(path) !== 'flights.js') return readFileSync(path, 'utf8');
|
||||
const directory = join(dirname(path), '../layers/flights');
|
||||
return readdirSync(directory).filter((name) => name.endsWith('.js'))
|
||||
.sort().map((name) => readFileSync(join(directory, name), 'utf8')).join('\n');
|
||||
}
|
||||
Reference in new issue
Block a user