chore: typecheck and build clean

This commit is contained in:
Jonathan 2026-04-18 22:54:25 +02:00
parent 7f02600c05
commit 82861ca4d2
2 changed files with 7 additions and 4 deletions

View file

@ -9,7 +9,9 @@
"Bash(export PATH=\"$HOME/.nvm/versions/node/v22.22.2/bin:$HOME/.local/share/pnpm:$PATH\")", "Bash(export PATH=\"$HOME/.nvm/versions/node/v22.22.2/bin:$HOME/.local/share/pnpm:$PATH\")",
"Bash(pnpm install *)", "Bash(pnpm install *)",
"Bash(node scripts/migrate.js)", "Bash(node scripts/migrate.js)",
"Bash(node scripts/seed.js)" "Bash(node scripts/seed.js)",
"Bash(pnpm typecheck *)",
"Bash(pnpm build *)"
] ]
} }
} }

View file

@ -1,15 +1,16 @@
import type { APIRoute } from 'astro'; import type { APIRoute } from 'astro';
import { getCollection } from 'astro:content'; import { getCollection, type CollectionEntry } from 'astro:content';
export const GET: APIRoute = async ({ site }) => { export const GET: APIRoute = async ({ site }) => {
const updates = await getCollection('updates'); const updates = await getCollection('updates');
const sorted = updates.sort( const sorted = updates.sort(
(a, b) => new Date(b.data.date).getTime() - new Date(a.data.date).getTime() (a: CollectionEntry<'updates'>, b: CollectionEntry<'updates'>) =>
new Date(b.data.date).getTime() - new Date(a.data.date).getTime()
); );
const base = 'https://bifrost.fenja.ai'; const base = 'https://bifrost.fenja.ai';
const items = sorted.map((u) => { const items = sorted.map((u: CollectionEntry<'updates'>) => {
const url = `${base}/updates/${u.slug}`; const url = `${base}/updates/${u.slug}`;
const date = new Date(u.data.date).toUTCString(); const date = new Date(u.data.date).toUTCString();
return ` return `