@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.
@@ -16,7 +16,7 @@
16
16
  "@fastify/forwarded@3.0.1","MIT","https://github.com/fastify/forwarded"
17
17
  "@fastify/merge-json-schemas@0.2.1","MIT","https://github.com/fastify/merge-json-schemas"
18
18
  "@fastify/proxy-addr@5.1.0","MIT","https://github.com/fastify/proxy-addr"
19
- "@fulmenhq/tsfulmen@0.2.4","MIT","https://github.com/fulmenhq/tsfulmen"
19
+ "@fulmenhq/tsfulmen@0.2.6","MIT","https://github.com/fulmenhq/tsfulmen"
20
20
  "@isaacs/cliui@8.0.2","ISC","https://github.com/yargs/cliui"
21
21
  "@isaacs/fs-minipass@4.0.1","ISC","https://github.com/npm/fs-minipass"
22
22
  "@isaacs/string-locale-compare@1.1.0","ISC","https://github.com/isaacs/string-locale-compare"
@@ -6,8 +6,8 @@ import { dirname, extname, join, relative } from 'path';
6
6
  import { fileURLToPath } from 'url';
7
7
  import glob from 'fast-glob';
8
8
  import Ajv from 'ajv';
9
- import Ajv2019 from 'ajv/dist/2019';
10
- import Ajv2020 from 'ajv/dist/2020';
9
+ import Ajv2019 from 'ajv/dist/2019.js';
10
+ import Ajv2020 from 'ajv/dist/2020.js';
11
11
  import AjvDraft04 from 'ajv-draft-04';
12
12
  import { Readable } from 'stream';
13
13
  import picomatch from 'picomatch';
@@ -379,8 +379,18 @@ async function isGoneatAvailable(goneatPath) {
379
379
  }
380
380
  return new Promise((resolve) => {
381
381
  const proc = spawn(pathToTest, ["version"], { stdio: "ignore" });
382
- proc.on("close", (code) => resolve(code === 0));
383
- proc.on("error", () => resolve(false));
382
+ const timeout = setTimeout(() => {
383
+ proc.kill();
384
+ resolve(false);
385
+ }, 5e3);
386
+ proc.on("close", (code) => {
387
+ clearTimeout(timeout);
388
+ resolve(code === 0);
389
+ });
390
+ proc.on("error", () => {
391
+ clearTimeout(timeout);
392
+ resolve(false);
393
+ });
384
394
  });
385
395
  }
386
396
  async function runGoneatValidation(schemaPath, dataPath, goneatPath) {