mountedRows

tcmts.cli.libraries.mountedRows · #k6mm5b2y · term · runs anywhere

A library's names as they're mounted now, named as in the library itself (area, not app.lib.geo.area).

import { namesNow } from "#codebase/tcmts/cli/libraries";
import type { Library } from "#codebase/tcmts/cli/libraries";
import type { NameRow, Store } from "#codebase/tcmts/store";

export function mountedRows(store: Store, lib: Library): NameRow[] {
  return namesNow(store)
    .filter((n) => n.path.startsWith(`${lib.path}.`))
    .map((n) => ({ ...n, path: n.path.slice(lib.path.length + 1) }));
}

uses

used by