@nest-boot/bullmq-mikro-orm 7.2.0 → 8.0.0-beta.0
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/dist/bullmq-mikro-orm-module-options.interface.d.ts +2 -2
- package/dist/bullmq-mikro-orm-module-options.interface.js +1 -2
- package/dist/bullmq-mikro-orm.module-definition.d.ts +2 -2
- package/dist/bullmq-mikro-orm.module-definition.js +3 -7
- package/dist/bullmq-mikro-orm.module-definition.js.map +1 -1
- package/dist/bullmq-mikro-orm.module.d.ts +3 -3
- package/dist/bullmq-mikro-orm.module.js +11 -14
- package/dist/bullmq-mikro-orm.module.js.map +1 -1
- package/dist/bullmq-mikro-orm.service.d.ts +5 -5
- package/dist/bullmq-mikro-orm.service.js +27 -27
- package/dist/bullmq-mikro-orm.service.js.map +1 -1
- package/dist/entities/job.entity.d.ts +2 -2
- package/dist/entities/job.entity.js +51 -32
- package/dist/entities/job.entity.js.map +1 -1
- package/dist/enums/job-status.enum.js +2 -5
- package/dist/enums/job-status.enum.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -20
- package/dist/index.js.map +1 -1
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.d.ts +1 -1
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.js +10 -13
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.js.map +1 -1
- package/dist/utils/should-include-queue.util.js +1 -4
- package/dist/utils/should-include-queue.util.js.map +1 -1
- package/package.json +29 -30
- package/dist/bullmq-mikro-orm.module.spec.d.ts +0 -1
- package/dist/bullmq-mikro-orm.module.spec.js +0 -38
- package/dist/bullmq-mikro-orm.module.spec.js.map +0 -1
- package/dist/bullmq-mikro-orm.service.spec.d.ts +0 -1
- package/dist/bullmq-mikro-orm.service.spec.js +0 -199
- package/dist/bullmq-mikro-orm.service.spec.js.map +0 -1
- package/dist/entities/job.entity.spec.d.ts +0 -1
- package/dist/entities/job.entity.spec.js +0 -42
- package/dist/entities/job.entity.spec.js.map +0 -1
- package/dist/index.spec.d.ts +0 -1
- package/dist/index.spec.js +0 -47
- package/dist/index.spec.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.spec.d.ts +0 -1
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.spec.js +0 -22
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.spec.js.map +0 -1
- package/dist/utils/should-include-queue.util.spec.d.ts +0 -1
- package/dist/utils/should-include-queue.util.spec.js +0 -62
- package/dist/utils/should-include-queue.util.spec.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const job_status_enum_1 = require("../enums/job-status.enum");
|
|
4
|
-
const convert_bullmq_job_state_to_job_status_util_1 = require("./convert-bullmq-job-state-to-job-status.util");
|
|
5
|
-
describe("convertBullmqJobStateToJobStatus", () => {
|
|
6
|
-
it.each([
|
|
7
|
-
["active", job_status_enum_1.JobStatus.ACTIVE],
|
|
8
|
-
["completed", job_status_enum_1.JobStatus.COMPLETED],
|
|
9
|
-
["delayed", job_status_enum_1.JobStatus.DELAYED],
|
|
10
|
-
["failed", job_status_enum_1.JobStatus.FAILED],
|
|
11
|
-
["prioritized", job_status_enum_1.JobStatus.PRIORITIZED],
|
|
12
|
-
["waiting", job_status_enum_1.JobStatus.WAITING],
|
|
13
|
-
["waiting-children", job_status_enum_1.JobStatus.WAITING_CHILDREN],
|
|
14
|
-
["unknown", job_status_enum_1.JobStatus.UNKNOWN],
|
|
15
|
-
])("should convert %s to %s", (state, status) => {
|
|
16
|
-
expect((0, convert_bullmq_job_state_to_job_status_util_1.convertBullmqJobStateToJobStatus)(state)).toBe(status);
|
|
17
|
-
});
|
|
18
|
-
it("should convert unsupported states to unknown", () => {
|
|
19
|
-
expect((0, convert_bullmq_job_state_to_job_status_util_1.convertBullmqJobStateToJobStatus)("paused")).toBe(job_status_enum_1.JobStatus.UNKNOWN);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=convert-bullmq-job-state-to-job-status.util.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-bullmq-job-state-to-job-status.util.spec.js","sourceRoot":"","sources":["../../src/utils/convert-bullmq-job-state-to-job-status.util.spec.ts"],"names":[],"mappings":";;AAAA,8DAAqD;AACrD,+GAAiG;AAEjG,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAChD,EAAE,CAAC,IAAI,CAAC;QACN,CAAC,QAAQ,EAAE,2BAAS,CAAC,MAAM,CAAC;QAC5B,CAAC,WAAW,EAAE,2BAAS,CAAC,SAAS,CAAC;QAClC,CAAC,SAAS,EAAE,2BAAS,CAAC,OAAO,CAAC;QAC9B,CAAC,QAAQ,EAAE,2BAAS,CAAC,MAAM,CAAC;QAC5B,CAAC,aAAa,EAAE,2BAAS,CAAC,WAAW,CAAC;QACtC,CAAC,SAAS,EAAE,2BAAS,CAAC,OAAO,CAAC;QAC9B,CAAC,kBAAkB,EAAE,2BAAS,CAAC,gBAAgB,CAAC;QAChD,CAAC,SAAS,EAAE,2BAAS,CAAC,OAAO,CAAC;KACtB,CAAC,CAAC,yBAAyB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACvD,MAAM,CAAC,IAAA,8EAAgC,EAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,IAAA,8EAAgC,EAAC,QAAiB,CAAC,CAAC,CAAC,IAAI,CAC9D,2BAAS,CAAC,OAAO,CAClB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const should_include_queue_util_1 = require("./should-include-queue.util");
|
|
4
|
-
describe("shouldIncludeQueue", () => {
|
|
5
|
-
describe("when no filters are set", () => {
|
|
6
|
-
it("should include all queues", () => {
|
|
7
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("any-queue", [], [])).toBe(true);
|
|
8
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("test-queue", [], [])).toBe(true);
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
describe("when only excludeQueues is set", () => {
|
|
12
|
-
const excludeQueues = ["debug-queue", "test-queue"];
|
|
13
|
-
it("should exclude queues in the list", () => {
|
|
14
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("debug-queue", [], excludeQueues)).toBe(false);
|
|
15
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("test-queue", [], excludeQueues)).toBe(false);
|
|
16
|
-
});
|
|
17
|
-
it("should include queues not in the list", () => {
|
|
18
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("production-queue", [], excludeQueues)).toBe(true);
|
|
19
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("email-queue", [], excludeQueues)).toBe(true);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
describe("when only includeQueues is set", () => {
|
|
23
|
-
const includeQueues = ["email-queue", "notification-queue"];
|
|
24
|
-
it("should include queues in the list", () => {
|
|
25
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("email-queue", includeQueues, [])).toBe(true);
|
|
26
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("notification-queue", includeQueues, [])).toBe(true);
|
|
27
|
-
});
|
|
28
|
-
it("should exclude queues not in the list", () => {
|
|
29
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("debug-queue", includeQueues, [])).toBe(false);
|
|
30
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("other-queue", includeQueues, [])).toBe(false);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
describe("when both includeQueues and excludeQueues are set", () => {
|
|
34
|
-
const includeQueues = ["email-queue", "notification-queue", "debug-queue"];
|
|
35
|
-
const excludeQueues = ["debug-queue"];
|
|
36
|
-
it("excludeQueues should take priority over includeQueues", () => {
|
|
37
|
-
// debug-queue is in includeQueues but also in excludeQueues
|
|
38
|
-
// it should be excluded
|
|
39
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("debug-queue", includeQueues, excludeQueues)).toBe(false);
|
|
40
|
-
});
|
|
41
|
-
it("should include queues in includeQueues but not in excludeQueues", () => {
|
|
42
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("email-queue", includeQueues, excludeQueues)).toBe(true);
|
|
43
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("notification-queue", includeQueues, excludeQueues)).toBe(true);
|
|
44
|
-
});
|
|
45
|
-
it("should exclude queues not in includeQueues", () => {
|
|
46
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("other-queue", includeQueues, excludeQueues)).toBe(false);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
describe("edge cases", () => {
|
|
50
|
-
it("should handle empty string queue names", () => {
|
|
51
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("", [], [])).toBe(true);
|
|
52
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("", [""], [])).toBe(true);
|
|
53
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("", [], [""])).toBe(false);
|
|
54
|
-
});
|
|
55
|
-
it("should be case-sensitive", () => {
|
|
56
|
-
const includeQueues = ["Email-Queue"];
|
|
57
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("email-queue", includeQueues, [])).toBe(false);
|
|
58
|
-
expect((0, should_include_queue_util_1.shouldIncludeQueue)("Email-Queue", includeQueues, [])).toBe(true);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=should-include-queue.util.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"should-include-queue.util.spec.js","sourceRoot":"","sources":["../../src/utils/should-include-queue.util.spec.ts"],"names":[],"mappings":";;AAAA,2EAAiE;AAEjE,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACvC,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;YACnC,MAAM,CAAC,IAAA,8CAAkB,EAAC,WAAW,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3D,MAAM,CAAC,IAAA,8CAAkB,EAAC,YAAY,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;QAC9C,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QAEpD,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;YAC3C,MAAM,CAAC,IAAA,8CAAkB,EAAC,aAAa,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzE,MAAM,CAAC,IAAA,8CAAkB,EAAC,YAAY,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;YAC/C,MAAM,CAAC,IAAA,8CAAkB,EAAC,kBAAkB,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,CACpE,IAAI,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