Platformatic v0.17.0 - Config file changes, a Schema Store, and a new upgrade command

Search for a command to run...

No comments yet. Be the first to comment.
Nitro is a server toolkit used by many JavaScript applications. You can use it on its own for APIs or full-stack servers, or combine it with Vite to get a familiar frontend workflow with a Nitro serve

All durable execution engines give the same versioning advice: pin your runs. Temporal pins runs to worker builds. Vercel's Workflow SDK pins each run to the deployment that started it. Azure Durable

Eve organizes AI agents in a simple way: use Markdown for instructions and skills, TypeScript for tools, and separate files for channels, schedules, and subagents. Behind this setup, Eve relies on the

Picture an online store launching a new product and sending out a mailing list campaign. Thousands of users click the same link at once. The product page, built with a Node.js app like Next.js, needs

How Platformatic ICC Outperforms AWS ECS Target Tracking and Step Scaling

Hi Folks,
We are shipping Platformatic v0.17.0 this week with a significant update: we are streamlining our configuration files to better support custom plugins.
Full Changelog: https://github.com/platformatic/platformatic/releases/tag/v0.17.0
plugins configuration optionWe have greatly streamlined the plugin option and reduced the number of possible variations. Before this could be a string, an array or an object:
{
"plugin": {
"path": "plugin.ts",
"typescript": {
"outDir": "dist"
}
}
}
The new plugins option only supports an object, like so:
{
"plugins": {
"paths": ["plugin.ts"],
"typescript": true
}
}
paths could also be an array if you need to specify options for the plugin:
{
"plugins": {
"paths": [{
"path": "plugin.ts"
"options": { "foo": "bar" }
}],
"typescript": true
}
}
Note that the output directory is loaded from tsconfig.json directly.
This feature was implemented in #727.
If you ever used the create-platformatic utility to start a new project, it would have added a $schema property at the top of the JSON file to be used for autocompletion:
{
"$schema": "./platformatic.db.schema.json",
...
}
Then, you could have run a local command to generate that file (and to keep it up-to-date). Now, this is not needed anymore as all configuration schemas are available online at:
{
"$schema": "https://platformatic.dev/schemas/v0.17.0/db"
...
}
This file is automatically published to the web by our GitHub actions automation.
This change was implemented in #742 and #744.
plt upgradeWe have added a new command: platformatic upgrade (or plt upgrade with the shortcut). This new command automatically brings the configuration of your project to the latest version.
Use this command to upgrade from Platformatic v0.16.0 to v0.17.0.
This change was implemented on #753.
@ruheni contributed a guide on how to combine Prisma with Platformatic in #682. In fact, it's possible to use Prisma to create custom routes too:
const prismaPlugin = requrie("@sabinthedev/fastify-prisma")
module.exports = async (app) => {
app.log.info('plugin loaded')
app.register(prismaPlugin)
/**
* Plugin logic
*/
app.put('/post/:id/views', async (req, reply) => {
const { id } = req.params
const post = await app.prisma.post.update({
where: {
id: Number(id)
},
data: {
viewCount: {
increment: 1
}
}
})
return post
})
}
One of the most crucial things in an Open Source project is licensing. Platformatic is released licensed as Apache-2.0. However what about its dependencies? We can now guarantee that all its production dependencies are licensed as Apache-2.0, MIT, ISC, or BSD-2-Clause.
Ths automation was added in #750 via the old-but-faithful license-checker module.
@fastify/under-pressure in the Platformatic configuration by @salesh in #725