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

bree

Package Overview
Dependencies
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bree - npm Package Compare versions

Comparing version 4.1.1 to 5.0.0

25

lib/job-builder.js

@@ -25,4 +25,5 @@ "use strict";

isSchedule = _require3.isSchedule,
parseValue = _require3.parseValue; // eslint-disable-next-line complexity
parseValue = _require3.parseValue;
later.date.localTime(); // eslint-disable-next-line complexity

@@ -52,3 +53,3 @@ var buildJob = function buildJob(job, config) {

};
} // process job.path
} // Process job.path

@@ -69,3 +70,3 @@

} else {
// assume that it's a transformed eval string
// Assume that it's a transformed eval string
job.worker = _objectSpread({

@@ -83,3 +84,3 @@ eval: true

job.interval = parseValue(job.interval);
} // build cron
} // Build cron

@@ -89,7 +90,7 @@

if (isSchedule(job.cron)) {
job.interval = job.cron; // delete job.cron;
job.interval = job.cron; // Delete job.cron;
} else {
job.interval = later.parse.cron(job.cron, boolean(typeof job.hasSeconds === 'undefined' ? config.hasSeconds : job.hasSeconds));
}
} // if timeout was undefined, cron was undefined,
} // If timeout was undefined, cron was undefined,
// and date was undefined then set the default

@@ -99,7 +100,13 @@ // (as long as the default timeout is >= 0)

if (Number.isFinite(config.timeout) && config.timeout >= 0 && typeof job.timeout === 'undefined' && typeof job.cron === 'undefined' && typeof job.date === 'undefined' && typeof job.interval === 'undefined') job.timeout = config.timeout; // if interval was undefined, cron was undefined,
if (Number.isFinite(config.timeout) && config.timeout >= 0 && typeof job.timeout === 'undefined' && typeof job.cron === 'undefined' && typeof job.date === 'undefined' && typeof job.interval === 'undefined') {
job.timeout = config.timeout;
} // If interval was undefined, cron was undefined,
// and date was undefined then set the default
// (as long as the default interval is > 0, or it was a schedule, or it was valid)
if ((Number.isFinite(config.interval) && config.interval > 0 || isSchedule(config.interval)) && typeof job.interval === 'undefined' && typeof job.cron === 'undefined' && typeof job.date === 'undefined') job.interval = config.interval;
if ((Number.isFinite(config.interval) && config.interval > 0 || isSchedule(config.interval)) && typeof job.interval === 'undefined' && typeof job.cron === 'undefined' && typeof job.date === 'undefined') {
job.interval = config.interval;
}
return job;

@@ -109,2 +116,2 @@ };

