-
Notifications
You must be signed in to change notification settings - Fork 3.8k
chore: update to firebase_functions 0.6.0 #1282
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,8 +17,8 @@ | |||||||||
| import 'package:firebase_functions/firebase_functions.dart'; | ||||||||||
| // [END imports] | ||||||||||
|
|
||||||||||
| void main(List<String> args) async { | ||||||||||
| await fireUp(args, (firebase) { | ||||||||||
| void main() { | ||||||||||
| runFunctions((firebase) { | ||||||||||
|
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The update to
Suggested change
|
||||||||||
| // [START allAdd] | ||||||||||
| // [START addFunctionTrigger] | ||||||||||
| // Adds two numbers to each other. | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,8 +38,8 @@ import 'package:intl/intl.dart'; | |
| /// -d '{"format": "MMMM d yyyy, h:mm:ss a"}' / | ||
| /// https://date-<random-hash>.<region>.run.app | ||
| // [START dartHttpTrigger] | ||
| void main(List<String> args) async { | ||
| await fireUp(args, (firebase) { | ||
| void main() { | ||
| runFunctions((firebase) { | ||
|
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| firebase.https.onRequest(name: 'date', (request) async { | ||
| // [END dartHttpTrigger] | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,8 @@ final defaultWidth = defineInt( | |
| ParamOptions<int>(defaultValue: 300), | ||
| ); | ||
|
|
||
| void main(List<String> args) async { | ||
| await fireUp(args, (firebase) { | ||
| void main() { | ||
| runFunctions((firebase) { | ||
|
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| /// An https function that resizes images in Cloud Storage. | ||
| /// It creates a separate Storage folder to cache stored images | ||
| /// so that it does not need to resize an image twice. | ||
|
|
||
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.
The update to
firebase_functions0.6.0 introduces breaking changes that are not fully addressed in the function handlers:onCallSignature: The handler now takes a singleCallableRequestargument. Theresponseobject is now a property of therequestobject. You must update line 52 to(request) async {and line 76 toawait request.response.sendChunk(result);.CallableResultRemoval: This class has been removed in 0.6.0. You should return the result directly (e.g.,return await Future.wait(allRequests);on line 86).await runFunctionsto ensure the entry point correctly handles the server's lifecycle.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.
awaitis probably a stylistic improvement but it won't actually change the behavior of the application and it won't match our examples.