shownCodebases

tcmts.registry.shownCodebases · #pp7bxwcw · term · runs on the server

uses tcmts.registry.codebases, which uses tcmts.server.table, which uses tcmts.server.Table, which uses #tcm/host (database)

The codebases the registry shows: listings that checked against their authors' repositories, newest first.

import { codebases } from "#codebase/tcmts/registry";
import type { RegistryCodebase } from "#codebase/tcmts/registry";

export async function shownCodebases(): Promise<RegistryCodebase[]> {
  return (await codebases.find({ state: "verified" }))
    .map((c) => c.value)
    .sort(
      (a, b) => Date.parse(b.createdAt) - Date.parse(a.createdAt) || a.uri.localeCompare(b.uri),
    );
}

uses

used by