A CLI for publishing standard.site documents to ATProto

fix: preserve rkey when republishing with missing state

When a post's state entry is missing but its frontmatter already
contains an atUri, use "update" instead of "create" to preserve
the existing rkey and avoid duplicate records.

+2 -3
+2 -3
packages/cli/src/commands/publish.ts
··· 180 180 reason: "forced", 181 181 }); 182 182 } else if (!postState) { 183 - // New post 184 183 postsToPublish.push({ 185 184 post, 186 - action: "create", 187 - reason: "new post", 185 + action: post.frontmatter.atUri ? "update" : "create", 186 + reason: post.frontmatter.atUri ? "missing state" : "new post", 188 187 }); 189 188 } else if (postState.contentHash !== contentHash) { 190 189 // Changed post