@aglyn/shared-util-email 1.0.0-beta.143 → 1.0.0-beta.145

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.
Files changed (2) hide show
  1. package/README.md +12 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,12 +1,18 @@
1
1
  # @aglyn/shared-util-email
2
2
 
3
+ > Beta. Published from the Aglyn monorepo under the `beta` dist-tag; APIs can change between beta releases.
4
+
5
+ ## Install
6
+
7
+ npm install @aglyn/shared-util-email@beta
8
+
3
9
  One place that sends outbound **application** email, via
4
10
  [Resend](https://resend.com).
5
11
 
6
12
  Before this library the same ~30 lines of `fetch('https://api.resend.com/emails')`
7
13
  were copy-pasted across 10 files, each reading the env vars itself and each
8
14
  handling failure a little differently. Consolidating them means the provider,
9
- the sender identity, and the failure semantics change in one place (AGL-709).
15
+ the sender identity, and the failure semantics change in one place.
10
16
 
11
17
  ## What is and is not in scope
12
18
 
@@ -52,7 +58,7 @@ if (!result.sent) {
52
58
  `sendEmail()` **never throws**. Outbound mail is best-effort everywhere in
53
59
  this codebase — a checkout must not fail because a receipt bounced — so every
54
60
  outcome comes back as a result object. Do check `sent`: it is what lets the
55
- console tell a user honestly whether a message actually went out (AGL-708).
61
+ console tell a user honestly whether a message actually went out.
56
62
 
57
63
  Optional fields: `html`, `headers` (e.g. `List-Unsubscribe`), `tags` (webhook
58
64
  attribution), `replyTo`, and `from` (overrides the configured sender — rarely
@@ -102,3 +108,7 @@ Run `nx test shared-util-email` to execute the unit tests via
102
108
 
103
109
  Note: prefer bare `jest` over `nx test` when a test depends on env vars — `nx`
104
110
  injects the root `.env`, which can turn a genuinely failing test green.
111
+
112
+ ## License
113
+
114
+ Apache-2.0. Source: https://github.com/aglyn/aglyn/tree/main/libs/shared/util/email
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/shared-util-email",
3
- "version": "1.0.0-beta.143",
3
+ "version": "1.0.0-beta.145",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,8 +25,8 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/shared-data-enums": "1.0.0-beta.143",
29
- "@aglyn/shared-util-http": "1.0.0-beta.143",
28
+ "@aglyn/shared-data-enums": "1.0.0-beta.145",
29
+ "@aglyn/shared-util-http": "1.0.0-beta.145",
30
30
  "@msgpack/msgpack": "^3.1.3",
31
31
  "@swc/helpers": "0.5.23"
32
32
  },