Note that this file lays in the root, and have different path for src and dist.
We usually un all firebase commands just directly passing firebase.json to it
firebase --config=firebase.project1.json
However this action has a slightly diffrent api than native firebase command and it doesn't allow to pass a path to the config file.
Instead entrypoint should be a subpath with firebase.json in it
Change to the action that would solve that use case
I think it could be usefull if entryPoint property may accept path to the config, so the logic would detect if the file path passed than use this path, if directory is passed, so cd to this directory and look for default firebase.josn in it.
// pseudocode
let configFile;
if (isDir(entryPoint)) {
changeDir(entryPoint);
configFile = 'firebase.json'
} else {
configFile = entryPoint
}
UPD: i've just tried to workaround the isuue by moving firebase.project1.json into projects/project1/firebase.json and changing paths in the file accordingly. That lead to a path like ../../dist/apps/frontendApp1 and fail with Error: ../../dist/apps/frontendApp1 is outside of project directory. So this improvement even more viable.
The use case you're trying to solve
We ha ve a monorepo with multiple firebase projects in it. We have the following layout of monorepo:
The structure of
fireabse.project1.json
is usually like this:Note that this file lays in the root, and have different path for
src
anddist
.We usually un all firebase commands just directly passing firebase.json to it
However this action has a slightly diffrent api than native firebase command and it doesn't allow to pass a path to the config file. Instead entrypoint should be a subpath with
firebase.json
in itChange to the action that would solve that use case
I think it could be usefull if entryPoint property may accept path to the config, so the logic would detect if the file path passed than use this path, if directory is passed, so
cd
to this directory and look for defaultfirebase.josn
in it.UPD: i've just tried to workaround the isuue by moving
firebase.project1.json
intoprojects/project1/firebase.json
and changing paths in the file accordingly. That lead to a path like../../dist/apps/frontendApp1
and fail withError: ../../dist/apps/frontendApp1 is outside of project directory
. So this improvement even more viable.