Skip to content
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

Supporting nested functions when serving functions locally #677

Merged
merged 9 commits into from
Mar 6, 2018

Conversation

tinaliang
Copy link
Contributor

@tinaliang tinaliang commented Feb 23, 2018

Description

Allow for nested functions to be locally emulated in response to customer issue #481 . Nested functions can now be accessed using dot notation. For example, given
exports.funcName = {
func1: functions.database.ref().onCreate(...),
func2: functions.https.onRequest(...)
}
func1 and func2 can be accessed using funcName.func1 and funcName.func2 respectively.

Depends on googlearchive/cloud-functions-emulator#191

Scenarios Tested

Tested against https nested functions two levels deep and database nested functions one level deep.

Sample Commands

@coveralls
Copy link

Coverage Status

Coverage remained the same at 57.502% when pulling ec13756 on tl-nestedfunctions into 0a101ca on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 57.502% when pulling ec13756 on tl-nestedfunctions into 0a101ca on master.

@coveralls
Copy link

coveralls commented Feb 23, 2018

Coverage Status

Coverage remained the same at 57.502% when pulling 80243cc on tl-nestedfunctions into 0a101ca on master.

@tinaliang tinaliang assigned tinaliang and laurenzlong and unassigned tinaliang Feb 23, 2018
@tinaliang tinaliang changed the title passing through nested functions Supporting nested functions when serving functions locally Feb 27, 2018
Copy link
Contributor

@laurenzlong laurenzlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should keep supplying the "firebase" option when deploying the functions, since it's still useful. Looks good otherwise.

@laurenzlong laurenzlong assigned tinaliang and unassigned laurenzlong Feb 28, 2018
@tinaliang tinaliang assigned laurenzlong and unassigned tinaliang Feb 28, 2018
Copy link
Contributor

@laurenzlong laurenzlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also update package.json to beta.4 of GCF emulator? And only merge this branch once that's actually released.

Copy link
Contributor

@laurenzlong laurenzlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, please merge once GCF emulator beta.4 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants