chore: bump std to 208 and deal with deprecations (#2081)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
co-authored by
Marvin Hagemeister
parent
6a90fdbf1b
commit
b902205feb
@@ -22,11 +22,11 @@ import * as router from "./router.ts";
|
||||
import DefaultErrorHandler from "./default_error_page.tsx";
|
||||
import {
|
||||
basename,
|
||||
contentType,
|
||||
dirname,
|
||||
extname,
|
||||
join,
|
||||
toFileUrl,
|
||||
typeByExtension,
|
||||
walk,
|
||||
} from "./deps.ts";
|
||||
import { BUILD_ID } from "./build_id.ts";
|
||||
@@ -316,7 +316,7 @@ export async function extractRoutes(
|
||||
const localUrl = toFileUrl(entry.path);
|
||||
const path = localUrl.href.substring(staticDirUrl.href.length);
|
||||
const stat = await Deno.stat(localUrl);
|
||||
const contentType = typeByExtension(extname(path)) ??
|
||||
const type = contentType(extname(path)) ??
|
||||
"application/octet-stream";
|
||||
const etag = await crypto.subtle.digest(
|
||||
"SHA-1",
|
||||
@@ -330,7 +330,7 @@ export async function extractRoutes(
|
||||
localUrl,
|
||||
path,
|
||||
size: stat.size,
|
||||
contentType,
|
||||
contentType: type,
|
||||
etag,
|
||||
};
|
||||
staticFiles.push(staticFile);
|
||||
|
||||
Reference in New Issue
Block a user