@crvouga/mockingbird-service-posthog 3.10.3 → 3.10.5
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 +14 -0
- package/dist/{chunk-7NOPQKRZ.js → chunk-FDH3BRLV.js} +32 -10
- package/dist/chunk-FDH3BRLV.js.map +7 -0
- package/dist/{chunk-3LU3S4VE.js → chunk-NS7SLFID.js} +3 -3
- 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-7NOPQKRZ.js.map +0 -7
- /package/dist/{chunk-3LU3S4VE.js.map → chunk-NS7SLFID.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-posthog
|
|
2
2
|
|
|
3
|
+
## 3.10.5 (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.4 (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.3 (2026-11-02)
|
|
4
17
|
|
|
5
18
|
### Fixes and improvements
|
|
6
19
|
|
|
20
|
+
- do not save idempotent results for requests that fail validation ([f2161aa](https://github.com/crvouga/mockingbird/commit/f2161aadeae30bcc586e26131da12a7030bdeb11))
|
|
7
21
|
- keep the command palette's highlighted option in view and announced ([24b8a92](https://github.com/crvouga/mockingbird/commit/24b8a923f65d9deecb2c298169cdc9b7af90e609))
|
|
8
22
|
|
|
9
23
|
## 3.10.2 (2026-11-02)
|
|
@@ -495,6 +495,7 @@ var parsePath = (rawKey) => {
|
|
|
495
495
|
return path;
|
|
496
496
|
};
|
|
497
497
|
var isIndex = (segment) => /^(0|[1-9][0-9]*)$/.test(segment);
|
|
498
|
+
var MAX_ARRAY_INDEX = 4294967294;
|
|
498
499
|
var put = (target, key, value) => {
|
|
499
500
|
if (key === "__proto__") {
|
|
500
501
|
Object.defineProperty(target, key, {
|
|
@@ -557,8 +558,17 @@ var decodeFormPairs = (pairs) => {
|
|
|
557
558
|
var densify = (value) => {
|
|
558
559
|
if (typeof value === "string")
|
|
559
560
|
return value;
|
|
560
|
-
if (Array.isArray(value))
|
|
561
|
-
|
|
561
|
+
if (Array.isArray(value)) {
|
|
562
|
+
const dense = [];
|
|
563
|
+
for (const key of Object.keys(value)) {
|
|
564
|
+
if (!isIndex(key) || Number(key) > MAX_ARRAY_INDEX)
|
|
565
|
+
continue;
|
|
566
|
+
const item = value[Number(key)];
|
|
567
|
+
if (item !== void 0)
|
|
568
|
+
dense.push(densify(item));
|
|
569
|
+
}
|
|
570
|
+
return dense;
|
|
571
|
+
}
|
|
562
572
|
const out = {};
|
|
563
573
|
for (const [key, item] of Object.entries(value))
|
|
564
574
|
put(out, key, densify(item));
|
|
@@ -2391,6 +2401,18 @@ var createNamespaceControls = (options) => {
|
|
|
2391
2401
|
};
|
|
2392
2402
|
};
|
|
2393
2403
|
|
|
2404
|
+
// ../core/dist/signing.js
|
|
2405
|
+
var encoder = new TextEncoder();
|
|
2406
|
+
var fromBase64 = (value) => Uint8Array.from(atob(value), (char) => char.charCodeAt(0));
|
|
2407
|
+
var timingSafeEqual = (a, b) => {
|
|
2408
|
+
if (a.length !== b.length)
|
|
2409
|
+
return false;
|
|
2410
|
+
let diff = 0;
|
|
2411
|
+
for (let i = 0; i < a.length; i++)
|
|
2412
|
+
diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
|
|
2413
|
+
return diff === 0;
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2394
2416
|
// ../core/dist/surface.js
|
|
2395
2417
|
var defineMock = (runtime) => runtime;
|
|
2396
2418
|
var ADMIN_ROUTE_REFERENCE = {
|
|
@@ -2509,6 +2531,10 @@ var assertAdminPrefixAvailable = (prefix, paths) => {
|
|
|
2509
2531
|
}
|
|
2510
2532
|
};
|
|
2511
2533
|
var ADMIN_KEY_HEADER = CONTROL_HEADERS.adminKey;
|
|
2534
|
+
var hasAdminKey = (headers, adminKey) => {
|
|
2535
|
+
const sent = headers.get(ADMIN_KEY_HEADER);
|
|
2536
|
+
return sent !== null && timingSafeEqual(sent, adminKey);
|
|
2537
|
+
};
|
|
2512
2538
|
var NAMESPACE_HEADER = CONTROL_HEADERS.namespace;
|
|
2513
2539
|
var ADMIN_DOCS_URL = "https://mockingbird.chrisvouga.dev/docs/admin-controls";
|
|
2514
2540
|
var ADMIN_CONTROL_PAGES = [
|
|
@@ -2982,7 +3008,7 @@ var createControlPlane = (context) => {
|
|
|
2982
3008
|
}
|
|
2983
3009
|
const path = url.pathname.slice(adminPrefix.length) || "/";
|
|
2984
3010
|
const shell = request.method === "GET" && (path === "/ui" || path === "/ui/");
|
|
2985
|
-
if (!shell && context.adminKey !== void 0 && request.headers
|
|
3011
|
+
if (!shell && context.adminKey !== void 0 && !hasAdminKey(request.headers, context.adminKey)) {
|
|
2986
3012
|
return adminError(401, `missing or wrong ${ADMIN_KEY_HEADER}`);
|
|
2987
3013
|
}
|
|
2988
3014
|
for (const route of routes) {
|
|
@@ -3780,11 +3806,7 @@ var stateAdminRoutes = (routes) => {
|
|
|
3780
3806
|
};
|
|
3781
3807
|
|
|
3782
3808
|
// ../core/dist/version.js
|
|
3783
|
-
var PACKAGE_VERSION = true ? "3.10.
|
|
3784
|
-
|
|
3785
|
-
// ../core/dist/signing.js
|
|
3786
|
-
var encoder = new TextEncoder();
|
|
3787
|
-
var fromBase64 = (value) => Uint8Array.from(atob(value), (char) => char.charCodeAt(0));
|
|
3809
|
+
var PACKAGE_VERSION = true ? "3.10.5" : UNRELEASED_VERSION;
|
|
3788
3810
|
|
|
3789
3811
|
// ../core/dist/webhooks.js
|
|
3790
3812
|
var json4 = (status, body) => new Response(JSON.stringify(body), {
|
|
@@ -4764,7 +4786,7 @@ var createRuntime = (options) => {
|
|
|
4764
4786
|
throw error3;
|
|
4765
4787
|
}
|
|
4766
4788
|
const rewinds = at !== void 0 && selectedBranch === "main" && MUTATING_METHODS.has(request.method);
|
|
4767
|
-
if ((requested || rewinds) && options.adminKey !== void 0 && request.headers
|
|
4789
|
+
if ((requested || rewinds) && options.adminKey !== void 0 && !hasAdminKey(request.headers, options.adminKey))
|
|
4768
4790
|
return refuse(401, `control headers need ${ADMIN_KEY_HEADER}`);
|
|
4769
4791
|
controls.ensure(namespace);
|
|
4770
4792
|
if (requested?.restore !== void 0 && !snapshotStore.get(namespace, requested.restore))
|
|
@@ -6278,4 +6300,4 @@ export {
|
|
|
6278
6300
|
scrubProperties,
|
|
6279
6301
|
PostHogAPI
|
|
6280
6302
|
};
|
|
6281
|
-
//# sourceMappingURL=chunk-
|
|
6303
|
+
//# sourceMappingURL=chunk-FDH3BRLV.js.map
|