@ztimson/utils 0.27.6 → 0.27.7

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.mjs CHANGED
@@ -1881,11 +1881,12 @@ function compareVersions(target, vs) {
1881
1881
  return tMajor > vMajor || tMinor > vMinor || tPatch > vPatch ? 1 : tMajor < vMajor || tMinor < vMinor || tPatch < vPatch ? -1 : 0;
1882
1882
  }
1883
1883
  function consoleInterceptor(out = console, map) {
1884
- const stderr = [], stdout = [];
1884
+ const logs = { debug: [], log: [], info: [], warn: [], error: [], stderr: [], stdout: [] };
1885
1885
  const cWrapper = (type) => (...args) => {
1886
1886
  if (out) out[type](...args);
1887
- if (type == "error") stderr.push(...args);
1888
- else stdout.push(...args);
1887
+ logs[type].push(...args);
1888
+ if (type == "error") logs.stderr.push(...args);
1889
+ else logs.stdout.push(...args);
1889
1890
  };
1890
1891
  return {
1891
1892
  debug: (map == null ? void 0 : map.debug) != "none" ? cWrapper((map == null ? void 0 : map.debug) || "debug") : () => {
@@ -1898,8 +1899,7 @@ function consoleInterceptor(out = console, map) {
1898
1899
  },
1899
1900
  error: (map == null ? void 0 : map.error) != "none" ? cWrapper((map == null ? void 0 : map.error) || "error") : () => {
1900
1901
  },
1901
- stderr,
1902
- stdout
1902
+ output: logs
1903
1903
  };
1904
1904
  }
1905
1905
  function escapeRegex(value) {