@crvouga/mockingbird-service-aws-speech 1.0.0 → 1.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
@@ -1,15 +1,24 @@
1
1
  # Changelog — @crvouga/mockingbird-service-aws-speech
2
2
 
3
+ ## 1.0.2 (2026-09-26)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - treat enum [""] branches as unset markers in form coercion ([7177835](https://github.com/crvouga/mockingbird/commit/7177835cc510e14245d6648ad2821daa694bb80c))
8
+
9
+ ## 1.0.1 (2026-09-25)
10
+
11
+ ### Fixes and improvements
12
+
13
+ - take the rejected-request byte count from content-length, never by reading the body ([a0e5fb2](https://github.com/crvouga/mockingbird/commit/a0e5fb2fc80ab725c3552b612f3f091fd6c857fb))
14
+ - reject a present body by media type, and log what a rejected request sent ([12e351a](https://github.com/crvouga/mockingbird/commit/12e351aba53cfb7b41e31a7809419455fc2902eb))
15
+
3
16
  ## 1.0.0 (2026-09-24)
4
17
 
5
18
  ### ⚠️ Breaking changes
6
19
 
7
20
  - vendor branding for every service; purge internal mocks and consumer names ([f689534](https://github.com/crvouga/mockingbird/commit/f6895343543550dafcb7d76b426cae7635e03226))
8
21
 
9
- ### Dependencies
10
-
11
- - `@crvouga/mockingbird-service-sqlite`
12
-
13
22
  ## 0.2.0 (2026-09-23)
14
23
 
15
24
  ### Features
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRuntime
3
- } from "./chunk-3DE3INNY.js";
3
+ } from "./chunk-FGKQ3CFQ.js";
4
4
 
5
5
  // src/h2c.ts
6
6
  import {
@@ -303,4 +303,4 @@ export {
303
303
  createServer,
304
304
  serveTarget
305
305
  };
306
- //# sourceMappingURL=chunk-A46XUZ6Z.js.map
306
+ //# sourceMappingURL=chunk-76FALW7Q.js.map
@@ -1157,6 +1157,16 @@ var operationMetadata = (operation) => {
1157
1157
 
1158
1158
  // ../core/dist/service.js
1159
1159
  import { Hono } from "hono";
1160
+
1161
+ // ../core/dist/validation.js
1162
+ var recorded = /* @__PURE__ */ new WeakMap();
1163
+ var recordedIssues = (request) => recorded.get(request);
1164
+
1165
+ // ../core/dist/service.js
1166
+ var withIssues = (request, response) => {
1167
+ const issues = response.status >= 400 ? recordedIssues(request) : void 0;
1168
+ return issues && issues.length > 0 ? annotateResponse(response, { issues }) : response;
1169
+ };
1160
1170
  var defineOperations = (handlers) => handlers;
1161
1171
  var OperationRegistryError = class extends Error {
1162
1172
  problems;
@@ -1242,9 +1252,7 @@ var createService = (options) => {
1242
1252
  now
1243
1253
  };
1244
1254
  const short = await options.before?.(context);
1245
- if (short)
1246
- return short;
1247
- return handler(context);
1255
+ return withIssues(request, short ?? await handler(context));
1248
1256
  };
1249
1257
  app.on(operation.method.toUpperCase(), honoPath(operation.path), route);
1250
1258
  }
@@ -1281,7 +1289,7 @@ var restoreNamespace = (sqlite, namespace, snapshot) => {
1281
1289
  };
1282
1290
 
1283
1291
  // ../core/dist/version.js
1284
- var PACKAGE_VERSION = true ? "1.0.0" : UNRELEASED_VERSION;
1292
+ var PACKAGE_VERSION = true ? "1.0.2" : UNRELEASED_VERSION;
1285
1293
 
1286
1294
  // ../core/dist/signing.js
1287
1295
  var encoder = new TextEncoder();
@@ -1725,8 +1733,15 @@ var createRuntime = (options) => {
1725
1733
  const started = monotonicNow();
1726
1734
  const url = new URL(request.url);
1727
1735
  const operationId = operationIdFor(request, url.pathname);
1736
+ const contentLength = request.headers.get("content-length");
1737
+ const received = {
1738
+ contentType: request.headers.get("content-type"),
1739
+ bodyBytes: contentLength !== null && /^\d+$/.test(contentLength) ? Number(contentLength) : null,
1740
+ transferEncoding: request.headers.get("transfer-encoding")
1741
+ };
1728
1742
  const log = (status, faultId, response2) => {
1729
1743
  const noted = response2 ? responseNotes(response2) : void 0;
1744
+ const rejected = status >= 400 && faultId === void 0;
1730
1745
  const entry = {
1731
1746
  service: options.name,
1732
1747
  namespace,
@@ -1738,7 +1753,9 @@ var createRuntime = (options) => {
1738
1753
  unmatched: options.document !== void 0 && operationId === void 0,
1739
1754
  ...faultId !== void 0 ? { faultId } : {},
1740
1755
  ...noted?.ids && Object.keys(noted.ids).length > 0 ? { ids: noted.ids } : {},
1741
- ...noted?.adopted ? { adopted: true } : {}
1756
+ ...noted?.adopted ? { adopted: true } : {},
1757
+ ...rejected ? { request: { ...received } } : {},
1758
+ ...rejected && noted?.issues && noted.issues.length > 0 ? { issues: noted.issues.map((issue) => ({ ...issue })) } : {}
1742
1759
  };
1743
1760
  metrics.record(entry);
1744
1761
  journal.record({ ...entry, at: new Date(clock.now()).toISOString() });
@@ -3407,4 +3424,4 @@ export {
3407
3424
  accessKeyCredential,
3408
3425
  SpeechAPI
3409
3426
  };
3410
- //# sourceMappingURL=chunk-3DE3INNY.js.map
3427
+ //# sourceMappingURL=chunk-FGKQ3CFQ.js.map