From 3af29f2f72922f3705d438df9eeea6ff246e2026 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 22 Mar 2026 14:28:53 -0400 Subject: [PATCH] chore: format and bump version --- packages/cli/package.json | 2 +- packages/cli/src/commands/publish.ts | 29 ++++++++++------------------ packages/cli/src/commands/sync.ts | 4 +--- packages/cli/src/index.ts | 2 +- packages/cli/src/lib/sync.ts | 17 +++++++++++----- 5 files changed, 25 insertions(+), 29 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index f8466b4..253444e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "sequoia-cli", - "version": "0.5.1", + "version": "0.5.2", "type": "module", "bin": { "sequoia": "dist/index.js" diff --git a/packages/cli/src/commands/publish.ts b/packages/cli/src/commands/publish.ts index 2148450..5e92af0 100644 --- a/packages/cli/src/commands/publish.ts +++ b/packages/cli/src/commands/publish.ts @@ -159,9 +159,7 @@ export const publishCommand = command({ ) { // Create agent early for sync (will be reused for publishing) const connectingTo = - credentials.type === "oauth" - ? credentials.handle - : credentials.pdsUrl; + credentials.type === "oauth" ? credentials.handle : credentials.pdsUrl; s.start(`Connecting as ${connectingTo}...`); try { agent = await createAgent(credentials); @@ -174,25 +172,20 @@ export const publishCommand = command({ try { s.start("Auto-syncing state from PDS..."); - const syncResult = await syncStateFromPDS( - agent, - config, - configDir, - { - updateFrontmatter: true, - quiet: true, - }, - ); - s.stop( - `Auto-synced ${syncResult.matchedCount} posts from PDS`, - ); + const syncResult = await syncStateFromPDS(agent, config, configDir, { + updateFrontmatter: true, + quiet: true, + }); + s.stop(`Auto-synced ${syncResult.matchedCount} posts from PDS`); state = syncResult.state; } catch (error) { s.stop("Auto-sync failed"); log.warn( `Auto-sync failed: ${error instanceof Error ? error.message : String(error)}`, ); - log.warn("Continuing with empty state. Run 'sequoia sync' manually to fix."); + log.warn( + "Continuing with empty state. Run 'sequoia sync' manually to fix.", + ); } } @@ -312,9 +305,7 @@ export const publishCommand = command({ // Create agent (skip if already created during auto-sync) if (!agent) { const connectingTo = - credentials.type === "oauth" - ? credentials.handle - : credentials.pdsUrl; + credentials.type === "oauth" ? credentials.handle : credentials.pdsUrl; s.start(`Connecting as ${connectingTo}...`); try { agent = await createAgent(credentials); diff --git a/packages/cli/src/commands/sync.ts b/packages/cli/src/commands/sync.ts index afcb811..cb88d04 100644 --- a/packages/cli/src/commands/sync.ts +++ b/packages/cli/src/commands/sync.ts @@ -126,9 +126,7 @@ export const syncCommand = command({ if (!dryRun) { const stateCount = Object.keys(result.state.posts).length; - log.success( - `\nSaved .sequoia-state.json (${stateCount} entries)`, - ); + log.success(`\nSaved .sequoia-state.json (${stateCount} entries)`); if (result.frontmatterUpdatesApplied > 0) { log.success( diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 0366bb0..ea25e6b 100755 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -36,7 +36,7 @@ Publish evergreen content to the ATmosphere > https://tangled.org/stevedylan.dev/sequoia `, - version: "0.5.1", + version: "0.5.2", cmds: { add: addCommand, auth: authCommand, diff --git a/packages/cli/src/lib/sync.ts b/packages/cli/src/lib/sync.ts index 960425d..9bd1607 100644 --- a/packages/cli/src/lib/sync.ts +++ b/packages/cli/src/lib/sync.ts @@ -85,7 +85,11 @@ export async function syncStateFromPDS( let matchedCount = 0; let unmatchedCount = 0; let frontmatterUpdatesApplied = 0; - const frontmatterUpdates: Array<{ filePath: string; atUri: string; relativeFilePath: string }> = []; + const frontmatterUpdates: Array<{ + filePath: string; + atUri: string; + relativeFilePath: string; + }> = []; if (!quiet) { log.message("\nMatching documents to local files:\n"); @@ -143,9 +147,7 @@ export async function syncStateFromPDS( } else { unmatchedCount++; if (!quiet) { - log.message( - ` ✗ ${doc.value.title} (no matching local file)`, - ); + log.message(` ✗ ${doc.value.title} (no matching local file)`); log.message(` Path: ${docPath}`); log.message(` URI: ${doc.uri}`); } @@ -170,7 +172,12 @@ export async function syncStateFromPDS( if (!quiet) { log.info("\nDry run complete. No changes made."); } - return { state, matchedCount, unmatchedCount, frontmatterUpdatesApplied: 0 }; + return { + state, + matchedCount, + unmatchedCount, + frontmatterUpdatesApplied: 0, + }; } // Save updated state -- 2.51.2