@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/cli/index.js
CHANGED
|
@@ -274,7 +274,25 @@ var GitHubClient = class {
|
|
|
274
274
|
* Check if a file exists in the repository
|
|
275
275
|
*/
|
|
276
276
|
async fileExists(ref, path) {
|
|
277
|
+
const originalError = console.error;
|
|
278
|
+
const originalWarn = console.warn;
|
|
279
|
+
const suppress404 = (...args) => {
|
|
280
|
+
const message = String(args[0] || "");
|
|
281
|
+
if (message.includes("404") || message.includes("Not Found")) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
originalError(...args);
|
|
285
|
+
};
|
|
286
|
+
const suppress404Warn = (...args) => {
|
|
287
|
+
const message = String(args[0] || "");
|
|
288
|
+
if (message.includes("404") || message.includes("Not Found")) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
originalWarn(...args);
|
|
292
|
+
};
|
|
277
293
|
try {
|
|
294
|
+
console.error = suppress404;
|
|
295
|
+
console.warn = suppress404Warn;
|
|
278
296
|
await this.octokit.rest.repos.getContent({
|
|
279
297
|
owner: this.owner,
|
|
280
298
|
repo: this.repo,
|
|
@@ -294,6 +312,9 @@ var GitHubClient = class {
|
|
|
294
312
|
}
|
|
295
313
|
}
|
|
296
314
|
throw err;
|
|
315
|
+
} finally {
|
|
316
|
+
console.error = originalError;
|
|
317
|
+
console.warn = originalWarn;
|
|
297
318
|
}
|
|
298
319
|
}
|
|
299
320
|
/**
|
|
@@ -1926,21 +1947,30 @@ async function runPullRequest(context) {
|
|
|
1926
1947
|
if (testFiles.size > 0) {
|
|
1927
1948
|
const testRunner = createTestRunner(framework);
|
|
1928
1949
|
const writtenPaths = Array.from(testFiles.keys());
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1950
|
+
try {
|
|
1951
|
+
info("Running tests with coverage...");
|
|
1952
|
+
const finalTestResults = await testRunner.runTests({
|
|
1953
|
+
testFiles: writtenPaths,
|
|
1954
|
+
framework,
|
|
1955
|
+
packageManager,
|
|
1956
|
+
projectRoot,
|
|
1957
|
+
coverage: true
|
|
1958
|
+
});
|
|
1959
|
+
const coverageReport = readCoverageReport(projectRoot, framework);
|
|
1960
|
+
if (coverageReport) {
|
|
1961
|
+
info(`Coverage collected: ${coverageReport.total.lines.percentage.toFixed(1)}% lines`);
|
|
1962
|
+
summary.coverageReport = coverageReport;
|
|
1963
|
+
summary.testResults = finalTestResults;
|
|
1964
|
+
} else {
|
|
1965
|
+
debug("Could not read coverage report (coverage package may be missing)");
|
|
1966
|
+
}
|
|
1967
|
+
} catch (err) {
|
|
1968
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
1969
|
+
if (errorMessage.includes("coverage") || errorMessage.includes("MISSING DEPENDENCY")) {
|
|
1970
|
+
debug(`Coverage collection skipped (missing coverage package): ${errorMessage.split("\n")[0]}`);
|
|
1971
|
+
} else {
|
|
1972
|
+
throw err;
|
|
1973
|
+
}
|
|
1944
1974
|
}
|
|
1945
1975
|
}
|
|
1946
1976
|
if (config.enableAutoCommit && testFiles.size > 0) {
|