@crvouga/mockingbird-service-postgres 3.6.0 → 3.8.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 +13 -1
- package/COMPATIBILITY.md +33 -1
- package/README.md +5 -0
- package/dist/admin.js +459 -104
- package/dist/admin.js.map +3 -3
- package/dist/api/schema-report.d.ts +32 -0
- package/dist/ast/nodes.d.ts +7 -0
- package/dist/constraints/enforce.d.ts +7 -1
- package/dist/executor/relation.d.ts +1 -0
- package/dist/executor/triggers.d.ts +13 -0
- package/dist/expressions/context.d.ts +4 -0
- package/dist/functions/pgtrgm.d.ts +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +531 -38
- package/dist/index.js.map +4 -4
- package/dist/server.js +355 -38
- package/dist/server.js.map +3 -3
- package/dist/storage/database-state.d.ts +11 -0
- package/dist/types/regnamespace.d.ts +5 -0
- package/dist/types/value.d.ts +2 -0
- package/dist/unstable.js +514 -209
- package/dist/unstable.js.map +4 -4
- package/dist/wire/cli.js +692 -102
- package/dist/wire/cli.js.map +4 -4
- package/dist/wire/fleet.d.ts +18 -0
- package/dist/wire/index.js +355 -38
- package/dist/wire/index.js.map +3 -3
- package/package.json +1 -1
package/dist/wire/fleet.d.ts
CHANGED
|
@@ -56,6 +56,15 @@ type FaultRule = {
|
|
|
56
56
|
requestHeaders?: Record<string, string>;
|
|
57
57
|
/** Fault only requests carrying these query parameters. `"*"` matches any value. */
|
|
58
58
|
query?: Record<string, string>;
|
|
59
|
+
/**
|
|
60
|
+
* Fault only requests whose JSON body carries these fields. Each key is a dotted path into
|
|
61
|
+
* the parsed body (`"patient_details.email"`; a number steps into an array, `"items.0.sku"`)
|
|
62
|
+
* and each value is what the field must equal: a string, number, boolean or `null`, compared
|
|
63
|
+
* strictly (`3` is not `"3"`). `"*"` matches any value that is present. A request whose body
|
|
64
|
+
* is missing, is not JSON, or is not a JSON object never matches. Not `body`, which is the
|
|
65
|
+
* response a rule injects.
|
|
66
|
+
*/
|
|
67
|
+
requestBody?: Record<string, RequestBodyValue>;
|
|
59
68
|
/**
|
|
60
69
|
* Fault only this namespace. Omit (or `"*"`) to fault every namespace — which is what
|
|
61
70
|
* an in-process caller usually wants, and what a parallel worker usually does not:
|
|
@@ -122,6 +131,8 @@ type FaultRule = {
|
|
|
122
131
|
/** The preset this rule was expanded from, if any. */
|
|
123
132
|
fromPreset?: string;
|
|
124
133
|
};
|
|
134
|
+
/** What a field of the request body must equal in {@link FaultRule.requestBody}. */
|
|
135
|
+
type RequestBodyValue = string | number | boolean | null;
|
|
125
136
|
|
|
126
137
|
/**
|
|
127
138
|
* The admin controls every mock shares, as one document.
|
|
@@ -309,6 +320,13 @@ type ConfigService = {
|
|
|
309
320
|
adminPrefix?: string;
|
|
310
321
|
adminKey?: string;
|
|
311
322
|
seed?: string;
|
|
323
|
+
/**
|
|
324
|
+
* Where this service's generated ids start: a non-negative integer or `"boot"` (derived from
|
|
325
|
+
* the clock). Replaces the fleet-wide `idBase`. Default: the same ids on every boot.
|
|
326
|
+
*/
|
|
327
|
+
idBase?: number | string;
|
|
328
|
+
/** Boot settings, checked by the service's settings schema; every namespace starts from them. */
|
|
329
|
+
settings?: Record<string, unknown>;
|
|
312
330
|
/** Admin controls this service boots with. A key given here replaces the fleet-wide one. */
|
|
313
331
|
adminControls?: MockControls;
|
|
314
332
|
fixtures?: Record<string, unknown>;
|