@crvouga/mockingbird-service-brevo 1.10.5 → 1.10.7

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,5 +1,17 @@
1
1
  # Changelog — @crvouga/mockingbird-service-brevo
2
2
 
3
+ ## 1.10.7 (2026-11-02)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - save and replay a 500 the endpoint produced under an Idempotency-Key ([789bbcc](https://github.com/crvouga/mockingbird/commit/789bbcccb792cddaf27f4f6db6d2fcf2da1d07fe))
8
+
9
+ ## 1.10.6 (2026-11-02)
10
+
11
+ ### Fixes and improvements
12
+
13
+ - compare the admin key in constant time ([2a43141](https://github.com/crvouga/mockingbird/commit/2a43141f50dab41e698c3bbce0c69bf65b40e24e))
14
+
3
15
  ## 1.10.5 (2026-11-02)
4
16
 
5
17
  ### Fixes and improvements
@@ -9,7 +9,7 @@ import {
9
9
  parseFaultHeader,
10
10
  resolveAdminPrefix,
11
11
  restoreClock
12
- } from "./chunk-NSGEQCA4.js";
12
+ } from "./chunk-6JMJUSKQ.js";
13
13
 
14
14
  // ../../adapters/node/dist/cli.js
15
15
  import { readFile as readFile5 } from "node:fs/promises";
@@ -3057,7 +3057,7 @@ async function preflightFleet(config, options) {
3057
3057
  break;
3058
3058
  }
3059
3059
  }
3060
- targets.set(name, { ...target, packageVersion: packageVersion ?? "1.10.5" });
3060
+ targets.set(name, { ...target, packageVersion: packageVersion ?? "1.10.7" });
3061
3061
  } catch (error) {
3062
3062
  throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
3063
3063
  }
@@ -5011,4 +5011,4 @@ export {
5011
5011
  createServer2 as createServer,
5012
5012
  serveTarget
5013
5013
  };
5014
- //# sourceMappingURL=chunk-UXFNNWKZ.js.map
5014
+ //# sourceMappingURL=chunk-4SXB2QSW.js.map
@@ -2620,6 +2620,17 @@ var createNamespaceControls = (options) => {
2620
2620
  };
2621
2621
  };
2622
2622
 
2623
+ // ../core/dist/signing.js
2624
+ var encoder = new TextEncoder();
2625
+ var timingSafeEqual = (a, b) => {
2626
+ if (a.length !== b.length)
2627
+ return false;
2628
+ let diff = 0;
2629
+ for (let i = 0; i < a.length; i++)
2630
+ diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
2631
+ return diff === 0;
2632
+ };
2633
+
2623
2634
  // ../core/dist/surface.js
2624
2635
  var defineMock = (runtime) => runtime;
2625
2636
  var ADMIN_ROUTE_REFERENCE = {
@@ -2738,6 +2749,10 @@ var assertAdminPrefixAvailable = (prefix, paths) => {
2738
2749
  }
2739
2750
  };
2740
2751
  var ADMIN_KEY_HEADER = CONTROL_HEADERS.adminKey;
2752
+ var hasAdminKey = (headers, adminKey) => {
2753
+ const sent = headers.get(ADMIN_KEY_HEADER);
2754
+ return sent !== null && timingSafeEqual(sent, adminKey);
2755
+ };
2741
2756
  var NAMESPACE_HEADER = CONTROL_HEADERS.namespace;
2742
2757
  var ADMIN_DOCS_URL = "https://mockingbird.chrisvouga.dev/docs/admin-controls";
2743
2758
  var ADMIN_CONTROL_PAGES = [
@@ -3211,7 +3226,7 @@ var createControlPlane = (context) => {
3211
3226
  }
3212
3227
  const path = url.pathname.slice(adminPrefix.length) || "/";
3213
3228
  const shell = request.method === "GET" && (path === "/ui" || path === "/ui/");
3214
- if (!shell && context.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== context.adminKey) {
3229
+ if (!shell && context.adminKey !== void 0 && !hasAdminKey(request.headers, context.adminKey)) {
3215
3230
  return adminError(401, `missing or wrong ${ADMIN_KEY_HEADER}`);
3216
3231
  }
3217
3232
  for (const route of routes) {
@@ -3972,7 +3987,7 @@ var stateAdminRoutes = (routes) => {
3972
3987
  };
3973
3988
 
3974
3989
  // ../core/dist/version.js
3975
- var PACKAGE_VERSION = true ? "1.10.5" : UNRELEASED_VERSION;
3990
+ var PACKAGE_VERSION = true ? "1.10.7" : UNRELEASED_VERSION;
3976
3991
 
3977
3992
  // ../core/dist/webhooks.js
3978
3993
  var json4 = (status, body) => new Response(JSON.stringify(body), {
@@ -4951,7 +4966,7 @@ var createRuntime = (options) => {
4951
4966
  throw error2;
4952
4967
  }
4953
4968
  const rewinds = at !== void 0 && selectedBranch === "main" && MUTATING_METHODS.has(request.method);
4954
- if ((requested || rewinds) && options.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== options.adminKey)
4969
+ if ((requested || rewinds) && options.adminKey !== void 0 && !hasAdminKey(request.headers, options.adminKey))
4955
4970
  return refuse(401, `control headers need ${ADMIN_KEY_HEADER}`);
4956
4971
  controls.ensure(namespace);
4957
4972
  if (requested?.restore !== void 0 && !snapshotStore.get(namespace, requested.restore))
@@ -5450,4 +5465,4 @@ export {
5450
5465
  BREVO_NAMESPACE,
5451
5466
  BrevoAPI
5452
5467
  };
5453
- //# sourceMappingURL=chunk-NSGEQCA4.js.map
5468
+ //# sourceMappingURL=chunk-6JMJUSKQ.js.map