@crvouga/mockingbird-service-postgres 3.4.1 → 3.5.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.
@@ -209,6 +209,8 @@ type SnapshotDocument = {
209
209
  faults?: unknown;
210
210
  latency?: unknown;
211
211
  virtualTime?: boolean;
212
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
213
+ webhooks?: unknown;
212
214
  };
213
215
  /** Controls for one namespace. */
214
216
  type NamespaceControls = {
@@ -246,7 +248,15 @@ type FleetDiagnostics = {
246
248
  };
247
249
  /** Protocol packages own their state, listeners, credentials and namespace selection. */
248
250
  type FleetChild = {
249
- protocol: "http" | "postgres" | "redis";
251
+ targetName?: string;
252
+ dependencies?: string[];
253
+ coverage?: {
254
+ included: string[];
255
+ excluded: string[];
256
+ };
257
+ outboundPolicy?: "webhook-hub" | "unsupported";
258
+ packageVersion?: string;
259
+ protocol: "http" | "postgres" | "redis" | "external";
250
260
  url: string;
251
261
  connection?: string;
252
262
  connections?: Record<string, string>;
@@ -262,11 +272,37 @@ type FleetChild = {
262
272
  restore(namespace: string, checkpoint: unknown): Promise<void>;
263
273
  reset(namespace: string): Promise<void>;
264
274
  clock(namespace: string): Clock;
265
- settle?(namespace: string): Promise<void>;
275
+ nextEvent?(namespace: string): number | undefined | Promise<number | undefined>;
276
+ settle?(namespace: string, signal?: AbortSignal): Promise<void>;
277
+ exportCheckpoint?(namespace: string, checkpoint: unknown): Promise<unknown>;
278
+ importCheckpoint?(namespace: string, document: unknown): Promise<unknown>;
279
+ createNamespace?(namespace: string): Promise<void>;
280
+ deleteNamespace?(namespace: string): Promise<void>;
281
+ inspect?(namespace: string, options: {
282
+ offset: number;
283
+ limit: number;
284
+ collection?: string;
285
+ }): Promise<unknown>;
286
+ configure?(namespace: string, controls: Record<string, unknown>): Promise<unknown>;
287
+ unmatched?(namespace: string, limit: number): {
288
+ entries: unknown[];
289
+ truncated: boolean;
290
+ };
291
+ lastActivity?(namespace: string): number;
292
+ setAdmission?(allow: (namespace: string) => boolean): void;
293
+ initializationAccess?(): Promise<{
294
+ connections: Record<string, string>;
295
+ close(): Promise<void>;
296
+ }>;
266
297
  };
267
298
 
268
299
  /** A service entry in `mockingbird.json`. */
269
300
  type ConfigService = {
301
+ /** Stable config key is the instance identity; target defaults to that key. */
302
+ target?: string;
303
+ publicOrigin?: string;
304
+ publicPath?: string;
305
+ dependsOn?: string[];
270
306
  protocol?: "http" | "postgres" | "redis";
271
307
  port?: number;
272
308
  host?: string;
package/package.json CHANGED
@@ -185,5 +185,5 @@
185
185
  ],
186
186
  "type": "module",
187
187
  "types": "./dist/index.d.ts",
188
- "version": "3.4.1"
188
+ "version": "3.5.0"
189
189
  }