@volontariapp/database 1.15.2-snap-b481cae → 1.16.0-snap-e1b3270
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 +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/workers/index.d.ts +3 -0
- package/dist/workers/index.d.ts.map +1 -0
- package/dist/workers/index.js +3 -0
- package/dist/workers/index.js.map +1 -0
- package/dist/workers/models/index.d.ts +2 -0
- package/dist/workers/models/index.d.ts.map +1 -0
- package/dist/workers/models/index.js +2 -0
- package/dist/workers/models/index.js.map +1 -0
- package/dist/workers/models/job-audit.model.d.ts +15 -0
- package/dist/workers/models/job-audit.model.d.ts.map +1 -0
- package/dist/workers/models/job-audit.model.js +73 -0
- package/dist/workers/models/job-audit.model.js.map +1 -0
- package/dist/workers/types/index.d.ts +2 -0
- package/dist/workers/types/index.d.ts.map +1 -0
- package/dist/workers/types/index.js +2 -0
- package/dist/workers/types/index.js.map +1 -0
- package/dist/workers/types/job-audit.status.d.ts +7 -0
- package/dist/workers/types/job-audit.status.d.ts.map +1 -0
- package/dist/workers/types/job-audit.status.js +8 -0
- package/dist/workers/types/job-audit.status.js.map +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './core/mapper.service.js';
|
|
|
4
4
|
export * from './core/base.model.js';
|
|
5
5
|
export * from './core/base.entity.js';
|
|
6
6
|
export * from './outbox/index.js';
|
|
7
|
+
export * from './workers/index.js';
|
|
7
8
|
export type { Repository, ObjectLiteral, FindOptionsWhere } from 'typeorm';
|
|
8
9
|
export { ILike, Like, In } from 'typeorm';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAEnC,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,5 +4,6 @@ export * from './core/mapper.service.js';
|
|
|
4
4
|
export * from './core/base.model.js';
|
|
5
5
|
export * from './core/base.entity.js';
|
|
6
6
|
export * from './outbox/index.js';
|
|
7
|
+
export * from './workers/index.js';
|
|
7
8
|
export { ILike, Like, In } from 'typeorm';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workers/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/workers/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseModel } from '@volontariapp/database';
|
|
2
|
+
import { JobAuditStatus } from '../types/job-audit.status.js';
|
|
3
|
+
export declare class JobAuditModel extends BaseModel {
|
|
4
|
+
jobId: string;
|
|
5
|
+
jobType: string;
|
|
6
|
+
status: JobAuditStatus;
|
|
7
|
+
workerId: string;
|
|
8
|
+
currentAttempt: number;
|
|
9
|
+
startedAt?: Date;
|
|
10
|
+
finishedAt?: Date;
|
|
11
|
+
resultPayload?: Record<string, unknown>;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
errorStack?: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=job-audit.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-audit.model.d.ts","sourceRoot":"","sources":["../../../src/workers/models/job-audit.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,qBAKa,aAAc,SAAQ,SAAS;IAE1C,KAAK,EAAG,MAAM,CAAC;IAGf,OAAO,EAAG,MAAM,CAAC;IAGjB,MAAM,EAAE,cAAc,CAA0B;IAGhD,QAAQ,EAAG,MAAM,CAAC;IAGlB,cAAc,EAAE,MAAM,CAAK;IAG3B,SAAS,CAAC,EAAE,IAAI,CAAC;IAGjB,UAAU,CAAC,EAAE,IAAI,CAAC;IAGlB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGxC,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity, Index } from 'typeorm';
|
|
11
|
+
import { BaseModel } from '@volontariapp/database';
|
|
12
|
+
import { JobAuditStatus } from '../types/job-audit.status.js';
|
|
13
|
+
let JobAuditModel = class JobAuditModel extends BaseModel {
|
|
14
|
+
jobId;
|
|
15
|
+
jobType;
|
|
16
|
+
status = JobAuditStatus.PENDING;
|
|
17
|
+
workerId;
|
|
18
|
+
currentAttempt = 1;
|
|
19
|
+
startedAt;
|
|
20
|
+
finishedAt;
|
|
21
|
+
resultPayload;
|
|
22
|
+
errorMessage;
|
|
23
|
+
errorStack;
|
|
24
|
+
};
|
|
25
|
+
__decorate([
|
|
26
|
+
Column({ type: 'varchar', length: 100, name: 'job_id', unique: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], JobAuditModel.prototype, "jobId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
Column({ type: 'varchar', length: 255, name: 'job_type' }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], JobAuditModel.prototype, "jobType", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
Column({ type: 'varchar', length: 20, default: JobAuditStatus.PENDING }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], JobAuditModel.prototype, "status", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
Column({ type: 'varchar', length: 255, name: 'worker_id' }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], JobAuditModel.prototype, "workerId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
Column({ name: 'current_attempt', type: 'int', default: 1 }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], JobAuditModel.prototype, "currentAttempt", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
Column({ name: 'started_at', type: 'timestamp', nullable: true }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], JobAuditModel.prototype, "startedAt", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Column({ name: 'finished_at', type: 'timestamp', nullable: true }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], JobAuditModel.prototype, "finishedAt", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Column({ name: 'result_payload', type: 'jsonb', nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], JobAuditModel.prototype, "resultPayload", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
Column({ name: 'error_message', type: 'text', nullable: true }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], JobAuditModel.prototype, "errorMessage", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
Column({ name: 'error_stack', type: 'text', nullable: true }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], JobAuditModel.prototype, "errorStack", void 0);
|
|
65
|
+
JobAuditModel = __decorate([
|
|
66
|
+
Entity('job_audit'),
|
|
67
|
+
Index(['jobId'], { unique: true }),
|
|
68
|
+
Index(['jobType']),
|
|
69
|
+
Index(['workerId']),
|
|
70
|
+
Index(['status'])
|
|
71
|
+
], JobAuditModel);
|
|
72
|
+
export { JobAuditModel };
|
|
73
|
+
//# sourceMappingURL=job-audit.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-audit.model.js","sourceRoot":"","sources":["../../../src/workers/models/job-audit.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAOvD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,SAAS;IAE1C,KAAK,CAAU;IAGf,OAAO,CAAU;IAGjB,MAAM,GAAmB,cAAc,CAAC,OAAO,CAAC;IAGhD,QAAQ,CAAU;IAGlB,cAAc,GAAW,CAAC,CAAC;IAG3B,SAAS,CAAQ;IAGjB,UAAU,CAAQ;IAGlB,aAAa,CAA2B;IAGxC,YAAY,CA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EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC1C;AA7BT,aAAa;IALzB,MAAM,CAAC,WAAW,CAAC;IACnB,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC;IAClB,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;IACnB,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;GACL,aAAa,CA8BzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workers/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/workers/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-audit.status.d.ts","sourceRoot":"","sources":["../../../src/workers/types/job-audit.status.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var JobAuditStatus;
|
|
2
|
+
(function (JobAuditStatus) {
|
|
3
|
+
JobAuditStatus["PENDING"] = "PENDING";
|
|
4
|
+
JobAuditStatus["PROCESSING"] = "PROCESSING";
|
|
5
|
+
JobAuditStatus["COMPLETED"] = "COMPLETED";
|
|
6
|
+
JobAuditStatus["FAILED"] = "FAILED";
|
|
7
|
+
})(JobAuditStatus || (JobAuditStatus = {}));
|
|
8
|
+
//# sourceMappingURL=job-audit.status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-audit.status.js","sourceRoot":"","sources":["../../../src/workers/types/job-audit.status.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,2CAAyB,CAAA;IACzB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volontariapp/database",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0-snap-e1b3270",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"db:down": "docker-compose -f ../../docker-compose.test.yml down"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@volontariapp/bridge": "1.0.2
|
|
44
|
-
"@volontariapp/config": "3.1.0
|
|
43
|
+
"@volontariapp/bridge": "1.0.2",
|
|
44
|
+
"@volontariapp/config": "3.1.0",
|
|
45
45
|
"@volontariapp/errors": "0.5.1",
|
|
46
46
|
"@volontariapp/logger": "0.2.4",
|
|
47
47
|
"@volontariapp/shared": "0.4.0",
|