Open ciriousjoker opened 8 months ago
@ciriousjoker This is a good one. Thanks for reporting.
It's been a while since I used function configs (and probably in a much older 13.x era version of Nx before they added the fancy console output), so I haven't used it myself lately.
So the problem is that any kind of pipe of output in an nx run
captures the Nx console stdout also.
nx -q run
quiet mode is no use because it suppresses everything.
I dont see any other way to be able to capture command output to a file in Nx.
I note your PR comment about preserving --config & --project for firebase CLI, which ideally we want to do, so the best solution I can think of is to:
.runtimeconfig
file, instead:echo
for user to copy that JSON to their .runtimeconfig
file insteadOn a related note, I believe the general trend for Firebase is going to be sunsetting function configs and moving to environment vars instead. They already state that v2 cloud functions do not support function configs.
This isn't ideal, as I was toying with using function configs on a personal project just last week to dodge the secrets billing (only 6 for free, Google? come on!). And yeah I know its cheap, but so am I. 😅
But, no can do, because I'm using v2 cloud functions.
End of side track.
Yes, V2 Cloud functions use a different way of managing configs, but for older projects, a working runtimeconfig is probably better than one for the correct NX project, bit broken. Therefore I'd personally still merge it, but aside from that idc since on our project this is solved manually anyway :)
Yeah, life is never that simple for plugin dev though because we have to be mindful of user experience and migration paths etc. No biggie, just part of the process. I'll take a look at this soon.
Any progress on this?
npx nx run firebase:getconfig
Easy fix for a human though, so low priority.
context: I'm using VSCode's inline terminal, but this shouldn't matter