@crvouga/mockingbird-service-caretalk 3.10.4 → 3.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 +13 -0
- package/dist/{chunk-4UOTC2IO.js → chunk-INYNJMH3.js} +3 -3
- package/dist/{chunk-P4ZTKUZB.js → chunk-M6IKDJGU.js} +39 -17
- package/dist/chunk-M6IKDJGU.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-P4ZTKUZB.js.map +0 -7
- /package/dist/{chunk-4UOTC2IO.js.map → chunk-INYNJMH3.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-caretalk
|
|
2
2
|
|
|
3
|
+
## 3.10.6 (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.5 (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.4 (2026-11-02)
|
|
4
17
|
|
|
5
18
|
### Fixes and improvements
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
parseFaultHeader,
|
|
10
10
|
resolveAdminPrefix,
|
|
11
11
|
restoreClock
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-M6IKDJGU.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 ?? "3.10.
|
|
3060
|
+
targets.set(name, { ...target, packageVersion: packageVersion ?? "3.10.6" });
|
|
3061
3061
|
} catch (error) {
|
|
3062
3062
|
throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
3063
3063
|
}
|
|
@@ -5039,4 +5039,4 @@ export {
|
|
|
5039
5039
|
createServer2 as createServer,
|
|
5040
5040
|
serveTarget
|
|
5041
5041
|
};
|
|
5042
|
-
//# sourceMappingURL=chunk-
|
|
5042
|
+
//# sourceMappingURL=chunk-INYNJMH3.js.map
|
|
@@ -473,6 +473,7 @@ var parsePath = (rawKey) => {
|
|
|
473
473
|
return path;
|
|
474
474
|
};
|
|
475
475
|
var isIndex = (segment) => /^(0|[1-9][0-9]*)$/.test(segment);
|
|
476
|
+
var MAX_ARRAY_INDEX = 4294967294;
|
|
476
477
|
var put = (target, key, value) => {
|
|
477
478
|
if (key === "__proto__") {
|
|
478
479
|
Object.defineProperty(target, key, {
|
|
@@ -535,8 +536,17 @@ var decodeFormPairs = (pairs) => {
|
|
|
535
536
|
var densify = (value) => {
|
|
536
537
|
if (typeof value === "string")
|
|
537
538
|
return value;
|
|
538
|
-
if (Array.isArray(value))
|
|
539
|
-
|
|
539
|
+
if (Array.isArray(value)) {
|
|
540
|
+
const dense = [];
|
|
541
|
+
for (const key of Object.keys(value)) {
|
|
542
|
+
if (!isIndex(key) || Number(key) > MAX_ARRAY_INDEX)
|
|
543
|
+
continue;
|
|
544
|
+
const item = value[Number(key)];
|
|
545
|
+
if (item !== void 0)
|
|
546
|
+
dense.push(densify(item));
|
|
547
|
+
}
|
|
548
|
+
return dense;
|
|
549
|
+
}
|
|
540
550
|
const out = {};
|
|
541
551
|
for (const [key, item] of Object.entries(value))
|
|
542
552
|
put(out, key, densify(item));
|
|
@@ -2644,6 +2654,25 @@ var createNamespaceControls = (options) => {
|
|
|
2644
2654
|
};
|
|
2645
2655
|
};
|
|
2646
2656
|
|
|
2657
|
+
// ../core/dist/signing.js
|
|
2658
|
+
var encoder = new TextEncoder();
|
|
2659
|
+
var toBase64 = (bytes) => {
|
|
2660
|
+
let binary = "";
|
|
2661
|
+
for (const byte of bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes)) {
|
|
2662
|
+
binary += String.fromCharCode(byte);
|
|
2663
|
+
}
|
|
2664
|
+
return btoa(binary);
|
|
2665
|
+
};
|
|
2666
|
+
var fromBase64 = (value) => Uint8Array.from(atob(value), (char) => char.charCodeAt(0));
|
|
2667
|
+
var timingSafeEqual = (a, b) => {
|
|
2668
|
+
if (a.length !== b.length)
|
|
2669
|
+
return false;
|
|
2670
|
+
let diff = 0;
|
|
2671
|
+
for (let i = 0; i < a.length; i++)
|
|
2672
|
+
diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
|
|
2673
|
+
return diff === 0;
|
|
2674
|
+
};
|
|
2675
|
+
|
|
2647
2676
|
// ../core/dist/surface.js
|
|
2648
2677
|
var defineMock = (runtime) => runtime;
|
|
2649
2678
|
var ADMIN_ROUTE_REFERENCE = {
|
|
@@ -2762,6 +2791,10 @@ var assertAdminPrefixAvailable = (prefix, paths) => {
|
|
|
2762
2791
|
}
|
|
2763
2792
|
};
|
|
2764
2793
|
var ADMIN_KEY_HEADER = CONTROL_HEADERS.adminKey;
|
|
2794
|
+
var hasAdminKey = (headers, adminKey) => {
|
|
2795
|
+
const sent = headers.get(ADMIN_KEY_HEADER);
|
|
2796
|
+
return sent !== null && timingSafeEqual(sent, adminKey);
|
|
2797
|
+
};
|
|
2765
2798
|
var NAMESPACE_HEADER = CONTROL_HEADERS.namespace;
|
|
2766
2799
|
var ADMIN_DOCS_URL = "https://mockingbird.chrisvouga.dev/docs/admin-controls";
|
|
2767
2800
|
var ADMIN_CONTROL_PAGES = [
|
|
@@ -3235,7 +3268,7 @@ var createControlPlane = (context) => {
|
|
|
3235
3268
|
}
|
|
3236
3269
|
const path = url.pathname.slice(adminPrefix.length) || "/";
|
|
3237
3270
|
const shell = request.method === "GET" && (path === "/ui" || path === "/ui/");
|
|
3238
|
-
if (!shell && context.adminKey !== void 0 && request.headers
|
|
3271
|
+
if (!shell && context.adminKey !== void 0 && !hasAdminKey(request.headers, context.adminKey)) {
|
|
3239
3272
|
return adminError(401, `missing or wrong ${ADMIN_KEY_HEADER}`);
|
|
3240
3273
|
}
|
|
3241
3274
|
for (const route of routes) {
|
|
@@ -4025,18 +4058,7 @@ var stateAdminRoutes = (routes) => {
|
|
|
4025
4058
|
};
|
|
4026
4059
|
|
|
4027
4060
|
// ../core/dist/version.js
|
|
4028
|
-
var PACKAGE_VERSION = true ? "3.10.
|
|
4029
|
-
|
|
4030
|
-
// ../core/dist/signing.js
|
|
4031
|
-
var encoder = new TextEncoder();
|
|
4032
|
-
var toBase64 = (bytes) => {
|
|
4033
|
-
let binary = "";
|
|
4034
|
-
for (const byte of bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes)) {
|
|
4035
|
-
binary += String.fromCharCode(byte);
|
|
4036
|
-
}
|
|
4037
|
-
return btoa(binary);
|
|
4038
|
-
};
|
|
4039
|
-
var fromBase64 = (value) => Uint8Array.from(atob(value), (char) => char.charCodeAt(0));
|
|
4061
|
+
var PACKAGE_VERSION = true ? "3.10.6" : UNRELEASED_VERSION;
|
|
4040
4062
|
|
|
4041
4063
|
// ../core/dist/webhooks.js
|
|
4042
4064
|
var json4 = (status, body) => new Response(JSON.stringify(body), {
|
|
@@ -5017,7 +5039,7 @@ var createRuntime = (options) => {
|
|
|
5017
5039
|
throw error;
|
|
5018
5040
|
}
|
|
5019
5041
|
const rewinds = at !== void 0 && selectedBranch === "main" && MUTATING_METHODS.has(request.method);
|
|
5020
|
-
if ((requested || rewinds) && options.adminKey !== void 0 && request.headers
|
|
5042
|
+
if ((requested || rewinds) && options.adminKey !== void 0 && !hasAdminKey(request.headers, options.adminKey))
|
|
5021
5043
|
return refuse(401, `control headers need ${ADMIN_KEY_HEADER}`);
|
|
5022
5044
|
controls.ensure(namespace);
|
|
5023
5045
|
if (requested?.restore !== void 0 && !snapshotStore.get(namespace, requested.restore))
|
|
@@ -6198,4 +6220,4 @@ export {
|
|
|
6198
6220
|
normalizeDate,
|
|
6199
6221
|
CareTalkAPI
|
|
6200
6222
|
};
|
|
6201
|
-
//# sourceMappingURL=chunk-
|
|
6223
|
+
//# sourceMappingURL=chunk-M6IKDJGU.js.map
|