lambder 10.0.1 → 10.0.2

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
@@ -9,6 +9,19 @@ sit on its first published patch, and later patches list only what they changed.
9
9
  Releases up to 3.2.6 carry git tags; the ones after it were published without
10
10
  one, so versions are not cross-linked to tag comparisons here.
11
11
 
12
+ ## [10.0.2] - 2026-09-28
13
+
14
+ ### Fixed
15
+
16
+ - **A guard an init's `guard()` builds inside a map held to `LambderApiGuard`**
17
+ (`{ ... } satisfies Record<string, LambderApiGuard<any, any, any>>`, the
18
+ shape an app's guards file takes) did not compile when it named no
19
+ `refusals`: the map's contextual type widened the guard's refusals to
20
+ `readonly string[]`, which the vocabulary check read as codes it does not
21
+ hold, so every such guard was asked for a `refusals` option. The refusals in
22
+ a built guard's type are no longer an inference site, so a guard that names
23
+ none declares none wherever it is built.
24
+
12
25
  ## [10.0.1] - 2026-09-28
13
26
 
14
27
  A major that makes both sides of an API answer exact. A success is only ever
@@ -168,7 +168,7 @@ export type LambderGuardBuilder<TCtx, TSessionCtx, TVocabulary = never, TCodesRe
168
168
  session: true;
169
169
  handler: (ctx: TSessionCtx & LambderGuardRefuse<TVocabulary, TRefusals, TCodesRequired>, payload: z.output<TInput>, param: TParam) => TOutput | Promise<TOutput>;
170
170
  } & LambderGuardPlacement & LambderGuardRefusals<TRefusals> & LambderGuardRefusalsKnownIn<TVocabulary, TRefusals> & LambderGuardAnswerCheck<TOutput>): LambderGuardOf<TOutput, {
171
- refusals?: TRefusals;
171
+ refusals?: NoInfer<TRefusals>;
172
172
  apiInput: TInput;
173
173
  guardInput?: undefined;
174
174
  session: true;
@@ -178,7 +178,7 @@ export type LambderGuardBuilder<TCtx, TSessionCtx, TVocabulary = never, TCodesRe
178
178
  apiInput: TInput;
179
179
  handler: (ctx: TCtx & LambderGuardRefuse<TVocabulary, TRefusals, TCodesRequired>, payload: z.output<TInput>, param: TParam) => TOutput | Promise<TOutput>;
180
180
  } & LambderGuardPlacement & LambderGuardRefusals<TRefusals> & LambderGuardRefusalsKnownIn<TVocabulary, TRefusals> & LambderGuardAnswerCheck<TOutput>): LambderGuardOf<TOutput, {
181
- refusals?: TRefusals;
181
+ refusals?: NoInfer<TRefusals>;
182
182
  apiInput: TInput;
183
183
  guardInput?: undefined;
184
184
  session?: undefined;
@@ -189,7 +189,7 @@ export type LambderGuardBuilder<TCtx, TSessionCtx, TVocabulary = never, TCodesRe
189
189
  session: true;
190
190
  handler: (ctx: TSessionCtx & LambderGuardRefuse<TVocabulary, TRefusals, TCodesRequired>, payload: z.output<TInput>, param: TParam) => TOutput | Promise<TOutput>;
191
191
  } & LambderGuardPlacement & LambderGuardRefusals<TRefusals> & LambderGuardRefusalsKnownIn<TVocabulary, TRefusals> & LambderGuardAnswerCheck<TOutput>): LambderGuardOf<TOutput, {
192
- refusals?: TRefusals;
192
+ refusals?: NoInfer<TRefusals>;
193
193
  guardInput: TInput;
194
194
  apiInput?: undefined;
195
195
  session: true;
@@ -199,7 +199,7 @@ export type LambderGuardBuilder<TCtx, TSessionCtx, TVocabulary = never, TCodesRe
199
199
  guardInput: TInput;
200
200
  handler: (ctx: TCtx & LambderGuardRefuse<TVocabulary, TRefusals, TCodesRequired>, payload: z.output<TInput>, param: TParam) => TOutput | Promise<TOutput>;
201
201
  } & LambderGuardPlacement & LambderGuardRefusals<TRefusals> & LambderGuardRefusalsKnownIn<TVocabulary, TRefusals> & LambderGuardAnswerCheck<TOutput>): LambderGuardOf<TOutput, {
202
- refusals?: TRefusals;
202
+ refusals?: NoInfer<TRefusals>;
203
203
  guardInput: TInput;
204
204
  apiInput?: undefined;
205
205
  session?: undefined;
@@ -209,7 +209,7 @@ export type LambderGuardBuilder<TCtx, TSessionCtx, TVocabulary = never, TCodesRe
209
209
  session: true;
210
210
  handler: (ctx: TSessionCtx & LambderGuardRefuse<TVocabulary, TRefusals, TCodesRequired>, payload: undefined, param: TParam) => TOutput | Promise<TOutput>;
211
211
  } & LambderGuardPlacement & LambderGuardRefusals<TRefusals> & LambderGuardRefusalsKnownIn<TVocabulary, TRefusals> & LambderGuardAnswerCheck<TOutput>): LambderGuardOf<TOutput, {
212
- refusals?: TRefusals;
212
+ refusals?: NoInfer<TRefusals>;
213
213
  apiInput?: undefined;
214
214
  guardInput?: undefined;
215
215
  session: true;
@@ -218,7 +218,7 @@ export type LambderGuardBuilder<TCtx, TSessionCtx, TVocabulary = never, TCodesRe
218
218
  <TParam = undefined, TOutput = void, const TRefusals extends readonly string[] = readonly []>(guard: {
219
219
  handler: (ctx: TCtx & LambderGuardRefuse<TVocabulary, TRefusals, TCodesRequired>, payload: undefined, param: TParam) => TOutput | Promise<TOutput>;
220
220
  } & LambderGuardPlacement & LambderGuardRefusals<TRefusals> & LambderGuardRefusalsKnownIn<TVocabulary, TRefusals> & LambderGuardAnswerCheck<TOutput>): LambderGuardOf<TOutput, {
221
- refusals?: TRefusals;
221
+ refusals?: NoInfer<TRefusals>;
222
222
  apiInput?: undefined;
223
223
  guardInput?: undefined;
224
224
  session?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambder",
3
- "version": "10.0.1",
3
+ "version": "10.0.2",
4
4
  "sideEffects": false,
5
5
  "description": "Opinionated serverless web framework for TypeScript on AWS Lambda: type-safe APIs from Zod schemas, DynamoDB sessions, and declarative rate limits, authorization guards and idempotency.",
6
6
  "keywords": [