@clerk/express 2.1.25 → 2.1.26-canary.v20260610190754

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,14 +1,13 @@
1
- import { ClerkClient } from '@clerk/backend';
2
- export * from '@clerk/backend';
3
- import { C as ClerkMiddlewareOptions, a as ClerkMiddlewareOptionsCallback, A as AuthenticateRequestParams } from './index-BhfTSxUD.mjs';
4
- export { E as ExpressRequestWithAuth } from './index-BhfTSxUD.mjs';
5
- import { RequestHandler, Request } from 'express';
6
- import { GetAuthFn, RequestState } from '@clerk/backend/internal';
7
- import '@clerk/shared/types';
8
- import '@clerk/shared/proxy';
1
+ import { i as ExpressRequestWithAuth, n as ClerkMiddlewareOptions, r as ClerkMiddlewareOptionsCallback, t as AuthenticateRequestParams } from "./types-CRXNc42W.mjs";
2
+ import { ClerkClient } from "@clerk/backend";
3
+ import { GetAuthFn, RequestState } from "@clerk/backend/internal";
4
+ import { Request, RequestHandler } from "express";
5
+ export * from "@clerk/backend";
9
6
 
7
+ //#region src/clerkClient.d.ts
10
8
  declare const clerkClient: ClerkClient;
11
-
9
+ //#endregion
10
+ //#region src/clerkMiddleware.d.ts
12
11
  /**
13
12
  * Middleware that integrates Clerk authentication into your Express application.
14
13
  * It checks the request's cookies and headers for a session JWT and, if found,
@@ -35,7 +34,8 @@ declare const clerkClient: ClerkClient;
35
34
  * })));
36
35
  */
37
36
  declare const clerkMiddleware: (options?: ClerkMiddlewareOptions | ClerkMiddlewareOptionsCallback) => RequestHandler;
38
-
37
+ //#endregion
38
+ //#region src/getAuth.d.ts
39
39
  /**
40
40
  * Retrieves the Clerk AuthObject using the current request object.
41
41
  *
@@ -44,7 +44,8 @@ declare const clerkMiddleware: (options?: ClerkMiddlewareOptions | ClerkMiddlewa
44
44
  * @throws {Error} `clerkMiddleware` or `requireAuth` is required to be set in the middleware chain before this util is used.
45
45
  */
46
46
  declare const getAuth: GetAuthFn<Request>;
47
-
47
+ //#endregion
48
+ //#region src/requireAuth.d.ts
48
49
  /**
49
50
  * Middleware to require authentication for user requests.
50
51
  * Redirects unauthenticated requests to the sign-in url.
@@ -72,7 +73,8 @@ declare const getAuth: GetAuthFn<Request>;
72
73
  * })
73
74
  */
74
75
  declare const requireAuth: (options?: ClerkMiddlewareOptions) => RequestHandler;
75
-
76
+ //#endregion
77
+ //#region src/authenticateRequest.d.ts
76
78
  /**
77
79
  * @internal
78
80
  * Authenticates an Express request by wrapping clerkClient.authenticateRequest and
@@ -84,5 +86,6 @@ declare const requireAuth: (options?: ClerkMiddlewareOptions) => RequestHandler;
84
86
  * @param opts.options - Optional middleware configuration options
85
87
  */
86
88
  declare const authenticateRequest: (opts: AuthenticateRequestParams) => Promise<RequestState<"session_token">>;
