-
Notifications
You must be signed in to change notification settings - Fork 206
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
Firebase Functions ships with a binary #1003
Conversation
…se-functions into dl-endpoint-prop
… into dl-endpoint-prop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, but let's get the port/Env var + the requiredAPIs stuff sorted out.
All in all though, this is much better than I could have done myself. We're really lucky that you've got experience with ESM modules vs pacakges.
Follows up #999 to annotate each funuctions with `__endpoint` property. Highlight of changes: * Extend unit test coverage for all v1 providers * Add `__endpoint` annotation to v1 task queue functions * Add `__requiredAPIs` annotation to task queue and scheduler functions * Explicitly set `__endpoint` to undefined in the handler namespace * No SDK-level label setting in the __endpoint annotation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just one thing that I had a question on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looking good.
res.setHeader('content-type', 'text/yaml'); | ||
res.send(JSON.stringify(backend)); | ||
res.send(JSON.stringify(stack)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean.... technically JSON is YAML?
src/cloud-functions.ts
Outdated
{ | ||
api: 'cloudscheduler.googleapis.com', | ||
reason: 'Needed for v1 scheduled functions.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's a case where I could argue for using "v1" because v2 will not use Pub/Sub.
Alternatively you can just remove this required API because it's part of the APIs that get enabled with Cloud Functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think Cloud Scheduler gets enabled as part of GCF, but I'm not sure what enables it since I do see it enabled when creating a new GCP project 🤔 . I'm going to add 'v1' to err on side of being safe, but can remove later when I dig in and figure out if we can rely on the cloud scheduler API being enabled on users project by some means.
We introduce a bin associated with the firebase-functions SDK! The binary exposes a simple server on localhost that describes the Firebase Functions defined in the current directory: