-
Notifications
You must be signed in to change notification settings - Fork 934
Add httpsCallableFromURL #6162
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
Add httpsCallableFromURL #6162
Conversation
🦋 Changeset detectedLatest commit: 24e82d0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Changeset File Check ✅
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
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.
Thanks for the PR, just a few small changes.
.changeset/new-bugs-think.md
Outdated
--- | ||
"@firebase/functions-compat": patch | ||
"@firebase/functions": patch | ||
"firebase-size-analysis": patch |
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.
firebase-size-analysis
can be removed, it's in the ignored changesets list. Actually, the change to that file seems unneeded (see below) so also for that reason.
e2e/sample-apps/modular.js
Outdated
@@ -118,11 +118,28 @@ async function authLogout(app) { | |||
*/ | |||
async function callFunctions(app) { | |||
console.log('[FUNCTIONS] start'); | |||
const functions = getFunctions(app); | |||
const callTest = httpsCallable(functions, 'callTest'); | |||
let functions = getFunctions(app); |
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.
Is functions
reassigned?
packages/functions/src/api.ts
Outdated
@@ -90,3 +91,23 @@ export function httpsCallable<RequestData = unknown, ResponseData = unknown>( | |||
options | |||
); | |||
} | |||
|
|||
/** | |||
* Returns a reference to the callable HTTPS trigger with the given name. |
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.
"given name" => "specified URL"?
@@ -22,11 +22,12 @@ | |||
"path": "functions", | |||
"imports": [ | |||
"getFunctions", | |||
"httpsCallable" | |||
"httpsCallable", | |||
"httpsCallableFromURL" |
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.
Doesn't need to be added here, this represents a typical bundle of imports for a use case and it's not a common case that a developer would use httpsCallable and httpsCallableFromURL in the same app. In any case, since httpsCallable wraps the core code of httpsCallableFromURL, the bundle size should be about the same.
@@ -29,4 +29,4 @@ | |||
} | |||
] | |||
} | |||
] | |||
] |
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.
It still thinks there's a whitespace change.
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.
Dunno why my formatter keeps on insisting on this. Edited in vim to avoid stripping the newline.
e2e/sample-apps/modular.js
Outdated
@@ -122,7 +122,24 @@ async function callFunctions(app) { | |||
const callTest = httpsCallable(functions, 'callTest'); |
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.
functions
isn't reassigned but it looks like callTest
is, and does still need the let
.
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.
lol. duh
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.
LG, thanks!
Sorry for a late-coming urgent change; AFAICT nobody on the SDK team could staff these changes, so I'm trying to write the change for the top 3 SDKs before I/O freeze.
For context, see go/cf3v2-crash-landing.
For API approval, see go/callable-functions-custom-urls