@kakarot-ci/core 0.6.5 → 0.6.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.
package/dist/cli/index.js CHANGED
@@ -69,8 +69,6 @@ var GitHubClient = class {
69
69
  this.retryDelay = 1e3;
70
70
  this.owner = options.owner;
71
71
  this.repo = options.repo;
72
- const originalConsoleError = console.error;
73
- const originalConsoleWarn = console.warn;
74
72
  this.octokit = new Octokit({
75
73
  auth: options.token,
76
74
  request: {
@@ -78,8 +76,6 @@ var GitHubClient = class {
78
76
  retryAfter: this.retryDelay / 1e3
79
77
  }
80
78
  });
81
- console.error = originalConsoleError;
82
- console.warn = originalConsoleWarn;
83
79
  }
84
80
  /**
85
81
  * Retry wrapper with exponential backoff
@@ -280,21 +276,23 @@ var GitHubClient = class {
280
276
  async fileExists(ref, path) {
281
277
  const originalError = console.error;
282
278
  const originalWarn = console.warn;
283
- const suppressedError = (...args) => {
284
- const message = args.join(" ");
285
- if (!message.includes("404") && !message.includes("Not Found")) {
286
- originalError(...args);
279
+ const suppress404 = (...args) => {
280
+ const message = String(args[0] || "");
281
+ if (message.includes("404") || message.includes("Not Found")) {
282
+ return;
287
283
  }
284
+ originalError(...args);
288
285
  };
289
- const suppressedWarn = (...args) => {
290
- const message = args.join(" ");
291
- if (!message.includes("404") && !message.includes("Not Found")) {
292
- originalWarn(...args);
286
+ const suppress404Warn = (...args) => {
287
+ const message = String(args[0] || "");
288
+ if (message.includes("404") || message.includes("Not Found")) {
289
+ return;
293
290
  }
291
+ originalWarn(...args);
294
292
  };
295
293
  try {
296
- console.error = suppressedError;
297
- console.warn = suppressedWarn;
294
+ console.error = suppress404;
295
+ console.warn = suppress404Warn;
298
296
  await this.octokit.rest.repos.getContent({
299
297
  owner: this.owner,
300
298
  repo: this.repo,
@@ -1964,13 +1962,12 @@ async function runPullRequest(context) {
1964
1962
  summary.coverageReport = coverageReport;
1965
1963
  summary.testResults = finalTestResults;
1966
1964
  } else {
1967
- warn("Could not read coverage report");
1965
+ debug("Could not read coverage report (coverage package may be missing)");
1968
1966
  }
1969
1967
  } catch (err) {
1970
1968
  const errorMessage = err instanceof Error ? err.message : String(err);
1971
1969
  if (errorMessage.includes("coverage") || errorMessage.includes("MISSING DEPENDENCY")) {
1972
- warn(`Coverage collection failed (likely missing coverage package): ${errorMessage}`);
1973
- warn("Continuing without coverage report");
1970
+ debug(`Coverage collection skipped (missing coverage package): ${errorMessage.split("\n")[0]}`);
1974
1971
  } else {
1975
1972
  throw err;
1976
1973
  }