Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
fix: fix notification types
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 26, 2018
1 parent 0bdc77a commit 19cc816
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"chai": "^4.1.2",
"eslint": "^4.16.0",
"eslint-config-dxcli": "^1.1.4",
"fancy-test": "^0.5.0",
"fancy-test": "^0.5.1",
"husky": "^0.14.3",
"mocha": "^5.0.0",
"mocha-junit-reporter": "^1.17.0",
Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as EventEmitter from 'events'
import {NodeNotifier} from 'node-notifier'

import {ActionBase} from './action/base'
import deps from './deps'
import Errors, {CLIError, Options as ErrorOptions} from './errors'
import {ExitError} from './exit'
import * as Logger from './logger'
import notify from './notify'
import notify, {Notification, NotificationCallback} from './notify'
import Output from './output'
import {IPromptOptions} from './prompt'
import * as Table from './styled/table'
Expand Down Expand Up @@ -58,6 +59,9 @@ export {
CLIError,
Config,
ErrorOptions,
NodeNotifier,
Notification,
NotificationCallback,
Errors,
ExitError,
IPromptOptions,
Expand Down
7 changes: 6 additions & 1 deletion src/notify.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// tslint:disable no-empty-interface

import Notifier = require('node-notifier')

export default (opts: Notifier.Notification, cb?: Notifier.NotificationCallback) => {
export interface NotificationCallback extends Notifier.NotificationCallback {}
export interface Notification extends Notifier.Notification {}

export default (opts: Notification, cb?: NotificationCallback) => {
const notifier: typeof Notifier = require('node-notifier')
return notifier.notify({
// title: `heroku ${process.argv[2]}`,
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1628,9 +1628,9 @@ extsprintf@^1.2.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"

fancy-test@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-0.5.0.tgz#ebefe0ad756eb2fbd1eaafe0383c710bada2cb6d"
fancy-test@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-0.5.1.tgz#baf78480234b3722632367dd3f98ee37b871b0df"
dependencies:
lodash "^4.17.4"
stdout-stderr "^0.1.4"
Expand Down

0 comments on commit 19cc816

Please sign in to comment.