bump version in package.json, upgrade dependencies

This commit is contained in:
Egor Tensin 2024-01-28 11:18:12 +01:00
parent 33bc58ef4a
commit 2d40e8046a
188 changed files with 30772 additions and 71 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