architect / functions

AWS Lambda Node runtime helpers for Architect apps
https://arc.codes
163 stars 38 forks source link

fix: ws._api needs to be initialized but there's no method to do it #528

Closed reconbot closed 2 years ago

reconbot commented 2 years ago

ws._api starts undefined and the only way to instantiate api is to make an api call. This replaces the export with a getter that calls instantiateAPI() so it's always there when you ask for it and now there doesn't need to be a method to instantiate it.

An alternative would be to make a method that returns the api (and maybe eventually remove ws._api).

I notice the docs are wrong (the types are right) and will fix that however this one lands.

Thank you for helping out! ✨

We really appreciate your commitment to improving Architect

To maintain a high standard of quality in our releases, before merging every pull request we ask that you've completed the following: