@digipair/skill-cron 0.93.0-0 → 0.93.0

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/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './libs/skill-cron/src/index';
@@ -1,7 +1,7 @@
1
1
  import { promises } from 'fs';
2
2
  import require$$0 from 'child_process';
3
3
 
4
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
5
5
 
6
6
  var dist = {};
7
7
 
@@ -156,6 +156,11 @@ function ownKeys(object, enumerableOnly) {
156
156
  var keys = Object.keys(object);
157
157
  if (Object.getOwnPropertySymbols) {
158
158
  var symbols = Object.getOwnPropertySymbols(object);
159
+ if (enumerableOnly) {
160
+ symbols = symbols.filter(function(sym) {
161
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
162
+ });
163
+ }
159
164
  keys.push.apply(keys, symbols);
160
165
  }
161
166
  return keys;
@@ -279,7 +284,7 @@ function _create_super$1(Derived) {
279
284
  return _possible_constructor_return$1(this, result);
280
285
  };
281
286
  }
282
- Object.defineProperty(luxon, '__esModule', {
287
+ Object.defineProperty(luxon, "__esModule", {
283
288
  value: true
284
289
  });
285
290
  // these aren't really private, but nor are they really useful to document
@@ -1826,7 +1831,7 @@ var singleton = null;
1826
1831
  else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);
1827
1832
  } else if (isNumber(input)) {
1828
1833
  return FixedOffsetZone.instance(input);
1829
- } else if ((typeof input === "undefined" ? "undefined" : _type_of$2(input)) === "object" && "offset" in input && typeof input.offset === "function") {
1834
+ } else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") {
1830
1835
  // This is dumb, but the instanceof check above doesn't seem to really work
1831
1836
  // so we're duck checking it
1832
1837
  return input;
@@ -1835,26 +1840,26 @@ var singleton = null;
1835
1840
  }
1836
1841
  }
1837
1842
  var numberingSystems = {
1838
- arab: "[\u0660-\u0669]",
1839
- arabext: "[\u06F0-\u06F9]",
1840
- bali: "[\u1B50-\u1B59]",
1841
- beng: "[\u09E6-\u09EF]",
1842
- deva: "[\u0966-\u096F]",
1843
- fullwide: "[\uFF10-\uFF19]",
1844
- gujr: "[\u0AE6-\u0AEF]",
1843
+ arab: "[٠-٩]",
1844
+ arabext: "[۰-۹]",
1845
+ bali: "[᭐-᭙]",
1846
+ beng: "[০-৯]",
1847
+ deva: "[०-९]",
1848
+ fullwide: "[0-9]",
1849
+ gujr: "[૦-૯]",
1845
1850
  hanidec: "[〇|一|二|三|四|五|六|七|八|九]",
1846
- khmr: "[\u17E0-\u17E9]",
1847
- knda: "[\u0CE6-\u0CEF]",
1848
- laoo: "[\u0ED0-\u0ED9]",
1849
- limb: "[\u1946-\u194F]",
1850
- mlym: "[\u0D66-\u0D6F]",
1851
- mong: "[\u1810-\u1819]",
1852
- mymr: "[\u1040-\u1049]",
1853
- orya: "[\u0B66-\u0B6F]",
1854
- tamldec: "[\u0BE6-\u0BEF]",
1855
- telu: "[\u0C66-\u0C6F]",
1856
- thai: "[\u0E50-\u0E59]",
1857
- tibt: "[\u0F20-\u0F29]",
1851
+ khmr: "[០-៩]",
1852
+ knda: "[೦-೯]",
1853
+ laoo: "[໐-໙]",
1854
+ limb: "[᥆-᥏]",
1855
+ mlym: "[൦-൯]",
1856
+ mong: "[᠐-᠙]",
1857
+ mymr: "[၀-၉]",
1858
+ orya: "[୦-୯]",
1859
+ tamldec: "[௦-௯]",
1860
+ telu: "[౦-౯]",
1861
+ thai: "[๐-๙]",
1862
+ tibt: "[༠-༩]",
1858
1863
  latn: "\\d"
1859
1864
  };
