node_modules: update

This commit is contained in:
Dawid Dziurla 2024-01-06 13:51:02 +01:00
parent 63ec4f26a7
commit d33a5e2307
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B
193 changed files with 30796 additions and 147 deletions

View file

@ -0,0 +1,21 @@
'use strict'
const RedirectHandler = require('../handler/RedirectHandler')
function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) {
return (dispatch) => {
return function Intercept (opts, handler) {
const { maxRedirections = defaultMaxRedirections } = opts
if (!maxRedirections) {
return dispatch(opts, handler)
}
const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler)
opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting.
return dispatch(opts, redirectHandler)
}
}
}
module.exports = createRedirectInterceptor