assetFormat
uses node:path
A file's format as a file of the codebase: its extension (any, in a directory marked as holding files; none for
Dockerfile), after a dot for a hidden file (.gitignore is ".", .mcp.json ".json").
import path from "node:path"; export const assetFormat = (file: string): string => `${path.basename(file).startsWith(".") ? "." : ""}${path.extname(path.basename(file).replace(/^\./, "")).slice(1).toLowerCase()}`