@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/index.cjs CHANGED
@@ -230,8 +230,6 @@ var GitHubClient = class {
230
230
  this.retryDelay = 1e3;
231
231
  this.owner = options.owner;
232
232
  this.repo = options.repo;
233
- const originalConsoleError = console.error;
234
- const originalConsoleWarn = console.warn;
235
233
  this.octokit = new import_rest.Octokit({
236
234
  auth: options.token,
237
235
  request: {
@@ -239,8 +237,6 @@ var GitHubClient = class {
239
237
  retryAfter: this.retryDelay / 1e3
240
238
  }
241
239
  });
242
- console.error = originalConsoleError;
243
- console.warn = originalConsoleWarn;
244
240
  }
245
241
  /**
246
242
  * Retry wrapper with exponential backoff
@@ -441,21 +437,23 @@ var GitHubClient = class {
441
437
  async fileExists(ref, path) {
442
438
  const originalError = console.error;
443
439
  const originalWarn = console.warn;
444
- const suppressedError = (...args) => {
445
- const message = args.join(" ");
446
- if (!message.includes("404") && !message.includes("Not Found")) {
447
- originalError(...args);
440
+ const suppress404 = (...args) => {
441
+ const message = String(args[0] || "");
442
+ if (message.includes("404") || message.includes("Not Found")) {
443
+ return;
448
444
  }
445
+ originalError(...args);
449
446
  };
450
- const suppressedWarn = (...args) => {
451
- const message = args.join(" ");
452
- if (!message.includes("404") && !message.includes("Not Found")) {
453
- originalWarn(...args);
447
+ const suppress404Warn = (...args) => {
448
+ const message = String(args[0] || "");
449
+ if (message.includes("404") || message.includes("Not Found")) {
450
+ return;
454
451
  }
452
+ originalWarn(...args);
455
453
  };
456
454
  try {
457
- console.error = suppressedError;
458
- console.warn = suppressedWarn;
455
+ console.error = suppress404;
456
+ console.warn = suppress404Warn;
459
457
  await this.octokit.rest.repos.getContent({
460
458
  owner: this.owner,
461
459
  repo: this.repo,
@@ -2020,13 +2018,12 @@ async function runPullRequest(context) {
2020
2018
  summary.coverageReport = coverageReport;
2021
2019
  summary.testResults = finalTestResults;
2022
2020
  } else {
2023
- warn("Could not read coverage report");
2021
+ debug("Could not read coverage report (coverage package may be missing)");
2024
2022
  }
2025
2023
  } catch (err) {
2026
2024
  const errorMessage = err instanceof Error ? err.message : String(err);
2027
2025
  if (errorMessage.includes("coverage") || errorMessage.includes("MISSING DEPENDENCY")) {
2028
- warn(`Coverage collection failed (likely missing coverage package): ${errorMessage}`);
2029
- warn("Continuing without coverage report");
2026
+ debug(`Coverage collection skipped (missing coverage package): ${errorMessage.split("\n")[0]}`);
2030
2027
  } else {
2031
2028
  throw err;
2032
2029
  }