@kakarot-ci/core 0.6.2 → 0.6.3
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 +12 -4
- package/dist/cli/index.js.map +2 -2
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +12 -4
- package/dist/index.js.map +2 -2
- package/dist/src/github/client.d.ts.map +1 -1
- package/dist/src/utils/ast-analyzer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -375,7 +375,10 @@ var GitHubClient = class {
|
|
|
375
375
|
});
|
|
376
376
|
return true;
|
|
377
377
|
} catch (err) {
|
|
378
|
-
if (err
|
|
378
|
+
if (err && typeof err === "object" && "status" in err && err.status === 404) {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
if (err instanceof Error && (err.message.includes("404") || err.message.includes("Not Found"))) {
|
|
379
382
|
return false;
|
|
380
383
|
}
|
|
381
384
|
throw err;
|
|
@@ -662,9 +665,14 @@ async function detectTestFile(filePath, ref, githubClient, testDirectory) {
|
|
|
662
665
|
...testPatterns.map((pattern) => `__tests__/${baseName}${pattern}`)
|
|
663
666
|
];
|
|
664
667
|
for (const testPath of locations) {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
+
try {
|
|
669
|
+
const exists = await githubClient.fileExists(ref, testPath);
|
|
670
|
+
if (exists) {
|
|
671
|
+
return testPath;
|
|
672
|
+
}
|
|
673
|
+
} catch (err) {
|
|
674
|
+
debug(`Error checking test file ${testPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
675
|
+
continue;
|
|
668
676
|
}
|
|
669
677
|
}
|
|
670
678
|
return void 0;
|