PronounsPage/server/stats.ts
Valentyne Stigloher 10180aa6a3 (refactor) use #shared alias instead of ~~/shared
the #shared alias used by Nuxt cannot be easily disabled and to prevent breackage with jiti, we make use of it
2025-08-17 18:56:02 +02:00

21 lines
567 B
TypeScript

import './setup.ts';
import util from 'util';
import dbConnection from './db.ts';
import buildLocaleList from '#shared/buildLocaleList.ts';
import { calculateStats } from '~~/server/buildStats.ts';
const __dirname = new URL('.', import.meta.url).pathname;
async function calculate(): Promise<void> {
const db = await dbConnection();
const stats = await calculateStats(db, buildLocaleList(null, true), `${__dirname}/..`);
await db.close();
console.log(util.inspect(stats, { showHidden: false, depth: null, colors: true }));
}
await calculate();