app/routes/publications[.bib].ts
16 lines and 2 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.
Functions
| Function | Lines | Complexity | Covered | CRAP | Mutation |
|---|---|---|---|---|---|
| loader | 12 to 17 | 1 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
| <anonymous:13> | 13 to 13 | 1 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
Imports
It imports app/db/publications.ts, app/lib/context.ts, app/lib/publications/export-response.mjs, app/lib/publications/exports.mjs, app/lib/seo.ts. No module of this repo imports it.
Source
import { listPublishedPublications } from "~/db/publications";
import { getEnv } from "~/lib/context";
import { toBibtexAll } from "~/lib/publications/exports.mjs";
import { SHARED_CACHE_CONTROL } from "~/lib/seo";
import { exportHeaders, SHOWCASE_TYPES } from "~/lib/publications/export-response.mjs";
import type { Route } from "./+types/publications[.bib]";
/**
* The showcase filter applies: an abstract beside its paper double-counts a work. No
* `Content-Disposition: attachment`: people read citation files as often as they save them.
*/
export async function loader({ context }: Route.LoaderArgs) {
const papers = (await listPublishedPublications(getEnv(context))).filter((p) => SHOWCASE_TYPES.has(p.type));
return new Response(toBibtexAll(papers), {
headers: exportHeaders("application/x-bibtex", SHARED_CACHE_CONTROL, "publications.bib"),
});
}