Platformatic v0.13.0 - Fixing CORS configuration and other improvements
Hi Folks, Happy new year! Platformatic v0.13.0 is our first release in 2023 and contains many bug fixes and improvements.
You can find the full changelog at: github.com/platformatic/platformatic/releas...
Fixed Cross-Origin Resource Sharing Protection configuration
In #562, Manuel Spigolon found a fascinating bug: it was impossible to specify a correct CORS and Platformatic Cloud would refuse to start the process. This problem was caused by two different bugs:
- we did not escape environment variables correctly, which was fixed in github.com/platformatic/platformatic/pull/564.
- it was impossible to specify more than one origin or use a regular expression. This was fixed in github.com/platformatic/platformatic/pull/590.
The new CORS configuration can be specified as follows:
{
"server": {
"hostname": "127.0.0.1",
"port": 0,
"cors": {
"origin": [{
"regexp": "https://[a-z-]*.deploy.space"
}, "https://platformatic.cloud"],
"methods": ["GET", "POST"]
}
},
...
}
SQL mapping improvements
Roberto Bianchi is one of our most prolific contributors. He keeps fixing all the bugs by testing Platformatic DB on complex real-life, databases. Here are the fixes he contributed in this release:
- fix(sql): Already declared route in github.com/platformatic/platformatic/pull/548
- fix(sql-openapi): Multiple tables with FKs pointing to same PKs in github.com/platformatic/platformatic/pull/565
- fix(sql-openapi): Same FK with different names in github.com/platformatic/platformatic/pull/566
- fix(sql-graphql): Enum with special chars in github.com/platformatic/platformatic/pull/587
create-platformatic
Our create-platformatic
command that we introduced in Platformatic v0.11.0 had quite a bit of testing, and we had a few bugs to fix:
- Ignore
.sqlite
files forcreate-platformatic
by @u5r0 in github.com/platformatic/platformatic/pull/570 - Manage error if
git
orwhoami
fails increate-platformatic
by @marcopiraccini in github.com/platformatic/platformatic/pull/581 - Feature: show warning on unsupported node.js version by @dancastillo in github.com/platformatic/platformatic/pull/577