@nest-boot/schedule 7.3.8 → 8.0.0-beta.1
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/index.d.ts +5 -5
- package/dist/index.js +5 -21
- package/dist/index.js.map +1 -1
- package/dist/schedule-module-options.interface.d.ts +0 -10
- package/dist/schedule-module-options.interface.js +1 -2
- package/dist/schedule-options.interface.d.ts +0 -4
- package/dist/schedule-options.interface.js +1 -2
- package/dist/schedule.decorator.d.ts +1 -18
- package/dist/schedule.decorator.js +6 -29
- package/dist/schedule.decorator.js.map +1 -1
- package/dist/schedule.module-definition.d.ts +1 -1
- package/dist/schedule.module-definition.js +7 -11
- package/dist/schedule.module-definition.js.map +1 -1
- package/dist/schedule.module.d.ts +1 -18
- package/dist/schedule.module.js +20 -40
- package/dist/schedule.module.js.map +1 -1
- package/dist/schedule.processor.d.ts +2 -3
- package/dist/schedule.processor.js +14 -16
- package/dist/schedule.processor.js.map +1 -1
- package/dist/schedule.registry.d.ts +1 -30
- package/dist/schedule.registry.js +19 -45
- package/dist/schedule.registry.js.map +1 -1
- package/package.json +35 -27
- package/dist/index.spec.d.ts +0 -0
- package/dist/index.spec.js +0 -45
- package/dist/index.spec.js.map +0 -1
- package/dist/schedule.decorator.spec.d.ts +0 -1
- package/dist/schedule.decorator.spec.js +0 -108
- package/dist/schedule.decorator.spec.js.map +0 -1
- package/dist/schedule.module.spec.d.ts +0 -1
- package/dist/schedule.module.spec.js +0 -91
- package/dist/schedule.module.spec.js.map +0 -1
- package/dist/schedule.processor.spec.d.ts +0 -1
- package/dist/schedule.processor.spec.js +0 -197
- package/dist/schedule.processor.spec.js.map +0 -1
- package/dist/schedule.registry.spec.d.ts +0 -1
- package/dist/schedule.registry.spec.js +0 -233
- package/dist/schedule.registry.spec.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nest-boot/schedule",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-beta.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/nest-boot/nest-boot.git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "",
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"main": "dist/index.js",
|
|
18
|
-
"types": "dist/index.d.ts",
|
|
17
|
+
"main": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
19
|
"directories": {
|
|
20
20
|
"lib": "dist"
|
|
21
21
|
},
|
|
@@ -24,34 +24,34 @@
|
|
|
24
24
|
"templates"
|
|
25
25
|
],
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@nestjs/bullmq": "^
|
|
28
|
-
"@nestjs/common": "^
|
|
29
|
-
"@nestjs/core": "^
|
|
30
|
-
"@nestjs/testing": "^
|
|
31
|
-
"@types/jest": "^29.5.14",
|
|
27
|
+
"@nestjs/bullmq": "^12.0.0",
|
|
28
|
+
"@nestjs/common": "^12.0.1",
|
|
29
|
+
"@nestjs/core": "^12.0.1",
|
|
30
|
+
"@nestjs/testing": "^12.0.1",
|
|
32
31
|
"@types/ms": "^0.7.31",
|
|
33
|
-
"@types/node": "^
|
|
32
|
+
"@types/node": "^26.0.0",
|
|
33
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
34
34
|
"bullmq": "^5.61.0",
|
|
35
35
|
"dotenv": "^17.2.3",
|
|
36
36
|
"eslint": "^9.39.3",
|
|
37
|
-
"jest": "^29.7.0",
|
|
38
37
|
"reflect-metadata": "^0.2.2",
|
|
39
38
|
"rxjs": "^7.8.2",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"@nest-boot/
|
|
44
|
-
"@nest-boot/eslint-
|
|
45
|
-
"@nest-boot/
|
|
39
|
+
"typescript": "^6.0.3",
|
|
40
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
41
|
+
"vitest": "^4.1.11",
|
|
42
|
+
"@nest-boot/bullmq": "^8.0.0-beta.1",
|
|
43
|
+
"@nest-boot/eslint-config": "^8.0.0-beta.1",
|
|
44
|
+
"@nest-boot/eslint-plugin": "^8.0.0-beta.1",
|
|
45
|
+
"@nest-boot/tsconfig": "^8.0.0-beta.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@
|
|
49
|
-
"@nestjs/
|
|
50
|
-
"@nestjs/
|
|
51
|
-
"@nestjs/core": "^11.0.0",
|
|
48
|
+
"@nestjs/bullmq": "^12.0.0",
|
|
49
|
+
"@nestjs/common": "^12.0.0",
|
|
50
|
+
"@nestjs/core": "^12.0.0",
|
|
52
51
|
"bullmq": "^5.0.0",
|
|
53
52
|
"reflect-metadata": "^0.2.2",
|
|
54
|
-
"rxjs": "^7.0.0"
|
|
53
|
+
"rxjs": "^7.0.0",
|
|
54
|
+
"@nest-boot/bullmq": "^8.0.0-beta.1"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
@@ -62,8 +62,16 @@
|
|
|
62
62
|
"eslint --fix"
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
|
-
"
|
|
66
|
-
|
|
65
|
+
"type": "module",
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=26.0.0"
|
|
68
|
+
},
|
|
69
|
+
"exports": {
|
|
70
|
+
".": {
|
|
71
|
+
"types": "./dist/index.d.ts",
|
|
72
|
+
"import": "./dist/index.js"
|
|
73
|
+
},
|
|
74
|
+
"./package.json": "./package.json"
|
|
67
75
|
},
|
|
68
76
|
"scripts": {
|
|
69
77
|
"build": "tsc -p tsconfig.build.json",
|
|
@@ -71,9 +79,9 @@
|
|
|
71
79
|
"dev": "tsc -w -p tsconfig.build.json",
|
|
72
80
|
"lint": "eslint \"{src,test}/**/*.ts\"",
|
|
73
81
|
"lint:fix": "eslint \"{src,test}/**/*.ts\" --fix",
|
|
74
|
-
"test": "
|
|
75
|
-
"test:cov": "
|
|
76
|
-
"test:watch": "
|
|
77
|
-
"test:debug": "
|
|
82
|
+
"test": "vitest run",
|
|
83
|
+
"test:cov": "vitest run --coverage",
|
|
84
|
+
"test:watch": "vitest",
|
|
85
|
+
"test:debug": "vitest --inspect-brk --no-file-parallelism"
|
|
78
86
|
}
|
|
79
87
|
}
|
package/dist/index.spec.d.ts
DELETED
|
File without changes
|
package/dist/index.spec.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
describe("public API", () => {
|
|
36
|
-
it("should export schedule module APIs", async () => {
|
|
37
|
-
const api = await Promise.resolve().then(() => __importStar(require(".")));
|
|
38
|
-
expect(api.ScheduleModule).toBeDefined();
|
|
39
|
-
expect(api.ScheduleRegistry).toBeDefined();
|
|
40
|
-
expect(api.Schedule).toBeDefined();
|
|
41
|
-
expect(api.Cron).toBeDefined();
|
|
42
|
-
expect(api.Interval).toBeDefined();
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=index.spec.js.map
|
package/dist/index.spec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,GAAG,GAAG,wDAAa,GAAG,GAAC,CAAC;QAE9B,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE,CAAC;QACzC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC;QAC3C,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QAC/B,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "reflect-metadata";
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
require("reflect-metadata");
|
|
13
|
-
const schedule_decorator_1 = require("./schedule.decorator");
|
|
14
|
-
const schedule_module_definition_1 = require("./schedule.module-definition");
|
|
15
|
-
function getMethod(prototype, name) {
|
|
16
|
-
return Object.getOwnPropertyDescriptor(prototype, name)?.value;
|
|
17
|
-
}
|
|
18
|
-
describe("schedule decorators", () => {
|
|
19
|
-
class ExampleSchedules {
|
|
20
|
-
explicit() {
|
|
21
|
-
return undefined;
|
|
22
|
-
}
|
|
23
|
-
cron() {
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
interval() {
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, schedule_decorator_1.Schedule)({
|
|
32
|
-
type: "cron",
|
|
33
|
-
value: "0 1 * * *",
|
|
34
|
-
timezone: "Asia/Shanghai",
|
|
35
|
-
}),
|
|
36
|
-
__metadata("design:type", Function),
|
|
37
|
-
__metadata("design:paramtypes", []),
|
|
38
|
-
__metadata("design:returntype", void 0)
|
|
39
|
-
], ExampleSchedules.prototype, "explicit", null);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, schedule_decorator_1.Cron)("* * * * *", {
|
|
42
|
-
attempts: 2,
|
|
43
|
-
timezone: "UTC",
|
|
44
|
-
}),
|
|
45
|
-
__metadata("design:type", Function),
|
|
46
|
-
__metadata("design:paramtypes", []),
|
|
47
|
-
__metadata("design:returntype", void 0)
|
|
48
|
-
], ExampleSchedules.prototype, "cron", null);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, schedule_decorator_1.Interval)("5000", {
|
|
51
|
-
removeOnComplete: true,
|
|
52
|
-
}),
|
|
53
|
-
__metadata("design:type", Function),
|
|
54
|
-
__metadata("design:paramtypes", []),
|
|
55
|
-
__metadata("design:returntype", void 0)
|
|
56
|
-
], ExampleSchedules.prototype, "interval", null);
|
|
57
|
-
it("should attach explicit schedule metadata", () => {
|
|
58
|
-
expect(Reflect.getMetadata(schedule_module_definition_1.SCHEDULE_METADATA_KEY, getMethod(ExampleSchedules.prototype, "explicit"))).toEqual({
|
|
59
|
-
type: "cron",
|
|
60
|
-
value: "0 1 * * *",
|
|
61
|
-
timezone: "Asia/Shanghai",
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
it("should build cron and interval metadata with optional job options", () => {
|
|
65
|
-
expect(Reflect.getMetadata(schedule_module_definition_1.SCHEDULE_METADATA_KEY, getMethod(ExampleSchedules.prototype, "cron"))).toEqual({
|
|
66
|
-
attempts: 2,
|
|
67
|
-
timezone: "UTC",
|
|
68
|
-
type: "cron",
|
|
69
|
-
value: "* * * * *",
|
|
70
|
-
});
|
|
71
|
-
expect(Reflect.getMetadata(schedule_module_definition_1.SCHEDULE_METADATA_KEY, getMethod(ExampleSchedules.prototype, "interval"))).toEqual({
|
|
72
|
-
removeOnComplete: true,
|
|
73
|
-
type: "interval",
|
|
74
|
-
value: "5000",
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
it("should default omitted decorator options to an empty object", () => {
|
|
78
|
-
class Defaults {
|
|
79
|
-
cron() {
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
82
|
-
interval() {
|
|
83
|
-
return undefined;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, schedule_decorator_1.Cron)("0 * * * *"),
|
|
88
|
-
__metadata("design:type", Function),
|
|
89
|
-
__metadata("design:paramtypes", []),
|
|
90
|
-
__metadata("design:returntype", void 0)
|
|
91
|
-
], Defaults.prototype, "cron", null);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, schedule_decorator_1.Interval)(1000),
|
|
94
|
-
__metadata("design:type", Function),
|
|
95
|
-
__metadata("design:paramtypes", []),
|
|
96
|
-
__metadata("design:returntype", void 0)
|
|
97
|
-
], Defaults.prototype, "interval", null);
|
|
98
|
-
expect(Reflect.getMetadata(schedule_module_definition_1.SCHEDULE_METADATA_KEY, getMethod(Defaults.prototype, "cron"))).toEqual({
|
|
99
|
-
type: "cron",
|
|
100
|
-
value: "0 * * * *",
|
|
101
|
-
});
|
|
102
|
-
expect(Reflect.getMetadata(schedule_module_definition_1.SCHEDULE_METADATA_KEY, getMethod(Defaults.prototype, "interval"))).toEqual({
|
|
103
|
-
type: "interval",
|
|
104
|
-
value: 1000,
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
//# sourceMappingURL=schedule.decorator.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.decorator.spec.js","sourceRoot":"","sources":["../src/schedule.decorator.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4BAA0B;AAE1B,6DAAgE;AAChE,6EAAqE;AAErE,SAAS,SAAS,CAAC,SAAiB,EAAE,IAAY;IAChD,OAAO,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,KA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gBAAgB,CAAC,SAAS,EAAE,UAAU,CAAC,CAClD,CACF,CAAC,OAAO,CAAC;YACR,gBAAgB,EAAE,IAAI;YACtB,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACrE,MAAM,QAAQ;YAEZ,IAAI;gBACF,OAAO,SAAS,CAAC;YACnB,CAAC;YAGD,QAAQ;gBACN,OAAO,SAAS,CAAC;YACnB,CAAC;SACF;QARC;YADC,IAAA,yBAAI,EAAC,WAAW,CAAC;;;;4CAGjB;QAGD;YADC,IAAA,6BAAQ,EAAC,IAAI,CAAC;;;;gDAGd;QAGH,MAAM,CACJ,OAAO,CAAC,WAAW,CACjB,kDAAqB,EACrB,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CACtC,CACF,CAAC,OAAO,CAAC;YACR,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,WAAW;SACnB,CAAC,CAAC;QACH,MAAM,CACJ,OAAO,CAAC,WAAW,CACjB,kDAAqB,EACrB,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAC1C,CACF,CAAC,OAAO,CAAC;YACR,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const common_1 = require("@nestjs/common");
|
|
4
|
-
const constants_1 = require("@nestjs/common/constants");
|
|
5
|
-
const core_1 = require("@nestjs/core");
|
|
6
|
-
let mockRegisterQueueAsyncOptions;
|
|
7
|
-
const mockQueueModule = {
|
|
8
|
-
module: class QueueModule {
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
const mockRegisterQueueAsync = jest.fn((options) => {
|
|
12
|
-
mockRegisterQueueAsyncOptions = options;
|
|
13
|
-
return mockQueueModule;
|
|
14
|
-
});
|
|
15
|
-
const mockProcessorDecorator = jest.fn();
|
|
16
|
-
const mockProcessor = jest.fn(() => mockProcessorDecorator);
|
|
17
|
-
jest.mock("@nest-boot/bullmq", () => ({
|
|
18
|
-
BullModule: {
|
|
19
|
-
registerQueueAsync: mockRegisterQueueAsync,
|
|
20
|
-
},
|
|
21
|
-
InjectQueue: jest.fn(() => jest.fn()),
|
|
22
|
-
Processor: mockProcessor,
|
|
23
|
-
WorkerHost: class WorkerHost {
|
|
24
|
-
constructor() {
|
|
25
|
-
this.worker = {
|
|
26
|
-
concurrency: 1,
|
|
27
|
-
run: jest.fn().mockResolvedValue(undefined),
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
}));
|
|
32
|
-
const schedule_module_1 = require("./schedule.module");
|
|
33
|
-
const schedule_module_definition_1 = require("./schedule.module-definition");
|
|
34
|
-
const schedule_processor_1 = require("./schedule.processor");
|
|
35
|
-
const schedule_registry_1 = require("./schedule.registry");
|
|
36
|
-
describe("ScheduleModule", () => {
|
|
37
|
-
beforeEach(() => {
|
|
38
|
-
jest.clearAllMocks();
|
|
39
|
-
});
|
|
40
|
-
it("should expose configurable root registrations", () => {
|
|
41
|
-
const options = {
|
|
42
|
-
concurrency: 3,
|
|
43
|
-
};
|
|
44
|
-
const useFactory = () => options;
|
|
45
|
-
const dynamicModule = schedule_module_1.ScheduleModule.forRoot(options);
|
|
46
|
-
const asyncModule = schedule_module_1.ScheduleModule.forRootAsync({
|
|
47
|
-
useFactory,
|
|
48
|
-
});
|
|
49
|
-
expect(dynamicModule.module).toBe(schedule_module_1.ScheduleModule);
|
|
50
|
-
expect(dynamicModule.providers).toEqual(expect.arrayContaining([
|
|
51
|
-
{
|
|
52
|
-
provide: schedule_module_definition_1.BASE_MODULE_OPTIONS_TOKEN,
|
|
53
|
-
useValue: options,
|
|
54
|
-
},
|
|
55
|
-
]));
|
|
56
|
-
expect(asyncModule.providers).toEqual(expect.arrayContaining([
|
|
57
|
-
{
|
|
58
|
-
inject: [],
|
|
59
|
-
provide: schedule_module_definition_1.BASE_MODULE_OPTIONS_TOKEN,
|
|
60
|
-
useFactory,
|
|
61
|
-
},
|
|
62
|
-
]));
|
|
63
|
-
});
|
|
64
|
-
it("should provide options, queue registration, and schedule services", () => {
|
|
65
|
-
const imports = Reflect.getMetadata(constants_1.MODULE_METADATA.IMPORTS, schedule_module_1.ScheduleModule);
|
|
66
|
-
const providers = Reflect.getMetadata(constants_1.MODULE_METADATA.PROVIDERS, schedule_module_1.ScheduleModule);
|
|
67
|
-
const exports = Reflect.getMetadata(constants_1.MODULE_METADATA.EXPORTS, schedule_module_1.ScheduleModule);
|
|
68
|
-
const optionsProvider = providers.find((provider) => provider.provide === schedule_module_definition_1.MODULE_OPTIONS_TOKEN);
|
|
69
|
-
expect(imports).toEqual([core_1.DiscoveryModule, mockQueueModule]);
|
|
70
|
-
expect(providers).toEqual(expect.arrayContaining([common_1.Logger, schedule_registry_1.ScheduleRegistry, schedule_processor_1.ScheduleProcessor]));
|
|
71
|
-
expect(exports).toEqual([schedule_module_definition_1.MODULE_OPTIONS_TOKEN]);
|
|
72
|
-
expect(optionsProvider.useFactory(undefined)).toEqual({});
|
|
73
|
-
expect(optionsProvider.useFactory({
|
|
74
|
-
autorun: false,
|
|
75
|
-
})).toEqual({
|
|
76
|
-
autorun: false,
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
it("should register the schedule queue from module options", () => {
|
|
80
|
-
expect(mockRegisterQueueAsyncOptions).toEqual(expect.objectContaining({
|
|
81
|
-
inject: [schedule_module_definition_1.MODULE_OPTIONS_TOKEN],
|
|
82
|
-
name: "schedule",
|
|
83
|
-
}));
|
|
84
|
-
expect(mockRegisterQueueAsyncOptions.useFactory({
|
|
85
|
-
concurrency: 2,
|
|
86
|
-
})).toEqual({
|
|
87
|
-
concurrency: 2,
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
//# sourceMappingURL=schedule.module.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.module.spec.js","sourceRoot":"","sources":["../src/schedule.module.spec.ts"],"names":[],"mappings":";;AAAA,2CAAwC;AACxC,wDAA2D;AAC3D,uCAA+C;AAE/C,IAAI,6BAAkC,CAAC;AACvC,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,MAAM,WAAW;KAAG;CAC7B,CAAC;AACF,MAAM,sBAAsB,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE;IACjD,6BAA6B,GAAG,OAAO,CAAC;IACxC,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC,CAAC;AACH,MAAM,sBAAsB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AACzC,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,CAAC;AAE5D,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC;IACpC,UAAU,EAAE;QACV,kBAAkB,EAAE,sBAAsB;KAC3C;IACD,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;IACrC,SAAS,EAAE,aAAa;IACxB,UAAU,EAAE,MAAM,UAAU;QAAhB;YACV,WAAM,GAAG;gBACP,WAAW,EAAE,CAAC;gBACd,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;aAC5C,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC,CAAC;AAEJ,uDAAmD;AACnD,6EAGsC;AACtC,6DAAyD;AACzD,2DAAuD;AAEvD,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAA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EAAE,CAAC,QAAQ,CAAC,OAAO,KAAK,iDAAoB,CAC7D,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,sBAAe,EAAE,eAAe,CAAC,CAAC,CAAC;QAC5D,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CACvB,MAAM,CAAC,eAAe,CAAC,CAAC,eAAM,EAAE,oCAAgB,EAAE,sCAAiB,CAAC,CAAC,CACtE,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,iDAAoB,CAAC,CAAC,CAAC;QAChD,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC1D,MAAM,CACJ,eAAe,CAAC,UAAU,CAAC;YACzB,OAAO,EAAE,KAAK;SACf,CAAC,CACH,CAAC,OAAO,CAAC;YACR,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAChE,MAAM,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAC3C,MAAM,CAAC,gBAAgB,CAAC;YACtB,MAAM,EAAE,CAAC,iDAAoB,CAAC;YAC9B,IAAI,EAAE,UAAU;SACjB,CAAC,CACH,CAAC;QACF,MAAM,CACJ,6BAA6B,CAAC,UAAU,CAAC;YACvC,WAAW,EAAE,CAAC;SACf,CAAC,CACH,CAAC,OAAO,CAAC;YACR,WAAW,EAAE,CAAC;SACf,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const mockProcessorDecorator = jest.fn();
|
|
37
|
-
const mockProcessor = jest.fn(() => mockProcessorDecorator);
|
|
38
|
-
jest.mock("@nest-boot/bullmq", () => ({
|
|
39
|
-
InjectQueue: jest.fn(() => jest.fn()),
|
|
40
|
-
Processor: mockProcessor,
|
|
41
|
-
WorkerHost: class WorkerHost {
|
|
42
|
-
constructor() {
|
|
43
|
-
this.worker = {
|
|
44
|
-
concurrency: 1,
|
|
45
|
-
run: jest.fn().mockResolvedValue(undefined),
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
}));
|
|
50
|
-
const common_1 = require("@nestjs/common");
|
|
51
|
-
const testing_1 = require("@nestjs/testing");
|
|
52
|
-
const schedule_module_definition_1 = require("./schedule.module-definition");
|
|
53
|
-
const schedule_processor_1 = require("./schedule.processor");
|
|
54
|
-
const schedule_registry_1 = require("./schedule.registry");
|
|
55
|
-
describe("ScheduleProcessor", () => {
|
|
56
|
-
const createRegistry = (entry) => {
|
|
57
|
-
const get = jest.fn(() => entry);
|
|
58
|
-
return {
|
|
59
|
-
get,
|
|
60
|
-
registry: {
|
|
61
|
-
get,
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
afterEach(() => {
|
|
66
|
-
jest.restoreAllMocks();
|
|
67
|
-
});
|
|
68
|
-
it("should apply the schedule processor decorator", () => {
|
|
69
|
-
expect(mockProcessor).toHaveBeenCalledWith("schedule", {
|
|
70
|
-
autorun: false,
|
|
71
|
-
});
|
|
72
|
-
expect(mockProcessorDecorator).toHaveBeenCalledWith(schedule_processor_1.ScheduleProcessor);
|
|
73
|
-
});
|
|
74
|
-
it("should invoke the registered schedule handler for the job name", async () => {
|
|
75
|
-
const handler = jest.fn().mockResolvedValue(undefined);
|
|
76
|
-
const { get, registry } = createRegistry({
|
|
77
|
-
handler,
|
|
78
|
-
options: {
|
|
79
|
-
type: "cron",
|
|
80
|
-
value: "* * * * *",
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
const processor = await createProcessor(registry);
|
|
84
|
-
await processor.process({
|
|
85
|
-
name: "Tasks.run",
|
|
86
|
-
});
|
|
87
|
-
expect(get).toHaveBeenCalledWith("Tasks.run");
|
|
88
|
-
expect(handler).toHaveBeenCalledTimes(1);
|
|
89
|
-
});
|
|
90
|
-
it("should ignore jobs with no registered handler", async () => {
|
|
91
|
-
const { get, registry } = createRegistry();
|
|
92
|
-
const processor = await createProcessor(registry);
|
|
93
|
-
await expect(processor.process({
|
|
94
|
-
name: "Missing.run",
|
|
95
|
-
})).resolves.toBeUndefined();
|
|
96
|
-
expect(get).toHaveBeenCalledWith("Missing.run");
|
|
97
|
-
});
|
|
98
|
-
it("should configure concurrency and start the worker by default", async () => {
|
|
99
|
-
const processor = await createProcessor(createRegistry().registry, {
|
|
100
|
-
concurrency: 4,
|
|
101
|
-
});
|
|
102
|
-
processor.onApplicationBootstrap();
|
|
103
|
-
expect(processor.worker.concurrency).toBe(4);
|
|
104
|
-
expect(processor.worker.run).toHaveBeenCalledTimes(1);
|
|
105
|
-
});
|
|
106
|
-
it("should skip autorun when disabled", async () => {
|
|
107
|
-
const processor = await createProcessor(createRegistry().registry, {
|
|
108
|
-
autorun: false,
|
|
109
|
-
});
|
|
110
|
-
processor.onApplicationBootstrap();
|
|
111
|
-
expect(processor.worker.concurrency).toBe(1);
|
|
112
|
-
expect(processor.worker.run).not.toHaveBeenCalled();
|
|
113
|
-
});
|
|
114
|
-
it("should log worker run errors", async () => {
|
|
115
|
-
const loggerError = jest
|
|
116
|
-
.spyOn(common_1.Logger.prototype, "error")
|
|
117
|
-
.mockImplementation(jest.fn());
|
|
118
|
-
const processor = await createProcessor(createRegistry().registry);
|
|
119
|
-
const error = new Error("Redis unavailable");
|
|
120
|
-
processor.worker.run.mockRejectedValueOnce(error);
|
|
121
|
-
processor.onApplicationBootstrap();
|
|
122
|
-
await Promise.resolve();
|
|
123
|
-
expect(processor.worker.run).toHaveBeenCalledTimes(1);
|
|
124
|
-
expect(loggerError).toHaveBeenCalledWith("Schedule worker stopped unexpectedly: Redis unavailable", error.stack);
|
|
125
|
-
});
|
|
126
|
-
it("should stringify non-error worker run rejections", async () => {
|
|
127
|
-
const loggerError = jest
|
|
128
|
-
.spyOn(common_1.Logger.prototype, "error")
|
|
129
|
-
.mockImplementation(jest.fn());
|
|
130
|
-
const processor = await createProcessor(createRegistry().registry);
|
|
131
|
-
processor.worker.run.mockRejectedValueOnce("connection closed");
|
|
132
|
-
processor.onApplicationBootstrap();
|
|
133
|
-
await Promise.resolve();
|
|
134
|
-
expect(loggerError).toHaveBeenCalledWith("Schedule worker stopped unexpectedly: connection closed", undefined);
|
|
135
|
-
});
|
|
136
|
-
it("should load decorator metadata fallback branches", async () => {
|
|
137
|
-
await jest.isolateModulesAsync(async () => {
|
|
138
|
-
jest.doMock("@nest-boot/bullmq", () => ({
|
|
139
|
-
InjectQueue: jest.fn(() => jest.fn()),
|
|
140
|
-
Processor: jest.fn(() => jest.fn()),
|
|
141
|
-
WorkerHost: class WorkerHost {
|
|
142
|
-
constructor() {
|
|
143
|
-
this.worker = {
|
|
144
|
-
concurrency: 1,
|
|
145
|
-
run: jest.fn().mockResolvedValue(undefined),
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
}));
|
|
150
|
-
jest.doMock("./schedule.registry", () => ({
|
|
151
|
-
ScheduleRegistry: undefined,
|
|
152
|
-
}));
|
|
153
|
-
const module = await Promise.resolve().then(() => __importStar(require("./schedule.processor")));
|
|
154
|
-
expect(module.ScheduleProcessor).toBeDefined();
|
|
155
|
-
});
|
|
156
|
-
await jest.isolateModulesAsync(async () => {
|
|
157
|
-
jest.doMock("@nest-boot/bullmq", () => ({
|
|
158
|
-
InjectQueue: jest.fn(() => jest.fn()),
|
|
159
|
-
Processor: jest.fn(() => jest.fn()),
|
|
160
|
-
WorkerHost: class WorkerHost {
|
|
161
|
-
constructor() {
|
|
162
|
-
this.worker = {
|
|
163
|
-
concurrency: 1,
|
|
164
|
-
run: jest.fn().mockResolvedValue(undefined),
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
}));
|
|
169
|
-
jest.doMock("./schedule-module-options.interface", () => ({
|
|
170
|
-
ScheduleModuleOptions: class ScheduleModuleOptions {
|
|
171
|
-
},
|
|
172
|
-
}));
|
|
173
|
-
const module = await Promise.resolve().then(() => __importStar(require("./schedule.processor")));
|
|
174
|
-
expect(module.ScheduleProcessor).toBeDefined();
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
async function createProcessor(registry, options) {
|
|
179
|
-
const providers = [
|
|
180
|
-
schedule_processor_1.ScheduleProcessor,
|
|
181
|
-
{
|
|
182
|
-
provide: schedule_registry_1.ScheduleRegistry,
|
|
183
|
-
useValue: registry,
|
|
184
|
-
},
|
|
185
|
-
];
|
|
186
|
-
if (typeof options !== "undefined") {
|
|
187
|
-
providers.push({
|
|
188
|
-
provide: schedule_module_definition_1.MODULE_OPTIONS_TOKEN,
|
|
189
|
-
useValue: options,
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
const moduleRef = await testing_1.Test.createTestingModule({
|
|
193
|
-
providers,
|
|
194
|
-
}).compile();
|
|
195
|
-
return moduleRef.get(schedule_processor_1.ScheduleProcessor);
|
|
196
|
-
}
|
|
197
|
-
//# sourceMappingURL=schedule.processor.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.processor.spec.js","sourceRoot":"","sources":["../src/schedule.processor.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AACzC,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,CAAC;AAE5D,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC;IACpC,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;IACrC,SAAS,EAAE,aAAa;IACxB,UAAU,EAAE,MAAM,UAAU;QAAhB;YACV,WAAM,GAAG;gBACP,WAAW,EAAE,CAAC;gBACd,GAAG,EAAE,IAAI,CAAC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