dougmoscrop / serverless-plugin-include-dependencies

MIT License
184 stars 40 forks source link

fix bug at getHandlerFilename if not dot in string #38

Closed vbryan closed 4 years ago

vbryan commented 5 years ago

Linked issue: https://github.com/dougmoscrop/serverless-plugin-include-dependencies/issues/33

dougmoscrop commented 4 years ago

Sorry, I can merge this, but please add a test.

aychtang commented 4 years ago

@vbryan @dougmoscrop Would you like me to pick up this issue?

dougmoscrop commented 4 years ago

Sure if you have the time, thanks, just some testing.

aychtang commented 4 years ago

Cool, we're using this package internally at my company for a new project so I'm happy to help there

aychtang commented 4 years ago

@vbryan Is the approach you took in this commit correct? I was reading a bit about the GCP examples and it seems you're supposed to export all functions from the index.js file when using this syntax without the . in the sls handler name.

aychtang commented 4 years ago

@dougmoscrop What do you want done on this?

I think in any case the handler file for a config given handler: src/handler is not src/handle, so I could follow this fix approach and have it return src/handler.

However it seems from the basic GCP examples that such handlers should be exported from the index file, would you like me to fix the function to return the index file in these cases?

That should work for this example: https://github.com/serverless/examples/tree/master/google-node-simple-http-endpoint

dougmoscrop commented 4 years ago

that sounds reasonable, yeah - as long as nothing backwards breaks I'm happy to have anything that could work start working