@carno.js/schedule 0.2.10 → 1.0.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/entry.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Carno } from '@carno.js/core';
|
|
2
|
-
export declare const CarnoScheduler: Carno
|
|
2
|
+
export declare const CarnoScheduler: Carno;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Container } from '@carno.js/core';
|
|
2
2
|
import { CronOptions } from './utils/cron-options';
|
|
3
3
|
import { CronJobParams } from 'cron';
|
|
4
4
|
import { SchedulerRegistry } from './scheduler.registry';
|
|
5
5
|
export declare class SchedulerOrchestration {
|
|
6
6
|
private readonly schedulerRegistry;
|
|
7
|
-
private readonly
|
|
7
|
+
private readonly container;
|
|
8
8
|
private readonly cronJobs;
|
|
9
9
|
private readonly timeouts;
|
|
10
10
|
private readonly intervals;
|
|
11
|
-
constructor(schedulerRegistry: SchedulerRegistry,
|
|
11
|
+
constructor(schedulerRegistry: SchedulerRegistry, container: Container);
|
|
12
12
|
onApplicationInit(): void;
|
|
13
13
|
onApplicationShutdown(): void;
|
|
14
14
|
mountIntervals(): void;
|
|
@@ -16,9 +16,9 @@ const scheduler_registry_1 = require("./scheduler.registry");
|
|
|
16
16
|
const uuid_1 = require("uuid");
|
|
17
17
|
const constants_1 = require("./utils/constants");
|
|
18
18
|
let SchedulerOrchestration = class SchedulerOrchestration {
|
|
19
|
-
constructor(schedulerRegistry,
|
|
19
|
+
constructor(schedulerRegistry, container) {
|
|
20
20
|
this.schedulerRegistry = schedulerRegistry;
|
|
21
|
-
this.
|
|
21
|
+
this.container = container;
|
|
22
22
|
this.cronJobs = {};
|
|
23
23
|
this.timeouts = {};
|
|
24
24
|
this.intervals = {};
|
|
@@ -113,11 +113,7 @@ let SchedulerOrchestration = class SchedulerOrchestration {
|
|
|
113
113
|
}
|
|
114
114
|
resolveInstance(target) {
|
|
115
115
|
const token = target.constructor;
|
|
116
|
-
|
|
117
|
-
if (provider?.instance) {
|
|
118
|
-
return provider.instance;
|
|
119
|
-
}
|
|
120
|
-
return this.injectorService.invoke(token);
|
|
116
|
+
return this.container.get(token);
|
|
121
117
|
}
|
|
122
118
|
};
|
|
123
119
|
exports.SchedulerOrchestration = SchedulerOrchestration;
|
|
@@ -136,5 +132,5 @@ __decorate([
|
|
|
136
132
|
exports.SchedulerOrchestration = SchedulerOrchestration = __decorate([
|
|
137
133
|
(0, core_1.Service)(),
|
|
138
134
|
__metadata("design:paramtypes", [scheduler_registry_1.SchedulerRegistry,
|
|
139
|
-
core_1.
|
|
135
|
+
core_1.Container])
|
|
140
136
|
], SchedulerOrchestration);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carno.js/schedule",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Schedule module for Carno framework (Bun) ⏰",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@carno.js/core": "^0.
|
|
28
|
+
"@carno.js/core": "^1.0.0"
|
|
29
29
|
},
|
|
30
30
|
"author": "",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d2b000eeb352a03569b90d8eb2bf3557c00b741b"
|
|
36
36
|
}
|