@crvouga/mockingbird-service-posthog 2.1.0 → 2.3.0
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 +36 -4
- package/README.md +9 -3
- package/SUPPORT.md +8 -3
- package/dist/chunk-DBFEFLR4.js +4175 -0
- package/dist/chunk-DBFEFLR4.js.map +7 -0
- package/dist/{chunk-SCY2VOTE.js → chunk-NCOO3LKB.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +172 -150
- package/dist/index.js +1 -1
- package/dist/server.d.ts +358 -332
- package/dist/server.js +2 -2
- package/openapi.yaml +168 -1
- package/package.json +2 -2
- package/dist/chunk-VZ3ZHVNW.js +0 -3821
- package/dist/chunk-VZ3ZHVNW.js.map +0 -7
- /package/dist/{chunk-SCY2VOTE.js.map → chunk-NCOO3LKB.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-posthog
|
|
2
2
|
|
|
3
|
+
## 2.3.0 (2026-10-05)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- compose mock admin APIs ([952bd1f](https://github.com/crvouga/mockingbird/commit/952bd1f679bd442c9a5348a0d9c4d40ad0ac165c))
|
|
8
|
+
- add Fargate task acceptance mock ([f65fc3f](https://github.com/crvouga/mockingbird/commit/f65fc3f293b2fdb41fd45dd1693a5420c6a5109a))
|
|
9
|
+
- keep resource views live ([82c80e1](https://github.com/crvouga/mockingbird/commit/82c80e110b4aa551a17d0ee451c5d08167755267))
|
|
10
|
+
- add LocalStack free tier mocks ([84b7d0c](https://github.com/crvouga/mockingbird/commit/84b7d0ccf4acc7257bb3c3b466a38e30d5b4ab33))
|
|
11
|
+
- implement github reference semantics ([10143e8](https://github.com/crvouga/mockingbird/commit/10143e8364905d77ccfa188d8b6573b1f1003c56))
|
|
12
|
+
- implement docker attach upgrade handshake ([39ad1a3](https://github.com/crvouga/mockingbird/commit/39ad1a39b47aeb423b11bc96230d59f1f5985fa0))
|
|
13
|
+
- preserve accepted docker mutations across response loss ([c2b2d7d](https://github.com/crvouga/mockingbird/commit/c2b2d7dafffe653b3ae9667ec5019d342a68e802))
|
|
14
|
+
|
|
15
|
+
### Fixes and improvements
|
|
16
|
+
|
|
17
|
+
- validate flag groups and stabilize coverage ([9609704](https://github.com/crvouga/mockingbird/commit/96097045a4bdb9e2e66011addbb771fc003c4120))
|
|
18
|
+
- reconcile combined PR integration ([124d5be](https://github.com/crvouga/mockingbird/commit/124d5bed7576535ff481ce6da7d2369957799665))
|
|
19
|
+
- reject invalid flag payload maps ([32f0c74](https://github.com/crvouga/mockingbird/commit/32f0c74110b2126f0443821729e91a2c3e07389b))
|
|
20
|
+
- preserve inferred form headers ([24a5db8](https://github.com/crvouga/mockingbird/commit/24a5db86dc13c061666ca704e5db120b79005882))
|
|
21
|
+
- preserve inferred form headers ([02bdd28](https://github.com/crvouga/mockingbird/commit/02bdd2806a9a934607ecd7ffd0cfbe4f6ba80c91))
|
|
22
|
+
|
|
23
|
+
### Dependencies
|
|
24
|
+
|
|
25
|
+
- `@crvouga/mockingbird-service-sqlite`
|
|
26
|
+
|
|
27
|
+
## 2.2.0 (2026-10-04)
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
- add scripted local API mock ([4a76a11](https://github.com/crvouga/mockingbird/commit/4a76a114e2efad45934e0a93cf29576fd418e15c))
|
|
32
|
+
- manage experiments and read flags ([7691bd4](https://github.com/crvouga/mockingbird/commit/7691bd4d0ded5a75318cc54613b9798be83ae087))
|
|
33
|
+
|
|
34
|
+
### Fixes and improvements
|
|
35
|
+
|
|
36
|
+
- support embedded route parameters ([127cad9](https://github.com/crvouga/mockingbird/commit/127cad997ef106950c1b866070eea191ba54403f))
|
|
37
|
+
- preserve namespace URLs after main sync ([62a15ce](https://github.com/crvouga/mockingbird/commit/62a15ce9bd453069bde69e3a30c91efc01f8871b))
|
|
38
|
+
|
|
3
39
|
## 2.1.0 (2026-10-04)
|
|
4
40
|
|
|
5
41
|
### Features
|
|
@@ -12,10 +48,6 @@
|
|
|
12
48
|
- fill the embedded viewport ([c1a35a4](https://github.com/crvouga/mockingbird/commit/c1a35a4789389ee9cd06c286d09bd47c4d06c71e))
|
|
13
49
|
- make dialog cleanup immediate ([0c1a3c5](https://github.com/crvouga/mockingbird/commit/0c1a3c5b12584d50c19dcae595b951b8e5417b9c))
|
|
14
50
|
|
|
15
|
-
### Dependencies
|
|
16
|
-
|
|
17
|
-
- `@crvouga/mockingbird-service-sqlite`
|
|
18
|
-
|
|
19
51
|
## 2.0.0 (2026-10-04)
|
|
20
52
|
|
|
21
53
|
### ⚠️ Breaking changes
|
package/README.md
CHANGED
|
@@ -77,7 +77,8 @@ await admin("/flags/mobile-smart-links?namespace=w1", undefined, "DELETE") // ab
|
|
|
77
77
|
| `POST /s/` | Session recordings: counted (`GET /__admin/recordings`), never stored. |
|
|
78
78
|
| `GET /static/recorder.js`, `/static/{ver}/recorder.js` | An inert script. |
|
|
79
79
|
| `GET /api/surveys/?token=`, `/api/web_experiments/?token=` | `{surveys: []}`, `{experiments: []}`. |
|
|
80
|
-
| `GET/POST /api/projects/{id}/feature_flags/`, `PATCH …/{flagId}/` | Bearer personal key required. List pages `{count, next, previous, results}` (`limit`/`offset`, what feature-flags-cli follows); flags carry `filters.groups` / `multivariate` / `payloads` derived from the flag model, and create/patch parse `filters` back (see below). `flagId` is the numeric id or the key. |
|
|
80
|
+
| `GET/POST /api/projects/{id}/feature_flags/`, `GET/PATCH …/{flagId}/` | Bearer personal key required. List pages `{count, next, previous, results}` (`limit`/`offset`, what feature-flags-cli follows); flags carry `filters.groups` / `multivariate` / `payloads` derived from the flag model; experiment flags retain their full variant configuration, and create/patch parse `filters` back (see below). `flagId` is the numeric id or the key. |
|
|
81
|
+
| `GET/POST /api/projects/{id}/experiments/`, `GET/PATCH …/{experimentId}/` | Personal-key management of project experiments: name, parameters, metrics, dates, archive state, and a live linked flag. New draft flags have control/test variants and are inactive; setting `start_date` activates them. Setting `end_date` or `archived` preserves flag activity. Lists are newest-first with terminating limit/offset links (including namespace prefixes). Draft legacy variant/rollout/payload parameters update the shared flag; running flag changes use the feature-flag API. |
|
|
81
82
|
| `POST /api/projects/{id}/query/` | HogQL `{query: {kind: "HogQLQuery", query}}` → `{results, columns}` from canned answers (`PUT /__admin/settings {"queryResults": […]}`), `{results: []}` otherwise. |
|
|
82
83
|
|
|
83
84
|
Every route answers with and without its trailing slash. Errors use PostHog's
|
|
@@ -100,6 +101,10 @@ Every route answers with and without its trailing slash. Errors use PostHog's
|
|
|
100
101
|
a property-less group at 100 % is the default (its `variant`, else the largest multivariate
|
|
101
102
|
variant, else `true`); at 0 % or a partial rollout it is `false`; cohort and other property
|
|
102
103
|
groups are ignored (deterministic, no hashing).
|
|
104
|
+
Create/patch reject array/scalar `filters.payloads` with 400 before changing flag or linked
|
|
105
|
+
experiment state. The dictionary requirement is verified against
|
|
106
|
+
[PostHog's serializer regression](https://github.com/PostHog/posthog/blob/282f536aa98f6de6f03d92ec719ba2e25cab0239/products/feature_flags/backend/api/test/test_filters_schema.py#L219)
|
|
107
|
+
and the local contract; seed `172181039` passes self-parity, not live management parity.
|
|
103
108
|
|
|
104
109
|
### Admin (beyond the standard contract)
|
|
105
110
|
|
|
@@ -135,14 +140,15 @@ PostHog SDKs cannot add headers. Choose a namespace by:
|
|
|
135
140
|
`Authorization: Bearer` on the management API.
|
|
136
141
|
- `x-mockingbird-namespace`, for raw clients.
|
|
137
142
|
|
|
138
|
-
The management API's `next` page URL
|
|
139
|
-
|
|
143
|
+
The management API's `next` page URL preserves the configured admin prefix and namespace.
|
|
144
|
+
Send the personal key in the Authorization header on each page request.
|
|
140
145
|
|
|
141
146
|
### Deliberately not modelled
|
|
142
147
|
|
|
143
148
|
- Percentage rollouts, cohorts, group (organisation) targeting and local evaluation
|
|
144
149
|
(`/api/feature_flag/local_evaluation`): flags evaluate deterministically from explicit
|
|
145
150
|
overrides and a default.
|
|
151
|
+
- Experiment statistics, exposure cohorts, metric execution, special launch/archive/ship endpoints, approval policies, advanced experiment filters, and `feature_flag` configuration writes through experiments. Management flags use the existing namespace-wide project alias model; experiment records additionally filter by project id.
|
|
146
152
|
- Session-recording content, heatmaps, surveys and web experiments (the endpoints answer empty).
|
|
147
153
|
- HogQL execution: queries answer canned results.
|
|
148
154
|
- Person profiles: `$identify` / `$set` events are stored for assertions but do not feed
|
package/SUPPORT.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Generated from `openapi.yaml`; do not edit by hand.
|
|
4
4
|
|
|
5
|
-
- operations in spec: **
|
|
6
|
-
- supported by the mock: **
|
|
7
|
-
- parity enabled: **
|
|
5
|
+
- operations in spec: **21**
|
|
6
|
+
- supported by the mock: **21**
|
|
7
|
+
- parity enabled: **21**
|
|
8
8
|
|
|
9
9
|
| operationId | route | mock | parity | notes |
|
|
10
10
|
| --- | --- | --- | --- | --- |
|
|
@@ -22,5 +22,10 @@ Generated from `openapi.yaml`; do not edit by hand.
|
|
|
22
22
|
| `ListWebExperiments` | `GET /api/web_experiments` | ✅ supported | ✅ | |
|
|
23
23
|
| `ListFeatureFlags` | `GET /api/projects/{projectId}/feature_flags` | ✅ supported | ✅ | |
|
|
24
24
|
| `CreateFeatureFlag` | `POST /api/projects/{projectId}/feature_flags` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
25
|
+
| `GetFeatureFlag` | `GET /api/projects/{projectId}/feature_flags/{flagId}` | ✅ supported | ✅ | |
|
|
25
26
|
| `UpdateFeatureFlag` | `PATCH /api/projects/{projectId}/feature_flags/{flagId}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
27
|
+
| `ListExperiments` | `GET /api/projects/{projectId}/experiments` | ✅ supported | ✅ | |
|
|
28
|
+
| `CreateExperiment` | `POST /api/projects/{projectId}/experiments` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
29
|
+
| `GetExperiment` | `GET /api/projects/{projectId}/experiments/{experimentId}` | ✅ supported | ✅ | |
|
|
30
|
+
| `UpdateExperiment` | `PATCH /api/projects/{projectId}/experiments/{experimentId}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
26
31
|
| `RunQuery` | `POST /api/projects/{projectId}/query` | ✅ supported | ✅ | |
|