@threadbase-sh/streamer 1.47.1 → 1.47.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/dist/index.js CHANGED
@@ -5805,11 +5805,18 @@ function parseVersionOutput(output) {
5805
5805
  return match ? match[0] : null;
5806
5806
  }
5807
5807
  function runVersion(exe) {
5808
+ const viaShell = isWindows && /\.(?:cmd|bat)$/i.test(exe);
5809
+ const file = viaShell ? `"${exe}"` : exe;
5808
5810
  return new Promise((resolve2) => {
5809
- execFile2(exe, ["--version"], { timeout: VERSION_TIMEOUT_MS }, (err, stdout, stderr) => {
5810
- if (err && !stdout && !stderr) return resolve2(null);
5811
- resolve2(parseVersionOutput(`${stdout}${stderr}`));
5812
- });
5811
+ execFile2(
5812
+ file,
5813
+ ["--version"],
5814
+ { timeout: VERSION_TIMEOUT_MS, shell: viaShell, windowsHide: true },
5815
+ (err, stdout, stderr) => {
5816
+ if (err && !stdout && !stderr) return resolve2(null);
5817
+ resolve2(parseVersionOutput(`${stdout}${stderr}`));
5818
+ }
5819
+ );
5813
5820
  });
5814
5821
  }
5815
5822
  function compareToVerified(version, verified) {
@@ -5872,7 +5879,12 @@ async function providerHealth(name, resolveExe, detect = runVersion) {
5872
5879
  ]
5873
5880
  };
5874
5881
  }
5875
- const version = await detect(exe);
5882
+ let version = null;
5883
+ try {
5884
+ version = await detect(exe);
5885
+ } catch {
5886
+ version = null;
5887
+ }
5876
5888
  const warning = compareToVerified(version, verifiedAgainst);
5877
5889
  return {
5878
5890
  name,