All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. Minor features that don't break backwards compatibility are released as patches.
cache 300keeps what a node renders as a component for that many seconds. SeeAntlers::ComponentCache.
- The keywords a node's methods take are kept by class and method name, so a node's action no longer looks up its methods on each event. A method defined on a node class reads them again
- A method that takes no keywords, like
render, is given the same empty hash each time rather than a new one
- A node's
tickgives back what it returns, so an interval can tell when it had nothing to do, like byInterval::IDLE
- A node's response headers are only made when it adds one, and its content type is found by looking through its headers rather than indexing them all
- An action's keywords are passed as they are when its method takes all of them, rather than copied
handles?(action)says whether a node does anything for an action, like aside_effectit defines, so a router can skip events no node handles
- An action without a body, like a
side_effecta node doesn't have, no longer makes response headers it won't send
- The keywords each node method takes are read once for each method, rather than on every render
- A JSON response and one an action made itself join the request's event tree like an HTML one, so a dashboard can see the request was answered
- HTML a node renders is stripped in place rather than copied, so a large page uses less memory. A frozen string, like a literal an action returns, is copied as before
tick, which a node defines to run each time an interval it observes is due, likeobserve Interval[every_minute: 5]. Only a node that defines it is initialized, and what it returns is ignored
- Text an action returns is sent with the content type the node added with
add_header, liketext/plainfor a robots.txt, instead of alwaystext/html
- An action can return a hash or an array, which is sent as JSON, or a
Protocol::HTTP::Responseit made itself, which is sent as it is. Either way the headers the node set, like its cookies, are added add_header(name, value)adds a header to a node's response, likeset_cookieadds a cookie, for an action that returns its body
- A component rendered inside a template gets the template's render context
- Need Antlers 1.5.3, which passes the render context on to components
set_cookie(name, value, **options)sets a cookie with the node's response,HttpOnly,SecureandSameSite=Laxby default- Return
redirect(location)from an action to redirect, with a 303 by default response_headersfor any other headers a node sends with its response
- Call
receiveandside_effectactions on the node instance likerender include Controllerto call HTTP verb actions (get,post, etc) on the node instance- Respond with the status of a returned
Status[code], or a returnedResponseEvent`
- Ignore nil and empty responses
- Handle multiple args when not RBX
- Support omittable arguments
- Store namespace on AST parse
- Pass event param into template
- Render node without event arg when param not present
- Provide node count stat
- Rename load template to build template
- No need to error when calling default methods
- Support RBX, Antlers and templates
- Handle events