Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/roe.dev. This is the code and content for my personal website, built in Nuxt. roe.dev
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849import { GithubStarsProvider } from './github-stars.ts'import { DevToProvider } from './dev-to.ts'import { GdeAdvocuProvider } from './gde-advocu.ts'import { StandardSiteProvider } from './standard-site.ts'import { SifaProvider } from './sifa.ts'
export interface SyncItem { title: string description?: string body_markdown?: string text_content?: string canonical_url: string type: 'blog' | 'talk' | 'article' | 'event' | 'hackathon' | 'oss' | 'video' | 'forum' | 'other' date?: string tags?: string[] /** `at://` URI of the Bluesky post announcing this item, if there is one. */ bluesky?: string}
export interface SyncOptions { dryRun: boolean}
export interface SyncProvider { name: string sync(items: SyncItem[], options: SyncOptions): Promise<void>}
function createProviders (): SyncProvider[] { return [ new GithubStarsProvider(), new DevToProvider(), new GdeAdvocuProvider(), new StandardSiteProvider(), new SifaProvider(), ]}
export async function syncAll (items: SyncItem[], options: SyncOptions): Promise<void> { await Promise.all(createProviders().map(async provider => { try { await provider.sync(items, options) } catch (error) { console.warn(`[sync:${provider.name}] Failed:`, error instanceof Error ? error.message : error) } }))}