@celljs/schedule 3.0.0 → 3.1.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/lib/node/annotation/cron.js +1 -1
- package/lib/node/annotation/cron.js.map +1 -1
- package/lib/node/annotation/index.js +3 -16
- package/lib/node/annotation/index.js.map +1 -1
- package/lib/node/annotation/scheduler.js +1 -1
- package/lib/node/annotation/scheduler.js.map +1 -1
- package/lib/node/application-lifecycle.js +16 -20
- package/lib/node/application-lifecycle.js.map +1 -1
- package/lib/node/error/index.js +2 -15
- package/lib/node/error/index.js.map +1 -1
- package/lib/node/factory/cron-job-factory.js +5 -13
- package/lib/node/factory/cron-job-factory.js.map +1 -1
- package/lib/node/factory/index.js +3 -16
- package/lib/node/factory/index.js.map +1 -1
- package/lib/node/index.js +8 -21
- package/lib/node/index.js.map +1 -1
- package/lib/node/registry/index.js +3 -16
- package/lib/node/registry/index.js.map +1 -1
- package/lib/node/registry/scheduler-registry.js +6 -14
- package/lib/node/registry/scheduler-registry.js.map +1 -1
- package/package.json +4 -4
|
@@ -10,7 +10,7 @@ function Cron(cronTime, options) {
|
|
|
10
10
|
exports.Cron = Cron;
|
|
11
11
|
function applyCronDecorator(target, targetKey, descriptor, cronTime, options) {
|
|
12
12
|
const metadatas = Reflect.getOwnMetadata(constants_1.METADATA_KEY.cron, target.constructor) || [];
|
|
13
|
-
metadatas.push(
|
|
13
|
+
metadatas.push({ ...options, cronTime, method: targetKey });
|
|
14
14
|
Reflect.defineMetadata(constants_1.METADATA_KEY.cron, metadatas, target.constructor);
|
|
15
15
|
}
|
|
16
16
|
exports.applyCronDecorator = applyCronDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron.js","sourceRoot":"","sources":["../../../src/node/annotation/cron.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAU5C,SAAgB,IAAI,CAAC,QAAuB,EAAE,OAAqB;IAC/D,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;QACf,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC,CAAC;AACN,CAAC;AAJD,oBAIC;AAED,SAAgB,kBAAkB,CAAC,MAAW,EAAE,SAA0B,EAAE,UAAwC,EAAE,QAAuB,EAAE,OAAqB;IAChK,MAAM,SAAS,GAAmB,OAAO,CAAC,cAAc,CAAC,wBAAY,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IACtG,SAAS,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"cron.js","sourceRoot":"","sources":["../../../src/node/annotation/cron.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAU5C,SAAgB,IAAI,CAAC,QAAuB,EAAE,OAAqB;IAC/D,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;QACf,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC,CAAC;AACN,CAAC;AAJD,oBAIC;AAED,SAAgB,kBAAkB,CAAC,MAAW,EAAE,SAA0B,EAAE,UAAwC,EAAE,QAAuB,EAAE,OAAqB;IAChK,MAAM,SAAS,GAAmB,OAAO,CAAC,cAAc,CAAC,wBAAY,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IACtG,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5D,OAAO,CAAC,cAAc,CAAC,wBAAY,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;AAC7E,CAAC;AAJD,gDAIC"}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./scheduler"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./cron"), exports);
|
|
19
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/annotation/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/annotation/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,iDAAuB"}
|
|
@@ -20,7 +20,7 @@ function parseCornJobOptionOption(target, componentOption) {
|
|
|
20
20
|
}
|
|
21
21
|
exports.parseCornJobOptionOption = parseCornJobOptionOption;
|
|
22
22
|
function applySchedulerDecorator(target, componentOptions, cronJobOptions) {
|
|
23
|
-
const metadata =
|
|
23
|
+
const metadata = { ...cronJobOptions };
|
|
24
24
|
Reflect.defineMetadata(constants_1.METADATA_KEY.scheduler, metadata, target);
|
|
25
25
|
(0, core_1.Component)(componentOptions)(target);
|
|
26
26
|
return metadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../../../src/node/annotation/scheduler.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAE5C,uCAA6F;AAEhF,QAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAEhC,QAAA,aAAa,GAAG,WAAW,CAAC;AAKzC,SAAgB,SAAS,CAAC,cAA+B,EAAE,gBAAkC;IACzF,OAAO,UAAU,MAAM;QACnB,MAAM,MAAM,GAAG,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAClE,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5D,CAAC,CAAC;AACN,CAAC;AALD,8BAKC;AAED,SAAgB,wBAAwB,CAAC,MAAW,EAAE,eAAiC;IACnF,MAAM,MAAM,GAAoB,IAAA,2BAAoB,EAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC9E,MAAM,CAAC,OAAQ,CAAC,IAAI,CAAC,qBAAa,CAAC,CAAC;IACnC,MAAM,CAAC,EAAyB,CAAC,IAAI,CAAC,iBAAS,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC;AAClB,CAAC;AALD,4DAKC;AAED,SAAgB,uBAAuB,CAAC,MAAW,EAAE,gBAAiC,EAAE,cAA+B;IACnH,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../../../src/node/annotation/scheduler.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAE5C,uCAA6F;AAEhF,QAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAEhC,QAAA,aAAa,GAAG,WAAW,CAAC;AAKzC,SAAgB,SAAS,CAAC,cAA+B,EAAE,gBAAkC;IACzF,OAAO,UAAU,MAAM;QACnB,MAAM,MAAM,GAAG,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAClE,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5D,CAAC,CAAC;AACN,CAAC;AALD,8BAKC;AAED,SAAgB,wBAAwB,CAAC,MAAW,EAAE,eAAiC;IACnF,MAAM,MAAM,GAAoB,IAAA,2BAAoB,EAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC9E,MAAM,CAAC,OAAQ,CAAC,IAAI,CAAC,qBAAa,CAAC,CAAC;IACnC,MAAM,CAAC,EAAyB,CAAC,IAAI,CAAC,iBAAS,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC;AAClB,CAAC;AALD,4DAKC;AAED,SAAgB,uBAAuB,CAAC,MAAW,EAAE,gBAAiC,EAAE,cAA+B;IACnH,MAAM,QAAQ,GAAsB,EAAE,GAAG,cAAc,EAAE,CAAC;IAC1D,OAAO,CAAC,cAAc,CAAC,wBAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjE,IAAA,gBAAS,EAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,QAAQ,CAAC;AACpB,CAAC;AALD,0DAKC"}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.ApplicationLifecycleImpl = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const annotation_1 = require("./annotation");
|
|
14
6
|
const constants_1 = require("./constants");
|
|
15
7
|
const core_1 = require("@celljs/core");
|
|
@@ -30,14 +22,18 @@ let ApplicationLifecycleImpl = class ApplicationLifecycleImpl {
|
|
|
30
22
|
for (const cronMetadata of cronMetadatas) {
|
|
31
23
|
const name = cronMetadata.name || (0, core_1.generateUUUID)();
|
|
32
24
|
const method = cronMetadata.method;
|
|
33
|
-
this.schedulerRegistry.add(name,
|
|
25
|
+
this.schedulerRegistry.add(name, {
|
|
26
|
+
...schedulerMetadata,
|
|
27
|
+
...cronMetadata,
|
|
28
|
+
onTick: async () => {
|
|
34
29
|
try {
|
|
35
30
|
await scheduler[method]();
|
|
36
31
|
}
|
|
37
32
|
catch (error) {
|
|
38
33
|
this.logger.error(error);
|
|
39
34
|
}
|
|
40
|
-
}
|
|
35
|
+
}
|
|
36
|
+
}).start();
|
|
41
37
|
}
|
|
42
38
|
}
|
|
43
39
|
}
|
|
@@ -47,24 +43,24 @@ let ApplicationLifecycleImpl = class ApplicationLifecycleImpl {
|
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
45
|
};
|
|
50
|
-
__decorate([
|
|
46
|
+
tslib_1.__decorate([
|
|
51
47
|
(0, core_1.Autowired)(annotation_1.SCHEDULER),
|
|
52
48
|
(0, core_1.Optional)(),
|
|
53
|
-
__metadata("design:type", Array)
|
|
49
|
+
tslib_1.__metadata("design:type", Array)
|
|
54
50
|
], ApplicationLifecycleImpl.prototype, "shedulers", void 0);
|
|
55
|
-
__decorate([
|
|
51
|
+
tslib_1.__decorate([
|
|
56
52
|
(0, core_1.Value)('cell.schedule.disabled'),
|
|
57
|
-
__metadata("design:type", Object)
|
|
53
|
+
tslib_1.__metadata("design:type", Object)
|
|
58
54
|
], ApplicationLifecycleImpl.prototype, "scheduleDisabled", void 0);
|
|
59
|
-
__decorate([
|
|
55
|
+
tslib_1.__decorate([
|
|
60
56
|
(0, core_1.Autowired)(registry_1.SchedulerRegistry),
|
|
61
|
-
__metadata("design:type", Object)
|
|
57
|
+
tslib_1.__metadata("design:type", Object)
|
|
62
58
|
], ApplicationLifecycleImpl.prototype, "schedulerRegistry", void 0);
|
|
63
|
-
__decorate([
|
|
59
|
+
tslib_1.__decorate([
|
|
64
60
|
(0, core_1.Autowired)(core_1.Logger),
|
|
65
|
-
__metadata("design:type", Object)
|
|
61
|
+
tslib_1.__metadata("design:type", Object)
|
|
66
62
|
], ApplicationLifecycleImpl.prototype, "logger", void 0);
|
|
67
|
-
ApplicationLifecycleImpl = __decorate([
|
|
63
|
+
ApplicationLifecycleImpl = tslib_1.__decorate([
|
|
68
64
|
(0, core_1.Component)(core_1.ApplicationLifecycle)
|
|
69
65
|
], ApplicationLifecycleImpl);
|
|
70
66
|
exports.ApplicationLifecycleImpl = ApplicationLifecycleImpl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-lifecycle.js","sourceRoot":"","sources":["../../src/node/application-lifecycle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application-lifecycle.js","sourceRoot":"","sources":["../../src/node/application-lifecycle.ts"],"names":[],"mappings":";;;;AAAA,6CAA0E;AAC1E,2CAA2C;AAC3C,uCAAkJ;AAGlJ,yCAA+C;AAGxC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAA9B;QAGgB,cAAS,GAAU,EAAE,CAAC;QAGtB,qBAAgB,GAAG,KAAK,CAAC;IAyChD,CAAC;IAjCG,UAAU;QACN,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,OAAO;SACV;QACD,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE;YACpC,MAAM,iBAAiB,GAAG,IAAA,qBAAc,EAAC,SAAS,CAAC,CAAC;YACpD,MAAM,iBAAiB,GAAsB,OAAO,CAAC,cAAc,CAAC,wBAAY,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;YAC/G,MAAM,aAAa,GAAmB,IAAA,qBAAc,EAAC,wBAAY,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;YAC3F,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;gBACtC,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,IAAI,IAAA,oBAAa,GAAE,CAAC;gBAClD,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;gBACnC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE;oBAC7B,GAAG,iBAAiB;oBACpB,GAAG,YAAY;oBACf,MAAM,EAAE,KAAK,IAAI,EAAE;wBACf,IAAI;4BACA,MAAM,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;yBAC7B;wBAAC,OAAO,KAAK,EAAE;4BACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;yBAC5B;oBACL,CAAC;iBACJ,CAAC,CAAC,KAAK,EAAE,CAAC;aACd;SAEJ;IACL,CAAC;IAED,MAAM;QACF,KAAK,MAAM,CAAE,IAAI,CAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,EAAE;YACpD,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SACvC;IACL,CAAC;CAEJ,CAAA;AA7CG;IAAC,IAAA,gBAAS,EAAC,sBAAS,CAAC;IAAE,IAAA,eAAQ,GAAE;;2DACQ;AAEzC;IAAC,IAAA,YAAK,EAAC,wBAAwB,CAAC;;kEACY;AAE5C;IAAC,IAAA,gBAAS,EAAC,4BAAiB,CAAC;;mEAC2B;AAExD;IAAC,IAAA,gBAAS,EAAC,aAAM,CAAC;;wDACgB;AAZzB,wBAAwB;IADpC,IAAA,gBAAS,EAAC,2BAAoB,CAAC;GACnB,wBAAwB,CA+CpC;AA/CY,4DAAwB"}
|
package/lib/node/error/index.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./errors"), exports);
|
|
18
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/error/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/error/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB"}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.DefaultCronJobFactory = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const core_1 = require("@celljs/core");
|
|
14
6
|
const cron_1 = require("cron");
|
|
15
7
|
const factory_protocol_1 = require("./factory-protocol");
|
|
16
8
|
let DefaultCronJobFactory = class DefaultCronJobFactory {
|
|
17
9
|
create(options) {
|
|
18
|
-
return new cron_1.CronJob(
|
|
10
|
+
return new cron_1.CronJob({ ...this.defaultCronJobOptions, ...options });
|
|
19
11
|
}
|
|
20
12
|
};
|
|
21
|
-
__decorate([
|
|
13
|
+
tslib_1.__decorate([
|
|
22
14
|
(0, core_1.Value)('cell.schedule.defaultCronJobOptions'),
|
|
23
|
-
__metadata("design:type", Object)
|
|
15
|
+
tslib_1.__metadata("design:type", Object)
|
|
24
16
|
], DefaultCronJobFactory.prototype, "defaultCronJobOptions", void 0);
|
|
25
|
-
DefaultCronJobFactory = __decorate([
|
|
17
|
+
DefaultCronJobFactory = tslib_1.__decorate([
|
|
26
18
|
(0, core_1.Component)(factory_protocol_1.CronJobFactory)
|
|
27
19
|
], DefaultCronJobFactory);
|
|
28
20
|
exports.DefaultCronJobFactory = DefaultCronJobFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron-job-factory.js","sourceRoot":"","sources":["../../../src/node/factory/cron-job-factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cron-job-factory.js","sourceRoot":"","sources":["../../../src/node/factory/cron-job-factory.ts"],"names":[],"mappings":";;;;AAAA,uCAAgD;AAChD,+BAA+B;AAC/B,yDAAoD;AAI7C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAK9B,MAAM,CAAC,OAAuB;QAC1B,OAAO,IAAI,cAAO,CAAC,EAAC,GAAG,IAAI,CAAC,qBAAqB,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CAEJ,CAAA;AAPG;IAAC,IAAA,YAAK,EAAC,qCAAqC,CAAC;;oEACqB;AAHzD,qBAAqB;IADjC,IAAA,gBAAS,EAAC,iCAAc,CAAC;GACb,qBAAqB,CASjC;AATY,sDAAqB"}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./factory-protocol"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./cron-job-factory"), exports);
|
|
19
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/factory/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/factory/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,6DAAmC"}
|
package/lib/node/index.js
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./annotation"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./error"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./application-lifecycle"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./constants"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./registry"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./cron-expression"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./factory"), exports);
|
|
24
11
|
//# sourceMappingURL=index.js.map
|
package/lib/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,kDAAwB;AACxB,kEAAwC;AACxC,sDAA4B;AAC5B,qDAA2B;AAC3B,4DAAkC;AAClC,oDAA0B"}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./registry-protocol"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./scheduler-registry"), exports);
|
|
19
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/registry/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/registry/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,+DAAqC"}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.DefaultSchedulerRegistry = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const core_1 = require("@celljs/core");
|
|
14
6
|
const registry_protocol_1 = require("./registry-protocol");
|
|
15
7
|
const error_1 = require("../error");
|
|
@@ -46,15 +38,15 @@ let DefaultSchedulerRegistry = class DefaultSchedulerRegistry {
|
|
|
46
38
|
return this.cronJobs.has(name);
|
|
47
39
|
}
|
|
48
40
|
};
|
|
49
|
-
__decorate([
|
|
41
|
+
tslib_1.__decorate([
|
|
50
42
|
(0, core_1.Value)('cell.schedule.defaultCronJobOptions'),
|
|
51
|
-
__metadata("design:type", Object)
|
|
43
|
+
tslib_1.__metadata("design:type", Object)
|
|
52
44
|
], DefaultSchedulerRegistry.prototype, "defaultCronJobOptions", void 0);
|
|
53
|
-
__decorate([
|
|
45
|
+
tslib_1.__decorate([
|
|
54
46
|
(0, core_1.Autowired)(factory_1.CronJobFactory),
|
|
55
|
-
__metadata("design:type", Object)
|
|
47
|
+
tslib_1.__metadata("design:type", Object)
|
|
56
48
|
], DefaultSchedulerRegistry.prototype, "cronJobFactory", void 0);
|
|
57
|
-
DefaultSchedulerRegistry = __decorate([
|
|
49
|
+
DefaultSchedulerRegistry = tslib_1.__decorate([
|
|
58
50
|
(0, core_1.Component)(registry_protocol_1.SchedulerRegistry)
|
|
59
51
|
], DefaultSchedulerRegistry);
|
|
60
52
|
exports.DefaultSchedulerRegistry = DefaultSchedulerRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler-registry.js","sourceRoot":"","sources":["../../../src/node/registry/scheduler-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scheduler-registry.js","sourceRoot":"","sources":["../../../src/node/registry/scheduler-registry.ts"],"names":[],"mappings":";;;;AAAA,uCAA2D;AAE3D,2DAAwE;AACxE,oCAA0E;AAC1E,wCAA4C;AAGrC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAA9B;QAQgB,aAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAkC7D,CAAC;IAhCG,GAAG,CAAC,IAAY;QACZ,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,GAAG,EAAE;YACN,MAAM,IAAI,6BAAqB,CAAC,IAAI,CAAC,CAAC;SACzC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,GAAG,CAAC,IAAY,EAAE,OAAuB;QACrC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,GAAG,EAAE;YACL,MAAM,IAAI,+BAAuB,CAAC,IAAI,CAAC,CAAC;SAC3C;QACD,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC7B,OAAO,GAAG,CAAC;IACf,CAAC;IAED,MAAM,CAAC,IAAY;QACf,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3B,GAAG,CAAC,IAAI,EAAE,CAAC;QACX,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,GAAG,CAAC,IAAY;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CAEJ,CAAA;AAxCG;IAAC,IAAA,YAAK,EAAC,qCAAqC,CAAC;;uEACqB;AAElE;IAAC,IAAA,gBAAS,EAAC,wBAAc,CAAC;;gEACwB;AANzC,wBAAwB;IADpC,IAAA,gBAAS,EAAC,qCAAiB,CAAC;GAChB,wBAAwB,CA0CpC;AA1CY,4DAAwB"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/schedule",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/node/index.js",
|
|
6
6
|
"typings": "lib/node/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@celljs/core": "3.
|
|
8
|
+
"@celljs/core": "3.1.0",
|
|
9
9
|
"@types/cron": "^1.7.2",
|
|
10
10
|
"cron": "^1.8.2",
|
|
11
11
|
"reflect-metadata": "^0.1.13"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"test": "cell-component test:js"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@celljs/component": "3.
|
|
41
|
+
"@celljs/component": "3.1.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "6bb7168beaf93b3c54ef92ce51775e9603163444"
|
|
44
44
|
}
|