Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

balena-request

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balena-request - npm Package Compare versions

Comparing version 11.1.0 to 11.2.0-explicit-token-refresh-base-url-268d84412ce90255a7e668d5731f8de8a6f897b5

5

build/request.js

@@ -29,2 +29,3 @@ "use strict";

* @param {import('balena-auth').default} options.auth
* @param {string} [options.tokenRefreshBaseUrl]
* @param {boolean} options.debug

@@ -35,3 +36,3 @@ * @param {number} options.retries

*/
function getRequest({ auth, debug = false, retries = 0, isBrowser = false, interceptors = [], }) {
function getRequest({ auth, tokenRefreshBaseUrl, debug = false, retries = 0, isBrowser = false, interceptors = [], }) {
const requestAsync = utils.getRequestAsync();

@@ -66,3 +67,3 @@ const requestStream = isBrowser

if (shouldRefreshKey) {
yield exports.refreshToken({ baseUrl });
yield exports.refreshToken({ baseUrl: tokenRefreshBaseUrl !== null && tokenRefreshBaseUrl !== void 0 ? tokenRefreshBaseUrl : baseUrl });
}

@@ -69,0 +70,0 @@ }

@@ -7,2 +7,7 @@ # Change Log

# v11.2.0
## (2020-08-13)
* Add tokenRefreshBaseUrl option to limit the refresh token targets [Thodoris Greasidis]
# v11.1.0

@@ -9,0 +14,0 @@ ## (2020-07-16)

4

lib/request.js

@@ -28,2 +28,3 @@ /*

* @param {import('balena-auth').default} options.auth
* @param {string} [options.tokenRefreshBaseUrl]
* @param {boolean} options.debug

@@ -36,2 +37,3 @@ * @param {number} options.retries

auth,
tokenRefreshBaseUrl,
debug = false,

@@ -86,3 +88,3 @@ retries = 0,

if (shouldRefreshKey) {
await exports.refreshToken({ baseUrl });
await exports.refreshToken({ baseUrl: tokenRefreshBaseUrl ?? baseUrl });
}

@@ -89,0 +91,0 @@ }

{
"name": "balena-request",
"version": "11.1.0",
"version": "11.2.0-explicit-token-refresh-base-url-268d84412ce90255a7e668d5731f8de8a6f897b5",
"description": "Balena HTTP client",

@@ -5,0 +5,0 @@ "main": "build/request.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc