mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-06 13:43:17 +08:00
disabling any for proxy, removing vuln dep
This commit is contained in:
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user