Commit 5f18e3de authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

Revert "Merge branch 'MLAB-677' into 'testing'"

This reverts commit 81e73777, reversing
changes made to f83b6c2a.
parent 81e73777
...@@ -40,8 +40,8 @@ exports["default"] = /*istanbul ignore end*/function (start, minLine, maxLine) { ...@@ -40,8 +40,8 @@ exports["default"] = /*istanbul ignore end*/function (start, minLine, maxLine) {
return iterator(); return iterator();
} }
// We tried to fit hunk before text beginning and beyond text lenght, then // We tried to fit hunk before text beginning and beyond text length, then
// hunk can't fit on the text. Return undefined // hunk can't fit on the text. Return undefined
}; };
}; };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2Rpc3RhbmNlLWl0ZXJhdG9yLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7NENBR2UsVUFBUyxLQUFULEVBQWdCLE9BQWhCLEVBQXlCLE9BQXpCLEVBQWtDO0FBQy9DLE1BQUksY0FBYyxJQUFsQjtBQUFBLE1BQ0ksb0JBQW9CLEtBRHhCO0FBQUEsTUFFSSxtQkFBbUIsS0FGdkI7QUFBQSxNQUdJLGNBQWMsQ0FIbEI7O0FBS0EsU0FBTyxTQUFTLFFBQVQsR0FBb0I7QUFDekIsUUFBSSxlQUFlLENBQUMsZ0JBQXBCLEVBQXNDO0FBQ3BDLFVBQUksaUJBQUosRUFBdUI7QUFDckI7QUFDRCxPQUZELE1BRU87QUFDTCxzQkFBYyxLQUFkO0FBQ0Q7Ozs7QUFJRCxVQUFJLFFBQVEsV0FBUixJQUF1QixPQUEzQixFQUFvQztBQUNsQyxlQUFPLFdBQVA7QUFDRDs7QUFFRCx5QkFBbUIsSUFBbkI7QUFDRDs7QUFFRCxRQUFJLENBQUMsaUJBQUwsRUFBd0I7QUFDdEIsVUFBSSxDQUFDLGdCQUFMLEVBQXVCO0FBQ3JCLHNCQUFjLElBQWQ7QUFDRDs7OztBQUl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fVxuXG4gICAgaWYgKCFiYWNrd2FyZEV4aGF1c3RlZCkge1xuICAgICAgaWYgKCFmb3J3YXJkRXhoYXVzdGVkKSB7XG4gICAgICAgIHdhbnRGb3J3YXJkID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgLy8gQ2hlY2sgaWYgdHJ5aW5nIHRvIGZpdCBiZWZvcmUgdGV4dCBiZWdpbm5pbmcsIGFuZCBpZiBub3QsIGNoZWNrIGl0IGZpdHNcbiAgICAgIC8vIGJlZm9yZSBvZmZzZXQgbG9jYXRpb25cbiAgICAgIGlmIChtaW5MaW5lIDw9IHN0YXJ0IC0gbG9jYWxPZmZzZXQpIHtcbiAgICAgICAgcmV0dXJuIC1sb2NhbE9mZnNldCsrO1xuICAgICAgfVxuXG4gICAgICBiYWNrd2FyZEV4aGF1c3RlZCA9IHRydWU7XG4gICAgICByZXR1cm4gaXRlcmF0b3IoKTtcbiAgICB9XG5cbiAgICAvLyBXZSB0cmllZCB0byBmaXQgaHVuayBiZWZvcmUgdGV4dCBiZWdpbm5pbmcgYW5kIGJleW9uZCB0ZXh0IGxlbmd0aCwgdGhlblxuICAgIC8vIGh1bmsgY2FuJ3QgZml0IG9uIHRoZSB0ZXh0LiBSZXR1cm4gdW5kZWZpbmVkXG4gIH07XG59XG4iXX0=
...@@ -15,4 +15,4 @@ function generateOptions(options, defaults) { ...@@ -15,4 +15,4 @@ function generateOptions(options, defaults) {
} }
return defaults; return defaults;
} }
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Z0NBQWdCLGUsR0FBQSxlO0FBQVQsU0FBUyxlQUFULENBQXlCLE9BQXpCLEVBQWtDLFFBQWxDLEVBQTRDO0FBQ2pELE1BQUksT0FBTyxPQUFQLEtBQW1CLFVBQXZCLEVBQW1DO0FBQ2pDLGFBQVMsUU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VCxDQUF5QkMsT0FBekIsRUFBa0NDLFFBQWxDLEVBQTRDO0FBQ2pELE1BQUksT0FBT0QsT0FBUCxLQUFtQixVQUF2QixFQUFtQztBQUNqQ0MsYUFBU0MsUUFBVCxHQUFvQkYsT0FBcEI7QUFDRCxHQUZELE1BRU8sSUFBSUEsT0FBSixFQUFhO0FBQ2xCLFNBQUssSUFBSUcsSUFBVCxJQUFpQkgsT0FBakIsRUFBMEI7QUFDeEI7QUFDQSxVQUFJQSxRQUFRSSxjQUFSLENBQXVCRCxJQUF2QixDQUFKLEVBQWtDO0FBQ2hDRixpQkFBU0UsSUFBVCxJQUFpQkgsUUFBUUcsSUFBUixDQUFqQjtBQUNEO0FBQ0Y7QUFDRjtBQUNELFNBQU9GLFFBQVA7QUFDRCIsImZpbGUiOiJwYXJhbXMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIGRlZmF1bHRzKSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIGRlZmF1bHRzLmNhbGxiYWNrID0gb3B0aW9ucztcbiAgfSBlbHNlIGlmIChvcHRpb25zKSB7XG4gICAgZm9yIChsZXQgbmFtZSBpbiBvcHRpb25zKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9wdGlvbnMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgZGVmYXVsdHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXR1cm4gZGVmYXVsdHM7XG59XG4iXX0=
{ {
"name": "diff", "name": "diff",
"version": "3.2.0", "version": "3.5.0",
"description": "A javascript text diff implementation.", "description": "A javascript text diff implementation.",
"keywords": [ "keywords": [
"diff", "diff",
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
"node": ">=0.3.1" "node": ">=0.3.1"
}, },
"main": "./lib", "main": "./lib",
"browser": "./dist/diff.js",
"scripts": { "scripts": {
"test": "grunt" "test": "grunt"
}, },
...@@ -62,14 +63,5 @@ ...@@ -62,14 +63,5 @@
"webpack": "^1.12.2", "webpack": "^1.12.2",
"webpack-dev-server": "^1.12.0" "webpack-dev-server": "^1.12.0"
}, },
"optionalDependencies": {}, "optionalDependencies": {}
"babel": {
"sourceMaps": "inline",
"presets": [
"es3",
"es2015-mod"
],
"auxiliaryCommentBefore": "istanbul ignore start",
"auxiliaryCommentAfter": "istanbul ignore end"
}
} }
...@@ -2,7 +2,58 @@ ...@@ -2,7 +2,58 @@
## Development ## Development
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.2.0...master) [Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...master)
## v3.5.0 - March 4th, 2018
- Omit redundant slice in join method of diffArrays - 1023590
- Support patches with empty lines - fb0f208
- Accept a custom JSON replacer function for JSON diffing - 69c7f0a
- Optimize parch header parser - 2aec429
- Fix typos - e89c832
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...v3.5.0)
## v3.5.0 - March 4th, 2018
- Omit redundant slice in join method of diffArrays - 1023590
- Support patches with empty lines - fb0f208
- Accept a custom JSON replacer function for JSON diffing - 69c7f0a
- Optimize parch header parser - 2aec429
- Fix typos - e89c832
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.4.0...v3.5.0)
## v3.4.0 - October 7th, 2017
- [#183](https://github.com/kpdecker/jsdiff/issues/183) - Feature request: ability to specify a custom equality checker for `diffArrays`
- [#173](https://github.com/kpdecker/jsdiff/issues/173) - Bug: diffArrays gives wrong result on array of booleans
- [#158](https://github.com/kpdecker/jsdiff/issues/158) - diffArrays will not compare the empty string in array?
- comparator for custom equality checks - 30e141e
- count oldLines and newLines when there are conflicts - 53bf384
- Fix: diffArrays can compare falsey items - 9e24284
- Docs: Replace grunt with npm test - 00e2f94
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.1...v3.4.0)
## v3.3.1 - September 3rd, 2017
- [#141](https://github.com/kpdecker/jsdiff/issues/141) - Cannot apply patch because my file delimiter is "/r/n" instead of "/n"
- [#192](https://github.com/kpdecker/jsdiff/pull/192) - Fix: Bad merge when adding new files (#189)
- correct spelling mistake - 21fa478
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.0...v3.3.1)
## v3.3.0 - July 5th, 2017
- [#114](https://github.com/kpdecker/jsdiff/issues/114) - /patch/merge not exported
- Gracefully accept invalid newStart in hunks, same as patch(1) does. - d8a3635
- Use regex rather than starts/ends with for parsePatch - 6cab62c
- Add browser flag - e64f674
- refactor: simplified code a bit more - 8f8e0f2
- refactor: simplified code a bit - b094a6f
- fix: some corrections re ignoreCase option - 3c78fd0
- ignoreCase option - 3cbfbb5
- Sanitize filename while parsing patches - 2fe8129
- Added better installation methods - aced50b
- Simple export of functionality - 8690f31
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.2.0...v3.3.0)
## v3.2.0 - December 26th, 2016 ## v3.2.0 - December 26th, 2016
- [#156](https://github.com/kpdecker/jsdiff/pull/156) - Add `undefinedReplacement` option to `diffJson` ([@ewnd9](https://api.github.com/users/ewnd9)) - [#156](https://github.com/kpdecker/jsdiff/pull/156) - Add `undefinedReplacement` option to `diffJson` ([@ewnd9](https://api.github.com/users/ewnd9))
...@@ -86,7 +137,7 @@ Compatibility notes: ...@@ -86,7 +137,7 @@ Compatibility notes:
- [#69](https://github.com/kpdecker/jsdiff/issues/69) - Missing count ([@wfalkwallace](https://api.github.com/users/wfalkwallace)) - [#69](https://github.com/kpdecker/jsdiff/issues/69) - Missing count ([@wfalkwallace](https://api.github.com/users/wfalkwallace))
- [#68](https://github.com/kpdecker/jsdiff/issues/68) - diffLines seems broken ([@wfalkwallace](https://api.github.com/users/wfalkwallace)) - [#68](https://github.com/kpdecker/jsdiff/issues/68) - diffLines seems broken ([@wfalkwallace](https://api.github.com/users/wfalkwallace))
- [#60](https://github.com/kpdecker/jsdiff/issues/60) - Support multiple diff hunks ([@piranna](https://api.github.com/users/piranna)) - [#60](https://github.com/kpdecker/jsdiff/issues/60) - Support multiple diff hunks ([@piranna](https://api.github.com/users/piranna))
- [#54](https://github.com/kpdecker/jsdiff/issues/54) - Feature Reuqest: 3-way merge ([@mog422](https://api.github.com/users/mog422)) - [#54](https://github.com/kpdecker/jsdiff/issues/54) - Feature Request: 3-way merge ([@mog422](https://api.github.com/users/mog422))
- [#42](https://github.com/kpdecker/jsdiff/issues/42) - Fuzz factor for applyPatch ([@stuartpb](https://api.github.com/users/stuartpb)) - [#42](https://github.com/kpdecker/jsdiff/issues/42) - Fuzz factor for applyPatch ([@stuartpb](https://api.github.com/users/stuartpb))
- Move whitespace ignore out of equals method - 542063c - Move whitespace ignore out of equals method - 542063c
- Include source maps in babel output - 7f7ab21 - Include source maps in babel output - 7f7ab21
...@@ -119,7 +170,7 @@ Compatibility notes: ...@@ -119,7 +170,7 @@ Compatibility notes:
- [#29](https://github.com/kpdecker/jsdiff/issues/29) - word tokenizer works only for 7 bit ascii ([@plasmagunman](https://api.github.com/users/plasmagunman)) - [#29](https://github.com/kpdecker/jsdiff/issues/29) - word tokenizer works only for 7 bit ascii ([@plasmagunman](https://api.github.com/users/plasmagunman))
Compatibility notes: Compatibility notes:
- `this.removeEmpty` is now called automatically for all instances. If this is not desired, this may be overriden on a per instance basis. - `this.removeEmpty` is now called automatically for all instances. If this is not desired, this may be overridden on a per instance basis.
- The library has been refactored to use some ES6 features. The external APIs should remain the same, but bower projects that directly referenced the repository will now have to point to the [components/jsdiff](https://github.com/components/jsdiff) repository. - The library has been refactored to use some ES6 features. The external APIs should remain the same, but bower projects that directly referenced the repository will now have to point to the [components/jsdiff](https://github.com/components/jsdiff) repository.
[Commits](https://github.com/kpdecker/jsdiff/compare/v1.4.0...v2.0.0) [Commits](https://github.com/kpdecker/jsdiff/compare/v1.4.0...v2.0.0)
......
This diff is collapsed.
{
"extends": ["airbnb-base", "eslint:recommended", "plugin:node/recommended"],
"plugins": [
"import",
"node"
],
"rules": {
"no-console": ["error", { "allow": ["warn", "error"] }]
},
"env": {
"node": true,
"es6": true
}
}
This diff is collapsed.
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.8 //
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^let cmd;$/;" variable line:15
which /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function which(name) {$/;" function line:17
loc /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let loc;$/;" variable line:19
len /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ for (let i = 0, len = paths.length; i < len; i += 1) {$/;" variable line:21
loc /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ loc = path.join(paths[i], name);$/;" variable line:22
setupCmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function setupCmd() {$/;" function line:28
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:32
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:32
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-NotificationCenter',$/;" string line:33
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-NotificationCenter',$/;" variable line:33
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'terminal-notifier',$/;" string line:34
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'terminal-notifier',$/;" variable line:34
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-message',$/;" string line:35
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-message',$/;" variable line:35
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" string line:36
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" variable line:36
subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" string line:37
subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" variable line:37
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-appIcon',$/;" string line:38
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-appIcon',$/;" variable line:38
sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sound: '-sound',$/;" string line:39
sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sound: '-sound',$/;" variable line:39
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '-open',$/;" string line:40
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '-open',$/;" variable line:40
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:41
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:41
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-execute',$/;" string line:42
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-execute',$/;" variable line:42
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" array line:43
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" variable line:43
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:47
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:47
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-Growl',$/;" string line:48
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-Growl',$/;" variable line:48
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" string line:49
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" variable line:49
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" string line:50
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" variable line:50
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '--sticky',$/;" string line:51
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '--sticky',$/;" variable line:51
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '--url',$/;" string line:52
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '--url',$/;" variable line:52
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:53
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:53
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '--priority',$/;" string line:54
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '--priority',$/;" variable line:54
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:55
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:55
0 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 0,$/;" variable line:58
1 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 1,$/;" variable line:59
2 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 2,$/;" variable line:60
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:70
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:73
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:73
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux-Growl',$/;" string line:74
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux-Growl',$/;" variable line:74
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growl',$/;" string line:75
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growl',$/;" variable line:75
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" string line:76
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" variable line:76
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" string line:77
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" variable line:77
subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" string line:78
subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" variable line:78
host /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ host: {$/;" object line:79
host /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ host: {$/;" variable line:79
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-H',$/;" string line:80
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-H',$/;" variable line:80
hostname /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ hostname: '192.168.33.1',$/;" string line:81
hostname /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ hostname: '192.168.33.1',$/;" variable line:81
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:85
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:85
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux',$/;" string line:86
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux',$/;" variable line:86
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'notify-send',$/;" string line:87
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'notify-send',$/;" variable line:87
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" string line:88
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" variable line:88
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '-t 0',$/;" string line:89
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '-t 0',$/;" variable line:89
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-i',$/;" string line:90
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-i',$/;" variable line:90
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:91
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:91
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-u',$/;" string line:92
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-u',$/;" variable line:92
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:93
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:93
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:101
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:103
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:103
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Windows',$/;" string line:104
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Windows',$/;" variable line:104
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" string line:105
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" variable line:105
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" string line:106
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" variable line:106
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '\/s:true',$/;" string line:107
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '\/s:true',$/;" variable line:107
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '\/t:',$/;" string line:108
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '\/t:',$/;" variable line:108
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '\/i:',$/;" string line:109
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '\/i:',$/;" variable line:109
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '\/cu:',$/;" string line:110
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '\/cu:',$/;" variable line:110
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:111
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:111
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '\/p:',$/;" string line:112
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '\/p:',$/;" variable line:112
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:113
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:113
0 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 0,$/;" variable line:116
1 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 1,$/;" variable line:117
2 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 2,$/;" variable line:118
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:122
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:124
sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' })$/;" string line:151
sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' })$/;" variable line:151
opts /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function growl(msg, opts, callback) {$/;" variable line:162
growl /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function growl(msg, opts, callback) {$/;" function line:162
image /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let image;$/;" variable line:163
noop /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ const fn = callback || function noop() {};$/;" function line:165
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:170
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:170
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Custom',$/;" string line:171
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Custom',$/;" variable line:171
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: options.exec,$/;" variable line:172
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" array line:173
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" variable line:173
return /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ return;$/;" variable line:180
image /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ image = options.image;$/;" variable line:186
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let flag;$/;" variable line:189
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = ext === 'icns' && 'iconpath';$/;" variable line:191
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (\/^[A-Z]\/.test(image) && 'appIcon');$/;" variable line:192
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (\/^png|gif|jpe?g$\/.test(ext) && 'image');$/;" variable line:193
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (ext && (image = ext) && 'icon');$/;" variable line:194
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || 'icon';$/;" variable line:195
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:197
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:201
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:206
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:209
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:211
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:246
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:264
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:273
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:282
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:287
command /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let command = customCmd.replace(\/(^|[^%])%s\/g, `$1${message}`);$/;" variable line:293
command /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ command = splitCmd.shift();$/;" variable line:296
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:303
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:306
stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stdout = '';$/;" string line:311
stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stdout = '';$/;" variable line:311
stderr /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stderr = '';$/;" string line:312
stderr /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stderr = '';$/;" variable line:312
error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let error;$/;" variable line:313
error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ error = err;$/;" variable line:317
error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ error = error || code === 0 ? null : code;$/;" variable line:329
stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ fn(error, stdout, stderr);$/;" variable line:331
exports /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^module.exports = growl;$/;" variable line:341
language: node_js
dist: trusty
os:
- linux
- osx
node_js:
- '4'
- '5'
- '6'
- '7'
- 'node'
before_install:
- npm i -g npm@latest
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libnotify-bin; fi
jobs:
include:
- stage: lint
script: npm run lint
- stage: test
script: npm test
1.9.3 / 2016-09-05
==================
* fixed command injection vulnerability
1.7.0 / 2012-12-30 1.7.0 / 2012-12-30
================== ==================
......
'use strict';
// Growl - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed) // Growl - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
/** /**
* Module dependencies. * Module dependencies.
*/ */
var exec = require('child_process').exec const spawn = require('child_process').spawn;
, fs = require('fs') const fs = require('fs');
, path = require('path') const path = require('path');
, exists = fs.existsSync || path.existsSync const os = require('os');
, os = require('os')
, quote = JSON.stringify const exists = fs.existsSync || path.existsSync;
, cmd; let cmd;
function which(name) { function which(name) {
var paths = process.env.PATH.split(':'); const paths = process.env.PATH.split(':');
var loc; let loc;
for (var i = 0, len = paths.length; i < len; ++i) { for (let i = 0, len = paths.length; i < len; i += 1) {
loc = path.join(paths[i], name); loc = path.join(paths[i], name);
if (exists(loc)) return loc; if (exists(loc)) return loc;
} }
return false;
} }
switch(os.type()) { function setupCmd() {
case 'Darwin': switch (os.type()) {
if (which('terminal-notifier')) { case 'Darwin':
cmd = { if (which('terminal-notifier')) {
type: "Darwin-NotificationCenter" cmd = {
, pkg: "terminal-notifier" type: 'Darwin-NotificationCenter',
, msg: '-message' pkg: 'terminal-notifier',
, title: '-title' msg: '-message',
, subtitle: '-subtitle' title: '-title',
, icon: '-appIcon' subtitle: '-subtitle',
, sound: '-sound' icon: '-appIcon',
, url: '-open' sound: '-sound',
, priority: { url: '-open',
cmd: '-execute' priority: {
, range: [] cmd: '-execute',
} range: [],
}; },
} else { };
cmd = { } else {
type: "Darwin-Growl" cmd = {
, pkg: "growlnotify" type: 'Darwin-Growl',
, msg: '-m' pkg: 'growlnotify',
, sticky: '--sticky' msg: '-m',
, priority: { sticky: '--sticky',
cmd: '--priority' url: '--url',
, range: [ priority: {
-2 cmd: '--priority',
, -1 range: [
, 0 -2,
, 1 -1,
, 2 0,
, "Very Low" 1,
, "Moderate" 2,
, "Normal" 'Very Low',
, "High" 'Moderate',
, "Emergency" 'Normal',
] 'High',
} 'Emergency',
}; ],
} },
break; };
case 'Linux': }
if (which('growl')) { break;
cmd = { case 'Linux':
type: "Linux-Growl" if (which('growl')) {
, pkg: "growl" cmd = {
, msg: '-m' type: 'Linux-Growl',
, title: '-title' pkg: 'growl',
, subtitle: '-subtitle' msg: '-m',
, host: { title: '-title',
cmd: '-H' subtitle: '-subtitle',
, hostname: '192.168.33.1' host: {
} cmd: '-H',
}; hostname: '192.168.33.1',
} else { },
};
} else {
cmd = {
type: 'Linux',
pkg: 'notify-send',
msg: '',
sticky: '-t 0',
icon: '-i',
priority: {
cmd: '-u',
range: [
'low',
'normal',
'critical',
],
},
};
}
break;
case 'Windows_NT':
cmd = { cmd = {
type: "Linux" type: 'Windows',
, pkg: "notify-send" pkg: 'growlnotify',
, msg: '' msg: '',
, sticky: '-t 0' sticky: '/s:true',
, icon: '-i' title: '/t:',
, priority: { icon: '/i:',
cmd: '-u' url: '/cu:',
, range: [ priority: {
"low" cmd: '/p:',
, "normal" range: [
, "critical" -2,
] -1,
} 0,
1,
2,
],
},
}; };
} break;
break; default:
case 'Windows_NT': break;
cmd = { }
type: "Windows"
, pkg: "growlnotify"
, msg: ''
, sticky: '/s:true'
, title: '/t:'
, icon: '/i:'
, url: '/cu:'
, priority: {
cmd: '/p:'
, range: [
-2
, -1
, 0
, 1
, 2
]
}
};
break;
} }
/**
* Expose `growl`.
*/
exports = module.exports = growl;
/**
* Node-growl version.
*/
exports.version = '1.4.1'
/** /**
* Send growl notification _msg_ with _options_. * Send growl notification _msg_ with _options_.
...@@ -138,7 +135,8 @@ exports.version = '1.4.1' ...@@ -138,7 +135,8 @@ exports.version = '1.4.1'
* - sticky Make the notification stick (defaults to false) * - sticky Make the notification stick (defaults to false)
* - priority Specify an int or named key (default is 0) * - priority Specify an int or named key (default is 0)
* - name Application name (defaults to growlnotify) * - name Application name (defaults to growlnotify)
* - sound Sound efect ( in OSx defined in preferences -> sound -> effects) * works only in OSX > 10.8x * - sound Sound efect ( in OSx defined in preferences -> sound -> effects)
* works only in OSX > 10.8x
* - image * - image
* - path to an icon sets --iconpath * - path to an icon sets --iconpath
* - path to an image sets --image * - path to an image sets --image
...@@ -156,51 +154,60 @@ exports.version = '1.4.1' ...@@ -156,51 +154,60 @@ exports.version = '1.4.1'
* }) * })
* *
* @param {string} msg * @param {string} msg
* @param {object} options * @param {object} opts
* @param {function} fn * @param {function} callback
* @api public * @api public
*/ */
function growl(msg, options, fn) { function growl(msg, opts, callback) {
var image let image;
, args const options = opts || {};
, options = options || {} const fn = callback || function noop() {};
, fn = fn || function(){};
setupCmd();
if (options.exec) { if (options.exec) {
cmd = { cmd = {
type: "Custom" type: 'Custom',
, pkg: options.exec pkg: options.exec,
, range: [] range: [],
}; };
} }
// noop // noop
if (!cmd) return fn(new Error('growl not supported on this platform')); if (!cmd) {
args = [cmd.pkg]; fn(new Error('growl not supported on this platform'));
return;
}
const args = [cmd.pkg];
// image // image
if (image = options.image) { if (image || options.image) {
switch(cmd.type) { image = options.image;
case 'Darwin-Growl': switch (cmd.type) {
var flag, ext = path.extname(image).substr(1) case 'Darwin-Growl': {
flag = flag || ext == 'icns' && 'iconpath' let flag;
flag = flag || /^[A-Z]/.test(image) && 'appIcon' const ext = path.extname(image).substr(1);
flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image' flag = ext === 'icns' && 'iconpath';
flag = flag || ext && (image = ext) && 'icon' flag = flag || (/^[A-Z]/.test(image) && 'appIcon');
flag = flag || 'icon' flag = flag || (/^png|gif|jpe?g$/.test(ext) && 'image');
args.push('--' + flag, quote(image)) flag = flag || (ext && (image = ext) && 'icon');
flag = flag || 'icon';
args.push(`--${flag}`, image);
break; break;
}
case 'Darwin-NotificationCenter': case 'Darwin-NotificationCenter':
args.push(cmd.icon, quote(image)); args.push(cmd.icon, image);
break; break;
case 'Linux': case 'Linux':
args.push(cmd.icon, quote(image)); args.push(cmd.icon, image);
// libnotify defaults to sticky, set a hint for transient notifications // libnotify defaults to sticky, set a hint for transient notifications
if (!options.sticky) args.push('--hint=int:transient:1'); if (!options.sticky) args.push('--hint=int:transient:1');
break; break;
case 'Windows': case 'Windows':
args.push(cmd.icon + quote(image)); args.push(cmd.icon + image);
break;
default:
break; break;
} }
} }
...@@ -210,81 +217,125 @@ function growl(msg, options, fn) { ...@@ -210,81 +217,125 @@ function growl(msg, options, fn) {
// priority // priority
if (options.priority) { if (options.priority) {
var priority = options.priority + ''; const priority = `${options.priority}`;
var checkindexOf = cmd.priority.range.indexOf(priority); const checkindexOf = cmd.priority.range.indexOf(priority);
if (~cmd.priority.range.indexOf(priority)) { if (checkindexOf > -1) {
args.push(cmd.priority, options.priority); args.push(cmd.priority, options.priority);
} }
} }
//sound // sound
if(options.sound && cmd.type === 'Darwin-NotificationCenter'){ if (options.sound && cmd.type === 'Darwin-NotificationCenter') {
args.push(cmd.sound, options.sound) args.push(cmd.sound, options.sound);
} }
// name // name
if (options.name && cmd.type === "Darwin-Growl") { if (options.name && cmd.type === 'Darwin-Growl') {
args.push('--name', options.name); args.push('--name', options.name);
} }
switch(cmd.type) { switch (cmd.type) {
case 'Darwin-Growl': case 'Darwin-Growl':
args.push(cmd.msg); args.push(cmd.msg);
args.push(quote(msg).replace(/\\n/g, '\n')); args.push(msg.replace(/\\n/g, '\n'));
if (options.title) args.push(quote(options.title)); if (options.title) args.push(options.title);
if (options.url) {
args.push(cmd.url);
args.push(options.url);
}
break; break;
case 'Darwin-NotificationCenter': case 'Darwin-NotificationCenter': {
args.push(cmd.msg); args.push(cmd.msg);
var stringifiedMsg = quote(msg); const stringifiedMsg = msg;
var escapedMsg = stringifiedMsg.replace(/\\n/g, '\n'); const escapedMsg = stringifiedMsg.replace(/\\n/g, '\n');
args.push(escapedMsg); args.push(escapedMsg);
if (options.title) { if (options.title) {
args.push(cmd.title); args.push(cmd.title);
args.push(quote(options.title)); args.push(options.title);
} }
if (options.subtitle) { if (options.subtitle) {
args.push(cmd.subtitle); args.push(cmd.subtitle);
args.push(quote(options.subtitle)); args.push(options.subtitle);
} }
if (options.url) { if (options.url) {
args.push(cmd.url); args.push(cmd.url);
args.push(quote(options.url)); args.push(options.url);
} }
break; break;
}
case 'Linux-Growl': case 'Linux-Growl':
args.push(cmd.msg); args.push(cmd.msg);
args.push(quote(msg).replace(/\\n/g, '\n')); args.push(msg.replace(/\\n/g, '\n'));
if (options.title) args.push(quote(options.title)); if (options.title) args.push(options.title);
if (cmd.host) { if (cmd.host) {
args.push(cmd.host.cmd, cmd.host.hostname) args.push(cmd.host.cmd, cmd.host.hostname);
} }
break; break;
case 'Linux': case 'Linux':
if (options.title) { if (options.title) {
args.push(quote(options.title)); args.push(options.title);
args.push(cmd.msg); args.push(cmd.msg);
args.push(quote(msg).replace(/\\n/g, '\n')); args.push(msg.replace(/\\n/g, '\n'));
} else { } else {
args.push(quote(msg).replace(/\\n/g, '\n')); args.push(msg.replace(/\\n/g, '\n'));
} }
break; break;
case 'Windows': case 'Windows':
args.push(quote(msg).replace(/\\n/g, '\n')); args.push(msg.replace(/\\n/g, '\n'));
if (options.title) args.push(cmd.title + quote(options.title)); if (options.title) args.push(cmd.title + options.title);
if (options.url) args.push(cmd.url + quote(options.url)); if (options.url) args.push(cmd.url + options.url);
break; break;
case 'Custom': case 'Custom': {
args[0] = (function(origCommand) { const customCmd = args[0];
var message = options.title const message = options.title
? options.title + ': ' + msg ? `${options.title}: ${msg}`
: msg; : msg;
var command = origCommand.replace(/(^|[^%])%s/g, '$1' + quote(message)); let command = customCmd.replace(/(^|[^%])%s/g, `$1${message}`);
if (command === origCommand) args.push(quote(message)); const splitCmd = command.split(' ');
return command; if (splitCmd.length > 1) {
})(args[0]); command = splitCmd.shift();
Array.prototype.push.apply(args, splitCmd);
}
if (customCmd.indexOf('%s') < 0) {
args.push(message);
}
args[0] = command;
break;
}
default:
break; break;
} }
const cmdToExec = args.shift();
const child = spawn(cmdToExec, args);
let stdout = '';
let stderr = '';
let error;
child.on('error', (err) => {
console.error('An error occured.', err);
error = err;
});
child.stdout.on('data', (data) => {
stdout += data;
});
child.stderr.on('data', (data) => {
stderr += data;
});
child.on('close', (code) => {
error = error || code === 0 ? null : code;
if (typeof fn === 'function') {
fn(error, stdout, stderr);
}
});
}
/**
* Expose `growl`.
*/
// execute module.exports = growl;
exec(args.join(' '), fn);
};
{ {
"name": "growl", "name": "growl",
"version": "1.9.2", "version": "1.10.2",
"description": "Growl unobtrusive notifications", "description": "Growl unobtrusive notifications",
"author": "TJ Holowaychuk <tj@vision-media.ca>", "author": "TJ Holowaychuk <tj@vision-media.ca>",
"maintainers": [ "maintainers": [
"Joshua Boy Nicolai Appelman <joshua@jbnicolai.nl>" "Joshua Boy Nicolai Appelman <joshua@jbnicolai.nl>",
"Timo Sand <timo.sand@iki.fi>"
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/tj/node-growl.git" "url": "git://github.com/tj/node-growl.git"
}, },
"main": "./lib/growl.js", "main": "./lib/growl.js",
"license": "MIT" "license": "MIT",
"devDependencies": {
"eslint": "^4.2.0",
"eslint-config-airbnb-base": "^11.2.0",
"eslint-plugin-import": "^2.7.0"
},
"scripts": {
"test": "node test.js",
"lint": "eslint --ext js lib "
},
"engines": {
"node": ">=4.x"
},
"dependencies": {
"eslint-plugin-node": "^5.1.0"
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment