@crvouga/mockingbird-service-resend 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.
@@ -0,0 +1,3 @@
1
+ # resend evidence
2
+
3
+ Added vendor routes are checked against the pinned Emulate 0.12.1 npm package and licensed provider regression tests. Native fixture, namespace, checkpoint, branch and clock checks run separately. This is offline package evidence, not live vendor proof. See [coverage audit](../../../docs/EMULATE_COVERAGE.md) for the pinned source, coverage gate, reviewed differences and exact commands.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog — @crvouga/mockingbird-service-resend
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-resend 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-resend/`; no repository checkout is needed to discover the mock's
4
+ inside `node_modules/@crvouga/mockingbird-service-resend/`; 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
 
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to the Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by the Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding any notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. Please also get an informed
186
+ understanding of your current status in the "Work made for hire"
187
+ or other employer IP clauses in your jurisdiction and contracts
188
+ before applying.
189
+
190
+ Copyright 2025 Chris Tate
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # @crvouga/mockingbird-service-resend
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 **Resend** email API for test suites. Every send lands in an **outbox**
5
+ Stateful emulator of the **Resend** email API for test suites. Every send lands in an **outbox**
6
6
  that tests read (`GET /__admin/outbox`, and the links in each email). `Idempotency-Key` replays
7
7
  return the first send's id. Inbound emails are stored and announced with a Svix-signed
8
8
  `email.received` webhook, and the received-email endpoints serve their content and
9
9
  attachments. With `--forward-to-inbox`, every sent email is also copied into the
10
- [Mailosaur mock](../mailosaur), so one inbox holds every code and link.
10
+ [Mailosaur emulator](../mailosaur), so one inbox holds every code and link.
11
11
 
12
12
  - Operation coverage: [SUPPORT.md](https://github.com/crvouga/mockingbird/blob/main/packages/service/resend/SUPPORT.md)
13
13
  - `openapi.yaml` is trimmed from Resend's published API reference to what `resend@4.8.0` and
@@ -40,8 +40,8 @@ RESEND_BASE_URL=http://127.0.0.1:8794 node app.js
40
40
  ```js
41
41
  import { createServer } from "@crvouga/mockingbird-service-resend/server"
42
42
 
43
- const mock = await createServer()
44
- process.env.RESEND_BASE_URL = mock.url
43
+ const emulator = await createServer()
44
+ process.env.RESEND_BASE_URL = emulator.url
45
45
  const { Resend } = await import("resend")
46
46
 
