@kakarot-ci/core 0.6.4 → 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 +45 -15
- package/dist/cli/index.js.map +2 -2
- package/dist/index.cjs +45 -15
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +45 -15
- package/dist/index.js.map +2 -2
- package/dist/src/core/orchestrator.d.ts.map +1 -1
- package/dist/src/github/client.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -435,7 +435,25 @@ var GitHubClient = class {
|
|
|
435
435
|
* Check if a file exists in the repository
|
|
436
436
|
*/
|
|
437
437
|
async fileExists(ref, path) {
|
|
438
|
+
const originalError = console.error;
|
|
439
|
+
const originalWarn = console.warn;
|
|
440
|
+
const suppress404 = (...args) => {
|
|
441
|
+
const message = String(args[0] || "");
|
|
442
|
+
if (message.includes("404") || message.includes("Not Found")) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
originalError(...args);
|
|
446
|
+
};
|
|
447
|
+
const suppress404Warn = (...args) => {
|
|
448
|
+
const message = String(args[0] || "");
|
|
449
|
+
if (message.includes("404") || message.includes("Not Found")) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
originalWarn(...args);
|
|
453
|
+
};
|
|
438
454
|
try {
|
|
455
|
+
console.error = suppress404;
|
|
456
|
+
console.warn = suppress404Warn;
|
|
439
457
|
await this.octokit.rest.repos.getContent({
|
|
440
458
|
owner: this.owner,
|
|
441
459
|
repo: this.repo,
|
|
@@ -455,6 +473,9 @@ var GitHubClient = class {
|
|
|
455
473
|
}
|
|
456
474
|
}
|
|
457
475
|
throw err;
|
|
476
|
+
} finally {
|
|
477
|
+
console.error = originalError;
|
|
478
|
+
console.warn = originalWarn;
|
|
458
479
|
}
|
|
459
480
|
}
|
|
460
481
|
/**
|
|
@@ -1982,21 +2003,30 @@ async function runPullRequest(context) {
|
|
|
1982
2003
|
if (testFiles.size > 0) {
|
|
1983
2004
|
const testRunner = createTestRunner(framework);
|
|
1984
2005
|
const writtenPaths = Array.from(testFiles.keys());
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2006
|
+
try {
|
|
2007
|
+
info("Running tests with coverage...");
|
|
2008
|
+
const finalTestResults = await testRunner.runTests({
|
|
2009
|
+
testFiles: writtenPaths,
|
|
2010
|
+
framework,
|
|
2011
|
+
packageManager,
|
|
2012
|
+
projectRoot,
|
|
2013
|
+
coverage: true
|
|
2014
|
+
});
|
|
2015
|
+
const coverageReport = readCoverageReport(projectRoot, framework);
|
|
2016
|
+
if (coverageReport) {
|
|
2017
|
+
info(`Coverage collected: ${coverageReport.total.lines.percentage.toFixed(1)}% lines`);
|
|
2018
|
+
summary.coverageReport = coverageReport;
|
|
2019
|
+
summary.testResults = finalTestResults;
|
|
2020
|
+
} else {
|
|
2021
|
+
debug("Could not read coverage report (coverage package may be missing)");
|
|
2022
|
+
}
|
|
2023
|
+
} catch (err) {
|
|
2024
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
2025
|
+
if (errorMessage.includes("coverage") || errorMessage.includes("MISSING DEPENDENCY")) {
|
|
2026
|
+
debug(`Coverage collection skipped (missing coverage package): ${errorMessage.split("\n")[0]}`);
|
|
2027
|
+
} else {
|
|
2028
|
+
throw err;
|
|
2029
|
+
}
|
|
2000
2030
|
}
|
|
2001
2031
|
}
|
|
2002
2032
|
if (config.enableAutoCommit && testFiles.size > 0) {
|