Skip to content

Commit

Permalink
fix(deps): update dependency hono to v4 [security] (#216)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: MikuroXina <[email protected]>
  • Loading branch information
renovate[bot] and MikuroXina authored Oct 6, 2024
1 parent fc88484 commit a5aa396
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@mikuroxina/mini-fn": "^6.0.0",
"@tsndr/cloudflare-worker-jwt": "^2.3.2",
"hono": "^3.11.7",
"hono": "^4.0.0",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/@types/cloudflare.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "__STATIC_CONTENT_MANIFEST" {
const manifest: object;
export = manifest;
}
1 change: 1 addition & 0 deletions src/components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { html } from "hono/html";
import type { JSX } from "hono/jsx/jsx-runtime";

export type LayoutProps = {
title: string;
Expand Down
5 changes: 3 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import manifest from "__STATIC_CONTENT_MANIFEST";
import { Result } from "@mikuroxina/mini-fn";
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
Expand Down Expand Up @@ -25,8 +26,8 @@ type Variables = {

const app = new Hono<{ Bindings: Bindings; Variables: Variables }>();

app.get("/favicon.ico", serveStatic({ path: "./favicon.ico" }));
app.use("/static/*", serveStatic({ root: "./" }));
app.get("/favicon.ico", serveStatic({ path: "./favicon.ico", manifest }));
app.use("/static/*", serveStatic({ root: "./", manifest }));
app.get("/", (c) => c.html(<Index requestUrl={c.req.url} />));
app.get("/done", (c) => c.html(<Done />));
app.get("/error", (c) => {
Expand Down
4 changes: 3 additions & 1 deletion src/pages/done.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { JSX } from "hono/jsx/jsx-runtime";

import { Layout } from "../components/layout";

export const Done = () => (
export const Done = (): JSX.Element => (
<Layout title="Approvers メンバー情報登録 - 登録完了">
<h1>登録完了</h1>
<p>登録できました. このタブは閉じてもらって構いません.</p>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/error.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { JSX } from "hono/jsx/jsx-runtime";

import { Layout } from "../components/layout";
import type { AppError } from "../models";

Expand Down
2 changes: 2 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { JSX } from "hono/jsx/jsx-runtime";

import { Layout } from "../components/layout";

export const Index = ({ requestUrl }: { requestUrl: string }): JSX.Element => {
Expand Down

0 comments on commit a5aa396

Please sign in to comment.