module.exports = buildJob;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9qb2ItYnVpbGRlci5qcyJdLCJuYW1lcyI6WyJyZXF1aXJlIiwiam9pbiIsImlzU0FOQiIsImlzVmFsaWRQYXRoIiwiYm9vbGVhbiIsImxhdGVyIiwiaXNTY2hlZHVsZSIsInBhcnNlVmFsdWUiLCJidWlsZEpvYiIsImpvYiIsImNvbmZpZyIsInBhdGgiLCJyb290IiwiZW5kc1dpdGgiLCJkZWZhdWx0RXh0ZW5zaW9uIiwibmFtZSIsInRpbWVvdXQiLCJpbnRlcnZhbCIsInRvU3RyaW5nIiwid29ya2VyIiwiZXZhbCIsImNyb24iLCJwYXJzZSIsImhhc1NlY29uZHMiLCJOdW1iZXIiLCJpc0Zpbml0ZSIsImRhdGUiLCJtb2R1bGUiLCJleHBvcnRzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O2VBQWlCQSxPQUFPLENBQUMsTUFBRCxDO0lBQWhCQyxJLFlBQUFBLEk7O0FBQ1IsSUFBTUMsTUFBTSxHQUFHRixPQUFPLENBQUMseUJBQUQsQ0FBdEI7O0FBQ0EsSUFBTUcsV0FBVyxHQUFHSCxPQUFPLENBQUMsZUFBRCxDQUEzQjs7Z0JBQ29CQSxPQUFPLENBQUMsU0FBRCxDO0lBQW5CSSxPLGFBQUFBLE87O0FBQ1IsSUFBTUMsS0FBSyxHQUFHTCxPQUFPLENBQUMsZUFBRCxDQUFyQjs7Z0JBQ21DQSxPQUFPLENBQUMsYUFBRCxDO0lBQWxDTSxVLGFBQUFBLFU7SUFBWUMsVSxhQUFBQSxVLEVBRXBCOzs7QUFDQSxJQU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ZGVmaW5lZCdcbiAgKSB7XG4gICAgam9iLnRpbWVvdXQgPSBjb25maWcudGltZW91dDtcbiAgfVxuXG4gIC8vIElmIGludGVydmFsIHdhcyB1bmRlZmluZWQsIGNyb24gd2FzIHVuZGVmaW5lZCxcbiAgLy8gYW5kIGRhdGUgd2FzIHVuZGVmaW5lZCB0aGVuIHNldCB0aGUgZGVmYXVsdFxuICAvLyAoYXMgbG9uZyBhcyB0aGUgZGVmYXVsdCBpbnRlcnZhbCBpcyA+IDAsIG9yIGl0IHdhcyBhIHNjaGVkdWxlLCBvciBpdCB3YXMgdmFsaWQpXG4gIGlmIChcbiAgICAoKE51bWJlci5pc0Zpbml0ZShjb25maWcuaW50ZXJ2YWwpICYmIGNvbmZpZy5pbnRlcnZhbCA+IDApIHx8XG4gICAgICBpc1NjaGVkdWxlKGNvbmZpZy5pbnRlcnZhbCkpICYmXG4gICAgdHlwZW9mIGpvYi5pbnRlcnZhbCA9PT0gJ3VuZGVmaW5lZCcgJiZcbiAgICB0eXBlb2Ygam9iLmNyb24gPT09ICd1bmRlZmluZWQnICYmXG4gICAgdHlwZW9mIGpvYi5kYXRlID09PSAndW5kZWZpbmVkJ1xuICApIHtcbiAgICBqb2IuaW50ZXJ2YWwgPSBjb25maWcuaW50ZXJ2YWw7XG4gIH1cblxuICByZXR1cm4gam9iO1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSBidWlsZEpvYjtcbiJdfQ==

@@ -42,4 +42,6 @@ "use strict";

var validateReservedJobName = function validateReservedJobName(name) {
// don't allow a job to have the `index` file name
if (['index', 'index.js', 'index.mjs'].includes(name)) return new Error('You cannot use the reserved job name of "index", "index.js", nor "index.mjs"');
// Don't allow a job to have the `index` file name
if (['index', 'index.js', 'index.mjs'].includes(name)) {
return new Error('You cannot use the reserved job name of "index", "index.js", nor "index.mjs"');
}
};

@@ -50,4 +52,7 @@

var jobNameError = validateReservedJobName(job);
if (jobNameError) throw jobNameError;
if (jobNameError) {
throw jobNameError;
}
if (!config.root) {

@@ -63,3 +68,6 @@ errors.push(new Error("Job #".concat(i + 1, " \"").concat(job, "\" requires root directory option to auto-populate path")));

var stats = fs.statSync(path);
if (!stats.isFile()) throw new Error("Job #".concat(i + 1, " \"").concat(job, "\" path missing: ").concat(path));
if (!stats.isFile()) {
throw new Error("Job #".concat(i + 1, " \"").concat(job, "\" path missing: ").concat(path));
}
}

@@ -70,6 +78,11 @@ };

var errors = [];
var path = "(".concat(job.toString(), ")()"); // can't be a built-in or bound function
var path = "(".concat(job.toString(), ")()"); // Can't be a built-in or bound function
if (path.includes('[native code]')) errors.push(new Error("Job #".concat(i + 1, " can't be a bound or built-in function")));
if (errors.length > 0) throw combineErrors(errors);
if (path.includes('[native code]')) {
errors.push(new Error("Job #".concat(i + 1, " can't be a bound or built-in function")));
}
if (errors.length > 0) {
throw combineErrors(errors);
}
};

