@ultimat3/mail 31.32.0 → 31.34.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/package.json +7 -7
- package/src/driver-env.ts +6 -5
- package/src/driver.ts +5 -4
- package/src/envelope-address.ts +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/mail",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.34.0",
|
|
4
4
|
"description": "Transactional email as data: one template renders HTML and text, sent through a job.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ultimate",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"test": "bun test"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ultimat3/core": "31.
|
|
48
|
-
"@ultimat3/i18n": "31.
|
|
49
|
-
"@ultimat3/jobs": "31.
|
|
50
|
-
"@ultimat3/schema": "31.
|
|
51
|
-
"@ultimat3/storage": "31.
|
|
52
|
-
"@ultimat3/time": "31.
|
|
47
|
+
"@ultimat3/core": "31.34.0",
|
|
48
|
+
"@ultimat3/i18n": "31.34.0",
|
|
49
|
+
"@ultimat3/jobs": "31.34.0",
|
|
50
|
+
"@ultimat3/schema": "31.34.0",
|
|
51
|
+
"@ultimat3/storage": "31.34.0",
|
|
52
|
+
"@ultimat3/time": "31.34.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/src/driver-env.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// Single responsibility: environment → transport. The one place that decides which `MailDriver`
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// deploys to
|
|
1
|
+
// Single responsibility: environment → transport. The one place that decides which `MailDriver` a
|
|
2
|
+
// boot installs, so `x dev`, a worker container and any custom host all resolve it identically.
|
|
3
|
+
//
|
|
4
|
+
// The two production transports are useless until something constructs them from a credential; this
|
|
5
|
+
// is that something, and it is keyed on env rather than a config field so the same image deploys to
|
|
6
|
+
// every environment.
|
|
6
7
|
|
|
7
8
|
import { ConfigInvalidError, isLocal, resolveEnvironment } from '@ultimat3/core';
|
|
8
9
|
import { type MailDriver, memoryMailDriver, unconfiguredMailDriver } from './driver';
|
package/src/driver.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Single responsibility: the transport seam. One `MailDriver` interface, the two local
|
|
2
|
-
// implementations (memory + log), and a module-level ambient driver so `send()` never knows
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
2
|
+
// implementations (memory + log), and a module-level ambient driver so `send()` never knows which
|
|
3
|
+
// one is installed.
|
|
4
|
+
//
|
|
5
|
+
// The two production transports live in `driver-smtp.ts` and `driver-resend.ts`; swapping one for
|
|
6
|
+
// the other is an `app.config.ts` line and zero template changes.
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
type Clock,
|
package/src/envelope-address.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// Single responsibility: what may appear inside an SMTP `MAIL FROM:<>` or `RCPT TO:<>`.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// the
|
|
1
|
+
// Single responsibility: what may appear inside an SMTP `MAIL FROM:<>` or `RCPT TO:<>`.
|
|
2
|
+
//
|
|
3
|
+
// One gate for the envelope, exactly as `mime.ts`'s `header()` is the one gate for the message —
|
|
4
|
+
// two wire formats, one check each, at the module that owns the format. It refuses, and it
|
|
5
|
+
// normalises one thing only — the RFC 5322 display form down to the mailbox `RCPT TO:` can carry,
|
|
6
|
+
// always after the control-character check, never before it.
|
|
6
7
|
|
|
7
8
|
import { type AddressRefusal, addressInvalid, type EnvelopeAddressField } from './errors';
|
|
8
9
|
import { addressSpec, hasNonAsciiAddrSpec } from './mime';
|