@hatch:web v0.1.5
Server-rendered, htmx-native web framework for Wren. Router, middleware, content-negotiated rendering via @hatch:template, HTTP/1.1 server on top of @hatch:socket.
$
hatch add @hatch:web
Server-rendered, htmx-native web framework for Wren. Router, middleware, content-negotiated rendering via @hatch:template, HTTP/1.1 server on top of @hatch:socket.
Scheduler_.new()
Scheduler_.count
Scheduler_.isEmpty
Scheduler_.tick
Scheduler_.spawn(fn)
Scheduler_.static isExpectedDisconnect_(err)
Scheduler_.static removeAt_(list, idx)
Subscription_.new_(channel)
Subscription_.limit
Subscription_.limit=(n)
Subscription_.receive
Subscription_.close
Subscription_.closed_
Subscription_.static DEFAULT_QUEUE_LIMIT_
Subscription_.deliver_(msg)
Channel.new(name)
Channel.name
Channel.subscriberCount
Channel.subscribe
Channel.broadcast(msg)
Channel.unsubscribe_(sub)
SseStream.new_(writerFn)
SseStream.writer
SseStream.static stream(writerFn)
Sse.static stream(writerFn)
Sse.static frame(payload)
Sse.static escapeLines_(s)
Sse.static indexOf_(s, ch)
Request.new_(method, path, query, headers, body, remote)
Request.method
Request.path
Request.headers
Request.body
Request.remote
Request.params
Request.rawQuery
Request.session
Request.flash
Request.flashNext
Request.session=(s)
Request.flash=(f)
Request.flashNext=(f)
Request.fragmentSheet
Request.globalSheet=(s)
Request.globalSheet
Request.query
Request.form
Request.hx
Request.isHx
Request.setFlash(key, value)
Request.style(s)
Request.validate(form)
Request.param(name)
Request.header(name)
Request.render(tpl, context)
Request.render(tpl)
Request.setParam_(k, v)
Response.new()
Response.new(status)
Response.new(status, body)
Response.status
Response.body
Response.headers
Response.cookies_
Response.status=(s)
Response.body=(b)
Response.init_(status, headers, body)
Response.header(name, value)
Response.cookie(name, value)
Response.cookie(name, value, opts)
Response.html(s)
Response.text(s)
Response.json(s)
Response.static redirect(url)
Response.static redirect(url, status)
Response.static coerce(value)
Route_.new_(method, pattern, handler)
Route_.method
Route_.handler
Route_.static compile_(pattern)
Route_.match_(method, path)
Router.new()
Router.new_(prefix)
Router.routes
Router.get(path, fn)
Router.post(path, fn)
Router.put(path, fn)
Router.patch(path, fn)
Router.delete(path, fn)
Router.any(path, fn)
Router.mount(subRouter)
Router.add_(method, path, fn)
Router.resolve(method, path)
Pipeline_.new_(stack, terminal)
Pipeline_.run(req)
Pipeline_.step_(req, i)
App.new()
App.globalSheet
App.clearRoutes_()
App.globalCss(style)
App.get(path, fn)
App.post(path, fn)
App.put(path, fn)
App.patch(path, fn)
App.delete(path, fn)
App.any(path, fn)
App.mount(r)
App.use(fn)
App.notFound(fn)
App.error(fn)
App.handle(req)
App.listen(addr)
App.spawn(fn)
App.channel(name)
App.serve_(conn)
Http_.static readRequest(conn)
Http_.static writeSseHeaders(conn)
Http_.static writeResponse(conn, resp)
Http_.static bodyLen_(body)
Http_.static parseForm(s)
Http_.static urlDecode(s)
Http_.static hex(s)
Http_.static indexOf(s, ch)
Http_.static trim(s)
Http_.static lower(s)
Http_.static reason(status)
ByteBuf_.new(conn)
ByteBuf_.readLine
ByteBuf_.read(n)
ByteBuf_.findCrlf_()
ByteBuf_.fill_()
ByteBuf_.bytesToString_(from, to)
Static.static cacheGet_(full)
Static.static cacheSet_(full, entry)
Static.static serve(urlPrefix, root)
Static.static unsafe_(rel)
Static.static join_(a, b)
Static.static bytesToString_(bytes)
Static.static mimeOf_(path)
Session.static COOKIE_NAME_
Session.static cookie(secret)
Session.static cookie(secret, opts)
Session.static parse_(req, cookieName, secret)
Session.static readCookie_(req, name)
Session.static sign_(secret, payload)
Session.static verify_(secret, signedCookie)
Session.static constantTimeEq_(a, b)
Csrf.static TOKEN_BYTES_
Csrf.static middleware
Csrf.static middlewareWith(opts)
Csrf.static isHx_(req)
Csrf.static newToken_()
Csrf.static field(req)
Csrf.static token(req)
Flash.static bind(req, ctx)
Field.new(name)
Field.name
Field.trim
Field.lowercase
Field.uppercase
Field.required
Field.email
Field.url
Field.numeric
Field.transforms_
Field.validators_
Field.default_(value)
Field.transform(fn)
Field.required(msg)
Field.email(msg)
Field.url(msg)
Field.minLength(n)
Field.minLength(n, msg)
Field.maxLength(n)
Field.maxLength(n, msg)
Field.numeric(msg)
Field.range(lo, hi)
Field.range(lo, hi, msg)
Field.oneOf(options)
Field.oneOf(options, msg)
Field.matches(otherName, msg)
Field.custom(fn)
Field.custom(fn, msg)
Field.static trim_(v)
Field.static isWhitespace_(c)
Field.static toLower_(s)
Field.static toUpper_(s)
Field.static looksLikeEmail_(s)
Field.static looksLikeUrl_(s)
FormResult.new_(data, errors, rawInput)
FormResult.valid
FormResult.data
FormResult.errors
FormResult.rawInput
FormResult.errorsFor(name)
FormResult.firstError(name)
FormResult.hasError(name)
FormResult.valueOf(name)
Form.new(fields)
Form.fields
Form.validate(params)
Tw_.static spacing_(n)
Tw_.static intOf_(s)
Tw_.static COLORS_
Tw_.static FONT_SIZES_
Tw_.static FONT_WEIGHTS_
Tw_.static RADII_
Tw_.static color_(family, shade)
Tw_.static expand(token)
Style.new_(base, pseudos, mediaBuckets)
Style.empty_()
Style.className
Style.css
Style.styleTag
Style.base_
Style.pseudos_
Style.media_
Style.normalizedForHash_
Style.tw(classes)
Style.raw(decls)
Style.hover(arg)
Style.focus(arg)
Style.active(arg)
Style.disabled(arg)
Style.visited(arg)
Style.sm(arg)
Style.md(arg)
Style.lg(arg)
Style.xl(arg)
Style.baseMerge_(key, value)
Style.pseudoMerge_(sel, key, v)
Style.mediaMerge_(query, key, v)
Style.pseudo_(sel, arg)
Style.media_(query, arg)
Style.static declsFromArg_(arg)
Style.static applyToken_(style, token)
Style.static indexOf_(s, ch)
Style.static clone_(src)
Style.static dumpSorted_(m)
Style.static strGt_(a, b)
Style.static emitRule_(selector, decls)
Stylesheet.new()
Stylesheet.count
Stylesheet.emit
Stylesheet.styleTag
Stylesheet.add(style)
Css.static empty
Css.static tw(classes)
Css.static raw(decls)
Css.static sheet