diff --git a/.changeset/eleven-pigs-develop.md b/.changeset/eleven-pigs-develop.md new file mode 100644 index 00000000..d682cc6a --- /dev/null +++ b/.changeset/eleven-pigs-develop.md @@ -0,0 +1,5 @@ +--- +"frog": patch +--- + +Bumped `hono` and related packages versions. diff --git a/package.json b/package.json index 51d352a9..72f7cc40 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "bun": "^1.0.28", "fast-glob": "^3.3.2", "fs-extra": "^11.2.0", - "hono": "^4", + "hono": "^4.4.4", "picocolors": "^1.0.0", "rimraf": "^5.0.5", "tsx": "^4.7.1", @@ -51,7 +51,7 @@ "packageManager": "pnpm@8.15.3", "pnpm": { "overrides": { - "hono": "4.1.0", + "hono": "4.4.4", "typescript": "5.3.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11488eb4..12abc575 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,7 +5,7 @@ settings: excludeLinksFromLockfile: false overrides: - hono: 4.1.0 + hono: 4.4.4 typescript: 5.3.3 importers: @@ -58,8 +58,8 @@ importers: specifier: ^11.2.0 version: 11.2.0 hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 picocolors: specifier: ^1.0.0 version: 1.0.0 @@ -106,8 +106,8 @@ importers: specifier: workspace:* version: link:../src hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 devDependencies: tsx: specifier: ^4.7.1 @@ -131,8 +131,8 @@ importers: services/auth: dependencies: hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 viem: specifier: ^2.7.10 version: 2.7.11(typescript@5.3.3) @@ -147,8 +147,8 @@ importers: specifier: latest version: link:../../src hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 devDependencies: '@hono/node-server': specifier: ^1 @@ -184,11 +184,11 @@ importers: specifier: ^1.7.2 version: 1.7.2 '@hono/node-server': - specifier: ^1.8.2 - version: 1.8.2 + specifier: ^1.11.2 + version: 1.11.2 '@hono/valibot-validator': - specifier: ^0.2.2 - version: 0.2.2(hono@4.1.0)(valibot@0.30.0) + specifier: ^0.3.0 + version: 0.3.0(hono@4.4.4)(valibot@0.30.0) '@noble/curves': specifier: ^1.3.0 version: 1.3.0 @@ -215,7 +215,7 @@ importers: version: 11.2.0 hono-og: specifier: 0.0.27 - version: 0.0.27(hono@4.1.0) + version: 0.0.27(hono@4.4.4) jose: specifier: ^5.2.2 version: 5.2.2 @@ -241,8 +241,8 @@ importers: specifier: latest version: link:../../src hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 devDependencies: '@types/bun': specifier: latest @@ -257,8 +257,8 @@ importers: specifier: latest version: link:../../src hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 devDependencies: '@cloudflare/workers-types': specifier: latest @@ -276,8 +276,8 @@ importers: specifier: latest version: link:../../src hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 devDependencies: typescript: specifier: 5.3.3 @@ -289,8 +289,8 @@ importers: specifier: latest version: link:../../src hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 next: specifier: 14.1.0 version: 14.1.0(react-dom@18.2.0)(react@18.2.0) @@ -326,8 +326,8 @@ importers: specifier: latest version: link:../../src hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 devDependencies: '@types/node': specifier: ^20.11.17 @@ -342,8 +342,8 @@ importers: specifier: latest version: link:../../src hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 devDependencies: tsx: specifier: ^4.7.1 @@ -391,8 +391,8 @@ importers: specifier: ^7.5.4 version: 7.5.4 hono: - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.4.4 + version: 4.4.4 lz-string: specifier: ^1.5.0 version: 1.5.0 @@ -1926,6 +1926,11 @@ packages: resolution: {integrity: sha512-sa80nNnqF8kzhBvqusWiL9vlPMVpdmOwMmDBup46Jggsr1VBqo+YuzwB36Ls+X6uHJtb8Yv3ALBHL/zGmT862A==} dev: true + /@hono/node-server@1.11.2: + resolution: {integrity: sha512-JhX0nUC66GeDxpIdMKWDRMEwtQBa64CY907iAF1sYqb4m2p2PdSU7zkbnNhAZLg/6IjSlTuj6CF307JlBXVvpg==} + engines: {node: '>=18.14.1'} + dev: false + /@hono/node-server@1.8.1: resolution: {integrity: sha512-9ondWs/5EuyZOd/iyiRp0GQfMEq+IA+IbV8Wy2bgdr5+cC55I3xbQrqtXKprw7jJhfvq3IVw7ALiuvCEmLdCAA==} engines: {node: '>=18.14.1'} @@ -1940,13 +1945,13 @@ packages: engines: {node: '>=18.14.1'} dev: false - /@hono/valibot-validator@0.2.2(hono@4.1.0)(valibot@0.30.0): - resolution: {integrity: sha512-1IfIi4JDztOeL3ciVbDoN5uJS9nSRfJv2az8VIn/m7CcVca2uF48Hw7v5ZShO/ESTP2SxtT8ozMZkQE1hi+kiw==} + /@hono/valibot-validator@0.3.0(hono@4.4.4)(valibot@0.30.0): + resolution: {integrity: sha512-EcGJKzLt11SK4K11yKHrhI93ECtKeSHAnnENHw5tCL0ZhyDIx96avc3Ua8/ri4fwVvRPuOzFQ2OBRsVvwZuqeQ==} peerDependencies: - hono: 4.1.0 - valibot: ^0.13.1 + hono: 4.4.4 + valibot: '>=0.31.0 <1' dependencies: - hono: 4.1.0 + hono: 4.4.4 valibot: 0.30.0 dev: false @@ -7621,18 +7626,18 @@ packages: minimalistic-crypto-utils: 1.0.1 dev: true - /hono-og@0.0.27(hono@4.1.0): + /hono-og@0.0.27(hono@4.4.4): resolution: {integrity: sha512-FtsUmDCG7xKXD8InxzHcdzX5IIe9MrDPFHih0CUd6Hog0NcDV6tksc1cZ1sAAuftSTedmC4LV6Oi1uK6VXvZgQ==} peerDependencies: - hono: 4.1.0 + hono: 4.4.4 dependencies: '@vercel/og': 0.6.2 - hono: 4.1.0 + hono: 4.4.4 workers-og: 0.0.23 dev: false - /hono@4.1.0: - resolution: {integrity: sha512-9no6DCHb4ijB1tWdFXU6JnrnFgzwVZ1cnIcS1BjAFnMcjbtBTOMsQrDrPH3GXbkNEEEkj8kWqcYBy8Qc0bBkJQ==} + /hono@4.4.4: + resolution: {integrity: sha512-zO5+4K8yf1iuKhBZhwmpZ/0LzPMr8Zt1RugEGM1xvOqgh9DyLb7tslOtoBks4bmm5bIcLtzLCXUpYpXOkwpABA==} engines: {node: '>=16.0.0'} /hosted-git-info@2.8.9: @@ -12269,7 +12274,7 @@ packages: fs-extra: 11.2.0 globby: 13.2.2 hastscript: 8.0.0 - hono: 4.1.0 + hono: 4.4.4 mark.js: 8.11.1 mdast-util-directive: 3.0.0 mdast-util-from-markdown: 2.0.0 diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 16cbe677..ad3590e1 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,3 +1,4 @@ +import type { JSX } from 'hono/jsx/jsx-runtime' import type { HtmlEscapedString } from 'hono/utils/html' export const buttonPrefix = { diff --git a/src/components/TextInput.tsx b/src/components/TextInput.tsx index 57b971e9..ba5c1acc 100644 --- a/src/components/TextInput.tsx +++ b/src/components/TextInput.tsx @@ -1,3 +1,5 @@ +import type { JSX } from 'hono/jsx/jsx-runtime' + export type TextInputProps = { placeholder?: string | undefined } diff --git a/src/jsx/jsx-dev-runtime/index.ts b/src/jsx/jsx-dev-runtime/index.ts index a6e123ac..c6b324ed 100644 --- a/src/jsx/jsx-dev-runtime/index.ts +++ b/src/jsx/jsx-dev-runtime/index.ts @@ -1,4 +1,5 @@ import { type JSXNode, jsx } from 'hono/jsx' +export type { JSX } from 'hono/jsx/jsx-runtime' import type { HtmlEscapedString } from 'hono/utils/html' export { Fragment } from 'hono/jsx' diff --git a/src/jsx/jsx-runtime/index.ts b/src/jsx/jsx-runtime/index.ts index b04b6d23..db880778 100644 --- a/src/jsx/jsx-runtime/index.ts +++ b/src/jsx/jsx-runtime/index.ts @@ -1,4 +1,4 @@ -export { jsxDEV as jsx, Fragment } from '../jsx-dev-runtime/index.js' +export { jsxDEV as jsx, Fragment, type JSX } from '../jsx-dev-runtime/index.js' export { jsxDEV as jsxs } from '../jsx-dev-runtime/index.js' import { html, raw } from 'hono/html' diff --git a/src/package.json b/src/package.json index 74c33cc4..b9d1b87c 100644 --- a/src/package.json +++ b/src/package.json @@ -90,7 +90,7 @@ } }, "peerDependencies": { - "hono": "^4", + "hono": "^4.4.4", "typescript": ">=5.0.4" }, "peerDependenciesMeta": { @@ -100,8 +100,8 @@ }, "dependencies": { "@bufbuild/protobuf": "^1.7.2", - "@hono/node-server": "^1.8.2", - "@hono/valibot-validator": "^0.2.2", + "@hono/node-server": "^1.11.2", + "@hono/valibot-validator": "^0.3.0", "@noble/curves": "^1.3.0", "@noble/hashes": "^1.3.3", "cac": "^6.7.14", @@ -121,10 +121,7 @@ "license": "MIT", "homepage": "https://frog.fm", "repository": "wevm/frog", - "authors": [ - "awkweb.eth", - "jxom.eth" - ], + "authors": ["awkweb.eth", "jxom.eth"], "funding": [ { "type": "github", diff --git a/src/types/frame.ts b/src/types/frame.ts index 1a41bf4e..6c3093f3 100644 --- a/src/types/frame.ts +++ b/src/types/frame.ts @@ -1,4 +1,5 @@ import { type ImageResponseOptions } from 'hono-og' +import type { JSX } from 'hono/jsx/jsx-runtime' import type { Hash } from 'viem' import type { TypedResponse } from './response.js' import type { Pretty } from './utils.js' diff --git a/src/types/image.ts b/src/types/image.ts index 4aa766fa..9d142433 100644 --- a/src/types/image.ts +++ b/src/types/image.ts @@ -1,3 +1,4 @@ +import type { JSX } from 'hono/jsx/jsx-runtime' import type { ImageOptions } from './frame.js' import type { TypedResponse } from './response.js' diff --git a/src/types/routes.ts b/src/types/routes.ts index 5e658834..9c473f11 100644 --- a/src/types/routes.ts +++ b/src/types/routes.ts @@ -1,6 +1,7 @@ // NOTE: THIS IS A FORK OF https://github.com/honojs/hono/blob/139e863aa214118397e442329121f8f39833b2f9/src/types.ts import type { Context as Context_hono } from 'hono' +import type { StatusCode } from 'hono/utils/http-status' import type { IfAnyThenEmptyObject, RemoveBlankRecord, @@ -1490,13 +1491,18 @@ export type ToSchema< } } +export type KnownResponseFormat = 'json' | 'text' | 'redirect' +export type ResponseFormat = KnownResponseFormat | string + export type Schema = { [Path: string]: { [Method: `$${Lowercase}`]: { input: Partial & { - param?: Record + param?: Record } output: any + outputFormat: ResponseFormat + status: StatusCode } } } @@ -1589,7 +1595,7 @@ export type ValidationTargets = { json: any form: Record query: Record - param: Record + param: Record | Record header: Record cookie: Record } diff --git a/src/ui/Box.tsx b/src/ui/Box.tsx index ad3e36fe..6b18ca4a 100644 --- a/src/ui/Box.tsx +++ b/src/ui/Box.tsx @@ -1,3 +1,4 @@ +import type { JSX } from 'hono/jsx/jsx-runtime' import type { Child, Direction, diff --git a/src/ui/Text.tsx b/src/ui/Text.tsx index 46a08bab..5f2f334c 100644 --- a/src/ui/Text.tsx +++ b/src/ui/Text.tsx @@ -1,3 +1,4 @@ +import type { JSX } from 'hono/jsx/jsx-runtime' import { Box, type BoxProps } from './Box.js' import type { Child } from './types.js' import type { DefaultVars, Vars } from './vars.js' diff --git a/src/ui/createSystem.tsx b/src/ui/createSystem.tsx index b584b28f..561eeb2e 100644 --- a/src/ui/createSystem.tsx +++ b/src/ui/createSystem.tsx @@ -1,3 +1,4 @@ +import type { JSX } from 'hono/jsx/jsx-runtime' import type { Assign } from '../types/utils.js' import { Box } from './Box.js' import { Column, Columns } from './Columns.js' diff --git a/src/ui/types.ts b/src/ui/types.ts index a41b1924..f08f2f34 100644 --- a/src/ui/types.ts +++ b/src/ui/types.ts @@ -1,4 +1,5 @@ import type { Properties } from 'csstype' +import type { JSX } from 'hono/jsx/jsx-runtime' export type Child = import('hono/jsx').Child | JSX.Element diff --git a/src/utils/parseImage.ts b/src/utils/parseImage.ts index 451d7745..cae3aff8 100644 --- a/src/utils/parseImage.ts +++ b/src/utils/parseImage.ts @@ -20,6 +20,8 @@ export async function parseImage( )) as Child if (node_ instanceof Promise) return await node_ + if (node_ === null) return null + let node = node_ const direction = (node.tag as unknown as { direction: Direction } | undefined)?.direction ?? diff --git a/ui/src/components/Navigator.tsx b/ui/src/components/Navigator.tsx index bc9a3351..6839b11d 100644 --- a/ui/src/components/Navigator.tsx +++ b/ui/src/components/Navigator.tsx @@ -45,11 +45,11 @@ export function Navigator(props: NavigatorProps) { ) return ( -
-
+
+
-
+