@arts-n-crafts/ts 3.19.0 → 5.0.0-rc.2
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/README.md +221 -6
- package/package.json +109 -22
- package/packages/v3/dist/index.cjs +63 -72
- package/packages/v3/dist/index.cjs.map +1 -1
- package/packages/v3/dist/index.d.cts +22 -22
- package/packages/v3/dist/index.d.ts +22 -22
- package/packages/v3/dist/index.js +63 -72
- package/packages/v3/dist/index.js.map +1 -1
- package/packages/v3/package.json +49 -50
- package/packages/v4/dist/index.cjs +71 -126
- package/packages/v4/dist/index.cjs.map +1 -1
- package/packages/v4/dist/index.d.cts +36 -47
- package/packages/v4/dist/index.d.ts +36 -47
- package/packages/v4/dist/index.js +72 -125
- package/packages/v4/dist/index.js.map +1 -1
- package/packages/v4/package.json +49 -50
- package/packages/v5/dist/DomainEvent-CSzUMw46.d.cts +23 -0
- package/packages/v5/dist/DomainEvent-w1jyCjai.d.ts +23 -0
- package/packages/v5/dist/Intent-B6l0bHZU.d.cts +13 -0
- package/packages/v5/dist/Intent-BLNY6RoG.d.ts +13 -0
- package/packages/v5/dist/Message-c9XdBoh4.d.cts +36 -0
- package/packages/v5/dist/Message-c9XdBoh4.d.ts +36 -0
- package/packages/v5/dist/Rejection-D9PlzquK.d.cts +19 -0
- package/packages/v5/dist/Rejection-D9PlzquK.d.ts +19 -0
- package/packages/v5/dist/adapters/outbound/capabilities/index.cjs +4 -0
- package/packages/v5/dist/adapters/outbound/capabilities/index.cjs.map +1 -0
- package/packages/v5/dist/adapters/outbound/capabilities/index.d.cts +77 -0
- package/packages/v5/dist/adapters/outbound/capabilities/index.d.ts +77 -0
- package/packages/v5/dist/adapters/outbound/capabilities/index.js +3 -0
- package/packages/v5/dist/adapters/outbound/capabilities/index.js.map +1 -0
- package/packages/v5/dist/adapters/outbound/shapes/index.cjs +4 -0
- package/packages/v5/dist/adapters/outbound/shapes/index.cjs.map +1 -0
- package/packages/v5/dist/adapters/outbound/shapes/index.d.cts +68 -0
- package/packages/v5/dist/adapters/outbound/shapes/index.d.ts +68 -0
- package/packages/v5/dist/adapters/outbound/shapes/index.js +3 -0
- package/packages/v5/dist/adapters/outbound/shapes/index.js.map +1 -0
- package/packages/v5/dist/core/capabilities/index.cjs +4 -0
- package/packages/v5/dist/core/capabilities/index.cjs.map +1 -0
- package/packages/v5/dist/core/capabilities/index.d.cts +33 -0
- package/packages/v5/dist/core/capabilities/index.d.ts +33 -0
- package/packages/v5/dist/core/capabilities/index.js +3 -0
- package/packages/v5/dist/core/capabilities/index.js.map +1 -0
- package/packages/v5/dist/core/shapes/index.cjs +4 -0
- package/packages/v5/dist/core/shapes/index.cjs.map +1 -0
- package/packages/v5/dist/core/shapes/index.d.cts +27 -0
- package/packages/v5/dist/core/shapes/index.d.ts +27 -0
- package/packages/v5/dist/core/shapes/index.js +3 -0
- package/packages/v5/dist/core/shapes/index.js.map +1 -0
- package/packages/v5/dist/useCases/command/capabilities/index.cjs +4 -0
- package/packages/v5/dist/useCases/command/capabilities/index.cjs.map +1 -0
- package/packages/v5/dist/useCases/command/capabilities/index.d.cts +27 -0
- package/packages/v5/dist/useCases/command/capabilities/index.d.ts +27 -0
- package/packages/v5/dist/useCases/command/capabilities/index.js +3 -0
- package/packages/v5/dist/useCases/command/capabilities/index.js.map +1 -0
- package/packages/v5/dist/useCases/command/shapes/index.cjs +4 -0
- package/packages/v5/dist/useCases/command/shapes/index.cjs.map +1 -0
- package/packages/v5/dist/useCases/command/shapes/index.d.cts +78 -0
- package/packages/v5/dist/useCases/command/shapes/index.d.ts +78 -0
- package/packages/v5/dist/useCases/command/shapes/index.js +3 -0
- package/packages/v5/dist/useCases/command/shapes/index.js.map +1 -0
- package/packages/v5/dist/useCases/policy/capabilities/index.cjs +4 -0
- package/packages/v5/dist/useCases/policy/capabilities/index.cjs.map +1 -0
- package/packages/v5/dist/useCases/policy/capabilities/index.d.cts +12 -0
- package/packages/v5/dist/useCases/policy/capabilities/index.d.ts +12 -0
- package/packages/v5/dist/useCases/policy/capabilities/index.js +3 -0
- package/packages/v5/dist/useCases/policy/capabilities/index.js.map +1 -0
- package/packages/v5/dist/useCases/query/capabilities/index.cjs +4 -0
- package/packages/v5/dist/useCases/query/capabilities/index.cjs.map +1 -0
- package/packages/v5/dist/useCases/query/capabilities/index.d.cts +8 -0
- package/packages/v5/dist/useCases/query/capabilities/index.d.ts +8 -0
- package/packages/v5/dist/useCases/query/capabilities/index.js +3 -0
- package/packages/v5/dist/useCases/query/capabilities/index.js.map +1 -0
- package/packages/v5/dist/useCases/query/shapes/index.cjs +4 -0
- package/packages/v5/dist/useCases/query/shapes/index.cjs.map +1 -0
- package/packages/v5/dist/useCases/query/shapes/index.d.cts +7 -0
- package/packages/v5/dist/useCases/query/shapes/index.d.ts +7 -0
- package/packages/v5/dist/useCases/query/shapes/index.js +3 -0
- package/packages/v5/dist/useCases/query/shapes/index.js.map +1 -0
- package/packages/v5/package.json +59 -0
|
@@ -33,23 +33,17 @@ function createQuery(type, payload, metadata = {}) {
|
|
|
33
33
|
|
|
34
34
|
// src/core/utils/isCommand.ts
|
|
35
35
|
function isCommand(candidate) {
|
|
36
|
-
if (candidate === null)
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
return false;
|
|
40
|
-
if (!("type" in candidate))
|
|
41
|
-
return false;
|
|
36
|
+
if (candidate === null) return false;
|
|
37
|
+
if (typeof candidate !== "object") return false;
|
|
38
|
+
if (!("type" in candidate)) return false;
|
|
42
39
|
return "kind" in candidate && candidate.kind === "command";
|
|
43
40
|
}
|
|
44
41
|
|
|
45
42
|
// src/core/utils/isQuery.ts
|
|
46
43
|
function isQuery(candidate) {
|
|
47
|
-
if (candidate === null)
|
|
48
|
-
|
|
49
|
-
if (
|
|
50
|
-
return false;
|
|
51
|
-
if (!("type" in candidate))
|
|
52
|
-
return false;
|
|
44
|
+
if (candidate === null) return false;
|
|
45
|
+
if (typeof candidate !== "object") return false;
|
|
46
|
+
if (!("type" in candidate)) return false;
|
|
53
47
|
return "kind" in candidate && candidate.kind === "query";
|
|
54
48
|
}
|
|
55
49
|
|
|
@@ -152,8 +146,7 @@ function fail(anExpression) {
|
|
|
152
146
|
|
|
153
147
|
// src/utils/invariant/invariant.ts
|
|
154
148
|
function invariant(condition, onInvalid) {
|
|
155
|
-
if (!condition)
|
|
156
|
-
onInvalid();
|
|
149
|
+
if (!condition) onInvalid();
|
|
157
150
|
}
|
|
158
151
|
|
|
159
152
|
// src/domain/Specification/implementations/FieldGreaterThan.specification.ts
|
|
@@ -170,9 +163,7 @@ var FieldGreaterThan = class extends CompositeSpecification {
|
|
|
170
163
|
const field = entity[this.field];
|
|
171
164
|
invariant(
|
|
172
165
|
this.isNumber(field),
|
|
173
|
-
fail(
|
|
174
|
-
new TypeError(`Field ${String(this.field)} is not a number`)
|
|
175
|
-
)
|
|
166
|
+
fail(new TypeError(`Field ${String(this.field)} is not a number`))
|
|
176
167
|
);
|
|
177
168
|
return field > this.value;
|
|
178
169
|
}
|
|
@@ -180,12 +171,12 @@ var FieldGreaterThan = class extends CompositeSpecification {
|
|
|
180
171
|
return createQueryNode("gt", this.field, this.value);
|
|
181
172
|
}
|
|
182
173
|
};
|
|
183
|
-
function createIntegrationEvent(type, payload, metadata) {
|
|
174
|
+
function createIntegrationEvent(type, payload, metadata = {}, timestamp = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
184
175
|
return Object.freeze({
|
|
185
176
|
id: crypto.randomUUID(),
|
|
186
177
|
type,
|
|
187
178
|
payload,
|
|
188
|
-
timestamp
|
|
179
|
+
timestamp,
|
|
189
180
|
metadata: {
|
|
190
181
|
...metadata
|
|
191
182
|
},
|
|
@@ -195,11 +186,16 @@ function createIntegrationEvent(type, payload, metadata) {
|
|
|
195
186
|
|
|
196
187
|
// src/domain/utils/convertDomainEventToIntegrationEvent.ts
|
|
197
188
|
function convertDomainEventToIntegrationEvent(event) {
|
|
198
|
-
return createIntegrationEvent(
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
189
|
+
return createIntegrationEvent(
|
|
190
|
+
event.type,
|
|
191
|
+
event.payload,
|
|
192
|
+
{
|
|
193
|
+
outcome: "accepted",
|
|
194
|
+
aggregateType: event.aggregateType,
|
|
195
|
+
aggregateId: event.aggregateId
|
|
196
|
+
},
|
|
197
|
+
new Date(event.timestamp).toISOString()
|
|
198
|
+
);
|
|
203
199
|
}
|
|
204
200
|
|
|
205
201
|
// src/domain/utils/convertRejectionToIntegrationEvent.ts
|
|
@@ -213,7 +209,8 @@ function convertRejectionToIntegrationEvent(rejection) {
|
|
|
213
209
|
aggregateId: rejection.metadata?.aggregateId,
|
|
214
210
|
commandType: rejection.commandType,
|
|
215
211
|
commandId: rejection.commandId
|
|
216
|
-
}
|
|
212
|
+
},
|
|
213
|
+
new Date(rejection.timestamp).toISOString()
|
|
217
214
|
);
|
|
218
215
|
}
|
|
219
216
|
function createDomainEvent(type, aggregateId, aggregateType, payload, metadata = {}) {
|
|
@@ -248,12 +245,9 @@ function createRejection(rejectionSpecifics, metadata = {}) {
|
|
|
248
245
|
|
|
249
246
|
// src/domain/utils/isEvent.ts
|
|
250
247
|
function isEvent(event) {
|
|
251
|
-
if (typeof event !== "object")
|
|
252
|
-
|
|
253
|
-
if (event
|
|
254
|
-
return false;
|
|
255
|
-
if (!("type" in event))
|
|
256
|
-
return false;
|
|
248
|
+
if (typeof event !== "object") return false;
|
|
249
|
+
if (event === null) return false;
|
|
250
|
+
if (!("type" in event)) return false;
|
|
257
251
|
return "kind" in event;
|
|
258
252
|
}
|
|
259
253
|
|
|
@@ -264,8 +258,7 @@ function isDomainEvent(event) {
|
|
|
264
258
|
|
|
265
259
|
// src/domain/utils/isRejection.ts
|
|
266
260
|
function isRejection(candidate) {
|
|
267
|
-
if (candidate === null || typeof candidate !== "object")
|
|
268
|
-
return false;
|
|
261
|
+
if (candidate === null || typeof candidate !== "object") return false;
|
|
269
262
|
return "commandId" in candidate && "commandType" in candidate && "reasonCode" in candidate && "timestamp" in candidate;
|
|
270
263
|
}
|
|
271
264
|
|
|
@@ -318,43 +311,36 @@ var SimpleDatabase = class {
|
|
|
318
311
|
datasource = /* @__PURE__ */ new Map();
|
|
319
312
|
simulateOffline = false;
|
|
320
313
|
async query(tableName, specification) {
|
|
321
|
-
if (this.simulateOffline)
|
|
322
|
-
throw new DatabaseOfflineException();
|
|
314
|
+
if (this.simulateOffline) throw new DatabaseOfflineException();
|
|
323
315
|
const tableRecords = this.datasource.get(tableName) || [];
|
|
324
316
|
return tableRecords.filter((record) => specification.isSatisfiedBy(record));
|
|
325
317
|
}
|
|
326
318
|
async execute(tableName, statement) {
|
|
327
|
-
if (this.simulateOffline)
|
|
328
|
-
|
|
329
|
-
if (!this.datasource.has(tableName))
|
|
330
|
-
this.datasource.set(tableName, []);
|
|
319
|
+
if (this.simulateOffline) throw new DatabaseOfflineException();
|
|
320
|
+
if (!this.datasource.has(tableName)) this.datasource.set(tableName, []);
|
|
331
321
|
const table = this.datasource.get(tableName);
|
|
332
322
|
switch (statement.operation) {
|
|
333
323
|
case "CREATE" /* CREATE */: {
|
|
334
324
|
const isDuplicate = table.some((item) => item.id === statement.payload.id);
|
|
335
|
-
if (isDuplicate)
|
|
336
|
-
throw new DuplicateRecordException(statement.payload.id);
|
|
325
|
+
if (isDuplicate) throw new DuplicateRecordException(statement.payload.id);
|
|
337
326
|
table.push(statement.payload);
|
|
338
327
|
break;
|
|
339
328
|
}
|
|
340
329
|
case "PUT" /* PUT */: {
|
|
341
330
|
const index = table.findIndex((item) => item.id === statement.payload.id);
|
|
342
|
-
if (index === -1)
|
|
343
|
-
throw new RecordNotFoundException(statement.payload.id);
|
|
331
|
+
if (index === -1) throw new RecordNotFoundException(statement.payload.id);
|
|
344
332
|
table[index] = statement.payload;
|
|
345
333
|
break;
|
|
346
334
|
}
|
|
347
335
|
case "PATCH" /* PATCH */: {
|
|
348
336
|
const index = table.findIndex((item) => item.id === statement.payload.id);
|
|
349
|
-
if (index === -1)
|
|
350
|
-
throw new RecordNotFoundException(statement.payload.id);
|
|
337
|
+
if (index === -1) throw new RecordNotFoundException(statement.payload.id);
|
|
351
338
|
table[index] = { ...table[index], ...statement.payload };
|
|
352
339
|
break;
|
|
353
340
|
}
|
|
354
341
|
case "DELETE" /* DELETE */: {
|
|
355
342
|
const index = table.findIndex((item) => item.id === statement.payload.id);
|
|
356
|
-
if (index === -1)
|
|
357
|
-
throw new RecordNotFoundException(statement.payload.id);
|
|
343
|
+
if (index === -1) throw new RecordNotFoundException(statement.payload.id);
|
|
358
344
|
table.splice(index, 1);
|
|
359
345
|
break;
|
|
360
346
|
}
|
|
@@ -374,12 +360,13 @@ var SimpleEventBus = class {
|
|
|
374
360
|
this.handlers.set(stream, handlersForType);
|
|
375
361
|
}
|
|
376
362
|
async consume(stream, anEvent) {
|
|
377
|
-
if (!this.handlers.has(stream))
|
|
378
|
-
return;
|
|
363
|
+
if (!this.handlers.has(stream)) return;
|
|
379
364
|
const handlers = this.handlers.get(stream);
|
|
380
|
-
await Promise.all(
|
|
381
|
-
|
|
382
|
-
|
|
365
|
+
await Promise.all(
|
|
366
|
+
handlers.map(async (handler) => {
|
|
367
|
+
return handler.handle(anEvent);
|
|
368
|
+
})
|
|
369
|
+
);
|
|
383
370
|
}
|
|
384
371
|
async publish(stream, anEvent) {
|
|
385
372
|
await this.consume(stream, anEvent);
|
|
@@ -408,49 +395,6 @@ function isIntegrationEvent(event) {
|
|
|
408
395
|
return isEvent(event) && event.kind === "integration";
|
|
409
396
|
}
|
|
410
397
|
|
|
411
|
-
// src/infrastructure/EventBus/utils/mapDomainEventToIntegrationEvent.ts
|
|
412
|
-
function mapDomainEventToIntegrationEvent(domainEvent) {
|
|
413
|
-
const metadata = {
|
|
414
|
-
...domainEvent.metadata,
|
|
415
|
-
aggregateType: domainEvent.aggregateType,
|
|
416
|
-
aggregateId: domainEvent.aggregateId,
|
|
417
|
-
outcome: "accepted"
|
|
418
|
-
};
|
|
419
|
-
return {
|
|
420
|
-
id: domainEvent.id,
|
|
421
|
-
type: domainEvent.type,
|
|
422
|
-
payload: domainEvent.payload,
|
|
423
|
-
timestamp: new Date(domainEvent.timestamp).toISOString(),
|
|
424
|
-
metadata,
|
|
425
|
-
kind: "integration"
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
// src/infrastructure/EventBus/utils/mapRejectionToIntegrationEvent.ts
|
|
430
|
-
function mapRejectionToIntegrationEvent(rejection) {
|
|
431
|
-
const metadata = {
|
|
432
|
-
...rejection.metadata,
|
|
433
|
-
outcome: "rejected",
|
|
434
|
-
commandId: rejection.commandId,
|
|
435
|
-
commandType: rejection.commandType
|
|
436
|
-
};
|
|
437
|
-
return {
|
|
438
|
-
id: rejection.id,
|
|
439
|
-
type: rejection.type,
|
|
440
|
-
payload: {
|
|
441
|
-
reasonCode: rejection.reasonCode,
|
|
442
|
-
reason: rejection.reason,
|
|
443
|
-
classification: rejection.classification,
|
|
444
|
-
retryable: rejection.retryable,
|
|
445
|
-
details: rejection.details,
|
|
446
|
-
validationErrors: rejection.validationErrors
|
|
447
|
-
},
|
|
448
|
-
timestamp: new Date(rejection.timestamp).toISOString(),
|
|
449
|
-
metadata,
|
|
450
|
-
kind: "integration"
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
|
|
454
398
|
// src/utils/streamKey/makeStreamKey.ts
|
|
455
399
|
function makeStreamKey(streamName, aggregateId) {
|
|
456
400
|
return `${streamName}#${aggregateId}`;
|
|
@@ -469,10 +413,8 @@ function isEqual(a, b) {
|
|
|
469
413
|
|
|
470
414
|
// src/utils/parseAsError/parseAsError.ts
|
|
471
415
|
function parseAsError(value) {
|
|
472
|
-
if (value instanceof Error)
|
|
473
|
-
|
|
474
|
-
if (typeof value === "string")
|
|
475
|
-
return new Error(value);
|
|
416
|
+
if (value instanceof Error) return value;
|
|
417
|
+
if (typeof value === "string") return new Error(value);
|
|
476
418
|
try {
|
|
477
419
|
const json = JSON.stringify(value);
|
|
478
420
|
return new Error(json ?? String(value));
|
|
@@ -514,11 +456,12 @@ var SimpleEventStore = class {
|
|
|
514
456
|
}
|
|
515
457
|
async append(streamName, events) {
|
|
516
458
|
const uniqueAggregateIds = new Set(events.map((event2) => event2.aggregateId));
|
|
517
|
-
if (uniqueAggregateIds.size > 1)
|
|
518
|
-
throw new MultipleAggregatesException();
|
|
459
|
+
if (uniqueAggregateIds.size > 1) throw new MultipleAggregatesException();
|
|
519
460
|
const event = events[0];
|
|
520
461
|
const currentStream = await this.load(streamName, event.aggregateId);
|
|
521
|
-
const eventsToStore = events.map(
|
|
462
|
+
const eventsToStore = events.map(
|
|
463
|
+
(event2) => createStoredEvent(streamName, currentStream.length + 1, event2)
|
|
464
|
+
);
|
|
522
465
|
await Promise.all(
|
|
523
466
|
eventsToStore.map(
|
|
524
467
|
async (payload) => this.database.execute(this.tableName, { operation: "CREATE" /* CREATE */, payload })
|
|
@@ -537,14 +480,16 @@ var GenericOutboxWorker = class {
|
|
|
537
480
|
}
|
|
538
481
|
async runOnce() {
|
|
539
482
|
const pending = await this.outbox.getPending();
|
|
540
|
-
await Promise.all(
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
483
|
+
await Promise.all(
|
|
484
|
+
pending.map(async (entry) => {
|
|
485
|
+
try {
|
|
486
|
+
await this.eventBus.publish(this.stream, entry.event);
|
|
487
|
+
await this.outbox.markAsPublished(entry.id);
|
|
488
|
+
} catch {
|
|
489
|
+
await this.outbox.markAsFailed(entry.id);
|
|
490
|
+
}
|
|
491
|
+
})
|
|
492
|
+
);
|
|
548
493
|
}
|
|
549
494
|
async tick() {
|
|
550
495
|
await this.runOnce();
|
|
@@ -623,12 +568,7 @@ var SimpleRepository = class {
|
|
|
623
568
|
}
|
|
624
569
|
async store(events) {
|
|
625
570
|
await Promise.all(
|
|
626
|
-
events.map(
|
|
627
|
-
async (event) => this.eventStore.append(
|
|
628
|
-
this.streamName,
|
|
629
|
-
[event]
|
|
630
|
-
)
|
|
631
|
-
)
|
|
571
|
+
events.map(async (event) => this.eventStore.append(this.streamName, [event]))
|
|
632
572
|
);
|
|
633
573
|
}
|
|
634
574
|
};
|
|
@@ -647,20 +587,20 @@ var ScenarioTest = class {
|
|
|
647
587
|
}
|
|
648
588
|
givenInput = [];
|
|
649
589
|
whenInput;
|
|
650
|
-
|
|
590
|
+
Given(...events) {
|
|
651
591
|
this.givenInput = events;
|
|
652
592
|
return {
|
|
653
|
-
|
|
654
|
-
|
|
593
|
+
When: this.When.bind(this),
|
|
594
|
+
Then: this.Then.bind(this)
|
|
655
595
|
};
|
|
656
596
|
}
|
|
657
|
-
|
|
597
|
+
When(action) {
|
|
658
598
|
this.whenInput = action;
|
|
659
599
|
return {
|
|
660
|
-
|
|
600
|
+
Then: this.Then.bind(this)
|
|
661
601
|
};
|
|
662
602
|
}
|
|
663
|
-
async
|
|
603
|
+
async Then(thenInput) {
|
|
664
604
|
await Promise.all([
|
|
665
605
|
this.repository.store(this.givenInput),
|
|
666
606
|
...this.givenInput.map(async (event) => this.eventBus.consume(this.streamName, event))
|
|
@@ -686,7 +626,11 @@ var ScenarioTest = class {
|
|
|
686
626
|
}
|
|
687
627
|
invariant(
|
|
688
628
|
isDomainEvent(thenInput),
|
|
689
|
-
fail(
|
|
629
|
+
fail(
|
|
630
|
+
new TypeError(
|
|
631
|
+
'When "domain event" or "integration event" expects a domain event in the then-step'
|
|
632
|
+
)
|
|
633
|
+
)
|
|
690
634
|
);
|
|
691
635
|
await this.handleEvent(this.whenInput, thenInput);
|
|
692
636
|
}
|
|
@@ -697,7 +641,10 @@ var ScenarioTest = class {
|
|
|
697
641
|
const foundRejection = pending.find(
|
|
698
642
|
(entry) => entry.event.metadata.outcome === "rejected" && entry.event.metadata.commandType === outcome.commandType && entry.event.payload.reasonCode === outcome.reasonCode
|
|
699
643
|
);
|
|
700
|
-
invariant(
|
|
644
|
+
invariant(
|
|
645
|
+
!!foundRejection,
|
|
646
|
+
fail(new Error("ScenarioTest: rejection was not found in outbox"))
|
|
647
|
+
);
|
|
701
648
|
return;
|
|
702
649
|
}
|
|
703
650
|
const actualEvents = await this.eventStore.load(this.streamName, outcome.aggregateId);
|
|
@@ -788,8 +735,6 @@ exports.isIntegrationEvent = isIntegrationEvent;
|
|
|
788
735
|
exports.isQuery = isQuery;
|
|
789
736
|
exports.isRejection = isRejection;
|
|
790
737
|
exports.makeStreamKey = makeStreamKey;
|
|
791
|
-
exports.mapDomainEventToIntegrationEvent = mapDomainEventToIntegrationEvent;
|
|
792
|
-
exports.mapRejectionToIntegrationEvent = mapRejectionToIntegrationEvent;
|
|
793
738
|
exports.parseAsError = parseAsError;
|
|
794
739
|
//# sourceMappingURL=index.cjs.map
|
|
795
740
|
//# sourceMappingURL=index.cjs.map
|