ownNames

tcmts.hub.ownNames · #el7yfb4h · term · runs anywhere

A mirrored release's own names, as its library page lists them: everything mounted at mount, files kept with its code included (its README), but not the libraries it holds, nor their record.

import type { Codebase } from "#codebase/tcmts/cli/codebase";
import type { NameRow } from "#codebase/tcmts/store";

export function ownNames(cb: Codebase, mount: string): NameRow[] {
  return cb.store
    .names(undefined, true)
    .filter((n) => n.path.startsWith(`${mount}.`))
    .filter((n) => {
      const rel = n.path.slice(mount.length + 1);
      return !rel.startsWith("lib.") && rel !== "libraries";
    });
}

uses

used by