@crvouga/mockingbird-service-slack 3.10.2 → 3.10.4

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,18 @@
1
1
  # Changelog — @crvouga/mockingbird-service-slack
2
2
 
3
+ ## 3.10.4 (2026-11-02)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - compare the admin key in constant time ([2a43141](https://github.com/crvouga/mockingbird/commit/2a43141f50dab41e698c3bbce0c69bf65b40e24e))
8
+
9
+ ## 3.10.3 (2026-11-02)
10
+
11
+ ### Fixes and improvements
12
+
13
+ - stop walkSchema recursing forever on a self-referential $ref ([69464a9](https://github.com/crvouga/mockingbird/commit/69464a9d9e7f468c5e1095125108d4d3d5515431))
14
+ - densify sparse bracket arrays by their written indices ([84a28cb](https://github.com/crvouga/mockingbird/commit/84a28cb182e3d7df91102897f0fc11fca714ba5f))
15
+
3
16
  ## 3.10.2 (2026-11-02)
4
17
 
5
18
  ### Fixes and improvements
@@ -14,7 +14,7 @@ import {
14
14
  resolveAdminPrefix,
15
15
  restoreClock,
16
16
  unbindSocketTransport
17
- } from "./chunk-A7U2AN2D.js";
17
+ } from "./chunk-USP7TBUK.js";
18
18
 
19
19
  // ../../adapters/node/dist/cli.js
20
20
  import { readFile as readFile5 } from "node:fs/promises";
@@ -3062,7 +3062,7 @@ async function preflightFleet(config, options) {
3062
3062
  break;
3063
3063
  }
3064
3064
  }
3065
- targets.set(name, { ...target, packageVersion: packageVersion ?? "3.10.2" });
3065
+ targets.set(name, { ...target, packageVersion: packageVersion ?? "3.10.4" });
3066
3066
  } catch (error) {
3067
3067
  throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
3068
3068
  }
@@ -5383,4 +5383,4 @@ export {
5383
5383
  createServer2 as createServer,
5384
5384
  serveTarget
5385
5385
  };
5386
- //# sourceMappingURL=chunk-YX5A6OAD.js.map
5386
+ //# sourceMappingURL=chunk-CNQLFHX2.js.map
@@ -602,6 +602,7 @@ var parsePath = (rawKey) => {
602
602
  return path;
603
603
  };
604
604
  var isIndex = (segment) => /^(0|[1-9][0-9]*)$/.test(segment);
605
+ var MAX_ARRAY_INDEX = 4294967294;
605
606
  var put = (target, key, value) => {
606
607
  if (key === "__proto__") {
607
608
  Object.defineProperty(target, key, {
@@ -664,8 +665,17 @@ var decodeFormPairs = (pairs) => {
664
665
  var densify = (value) => {
665
666
  if (typeof value === "string")
666
667
  return value;
667
- if (Array.isArray(value))
668
- return value.filter((item) => item !== void 0).map(densify);
668
+ if (Array.isArray(value)) {
669
+ const dense = [];
670
+ for (const key of Object.keys(value)) {
671
+ if (!isIndex(key) || Number(key) > MAX_ARRAY_INDEX)
672
+ continue;
673
+ const item = value[Number(key)];
674
+ if (item !== void 0)
675
+ dense.push(densify(item));
676
+ }
677
+ return dense;
678
+ }
669
679
  const out = {};
670
680
  for (const [key, item] of Object.entries(value))
671
681
  put(out, key, densify(item));
@@ -2379,6 +2389,17 @@ var createNamespaceControls = (options) => {
2379
2389
  };
2380
2390
  };
2381
2391
 
2392
+ // ../core/dist/signing.js
2393
+ var encoder = new TextEncoder();
2394
+ var timingSafeEqual2 = (a, b) => {
2395
+ if (a.length !== b.length)
2396
+ return false;
2397
+ let diff = 0;
2398
+ for (let i = 0; i < a.length; i++)
2399
+ diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
2400
+ return diff === 0;
2401
+ };
2402
+
2382
2403
  // ../core/dist/surface.js
2383
2404
  var defineMock = (runtime) => runtime;
2384
2405
  var ADMIN_ROUTE_REFERENCE = {
@@ -2497,6 +2518,10 @@ var assertAdminPrefixAvailable = (prefix, paths) => {
2497
2518
  }
2498
2519
  };
2499
2520
  var ADMIN_KEY_HEADER = CONTROL_HEADERS.adminKey;
2521
+ var hasAdminKey = (headers, adminKey) => {
2522
+ const sent = headers.get(ADMIN_KEY_HEADER);
2523
+ return sent !== null && timingSafeEqual2(sent, adminKey);
2524
+ };
2500
2525
  var NAMESPACE_HEADER = CONTROL_HEADERS.namespace;
2501
2526
  var ADMIN_DOCS_URL = "https://mockingbird.chrisvouga.dev/docs/admin-controls";
2502
2527
  var ADMIN_CONTROL_PAGES = [
@@ -2970,7 +2995,7 @@ var createControlPlane = (context) => {
2970
2995
  }
2971
2996
  const path = url.pathname.slice(adminPrefix.length) || "/";
2972
2997
  const shell = request.method === "GET" && (path === "/ui" || path === "/ui/");
2973
- if (!shell && context.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== context.adminKey) {
2998
+ if (!shell && context.adminKey !== void 0 && !hasAdminKey(request.headers, context.adminKey)) {
2974
2999
  return adminError(401, `missing or wrong ${ADMIN_KEY_HEADER}`);
2975
3000
  }
2976
3001
  for (const route of routes) {
@@ -3830,7 +3855,7 @@ var stateAdminRoutes = (routes) => {
3830
3855
  };
3831
3856
 
3832
3857
  // ../core/dist/version.js
3833
- var PACKAGE_VERSION = true ? "3.10.2" : UNRELEASED_VERSION;
3858
+ var PACKAGE_VERSION = true ? "3.10.4" : UNRELEASED_VERSION;
3834
3859
 
3835
3860
  // ../core/dist/webhooks.js
3836
3861
  var json5 = (status, body) => new Response(JSON.stringify(body), {
@@ -4811,7 +4836,7 @@ var createRuntime = (options) => {
4811
4836
  throw error;
4812
4837
  }
4813
4838
  const rewinds = at !== void 0 && selectedBranch === "main" && MUTATING_METHODS.has(request.method);
4814
- if ((requested || rewinds) && options.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== options.adminKey)
4839
+ if ((requested || rewinds) && options.adminKey !== void 0 && !hasAdminKey(request.headers, options.adminKey))
4815
4840
  return refuse(401, `control headers need ${ADMIN_KEY_HEADER}`);
4816
4841
  controls.ensure(namespace);
4817
4842
  if (requested?.restore !== void 0 && !snapshotStore.get(namespace, requested.restore))
@@ -12947,4 +12972,4 @@ export {
12947
12972
  * Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
12948
12973
  * MIT license: see THIRD_PARTY_NOTICES.md in the repository and npm packages.
12949
12974
  */
12950
- //# sourceMappingURL=chunk-A7U2AN2D.js.map
12975
+ //# sourceMappingURL=chunk-USP7TBUK.js.map