Something went wrong. Try again.
A collaborative coding-agent orchestrator for atproto radl.app
Something went wrong. Try again.
JavaScript
1234567891011121314151617181920212223import { readdir, readFile } from 'node:fs/promises'import { stripTypeScriptTypes } from 'node:module'import { dirname, extname, join, resolve } from 'node:path'import { fileURLToPath } from 'node:url'
const here = dirname(fileURLToPath(import.meta.url))const sourceRoot = resolve(here, '../src')
async function filesUnder(directory) { const entries = await readdir(directory, { withFileTypes: true }) const files = [] for (const entry of entries) { const path = join(directory, entry.name) if (entry.isDirectory()) files.push(...(await filesUnder(path))) else if (extname(path) === '.ts') files.push(path) } return files}
for (const file of await filesUnder(sourceRoot)) { stripTypeScriptTypes(await readFile(file, 'utf8'), { mode: 'transform' })}