@crvouga/mockingbird-service-mailosaur 3.0.0 → 3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog — @crvouga/mockingbird-service-mailosaur
2
2
 
3
+ ## 3.2.0 (2026-10-09)
4
+
5
+ ### Features
6
+
7
+ - match Emulate provider coverage ([16b65ce](https://github.com/crvouga/mockingbird/commit/16b65ce791fa216f28ec1521df636f57771d9c5e))
8
+
9
+ ### Dependencies
10
+
11
+ - `@crvouga/mockingbird-service-sqlite`
12
+
13
+ ## 3.1.0 (2026-10-08)
14
+
15
+ ### Features
16
+
17
+ - redesign emulator experience ([d6038c2](https://github.com/crvouga/mockingbird/commit/d6038c27eebbaa1751f02bc9305002a5b1304779))
18
+
3
19
  ## 3.0.0 (2026-10-07)
4
20
 
5
21
  ### ⚠️ Breaking changes
@@ -14,10 +30,6 @@
14
30
  - typecheck the brand gate before builds ([fc36095](https://github.com/crvouga/mockingbird/commit/fc3609514de70ffe3170a5d216fb8a49f9ce7cbb))
15
31
  - format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
16
32
 
17
- ### Dependencies
18
-
19
- - `@crvouga/mockingbird-service-sqlite`
20
-
21
33
  ## 2.3.0 (2026-10-04)
22
34
 
23
35
  ### Features
package/DISCOVERY.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @crvouga/mockingbird-service-mailosaur discovery
2
2
 
3
3
  This is the installed-package index for coding agents and tooling. All relative links resolve
4
- inside `node_modules/@crvouga/mockingbird-service-mailosaur/`; no repository checkout is needed to discover the mock's
4
+ inside `node_modules/@crvouga/mockingbird-service-mailosaur/`; no repository checkout is needed to discover the emulator's
5
5
  supported surface or documented behavior.
6
6
 
7
7
  ## Capability and behavior sources
@@ -48,7 +48,7 @@ designed for assertions and diagnosis by consuming test suites.
48
48
  ## Report a mismatch or missing capability
49
49
 
50
50
  Follow the [agent reporting contract](https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md). Include package version,
51
- operation/command, a minimal redacted request, actual mock result, expected oracle result or vendor
51
+ operation/command, a minimal redacted request, actual emulator result, expected oracle result or vendor
52
52
  documentation, and whether the mismatch appears in the matrix. Never include keys, tokens,
53
53
  customer data, prompts, PHI, card data, or unredacted recordings.
54
54
 
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # @crvouga/mockingbird-service-mailosaur
2
2
 
3
- > Familiar calls. Faithful echoes. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
3
+ > Local emulators. Real API contracts. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
4
4
 
5
- Stateful mock of the **Mailosaur** email/SMS testing API for test suites, plus an HTTP ingest so
6
- anything that "sends" mail (the Resend mock's `--forward-to-inbox`, the Twilio mock, Cognito
5
+ Stateful emulator of the **Mailosaur** email/SMS testing API for test suites, plus an HTTP ingest so
6
+ anything that "sends" mail (the Resend emulator's `--forward-to-inbox`, the Twilio emulator, Cognito
7
7
  hooks, a test) drops it into one inbox. The unmodified `mailosaur` SDK reads it: `messages.get`
8
8
  returns within ~20 ms of a message arriving instead of long-polling Mailosaur for up to 120 s,
9
9
  and `html.codes` / `text.codes` / `html.links` are parsed the way Mailosaur parses them.
@@ -28,8 +28,8 @@ any Fetch server.
28
28
 
29
29
  The SDK only speaks HTTPS (`https.request`, whatever the base URL's scheme) and **drops the base
30
30
  URL's port** (it passes only the hostname and path, so it always connects to 443). So a
31
- `MAILOSAUR_BASE_URL` alone (G-M1) only works if the mock listens on 443. The mock's secure port
32
- therefore also acts as an HTTP `CONNECT` proxy that tunnels **every** target into the mock (never
31
+ `MAILOSAUR_BASE_URL` alone (G-M1) only works if the emulator listens on 443. The emulator's secure port
32
+ therefore also acts as an HTTP `CONNECT` proxy that tunnels **every** target into the emulator (never
33
33
  to the network). The SDK honours `HTTPS_PROXY`, reading it once, when a client is constructed:
34
34
 
35
35
  ```bash
@@ -39,10 +39,10 @@ HTTPS_PROXY=http://127.0.0.1:8794 NODE_EXTRA_CA_CERTS=/tmp/mailosaur-mock.pem
39
39
  ```
40
40
 
41
41
  With that, `new MailosaurClient(apiKey)` keeps its default `https://mailosaur.com/` and every
42
- call lands in the mock. The generated certificate names `localhost`, `127.0.0.1` and
42
+ call lands in the emulator. The generated certificate names `localhost`, `127.0.0.1` and
43
43
  `mailosaur.com`. Set `HTTPS_PROXY` only around the SDK construction if the rest of the process
44
44
  must not see it, since other HTTP clients (axios) also read it and would be tunnelled into the
45
- mock too. If the mock can bind 443, `--tls-port 443` and `new MailosaurClient(key,
45
+ emulator too. If the emulator can bind 443, `--tls-port 443` and `new MailosaurClient(key,
46
46
  "https://127.0.0.1/")` work without the proxy.
47
47
 
48
48
  ```js
@@ -104,7 +104,7 @@ Auth is `Authorization: Basic base64(<api key>:)` (what the SDK sends); any key
104
104
 
105
105
  **Servers** are implicit. A message's server is, in order: the ingest's `server`, the id in a
106
106
  `<server>.mailosaur.net` recipient, or `*` (visible from every server id). `receivedAfter` keeps
107
- messages received at or after the instant (on the mock clock).
107
+ messages received at or after the instant (on the emulator clock).
108
108
 
109
109
  **Codes and links.** `codes[]` lists every distinct standalone run of 4–8 digits in the readable
110
110
  text (HTML without head, styles, scripts, tags; entities decoded), ignoring digits inside URLs.
@@ -130,15 +130,15 @@ Fault presets (`POST /__admin/faults {"preset": "<name>", "count"?: n}`; `GET /_
130
130
  The SDK cannot add headers, so a namespace can be chosen by API key:
131
131
  `PUT /__admin/credentials {"credentials": {"<MAILOSAUR_API_KEY>": "<namespace>"}}`. Also
132
132
  `x-mockingbird-namespace` or a `/__admin/ns/<name>` prefix for raw HTTP callers. Ingest into a namespace
133
- with `x-mockingbird-namespace` (the Resend mock forwards with its own namespace name).
133
+ with `x-mockingbird-namespace` (the Resend emulator forwards with its own namespace name).
134
134
 
135
135
  ### Deliberately not modelled
136
136
 
137
137
  - Real delivery: there is no SMTP listener. Mail arrives only through the ingest route,
138
- `messages.create`, or another mock's `--forward-to-inbox`.
138
+ `messages.create`, or another emulator's `--forward-to-inbox`.
139
139
  - Servers, usage, devices (TOTP), previews, spam/deliverability analysis, forward and reply,
140
140
  and file downloads (attachment `url`s are placeholders; ingest keeps only attachment metadata).
141
- - Mailosaur's exact code detector is not published. The mock's rule (standalone 4–8 digit runs,
141
+ - Mailosaur's exact code detector is not published. The emulator's rule (standalone 4–8 digit runs,
142
142
  not inside URLs) reproduces it for our templates (Cognito's "Your verification code is
143
143
  {####}.").
144
144
  - Server ids are not validated against an account; any 8-character id is an (empty) inbox.
@@ -147,8 +147,8 @@ with `x-mockingbird-namespace` (the Resend mock forwards with its own namespace
147
147
 
148
148
  | Export | Kind | Description |
149
149
  | --- | --- | --- |
150
- | `MailosaurAPI` | class | The in-process mock: `fetch(request)`, `reset()`, `ingest(input)`, `messages()`, `state`. Options: `sqlite`, `now`, `namespace`, `settings`. |
151
- | `createRuntime` | function | The mock with the full service contract (health, admin, namespaces, credentials, presets, ingest). Options: `settings`, `clock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
150
+ | `MailosaurAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `ingest(input)`, `messages()`, `state`. Options: `sqlite`, `now`, `namespace`, `settings`. |
151
+ | `createRuntime` | function | The emulator with the full service contract (health, admin, namespaces, credentials, presets, ingest). Options: `settings`, `clock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
152
152
  | `MAILOSAUR_PRESETS` | object | Every named fault preset. |
153
153
  | `MAILOSAUR_NAMESPACE` | string | The service name, `"mailosaur"`. |
154
154
  | `ANY_SERVER` | string | `"*"`: the server of mail ingested without one (visible from every server id). |
package/SUPPORT.md CHANGED
@@ -3,10 +3,10 @@
3
3
  Generated from `openapi.yaml`; do not edit by hand.
4
4
 
5
5
  - operations in spec: **8**
6
- - supported by the mock: **8**
6
+ - supported by the emulator: **8**
7
7
  - parity enabled: **6**
8
8
 
9
- | operationId | route | mock | parity | notes |
9
+ | operationId | route | emulator | parity | notes |
10
10
  | --- | --- | --- | --- | --- |
11
11
  | `SearchMessages` | `POST /api/messages/search` | ✅ supported | ✅ | |
12
12
  | `AwaitMessageByQuery` | `GET /api/messages/await` | ✅ supported | ❌ disabled | Holds the request open for up to `timeout` ms; exercised by the acceptance tests. |