File tree Expand file tree Collapse file tree 3 files changed +3
-28
lines changed Expand file tree Collapse file tree 3 files changed +3
-28
lines changed Original file line number Diff line number Diff line change @@ -49,31 +49,6 @@ const createdEventPayload: CommonEventDefinitionPublisherSchemaType<typeof TestE
49
49
} ,
50
50
}
51
51
52
- const updatedEventPayload : CommonEventDefinitionPublisherSchemaType < typeof TestEvents . updated > = {
53
- ...createdEventPayload ,
54
- type : 'entity.updated' ,
55
- }
56
-
57
- const expectedCreatedPayload = {
58
- id : expect . any ( String ) ,
59
- timestamp : expect . any ( String ) ,
60
- payload : {
61
- message : 'msg' ,
62
- } ,
63
- type : 'entity.created' ,
64
- metadata : {
65
- correlationId : expect . any ( String ) ,
66
- originatedFrom : 'service' ,
67
- producedBy : 'producer' ,
68
- schemaVersion : '1' ,
69
- } ,
70
- }
71
-
72
- const expectedUpdatedPayload = {
73
- ...expectedCreatedPayload ,
74
- type : 'entity.updated' ,
75
- }
76
-
77
52
const TestLogger : Logger = pino ( )
78
53
79
54
class InMemoryOutboxStorage < SupportedEvents extends CommonEventDefinition [ ] >
Original file line number Diff line number Diff line change 1
1
import { AbstractPeriodicJob , type JobExecutionContext } from '@lokalise/background-jobs-common'
2
2
import type { PeriodicJobDependencies } from '@lokalise/background-jobs-common'
3
- import { generateUuid7 } from '@lokalise/id-utils'
4
3
import type {
5
4
CommonEventDefinition ,
6
5
CommonEventDefinitionPublisherSchemaType ,
7
6
ConsumerMessageMetadataType ,
8
7
DomainEventEmitter ,
9
8
} from '@message-queue-toolkit/core'
9
+ import { uuidv7 } from 'uuidv7'
10
10
11
11
/**
12
12
* Status of the outbox entry.
@@ -158,7 +158,7 @@ export class OutboxEventEmitter<SupportedEvents extends CommonEventDefinition[]>
158
158
precedingMessageMetadata ?: Partial < ConsumerMessageMetadataType > ,
159
159
) {
160
160
await this . storage . create ( {
161
- id : generateUuid7 ( ) ,
161
+ id : uuidv7 ( ) ,
162
162
event : supportedEvent ,
163
163
data,
164
164
precedingMessageMetadata,
Original file line number Diff line number Diff line change 26
26
},
27
27
"dependencies" : {
28
28
"@lokalise/background-jobs-common" : " ^7.6.1" ,
29
- "@lokalise/id-utils " : " ^2.2.0 "
29
+ "uuidv7 " : " ^1.0.2 "
30
30
},
31
31
"peerDependencies" : {
32
32
"@message-queue-toolkit/core" : " >=14.0.0" ,
You can’t perform that action at this time.
0 commit comments