mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: ♻️ Don't use Bun global
This commit is contained in:
parent
d55668d529
commit
25ea870f71
15 changed files with 32 additions and 19 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { getLogger } from "@logtape/logtape";
|
||||
import { SHA256 } from "bun";
|
||||
import chalk from "chalk";
|
||||
import { createMiddleware } from "hono/factory";
|
||||
import { config } from "~/config.ts";
|
||||
|
|
@ -11,7 +12,7 @@ export const logger = createMiddleware(async (context, next) => {
|
|||
const urlAndMethod = `${chalk.green(context.req.method)} ${chalk.blue(context.req.url)}`;
|
||||
|
||||
const hash = `${chalk.bold("Hash")}: ${chalk.yellow(
|
||||
new Bun.SHA256().update(body).digest("hex"),
|
||||
new SHA256().update(body).digest("hex"),
|
||||
)}`;
|
||||
|
||||
const headers = `${chalk.bold("Headers")}:\n${Array.from(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue