Activate whisper envelope deduplication (performance).

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Roman Volosovskyi 2018-04-20 13:47:00 +01:00 committed by Igor Mandrigin
parent 9dc689db67
commit dcefb0795d
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
7 changed files with 210 additions and 112 deletions

255
package-lock.json generated
View File

@ -2130,7 +2130,7 @@
"requires": { "requires": {
"file-type": "5.2.0", "file-type": "5.2.0",
"is-stream": "1.1.0", "is-stream": "1.1.0",
"tar-stream": "1.6.0" "tar-stream": "1.6.1"
} }
}, },
"decompress-tarbz2": { "decompress-tarbz2": {
@ -3047,32 +3047,36 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
}, },
"fsevents": { "fsevents": {
"version": "1.2.3", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz",
"integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==",
"optional": true, "optional": true,
"requires": { "requires": {
"nan": "2.10.0", "nan": "2.10.0",
"node-pre-gyp": "0.9.1" "node-pre-gyp": "0.10.0"
}, },
"dependencies": { "dependencies": {
"abbrev": { "abbrev": {
"version": "1.1.1", "version": "1.1.1",
"bundled": true, "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"optional": true "optional": true
}, },
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
"bundled": true, "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
"optional": true "optional": true
}, },
"are-we-there-yet": { "are-we-there-yet": {
"version": "1.1.4", "version": "1.1.4",
"bundled": true, "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz",
"integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=",
"optional": true, "optional": true,
"requires": { "requires": {
"delegates": "1.0.0", "delegates": "1.0.0",
@ -3081,11 +3085,13 @@
}, },
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": { "requires": {
"balanced-match": "1.0.0", "balanced-match": "1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -3093,52 +3099,62 @@
}, },
"chownr": { "chownr": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz",
"integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=",
"optional": true "optional": true
}, },
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"optional": true "optional": true
}, },
"debug": { "debug": {
"version": "2.6.9", "version": "2.6.9",
"bundled": true, "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"optional": true, "optional": true,
"requires": { "requires": {
"ms": "2.0.0" "ms": "2.0.0"
} }
}, },
"deep-extend": { "deep-extend": {
"version": "0.4.2", "version": "0.5.1",
"bundled": true, "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz",
"integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==",
"optional": true "optional": true
}, },
"delegates": { "delegates": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
"optional": true "optional": true
}, },
"detect-libc": { "detect-libc": {
"version": "1.0.3", "version": "1.0.3",
"bundled": true, "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
"optional": true "optional": true
}, },
"fs-minipass": { "fs-minipass": {
"version": "1.2.5", "version": "1.2.5",
"bundled": true, "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
"integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
"optional": true, "optional": true,
"requires": { "requires": {
"minipass": "2.2.4" "minipass": "2.2.4"
@ -3146,12 +3162,14 @@
}, },
"fs.realpath": { "fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"optional": true "optional": true
}, },
"gauge": { "gauge": {
"version": "2.7.4", "version": "2.7.4",
"bundled": true, "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
"optional": true, "optional": true,
"requires": { "requires": {
"aproba": "1.2.0", "aproba": "1.2.0",
@ -3166,7 +3184,8 @@
}, },
"glob": { "glob": {
"version": "7.1.2", "version": "7.1.2",
"bundled": true, "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"optional": true, "optional": true,
"requires": { "requires": {
"fs.realpath": "1.0.0", "fs.realpath": "1.0.0",
@ -3179,12 +3198,14 @@
}, },
"has-unicode": { "has-unicode": {
"version": "2.0.1", "version": "2.0.1",
"bundled": true, "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
"optional": true "optional": true
}, },
"iconv-lite": { "iconv-lite": {
"version": "0.4.21", "version": "0.4.21",
"bundled": true, "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz",
"integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==",
"optional": true, "optional": true,
"requires": { "requires": {
"safer-buffer": "2.1.2" "safer-buffer": "2.1.2"
@ -3192,7 +3213,8 @@
}, },
"ignore-walk": { "ignore-walk": {
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
"integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
"optional": true, "optional": true,
"requires": { "requires": {
"minimatch": "3.0.4" "minimatch": "3.0.4"
@ -3200,7 +3222,8 @@
}, },
"inflight": { "inflight": {
"version": "1.0.6", "version": "1.0.6",
"bundled": true, "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"optional": true, "optional": true,
"requires": { "requires": {
"once": "1.4.0", "once": "1.4.0",
@ -3209,39 +3232,46 @@
}, },
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
"bundled": true, "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
"optional": true "optional": true
}, },
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": { "requires": {
"number-is-nan": "1.0.1" "number-is-nan": "1.0.1"
} }
}, },
"isarray": { "isarray": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"optional": true "optional": true
}, },
"minimatch": { "minimatch": {
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": { "requires": {
"brace-expansion": "1.1.11" "brace-expansion": "1.1.11"
} }
}, },
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz",
"integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==",
"requires": { "requires": {
"safe-buffer": "5.1.1", "safe-buffer": "5.1.1",
"yallist": "3.0.2" "yallist": "3.0.2"
@ -3249,7 +3279,8 @@
}, },
"minizlib": { "minizlib": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz",
"integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==",
"optional": true, "optional": true,
"requires": { "requires": {
"minipass": "2.2.4" "minipass": "2.2.4"
@ -3257,19 +3288,22 @@
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
}, },
"ms": { "ms": {
"version": "2.0.0", "version": "2.0.0",
"bundled": true, "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"optional": true "optional": true
}, },
"needle": { "needle": {
"version": "2.2.0", "version": "2.2.0",
"bundled": true, "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.0.tgz",
"integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==",
"optional": true, "optional": true,
"requires": { "requires": {
"debug": "2.6.9", "debug": "2.6.9",
@ -3278,8 +3312,9 @@
} }
}, },
"node-pre-gyp": { "node-pre-gyp": {
"version": "0.9.1", "version": "0.10.0",
"bundled": true, "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz",
"integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==",
"optional": true, "optional": true,
"requires": { "requires": {
"detect-libc": "1.0.3", "detect-libc": "1.0.3",
@ -3288,7 +3323,7 @@
"nopt": "4.0.1", "nopt": "4.0.1",
"npm-packlist": "1.1.10", "npm-packlist": "1.1.10",
"npmlog": "4.1.2", "npmlog": "4.1.2",
"rc": "1.2.6", "rc": "1.2.7",
"rimraf": "2.6.2", "rimraf": "2.6.2",
"semver": "5.5.0", "semver": "5.5.0",
"tar": "4.4.1" "tar": "4.4.1"
@ -3296,7 +3331,8 @@
}, },
"nopt": { "nopt": {
"version": "4.0.1", "version": "4.0.1",
"bundled": true, "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"optional": true, "optional": true,
"requires": { "requires": {
"abbrev": "1.1.1", "abbrev": "1.1.1",
@ -3305,12 +3341,14 @@
}, },
"npm-bundled": { "npm-bundled": {
"version": "1.0.3", "version": "1.0.3",
"bundled": true, "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz",
"integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==",
"optional": true "optional": true
}, },
"npm-packlist": { "npm-packlist": {
"version": "1.1.10", "version": "1.1.10",
"bundled": true, "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz",
"integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==",
"optional": true, "optional": true,
"requires": { "requires": {
"ignore-walk": "3.0.1", "ignore-walk": "3.0.1",
@ -3319,7 +3357,8 @@
}, },
"npmlog": { "npmlog": {
"version": "4.1.2", "version": "4.1.2",
"bundled": true, "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"optional": true, "optional": true,
"requires": { "requires": {
"are-we-there-yet": "1.1.4", "are-we-there-yet": "1.1.4",
@ -3330,33 +3369,39 @@
}, },
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
"bundled": true, "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"optional": true "optional": true
}, },
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": { "requires": {
"wrappy": "1.0.2" "wrappy": "1.0.2"
} }
}, },
"os-homedir": { "os-homedir": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
"optional": true "optional": true
}, },
"os-tmpdir": { "os-tmpdir": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"optional": true "optional": true
}, },
"osenv": { "osenv": {
"version": "0.1.5", "version": "0.1.5",
"bundled": true, "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"optional": true, "optional": true,
"requires": { "requires": {
"os-homedir": "1.0.2", "os-homedir": "1.0.2",
@ -3365,20 +3410,23 @@
}, },
"path-is-absolute": { "path-is-absolute": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"optional": true "optional": true
}, },
"process-nextick-args": { "process-nextick-args": {
"version": "2.0.0", "version": "2.0.0",
"bundled": true, "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
"optional": true "optional": true
}, },
"rc": { "rc": {
"version": "1.2.6", "version": "1.2.7",
"bundled": true, "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz",
"integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==",
"optional": true, "optional": true,
"requires": { "requires": {
"deep-extend": "0.4.2", "deep-extend": "0.5.1",
"ini": "1.3.5", "ini": "1.3.5",
"minimist": "1.2.0", "minimist": "1.2.0",
"strip-json-comments": "2.0.1" "strip-json-comments": "2.0.1"
@ -3386,14 +3434,16 @@
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
"bundled": true, "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"optional": true "optional": true
} }
} }
}, },
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"bundled": true, "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"optional": true, "optional": true,
"requires": { "requires": {
"core-util-is": "1.0.2", "core-util-is": "1.0.2",
@ -3407,7 +3457,8 @@
}, },
"rimraf": { "rimraf": {
"version": "2.6.2", "version": "2.6.2",
"bundled": true, "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
"optional": true, "optional": true,
"requires": { "requires": {
"glob": "7.1.2" "glob": "7.1.2"
@ -3415,36 +3466,43 @@
}, },
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
"bundled": true, "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"optional": true "optional": true
}, },
"sax": { "sax": {
"version": "1.2.4", "version": "1.2.4",
"bundled": true, "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"optional": true "optional": true
}, },
"semver": { "semver": {
"version": "5.5.0", "version": "5.5.0",
"bundled": true, "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
"optional": true "optional": true
}, },
"set-blocking": { "set-blocking": {
"version": "2.0.0", "version": "2.0.0",
"bundled": true, "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"optional": true "optional": true
}, },
"signal-exit": { "signal-exit": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
"optional": true "optional": true
}, },
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": { "requires": {
"code-point-at": "1.1.0", "code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0", "is-fullwidth-code-point": "1.0.0",
@ -3453,7 +3511,8 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"bundled": true, "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"optional": true, "optional": true,
"requires": { "requires": {
"safe-buffer": "5.1.1" "safe-buffer": "5.1.1"
@ -3461,19 +3520,22 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": { "requires": {
"ansi-regex": "2.1.1" "ansi-regex": "2.1.1"
} }
}, },
"strip-json-comments": { "strip-json-comments": {
"version": "2.0.1", "version": "2.0.1",
"bundled": true, "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
"optional": true "optional": true
}, },
"tar": { "tar": {
"version": "4.4.1", "version": "4.4.1",
"bundled": true, "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz",
"integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==",
"optional": true, "optional": true,
"requires": { "requires": {
"chownr": "1.0.1", "chownr": "1.0.1",
@ -3487,12 +3549,14 @@
}, },
"util-deprecate": { "util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"optional": true "optional": true
}, },
"wide-align": { "wide-align": {
"version": "1.1.2", "version": "1.1.2",
"bundled": true, "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz",
"integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==",
"optional": true, "optional": true,
"requires": { "requires": {
"string-width": "1.0.2" "string-width": "1.0.2"
@ -3500,11 +3564,13 @@
}, },
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz",
"integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k="
} }
} }
}, },
@ -4912,7 +4978,7 @@
"metro-source-map": "0.24.7", "metro-source-map": "0.24.7",
"mime-types": "2.1.11", "mime-types": "2.1.11",
"mkdirp": "0.5.1", "mkdirp": "0.5.1",
"request": "2.85.0", "request": "2.86.0",
"rimraf": "2.6.2", "rimraf": "2.6.2",
"serialize-error": "2.1.0", "serialize-error": "2.1.0",
"source-map": "0.5.7", "source-map": "0.5.7",
@ -5565,7 +5631,7 @@
"performance-now": "0.2.0", "performance-now": "0.2.0",
"qs": "6.4.0", "qs": "6.4.0",
"safe-buffer": "5.1.2", "safe-buffer": "5.1.2",
"stringstream": "0.0.5", "stringstream": "0.0.6",
"tough-cookie": "2.3.4", "tough-cookie": "2.3.4",
"tunnel-agent": "0.6.0", "tunnel-agent": "0.6.0",
"uuid": "3.2.1" "uuid": "3.2.1"
@ -6795,7 +6861,7 @@
"node-pre-gyp": "0.6.39", "node-pre-gyp": "0.6.39",
"progress": "2.0.0", "progress": "2.0.0",
"prop-types": "15.6.0", "prop-types": "15.6.0",
"request": "2.85.0", "request": "2.86.0",
"stream-counter": "1.0.0", "stream-counter": "1.0.0",
"sync-request": "3.0.1", "sync-request": "3.0.1",
"url-parse": "1.4.0" "url-parse": "1.4.0"
@ -6832,9 +6898,9 @@
} }
}, },
"regenerate": { "regenerate": {
"version": "1.3.3", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz",
"integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg=="
}, },
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.11.1", "version": "0.11.1",
@ -6873,7 +6939,7 @@
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
"integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
"requires": { "requires": {
"regenerate": "1.3.3", "regenerate": "1.4.0",
"regjsgen": "0.2.0", "regjsgen": "0.2.0",
"regjsparser": "0.1.5" "regjsparser": "0.1.5"
} }
@ -6922,9 +6988,9 @@
} }
}, },
"request": { "request": {
"version": "2.85.0", "version": "2.86.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", "resolved": "https://registry.npmjs.org/request/-/request-2.86.0.tgz",
"integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", "integrity": "sha512-BQZih67o9r+Ys94tcIW4S7Uu8pthjrQVxhsZ/weOwHbDfACxvIyvnAbzFQxjy1jMtvFSzv5zf4my6cZsJBbVzw==",
"requires": { "requires": {
"aws-sign2": "0.7.0", "aws-sign2": "0.7.0",
"aws4": "1.7.0", "aws4": "1.7.0",
@ -6944,7 +7010,6 @@
"performance-now": "2.1.0", "performance-now": "2.1.0",
"qs": "6.5.2", "qs": "6.5.2",
"safe-buffer": "5.1.2", "safe-buffer": "5.1.2",
"stringstream": "0.0.5",
"tough-cookie": "2.3.4", "tough-cookie": "2.3.4",
"tunnel-agent": "0.6.0", "tunnel-agent": "0.6.0",
"uuid": "3.2.1" "uuid": "3.2.1"
@ -7123,7 +7188,7 @@
"capture-exit": "1.2.0", "capture-exit": "1.2.0",
"exec-sh": "0.2.1", "exec-sh": "0.2.1",
"fb-watchman": "2.0.0", "fb-watchman": "2.0.0",
"fsevents": "1.2.3", "fsevents": "1.2.4",
"micromatch": "3.1.10", "micromatch": "3.1.10",
"minimist": "1.2.0", "minimist": "1.2.0",
"walker": "1.0.7", "walker": "1.0.7",
@ -7688,9 +7753,9 @@
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}, },
"stringstream": { "stringstream": {
"version": "0.0.5", "version": "0.0.6",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA=="
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
@ -7769,9 +7834,9 @@
} }
}, },
"tar-stream": { "tar-stream": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.0.tgz", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz",
"integrity": "sha512-lh2iAPG/BHNmN6WB9Ybdynk9rEJ5GD/dy4zscHmVlwa1dq2tpE+BH78i5vjYwYVWEaOXGBjzxr89aVACF17Cpw==", "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==",
"requires": { "requires": {
"bl": "1.2.2", "bl": "1.2.2",
"buffer-alloc": "1.1.0", "buffer-alloc": "1.1.0",
@ -8249,7 +8314,7 @@
} }
}, },
"web3": { "web3": {
"version": "github:status-im/web3.js#47318ea76453ced83efa8538825c17d0c4e4b86b", "version": "github:status-im/web3.js#ff09ce57e9574a1c42138832a7d6bf6c2e699048",
"requires": { "requires": {
"bignumber.js": "github:status-im/bignumber.js#cc066a0a3d6bfe0c436c9957f4ea8344bf963c89", "bignumber.js": "github:status-im/bignumber.js#cc066a0a3d6bfe0c436c9957f4ea8344bf963c89",
"crypto-js": "3.1.8", "crypto-js": "3.1.8",

View File

@ -63,6 +63,6 @@
"rn-snoopy": "github:status-im/rn-snoopy", "rn-snoopy": "github:status-im/rn-snoopy",
"string_decoder": "0.10.31", "string_decoder": "0.10.31",
"url": "0.10.3", "url": "0.10.3",
"web3": "github:status-im/web3.js#experiment/filter" "web3": "github:status-im/web3.js#feature/shhext"
} }
} }

