@coastweb/emdash-plugin-cloudflare-email 0.1.0 → 0.2.0

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
@@ -8,10 +8,19 @@ An [EmDash CMS](https://docs.emdashcms.com/introduction/) plugin that adds email
8
8
 
9
9
  You must have [Cloudflare Email Service](https://developers.cloudflare.com/email-service/) (available in public beta) enabled on the same Cloudflare account where you are deploying your emdash worker. You will need to configure a sending domain in Cloudflare before you can use this plugin.
10
10
 
11
+ ## Version compatibility
12
+
13
+ | Plugin version | EmDash version | Notes |
14
+ | --- | --- | --- |
15
+ | `0.2.x` | `1.5.0` and later | Tested on EmDash 1.5.0. The sandbox entry is a plain `{ hooks, routes }` object (`satisfies SandboxedPlugin`). EmDash 1.x rejects `definePlugin()` without an `id`, so `0.1.x` fails on 1.x with `definePlugin() requires id (got undefined)`. |
16
+ | `0.1.x` | `0.8.x` | Uses `definePlugin()`. Last release for EmDash 0.x. |
17
+
18
+ Upgrading EmDash from 0.x to 1.x? Upgrade this plugin to `0.2.0` at the same time. Versions of EmDash between `0.8` and `1.5` have not been tested with either release.
19
+
11
20
  ## Installation
12
21
 
13
22
  ```bash
14
- npm install @coastweb/@coastweb/emdash-plugin-cloudflare-email
23
+ npm install @coastweb/emdash-plugin-cloudflare-email
15
24
  ```
16
25
 
17
26
  ### 1. Add the `SEND_EMAIL` binding in `wrangler.jsonc` on your emdashcms worker
package/dist/index.mjs CHANGED
@@ -2,9 +2,9 @@
2
2
  function cloudflareEmailPlugin() {
3
3
  return {
4
4
  id: "cloudflare-email",
5
- version: "0.1.0",
5
+ version: "0.2.0",
6
6
  format: "standard",
7
- entrypoint: "emdash-plugin-cloudflare-email/sandbox",
7
+ entrypoint: "@coastweb/emdash-plugin-cloudflare-email/sandbox",
8
8
  options: {},
9
9
  capabilities: ["email:provide"],
10
10
  adminPages: [{ path: "/settings", label: "Cloudflare Email Settings", icon: "settings" }]
@@ -1,5 +1,4 @@
1
1
  // src/sandbox-entry.ts
2
- import { definePlugin } from "emdash";
3
2
  function buildMimeMessage(from, to, subject, text, html) {
4
3
  const boundary = `----=_Part_${Date.now()}`;
5
4
  const lines = [
@@ -20,7 +19,7 @@ function buildMimeMessage(from, to, subject, text, html) {
20
19
  }
21
20
  return lines.join("\r\n");
22
21
  }
23
- var sandbox_entry_default = definePlugin({
22
+ var sandbox_entry_default = {
24
23
  hooks: {
25
24
  "email:deliver": {
26
25
  exclusive: true,
@@ -99,7 +98,7 @@ var sandbox_entry_default = definePlugin({
99
98
  }
100
99
  }
101
100
  }
102
- });
101
+ };
103
102
  export {
104
103
  sandbox_entry_default as default
105
104
  };
package/package.json CHANGED
@@ -1,21 +1,33 @@
1
1
  {
2
2
  "name": "@coastweb/emdash-plugin-cloudflare-email",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
- ".": { "import": "./dist/index.mjs", "types": "./dist/index.d.ts" },
7
- "./sandbox": { "import": "./dist/sandbox-entry.mjs" }
6
+ ".": {
7
+ "import": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts"
9
+ },
10
+ "./sandbox": {
11
+ "import": "./dist/sandbox-entry.mjs"
12
+ }
8
13
  },
9
- "files": ["dist"],
14
+ "files": [
15
+ "dist"
16
+ ],
10
17
  "scripts": {
11
18
  "build": "tsup",
12
19
  "dev": "tsup --watch"
13
20
  },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/immber/emdash-plugin-cloudflare-email.git"
24
+ },
14
25
  "peerDependencies": {
15
- "emdash": "*"
26
+ "emdash": ">=1.5.0"
16
27
  },
17
28
  "devDependencies": {
18
29
  "@cloudflare/workers-types": "^4.20260426.1",
30
+ "tsdown": "^0.21.10",
19
31
  "tsup": "^8.5.1",
20
32
  "typescript": "^5.9.3"
21
33
  }