@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 +17 -14
- package/dist/index.d.ts +17 -14
- package/dist/index.js +284 -356
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +272 -260
- package/dist/index.mjs.map +1 -1
- package/dist/types-CRXNc42W.d.mts +60 -0
- package/dist/types-CRXNc42W.d.ts +60 -0
- package/dist/types.d.mts +3 -6
- package/dist/types.d.ts +3 -6
- package/dist/types.js +0 -19
- package/dist/types.mjs +1 -1
- package/dist/utils-CqQ5EEog.js +122 -0
- package/dist/utils-CqQ5EEog.js.map +1 -0
- package/dist/utils-omvH-k_B.mjs +87 -0
- package/dist/utils-omvH-k_B.mjs.map +1 -0
- package/dist/webhooks.d.mts +7 -6
- package/dist/webhooks.d.ts +7 -6
- package/dist/webhooks.js +50 -64
- package/dist/webhooks.js.map +1 -1
- package/dist/webhooks.mjs +45 -28
- package/dist/webhooks.mjs.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-L77JF5KH.mjs +0 -79
- package/dist/chunk-L77JF5KH.mjs.map +0 -1
- package/dist/index-BhfTSxUD.d.mts +0 -58
- package/dist/index-BhfTSxUD.d.ts +0 -58
- package/dist/types.js.map +0 -1
- package/dist/types.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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 {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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
|