@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.cjs
CHANGED
|
@@ -441,7 +441,10 @@ var GitHubClient = class {
|
|
|
441
441
|
});
|
|
442
442
|
return true;
|
|
443
443
|
} catch (err) {
|
|
444
|
-
if (err
|
|
444
|
+
if (err && typeof err === "object" && "status" in err && err.status === 404) {
|
|
445
|
+
return false;
|
|
446
|
+
}
|
|
447
|
+
if (err instanceof Error && (err.message.includes("404") || err.message.includes("Not Found"))) {
|
|
445
448
|
return false;
|
|
446
449
|
}
|
|
447
450
|
throw err;
|
|
@@ -728,9 +731,14 @@ async function detectTestFile(filePath, ref, githubClient, testDirectory) {
|
|
|
728
731
|
...testPatterns.map((pattern) => `__tests__/${baseName}${pattern}`)
|
|
729
732
|
];
|
|
730
733
|
for (const testPath of locations) {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
+
try {
|
|
735
|
+
const exists = await githubClient.fileExists(ref, testPath);
|
|
736
|
+
if (exists) {
|
|
737
|
+
return testPath;
|
|
738
|
+
}
|
|
739
|
+
} catch (err) {
|
|
740
|
+
debug(`Error checking test file ${testPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
741
|
+
continue;
|
|
734
742
|
}
|
|
735
743
|
}
|
|
736
744
|
return void 0;
|