@digipair/skill-cron 0.12.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
package/index.cjs.js CHANGED
@@ -37419,7 +37419,7 @@ let CronService = class CronService {
37419
37419
  }
37420
37420
  async start(path) {
37421
37421
  const content = await fs.promises.readFile(`${path}/planning.json`, 'utf8');
37422
- const planning = JSON.parse(content);
37422
+ const planning = JSON.parse(`[${content}]`);
37423
37423
  for (const plan of planning){
37424
37424
  const job = new dist.CronJob(plan.time, async ()=>{
37425
37425
  await this.startTask(path, plan.digipair, plan.reasoning);
package/index.esm.js CHANGED
@@ -23491,14 +23491,14 @@ function indent(str, spaces) {
23491
23491
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23492
23492
  // match is required
23493
23493
  if (!match) {
23494
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23494
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23495
23495
  v: nextMatch1
23496
23496
  };
23497
23497
  }
23498
23498
  var token = match.token, offset = match.offset;
23499
23499
  i1 += offset;
23500
23500
  if (token === " ") {
23501
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23501
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23502
23502
  }
23503
23503
  tokens1 = _to_consumable_array$3(tokens1).concat([
23504
23504
  token
@@ -23517,7 +23517,7 @@ function indent(str, spaces) {
23517
23517
  if (contextKeys.some(function(el) {
23518
23518
  return el.startsWith(name);
23519
23519
  })) {
23520
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23520
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23521
23521
  }
23522
23522
  if (dateTimeIdentifiers.some(function(el) {
23523
23523
  return el === name;
@@ -23536,9 +23536,9 @@ function indent(str, spaces) {
23536
23536
  if (dateTimeIdentifiers.some(function(el) {
23537
23537
  return el.startsWith(name);
23538
23538
  })) {
23539
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23539
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23540
23540
  }
23541
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23541
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23542
23542
  v: nextMatch1
23543
23543
  };
23544
23544
  };
@@ -37393,7 +37393,7 @@ let CronService = class CronService {
37393
37393
  }
37394
37394
  async start(path) {
37395
37395
  const content = await promises.readFile(`${path}/planning.json`, 'utf8');
37396
- const planning = JSON.parse(content);
37396
+ const planning = JSON.parse(`[${content}]`);
37397
37397
  for (const plan of planning){
37398
37398
  const job = new dist.CronJob(plan.time, async ()=>{
37399
37399
  await this.startTask(path, plan.digipair, plan.reasoning);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-cron",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"