@volontariapp/outbox 0.3.0 → 0.3.1-snap-fb27685
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 +7 -0
- package/dist/consumers/jobs-outbox.consumer.d.ts +2 -1
- package/dist/consumers/jobs-outbox.consumer.d.ts.map +1 -1
- package/dist/consumers/jobs-outbox.consumer.js.map +1 -1
- package/dist/test/consumers/event/event-queue.consumer.unit.spec.js +21 -10
- package/dist/test/consumers/event/event-queue.consumer.unit.spec.js.map +1 -1
- package/dist/test/consumers/jobs/jobs-outbox.consumer.unit.spec.js +23 -10
- package/dist/test/consumers/jobs/jobs-outbox.consumer.unit.spec.js.map +1 -1
- package/dist/test/dispatchers/event/event-queue.dispatcher.unit.spec.js +11 -5
- package/dist/test/dispatchers/event/event-queue.dispatcher.unit.spec.js.map +1 -1
- package/dist/test/dispatchers/jobs/jobs-outbox.dispatcher.unit.spec.js +10 -4
- package/dist/test/dispatchers/jobs/jobs-outbox.dispatcher.unit.spec.js.map +1 -1
- package/dist/test/utils/helpers/event-queue-repository-mock.helper.d.ts +1 -1
- package/dist/test/utils/helpers/event-queue-repository-mock.helper.d.ts.map +1 -1
- package/dist/test/utils/helpers/event-queue-repository-mock.helper.js.map +1 -1
- package/dist/test/utils/helpers/jobs-outbox-repository-mock.helper.d.ts +1 -1
- package/dist/test/utils/helpers/jobs-outbox-repository-mock.helper.d.ts.map +1 -1
- package/dist/test/utils/helpers/jobs-outbox-repository-mock.helper.js.map +1 -1
- package/dist/test/utils/helpers/logger-mock.helper.d.ts +4 -2
- package/dist/test/utils/helpers/logger-mock.helper.d.ts.map +1 -1
- package/dist/test/utils/helpers/logger-mock.helper.js +2 -11
- package/dist/test/utils/helpers/logger-mock.helper.js.map +1 -1
- package/dist/test/utils/helpers/outbox-repository-mock.helper.d.ts +4 -9
- package/dist/test/utils/helpers/outbox-repository-mock.helper.d.ts.map +1 -1
- package/dist/test/utils/helpers/outbox-repository-mock.helper.js +2 -7
- package/dist/test/utils/helpers/outbox-repository-mock.helper.js.map +1 -1
- package/dist/test/utils/repositories/event-queue-test.repository.d.ts +1 -2
- package/dist/test/utils/repositories/event-queue-test.repository.d.ts.map +1 -1
- package/dist/test/utils/repositories/event-queue-test.repository.js +1 -1
- package/dist/test/utils/repositories/event-queue-test.repository.js.map +1 -1
- package/dist/test/utils/repositories/jobs-outbox-test.repository.d.ts +1 -2
- package/dist/test/utils/repositories/jobs-outbox-test.repository.d.ts.map +1 -1
- package/dist/test/utils/repositories/jobs-outbox-test.repository.js +1 -1
- package/dist/test/utils/repositories/jobs-outbox-test.repository.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { BaseRepository, JobsOutboxEntity, JobsOutboxModel } from '@volontariapp/database';
|
|
2
1
|
import { OutboxConsumer } from '@volontariapp/database';
|
|
2
|
+
import type { JobsOutboxEntity, JobsOutboxModel } from '@volontariapp/database';
|
|
3
3
|
import type { Logger } from '@volontariapp/logger';
|
|
4
|
+
import type { BaseRepository } from '@volontariapp/database';
|
|
4
5
|
export declare class JobsOutboxConsumer extends OutboxConsumer<JobsOutboxModel, JobsOutboxEntity> {
|
|
5
6
|
constructor(logger: Logger, repository: BaseRepository<JobsOutboxModel, JobsOutboxEntity, string>, batchSize: number);
|
|
6
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-outbox.consumer.d.ts","sourceRoot":"","sources":["../../src/consumers/jobs-outbox.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"jobs-outbox.consumer.d.ts","sourceRoot":"","sources":["../../src/consumers/jobs-outbox.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,eAAe,EAAE,gBAAgB,CAAC;gBAErF,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,cAAc,CAAC,eAAe,EAAE,gBAAgB,EAAE,MAAM,CAAC,EACrE,SAAS,EAAE,MAAM;CAIpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-outbox.consumer.js","sourceRoot":"","sources":["../../src/consumers/jobs-outbox.consumer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jobs-outbox.consumer.js","sourceRoot":"","sources":["../../src/consumers/jobs-outbox.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAGhF,MAAM,OAAO,kBAAmB,SAAQ,cAAiD;IACvF,YACE,MAAc,EACd,UAAqE,EACrE,SAAiB;QAEjB,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,oBAAoB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { describe, expect, it, beforeEach, jest } from '@jest/globals';
|
|
1
|
+
import { describe, expect, it, beforeEach, jest, afterEach } from '@jest/globals';
|
|
2
2
|
import { EventQueueConsumer } from '../../../consumers/event-queue.consumer.js';
|
|
3
3
|
import { makeEventQueueConsumerRepositoryMock, } from '../../utils/helpers/event-queue-repository-mock.helper.js';
|
|
4
4
|
import { makeLoggerMock } from '../../utils/helpers/logger-mock.helper.js';
|
|
@@ -11,14 +11,21 @@ describe('EventQueueConsumer (Unit)', () => {
|
|
|
11
11
|
repository = makeEventQueueConsumerRepositoryMock();
|
|
12
12
|
consumer = new EventQueueConsumer(logger, repository, 10);
|
|
13
13
|
});
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
jest.restoreAllMocks();
|
|
16
|
+
});
|
|
14
17
|
it('should be defined', () => {
|
|
15
18
|
expect(consumer).toBeDefined();
|
|
16
19
|
});
|
|
17
20
|
it('fetchPendingItems() should delegate to repository and return results', async () => {
|
|
18
21
|
const mockEntities = [{ id: '1' }, { id: '2' }];
|
|
19
|
-
|
|
22
|
+
const toEntitiesSpy = jest
|
|
23
|
+
.spyOn(repository, 'toEntities')
|
|
24
|
+
.mockReturnValue(mockEntities);
|
|
25
|
+
const executeInTransactionSpy = jest.spyOn(repository, 'executeInTransaction');
|
|
20
26
|
const result = await consumer.fetchPendingItems();
|
|
21
|
-
expect(
|
|
27
|
+
expect(executeInTransactionSpy).toHaveBeenCalled();
|
|
28
|
+
expect(toEntitiesSpy).toHaveBeenCalled();
|
|
22
29
|
expect(result).toEqual(mockEntities);
|
|
23
30
|
});
|
|
24
31
|
describe('processItems', () => {
|
|
@@ -27,11 +34,13 @@ describe('EventQueueConsumer (Unit)', () => {
|
|
|
27
34
|
{ id: '1', status: OutboxStatus.PROCESSING },
|
|
28
35
|
{ id: '2', status: OutboxStatus.PROCESSING },
|
|
29
36
|
];
|
|
30
|
-
const
|
|
37
|
+
const dispatcher = consumer
|
|
38
|
+
.outboxDispatcher;
|
|
39
|
+
const completedSpy = jest.spyOn(dispatcher, 'markAsCompleted');
|
|
31
40
|
await consumer.processItems(entities);
|
|
32
|
-
expect(
|
|
33
|
-
expect(
|
|
34
|
-
expect(
|
|
41
|
+
expect(completedSpy).toHaveBeenCalledTimes(2);
|
|
42
|
+
expect(completedSpy).toHaveBeenCalledWith(entities[0]);
|
|
43
|
+
expect(completedSpy).toHaveBeenCalledWith(entities[1]);
|
|
35
44
|
});
|
|
36
45
|
});
|
|
37
46
|
describe('markItemsAsCompleted', () => {
|
|
@@ -40,10 +49,12 @@ describe('EventQueueConsumer (Unit)', () => {
|
|
|
40
49
|
{ id: '1', status: OutboxStatus.PROCESSING },
|
|
41
50
|
{ id: '2', status: OutboxStatus.PENDING },
|
|
42
51
|
];
|
|
43
|
-
const
|
|
52
|
+
const dispatcher = consumer
|
|
53
|
+
.outboxDispatcher;
|
|
54
|
+
const completedSpy = jest.spyOn(dispatcher, 'markAsCompleted');
|
|
44
55
|
await consumer.markItemsAsCompleted(entities);
|
|
45
|
-
expect(
|
|
46
|
-
expect(
|
|
56
|
+
expect(completedSpy).toHaveBeenCalledTimes(1);
|
|
57
|
+
expect(completedSpy).toHaveBeenCalledWith(entities[0]);
|
|
47
58
|
});
|
|
48
59
|
});
|
|
49
60
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-queue.consumer.unit.spec.js","sourceRoot":"","sources":["../../../../src/test/consumers/event/event-queue.consumer.unit.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"event-queue.consumer.unit.spec.js","sourceRoot":"","sources":["../../../../src/test/consumers/event/event-queue.consumer.unit.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EACL,oCAAoC,GAErC,MAAM,2DAA2D,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,IAAI,QAA4B,CAAC;IACjC,IAAI,UAA4C,CAAC;IACjD,MAAM,MAAM,GAAe,cAAc,EAAE,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;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { describe, expect, it, beforeEach, jest } from '@jest/globals';
|
|
1
|
+
import { describe, expect, it, beforeEach, jest, afterEach } from '@jest/globals';
|
|
2
2
|
import { JobsOutboxConsumer } from '../../../consumers/jobs-outbox.consumer.js';
|
|
3
3
|
import { makeJobsOutboxConsumerRepositoryMock, } from '../../utils/helpers/jobs-outbox-repository-mock.helper.js';
|
|
4
4
|
import { makeLoggerMock } from '../../utils/helpers/logger-mock.helper.js';
|
|
@@ -11,14 +11,21 @@ describe('JobsOutboxConsumer (Unit)', () => {
|
|
|
11
11
|
repository = makeJobsOutboxConsumerRepositoryMock();
|
|
12
12
|
consumer = new JobsOutboxConsumer(logger, repository, 10);
|
|
13
13
|
});
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
jest.restoreAllMocks();
|
|
16
|
+
});
|
|
14
17
|
it('should be defined', () => {
|
|
15
18
|
expect(consumer).toBeDefined();
|
|
16
19
|
});
|
|
17
20
|
it('fetchPendingItems() should delegate to repository and return results', async () => {
|
|
18
21
|
const mockEntities = [{ id: '1' }, { id: '2' }];
|
|
19
|
-
|
|
22
|
+
const toEntitiesSpy = jest
|
|
23
|
+
.spyOn(repository, 'toEntities')
|
|
24
|
+
.mockReturnValue(mockEntities);
|
|
25
|
+
const executeInTransactionSpy = jest.spyOn(repository, 'executeInTransaction');
|
|
20
26
|
const result = await consumer.fetchPendingItems();
|
|
21
|
-
expect(
|
|
27
|
+
expect(executeInTransactionSpy).toHaveBeenCalled();
|
|
28
|
+
expect(toEntitiesSpy).toHaveBeenCalled();
|
|
22
29
|
expect(result).toEqual(mockEntities);
|
|
23
30
|
});
|
|
24
31
|
describe('processItems', () => {
|
|
@@ -27,11 +34,14 @@ describe('JobsOutboxConsumer (Unit)', () => {
|
|
|
27
34
|
{ id: '1', status: OutboxStatus.PROCESSING },
|
|
28
35
|
{ id: '2', status: OutboxStatus.PROCESSING },
|
|
29
36
|
];
|
|
30
|
-
const
|
|
37
|
+
const dispatcher = consumer
|
|
38
|
+
.outboxDispatcher;
|
|
39
|
+
const completedSpy = jest.spyOn(dispatcher, 'markAsCompleted');
|
|
31
40
|
await consumer.processItems(entities);
|
|
32
|
-
|
|
33
|
-
expect(
|
|
34
|
-
expect(
|
|
41
|
+
const spyMock = completedSpy;
|
|
42
|
+
expect(spyMock).toHaveBeenCalledTimes(2);
|
|
43
|
+
expect(spyMock).toHaveBeenCalledWith(entities[0]);
|
|
44
|
+
expect(spyMock).toHaveBeenCalledWith(entities[1]);
|
|
35
45
|
});
|
|
36
46
|
});
|
|
37
47
|
describe('markItemsAsCompleted', () => {
|
|
@@ -40,10 +50,13 @@ describe('JobsOutboxConsumer (Unit)', () => {
|
|
|
40
50
|
{ id: '1', status: OutboxStatus.PROCESSING },
|
|
41
51
|
{ id: '2', status: OutboxStatus.PENDING },
|
|
42
52
|
];
|
|
43
|
-
const
|
|
53
|
+
const dispatcher = consumer
|
|
54
|
+
.outboxDispatcher;
|
|
55
|
+
const completedSpy = jest.spyOn(dispatcher, 'markAsCompleted');
|
|
44
56
|
await consumer.markItemsAsCompleted(entities);
|
|
45
|
-
|
|
46
|
-
expect(
|
|
57
|
+
const spyMock = completedSpy;
|
|
58
|
+
expect(spyMock).toHaveBeenCalledTimes(1);
|
|
59
|
+
expect(spyMock).toHaveBeenCalledWith(entities[0]);
|
|
47
60
|
});
|
|
48
61
|
});
|
|
49
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-outbox.consumer.unit.spec.js","sourceRoot":"","sources":["../../../../src/test/consumers/jobs/jobs-outbox.consumer.unit.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"jobs-outbox.consumer.unit.spec.js","sourceRoot":"","sources":["../../../../src/test/consumers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E,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,UAAU,EAAsB;gBAChE,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,OAAO,EAAsB;aAC9D,CAAC;YACF,MAAM,UAAU,GAAI,QAAkE;iBACnF,gBAAgB,CAAC;YACpB,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;YAE/D,MAAM,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;YAE9C,MAAM,OAAO,GAAG,YAAyB,CAAC;YAC1C,MAAM,CAAC,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;YACzC,MAAM,CAAC,OAAO,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { describe, expect, it, beforeEach } from '@jest/globals';
|
|
1
|
+
import { describe, expect, it, beforeEach, jest } from '@jest/globals';
|
|
2
2
|
import { UnprocessableEntityError } from '@volontariapp/errors';
|
|
3
3
|
import { EventQueueDispatcher } from '../../../dispatchers/event-queue.dispatcher.js';
|
|
4
4
|
import { OutboxStatus } from '@volontariapp/database';
|
|
5
5
|
import { makeLoggerMock } from '../../utils/helpers/logger-mock.helper.js';
|
|
6
|
-
import { makeEventQueueRepositoryMock
|
|
6
|
+
import { makeEventQueueRepositoryMock } from '../../utils/helpers/event-queue-repository-mock.helper.js';
|
|
7
7
|
import { makeEventQueueEvent } from '../../utils/helpers/event-queue-event.helper.js';
|
|
8
8
|
describe('EventQueueDispatcher (Unit)', () => {
|
|
9
9
|
let dispatcher;
|
|
@@ -13,12 +13,16 @@ describe('EventQueueDispatcher (Unit)', () => {
|
|
|
13
13
|
const loggerMock = makeLoggerMock();
|
|
14
14
|
dispatcher = new EventQueueDispatcher(loggerMock, repositoryMock);
|
|
15
15
|
});
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
jest.restoreAllMocks();
|
|
18
|
+
});
|
|
16
19
|
describe('markAsProcessing', () => {
|
|
17
20
|
it('should mark event as processing and update repository', async () => {
|
|
18
21
|
const event = makeEventQueueEvent({ status: OutboxStatus.PENDING });
|
|
22
|
+
const updateSpy = jest.spyOn(repositoryMock, 'update');
|
|
19
23
|
await dispatcher.markAsProcessing(event);
|
|
20
24
|
expect(event.status).toBe(OutboxStatus.PROCESSING);
|
|
21
|
-
expect(
|
|
25
|
+
expect(updateSpy).toHaveBeenCalledWith(event.id, event);
|
|
22
26
|
});
|
|
23
27
|
it('should throw UnprocessableEntityError if event is not in PENDING status', () => {
|
|
24
28
|
const event = makeEventQueueEvent({ status: OutboxStatus.PROCESSING });
|
|
@@ -29,10 +33,11 @@ describe('EventQueueDispatcher (Unit)', () => {
|
|
|
29
33
|
it('should mark event as failed with error and update repository', async () => {
|
|
30
34
|
const event = makeEventQueueEvent({ status: OutboxStatus.PROCESSING });
|
|
31
35
|
const error = 'Execution failed';
|
|
36
|
+
const updateSpy = jest.spyOn(repositoryMock, 'update');
|
|
32
37
|
await dispatcher.markAsFailed(event, error);
|
|
33
38
|
expect(event.status).toBe(OutboxStatus.FAILED);
|
|
34
39
|
expect(event.lastError).toBe(error);
|
|
35
|
-
expect(
|
|
40
|
+
expect(updateSpy).toHaveBeenCalledWith(event.id, event);
|
|
36
41
|
});
|
|
37
42
|
it('should throw UnprocessableEntityError if event is not in PROCESSING status', () => {
|
|
38
43
|
const event = makeEventQueueEvent({ status: OutboxStatus.PENDING });
|
|
@@ -42,9 +47,10 @@ describe('EventQueueDispatcher (Unit)', () => {
|
|
|
42
47
|
describe('markAsCompleted', () => {
|
|
43
48
|
it('should mark event as completed and update repository', async () => {
|
|
44
49
|
const event = makeEventQueueEvent({ status: OutboxStatus.PROCESSING });
|
|
50
|
+
const updateSpy = jest.spyOn(repositoryMock, 'update');
|
|
45
51
|
await dispatcher.markAsCompleted(event);
|
|
46
52
|
expect(event.status).toBe(OutboxStatus.COMPLETED);
|
|
47
|
-
expect(
|
|
53
|
+
expect(updateSpy).toHaveBeenCalledWith(event.id, event);
|
|
48
54
|
});
|
|
49
55
|
it('should throw UnprocessableEntityError if event is not in PROCESSING status', () => {
|
|
50
56
|
const event = makeEventQueueEvent({ status: OutboxStatus.PENDING });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-queue.dispatcher.unit.spec.js","sourceRoot":"","sources":["../../../../src/test/dispatchers/event/event-queue.dispatcher.unit.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"event-queue.dispatcher.unit.spec.js","sourceRoot":"","sources":["../../../../src/test/dispatchers/event/event-queue.dispatcher.unit.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtF,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,IAAI,UAAgC,CAAC;IACrC,IAAI,cAA+D,CAAC;IAEpE,UAAU,CAAC,GAAG,EAAE;QACd,cAAc,GAAG,4BAA4B,EAAE,CAAC;QAChD,MAAM,UAAU,GAAG,cAAc,EAAE,CA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C,EAAE,EAAE,KAAK,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4EAA4E,EAAE,GAAG,EAAE;YACpF,MAAM,KAAK,GAAG,mBAAmB,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC;YACpE,MAAM,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACpF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { describe, expect, it, beforeEach } from '@jest/globals';
|
|
1
|
+
import { describe, expect, it, beforeEach, jest, afterEach } from '@jest/globals';
|
|
2
2
|
import { UnprocessableEntityError } from '@volontariapp/errors';
|
|
3
3
|
import { JobsOutboxDispatcher } from '../../../dispatchers/jobs-outbox.dispatcher.js';
|
|
4
4
|
import { OutboxStatus } from '@volontariapp/database';
|
|
@@ -13,12 +13,16 @@ describe('JobsOutboxDispatcher (Unit)', () => {
|
|
|
13
13
|
const loggerMock = makeLoggerMock();
|
|
14
14
|
dispatcher = new JobsOutboxDispatcher(loggerMock, repositoryMock);
|
|
15
15
|
});
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
jest.restoreAllMocks();
|
|
18
|
+
});
|
|
16
19
|
describe('markAsProcessing', () => {
|
|
17
20
|
it('should mark job as processing and update repository', async () => {
|
|
18
21
|
const job = makeJobsOutboxEvent({ status: OutboxStatus.PENDING });
|
|
22
|
+
const updateSpy = jest.spyOn(repositoryMock, 'update');
|
|
19
23
|
await dispatcher.markAsProcessing(job);
|
|
20
24
|
expect(job.status).toBe(OutboxStatus.PROCESSING);
|
|
21
|
-
expect(
|
|
25
|
+
expect(updateSpy).toHaveBeenCalledWith(job.id, job);
|
|
22
26
|
});
|
|
23
27
|
it('should throw UnprocessableEntityError if job is not in PENDING status', () => {
|
|
24
28
|
const job = makeJobsOutboxEvent({ status: OutboxStatus.PROCESSING });
|
|
@@ -29,10 +33,11 @@ describe('JobsOutboxDispatcher (Unit)', () => {
|
|
|
29
33
|
it('should mark job as failed with error and update repository', async () => {
|
|
30
34
|
const job = makeJobsOutboxEvent({ status: OutboxStatus.PROCESSING });
|
|
31
35
|
const error = 'Job execution failed';
|
|
36
|
+
const updateSpy = jest.spyOn(repositoryMock, 'update');
|
|
32
37
|
await dispatcher.markAsFailed(job, error);
|
|
33
38
|
expect(job.status).toBe(OutboxStatus.FAILED);
|
|
34
39
|
expect(job.lastError).toBe(error);
|
|
35
|
-
expect(
|
|
40
|
+
expect(updateSpy).toHaveBeenCalledWith(job.id, job);
|
|
36
41
|
});
|
|
37
42
|
it('should throw UnprocessableEntityError if job is not in PROCESSING status', () => {
|
|
38
43
|
const job = makeJobsOutboxEvent({ status: OutboxStatus.PENDING });
|
|
@@ -42,9 +47,10 @@ describe('JobsOutboxDispatcher (Unit)', () => {
|
|
|
42
47
|
describe('markAsCompleted', () => {
|
|
43
48
|
it('should mark job as completed and update repository', async () => {
|
|
44
49
|
const job = makeJobsOutboxEvent({ status: OutboxStatus.PROCESSING });
|
|
50
|
+
const updateSpy = jest.spyOn(repositoryMock, 'update');
|
|
45
51
|
await dispatcher.markAsCompleted(job);
|
|
46
52
|
expect(job.status).toBe(OutboxStatus.COMPLETED);
|
|
47
|
-
expect(
|
|
53
|
+
expect(updateSpy).toHaveBeenCalledWith(job.id, job);
|
|
48
54
|
});
|
|
49
55
|
it('should throw UnprocessableEntityError if job is not in PROCESSING status', () => {
|
|
50
56
|
const job = makeJobsOutboxEvent({ status: OutboxStatus.PENDING });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-outbox.dispatcher.unit.spec.js","sourceRoot":"","sources":["../../../../src/test/dispatchers/jobs/jobs-outbox.dispatcher.unit.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,M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ueEntity } from '@volontariapp/database';
|
|
|
2
2
|
import { EventQueueModel } from '@volontariapp/database';
|
|
3
3
|
import { type OutboxRepositoryMock } from './outbox-repository-mock.helper.js';
|
|
4
4
|
import { type OutboxConsumerRepositoryMock } from './outbox-consumer-repository-mock.helper.js';
|
|
5
|
-
export type EventQueueRepositoryMock = OutboxRepositoryMock<EventQueueEntity>;
|
|
5
|
+
export type EventQueueRepositoryMock = OutboxRepositoryMock<EventQueueEntity, EventQueueModel>;
|
|
6
6
|
export declare function makeEventQueueRepositoryMock(): EventQueueRepositoryMock;
|
|
7
7
|
export type EventQueueConsumerRepositoryMock = OutboxConsumerRepositoryMock<EventQueueModel, EventQueueEntity>;
|
|
8
8
|
export declare function makeEventQueueConsumerRepositoryMock(): EventQueueConsumerRepositoryMock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-queue-repository-mock.helper.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/helpers/event-queue-repository-mock.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,6CAA6C,CAAC;AAErD,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"event-queue-repository-mock.helper.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/helpers/event-queue-repository-mock.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,6CAA6C,CAAC;AAErD,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;AAE/F,wBAAgB,4BAA4B,IAAI,wBAAwB,CAEvE;AAED,MAAM,MAAM,gCAAgC,GAAG,4BAA4B,CACzE,eAAe,EACf,gBAAgB,CACjB,CAAC;AAEF,wBAAgB,oCAAoC,IAAI,gCAAgC,CAEvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-queue-repository-mock.helper.js","sourceRoot":"","sources":["../../../../src/test/utils/helpers/event-queue-repository-mock.helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,wBAAwB,GAEzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,gCAAgC,GAEjC,MAAM,6CAA6C,CAAC;AAIrD,MAAM,UAAU,4BAA4B;IAC1C,OAAO,wBAAwB,
|
|
1
|
+
{"version":3,"file":"event-queue-repository-mock.helper.js","sourceRoot":"","sources":["../../../../src/test/utils/helpers/event-queue-repository-mock.helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,wBAAwB,GAEzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,gCAAgC,GAEjC,MAAM,6CAA6C,CAAC;AAIrD,MAAM,UAAU,4BAA4B;IAC1C,OAAO,wBAAwB,EAAqC,CAAC;AACvE,CAAC;AAOD,MAAM,UAAU,oCAAoC;IAClD,OAAO,gCAAgC,CAAoC,eAAe,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { JobsOutboxEntity } from '@volontariapp/database';
|
|
|
2
2
|
import { JobsOutboxModel } from '@volontariapp/database';
|
|
3
3
|
import { type OutboxRepositoryMock } from './outbox-repository-mock.helper.js';
|
|
4
4
|
import { type OutboxConsumerRepositoryMock } from './outbox-consumer-repository-mock.helper.js';
|
|
5
|
-
export type JobsOutboxRepositoryMock = OutboxRepositoryMock<JobsOutboxEntity>;
|
|
5
|
+
export type JobsOutboxRepositoryMock = OutboxRepositoryMock<JobsOutboxEntity, JobsOutboxModel>;
|
|
6
6
|
export declare function makeJobsOutboxRepositoryMock(): JobsOutboxRepositoryMock;
|
|
7
7
|
export type JobsOutboxConsumerRepositoryMock = OutboxConsumerRepositoryMock<JobsOutboxModel, JobsOutboxEntity>;
|
|
8
8
|
export declare function makeJobsOutboxConsumerRepositoryMock(): JobsOutboxConsumerRepositoryMock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-outbox-repository-mock.helper.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/helpers/jobs-outbox-repository-mock.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,6CAA6C,CAAC;AAErD,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"jobs-outbox-repository-mock.helper.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/helpers/jobs-outbox-repository-mock.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,6CAA6C,CAAC;AAErD,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;AAE/F,wBAAgB,4BAA4B,IAAI,wBAAwB,CAEvE;AAED,MAAM,MAAM,gCAAgC,GAAG,4BAA4B,CACzE,eAAe,EACf,gBAAgB,CACjB,CAAC;AAEF,wBAAgB,oCAAoC,IAAI,gCAAgC,CAEvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-outbox-repository-mock.helper.js","sourceRoot":"","sources":["../../../../src/test/utils/helpers/jobs-outbox-repository-mock.helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,wBAAwB,GAEzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,gCAAgC,GAEjC,MAAM,6CAA6C,CAAC;AAIrD,MAAM,UAAU,4BAA4B;IAC1C,OAAO,wBAAwB,
|
|
1
|
+
{"version":3,"file":"jobs-outbox-repository-mock.helper.js","sourceRoot":"","sources":["../../../../src/test/utils/helpers/jobs-outbox-repository-mock.helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,wBAAwB,GAEzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,gCAAgC,GAEjC,MAAM,6CAA6C,CAAC;AAIrD,MAAM,UAAU,4BAA4B;IAC1C,OAAO,wBAAwB,EAAqC,CAAC;AACvE,CAAC;AAOD,MAAM,UAAU,oCAAoC;IAClD,OAAO,gCAAgC,CAAoC,eAAe,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { jest } from '@jest/globals';
|
|
2
|
+
import type { Logger } from '@volontariapp/logger';
|
|
3
|
+
export type LoggerMock = jest.Mocked<Logger>;
|
|
4
|
+
export declare const makeLoggerMock: () => LoggerMock;
|
|
3
5
|
//# sourceMappingURL=logger-mock.helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-mock.helper.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/helpers/logger-mock.helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger-mock.helper.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/helpers/logger-mock.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAE7C,eAAO,MAAM,cAAc,QAAO,UAEjC,CAAC"}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Logger } from '@volontariapp/logger';
|
|
1
|
+
import { createMock } from '@volontariapp/database/testing';
|
|
3
2
|
export const makeLoggerMock = () => {
|
|
4
|
-
|
|
5
|
-
jest.spyOn(logger, 'info').mockImplementation(() => { });
|
|
6
|
-
jest.spyOn(logger, 'warn').mockImplementation(() => { });
|
|
7
|
-
jest.spyOn(logger, 'error').mockImplementation(() => { });
|
|
8
|
-
jest.spyOn(logger, 'debug').mockImplementation(() => { });
|
|
9
|
-
jest.spyOn(logger, 'fatal').mockImplementation(() => { });
|
|
10
|
-
jest.spyOn(logger, 'verbose').mockImplementation(() => { });
|
|
11
|
-
jest.spyOn(logger, 'log').mockImplementation(() => { });
|
|
12
|
-
return logger;
|
|
3
|
+
return createMock();
|
|
13
4
|
};
|
|
14
5
|
//# sourceMappingURL=logger-mock.helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-mock.helper.js","sourceRoot":"","sources":["../../../../src/test/utils/helpers/logger-mock.helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger-mock.helper.js","sourceRoot":"","sources":["../../../../src/test/utils/helpers/logger-mock.helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAI5D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAe,EAAE;IAC7C,OAAO,UAAU,EAAU,CAAC;AAC9B,CAAC,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { jest } from '@jest/globals';
|
|
2
|
-
import type { OutboxEntity } from '@volontariapp/database';
|
|
3
|
-
export type OutboxRepositoryMock<TEntity extends OutboxEntity> =
|
|
4
|
-
|
|
5
|
-
createMany: jest.MockedFunction<(dataArray: Partial<TEntity>[]) => Promise<TEntity[]>>;
|
|
6
|
-
update: jest.MockedFunction<(id: string, data: Partial<TEntity>) => Promise<TEntity | null>>;
|
|
7
|
-
delete: jest.MockedFunction<(id: string) => Promise<boolean>>;
|
|
8
|
-
};
|
|
9
|
-
export declare const makeOutboxRepositoryMock: <TEntity extends OutboxEntity>() => OutboxRepositoryMock<TEntity>;
|
|
1
|
+
import type { jest } from '@jest/globals';
|
|
2
|
+
import type { OutboxEntity, BaseRepository, OutboxModel } from '@volontariapp/database';
|
|
3
|
+
export type OutboxRepositoryMock<TEntity extends OutboxEntity, TModel extends OutboxModel = OutboxModel> = jest.Mocked<BaseRepository<TModel, TEntity, string>>;
|
|
4
|
+
export declare const makeOutboxRepositoryMock: <TEntity extends OutboxEntity, TModel extends OutboxModel = OutboxModel<string>>() => OutboxRepositoryMock<TEntity, TModel>;
|
|
10
5
|
//# sourceMappingURL=outbox-repository-mock.helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbox-repository-mock.helper.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/helpers/outbox-repository-mock.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"outbox-repository-mock.helper.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/helpers/outbox-repository-mock.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGxF,MAAM,MAAM,oBAAoB,CAC9B,OAAO,SAAS,YAAY,EAC5B,MAAM,SAAS,WAAW,GAAG,WAAW,IACtC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAEzD,eAAO,MAAM,wBAAwB,GACnC,OAAO,SAAS,YAAY,EAC5B,MAAM,SAAS,WAAW,6BACvB,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAExC,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createMock } from '@volontariapp/database/testing';
|
|
2
2
|
export const makeOutboxRepositoryMock = () => {
|
|
3
|
-
return
|
|
4
|
-
create: jest.fn(() => Promise.resolve({})),
|
|
5
|
-
createMany: jest.fn(() => Promise.resolve([])),
|
|
6
|
-
update: jest.fn(() => Promise.resolve({})),
|
|
7
|
-
delete: jest.fn(() => Promise.resolve(true)),
|
|
8
|
-
};
|
|
3
|
+
return createMock();
|
|
9
4
|
};
|
|
10
5
|
//# sourceMappingURL=outbox-repository-mock.helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbox-repository-mock.helper.js","sourceRoot":"","sources":["../../../../src/test/utils/helpers/outbox-repository-mock.helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outbox-repository-mock.helper.js","sourceRoot":"","sources":["../../../../src/test/utils/helpers/outbox-repository-mock.helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAO5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAGG,EAAE;IAC3C,OAAO,UAAU,EAA2C,CAAC;AAC/D,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BaseRepository, EventQueueEntity, EventQueueModel } from '@volontariapp/database';
|
|
2
|
-
import type { Repository } from 'typeorm';
|
|
1
|
+
import { BaseRepository, EventQueueEntity, EventQueueModel, type Repository } from '@volontariapp/database';
|
|
3
2
|
export declare class TestEventQueueRepository extends BaseRepository<EventQueueModel, EventQueueEntity, string> {
|
|
4
3
|
constructor(repository: Repository<EventQueueModel>);
|
|
5
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-queue-test.repository.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/repositories/event-queue-test.repository.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"event-queue-test.repository.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/repositories/event-queue-test.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,wBAAyB,SAAQ,cAAc,CAC1D,eAAe,EACf,gBAAgB,EAChB,MAAM,CACP;gBACa,UAAU,EAAE,UAAU,CAAC,eAAe,CAAC;CAGpD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseRepository, EventQueueEntity, EventQueueModel } from '@volontariapp/database';
|
|
1
|
+
import { BaseRepository, EventQueueEntity, EventQueueModel, } from '@volontariapp/database';
|
|
2
2
|
export class TestEventQueueRepository extends BaseRepository {
|
|
3
3
|
constructor(repository) {
|
|
4
4
|
super(repository, EventQueueEntity, EventQueueModel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-queue-test.repository.js","sourceRoot":"","sources":["../../../../src/test/utils/repositories/event-queue-test.repository.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"event-queue-test.repository.js","sourceRoot":"","sources":["../../../../src/test/utils/repositories/event-queue-test.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,GAEhB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,OAAO,wBAAyB,SAAQ,cAI7C;IACC,YAAY,UAAuC;QACjD,KAAK,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BaseRepository, JobsOutboxEntity, JobsOutboxModel } from '@volontariapp/database';
|
|
2
|
-
import type { Repository } from 'typeorm';
|
|
1
|
+
import { BaseRepository, JobsOutboxEntity, JobsOutboxModel, type Repository } from '@volontariapp/database';
|
|
3
2
|
export declare class TestJobsOutboxRepository extends BaseRepository<JobsOutboxModel, JobsOutboxEntity, string> {
|
|
4
3
|
constructor(repository: Repository<JobsOutboxModel>);
|
|
5
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-outbox-test.repository.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/repositories/jobs-outbox-test.repository.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"jobs-outbox-test.repository.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/repositories/jobs-outbox-test.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,wBAAyB,SAAQ,cAAc,CAC1D,eAAe,EACf,gBAAgB,EAChB,MAAM,CACP;gBACa,UAAU,EAAE,UAAU,CAAC,eAAe,CAAC;CAGpD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseRepository, JobsOutboxEntity, JobsOutboxModel } from '@volontariapp/database';
|
|
1
|
+
import { BaseRepository, JobsOutboxEntity, JobsOutboxModel, } from '@volontariapp/database';
|
|
2
2
|
export class TestJobsOutboxRepository extends BaseRepository {
|
|
3
3
|
constructor(repository) {
|
|
4
4
|
super(repository, JobsOutboxEntity, JobsOutboxModel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-outbox-test.repository.js","sourceRoot":"","sources":["../../../../src/test/utils/repositories/jobs-outbox-test.repository.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"jobs-outbox-test.repository.js","sourceRoot":"","sources":["../../../../src/test/utils/repositories/jobs-outbox-test.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,GAEhB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,OAAO,wBAAyB,SAAQ,cAI7C;IACC,YAAY,UAAuC;QACjD,KAAK,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volontariapp/outbox",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1-snap-fb27685",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"db:down": "docker-compose -f ../../docker-compose.test.yml down"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@volontariapp/database": "1.
|
|
40
|
+
"@volontariapp/database": "1.12.0-snap-fb27685",
|
|
41
41
|
"@volontariapp/errors": "0.5.0",
|
|
42
42
|
"@volontariapp/logger": "0.2.3"
|
|
43
43
|
},
|