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.
v0.13.3 - 2023-08-22
signed
option ofres.cookie()
- capability for reading chunked body as if it was a complete body to
body.raw()
- error when logging warn about
res.end()
being called more than once app.stop()
to preserve globals so callbacks trying to access them don't fail- path param processing to accept and decode uri escape characters
v0.12.6 - 2023-09-11
app.run()
to start and setup, handle process signals and log crashes
v0.11.14 - 2023-09-11
app.run()
to start and setup, handle process signals and log crashes via cli
v0.13.2 - 2022-06-08
app.run()
to start and setup, handle process signals and log crashes- missing
del
route builder to main export
- wrong field from request body type definition
- accidental non-standard http methods from main export
Nodecaf.run()
in favor ofapp.run()
body
handler to inherit the nativeIncomingMessage
stream behaviorres
handler to inherit the nativeServerResponse
stream behaviorapp.setup()
to accept multiple spread conf objects/paths
v0.13.1 - 2022-06-07
run
from separate package to ensure version compatibility- missing
all
route builder to main export
- body parsing to not attempt parsing when no body is sent
api
constructor option in favor ofroutes
v0.13.0 - 2022-03-29
keep()
handler method to store a variable in handler args for the lifetime of the request- client
ip
address to handler args - warning when
res.end()
is called more than once websocket()
handler method to work with ws upgradesopts.routes
as an experimental alternative way to define routes
body.req
tobody.stream
app.trigger()
to be completely isomorphic with calls coming from http requests- body parsing to timeout after 4 seconds if no bytes were received
fork()
,flash
,next()
& middleware-style chaining in favor of single handler andcall()
pre()
andpos()
in favor of usingcall()
opts.alwaysRebuildAPI
in favor of usingopts.conf
and variadic routesreq
from handler args in favor ofmethod
andpath
- request without a
content-type
header defaulting to parse body as text - body parsing to properly handle errors both on manual and automatic
v0.12.5 - 2022-03-07
- request
method
andpath
to route handler args - type definitions of the public interface
- route defined with
all
to never run when there is another match
- passing multiple functions to routes
pos()
andpre()
hooksfork()
handler methodreq
handler argflash
handler arg objectnext()
handler methodalwaysRebuildAPI
app option
v0.12.4 - 2022-03-02
- error trying to unsign cookie when there is no secret setup
- signed cookie parsing to verify all cookies when secret is set
v0.12.3 - 2022-02-19
- route matcher erroneously matching paths partially (eg.
'/foo/:id'
matching/foo/123/bar
) - write method mishandling buffer concatenation
v0.12.2 - 2021-12-16
- dependency bug where all log entries are filtered when
conf.log.only
is not set. - errors on shutdown code to not bubble up when cleaning up from startup error
v0.12.1 - 2021-12-03
app
not being included in log entries whenlog
is not explicitly in the conf- lack of cleanup (
app.stop()
) when user startup function throws
app._alwaysRebuildAPI
setting. Will be removed on (0.13.x)
v0.12.0 - 2021-11-30
- support to node v16.x
- available methods on
res
andreq
- default app setting to NOT parse body by default
app.accept()
feature- support to
form-data
request body parsing
v0.11.13 - 2021-09-09
call()
route handler to run any user function with handler args
app.call()
allowingstartup
andshutdown
to call without explicitthis
v0.11.12 - 2021-09-08
call()
not properly setting function this to the app- broken state handling when
app.startup
orapp.shutdown
throws
v0.11.11 - 2021-08-30
- bug making the app crash when request body parsing throws
- request body being unnecessarily parsed for unknown routes
v0.11.10 - 2021-08-25
- request info to error log entries coming from the route
v0.11.9 - 2021-07-12
app.call(fn, ...args)
method to call function with app data in the args
- request exceptions not being properly caught
v0.11.8 - 2021-05-03
- bug handling client request abort event
v0.11.7 - 2021-05-03
- crash when client aborts request while sending body
v0.11.6 - 2021-05-03
- bug handling response body streaming errors
v0.11.5 - 2021-03-15
- hostname key to log entries
v0.11.4 - 2021-01-21
pre()
andpos()
hooks functionality
- memory leak during cors
- assertion responding with text 'undefined' when no message is set
- automatic gzip for payloads of over 4kb
- a lot of dead-weight from useless dependencies
v0.11.3 - 2020-12-14
res.cookie()
modifying input options object making it impossible to reuse
v0.11.2 - 2020-12-12
all()
responding 404 to / path
v0.11.1 - 2020-11-24
fork()
to run functions as middlewares from outside of the chain
- error responses to include proper automatic
Content-Type
v0.11.0 - 2020-11-20
- constructor option to build a custom web server
app.trigger()
method to call routes programatically bypassing HTTP layerall()
handler function to match all routes in a fall back style
- http server to be optional
- a few log types for
- error hangling behavor to spit errors on respose body on DEV environment only
- HTTPS/SSL configurations and feature
- WS endpoints feature
v0.10.1 - 2020-08-10
- opts to manually set app name and version
- wrong package.json being read for name and version due to changes on main exports
v0.10.0 - 2020-08-07
res.type()
method for defining content type headerres.text()
for ending response with text/plain body- log entry when failed to parse request body
- missing cookie passing to websocket handlers
- log entry for app startup logic before server is actualy listening
- option to disable log completely through conf
log = false
- auto-parsing of keys
err
,res
,req
andws
on logger methods - assertion methods to
res
handler arg (notFound
,badRequest
...)
- constructor interface to accept a single
opts
object instead of conf class
andname
fields from log entries totype
andapp
respectively- form-data file handling interface fields
- response log entry to include request method along with path
- socket object var name from
client
tows
on websocket handler args - main class name from
AppServer
roNodecaf
- main exports to point directly to main class
- rest assertions to now output any default request body
app.accept()
to generate an accept middleware instead of setting global accept rules
app.onRouteError
handlerapp.name
andapp.version
that are now always inferred from package.jsonapp.beforeStart
andapp.afterStop
in favor ofopts.startup
andopts.shutdown
respectively- express instance entirely
app.expose()
method in favor of usingapp.global
object directlyapp.api()
method in favor ofopts.api
app.cookieSecret
attribute in favor of setting confcookie.secret
app.port
attribute, use configport
insteaderror()
handlers arg in favor ofres.error()
assertions
module from main export in favor of response object assertions- middleware
accept
setting
v0.9.5 (hotfix) - 2021-01-13
- body request being logged to console every time
v0.9.4 (hotfix) - 2020-11-09
- Add missing cookies support to WS handlers
v0.9.3 - 2020-08-07
- Fixed vulnerability on outdated version of express fileupload dependency
v0.9.2 - 2020-06-23
- ws connection error handler interface
- uncaught error when request is aborted during body reading
- error while calling
stop()
during startup process
- logger to use non-blocking I/O
- all websocket log entries to debug level
- date leaving only time on log entries in dev env
v0.9.1 - 2020-04-16
- setting to wait given milliseconds before starting the app
- conf live reloading feature now included in separate run module
v0.9.0 - 2020-04-10
- missing service name in log entries
- ws handler functions to expose handler args object as argument
- run binary in favor of using cli run command
- references to
settings
in favor ofconf
v0.8.5 - 2020-03-11
- request and response log entries level to 'debug'
- 5xx response log entries level to 'warn'
- exposed app instance to all route handlers via 'this'
- ws hang up when connection url has a query string
v0.8.4 - 2020-03-01
- bug of undefined variable in dev env due to last logger refactoring
v0.8.3 - 2020-03-01
- ANSI colors to log entries in dev environment
- setting to filter log entries by level and class
- settings to fully control CORS middle-ware (express default one)
- error gathering name and version from module without a package.json
- errors when calling start or stop more than once
- app.version and app.name to point to package.json values by default
v0.8.2 - 2020-02-18
- WebSocket routes functionality allowing to define ws handlers in given url paths
- missing response log entries when route is not found or an api wasn't defined
v0.8.1 - 2020-02-13
- app attribute exposing server port number
- app attribute to toggle conf live reload instead of relying on debug mode
- hange global error handler to log errors properly instead of just dumping
- uncaught errors ungly dump to proper log entry
- SIGTER and SIGINT handling to rely on NODE_ENV instead of debug mode
- startup and terminate raw console messages in favor of server log entries
- debug mode setting
v0.8.0 - 2020-02-11
- interface for logging to stdout as per 12 factor app
- automatic log entry to all http responses sent by the server
- unhandled exception for 'undefined' or 'null' route handlers
- intentional 500 responses being logged as uncaught route errors
- default service name hoping to force authors into changing it
- file/stream logging api in favor of stdout logging only
- fixed vulnerability on express-fileupload dependency by upgrading it
v0.7.10 - 2019-10-16
- conf argument to 'restart' method for updating the settings
- 'running' property to check whether the server is listening
- conf as an arg object key to API callback
- log entry for uncaught errors to use the original error stack and name
- config layering for null values to not throw errors anymore
- config data form server start, stop and restart log entries
v0.7.9 - 2019-09-26
- the logging system to use golog instead of bunyan
version
andhosname
properties from log entries
- configuration layering to properly merge objects
v0.7.8 - 2019-09-06
- express cookie parser enabled by default
- app option to hold a secret for signing cookies
- request headers to handler args
- logging function and conf object to start and stop handlers arguments
- ssl key and cert files to be read on every setup
- server start log entry to only include conf data when in debug mode
v0.7.7 - 2019-07-30
- setting to rebuild the API on every start or setup
- log entries for server start, stop and restart event
- live application reload for conf file changes in debug mode
- support for JSON conf files
- status when API was not setup from 'Not Found' to 'Service Unavailable'
- conf file logic to use Confort module
- all CLI functionality to own project
- conf type parameter in favor of reading the extension of path
v0.7.6 - 2019-07-24
- setting to permissively allow CORS on all routes
v0.7.5 - 2019-07-23
- setting for a path where to store files uploaded as
multipart/form-data
- app version to startup message when running through binary
v0.7.4 - 2019-07-22
- option to disable all request body parsing
- ability to set up app name and version through config files
v0.7.3 - 2019-07-16
- minor details in cli outputs due to internal library changes (eclipt, ejs)
- deprecated
conf
param from themain.js
generated bynodecaf init
-o, --outfile
option ofnodecaf openapi
in favor of a positional argument
v0.7.2 - 2019-07-09
- bug when filtering requests with charset on content-type
v0.7.1 - 2019-07-08
- a function to apply config files on top of each other
- type filtering to not require content-type from requests without body
- parser to ignore request body when no content-length is present
- the settings argument that used to be passed to user init function
v0.7.0 - 2019-07-07
- support for YAML config files
- app method to filter requests by body content-type app-wide
- top-level function to define per-route content-type filtering rules
- default generic request body description to open api doc operations
- accepted mime-types to operation request body api doc
- global CLI help command to list available commands and usage
- CLI command to output version of the globally installed Nodecaf
--no-optional
flag to install command output bynodecaf init
- CLI error: unknown type "as-is" on cli options
- CLI init error when lib or bin directory already exists
- error messages to not be JSON by default
v0.6.0 - 2019-06-24
- parameters for project name and directory to cli init command
- version setting to app class
- functions to describe/document your api
- cli command to generate Open API compatible documentation (
nodecat openapi
) - HTTPS support through setting
- error log entry for uncaught route errors
- log entry for uncaught errors that crash the server process
- complete functionality documentation to readme
- the cli commands to not share the same parameters
- deprecation warning because of old Express
del
command - route not found error output as HTML
- log level setting (now it works)
- handling of rejected promises to output a clean message
route
method was renamed toapi
- cli init to henerate routing in a seperate api.js file
- error handling interface and use express built-in functionality
v0.5.3 - 2019-06-13
- missing default message for REST errors thrown from assertions
- code generation error standard
- code generation to use spaces instead of tabs
v0.5.2 - 2019-06-12
- missing default message for REST errors thrown as strings
- missing options for conf file generation with cli init
- user error handler not being executed when headers were already sent
- undefined server name being shown when terminating from command line
v0.5.1 - 2019-06-11
- log warning when an error happens after the response haders have been sent
- Logger now serializes 'req' key as a node request object
- Fixed undefined app name field being shown when running from command line
- Fixed undefined error on subsequent close calls
v0.5.0 - 2019-06-10
- Renamed project to Nodecaf
- path field to request log entry
- Moved from Restify to Express for the internal route server
- conf file generation to create parent directories if needed
- Fixed server to correctly await start and close events
v0.4.1 - 2019-06-02
- setting to log all incoming requests
- logging capabilities through bunyan package
v0.4.0 - 2019-06-01
- capability for assertion module to be used on async callbacks
- cli command to generate the basic file structure for nodecaf projects
- terminal signal and uncaught exception handling
- error handling code for better interface consistency
v0.3.0 - 2019-05-29
- conf loader to not output warning when no conf path is provided
- exception when route errors would trigger an error event without listeners
- default error handler that would attach itself again on every request
v0.2.0 - 2019-05-27
- an Assertions module to handle common REST exception scenarios.
- error handling to always produce a valid REST output.
v0.1.0 - 2019-05-17
- First officially published version.