You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4ec1222
Browse filesBrowse the repository at this point in the historyBrowse files
refactor!: deliver run grants and trigger mail in one routeMail call (#25)
BREAKING CHANGE: `HookMailRouter` is replaced by `HookRouter`
(`Pick<SidecarRouter, "routeMail">`); `RUN_GRANTS_NOT_ROUTABLE` and
`RunTriggerUnroutableCode` are removed and `RunTriggerUnroutableError` takes
`(address, runId)`. `@intx/hub-sessions` is a new peer dependency.
@@ -143,6 +143,13 @@ curl -X POST "$HUB/api/hooks/crd_…" \
143
143
144
144
The hub answers `202 { "ok": true, "to": "run_…@acme.example" }` and the run starts.
145
145
146
+
## Upgrading from 0.2
147
+
148
+
-`HookMailRouter` is replaced by `HookRouter`, `Pick<SidecarRouter, "routeMail">` from `@intx/hub-sessions`. Pass the hub's sidecar router as before; `sendRunGrants` is no longer used.
149
+
- Run grants and trigger mail go out in one `routeMail` call, so `RUN_GRANTS_NOT_ROUTABLE` and `RunTriggerUnroutableCode` are removed. Every unroutable delivery throws `RunTriggerUnroutableError` with `code``RUN_MAIL_NOT_ROUTABLE`, and `new RunTriggerUnroutableError(address, runId)` no longer takes a code.
150
+
-`isRunTriggerUnroutable` uses `instanceof`; every consumer must resolve one copy of `@corbits/webhooks`.
151
+
-`@intx/hub-sessions` is a new peer dependency.
152
+
146
153
## Upgrading from 0.1
147
154
148
155
-`installWebhooks(opts)` is removed. Call `app.route("/api/hooks", createHookRoutes(deps))` with the same `db`, `credentialCipher`, `principalKeyStore` and `router`; drop `app` from the options.
0 commit comments