MCPcopy
hub / github.com/di-sukharev/opencommit / createRedirectInterceptor

Function createRedirectInterceptor

out/cli.cjs:53659–53671  ·  view source on GitHub ↗
({ maxRedirections: defaultMaxRedirections })

Source from the content-addressed store, hash-verified

53657 }
53658});
53659
53660// node_modules/undici/lib/interceptor/redirectInterceptor.js
53661var require_redirectInterceptor = __commonJS({
53662 "node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports2, module2) {
53663 "use strict";
53664 var RedirectHandler = require_RedirectHandler();
53665 function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) {
53666 return (dispatch) => {
53667 return function Intercept(opts, handler) {
53668 const { maxRedirections = defaultMaxRedirections } = opts;
53669 if (!maxRedirections) {
53670 return dispatch(opts, handler);
53671 }
53672 const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler);
53673 opts = { ...opts, maxRedirections: 0 };
53674 return dispatch(opts, redirectHandler);

Callers 1

constructorMethod · 0.85

Calls 1

dispatchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…