Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pushrocks/smarttime

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pushrocks/smarttime - npm Package Compare versions

Comparing version 3.0.34 to 3.0.35

7

dist_ts/smarttime.classes.cronjob.d.ts

@@ -0,1 +1,2 @@

import * as plugins from './smarttime.plugins';
import { CronManager } from './smarttime.classes.cronmanager';

@@ -5,3 +6,3 @@ import { CronParser } from './smarttime.classes.cronparser';

export declare class CronJob {
cronParser: CronParser;
cronParser: CronParser | typeof plugins.croner;
status: 'started' | 'stopped' | 'initial';

@@ -16,9 +17,9 @@ cronExpression: string;

checkExecution(): number;
getNextExecutionTime(): number;
getNextExecutionTime(): any;
/**
* gets the time to next execution
*/
getTimeToNextExecution(): number;
getTimeToNextExecution(): any;
start(): void;
stop(): void;
}
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CronJob = void 0;
const smarttime_classes_cronparser_1 = require("./smarttime.classes.cronparser");
const plugins = __importStar(require("./smarttime.plugins"));
class CronJob {

@@ -11,3 +30,3 @@ constructor(cronManager, cronExpressionArg, jobFunction) {

this.jobFunction = jobFunction;
this.cronParser = new smarttime_classes_cronparser_1.CronParser(cronExpressionArg);
this.cronParser = plugins.croner(cronExpressionArg);
}

@@ -37,3 +56,3 @@ /**

getTimeToNextExecution() {
return this.cronParser.getMsToNextTimeMatch();
return this.cronParser.msToNext();
}

@@ -48,2 +67,2 @@ start() {

exports.CronJob = CronJob;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR0aW1lLmNsYXNzZXMuY3JvbmpvYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0dGltZS5jbGFzc2VzLmNyb25qb2IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsaUZBQTREO0FBSTVELE1BQWEsT0FBTztJQU9sQixZQUFZLFdBQXdCLEVBQUUsaUJBQXlCLEVBQUUsV0FBeUI7UUFMbkYsV0FBTSxHQUFzQyxTQUFTLENBQUM7UUFHckQsc0JBQWlCLEdBQVcsQ0FBQyxDQUFDO1FBR3BDLElBQUksQ0FBQyxjQUFjLEdBQUcsaUJBQWlCLENBQUM7UUFDeEMsSUFBSSxDQUFDLFdBQVcsR0FBRyxXQUFXLENBQUM7UUFDL0IsSUFBSSxDQUFDLFVBQVUsR0FBRyxJQUFJLHlDQUFVLENBQUMsaUJBQWlCLENBQUMsQ0FBQztJQUN0RCxDQUFDO0lBRUQ7O09BRUc7SUFDSSxjQUFjO1FBQ25CLElBQUksSUFBSSxDQUFDLGlCQUFpQixLQUFLLENBQUMsRUFBRTtZQUNoQyxJQUFJLENBQUMsb0JBQW9CLEVBQUUsQ0FBQztTQUM3QjtRQUNELElBQUksSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLElBQUksQ0FBQyxpQkFBaUIsRUFBRTtZQUN2QyxNQUFNLFlBQVksR0FBRyxJQUFJLENBQUMsV0FBVyxFQUFFLENBQUM7WUFDeEMsSUFBSSxZQUFZLFlBQVksT0FBTyxFQUFFO2dCQUNuQyxZQU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UFBRSxDQUFDO0lBQ3BDLENBQUM7SUFFTSxLQUFLO1FBQ1YsSUFBSSxDQUFDLE1BQU0sR0FBRyxTQUFTLENBQUM7SUFDMUIsQ0FBQztJQUVNLElBQUk7UUFDVCxJQUFJLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQztJQUMxQixDQUFDO0NBQ0Y7QUFoREQsMEJBZ0RDIn0=

@@ -6,3 +6,3 @@ export declare class CronParser {

private getNextPartMatch;
getMsToNextTimeMatch(): number;
msToNext(): number;
}

@@ -35,3 +35,3 @@ "use strict";

}
getMsToNextTimeMatch() {
msToNext() {
const cronArray = this.cronArray;

@@ -78,2 +78,2 @@ const secondExpression = cronArray[0];

exports.CronParser = CronParser;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR0aW1lLmNsYXNzZXMuY3JvbnBhcnNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0dGltZS5jbGFzc2VzLmNyb25wYXJzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsTUFBYSxVQUFVO0lBS3JCLFlBQVksaUJBQXlCO1FBQ25DLElBQUksQ0FBQyxjQUFjLEdBQUcsaUJBQWlCLENBQUM7UUFDeEMsSUFBSSxJQUFJLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUU7WUFDN0IsTUFBTSxJQUFJLEtBQUssQ0FBQyx3Q0FBd0MsQ0FBQyxDQUFDO1NBQzNEO0lBQ0gsQ0FBQztJQVJELElBQVcsU0FBUztRQUNsQixPQUFPLElBQUksQ0FBQyxjQUFjLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBQ3hDLENBQUM7SUFRTyxnQkFBZ0IsQ0FBQyxRQUFnQixFQUFFLFVBQWtCLEVBQUUsU0FBaUI7UUFDOUUsSUFBSSxRQUFRLEtBQUssR0FBRyx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xHQUFHLENBQUMsQ0FBQyxDQUFDO1NBQ2pDO1FBQ0QsTUFBTSxVQUFVLEdBQUcsV0FBVyxDQUFDO1FBRS9CLE1BQU0sVUFBVSxHQUFHLElBQUksSUFBSSxDQUN6QixVQUFVLEVBQ1YsV0FBVyxFQUNYLFNBQVMsRUFDVCxVQUFVLEVBQ1YsWUFBWSxFQUNaLFlBQVksQ0FDYixDQUFDO1FBQ0YsTUFBTSxVQUFVLEdBQUcsVUFBVSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ3hDLE9BQU8sVUFBVSxHQUFHLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQztJQUNqQyxDQUFDO0NBQ0Y7QUFyRkQsZ0NBcUZDIn0=

@@ -5,3 +5,4 @@ import * as lik from '@pushrocks/lik';

export { lik, smartdelay, smartpromise };
import croner from 'croner';
import dayjs from 'dayjs';
export { dayjs };
export { croner, dayjs };

@@ -25,3 +25,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.dayjs = exports.smartpromise = exports.smartdelay = exports.lik = void 0;
exports.dayjs = exports.croner = exports.smartpromise = exports.smartdelay = exports.lik = void 0;
// @pushrocks scope

@@ -35,4 +35,6 @@ const lik = __importStar(require("@pushrocks/lik"));

// third parties
const croner_1 = __importDefault(require("croner"));
exports.croner = croner_1.default;
const dayjs_1 = __importDefault(require("dayjs"));
exports.dayjs = dayjs_1.default;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR0aW1lLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHRpbWUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsbUJBQW1CO0FBQ25CLG9EQUFzQztBQUk3QixrQkFBRztBQUhaLGtFQUFvRDtBQUd0QyxnQ0FBVTtBQUZ4QixzRUFBd0Q7QUFFOUIsb0NBQVk7QUFFdEMsZ0JBQWdCO0FBQ2hCLGtEQUEwQjtBQUVqQixnQkFGRixlQUFLLENBRUUifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR0aW1lLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHRpbWUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsbUJBQW1CO0FBQ25CLG9EQUFzQztBQUk3QixrQkFBRztBQUhaLGtFQUFvRDtBQUd0QyxnQ0FBVTtBQUZ4QixzRUFBd0Q7QUFFOUIsb0NBQVk7QUFFdEMsZ0JBQWdCO0FBQ2hCLG9EQUE0QjtBQUduQixpQkFIRixnQkFBTSxDQUdFO0FBRmYsa0RBQTBCO0FBRVQsZ0JBRlYsZUFBSyxDQUVVIn0=
{
"name": "@pushrocks/smarttime",
"private": false,
"version": "3.0.34",
"version": "3.0.35",
"description": "handle time in smart ways",

@@ -28,2 +28,3 @@ "main": "dist_ts/index.js",

"@pushrocks/smartpromise": "^3.0.2",
"croner": "^1.1.23",
"dayjs": "^1.8.35",

@@ -30,0 +31,0 @@ "is-nan": "^1.3.0"

@@ -9,3 +9,3 @@ import * as plugins from './smarttime.plugins';

export class CronJob {
public cronParser: CronParser;
public cronParser: CronParser | typeof plugins.croner;
public status: 'started' | 'stopped' | 'initial' = 'initial';

@@ -19,3 +19,3 @@ public cronExpression: string;

this.jobFunction = jobFunction;
this.cronParser = new CronParser(cronExpressionArg);
this.cronParser = plugins.croner(cronExpressionArg);
}

@@ -48,3 +48,3 @@

public getTimeToNextExecution() {
return this.cronParser.getMsToNextTimeMatch();
return this.cronParser.msToNext();
}

@@ -51,0 +51,0 @@

@@ -36,3 +36,3 @@ import * as plugins from './smarttime.plugins';

public getMsToNextTimeMatch() {
public msToNext() {
const cronArray = this.cronArray;

@@ -39,0 +39,0 @@ const secondExpression = cronArray[0];

@@ -9,4 +9,5 @@ // @pushrocks scope

// third parties
import croner from 'croner';
import dayjs from 'dayjs';
export { dayjs };
export { croner, dayjs };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc