@fulmenhq/tsfulmen 0.2.4 → 0.2.6

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.
@@ -11,8 +11,8 @@ import { suggest as suggest$1, substringSimilarity, score as score$1, normalize
11
11
  import 'crypto';
12
12
  import { Command } from 'commander';
13
13
  import Ajv from 'ajv';
14
- import Ajv2019 from 'ajv/dist/2019';
15
- import Ajv2020 from 'ajv/dist/2020';
14
+ import Ajv2019 from 'ajv/dist/2019.js';
15
+ import Ajv2020 from 'ajv/dist/2020.js';
16
16
  import AjvDraft04 from 'ajv-draft-04';
17
17
 
18
18
  var __defProp = Object.defineProperty;
@@ -1050,8 +1050,18 @@ async function isGoneatAvailable(goneatPath) {
1050
1050
  }
1051
1051
  return new Promise((resolve) => {
1052
1052
  const proc = spawn(pathToTest, ["version"], { stdio: "ignore" });
1053
- proc.on("close", (code) => resolve(code === 0));
1054
- proc.on("error", () => resolve(false));
1053
+ const timeout = setTimeout(() => {
1054
+ proc.kill();
1055
+ resolve(false);
1056
+ }, 5e3);
1057
+ proc.on("close", (code) => {
1058
+ clearTimeout(timeout);
1059
+ resolve(code === 0);
1060
+ });
1061
+ proc.on("error", () => {
1062
+ clearTimeout(timeout);
1063
+ resolve(false);
1064
+ });
1055
1065
  });
1056
1066
  }
1057
1067
  async function runGoneatValidation(schemaPath, dataPath, goneatPath) {