@heroku-cli/notifications

  • Version 1.2.9
  • Published
  • 152 kB
  • No dependencies
  • MIT license

Install

npm i @heroku-cli/notifications
yarn add @heroku-cli/notifications
pnpm add @heroku-cli/notifications

Overview

display notifications in Heroku CLI commands

Index

Functions

function notify

notify: (notification?: Notification, callback?: NotificationCallback) => void;
  • 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.

Interfaces

interface Notification

interface Notification {}

    property force

    force?: boolean;
    • deliver even when HEROKU_NOTIFICATIONS is disabled

    property icon

    icon?: string;
    • absolute path to an icon (Linux only)

    property message

    message?: string;
    • body text of the notification

    property sound

    sound?: boolean | string;
    • play a sound with the notification

    property subtitle

    subtitle?: string;
    • secondary text shown below the title (macOS only)

    property title

    title?: string;
    • main title; defaults to "Heroku CLI"

    Type Aliases

    type NotificationCallback

    type NotificationCallback = (error: Error | null, response: string) => void;

      Package Files (1)

      Dependencies (0)

      No dependencies.

      Dev Dependencies (7)

      Peer Dependencies (0)

      No peer dependencies.

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@heroku-cli/notifications.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@heroku-cli/notifications)
      • HTML
        <a href="https://www.jsdocs.io/package/@heroku-cli/notifications"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>