@@ -81,9 +94,11 @@

if (typeof job.path === 'function') {
var path = "(".concat(job.path.toString(), ")()"); // can't be a built-in or bound function
var path = "(".concat(job.path.toString(), ")()"); // Can't be a built-in or bound function
if (path.includes('[native code]')) errors.push(new Error("".concat(prefix, " can't be a bound or built-in function")));
if (path.includes('[native code]')) {
errors.push(new Error("".concat(prefix, " can't be a bound or built-in function")));
}
} else if (!isSANB(job.path) && !config.root) {
errors.push(new Error("".concat(prefix, " requires root directory option to auto-populate path")));
} else {
// validate path
// Validate path
var _path = isSANB(job.path) ? job.path : join(config.root, job.name.endsWith('.js') || job.name.endsWith('.mjs') ? job.name : "".concat(job.name, ".").concat(config.defaultExtension));

@@ -97,5 +112,8 @@

if (!stats.isFile()) throw new Error("".concat(prefix, " path missing: ").concat(_path));
if (!stats.isFile()) {
throw new Error("".concat(prefix, " path missing: ").concat(_path));
}
}
} catch (err) {
/* istanbul ignore next */
errors.push(err);

@@ -126,3 +144,3 @@ }

if (!isSchedule(job.cron)) {
// if `hasSeconds` was `true` then set `cronValidate` and inherit any existing options
// If `hasSeconds` was `true` then set `cronValidate` and inherit any existing options
var cronValidate = job.hasSeconds ? cronValidateWithSeconds(job, config) : config.cronValidate; //

@@ -180,4 +198,8 @@ // validate cron pattern

var name = getName(job);
if (!name) errors.push(new Error("Job #".concat(i + 1, " is missing a name"))); // throw an error if duplicate job names
if (!name) {
errors.push(new Error("Job #".concat(i + 1, " is missing a name")));
} // Throw an error if duplicate job names
if (reservedNames.includes(name)) {

@@ -192,7 +214,11 @@ errors.push(new Error("Job #".concat(i + 1, " has a duplicate job name of ").concat(getName(job))));

var errors = validateJobName(job, i, names);
if (errors.length > 0) throw combineErrors(errors); // support a simple string which we will transform to have a path
if (errors.length > 0) {
throw combineErrors(errors);
} // Support a simple string which we will transform to have a path
if (isSANB(job)) {
return validateStringJob(job, i, config);
} // job is a function
} // Job is a function

@@ -202,18 +228,28 @@

return validateFunctionJob(job, i);
} // use a prefix for errors
} // Use a prefix for errors
var prefix = "Job #".concat(i + 1, " named \"").concat(job.name, "\"");
errors.push.apply(errors, (0, _toConsumableArray2.default)(validateJobPath(job, prefix, config))); // don't allow users to mix interval AND cron
errors.push.apply(errors, (0, _toConsumableArray2.default)(validateJobPath(job, prefix, config))); // Don't allow users to mix interval AND cron
if (typeof job.interval !== 'undefined' && typeof job.cron !== 'undefined') {
errors.push(new Error("".concat(prefix, " cannot have both interval and cron configuration")));
} // don't allow users to mix timeout AND date
} // Don't allow users to mix timeout AND date
if (typeof job.timeout !== 'undefined' && typeof job.date !== 'undefined') errors.push(new Error("".concat(prefix, " cannot have both timeout and date")));
if (typeof job.timeout !== 'undefined' && typeof job.date !== 'undefined') {
errors.push(new Error("".concat(prefix, " cannot have both timeout and date")));
}
var jobNameError = validateReservedJobName(job.name);
if (jobNameError) errors.push(jobNameError); // validate date
if (typeof job.date !== 'undefined' && !(job.date instanceof Date)) errors.push(new Error("".concat(prefix, " had an invalid Date of ").concat(job.date)));
if (jobNameError) {
errors.push(jobNameError);
} // Validate date
if (typeof job.date !== 'undefined' && !(job.date instanceof Date)) {
errors.push(new Error("".concat(prefix, " had an invalid Date of ").concat(job.date)));
}
['timeout', 'interval'].forEach(function (prop) {

@@ -227,15 +263,25 @@ if (typeof job[prop] !== 'undefined') {

}
}); // validate hasSeconds
}); // Validate hasSeconds
if (typeof job.hasSeconds !== 'undefined' && typeof job.hasSeconds !== 'boolean') errors.push(new Error("".concat(prefix, " had hasSeconds value of ").concat(job.hasSeconds, " (it must be a Boolean)"))); // validate cronValidate
if (typeof job.hasSeconds !== 'undefined' && typeof job.hasSeconds !== 'boolean') {
errors.push(new Error("".concat(prefix, " had hasSeconds value of ").concat(job.hasSeconds, " (it must be a Boolean)")));
} // Validate cronValidate
if (typeof job.cronValidate !== 'undefined' && (0, _typeof2.default)(job.cronValidate) !== 'object') errors.push(new Error("".concat(prefix, " had cronValidate value set, but it must be an Object")));
if (typeof job.cronValidate !== 'undefined' && (0, _typeof2.default)(job.cronValidate) !== 'object') {
errors.push(new Error("".concat(prefix, " had cronValidate value set, but it must be an Object")));
}
if (typeof job.cron !== 'undefined') {
errors.push.apply(errors, (0, _toConsumableArray2.default)(validateCron(job, prefix, config)));
} // validate closeWorkerAfterMs
} // Validate closeWorkerAfterMs
if (typeof job.closeWorkerAfterMs !== 'undefined' && (!Number.isFinite(job.closeWorkerAfterMs) || job.closeWorkerAfterMs <= 0)) errors.push(new Error("".concat(prefix, " had an invalid closeWorkersAfterMs value of ").concat(job.closeWorkersAfterMs, " (it must be a finite number > 0)")));
if (errors.length > 0) throw combineErrors(errors);
if (typeof job.closeWorkerAfterMs !== 'undefined' && (!Number.isFinite(job.closeWorkerAfterMs) || job.closeWorkerAfterMs <= 0)) {
errors.push(new Error("".concat(prefix, " had an invalid closeWorkersAfterMs value of ").concat(job.closeWorkersAfterMs, " (it must be a finite number > 0)")));
}
if (errors.length > 0) {
throw combineErrors(errors);
}
};

