@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.js
CHANGED
|
@@ -369,7 +369,25 @@ var GitHubClient = class {
|
|
|
369
369
|
* Check if a file exists in the repository
|
|
370
370
|
*/
|
|
371
371
|
async fileExists(ref, path) {
|
|
372
|
+
const originalError = console.error;
|
|
373
|
+
const originalWarn = console.warn;
|
|
374
|
+
const suppress404 = (...args) => {
|
|
375
|
+
const message = String(args[0] || "");
|
|
376
|
+
if (message.includes("404") || message.includes("Not Found")) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
originalError(...args);
|
|
380
|
+
};
|
|
381
|
+
const suppress404Warn = (...args) => {
|
|
382
|
+
const message = String(args[0] || "");
|
|
383
|
+
if (message.includes("404") || message.includes("Not Found")) {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
originalWarn(...args);
|
|
387
|
+
};
|
|
372
388
|
try {
|
|
389
|
+
console.error = suppress404;
|
|
390
|
+
console.warn = suppress404Warn;
|
|
373
391
|
await this.octokit.rest.repos.getContent({
|
|
374
392
|
owner: this.owner,
|
|
375
393
|
repo: this.repo,
|
|
@@ -389,6 +407,9 @@ var GitHubClient = class {
|
|
|
389
407
|
}
|
|
390
408
|
}
|
|
391
409
|
throw err;
|
|
410
|
+
} finally {
|
|
411
|
+
console.error = originalError;
|
|
412
|
+
console.warn = originalWarn;
|
|
392
413
|
}
|
|
393
414
|
}
|
|
394
415
|
/**
|
|
@@ -1916,21 +1937,30 @@ async function runPullRequest(context) {
|
|
|
1916
1937
|
if (testFiles.size > 0) {
|
|
1917
1938
|
const testRunner = createTestRunner(framework);
|
|
1918
1939
|
const writtenPaths = Array.from(testFiles.keys());
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1940
|
+
try {
|
|
1941
|
+
info("Running tests with coverage...");
|
|
1942
|
+
const finalTestResults = await testRunner.runTests({
|
|
1943
|
+
testFiles: writtenPaths,
|
|
1944
|
+
framework,
|
|
1945
|
+
packageManager,
|
|
1946
|
+
projectRoot,
|
|
1947
|
+
coverage: true
|
|
1948
|
+
});
|
|
1949
|
+
const coverageReport = readCoverageReport(projectRoot, framework);
|
|
1950
|
+
if (coverageReport) {
|
|
1951
|
+
info(`Coverage collected: ${coverageReport.total.lines.percentage.toFixed(1)}% lines`);
|
|
1952
|
+
summary.coverageReport = coverageReport;
|
|
1953
|
+
summary.testResults = finalTestResults;
|
|
1954
|
+
} else {
|
|
1955
|
+
debug("Could not read coverage report (coverage package may be missing)");
|
|
1956
|
+
}
|
|
1957
|
+
} catch (err) {
|
|
1958
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
1959
|
+
if (errorMessage.includes("coverage") || errorMessage.includes("MISSING DEPENDENCY")) {
|
|
1960
|
+
debug(`Coverage collection skipped (missing coverage package): ${errorMessage.split("\n")[0]}`);
|
|
1961
|
+
} else {
|
|
1962
|
+
throw err;
|
|
1963
|
+
}
|
|
1934
1964
|
}
|
|
1935
1965
|
}
|
|
1936
1966
|
if (config.enableAutoCommit && testFiles.size > 0) {
|