View File

@ -2,11 +2,19 @@
;; Seen messages ;; Seen messages
(defn receive-seen (defn receive-seen
[chat-id sender message-ids {:keys [db]}] [chat-id sender {:keys [message-ids js-obj]} {:keys [db]}]
(merge
{:confirm-message-processed [{:web3 (:web3 db)
:js-obj js-obj}]}
(when-let [seen-messages-ids (-> (get-in db [:chats chat-id :messages]) (when-let [seen-messages-ids (-> (get-in db [:chats chat-id :messages])
(select-keys message-ids) (select-keys message-ids)
keys)] keys)]
{:db (reduce (fn [new-db message-id] {:db (reduce
(assoc-in new-db [:chats chat-id :messages message-id :user-statuses sender] :seen)) (fn [new-db message-id]
(assoc-in new-db
[:chats chat-id
:messages message-id
:user-statuses sender]
:seen))
db db
seen-messages-ids)})) seen-messages-ids)})))

View File

@ -92,15 +92,20 @@
(not (chat-model/bot-only-chat? db chat-id)) (not (chat-model/bot-only-chat? db chat-id))
(not (= constants/system from))))))) (not (= constants/system from)))))))
(defn confirm-messages-processed [js-obj {{:keys [web3]} :db}]
{:confirm-message-processed [{:web3 web3
:js-obj js-obj}]})
(defn receive (defn receive
[{:keys [chat-id message-id] :as message} {:keys [now] :as cofx}] [{:keys [chat-id message-id js-obj] :as message} {:keys [now] :as cofx}]
(handlers-macro/merge-fx cofx (handlers-macro/merge-fx cofx
(chat-model/upsert-chat {:chat-id chat-id (chat-model/upsert-chat {:chat-id chat-id
;; We activate a chat again on new messages ;; We activate a chat again on new messages
:is-active true :is-active true
:timestamp now}) :timestamp now})
(add-received-message message) (add-received-message message)
(requests-events/add-request chat-id message-id))) (requests-events/add-request chat-id message-id)
(confirm-messages-processed js-obj)))
(defn system-message [chat-id message-id timestamp content] (defn system-message [chat-id message-id timestamp content]
{:message-id message-id {:message-id message-id

View File

@ -18,20 +18,25 @@
[status-im.transport.message.v1.group-chat :as v1.group-chat] [status-im.transport.message.v1.group-chat :as v1.group-chat]
[status-im.data-store.transport :as transport-store])) [status-im.data-store.transport :as transport-store]))
(defn receive-message [cofx chat-id message] (defn receive-message [cofx chat-id js-message]
(let [{:keys [payload sig]} message (let [{:keys [payload sig]} (js->clj js-message :keywordize-keys true)
status-message (-> payload status-message (-> payload
transport.utils/to-utf8 transport.utils/to-utf8
transit/deserialize)] transit/deserialize
(assoc :js-obj js-message))]
(when (and sig status-message) (when (and sig status-message)
(message/receive status-message (or chat-id sig) sig cofx)))) (message/receive status-message (or chat-id sig) sig cofx))))
(defn- js-array->list [array]
(for [i (range (.-length array))]
(aget array i)))
(defn receive-whisper-messages [cofx [js-error js-messages chat-id]] (defn receive-whisper-messages [cofx [js-error js-messages chat-id]]
(handlers-macro/merge-effects (handlers-macro/merge-effects
cofx cofx
(fn [message temp-cofx] (fn [message temp-cofx]
(receive-message temp-cofx chat-id message)) (receive-message temp-cofx chat-id message))
(js->clj js-messages :keywordize-keys true))) (js-array->list js-messages)))
(handlers/register-handler-fx (handlers/register-handler-fx
:protocol/receive-whisper-message :protocol/receive-whisper-message
@ -155,3 +160,17 @@
(if message (if message
(handlers-macro/merge-fx cofx fx (message/receive message chat-id signature)) (handlers-macro/merge-fx cofx fx (message/receive message chat-id signature))
fx)))) fx))))
(re-frame/reg-fx
;; TODO(rasom): confirmMessagesProcessed should be called after :data-store/tx
;; effect, so this effect should be rewritten/removed
:confirm-message-processed
(fn [messages]
(let [{:keys [web3]} (first messages)
js-messages (->> messages
(keep :js-obj)
(apply array))]
(when (pos? (.-length js-messages))
(.. web3
-shh
(confirmMessagesProcessed js-messages (fn [_ _])))))))

View File

@ -109,4 +109,4 @@
:payload this} :payload this}
cofx)) cofx))
(receive [this chat-id signature cofx] (receive [this chat-id signature cofx]
(chat/receive-seen chat-id signature (:message-ids this) cofx))) (chat/receive-seen chat-id signature this cofx)))

View File

@ -9,7 +9,8 @@
(def ^:private mergable-keys (def ^:private mergable-keys
#{:data-store/tx :data-store/base-tx :chat-received-message/add-fx #{:data-store/tx :data-store/base-tx :chat-received-message/add-fx
:shh/add-new-sym-keys :call-jail :shh/get-new-sym-keys}) :shh/add-new-sym-keys :call-jail :shh/get-new-sym-keys
:confirm-message-processed})
(defn safe-merge [fx new-fx] (defn safe-merge [fx new-fx]
(if (:merging-fx-with-common-keys fx) (if (:merging-fx-with-common-keys fx)