Skip to content

Commit 4a6444e

Browse files
committed
fix: follow redirects when downloading a file from the CDN
1 parent c3ebe6d commit 4a6444e

File tree

4 files changed

+35
-9
lines changed

4 files changed

+35
-9
lines changed

package-lock.json

Lines changed: 32 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"postinstall": "run-s build install-husky",
1919
"install-husky": "if-env CI=1 || husky install node_modules/@netlify/eslint-config-node/.husky",
2020
"test": "run-s build:demo test:jest",
21-
"test:jest": "jest",
21+
"test:jest": "jest --watch",
2222
"test:jest:update": "jest --updateSnapshot",
2323
"test:update": "run-s build build:demo test:jest:update"
2424
},

packages/runtime/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"chalk": "^4.1.2",
1919
"destr": "^1.1.1",
2020
"execa": "^5.1.1",
21+
"follow-redirects": "^1.15.2",
2122
"fs-extra": "^10.0.0",
2223
"globby": "^11.0.4",
2324
"merge-stream": "^2.0.0",

packages/runtime/src/templates/handlerUtils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fs, { createWriteStream, existsSync } from 'fs'
2-
import http from 'http'
3-
import https from 'https'
2+
import { http, https } from 'follow-redirects'
43
import { tmpdir } from 'os'
54
import path from 'path'
65
import { pipeline } from 'stream'

0 commit comments

Comments
 (0)