lambder 9.0.1 → 9.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,24 @@ 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
+ ## [9.0.2] - 2026-09-27
13
+
14
+ Nothing a handler or a caller does changes; the package, its docs and its
15
+ tests are easier to find one's way in.
16
+
17
+ ### Changed
18
+
19
+ - **The README names the one v9 break the compiler cannot find.** A refusal
20
+ is no longer stored under an idempotency key, so a retry after one runs the
21
+ handler again (the 9.0.1 entry has the detail).
22
+ - **The signature map's module is `shared/wire/LambderApiSignatureMap`.** It
23
+ shared its file name with `api/LambderApiSignature`, which computes the
24
+ digests. The entries export the same names as before, so no import changes.
25
+ - **Docs.** `docs/dynamodb-tables.md` is `docs/ddb-tables.md`, beside the
26
+ other `ddb-*` pages. `docs/responses.md` says that `compress: true` behind a
27
+ REST API needs `binaryMediaTypes: ["*/*"]`, as its compression does.
28
+ - **Tests** sit in folders that mirror `src/`.
29
+
12
30
  ## [9.0.1] - 2026-09-27
13
31
 
14
32
  A major that gives an API handler one shape. It takes its context and returns
package/README.md CHANGED
@@ -167,7 +167,7 @@ guide that matches what you are building. The full index lives in
167
167
  | [Templating](./docs/templating.md) | `html`/`xml` tagged templates and `LambderTemplatingEngine` |
168
168
  | [Translations](./docs/i18n.md) | `createLambderI18n`: typed keys, extension, detection, on-demand languages, runtime dictionaries |
169
169
  | [The mock runtime](./docs/mock.md) | `LambderMockApp`: the typed contract served from mock handlers over the real pipeline, in the browser and in tests |
170
- | [DynamoDB tables](./docs/dynamodb-tables.md) | Table shapes, TTL and IAM for sessions, cache, rate limits and idempotency |
170
+ | [DynamoDB tables](./docs/ddb-tables.md) | Table shapes, TTL and IAM for sessions, cache, rate limits and idempotency |
171
171
  | [Exports reference](./docs/exports.md) | Every name the five entry points export, grouped by purpose |
172
172
 
173
173
  ## Standalone modules
@@ -192,7 +192,9 @@ handler one shape: it takes its context and returns its output, says no with
192
192
  `refuse()`, and writes headers, cookies and log entries through the context,
193
193
  while the response builder stays with routes, hooks and error handlers. Every
194
194
  break and what to do about it is in the 9.0.1 entry, and the compiler finds
195
- most of them. An app still on v7 goes through the 8.0.2 entry first, which
195
+ most of them. The one it cannot is a change of behavior: a refusal is no
196
+ longer stored under an idempotency key, so a retry after one runs the handler
197
+ again. An app still on v7 goes through the 8.0.2 entry first, which
196
198
  names the breaks of v8 the compiler cannot find, and one on v6 through the
197
199
  7.0.0 entry before that.
198
200
 
@@ -4,7 +4,7 @@ import type { LambderApiAnswer } from "./LambderApiAnswer.js";
4
4
  import type { LambderApiCallContext } from "./LambderApiCallContext.js";
5
5
  import type { LambderApiCallTrace } from "./LambderApiCallContext.js";
6
6
  import type { LambderApiDefinition } from "./LambderApiDefinition.js";
7
- import { type LambderApiSignatureMap } from "../shared/wire/LambderApiSignature.js";
7
+ import { type LambderApiSignatureMap } from "../shared/wire/LambderApiSignatureMap.js";
8
8
  import { type LambderApiGuard } from "./LambderApiGuards.js";
9
9
  import { type LambderApiRateLimitPolicyConfig, type LambderApiRateLimitsConfig, type LambderRateLimitChargeResult, type LambderRateLimitChargeSubject } from "./LambderApiRateLimits.js";
10
10
  import { type LambderApiIdempotencyConfig } from "./LambderApiIdempotency.js";
@@ -1,5 +1,5 @@
1
1
  import { restoreCompressedPayload } from "./LambderApiRequest.js";
2
- import { lookupApiSignature } from "../shared/wire/LambderApiSignature.js";
2
+ import { lookupApiSignature } from "../shared/wire/LambderApiSignatureMap.js";
3
3
  import { apiNotFoundAnswer, invalidPayloadAnswer, refusalAnswer, sessionExpiredAnswer, validationAnswer, versionExpiredAnswer, } from "./LambderApiEnvelope.js";
4
4
  import { LambderApiValidationRefusal, isLambderApiValidationRefusal } from "./LambderApiValidationRefusal.js";
