@ejfdelgado/ejflab-common 1.11.2 → 1.11.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ejfdelgado/ejflab-common",
3
3
  "type": "commonjs",
4
- "version": "1.11.2",
4
+ "version": "1.11.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ejfdelgado/ejflab-common.git"
@@ -720,6 +720,7 @@ class FlowChartExec {
720
720
  }
721
721
  );
722
722
  } catch (err) {
723
+ console.log("executeAsArrow exception");
723
724
  console.log(err);
724
725
  resolve(
725
726
  {
@@ -798,6 +799,7 @@ class FlowChartExec {
798
799
  // Node fail
799
800
  // Maybe handle to set maximum retries and exponetial back off
800
801
  // Add visibility in somewhere
802
+ console.log("executeAsNode exception...");
801
803
  console.log(err);
802
804
  }
803
805
  }
@@ -10,19 +10,24 @@ class CommandTimelineNext extends CommandBasic {
10
10
  }
11
11
  if ([null, undefined].indexOf(timeline.t) >= 0) {
12
12
  timeline.t = timeline.start;
13
+ if (typeof timeline.n == "number" && timeline.n > 1) {
14
+ // Always start from the period and expect to read backwards
15
+ timeline.t = timeline.t + timeline.period;
16
+ }
17
+ } else {
18
+ timeline.t = timeline.t + timeline.period;
13
19
  }
14
- // Always start from the period and expect to read backwards
15
- timeline.t = timeline.t + timeline.period;
20
+
16
21
  if (timeline.t > timeline.end) {
17
22
  timeline.t = timeline.end;
18
23
  }
19
24
 
20
25
  // Check if should create N array
21
- if (typeof timeline.n == "number" && timeline.n > 0) {
26
+ if (typeof timeline.n == "number" && timeline.n > 1) {
22
27
  const dperiod = timeline.period / timeline.n;
23
28
  const list = new Array(timeline.n);
24
- for (let i=0; i<list.length; i++) {
25
- list[i] = {done: false};
29
+ for (let i = 0; i < list.length; i++) {
30
+ list[i] = { done: false };
26
31
  }
27
32
  timeline.dperiod = dperiod;
28
33
  timeline.list = list;