alchemy 0.29.3 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,34 +2,35 @@ import path from "node:path";
2
2
 
3
3
  // Common MIME types
4
4
  const mimeTypes: Record<string, string> = {
5
- ".html": "text/html",
6
- ".htm": "text/html",
7
5
  ".css": "text/css",
6
+ ".eot": "application/vnd.ms-fontobject",
7
+ ".gif": "image/gif",
8
+ ".htm": "text/html",
9
+ ".html": "text/html",
10
+ ".ico": "image/x-icon",
11
+ ".jpeg": "image/jpeg",
12
+ ".jpg": "image/jpeg",
13
+ ".js.map": "application/source-map",
8
14
  ".js": "application/javascript",
9
- ".mjs": "application/javascript+module",
10
15
  ".json": "application/json",
11
- ".xml": "application/xml",
12
- ".txt": "text/plain",
13
16
  ".md": "text/markdown",
17
+ ".mjs": "application/javascript+module",
18
+ ".mp3": "audio/mpeg",
19
+ ".mp4": "video/mp4",
20
+ ".otf": "font/otf",
21
+ ".pdf": "application/pdf",
14
22
  ".png": "image/png",
15
- ".jpg": "image/jpeg",
16
- ".jpeg": "image/jpeg",
17
- ".gif": "image/gif",
18
- ".webp": "image/webp",
19
23
  ".svg": "image/svg+xml",
20
- ".ico": "image/x-icon",
21
- ".pdf": "application/pdf",
22
- ".zip": "application/zip",
23
- ".woff": "font/woff",
24
- ".woff2": "font/woff2",
25
24
  ".ttf": "font/ttf",
26
- ".otf": "font/otf",
27
- ".eot": "application/vnd.ms-fontobject",
28
- ".mp4": "video/mp4",
29
- ".webm": "video/webm",
30
- ".mp3": "audio/mpeg",
31
- ".wav": "audio/wav",
25
+ ".txt": "text/plain",
32
26
  ".wasm": "application/wasm",
27
+ ".wav": "audio/wav",
28
+ ".webm": "video/webm",
29
+ ".webp": "image/webp",
30
+ ".woff": "font/woff",
31
+ ".woff2": "font/woff2",
32
+ ".xml": "application/xml",
33
+ ".zip": "application/zip",
33
34
  };
34
35
 
35
36
  /**
@@ -39,5 +40,8 @@ const mimeTypes: Record<string, string> = {
39
40
  * @returns The content type for the file
40
41
  */
41
42
  export function getContentType(filePath: string): string | undefined {
43
+ if (filePath.endsWith(".js.map")) {
44
+ return mimeTypes[".js.map"];
45
+ }
42
46
  return mimeTypes[path.extname(filePath).toLowerCase()];
43
47
  }