- First release.
- Dependencies update.
- Dependencies update.
- Improvements types definitions to make it easier to use;
- Adds
HttpInsecureServer,HttpSecureServer,Http2InsecureServereHttp2SecureServerclasses; - Removes
ApiServerclass; - Adds
./samplesfolder.
- Adds
disableRequestLoggingflag for production environments; - Allow replacing default options for fastify.
- Refactoring all errors.
- Add response data to
RuntimeError; - Interpreting
RuntimeErrorin the fastify default error handler inAbstractServerclass; - Add a custom error handler in the
ApiServerclass options.
- Dependencies update;
- Break changes in the
BaseControllerclass, see samples for more information; - Break changes on errors,
ApplicationErrorandRuntimeErrormoved to@piggly/ddd-toolkitpackage; - Break changes on types, generic types moved to
@piggly/ddd-toolkitpackage; - Added
SyncErrorOnDiskHandlerto log errors in a log file; - Added
HealthCheckServiceto check the server status based on handlers available, useful to run in a route to check if the server is healthy; - Named exportation to be fully compatible with ESM.
- ESM/CommonJS/Types compatibility.
- Fix on
getBasicTokenutil function; - Allow
getIpandgetOrigindefine custom headers;
- Fix on
getIpandgetOriginutil functions.
- Add
audienceparam toJWTBuilderServicemethods; - Add
domainandsecureparams toCookieBuilderServicemethods; - Add
getHeaderValue,getHeaderValuesandevaluateHeadersutils; - Add
SchemaValidationMiddlewareandBasicAuthMiddlewaremiddlewares; - Add
ApplicationErrorEvent,DependencyErrorEventandUnauthorizedAccessEventevents; - Add many errors, see
./errorsfolder for more information; - Fix
LoggerServicebehavior to be able to register it before createAbstractServerinstance, sometimes you may want to register logger before to handle application dependencies logging; - Keep compatibility with previous versions.
- Add
softResolvemethod toLoggerServiceto allow soft resolve the logger service; - Add new errors, see
./errorsfolder for more information; - Add
cleanupDependenciesfunction to cleanup dependencies; - Add a
sanitizeRecursivelyutil function to sanitize HTML data recursively; - Fix on
BasicAuthMiddlewarewhich was not working as expected; - Keep compatibility with previous versions.
- Break changes, migrating classes and functions to
@piggly/ddd-toolkitpackage, see:JWTBuilderServiceclass;CryptoServiceclass;LoggerServiceclass;evaluateSchemafunction;sanitizeRecursivelyfunction;loadConfigInifunction;loadDotEnvfunction;loadYamlfunction;EnvironmentTypetype;InvalidPayloadSchemaErrorerror.
- Update all dependencies to the latest version;
- Add
MissingHeaderErrorerror; - Add
InvalidNonceTokenErrorerror; - Add
InvalidCSRFTokenErrorerror; - Add more contextual data to errors at comments;
ApplicationErrorEvent,DependencyErrorEventandUnauthorizedAccessEventwill use LoggerService to auto log them;- Remove
SyncErrorOnDiskHandler. It is recommended to enableFileLogStreamServiceon LoggerService to logging errors to files; - Remove
AuditRequestLoggerhook. It is recommended to useLogResponseHookinstead; - Remove
logErrorOnFilefunction. It is recommended to enableFileLogStreamServiceon LoggerService to logging errors to files; - Change
cleanupDependencies,processUncaughtandprocessStopfunctions to wait for EventBus cleanup and LoggerService flush and cleanup; - Add CSRF and Nonce token middlewares;
- Add general routes for health check, CSRF token and Nonce token;
- Overall improvements and optimizations.
- [Fix] Build issues. Updating
tsc-aliasbroke all builds.
- [Fix] Errors were not being serialized correctly.
- [Add] Log as debug when
DomainError(UNCAUGHT_DOMAIN_ERROR) andRuntimeError(UNCAUGHT_RUNTIME_ERROR) happens; - [Add] Log as error when uncaught error (
UNCAUGHT_ERROR) happens; - [Change] Moved error handler to only uncaught errors;
- [Change] Changed
cleanupDependenciesto wait forEventBusandLoggerServicecleanup.
- [Update] Dependencies to the latest version;
- [Fix] Typing issues.
- [Update] Using the alpha version of
@piggly/ddd-toolkit; - [Fix] Enhanced debug logging and messages;
- [Change] Deprecated fastify logging, it will always be
falsesince now.
- [Update] Using the alpha version of
@piggly/ddd-toolkit; - [Uninstall] Removed
moment-timezonedependency.
- [Update] Using the alpha version of
@piggly/ddd-toolkit; - [Uninstall] Removed
crcdependency.
- [Update] Update dependencies to the latest version;
- [Change]
DefaultEnvironmentmigrated toApiDefaultEnvironmentandappsettings where removed.
Applicable only if you use CleanUpService.
- [Change]
HttpServerwill now auto add itself to cleanup service if it is registered. You should registerCleanUpServiceonServiceProviderbefore starting the server to enable this feature; - [Change]
cleanupDependencieswill not receive any parameter anymore. Instead, it will return the raw promise to cleanup dependencies. Since it also depends on theCleanUpService, it is expected that you have also registered it in theServiceProviderbefore calling this function.
- [Add]
startOrThrowmethod toStartupServiceto throw an error if any handler fails.
- [Change]
cleanupDependencies,processUncaughtandprocessStop.
- [Add]
GracefulShutdownServiceto handle graceful shutdown of the service.
- [Update] Updated all dependencies;
- [Fix] Cleanup does not need to know the stop status for fastify server (internal only);
- [Remove] Dependency on CryptoService (internal only).
- [Update] Updated all dependencies.