1860
1865
  var numberingSystemsUTF16 = {
@@ -2411,7 +2416,7 @@ function hasOwnProperty(obj, prop) {
2411
2416
  function validateWeekSettings(settings) {
2412
2417
  if (settings == null) {
2413
2418
  return null;
2414
- } else if ((typeof settings === "undefined" ? "undefined" : _type_of$2(settings)) !== "object") {
2419
+ } else if (typeof settings !== "object") {
2415
2420
  throw new InvalidArgumentError("Week settings must be an object");
2416
2421
  } else {
2417
2422
  if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some(function(v) {
@@ -4590,7 +4595,7 @@ function removeZeroes(vals) {
4590
4595
  * @return {Duration}
4591
4596
  */ function fromObject(obj) {
4592
4597
  var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4593
- if (obj == null || (typeof obj === "undefined" ? "undefined" : _type_of$2(obj)) !== "object") {
4598
+ if (obj == null || typeof obj !== "object") {
4594
4599
  throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got ".concat(obj === null ? "null" : typeof obj === "undefined" ? "undefined" : _type_of$2(obj)));
4595
4600
  }
4596
4601
  return new Duration({
@@ -4617,7 +4622,7 @@ function removeZeroes(vals) {
4617
4622
  return Duration.fromMillis(durationLike);
4618
4623
  } else if (Duration.isDuration(durationLike)) {
4619
4624
  return durationLike;
4620
- } else if ((typeof durationLike === "undefined" ? "undefined" : _type_of$2(durationLike)) === "object") {
4625
+ } else if (typeof durationLike === "object") {
4621
4626
  return Duration.fromObject(durationLike);
4622
4627
  } else {
4623
4628
  throw new InvalidArgumentError("Unknown duration argument ".concat(durationLike, " of type ").concat(typeof durationLike === "undefined" ? "undefined" : _type_of$2(durationLike)));
@@ -6076,7 +6081,7 @@ function tokenForPart(part, formatOpts, resolvedOpts) {
6076
6081
  }
6077
6082
  }
6078
6083
  var val = partTypeStyleToTokenVal[actualType];
6079
- if ((typeof val === "undefined" ? "undefined" : _type_of$2(val)) === "object") {
6084
+ if (typeof val === "object") {
6080
6085
  val = val[style];
6081
6086
  }
6082
6087
  if (val) {
@@ -6719,7 +6724,7 @@ function diffRelative(start, end, opts) {
6719
6724
  }
6720
6725
  function lastOpts(argList) {
6721
6726
  var opts = {}, args;
6722
- if (argList.length > 0 && _type_of$2(argList[argList.length - 1]) === "object") {
6727
+ if (argList.length > 0 && typeof argList[argList.length - 1] === "object") {
6723
6728
  opts = argList[argList.length - 1];
6724
6729
  args = Array.from(argList).slice(0, argList.length - 1);
6725
6730
  } else {
@@ -8872,7 +8877,7 @@ function lastOpts(argList) {
8872
8877
  return dateTimeish;
8873
8878
  } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {
8874
8879
  return DateTime.fromJSDate(dateTimeish);
8875
- } else if (dateTimeish && (typeof dateTimeish === "undefined" ? "undefined" : _type_of$2(dateTimeish)) === "object") {
8880
+ } else if (dateTimeish && typeof dateTimeish === "object") {
8876
8881
  return DateTime.fromObject(dateTimeish);
8877
8882
  } else {
8878
8883
  throw new InvalidArgumentError("Unknown datetime argument: ".concat(dateTimeish, ", of type ").concat(typeof dateTimeish === "undefined" ? "undefined" : _type_of$2(dateTimeish)));
@@ -8894,89 +8899,89 @@ luxon.Zone = Zone;
8894
8899
  var constants = {};
8895
8900
 
8896
8901
  (function (exports) {
8897
- Object.defineProperty(exports, "__esModule", {
8898
- value: true
8899
- });
8900
- exports.RE_RANGE = exports.RE_WILDCARDS = exports.PRESETS = exports.TIME_UNITS_LEN = exports.TIME_UNITS = exports.TIME_UNITS_MAP = exports.ALIASES = exports.PARSE_DEFAULTS = exports.CONSTRAINTS = void 0;
8901
- exports.CONSTRAINTS = Object.freeze({
8902
- second: [
8903
- 0,
8904
- 59
8905
- ],
8906
- minute: [
8907
- 0,
8908
- 59
8909
- ],
8910
- hour: [
8911
- 0,
8912
- 23
8913
- ],
8914
- dayOfMonth: [
8915
- 1,
8916
- 31
8917
- ],
8918
- month: [
8919
- 1,
8920
- 12
8921
- ],
8922
- dayOfWeek: [
8923
- 0,
8924
- 7
8925
- ]
8926
- });
8927
- exports.PARSE_DEFAULTS = Object.freeze({
8928
- second: '0',
8929
- minute: '*',
8930
- hour: '*',
8931
- dayOfMonth: '*',
8932
- month: '*',
8933
- dayOfWeek: '*'
8934
- });
8935
- exports.ALIASES = Object.freeze({
8936
- jan: 1,
8937
- feb: 2,
8938
- mar: 3,
8939
- apr: 4,
8940
- may: 5,
8941
- jun: 6,
8942
- jul: 7,
8943
- aug: 8,
8944
- sep: 9,
8945
- oct: 10,
8946
- nov: 11,
8947
- dec: 12,
8948
- sun: 0,
8949
- mon: 1,
8950
- tue: 2,
8951
- wed: 3,
8952
- thu: 4,
8953
- fri: 5,
8954
- sat: 6
8955
- });
8956
- exports.TIME_UNITS_MAP = Object.freeze({
8957
- SECOND: 'second',
8958
- MINUTE: 'minute',
8959
- HOUR: 'hour',
8960
- DAY_OF_MONTH: 'dayOfMonth',
8961
- MONTH: 'month',
8962
- DAY_OF_WEEK: 'dayOfWeek'
8963
- });
8964
- exports.TIME_UNITS = Object.freeze(Object.values(exports.TIME_UNITS_MAP));
8965
- exports.TIME_UNITS_LEN = exports.TIME_UNITS.length;
8966
- exports.PRESETS = Object.freeze({
8967
- '@yearly': '0 0 0 1 1 *',
8968
- '@monthly': '0 0 0 1 * *',
8969
- '@weekly': '0 0 0 * * 0',
8970
- '@daily': '0 0 0 * * *',
8971
- '@hourly': '0 0 * * * *',
8972
- '@minutely': '0 * * * * *',
8973
- '@secondly': '* * * * * *',
8974
- '@weekdays': '0 0 0 * * 1-5',
8975
- '@weekends': '0 0 0 * * 0,6'
8976
- });
8977
- exports.RE_WILDCARDS = /\*/g;
8978
- exports.RE_RANGE = /^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g;
8979
- } (constants));
8902
+ Object.defineProperty(exports, "__esModule", {
8903
+ value: true
8904
+ });
8905
+ exports.RE_RANGE = exports.RE_WILDCARDS = exports.PRESETS = exports.TIME_UNITS_LEN = exports.TIME_UNITS = exports.TIME_UNITS_MAP = exports.ALIASES = exports.PARSE_DEFAULTS = exports.CONSTRAINTS = void 0;
8906
+ exports.CONSTRAINTS = Object.freeze({
8907
+ second: [
8908
+ 0,
8909
+ 59
8910
+ ],
8911
+ minute: [
8912
+ 0,
8913
+ 59
8914
+ ],
8915
+ hour: [
8916
+ 0,
8917
+ 23
8918
+ ],
8919
+ dayOfMonth: [
8920
+ 1,
8921
+ 31
8922
+ ],
8923
+ month: [
8924
+ 1,
8925
+ 12
8926
+ ],
8927
+ dayOfWeek: [
8928
+ 0,
8929
+ 7
8930
+ ]
8931
+ });
8932
+ exports.PARSE_DEFAULTS = Object.freeze({
8933
+ second: "0",
8934
+ minute: "*",
8935
+ hour: "*",
8936
+ dayOfMonth: "*",
8937
+ month: "*",
8938
+ dayOfWeek: "*"
8939
+ });
8940
+ exports.ALIASES = Object.freeze({
8941
+ jan: 1,
8942
+ feb: 2,
8943
+ mar: 3,
8944
+ apr: 4,
8945
+ may: 5,
8946
+ jun: 6,
8947
+ jul: 7,
8948
+ aug: 8,
8949
+ sep: 9,
8950
+ oct: 10,
8951
+ nov: 11,
8952
+ dec: 12,
8953
+ sun: 0,
8954
+ mon: 1,
8955
+ tue: 2,
8956
+ wed: 3,
8957
+ thu: 4,
8958
+ fri: 5,
8959
+ sat: 6
8960
+ });
8961
+ exports.TIME_UNITS_MAP = Object.freeze({
8962
+ SECOND: "second",
8963
+ MINUTE: "minute",
8964
+ HOUR: "hour",
8965
+ DAY_OF_MONTH: "dayOfMonth",
8966
+ MONTH: "month",
8967
+ DAY_OF_WEEK: "dayOfWeek"
8968
+ });
8969
+ exports.TIME_UNITS = Object.freeze(Object.values(exports.TIME_UNITS_MAP));
8970
+ exports.TIME_UNITS_LEN = exports.TIME_UNITS.length;
8971
+ exports.PRESETS = Object.freeze({
8972
+ "@yearly": "0 0 0 1 1 *",
8973
+ "@monthly": "0 0 0 1 * *",
8974
+ "@weekly": "0 0 0 * * 0",
8975
+ "@daily": "0 0 0 * * *",
8976
+ "@hourly": "0 0 * * * *",
8977
+ "@minutely": "0 * * * * *",
8978
+ "@secondly": "* * * * * *",
8979
+ "@weekdays": "0 0 0 * * 1-5",
8980
+ "@weekends": "0 0 0 * * 0,6"
8981
+ });
8982
+ exports.RE_WILDCARDS = /\*/g;
8983
+ exports.RE_RANGE = /^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g;
8984
+ }(constants));
8980
8985
 
8981
8986
  var errors = {};
8982
8987
 
@@ -9149,6 +9154,7 @@ function _defineProperties$1(target, props) {
9149
9154
  }
9150
9155
  function _create_class$1(Constructor, protoProps, staticProps) {
9151
9156
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
9157
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
9152
9158
  return Constructor;
9153
9159
  }
9154
9160
  function _instanceof$1(left, right) {
@@ -9223,14 +9229,14 @@ var CronTime = /*#__PURE__*/ function() {
9223
9229
  this.month = {};
9224
9230
  this.dayOfWeek = {};
9225
9231
  if (timeZone != null && utcOffset != null) {
9226
- throw new errors_1$1.ExclusiveParametersError('timeZone', 'utcOffset');
9232
+ throw new errors_1$1.ExclusiveParametersError("timeZone", "utcOffset");
9227
9233
  }
9228
9234
  if (timeZone) {
9229
9235
  var dt = luxon_1.DateTime.fromObject({}, {
9230
9236
  zone: timeZone
9231
9237
  });
9232
9238
  if (!dt.isValid) {
9233
- throw new errors_1$1.CronError('Invalid timezone.');
9239
+ throw new errors_1$1.CronError("Invalid timezone.");
9234
9240
  }
9235
9241
  this.timeZone = timeZone;
9236
9242
  }
@@ -9260,20 +9266,20 @@ var CronTime = /*#__PURE__*/ function() {
9260
9266
  date = date.setZone(this.timeZone);
9261
9267
  }
9262
9268
  if (this.utcOffset !== undefined) {
9263
- var sign = this.utcOffset < 0 ? '-' : '+';
9269
+ var sign = this.utcOffset < 0 ? "-" : "+";
9264
9270
  var offsetHours = Math.trunc(this.utcOffset / 60);
9265
- var offsetHoursStr = String(Math.abs(offsetHours)).padStart(2, '0');
9271
+ var offsetHoursStr = String(Math.abs(offsetHours)).padStart(2, "0");
9266
9272
  var offsetMins = Math.abs(this.utcOffset - offsetHours * 60);
9267
- var offsetMinsStr = String(offsetMins).padStart(2, '0');
9273
+ var offsetMinsStr = String(offsetMins).padStart(2, "0");
9268
9274
  var utcZone = "UTC".concat(sign).concat(offsetHoursStr, ":").concat(offsetMinsStr);
9269
9275
  date = date.setZone(utcZone);
9270
9276
  if (!date.isValid) {
9271
- throw new errors_1$1.CronError('ERROR: You specified an invalid UTC offset.');
9277
+ throw new errors_1$1.CronError("ERROR: You specified an invalid UTC offset.");
9272
9278
  }
9273
9279
  }
9274
9280
  if (this.realDate) {
9275
9281
  if (luxon_1.DateTime.local() > date) {
9276
- throw new errors_1$1.CronError('WARNING: Date in past. Will never be fired.');
9282
+ throw new errors_1$1.CronError("WARNING: Date in past. Will never be fired.");
9277
9283
  }
9278
9284
  return date;
9279
9285
  }
@@ -9298,7 +9304,7 @@ var CronTime = /*#__PURE__*/ function() {
9298
9304
  {
9299
9305
  key: "toString",
9300
9306
  value: function toString() {
9301
- return this.toJSON().join(' ');
9307
+ return this.toJSON().join(" ");
9302
9308
  }
9303
9309
  },
9304
9310
  {
@@ -9331,7 +9337,7 @@ var CronTime = /*#__PURE__*/ function() {
9331
9337
  }
9332
9338
  }
9333
9339
  if (!date.isValid) {
9334
- throw new errors_1$1.CronError('ERROR: You specified an invalid date.');
9340
+ throw new errors_1$1.CronError("ERROR: You specified an invalid date.");
9335
9341
  }
9336
9342
  var maxMatch = luxon_1.DateTime.now().plus({
9337
9343
  years: 8
@@ -9597,13 +9603,13 @@ var CronTime = /*#__PURE__*/ function() {
9597
9603
  key: "_wcOrAll",
9598
9604
  value: function _wcOrAll(unit) {
9599
9605
  if (this._hasAll(unit)) {
9600
- return '*';
9606
+ return "*";
9601
9607
  }
9602
9608
  var all = [];
9603
9609
  for(var time in this[unit]){
9604
9610
  all.push(time);
9605
9611
  }
9606
- return all.join(',');
9612
+ return all.join(",");
9607
9613
  }
9608
9614
  },
9609
9615
  {
@@ -9636,10 +9642,10 @@ var CronTime = /*#__PURE__*/ function() {
9636
9642
  });
9637
9643
  var units = source.trim().split(/\s+/);
9638
9644
  if (units.length < constants_1.TIME_UNITS_LEN - 1) {
9639
- throw new errors_1$1.CronError('Too few fields');
9645
+ throw new errors_1$1.CronError("Too few fields");
9640
9646
  }
9641
9647
  if (units.length > constants_1.TIME_UNITS_LEN) {
9642
- throw new errors_1$1.CronError('Too many fields');
9648
+ throw new errors_1$1.CronError("Too many fields");
9643
9649
  }
9644
9650
  var unitsLen = units.length;
9645
9651
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -9674,15 +9680,15 @@ var CronTime = /*#__PURE__*/ function() {
9674
9680
  var constraints = constants_1.CONSTRAINTS[unit];
9675
9681
  var low = constraints[0];
9676
9682
  var high = constraints[1];
9677
- var fields = value.split(',');
9683
+ var fields = value.split(",");
9678
9684
  fields.forEach(function(field) {
9679
- var wildcardIndex = field.indexOf('*');
9685
+ var wildcardIndex = field.indexOf("*");
9680
9686
  if (wildcardIndex !== -1 && wildcardIndex !== 0) {
9681
9687
  throw new errors_1$1.CronError("Field (".concat(field, ") has an invalid wildcard expression"));
9682
9688
  }
9683
9689
  });
9684
9690
  value = value.replace(constants_1.RE_WILDCARDS, "".concat(low, "-").concat(high));
9685
- var allRanges = value.split(',');
9691
+ var allRanges = value.split(",");
9686
9692
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
9687
9693
  try {
9688
9694
  for(var _iterator = allRanges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
@@ -9693,7 +9699,7 @@ var CronTime = /*#__PURE__*/ function() {
9693
9699
  var lower = parseInt(mLower, 10);
9694
9700
  var upper = mUpper !== undefined ? parseInt(mUpper, 10) : undefined;
9695
9701
  var wasStepDefined = mStep !== undefined;
9696
- var step = parseInt(mStep !== null && mStep !== void 0 ? mStep : '1', 10);
9702
+ var step = parseInt(mStep !== null && mStep !== void 0 ? mStep : "1", 10);
9697
9703
  if (step === 0) {
9698
9704
  throw new errors_1$1.CronError("Field (".concat(unit, ") has a step of zero"));
9699
9705
  }
@@ -9715,7 +9721,7 @@ var CronTime = /*#__PURE__*/ function() {
9715
9721
  typeObj[pointer] = true;
9716
9722
  pointer += step;
9717
9723
  }while (pointer <= upper);
9718
- if (unit === 'dayOfWeek') {
9724
+ if (unit === "dayOfWeek") {
9719
9725
  if (!typeObj[0] && !!typeObj[7]) typeObj[0] = typeObj[7];
9720
9726
  delete typeObj[7];
9721
9727
  }
@@ -9944,7 +9950,7 @@ var CronJob = /*#__PURE__*/ function() {
9944
9950
  this.waitForCompletion = Boolean(waitForCompletion);
9945
9951
  this.errorHandler = errorHandler;
9946
9952
  if (timeZone != null && utcOffset != null) {
9947
- throw new errors_1.ExclusiveParametersError('timeZone', 'utcOffset');
9953
+ throw new errors_1.ExclusiveParametersError("timeZone", "utcOffset");
9948
9954
  }
9949
9955
  if (timeZone != null) {
9950
9956
  this.cronTime = new time_1.CronTime(cronTime, timeZone, null);
@@ -9981,16 +9987,16 @@ var CronJob = /*#__PURE__*/ function() {
9981
9987
  value: function _fnWrap(cmd) {
9982
9988
  var _a, _b;
9983
9989
  switch(typeof cmd === "undefined" ? "undefined" : _type_of(cmd)){
9984
- case 'function':
9990
+ case "function":
9985
9991
  {
9986
9992
  return cmd;
9987
9993
  }
9988
- case 'string':
9994
+ case "string":
9989
9995
  {
9990
- var _cmd_split = _to_array(cmd.split(' ')), command = _cmd_split[0], args = _cmd_split.slice(1);
9996
+ var _cmd_split = _to_array(cmd.split(" ")), command = _cmd_split[0], args = _cmd_split.slice(1);
9991
9997
  return child_process_1.spawn.bind(undefined, command !== null && command !== void 0 ? command : cmd, args, {});
9992
9998
  }
9993
- case 'object':
9999
+ case "object":
9994
10000
  {
9995
10001
  return child_process_1.spawn.bind(undefined, cmd.command, (_a = cmd.args) !== null && _a !== void 0 ? _a : [], (_b = cmd.options) !== null && _b !== void 0 ? _b : {});
9996
10002
  }
@@ -10000,7 +10006,7 @@ var CronJob = /*#__PURE__*/ function() {
10000
10006
  {
10001
10007
  key: "addCallback",
10002
10008
  value: function addCallback(callback) {
10003
- if (typeof callback === 'function') {
10009
+ if (typeof callback === "function") {
10004
10010
  this._callbacks.push(callback);
10005
10011
  }
10006
10012
  }
@@ -10009,7 +10015,7 @@ var CronJob = /*#__PURE__*/ function() {
10009
10015
  key: "setTime",
10010
10016
  value: function setTime(time) {
10011
10017
  if (!_instanceof(time, time_1.CronTime)) {
10012
- throw new errors_1.CronError('time must be an instance of CronTime.');
10018
+ throw new errors_1.CronError("time must be an instance of CronTime.");
10013
10019
  }
10014
10020
  var wasRunning = this.running;
10015
10021
  this.stop();
@@ -10113,7 +10119,7 @@ var CronJob = /*#__PURE__*/ function() {
10113
10119
  case 10:
10114
10120
  error = _state.sent();
10115
10121
  if (this.errorHandler != null) this.errorHandler(error);
10116
- else console.error('[Cron] error in callback', error);
10122
+ else console.error("[Cron] error in callback", error);
10117
10123
  return [
10118
10124
  3,
10119
10125
  12
@@ -10150,7 +10156,7 @@ var CronJob = /*#__PURE__*/ function() {
10150
10156
  var setCronTimeout = function(t) {
10151
10157
  startTime = Date.now();
10152
10158
  _this._timeout = setTimeout(callbackWrapper, t);
10153
- if (_this.unrefTimeout && typeof _this._timeout.unref === 'function') {
10159
+ if (_this.unrefTimeout && typeof _this._timeout.unref === "function") {
10154
10160
  _this._timeout.unref();
10155
10161
  }
10156
10162
  };
@@ -10205,7 +10211,7 @@ var CronJob = /*#__PURE__*/ function() {
10205
10211
  return _ts_generator(this, function(_state) {
10206
10212
  switch(_state.label){
10207
10213
  case 0:
10208
- if (typeof this.onComplete !== 'function') return [
10214
+ if (typeof this.onComplete !== "function") return [
10209
10215
  2
10210
10216
  ];
10211
10217
  _state.label = 1;
@@ -10228,7 +10234,7 @@ var CronJob = /*#__PURE__*/ function() {
10228
10234
  ];
10229
10235
  case 3:
10230
10236
  error = _state.sent();
10231
- console.error('[Cron] error in onComplete callback:', error);
10237
+ console.error("[Cron] error in onComplete callback:", error);
10232
10238
  return [
10233
10239
  3,
10234
10240
  4
@@ -10315,7 +10321,7 @@ var CronJob = /*#__PURE__*/ function() {
10315
10321
  key: "from",
10316
10322
  value: function from(params) {
10317
10323
  if (params.timeZone != null && params.utcOffset != null) {
10318
- throw new errors_1.ExclusiveParametersError('timeZone', 'utcOffset');
10324
+ throw new errors_1.ExclusiveParametersError("timeZone", "utcOffset");
10319
10325
  }
10320
10326
  if (params.timeZone != null) {
10321
10327
  return new CronJob(params.cronTime, params.onTick, params.onComplete, params.start, params.timeZone, params.context, params.runOnInit, params.utcOffset, params.unrefTimeout, params.waitForCompletion, params.errorHandler);
@@ -10332,34 +10338,34 @@ var CronJob = /*#__PURE__*/ function() {
10332
10338
  job.CronJob = CronJob;
10333
10339
 
10334
10340
  (function (exports) {
10335
- Object.defineProperty(exports, "__esModule", {
10336
- value: true
10337
- });
10338
- exports.timeout = exports.sendAt = exports.CronTime = exports.CronJob = void 0;
10339
- var time_1 = time;
10340
- var job_1 = job;
10341
- Object.defineProperty(exports, "CronJob", {
10342
- enumerable: true,
10343
- get: function get() {
10344
- return job_1.CronJob;
10345
- }
10346
- });
10347
- var time_2 = time;
10348
- Object.defineProperty(exports, "CronTime", {
10349
- enumerable: true,
10350
- get: function get() {
10351
- return time_2.CronTime;
10352
- }
10353
- });
10354
- var sendAt = function(cronTime) {
10355
- return new time_1.CronTime(cronTime).sendAt();
10356
- };
10357
- exports.sendAt = sendAt;
10358
- var timeout = function(cronTime) {
10359
- return new time_1.CronTime(cronTime).getTimeout();
10360
- };
10361
- exports.timeout = timeout;
10362
- } (dist));
10341
+ Object.defineProperty(exports, "__esModule", {
10342
+ value: true
10343
+ });
10344
+ exports.timeout = exports.sendAt = exports.CronTime = exports.CronJob = void 0;
10345
+ var time_1 = time;
10346
+ var job_1 = job;
10347
+ Object.defineProperty(exports, "CronJob", {
10348
+ enumerable: true,
10349
+ get: function get() {
10350
+ return job_1.CronJob;
10351
+ }
10352
+ });
10353
+ var time_2 = time;
10354
+ Object.defineProperty(exports, "CronTime", {
10355
+ enumerable: true,
10356
+ get: function get() {
10357
+ return time_2.CronTime;
10358
+ }
10359
+ });
10360
+ var sendAt = function(cronTime) {
10361
+ return new time_1.CronTime(cronTime).sendAt();
10362
+ };
10363
+ exports.sendAt = sendAt;
10364
+ var timeout = function(cronTime) {
10365
+ return new time_1.CronTime(cronTime).getTimeout();
10366
+ };
10367
+ exports.timeout = timeout;
10368
+ }(dist));
10363
10369
 
10364
10370
  /**
10365
10371
  * Convert array of 16 byte values to UUID string format of the form:
@@ -10375,7 +10381,7 @@ function unsafeStringify(arr) {
10375
10381
  //
10376
10382
  // Note to future-self: No, you can't remove the `toLowerCase()` call.
10377
10383
  // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
10378
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
10384
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
10379
10385
  }
10380
10386
 
10381
10387
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
@@ -10387,21 +10393,21 @@ function rng() {
10387
10393
  // lazy load so that environments that need to polyfill have a chance to do so
10388
10394
  if (!getRandomValues) {
10389
10395
  // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
10390
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
10396
+ getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
10391
10397
  if (!getRandomValues) {
10392
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
10398
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
10393
10399
  }
10394
10400
  }
10395
10401
  return getRandomValues(rnds8);
10396
10402
  }
10397
10403
 
10398
- var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
10404
+ var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
10399
10405
  var native = {
10400
10406
  randomUUID: randomUUID
10401
10407
  };
10402
10408
 
10403
10409
  function v4(options, buf, offset) {
10404
- if (native.randomUUID && true && !options) {
10410
+ if (native.randomUUID && !buf && !options) {
10405
10411
  return native.randomUUID();
10406
10412
  }
10407
10413
  options = options || {};
@@ -10409,6 +10415,14 @@ function v4(options, buf, offset) {
10409
10415
  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
10410
10416
  rnds[6] = rnds[6] & 0x0f | 0x40;
10411
10417
  rnds[8] = rnds[8] & 0x3f | 0x80;
10418
+ // Copy bytes to buffer, if provided
10419
+ if (buf) {
10420
+ offset = offset || 0;
10421
+ for(var i = 0; i < 16; ++i){
10422
+ buf[offset + i] = rnds[i];
10423
+ }
10424
+ return buf;
10425
+ }
10412
10426
  return unsafeStringify(rnds);
10413
10427
  }
10414
10428
 
@@ -0,0 +1 @@
1
+ export * from './lib/skill-cron';
@@ -14,4 +14,3 @@ export declare const deleteCron: (params: any, pinsSettingsList: PinsSettings[],
14
14
  }>;
15
15
  export declare const enableCron: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
16
16
  export declare const disableCron: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
17
- //# sourceMappingURL=skill-cron.d.ts.map