mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-27 15:05:38 -04:00

the #shared alias used by Nuxt cannot be easily disabled and to prevent breackage with jiti, we make use of it
21 lines
567 B
TypeScript
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();
|