google-cloud-node
google-cloud-node copied to clipboard
Add support for non-Node worker environments
What would you like to see in the library?
Support for non-NodeJS runtimes like Cloudflare workers. Currently this library fails to compile for Cloudflare when using Nitro framework. In other workers it could just fail in runtime.
Describe alternatives you've considered
It works to use this library only for Typescript types and send requests the other way:
import type { protos } from '@googlemaps/places'
const data = await $fetch<protos.google.maps.places.v1.IAutocompletePlacesResponse>('https://places.googleapis.com/v1/places:autocomplete', {
method: 'POST',
body: {
input,
languageCode: language,
sessionToken,
locationBias: { rectangle: {
low: { latitude: businessArea.minLat, longitude: businessArea.minLng },
high: { latitude: businessArea.maxLat, longitude: businessArea.maxLng },
} },
} as protos.google.maps.places.v1.IAutocompletePlacesRequest,
headers: { 'X-Goog-Api-Key': googleMapsApiKey },
})
Please do this