@crvouga/mockingbird-service-flex 1.8.0 → 2.1.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-Y75DCYJC.js";
7
- import "./chunk-O2G3Z532.js";
6
+ } from "./chunk-MQ5KI35G.js";
7
+ import "./chunk-RE5NFS34.js";
8
8
 
9
9
  // src/cli.ts
10
10
  var code = await runCli(
package/dist/index.d.ts CHANGED
@@ -1098,6 +1098,7 @@ type FlexRuntimeOptions = {
1098
1098
  sqlite?: SqliteClient;
1099
1099
  clock?: Clock;
1100
1100
  seed?: number | string;
1101
+ adminPrefix?: string;
1101
1102
  adminKey?: string;
1102
1103
  onLog?: (entry: RequestLog) => void;
1103
1104
  /** Products every namespace starts with. Default: the recorded corpus. */
@@ -1120,8 +1121,8 @@ type FlexRuntime = ServiceRuntime<FlexAPI> & {
1120
1121
  stop(): void;
1121
1122
  };
1122
1123
  /**
1123
- * The Flex mock with Mockingbird's full service contract: `/health`, `/__admin/*`,
1124
- * namespaces by header, by `/ns/<name>` path prefix, or by API key
1124
+ * The Flex mock with Mockingbird's full service contract: `/__admin/health`, `/__admin/*`,
1125
+ * namespaces by header, by `/__admin/ns/<name>` path prefix, or by API key
1125
1126
  * (`PUT /__admin/credentials {"credentials": {"<FLEX_API_KEY>": "<namespace>"}}`), clock
1126
1127
  * control, fault presets, Svix-signed webhooks and a request journal.
1127
1128
  */
@@ -1146,7 +1147,8 @@ type FlexAPIOptions = APIOptions & {
1146
1147
  products?: readonly ProductRecord[];
1147
1148
  /** Initial per-namespace settings. */
1148
1149
  settings?: Partial<Settings>;
1149
- /** The public namespace name, so hosted-page URLs carry `/ns/<name>` (the browser has no headers). */
1150
+ /** The public namespace name, so hosted-page URLs carry `/__admin/ns/<name>` (the browser has no headers). */
1151
+ adminPrefix?: string;
1150
1152
  publicNamespace?: string;
1151
1153
  /** Called for every webhook event; the runtime signs and delivers it. */
1152
1154
  onEvent?: (event: FlexEvent) => void;
@@ -1177,6 +1179,7 @@ declare class FlexAPI implements FetchAPI$1 {
1177
1179
  private readonly service;
1178
1180
  private readonly idempotency;
1179
1181
  private readonly now;
1182
+ private readonly adminPrefix;
1180
1183
  private readonly publicNamespace;
1181
1184
  private readonly onEvent;
1182
1185
  constructor(options?: FlexAPIOptions);
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  periodEnd,
21
21
  substituteSessionId,
22
22
  supportedOperationIds
23
- } from "./chunk-O2G3Z532.js";
23
+ } from "./chunk-RE5NFS34.js";
24
24
  export {
25
25
  CARDS,
26
26
  CORPUS_ROWS,
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;
@@ -1497,7 +1498,8 @@ type FlexAPIOptions = APIOptions & {
1497
1498
  products?: readonly ProductRecord[];
1498
1499
  /** Initial per-namespace settings. */
1499
1500
  settings?: Partial<Settings>;
1500
- /** The public namespace name, so hosted-page URLs carry `/ns/<name>` (the browser has no headers). */
1501
+ /** The public namespace name, so hosted-page URLs carry `/__admin/ns/<name>` (the browser has no headers). */
1502
+ adminPrefix?: string;
1501
1503
  publicNamespace?: string;
1502
1504
  /** Called for every webhook event; the runtime signs and delivers it. */
1503
1505
  onEvent?: (event: FlexEvent) => void;
@@ -1520,6 +1522,7 @@ declare class FlexAPI implements FetchAPI {
1520
1522
  private readonly service;
1521
1523
  private readonly idempotency;
1522
1524
  private readonly now;
1525
+ private readonly adminPrefix;
1523
1526
  private readonly publicNamespace;
1524
1527
  private readonly onEvent;
1525
1528
  constructor(options?: FlexAPIOptions);
@@ -1605,6 +1608,7 @@ type FlexRuntimeOptions = {
1605
1608
  sqlite?: SqliteClient;
1606
1609
  clock?: Clock;
1607
1610
  seed?: number | string;
1611
+ adminPrefix?: string;
1608
1612
  adminKey?: string;
1609
1613
  onLog?: (entry: RequestLog) => void;
1610
1614
  /** Products every namespace starts with. Default: the recorded corpus. */
package/dist/server.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  DEFAULT_PORT,
3
3
  createServer,
4
4
  serveTarget
5
- } from "./chunk-Y75DCYJC.js";
6
- import "./chunk-O2G3Z532.js";
5
+ } from "./chunk-MQ5KI35G.js";
6
+ import "./chunk-RE5NFS34.js";
7
7
  export {
8
8
  DEFAULT_PORT,
9
9
  createServer,