@dudousxd/nestjs-durable-testing 0.23.5 → 0.25.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/index.d.ts CHANGED
@@ -121,6 +121,11 @@ declare const DURABLE_CANONICAL_COLUMNS: {
121
121
  readonly payload: "payload";
122
122
  readonly publishedAt: "published_at";
123
123
  };
124
+ readonly durable_signal_ids: {
125
+ readonly token: "token";
126
+ readonly signalId: "signal_id";
127
+ readonly expiresAt: "expires_at";
128
+ };
124
129
  readonly durable_schedules: {
125
130
  readonly id: "id";
126
131
  readonly namespace: "namespace";
@@ -167,7 +172,10 @@ interface TestEngine {
167
172
  store: InMemoryStateStore;
168
173
  transport: InMemoryTransport;
169
174
  clock: MutableClock;
170
- /** Advance the clock by `ms` and resume any durable sleeps now due. */
175
+ /**
176
+ * Advance the clock by `ms`, resume any durable sleeps now due, publish owed lifecycle events and
177
+ * resume `ctx.waitForRun` waits whose run settled.
178
+ */
171
179
  tick(ms: number): Promise<RunResult[]>;
172
180
  /**
173
181
  * Enqueue a run and wait for it to settle (terminal or suspended). `engine.start` only enqueues
@@ -268,6 +276,13 @@ interface StateStoreContext {
268
276
  * sends none of the step's input.
269
277
  */
270
278
  statementLog?: () => string[];
279
+ /**
280
+ * Resolves once {@link statements} and {@link statementLog} count every statement the store sent
281
+ * before the call. For a driver that reports a statement apart from its result (Prisma's query
282
+ * events), so a count read right after a call can miss it or a later count can pick it up. Without
283
+ * it, the contract waits for the log to stop growing.
284
+ */
285
+ flushStatementLog?: () => Promise<void>;
271
286
  /**
272
287
  * The store's client opens a transaction around every write of its own (Prisma does, even for one
273
288
  * `createMany` or `updateMany`). The contract then checks that a run's row is written without a