mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 08:52:21 +00:00
- Enhanced AGENTS.md with clearer project structure and development commands. - Updated CHANGELOG.md to reflect recent fixes and additions. - Improved formatting in CONTRIBUTING.md for better readability. - Adjusted package.json and configuration files for consistent command structure. - Refined README.md and VISION.md for clarity and organization. - Standardized code formatting in various TypeScript files for consistency. These changes aim to enhance documentation clarity and maintainability across the repository.
18 lines
519 B
TypeScript
18 lines
519 B
TypeScript
const EXT_TO_TYPE: Record<string, string> = {
|
|
md: "text/markdown",
|
|
mdx: "text/markdown",
|
|
json: "application/json",
|
|
json5: "application/json",
|
|
yaml: "application/yaml",
|
|
yml: "application/yaml",
|
|
toml: "application/toml",
|
|
svg: "image/svg+xml",
|
|
};
|
|
|
|
export function guessContentTypeForPath(path: string) {
|
|
const trimmed = path.trim().toLowerCase();
|
|
if (!trimmed) return "application/octet-stream";
|
|
const ext = trimmed.split(".").at(-1) ?? "";
|
|
return EXT_TO_TYPE[ext] ?? "application/octet-stream";
|
|
}
|