5
5
  import { isLambderApiRefusal } from "../shared/wire/LambderApiRefusal.js";
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { toGuardEntries } from "./LambderApiGuards.js";
3
- import { API_SIGNATURE_HEX_LENGTH, EXTENSIBLE_ENUM_META_KEY } from "../shared/wire/LambderApiSignature.js";
3
+ import { API_SIGNATURE_HEX_LENGTH, EXTENSIBLE_ENUM_META_KEY } from "../shared/wire/LambderApiSignatureMap.js";
4
4
  import { sha256HexOf } from "../shared/util/LambderTextDigest.js";
5
5
  import { canonicalJson } from "../shared/util/canonicalJson.js";
6
6
  /*
@@ -4,7 +4,7 @@ import type { LambderApiContractShape } from '../shared/wire/LambderApiContract.
4
4
  import { type LambderApiOutcome, type LambderValidationError } from '../shared/wire/LambderApiOutcome.js';
5
5
  import { type LambderCallArgs, type LambderContractOutputOf, type LambderGuardInputsProviderOption, type LambderSharedCallOptions } from '../shared/wire/LambderCallOptions.js';
6
6
  import { type LambderApiTransport } from '../shared/transport/LambderApiTransport.js';
7
- import { type LambderApiSignatureMap } from '../shared/wire/LambderApiSignature.js';
7
+ import { type LambderApiSignatureMap } from '../shared/wire/LambderApiSignatureMap.js';
8
8
  export type { LambderApiOutcome, LambderApiFailureReason, LambderValidationError } from '../shared/wire/LambderApiOutcome.js';
9
9
  export type { LambderProvidedGuardInputs, LambderGuardInputsProvider } from '../shared/wire/LambderCallOptions.js';
10
10
  /** A handler told that something happened, with nothing to hand it. */
@@ -8,7 +8,7 @@ import { createCallAbort } from '../shared/util/LambderCallAbort.js';
8
8
  import { coerceToError } from '../shared/wire/LambderCrashDetail.js';
9
9
  import { isLambderTransportFailure } from '../shared/transport/LambderApiTransport.js';
10
10
  import { DEFAULT_SESSION_TOKEN_COOKIE_KEY, DEFAULT_SESSION_CSRF_COOKIE_KEY } from '../shared/wire/LambderSessionCookieNames.js';
11
- import { readApiSignature } from '../shared/wire/LambderApiSignature.js';
11
+ import { readApiSignature } from '../shared/wire/LambderApiSignatureMap.js';
12
12
  import { LambderReloadLoopBreaker, RELOAD_LOOP_WINDOW_MS } from './LambderReloadLoopBreaker.js';
13
13
  import { lambderFetchTransport } from './lambderFetchTransport.js';
