@agent-native/recap-cli 0.5.0 → 0.5.2
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/recap.d.ts.map +1 -1
- package/dist/recap.js +46 -27
- package/dist/recap.js.map +1 -1
- package/dist/workflows/pr-visual-recap.yml +2 -2
- package/package.json +1 -1
|
@@ -982,13 +982,13 @@ jobs:
|
|
|
982
982
|
SHOT_STATUS=$(LIGHT_SHOT_JSON="$LIGHT_SHOT_JSON" DARK_SHOT_JSON="$DARK_SHOT_JSON" node <<'NODE'
|
|
983
983
|
const parse = (raw) => { try { return JSON.parse(raw || "{}"); } catch { return { ok: false, reason: "invalid shot JSON" }; } };
|
|
984
984
|
const shots = [["light", parse(process.env.LIGHT_SHOT_JSON)], ["dark", parse(process.env.DARK_SHOT_JSON)]];
|
|
985
|
-
const
|
|
985
|
+
const hasAllImages = shots.every(([, shot]) => typeof shot.imageUrl === "string" && shot.imageUrl.trim());
|
|
986
986
|
const reasons = shots.flatMap(([label, shot]) => {
|
|
987
987
|
if (typeof shot.reason === "string" && shot.reason.trim()) return [`${label}: ${shot.reason.trim()}`];
|
|
988
988
|
if (!(typeof shot.imageUrl === "string" && shot.imageUrl.trim())) return [`${label}: no imageUrl returned`];
|
|
989
989
|
return [];
|
|
990
990
|
});
|
|
991
|
-
process.stdout.write(JSON.stringify({ ok:
|
|
991
|
+
process.stdout.write(JSON.stringify({ ok: hasAllImages, reason: hasAllImages ? "" : reasons.join("; ").slice(0, 1000) }));
|
|
992
992
|
NODE
|
|
993
993
|
)
|
|
994
994
|
SHOT_OK=$(node -e 'try{process.stdout.write(JSON.parse(process.argv[1]).ok===true?"true":"false")}catch{process.stdout.write("false")}' "$SHOT_STATUS")
|
package/package.json
CHANGED