Hey i up this conversation since i can propose you a solution.
You can put the following line in your package.json
file:
"typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --config server/environments/database.ts",
And your ts config must export directly the config by doing that:
export = { /* your config */ };
As you can see, you can also specify the path of your config. No need for your config to be at the root level of your project.
Hope that will help you