14
14
  /**
package/dist/client.d.ts CHANGED
@@ -15,8 +15,8 @@ export type { LambderApiTransport, LambderApiTransportRequest, LambderTransportF
15
15
  export { LambderCookieJar, parseSetCookie } from "./shared/transport/LambderCookieJar.js";
16
16
  export type { LambderStoredCookie } from "./shared/transport/LambderCookieJar.js";
17
17
  export { resolveApiOutcome } from "./shared/wire/LambderApiOutcome.js";
18
- export { apiNameKeyOf, lookupApiSignature, readApiSignature, API_SIGNATURE_HEX_LENGTH, extensibleEnum } from "./shared/wire/LambderApiSignature.js";
19
- export type { LambderApiSignatureMap } from "./shared/wire/LambderApiSignature.js";
18
+ export { apiNameKeyOf, lookupApiSignature, readApiSignature, API_SIGNATURE_HEX_LENGTH, extensibleEnum } from "./shared/wire/LambderApiSignatureMap.js";
19
+ export type { LambderApiSignatureMap } from "./shared/wire/LambderApiSignatureMap.js";
20
20
  export { RELOAD_LOOP_WINDOW_MS } from "./client/LambderReloadLoopBreaker.js";
21
21
  export { compareDottedVersions, isDottedVersion } from "./shared/wire/LambderVersionOrder.js";
22
22
  export type { LambderApiAnswerOutcome, LambderApiSuccessOutcome, LambderApiCallFailure, LambderApiValidationFailure, LambderApiEnvelopeFailure, LambderApiHttpAnswer, } from "./shared/wire/LambderApiOutcome.js";
package/dist/client.js CHANGED
@@ -16,7 +16,7 @@ export { LambderCookieJar, parseSetCookie } from "./shared/transport/LambderCook
16
16
  export { resolveApiOutcome } from "./shared/wire/LambderApiOutcome.js";
17
17
  // The per-endpoint signature map a build ships with, how a caller reads it, the
18
18
  // mark a shared schema sets on an enum its readers let grow, and the reload-loop window.
19
- export { apiNameKeyOf, lookupApiSignature, readApiSignature, API_SIGNATURE_HEX_LENGTH, extensibleEnum } from "./shared/wire/LambderApiSignature.js";
19
+ export { apiNameKeyOf, lookupApiSignature, readApiSignature, API_SIGNATURE_HEX_LENGTH, extensibleEnum } from "./shared/wire/LambderApiSignatureMap.js";
20
20
  export { RELOAD_LOOP_WINDOW_MS } from "./client/LambderReloadLoopBreaker.js";
21
21
  export { compareDottedVersions, isDottedVersion } from "./shared/wire/LambderVersionOrder.js";
22
22
  export { createIdempotencyKey, createIdempotencyKeyScope } from "./shared/wire/LambderIdempotencyKeyScope.js";
@@ -13,7 +13,7 @@ import { type LambderPipelineBackends, type LambderPipelineBackendSwap } from ".
13
13
  import type { LambderFileSource } from "../shared/contracts/LambderFileSource.js";
14
14
  import { LAMBDER_BACKEND_SWAP, LAMBDER_CRASH_WATCH } from "../shared/util/LambderTestingDoors.js";
15
15
  import { type LambderApiSignatureEntry } from "../api/LambderApiSignature.js";
16
- import { type LambderApiSignatureMap } from "../shared/wire/LambderApiSignature.js";
16
+ import { type LambderApiSignatureMap } from "../shared/wire/LambderApiSignatureMap.js";
17
17
  import type { LambderApiOptionEntries } from "../shared/wire/LambderApiOptionEntries.js";
18
18
  import type { LambderApiIdempotencyOption } from "../shared/wire/LambderApiOptionValues.js";
19
19
  import type { LambderApiGuard, LambderGuardMetaMap, LambderGuardsOption, LambderGuardDataOf, LambderGuardInputsOf } from "../api/LambderApiGuards.js";
@@ -14,7 +14,7 @@ import { isLambderApiRefusal } from "../shared/wire/LambderApiRefusal.js";
14
14
  import { LambderApiPipeline } from "../api/LambderApiPipeline.js";
15
15
  import { LAMBDER_BACKEND_SWAP, LAMBDER_CRASH_WATCH } from "../shared/util/LambderTestingDoors.js";
16
16
  import { apiSignatureOf } from "../api/LambderApiSignature.js";
17
- import { apiNameKeyOf } from "../shared/wire/LambderApiSignature.js";
17
+ import { apiNameKeyOf } from "../shared/wire/LambderApiSignatureMap.js";
18
18
  import { assertPlainData } from "../shared/util/assertPlainData.js";
19
19
  import { apiNotFoundAnswer, buildApiEnvelope, envelopeAnswer, refusalAnswer, sessionExpiredAnswer, } from "../api/LambderApiEnvelope.js";
20
20
  import { LambderApiOutputValidationError } from "../api/LambderApiOutputValidationError.js";
@@ -1,5 +1,5 @@
1
1
  import type { z } from "zod";
2
- import type { LambderApiSignatureMap } from "../shared/wire/LambderApiSignature.js";
2
+ import type { LambderApiSignatureMap } from "../shared/wire/LambderApiSignatureMap.js";
3
3
  import type { Context } from "aws-lambda";
4
4
  import type LambderResolver from "./LambderResolver.js";
5
5
  import type LambderResponseBuilder from "./LambderResponseBuilder.js";
package/dist/index.d.ts CHANGED
@@ -34,8 +34,8 @@ export type { LambderApiCallContext, LambderApiCallTrace, LambderResponseTools }
34
34
  export type { LambderApiDefinition } from "./api/LambderApiDefinition.js";
35
35
  export { apiSignatureOf } from "./api/LambderApiSignature.js";
36
36
  export type { LambderApiSignatureEntry } from "./api/LambderApiSignature.js";
37
- export { apiNameKeyOf, lookupApiSignature, readApiSignature, API_SIGNATURE_HEX_LENGTH, extensibleEnum } from "./shared/wire/LambderApiSignature.js";
38
- export type { LambderApiSignatureMap } from "./shared/wire/LambderApiSignature.js";
37
+ export { apiNameKeyOf, lookupApiSignature, readApiSignature, API_SIGNATURE_HEX_LENGTH, extensibleEnum } from "./shared/wire/LambderApiSignatureMap.js";
38
+ export type { LambderApiSignatureMap } from "./shared/wire/LambderApiSignatureMap.js";
39
39
  export { RELOAD_LOOP_WINDOW_MS } from "./client/LambderReloadLoopBreaker.js";
40
40
  export { compareDottedVersions, isDottedVersion } from "./shared/wire/LambderVersionOrder.js";
41
41
  export { buildApiEnvelope, envelopeAnswer, refusalAnswer, validationAnswer, apiNotFoundAnswer, sessionExpiredAnswer, versionExpiredAnswer, invalidPayloadAnswer, crashAnswer, API_ANSWER_CONTENT_TYPE, } from "./api/LambderApiEnvelope.js";
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ export { LambderAnswerHeaders, getAnswerHeader, setAnswerHeader, addAnswerHeader
24
24
  export { createApiCallContext } from "./api/LambderApiCallContext.js";
25
25
  // Per-endpoint signatures: what a client build ships with, digested from the server's own registrations.
26
26
  export { apiSignatureOf } from "./api/LambderApiSignature.js";
27
- export { apiNameKeyOf, lookupApiSignature, readApiSignature, API_SIGNATURE_HEX_LENGTH, extensibleEnum } from "./shared/wire/LambderApiSignature.js";
27
+ export { apiNameKeyOf, lookupApiSignature, readApiSignature, API_SIGNATURE_HEX_LENGTH, extensibleEnum } from "./shared/wire/LambderApiSignatureMap.js";
28
28
  export { RELOAD_LOOP_WINDOW_MS } from "./client/LambderReloadLoopBreaker.js";
29
29
  export { compareDottedVersions, isDottedVersion } from "./shared/wire/LambderVersionOrder.js";
30
30
  export { buildApiEnvelope, envelopeAnswer, refusalAnswer, validationAnswer, apiNotFoundAnswer, sessionExpiredAnswer, versionExpiredAnswer, invalidPayloadAnswer, crashAnswer, API_ANSWER_CONTENT_TYPE, } from "./api/LambderApiEnvelope.js";
@@ -22,7 +22,7 @@
22
22
  */
