crash-js 0.1.110 → 0.1.111

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.
Files changed (2) hide show
  1. package/crash-js/crash-js +41 -32
  2. package/package.json +2 -2
package/crash-js/crash-js CHANGED
@@ -605,44 +605,53 @@ async function
605
605
  return _array;
606
606
  }
607
607
  else if ( _run_type == "native" ) {
608
- _msg_timeout =
609
- `Timeout of length ` +
610
- `'${_timeout}' ms reached for task '${_name}'.`;
611
- _time_over =
612
- false;
613
- const
614
- _exit_timeout =
615
- () => {
608
+ if ( 0 < _timeout ) {
609
+ _msg_timeout =
610
+ `Timeout of length ` +
611
+ `'${_timeout}' ms reached for task '${_name}'.`;
612
+ _time_over =
613
+ false;
614
+ const
615
+ _exit_timeout =
616
+ () => {
617
+ throw _msg_timeout;
618
+ };
619
+ try {
620
+ setTimeout(
621
+ _exit_timeout,
622
+ _timeout);
623
+ if ( _method != "" ) {
624
+ _out =
625
+ await _program[
626
+ _method].apply(
627
+ _program,
628
+ _args);
629
+ }
630
+ else {
631
+ _out =
632
+ await _program.apply(
633
+ _program,
634
+ _args);
635
+ }
636
+ }
637
+ catch(
638
+ _error) {
639
+ _time_over =
640
+ true;
641
+ }
642
+ if ( _time_over ) {
616
643
  throw _msg_timeout;
617
- };
618
- try {
619
- setTimeout(
620
- _exit_timeout,
621
- _timeout);
622
- if ( _method != "" ) {
623
- _out =
624
- await _program[
625
- _method].apply(
626
- _program,
627
- _args);
628
644
  }
629
645
  else {
630
- _out =
631
- await _program.apply(
632
- null,
633
- _args);
646
+ return _out;
634
647
  }
635
648
  }
636
- catch(
637
- _error) {
638
- _time_over =
639
- true;
640
- }
641
- if ( _time_over ) {
642
- throw _msg_timeout;
643
- }
644
649
  else {
645
- return _out;
650
+ _out =
651
+ await _program[
652
+ _method].apply(
653
+ _program,
654
+ _args);
646
655
  }
647
656
  }
648
657
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name":
3
3
  "crash-js",
4
4
  "version":
5
- "0.1.110",
5
+ "0.1.111",
6
6
  "description":
7
7
  "Crash Javascript library.",
8
8
  "funding":
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "crash-js-webpack":
64
- "^0.0.6",
64
+ "^0.0.10",
65
65
  "eslint":
66
66
  "^10.0.3",
67
67
  "globals":