@jayfong/x-server 2.28.0 → 2.28.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.
@@ -4,7 +4,7 @@ exports.__esModule = true;
4
4
  exports.defineCron = defineCron;
5
5
  var _cron = require("cron");
6
6
  function defineCron(options) {
7
- return new _cron.CronJob({
7
+ return _cron.CronJob.from({
8
8
  cronTime: options.expression,
9
9
  runOnInit: options.runOnInit,
10
10
  start: true,
@@ -1,6 +1,6 @@
1
1
  import { CronJob } from 'cron';
2
2
  export function defineCron(options) {
3
- return new CronJob({
3
+ return CronJob.from({
4
4
  cronTime: options.expression,
5
5
  runOnInit: options.runOnInit,
6
6
  start: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.28.0",
3
+ "version": "2.28.1",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",
@@ -25,7 +25,6 @@
25
25
  "@fastify/websocket": "^8.1.0",
26
26
  "@prisma/client": "^4.8.0",
27
27
  "@types/busboy": "^0.3.2",
28
- "@types/cron": "^2.0.0",
29
28
  "@types/http-errors": "^1.8.2",
30
29
  "@types/jsonwebtoken": "^8.5.8",
31
30
  "@types/nodemailer": "^6.4.4",
@@ -36,7 +35,7 @@
36
35
  "chokidar": "^3.5.3",
37
36
  "comment-parser": "^1.3.1",
38
37
  "compressing": "^1.5.1",
39
- "cron": "^2.3.1",
38
+ "cron": "^3.1.6",
40
39
  "cuid": "^2.1.8",
41
40
  "debug": "^4.3.4",
42
41
  "esbuild": "^0.18.11",