← Public packages
@kody/mailroom
Offline-first PWA for your Kody mailbox: sent and received threads, copy-prompt for agents, no send.
src/record-version.ts
20 lines · 638 B · TypeScriptimport { setAppVersion, type AppVersion } from './version.ts'
/**
* Persist the published Mailroom app version for the About card.
* Call after package_publish_external_push with the published commit.
*
* @example
* import recordVersion from 'kody:@kody/mailroom/record-version'
*
* const version = await recordVersion({ sha: 'abc123', message: 'Ship mailroom' })
*/
export default async function recordVersion(input: {
sha: string
message?: string
committedAt?: string
publishedAt?: string
}): Promise<AppVersion> {
if (!input.sha?.trim()) throw new Error('recordVersion requires sha')
return await setAppVersion(input)
}