While it has only been a few months since our 1.0.0 release, the hits keep coming. This release is somewhat more constrained than previous ones. The primary features found in this release are:
- @travetto/pack is a new module that supports packing applications.
- The @travetto/email-template development UI has been externalized into the VSCode Plugin. Additionally some other enhancements have been made to the templating process.
- @travetto/cache now supports DynamoDB as a valid storage model
- @travetto/app has disconnected itself from the rest module and is now a standalone service, when desiring to run the application via the app module.
- @travetto/rest-fastify properly supports running a lambda context using the aws-lambda-fastify module.
@travetto/pack
When deploying applications with Travetto, producing the final deployable bundle can be tricky. Given that the framework does not produce JS as an output, the standard build tools do not normally apply. This is where the pack module comes in.
The pack module knows how to work with Travetto applications, and what to include versus what not include, with support for targeting production mode where the source should be readonly.
The extended benefits of pack come in the form of being able to target additional npm modules and control how they are packaged. By default the pack module follows some pretty sensible defaults, but can easily be extended when trying to eek out the smallest bundle size possible.
You can read more about the module over on our doc site: https://travetto.dev/docs/pack.
@travetto/email-template
Authoring
Previously, the email template module included a small web server for displaying content. The implementation was generally somewhat fragile, and was not in line with the development model the Travetto framework seeks to uphold. To that end, the template authoring functionality has been integrated within the Travetto VSCode Plugin. The plugin automatically knows if you have the email template module installed, and if you are authoring template files (.email.html)
Changes
The recognized extension of the email templates has been renamed to .email.html. This was necessary to properly isolate the file highlighting within VS Code to avoid any potential conflicts with other tools that were relying upon the .tpl.html files.
Additionally, the template supports two new components that make authoring emails even easier:
- <title> - This provides the ability to record the desired subject for the email in a single file.
- <summary> - This allows for specifying the preview text in clients with preview support.
@travetto/cache
Lastly, DynamoDB support has been added to the cache module as an option. It leverages the TTL support provided by Dynamo to automatically, and cleanly expire data within the cache. When serving the application from a lambda, this is now a valid option for a cost-effective and lightweight caching mechanism.
@travetto/app
The app module, initially, was an extension of running Restful applications. As time went on, it grew into it's own feature, without depending on the rest module. Additionally, as the lambda support has grown greatly for the rest modules, it became clear that assuming the inclusion of the app module was incorrect.
If the app module's functionality is needed, it will need to be included as a dependency. Applications can still be run manually, without the app module, but require a little more setup. The di module has introduced a simple example of what is necessary to run an application without using the module.
Library Upgrades
As is the norm, the framework has upgraded all of it's dependencies to the latest viable version (minus node-forge which required a proper upgrade due to security issues).
As of now, the framework requires Typescript 4.x.x as the transformer has been rewritten to rely on the new APIs provided for creating AST nodes.