mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 05:14:44 +00:00
.
This commit is contained in:
parent
beb1329f9f
commit
2b95e76931
7736 changed files with 1874747 additions and 51184 deletions
4
node_modules/node-notifier/.prettierrc
generated
vendored
Normal file
4
node_modules/node-notifier/.prettierrc
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"printWidth": 80,
|
||||
"singleQuote": true
|
||||
}
|
274
node_modules/node-notifier/CHANGELOG.md
generated
vendored
Normal file
274
node_modules/node-notifier/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,274 @@
|
|||
# Changelog
|
||||
|
||||
### `v5.4.0`
|
||||
|
||||
- Prevent Spotlight from indexing terminal-notifier.app ([#238](https://github.com/mikaelbr/node-notifier/pull/238))
|
||||
- Changes from legacy url.parse api
|
||||
- Adds default timeout to notification center
|
||||
- Adds mapping from timeout to expire time for linux
|
||||
- Enables the use of WindowsToaster when using WSL ([#260](https://github.com/mikaelbr/node-notifier/pull/260))
|
||||
|
||||
### `v5.3.0`
|
||||
|
||||
- Re-adds `notifu` update.
|
||||
|
||||
### `v5.2.1`
|
||||
|
||||
- Rollback `notifu` update as it triggered Avast virus scan.
|
||||
|
||||
### `v5.2.0`
|
||||
|
||||
- Updates `terminal-notifier` dependency to `v1.7.2`, fixing memory leak. But not to `v1.8.0` as this breaks how icons work.
|
||||
- Updates `notifu` with new subtitle "Notification"
|
||||
- Fix: issue with `appID` by removing default empty string (see README Windows section)
|
||||
- Fix: link notifier time property to notify-send expire-time flag
|
||||
|
||||
- Minor change: use a more specific condition for enabling debug logging ([#171](https://github.com/mikaelbr/node-notifier/pull/171))
|
||||
|
||||
### `v5.1.2`
|
||||
|
||||
- Adds temporary workaround for `terminal-notifier` memory leak as seen in https://github.com/facebook/jest/issues/2999 and https://github.com/julienXX/terminal-notifier/issues/173.
|
||||
- Add appName option and hide snoreToast if not setted ([#158](https://github.com/mikaelbr/node-notifier/pull/158))
|
||||
|
||||
### `v5.0.2`
|
||||
|
||||
Non-obligatory fail. Fixes issue with multiple actions for macOS.
|
||||
|
||||
### `v5.0.1`
|
||||
|
||||
Obligatory fail. Fixes minor issue with non-JSON output for macOS.
|
||||
|
||||
### `v5.0.0`
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
_Note/TL;DR_: If you are just using `node-notifier` with things like `message`, `title` and `icon`, v5 should work just as before.
|
||||
|
||||
1. CLI is now removed. Can be found in separate project: https://github.com/mikaelbr/node-notifier-cli. This means you no longer get the `notify` bin when installing `node-notifier`. To get this do `npm i [-g] node-notifier-cli`
|
||||
2. Changed toaster implementation from `toast.exe` to [Snoretoast](https://github.com/KDE/snoretoast). This means if you are using your custom fork, you need to change. SnoreToast has some better default implemented functionality.
|
||||
3. [terminal-notifier](https://github.com/julienXX/terminal-notifier) dependency has been bumped to `v1.7.1`. With that there can be changes in the API, and supports now reply and buttons. Output has changed to JSON by default, this means the output of some functions of the terminal-notifier has broken. See https://github.com/julienXX/terminal-notifier for more details. See [README](https://github.com/mikaelbr/node-notifier#usage-notificationcenter) for documentation on how to use the new features, or [an example file](https://github.com/mikaelbr/node-notifier/blob/master/example/macInput.js).
|
||||
4. `notify` method will now throw error if second argument is something else than function (still optional): [#138](https://github.com/mikaelbr/node-notifier/pull/138).
|
||||
|
||||
#### Additions
|
||||
|
||||
1. Now supports \*BSD systems: [#142](https://github.com/mikaelbr/node-notifier/pull/142).
|
||||
2. With the new toaster implementation you can do more! For instance customize sound and close notification. See all options:
|
||||
|
||||
```javascript
|
||||
{
|
||||
title: void 0, // String. Required
|
||||
message: void 0, // String. Required if remove is not defined
|
||||
icon: void 0, // 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. Don't create a shortcut but use the provided app id.
|
||||
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.
|
||||
}
|
||||
```
|
||||
|
||||
#### Fixes
|
||||
|
||||
1. Fixes new lines on messages on Windows: [#123](https://github.com/mikaelbr/node-notifier/issues/123)
|
||||
|
||||
#### Technical Changes
|
||||
|
||||
_Internal changes for those who might be interested_.
|
||||
|
||||
1. Dependencies bumped
|
||||
2. Unnecessary dependencies removed (`lodash.deepClone`). Now uses JSON serialize/deserialize instead.
|
||||
3. Project is auto-formatted by [`prettier`](https://github.com/jlongster/prettier).
|
||||
4. [Linting is added](https://github.com/mikaelbr/node-notifier/blob/master/.eslintrc)
|
||||
5. Added way to better debug what is happening by setting `DEBUG` env-var to `true`. See [CONTRIBUTE.md](https://github.com/mikaelbr/node-notifier/blob/master/CONTRIBUTE.md) for more details.
|
||||
|
||||
### `v4.6.1`
|
||||
|
||||
1. Adds npm ignore file, ignoring tests and examples from package.
|
||||
2. Fixes CI builds.
|
||||
|
||||
### `v4.6.0`
|
||||
|
||||
1. Adds support for Icon URL in Growl ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/115))
|
||||
2. Adds options for passing host and port to cli tool ([reported by @el-davo](https://github.com/mikaelbr/node-notifier/issues/106))
|
||||
3. Fixes sanitize response on `notify` callback ([by @MadLittleMods](https://github.com/mikaelbr/node-notifier/commit/a44454a11eff452a8b55f9fbe291e189ed088708))
|
||||
4. Fixes use of new line in messages ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/115))
|
||||
5. Fixes use of `file:///xxx` protocol icon paths for Windows 8.1 ([by @gucong3000](https://github.com/mikaelbr/node-notifier/pull/118))
|
||||
6. Fixes non-TTY usage and piping messages ([reported by @simensen](https://github.com/mikaelbr/node-notifier/issues/109))
|
||||
7. Updates vendor terminal-notifier version to 1.6.3 ([reported by @kid-icarus](https://github.com/mikaelbr/node-notifier/pull/120))
|
||||
|
||||
### `v4.5.0`
|
||||
|
||||
#### Additions
|
||||
|
||||
1. Adds syntactic sugar for `notify`. Now able to just pass message:
|
||||
|
||||
```js
|
||||
notifier.notify('My message');
|
||||
```
|
||||
|
||||
See [#45](https://github.com/mikaelbr/node-notifier/issues/45) for more info.
|
||||
|
||||
#### Fixes
|
||||
|
||||
1. Improvements to docs and examples
|
||||
2. Updates `semver` dependency to support Webpacking with Electron.
|
||||
|
||||
### `v4.4.0`
|
||||
|
||||
1. Changes to exec terminal-notifier through execFile to allow for asar-packages
|
||||
2. Adds support for remote growl server
|
||||
3. Adds support for win7 with electron asar-package
|
||||
|
||||
### `v4.3.1`
|
||||
|
||||
Obligatory patch fix:
|
||||
|
||||
1. Adds new stdin CLI options to docs
|
||||
|
||||
### `v4.3.0`
|
||||
|
||||
1. Adds support for piping messages in to CLI.
|
||||
(With `node-notifier` installed as a CLI `npm i -g node-notifier`)
|
||||
|
||||
```shell
|
||||
➜ echo "Message" | notify
|
||||
➜ echo "Message" | notify -t "My Title"
|
||||
➜ echo "Some message" | notify -t "My Title" -s
|
||||
```
|
||||
|
||||
### `v4.2.3`
|
||||
|
||||
1. Fixed input arguments to CLI to be strings where they should be strings.
|
||||
|
||||
### `v4.2.2`
|
||||
|
||||
1. Fixed no notification when no message for the CLI. [#58](https://github.com/mikaelbr/node-notifier/pull/58)
|
||||
2. Changes `which` test to be sync, avoiding some edge cases with multiple notifications.
|
||||
|
||||
### `v4.2.1`
|
||||
|
||||
1. Minor fix for docs in CLI usage
|
||||
|
||||
### `v4.2.0`
|
||||
|
||||
1. Adds CLI support.
|
||||
2. Fixes Debug "HRESULT : 0xC00CE508" exception on Win8. PR [#49](https://github.com/mikaelbr/node-notifier/pull/49)
|
||||
|
||||
### `v4.1.2`
|
||||
|
||||
1. Fixes correct terminal-notifier (own fork https://github.com/mikaelbr/terminal-notifier)
|
||||
to support activate / click.
|
||||
|
||||
### `v4.1.1`
|
||||
|
||||
1. Fixes proper error codes for balloon: #42
|
||||
2. Removes unused debug files: #41
|
||||
3. Patches differences between subtitle for notify-send: #43
|
||||
4. Updates terminal-notifier dependency (removing black borders) #44 #18
|
||||
|
||||
### `v4.1.0`
|
||||
|
||||
1. Adds support for changing host and port for Growl.
|
||||
|
||||
### `v4.0.3`
|
||||
|
||||
1. Fixes Notification center issue with multiple callback events.
|
||||
2. Fixes error in source code: Fixes long-spaces to proper spaces
|
||||
|
||||
### `v4.0.2`
|
||||
|
||||
1. Fixes issue with immidiate notifu notifications (with `wait : false`)
|
||||
2. Fixes issue with boolean flags for notifu.
|
||||
3. Restructures directories. Making it easier to require notifiers directly.
|
||||
|
||||
### `v4.0.1`
|
||||
|
||||
1. Fixes issue with optional callback for notify-send
|
||||
|
||||
### `v4.0.0`
|
||||
|
||||
Major changes and breaking API.
|
||||
|
||||
1. require('node-notifier') now returns an instance with fallbackable notifications.
|
||||
|
||||
```js
|
||||
var notifier = require('node-notifier');
|
||||
notifier.notify();
|
||||
```
|
||||
|
||||
2. Introduced a `wait` property (default `false`), to get user input for
|
||||
Notification Center, Windows Toaster, Windows Balloons and Growl. Sadly not
|
||||
for notify-send.
|
||||
|
||||
```js
|
||||
var notifier = require('node-notifier');
|
||||
notifier.notify({ wait: true }, function(err, response) {
|
||||
// response is response after user have interacted
|
||||
// with the notification or the notification has timed out.
|
||||
});
|
||||
```
|
||||
|
||||
3. All notification instances are now event emitters, emitting events
|
||||
`click` or `timeout`. This is only applicable if `{ wait: true }`.
|
||||
|
||||
```js
|
||||
var notifier = require('node-notifier');
|
||||
notifier.on('click', function(notificationObject, options) {
|
||||
// options.someArbitraryData === 'foo'
|
||||
});
|
||||
notifier.notify({ wait: true, someArbitraryData: 'foo' });
|
||||
```
|
||||
|
||||
4. WindowsToaster and NotificationCenter now can have sounds by doing `{ sound: true }`.
|
||||
Default NotificationCenter sound is Bottle. Can still use define sound on
|
||||
Mac:
|
||||
|
||||
```js
|
||||
var notifier = require('node-notifier');
|
||||
notifier.notify({ sound: true });
|
||||
// For mac (same as sound: true on Windows 8)
|
||||
notifier.notify({ sound: 'Morse' });
|
||||
```
|
||||
|
||||
### `v3.4.0`
|
||||
|
||||
1. Adds Growl as priority over Balloons
|
||||
|
||||
### `v3.3.0`
|
||||
|
||||
1. Adds support for native Windows 7 and earlier (through task bar balloons)
|
||||
2. Changes growl implementation. Adds better support for GNTP
|
||||
|
||||
### `v3.2.1`
|
||||
|
||||
1. Fixes support for notifications from folders with spaces on Windows.
|
||||
|
||||
### `v3.2.0`
|
||||
|
||||
1. Adds native Windows 8 support.
|
||||
|
||||
### `v3.1.0`
|
||||
|
||||
1. Adds Growl as fallback for Mac OS X pre 10.8.
|
||||
|
||||
### `v3.0.6`
|
||||
|
||||
1. Fixes typo: Changes Growl app name from `Gulp` to `Node`.
|
||||
|
||||
### `v3.0.5`
|
||||
|
||||
1. Maps common options between the different notifiers. Allowing for common usage with different notifiers.
|
||||
|
||||
### `v3.0.4`
|
||||
|
||||
1. Fixes expires for notify-send (Issue #13)
|
||||
|
||||
### `v3.0.2`
|
||||
|
||||
1. Fixes version check for Mac OS X Yosemite
|
||||
|
||||
### `v3.0.0`
|
||||
|
||||
1. Updates terminal-notifier to version 1.6.0; adding support for appIcon and contentImage
|
||||
2. Removes parsing of output sent from notifier (Notification Center)
|
21
node_modules/node-notifier/LICENSE
generated
vendored
Normal file
21
node_modules/node-notifier/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2017 Mikael Brevik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
457
node_modules/node-notifier/README.md
generated
vendored
Normal file
457
node_modules/node-notifier/README.md
generated
vendored
Normal file
|
@ -0,0 +1,457 @@
|
|||
# node-notifier [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
|
||||
|
||||
Send cross platform native notifications using Node.js. Notification Center for macOS,
|
||||
`notify-osd`/`libnotify-bin` for Linux, Toasters for Windows 8/10, or taskbar balloons for
|
||||
earlier Windows versions. Growl is used if none of these requirements are met.
|
||||
[Works well with Electron](#within-electron-packaging).
|
||||
|
||||

|
||||

|
||||
|
||||
## Input Example macOS Notification Center
|
||||
|
||||

|
||||
|
||||
## Quick Usage
|
||||
|
||||
Show a native notification on macOS, Windows, Linux:
|
||||
|
||||
```javascript
|
||||
const notifier = require('node-notifier');
|
||||
// String
|
||||
notifier.notify('Message');
|
||||
|
||||
// Object
|
||||
notifier.notify({
|
||||
title: 'My notification',
|
||||
message: 'Hello, there!'
|
||||
});
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- **macOS**: >= 10.8 for native notifications, or Growl if earlier.
|
||||
- **Linux**: `notify-osd` or `libnotify-bin` installed (Ubuntu should have this by default)
|
||||
- **Windows**: >= 8, or task bar balloons for Windows < 8. Growl as fallback. Growl takes precedence over Windows balloons.
|
||||
- **General Fallback**: Growl
|
||||
|
||||
See [documentation and flow chart for reporter choice](./DECISION_FLOW.md).
|
||||
|
||||
## Install
|
||||
|
||||
```shell
|
||||
npm install --save node-notifier
|
||||
```
|
||||
|
||||
## <abbr title="Command Line Interface">CLI</abbr>
|
||||
|
||||
<abbr title="Command Line Interface">CLI</abbr> has moved to separate project:
|
||||
<https://github.com/mikaelbr/node-notifier-cli>
|
||||
|
||||
## Cross-Platform Advanced Usage
|
||||
|
||||
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.
|
||||
|
||||
```javascript
|
||||
const notifier = require('node-notifier');
|
||||
const path = require('path');
|
||||
|
||||
notifier.notify(
|
||||
{
|
||||
title: 'My awesome title',
|
||||
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
|
||||
},
|
||||
function(err, response) {
|
||||
// Response is response from notification
|
||||
}
|
||||
);
|
||||
|
||||
notifier.on('click', function(notifierObject, options) {
|
||||
// Triggers if `wait: true` and user clicks notification
|
||||
});
|
||||
|
||||
notifier.on('timeout', function(notifierObject, options) {
|
||||
// Triggers if `wait: true` and notification closes
|
||||
});
|
||||
```
|
||||
|
||||
If you want super fine-grained control, you can customize each reporter individually,
|
||||
allowing you to tune specific options for different systems.
|
||||
|
||||
See below for documentation on each reporter.
|
||||
|
||||
**Example:**
|
||||
|
||||
```javascript
|
||||
const NotificationCenter = require('node-notifier/notifiers/notificationcenter');
|
||||
new NotificationCenter(options).notify();
|
||||
|
||||
const NotifySend = require('node-notifier/notifiers/notifysend');
|
||||
new NotifySend(options).notify();
|
||||
|
||||
const WindowsToaster = require('node-notifier/notifiers/toaster');
|
||||
new WindowsToaster(options).notify();
|
||||
|
||||
const Growl = require('node-notifier/notifiers/growl');
|
||||
new Growl(options).notify();
|
||||
|
||||
const WindowsBalloon = require('node-notifier/notifiers/balloon');
|
||||
new WindowsBalloon(options).notify();
|
||||
```
|
||||
|
||||
Or, if you are using several reporters (or you're lazy):
|
||||
|
||||
```javascript
|
||||
// NOTE: Technically, this takes longer to require
|
||||
const nn = require('node-notifier');
|
||||
|
||||
new nn.NotificationCenter(options).notify();
|
||||
new nn.NotifySend(options).notify();
|
||||
new nn.WindowsToaster(options).notify(options);
|
||||
new nn.WindowsBalloon(options).notify(options);
|
||||
new nn.Growl(options).notify(options);
|
||||
```
|
||||
|
||||
## Contents
|
||||
|
||||
- [Notification Center documentation](#usage-notificationcenter)
|
||||
- [Windows Toaster documentation](#usage-windowstoaster)
|
||||
- [Windows Balloon documentation](#usage-windowsballoon)
|
||||
- [Growl documentation](#usage-growl)
|
||||
- [Notify-send documentation](#usage-notifysend)
|
||||
|
||||
### Usage: `NotificationCenter`
|
||||
|
||||
Same usage and parameter setup as [**`terminal-notifier`**](https://github.com/julienXX/terminal-notifier).
|
||||
|
||||
Native Notification Center requires macOS version 10.8 or higher. If you have
|
||||
an earlier version, Growl will be the fallback. If Growl isn't installed, an
|
||||
error will be returned in the callback.
|
||||
|
||||
#### Example
|
||||
|
||||
Because `node-notifier` wraps around [**`terminal-notifier`**](https://github.com/julienXX/terminal-notifier),
|
||||
you can do anything `terminal-notifier` can, just by passing properties to the `notify`
|
||||
method.
|
||||
|
||||
For example:
|
||||
|
||||
- if `terminal-notifier` says `-message`, you can do `{message: 'Foo'}`
|
||||
- if `terminal-notifier` says `-list ALL`, you can do `{list: 'ALL'}`.
|
||||
|
||||
Notification is the primary focus of this module, so listing and activating do work,
|
||||
but they aren't documented.
|
||||
|
||||
### All notification options with their defaults:
|
||||
|
||||
```javascript
|
||||
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
|
||||
});
|
||||
|
||||
notifier.notify(
|
||||
{
|
||||
title: void 0,
|
||||
subtitle: void 0,
|
||||
message: void 0,
|
||||
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
|
||||
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
|
||||
reply: false // Boolean. If notification should take input. Value passed as third argument in callback and event emitter.
|
||||
},
|
||||
function(error, response, metadata) {
|
||||
console.log(response, metadata);
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**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`.
|
||||
|
||||
_Exception:_ If `reply` is defined, it's recommended to set `timeout` to a either
|
||||
high value, or to nothing at all.
|
||||
|
||||
---
|
||||
|
||||
**For macOS notifications: `icon`, `contentImage`, and all forms of `reply`/`actions` require macOS 10.9.**
|
||||
|
||||
Sound can be one of these: `Basso`, `Blow`, `Bottle`, `Frog`, `Funk`, `Glass`,
|
||||
`Hero`, `Morse`, `Ping`, `Pop`, `Purr`, `Sosumi`, `Submarine`, `Tink`.
|
||||
|
||||
If `sound` is simply `true`, `Bottle` is used.
|
||||
|
||||
---
|
||||
|
||||
**See Also:**
|
||||
|
||||
- [Example: specific Notification Centers](./example/advanced.js)
|
||||
- [Example: input](./example/macInput.js).
|
||||
|
||||
---
|
||||
|
||||
**Custom Path clarification**
|
||||
|
||||
`customPath` takes a value of a relative or absolute path to the binary of your
|
||||
fork/custom version of **`terminal-notifier`**.
|
||||
|
||||
**Example:** `./vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier`
|
||||
|
||||
**Spotlight clarification**
|
||||
|
||||
`terminal-notifier.app` resides in a `mac.noindex` folder to prevent Spotlight from indexing the app.
|
||||
|
||||
### Usage: `WindowsToaster`
|
||||
|
||||
**Note:** There are some limitations for images in native Windows 8 notifications:
|
||||
|
||||
- The image must be a PNG image
|
||||
- The image must be smaller than 1024×1024 px
|
||||
- The image must be less than 200kb
|
||||
- The image must be specified using an absolute path
|
||||
|
||||
These limitations are due to the Toast notification system. A good tip is to use
|
||||
something like `path.join` or `path.delimiter` to keep your paths cross-platform.
|
||||
|
||||
From [mikaelbr/gulp-notify#90 (comment)](https://github.com/mikaelbr/gulp-notify/issues/90#issuecomment-129333034)
|
||||
|
||||
> You can make it work by going to System > Notifications & Actions. The 'toast'
|
||||
> app needs to have Banners enabled. (You can activate banners by clicking on the
|
||||
> 'toast' app and setting the 'Show notification banners' to On)
|
||||
|
||||
---
|
||||
|
||||
**Windows 10 Fall Creators Update (Version 1709) Note:**
|
||||
|
||||
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
|
||||
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
|
||||
});
|
||||
|
||||
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
|
||||
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.
|
||||
},
|
||||
function(error, response) {
|
||||
console.log(response);
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
### Usage: `Growl`
|
||||
|
||||
```javascript
|
||||
const Growl = require('node-notifier').Growl;
|
||||
|
||||
var notifier = new Growl({
|
||||
name: 'Growl Name Used', // Defaults as 'Node'
|
||||
host: 'localhost',
|
||||
port: 23053
|
||||
});
|
||||
|
||||
notifier.notify({
|
||||
title: 'Foo',
|
||||
message: 'Hello World',
|
||||
icon: fs.readFileSync(__dirname + '/coulson.jpg'),
|
||||
wait: false, // Wait for User Action against Notification
|
||||
|
||||
// and other growl options like sticky etc.
|
||||
sticky: false,
|
||||
label: void 0,
|
||||
priority: void 0
|
||||
});
|
||||
```
|
||||
|
||||
See more information about using [growly](https://github.com/theabraham/growly/).
|
||||
|
||||
### Usage: `WindowsBalloon`
|
||||
|
||||
For earlier versions of Windows, taskbar balloons are used (unless
|
||||
fallback is activated and Growl is running). The balloons notifier uses a great
|
||||
project called [**`notifu`**](http://www.paralint.com/projects/notifu/).
|
||||
|
||||
```javascript
|
||||
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
|
||||
});
|
||||
|
||||
notifier.notify(
|
||||
{
|
||||
title: void 0,
|
||||
message: void 0,
|
||||
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) {
|
||||
console.log(response);
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
See full usage on the [project homepage: **`notifu`**](http://www.paralint.com/projects/notifu/).
|
||||
|
||||
### Usage: `NotifySend`
|
||||
|
||||
**Note:** `notify-send` doesn't support the `wait` flag.
|
||||
|
||||
```javascript
|
||||
const NotifySend = require('node-notifier').NotifySend;
|
||||
|
||||
var notifier = new NotifySend();
|
||||
|
||||
notifier.notify({
|
||||
title: 'Foo',
|
||||
message: 'Hello World',
|
||||
icon: __dirname + '/coulson.jpg',
|
||||
|
||||
// .. and other notify-send flags:
|
||||
urgency: void 0,
|
||||
time: void 0,
|
||||
category: void 0,
|
||||
hint: void 0
|
||||
});
|
||||
```
|
||||
|
||||
See flags and options on the man page [`notify-send(1)`](http://manpages.ubuntu.com/manpages/gutsy/man1/notify-send.1.html)
|
||||
|
||||
## Thanks to OSS
|
||||
|
||||
`node-notifier` is made possible through Open Source Software.
|
||||
A very special thanks to all the modules `node-notifier` uses.
|
||||
|
||||
- [`terminal-notifier`](https://github.com/julienXX/terminal-notifier)
|
||||
- [`Snoretoast`](https://github.com/KDE/snoretoast)
|
||||
- [`notifu`](http://www.paralint.com/projects/notifu/)
|
||||
- [`growly`](https://github.com/theabraham/growly/)
|
||||
|
||||
[![NPM downloads][npm-downloads]][npm-url]
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Windows: `SnoreToast` text
|
||||
|
||||
See note on "Windows 10 Fall Creators Update" in Windows section.
|
||||
_**Short answer:** update your `appId`._
|
||||
|
||||
### Use inside tmux session
|
||||
|
||||
When using `node-notifier` within a tmux session, it can cause a hang in the system.
|
||||
This can be solved by following the steps described in [this comment](https://github.com/julienXX/terminal-notifier/issues/115#issuecomment-104214742)
|
||||
|
||||
There’s even more info [here](https://github.com/mikaelbr/node-notifier/issues/61#issuecomment-163560801)
|
||||
<https://github.com/mikaelbr/node-notifier/issues/61#issuecomment-163560801>.
|
||||
|
||||
### macOS: Custom icon without Terminal icon
|
||||
|
||||
Even if you define an icon in the configuration object for `node-notifier`, you will
|
||||
see a small Terminal icon in the notification (see the example at the top of this
|
||||
document).
|
||||
|
||||
This is the way notifications on macOS work. They always show the icon of the
|
||||
parent application initiating the notification. For `node-notifier`, `terminal-notifier`
|
||||
is the initiator, and it has the Terminal icon defined as its icon.
|
||||
|
||||
To define your custom icon, you need to fork `terminal-notifier` and build your
|
||||
custom version with your icon.
|
||||
|
||||
See [Issue #71 for more info](https://github.com/mikaelbr/node-notifier/issues/71)
|
||||
<https://github.com/mikaelbr/node-notifier/issues/71>.
|
||||
|
||||
### Within Electron Packaging
|
||||
|
||||
If packaging your Electron app as an `asar`, you will find `node-notifier` will fail to load.
|
||||
|
||||
Due to the way asar works, you cannot execute a binary from within an `asar`.
|
||||
As a simple solution, when packaging the app into an asar please make sure you
|
||||
`--unpack` the `vendor/` folder of `node-notifier`, so the module still has access to
|
||||
the notification binaries.
|
||||
|
||||
You can do so with the following command:
|
||||
|
||||
```bash
|
||||
asar pack . app.asar --unpack "./node_modules/node-notifier/vendor/**"
|
||||
```
|
||||
|
||||
### Using with pkg
|
||||
|
||||
For issues using with the pkg module. Check this issue out: https://github.com/mikaelbr/node-notifier/issues/220#issuecomment-425963752
|
||||
|
||||
### Using Webpack
|
||||
|
||||
When using `node-notifier` inside of `webpack`, you must add the snippet below to your `webpack.config.js`.
|
||||
|
||||
This is necessary because `node-notifier` loads the notifiers from a binary, so it
|
||||
needs a relative file path. When webpack compiles the modules, it supresses file
|
||||
directories, causing `node-notifier` to error on certain platforms.
|
||||
|
||||
To fix this, you can configure webpack to keep the relative file directories.
|
||||
Do so by append the following code to your `webpack.config.js`:
|
||||
|
||||
```javascript
|
||||
node: {
|
||||
__filename: true,
|
||||
__dirname: true
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](http://en.wikipedia.org/wiki/MIT_License)
|
||||
|
||||
[npm-url]: https://npmjs.org/package/node-notifier
|
||||
[npm-image]: http://img.shields.io/npm/v/node-notifier.svg?style=flat
|
||||
[npm-downloads]: http://img.shields.io/npm/dm/node-notifier.svg?style=flat
|
||||
[travis-url]: http://travis-ci.org/mikaelbr/node-notifier
|
||||
[travis-image]: http://img.shields.io/travis/mikaelbr/node-notifier.svg?style=flat
|
52
node_modules/node-notifier/index.js
generated
vendored
Normal file
52
node_modules/node-notifier/index.js
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
var os = require('os');
|
||||
var utils = require('./lib/utils');
|
||||
|
||||
// All notifiers
|
||||
var NotifySend = require('./notifiers/notifysend');
|
||||
var NotificationCenter = require('./notifiers/notificationcenter');
|
||||
var WindowsToaster = require('./notifiers/toaster');
|
||||
var Growl = require('./notifiers/growl');
|
||||
var WindowsBalloon = require('./notifiers/balloon');
|
||||
|
||||
var options = { withFallback: true };
|
||||
|
||||
var osType = utils.isWSL() ? 'WSL' : os.type();
|
||||
|
||||
switch (osType) {
|
||||
case 'Linux':
|
||||
module.exports = new NotifySend(options);
|
||||
module.exports.Notification = NotifySend;
|
||||
break;
|
||||
case 'Darwin':
|
||||
module.exports = new NotificationCenter(options);
|
||||
module.exports.Notification = NotificationCenter;
|
||||
break;
|
||||
case 'Windows_NT':
|
||||
if (utils.isLessThanWin8()) {
|
||||
module.exports = new WindowsBalloon(options);
|
||||
module.exports.Notification = WindowsBalloon;
|
||||
} else {
|
||||
module.exports = new WindowsToaster(options);
|
||||
module.exports.Notification = WindowsToaster;
|
||||
}
|
||||
break;
|
||||
case 'WSL':
|
||||
module.exports = new WindowsToaster(options);
|
||||
module.exports.Notification = WindowsToaster;
|
||||
break;
|
||||
default:
|
||||
if (os.type().match(/BSD$/)) {
|
||||
module.exports = new NotifySend(options);
|
||||
module.exports.Notification = NotifySend;
|
||||
} else {
|
||||
module.exports = new Growl(options);
|
||||
module.exports.Notification = Growl;
|
||||
}
|
||||
}
|
||||
|
||||
// Expose notifiers to give full control.
|
||||
module.exports.NotifySend = NotifySend;
|
||||
module.exports.NotificationCenter = NotificationCenter;
|
||||
module.exports.WindowsToaster = WindowsToaster;
|
||||
module.exports.WindowsBalloon = WindowsBalloon;
|
||||
module.exports.Growl = Growl;
|
24
node_modules/node-notifier/lib/checkGrowl.js
generated
vendored
Normal file
24
node_modules/node-notifier/lib/checkGrowl.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
var net = require('net');
|
||||
|
||||
var hasGrowl = false;
|
||||
module.exports = function(growlConfig, cb) {
|
||||
if (typeof cb === 'undefined') {
|
||||
cb = growlConfig;
|
||||
growlConfig = {};
|
||||
}
|
||||
if (hasGrowl) return cb(null, hasGrowl);
|
||||
var port = growlConfig.port || 23053;
|
||||
var host = growlConfig.host || 'localhost';
|
||||
var socket = net.connect(port, host);
|
||||
socket.setTimeout(100);
|
||||
|
||||
socket.on('connect', function() {
|
||||
socket.end();
|
||||
cb(null, true);
|
||||
});
|
||||
|
||||
socket.on('error', function() {
|
||||
socket.end();
|
||||
cb(null, false);
|
||||
});
|
||||
};
|
519
node_modules/node-notifier/lib/utils.js
generated
vendored
Normal file
519
node_modules/node-notifier/lib/utils.js
generated
vendored
Normal file
|
@ -0,0 +1,519 @@
|
|||
var shellwords = require('shellwords');
|
||||
var cp = require('child_process');
|
||||
var semver = require('semver');
|
||||
var isWSL = require('is-wsl');
|
||||
var path = require('path');
|
||||
var url = require('url');
|
||||
var os = require('os');
|
||||
var fs = require('fs');
|
||||
|
||||
function clone(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
|
||||
module.exports.clone = clone;
|
||||
|
||||
var escapeQuotes = function(str) {
|
||||
if (typeof str === 'string') {
|
||||
return str.replace(/(["$`\\])/g, '\\$1');
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
var inArray = function(arr, val) {
|
||||
return arr.indexOf(val) !== -1;
|
||||
};
|
||||
|
||||
var notifySendFlags = {
|
||||
u: 'urgency',
|
||||
urgency: 'urgency',
|
||||
t: 'expire-time',
|
||||
time: 'expire-time',
|
||||
timeout: 'expire-time',
|
||||
e: 'expire-time',
|
||||
expire: 'expire-time',
|
||||
'expire-time': 'expire-time',
|
||||
i: 'icon',
|
||||
icon: 'icon',
|
||||
c: 'category',
|
||||
category: 'category',
|
||||
subtitle: 'category',
|
||||
h: 'hint',
|
||||
hint: 'hint'
|
||||
};
|
||||
|
||||
module.exports.command = function(notifier, options, cb) {
|
||||
notifier = shellwords.escape(notifier);
|
||||
if (process.env.DEBUG && process.env.DEBUG.indexOf('notifier') !== -1) {
|
||||
console.info('node-notifier debug info (command):');
|
||||
console.info('[notifier path]', notifier);
|
||||
console.info('[notifier options]', options.join(' '));
|
||||
}
|
||||
|
||||
return cp.exec(notifier + ' ' + options.join(' '), function(
|
||||
error,
|
||||
stdout,
|
||||
stderr
|
||||
) {
|
||||
if (error) return cb(error);
|
||||
cb(stderr, stdout);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.fileCommand = function(notifier, options, cb) {
|
||||
if (process.env.DEBUG && process.env.DEBUG.indexOf('notifier') !== -1) {
|
||||
console.info('node-notifier debug info (fileCommand):');
|
||||
console.info('[notifier path]', notifier);
|
||||
console.info('[notifier options]', options.join(' '));
|
||||
}
|
||||
|
||||
return cp.execFile(notifier, options, function(error, stdout, stderr) {
|
||||
if (error) return cb(error, stdout);
|
||||
cb(stderr, stdout);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.fileCommandJson = function(notifier, options, cb) {
|
||||
if (process.env.DEBUG && process.env.DEBUG.indexOf('notifier') !== -1) {
|
||||
console.info('node-notifier debug info (fileCommandJson):');
|
||||
console.info('[notifier path]', notifier);
|
||||
console.info('[notifier options]', options.join(' '));
|
||||
}
|
||||
return cp.execFile(notifier, options, function(error, stdout, stderr) {
|
||||
if (error) return cb(error, stdout);
|
||||
if (!stdout) return cb(error, {});
|
||||
|
||||
try {
|
||||
var data = JSON.parse(stdout);
|
||||
cb(stderr, data);
|
||||
} catch (e) {
|
||||
cb(e, stdout);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.immediateFileCommand = function(notifier, options, cb) {
|
||||
if (process.env.DEBUG && process.env.DEBUG.indexOf('notifier') !== -1) {
|
||||
console.info('node-notifier debug info (notifier):');
|
||||
console.info('[notifier path]', notifier);
|
||||
}
|
||||
|
||||
notifierExists(notifier, function(_, exists) {
|
||||
if (!exists) {
|
||||
return cb(new Error('Notifier (' + notifier + ') not found on system.'));
|
||||
}
|
||||
cp.execFile(notifier, options);
|
||||
cb();
|
||||
});
|
||||
};
|
||||
|
||||
function notifierExists(notifier, cb) {
|
||||
return fs.stat(notifier, function(err, stat) {
|
||||
if (!err) return cb(err, stat.isFile());
|
||||
|
||||
// Check if Windows alias
|
||||
if (path.extname(notifier)) {
|
||||
// Has extentioon, no need to check more
|
||||
return cb(err, false);
|
||||
}
|
||||
|
||||
// Check if there is an exe file in the directory
|
||||
return fs.stat(notifier + '.exe', function(err, stat) {
|
||||
if (err) return cb(err, false);
|
||||
cb(err, stat.isFile());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var mapAppIcon = function(options) {
|
||||
if (options.appIcon) {
|
||||
options.icon = options.appIcon;
|
||||
delete options.appIcon;
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
var mapText = function(options) {
|
||||
if (options.text) {
|
||||
options.message = options.text;
|
||||
delete options.text;
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
var mapIconShorthand = function(options) {
|
||||
if (options.i) {
|
||||
options.icon = options.i;
|
||||
delete options.i;
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
module.exports.mapToNotifySend = function(options) {
|
||||
options = mapAppIcon(options);
|
||||
options = mapText(options);
|
||||
|
||||
for (var key in options) {
|
||||
if (key === 'message' || key === 'title') continue;
|
||||
if (options.hasOwnProperty(key) && notifySendFlags[key] !== key) {
|
||||
options[notifySendFlags[key]] = options[key];
|
||||
delete options[key];
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
module.exports.mapToGrowl = function(options) {
|
||||
options = mapAppIcon(options);
|
||||
options = mapIconShorthand(options);
|
||||
options = mapText(options);
|
||||
|
||||
if (options.icon && !Buffer.isBuffer(options.icon)) {
|
||||
try {
|
||||
options.icon = fs.readFileSync(options.icon);
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
module.exports.mapToMac = function(options) {
|
||||
options = mapIconShorthand(options);
|
||||
options = mapText(options);
|
||||
|
||||
if (options.icon) {
|
||||
options.appIcon = options.icon;
|
||||
delete options.icon;
|
||||
}
|
||||
|
||||
if (options.sound === true) {
|
||||
options.sound = 'Bottle';
|
||||
}
|
||||
|
||||
if (options.sound === false) {
|
||||
delete options.sound;
|
||||
}
|
||||
|
||||
if (options.sound && options.sound.indexOf('Notification.') === 0) {
|
||||
options.sound = 'Bottle';
|
||||
}
|
||||
|
||||
if (options.wait === true) {
|
||||
if (!options.timeout) {
|
||||
options.timeout = 5;
|
||||
}
|
||||
delete options.wait;
|
||||
}
|
||||
|
||||
if (!options.wait && !options.timeout) {
|
||||
options.timeout = 10;
|
||||
}
|
||||
|
||||
options.json = true;
|
||||
return options;
|
||||
};
|
||||
|
||||
function isArray(arr) {
|
||||
return Object.prototype.toString.call(arr) === '[object Array]';
|
||||
}
|
||||
|
||||
function noop() {}
|
||||
module.exports.actionJackerDecorator = function(emitter, options, fn, mapper) {
|
||||
options = clone(options);
|
||||
fn = fn || noop;
|
||||
|
||||
if (typeof fn !== 'function') {
|
||||
throw new TypeError(
|
||||
'The second argument must be a function callback. You have passed ' +
|
||||
typeof fn
|
||||
);
|
||||
}
|
||||
|
||||
return function(err, data) {
|
||||
var resultantData = data;
|
||||
var metadata = {};
|
||||
// Allow for extra data if resultantData is an object
|
||||
if (resultantData && typeof resultantData === 'object') {
|
||||
metadata = resultantData;
|
||||
resultantData = resultantData.activationType;
|
||||
}
|
||||
|
||||
// Sanitize the data
|
||||
if (resultantData) {
|
||||
resultantData = resultantData.toLowerCase().trim();
|
||||
if (resultantData.match(/^activate|clicked$/)) {
|
||||
resultantData = 'activate';
|
||||
}
|
||||
}
|
||||
|
||||
fn.apply(emitter, [err, resultantData, metadata]);
|
||||
if (!mapper || !resultantData) return;
|
||||
|
||||
var key = mapper(resultantData);
|
||||
if (!key) return;
|
||||
emitter.emit(key, emitter, options, metadata);
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.constructArgumentList = function(options, extra) {
|
||||
var args = [];
|
||||
extra = extra || {};
|
||||
|
||||
// Massive ugly setup. Default args
|
||||
var initial = extra.initial || [];
|
||||
var keyExtra = extra.keyExtra || '';
|
||||
var allowedArguments = extra.allowedArguments || [];
|
||||
var noEscape = extra.noEscape !== void 0;
|
||||
var checkForAllowed = extra.allowedArguments !== void 0;
|
||||
var explicitTrue = !!extra.explicitTrue;
|
||||
var keepNewlines = !!extra.keepNewlines;
|
||||
var wrapper = extra.wrapper === void 0 ? '"' : extra.wrapper;
|
||||
|
||||
var escapeFn = function(arg) {
|
||||
if (isArray(arg)) {
|
||||
return removeNewLines(arg.join(','));
|
||||
}
|
||||
|
||||
if (!noEscape) {
|
||||
arg = escapeQuotes(arg);
|
||||
}
|
||||
if (typeof arg === 'string' && !keepNewlines) {
|
||||
arg = removeNewLines(arg);
|
||||
}
|
||||
return wrapper + arg + wrapper;
|
||||
};
|
||||
|
||||
initial.forEach(function(val) {
|
||||
args.push(escapeFn(val));
|
||||
});
|
||||
for (var key in options) {
|
||||
if (
|
||||
options.hasOwnProperty(key) &&
|
||||
(!checkForAllowed || inArray(allowedArguments, key))
|
||||
) {
|
||||
if (explicitTrue && options[key] === true) {
|
||||
args.push('-' + keyExtra + key);
|
||||
} else if (explicitTrue && options[key] === false) continue;
|
||||
else args.push('-' + keyExtra + key, escapeFn(options[key]));
|
||||
}
|
||||
}
|
||||
return args;
|
||||
};
|
||||
|
||||
function removeNewLines(str) {
|
||||
var excapedNewline = process.platform === 'win32' ? '\\r\\n' : '\\n';
|
||||
return str.replace(/\r?\n/g, excapedNewline);
|
||||
}
|
||||
|
||||
/*
|
||||
---- Options ----
|
||||
[-t] <title string> | Displayed on the first line of the toast.
|
||||
[-m] <message string> | Displayed on the remaining lines, wrapped.
|
||||
[-p] <image URI> | Display toast with an image, local files only.
|
||||
[-w] | Wait for toast to expire or activate.
|
||||
[-id] <id> | sets the id for a notification to be able to close it later.
|
||||
[-s] <sound URI> | Sets the sound of the notifications, for possible values see http://msdn.microsoft.com/en-us/library/windows/apps/hh761492.aspx.
|
||||
[-silent] | Don't play a sound file when showing the notifications.
|
||||
[-appID] <App.ID> | Don't create a shortcut but use the provided app id.
|
||||
-close <id> | Closes a currently displayed notification, in order to be able to close a notification the parameter -w must be used to create the notification.
|
||||
*/
|
||||
var allowedToasterFlags = [
|
||||
't',
|
||||
'm',
|
||||
'p',
|
||||
'w',
|
||||
'id',
|
||||
's',
|
||||
'silent',
|
||||
'appID',
|
||||
'close',
|
||||
'install'
|
||||
];
|
||||
var toasterSoundPrefix = 'Notification.';
|
||||
var toasterDefaultSound = 'Notification.Default';
|
||||
module.exports.mapToWin8 = function(options) {
|
||||
options = mapAppIcon(options);
|
||||
options = mapText(options);
|
||||
|
||||
if (options.icon) {
|
||||
if (/^file:\/+/.test(options.icon)) {
|
||||
// should parse file protocol URL to path
|
||||
options.p = new url.URL(options.icon).pathname
|
||||
.replace(/^\/(\w:\/)/, '$1')
|
||||
.replace(/\//g, '\\');
|
||||
} else {
|
||||
options.p = options.icon;
|
||||
}
|
||||
delete options.icon;
|
||||
}
|
||||
|
||||
if (options.message) {
|
||||
// Remove escape char to debug "HRESULT : 0xC00CE508" exception
|
||||
options.m = options.message.replace(/\x1b/g, '');
|
||||
delete options.message;
|
||||
}
|
||||
|
||||
if (options.title) {
|
||||
options.t = options.title;
|
||||
delete options.title;
|
||||
}
|
||||
|
||||
if (options.appName) {
|
||||
options.appID = options.appName;
|
||||
delete options.appName;
|
||||
}
|
||||
|
||||
if (typeof options.remove !== 'undefined') {
|
||||
options.close = options.remove;
|
||||
delete options.remove;
|
||||
}
|
||||
|
||||
if (options.quiet || options.silent) {
|
||||
options.silent = options.quiet || options.silent;
|
||||
delete options.quiet;
|
||||
}
|
||||
|
||||
if (typeof options.sound !== 'undefined') {
|
||||
options.s = options.sound;
|
||||
delete options.sound;
|
||||
}
|
||||
|
||||
if (options.s === false) {
|
||||
options.silent = true;
|
||||
delete options.s;
|
||||
}
|
||||
|
||||
// Silent takes precedence. Remove sound.
|
||||
if (options.s && options.silent) {
|
||||
delete options.s;
|
||||
}
|
||||
|
||||
if (options.s === true) {
|
||||
options.s = toasterDefaultSound;
|
||||
}
|
||||
|
||||
if (options.s && options.s.indexOf(toasterSoundPrefix) !== 0) {
|
||||
options.s = toasterDefaultSound;
|
||||
}
|
||||
|
||||
if (options.wait) {
|
||||
options.w = options.wait;
|
||||
delete options.wait;
|
||||
}
|
||||
|
||||
for (var key in options) {
|
||||
// Check if is allowed. If not, delete!
|
||||
if (
|
||||
options.hasOwnProperty(key) &&
|
||||
allowedToasterFlags.indexOf(key) === -1
|
||||
) {
|
||||
delete options[key];
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
module.exports.mapToNotifu = function(options) {
|
||||
options = mapAppIcon(options);
|
||||
options = mapText(options);
|
||||
|
||||
if (options.icon) {
|
||||
options.i = options.icon;
|
||||
delete options.icon;
|
||||
}
|
||||
|
||||
if (options.message) {
|
||||
options.m = options.message;
|
||||
delete options.message;
|
||||
}
|
||||
|
||||
if (options.title) {
|
||||
options.p = options.title;
|
||||
delete options.title;
|
||||
}
|
||||
|
||||
if (options.time) {
|
||||
options.d = options.time;
|
||||
delete options.time;
|
||||
}
|
||||
|
||||
if (options.q !== false) {
|
||||
options.q = true;
|
||||
} else {
|
||||
delete options.q;
|
||||
}
|
||||
|
||||
if (options.quiet === false) {
|
||||
delete options.q;
|
||||
delete options.quiet;
|
||||
}
|
||||
|
||||
if (options.sound) {
|
||||
delete options.q;
|
||||
delete options.sound;
|
||||
}
|
||||
|
||||
if (options.t) {
|
||||
options.d = options.t;
|
||||
delete options.t;
|
||||
}
|
||||
|
||||
if (options.type) {
|
||||
options.t = sanitizeNotifuTypeArgument(options.type);
|
||||
delete options.type;
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
module.exports.isMac = function() {
|
||||
return os.type() === 'Darwin';
|
||||
};
|
||||
|
||||
module.exports.isMountainLion = function() {
|
||||
return (
|
||||
os.type() === 'Darwin' &&
|
||||
semver.satisfies(garanteeSemverFormat(os.release()), '>=12.0.0')
|
||||
);
|
||||
};
|
||||
|
||||
module.exports.isWin8 = function() {
|
||||
return (
|
||||
os.type() === 'Windows_NT' &&
|
||||
semver.satisfies(garanteeSemverFormat(os.release()), '>=6.2.9200')
|
||||
);
|
||||
};
|
||||
|
||||
module.exports.isWSL = function() {
|
||||
return isWSL;
|
||||
};
|
||||
|
||||
module.exports.isLessThanWin8 = function() {
|
||||
return (
|
||||
os.type() === 'Windows_NT' &&
|
||||
semver.satisfies(garanteeSemverFormat(os.release()), '<6.2.9200')
|
||||
);
|
||||
};
|
||||
|
||||
function garanteeSemverFormat(version) {
|
||||
if (version.split('.').length === 2) {
|
||||
version += '.0';
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
function sanitizeNotifuTypeArgument(type) {
|
||||
if (typeof type === 'string' || type instanceof String) {
|
||||
if (type.toLowerCase() === 'info') return 'info';
|
||||
if (type.toLowerCase() === 'warn') return 'warn';
|
||||
if (type.toLowerCase() === 'error') return 'error';
|
||||
}
|
||||
|
||||
return 'info';
|
||||
}
|
1
node_modules/node-notifier/node_modules/.bin/semver
generated
vendored
Symbolic link
1
node_modules/node-notifier/node_modules/.bin/semver
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../semver/bin/semver
|
39
node_modules/node-notifier/node_modules/semver/CHANGELOG.md
generated
vendored
Normal file
39
node_modules/node-notifier/node_modules/semver/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
# changes log
|
||||
|
||||
## 5.7
|
||||
|
||||
* Add `minVersion` method
|
||||
|
||||
## 5.6
|
||||
|
||||
* Move boolean `loose` param to an options object, with
|
||||
backwards-compatibility protection.
|
||||
* Add ability to opt out of special prerelease version handling with
|
||||
the `includePrerelease` option flag.
|
||||
|
||||
## 5.5
|
||||
|
||||
* Add version coercion capabilities
|
||||
|
||||
## 5.4
|
||||
|
||||
* Add intersection checking
|
||||
|
||||
## 5.3
|
||||
|
||||
* Add `minSatisfying` method
|
||||
|
||||
## 5.2
|
||||
|
||||
* Add `prerelease(v)` that returns prerelease components
|
||||
|
||||
## 5.1
|
||||
|
||||
* Add Backus-Naur for ranges
|
||||
* Remove excessively cute inspection methods
|
||||
|
||||
## 5.0
|
||||
|
||||
* Remove AMD/Browserified build artifacts
|
||||
* Fix ltr and gtr when using the `*` range
|
||||
* Fix for range `*` with a prerelease identifier
|
15
node_modules/node-notifier/node_modules/semver/LICENSE
generated
vendored
Normal file
15
node_modules/node-notifier/node_modules/semver/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
411
node_modules/node-notifier/node_modules/semver/README.md
generated
vendored
Normal file
411
node_modules/node-notifier/node_modules/semver/README.md
generated
vendored
Normal file
|
@ -0,0 +1,411 @@
|
|||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install --save semver
|
||||
````
|
||||
|
||||
## Usage
|
||||
|
||||
As a node module:
|
||||
|
||||
```js
|
||||
const semver = require('semver')
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
semver.minVersion('>=1.0.0') // '1.0.0'
|
||||
semver.valid(semver.coerce('v2')) // '2.0.0'
|
||||
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
|
||||
```
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
```
|
||||
$ semver -h
|
||||
|
||||
A JavaScript implementation of the https://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
-c --coerce
|
||||
Coerce a string into SemVer if possible
|
||||
(does not imply --loose)
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
```
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<https://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
Note that this behavior can be suppressed (treating all prerelease
|
||||
versions as if they were normal versions, for the purpose of range
|
||||
matching) by setting the `includePrerelease` flag on the options
|
||||
object to any
|
||||
[functions](https://github.com/npm/node-semver#functions) that do
|
||||
range matching.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
semver.inc('1.2.3', 'prerelease', 'beta')
|
||||
// '1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero digit in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
### Range Grammar
|
||||
|
||||
Putting all this together, here is a Backus-Naur grammar for ranges,
|
||||
for the benefit of parser authors:
|
||||
|
||||
```bnf
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `options` object argument. All
|
||||
options in this object are `false` by default. The options supported
|
||||
are:
|
||||
|
||||
- `loose` Be more forgiving about not-quite-valid semver strings.
|
||||
(Any resulting output will always be 100% strict compliant, of
|
||||
course.) For backwards compatibility reasons, if the `options`
|
||||
argument is a boolean value instead of an object, it is interpreted
|
||||
to be the `loose` param.
|
||||
- `includePrerelease` Set to suppress the [default
|
||||
behavior](https://github.com/npm/node-semver#prerelease-tags) of
|
||||
excluding prerelease tagged versions from ranges unless they are
|
||||
explicitly opted into.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `prerelease(v)`: Returns an array of prerelease components, or null
|
||||
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
|
||||
or comparators intersect.
|
||||
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
|
||||
a `SemVer` object or `null`.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
### Comparators
|
||||
|
||||
* `intersects(comparator)`: Return true if the comparators intersect
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minSatisfying(versions, range)`: Return the lowest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minVersion(range)`: Return the lowest version that can possibly match
|
||||
the given range.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
* `intersects(range)`: Return true if any of the ranges comparators intersect
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
|
||||
### Coercion
|
||||
|
||||
* `coerce(version)`: Coerces a string to semver if possible
|
||||
|
||||
This aims to provide a very forgiving translation of a non-semver
|
||||
string to semver. It looks for the first digit in a string, and
|
||||
consumes all remaining characters which satisfy at least a partial semver
|
||||
(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters).
|
||||
Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`).
|
||||
All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`).
|
||||
Only text which lacks digits will fail coercion (`version one` is not valid).
|
||||
The maximum length for any semver component considered for coercion is 16 characters;
|
||||
longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`).
|
||||
The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`;
|
||||
higher value components are invalid (`9999999999999999.4.7.4` is likely invalid).
|
160
node_modules/node-notifier/node_modules/semver/bin/semver
generated
vendored
Executable file
160
node_modules/node-notifier/node_modules/semver/bin/semver
generated
vendored
Executable file
|
@ -0,0 +1,160 @@
|
|||
#!/usr/bin/env node
|
||||
// Standalone semver comparison program.
|
||||
// Exits successfully and prints matching version(s) if
|
||||
// any supplied version is valid and passes all tests.
|
||||
|
||||
var argv = process.argv.slice(2)
|
||||
|
||||
var versions = []
|
||||
|
||||
var range = []
|
||||
|
||||
var inc = null
|
||||
|
||||
var version = require('../package.json').version
|
||||
|
||||
var loose = false
|
||||
|
||||
var includePrerelease = false
|
||||
|
||||
var coerce = false
|
||||
|
||||
var identifier
|
||||
|
||||
var semver = require('../semver')
|
||||
|
||||
var reverse = false
|
||||
|
||||
var options = {}
|
||||
|
||||
main()
|
||||
|
||||
function main () {
|
||||
if (!argv.length) return help()
|
||||
while (argv.length) {
|
||||
var a = argv.shift()
|
||||
var indexOfEqualSign = a.indexOf('=')
|
||||
if (indexOfEqualSign !== -1) {
|
||||
a = a.slice(0, indexOfEqualSign)
|
||||
argv.unshift(a.slice(indexOfEqualSign + 1))
|
||||
}
|
||||
switch (a) {
|
||||
case '-rv': case '-rev': case '--rev': case '--reverse':
|
||||
reverse = true
|
||||
break
|
||||
case '-l': case '--loose':
|
||||
loose = true
|
||||
break
|
||||
case '-p': case '--include-prerelease':
|
||||
includePrerelease = true
|
||||
break
|
||||
case '-v': case '--version':
|
||||
versions.push(argv.shift())
|
||||
break
|
||||
case '-i': case '--inc': case '--increment':
|
||||
switch (argv[0]) {
|
||||
case 'major': case 'minor': case 'patch': case 'prerelease':
|
||||
case 'premajor': case 'preminor': case 'prepatch':
|
||||
inc = argv.shift()
|
||||
break
|
||||
default:
|
||||
inc = 'patch'
|
||||
break
|
||||
}
|
||||
break
|
||||
case '--preid':
|
||||
identifier = argv.shift()
|
||||
break
|
||||
case '-r': case '--range':
|
||||
range.push(argv.shift())
|
||||
break
|
||||
case '-c': case '--coerce':
|
||||
coerce = true
|
||||
break
|
||||
case '-h': case '--help': case '-?':
|
||||
return help()
|
||||
default:
|
||||
versions.push(a)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
var options = { loose: loose, includePrerelease: includePrerelease }
|
||||
|
||||
versions = versions.map(function (v) {
|
||||
return coerce ? (semver.coerce(v) || { version: v }).version : v
|
||||
}).filter(function (v) {
|
||||
return semver.valid(v)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
if (inc && (versions.length !== 1 || range.length)) { return failInc() }
|
||||
|
||||
for (var i = 0, l = range.length; i < l; i++) {
|
||||
versions = versions.filter(function (v) {
|
||||
return semver.satisfies(v, range[i], options)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
}
|
||||
return success(versions)
|
||||
}
|
||||
|
||||
function failInc () {
|
||||
console.error('--inc can only be used on a single version with no range')
|
||||
fail()
|
||||
}
|
||||
|
||||
function fail () { process.exit(1) }
|
||||
|
||||
function success () {
|
||||
var compare = reverse ? 'rcompare' : 'compare'
|
||||
versions.sort(function (a, b) {
|
||||
return semver[compare](a, b, options)
|
||||
}).map(function (v) {
|
||||
return semver.clean(v, options)
|
||||
}).map(function (v) {
|
||||
return inc ? semver.inc(v, inc, options, identifier) : v
|
||||
}).forEach(function (v, i, _) { console.log(v) })
|
||||
}
|
||||
|
||||
function help () {
|
||||
console.log(['SemVer ' + version,
|
||||
'',
|
||||
'A JavaScript implementation of the https://semver.org/ specification',
|
||||
'Copyright Isaac Z. Schlueter',
|
||||
'',
|
||||
'Usage: semver [options] <version> [<version> [...]]',
|
||||
'Prints valid versions sorted by SemVer precedence',
|
||||
'',
|
||||
'Options:',
|
||||
'-r --range <range>',
|
||||
' Print versions that match the specified range.',
|
||||
'',
|
||||
'-i --increment [<level>]',
|
||||
' Increment a version by the specified level. Level can',
|
||||
' be one of: major, minor, patch, premajor, preminor,',
|
||||
" prepatch, or prerelease. Default level is 'patch'.",
|
||||
' Only one version may be specified.',
|
||||
'',
|
||||
'--preid <identifier>',
|
||||
' Identifier to be used to prefix premajor, preminor,',
|
||||
' prepatch or prerelease version increments.',
|
||||
'',
|
||||
'-l --loose',
|
||||
' Interpret versions and ranges loosely',
|
||||
'',
|
||||
'-p --include-prerelease',
|
||||
' Always include prerelease versions in range matching',
|
||||
'',
|
||||
'-c --coerce',
|
||||
' Coerce a string into SemVer if possible',
|
||||
' (does not imply --loose)',
|
||||
'',
|
||||
'Program exits successfully if any valid version satisfies',
|
||||
'all supplied ranges, and prints all satisfying versions.',
|
||||
'',
|
||||
'If no satisfying versions are found, then exits failure.',
|
||||
'',
|
||||
'Versions are printed in ascending order, so supplying',
|
||||
'multiple versions to the utility will just sort them.'
|
||||
].join('\n'))
|
||||
}
|
64
node_modules/node-notifier/node_modules/semver/package.json
generated
vendored
Normal file
64
node_modules/node-notifier/node_modules/semver/package.json
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"semver@5.7.0",
|
||||
"/Users/eric/repos/actions/setup-node"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "semver@5.7.0",
|
||||
"_id": "semver@5.7.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||
"_location": "/node-notifier/semver",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "semver@5.7.0",
|
||||
"name": "semver",
|
||||
"escapedName": "semver",
|
||||
"rawSpec": "5.7.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.7.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/node-notifier"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||
"_spec": "5.7.0",
|
||||
"_where": "/Users/eric/repos/actions/setup-node",
|
||||
"bin": {
|
||||
"semver": "./bin/semver"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/npm/node-semver/issues"
|
||||
},
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"devDependencies": {
|
||||
"tap": "^13.0.0-rc.18"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"range.bnf",
|
||||
"semver.js"
|
||||
],
|
||||
"homepage": "https://github.com/npm/node-semver#readme",
|
||||
"license": "ISC",
|
||||
"main": "semver.js",
|
||||
"name": "semver",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/npm/node-semver.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postpublish": "git push origin --all; git push origin --tags",
|
||||
"postversion": "npm publish",
|
||||
"preversion": "npm test",
|
||||
"test": "tap"
|
||||
},
|
||||
"tap": {
|
||||
"check-coverage": true
|
||||
},
|
||||
"version": "5.7.0"
|
||||
}
|
16
node_modules/node-notifier/node_modules/semver/range.bnf
generated
vendored
Normal file
16
node_modules/node-notifier/node_modules/semver/range.bnf
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | [1-9] ( [0-9] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
1483
node_modules/node-notifier/node_modules/semver/semver.js
generated
vendored
Normal file
1483
node_modules/node-notifier/node_modules/semver/semver.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
156
node_modules/node-notifier/notifiers/balloon.js
generated
vendored
Normal file
156
node_modules/node-notifier/notifiers/balloon.js
generated
vendored
Normal file
|
@ -0,0 +1,156 @@
|
|||
/**
|
||||
* Wrapper for the notifu 1.6 (http://www.paralint.com/projects/notifu/)
|
||||
|
||||
Usage
|
||||
/t <value> The type of message to display values are:
|
||||
info The message is an informational message
|
||||
warn The message is an warning message
|
||||
error The message is an error message
|
||||
/d <value> The number of milliseconds to display (omit or 0 for infinit)
|
||||
/p <value> The title (or prompt) of the ballon
|
||||
/m <value> The message text
|
||||
/i <value> Specify an icon to use ("parent" uses the icon of the parent process)
|
||||
/e Enable ballon tips in the registry (for this user only)
|
||||
/q Do not play a sound when the tooltip is displayed
|
||||
/w Show the tooltip even if the user is in the quiet period that follows his very first login (Windows 7 and up)
|
||||
/xp Use IUserNotification interface event when IUserNotification2 is available
|
||||
|
||||
// Kill codes:
|
||||
2 = Timeout
|
||||
3 = Clicked
|
||||
4 = Closed or faded out
|
||||
|
||||
*/
|
||||
var path = require('path');
|
||||
var notifier = path.resolve(__dirname, '../vendor/notifu/notifu');
|
||||
var checkGrowl = require('../lib/checkGrowl');
|
||||
var utils = require('../lib/utils');
|
||||
var Toaster = require('./toaster');
|
||||
var Growl = require('./growl');
|
||||
var os = require('os');
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var util = require('util');
|
||||
|
||||
var hasGrowl = void 0;
|
||||
|
||||
module.exports = WindowsBalloon;
|
||||
|
||||
function WindowsBalloon(options) {
|
||||
options = utils.clone(options || {});
|
||||
if (!(this instanceof WindowsBalloon)) {
|
||||
return new WindowsBalloon(options);
|
||||
}
|
||||
|
||||
this.options = options;
|
||||
|
||||
EventEmitter.call(this);
|
||||
}
|
||||
util.inherits(WindowsBalloon, EventEmitter);
|
||||
|
||||
function noop() {}
|
||||
WindowsBalloon.prototype.notify = function(options, callback) {
|
||||
var fallback;
|
||||
var notifierOptions = this.options;
|
||||
options = utils.clone(options || {});
|
||||
callback = callback || noop;
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = { title: 'node-notifier', message: options };
|
||||
}
|
||||
|
||||
var actionJackedCallback = utils.actionJackerDecorator(
|
||||
this,
|
||||
options,
|
||||
callback,
|
||||
function(data) {
|
||||
if (data === 'activate') {
|
||||
return 'click';
|
||||
}
|
||||
if (data === 'timeout') {
|
||||
return 'timeout';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
if (!!this.options.withFallback && utils.isWin8()) {
|
||||
fallback = fallback || new Toaster(notifierOptions);
|
||||
return fallback.notify(options, callback);
|
||||
}
|
||||
|
||||
if (
|
||||
!!this.options.withFallback &&
|
||||
(!utils.isLessThanWin8() || hasGrowl === true)
|
||||
) {
|
||||
fallback = fallback || new Growl(notifierOptions);
|
||||
return fallback.notify(options, callback);
|
||||
}
|
||||
|
||||
if (!this.options.withFallback || hasGrowl === false) {
|
||||
doNotification(options, notifierOptions, actionJackedCallback);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkGrowl(notifierOptions, function(_, hasGrowlResult) {
|
||||
hasGrowl = hasGrowlResult;
|
||||
|
||||
if (hasGrowl) {
|
||||
fallback = fallback || new Growl(notifierOptions);
|
||||
return fallback.notify(options, callback);
|
||||
}
|
||||
|
||||
doNotification(options, notifierOptions, actionJackedCallback);
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
var allowedArguments = ['t', 'd', 'p', 'm', 'i', 'e', 'q', 'w', 'xp'];
|
||||
|
||||
function doNotification(options, notifierOptions, callback) {
|
||||
var is64Bit = os.arch() === 'x64';
|
||||
options = options || {};
|
||||
options = utils.mapToNotifu(options);
|
||||
options.p = options.p || 'Node Notification:';
|
||||
|
||||
var fullNotifierPath = notifier + (is64Bit ? '64' : '') + '.exe';
|
||||
var localNotifier = notifierOptions.customPath || fullNotifierPath;
|
||||
|
||||
if (!options.m) {
|
||||
callback(new Error('Message is required.'));
|
||||
return this;
|
||||
}
|
||||
|
||||
var argsList = utils.constructArgumentList(options, {
|
||||
wrapper: '',
|
||||
noEscape: true,
|
||||
explicitTrue: true,
|
||||
allowedArguments: allowedArguments
|
||||
});
|
||||
|
||||
if (options.wait) {
|
||||
return utils.fileCommand(localNotifier, argsList, function(error, data) {
|
||||
var action = fromErrorCodeToAction(error.code);
|
||||
if (action === 'error') return callback(error, data);
|
||||
|
||||
return callback(null, action);
|
||||
});
|
||||
}
|
||||
utils.immediateFileCommand(localNotifier, argsList, callback);
|
||||
}
|
||||
|
||||
function fromErrorCodeToAction(errorCode) {
|
||||
switch (errorCode) {
|
||||
case 2:
|
||||
return 'timeout';
|
||||
case 3:
|
||||
case 6:
|
||||
case 7:
|
||||
return 'activate';
|
||||
case 4:
|
||||
return 'close';
|
||||
default:
|
||||
return 'error';
|
||||
}
|
||||
}
|
76
node_modules/node-notifier/notifiers/growl.js
generated
vendored
Normal file
76
node_modules/node-notifier/notifiers/growl.js
generated
vendored
Normal file
|
@ -0,0 +1,76 @@
|
|||
/**
|
||||
* Wrapper for the growly module
|
||||
*/
|
||||
var checkGrowl = require('../lib/checkGrowl');
|
||||
var utils = require('../lib/utils');
|
||||
var growly = require('growly');
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var util = require('util');
|
||||
|
||||
var errorMessageNotFound =
|
||||
"Couldn't connect to growl (might be used as a fallback). Make sure it is running";
|
||||
|
||||
module.exports = Growl;
|
||||
|
||||
var hasGrowl = void 0;
|
||||
|
||||
function Growl(options) {
|
||||
options = utils.clone(options || {});
|
||||
if (!(this instanceof Growl)) {
|
||||
return new Growl(options);
|
||||
}
|
||||
|
||||
growly.appname = options.name || 'Node';
|
||||
this.options = options;
|
||||
|
||||
EventEmitter.call(this);
|
||||
}
|
||||
util.inherits(Growl, EventEmitter);
|
||||
|
||||
Growl.prototype.notify = function(options, callback) {
|
||||
growly.setHost(this.options.host, this.options.port);
|
||||
options = utils.clone(options || {});
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = { title: 'node-notifier', message: options };
|
||||
}
|
||||
|
||||
callback = utils.actionJackerDecorator(this, options, callback, function(
|
||||
data
|
||||
) {
|
||||
if (data === 'click') {
|
||||
return 'click';
|
||||
}
|
||||
if (data === 'timedout') {
|
||||
return 'timeout';
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
options = utils.mapToGrowl(options);
|
||||
|
||||
if (!options.message) {
|
||||
callback(new Error('Message is required.'));
|
||||
return this;
|
||||
}
|
||||
|
||||
options.title = options.title || 'Node Notification:';
|
||||
|
||||
if (hasGrowl || !!options.wait) {
|
||||
var localCallback = options.wait ? callback : noop;
|
||||
growly.notify(options.message, options, localCallback);
|
||||
if (!options.wait) callback();
|
||||
return this;
|
||||
}
|
||||
|
||||
checkGrowl(growly, function(_, didHaveGrowl) {
|
||||
hasGrowl = didHaveGrowl;
|
||||
if (!didHaveGrowl) return callback(new Error(errorMessageNotFound));
|
||||
growly.notify(options.message, options);
|
||||
callback();
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
function noop() {}
|
100
node_modules/node-notifier/notifiers/notificationcenter.js
generated
vendored
Normal file
100
node_modules/node-notifier/notifiers/notificationcenter.js
generated
vendored
Normal file
|
@ -0,0 +1,100 @@
|
|||
/**
|
||||
* A Node.js wrapper for terminal-notify (with fallback).
|
||||
*/
|
||||
var utils = require('../lib/utils');
|
||||
var Growl = require('./growl');
|
||||
var path = require('path');
|
||||
var notifier = path.join(
|
||||
__dirname,
|
||||
'../vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier'
|
||||
);
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var util = require('util');
|
||||
|
||||
var errorMessageOsX =
|
||||
'You need Mac OS X 10.8 or above to use NotificationCenter,' +
|
||||
' or use Growl fallback with constructor option {withFallback: true}.';
|
||||
|
||||
module.exports = NotificationCenter;
|
||||
|
||||
function NotificationCenter(options) {
|
||||
options = utils.clone(options || {});
|
||||
if (!(this instanceof NotificationCenter)) {
|
||||
return new NotificationCenter(options);
|
||||
}
|
||||
this.options = options;
|
||||
|
||||
EventEmitter.call(this);
|
||||
}
|
||||
util.inherits(NotificationCenter, EventEmitter);
|
||||
var activeId = null;
|
||||
|
||||
function noop() {}
|
||||
NotificationCenter.prototype.notify = function(options, callback) {
|
||||
var fallbackNotifier;
|
||||
var id = identificator();
|
||||
options = utils.clone(options || {});
|
||||
activeId = id;
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = { title: 'node-notifier', message: options };
|
||||
}
|
||||
callback = callback || noop;
|
||||
|
||||
if (typeof callback !== 'function') {
|
||||
throw new TypeError(
|
||||
'The second argument must be a function callback. You have passed ' +
|
||||
typeof fn
|
||||
);
|
||||
}
|
||||
|
||||
var actionJackedCallback = utils.actionJackerDecorator(
|
||||
this,
|
||||
options,
|
||||
callback,
|
||||
function(data) {
|
||||
if (activeId !== id) return false;
|
||||
|
||||
if (data === 'activate') {
|
||||
return 'click';
|
||||
}
|
||||
if (data === 'timeout') {
|
||||
return 'timeout';
|
||||
}
|
||||
if (data === 'replied') {
|
||||
return 'replied';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
options = utils.mapToMac(options);
|
||||
|
||||
if (!options.message && !options.group && !options.list && !options.remove) {
|
||||
callback(new Error('Message, group, remove or list property is required.'));
|
||||
return this;
|
||||
}
|
||||
|
||||
var argsList = utils.constructArgumentList(options);
|
||||
if (utils.isMountainLion()) {
|
||||
utils.fileCommandJson(
|
||||
this.options.customPath || notifier,
|
||||
argsList,
|
||||
actionJackedCallback
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
||||
if (fallbackNotifier || !!this.options.withFallback) {
|
||||
fallbackNotifier = fallbackNotifier || new Growl(this.options);
|
||||
return fallbackNotifier.notify(options, callback);
|
||||
}
|
||||
|
||||
callback(new Error(errorMessageOsX));
|
||||
return this;
|
||||
};
|
||||
|
||||
function identificator() {
|
||||
return { _ref: 'val' };
|
||||
}
|
94
node_modules/node-notifier/notifiers/notifysend.js
generated
vendored
Normal file
94
node_modules/node-notifier/notifiers/notifysend.js
generated
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
/**
|
||||
* Node.js wrapper for "notify-send".
|
||||
*/
|
||||
var os = require('os');
|
||||
var which = require('which');
|
||||
var utils = require('../lib/utils');
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var util = require('util');
|
||||
|
||||
var notifier = 'notify-send';
|
||||
var hasNotifier = void 0;
|
||||
|
||||
module.exports = NotifySend;
|
||||
|
||||
function NotifySend(options) {
|
||||
options = utils.clone(options || {});
|
||||
if (!(this instanceof NotifySend)) {
|
||||
return new NotifySend(options);
|
||||
}
|
||||
|
||||
this.options = options;
|
||||
|
||||
EventEmitter.call(this);
|
||||
}
|
||||
util.inherits(NotifySend, EventEmitter);
|
||||
|
||||
function noop() {}
|
||||
NotifySend.prototype.notify = function(options, callback) {
|
||||
options = utils.clone(options || {});
|
||||
callback = callback || noop;
|
||||
|
||||
if (typeof callback !== 'function') {
|
||||
throw new TypeError(
|
||||
'The second argument must be a function callback. You have passed ' +
|
||||
typeof callback
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = { title: 'node-notifier', message: options };
|
||||
}
|
||||
|
||||
if (!options.message) {
|
||||
callback(new Error('Message is required.'));
|
||||
return this;
|
||||
}
|
||||
|
||||
if (os.type() !== 'Linux' && !os.type().match(/BSD$/)) {
|
||||
callback(new Error('Only supported on Linux and *BSD systems'));
|
||||
return this;
|
||||
}
|
||||
|
||||
if (hasNotifier === false) {
|
||||
callback(new Error('notify-send must be installed on the system.'));
|
||||
return this;
|
||||
}
|
||||
|
||||
if (hasNotifier || !!this.options.suppressOsdCheck) {
|
||||
doNotification(options, callback);
|
||||
return this;
|
||||
}
|
||||
|
||||
try {
|
||||
hasNotifier = !!which.sync(notifier);
|
||||
doNotification(options, callback);
|
||||
} catch (err) {
|
||||
hasNotifier = false;
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
var allowedArguments = ['urgency', 'expire-time', 'icon', 'category', 'hint'];
|
||||
|
||||
function doNotification(options, callback) {
|
||||
var initial, argsList;
|
||||
|
||||
options = utils.mapToNotifySend(options);
|
||||
options.title = options.title || 'Node Notification:';
|
||||
|
||||
initial = [options.title, options.message];
|
||||
delete options.title;
|
||||
delete options.message;
|
||||
|
||||
argsList = utils.constructArgumentList(options, {
|
||||
initial: initial,
|
||||
keyExtra: '-',
|
||||
allowedArguments: allowedArguments
|
||||
});
|
||||
|
||||
utils.command(notifier, argsList, callback);
|
||||
}
|
100
node_modules/node-notifier/notifiers/toaster.js
generated
vendored
Normal file
100
node_modules/node-notifier/notifiers/toaster.js
generated
vendored
Normal file
|
@ -0,0 +1,100 @@
|
|||
/**
|
||||
* Wrapper for the toaster (https://github.com/nels-o/toaster)
|
||||
*/
|
||||
var path = require('path');
|
||||
var notifier = path.resolve(__dirname, '../vendor/snoreToast/SnoreToast.exe');
|
||||
var utils = require('../lib/utils');
|
||||
var Balloon = require('./balloon');
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var util = require('util');
|
||||
|
||||
var fallback = void 0;
|
||||
|
||||
module.exports = WindowsToaster;
|
||||
|
||||
function WindowsToaster(options) {
|
||||
options = utils.clone(options || {});
|
||||
if (!(this instanceof WindowsToaster)) {
|
||||
return new WindowsToaster(options);
|
||||
}
|
||||
|
||||
this.options = options;
|
||||
|
||||
EventEmitter.call(this);
|
||||
}
|
||||
util.inherits(WindowsToaster, EventEmitter);
|
||||
|
||||
function noop() {}
|
||||
|
||||
var timeoutMessage = 'the toast has timed out';
|
||||
var successMessage = 'user clicked on the toast';
|
||||
|
||||
function hasText(str, txt) {
|
||||
return str && str.indexOf(txt) !== -1;
|
||||
}
|
||||
|
||||
WindowsToaster.prototype.notify = function(options, callback) {
|
||||
options = utils.clone(options || {});
|
||||
callback = callback || noop;
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = { title: 'node-notifier', message: options };
|
||||
}
|
||||
|
||||
if (typeof callback !== 'function') {
|
||||
throw new TypeError(
|
||||
'The second argument must be a function callback. You have passed ' +
|
||||
typeof fn
|
||||
);
|
||||
}
|
||||
|
||||
var actionJackedCallback = utils.actionJackerDecorator(
|
||||
this,
|
||||
options,
|
||||
function cb(err, data) {
|
||||
// Needs to filter out timeout. Not an actual error.
|
||||
if (err && hasText(data, timeoutMessage)) {
|
||||
return callback(null, data);
|
||||
}
|
||||
callback(err, data);
|
||||
},
|
||||
function mapper(data) {
|
||||
if (hasText(data, successMessage)) {
|
||||
return 'click';
|
||||
}
|
||||
if (hasText(data, timeoutMessage)) {
|
||||
return 'timeout';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
options.title = options.title || 'Node Notification:';
|
||||
if (
|
||||
typeof options.message === 'undefined' &&
|
||||
typeof options.close === 'undefined'
|
||||
) {
|
||||
callback(new Error('Message or ID to close is required.'));
|
||||
return this;
|
||||
}
|
||||
|
||||
if (!utils.isWin8() && !utils.isWSL() && !!this.options.withFallback) {
|
||||
fallback = fallback || new Balloon(this.options);
|
||||
return fallback.notify(options, callback);
|
||||
}
|
||||
|
||||
options = utils.mapToWin8(options);
|
||||
var argsList = utils.constructArgumentList(options, {
|
||||
explicitTrue: true,
|
||||
wrapper: '',
|
||||
keepNewlines: true,
|
||||
noEscape: true
|
||||
});
|
||||
utils.fileCommand(
|
||||
this.options.customPath || notifier,
|
||||
argsList,
|
||||
actionJackedCallback
|
||||
);
|
||||
return this;
|
||||
};
|
103
node_modules/node-notifier/package.json
generated
vendored
Normal file
103
node_modules/node-notifier/package.json
generated
vendored
Normal file
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"node-notifier@5.4.0",
|
||||
"/Users/eric/repos/actions/setup-node"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "node-notifier@5.4.0",
|
||||
"_id": "node-notifier@5.4.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==",
|
||||
"_location": "/node-notifier",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "node-notifier@5.4.0",
|
||||
"name": "node-notifier",
|
||||
"escapedName": "node-notifier",
|
||||
"rawSpec": "5.4.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.4.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@jest/reporters"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz",
|
||||
"_spec": "5.4.0",
|
||||
"_where": "/Users/eric/repos/actions/setup-node",
|
||||
"author": {
|
||||
"name": "Mikael Brevik"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mikaelbr/node-notifier/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"growly": "^1.3.0",
|
||||
"is-wsl": "^1.1.0",
|
||||
"semver": "^5.5.0",
|
||||
"shellwords": "^0.1.1",
|
||||
"which": "^1.3.0"
|
||||
},
|
||||
"description": "A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)",
|
||||
"devDependencies": {
|
||||
"eslint": "^5.12.1",
|
||||
"eslint-config-semistandard": "^13.0.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
"eslint-plugin-import": "^2.15.0",
|
||||
"eslint-plugin-node": "^8.0.1",
|
||||
"eslint-plugin-promise": "^4.0.1",
|
||||
"eslint-plugin-standard": "^4.0.0",
|
||||
"husky": "^1.3.1",
|
||||
"jest": "^23.2.0",
|
||||
"lint-staged": "^8.1.0",
|
||||
"prettier": "^1.12.1"
|
||||
},
|
||||
"directories": {
|
||||
"example": "example",
|
||||
"test": "test"
|
||||
},
|
||||
"homepage": "https://github.com/mikaelbr/node-notifier#readme",
|
||||
"jest": {
|
||||
"testRegex": "/test/[^_]*.js",
|
||||
"testEnvironment": "node",
|
||||
"setupTestFrameworkScriptFile": "./test/_test-matchers.js"
|
||||
},
|
||||
"keywords": [
|
||||
"notification center",
|
||||
"mac os x 10.8",
|
||||
"notify",
|
||||
"terminal-notifier",
|
||||
"notify-send",
|
||||
"growl",
|
||||
"windows 8 notification",
|
||||
"toaster",
|
||||
"notification"
|
||||
],
|
||||
"license": "MIT",
|
||||
"lint-staged": {
|
||||
"*.{js,json,css,md}": [
|
||||
"prettier --write",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"main": "index.js",
|
||||
"name": "node-notifier",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/mikaelbr/node-notifier.git"
|
||||
},
|
||||
"scripts": {
|
||||
"example": "node ./example/message.js",
|
||||
"example:mac": "node ./example/advanced.js",
|
||||
"example:mac:input": "node ./example/macInput.js",
|
||||
"example:windows": "node ./example/toaster.js",
|
||||
"lint": "eslint example/*.js lib/*.js notifiers/*.js test/**/*.js index.js",
|
||||
"precommit": "lint-staged",
|
||||
"pretest": "npm run lint",
|
||||
"test": "jest"
|
||||
},
|
||||
"version": "5.4.0"
|
||||
}
|
63
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Info.plist
generated
vendored
Normal file
63
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Info.plist
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>16E195</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>terminal-notifier</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Terminal</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>nl.superalloy.oss.terminal-notifier</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>terminal-notifier</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.7.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>17</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>8B62</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>16B2649</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.12</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0810</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>8B62</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.8</string>
|
||||
<key>LSUIElement</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012-2016 Eloy Durán, Julien Blanchard. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSUserNotificationAlertStyle</key>
|
||||
<string>alert</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier
generated
vendored
Executable file
BIN
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier
generated
vendored
Executable file
Binary file not shown.
1
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/PkgInfo
generated
vendored
Normal file
1
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/PkgInfo
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
APPL????
|
BIN
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/Terminal.icns
generated
vendored
Normal file
BIN
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/Terminal.icns
generated
vendored
Normal file
Binary file not shown.
29
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/Credits.rtf
generated
vendored
Normal file
29
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/Credits.rtf
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\paperw9840\paperh8400
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
||||
|
||||
\f0\b\fs24 \cf0 Engineering:
|
||||
\b0 \
|
||||
Some people\
|
||||
\
|
||||
|
||||
\b Human Interface Design:
|
||||
\b0 \
|
||||
Some other people\
|
||||
\
|
||||
|
||||
\b Testing:
|
||||
\b0 \
|
||||
Hopefully not nobody\
|
||||
\
|
||||
|
||||
\b Documentation:
|
||||
\b0 \
|
||||
Whoever\
|
||||
\
|
||||
|
||||
\b With special thanks to:
|
||||
\b0 \
|
||||
Mom\
|
||||
}
|
BIN
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/InfoPlist.strings
generated
vendored
Normal file
BIN
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/InfoPlist.strings
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/MainMenu.nib
generated
vendored
Normal file
BIN
node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/MainMenu.nib
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-notifier/vendor/notifu/notifu.exe
generated
vendored
Executable file
BIN
node_modules/node-notifier/vendor/notifu/notifu.exe
generated
vendored
Executable file
Binary file not shown.
BIN
node_modules/node-notifier/vendor/notifu/notifu64.exe
generated
vendored
Executable file
BIN
node_modules/node-notifier/vendor/notifu/notifu64.exe
generated
vendored
Executable file
Binary file not shown.
165
node_modules/node-notifier/vendor/snoreToast/LICENSE
generated
vendored
Normal file
165
node_modules/node-notifier/vendor/snoreToast/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,165 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
BIN
node_modules/node-notifier/vendor/snoreToast/SnoreToast.exe
generated
vendored
Executable file
BIN
node_modules/node-notifier/vendor/snoreToast/SnoreToast.exe
generated
vendored
Executable file
Binary file not shown.
9
node_modules/node-notifier/vendor/terminal-notifier-LICENSE
generated
vendored
Normal file
9
node_modules/node-notifier/vendor/terminal-notifier-LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
All the works are available under the MIT license. Except for ‘Terminal.icns’, which is a copy of Apple’s Terminal.app icon and as such is copyright of Apple.
|
||||
|
||||
Copyright (C) 2012-2016 Eloy Durán eloy.de.enige@gmail.com, Julien Blanchard julien@sideburns.eu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
Loading…
Add table
Add a link
Reference in a new issue