23
23
  import type { APIGatewayProxyEventV2, Context } from "aws-lambda";
24
24
  import { type LambderInvokeFailure, type LambderInvokeOutcome } from "./LambderInvokeOutcome.js";
25
- import { type LambderApiSignatureMap } from "../shared/wire/LambderApiSignature.js";
25
+ import { type LambderApiSignatureMap } from "../shared/wire/LambderApiSignatureMap.js";
26
26
  import type { LambdaClient, LambdaClientConfig } from "@aws-sdk/client-lambda";
27
27
  import type { LambderApiContractShape } from "../shared/wire/LambderApiContract.js";
28
28
  import { type LambderCallArgs, type LambderContractOutputOf, type LambderGuardInputsProviderOption, type LambderSharedCallOptions } from "../shared/wire/LambderCallOptions.js";
@@ -22,7 +22,7 @@
22
22
  */
23
23
  import { classifyDeliveryFailure, describeFailure, errorFromFunctionError, LambderInvokeError, parseFunctionError, } from "./LambderInvokeOutcome.js";
24
24
  import { DEFAULT_SESSION_TOKEN_COOKIE_KEY } from "../shared/wire/LambderSessionCookieNames.js";
25
- import { readApiSignature } from "../shared/wire/LambderApiSignature.js";
25
+ import { readApiSignature } from "../shared/wire/LambderApiSignatureMap.js";
26
26
  import { resolveApiOutcome } from "../shared/wire/LambderApiOutcome.js";
27
27
  import { mergeGuardInputs, } from "../shared/wire/LambderCallOptions.js";
28
28
  import { beginIdempotentAttempt, IDEMPOTENT_ATTEMPT_NOT_SENT } from "../shared/wire/LambderIdempotencyKeyScope.js";
@@ -1,5 +1,5 @@
1
1
  import type { z } from "zod";
2
- import type { LambderApiSignatureMap } from "../shared/wire/LambderApiSignature.js";
2
+ import type { LambderApiSignatureMap } from "../shared/wire/LambderApiSignatureMap.js";
3
3
  import type { LambderApiResponseConfig } from "../shared/wire/LambderApiContract.js";
4
4
  import type { LambderHttpStatusCode } from "../shared/wire/LambderHttpStatus.js";
5
5
  import type { MaybePromise } from "../shared/util/LambderTypeUtilities.js";
@@ -5,7 +5,7 @@ import { type LambderLambdaHttpResult } from "../invoke/LambderLambdaEvent.js";
5
5
  import type { LambderCreatedSession } from "../session/LambderSessionManager.js";
6
6
  import { LambderCookieJar } from "../shared/transport/LambderCookieJar.js";
7
7
  import type { LambderApiContractShape } from "../shared/wire/LambderApiContract.js";
8
- import type { LambderApiSignatureMap } from "../shared/wire/LambderApiSignature.js";
8
+ import type { LambderApiSignatureMap } from "../shared/wire/LambderApiSignatureMap.js";
9
9
  import type { LambderGuardInputsProviderOption } from "../shared/wire/LambderCallOptions.js";
10
10
  /**
11
11
  * How one visitor differs from the next. Everything is optional: a visitor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambder",
3
- "version": "9.0.1",
3
+ "version": "9.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": [