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 CPU option. Rip out deprecated apiVersion #1077
Conversation
import * as admin from 'firebase-admin'; | ||
import fetch from 'node-fetch'; |
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.
q: do you have some eslint locally that automatically formats this? (or is it something you did manually)
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.
npm run format:fix && npm run lint:fix
src/runtime/loader.ts
Outdated
if ( | ||
typeof val === 'function' && | ||
val['__endpoint'] && | ||
typeof val['__endpoint'] === 'object' | ||
(val as any).__endpoint && |
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.
nit* is (val as any)
required here? I'd guess it's already any based on L69.
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.
You're right. I was doing this manually and then used the any cast above. Will remove.
src/v2/options.ts
Outdated
|
||
/** | ||
* Fractional number of CPUs to allocate to a function. | ||
* defaults to 1 for functions with <= 2GB RAM and increases for larger memory sizes. |
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.
* defaults to 1 for functions with <= 2GB RAM and increases for larger memory sizes. | |
* Defaults to 1 for functions with <= 2GB RAM and increases for larger memory sizes. |
Also fixes a couple of build errors I was getting in identity.ts