@@ -245,2 +291,2 @@

module.exports.cronValidateWithSeconds = cronValidateWithSeconds;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2Vz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YgJHtqb2IuY2xvc2VXb3JrZXJzQWZ0ZXJNc30gKGl0IG11c3QgYmUgYSBmaW5pdGUgbnVtYmVyID4gMClgXG4gICAgICApXG4gICAgKTtcbiAgfVxuXG4gIGlmIChlcnJvcnMubGVuZ3RoID4gMCkge1xuICAgIHRocm93IGNvbWJpbmVFcnJvcnMoZXJyb3JzKTtcbiAgfVxufTtcblxubW9kdWxlLmV4cG9ydHMgPSB2YWxpZGF0ZTtcbm1vZHVsZS5leHBvcnRzLmNyb25WYWxpZGF0ZVdpdGhTZWNvbmRzID0gY3JvblZhbGlkYXRlV2l0aFNlY29uZHM7XG4iXX0=
{
"name": "bree",
"description": "The best job scheduler for Node.js and JavaScript with cron, dates, ms, later, and human-friendly support. Works in Node v10+ and browsers (thanks to bthreads polyfill), uses workers to spawn sandboxed processes, and supports async/await, retries, throttling, concurrency, and cancelable promises (graceful shutdown). Simple, fast, and lightweight. Made for Forward Email and Lad.",
"version": "4.1.1",
"version": "5.0.0",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -206,4 +206,17 @@ "ava": {

"config.js"
],
"rules": {
"capitalized-comments": "off"
},
"overrides": [
{
"files": [
"test/jobs/*.js"
],
"rules": {
"unicorn/no-process-exit": "off"
}
}
]
}
}

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

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

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

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