refactor(github-content): expose conflict info and add latest-sha lookup

updateFile/createFile now return { sha, conflict } so 409/422 from GitHub
can drive a UI flow instead of being swallowed as a generic save error.
Also adds fetchLatestSha(path) for cheap freshness checks against HEAD.
This commit is contained in:
Julien Calixte
2026-05-03 23:32:37 +02:00
parent dffee40776
commit d8a59467a0
3 changed files with 34 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ watch(mode, async (newMode) => {
newContent.value
}`
const newSha = await createFile({
const { sha: newSha } = await createFile({
content,
path: newContentPath
})