Skip to content
← Public packages

@kentcdodds/quiet-hours

Quiet hours for Kent's bots: 10 PM to 8 AM MT (DST-aware) clock, shared overnight queue, override, and the 8 AM digest of finished work and open decisions.

FollowFork

Files

index.ts

30 lines · 969 B · TypeScript
import { EXCLUDED_BOTS, ITEM_KINDS, PRIORITIES, DIGEST_BUCKETS } from './types.ts'
import { DEFAULT_FALLBACK_CHANNEL_ID } from './fallback-digest.ts'

/**
 * Describe quiet hours: the window, exports, kinds, digest order, and the
 * disabled 8:15 fallback job. Reads and writes nothing.
 *
 * @returns Static description of the package surface
 *
 * @example
 * import describe from 'kody:@kentcdodds/quiet-hours'
 * const info = await describe()
 */
export default async function describe() {
	return {
		package: '@kentcdodds/quiet-hours',
		window: '10:00 PM to 8:00 AM America/Denver, every day, DST-aware',
		exports: ['./status', './queue', './override', './list', './digest', './fallback-digest'],
		kinds: ITEM_KINDS,
		priorities: PRIORITIES,
		digestOrder: DIGEST_BUCKETS,
		excludedBots: EXCLUDED_BOTS,
		fallback: {
			job: 'fallback-digest',
			schedule: '15 8 * * * America/Denver',
			enabled: false,
			channelId: DEFAULT_FALLBACK_CHANNEL_ID,
		},
	}
}