mirror of https://github.com/actions/toolkit
takost/update-github-package
parent
844682e182
commit
904b21412d
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
"name": "@actions/github",
|
"name": "@actions/github",
|
||||||
"version": "6.0.0",
|
"version": "6.0.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/github",
|
"name": "@actions/github",
|
||||||
"version": "6.0.0",
|
"version": "6.0.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "file:../http-client/actions-http-client-3.0.1.tgz",
|
"@actions/http-client": "file:actions-http-client-3.0.3.tgz",
|
||||||
"@octokit/core": "^4.2.4",
|
"@octokit/core": "^4.2.4",
|
||||||
"@octokit/plugin-paginate-rest": "^6.1.2",
|
"@octokit/plugin-paginate-rest": "^6.1.2",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^7.2.3",
|
"@octokit/plugin-rest-endpoint-methods": "^7.2.3",
|
||||||
|
@ -21,9 +21,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.3",
|
||||||
"resolved": "file:../http-client/actions-http-client-3.0.1.tgz",
|
"resolved": "file:actions-http-client-3.0.3.tgz",
|
||||||
"integrity": "sha512-vb0zh02sfoY8TlAPKOvV8twM2xEuIxX48BQ+bikj5W5wMJ1zxwvly5Y5I0kBHRp4b9reGd8fsKbvWLUeNg1XSA==",
|
"integrity": "sha512-oD3QP51ndN4IMUntw5mWcP7yZ/7c9cpLRejqbUwe9cT5vC72bWHLr5odlPzE+RAsoEVZMEkKazJbCjXdTzq8og==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6"
|
"tunnel": "^0.0.6"
|
||||||
|
@ -439,8 +439,8 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": {
|
"@actions/http-client": {
|
||||||
"version": "file:../http-client/actions-http-client-3.0.1.tgz",
|
"version": "file:actions-http-client-3.0.3.tgz",
|
||||||
"integrity": "sha512-vb0zh02sfoY8TlAPKOvV8twM2xEuIxX48BQ+bikj5W5wMJ1zxwvly5Y5I0kBHRp4b9reGd8fsKbvWLUeNg1XSA==",
|
"integrity": "sha512-oD3QP51ndN4IMUntw5mWcP7yZ/7c9cpLRejqbUwe9cT5vC72bWHLr5odlPzE+RAsoEVZMEkKazJbCjXdTzq8og==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tunnel": "^0.0.6"
|
"tunnel": "^0.0.6"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@actions/github",
|
"name": "@actions/github",
|
||||||
"version": "6.0.0",
|
"version": "6.0.2",
|
||||||
"description": "Actions github lib",
|
"description": "Actions github lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "file:../actions-http-client-3.0.1.tgz",
|
"@actions/http-client": "file:actions-http-client-3.0.3.tgz",
|
||||||
"@octokit/core": "^4.2.4",
|
"@octokit/core": "^4.2.4",
|
||||||
"@octokit/plugin-paginate-rest": "^6.1.2",
|
"@octokit/plugin-paginate-rest": "^6.1.2",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^7.2.3",
|
"@octokit/plugin-rest-endpoint-methods": "^7.2.3",
|
||||||
|
|
|
@ -21,7 +21,7 @@ export function getProxyAgent(destinationUrl: string): http.Agent {
|
||||||
return hc.getAgent(destinationUrl)
|
return hc.getAgent(destinationUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getProxyAgentDispatcher(destinationUrl: string): ProxyAgent | Agent {
|
export function getProxyAgentDispatcher(destinationUrl: string): ProxyAgent | undefined {
|
||||||
const hc = new httpClient.HttpClient()
|
const hc = new httpClient.HttpClient()
|
||||||
return hc.getAgentDispatcher(destinationUrl)
|
return hc.getAgentDispatcher(destinationUrl)
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,19 +299,19 @@ describe('proxy', () => {
|
||||||
it('proxy settings return ProxyAgent', async () => {
|
it('proxy settings return ProxyAgent', async () => {
|
||||||
process.env['https_proxy'] = 'http://127.0.0.1:8080'
|
process.env['https_proxy'] = 'http://127.0.0.1:8080'
|
||||||
const httpClient = new httpm.HttpClient()
|
const httpClient = new httpm.HttpClient()
|
||||||
const agent: Agent | ProxyAgent = httpClient.getAgentDispatcher('https://some-url')
|
const agent = httpClient.getAgentDispatcher('https://some-url')
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(agent)
|
console.log(agent)
|
||||||
expect(agent instanceof ProxyAgent).toBe(true)
|
expect(agent instanceof ProxyAgent).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('proxyAuth is set in tunnel agent when authentication is provided', async () => {
|
// it('proxyAuth is set in tunnel agent when authentication is provided', async () => {
|
||||||
const httpClient = new httpm.HttpClient()
|
// const httpClient = new httpm.HttpClient()
|
||||||
const agent: Agent | ProxyAgent = httpClient.getAgentDispatcher('https://some-url')
|
// const agent: Agent | ProxyAgent = httpClient.getAgentDispatcher('https://some-url')
|
||||||
// eslint-disable-next-line no-console
|
// // eslint-disable-next-line no-console
|
||||||
console.log(agent)
|
// console.log(agent)
|
||||||
expect(agent instanceof Agent).toBe(true)
|
// expect(agent instanceof Agent).toBe(true)
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
|
|
||||||
function _clearVars(): void {
|
function _clearVars(): void {
|
||||||
|
|
Binary file not shown.
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@actions/http-client",
|
"name": "@actions/http-client",
|
||||||
"version": "3.0.0",
|
"version": "3.0.3",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/http-client",
|
"name": "@actions/http-client",
|
||||||
"version": "3.0.0",
|
"version": "3.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6"
|
"tunnel": "^0.0.6"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@actions/http-client",
|
"name": "@actions/http-client",
|
||||||
"version": "3.0.1",
|
"version": "3.0.3",
|
||||||
"description": "Actions Http Client",
|
"description": "Actions Http Client",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
|
|
|
@ -567,7 +567,7 @@ export class HttpClient {
|
||||||
return this._getAgent(parsedUrl)
|
return this._getAgent(parsedUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
getAgentDispatcher(serverUrl: string): ProxyAgent | Agent {
|
getAgentDispatcher(serverUrl: string): ProxyAgent | undefined {
|
||||||
const parsedUrl = new URL(serverUrl)
|
const parsedUrl = new URL(serverUrl)
|
||||||
const proxyUrl = pm.getProxyUrl(parsedUrl)
|
const proxyUrl = pm.getProxyUrl(parsedUrl)
|
||||||
const useProxy = proxyUrl && proxyUrl.hostname
|
const useProxy = proxyUrl && proxyUrl.hostname
|
||||||
|
@ -575,7 +575,7 @@ export class HttpClient {
|
||||||
return this._getProxyAgentDispatcher(parsedUrl, proxyUrl)
|
return this._getProxyAgentDispatcher(parsedUrl, proxyUrl)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return this._getAgentDispatcher(parsedUrl)
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue