Firebase-tools: Firebase functions experimental shell runtimeconfig

Created on 28 Sep 2017  ·  4Comments  ·  Source: firebase/firebase-tools

Version info

"firebase-tools": "3.12.0"
"firebase-admin": "5.2.1",
"firebase-functions": "0.6.3",

Steps to reproduce

On a few occasions, I've ran firebase functions:config:get > .runtimeconfig.json outside of my functions folder.
I'm swapping between a few different projects, and forgetting to cd into /functions
Then getting confused why my config is wrong or doesn't exist after local deploying in shell

Expected behavior

It's probably more of a feature request than a bug:
If firebase experimental:functions:shell could warn about .runtimeconfig.json if it sees there's one on the wrong folder level, that would be helpful

Actual behavior


firebase exp
erimental:functions:shell essentially does exactly what it should be doing.

Most helpful comment

Supporting config automatically during emulation without you having to run "firebase functions:config:get > .runtimeconfig.json" is on our roadmap. Thanks for the validation!

All 4 comments

Supporting config automatically during emulation without you having to run "firebase functions:config:get > .runtimeconfig.json" is on our roadmap. Thanks for the validation!

Any update on timeline / estimate here? Been running into this bunch lately :/

Thanks!

I recommend editing the "shell" script in your functions/package.json to be:

firebase functions:config:get > .runtimeconfig.json && firebase functions:shell

That way you can just run "npm run shell`

Closing for inactivity.

Was this page helpful?
0 / 5 - 0 ratings