algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

transform function doesnt work with firebase emulator in demo mode #215

Open sacrosanctic opened 5 months ago

sacrosanctic commented 5 months ago

describe the problem

The URL used to call the transform fn is not correct. This extension will continue to call the remote project rather than the local demo porject.

https://github.com/algolia/firestore-algolia-search/blob/5bfc57d5643579a077b6b73c1eaf3695f5f0cb27/functions/src/transform.ts#L24

references

https://firebase.google.com/docs/emulator-suite/install_and_configure#use_the_emulator_hub_rest_api

https://firebase.google.com/docs/emulator-suite/use_extensions

Project IDs for demo projects have the demo- prefix.

https://firebase.google.com/docs/functions/local-emulator#instrument_your_app_for_https_functions_emulation

https://localhost:5001/$PROJECT/us-central1/helloWorld