Skip to the content

Capsid menu

app/routes/publications[.ris].ts

13 lines and 2 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.

Functions

The functions of publications[.ris].ts
FunctionLinesComplexityCoveredCRAPMutation
loader9 to 141No data: no coverage report in this mapNo data: no coverage report in this mapNo data: no mutants in this code
<anonymous:10>10 to 101No data: no coverage report in this mapNo data: no coverage report in this mapNo 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 { exportHeaders, SHOWCASE_TYPES } from "~/lib/publications/export-response.mjs";
import { toRisAll } from "~/lib/publications/exports.mjs";
import { SHARED_CACHE_CONTROL } from "~/lib/seo";
import type { Route } from "./+types/publications[.ris]";

/** The type EndNote, Zotero and Mendeley register against; `text/plain` would render and import nowhere. */
export async function loader({ context }: Route.LoaderArgs) {
  const papers = (await listPublishedPublications(getEnv(context))).filter((p) => SHOWCASE_TYPES.has(p.type));
  return new Response(toRisAll(papers), {
    headers: exportHeaders("application/x-research-info-systems", SHARED_CACHE_CONTROL, "publications.ris"),
  });
}