@crvouga/mockingbird-service-aws-speech 0.2.0 → 1.0.1
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 +14 -1
- package/dist/{chunk-A46XUZ6Z.js → chunk-76FALW7Q.js} +2 -2
- package/dist/{chunk-3DE3INNY.js → chunk-FGKQ3CFQ.js} +23 -6
- package/dist/chunk-FGKQ3CFQ.js.map +7 -0
- package/dist/cli.js +5 -3
- package/dist/cli.js.map +2 -2
- package/dist/index.d.ts +117 -89
- package/dist/index.js +1 -1
- package/dist/server.d.ts +221 -165
- package/dist/server.js +2 -2
- package/package.json +6 -2
- package/dist/chunk-3DE3INNY.js.map +0 -7
- /package/dist/{chunk-A46XUZ6Z.js.map → chunk-76FALW7Q.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-aws-speech
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 1.0.1 (2026-09-26)
|
|
4
|
+
|
|
5
|
+
### Fixes and improvements
|
|
6
|
+
|
|
7
|
+
- take the rejected-request byte count from content-length, never by reading the body ([a0e5fb2](https://github.com/crvouga/mockingbird/commit/a0e5fb2fc80ab725c3552b612f3f091fd6c857fb))
|
|
8
|
+
- reject a present body by media type, and log what a rejected request sent ([12e351a](https://github.com/crvouga/mockingbird/commit/12e351aba53cfb7b41e31a7809419455fc2902eb))
|
|
9
|
+
|
|
10
|
+
## 1.0.0 (2026-09-24)
|
|
11
|
+
|
|
12
|
+
### ⚠️ Breaking changes
|
|
13
|
+
|
|
14
|
+
- vendor branding for every service; purge internal mocks and consumer names ([f689534](https://github.com/crvouga/mockingbird/commit/f6895343543550dafcb7d76b426cae7635e03226))
|
|
15
|
+
|
|
16
|
+
## 0.2.0 (2026-09-23)
|
|
4
17
|
|
|
5
18
|
### Features
|
|
6
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRuntime
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
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
|
-
|
|
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 ? "0.
|
|
1292
|
+
var PACKAGE_VERSION = true ? "1.0.1" : 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-
|
|
3427
|
+
//# sourceMappingURL=chunk-FGKQ3CFQ.js.map
|