diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 251830e..7b343a3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -# Copyright 2024 EPAM Systems +# Copyright 2025 EPAM Systems # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -19,7 +19,7 @@ on: permissions: id-token: write # Required for NPM OIDC - contents: write + contents: read jobs: build: @@ -38,7 +38,7 @@ jobs: - name: Run tests and check coverage run: npm run test:coverage - publish-to-npm-and-gpr: + publish-to-npm: needs: build runs-on: ubuntu-latest steps: @@ -55,17 +55,3 @@ jobs: run: | npm config list npm publish --access public - - name: Set up Node.js - uses: actions/setup-node@v6 - with: - node-version: 24 - registry-url: 'https://npm.pkg.github.com' - scope: '@reportportal' - - name: Publish to GPR - run: | - npm config set //npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN - npm config set scope '@reportportal' - npm config list - npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 00fc050..e2146f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### Fixed +- The default agent params overriding via `restClientConfig.agent`. Fixes [agent-js-playwright#193](https://github.com/reportportal/agent-js-playwright/issues/193). ## [5.5.3] - 2025-11-06 ### Changed diff --git a/VERSION b/VERSION index d4e5069..060fc45 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.5.3 +5.5.4-SNAPSHOT diff --git a/lib/rest.js b/lib/rest.js index cf4ca73..b5f752f 100644 --- a/lib/rest.js +++ b/lib/rest.js @@ -65,10 +65,12 @@ class RestClient { request(method, url, data, options = {}) { // Only apply proxy agents if custom agents are not explicitly provided - // Priority: explicit httpsAgent/httpAgent > proxy config > default + // Priority: explicit httpsAgent/httpAgent/agent > proxy config > default const hasCustomAgents = this.restClientConfig && - ('httpsAgent' in this.restClientConfig || 'httpAgent' in this.restClientConfig); + ('httpsAgent' in this.restClientConfig || + 'httpAgent' in this.restClientConfig || + 'agent' in this.restClientConfig); const proxyAgents = hasCustomAgents ? {} : getProxyAgentForUrl(url, this.restClientConfig); const usingProxyAgent = Object.keys(proxyAgents).length > 0;