Early support for counts
Related to #7
I started tinkering with how this might work, but unfortunately there doesn't seem to be any documentation on how to set up local support for functions.
This PR currently isn't intended to be merged, but to be discussed for feasibility.
@rbuckton you can run the functions locally by running:
yarn start:functions
Is there anything else missing so you can test it?
Unfortunately it requires permissions I don't have:
C:\dev\bigtsquery [addCount ≡]> yarn start:functions
yarn run v1.9.4
$ firebase serve --only functions
Error: Unable to authorize access to project bigtsquery
What is your google account email address? I will try to authorize you on this project.
It's the same as the email address on my GitHub profile.
I've amended the commit with some changes now that I can test. The query seems like it might be working, as http://localhost:5000/bigtsquery/us-central1/count?q=ClassDeclaration%3Ahas(ExportKeyword)%3Ahas(Decorator) returns the following:
{"count":279943}
There's no UI associated with this at present, I can look into that later this week.
Thank you!
A few notes:
- Can you please remove the formatting changes in
package.jsonandsrc/package.json? - I see that you changed
functions/src/bigquery.d.ts, where did you take the new version from?
And of course, a UI for this will be appreciated!