groundmail-clerk 0.0.0-stage → 0.14.1

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/README.md CHANGED
@@ -1,3 +1,46 @@
1
- # Temporary Holding Version
1
+ # groundmail-clerk
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Deliver [Clerk](https://clerk.com) auth emails through [Groundmail](https://groundmail.dev) when you disable **Delivered by Clerk**.
4
+
5
+ Clerk has no custom SMTP form — turn off delivery per template, listen for `email.created`, and send with Groundmail.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install groundmail-clerk groundmail
11
+ ```
12
+
13
+ ```bash
14
+ GROUNDMAIL_API_KEY=gm_your_key_here
15
+ GROUNDMAIL_FROM_EMAIL=noreply@yourdomain.com
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { verifyWebhook } from '@clerk/nextjs/webhooks'
22
+ import { createClerkEmailDeliverer } from 'groundmail-clerk'
23
+
24
+ const deliver = createClerkEmailDeliverer({
25
+ from: process.env.GROUNDMAIL_FROM_EMAIL!,
26
+ // apiKey: process.env.GROUNDMAIL_API_KEY,
27
+ })
28
+
29
+ export async function POST(req: Request) {
30
+ const evt = await verifyWebhook(req)
31
+ if (evt.type === 'email.created') {
32
+ await deliver(evt.data)
33
+ }
34
+ return new Response('ok')
35
+ }
36
+ ```
37
+
38
+ Also available as `import { createClerkEmailDeliverer } from 'groundmail/clerk'`.
39
+
40
+ ## Docs
41
+
42
+ https://docs.groundmail.dev/guides/clerk
43
+
44
+ ## License
45
+
46
+ MIT
@@ -0,0 +1 @@
1
+ export { ClerkEmailCreatedData, GroundmailClerkOptions, createClerkEmailDeliverer, deliverClerkEmail } from 'groundmail/clerk';
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ // src/index.ts
2
+ import {
3
+ createClerkEmailDeliverer,
4
+ deliverClerkEmail
5
+ } from "groundmail/clerk";
6
+ export {
7
+ createClerkEmailDeliverer,
8
+ deliverClerkEmail
9
+ };
package/package.json CHANGED
@@ -1,6 +1,56 @@
1
1
  {
2
2
  "name": "groundmail-clerk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.14.1",
4
+ "description": "Deliver Clerk email.created webhooks through Groundmail transactional email",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/Groundmail/groundmail-clerk.git"
22
+ },
23
+ "homepage": "https://docs.groundmail.dev/guides/clerk",
24
+ "bugs": {
25
+ "url": "https://github.com/Groundmail/groundmail-clerk/issues"
26
+ },
27
+ "keywords": [
28
+ "clerk",
29
+ "clerk-auth",
30
+ "email",
31
+ "webhook",
32
+ "transactional",
33
+ "groundmail",
34
+ "authentication"
35
+ ],
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "engines": {
40
+ "node": ">=18"
41
+ },
42
+ "peerDependencies": {
43
+ "groundmail": ">=0.13.0"
44
+ },
45
+ "devDependencies": {
46
+ "groundmail": "0.14.1",
47
+ "tsup": "^8.5.0",
48
+ "typescript": "^5",
49
+ "vitest": "^3.2.4"
50
+ },
51
+ "scripts": {
52
+ "build": "tsup src/index.ts --format esm --dts --clean",
53
+ "test": "vitest run",
54
+ "prepublishOnly": "npm run build"
55
+ }
56
+ }