UNPKG

@heroku-cli/notifications

Version:
24 lines (23 loc) 970 B
export type NotificationCallback = (error: Error | null, response: string) => void; export interface Notification { /** deliver even when HEROKU_NOTIFICATIONS is disabled */ force?: boolean; /** absolute path to an icon (Linux only) */ icon?: string; /** body text of the notification */ message?: string; /** play a sound with the notification */ sound?: boolean | string; /** secondary text shown below the title (macOS only) */ subtitle?: string; /** main title; defaults to "Heroku CLI" */ title?: string; } /** * Display a desktop notification using the host OS's native tooling * (osascript on macOS, notify-send on Linux, PowerShell toast on Windows). * * Best-effort and fire-and-forget: any failure (missing tool, unsupported * platform) is swallowed so callers never see a notification break a command. */ export declare function notify(notification?: Notification, callback?: NotificationCallback): void;