@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/CHANGELOG.md +35 -1
- package/DISCOVERY.md +55 -0
- package/README.md +3 -3
- package/SUPPORT.md +24 -0
- package/dist/{chunk-Y75DCYJC.js → chunk-MQ5KI35G.js} +44 -24
- package/dist/chunk-MQ5KI35G.js.map +7 -0
- package/dist/chunk-RE5NFS34.js +6013 -0
- package/dist/chunk-RE5NFS34.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.js +1 -1
- package/dist/server.d.ts +5 -1
- package/dist/server.js +2 -2
- package/openapi.yaml +1180 -0
- package/package.json +28 -3
- package/dist/chunk-O2G3Z532.js +0 -7444
- package/dist/chunk-O2G3Z532.js.map +0 -7
- package/dist/chunk-Y75DCYJC.js.map +0 -7
package/dist/cli.js
CHANGED
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
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. */
|