Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -10,3 +11,5 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
import { parseCronExpression } from 'cron-schedule'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Cron = exports.Job = void 0; | ||
const cron_schedule_1 = require("cron-schedule"); | ||
/** | ||
@@ -47,3 +50,3 @@ * Logger that prepends a tag to all log messages. | ||
} | ||
export class Job { | ||
class Job { | ||
/** | ||
@@ -63,3 +66,3 @@ * Constructor. | ||
this.config = config; | ||
this.cron = parseCronExpression(config.cron); | ||
this.cron = (0, cron_schedule_1.parseCronExpression)(config.cron); | ||
this.started = !config.dontAutoRun; | ||
@@ -138,6 +141,7 @@ this.log = new JobLogger(config.log || console, name); | ||
} | ||
exports.Job = Job; | ||
/** | ||
* A cron instance. | ||
*/ | ||
export class Cron { | ||
class Cron { | ||
constructor() { | ||
@@ -227,2 +231,3 @@ this.jobs = new Map(); | ||
} | ||
exports.Cron = Cron; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "cron-async", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Execute something on a schedule, using cron syntax, with async/await support.", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"default": "./dist/index.js", | ||
"types": "./dist/index.d.ts" | ||
} | ||
} | ||
}, | ||
"author": "Ramesh Nair <ram@hiddentao.com>", | ||
@@ -56,3 +61,3 @@ "homepage": "https://hiddentao.github.io/cron-async", | ||
"dev": "tsc --watch", | ||
"test": "mocha", | ||
"test": "mocha --require ts-node/register", | ||
"test-watch": "mocha --watch --parallel", | ||
@@ -59,0 +64,0 @@ "build-docs": "rm -rf ./docs && typedoc", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
362
21728
6
No