disabling any for proxy, removing vuln dep

This commit is contained in:
Vallie Joseph
2023-07-31 20:56:20 +00:00
parent a3d9e7703a
commit 0351982fe9
4 changed files with 25 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
// eslint-disable-next-line filenames/match-regex
import * as http from 'http'
import * as https from 'https'
import { createProxy } from 'proxy';
import {ProxyServer, createProxy} from 'proxy'
// Default values are set when the module is imported, so we need to set proxy first.
const proxyUrl = 'http://127.0.0.1:8081'
@@ -12,12 +12,12 @@ import {getOctokit} from '../src/github'
describe('@actions/github', () => {
let proxyConnects: string[]
let proxyServer: http.Server
let proxyServer: ProxyServer
let first = true
beforeAll(async () => {
// Start proxy server
proxyServer = createProxy(http.createServer());
proxyServer = createProxy(http.createServer())
await new Promise(resolve => {
const port = Number(proxyUrl.split(':')[2])
proxyServer.listen(port, () => resolve('mockResolve'))