@zenweb/schedule 3.6.0 → 3.6.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/README.md +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/register.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { SetupFunction } from '@zenweb/core';
|
|
|
2
2
|
import { schedule, ScheduleRegister } from './register';
|
|
3
3
|
import { ScheduleOption } from './types';
|
|
4
4
|
export { ScheduleOption, schedule };
|
|
5
|
-
export default function setup(
|
|
5
|
+
export default function setup(opt?: ScheduleOption): SetupFunction;
|
|
6
6
|
declare module '@zenweb/core' {
|
|
7
7
|
interface Core {
|
|
8
8
|
scheduleRegister: ScheduleRegister;
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,11 @@ const globby = require("globby");
|
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const register_1 = require("./register");
|
|
7
7
|
Object.defineProperty(exports, "schedule", { enumerable: true, get: function () { return register_1.schedule; } });
|
|
8
|
-
function setup(
|
|
9
|
-
option = Object.assign({
|
|
8
|
+
function setup(opt) {
|
|
9
|
+
const option = Object.assign({
|
|
10
10
|
paths: [path.join(process.cwd(), 'app', 'schedule')],
|
|
11
11
|
disabled: process.env.ZENWEB_SCHEDULE_DISABLED === '1',
|
|
12
|
-
},
|
|
12
|
+
}, opt);
|
|
13
13
|
return async function schedule(setup) {
|
|
14
14
|
setup.assertModuleExists('inject', '@zenweb/inject');
|
|
15
15
|
setup.assertModuleExists('router', '@zenweb/router');
|
package/dist/register.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface ScheduleMethodOption {
|
|
|
8
8
|
/**
|
|
9
9
|
* 定时任务设定
|
|
10
10
|
*/
|
|
11
|
-
export declare function schedule(opt: ScheduleMethodOption): (target: Object, propertyKey: string | symbol, descriptor_or_paramtypes?: any[] | PropertyDescriptor) => void;
|
|
11
|
+
export declare function schedule(opt: ScheduleMethodOption): (target: Object, propertyKey: string | symbol, descriptor_or_paramtypes?: any[] | PropertyDescriptor | undefined) => void;
|
|
12
12
|
export declare class ScheduleRegister {
|
|
13
13
|
private core;
|
|
14
14
|
private router;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenweb/schedule",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "Zenweb Schedule module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"url": "https://github.com/yefei/zenweb-schedule/issues"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@zenweb/core": "^3.5.
|
|
37
|
+
"@zenweb/core": "^3.5.1",
|
|
38
38
|
"@zenweb/inject": "^3.18.0",
|
|
39
39
|
"@zenweb/router": "^3.3.0",
|
|
40
40
|
"cross-env": "^7.0.3",
|