47
47
  await new Resend("re_test").emails.send({
@@ -51,8 +51,8 @@ await new Resend("re_test").emails.send({
51
51
  html: '<a href="https://app.test/family/invitations/claim?token=abc">Join</a>',
52
52
  })
53
53
 
54
- const { messages } = await (await fetch(`${mock.url}/__admin/outbox?to=invitee@example.com`)).json()
55
- const { links } = await (await fetch(`${mock.url}/__admin/outbox/${messages[0].id}/links`)).json()
54
+ const { messages } = await (await fetch(`${emulator.url}/__admin/outbox?to=invitee@example.com`)).json()
55
+ const { links } = await (await fetch(`${emulator.url}/__admin/outbox/${messages[0].id}/links`)).json()
56
56
  // links[0] === "https://app.test/family/invitations/claim?token=abc"
57
57
  ```
58
58
 
@@ -61,21 +61,21 @@ Whatever sends the mail (the SDK above, or raw HTTP), the outbox is the assertio
61
61
  ```ts
62
62
  import { createServer } from "@crvouga/mockingbird-service-resend/server"
63
63
 
64
- const mock = await createServer()
65
- await fetch(`${mock.url}/emails`, {
64
+ const emulator = await createServer()
65
+ await fetch(`${emulator.url}/emails`, {
66
66
  method: "POST",
67
67
  headers: { "content-type": "application/json", authorization: "Bearer re_test" },
68
68
  body: JSON.stringify({ from: "no-reply@example.com", to: ["invitee@example.com"], subject: "Hi", text: "Hello" }),
69
69
  })
70
- const sent = await (await fetch(`${mock.url}/__admin/outbox?to=invitee@example.com`)).json()
71
- await mock.close()
70
+ const sent = await (await fetch(`${emulator.url}/__admin/outbox?to=invitee@example.com`)).json()
71
+ await emulator.close()
72
72
  ```
73
73
 
74
74
  ### Routes
75
75
 
76
76
  | Route | Behaviour |
77
77
  | --- | --- |
78
- | `POST /emails` | `{from, to, subject, html?, text?, cc?, bcc?, reply_to?, headers?, tags?, attachments?, scheduled_at?}` → `{id}` (a UUID). The SDK renders `react` to HTML before sending, so the mock sees HTML. Violations answer Resend's body `{statusCode, name, message}`: 422 `missing_required_field` (`Missing \`to\` field.`, or no `html`/`text`), 422 `validation_error` for a malformed address (`Invalid \`from\` field. The email address needs to follow …`), a tag outside `[A-Za-z0-9_-]`, or any other contract violation. `Idempotency-Key`: the same key and payload replay the first 200 byte for byte (`idempotent-replayed: true`); another payload is 409 `invalid_idempotent_request`; a key still in flight is 409 `concurrent_idempotent_requests`; a key outside 1–256 characters is 400 `invalid_idempotency_key`. Only 200s are remembered. |
78
+ | `POST /emails` | `{from, to, subject, html?, text?, cc?, bcc?, reply_to?, headers?, tags?, attachments?, scheduled_at?}` → `{id}` (a UUID). The SDK renders `react` to HTML before sending, so the emulator sees HTML. Violations answer Resend's body `{statusCode, name, message}`: 422 `missing_required_field` (`Missing \`to\` field.`, or no `html`/`text`), 422 `validation_error` for a malformed address (`Invalid \`from\` field. The email address needs to follow …`), a tag outside `[A-Za-z0-9_-]`, or any other contract violation. `Idempotency-Key`: the same key and payload replay the first 200 byte for byte (`idempotent-replayed: true`); another payload is 409 `invalid_idempotent_request`; a key still in flight is 409 `concurrent_idempotent_requests`; a key outside 1–256 characters is 400 `invalid_idempotency_key`. Only 200s are remembered. |
79
79
  | `GET /emails/{id}` | `emails.get`: `{object: "email", id, to, from, created_at, subject, html, text, cc, bcc, reply_to, last_event: "delivered" \| "scheduled", scheduled_at, headers, tags}`. `headers` keeps the names and values from the send; `to` keeps the original address form and order. |
80
80
  | `GET /emails` | Newest-first sent email metadata, `{object: "list", has_more, data}`. `limit` defaults to 20 (1–100); `after`/`before` use email IDs and exclude the cursor. Content is available from the detail endpoint. |
81
81
  | `GET /emails/receiving` | Newest-first received email metadata with the same envelope and ID cursors. Without `limit`, returns every received email; an explicit limit must be 1–100. Includes attachment metadata and size. |
@@ -105,7 +105,7 @@ client does not catch a non-JSON body or a dropped socket (those reject). It als
105
105
 
106
106
  Like Resend's, the body carries no `text`, `html`, `headers` or download URLs, so a receiver
107
107
  hydrates them through the received-email routes. Pass `"inline": true` to include them. Each
108
- delivery is signed the Svix way: `svix-id`, `svix-timestamp` (wall clock, even when the mock
108
+ delivery is signed the Svix way: `svix-id`, `svix-timestamp` (wall clock, even when the emulator
109
109
  clock moves), `svix-signature: v1,<base64 HMAC-SHA256(secret bytes, "id.ts.body")>`. The
110
110
  official `svix` `Webhook.verify` accepts them. Non-2xx answers are retried (immediately, 5 s,
111
111
  5 min, 30 min, 2 h). `GET /__admin/webhooks`, `…/events`, `…/flush`, `…/:id/replay` and
@@ -122,10 +122,10 @@ official `svix` `Webhook.verify` accepts them. Non-2xx answers are retried (imme
122
122
  | `GET /__admin/inbound` | Received emails, oldest first. |
123
123
  | `GET /__admin/forwarding` | `{target, forwarded, failed, lastError}` for `--forward-to-inbox`. |
124
124
 
125
- `--forward-to-inbox <url>` copies every accepted send (not replays) to the Mailosaur mock's
125
+ `--forward-to-inbox <url>` copies every accepted send (not replays) to the Mailosaur emulator's
126
126
  `POST /__admin/ingest`, under the **same namespace name**, and waits up to 2 s for it. A failing
127
127
  inbox never fails the send; it is counted in `/__admin/forwarding`. Map the same key to the
128
- same namespace on both mocks and a worker reads its forwarded mail through the Mailosaur SDK.
128
+ same namespace on both emulators and a worker reads its forwarded mail through the Mailosaur SDK.
129
129
 
130
130
  Fault presets (`POST /__admin/faults {"preset": "<name>", "count"?: n}`; `GET /__admin/faults/presets`):
131
131
  `send_422` (`{statusCode: 422, name: "validation_error", message}`), `send_429`
@@ -155,9 +155,9 @@ then the connection dies before any response bytes; the same key replays), `rece
155
155
 
156
156
  | Export | Kind | Description |
157
157
  | --- | --- | --- |
158
- | `ResendAPI` | class | The in-process mock: `fetch(request)`, `reset()`, `sent()`, `sendOutcomes()`, `inbound()`, `receive(input, origin)`, `state`. Options: `sqlite`, `now`, `namespace`, `publicNamespace`, `onSent`, `onOutcome`. |
159
- | `createRuntime` | function | The mock with the full service contract (health, admin, namespaces, credentials, presets, Svix webhooks, outbox). Options: `webhooks: {url, secret, retryDelaysMs?, fetch?}`, `forwardToInbox: {url, adminKey?, timeoutMs?, fetch?}`, `clock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
160
- | `forwardToInbox` | function | Copy one sent email into a Mailosaur mock's ingest route. |
158
+ | `ResendAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `sent()`, `sendOutcomes()`, `inbound()`, `receive(input, origin)`, `state`. Options: `sqlite`, `now`, `namespace`, `publicNamespace`, `onSent`, `onOutcome`. |
159
+ | `createRuntime` | function | The emulator with the full service contract (health, admin, namespaces, credentials, presets, Svix webhooks, outbox). Options: `webhooks: {url, secret, retryDelaysMs?, fetch?}`, `forwardToInbox: {url, adminKey?, timeoutMs?, fetch?}`, `clock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
160
+ | `forwardToInbox` | function | Copy one sent email into a Mailosaur emulator's ingest route. |
161
161
  | `RESEND_PRESETS` | object | Every named fault preset. |
162
162
  | `RESEND_NAMESPACE` | string | The service name, `"resend"`. |
163
163
  | `DOWNLOAD_URL_TTL_MS` | number | The advertised lifetime of a `download_url` (1 h). |
package/SUPPORT.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Generated from `openapi.yaml`; do not edit by hand.
4
4
 
5
- - operations in spec: **7**
6
- - supported by the mock: **7**
5
+ - operations in spec: **25**
6
+ - supported by the emulator: **25**
7
7
  - parity enabled: **7**
8
8
 
9
- | operationId | route | mock | parity | notes |
9
+ | operationId | route | emulator | parity | notes |
10
10
  | --- | --- | --- | --- | --- |
11
11
  | `ListEmails` | `GET /emails` | ✅ supported | ✅ | |
12
12
  | `SendEmail` | `POST /emails` | ✅ supported | ⚠️ unsafe (opt-in) | |
@@ -15,3 +15,21 @@ Generated from `openapi.yaml`; do not edit by hand.
15
15
  | `GetReceivedEmail` | `GET /emails/receiving/{email_id}` | ✅ supported | ✅ | |
16
16
  | `ListReceivedEmailAttachments` | `GET /emails/receiving/{email_id}/attachments` | ✅ supported | ✅ | |
17
17
  | `DownloadReceivedAttachment` | `GET /downloads/inbound/{attachment_id}` | ✅ supported | ✅ | |
18
+ | `DELETE /api-keys/:id` | `DELETE /api-keys/{id}` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
19
+ | `DELETE /audiences/:audience_id/contacts/:id` | `DELETE /audiences/{audience_id}/contacts/{id}` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
20
+ | `DELETE /audiences/:id` | `DELETE /audiences/{id}` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
21
+ | `GET /domains/:id` | `GET /domains/{id}` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
22
+ | `DELETE /domains/:id` | `DELETE /domains/{id}` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
23
+ | `GET /api-keys` | `GET /api-keys` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
24
+ | `POST /api-keys` | `POST /api-keys` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
25
+ | `GET /audiences` | `GET /audiences` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
26
+ | `POST /audiences` | `POST /audiences` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
27
+ | `GET /audiences/:audience_id/contacts` | `GET /audiences/{audience_id}/contacts` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
28
+ | `POST /audiences/:audience_id/contacts` | `POST /audiences/{audience_id}/contacts` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
29
+ | `GET /domains` | `GET /domains` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
30
+ | `POST /domains` | `POST /domains` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
31
+ | `GET /inbox` | `GET /inbox` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
32
+ | `GET /inbox/:id` | `GET /inbox/{id}` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
33
+ | `POST /domains/:id/verify` | `POST /domains/{id}/verify` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
34
+ | `POST /emails/:id/cancel` | `POST /emails/{id}/cancel` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
35
+ | `POST /emails/batch` | `POST /emails/batch` | ✅ supported | ❌ disabled | Verified against a pinned package oracle; independent live vendor evidence is not available. |
@@ -0,0 +1,39 @@
1
+ # Third-party notices
2
+
3
+ emulate is licensed under the Apache License, Version 2.0. The following notice
4
+ recognizes Hono's contribution to the internal HTTP layer and accompanies
5
+ distributions of emulate and its packages.
6
+
7
+ ## Hono
8
+
9
+ The internal HTTP layer in `packages/@emulators/core/src/http.ts` builds on
10
+ [Hono](https://github.com/honojs/hono)'s API and design. We thank Yusuke Wada and
11
+ the Hono contributors for their work. Hono's copyright and MIT license notice
12
+ are reproduced below.
13
+
14
+ Source: https://github.com/honojs/hono
15
+ License: https://github.com/honojs/hono/blob/v4.12.12/LICENSE
16
+
17
+ ```text
18
+ MIT License
19
+
20
+ Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
21
+
22
+ Permission is hereby granted, free of charge, to any person obtaining a copy
23
+ of this software and associated documentation files (the "Software"), to deal
24
+ in the Software without restriction, including without limitation the rights
25
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26
+ copies of the Software, and to permit persons to whom the Software is
27
+ furnished to do so, subject to the following conditions:
28
+
29
+ The above copyright notice and this permission notice shall be included in all
30
+ copies or substantial portions of the Software.
31
+
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38
+ SOFTWARE.
39
+ ```
@@ -0,0 +1,67 @@
1
+ // ../../http/provider/dist/vendor/core/crypto.js
2
+ import { hmac } from "@noble/hashes/hmac.js";
3
+ import { sha1 } from "@noble/hashes/legacy.js";
4
+ import { md5 } from "@noble/hashes/legacy.js";
5
+ import { sha256 } from "@noble/hashes/sha2.js";
6
+ import { Buffer } from "buffer";
7
+ var digest = (algorithm) => {
8
+ if (algorithm === "sha256")
9
+ return sha256;
10
+ if (algorithm === "sha1")
11
+ return sha1;
12
+ if (algorithm === "md5")
13
+ return md5;
14
+ throw new Error(`Unsupported digest ${algorithm}`);
15
+ };
16
+ var bytes = (input) => typeof input === "string" ? new TextEncoder().encode(input) : input;
17
+ function createHash(algorithm) {
18
+ const parts = [];
19
+ const hash = {
20
+ update(input) {
21
+ parts.push(bytes(input));
22
+ return hash;
23
+ },
24
+ digest(encoding) {
25
+ const result = Buffer.from(digest(algorithm)(Buffer.concat(parts)));
26
+ return encoding === "base64url" ? result.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "") : encoding ? result.toString(encoding) : result;
27
+ }
28
+ };
29
+ return hash;
30
+ }
31
+ function createHmac(algorithm, key) {
32
+ const parts = [];
33
+ const hash = {
34
+ update(input) {
35
+ parts.push(bytes(input));
36
+ return hash;
37
+ },
38
+ digest(encoding) {
39
+ const result = Buffer.from(hmac(digest(algorithm), bytes(key), Buffer.concat(parts)));
40
+ return encoding === "base64url" ? result.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "") : encoding ? result.toString(encoding) : result;
41
+ }
42
+ };
43
+ return hash;
44
+ }
45
+ function randomBytes(length) {
46
+ return Buffer.from(crypto.getRandomValues(new Uint8Array(length)));
47
+ }
48
+ function randomUUID() {
49
+ return crypto.randomUUID();
50
+ }
51
+ function timingSafeEqual(a, b) {
52
+ if (a.length !== b.length)
53
+ throw new Error("Buffers must have equal lengths");
54
+ let difference = 0;
55
+ for (let i = 0; i < a.length; i++)
56
+ difference |= a[i] ^ b[i];
57
+ return difference === 0;
58
+ }
59
+
60
+ export {
61
+ createHash,
62
+ createHmac,
63
+ randomBytes,
64
+ randomUUID,
65
+ timingSafeEqual
66
+ };
67
+ //# sourceMappingURL=chunk-M73LWCCP.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../http/provider/src/vendor/core/crypto.ts"],
4
+ "sourcesContent": ["import { hmac } from \"@noble/hashes/hmac.js\"\nimport { sha1 } from \"@noble/hashes/legacy.js\"\nimport { md5 } from \"@noble/hashes/legacy.js\"\nimport { sha256 } from \"@noble/hashes/sha2.js\"\nimport { Buffer } from \"buffer\"\n\nconst digest = (algorithm: string) => {\n if (algorithm === \"sha256\") return sha256\n if (algorithm === \"sha1\") return sha1\n if (algorithm === \"md5\") return md5\n throw new Error(`Unsupported digest ${algorithm}`)\n}\nconst bytes = (input: string | Uint8Array) => typeof input === \"string\" ? new TextEncoder().encode(input) : input\ninterface Hash {\n update(input: string | Uint8Array): Hash\n digest(): Buffer\n digest(encoding: string): string\n}\nexport function createHash(algorithm: string): Hash {\n const parts: Uint8Array[] = []\n const hash = {\n update(input: string | Uint8Array) { parts.push(bytes(input)); return hash },\n digest(encoding?: string): Buffer | string {\n const result = Buffer.from(digest(algorithm)(Buffer.concat(parts)))\n return encoding === \"base64url\" ? result.toString(\"base64\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\") : encoding ? result.toString(encoding as BufferEncoding) : result\n },\n }\n return hash as Hash\n}\nexport function createHmac(algorithm: string, key: string | Uint8Array): Hash {\n const parts: Uint8Array[] = []\n const hash = {\n update(input: string | Uint8Array) { parts.push(bytes(input)); return hash },\n digest(encoding?: string): Buffer | string {\n const result = Buffer.from(hmac(digest(algorithm), bytes(key), Buffer.concat(parts)))\n return encoding === \"base64url\" ? result.toString(\"base64\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\") : encoding ? result.toString(encoding as BufferEncoding) : result\n },\n }\n return hash as Hash\n}\nexport function randomBytes(length: number): Buffer {\n return Buffer.from(crypto.getRandomValues(new Uint8Array(length)))\n}\nexport function randomUUID(): string { return crypto.randomUUID() }\nexport function timingSafeEqual(a: Uint8Array, b: Uint8Array): boolean {\n if (a.length !== b.length) throw new Error(\"Buffers must have equal lengths\")\n let difference = 0\n for (let i = 0; i < a.length; i++) difference |= a[i] ^ b[i]\n return difference === 0\n}\n"],
5
+ "mappings": ";AAAA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,cAAc;AACvB,SAAS,cAAc;AAEvB,IAAM,SAAS,CAAC,cAAqB;AACnC,MAAI,cAAc;AAAU,WAAO;AACnC,MAAI,cAAc;AAAQ,WAAO;AACjC,MAAI,cAAc;AAAO,WAAO;AAChC,QAAM,IAAI,MAAM,sBAAsB,SAAS,EAAE;AACnD;AACA,IAAM,QAAQ,CAAC,UAA+B,OAAO,UAAU,WAAW,IAAI,YAAW,EAAG,OAAO,KAAK,IAAI;AAMtG,SAAU,WAAW,WAAiB;AAC1C,QAAM,QAAsB,CAAA;AAC5B,QAAM,OAAO;IACX,OAAO,OAA0B;AAAI,YAAM,KAAK,MAAM,KAAK,CAAC;AAAG,aAAO;IAAK;IAC3E,OAAO,UAAiB;AACtB,YAAM,SAAS,OAAO,KAAK,OAAO,SAAS,EAAE,OAAO,OAAO,KAAK,CAAC,CAAC;AAClE,aAAO,aAAa,cAAc,OAAO,SAAS,QAAQ,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,EAAE,IAAI,WAAW,OAAO,SAAS,QAA0B,IAAI;IACpL;;AAEF,SAAO;AACT;AACM,SAAU,WAAW,WAAmB,KAAwB;AACpE,QAAM,QAAsB,CAAA;AAC5B,QAAM,OAAO;IACX,OAAO,OAA0B;AAAI,YAAM,KAAK,MAAM,KAAK,CAAC;AAAG,aAAO;IAAK;IAC3E,OAAO,UAAiB;AACtB,YAAM,SAAS,OAAO,KAAK,KAAK,OAAO,SAAS,GAAG,MAAM,GAAG,GAAG,OAAO,OAAO,KAAK,CAAC,CAAC;AACpF,aAAO,aAAa,cAAc,OAAO,SAAS,QAAQ,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,EAAE,IAAI,WAAW,OAAO,SAAS,QAA0B,IAAI;IACpL;;AAEF,SAAO;AACT;AACM,SAAU,YAAY,QAAc;AACxC,SAAO,OAAO,KAAK,OAAO,gBAAgB,IAAI,WAAW,MAAM,CAAC,CAAC;AACnE;AACM,SAAU,aAAU;AAAa,SAAO,OAAO,WAAU;AAAG;AAC5D,SAAU,gBAAgB,GAAe,GAAa;AAC1D,MAAI,EAAE,WAAW,EAAE;AAAQ,UAAM,IAAI,MAAM,iCAAiC;AAC5E,MAAI,aAAa;AACjB,WAAS,IAAI,GAAG,IAAI,EAAE,QAAQ;AAAK,kBAAc,EAAE,CAAC,IAAI,EAAE,CAAC;AAC3D,SAAO,eAAe;AACxB;",
6
+ "names": []
7
+ }