* Display releaseNotes during ext:update, and streamline ext:update code in general
* Add typing to silence linter issues
* adding jsdoc comments
* bolding after UX feedback
* pr fixes
* Check for and display CHANGELOG.md during ext:dev:publish (#3693)
* save my place
* implement parseChangelog
* check for changelog on ext:dev:publish
* adding changelog
Our parser for dotenv file format allows values to be wrapped inside single or double quotes.
The regex we have for parsing these value is too greedy as implemented:
```
# .env
A="abc"
B="efg"
```
```
parse(readFileSync(".env"))
=> { A: 'abc\nB="efg"' }
```
The change in regex correctly parses the dotenv file:
```
parse(readFileSync(".env"))
=> { A: "abc", B: "efg" }
```
* adding invoker to replace allUsers
* fixing build issues
* adding tests
* update function names, clean up comments
* add invoker option when parsing function from SDK
* fix service account format for IAM API
* fixing ts issues and added check for full service account
* cleaning up code for readability
* merged iam policy creation and set policy into setInvoker
* cleaning up old function and adding comments
* added unit tests
* fixing api version & removing import
* adding setInvoker to cloud run
* cleaning up
* lint fix
* fix reference
* added v2 invoker functions
* fixing pr comments
* adding invoker to replace allUsers
* fixing build issues
* adding tests
* update function names, clean up comments
* add invoker option when parsing function from SDK
* fix service account format for IAM API
* fixing ts issues and added check for full service account
* cleaning up code for readability
* merged iam policy creation and set policy into setInvoker
* cleaning up old function and adding comments
* added unit tests
* fixing api version & removing import
* fix test
* breaking out api calls to functions
* adding setInvoker for create and update, fixing pr issues
* changing 'private' skip and adding lodash compare to skip setting the same policy
* fix on update
* fixing small mistake in create vs update
This is embarrassing. I must have removed the preview check while refactoring the code after PR feedback. Also improving the logging logic to not log anything if no local dotenv files are found.
Also addresses bug where wrong `FIREBASE_CONFIG` value was set https://github.com/firebase/firebase-tools/issues/3667
Add support for setting up environment variables for functions using dotenv files.
On deploy, Firebase CLI looks for naive dotenv file (`.env`) file or project-specific ones (`.env.<project id>` or `.env.<project alias>`) files, loads environment variables, and injects them on deployed functions. Environment variable set in project-specific dotenv file wins, and you cannot have both `.<project id>` and `<.project alias>` files.
Environment variables are also loaded up on Firebase Emulators. Emulator will look for `.env` and `.env.local` files and ignore project-specific dotenv files.
We are hiding the feature behind `dotenv` preview flag. We want to get a feeling for the development experience from our users before an official launch + documentations.
Also including a small e2e test for env var support. It's meant to run manually by the Firebase team via command `node scripts/test-functions-env.js`.
Blind attempt to fix#3639 before I get debug logs.
Normally I'd worry that we hit a rate limit, but according to [docs](https://cloud.google.com/container-registry/quotas) the rate limit is 50K requests per 10m. Even with an API this chatty it's unlikely to hit the limit...
Without knowing any more info, we can realize that an API as chatty as Docker is likely to fail just through statistics. Deleting 15 functions would probably require 60-75 API calls. If gcr.io is a 3-9s service, that's a 6% chance of failure.
* created inital functionality to purge from gcr, added unit tests
* fixing lint issues
* fill out the command with options
* add regions to unit test
* change wording and error type
* change from using a class to a single function
* fixing lint issues
* fix wording
* adding gcf search functionality, updating API per approved proposal
* fix confirmation message
* refactoring code, adding parallel work, and fixing issues
* fixing lint
* lint
* fix lambda newline issue
* refactoring and cleaning up code
* fix lambda
* removing tsdoc
* fix pr comments
* fix how we get the projectId
* fix lint
* Print function names on validation errors, not [Object object]
* Require all necessary APIs
* Remove import eslint module
The import module does not currenty handle package exports.
The author is apparently of the opinion that exports should not
use renaming features. Until this is fixed, all of the v2
API is broken.
See https://github.com/import-js/eslint-plugin-import/issues/1810
for more info.
* Linter fixes