Skip to content

Commit

Permalink
fix(fastify): Re-export @clerk/backend (#2968)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkl authored Mar 11, 2024
1 parent 2964f8a commit 629881c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .changeset/famous-bugs-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
'@clerk/fastify': minor
---

Re-export everything from `@clerk/backend` in `@clerk/fastify` to support common backend types and functionality without adding `@clerk/backend` as dependency.

New exports:
- `verifyToken()`

New exported types:
- `ClerkOptions`
- `ClerkClient`
- `OrganizationMembershipRole`
- `VerifyTokenOptions`
- `WebhookEvent`
- `WebhookEventType`
- `AllowlistIdentifier`
- `Client`
- `EmailAddress`
- `ExternalAccount`
- `Invitation`
- `OauthAccessToken`
- `Organization`
- `OrganizationInvitation`
- `OrganizationMembership`
- `OrganizationMembershipPublicUserData`
- `PhoneNumber`
- `Session`
- `SignInToken`
- `SMSMessage`
- `Token`
- `User`
1 change: 1 addition & 0 deletions packages/fastify/src/__snapshots__/exports.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ exports[`/api public exports should not include a breaking change 1`] = `
"clerkPlugin",
"createClerkClient",
"getAuth",
"verifyToken",
]
`;
2 changes: 0 additions & 2 deletions packages/fastify/src/clerkClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { createClerkClient } from '@clerk/backend';

import { API_URL, API_VERSION, JWT_KEY, SDK_METADATA, SECRET_KEY } from './constants';

export { createClerkClient };

export const clerkClient = createClerkClient({
secretKey: SECRET_KEY,
apiUrl: API_URL,
Expand Down
4 changes: 3 additions & 1 deletion packages/fastify/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export * from '@clerk/backend';

export type { ClerkFastifyOptions } from './types';

export { clerkPlugin } from './clerkPlugin';
export { getAuth } from './getAuth';
export { clerkClient, createClerkClient } from './clerkClient';
export { clerkClient } from './clerkClient';

0 comments on commit 629881c

Please sign in to comment.