@prodforcode/event-forge-typeorm 1.0.2 → 1.0.3
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.
|
@@ -30,7 +30,7 @@ __decorate([
|
|
|
30
30
|
__metadata("design:type", String)
|
|
31
31
|
], InboxMessageEntity.prototype, "id", void 0);
|
|
32
32
|
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
33
|
+
(0, typeorm_1.Column)({ name: 'message_id', type: 'varchar', length: 255 }),
|
|
34
34
|
__metadata("design:type", String)
|
|
35
35
|
], InboxMessageEntity.prototype, "messageId", void 0);
|
|
36
36
|
__decorate([
|
|
@@ -38,11 +38,11 @@ __decorate([
|
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], InboxMessageEntity.prototype, "source", void 0);
|
|
40
40
|
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
41
|
+
(0, typeorm_1.Column)({ name: 'event_type', type: 'varchar', length: 255 }),
|
|
42
42
|
__metadata("design:type", String)
|
|
43
43
|
], InboxMessageEntity.prototype, "eventType", void 0);
|
|
44
44
|
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: '
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
46
46
|
__metadata("design:type", Object)
|
|
47
47
|
], InboxMessageEntity.prototype, "payload", void 0);
|
|
48
48
|
__decorate([
|
|
@@ -54,27 +54,27 @@ __decorate([
|
|
|
54
54
|
__metadata("design:type", String)
|
|
55
55
|
], InboxMessageEntity.prototype, "status", void 0);
|
|
56
56
|
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({ type: '
|
|
57
|
+
(0, typeorm_1.Column)({ name: 'processed_at', type: 'timestamptz', nullable: true }),
|
|
58
58
|
__metadata("design:type", Date)
|
|
59
59
|
], InboxMessageEntity.prototype, "processedAt", void 0);
|
|
60
60
|
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
61
|
+
(0, typeorm_1.Column)({ name: 'error_message', type: 'text', nullable: true }),
|
|
62
62
|
__metadata("design:type", String)
|
|
63
63
|
], InboxMessageEntity.prototype, "errorMessage", void 0);
|
|
64
64
|
__decorate([
|
|
65
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
65
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
66
66
|
__metadata("design:type", Date)
|
|
67
67
|
], InboxMessageEntity.prototype, "createdAt", void 0);
|
|
68
68
|
__decorate([
|
|
69
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
69
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'received_at' }),
|
|
70
70
|
__metadata("design:type", Date)
|
|
71
71
|
], InboxMessageEntity.prototype, "receivedAt", void 0);
|
|
72
72
|
exports.InboxMessageEntity = InboxMessageEntity = __decorate([
|
|
73
73
|
(0, typeorm_1.Entity)('inbox_messages'),
|
|
74
|
-
(0, typeorm_1.Index)(['messageId', 'source'], { unique: true }),
|
|
75
|
-
(0, typeorm_1.Index)(['eventType']),
|
|
76
|
-
(0, typeorm_1.Index)(['status']),
|
|
77
|
-
(0, typeorm_1.Index)(['createdAt']),
|
|
78
|
-
(0, typeorm_1.Index)(['receivedAt'])
|
|
74
|
+
(0, typeorm_1.Index)('idx_inbox_unique', ['messageId', 'source'], { unique: true }),
|
|
75
|
+
(0, typeorm_1.Index)('idx_inbox_event_type', ['eventType']),
|
|
76
|
+
(0, typeorm_1.Index)('idx_inbox_status', ['status']),
|
|
77
|
+
(0, typeorm_1.Index)('idx_inbox_created_at', ['createdAt']),
|
|
78
|
+
(0, typeorm_1.Index)('idx_inbox_received_at', ['receivedAt'])
|
|
79
79
|
], InboxMessageEntity);
|
|
80
80
|
//# sourceMappingURL=inbox-message.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox-message.entity.js","sourceRoot":"","sources":["../../src/entities/inbox-message.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oEAAiF;AACjF,qCAMiB;AAaV,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,EAAE,CAAS;IAGX,SAAS,CAAS;IAGlB,MAAM,CAAS;IAGf,SAAS,CAAS;IAGlB,OAAO,CAA0B;IAOjC,MAAM,CAAqB;IAG3B,WAAW,CAAQ;IAGnB,YAAY,CAAU;IAGtB,SAAS,CAAO;IAGhB,UAAU,CAAO;CAClB,CAAA;AAlCY,gDAAkB;AAE7B;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;8CACpB;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"inbox-message.entity.js","sourceRoot":"","sources":["../../src/entities/inbox-message.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oEAAiF;AACjF,qCAMiB;AAaV,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,EAAE,CAAS;IAGX,SAAS,CAAS;IAGlB,MAAM,CAAS;IAGf,SAAS,CAAS;IAGlB,OAAO,CAA0B;IAOjC,MAAM,CAAqB;IAG3B,WAAW,CAAQ;IAGnB,YAAY,CAAU;IAGtB,SAAS,CAAO;IAGhB,UAAU,CAAO;CAClB,CAAA;AAlCY,gDAAkB;AAE7B;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;8CACpB;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;qDAC3C;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;kDAC1B;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS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xMessageEntity.prototype, "id", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
38
|
+
(0, typeorm_1.Column)({ name: 'aggregate_type', type: 'varchar', length: 255 }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], OutboxMessageEntity.prototype, "aggregateType", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'aggregate_id', type: 'varchar', length: 255 }),
|
|
43
43
|
__metadata("design:type", String)
|
|
44
44
|
], OutboxMessageEntity.prototype, "aggregateId", void 0);
|
|
45
45
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
46
|
+
(0, typeorm_1.Column)({ name: 'event_type', type: 'varchar', length: 255 }),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], OutboxMessageEntity.prototype, "eventType", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type: '
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
51
51
|
__metadata("design:type", Object)
|
|
52
52
|
], OutboxMessageEntity.prototype, "payload", void 0);
|
|
53
53
|
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({ type: '
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
55
55
|
__metadata("design:type", Object)
|
|
56
56
|
], OutboxMessageEntity.prototype, "metadata", void 0);
|
|
57
57
|
__decorate([
|
|
@@ -63,44 +63,44 @@ __decorate([
|
|
|
63
63
|
__metadata("design:type", String)
|
|
64
64
|
], OutboxMessageEntity.prototype, "status", void 0);
|
|
65
65
|
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
66
|
+
(0, typeorm_1.Column)({ name: 'retry_count', type: 'int', default: 0 }),
|
|
67
67
|
__metadata("design:type", Number)
|
|
68
68
|
], OutboxMessageEntity.prototype, "retryCount", void 0);
|
|
69
69
|
__decorate([
|
|
70
|
-
(0, typeorm_1.Column)({ type: 'int', default:
|
|
70
|
+
(0, typeorm_1.Column)({ name: 'max_retries', type: 'int', default: 5 }),
|
|
71
71
|
__metadata("design:type", Number)
|
|
72
72
|
], OutboxMessageEntity.prototype, "maxRetries", void 0);
|
|
73
73
|
__decorate([
|
|
74
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
74
|
+
(0, typeorm_1.Column)({ name: 'error_message', type: 'text', nullable: true }),
|
|
75
75
|
__metadata("design:type", String)
|
|
76
76
|
], OutboxMessageEntity.prototype, "errorMessage", void 0);
|
|
77
77
|
__decorate([
|
|
78
|
-
(0, typeorm_1.Column)({ type: '
|
|
78
|
+
(0, typeorm_1.Column)({ name: 'scheduled_at', type: 'timestamptz', default: () => 'now()' }),
|
|
79
79
|
__metadata("design:type", Date)
|
|
80
80
|
], OutboxMessageEntity.prototype, "scheduledAt", void 0);
|
|
81
81
|
__decorate([
|
|
82
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
82
|
+
(0, typeorm_1.Column)({ name: 'locked_by', type: 'varchar', length: 255, nullable: true }),
|
|
83
83
|
__metadata("design:type", String)
|
|
84
84
|
], OutboxMessageEntity.prototype, "lockedBy", void 0);
|
|
85
85
|
__decorate([
|
|
86
|
-
(0, typeorm_1.Column)({ type: '
|
|
86
|
+
(0, typeorm_1.Column)({ name: 'locked_at', type: 'timestamptz', nullable: true }),
|
|
87
87
|
__metadata("design:type", Date)
|
|
88
88
|
], OutboxMessageEntity.prototype, "lockedAt", void 0);
|
|
89
89
|
__decorate([
|
|
90
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
90
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
91
91
|
__metadata("design:type", Date)
|
|
92
92
|
], OutboxMessageEntity.prototype, "createdAt", void 0);
|
|
93
93
|
__decorate([
|
|
94
|
-
(0, typeorm_1.UpdateDateColumn)(),
|
|
94
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
95
95
|
__metadata("design:type", Date)
|
|
96
96
|
], OutboxMessageEntity.prototype, "updatedAt", void 0);
|
|
97
97
|
exports.OutboxMessageEntity = OutboxMessageEntity = __decorate([
|
|
98
98
|
(0, typeorm_1.Entity)('outbox_messages'),
|
|
99
|
-
(0, typeorm_1.Index)(['status', 'scheduledAt', 'createdAt'], {
|
|
99
|
+
(0, typeorm_1.Index)('idx_outbox_pending', ['status', 'scheduledAt', 'createdAt'], {
|
|
100
100
|
where: 'status IN (\'pending\', \'failed\')',
|
|
101
101
|
}),
|
|
102
|
-
(0, typeorm_1.Index)(['aggregateType', 'aggregateId']),
|
|
103
|
-
(0, typeorm_1.Index)(['eventType']),
|
|
104
|
-
(0, typeorm_1.Index)(['createdAt'])
|
|
102
|
+
(0, typeorm_1.Index)('idx_outbox_aggregate', ['aggregateType', 'aggregateId']),
|
|
103
|
+
(0, typeorm_1.Index)('idx_outbox_event_type', ['eventType']),
|
|
104
|
+
(0, typeorm_1.Index)('idx_outbox_created_at', ['createdAt'])
|
|
105
105
|
], OutboxMessageEntity);
|
|
106
106
|
//# sourceMappingURL=outbox-message.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbox-message.entity.js","sourceRoot":"","sources":["../../src/entities/outbox-message.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oEAAmF;AACnF,qCAOiB;AAcV,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAE9B,EAAE,CAAS;IAGX,aAAa,CAAS;IAGtB,WAAW,CAAS;IAGpB,SAAS,CAAS;IAGlB,OAAO,CAA0B;IAGjC,QAAQ,CAA2B;IAOnC,MAAM,CAAsB;IAG5B,UAAU,CAAS;IAGnB,UAAU,CAAS;IAGnB,YAAY,CAAU;IAGtB,WAAW,CAAQ;IAGnB,QA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BAC9B,IAAI;sDAAC;8BAhDL,mBAAmB;IAP/B,IAAA,gBAAM,EAAC,iBAAiB,CAAC;IACzB,IAAA,eAAK,EAAC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE;QACnE,KAAK,EAAE,qCAAqC;KAC7C,CAAC;IACD,IAAA,eAAK,EAAC,sBAAsB,EAAE,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAC/D,IAAA,eAAK,EAAC,uBAAuB,EAAE,CAAC,WAAW,CAAC,CAAC;IAC7C,IAAA,eAAK,EAAC,uBAAuB,EAAE,CAAC,WAAW,CAAC,CAAC;GACjC,mBAAmB,CAiD/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prodforcode/event-forge-typeorm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "TypeORM adapter for Universal Inbox-Outbox Pattern (PostgreSQL)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"commander": "^14.0.2",
|
|
25
25
|
"typeorm": "^0.3.17",
|
|
26
|
-
"@prodforcode/event-forge-core": "1.0.
|
|
26
|
+
"@prodforcode/event-forge-core": "1.0.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/better-sqlite3": "^7.6.8",
|