@crvouga/mockingbird-service-resource-groups 1.10.4 → 1.10.6

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-resource-groups
2
2
 
3
+ ## 1.10.6 (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.5 (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.4 (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-2J67GSBU.js";
12
+ } from "./chunk-SR6VL6JP.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.4" });
3060
+ targets.set(name, { ...target, packageVersion: packageVersion ?? "1.10.6" });
3061
3061
  } catch (error) {
3062
3062
  throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
3063
3063
  }
@@ -5009,4 +5009,4 @@ export {
5009
5009
  createServer2 as createServer,
5010
5010
  serveTarget
5011
5011
  };
5012
- //# sourceMappingURL=chunk-MG2PPDKS.js.map
5012
+ //# sourceMappingURL=chunk-2KJLAGNM.js.map
@@ -6797,6 +6797,17 @@ var createNamespaceControls = (options) => {
6797
6797
  };
6798
6798
  };
6799
6799
 
6800
+ // ../core/dist/signing.js
6801
+ var encoder = new TextEncoder();
6802
+ var timingSafeEqual = (a, b) => {
6803
+ if (a.length !== b.length)
6804
+ return false;
6805
+ let diff = 0;
6806
+ for (let i = 0; i < a.length; i++)
6807
+ diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
6808
+ return diff === 0;
6809
+ };
6810
+
6800
6811
  // ../core/dist/surface.js
6801
6812
  var defineMock = (runtime) => runtime;
6802
6813
  var ADMIN_ROUTE_REFERENCE = {
@@ -6915,6 +6926,10 @@ var assertAdminPrefixAvailable = (prefix, paths) => {
6915
6926
  }
6916
6927
  };
6917
6928
  var ADMIN_KEY_HEADER = CONTROL_HEADERS.adminKey;
6929
+ var hasAdminKey = (headers, adminKey) => {
6930
+ const sent = headers.get(ADMIN_KEY_HEADER);
6931
+ return sent !== null && timingSafeEqual(sent, adminKey);
6932
+ };
6918
6933
  var NAMESPACE_HEADER = CONTROL_HEADERS.namespace;
6919
6934
  var ADMIN_DOCS_URL = "https://mockingbird.chrisvouga.dev/docs/admin-controls";
6920
6935
  var ADMIN_CONTROL_PAGES = [
@@ -7388,7 +7403,7 @@ var createControlPlane = (context) => {
7388
7403
  }
7389
7404
  const path = url.pathname.slice(adminPrefix.length) || "/";
7390
7405
  const shell = request.method === "GET" && (path === "/ui" || path === "/ui/");
7391
- if (!shell && context.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== context.adminKey) {
7406
+ if (!shell && context.adminKey !== void 0 && !hasAdminKey(request.headers, context.adminKey)) {
7392
7407
  return adminError(401, `missing or wrong ${ADMIN_KEY_HEADER}`);
7393
7408
  }
7394
7409
  for (const route of routes) {
@@ -8151,7 +8166,7 @@ var stateAdminRoutes = (routes) => {
8151
8166
  };
8152
8167
 
8153
8168
  // ../core/dist/version.js
8154
- var PACKAGE_VERSION = true ? "1.10.4" : UNRELEASED_VERSION;
8169
+ var PACKAGE_VERSION = true ? "1.10.6" : UNRELEASED_VERSION;
8155
8170
 
8156
8171
  // ../core/dist/webhooks.js
8157
8172
  var json4 = (status, body) => new Response(JSON.stringify(body), {
@@ -9130,7 +9145,7 @@ var createRuntime = (options) => {
9130
9145
  throw error;
9131
9146
  }
9132
9147
  const rewinds = at !== void 0 && selectedBranch === "main" && MUTATING_METHODS.has(request.method);
9133
- if ((requested || rewinds) && options.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== options.adminKey)
9148
+ if ((requested || rewinds) && options.adminKey !== void 0 && !hasAdminKey(request.headers, options.adminKey))
9134
9149
  return refuse(401, `control headers need ${ADMIN_KEY_HEADER}`);
9135
9150
  controls.ensure(namespace);
9136
9151
  if (requested?.restore !== void 0 && !snapshotStore.get(namespace, requested.restore))
@@ -9565,4 +9580,4 @@ export {
9565
9580
  createRuntime2 as createRuntime,
9566
9581
  ResourceGroupsAPI
9567
9582
  };
9568
- //# sourceMappingURL=chunk-2J67GSBU.js.map
9583
+ //# sourceMappingURL=chunk-SR6VL6JP.js.map