webpack-build-notifier
Advanced tools
Comparing version 0.1.19 to 0.1.21
35
index.js
@@ -13,14 +13,25 @@ /** | ||
// determine appId, needed for Windows Toast notifications | ||
// this is necessary post Windows build 1709, where all notifications must | ||
// be generated by a valid application. | ||
// https://github.com/RoccoC/webpack-build-notifier/issues/20 | ||
var appId = ''; | ||
// ensure the SnoreToast appId is registered, which is needed for Windows Toast notifications | ||
// this is necessary post Windows build 1709, where all notifications must be generated by a valid application. | ||
// see: https://github.com/KDE/snoretoast, https://github.com/RoccoC/webpack-build-notifier/issues/20 | ||
var appName; | ||
if (process.platform === 'win32') { | ||
if (process.arch === 'x64') { | ||
appId = '{6D809377-6AF0-444b-8957-A3773F02200E}'; | ||
} else { | ||
appId = '{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}'; | ||
var cp = require('child_process'); | ||
var snoreToast = path.join(require.resolve('node-notifier'), '../vendor/snoreToast/SnoreToast.exe'); | ||
try { | ||
cp.execFileSync( | ||
snoreToast, | ||
[ | ||
'-appID', | ||
'Snore.DesktopToasts', | ||
'-install', | ||
'SnoreToast.lnk', | ||
snoreToast, | ||
'Snore.DesktopToasts' | ||
] | ||
); | ||
appName = 'Snore.DesktopToasts'; | ||
} catch(e) { | ||
console.error("An error occurred while attempting to install the SnoreToast AppID!", e); | ||
} | ||
appId += "\\nodejs\\node.exe"; | ||
} | ||
@@ -157,3 +168,3 @@ | ||
notifier.notify({ | ||
appName: appId, | ||
appName: appName, | ||
title: this.title, | ||
@@ -202,3 +213,3 @@ message: 'Compilation started...', | ||
notifier.notify({ | ||
appName: appId, | ||
appName: appName, | ||
title: title, | ||
@@ -205,0 +216,0 @@ message: stripAnsi(msg), |
{ | ||
"name": "webpack-build-notifier", | ||
"version": "0.1.19", | ||
"version": "0.1.21", | ||
"description": "A Webpack plugin that generates OS notifications for build steps using node-notifier.", | ||
@@ -28,3 +28,3 @@ "main": "index.js", | ||
"strip-ansi": "^3.0.1", | ||
"node-notifier": "^5.1.2" | ||
"node-notifier": "5.1.2" | ||
}, | ||
@@ -31,0 +31,0 @@ "devDependencies": { |
@@ -114,2 +114,7 @@ # webpack-build-notifier | ||
--------- | ||
#### 0.1.21 | ||
###### _December 13, 2017_ | ||
- Reworked previous "fix" to use default SnoreToast AppID for Windows toast notifications. [#20](/../../issues/20). | ||
#### 0.1.19 | ||
@@ -116,0 +121,0 @@ ###### _December 13, 2017_ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97815
219
192
2
+ Addednode-notifier@5.1.2(transitive)
- Removedis-wsl@1.1.0(transitive)
- Removednode-notifier@5.4.5(transitive)
Updatednode-notifier@5.1.2