diff --git a/packages/github/package-lock.json b/packages/github/package-lock.json index 75cb88e1..590226bb 100644 --- a/packages/github/package-lock.json +++ b/packages/github/package-lock.json @@ -1,15 +1,15 @@ { "name": "@actions/github", - "version": "6.0.0", + "version": "6.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@actions/github", - "version": "6.0.0", + "version": "6.0.2", "license": "MIT", "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/plugin-paginate-rest": "^6.1.2", "@octokit/plugin-rest-endpoint-methods": "^7.2.3", @@ -21,9 +21,9 @@ } }, "node_modules/@actions/http-client": { - "version": "3.0.1", - "resolved": "file:../http-client/actions-http-client-3.0.1.tgz", - "integrity": "sha512-vb0zh02sfoY8TlAPKOvV8twM2xEuIxX48BQ+bikj5W5wMJ1zxwvly5Y5I0kBHRp4b9reGd8fsKbvWLUeNg1XSA==", + "version": "3.0.3", + "resolved": "file:actions-http-client-3.0.3.tgz", + "integrity": "sha512-oD3QP51ndN4IMUntw5mWcP7yZ/7c9cpLRejqbUwe9cT5vC72bWHLr5odlPzE+RAsoEVZMEkKazJbCjXdTzq8og==", "license": "MIT", "dependencies": { "tunnel": "^0.0.6" @@ -439,8 +439,8 @@ }, "dependencies": { "@actions/http-client": { - "version": "file:../http-client/actions-http-client-3.0.1.tgz", - "integrity": "sha512-vb0zh02sfoY8TlAPKOvV8twM2xEuIxX48BQ+bikj5W5wMJ1zxwvly5Y5I0kBHRp4b9reGd8fsKbvWLUeNg1XSA==", + "version": "file:actions-http-client-3.0.3.tgz", + "integrity": "sha512-oD3QP51ndN4IMUntw5mWcP7yZ/7c9cpLRejqbUwe9cT5vC72bWHLr5odlPzE+RAsoEVZMEkKazJbCjXdTzq8og==", "requires": { "tunnel": "^0.0.6" } diff --git a/packages/github/package.json b/packages/github/package.json index 6604badd..e7cb2db9 100644 --- a/packages/github/package.json +++ b/packages/github/package.json @@ -1,6 +1,6 @@ { "name": "@actions/github", - "version": "6.0.0", + "version": "6.0.2", "description": "Actions github lib", "keywords": [ "github", @@ -38,7 +38,7 @@ "url": "https://github.com/actions/toolkit/issues" }, "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/plugin-paginate-rest": "^6.1.2", "@octokit/plugin-rest-endpoint-methods": "^7.2.3", diff --git a/packages/github/src/internal/utils.ts b/packages/github/src/internal/utils.ts index 7993f9a9..d7edde7e 100644 --- a/packages/github/src/internal/utils.ts +++ b/packages/github/src/internal/utils.ts @@ -21,7 +21,7 @@ export function getProxyAgent(destinationUrl: string): http.Agent { return hc.getAgent(destinationUrl) } -export function getProxyAgentDispatcher(destinationUrl: string): ProxyAgent | Agent { +export function getProxyAgentDispatcher(destinationUrl: string): ProxyAgent | undefined { const hc = new httpClient.HttpClient() return hc.getAgentDispatcher(destinationUrl) } diff --git a/packages/http-client/__tests__/proxy.test.ts b/packages/http-client/__tests__/proxy.test.ts index 10e1dda5..dc7394d4 100644 --- a/packages/http-client/__tests__/proxy.test.ts +++ b/packages/http-client/__tests__/proxy.test.ts @@ -299,19 +299,19 @@ describe('proxy', () => { it('proxy settings return ProxyAgent', async () => { process.env['https_proxy'] = 'http://127.0.0.1:8080' 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 console.log(agent) expect(agent instanceof ProxyAgent).toBe(true) }) - it('proxyAuth is set in tunnel agent when authentication is provided', async () => { - const httpClient = new httpm.HttpClient() - const agent: Agent | ProxyAgent = httpClient.getAgentDispatcher('https://some-url') - // eslint-disable-next-line no-console - console.log(agent) - expect(agent instanceof Agent).toBe(true) - }) + // it('proxyAuth is set in tunnel agent when authentication is provided', async () => { + // const httpClient = new httpm.HttpClient() + // const agent: Agent | ProxyAgent = httpClient.getAgentDispatcher('https://some-url') + // // eslint-disable-next-line no-console + // console.log(agent) + // expect(agent instanceof Agent).toBe(true) + // }) }) function _clearVars(): void { diff --git a/packages/http-client/actions-http-client-3.0.3.tgz b/packages/http-client/actions-http-client-3.0.3.tgz new file mode 100644 index 00000000..be855f4e Binary files /dev/null and b/packages/http-client/actions-http-client-3.0.3.tgz differ diff --git a/packages/http-client/package-lock.json b/packages/http-client/package-lock.json index 8391d4f4..9ace83e5 100644 --- a/packages/http-client/package-lock.json +++ b/packages/http-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@actions/http-client", - "version": "3.0.0", + "version": "3.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@actions/http-client", - "version": "3.0.0", + "version": "3.0.3", "license": "MIT", "dependencies": { "tunnel": "^0.0.6" diff --git a/packages/http-client/package.json b/packages/http-client/package.json index eea1ea25..f8930d06 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -1,6 +1,6 @@ { "name": "@actions/http-client", - "version": "3.0.1", + "version": "3.0.3", "description": "Actions Http Client", "keywords": [ "github", diff --git a/packages/http-client/src/index.ts b/packages/http-client/src/index.ts index 9566ad78..f8f18988 100644 --- a/packages/http-client/src/index.ts +++ b/packages/http-client/src/index.ts @@ -567,7 +567,7 @@ export class HttpClient { return this._getAgent(parsedUrl) } - getAgentDispatcher(serverUrl: string): ProxyAgent | Agent { + getAgentDispatcher(serverUrl: string): ProxyAgent | undefined { const parsedUrl = new URL(serverUrl) const proxyUrl = pm.getProxyUrl(parsedUrl) const useProxy = proxyUrl && proxyUrl.hostname @@ -575,7 +575,7 @@ export class HttpClient { return this._getProxyAgentDispatcher(parsedUrl, proxyUrl) } else { - return this._getAgentDispatcher(parsedUrl) + return; } }