GEOLYTIX / xyz

An open source javascript framework for spatial data and application interfaces.
MIT License
88 stars 26 forks source link

Cloudfront Provider; use of node-fetch #1641

Closed RobAndrewHurst closed 4 weeks ago

RobAndrewHurst commented 4 weeks ago

Description

There is old legacy code in the cloudfront provider that is using the (node-fetch) package that was phased out over 2 years a go. We noticed it would break after removing bcrypt as a dependency for the application.

--Before--

const nodeFetch = require('node-fetch')
const response = await nodeFetch(signedURL)

--After--

const response = await fetch(signedURL)

We need to remove the require statement from the module & change the fetch reference in the code.

dbauszus-glx commented 4 weeks ago

There are other issues with the cloudfront module as commented in the PR. Should these be addressed in this PR or do you want to create a separate issue for the Error handling?