Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If Project isn't setup, setup it for the user by channeling the UI from Firebase CLI #6

Open
mainawycliffe opened this issue Dec 25, 2022 · 0 comments
Labels
enhancement New feature or request v2 Not a priority at the moment

Comments

@mainawycliffe
Copy link
Owner

At the moment, the idea i have is to used the firebase projects:list and allow the user to select the project they so desire to use, but I am open to a better implementation of the idea:

Examples code snippet I wrote:

if (!firebaseProjectId) {
  // run in the CLI firebase list to list all firebase projects and let the
  // user choose
  const res = execSync('firebase projects:list');
  console.log(
    res
      ?.toString()
      .split('\n')
      .map((line) =>
        line
          .replace(/-/g, '')
          .split('│')
          .map((line) => line.trim())
          .filter((content) => content !== '')
      )
      .filter((line) => line.length > 1)
  );
  return;
}
@mainawycliffe mainawycliffe added enhancement New feature or request v2 Not a priority at the moment labels Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2 Not a priority at the moment
Projects
None yet
Development

No branches or pull requests

1 participant