@midwayjs/cron 4.0.0-beta.7 → 4.0.0-beta.8
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/configuration.js +2 -0
- package/dist/decorator.js +2 -3
- package/dist/framework.js +3 -5
- package/package.json +4 -4
package/dist/configuration.js
CHANGED
|
@@ -14,6 +14,8 @@ const core_1 = require("@midwayjs/core");
|
|
|
14
14
|
const framework_1 = require("./framework");
|
|
15
15
|
const constants_1 = require("./constants");
|
|
16
16
|
let CronConfiguration = class CronConfiguration {
|
|
17
|
+
framework;
|
|
18
|
+
decoratorService;
|
|
17
19
|
async init() {
|
|
18
20
|
this.decoratorService.registerPropertyHandler(constants_1.CRON_JOB_KEY, (propertyName, meta) => {
|
|
19
21
|
return this.framework.getJob(meta.jobName);
|
package/dist/decorator.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Job = Job;
|
|
4
|
+
exports.InjectJob = InjectJob;
|
|
4
5
|
const core_1 = require("@midwayjs/core");
|
|
5
6
|
const constants_1 = require("./constants");
|
|
6
7
|
function Job(jobName, jobOptions) {
|
|
@@ -18,11 +19,9 @@ function Job(jobName, jobOptions) {
|
|
|
18
19
|
(0, core_1.Scope)(core_1.ScopeEnum.Request)(target);
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
|
-
exports.Job = Job;
|
|
22
22
|
function InjectJob(jobName) {
|
|
23
23
|
return core_1.DecoratorManager.createCustomPropertyDecorator(constants_1.CRON_JOB_KEY, {
|
|
24
24
|
jobName,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
exports.InjectJob = InjectJob;
|
|
28
27
|
//# sourceMappingURL=decorator.js.map
|
package/dist/framework.js
CHANGED
|
@@ -11,11 +11,9 @@ const core_1 = require("@midwayjs/core");
|
|
|
11
11
|
const cron_1 = require("cron");
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
13
|
let CronFramework = class CronFramework extends core_1.BaseFramework {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this.frameworkLoggerName = 'cronLogger';
|
|
18
|
-
}
|
|
14
|
+
defaultCronJobConfig;
|
|
15
|
+
jobs = new Map();
|
|
16
|
+
frameworkLoggerName = 'cronLogger';
|
|
19
17
|
async applicationInitialize(options) {
|
|
20
18
|
this.app = {};
|
|
21
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/cron",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.8",
|
|
4
4
|
"description": "Midway Component for Cron",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"cron": "3.5.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@midwayjs/core": "^4.0.0-beta.
|
|
33
|
-
"@midwayjs/mock": "^4.0.0-beta.
|
|
32
|
+
"@midwayjs/core": "^4.0.0-beta.8",
|
|
33
|
+
"@midwayjs/mock": "^4.0.0-beta.8"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "355e55949fdd132b0bdcb4830222a0a027e92ded"
|
|
36
36
|
}
|