e2e-agent-runner 1.9.0 → 1.10.0
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/git.mjs +15 -1
- package/package.json +1 -1
package/git.mjs
CHANGED
|
@@ -159,7 +159,21 @@ export async function probeFolder(cwd) {
|
|
|
159
159
|
const remote = await originUrl(cwd); // origin 없으면 null(로컬 전용 저장소)
|
|
160
160
|
const dirty = await run(cwd, 'status', '--porcelain');
|
|
161
161
|
const dirtyCount = dirty ? dirty.split('\n').filter(Boolean).length : 0;
|
|
162
|
-
|
|
162
|
+
// 배포 라인 상태(1.10.0) — 실패해도 probe 자체는 성공시킨다.
|
|
163
|
+
let deployed_line = null;
|
|
164
|
+
try {
|
|
165
|
+
const lineBase = await resolveBase(cwd);
|
|
166
|
+
const line = await deployedLine(cwd, lineBase);
|
|
167
|
+
let ahead = 0;
|
|
168
|
+
if (line.state === 'ahead' || line.state === 'diverged') {
|
|
169
|
+
const n = await run(cwd, 'rev-list', '--count', `${lineBase}..${line.sha}`);
|
|
170
|
+
ahead = Number.parseInt(n, 10) || 0;
|
|
171
|
+
}
|
|
172
|
+
deployed_line = { base: lineBase, state: line.state, sha: line.sha, ahead_commits: ahead };
|
|
173
|
+
} catch {
|
|
174
|
+
deployed_line = null;
|
|
175
|
+
}
|
|
176
|
+
return { ...base, ok: true, branch, remote, clean: dirtyCount === 0, dirty_count: dirtyCount, deployed_line };
|
|
163
177
|
} catch (e) {
|
|
164
178
|
return { ...base, ok: false, error: e.message?.slice(0, 300) || String(e), code: 'error' };
|
|
165
179
|
}
|