@crvouga/mockingbird-service-posthog 1.8.0 → 2.0.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/dist/cli.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  runCli,
4
4
  serveCommand,
5
5
  serveTarget
6
- } from "./chunk-LKPLI7YI.js";
7
- import "./chunk-Y3KAEWE2.js";
6
+ } from "./chunk-FM7IAA7L.js";
7
+ import "./chunk-NRFKITRM.js";
8
8
 
9
9
  // src/cli.ts
10
10
  var code = await runCli(
package/dist/index.d.ts CHANGED
@@ -1044,6 +1044,7 @@ type PostHogRuntimeOptions = {
1044
1044
  sqlite?: SqliteClient;
1045
1045
  clock?: Clock;
1046
1046
  seed?: number | string;
1047
+ adminPrefix?: string;
1047
1048
  adminKey?: string;
1048
1049
  onLog?: (entry: RequestLog) => void;
1049
1050
  /** Flags every namespace starts with (and returns to on reset). */
@@ -1052,9 +1053,9 @@ type PostHogRuntimeOptions = {
1052
1053
  };
1053
1054
  type PostHogRuntime = ServiceRuntime<PostHogAPI>;
1054
1055
  /**
1055
- * The PostHog mock with Mockingbird's full service contract: `/health`, `/__admin/*`, clock,
1056
+ * The PostHog mock with Mockingbird's full service contract: `/__admin/health`, `/__admin/*`, clock,
1056
1057
  * fault presets and a request journal. PostHog SDKs cannot add headers, so a namespace is
1057
- * chosen by the `/ns/<name>` host prefix (`POSTHOG_HOST=http://127.0.0.1:8795/ns/w1`), or by
1058
+ * chosen by the `/__admin/ns/<name>` host prefix (`POSTHOG_HOST=http://127.0.0.1:8795/__admin/ns/w1`), or by
1058
1059
  * project token: `PUT /__admin/credentials {"credentials": {"<phc_token>": "<namespace>"}}`.
1059
1060
  * The token is read from `/array/{token}/…`, `?token=`, the body (`token`, `api_key`, a
1060
1061
  * batch's first event), or a personal API key's `Authorization: Bearer`.
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  supportedOperationIds,
16
16
  tokenFromBody,
17
17
  valueForState
18
- } from "./chunk-Y3KAEWE2.js";
18
+ } from "./chunk-NRFKITRM.js";
19
19
  export {
20
20
  ACME_FLAG_STATE,
21
21
  POSTHOG_NAMESPACE,
package/dist/server.d.ts CHANGED
@@ -593,6 +593,7 @@ type CliOption = {
593
593
  };
594
594
  type CliValues = Record<string, string | boolean | undefined>;
595
595
  type CommonServeOptions = {
596
+ adminPrefix?: string;
596
597
  adminKey: string | undefined;
597
598
  seed: string | undefined;
598
599
  onLog: ((entry: RequestLog$1) => void) | undefined;
@@ -1477,6 +1478,7 @@ type PostHogRuntimeOptions = {
1477
1478
  sqlite?: SqliteClient;
1478
1479
  clock?: Clock;
1479
1480
  seed?: number | string;
1481
+ adminPrefix?: string;
1480
1482
  adminKey?: string;
1481
1483
  onLog?: (entry: RequestLog) => void;
1482
1484
  /** Flags every namespace starts with (and returns to on reset). */
package/dist/server.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  DEFAULT_PORT,
3
3
  createServer,
4
4
  serveTarget
5
- } from "./chunk-LKPLI7YI.js";
6
- import "./chunk-Y3KAEWE2.js";
5
+ } from "./chunk-FM7IAA7L.js";
6
+ import "./chunk-NRFKITRM.js";
7
7
  export {
8
8
  DEFAULT_PORT,
9
9
  createServer,