@pithy-sh/email 0.3.5 → 0.3.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,0CAA0C,CAAC;AAE7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACL,KAAK,wBAAwB,EAM9B,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAgB,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAe,KAAK,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAI/E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,EAAE,EAAE,UAAU,CAAC;IACf;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,UAAU,CAAC;CACjC;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,kGAAkG;AAClG,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiC8B,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,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;;;;;;;;OAWG;IACH,YAAY,EAAE,MAAM,cAAc,CAAC;CACpC;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,gBAAgB,GAAG,eAAe,CAqN/D;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,eAAe,CAEvF"}
@@ -15,7 +15,7 @@ import { DevMailDelivery } from "./provision/devDelivery.js";
15
15
  import { emailHostCatalogs } from "./provision/hostCatalogs.js";
16
16
  import { emailSettings } from "./provision/settingsCheck.js";
17
17
  import { enqueueEmail } from "./send/enqueue.js";
18
- import { PACKAGE_VERSION } from "./version.generated.js";
18
+ import { PACKAGE_NAME, PACKAGE_VERSION } from "./version.generated.js";
19
19
  import { EmailScheduleParams, EmailSendParams } from "./workflows/params.js";
20
20
  import { z } from "zod";
21
21
  import { defineCapability } from "@pithy-sh/core/src/capability/capability";
@@ -82,6 +82,7 @@ function email(config) {
82
82
  const capability = defineCapability({
83
83
  name: "email",
84
84
  version: PACKAGE_VERSION,
85
+ package: PACKAGE_NAME,
85
86
  dependsOn: ["secrets"],
86
87
  secretRegistry: emailSigningRegistry,
87
88
  /**
@@ -3,5 +3,5 @@
3
3
  /** This package's npm name — the join key against a release feed. */
4
4
  export declare const PACKAGE_NAME = "@pithy-sh/email";
5
5
  /** This package's version, stamped from its own package.json at generation time. */
6
- export declare const PACKAGE_VERSION = "0.3.5";
6
+ export declare const PACKAGE_VERSION = "0.3.7";
7
7
  //# sourceMappingURL=version.generated.d.ts.map
@@ -4,6 +4,6 @@
4
4
  /** This package's npm name — the join key against a release feed. */
5
5
  const PACKAGE_NAME = "@pithy-sh/email";
6
6
  /** This package's version, stamped from its own package.json at generation time. */
7
- const PACKAGE_VERSION = "0.3.5";
7
+ const PACKAGE_VERSION = "0.3.7";
8
8
  //#endregion
9
9
  export { PACKAGE_NAME, PACKAGE_VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pithy-sh/email",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,8 +42,8 @@
42
42
  "postal-mime": "^3.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@pithy-sh/core": "^0.7.0",
46
- "@pithy-sh/secrets": "^0.2.5",
45
+ "@pithy-sh/core": "^0.7.3",
46
+ "@pithy-sh/secrets": "^0.2.6",
47
47
  "hono": "^4.13.2",
48
48
  "kysely": "^0.29.0",
49
49
  "zod": "^4.4.0"
@@ -56,6 +56,7 @@
56
56
  },
57
57
  {
58
58
  "key": "theme",
59
+ "choices": ["saffron", "midnight", "forest", "rose"],
59
60
  "default": "saffron",
60
61
  "describe": "An off-the-shelf theme to bootstrap from: `saffron` (Pithy default), `midnight` (blue), `forest` (green), or `rose` (warm). Fine-tune it with a `customTheme` object in pithy.config.ts (accent, logo URLs, palette colors); body width is per-template, not a theme setting."
61
62
  },
@@ -66,6 +67,7 @@
66
67
  },
67
68
  {
68
69
  "key": "devDelivery",
70
+ "choices": ["remote", "simulator"],
69
71
  "default": "remote",
70
72
  "describe": "What the prebuilt email worker does with a message under `pithy dev`. The default, `remote`, SENDS REAL MAIL from your machine: the Worker runs locally and delivers through Cloudflare Email Service, so a magic link you trigger from localhost arrives in the real inbox — same DKIM, same delivery logs as production. It needs a Cloudflare login `wrangler dev` can use and a sending domain already onboarded. Set `simulator` to send nothing: wrangler logs the sender, recipient and subject and writes the rendered bodies to disk, which is what an offline machine and CI want. Local development only — every deployed environment always sends for real."
71
73
  }
package/src/capability.ts CHANGED
@@ -28,7 +28,7 @@ import { type EnqueueInput, type EnqueueResult, enqueueEmail } from "./send/enqu
28
28
  import { type EmailSenderEnv, emailSenderBinding } from "./send/senderBinding";
29
29
  import { EMAIL_MESSAGES, type EmailMessageLayers, kitEmailLayers } from "./templates/messages";
30
30
  import { CustomTheme, type EmailTheme, resolveTheme } from "./templates/theme";
31
- import { PACKAGE_VERSION } from "./version.generated";
31
+ import { PACKAGE_NAME, PACKAGE_VERSION } from "./version.generated";
32
32
  import { EmailScheduleParams, EmailSendParams } from "./workflows/params";
33
33
 
34
34
  /**
@@ -195,9 +195,12 @@ export function email(config: EmailConfigInput): EmailCapability {
195
195
  let supportedLocales: readonly string[] = [];
196
196
  const capability = defineCapability({
197
197
  name: "email",
198
- // The package version this capability ships at, stamped by `scripts/stampVersions.ts` — a Worker
199
- // cannot read its own package.json. Reported per capability by the control-plane manifest.
198
+ // The package this capability ships in and the version it ships at, both stamped by
199
+ // `scripts/stampVersions.ts` — a Worker cannot read its own package.json. Reported per capability by
200
+ // the control-plane manifest, and reported together: a release feed is keyed by package name, so the
201
+ // version alone leaves a client guessing the key (#626).
200
202
  version: PACKAGE_VERSION,
203
+ package: PACKAGE_NAME,
201
204
  // The link-signing key is read through @pithy-sh/secrets, so the secrets capability must be
202
205
  // composed; createBackend fails fast if it isn't (rather than 500-ing each link-signing request).
203
206
  dependsOn: ["secrets"],
@@ -13,4 +13,4 @@
13
13
  export const PACKAGE_NAME = "@pithy-sh/email";
14
14
 
15
15
  /** This package's version, stamped from its own package.json at generation time. */
16
- export const PACKAGE_VERSION = "0.3.5";
16
+ export const PACKAGE_VERSION = "0.3.7";