diff --git a/packages/remanso/src/commands/init.ts b/packages/remanso/src/commands/init.ts index 6ee7f5b..b553a09 100644 --- a/packages/remanso/src/commands/init.ts +++ b/packages/remanso/src/commands/init.ts @@ -14,7 +14,11 @@ import { text, } from "@clack/prompts"; import { AtpAgent } from "@atproto/api"; -import { resolveHandleToPDS, createPublication, createAgent } from "../../../cli/src/lib/atproto"; +import { + resolveHandleToPDS, + createPublication, + createAgent, +} from "../../../cli/src/lib/atproto"; import { loadCredentials, saveCredentials, @@ -45,7 +49,9 @@ function detectGitHubRemote(): { owner: string; repo: string } | null { stdio: ["pipe", "pipe", "pipe"], }).trim(); - const sshMatch = remote.match(/git@github\.com:([^/]+)\/([^.]+)(?:\.git)?$/); + const sshMatch = remote.match( + /git@github\.com:([^/]+)\/([^.]+)(?:\.git)?$/, + ); if (sshMatch) { return { owner: sshMatch[1]!, repo: sshMatch[2]! }; } @@ -136,7 +142,9 @@ export const initCommand = command({ let pdsUrl: string | undefined; if (credentials?.type === "oauth") { - log.warn("OAuth credentials detected but remanso requires App Passwords."); + log.warn( + "OAuth credentials detected but remanso requires App Passwords.", + ); credentials = null; } @@ -244,13 +252,15 @@ export const initCommand = command({ s.start("Fetching existing publications..."); let publications: Array<{ uri: string; name: string; url: string }> = []; try { - publications = await listPublications(agent as unknown as InstanceType); + publications = await listPublications( + agent as unknown as InstanceType, + ); s.stop(`Found ${publications.length} existing publication(s)`); } catch { s.stop("Could not fetch publications"); } - const siteUrl = `https://remanso.space/pub/@${agent.did}`; + const siteUrl = `https://remanso.space/pub/${agent.did}`; if (publications.length > 0) { const pubChoice = exitOnCancel( diff --git a/packages/remanso/src/commands/publish.ts b/packages/remanso/src/commands/publish.ts index 1a4996e..6587f29 100644 --- a/packages/remanso/src/commands/publish.ts +++ b/packages/remanso/src/commands/publish.ts @@ -322,7 +322,7 @@ export const publishCommand = command({ } // Derive siteUrl from DID - const siteUrl = `https://remanso.space/pub/@${agent.did}`; + const siteUrl = `https://remanso.space/pub/${agent.did}`; log.info(`Site URL: ${siteUrl}`); // Fetch PDS records to detect unmatched documents (if not already done) @@ -396,7 +396,12 @@ export const publishCommand = command({ const relativeFilePath = path.relative(configDir, post.filePath); if (action === "create") { - atUri = await createDocument(agent, post, publisherConfig as Parameters[2], coverImage); + atUri = await createDocument( + agent, + post, + publisherConfig as Parameters[2], + coverImage, + ); post.frontmatter.atUri = atUri; s.stop(`Created: ${atUri}`); @@ -412,7 +417,13 @@ export const publishCommand = command({ publishedCount++; } else { atUri = post.frontmatter.atUri!; - await updateDocument(agent, post, atUri, publisherConfig as Parameters[3], coverImage); + await updateDocument( + agent, + post, + atUri, + publisherConfig as Parameters[3], + coverImage, + ); s.stop(`Updated: ${atUri}`); contentForHash = post.rawContent;