@crvouga/mockingbird-service-oauth 1.0.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 CHANGED
@@ -1,15 +1,18 @@
1
1
  # Changelog — @crvouga/mockingbird-service-oauth
2
2
 
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
+
3
10
  ## 1.0.0 (2026-09-24)
4
11
 
5
12
  ### ⚠️ Breaking changes
6
13
 
7
14
  - vendor branding for every service; purge internal mocks and consumer names ([f689534](https://github.com/crvouga/mockingbird/commit/f6895343543550dafcb7d76b426cae7635e03226))
8
15
 
9
- ### Dependencies
10
-
11
- - `@crvouga/mockingbird-service-sqlite`
12
-
13
16
  ## 0.2.0 (2026-09-24)
14
17
 
15
18
  ### Features
@@ -1384,7 +1384,7 @@ var restoreNamespace = (sqlite, namespace, snapshot) => {
1384
1384
  };
1385
1385
 
1386
1386
  // ../core/dist/version.js
1387
- var PACKAGE_VERSION = true ? "1.0.0" : UNRELEASED_VERSION;
1387
+ var PACKAGE_VERSION = true ? "1.0.1" : UNRELEASED_VERSION;
1388
1388
 
1389
1389
  // ../core/dist/webhooks.js
1390
1390
  var json2 = (status, body) => new Response(JSON.stringify(body), { status, headers: { "content-type": "application/json" } });
@@ -1822,8 +1822,15 @@ var createRuntime = (options) => {
1822
1822
  const started = monotonicNow();
1823
1823
  const url = new URL(request.url);
1824
1824
  const operationId = operationIdFor(request, url.pathname);
1825
+ const contentLength = request.headers.get("content-length");
1826
+ const received = {
1827
+ contentType: request.headers.get("content-type"),
1828
+ bodyBytes: contentLength !== null && /^\d+$/.test(contentLength) ? Number(contentLength) : null,
1829
+ transferEncoding: request.headers.get("transfer-encoding")
1830
+ };
1825
1831
  const log = (status, faultId, response2) => {
1826
1832
  const noted = response2 ? responseNotes(response2) : void 0;
1833
+ const rejected = status >= 400 && faultId === void 0;
1827
1834
  const entry = {
1828
1835
  service: options.name,
1829
1836
  namespace,
@@ -1835,7 +1842,9 @@ var createRuntime = (options) => {
1835
1842
  unmatched: options.document !== void 0 && operationId === void 0,
1836
1843
  ...faultId !== void 0 ? { faultId } : {},
1837
1844
  ...noted?.ids && Object.keys(noted.ids).length > 0 ? { ids: noted.ids } : {},
1838
- ...noted?.adopted ? { adopted: true } : {}
1845
+ ...noted?.adopted ? { adopted: true } : {},
1846
+ ...rejected ? { request: { ...received } } : {},
1847
+ ...rejected && noted?.issues && noted.issues.length > 0 ? { issues: noted.issues.map((issue) => ({ ...issue })) } : {}
1839
1848
  };
1840
1849
  metrics.record(entry);
1841
1850
  journal.record({ ...entry, at: new Date(clock.now()).toISOString() });
@@ -3565,4 +3574,4 @@ export {
3565
3574
  createMultiRuntime,
3566
3575
  OAuthAPI
3567
3576
  };
3568
- //# sourceMappingURL=chunk-PCHI2SDJ.js.map
3577
+ //# sourceMappingURL=chunk-I24F66FL.js.map