@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/cli/index.js
CHANGED
|
@@ -280,7 +280,10 @@ var GitHubClient = class {
|
|
|
280
280
|
});
|
|
281
281
|
return true;
|
|
282
282
|
} catch (err) {
|
|
283
|
-
if (err
|
|
283
|
+
if (err && typeof err === "object" && "status" in err && err.status === 404) {
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
if (err instanceof Error && (err.message.includes("404") || err.message.includes("Not Found"))) {
|
|
284
287
|
return false;
|
|
285
288
|
}
|
|
286
289
|
throw err;
|
|
@@ -672,9 +675,14 @@ async function detectTestFile(filePath, ref, githubClient, testDirectory) {
|
|
|
672
675
|
...testPatterns.map((pattern) => `__tests__/${baseName}${pattern}`)
|
|
673
676
|
];
|
|
674
677
|
for (const testPath of locations) {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
+
try {
|
|
679
|
+
const exists = await githubClient.fileExists(ref, testPath);
|
|
680
|
+
if (exists) {
|
|
681
|
+
return testPath;
|
|
682
|
+
}
|
|
683
|
+
} catch (err) {
|
|
684
|
+
debug(`Error checking test file ${testPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
685
|
+
continue;
|
|
678
686
|
}
|
|
679
687
|
}
|
|
680
688
|
return void 0;
|