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
* chore: fix command export default issue
* refactor(packages/core,packages/cli): fix coding standards violations
Replace `as` type assertions with type annotations, type guards, and
documented exceptions. Replace `try/catch` blocks with `attempt` and
`attemptAsync` from es-toolkit. Replace multi-branch if/else chains
with ts-pattern `match` expressions. Rename `redactPaths` to
`REDACT_PATHS`. Document intentional mutation and throw exceptions.
Closes#12, #15, #18, #20, #21, #33
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: missing work
---------
Co-authored-by: Claude <noreply@anthropic.com>
|`resolvers` → `strategies` rename | Design finalized | Non-breaking if old key is kept as alias during migration.|
291
+
| Remove `auth({ http })` option | Design finalized | Deprecate, then remove. Replaced by standalone `http()` + `auth.headers()`.|
296
292
| Typed middleware (`middleware<E>()`) |**Ready to build**| Pure type-level change. Uses `decorateContext` for runtime, generics + `InferVariables` for type inference. No `ctx.set()`/`ctx.var`. |
297
293
298
294
---
@@ -338,7 +334,9 @@ Onion model -- root wraps command, command wraps handler. Short-circuit by not c
Lifecycle hooks, not middleware chain. Auth uses separate focused plugins composed via `@fastify/auth`:
378
376
379
377
```ts
380
-
fastify.auth([fastify.verifyJWT, fastify.verifyApiKey], { relation: 'or' }) // OR composition
381
-
fastify.auth([fastify.verifyJWT, fastify.verifyAdmin], { relation: 'and' }) // AND composition
378
+
fastify.auth([fastify.verifyJWT, fastify.verifyApiKey], { relation: 'or' }) // OR composition
379
+
fastify.auth([fastify.verifyJWT, fastify.verifyAdmin], { relation: 'and' }) // AND composition
382
380
```
383
381
384
382
Each plugin (`@fastify/bearer-auth`, `@fastify/basic-auth`, `@fastify/jwt`, `@fastify/oauth2`) decorates the instance with a verification function. Request decoration is each strategy's responsibility. `@fastify/jwt` supports namespaces for multiple configs (`request.accessVerify()` vs `request.refreshVerify()`). Context typing uses module augmentation (global).
0 commit comments