configDefinition
uses tcmts.cli.config.configValue, which uses node:path
The definition at name, evaluated (once per hash; functions in it are dropped), or undefined if none.
import type { Codebase } from "#codebase/tcmts/cli/codebase"; import { configValue } from "#codebase/tcmts/cli/config"; import type { DefRecord } from "#codebase/tcmts/core/types"; export function configDefinition( cb: Codebase, name: string, ): { value: Record<string, unknown>; hash: string; rec: DefRecord } | undefined { const hash = cb.store.hashesAt(name, "term")[0]; return hash ? { value: configValue(cb, hash, name), hash, rec: cb.store.getDef(hash)! } : undefined; }