mirror of
https://github.com/r0adkll/sign-android-release
synced 2026-09-29 08:08:38 +00:00
bump jest and make tests pass
This commit is contained in:
+52
-48
@@ -12,6 +12,10 @@ earlier Windows versions. Growl is used if none of these requirements are met.
|
||||
|
||||

|
||||
|
||||
## Actions Example Windows SnoreToast
|
||||
|
||||

|
||||
|
||||
## Quick Usage
|
||||
|
||||
Show a native notification on macOS, Windows, Linux:
|
||||
@@ -52,7 +56,7 @@ npm install --save node-notifier
|
||||
|
||||
Standard usage, with cross-platform fallbacks as defined in the
|
||||
[reporter flow chart](./DECISION_FLOW.md). All of the options
|
||||
below will work in some way or another on all platforms.
|
||||
below will work in some way or another on most platforms.
|
||||
|
||||
```javascript
|
||||
const notifier = require('node-notifier');
|
||||
@@ -64,18 +68,18 @@ notifier.notify(
|
||||
message: 'Hello from node, Mr. User!',
|
||||
icon: path.join(__dirname, 'coulson.jpg'), // Absolute path (doesn't work on balloons)
|
||||
sound: true, // Only Notification Center or Windows Toasters
|
||||
wait: true // Wait with callback, until user action is taken against notification
|
||||
wait: true // Wait with callback, until user action is taken against notification, does not apply to Windows Toasters as they always wait or notify-send as it does not support the wait option
|
||||
},
|
||||
function(err, response) {
|
||||
function (err, response) {
|
||||
// Response is response from notification
|
||||
}
|
||||
);
|
||||
|
||||
notifier.on('click', function(notifierObject, options, event) {
|
||||
notifier.on('click', function (notifierObject, options, event) {
|
||||
// Triggers if `wait: true` and user clicks notification
|
||||
});
|
||||
|
||||
notifier.on('timeout', function(notifierObject, options) {
|
||||
notifier.on('timeout', function (notifierObject, options) {
|
||||
// Triggers if `wait: true` and notification closes
|
||||
});
|
||||
```
|
||||
@@ -154,28 +158,28 @@ const NotificationCenter = require('node-notifier').NotificationCenter;
|
||||
|
||||
var notifier = new NotificationCenter({
|
||||
withFallback: false, // Use Growl Fallback if <= 10.8
|
||||
customPath: void 0 // Relative/Absolute path to binary if you want to use your own fork of terminal-notifier
|
||||
customPath: undefined // Relative/Absolute path to binary if you want to use your own fork of terminal-notifier
|
||||
});
|
||||
|
||||
notifier.notify(
|
||||
{
|
||||
title: void 0,
|
||||
subtitle: void 0,
|
||||
message: void 0,
|
||||
title: undefined,
|
||||
subtitle: undefined,
|
||||
message: undefined,
|
||||
sound: false, // Case Sensitive string for location of sound file, or use one of macOS' native sounds (see below)
|
||||
icon: 'Terminal Icon', // Absolute Path to Triggering Icon
|
||||
contentImage: void 0, // Absolute Path to Attached Image (Content Image)
|
||||
open: void 0, // URL to open on Click
|
||||
contentImage: undefined, // Absolute Path to Attached Image (Content Image)
|
||||
open: undefined, // URL to open on Click
|
||||
wait: false, // Wait for User Action against Notification or times out. Same as timeout = 5 seconds
|
||||
|
||||
// New in latest version. See `example/macInput.js` for usage
|
||||
timeout: 5, // Takes precedence over wait if both are defined.
|
||||
closeLabel: void 0, // String. Label for cancel button
|
||||
actions: void 0, // String | Array<String>. Action label or list of labels in case of dropdown
|
||||
dropdownLabel: void 0, // String. Label to be used if multiple actions
|
||||
closeLabel: undefined, // String. Label for cancel button
|
||||
actions: undefined, // String | Array<String>. Action label or list of labels in case of dropdown
|
||||
dropdownLabel: undefined, // String. Label to be used if multiple actions
|
||||
reply: false // Boolean. If notification should take input. Value passed as third argument in callback and event emitter.
|
||||
},
|
||||
function(error, response, metadata) {
|
||||
function (error, response, metadata) {
|
||||
console.log(response, metadata);
|
||||
}
|
||||
);
|
||||
@@ -186,11 +190,7 @@ notifier.notify(
|
||||
**Note:** The `wait` option is shorthand for `timeout: 5`. This just sets a timeout
|
||||
for 5 seconds. It does _not_ make the notification sticky!
|
||||
|
||||
Without `wait` or `timeout`, notifications are just fired and forgotten. They don't
|
||||
wait for any response.
|
||||
|
||||
To make notifications wait for a response (like activation/click), you must define
|
||||
a `timeout`.
|
||||
As of Version 6.0 there is a default `timeout` set of `10` to ensure that the application closes properly. In order to remove the `timeout` and have an instantly closing notification (does not support actions), set `timeout` to `false`. If you are using `action` it is recommended to set `timeout` to a high value to ensure the user has time to respond.
|
||||
|
||||
_Exception:_ If `reply` is defined, it's recommended to set `timeout` to a either
|
||||
high value, or to nothing at all.
|
||||
@@ -246,40 +246,39 @@ From [mikaelbr/gulp-notify#90 (comment)](https://github.com/mikaelbr/gulp-notify
|
||||
|
||||
**Windows 10 Fall Creators Update (Version 1709) Note:**
|
||||
|
||||
[**Snoretoast**](https://github.com/KDE/snoretoast) is used to get native Windows Toasts!
|
||||
|
||||
The default behaviour is to have the underlying toaster applicaton as `appID`.
|
||||
This works as expected, but shows `SnoreToast` as text in the notification.
|
||||
|
||||
With the Fall Creators Update, Notifications on Windows 10 will only work as
|
||||
expected if the correct `appID` is specified. Your `appID` must be exactly the same
|
||||
expected if a valid `appID` is specified. Your `appID` must be exactly the same
|
||||
value that was registered during the installation of your app.
|
||||
|
||||
You can find the ID of your App by searching the registry for the `appID` you
|
||||
specified at installation of your app. For example: If you use the squirrel
|
||||
framework, your `appID` will be something like `com.squirrel.your.app`.
|
||||
|
||||
The default behaviour is to have the underlying toaster applicaton as `appId`.
|
||||
This works as expected, but shows `SnoreToast` as text in the notification.
|
||||
|
||||
[**Snoretoast**](https://github.com/KDE/snoretoast) is used to get native Windows Toasts!
|
||||
|
||||
```javascript
|
||||
const WindowsToaster = require('node-notifier').WindowsToaster;
|
||||
|
||||
var notifier = new WindowsToaster({
|
||||
withFallback: false, // Fallback to Growl or Balloons?
|
||||
customPath: void 0 // Relative/Absolute path if you want to use your fork of SnoreToast.exe
|
||||
customPath: undefined // Relative/Absolute path if you want to use your fork of SnoreToast.exe
|
||||
});
|
||||
|
||||
notifier.notify(
|
||||
{
|
||||
title: void 0, // String. Required
|
||||
message: void 0, // String. Required if remove is not defined
|
||||
icon: void 0, // String. Absolute path to Icon
|
||||
title: undefined, // String. Required
|
||||
message: undefined, // String. Required if remove is not defined
|
||||
icon: undefined, // String. Absolute path to Icon
|
||||
sound: false, // Bool | String (as defined by http://msdn.microsoft.com/en-us/library/windows/apps/hh761492.aspx)
|
||||
wait: false, // Bool. Wait for User Action against Notification or times out
|
||||
id: void 0, // Number. ID to use for closing notification.
|
||||
appID: void 0, // String. App.ID and app Name. Defaults to no value, causing SnoreToast text to be visible.
|
||||
remove: void 0, // Number. Refer to previously created notification to close.
|
||||
install: void 0 // String (path, application, app id). Creates a shortcut <path> in the start menu which point to the executable <application>, appID used for the notifications.
|
||||
id: undefined, // Number. ID to use for closing notification.
|
||||
appID: undefined, // String. App.ID and app Name. Defaults to no value, causing SnoreToast text to be visible.
|
||||
remove: undefined, // Number. Refer to previously created notification to close.
|
||||
install: undefined // String (path, application, app id). Creates a shortcut <path> in the start menu which point to the executable <application>, appID used for the notifications.
|
||||
},
|
||||
function(error, response) {
|
||||
function (error, response) {
|
||||
console.log(response);
|
||||
}
|
||||
);
|
||||
@@ -304,8 +303,8 @@ notifier.notify({
|
||||
|
||||
// and other growl options like sticky etc.
|
||||
sticky: false,
|
||||
label: void 0,
|
||||
priority: void 0
|
||||
label: undefined,
|
||||
priority: undefined
|
||||
});
|
||||
```
|
||||
|
||||
@@ -322,19 +321,19 @@ const WindowsBalloon = require('node-notifier').WindowsBalloon;
|
||||
|
||||
var notifier = new WindowsBalloon({
|
||||
withFallback: false, // Try Windows Toast and Growl first?
|
||||
customPath: void 0 // Relative/Absolute path if you want to use your fork of notifu
|
||||
customPath: undefined // Relative/Absolute path if you want to use your fork of notifu
|
||||
});
|
||||
|
||||
notifier.notify(
|
||||
{
|
||||
title: void 0,
|
||||
message: void 0,
|
||||
title: undefined,
|
||||
message: undefined,
|
||||
sound: false, // true | false.
|
||||
time: 5000, // How long to show balloon in ms
|
||||
wait: false, // Wait for User Action against Notification
|
||||
type: 'info' // The notification type : info | warn | error
|
||||
},
|
||||
function(error, response) {
|
||||
function (error, response) {
|
||||
console.log(response);
|
||||
}
|
||||
);
|
||||
@@ -356,11 +355,14 @@ notifier.notify({
|
||||
message: 'Hello World',
|
||||
icon: __dirname + '/coulson.jpg',
|
||||
|
||||
wait: false, // Defaults no exipre time set. If true expire time of 5 seconds is used
|
||||
timeout: 10, // Alias for expire-time, time etc. Time before notify-send expires. Defaults to 10 seconds.
|
||||
|
||||
// .. and other notify-send flags:
|
||||
urgency: void 0,
|
||||
time: void 0,
|
||||
category: void 0,
|
||||
hint: void 0
|
||||
'app-name': 'node-notifier',
|
||||
urgency: undefined,
|
||||
category: undefined,
|
||||
hint: undefined
|
||||
});
|
||||
```
|
||||
|
||||
@@ -383,7 +385,7 @@ A very special thanks to all the modules `node-notifier` uses.
|
||||
### Windows: `SnoreToast` text
|
||||
|
||||
See note on "Windows 10 Fall Creators Update" in Windows section.
|
||||
_**Short answer:** update your `appId`._
|
||||
_**Short answer:** update your `appID`._
|
||||
|
||||
### Use inside tmux session
|
||||
|
||||
@@ -448,7 +450,9 @@ node: {
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](http://en.wikipedia.org/wiki/MIT_License)
|
||||
This package is licensed using the [MIT License](http://en.wikipedia.org/wiki/MIT_License).
|
||||
|
||||
[SnoreToast](https://raw.githubusercontent.com/mikaelbr/node-notifier/master/vendor/snoreToast/LICENSE) and [Notifu](https://raw.githubusercontent.com/mikaelbr/node-notifier/master/vendor/notifu/LICENSE) have licenses in their vendored versions which do not match the MIT license, LGPL-3 and BSD 3-Clause to be specific. We are not lawyers, but have made our best efforts to conform to the terms in those licenses while releasing this package using the license we chose.
|
||||
|
||||
[npm-url]: https://npmjs.org/package/node-notifier
|
||||
[npm-image]: http://img.shields.io/npm/v/node-notifier.svg?style=flat
|
||||
|
||||
Reference in New Issue
Block a user