From c8d3d0339b4095d9d464534572019deac953ad6b Mon Sep 17 00:00:00 2001 From: Mihaly Lengyel Date: Sat, 7 Oct 2023 01:24:29 +0200 Subject: [PATCH] fix: getAppDirRequestHandler export --- lib/build/nextjs.d.ts | 3 ++- lib/build/nextjs.js | 5 +++-- lib/ts/nextjs.ts | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/build/nextjs.d.ts b/lib/build/nextjs.d.ts index 92d70402c..2add84932 100644 --- a/lib/build/nextjs.d.ts +++ b/lib/build/nextjs.d.ts @@ -21,7 +21,8 @@ export default class NextJS { ): Promise; static getAppDirRequestHandler( NextResponse: typeof Response - ): Promise<(req: T) => Promise>; + ): (req: T) => Promise; } export declare let superTokensNextWrapper: typeof NextJS.superTokensNextWrapper; +export declare let getAppDirRequestHandler: typeof NextJS.getAppDirRequestHandler; export {}; diff --git a/lib/build/nextjs.js b/lib/build/nextjs.js index 783c7fdb2..6c0306f3c 100644 --- a/lib/build/nextjs.js +++ b/lib/build/nextjs.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.superTokensNextWrapper = void 0; +exports.getAppDirRequestHandler = exports.superTokensNextWrapper = void 0; /* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. * * This software is licensed under the Apache License, Version 2.0 (the @@ -53,7 +53,7 @@ class NextJS { } }); } - static async getAppDirRequestHandler(NextResponse) { + static getAppDirRequestHandler(NextResponse) { const stMiddleware = custom_1.middleware((req) => { const query = Object.fromEntries(new URL(req.url).searchParams.entries()); const cookies = Object.fromEntries(req.cookies.getAll().map((cookie) => [cookie.name, cookie.value])); @@ -98,3 +98,4 @@ class NextJS { } exports.default = NextJS; exports.superTokensNextWrapper = NextJS.superTokensNextWrapper; +exports.getAppDirRequestHandler = NextJS.getAppDirRequestHandler; diff --git a/lib/ts/nextjs.ts b/lib/ts/nextjs.ts index a1e492935..bb978f4e4 100644 --- a/lib/ts/nextjs.ts +++ b/lib/ts/nextjs.ts @@ -77,7 +77,7 @@ export default class NextJS { }); } - static async getAppDirRequestHandler(NextResponse: typeof Response) { + static getAppDirRequestHandler(NextResponse: typeof Response) { const stMiddleware = middleware((req) => { const query = Object.fromEntries(new URL(req.url).searchParams.entries()); const cookies: Record = Object.fromEntries( @@ -129,3 +129,4 @@ export default class NextJS { } } export let superTokensNextWrapper = NextJS.superTokensNextWrapper; +export let getAppDirRequestHandler = NextJS.getAppDirRequestHandler;