Loading packages/next/src/index.ts +12 −16 Original line number Diff line number Diff line Loading @@ -27,13 +27,11 @@ type ErrorHandlers = Omit<FederationFetchOptions<unknown>, "contextData">; * * @template TContextData A type of the context data for the * {@link Federation} object. * @param {Federation<TContextData>} federation A {@link Federation} object * to integrate with Next.js. * @param {ContextDataFactory<TContextData>} contextDataFactory A function * to create a context data for the * @param federation A {@link Federation} object to integrate with Next.js. * @param contextDataFactory A function to create a context data for the * {@link Federation} object. * @param {Partial<ErrorHandlers>} errorHandlers A set of error handlers to * handle errors during the federation fetch. * @param errorHandlers A set of error handlers to handle errors during * the federation fetch. * @returns A Next.js middleware function to integrate with the * {@link Federation} object. * Loading Loading @@ -92,8 +90,8 @@ async (request: Request) => { * Check if the request has the "Accept" header matching the federation * accept regex. * * @param {Request} request The request to check. * @returns {boolean} `true` if the request has the "Accept" header matching * @param request The request to check. * @returns `true` if the request has the "Accept" header matching * the federation accept regex, `false` otherwise. */ export const hasFederationAcceptHeader = (request: Request): boolean => { Loading @@ -110,13 +108,11 @@ const FEDERATION_ACCEPT_REGEX = * * @template TContextData A type of the context data for the * {@link Federation} object. * @param {Federation<TContextData>} federation A {@link Federation} object * to integrate with Next.js. * @param {ContextDataFactory<TContextData>} contextDataFactory A function * to create a context data for the * @param federation A {@link Federation} object to integrate with Next.js. * @param contextDataFactory A function to create a context data for the * {@link Federation} object. * @param {Partial<ErrorHandlers>} errorHandlers A set of error handlers to * handle errors during the federation fetch. * @param errorHandlers A set of error handlers to handle errors during * the federation fetch. * @returns A Next.js handler. */ export function integrateFederation<TContextData>( Loading Loading
packages/next/src/index.ts +12 −16 Original line number Diff line number Diff line Loading @@ -27,13 +27,11 @@ type ErrorHandlers = Omit<FederationFetchOptions<unknown>, "contextData">; * * @template TContextData A type of the context data for the * {@link Federation} object. * @param {Federation<TContextData>} federation A {@link Federation} object * to integrate with Next.js. * @param {ContextDataFactory<TContextData>} contextDataFactory A function * to create a context data for the * @param federation A {@link Federation} object to integrate with Next.js. * @param contextDataFactory A function to create a context data for the * {@link Federation} object. * @param {Partial<ErrorHandlers>} errorHandlers A set of error handlers to * handle errors during the federation fetch. * @param errorHandlers A set of error handlers to handle errors during * the federation fetch. * @returns A Next.js middleware function to integrate with the * {@link Federation} object. * Loading Loading @@ -92,8 +90,8 @@ async (request: Request) => { * Check if the request has the "Accept" header matching the federation * accept regex. * * @param {Request} request The request to check. * @returns {boolean} `true` if the request has the "Accept" header matching * @param request The request to check. * @returns `true` if the request has the "Accept" header matching * the federation accept regex, `false` otherwise. */ export const hasFederationAcceptHeader = (request: Request): boolean => { Loading @@ -110,13 +108,11 @@ const FEDERATION_ACCEPT_REGEX = * * @template TContextData A type of the context data for the * {@link Federation} object. * @param {Federation<TContextData>} federation A {@link Federation} object * to integrate with Next.js. * @param {ContextDataFactory<TContextData>} contextDataFactory A function * to create a context data for the * @param federation A {@link Federation} object to integrate with Next.js. * @param contextDataFactory A function to create a context data for the * {@link Federation} object. * @param {Partial<ErrorHandlers>} errorHandlers A set of error handlers to * handle errors during the federation fetch. * @param errorHandlers A set of error handlers to handle errors during * the federation fetch. * @returns A Next.js handler. */ export function integrateFederation<TContextData>( Loading