87
-
88
- export { ClerkMiddlewareOptions, ClerkMiddlewareOptionsCallback, authenticateRequest, clerkClient, clerkMiddleware, getAuth, requireAuth };
89
+ //#endregion
90
+ export { type ClerkMiddlewareOptions, type ClerkMiddlewareOptionsCallback, type ExpressRequestWithAuth, authenticateRequest, clerkClient, clerkMiddleware, getAuth, requireAuth };
91
+ //# sourceMappingURL=index.d.mts.map
package/dist/index.d.ts CHANGED
@@ -1,14 +1,13 @@
1
- import { ClerkClient } from '@clerk/backend';
2
- export * from '@clerk/backend';
3
- import { C as ClerkMiddlewareOptions, a as ClerkMiddlewareOptionsCallback, A as AuthenticateRequestParams } from './index-BhfTSxUD.js';
4
- export { E as ExpressRequestWithAuth } from './index-BhfTSxUD.js';
5
- import { RequestHandler, Request } from 'express';
6
- import { GetAuthFn, RequestState } from '@clerk/backend/internal';
7
- import '@clerk/shared/types';
8
- import '@clerk/shared/proxy';
1
+ import { i as ExpressRequestWithAuth, n as ClerkMiddlewareOptions, r as ClerkMiddlewareOptionsCallback, t as AuthenticateRequestParams } from "./types-CRXNc42W.js";
2
+ import { ClerkClient } from "@clerk/backend";
3
+ import { GetAuthFn, RequestState } from "@clerk/backend/internal";
4
+ import { Request, RequestHandler } from "express";
5
+ export * from "@clerk/backend";
9
6
 
7
+ //#region src/clerkClient.d.ts
10
8
  declare const clerkClient: ClerkClient;
11
-
9
+ //#endregion
10
+ //#region src/clerkMiddleware.d.ts
12
11
  /**
13
12
  * Middleware that integrates Clerk authentication into your Express application.
14
13
  * It checks the request's cookies and headers for a session JWT and, if found,
@@ -35,7 +34,8 @@ declare const clerkClient: ClerkClient;
35
34
  * })));
36
35
  */
37
36
  declare const clerkMiddleware: (options?: ClerkMiddlewareOptions | ClerkMiddlewareOptionsCallback) => RequestHandler;
38
-
37
+ //#endregion
38
+ //#region src/getAuth.d.ts
39
39
  /**
40
40
  * Retrieves the Clerk AuthObject using the current request object.
41
41
  *
@@ -44,7 +44,8 @@ declare const clerkMiddleware: (options?: ClerkMiddlewareOptions | ClerkMiddlewa
44
44
  * @throws {Error} `clerkMiddleware` or `requireAuth` is required to be set in the middleware chain before this util is used.
45
45
  */
46
46
  declare const getAuth: GetAuthFn<Request>;
47
-
47
+ //#endregion
48
+ //#region src/requireAuth.d.ts
48
49
  /**
49
50
  * Middleware to require authentication for user requests.
50
51
  * Redirects unauthenticated requests to the sign-in url.
@@ -72,7 +73,8 @@ declare const getAuth: GetAuthFn<Request>;
72
73
  * })
73
74
  */
74
75
  declare const requireAuth: (options?: ClerkMiddlewareOptions) => RequestHandler;
75
-
76
+ //#endregion
77
+ //#region src/authenticateRequest.d.ts
76
78
  /**
77
79
  * @internal
78
80
  * Authenticates an Express request by wrapping clerkClient.authenticateRequest and
@@ -84,5 +86,6 @@ declare const requireAuth: (options?: ClerkMiddlewareOptions) => RequestHandler;
84
86
  * @param opts.options - Optional middleware configuration options
85
87
  */
86
88
  declare const authenticateRequest: (opts: AuthenticateRequestParams) => Promise<RequestState<"session_token">>;
87
-
88
- export { ClerkMiddlewareOptions, ClerkMiddlewareOptionsCallback, authenticateRequest, clerkClient, clerkMiddleware, getAuth, requireAuth };
89
+ //#endregion
90
+ export { type ClerkMiddlewareOptions, type ClerkMiddlewareOptionsCallback, type ExpressRequestWithAuth, authenticateRequest, clerkClient, clerkMiddleware, getAuth, requireAuth };
91
+ //# sourceMappingURL=index.d.ts.map