@eggjs/schedule 6.0.0-beta.23 → 6.0.0-beta.25
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/app/extend/application.d.ts +1 -1
- package/dist/app/extend/application.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/types.d.ts +22 -0
- package/package.json +6 -6
|
@@ -2,7 +2,7 @@ import { Application } from 'egg';
|
|
|
2
2
|
import { ScheduleWorker } from '../../lib/schedule_worker.ts';
|
|
3
3
|
export default class ScheduleApplication extends Application {
|
|
4
4
|
/**
|
|
5
|
-
* @member app#
|
|
5
|
+
* @member app#scheduleWorker
|
|
6
6
|
*/
|
|
7
7
|
get scheduleWorker(): ScheduleWorker;
|
|
8
8
|
}
|
|
@@ -3,7 +3,7 @@ import { ScheduleWorker } from "../../lib/schedule_worker.js";
|
|
|
3
3
|
const SCHEDULE_WORKER = Symbol('application scheduleWorker');
|
|
4
4
|
export default class ScheduleApplication extends Application {
|
|
5
5
|
/**
|
|
6
|
-
* @member app#
|
|
6
|
+
* @member app#scheduleWorker
|
|
7
7
|
*/
|
|
8
8
|
get scheduleWorker() {
|
|
9
9
|
let scheduleWorker = this[SCHEDULE_WORKER];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import './types.ts';
|
|
1
2
|
import Agent from './app/extend/agent.ts';
|
|
2
3
|
import Application from './app/extend/application.ts';
|
|
3
4
|
import ApplicationUnittest from './app/extend/application.unittest.ts';
|
|
4
5
|
export { Agent, Application, ApplicationUnittest };
|
|
5
6
|
export { ScheduleWorker } from './lib/schedule_worker.ts';
|
|
6
7
|
export { Schedule } from './lib/schedule.ts';
|
|
7
|
-
import './types.ts';
|
|
8
8
|
export * from './lib/types.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import "./types.js";
|
|
1
2
|
import Agent from "./app/extend/agent.js";
|
|
2
3
|
import Application from "./app/extend/application.js";
|
|
3
4
|
import ApplicationUnittest from "./app/extend/application.unittest.js";
|
|
4
5
|
export { Agent, Application, ApplicationUnittest };
|
|
5
6
|
export { ScheduleWorker } from "./lib/schedule_worker.js";
|
|
6
7
|
export { Schedule } from "./lib/schedule.js";
|
|
7
|
-
import "./types.js";
|
|
8
8
|
export * from "./lib/types.js";
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxZQUFZLENBQUM7QUFFcEIsT0FBTyxLQUFLLE1BQU0sdUJBQXVCLENBQUM7QUFDMUMsT0FBTyxXQUFXLE1BQU0sNkJBQTZCLENBQUM7QUFDdEQsT0FBTyxtQkFBbUIsTUFBTSxzQ0FBc0MsQ0FBQztBQUV2RSxPQUFPLEVBQUUsS0FBSyxFQUFFLFdBQVcsRUFBRSxtQkFBbUIsRUFBRSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFN0MsY0FBYyxnQkFBZ0IsQ0FBQyJ9
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { EggScheduleConfig } from './config/config.default.ts';
|
|
2
|
+
import type { Schedule } from './lib/schedule.ts';
|
|
3
|
+
import type { ScheduleWorker } from './lib/schedule_worker.ts';
|
|
4
|
+
import type { BaseStrategy } from './lib/strategy/base.ts';
|
|
5
|
+
import type { TimerStrategy } from './lib/strategy/timer.ts';
|
|
2
6
|
declare module 'egg' {
|
|
3
7
|
interface EggAppConfig {
|
|
4
8
|
/**
|
|
@@ -7,7 +11,25 @@ declare module 'egg' {
|
|
|
7
11
|
*/
|
|
8
12
|
schedule: EggScheduleConfig;
|
|
9
13
|
}
|
|
14
|
+
interface Agent {
|
|
15
|
+
/**
|
|
16
|
+
* Schedule Strategy
|
|
17
|
+
*/
|
|
18
|
+
ScheduleStrategy: typeof BaseStrategy;
|
|
19
|
+
/**
|
|
20
|
+
* Timer Schedule Strategy
|
|
21
|
+
*/
|
|
22
|
+
TimerScheduleStrategy: typeof TimerStrategy;
|
|
23
|
+
/**
|
|
24
|
+
* Schedule
|
|
25
|
+
*/
|
|
26
|
+
schedule: Schedule;
|
|
27
|
+
}
|
|
10
28
|
interface Application {
|
|
29
|
+
/**
|
|
30
|
+
* Schedule Worker
|
|
31
|
+
*/
|
|
32
|
+
scheduleWorker: ScheduleWorker;
|
|
11
33
|
/**
|
|
12
34
|
* Run a schedule, only for unit test
|
|
13
35
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/schedule",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.25",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"is-type-of": "^2.2.0",
|
|
34
34
|
"safe-timers": "^1.1.0",
|
|
35
35
|
"utility": "^2.5.0",
|
|
36
|
-
"@eggjs/utils": "5.0.0-beta.
|
|
36
|
+
"@eggjs/utils": "5.0.0-beta.25"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"egg": "4.1.0-beta.
|
|
39
|
+
"egg": "4.1.0-beta.25"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/safe-timers": "^1.1.2",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"tsdown": "^0.15.4",
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
46
|
"vitest": "4.0.0-beta.16",
|
|
47
|
-
"@eggjs/
|
|
48
|
-
"@eggjs/
|
|
49
|
-
"@eggjs/mock": "7.0.0-beta.
|
|
47
|
+
"@eggjs/bin": "8.0.0-beta.25",
|
|
48
|
+
"@eggjs/tsconfig": "3.1.0-beta.25",
|
|
49
|
+
"@eggjs/mock": "7.0.0-beta.25"
|
|
50
50
|
},
|
|
51
51
|
"author": "dead_horse",
|
|
52
52
|
"license": "MIT",
|