this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: fix remanso space url

+29 -8
+15 -5
packages/remanso/src/commands/init.ts
··· 14 14 text, 15 15 } from "@clack/prompts"; 16 16 import { AtpAgent } from "@atproto/api"; 17 - import { resolveHandleToPDS, createPublication, createAgent } from "../../../cli/src/lib/atproto"; 17 + import { 18 + resolveHandleToPDS, 19 + createPublication, 20 + createAgent, 21 + } from "../../../cli/src/lib/atproto"; 18 22 import { 19 23 loadCredentials, 20 24 saveCredentials, ··· 45 49 stdio: ["pipe", "pipe", "pipe"], 46 50 }).trim(); 47 51 48 - const sshMatch = remote.match(/git@github\.com:([^/]+)\/([^.]+)(?:\.git)?$/); 52 + const sshMatch = remote.match( 53 + /git@github\.com:([^/]+)\/([^.]+)(?:\.git)?$/, 54 + ); 49 55 if (sshMatch) { 50 56 return { owner: sshMatch[1]!, repo: sshMatch[2]! }; 51 57 } ··· 136 142 let pdsUrl: string | undefined; 137 143 138 144 if (credentials?.type === "oauth") { 139 - log.warn("OAuth credentials detected but remanso requires App Passwords."); 145 + log.warn( 146 + "OAuth credentials detected but remanso requires App Passwords.", 147 + ); 140 148 credentials = null; 141 149 } 142 150 ··· 244 252 s.start("Fetching existing publications..."); 245 253 let publications: Array<{ uri: string; name: string; url: string }> = []; 246 254 try { 247 - publications = await listPublications(agent as unknown as InstanceType<typeof AtpAgent>); 255 + publications = await listPublications( 256 + agent as unknown as InstanceType<typeof AtpAgent>, 257 + ); 248 258 s.stop(`Found ${publications.length} existing publication(s)`); 249 259 } catch { 250 260 s.stop("Could not fetch publications"); 251 261 } 252 262 253 - const siteUrl = `https://remanso.space/pub/@${agent.did}`; 263 + const siteUrl = `https://remanso.space/pub/${agent.did}`; 254 264 255 265 if (publications.length > 0) { 256 266 const pubChoice = exitOnCancel(
+14 -3
packages/remanso/src/commands/publish.ts
··· 322 322 } 323 323 324 324 // Derive siteUrl from DID 325 - const siteUrl = `https://remanso.space/pub/@${agent.did}`; 325 + const siteUrl = `https://remanso.space/pub/${agent.did}`; 326 326 log.info(`Site URL: ${siteUrl}`); 327 327 328 328 // Fetch PDS records to detect unmatched documents (if not already done) ··· 396 396 const relativeFilePath = path.relative(configDir, post.filePath); 397 397 398 398 if (action === "create") { 399 - atUri = await createDocument(agent, post, publisherConfig as Parameters<typeof createDocument>[2], coverImage); 399 + atUri = await createDocument( 400 + agent, 401 + post, 402 + publisherConfig as Parameters<typeof createDocument>[2], 403 + coverImage, 404 + ); 400 405 post.frontmatter.atUri = atUri; 401 406 s.stop(`Created: ${atUri}`); 402 407 ··· 412 417 publishedCount++; 413 418 } else { 414 419 atUri = post.frontmatter.atUri!; 415 - await updateDocument(agent, post, atUri, publisherConfig as Parameters<typeof updateDocument>[3], coverImage); 420 + await updateDocument( 421 + agent, 422 + post, 423 + atUri, 424 + publisherConfig as Parameters<typeof updateDocument>[3], 425 + coverImage, 426 + ); 416 427 s.stop(`Updated: ${atUri}`); 417 428 418 429 contentForHash = post.rawContent;