Compare commits

..

No commits in common. "e8c5eb9d854969e4925423095d5c85aef5e7e2cf" and "834ae8623a1bb924dc8010b4030ec26ff730a6f0" have entirely different histories.

2 changed files with 11 additions and 14 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@because/hype", "name": "@because/hype",
"version": "0.0.2", "version": "0.0.1",
"module": "src/index.tsx", "module": "src/index.tsx",
"type": "module", "type": "module",
"exports": { "exports": {

View File

@ -24,7 +24,6 @@ export type HypeProps = {
reset?: boolean reset?: boolean
prettyHTML?: boolean prettyHTML?: boolean
layout?: boolean layout?: boolean
logging?: boolean
} }
type InternalProps = HypeProps & { _isRouter?: boolean } type InternalProps = HypeProps & { _isRouter?: boolean }
@ -90,7 +89,6 @@ export class Hype<
this.use('/css/*', serveStatic({ root: './src' })) this.use('/css/*', serveStatic({ root: './src' }))
// console logging // console logging
if (this.props.logging !== false) {
this.use('*', async (c, next) => { this.use('*', async (c, next) => {
if (!SHOW_HTTP_LOG) return await next() if (!SHOW_HTTP_LOG) return await next()
@ -101,7 +99,6 @@ export class Hype<
const method = c.req.method === 'GET' ? color.cyan(c.req.method) : color.magenta(c.req.method) const method = c.req.method === 'GET' ? color.cyan(c.req.method) : color.magenta(c.req.method)
console.log(fn(`${c.res.status}`), `${color.bold(method)} ${c.req.url} (${end - start}ms)`) console.log(fn(`${c.res.status}`), `${color.bold(method)} ${c.req.url} (${end - start}ms)`)
}) })
}
// exception handler // exception handler
this.onError((err, c) => { this.onError((err, c) => {