From dd0bb16e58d966cbdf0ab52cf0f3ca3629f6049a Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 9 Jun 2017 22:03:02 -0700 Subject: [PATCH 01/30] update webpack.dev.config for v2 --- ui/package.json | 4 ++-- ui/webpack.config.js | 2 +- ui/webpack.dev.config.js | 39 +++++++++++++++++++++------------------ 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/ui/package.json b/ui/package.json index a079118a3..2c4913238 100644 --- a/ui/package.json +++ b/ui/package.json @@ -42,7 +42,7 @@ "devDependencies": { "babel": "^6.5.2", "babel-core": "^6.18.2", - "babel-loader": "^6.2.8", + "babel-loader": "^6.4.1", "babel-plugin-react-require": "^3.0.0", "babel-polyfill": "^6.20.0", "babel-preset-es2015": "^6.18.0", @@ -59,7 +59,7 @@ "lint-staged": "^3.6.0", "node-sass": "^3.13.0", "prettier": "^1.4.2", - "webpack": "^1.13.3", + "webpack": "^2.6.1", "webpack-dev-server": "^2.4.4", "webpack-notifier": "^1.5.0", "webpack-target-electron-renderer": "^0.4.0" diff --git a/ui/webpack.config.js b/ui/webpack.config.js index 59c2fd6d5..fe3bd5c99 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -50,4 +50,4 @@ module.exports = { ] }, target: 'electron-main', -}; \ No newline at end of file +}; diff --git a/ui/webpack.dev.config.js b/ui/webpack.dev.config.js index 232f6dcc3..d5332f332 100644 --- a/ui/webpack.dev.config.js +++ b/ui/webpack.dev.config.js @@ -17,43 +17,46 @@ module.exports = { filename: "bundle.js", pathinfo: true }, - debug: true, cache: true, devtool: 'eval', resolve: { - root: appPath, - extensions: ['', '.js', '.jsx', '.css'], + modules: [appPath, "node_modules"], + extensions: ['.js', '.jsx', '.css'] }, plugins: [ new WebpackNotifierPlugin(), new webpack.DefinePlugin({ ENV: JSON.stringify("development"), }), + new webpack.LoaderOptionsPlugin({ + debug: true + }) ], module: { - preLoaders: [ + rules: [ { test: /\.jsx?$/, + enforce: "pre", loaders: ['eslint'], // define an include so we check just the files we need include: PATHS.app - } - ], - loaders: [ - { test: /\.css$/, loader: "style!css" }, + }, + { + test: /\.css$/, + use: ["style-loader", "css-loader"] + }, { test: /\.jsx?$/, - loader: 'babel', - query: { - cacheDirectory: true, - presets:[ 'es2015', 'react', 'stage-2' ] + exclude: /node_modules/, + use: { + loader: 'babel-loader', + options: { + cacheDirectory: true, + presets: [ 'es2015', 'react', 'stage-2' ] + } } - }, - { - test: /mime\.json$/, - loader: 'json', - }, + } ] }, target: 'electron-main', -}; \ No newline at end of file +}; From d4afa34d482b0893c20a2820ace0e0f9d24af21b Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 9 Jun 2017 22:13:11 -0700 Subject: [PATCH 02/30] update webpack.config for v2 --- ui/webpack.config.js | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/ui/webpack.config.js b/ui/webpack.config.js index fe3bd5c99..b9267fd29 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -16,8 +16,8 @@ module.exports = { }, devtool: 'source-map', resolve: { - root: appPath, - extensions: ['', '.js', '.jsx', '.css'], + modules: [appPath, "node_modules"], + extensions: ['.js', '.jsx', '.css'] }, plugins: [ new webpack.DefinePlugin({ @@ -25,28 +25,29 @@ module.exports = { }), ], module: { - preLoaders: [ + rules: [ { test: /\.jsx?$/, + enforce: "pre", loaders: ['eslint'], // define an include so we check just the files we need include: PATHS.app - } - ], - loaders: [ - { test: /\.css$/, loader: "style!css" }, + }, + { + test: /\.css$/, + use: ["style-loader", "css-loader"] + }, { test: /\.jsx?$/, - loader: 'babel', - query: { - cacheDirectory: true, - presets:[ 'es2015', 'react', 'stage-2' ] + exclude: /node_modules/, + use: { + loader: 'babel-loader', + options: { + cacheDirectory: true, + presets: [ 'es2015', 'react', 'stage-2' ] + } } - }, - { - test: /mime\.json$/, - loader: 'json', - }, + } ] }, target: 'electron-main', From 3a89a75e7d914fca985edc39f07e0a4f6df887d3 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Sat, 10 Jun 2017 21:59:33 -0700 Subject: [PATCH 03/30] consistent quote type --- ui/webpack.config.js | 28 ++++++++++++++-------------- ui/webpack.dev.config.js | 30 +++++++++++++++--------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ui/webpack.config.js b/ui/webpack.config.js index b9267fd29..b0ab6f08a 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -1,23 +1,23 @@ -const path = require('path'); -const webpack = require('webpack') -const appPath = path.resolve(__dirname, 'js'); +const path = require("path"); +const webpack = require("webpack") +const appPath = path.resolve(__dirname, "js"); const PATHS = { - app: path.join(__dirname, 'app'), - dist: path.join(__dirname, 'dist') + app: path.join(__dirname, "app"), + dist: path.join(__dirname, "dist") }; module.exports = { - entry: ['babel-polyfill', './js/main.js'], + entry: ["babel-polyfill", "./js/main.js"], output: { - path: path.join(PATHS.dist, 'js'), - publicPath: '/js/', + path: path.join(PATHS.dist, "js"), + publicPath: "/js/", filename: "bundle.js" }, - devtool: 'source-map', + devtool: "source-map", resolve: { modules: [appPath, "node_modules"], - extensions: ['.js', '.jsx', '.css'] + extensions: [".js", ".jsx", ".css"] }, plugins: [ new webpack.DefinePlugin({ @@ -29,7 +29,7 @@ module.exports = { { test: /\.jsx?$/, enforce: "pre", - loaders: ['eslint'], + loaders: ["eslint"], // define an include so we check just the files we need include: PATHS.app }, @@ -41,14 +41,14 @@ module.exports = { test: /\.jsx?$/, exclude: /node_modules/, use: { - loader: 'babel-loader', + loader: "babel-loader", options: { cacheDirectory: true, - presets: [ 'es2015', 'react', 'stage-2' ] + presets: [ "es2015", "react", "stage-2" ] } } } ] }, - target: 'electron-main', + target: "electron-main", }; diff --git a/ui/webpack.dev.config.js b/ui/webpack.dev.config.js index d5332f332..42107a3c5 100644 --- a/ui/webpack.dev.config.js +++ b/ui/webpack.dev.config.js @@ -1,27 +1,27 @@ -const path = require('path'); -const webpack = require('webpack') -const WebpackNotifierPlugin = require('webpack-notifier') +const path = require("path"); +const webpack = require("webpack") +const WebpackNotifierPlugin = require("webpack-notifier") -const appPath = path.resolve(__dirname, 'js'); +const appPath = path.resolve(__dirname, "js"); const PATHS = { - app: path.join(__dirname, 'app'), - dist: path.join(__dirname, '..', 'app', 'dist') + app: path.join(__dirname, "app"), + dist: path.join(__dirname, "..", "app", "dist") }; module.exports = { - entry: ['babel-polyfill', './js/main.js'], + entry: ["babel-polyfill", "./js/main.js"], output: { - path: path.join(PATHS.dist, 'js'), - publicPath: '/js/', + path: path.join(PATHS.dist, "js"), + publicPath: "/js/", filename: "bundle.js", pathinfo: true }, cache: true, - devtool: 'eval', + devtool: "eval", resolve: { modules: [appPath, "node_modules"], - extensions: ['.js', '.jsx', '.css'] + extensions: [".js", ".jsx", ".css"] }, plugins: [ new WebpackNotifierPlugin(), @@ -37,7 +37,7 @@ module.exports = { { test: /\.jsx?$/, enforce: "pre", - loaders: ['eslint'], + loaders: ["eslint"], // define an include so we check just the files we need include: PATHS.app }, @@ -49,14 +49,14 @@ module.exports = { test: /\.jsx?$/, exclude: /node_modules/, use: { - loader: 'babel-loader', + loader: "babel-loader", options: { cacheDirectory: true, - presets: [ 'es2015', 'react', 'stage-2' ] + presets: [ "es2015", "react", "stage-2" ] } } } ] }, - target: 'electron-main', + target: "electron-main", }; From d59f5f100585e172c5eea17668e7636711b42cdb Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Tue, 13 Jun 2017 11:19:56 +0700 Subject: [PATCH 04/30] Regenerate lock files --- app/package-lock.json | 20 ++ package-lock.json | 36 +-- ui/package-lock.json | 588 +++++++++++++++++++++++++++++++++--------- 3 files changed, 492 insertions(+), 152 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index a5eec6773..9ac1f3774 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -63,6 +63,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.6.0.tgz", "integrity": "sha1-Umao9J3Zib5Pn2gbbyoMVShdDZo=" }, + "modify-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/modify-filename/-/modify-filename-1.1.0.tgz", + "integrity": "sha1-mi3sg4Bvuy2XXyK+7IWcoms5OqE=" + }, "npm": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/npm/-/npm-4.6.1.tgz", @@ -1451,6 +1456,16 @@ } } }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "pupa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-1.0.0.tgz", + "integrity": "sha1-mpVopa9+ZXuEYqbp1TKHQ1YM7/Y=" + }, "semver": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", @@ -1465,6 +1480,11 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.1.0.tgz", "integrity": "sha1-yWPc8DciiS7FnLpWnpQLcZVNFyk=" + }, + "unused-filename": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unused-filename/-/unused-filename-0.1.0.tgz", + "integrity": "sha1-5fM7yeSmP4f2TTwR0xl53vXS5/s=" } } } diff --git a/package-lock.json b/package-lock.json index 5f5e82c88..4e178ac4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "@types/node": { - "version": "7.0.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.29.tgz", - "integrity": "sha512-+8JrLZny/uR+d/jLK9eaV63buRM7X/gNzQk57q76NS4KNKLSKOmxJYFIlwuP2zDvA7wqZj05POPhSd9Z1hYQpQ==", + "version": "7.0.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.31.tgz", + "integrity": "sha512-+KrE1LDddn97ip+gXZAnzNQ0pupKH/6tcKwTpo96BDVNpzmhIKGHug0Wd3H0dN4WEqYB1tXYI5m2mZuIZNI8tg==", "dev": true }, "7zip-bin": { @@ -121,9 +121,9 @@ "dev": true }, "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "base64-js": { @@ -164,9 +164,9 @@ "dev": true }, "brace-expansion": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "dev": true }, "builtin-modules": { @@ -431,9 +431,9 @@ "optional": true }, "electron": { - "version": "1.6.10", - "resolved": "https://registry.npmjs.org/electron/-/electron-1.6.10.tgz", - "integrity": "sha1-Twuc1ZbjVwC1cSj5iMwdLOZ+VnE=", + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/electron/-/electron-1.6.11.tgz", + "integrity": "sha1-vnnA69zv7bW/KBF0CYAPpTus7/o=", "dev": true }, "electron-builder": { @@ -993,12 +993,6 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true }, - "lodash": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.12.0.tgz", - "integrity": "sha1-K9bcRqBA9Z5obJcu0h2T3FkFMlg=", - "dev": true - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -1666,12 +1660,6 @@ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", "dev": true }, - "why-did-you-update": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/why-did-you-update/-/why-did-you-update-0.0.8.tgz", - "integrity": "sha1-OJ2X3WwUfh7byfXVRw1E2YXIrjg=", - "dev": true - }, "widest-line": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", diff --git a/ui/package-lock.json b/ui/package-lock.json index 1d2c1b108..7754552e1 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -20,6 +20,20 @@ "integrity": "sha1-xGDfCEkUY/AozLguqzcwvwEIez0=", "dev": true }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "dev": true, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, "acorn-jsx": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", @@ -98,7 +112,7 @@ "aproba": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz", - "integrity": "sha1-RcZikJTeTpb2k+9+q3SuB5wkD8E=" + "integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==" }, "are-we-there-yet": { "version": "1.1.4", @@ -170,6 +184,12 @@ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, + "asn1.js": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", + "integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=", + "dev": true + }, "assert": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", @@ -182,9 +202,9 @@ "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.4.1.tgz", + "integrity": "sha1-YqVrJ5yYoR0JhwlqAcw+6463u9c=", "dev": true }, "async-each": { @@ -642,9 +662,9 @@ "integrity": "sha512-mq0x3HCAGGmQyZXviOVe5TRsw37Ijy3D43jCqt/9WVf+onx2dUgW3PosnqCbScAFhRO9DGs8nxoMzU0iiosMqQ==" }, "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base64-js": { "version": "1.2.0", @@ -685,25 +705,61 @@ "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=" }, + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + }, "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=" }, "brace-expansion": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=" + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=" }, "braces": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=" }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, "browserify-aes": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-0.4.0.tgz", - "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", + "integrity": "sha1-Xncl297x/Vkw1OurSFZ85FHEigo=", + "dev": true + }, + "browserify-cipher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "dev": true + }, + "browserify-des": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "dev": true + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true }, "browserify-zlib": { @@ -718,6 +774,12 @@ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -790,6 +852,12 @@ "integrity": "sha1-3FKF8rTiUYIWg2gcOBwziPRuxTQ=", "dev": true }, + "cipher-base": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz", + "integrity": "sha1-7qvxlEGc6QDaMBjCB9IS8qbfCgc=", + "dev": true + }, "circular-json": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz", @@ -994,10 +1062,28 @@ } } }, + "create-ecdh": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "dev": true + }, + "create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", + "dev": true + }, + "create-hmac": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", + "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", + "dev": true + }, "create-react-class": { - "version": "15.5.3", - "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.5.3.tgz", - "integrity": "sha1-+w98rnkznpoXnhlO9Gbvo5I4IP4=" + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.5.4.tgz", + "integrity": "sha1-GIh1yxXi++TKWVtvQ+sOSh8A/lA=" }, "cross-spawn": { "version": "3.0.1", @@ -1010,9 +1096,9 @@ "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=" }, "crypto-browserify": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.3.0.tgz", - "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz", + "integrity": "sha1-NlKgkGq5sqfgw85mpAjpV6JIVSI=", "dev": true }, "currently-unhandled": { @@ -1105,6 +1191,12 @@ "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=", "dev": true }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true + }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", @@ -1122,6 +1214,12 @@ "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", "dev": true }, + "diffie-hellman": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "dev": true + }, "doctrine": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", @@ -1157,6 +1255,12 @@ "resolved": "https://registry.npmjs.org/element-class/-/element-class-0.2.2.tgz", "integrity": "sha1-nTu9B2f5AT744cjr5yLBQCpgBQ4=" }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true + }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", @@ -1180,18 +1284,10 @@ "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=" }, "enhanced-resolve": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", - "dev": true, - "dependencies": { - "memory-fs": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", - "dev": true - } - } + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.1.0.tgz", + "integrity": "sha1-n0tib1dyRe3PSyrYPYbhf09CHew=", + "dev": true }, "errno": { "version": "0.1.4", @@ -1484,10 +1580,16 @@ "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", "dev": true }, + "evp_bytestokey": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz", + "integrity": "sha1-SXtmrZ/vZc18CKYYCCS6FHa2blM=", + "dev": true + }, "execa": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.6.3.tgz", - "integrity": "sha1-V7aaWU8IF1nGnlNw8NF7nLEWWP4=", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "dependencies": { "cross-spawn": { @@ -2323,7 +2425,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=" + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==" }, "glob-base": { "version": "0.3.0", @@ -2347,16 +2449,9 @@ "dev": true }, "globule": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.1.0.tgz", - "integrity": "sha1-xJNS5NwYPYWJPuglOF65lLtt9F8=", - "dependencies": { - "lodash": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.6.tgz", - "integrity": "sha1-0iyaxmAojzhD4Wun0rXQbMon13c=" - } - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", + "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=" }, "graceful-fs": { "version": "4.1.11", @@ -2412,11 +2507,29 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, + "hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", + "dev": true + }, + "hash.js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", + "integrity": "sha1-EzL/ABVsCg/92CNgE9B7d6BFFXM=", + "dev": true + }, "hawk": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=" }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true + }, "hoek": { "version": "2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", @@ -2892,9 +3005,9 @@ "dev": true }, "lint-staged": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-3.6.0.tgz", - "integrity": "sha1-zajwvvFueSjMFLc1GGrhLNZiWZw=", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-3.6.1.tgz", + "integrity": "sha1-JEI8i3vZnZbhWs0ayMs5KnjlhYI=", "dev": true }, "listr": { @@ -2940,6 +3053,12 @@ "integrity": "sha1-VuC/CL2XCLJqdltoUJhAyN7J/bw=", "dev": true }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, "loader-utils": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", @@ -3087,9 +3206,9 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=" }, "lru-cache": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.0.tgz", - "integrity": "sha512-aHGs865JXz6bkB4AHL+3AhyvTFKL3iZamKVWjIUKnXOXyasJvqPK8WAjOnAQKQZVpeXDVz19u1DD0r/12bWAdQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==" }, "map-obj": { "version": "1.0.1", @@ -3120,9 +3239,9 @@ "integrity": "sha1-J6nBqsUb+266lq8tE6hNCyqOrGg=" }, "memory-fs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", - "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "dev": true }, "meow": { @@ -3154,6 +3273,12 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=" }, + "miller-rabin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", + "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", + "dev": true + }, "mime": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", @@ -3176,10 +3301,16 @@ "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", "dev": true }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=" + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" }, "minimist": { "version": "0.0.8", @@ -3248,7 +3379,7 @@ "node-fetch": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz", - "integrity": "sha1-iZyz0KPJL5UsR/G4dvTIrqvUANU=" + "integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==" }, "node-gyp": { "version": "3.6.2", @@ -3256,9 +3387,9 @@ "integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=" }, "node-libs-browser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.7.0.tgz", - "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.0.0.tgz", + "integrity": "sha1-o6WeyXAkmFtG6Vg3lkb5bEthZkY=", "dev": true, "dependencies": { "string_decoder": { @@ -3330,7 +3461,7 @@ "npmlog": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz", - "integrity": "sha1-3Fm+6F9k8A7UJO+yrweD3yXRwLU=" + "integrity": "sha512-ocolIkZYZt8UveuiDS0yAkkIjid1o7lPG8cYm05yNYzBn8ykQtaiPMEGp8fY9tKdDgm8okpdKzkvu1y9hUYugA==" }, "number-is-nan": { "version": "1.0.1", @@ -3506,6 +3637,12 @@ "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", "dev": true }, + "parse-asn1": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", + "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", + "dev": true + }, "parse-glob": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", @@ -3567,6 +3704,12 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=" }, + "pbkdf2": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.12.tgz", + "integrity": "sha1-vjZ4XFBn6kjYBv+SMojF91C2uKI=", + "dev": true + }, "pbkdf2-compat": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", @@ -3609,7 +3752,15 @@ "version": "1.0.13", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", - "dev": true + "dev": true, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } + } }, "prelude-ls": { "version": "1.1.2", @@ -3677,6 +3828,12 @@ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "dev": true + }, "pump": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", @@ -3711,9 +3868,42 @@ "dev": true }, "randomatic": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz", - "integrity": "sha1-EQ3Kv/OX6dz/fAeJzMCkmt8exbs=" + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=" + } + } + }, + "randombytes": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", + "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "dev": true, + "dependencies": { + "safe-buffer": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz", + "integrity": "sha512-aSLEDudu6OoRr/2rU609gRmnYboRLxgDG1z9o2Q0os7236FwvcqIOO8r8U5JUEwivZOhDaKlFO4SbPTJYyBEyQ==", + "dev": true + } + } }, "range-parser": { "version": "1.2.0", @@ -3742,9 +3932,9 @@ "integrity": "sha1-ugwoeG/VLtfk8hNf4CiNRirvk9o=" }, "react-modal": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-1.7.11.tgz", - "integrity": "sha512-mKKJlDp7mIWAuBpg0ZJLoGEzyVME63vs5jBy+D53R9V+hVJ775y8DXFYRGLQYSZW9IFE0qkmNSLm7HdgDGqzsg==" + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-1.9.2.tgz", + "integrity": "sha512-4FG4SsYdJ9ncLYIP17Q8HEWRXbEsd+lHkG3vJd+koqXdPDMzP+2KZFjrkMOVvLyvXYSpgVTqEqeLFnkJ2x8+Ig==" }, "react-redux": { "version": "5.0.5", @@ -3764,7 +3954,7 @@ "readable-stream": { "version": "2.2.11", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.11.tgz", - "integrity": "sha1-B5azH412iAB/8Lk6gIjTSqF8D3I=" + "integrity": "sha512-h+8+r3MKEhkiVrwdKL8aWs1oc1VvBu33ueshOvS26RsZQ3Amhx/oO3TKe4lApSV9ueY6as8EAh7mtuFjdlhg9Q==" }, "readdirp": { "version": "2.1.0", @@ -3952,9 +4142,9 @@ "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=" }, "ripemd160": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", - "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", "dev": true }, "run-async": { @@ -4056,9 +4246,9 @@ "dev": true }, "sha.js": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", - "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=", + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", + "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", "dev": true }, "shebang-command": { @@ -4135,9 +4325,9 @@ } }, "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-1.1.2.tgz", + "integrity": "sha1-mIkBnRAkzOVc3AaUmDN+9hhqEaE=", "dev": true }, "source-map": { @@ -4214,9 +4404,9 @@ "dev": true }, "stream-http": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.1.tgz", - "integrity": "sha1-VGpRdBrVprB+njGwsQRBqRffUoo=", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", + "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", "dev": true }, "stream-to-blob": { @@ -4314,9 +4504,9 @@ } }, "tapable": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.6.tgz", + "integrity": "sha1-IGvo4YiGC1FEJTdebxrom/sB/Y0=", "dev": true }, "tar": { @@ -4414,17 +4604,11 @@ "integrity": "sha1-BMgamb3V3FImPqKdJMa/jUgYpLs=" }, "uglify-js": { - "version": "2.7.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", - "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=", + "version": "2.8.28", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.28.tgz", + "integrity": "sha512-WqKNbmNJKzIdIEQu/U2ytgGBbhCy2PVks94GoetczOAJ/zCgVu2CuO7gguI5KPFGPtUtI1dmPQl6h0D4cPzypA==", "dev": true, "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", - "dev": true - }, "camelcase": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", @@ -4564,18 +4748,10 @@ "dev": true }, "watchpack": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", - "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", - "dev": true, - "dependencies": { - "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", - "dev": true - } - } + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.3.1.tgz", + "integrity": "sha1-fYaTkHsozmAT5/NhCqKhrPB9rYc=", + "dev": true }, "wbuf": { "version": "1.7.2", @@ -4584,21 +4760,15 @@ "dev": true }, "webpack": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.15.0.tgz", - "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.1.tgz", + "integrity": "sha1-LgRX8KuxrF3zqxBsacZy8jZ4Xwc=", "dev": true, "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - }, - "interpret": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", - "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=", + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true }, "supports-color": { @@ -4606,6 +4776,18 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true + }, + "yargs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "dev": true + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true } } }, @@ -4615,6 +4797,12 @@ "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", "dev": true, "dependencies": { + "source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", + "dev": true + }, "source-map": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", @@ -4627,15 +4815,7 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.10.2.tgz", "integrity": "sha1-LiUs4d+wINvaHMs33ybzCrAU29E=", - "dev": true, - "dependencies": { - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true - } - } + "dev": true }, "webpack-dev-server": { "version": "2.4.5", @@ -4675,11 +4855,163 @@ "integrity": "sha1-wBAAfUSM68NN78mezyiPpejGuvY=", "dev": true }, + "webpack-sources": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-0.2.3.tgz", + "integrity": "sha1-F8Yr+vE8cH+dAsR54Nzd6DgGl/s=", + "dev": true + }, "webpack-target-electron-renderer": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/webpack-target-electron-renderer/-/webpack-target-electron-renderer-0.4.0.tgz", "integrity": "sha1-UJM3CIVgRM/vFBk8qvMgriGc/aI=", - "dev": true + "dev": true, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "browserify-aes": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-0.4.0.tgz", + "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true + }, + "crypto-browserify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.3.0.tgz", + "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=", + "dev": true + }, + "enhanced-resolve": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", + "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", + "dev": true, + "dependencies": { + "memory-fs": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", + "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", + "dev": true + } + } + }, + "interpret": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", + "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=", + "dev": true + }, + "memory-fs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", + "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", + "dev": true + }, + "node-libs-browser": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.7.0.tgz", + "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", + "dev": true + }, + "ripemd160": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", + "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=", + "dev": true + }, + "sha.js": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", + "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true + }, + "tapable": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", + "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", + "dev": true + }, + "uglify-js": { + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", + "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=", + "dev": true, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + } + } + }, + "watchpack": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", + "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", + "dev": true, + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + } + } + }, + "webpack": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.15.0.tgz", + "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true + } + } }, "websocket-driver": { "version": "0.6.5", @@ -4725,7 +5057,7 @@ "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=" + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==" }, "window-size": { "version": "0.1.0", From d52d8872bec05c0f3e2fe62e59fa64591ddc7cd9 Mon Sep 17 00:00:00 2001 From: Le Long Date: Tue, 13 Jun 2017 17:02:06 +0200 Subject: [PATCH 05/30] use ipcRenderer as bridge for communication between electron and ui app --- app/menu/main-menu.js | 2 +- ui/js/main.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/menu/main-menu.js b/app/menu/main-menu.js index 32fc5168f..082b116ac 100644 --- a/app/menu/main-menu.js +++ b/app/menu/main-menu.js @@ -36,7 +36,7 @@ const baseTemplate = [ label: 'Help', click(item, focusedWindow) { if (focusedWindow) { - focusedWindow.loadURL(`file://${__dirname}/../dist/index.html?help`); + focusedWindow.webContents.send('open-menu', '/help'); } } } diff --git a/ui/js/main.js b/ui/js/main.js index 741c441da..78eceb235 100644 --- a/ui/js/main.js +++ b/ui/js/main.js @@ -49,6 +49,12 @@ ipcRenderer.on("open-uri-requested", (event, uri) => { } }); +ipcRenderer.on("open-menu", (event, uri) => { + if (uri && uri.startsWith("/help")) { + app.store.dispatch(doNavigate("/help")); + } +}); + document.addEventListener("click", event => { var target = event.target; while (target && target !== document) { From bbaec6bfe02c44f58e899e354b60ec7a6b1b37f0 Mon Sep 17 00:00:00 2001 From: Le Long Date: Tue, 13 Jun 2017 17:03:18 +0200 Subject: [PATCH 06/30] add changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67dbfd505..0866dc356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Web UI version numbers should always match the corresponding version of LBRY App ## [Unreleased] ### Added - * + * * ### Changed @@ -16,7 +16,7 @@ Web UI version numbers should always match the corresponding version of LBRY App * ### Fixed - * + * Fix help menu force reloading whole app * ### Deprecated From efd289b1edcad6254b17488a4a0a07c9ba4619c4 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 14 Jun 2017 11:21:16 -0400 Subject: [PATCH 07/30] increase wait time for daemon to launch --- ui/js/lbry.js | 750 +++++++++++++++++++++++++------------------------- 1 file changed, 375 insertions(+), 375 deletions(-) diff --git a/ui/js/lbry.js b/ui/js/lbry.js index e242bf538..a04ad50f8 100644 --- a/ui/js/lbry.js +++ b/ui/js/lbry.js @@ -1,25 +1,25 @@ -import lbryio from './lbryio.js'; -import lighthouse from './lighthouse.js'; -import jsonrpc from './jsonrpc.js'; -import lbryuri from './lbryuri.js'; -import { getLocal, getSession, setSession, setLocal } from './utils.js'; +import lbryio from "./lbryio.js"; +import lighthouse from "./lighthouse.js"; +import jsonrpc from "./jsonrpc.js"; +import lbryuri from "./lbryuri.js"; +import { getLocal, getSession, setSession, setLocal } from "./utils.js"; -const { remote, ipcRenderer } = require('electron'); -const menu = remote.require('./menu/main-menu'); +const { remote, ipcRenderer } = require("electron"); +const menu = remote.require("./menu/main-menu"); let lbry = { - isConnected: false, - daemonConnectionString: 'http://localhost:5279/lbryapi', - pendingPublishTimeout: 20 * 60 * 1000, - defaultClientSettings: { - showNsfw: false, - showUnavailable: true, - debug: false, - useCustomLighthouseServers: false, - customLighthouseServers: [], - showDeveloperMenu: false, - language: 'en' - } + isConnected: false, + daemonConnectionString: "http://localhost:5279/lbryapi", + pendingPublishTimeout: 20 * 60 * 1000, + defaultClientSettings: { + showNsfw: false, + showUnavailable: true, + debug: false, + useCustomLighthouseServers: false, + customLighthouseServers: [], + showDeveloperMenu: false, + language: "en", + }, }; /** @@ -27,24 +27,24 @@ let lbry = { * needed to make a dummy claim or file info object. */ function savePendingPublish({ name, channel_name }) { - let uri; - if (channel_name) { - uri = lbryuri.build({ name: channel_name, path: name }, false); - } else { - uri = lbryuri.build({ name: name }, false); - } - const pendingPublishes = getLocal('pendingPublishes') || []; - const newPendingPublish = { - name, - channel_name, - claim_id: 'pending_claim_' + uri, - txid: 'pending_' + uri, - nout: 0, - outpoint: 'pending_' + uri + ':0', - time: Date.now() - }; - setLocal('pendingPublishes', [...pendingPublishes, newPendingPublish]); - return newPendingPublish; + let uri; + if (channel_name) { + uri = lbryuri.build({ name: channel_name, path: name }, false); + } else { + uri = lbryuri.build({ name: name }, false); + } + const pendingPublishes = getLocal("pendingPublishes") || []; + const newPendingPublish = { + name, + channel_name, + claim_id: "pending_claim_" + uri, + txid: "pending_" + uri, + nout: 0, + outpoint: "pending_" + uri + ":0", + time: Date.now(), + }; + setLocal("pendingPublishes", [...pendingPublishes, newPendingPublish]); + return newPendingPublish; } /** @@ -52,18 +52,18 @@ function savePendingPublish({ name, channel_name }) { * A channel name may also be provided along with name. */ function removePendingPublishIfNeeded({ name, channel_name, outpoint }) { - function pubMatches(pub) { - return ( - pub.outpoint === outpoint || - (pub.name === name && - (!channel_name || pub.channel_name === channel_name)) - ); - } + function pubMatches(pub) { + return ( + pub.outpoint === outpoint || + (pub.name === name && + (!channel_name || pub.channel_name === channel_name)) + ); + } - setLocal( - 'pendingPublishes', - lbry.getPendingPublishes().filter(pub => !pubMatches(pub)) - ); + setLocal( + "pendingPublishes", + lbry.getPendingPublishes().filter(pub => !pubMatches(pub)) + ); } /** @@ -71,12 +71,12 @@ function removePendingPublishIfNeeded({ name, channel_name, outpoint }) { * removes them from the list. */ lbry.getPendingPublishes = function() { - const pendingPublishes = getLocal('pendingPublishes') || []; - const newPendingPublishes = pendingPublishes.filter( - pub => Date.now() - pub.time <= lbry.pendingPublishTimeout - ); - setLocal('pendingPublishes', newPendingPublishes); - return newPendingPublishes; + const pendingPublishes = getLocal("pendingPublishes") || []; + const newPendingPublishes = pendingPublishes.filter( + pub => Date.now() - pub.time <= lbry.pendingPublishTimeout + ); + setLocal("pendingPublishes", newPendingPublishes); + return newPendingPublishes; }; /** @@ -84,97 +84,97 @@ lbry.getPendingPublishes = function() { * provided along withe the name. If no pending publish is found, returns null. */ function getPendingPublish({ name, channel_name, outpoint }) { - const pendingPublishes = lbry.getPendingPublishes(); - return ( - pendingPublishes.find( - pub => - pub.outpoint === outpoint || - (pub.name === name && - (!channel_name || pub.channel_name === channel_name)) - ) || null - ); + const pendingPublishes = lbry.getPendingPublishes(); + return ( + pendingPublishes.find( + pub => + pub.outpoint === outpoint || + (pub.name === name && + (!channel_name || pub.channel_name === channel_name)) + ) || null + ); } function pendingPublishToDummyClaim({ - channel_name, - name, - outpoint, - claim_id, - txid, - nout + channel_name, + name, + outpoint, + claim_id, + txid, + nout, }) { - return { name, outpoint, claim_id, txid, nout, channel_name }; + return { name, outpoint, claim_id, txid, nout, channel_name }; } function pendingPublishToDummyFileInfo({ name, outpoint, claim_id }) { - return { name, outpoint, claim_id, metadata: null }; + return { name, outpoint, claim_id, metadata: null }; } lbry.call = function( - method, - params, - callback, - errorCallback, - connectFailedCallback + method, + params, + callback, + errorCallback, + connectFailedCallback ) { - return jsonrpc.call( - lbry.daemonConnectionString, - method, - params, - callback, - errorCallback, - connectFailedCallback - ); + return jsonrpc.call( + lbry.daemonConnectionString, + method, + params, + callback, + errorCallback, + connectFailedCallback + ); }; //core lbry._connectPromise = null; lbry.connect = function() { - if (lbry._connectPromise === null) { - lbry._connectPromise = new Promise((resolve, reject) => { - let tryNum = 0; + if (lbry._connectPromise === null) { + lbry._connectPromise = new Promise((resolve, reject) => { + let tryNum = 0; - function checkDaemonStartedFailed() { - if (tryNum <= 100) { - // Move # of tries into constant or config option - setTimeout(() => { - tryNum++; - checkDaemonStarted(); - }, tryNum < 50 ? 400 : 1000); - } else { - reject(new Error('Unable to connect to LBRY')); - } - } + function checkDaemonStartedFailed() { + if (tryNum <= 200) { + // Move # of tries into constant or config option + setTimeout(() => { + tryNum++; + checkDaemonStarted(); + }, tryNum < 50 ? 400 : 1000); + } else { + reject(new Error("Unable to connect to LBRY")); + } + } - // Check every half second to see if the daemon is accepting connections - function checkDaemonStarted() { - lbry.call( - 'status', - {}, - resolve, - checkDaemonStartedFailed, - checkDaemonStartedFailed - ); - } + // Check every half second to see if the daemon is accepting connections + function checkDaemonStarted() { + lbry.call( + "status", + {}, + resolve, + checkDaemonStartedFailed, + checkDaemonStartedFailed + ); + } - checkDaemonStarted(); - }); - } + checkDaemonStarted(); + }); + } - return lbry._connectPromise; + return lbry._connectPromise; }; lbry.checkAddressIsMine = function(address, callback) { - lbry.call('wallet_is_address_mine', { address: address }, callback); + lbry.call("wallet_is_address_mine", { address: address }, callback); }; lbry.sendToAddress = function(amount, address, callback, errorCallback) { - lbry.call( - 'send_amount_to_address', - { amount: amount, address: address }, - callback, - errorCallback - ); + lbry.call( + "send_amount_to_address", + { amount: amount, address: address }, + callback, + errorCallback + ); }; /** @@ -189,46 +189,46 @@ lbry.sendToAddress = function(amount, address, callback, errorCallback) { */ lbry.costPromiseCache = {}; lbry.getCostInfo = function(uri) { - if (lbry.costPromiseCache[uri] === undefined) { - lbry.costPromiseCache[uri] = new Promise((resolve, reject) => { - const COST_INFO_CACHE_KEY = 'cost_info_cache'; - let costInfoCache = getSession(COST_INFO_CACHE_KEY, {}); + if (lbry.costPromiseCache[uri] === undefined) { + lbry.costPromiseCache[uri] = new Promise((resolve, reject) => { + const COST_INFO_CACHE_KEY = "cost_info_cache"; + let costInfoCache = getSession(COST_INFO_CACHE_KEY, {}); - function cacheAndResolve(cost, includesData) { - costInfoCache[uri] = { cost, includesData }; - setSession(COST_INFO_CACHE_KEY, costInfoCache); - resolve({ cost, includesData }); - } + function cacheAndResolve(cost, includesData) { + costInfoCache[uri] = { cost, includesData }; + setSession(COST_INFO_CACHE_KEY, costInfoCache); + resolve({ cost, includesData }); + } - if (!uri) { - return reject(new Error(`URI required.`)); - } + if (!uri) { + return reject(new Error(`URI required.`)); + } - if (costInfoCache[uri] && costInfoCache[uri].cost) { - return resolve(costInfoCache[uri]); - } + if (costInfoCache[uri] && costInfoCache[uri].cost) { + return resolve(costInfoCache[uri]); + } - function getCost(uri, size) { - lbry - .stream_cost_estimate({ uri, ...(size !== null ? { size } : {}) }) - .then(cost => { - cacheAndResolve(cost, size !== null); - }, reject); - } + function getCost(uri, size) { + lbry + .stream_cost_estimate({ uri, ...(size !== null ? { size } : {}) }) + .then(cost => { + cacheAndResolve(cost, size !== null); + }, reject); + } - const uriObj = lbryuri.parse(uri); - const name = uriObj.path || uriObj.name; + const uriObj = lbryuri.parse(uri); + const name = uriObj.path || uriObj.name; - lighthouse.get_size_for_name(name).then(size => { - if (size) { - getCost(name, size); - } else { - getCost(name, null); - } - }); - }); - } - return lbry.costPromiseCache[uri]; + lighthouse.get_size_for_name(name).then(size => { + if (size) { + getCost(name, size); + } else { + getCost(name, null); + } + }); + }); + } + return lbry.costPromiseCache[uri]; }; /** @@ -239,143 +239,143 @@ lbry.getCostInfo = function(uri) { * publish can appear in the UI immediately. */ lbry.publish = function( - params, - fileListedCallback, - publishedCallback, - errorCallback + params, + fileListedCallback, + publishedCallback, + errorCallback ) { - lbry.call( - 'publish', - params, - result => { - if (returnedPending) { - return; - } + lbry.call( + "publish", + params, + result => { + if (returnedPending) { + return; + } - clearTimeout(returnPendingTimeout); - publishedCallback(result); - }, - err => { - if (returnedPending) { - return; - } + clearTimeout(returnPendingTimeout); + publishedCallback(result); + }, + err => { + if (returnedPending) { + return; + } - clearTimeout(returnPendingTimeout); - errorCallback(err); - } - ); + clearTimeout(returnPendingTimeout); + errorCallback(err); + } + ); - let returnedPending = false; - // Give a short grace period in case publish() returns right away or (more likely) gives an error - const returnPendingTimeout = setTimeout(() => { - returnedPending = true; + let returnedPending = false; + // Give a short grace period in case publish() returns right away or (more likely) gives an error + const returnPendingTimeout = setTimeout(() => { + returnedPending = true; - if (publishedCallback) { - savePendingPublish({ - name: params.name, - channel_name: params.channel_name - }); - publishedCallback(true); - } + if (publishedCallback) { + savePendingPublish({ + name: params.name, + channel_name: params.channel_name, + }); + publishedCallback(true); + } - if (fileListedCallback) { - const { name, channel_name } = params; - savePendingPublish({ - name: params.name, - channel_name: params.channel_name - }); - fileListedCallback(true); - } - }, 2000); + if (fileListedCallback) { + const { name, channel_name } = params; + savePendingPublish({ + name: params.name, + channel_name: params.channel_name, + }); + fileListedCallback(true); + } + }, 2000); }; lbry.getClientSettings = function() { - var outSettings = {}; - for (let setting of Object.keys(lbry.defaultClientSettings)) { - var localStorageVal = localStorage.getItem('setting_' + setting); - outSettings[setting] = localStorageVal === null - ? lbry.defaultClientSettings[setting] - : JSON.parse(localStorageVal); - } - return outSettings; + var outSettings = {}; + for (let setting of Object.keys(lbry.defaultClientSettings)) { + var localStorageVal = localStorage.getItem("setting_" + setting); + outSettings[setting] = localStorageVal === null + ? lbry.defaultClientSettings[setting] + : JSON.parse(localStorageVal); + } + return outSettings; }; lbry.getClientSetting = function(setting) { - var localStorageVal = localStorage.getItem('setting_' + setting); - if (setting == 'showDeveloperMenu') { - return true; - } - return localStorageVal === null - ? lbry.defaultClientSettings[setting] - : JSON.parse(localStorageVal); + var localStorageVal = localStorage.getItem("setting_" + setting); + if (setting == "showDeveloperMenu") { + return true; + } + return localStorageVal === null + ? lbry.defaultClientSettings[setting] + : JSON.parse(localStorageVal); }; lbry.setClientSettings = function(settings) { - for (let setting of Object.keys(settings)) { - lbry.setClientSetting(setting, settings[setting]); - } + for (let setting of Object.keys(settings)) { + lbry.setClientSetting(setting, settings[setting]); + } }; lbry.setClientSetting = function(setting, value) { - return localStorage.setItem('setting_' + setting, JSON.stringify(value)); + return localStorage.setItem("setting_" + setting, JSON.stringify(value)); }; lbry.getSessionInfo = function(callback) { - lbry.call('status', { session_status: true }, callback); + lbry.call("status", { session_status: true }, callback); }; lbry.reportBug = function(message, callback) { - lbry.call( - 'report_bug', - { - message: message - }, - callback - ); + lbry.call( + "report_bug", + { + message: message, + }, + callback + ); }; //utilities lbry.formatCredits = function(amount, precision) { - return amount.toFixed(precision || 1).replace(/\.?0+$/, ''); + return amount.toFixed(precision || 1).replace(/\.?0+$/, ""); }; lbry.formatName = function(name) { - // Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes) - name = name.replace('/s+/g', '-'); - name = name.toLowerCase().replace(/[^a-z0-9\-]/g, ''); - return name; + // Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes) + name = name.replace("/s+/g", "-"); + name = name.toLowerCase().replace(/[^a-z0-9\-]/g, ""); + return name; }; lbry.imagePath = function(file) { - return 'img/' + file; + return "img/" + file; }; lbry.getMediaType = function(contentType, fileName) { - if (contentType) { - return /^[^/]+/.exec(contentType)[0]; - } else if (fileName) { - var dotIndex = fileName.lastIndexOf('.'); - if (dotIndex == -1) { - return 'unknown'; - } + if (contentType) { + return /^[^/]+/.exec(contentType)[0]; + } else if (fileName) { + var dotIndex = fileName.lastIndexOf("."); + if (dotIndex == -1) { + return "unknown"; + } - var ext = fileName.substr(dotIndex + 1); - if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) { - return 'video'; - } else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) { - return 'audio'; - } else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) { - return 'document'; - } else { - return 'unknown'; - } - } else { - return 'unknown'; - } + var ext = fileName.substr(dotIndex + 1); + if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) { + return "video"; + } else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) { + return "audio"; + } else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) { + return "document"; + } else { + return "unknown"; + } + } else { + return "unknown"; + } }; lbry.stop = function(callback) { - lbry.call('stop', {}, callback); + lbry.call("stop", {}, callback); }; lbry._subscribeIdCount = 0; @@ -384,57 +384,57 @@ lbry._balanceSubscribeInterval = 5000; lbry._balanceUpdateInterval = null; lbry._updateBalanceSubscribers = function() { - lbry.wallet_balance().then(function(balance) { - for (let callback of Object.values(lbry._balanceSubscribeCallbacks)) { - callback(balance); - } - }); + lbry.wallet_balance().then(function(balance) { + for (let callback of Object.values(lbry._balanceSubscribeCallbacks)) { + callback(balance); + } + }); - if ( - !lbry._balanceUpdateInterval && - Object.keys(lbry._balanceSubscribeCallbacks).length - ) { - lbry._balanceUpdateInterval = setInterval(() => { - lbry._updateBalanceSubscribers(); - }, lbry._balanceSubscribeInterval); - } + if ( + !lbry._balanceUpdateInterval && + Object.keys(lbry._balanceSubscribeCallbacks).length + ) { + lbry._balanceUpdateInterval = setInterval(() => { + lbry._updateBalanceSubscribers(); + }, lbry._balanceSubscribeInterval); + } }; lbry.balanceSubscribe = function(callback) { - const subscribeId = ++lbry._subscribeIdCount; - lbry._balanceSubscribeCallbacks[subscribeId] = callback; - lbry._updateBalanceSubscribers(); - return subscribeId; + const subscribeId = ++lbry._subscribeIdCount; + lbry._balanceSubscribeCallbacks[subscribeId] = callback; + lbry._updateBalanceSubscribers(); + return subscribeId; }; lbry.balanceUnsubscribe = function(subscribeId) { - delete lbry._balanceSubscribeCallbacks[subscribeId]; - if ( - lbry._balanceUpdateInterval && - !Object.keys(lbry._balanceSubscribeCallbacks).length - ) { - clearInterval(lbry._balanceUpdateInterval); - } + delete lbry._balanceSubscribeCallbacks[subscribeId]; + if ( + lbry._balanceUpdateInterval && + !Object.keys(lbry._balanceSubscribeCallbacks).length + ) { + clearInterval(lbry._balanceUpdateInterval); + } }; lbry.showMenuIfNeeded = function() { - const showingMenu = sessionStorage.getItem('menuShown') || null; - const chosenMenu = lbry.getClientSetting('showDeveloperMenu') - ? 'developer' - : 'normal'; - if (chosenMenu != showingMenu) { - menu.showMenubar(chosenMenu == 'developer'); - } - sessionStorage.setItem('menuShown', chosenMenu); + const showingMenu = sessionStorage.getItem("menuShown") || null; + const chosenMenu = lbry.getClientSetting("showDeveloperMenu") + ? "developer" + : "normal"; + if (chosenMenu != showingMenu) { + menu.showMenubar(chosenMenu == "developer"); + } + sessionStorage.setItem("menuShown", chosenMenu); }; lbry.getAppVersionInfo = function() { - return new Promise((resolve, reject) => { - ipcRenderer.once('version-info-received', (event, versionInfo) => { - resolve(versionInfo); - }); - ipcRenderer.send('version-info-requested'); - }); + return new Promise((resolve, reject) => { + ipcRenderer.once("version-info-received", (event, versionInfo) => { + resolve(versionInfo); + }); + ipcRenderer.send("version-info-requested"); + }); }; /** @@ -447,117 +447,117 @@ lbry.getAppVersionInfo = function() { * (If a real publish with the same name is found, the pending publish will be ignored and removed.) */ lbry.file_list = function(params = {}) { - return new Promise((resolve, reject) => { - const { name, channel_name, outpoint } = params; + return new Promise((resolve, reject) => { + const { name, channel_name, outpoint } = params; - /** + /** * If we're searching by outpoint, check first to see if there's a matching pending publish. * Pending publishes use their own faux outpoints that are always unique, so we don't need * to check if there's a real file. */ - if (outpoint) { - const pendingPublish = getPendingPublish({ outpoint }); - if (pendingPublish) { - resolve([pendingPublishToDummyFileInfo(pendingPublish)]); - return; - } - } + if (outpoint) { + const pendingPublish = getPendingPublish({ outpoint }); + if (pendingPublish) { + resolve([pendingPublishToDummyFileInfo(pendingPublish)]); + return; + } + } - lbry.call( - 'file_list', - params, - fileInfos => { - removePendingPublishIfNeeded({ name, channel_name, outpoint }); + lbry.call( + "file_list", + params, + fileInfos => { + removePendingPublishIfNeeded({ name, channel_name, outpoint }); - const dummyFileInfos = lbry - .getPendingPublishes() - .map(pendingPublishToDummyFileInfo); - resolve([...fileInfos, ...dummyFileInfos]); - }, - reject, - reject - ); - }); + const dummyFileInfos = lbry + .getPendingPublishes() + .map(pendingPublishToDummyFileInfo); + resolve([...fileInfos, ...dummyFileInfos]); + }, + reject, + reject + ); + }); }; lbry.claim_list_mine = function(params = {}) { - return new Promise((resolve, reject) => { - lbry.call( - 'claim_list_mine', - params, - claims => { - for (let { name, channel_name, txid, nout } of claims) { - removePendingPublishIfNeeded({ - name, - channel_name, - outpoint: txid + ':' + nout - }); - } + return new Promise((resolve, reject) => { + lbry.call( + "claim_list_mine", + params, + claims => { + for (let { name, channel_name, txid, nout } of claims) { + removePendingPublishIfNeeded({ + name, + channel_name, + outpoint: txid + ":" + nout, + }); + } - const dummyClaims = lbry - .getPendingPublishes() - .map(pendingPublishToDummyClaim); - resolve([...claims, ...dummyClaims]); - }, - reject, - reject - ); - }); + const dummyClaims = lbry + .getPendingPublishes() + .map(pendingPublishToDummyClaim); + resolve([...claims, ...dummyClaims]); + }, + reject, + reject + ); + }); }; -const claimCacheKey = 'resolve_claim_cache'; +const claimCacheKey = "resolve_claim_cache"; lbry._claimCache = getSession(claimCacheKey, {}); lbry._resolveXhrs = {}; lbry.resolve = function(params = {}) { - return new Promise((resolve, reject) => { - if (!params.uri) { - throw __('Resolve has hacked cache on top of it that requires a URI'); - } - if (params.uri && lbry._claimCache[params.uri] !== undefined) { - resolve(lbry._claimCache[params.uri]); - } else { - lbry._resolveXhrs[params.uri] = lbry.call( - 'resolve', - params, - function(data) { - if (data !== undefined) { - lbry._claimCache[params.uri] = data; - } - setSession(claimCacheKey, lbry._claimCache); - resolve(data); - }, - reject - ); - } - }); + return new Promise((resolve, reject) => { + if (!params.uri) { + throw __("Resolve has hacked cache on top of it that requires a URI"); + } + if (params.uri && lbry._claimCache[params.uri] !== undefined) { + resolve(lbry._claimCache[params.uri]); + } else { + lbry._resolveXhrs[params.uri] = lbry.call( + "resolve", + params, + function(data) { + if (data !== undefined) { + lbry._claimCache[params.uri] = data; + } + setSession(claimCacheKey, lbry._claimCache); + resolve(data); + }, + reject + ); + } + }); }; lbry.cancelResolve = function(params = {}) { - const xhr = lbry._resolveXhrs[params.uri]; - if (xhr && xhr.readyState > 0 && xhr.readyState < 4) { - xhr.abort(); - } + const xhr = lbry._resolveXhrs[params.uri]; + if (xhr && xhr.readyState > 0 && xhr.readyState < 4) { + xhr.abort(); + } }; lbry = new Proxy(lbry, { - get: function(target, name) { - if (name in target) { - return target[name]; - } + get: function(target, name) { + if (name in target) { + return target[name]; + } - return function(params = {}) { - return new Promise((resolve, reject) => { - jsonrpc.call( - lbry.daemonConnectionString, - name, - params, - resolve, - reject, - reject - ); - }); - }; - } + return function(params = {}) { + return new Promise((resolve, reject) => { + jsonrpc.call( + lbry.daemonConnectionString, + name, + params, + resolve, + reject, + reject + ); + }); + }; + }, }); export default lbry; From 4c8d649830b980cd5676969e9864999c8ef0d376 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 14 Jun 2017 17:49:23 -0400 Subject: [PATCH 08/30] updates required for lbry daemon 0.12 --- build/DAEMON_URL | 2 +- ui/js/actions/content.js | 11 +++++------ ui/js/lbry.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/build/DAEMON_URL b/build/DAEMON_URL index 5544239f9..35868e36f 100644 --- a/build/DAEMON_URL +++ b/build/DAEMON_URL @@ -1 +1 @@ -https://github.com/lbryio/lbry/releases/download/v0.11.0/lbrynet-daemon-v0.11.0-OSNAME.zip +https://github.com/lbryio/lbry/releases/download/v0.12.2rc2/lbrynet-daemon-v0.12.2rc2-OSNAME.zip diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index ca174b261..0daeeadaf 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -246,23 +246,22 @@ export function doPurchaseUri(uri, purchaseModalName) { }; } -export function doFetchClaimsByChannel(uri) { +export function doFetchClaimsByChannel(uri, page = 1) { return function(dispatch, getState) { dispatch({ type: types.FETCH_CHANNEL_CLAIMS_STARTED, data: { uri }, }); - lbry.resolve({ uri }).then(resolutionInfo => { - const { claims_in_channel } = resolutionInfo - ? resolutionInfo - : { claims_in_channel: [] }; + lbry.claim_list_by_channel({ uri, page }).then(result => { + const claimResult = result[uri], + claims = claimResult ? claimResult.claims_in_channel : []; dispatch({ type: types.FETCH_CHANNEL_CLAIMS_COMPLETED, data: { uri, - claims: claims_in_channel, + claims: claims, }, }); }); diff --git a/ui/js/lbry.js b/ui/js/lbry.js index a04ad50f8..55b6b022c 100644 --- a/ui/js/lbry.js +++ b/ui/js/lbry.js @@ -524,7 +524,7 @@ lbry.resolve = function(params = {}) { lbry._claimCache[params.uri] = data; } setSession(claimCacheKey, lbry._claimCache); - resolve(data); + resolve(data && data[params.uri] ? data[params.uri] : {}); }, reject ); From ce6284219c4c1af1a176e2bba5012d308dcdb46f Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 14 Jun 2017 17:50:29 -0400 Subject: [PATCH 09/30] =?UTF-8?q?Bump=20version:=200.12.0=20=E2=86=92=200.?= =?UTF-8?q?12.1rc1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- app/package.json | 2 +- ui/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d37da8f5b..605bc91ea 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.12.0 +current_version = 0.12.1rc1 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/app/package.json b/app/package.json index 95261b0c2..ebc915725 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.12.0", + "version": "0.12.1rc1", "main": "main.js", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "author": { diff --git a/ui/package.json b/ui/package.json index 59595bc03..668ec265a 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.12.0", + "version": "0.12.1rc1", "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", From c6603a4e809424b2315e590560f09fe5daea741b Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 14 Jun 2017 18:01:04 -0400 Subject: [PATCH 10/30] daemon v0.13 support --- CHANGELOG.md | 4 ++-- build/DAEMON_URL | 2 +- ui/js/actions/file_info.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0866dc356..bd4340c1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,8 @@ Web UI version numbers should always match the corresponding version of LBRY App * ### Changed - * - * + * Upgraded to lbry daemon 0.13, including updating API signatures + * Channels resolve much faster ### Fixed * Fix help menu force reloading whole app diff --git a/build/DAEMON_URL b/build/DAEMON_URL index 35868e36f..3df4e528f 100644 --- a/build/DAEMON_URL +++ b/build/DAEMON_URL @@ -1 +1 @@ -https://github.com/lbryio/lbry/releases/download/v0.12.2rc2/lbrynet-daemon-v0.12.2rc2-OSNAME.zip +https://github.com/lbryio/lbry/releases/download/v0.13.1rc1/lbrynet-daemon-v0.13.1rc1-OSNAME.zip diff --git a/ui/js/actions/file_info.js b/ui/js/actions/file_info.js index d379db625..f200c40fc 100644 --- a/ui/js/actions/file_info.js +++ b/ui/js/actions/file_info.js @@ -89,7 +89,7 @@ export function doDeleteFile(outpoint, deleteFromComputer) { lbry.file_delete({ outpoint: outpoint, - delete_target_file: deleteFromComputer, + delete_from_download_dir: deleteFromComputer, }); dispatch(doCloseModal()); From a6b8ae2ce4f6832ae93a658b8355d3ea08895874 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 14 Jun 2017 18:01:22 -0400 Subject: [PATCH 11/30] =?UTF-8?q?Bump=20version:=200.12.1rc1=20=E2=86=92?= =?UTF-8?q?=200.12.2rc1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- app/package.json | 2 +- ui/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 605bc91ea..2e4f2ab1b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.12.1rc1 +current_version = 0.12.2rc1 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/app/package.json b/app/package.json index ebc915725..38d6b6a58 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.12.1rc1", + "version": "0.12.2rc1", "main": "main.js", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "author": { diff --git a/ui/package.json b/ui/package.json index 668ec265a..64f312203 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.12.1rc1", + "version": "0.12.2rc1", "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", From 4b095c3ea68063b73fcab93833d17a1a639c5c23 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 14 Jun 2017 20:21:31 -0400 Subject: [PATCH 12/30] kill lbry.call --- ui/js/actions/wallet.js | 16 +++---- ui/js/lbry.js | 92 ++++++++----------------------------- ui/js/page/help/view.jsx | 4 +- ui/js/page/publish/view.jsx | 2 +- ui/js/page/report.js | 2 +- 5 files changed, 31 insertions(+), 85 deletions(-) diff --git a/ui/js/actions/wallet.js b/ui/js/actions/wallet.js index def93cf68..17c4be201 100644 --- a/ui/js/actions/wallet.js +++ b/ui/js/actions/wallet.js @@ -22,7 +22,7 @@ export function doFetchTransactions() { type: types.FETCH_TRANSACTIONS_STARTED, }); - lbry.call("transaction_list", {}, results => { + lbry.transaction_list().then(results => { dispatch({ type: types.FETCH_TRANSACTIONS_COMPLETED, data: { @@ -55,7 +55,7 @@ export function doCheckAddressIsMine(address) { type: types.CHECK_ADDRESS_IS_MINE_STARTED, }); - lbry.checkAddressIsMine(address, isMine => { + lbry.wallet_is_address_mine({ address }).then(isMine => { if (!isMine) dispatch(doGetNewAddress()); dispatch({ @@ -103,12 +103,12 @@ export function doSendDraftTransaction() { dispatch(doOpenModal("transactionFailed")); }; - lbry.sendToAddress( - draftTx.amount, - draftTx.address, - successCallback, - errorCallback - ); + lbry + .send_amount_to_address({ + amount: draftTx.amount, + address: draftTx.address, + }) + .then(successCallback, errorCallback); }; } diff --git a/ui/js/lbry.js b/ui/js/lbry.js index 55b6b022c..a2c7affde 100644 --- a/ui/js/lbry.js +++ b/ui/js/lbry.js @@ -22,6 +22,17 @@ let lbry = { }, }; +function apiCall(method, params, resolve, reject) { + return jsonrpc.call( + lbry.daemonConnectionString, + method, + params, + resolve, + reject, + reject + ); +} + /** * Records a publish attempt in local storage. Returns a dictionary with all the data needed to * needed to make a dummy claim or file info object. @@ -110,23 +121,6 @@ function pendingPublishToDummyFileInfo({ name, outpoint, claim_id }) { return { name, outpoint, claim_id, metadata: null }; } -lbry.call = function( - method, - params, - callback, - errorCallback, - connectFailedCallback -) { - return jsonrpc.call( - lbry.daemonConnectionString, - method, - params, - callback, - errorCallback, - connectFailedCallback - ); -}; - //core lbry._connectPromise = null; lbry.connect = function() { @@ -148,13 +142,7 @@ lbry.connect = function() { // Check every half second to see if the daemon is accepting connections function checkDaemonStarted() { - lbry.call( - "status", - {}, - resolve, - checkDaemonStartedFailed, - checkDaemonStartedFailed - ); + lbry.status().then(resolve).catch(checkDaemonStartedFailed); } checkDaemonStarted(); @@ -164,19 +152,6 @@ lbry.connect = function() { return lbry._connectPromise; }; -lbry.checkAddressIsMine = function(address, callback) { - lbry.call("wallet_is_address_mine", { address: address }, callback); -}; - -lbry.sendToAddress = function(amount, address, callback, errorCallback) { - lbry.call( - "send_amount_to_address", - { amount: amount, address: address }, - callback, - errorCallback - ); -}; - /** * Takes a LBRY URI; will first try and calculate a total cost using * Lighthouse. If Lighthouse can't be reached, it just retrives the @@ -238,15 +213,13 @@ lbry.getCostInfo = function(uri) { * This currently includes a work-around to cache the file in local storage so that the pending * publish can appear in the UI immediately. */ -lbry.publish = function( +lbry.publishDeprecated = function( params, fileListedCallback, publishedCallback, errorCallback ) { - lbry.call( - "publish", - params, + lbry.publish(params).then( result => { if (returnedPending) { return; @@ -320,20 +293,6 @@ lbry.setClientSetting = function(setting, value) { return localStorage.setItem("setting_" + setting, JSON.stringify(value)); }; -lbry.getSessionInfo = function(callback) { - lbry.call("status", { session_status: true }, callback); -}; - -lbry.reportBug = function(message, callback) { - lbry.call( - "report_bug", - { - message: message, - }, - callback - ); -}; - //utilities lbry.formatCredits = function(amount, precision) { return amount.toFixed(precision || 1).replace(/\.?0+$/, ""); @@ -374,10 +333,6 @@ lbry.getMediaType = function(contentType, fileName) { } }; -lbry.stop = function(callback) { - lbry.call("stop", {}, callback); -}; - lbry._subscribeIdCount = 0; lbry._balanceSubscribeCallbacks = {}; lbry._balanceSubscribeInterval = 5000; @@ -463,7 +418,7 @@ lbry.file_list = function(params = {}) { } } - lbry.call( + apiCall( "file_list", params, fileInfos => { @@ -474,7 +429,6 @@ lbry.file_list = function(params = {}) { .map(pendingPublishToDummyFileInfo); resolve([...fileInfos, ...dummyFileInfos]); }, - reject, reject ); }); @@ -482,7 +436,7 @@ lbry.file_list = function(params = {}) { lbry.claim_list_mine = function(params = {}) { return new Promise((resolve, reject) => { - lbry.call( + apiCall( "claim_list_mine", params, claims => { @@ -499,7 +453,6 @@ lbry.claim_list_mine = function(params = {}) { .map(pendingPublishToDummyClaim); resolve([...claims, ...dummyClaims]); }, - reject, reject ); }); @@ -516,10 +469,10 @@ lbry.resolve = function(params = {}) { if (params.uri && lbry._claimCache[params.uri] !== undefined) { resolve(lbry._claimCache[params.uri]); } else { - lbry._resolveXhrs[params.uri] = lbry.call( + lbry._resolveXhrs[params.uri] = apiCall( "resolve", params, - function(data) { + data => { if (data !== undefined) { lbry._claimCache[params.uri] = data; } @@ -547,14 +500,7 @@ lbry = new Proxy(lbry, { return function(params = {}) { return new Promise((resolve, reject) => { - jsonrpc.call( - lbry.daemonConnectionString, - name, - params, - resolve, - reject, - reject - ); + apiCall(name, params, resolve, reject); }); }; }, diff --git a/ui/js/page/help/view.jsx b/ui/js/page/help/view.jsx index d8d957fc4..b8a59a619 100644 --- a/ui/js/page/help/view.jsx +++ b/ui/js/page/help/view.jsx @@ -26,12 +26,12 @@ class HelpPage extends React.PureComponent { upgradeAvailable: upgradeAvailable, }); }); - lbry.call("version", {}, info => { + lbry.version().then(info => { this.setState({ versionInfo: info, }); }); - lbry.getSessionInfo(info => { + lbry.status({ session_status: true }).then(info => { this.setState({ lbryId: info.lbry_id, }); diff --git a/ui/js/page/publish/view.jsx b/ui/js/page/publish/view.jsx index 5d8fd1916..2628e01e8 100644 --- a/ui/js/page/publish/view.jsx +++ b/ui/js/page/publish/view.jsx @@ -134,7 +134,7 @@ class PublishPage extends React.PureComponent { publishArgs.file_path = this.refs.file.getValue(); } - lbry.publish( + lbry.publishDeprecated( publishArgs, message => { this.handlePublishStarted(); diff --git a/ui/js/page/report.js b/ui/js/page/report.js index a81592ad7..72f237210 100644 --- a/ui/js/page/report.js +++ b/ui/js/page/report.js @@ -19,7 +19,7 @@ class ReportPage extends React.PureComponent { this.setState({ submitting: true, }); - lbry.reportBug(this._messageArea.value, () => { + lbry.report_bug({ message: this._messageArea.value }).then(() => { this.setState({ submitting: false, modal: "submitted", From 521b368cb03b86331526f5cd354d808575a1c856 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 14 Jun 2017 20:37:42 -0400 Subject: [PATCH 13/30] fix error reporting --- ui/js/page/report.js | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/ui/js/page/report.js b/ui/js/page/report.js index 72f237210..c24d367d9 100644 --- a/ui/js/page/report.js +++ b/ui/js/page/report.js @@ -1,37 +1,45 @@ import React from "react"; import Link from "component/link"; import { FormRow } from "component/form"; -import Modal from "../component/modal.js"; +import { doShowSnackBar } from "actions/app"; import lbry from "../lbry.js"; -class ReportPage extends React.PureComponent { +class ReportPage extends React.Component { constructor(props) { super(props); this.state = { submitting: false, - modal: null, + message: "", }; } submitMessage() { - if (this._messageArea.value) { + const message = this.state.message; + if (message) { this.setState({ submitting: true, }); - lbry.report_bug({ message: this._messageArea.value }).then(() => { + lbry.report_bug({ message }).then(() => { this.setState({ submitting: false, - modal: "submitted", }); + + // Display global notice + const action = doShowSnackBar({ + message: __("Message received! Thanks for helping."), + isError: false, + }); + window.app.store.dispatch(action); }); - this._messageArea.value = ""; + + this.setState({ message: "" }); } } - closeModal() { + onMessageChange(event) { this.setState({ - modal: null, + message: event.target.value, }); } @@ -49,9 +57,12 @@ class ReportPage extends React.PureComponent {
(this._messageArea = t)} rows="10" name="message" + value={this.state.message} + onChange={event => { + this.onMessageChange(event); + }} placeholder={__("Description of your issue")} />
@@ -83,17 +94,6 @@ class ReportPage extends React.PureComponent { />. - { - this.closeModal(event); - }} - > - {__( - "Your bug report has been submitted! Thank you for your feedback." - )} - ); } From e9ece65d68a4d7671cdd795cbaf35aecf67c6f5e Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 14 Jun 2017 20:38:14 -0400 Subject: [PATCH 14/30] =?UTF-8?q?Bump=20version:=200.12.2rc1=20=E2=86=92?= =?UTF-8?q?=200.12.2rc2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- app/package.json | 2 +- ui/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2e4f2ab1b..7e94950bc 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.12.2rc1 +current_version = 0.12.2rc2 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/app/package.json b/app/package.json index 38d6b6a58..898fc36e6 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.12.2rc1", + "version": "0.12.2rc2", "main": "main.js", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "author": { diff --git a/ui/package.json b/ui/package.json index 64f312203..4d90824e2 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.12.2rc1", + "version": "0.12.2rc2", "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", From 0798f60c7037123f7f64763cda6238970b0a3390 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 14 Jun 2017 21:03:20 -0700 Subject: [PATCH 15/30] allow user to create new directory when choosing download directory --- ui/js/component/file-selector.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/js/component/file-selector.js b/ui/js/component/file-selector.js index 879ea2665..b0298424f 100644 --- a/ui/js/component/file-selector.js +++ b/ui/js/component/file-selector.js @@ -21,7 +21,9 @@ class FileSelector extends React.PureComponent { handleButtonClick() { remote.dialog.showOpenDialog( { - properties: [this.props.type == "file" ? "openFile" : "openDirectory"], + properties: this.props.type == "file" + ? ["openFile"] + : ["openDirectory", "createDirectory"], }, paths => { if (!paths) { From aa30aec99769a15309696abd95cccac543ff4db6 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Thu, 15 Jun 2017 11:27:23 +0700 Subject: [PATCH 16/30] Cache claims in indexedDB (via LocalForage) --- ui/js/store.js | 107 +++++--- ui/package-lock.json | 544 ++++++++++++++++++++++++++++++--------- ui/package.json | 5 + ui/webpack.config.js | 13 + ui/webpack.dev.config.js | 13 + 5 files changed, 514 insertions(+), 168 deletions(-) diff --git a/ui/js/store.js b/ui/js/store.js index 9bc70dc25..23796c99e 100644 --- a/ui/js/store.js +++ b/ui/js/store.js @@ -1,50 +1,56 @@ -const redux = require('redux'); -const thunk = require('redux-thunk').default; +import { createLogger } from "redux-logger"; +import appReducer from "reducers/app"; +import availabilityReducer from "reducers/availability"; +import claimsReducer from "reducers/claims"; +import contentReducer from "reducers/content"; +import costInfoReducer from "reducers/cost_info"; +import fileInfoReducer from "reducers/file_info"; +import rewardsReducer from "reducers/rewards"; +import searchReducer from "reducers/search"; +import settingsReducer from "reducers/settings"; +import userReducer from "reducers/user"; +import walletReducer from "reducers/wallet"; +import { persistStore, autoRehydrate } from "redux-persist"; +import createCompressor from "redux-persist-transform-compress"; +import createFilter from "redux-persist-transform-filter"; +import { REHYDRATE } from "redux-persist/constants"; +import createActionBuffer from "redux-action-buffer"; + +const localForage = require("localforage"); +const redux = require("redux"); +const thunk = require("redux-thunk").default; const env = ENV; -import { createLogger } from 'redux-logger'; -import appReducer from 'reducers/app'; -import availabilityReducer from 'reducers/availability'; -import claimsReducer from 'reducers/claims'; -import contentReducer from 'reducers/content'; -import costInfoReducer from 'reducers/cost_info'; -import fileInfoReducer from 'reducers/file_info'; -import rewardsReducer from 'reducers/rewards'; -import searchReducer from 'reducers/search'; -import settingsReducer from 'reducers/settings'; -import walletReducer from 'reducers/wallet'; -import userReducer from 'reducers/user'; - function isFunction(object) { - return typeof object === 'function'; + return typeof object === "function"; } function isNotFunction(object) { - return !isFunction(object); + return !isFunction(object); } function createBulkThunkMiddleware() { - return ({ dispatch, getState }) => next => action => { - if (action.type === 'BATCH_ACTIONS') { - action.actions - .filter(isFunction) - .map(actionFn => actionFn(dispatch, getState)); - } - return next(action); - }; + return ({ dispatch, getState }) => next => action => { + if (action.type === "BATCH_ACTIONS") { + action.actions + .filter(isFunction) + .map(actionFn => actionFn(dispatch, getState)); + } + return next(action); + }; } function enableBatching(reducer) { - return function batchingReducer(state, action) { - switch (action.type) { - case 'BATCH_ACTIONS': - return action.actions - .filter(isNotFunction) - .reduce(batchingReducer, state); - default: - return reducer(state, action); - } - }; + return function batchingReducer(state, action) { + switch (action.type) { + case "BATCH_ACTIONS": + return action.actions + .filter(isNotFunction) + .reduce(batchingReducer, state); + default: + return reducer(state, action); + } + }; } const reducers = redux.combineReducers({ @@ -64,17 +70,36 @@ const reducers = redux.combineReducers({ const bulkThunk = createBulkThunkMiddleware(); const middleware = [thunk, bulkThunk]; -if (env === 'development') { - const logger = createLogger({ - collapsed: true - }); - middleware.push(logger); +if (env === "development") { + const logger = createLogger({ + collapsed: true, + }); + middleware.push(logger); } +middleware.push(createActionBuffer(REHYDRATE)); + const createStoreWithMiddleware = redux.compose( - redux.applyMiddleware(...middleware) + autoRehydrate(), + redux.applyMiddleware(...middleware) )(redux.createStore); const reduxStore = createStoreWithMiddleware(enableBatching(reducers)); +const compressor = createCompressor(); +const saveClaimsFilter = createFilter("claims", [ + "byId", + "claimsByUri", + "myClaims", +]); + +const persistOptions = { + whitelist: ["claims"], + // Order is important. Needs to be compressed last or other transforms can't + // read the data + transforms: [saveClaimsFilter, compressor], + debounce: 1000, + storage: localForage, +}; +persistStore(reduxStore, persistOptions); export default reduxStore; diff --git a/ui/package-lock.json b/ui/package-lock.json index 7754552e1..97912d859 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -201,6 +201,11 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, + "ast-types": { + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz", + "integrity": "sha1-ju8IJ/BN/w7IhXupJavj/qYZTlI=" + }, "async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/async/-/async-2.4.1.tgz", @@ -666,6 +671,11 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "base62": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz", + "integrity": "sha1-e0F0wvlESXU7EcJlHAg9qEGnsIQ=" + }, "base64-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", @@ -1312,6 +1322,18 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true }, + "es3ify": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", + "integrity": "sha1-rZ+l3xrjTz8x4SEbWBiy1RB439E=", + "dependencies": { + "esprima-fb": { + "version": "3001.1.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" + } + } + }, "es5-ext": { "version": "0.10.23", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz", @@ -1507,6 +1529,11 @@ } } }, + "esmangle-evaluator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz", + "integrity": "sha1-Yg2GbvSGGzMR91dm1SqFcrs8YzY=" + }, "espree": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/espree/-/espree-3.4.3.tgz", @@ -1650,6 +1677,23 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=" }, + "falafel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", + "integrity": "sha1-wY0k71CRF0pJfzGM0ksCaiXN2rQ=", + "dependencies": { + "acorn": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", + "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + } + } + }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", @@ -1746,8 +1790,7 @@ "foreach": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" }, "forever-agent": { "version": "0.6.1", @@ -1794,569 +1837,688 @@ "dependencies": { "abbrev": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "2.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "optional": true }, "aproba": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", + "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", "optional": true }, "are-we-there-yet": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", + "integrity": "sha1-gORw6VoIR5T+GJkmLFZnxuiN4bM=", "optional": true }, "asn1": { "version": "0.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", "optional": true }, "assert-plus": { "version": "0.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", "optional": true }, "asynckit": { "version": "0.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "optional": true }, "aws-sign2": { "version": "0.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", "optional": true }, "aws4": { "version": "1.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", "optional": true }, "balanced-match": { "version": "0.4.2", - "bundled": true + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "bcrypt-pbkdf": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true }, "block-stream": { "version": "0.0.9", - "bundled": true + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=" }, "boom": { "version": "2.10.1", - "bundled": true + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=" }, "brace-expansion": { "version": "1.1.6", - "bundled": true + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=" }, "buffer-shims": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" }, "caseless": { "version": "0.11.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", "optional": true }, "chalk": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "optional": true }, "code-point-at": { "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=" }, "combined-stream": { "version": "1.0.5", - "bundled": true + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=" }, "commander": { "version": "2.9.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", "optional": true }, "concat-map": { "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": { "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": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cryptiles": { "version": "2.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "optional": true }, "dashdash": { "version": "1.14.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "optional": true, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "optional": true } } }, "debug": { "version": "2.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", "optional": true }, "deep-extend": { "version": "0.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz", + "integrity": "sha1-7+QRPQgIX05vlod1mBD4B0aeIlM=", "optional": true }, "delayed-stream": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "optional": true }, "ecc-jsbn": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true }, "escape-string-regexp": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "optional": true }, "extend": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=", "optional": true }, "extsprintf": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=" }, "forever-agent": { "version": "0.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "optional": true }, "form-data": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz", + "integrity": "sha1-icNTQAi5fq2ky7FX1Y9vXfAl6uQ=", "optional": true }, "fs.realpath": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fstream": { "version": "1.0.10", - "bundled": true + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz", + "integrity": "sha1-YE6Kkv4m/9n2+uMDmdSYThqyKCI=" }, "fstream-ignore": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", "optional": true }, "gauge": { "version": "2.7.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.3.tgz", + "integrity": "sha1-HCOFX5YvF7OtPQ3HRD8wRULt/gk=", "optional": true }, "generate-function": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", "optional": true }, "generate-object-property": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "optional": true }, "getpass": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", + "integrity": "sha1-KD/9n8ElaECHUxHBtg6MQBhxEOY=", "optional": true, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "optional": true } } }, "glob": { "version": "7.1.1", - "bundled": true + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=" }, "graceful-fs": { "version": "4.1.11", - "bundled": true + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "graceful-readlink": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", "optional": true }, "har-validator": { "version": "2.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", "optional": true }, "has-ansi": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "optional": true }, "has-unicode": { "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 }, "hawk": { "version": "3.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "optional": true }, "hoek": { "version": "2.16.3", - "bundled": true + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" }, "http-signature": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "optional": true }, "inflight": { "version": "1.0.6", - "bundled": true + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" }, "inherits": { "version": "2.0.3", - "bundled": true + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { "version": "1.3.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", "optional": true }, "is-fullwidth-code-point": { "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=" }, "is-my-json-valid": { "version": "2.15.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz", + "integrity": "sha1-k27do8o8IR/ZjzstPgjaQ/eykVs=", "optional": true }, "is-property": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", "optional": true }, "is-typedarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "optional": true }, "isarray": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isstream": { "version": "0.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "optional": true }, "jodid25519": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", "optional": true }, "jsbn": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, "json-schema": { "version": "0.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "optional": true }, "json-stringify-safe": { "version": "5.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "optional": true }, "jsonpointer": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", "optional": true }, "jsprim": { "version": "1.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz", + "integrity": "sha1-KnJW9wQSop7jZwqspiWZTE3P8lI=", "optional": true }, "mime-db": { "version": "1.26.0", - "bundled": true + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz", + "integrity": "sha1-6v/NDk/Gk1z4E02iRuLmw1MFrf8=" }, "mime-types": { "version": "2.1.14", - "bundled": true + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz", + "integrity": "sha1-9+99l1g/yvO30oK2+LVnnaselO4=" }, "minimatch": { "version": "3.0.3", - "bundled": true + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=" }, "minimist": { "version": "0.0.8", - "bundled": true + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" }, "mkdirp": { "version": "0.5.1", - "bundled": true + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=" }, "ms": { "version": "0.7.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", "optional": true }, "node-pre-gyp": { "version": "0.6.33", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz", + "integrity": "sha1-ZArFUZj2qSWXLgwWxKwmoDTV7Mk=", "optional": true }, "nopt": { "version": "3.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "optional": true }, "npmlog": { "version": "4.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz", + "integrity": "sha1-0DlQ4OeM4VJ7om0qdZLpNIrD518=", "optional": true }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "oauth-sign": { "version": "0.8.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", "optional": true }, "object-assign": { "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 }, "once": { "version": "1.4.0", - "bundled": true + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" }, "path-is-absolute": { "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=" }, "pinkie": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", "optional": true }, "pinkie-promise": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "optional": true }, "process-nextick-args": { "version": "1.0.7", - "bundled": true + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "punycode": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "optional": true }, "qs": { "version": "6.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.1.tgz", + "integrity": "sha1-kYwLO802Z5dyuvE1say0wWUe150=", "optional": true }, "rc": { "version": "1.1.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.7.tgz", + "integrity": "sha1-xepWS7B6/5/TpbMukGwdOmWUD+o=", "optional": true, "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "optional": true } } }, "readable-stream": { "version": "2.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "integrity": "sha1-qeb+w8fdqF+LsbO6cChgRVb8gl4=", "optional": true }, "request": { "version": "2.79.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", "optional": true }, "rimraf": { "version": "2.5.4", - "bundled": true + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=" }, "semver": { "version": "5.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "optional": true }, "set-blocking": { "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 }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "optional": true }, "sntp": { "version": "1.0.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "optional": true }, "sshpk": { "version": "1.10.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.2.tgz", + "integrity": "sha1-1agEziJpVRVjjnmNviMnPeBwpfo=", "optional": true, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "optional": true } } }, "string_decoder": { "version": "0.10.31", - "bundled": true + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "string-width": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=" }, "stringstream": { "version": "0.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", "optional": true }, "strip-ansi": { "version": "3.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=" }, "strip-json-comments": { "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 }, "supports-color": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "optional": true }, "tar": { "version": "2.2.1", - "bundled": true + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=" }, "tar-pack": { "version": "3.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.3.0.tgz", + "integrity": "sha1-MJMYFkGPVa/E0hd1r91nIM7kXa4=", "optional": true, "dependencies": { "once": { "version": "1.3.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", "optional": true }, "readable-stream": { "version": "2.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", + "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", "optional": true } } }, "tough-cookie": { "version": "2.3.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", "optional": true }, "tunnel-agent": { "version": "0.4.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", "optional": true }, "tweetnacl": { "version": "0.14.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "optional": true }, "uid-number": { "version": "0.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", "optional": true }, "util-deprecate": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", "optional": true }, "verror": { "version": "1.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", "optional": true }, "wide-align": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz", + "integrity": "sha1-QO3egCpx/qHwcNo+YtzaLnrdlq0=", "optional": true }, "wrappy": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "xtend": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "optional": true } } @@ -2642,6 +2804,11 @@ "integrity": "sha1-QyNS5XrM2HqzEQ6C0/6g5HgSFW0=", "dev": true }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2674,6 +2841,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inline-process-browser": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", + "integrity": "sha1-RqYbFT3TybFiSxoAYm7bT39BTyI=" + }, "inquirer": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", @@ -2976,6 +3148,23 @@ } } }, + "jstransform": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz", + "integrity": "sha1-olkats7o2XvzvoMNv6IxO4fNZAs=", + "dependencies": { + "esprima-fb": { + "version": "3001.1.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" + }, + "source-map": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", + "integrity": "sha1-n3BNDWnZ4TioG63267T94z0VHGE=" + } + } + }, "jsx-ast-utils": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", @@ -3004,6 +3193,11 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true }, + "lie": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.0.2.tgz", + "integrity": "sha1-/9oh17uibzd8rYZdNkmy/Izjn+o=" + }, "lint-staged": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-3.6.1.tgz", @@ -3065,6 +3259,11 @@ "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", "dev": true }, + "localforage": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.5.0.tgz", + "integrity": "sha1-a5lOGbVmEfqF3zmS3zl6xKtm6BU=" + }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -3159,6 +3358,16 @@ "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", "dev": true }, + "lodash.forin": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.forin/-/lodash.forin-4.4.0.tgz", + "integrity": "sha1-XT8grlZAEfvog4H32YlJyclRlzE=" + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, "lodash.isarguments": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", @@ -3171,12 +3380,32 @@ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", "dev": true }, + "lodash.isempty": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", + "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=" + }, "lodash.keys": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", "dev": true }, + "lodash.pickby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz", + "integrity": "sha1-feoh2MGNdwOifHBMFdO4SmfjOv8=" + }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=" + }, + "lodash.unset": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.unset/-/lodash.unset-4.5.2.tgz", + "integrity": "sha1-Nw0dPoW3Kn4bDN8tJyEhMG8j5O0=" + }, "log-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", @@ -3210,6 +3439,11 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==" }, + "lz-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" + }, "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", @@ -3487,8 +3721,7 @@ "object-keys": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", - "dev": true + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" }, "object.assign": { "version": "4.0.4", @@ -3967,6 +4200,18 @@ "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", "dev": true }, + "recast": { + "version": "0.10.43", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", + "integrity": "sha1-uV1Q9tYHYaX2JS4V2AZ4FoSRzn8=", + "dependencies": { + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", + "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" + } + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -3997,11 +4242,31 @@ "resolved": "https://registry.npmjs.org/redux/-/redux-3.6.0.tgz", "integrity": "sha1-iHwrPQub2G7KK+cFccJ2VMGeGI0=" }, + "redux-action-buffer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/redux-action-buffer/-/redux-action-buffer-1.1.0.tgz", + "integrity": "sha1-nGkqtlMrBC0NQ6nwGkitoSD8lBo=" + }, "redux-logger": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=" }, + "redux-persist": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-4.8.0.tgz", + "integrity": "sha1-F/2ZiUm97vknXkz2CtW74cc2dfw=" + }, + "redux-persist-transform-compress": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/redux-persist-transform-compress/-/redux-persist-transform-compress-4.2.0.tgz", + "integrity": "sha1-UInimd9xMIePykX5f/6CiIugJpA=" + }, + "redux-persist-transform-filter": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/redux-persist-transform-filter/-/redux-persist-transform-filter-0.0.10.tgz", + "integrity": "sha1-mjsQbOiTnSy79SEsdH7Rd//xQoA=" + }, "redux-thunk": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.2.0.tgz", @@ -4523,8 +4788,29 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } }, "timers-browserify": { "version": "2.0.2", @@ -4652,6 +4938,11 @@ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true }, + "unreachable-branch-transform": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.3.0.tgz", + "integrity": "sha1-2ZzExudG0mSSiEW2EdtUsPNHTKo=" + }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", @@ -5090,8 +5381,7 @@ "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "y18n": { "version": "3.2.1", diff --git a/ui/package.json b/ui/package.json index 59595bc03..0465e70c4 100644 --- a/ui/package.json +++ b/ui/package.json @@ -26,6 +26,7 @@ "babel-preset-react": "^6.11.1", "from2": "^2.3.0", "jshashes": "^1.0.6", + "localforage": "^1.5.0", "node-sass": "^3.8.0", "rc-progress": "^2.0.6", "react": "^15.4.0", @@ -33,7 +34,11 @@ "react-modal": "^1.5.2", "react-redux": "^5.0.3", "redux": "^3.6.0", + "redux-action-buffer": "^1.1.0", "redux-logger": "^3.0.1", + "redux-persist": "^4.8.0", + "redux-persist-transform-compress": "^4.2.0", + "redux-persist-transform-filter": "0.0.10", "redux-thunk": "^2.2.0", "render-media": "^2.10.0", "reselect": "^3.0.0", diff --git a/ui/webpack.config.js b/ui/webpack.config.js index b0ab6f08a..83870e970 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -32,6 +32,19 @@ module.exports = { loaders: ["eslint"], // define an include so we check just the files we need include: PATHS.app + } + ], + noParse: /node_modules\/localforage\/dist\/localforage.js/, + loaders: [ + { test: /\.css$/, loader: "style!css" }, + { + test: /\.jsx?$/, + loader: 'babel', + exclude: /node_modules/, + query: { + cacheDirectory: true, + presets:[ 'es2015', 'react', 'stage-2' ] + } }, { test: /\.css$/, diff --git a/ui/webpack.dev.config.js b/ui/webpack.dev.config.js index 42107a3c5..f904bff2d 100644 --- a/ui/webpack.dev.config.js +++ b/ui/webpack.dev.config.js @@ -40,6 +40,19 @@ module.exports = { loaders: ["eslint"], // define an include so we check just the files we need include: PATHS.app + } + ], + noParse: /node_modules\/localforage\/dist\/localforage.js/, + loaders: [ + { test: /\.css$/, loader: "style!css" }, + { + test: /\.jsx?$/, + loader: 'babel', + exclude: /node_modules/, + query: { + cacheDirectory: true, + presets:[ 'es2015', 'react', 'stage-2' ] + } }, { test: /\.css$/, From 04c4988a9afcf57355db2d65d72e962edd1471a5 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Thu, 15 Jun 2017 11:26:26 +0700 Subject: [PATCH 17/30] Always refresh claims/file info on downloaded/published pages --- ui/js/actions/file_info.js | 9 ++------- ui/js/component/fileList/view.jsx | 2 +- ui/js/page/fileListDownloaded/view.jsx | 2 +- ui/js/page/fileListPublished/view.jsx | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ui/js/actions/file_info.js b/ui/js/actions/file_info.js index d379db625..a8d275b35 100644 --- a/ui/js/actions/file_info.js +++ b/ui/js/actions/file_info.js @@ -102,12 +102,7 @@ export function doFetchFileInfosAndPublishedClaims() { isClaimListMinePending = selectClaimListMineIsPending(state), isFileInfoListPending = selectFileListIsPending(state); - if (isClaimListMinePending === undefined) { - dispatch(doFetchClaimListMine()); - } - - if (isFileInfoListPending === undefined) { - dispatch(doFileList()); - } + dispatch(doFetchClaimListMine()); + dispatch(doFileList()); }; } diff --git a/ui/js/component/fileList/view.jsx b/ui/js/component/fileList/view.jsx index 664ae97d3..4e35ec948 100644 --- a/ui/js/component/fileList/view.jsx +++ b/ui/js/component/fileList/view.jsx @@ -82,7 +82,7 @@ class FileList extends React.PureComponent { }); return (
- {fetching && } + {fetching && } {__("Sort by")} {" "} diff --git a/ui/js/page/fileListDownloaded/view.jsx b/ui/js/page/fileListDownloaded/view.jsx index 518a5c2f2..77f1091db 100644 --- a/ui/js/page/fileListDownloaded/view.jsx +++ b/ui/js/page/fileListDownloaded/view.jsx @@ -12,7 +12,7 @@ import SubHeader from "component/subHeader"; class FileListDownloaded extends React.PureComponent { componentWillMount() { - this.props.fetchFileInfosDownloaded(); + if (!this.props.isPending) this.props.fetchFileInfosDownloaded(); } render() { diff --git a/ui/js/page/fileListPublished/view.jsx b/ui/js/page/fileListPublished/view.jsx index 90c7aad47..3af905a51 100644 --- a/ui/js/page/fileListPublished/view.jsx +++ b/ui/js/page/fileListPublished/view.jsx @@ -12,7 +12,7 @@ import SubHeader from "component/subHeader"; class FileListPublished extends React.PureComponent { componentWillMount() { - this.props.fetchFileListPublished(); + if (!this.props.isPending) this.props.fetchFileListPublished(); } componentDidUpdate() { From 193738083fccf91cfca461962a45c69f8aad7efa Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Thu, 8 Jun 2017 12:10:58 +0700 Subject: [PATCH 18/30] Always resolve claims on discover page --- ui/js/actions/content.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index ca174b261..f1d5df8f4 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -11,6 +11,7 @@ import { selectResolvingUris } from "selectors/content"; import { selectCostInfoForUri } from "selectors/cost_info"; import { doOpenModal } from "actions/app"; import { doClaimEligiblePurchaseRewards } from "actions/rewards"; +import batchActions from "util/batchActions"; export function doResolveUri(uri) { return function(dispatch, getState) { @@ -63,20 +64,28 @@ export function doFetchFeaturedUris() { const success = ({ Categories, Uris }) => { let featuredUris = {}; + const actions = []; Categories.forEach(category => { if (Uris[category] && Uris[category].length) { - featuredUris[category] = Uris[category]; + const uris = Uris[category]; + + featuredUris[category] = uris; + uris.forEach(uri => { + actions.push(doResolveUri(uri)); + }); } }); - dispatch({ + actions.push({ type: types.FETCH_FEATURED_CONTENT_COMPLETED, data: { categories: Categories, uris: featuredUris, }, }); + + dispatch(batchActions(...actions)); }; const failure = () => { From 8f786baacd0fe7ae48504e1362fe0a4b15e6ae0e Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Thu, 8 Jun 2017 12:11:41 +0700 Subject: [PATCH 19/30] Make search page updates more efficient with batch actions --- ui/js/actions/search.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/js/actions/search.js b/ui/js/actions/search.js index ab844df03..a693dc26a 100644 --- a/ui/js/actions/search.js +++ b/ui/js/actions/search.js @@ -4,6 +4,7 @@ import lighthouse from "lighthouse"; import { doResolveUri } from "actions/content"; import { doNavigate, doHistoryPush } from "actions/app"; import { selectCurrentPage } from "selectors/app"; +import batchActions from "util/batchActions"; export function doSearch(query) { return function(dispatch, getState) { @@ -25,22 +26,26 @@ export function doSearch(query) { dispatch(doNavigate("search", { query: query })); } else { lighthouse.search(query).then(results => { + const actions = []; + results.forEach(result => { const uri = lbryuri.build({ channelName: result.channel_name, contentName: result.name, claimId: result.channel_id || result.claim_id, }); - dispatch(doResolveUri(uri)); + actions.push(doResolveUri(uri)); }); - dispatch({ + actions.push({ type: types.SEARCH_COMPLETED, data: { query, results, }, }); + + dispatch(batchActions(...actions)); }); } }; From b596806fbcf7d8156338d8300a5cff7dd7e9c370 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Thu, 8 Jun 2017 13:04:49 +0700 Subject: [PATCH 20/30] Refresh claim data when show page is mounted --- ui/js/page/showPage/view.jsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ui/js/page/showPage/view.jsx b/ui/js/page/showPage/view.jsx index 2ef928c99..0c1bd830b 100644 --- a/ui/js/page/showPage/view.jsx +++ b/ui/js/page/showPage/view.jsx @@ -6,15 +6,13 @@ import FilePage from "page/filePage"; class ShowPage extends React.PureComponent { componentWillMount() { - this.resolve(this.props); + const { isResolvingUri, resolveUri, uri } = this.props; + + if (!isResolvingUri) resolveUri(uri); } componentWillReceiveProps(nextProps) { - this.resolve(nextProps); - } - - resolve(props) { - const { isResolvingUri, resolveUri, claim, uri } = props; + const { isResolvingUri, resolveUri, claim, uri } = this.props; if (!isResolvingUri && claim === undefined && uri) { resolveUri(uri); @@ -26,7 +24,7 @@ class ShowPage extends React.PureComponent { let innerContent = ""; - if (isResolvingUri || !claim) { + if (isResolvingUri && !claim) { innerContent = (
@@ -44,7 +42,7 @@ class ShowPage extends React.PureComponent {
); - } else if (claim.name.length && claim.name[0] === "@") { + } else if (claim && claim.name.length && claim.name[0] === "@") { innerContent = ; } else if (claim) { innerContent = ; From e5260612d67d72cbc3377462f3b471d2562690f3 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Thu, 8 Jun 2017 15:06:58 +0700 Subject: [PATCH 21/30] Fix removing busy message after discovered content is fetched --- ui/js/actions/content.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index f1d5df8f4..b95724e87 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -82,6 +82,7 @@ export function doFetchFeaturedUris() { data: { categories: Categories, uris: featuredUris, + success: true, }, }); From 28ea64821544fab9d611285bf6c9f063b41bf517 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Wed, 14 Jun 2017 13:49:37 +0700 Subject: [PATCH 22/30] Fixes after rebasing on master --- ui/package-lock.json | 612 +++++++++++++++------------------------ ui/webpack.config.js | 13 - ui/webpack.dev.config.js | 13 - 3 files changed, 232 insertions(+), 406 deletions(-) diff --git a/ui/package-lock.json b/ui/package-lock.json index 97912d859..cb870b578 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -15,10 +15,9 @@ "dev": true }, "acorn": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.0.3.tgz", - "integrity": "sha1-xGDfCEkUY/AozLguqzcwvwEIez0=", - "dev": true + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", + "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" }, "acorn-dynamic-import": { "version": "2.0.2", @@ -1325,14 +1324,7 @@ "es3ify": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", - "integrity": "sha1-rZ+l3xrjTz8x4SEbWBiy1RB439E=", - "dependencies": { - "esprima-fb": { - "version": "3001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", - "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" - } - } + "integrity": "sha1-rZ+l3xrjTz8x4SEbWBiy1RB439E=" }, "es5-ext": { "version": "0.10.23", @@ -1538,13 +1530,20 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/espree/-/espree-3.4.3.tgz", "integrity": "sha1-KRC1zNSc6JPC//+qtP2LOjG4I3Q=", - "dev": true + "dev": true, + "dependencies": { + "acorn": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.0.3.tgz", + "integrity": "sha1-xGDfCEkUY/AozLguqzcwvwEIez0=", + "dev": true + } + } }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true + "esprima-fb": { + "version": "3001.1.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" }, "esquery": { "version": "1.0.0", @@ -1682,11 +1681,6 @@ "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", "integrity": "sha1-wY0k71CRF0pJfzGM0ksCaiXN2rQ=", "dependencies": { - "acorn": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", - "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" - }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -1830,696 +1824,545 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.1.tgz", - "integrity": "sha1-8Z/Sj0Pur3YWgOUZogPE0LPTGv8=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", + "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", "optional": true, "dependencies": { "abbrev": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", + "bundled": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "optional": true + "bundled": true }, "aproba": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", - "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", + "bundled": true, "optional": true }, "are-we-there-yet": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", - "integrity": "sha1-gORw6VoIR5T+GJkmLFZnxuiN4bM=", + "version": "1.1.4", + "bundled": true, "optional": true }, "asn1": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "bundled": true, "optional": true }, "assert-plus": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "bundled": true, "optional": true }, "asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "bundled": true, "optional": true }, "aws-sign2": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "bundled": true, "optional": true }, "aws4": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "bundled": true, "optional": true }, "balanced-match": { "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + "bundled": true }, "bcrypt-pbkdf": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "bundled": true, "optional": true }, "block-stream": { "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=" + "bundled": true }, "boom": { "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=" + "bundled": true }, "brace-expansion": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", - "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=" + "version": "1.1.7", + "bundled": true }, "buffer-shims": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" + "bundled": true }, "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "version": "0.12.0", + "bundled": true, "optional": true }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "co": { + "version": "4.6.0", + "bundled": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "bundled": true }, "combined-stream": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=" - }, - "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + "bundled": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "bundled": true }, "cryptiles": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "bundled": true, "optional": true }, "dashdash": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "bundled": true, "optional": true, "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "optional": true } } }, "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "version": "2.6.8", + "bundled": true, "optional": true }, "deep-extend": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz", - "integrity": "sha1-7+QRPQgIX05vlod1mBD4B0aeIlM=", + "version": "0.4.2", + "bundled": true, "optional": true }, "delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "bundled": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "bundled": true, "optional": true }, "ecc-jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "bundled": true, "optional": true }, "extend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", - "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=", + "version": "3.0.1", + "bundled": true, "optional": true }, "extsprintf": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", - "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=" + "bundled": true }, "forever-agent": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "bundled": true, "optional": true }, "form-data": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz", - "integrity": "sha1-icNTQAi5fq2ky7FX1Y9vXfAl6uQ=", + "version": "2.1.4", + "bundled": true, "optional": true }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "bundled": true }, "fstream": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz", - "integrity": "sha1-YE6Kkv4m/9n2+uMDmdSYThqyKCI=" + "version": "1.0.11", + "bundled": true }, "fstream-ignore": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "bundled": true, "optional": true }, "gauge": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.3.tgz", - "integrity": "sha1-HCOFX5YvF7OtPQ3HRD8wRULt/gk=", - "optional": true - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "optional": true - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "version": "2.7.4", + "bundled": true, "optional": true }, "getpass": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", - "integrity": "sha1-KD/9n8ElaECHUxHBtg6MQBhxEOY=", + "version": "0.1.7", + "bundled": true, "optional": true, "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "optional": true } } }, "glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=" + "version": "7.1.2", + "bundled": true }, "graceful-fs": { "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "bundled": true }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "har-schema": { + "version": "1.0.5", + "bundled": true, "optional": true }, "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "optional": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "version": "4.2.1", + "bundled": true, "optional": true }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "bundled": true, "optional": true }, "hawk": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "bundled": true, "optional": true }, "hoek": { "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + "bundled": true }, "http-signature": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "bundled": true, "optional": true }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + "bundled": true }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "bundled": true }, "ini": { "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "bundled": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=" - }, - "is-my-json-valid": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz", - "integrity": "sha1-k27do8o8IR/ZjzstPgjaQ/eykVs=", - "optional": true - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "optional": true + "bundled": true }, "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "bundled": true, "optional": true }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "bundled": true }, "isstream": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "bundled": true, "optional": true }, "jodid25519": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", - "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", + "bundled": true, "optional": true }, "jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "bundled": true, "optional": true }, "json-schema": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "bundled": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, "optional": true }, "json-stringify-safe": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "bundled": true, "optional": true }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "jsonify": { + "version": "0.0.0", + "bundled": true, "optional": true }, "jsprim": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz", - "integrity": "sha1-KnJW9wQSop7jZwqspiWZTE3P8lI=", - "optional": true + "version": "1.4.0", + "bundled": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } }, "mime-db": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz", - "integrity": "sha1-6v/NDk/Gk1z4E02iRuLmw1MFrf8=" + "version": "1.27.0", + "bundled": true }, "mime-types": { - "version": "2.1.14", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz", - "integrity": "sha1-9+99l1g/yvO30oK2+LVnnaselO4=" + "version": "2.1.15", + "bundled": true }, "minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=" + "version": "3.0.4", + "bundled": true }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "bundled": true }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=" + "bundled": true }, "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "version": "2.0.0", + "bundled": true, "optional": true }, "node-pre-gyp": { - "version": "0.6.33", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz", - "integrity": "sha1-ZArFUZj2qSWXLgwWxKwmoDTV7Mk=", + "version": "0.6.36", + "bundled": true, "optional": true }, "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "version": "4.0.1", + "bundled": true, "optional": true }, "npmlog": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz", - "integrity": "sha1-0DlQ4OeM4VJ7om0qdZLpNIrD518=", + "version": "4.1.0", + "bundled": true, "optional": true }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "bundled": true }, "oauth-sign": { "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "bundled": true, "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + "bundled": true + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "optional": true }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "bundled": true }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "optional": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "performance-now": { + "version": "0.2.0", + "bundled": true, "optional": true }, "process-nextick-args": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "bundled": true }, "punycode": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "bundled": true, "optional": true }, "qs": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.1.tgz", - "integrity": "sha1-kYwLO802Z5dyuvE1say0wWUe150=", + "version": "6.4.0", + "bundled": true, "optional": true }, "rc": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.7.tgz", - "integrity": "sha1-xepWS7B6/5/TpbMukGwdOmWUD+o=", + "version": "1.2.1", + "bundled": true, "optional": true, "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "bundled": true, "optional": true } } }, "readable-stream": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", - "integrity": "sha1-qeb+w8fdqF+LsbO6cChgRVb8gl4=", - "optional": true + "version": "2.2.9", + "bundled": true }, "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "version": "2.81.0", + "bundled": true, "optional": true }, "rimraf": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", - "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=" + "version": "2.6.1", + "bundled": true + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true }, "semver": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "bundled": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "optional": true }, "sntp": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "bundled": true, "optional": true }, "sshpk": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.2.tgz", - "integrity": "sha1-1agEziJpVRVjjnmNviMnPeBwpfo=", + "version": "1.13.0", + "bundled": true, "optional": true, "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "bundled": true, "optional": true } } }, "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "version": "1.0.1", + "bundled": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=" + "bundled": true }, "stringstream": { "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "bundled": true, "optional": true }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=" + "bundled": true }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "optional": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "bundled": true, "optional": true }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=" + "bundled": true }, "tar-pack": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.3.0.tgz", - "integrity": "sha1-MJMYFkGPVa/E0hd1r91nIM7kXa4=", - "optional": true, - "dependencies": { - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "optional": true - }, - "readable-stream": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", - "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", - "optional": true - } - } + "version": "3.4.0", + "bundled": true, + "optional": true }, "tough-cookie": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "bundled": true, "optional": true }, "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "version": "0.6.0", + "bundled": true, "optional": true }, "tweetnacl": { "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "bundled": true, "optional": true }, "uid-number": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "bundled": true, "optional": true }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "bundled": true }, "uuid": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", - "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", + "bundled": true, "optional": true }, "verror": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", - "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "bundled": true, "optional": true }, "wide-align": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz", - "integrity": "sha1-QO3egCpx/qHwcNo+YtzaLnrdlq0=", + "version": "1.1.2", + "bundled": true, "optional": true }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "optional": true + "bundled": true } } }, @@ -2788,9 +2631,9 @@ } }, "iconv-lite": { - "version": "0.4.17", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz", - "integrity": "sha1-T9qjs4rLwsAxsEXQ7c3+HsqxjI0=" + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", + "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==" }, "ieee754": { "version": "1.1.8", @@ -3075,7 +2918,15 @@ "version": "3.8.4", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.4.tgz", "integrity": "sha1-UgtFZPhlc7qWZir4Woyvp7S1pvY=", - "dev": true + "dev": true, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + } + } }, "jsbn": { "version": "0.1.1", @@ -3153,11 +3004,6 @@ "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz", "integrity": "sha1-olkats7o2XvzvoMNv6IxO4fNZAs=", "dependencies": { - "esprima-fb": { - "version": "3001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", - "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" - }, "source-map": { "version": "0.1.31", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", @@ -4155,19 +4001,19 @@ "integrity": "sha1-0xzLFJmuIjwNIdFIVlCqSg03TOA=" }, "react": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/react/-/react-15.5.4.tgz", - "integrity": "sha1-+oPrAVBqsjfNwcjDsc6o3gEr8Ec=" + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/react/-/react-15.6.0.tgz", + "integrity": "sha1-wjKZtI4w7TAlCM6J4aAskZ+Ca84=" }, "react-dom": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.5.4.tgz", - "integrity": "sha1-ugwoeG/VLtfk8hNf4CiNRirvk9o=" + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.0.tgz", + "integrity": "sha1-i8I8sMgOcGNVt2yp+M5Hz3vfttE=" }, "react-modal": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-1.9.2.tgz", - "integrity": "sha512-4FG4SsYdJ9ncLYIP17Q8HEWRXbEsd+lHkG3vJd+koqXdPDMzP+2KZFjrkMOVvLyvXYSpgVTqEqeLFnkJ2x8+Ig==" + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-1.9.4.tgz", + "integrity": "sha512-ourtHswaEA/KyeI20AsCOSWTC23WF3z0b1C3qzQtA5UhBOdwQ2sEK2OPJGN8u7iFGJ83etmk605aeF/i4tGVEQ==" }, "react-redux": { "version": "5.0.5", @@ -4890,9 +4736,9 @@ "integrity": "sha1-BMgamb3V3FImPqKdJMa/jUgYpLs=" }, "uglify-js": { - "version": "2.8.28", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.28.tgz", - "integrity": "sha512-WqKNbmNJKzIdIEQu/U2ytgGBbhCy2PVks94GoetczOAJ/zCgVu2CuO7gguI5KPFGPtUtI1dmPQl6h0D4cPzypA==", + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "dev": true, "dependencies": { "camelcase": { @@ -5056,6 +4902,12 @@ "integrity": "sha1-LgRX8KuxrF3zqxBsacZy8jZ4Xwc=", "dev": true, "dependencies": { + "acorn": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.0.3.tgz", + "integrity": "sha1-xGDfCEkUY/AozLguqzcwvwEIez0=", + "dev": true + }, "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", diff --git a/ui/webpack.config.js b/ui/webpack.config.js index 83870e970..b0ab6f08a 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -32,19 +32,6 @@ module.exports = { loaders: ["eslint"], // define an include so we check just the files we need include: PATHS.app - } - ], - noParse: /node_modules\/localforage\/dist\/localforage.js/, - loaders: [ - { test: /\.css$/, loader: "style!css" }, - { - test: /\.jsx?$/, - loader: 'babel', - exclude: /node_modules/, - query: { - cacheDirectory: true, - presets:[ 'es2015', 'react', 'stage-2' ] - } }, { test: /\.css$/, diff --git a/ui/webpack.dev.config.js b/ui/webpack.dev.config.js index f904bff2d..42107a3c5 100644 --- a/ui/webpack.dev.config.js +++ b/ui/webpack.dev.config.js @@ -40,19 +40,6 @@ module.exports = { loaders: ["eslint"], // define an include so we check just the files we need include: PATHS.app - } - ], - noParse: /node_modules\/localforage\/dist\/localforage.js/, - loaders: [ - { test: /\.css$/, loader: "style!css" }, - { - test: /\.jsx?$/, - loader: 'babel', - exclude: /node_modules/, - query: { - cacheDirectory: true, - presets:[ 'es2015', 'react', 'stage-2' ] - } }, { test: /\.css$/, From 1063d2fc9dc5a25d2db247ac338aa5d9072ed881 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Thu, 15 Jun 2017 11:26:26 +0700 Subject: [PATCH 23/30] Always refresh claims/file info on downloaded/published pages --- ui/js/actions/file_info.js | 13 +- ui/js/component/fileList/view.jsx | 2 +- ui/js/component/fileTile/view.jsx | 8 +- ui/js/lbry.js | 742 ++++++++++++------------- ui/js/page/fileListDownloaded/view.jsx | 2 +- ui/js/page/fileListPublished/view.jsx | 2 +- 6 files changed, 376 insertions(+), 393 deletions(-) diff --git a/ui/js/actions/file_info.js b/ui/js/actions/file_info.js index d379db625..53dfb13a5 100644 --- a/ui/js/actions/file_info.js +++ b/ui/js/actions/file_info.js @@ -98,16 +98,9 @@ export function doDeleteFile(outpoint, deleteFromComputer) { export function doFetchFileInfosAndPublishedClaims() { return function(dispatch, getState) { - const state = getState(), - isClaimListMinePending = selectClaimListMineIsPending(state), - isFileInfoListPending = selectFileListIsPending(state); + const state = getState(); - if (isClaimListMinePending === undefined) { - dispatch(doFetchClaimListMine()); - } - - if (isFileInfoListPending === undefined) { - dispatch(doFileList()); - } + dispatch(doFetchClaimListMine()); + dispatch(doFileList()); }; } diff --git a/ui/js/component/fileList/view.jsx b/ui/js/component/fileList/view.jsx index 664ae97d3..4e35ec948 100644 --- a/ui/js/component/fileList/view.jsx +++ b/ui/js/component/fileList/view.jsx @@ -82,7 +82,7 @@ class FileList extends React.PureComponent { }); return (
- {fetching && } + {fetching && } {__("Sort by")} {" "} diff --git a/ui/js/component/fileTile/view.jsx b/ui/js/component/fileTile/view.jsx index 27511defd..d19ce0137 100644 --- a/ui/js/component/fileTile/view.jsx +++ b/ui/js/component/fileTile/view.jsx @@ -19,14 +19,14 @@ class FileTile extends React.PureComponent { } componentDidMount() { - this.resolve(this.props); + const { isResolvingUri, claim, uri, resolveUri } = this.props; + + if (!isResolvingUri && !claim && uri) resolveUri(uri); } componentWillReceiveProps(nextProps) { - this.resolve(nextProps); - } + const { isResolvingUri, claim, uri, resolveUri } = this.props; - resolve({ isResolvingUri, claim, uri, resolveUri }) { if (!isResolvingUri && claim === undefined && uri) resolveUri(uri); } diff --git a/ui/js/lbry.js b/ui/js/lbry.js index e242bf538..cadd33582 100644 --- a/ui/js/lbry.js +++ b/ui/js/lbry.js @@ -1,25 +1,25 @@ -import lbryio from './lbryio.js'; -import lighthouse from './lighthouse.js'; -import jsonrpc from './jsonrpc.js'; -import lbryuri from './lbryuri.js'; -import { getLocal, getSession, setSession, setLocal } from './utils.js'; +import lbryio from "./lbryio.js"; +import lighthouse from "./lighthouse.js"; +import jsonrpc from "./jsonrpc.js"; +import lbryuri from "./lbryuri.js"; +import { getLocal, getSession, setSession, setLocal } from "./utils.js"; -const { remote, ipcRenderer } = require('electron'); -const menu = remote.require('./menu/main-menu'); +const { remote, ipcRenderer } = require("electron"); +const menu = remote.require("./menu/main-menu"); let lbry = { - isConnected: false, - daemonConnectionString: 'http://localhost:5279/lbryapi', - pendingPublishTimeout: 20 * 60 * 1000, - defaultClientSettings: { - showNsfw: false, - showUnavailable: true, - debug: false, - useCustomLighthouseServers: false, - customLighthouseServers: [], - showDeveloperMenu: false, - language: 'en' - } + isConnected: false, + daemonConnectionString: "http://localhost:5279/lbryapi", + pendingPublishTimeout: 20 * 60 * 1000, + defaultClientSettings: { + showNsfw: false, + showUnavailable: true, + debug: false, + useCustomLighthouseServers: false, + customLighthouseServers: [], + showDeveloperMenu: false, + language: "en", + }, }; /** @@ -27,24 +27,24 @@ let lbry = { * needed to make a dummy claim or file info object. */ function savePendingPublish({ name, channel_name }) { - let uri; - if (channel_name) { - uri = lbryuri.build({ name: channel_name, path: name }, false); - } else { - uri = lbryuri.build({ name: name }, false); - } - const pendingPublishes = getLocal('pendingPublishes') || []; - const newPendingPublish = { - name, - channel_name, - claim_id: 'pending_claim_' + uri, - txid: 'pending_' + uri, - nout: 0, - outpoint: 'pending_' + uri + ':0', - time: Date.now() - }; - setLocal('pendingPublishes', [...pendingPublishes, newPendingPublish]); - return newPendingPublish; + let uri; + if (channel_name) { + uri = lbryuri.build({ name: channel_name, path: name }, false); + } else { + uri = lbryuri.build({ name: name }, false); + } + const pendingPublishes = getLocal("pendingPublishes") || []; + const newPendingPublish = { + name, + channel_name, + claim_id: "pending_claim_" + uri, + txid: "pending_" + uri, + nout: 0, + outpoint: "pending_" + uri + ":0", + time: Date.now(), + }; + setLocal("pendingPublishes", [...pendingPublishes, newPendingPublish]); + return newPendingPublish; } /** @@ -52,18 +52,18 @@ function savePendingPublish({ name, channel_name }) { * A channel name may also be provided along with name. */ function removePendingPublishIfNeeded({ name, channel_name, outpoint }) { - function pubMatches(pub) { - return ( - pub.outpoint === outpoint || - (pub.name === name && - (!channel_name || pub.channel_name === channel_name)) - ); - } + function pubMatches(pub) { + return ( + pub.outpoint === outpoint || + (pub.name === name && + (!channel_name || pub.channel_name === channel_name)) + ); + } - setLocal( - 'pendingPublishes', - lbry.getPendingPublishes().filter(pub => !pubMatches(pub)) - ); + setLocal( + "pendingPublishes", + lbry.getPendingPublishes().filter(pub => !pubMatches(pub)) + ); } /** @@ -71,12 +71,12 @@ function removePendingPublishIfNeeded({ name, channel_name, outpoint }) { * removes them from the list. */ lbry.getPendingPublishes = function() { - const pendingPublishes = getLocal('pendingPublishes') || []; - const newPendingPublishes = pendingPublishes.filter( - pub => Date.now() - pub.time <= lbry.pendingPublishTimeout - ); - setLocal('pendingPublishes', newPendingPublishes); - return newPendingPublishes; + const pendingPublishes = getLocal("pendingPublishes") || []; + const newPendingPublishes = pendingPublishes.filter( + pub => Date.now() - pub.time <= lbry.pendingPublishTimeout + ); + setLocal("pendingPublishes", newPendingPublishes); + return newPendingPublishes; }; /** @@ -84,97 +84,97 @@ lbry.getPendingPublishes = function() { * provided along withe the name. If no pending publish is found, returns null. */ function getPendingPublish({ name, channel_name, outpoint }) { - const pendingPublishes = lbry.getPendingPublishes(); - return ( - pendingPublishes.find( - pub => - pub.outpoint === outpoint || - (pub.name === name && - (!channel_name || pub.channel_name === channel_name)) - ) || null - ); + const pendingPublishes = lbry.getPendingPublishes(); + return ( + pendingPublishes.find( + pub => + pub.outpoint === outpoint || + (pub.name === name && + (!channel_name || pub.channel_name === channel_name)) + ) || null + ); } function pendingPublishToDummyClaim({ - channel_name, - name, - outpoint, - claim_id, - txid, - nout + channel_name, + name, + outpoint, + claim_id, + txid, + nout, }) { - return { name, outpoint, claim_id, txid, nout, channel_name }; + return { name, outpoint, claim_id, txid, nout, channel_name }; } function pendingPublishToDummyFileInfo({ name, outpoint, claim_id }) { - return { name, outpoint, claim_id, metadata: null }; + return { name, outpoint, claim_id, metadata: null }; } lbry.call = function( - method, - params, - callback, - errorCallback, - connectFailedCallback + method, + params, + callback, + errorCallback, + connectFailedCallback ) { - return jsonrpc.call( - lbry.daemonConnectionString, - method, - params, - callback, - errorCallback, - connectFailedCallback - ); + return jsonrpc.call( + lbry.daemonConnectionString, + method, + params, + callback, + errorCallback, + connectFailedCallback + ); }; //core lbry._connectPromise = null; lbry.connect = function() { - if (lbry._connectPromise === null) { - lbry._connectPromise = new Promise((resolve, reject) => { - let tryNum = 0; + if (lbry._connectPromise === null) { + lbry._connectPromise = new Promise((resolve, reject) => { + let tryNum = 0; - function checkDaemonStartedFailed() { - if (tryNum <= 100) { - // Move # of tries into constant or config option - setTimeout(() => { - tryNum++; - checkDaemonStarted(); - }, tryNum < 50 ? 400 : 1000); - } else { - reject(new Error('Unable to connect to LBRY')); - } - } + function checkDaemonStartedFailed() { + if (tryNum <= 100) { + // Move # of tries into constant or config option + setTimeout(() => { + tryNum++; + checkDaemonStarted(); + }, tryNum < 50 ? 400 : 1000); + } else { + reject(new Error("Unable to connect to LBRY")); + } + } - // Check every half second to see if the daemon is accepting connections - function checkDaemonStarted() { - lbry.call( - 'status', - {}, - resolve, - checkDaemonStartedFailed, - checkDaemonStartedFailed - ); - } + // Check every half second to see if the daemon is accepting connections + function checkDaemonStarted() { + lbry.call( + "status", + {}, + resolve, + checkDaemonStartedFailed, + checkDaemonStartedFailed + ); + } - checkDaemonStarted(); - }); - } + checkDaemonStarted(); + }); + } - return lbry._connectPromise; + return lbry._connectPromise; }; lbry.checkAddressIsMine = function(address, callback) { - lbry.call('wallet_is_address_mine', { address: address }, callback); + lbry.call("wallet_is_address_mine", { address: address }, callback); }; lbry.sendToAddress = function(amount, address, callback, errorCallback) { - lbry.call( - 'send_amount_to_address', - { amount: amount, address: address }, - callback, - errorCallback - ); + lbry.call( + "send_amount_to_address", + { amount: amount, address: address }, + callback, + errorCallback + ); }; /** @@ -189,46 +189,46 @@ lbry.sendToAddress = function(amount, address, callback, errorCallback) { */ lbry.costPromiseCache = {}; lbry.getCostInfo = function(uri) { - if (lbry.costPromiseCache[uri] === undefined) { - lbry.costPromiseCache[uri] = new Promise((resolve, reject) => { - const COST_INFO_CACHE_KEY = 'cost_info_cache'; - let costInfoCache = getSession(COST_INFO_CACHE_KEY, {}); + if (lbry.costPromiseCache[uri] === undefined) { + lbry.costPromiseCache[uri] = new Promise((resolve, reject) => { + const COST_INFO_CACHE_KEY = "cost_info_cache"; + let costInfoCache = getSession(COST_INFO_CACHE_KEY, {}); - function cacheAndResolve(cost, includesData) { - costInfoCache[uri] = { cost, includesData }; - setSession(COST_INFO_CACHE_KEY, costInfoCache); - resolve({ cost, includesData }); - } + function cacheAndResolve(cost, includesData) { + costInfoCache[uri] = { cost, includesData }; + setSession(COST_INFO_CACHE_KEY, costInfoCache); + resolve({ cost, includesData }); + } - if (!uri) { - return reject(new Error(`URI required.`)); - } + if (!uri) { + return reject(new Error(`URI required.`)); + } - if (costInfoCache[uri] && costInfoCache[uri].cost) { - return resolve(costInfoCache[uri]); - } + if (costInfoCache[uri] && costInfoCache[uri].cost) { + return resolve(costInfoCache[uri]); + } - function getCost(uri, size) { - lbry - .stream_cost_estimate({ uri, ...(size !== null ? { size } : {}) }) - .then(cost => { - cacheAndResolve(cost, size !== null); - }, reject); - } + function getCost(uri, size) { + lbry + .stream_cost_estimate({ uri, ...(size !== null ? { size } : {}) }) + .then(cost => { + cacheAndResolve(cost, size !== null); + }, reject); + } - const uriObj = lbryuri.parse(uri); - const name = uriObj.path || uriObj.name; + const uriObj = lbryuri.parse(uri); + const name = uriObj.path || uriObj.name; - lighthouse.get_size_for_name(name).then(size => { - if (size) { - getCost(name, size); - } else { - getCost(name, null); - } - }); - }); - } - return lbry.costPromiseCache[uri]; + lighthouse.get_size_for_name(name).then(size => { + if (size) { + getCost(name, size); + } else { + getCost(name, null); + } + }); + }); + } + return lbry.costPromiseCache[uri]; }; /** @@ -239,143 +239,143 @@ lbry.getCostInfo = function(uri) { * publish can appear in the UI immediately. */ lbry.publish = function( - params, - fileListedCallback, - publishedCallback, - errorCallback + params, + fileListedCallback, + publishedCallback, + errorCallback ) { - lbry.call( - 'publish', - params, - result => { - if (returnedPending) { - return; - } + lbry.call( + "publish", + params, + result => { + if (returnedPending) { + return; + } - clearTimeout(returnPendingTimeout); - publishedCallback(result); - }, - err => { - if (returnedPending) { - return; - } + clearTimeout(returnPendingTimeout); + publishedCallback(result); + }, + err => { + if (returnedPending) { + return; + } - clearTimeout(returnPendingTimeout); - errorCallback(err); - } - ); + clearTimeout(returnPendingTimeout); + errorCallback(err); + } + ); - let returnedPending = false; - // Give a short grace period in case publish() returns right away or (more likely) gives an error - const returnPendingTimeout = setTimeout(() => { - returnedPending = true; + let returnedPending = false; + // Give a short grace period in case publish() returns right away or (more likely) gives an error + const returnPendingTimeout = setTimeout(() => { + returnedPending = true; - if (publishedCallback) { - savePendingPublish({ - name: params.name, - channel_name: params.channel_name - }); - publishedCallback(true); - } + if (publishedCallback) { + savePendingPublish({ + name: params.name, + channel_name: params.channel_name, + }); + publishedCallback(true); + } - if (fileListedCallback) { - const { name, channel_name } = params; - savePendingPublish({ - name: params.name, - channel_name: params.channel_name - }); - fileListedCallback(true); - } - }, 2000); + if (fileListedCallback) { + const { name, channel_name } = params; + savePendingPublish({ + name: params.name, + channel_name: params.channel_name, + }); + fileListedCallback(true); + } + }, 2000); }; lbry.getClientSettings = function() { - var outSettings = {}; - for (let setting of Object.keys(lbry.defaultClientSettings)) { - var localStorageVal = localStorage.getItem('setting_' + setting); - outSettings[setting] = localStorageVal === null - ? lbry.defaultClientSettings[setting] - : JSON.parse(localStorageVal); - } - return outSettings; + var outSettings = {}; + for (let setting of Object.keys(lbry.defaultClientSettings)) { + var localStorageVal = localStorage.getItem("setting_" + setting); + outSettings[setting] = localStorageVal === null + ? lbry.defaultClientSettings[setting] + : JSON.parse(localStorageVal); + } + return outSettings; }; lbry.getClientSetting = function(setting) { - var localStorageVal = localStorage.getItem('setting_' + setting); - if (setting == 'showDeveloperMenu') { - return true; - } - return localStorageVal === null - ? lbry.defaultClientSettings[setting] - : JSON.parse(localStorageVal); + var localStorageVal = localStorage.getItem("setting_" + setting); + if (setting == "showDeveloperMenu") { + return true; + } + return localStorageVal === null + ? lbry.defaultClientSettings[setting] + : JSON.parse(localStorageVal); }; lbry.setClientSettings = function(settings) { - for (let setting of Object.keys(settings)) { - lbry.setClientSetting(setting, settings[setting]); - } + for (let setting of Object.keys(settings)) { + lbry.setClientSetting(setting, settings[setting]); + } }; lbry.setClientSetting = function(setting, value) { - return localStorage.setItem('setting_' + setting, JSON.stringify(value)); + return localStorage.setItem("setting_" + setting, JSON.stringify(value)); }; lbry.getSessionInfo = function(callback) { - lbry.call('status', { session_status: true }, callback); + lbry.call("status", { session_status: true }, callback); }; lbry.reportBug = function(message, callback) { - lbry.call( - 'report_bug', - { - message: message - }, - callback - ); + lbry.call( + "report_bug", + { + message: message, + }, + callback + ); }; //utilities lbry.formatCredits = function(amount, precision) { - return amount.toFixed(precision || 1).replace(/\.?0+$/, ''); + return amount.toFixed(precision || 1).replace(/\.?0+$/, ""); }; lbry.formatName = function(name) { - // Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes) - name = name.replace('/s+/g', '-'); - name = name.toLowerCase().replace(/[^a-z0-9\-]/g, ''); - return name; + // Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes) + name = name.replace("/s+/g", "-"); + name = name.toLowerCase().replace(/[^a-z0-9\-]/g, ""); + return name; }; lbry.imagePath = function(file) { - return 'img/' + file; + return "img/" + file; }; lbry.getMediaType = function(contentType, fileName) { - if (contentType) { - return /^[^/]+/.exec(contentType)[0]; - } else if (fileName) { - var dotIndex = fileName.lastIndexOf('.'); - if (dotIndex == -1) { - return 'unknown'; - } + if (contentType) { + return /^[^/]+/.exec(contentType)[0]; + } else if (fileName) { + var dotIndex = fileName.lastIndexOf("."); + if (dotIndex == -1) { + return "unknown"; + } - var ext = fileName.substr(dotIndex + 1); - if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) { - return 'video'; - } else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) { - return 'audio'; - } else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) { - return 'document'; - } else { - return 'unknown'; - } - } else { - return 'unknown'; - } + var ext = fileName.substr(dotIndex + 1); + if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) { + return "video"; + } else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) { + return "audio"; + } else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) { + return "document"; + } else { + return "unknown"; + } + } else { + return "unknown"; + } }; lbry.stop = function(callback) { - lbry.call('stop', {}, callback); + lbry.call("stop", {}, callback); }; lbry._subscribeIdCount = 0; @@ -384,57 +384,57 @@ lbry._balanceSubscribeInterval = 5000; lbry._balanceUpdateInterval = null; lbry._updateBalanceSubscribers = function() { - lbry.wallet_balance().then(function(balance) { - for (let callback of Object.values(lbry._balanceSubscribeCallbacks)) { - callback(balance); - } - }); + lbry.wallet_balance().then(function(balance) { + for (let callback of Object.values(lbry._balanceSubscribeCallbacks)) { + callback(balance); + } + }); - if ( - !lbry._balanceUpdateInterval && - Object.keys(lbry._balanceSubscribeCallbacks).length - ) { - lbry._balanceUpdateInterval = setInterval(() => { - lbry._updateBalanceSubscribers(); - }, lbry._balanceSubscribeInterval); - } + if ( + !lbry._balanceUpdateInterval && + Object.keys(lbry._balanceSubscribeCallbacks).length + ) { + lbry._balanceUpdateInterval = setInterval(() => { + lbry._updateBalanceSubscribers(); + }, lbry._balanceSubscribeInterval); + } }; lbry.balanceSubscribe = function(callback) { - const subscribeId = ++lbry._subscribeIdCount; - lbry._balanceSubscribeCallbacks[subscribeId] = callback; - lbry._updateBalanceSubscribers(); - return subscribeId; + const subscribeId = ++lbry._subscribeIdCount; + lbry._balanceSubscribeCallbacks[subscribeId] = callback; + lbry._updateBalanceSubscribers(); + return subscribeId; }; lbry.balanceUnsubscribe = function(subscribeId) { - delete lbry._balanceSubscribeCallbacks[subscribeId]; - if ( - lbry._balanceUpdateInterval && - !Object.keys(lbry._balanceSubscribeCallbacks).length - ) { - clearInterval(lbry._balanceUpdateInterval); - } + delete lbry._balanceSubscribeCallbacks[subscribeId]; + if ( + lbry._balanceUpdateInterval && + !Object.keys(lbry._balanceSubscribeCallbacks).length + ) { + clearInterval(lbry._balanceUpdateInterval); + } }; lbry.showMenuIfNeeded = function() { - const showingMenu = sessionStorage.getItem('menuShown') || null; - const chosenMenu = lbry.getClientSetting('showDeveloperMenu') - ? 'developer' - : 'normal'; - if (chosenMenu != showingMenu) { - menu.showMenubar(chosenMenu == 'developer'); - } - sessionStorage.setItem('menuShown', chosenMenu); + const showingMenu = sessionStorage.getItem("menuShown") || null; + const chosenMenu = lbry.getClientSetting("showDeveloperMenu") + ? "developer" + : "normal"; + if (chosenMenu != showingMenu) { + menu.showMenubar(chosenMenu == "developer"); + } + sessionStorage.setItem("menuShown", chosenMenu); }; lbry.getAppVersionInfo = function() { - return new Promise((resolve, reject) => { - ipcRenderer.once('version-info-received', (event, versionInfo) => { - resolve(versionInfo); - }); - ipcRenderer.send('version-info-requested'); - }); + return new Promise((resolve, reject) => { + ipcRenderer.once("version-info-received", (event, versionInfo) => { + resolve(versionInfo); + }); + ipcRenderer.send("version-info-requested"); + }); }; /** @@ -447,117 +447,107 @@ lbry.getAppVersionInfo = function() { * (If a real publish with the same name is found, the pending publish will be ignored and removed.) */ lbry.file_list = function(params = {}) { - return new Promise((resolve, reject) => { - const { name, channel_name, outpoint } = params; + return new Promise((resolve, reject) => { + const { name, channel_name, outpoint } = params; - /** + /** * If we're searching by outpoint, check first to see if there's a matching pending publish. * Pending publishes use their own faux outpoints that are always unique, so we don't need * to check if there's a real file. */ - if (outpoint) { - const pendingPublish = getPendingPublish({ outpoint }); - if (pendingPublish) { - resolve([pendingPublishToDummyFileInfo(pendingPublish)]); - return; - } - } + if (outpoint) { + const pendingPublish = getPendingPublish({ outpoint }); + if (pendingPublish) { + resolve([pendingPublishToDummyFileInfo(pendingPublish)]); + return; + } + } - lbry.call( - 'file_list', - params, - fileInfos => { - removePendingPublishIfNeeded({ name, channel_name, outpoint }); + lbry.call( + "file_list", + params, + fileInfos => { + removePendingPublishIfNeeded({ name, channel_name, outpoint }); - const dummyFileInfos = lbry - .getPendingPublishes() - .map(pendingPublishToDummyFileInfo); - resolve([...fileInfos, ...dummyFileInfos]); - }, - reject, - reject - ); - }); + const dummyFileInfos = lbry + .getPendingPublishes() + .map(pendingPublishToDummyFileInfo); + resolve([...fileInfos, ...dummyFileInfos]); + }, + reject, + reject + ); + }); }; lbry.claim_list_mine = function(params = {}) { - return new Promise((resolve, reject) => { - lbry.call( - 'claim_list_mine', - params, - claims => { - for (let { name, channel_name, txid, nout } of claims) { - removePendingPublishIfNeeded({ - name, - channel_name, - outpoint: txid + ':' + nout - }); - } + return new Promise((resolve, reject) => { + lbry.call( + "claim_list_mine", + params, + claims => { + for (let { name, channel_name, txid, nout } of claims) { + removePendingPublishIfNeeded({ + name, + channel_name, + outpoint: txid + ":" + nout, + }); + } - const dummyClaims = lbry - .getPendingPublishes() - .map(pendingPublishToDummyClaim); - resolve([...claims, ...dummyClaims]); - }, - reject, - reject - ); - }); + const dummyClaims = lbry + .getPendingPublishes() + .map(pendingPublishToDummyClaim); + resolve([...claims, ...dummyClaims]); + }, + reject, + reject + ); + }); }; -const claimCacheKey = 'resolve_claim_cache'; -lbry._claimCache = getSession(claimCacheKey, {}); lbry._resolveXhrs = {}; lbry.resolve = function(params = {}) { - return new Promise((resolve, reject) => { - if (!params.uri) { - throw __('Resolve has hacked cache on top of it that requires a URI'); - } - if (params.uri && lbry._claimCache[params.uri] !== undefined) { - resolve(lbry._claimCache[params.uri]); - } else { - lbry._resolveXhrs[params.uri] = lbry.call( - 'resolve', - params, - function(data) { - if (data !== undefined) { - lbry._claimCache[params.uri] = data; - } - setSession(claimCacheKey, lbry._claimCache); - resolve(data); - }, - reject - ); - } - }); + return new Promise((resolve, reject) => { + if (!params.uri) { + throw __("Resolve has hacked cache on top of it that requires a URI"); + } + lbry._resolveXhrs[params.uri] = lbry.call( + "resolve", + params, + function(data) { + resolve(data); + }, + reject + ); + }); }; lbry.cancelResolve = function(params = {}) { - const xhr = lbry._resolveXhrs[params.uri]; - if (xhr && xhr.readyState > 0 && xhr.readyState < 4) { - xhr.abort(); - } + const xhr = lbry._resolveXhrs[params.uri]; + if (xhr && xhr.readyState > 0 && xhr.readyState < 4) { + xhr.abort(); + } }; lbry = new Proxy(lbry, { - get: function(target, name) { - if (name in target) { - return target[name]; - } + get: function(target, name) { + if (name in target) { + return target[name]; + } - return function(params = {}) { - return new Promise((resolve, reject) => { - jsonrpc.call( - lbry.daemonConnectionString, - name, - params, - resolve, - reject, - reject - ); - }); - }; - } + return function(params = {}) { + return new Promise((resolve, reject) => { + jsonrpc.call( + lbry.daemonConnectionString, + name, + params, + resolve, + reject, + reject + ); + }); + }; + }, }); export default lbry; diff --git a/ui/js/page/fileListDownloaded/view.jsx b/ui/js/page/fileListDownloaded/view.jsx index 518a5c2f2..77f1091db 100644 --- a/ui/js/page/fileListDownloaded/view.jsx +++ b/ui/js/page/fileListDownloaded/view.jsx @@ -12,7 +12,7 @@ import SubHeader from "component/subHeader"; class FileListDownloaded extends React.PureComponent { componentWillMount() { - this.props.fetchFileInfosDownloaded(); + if (!this.props.isPending) this.props.fetchFileInfosDownloaded(); } render() { diff --git a/ui/js/page/fileListPublished/view.jsx b/ui/js/page/fileListPublished/view.jsx index 90c7aad47..3af905a51 100644 --- a/ui/js/page/fileListPublished/view.jsx +++ b/ui/js/page/fileListPublished/view.jsx @@ -12,7 +12,7 @@ import SubHeader from "component/subHeader"; class FileListPublished extends React.PureComponent { componentWillMount() { - this.props.fetchFileListPublished(); + if (!this.props.isPending) this.props.fetchFileListPublished(); } componentDidUpdate() { From f95853892b10f1d238b02265affeb95e3195f285 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Thu, 15 Jun 2017 20:02:46 -0400 Subject: [PATCH 24/30] disable availability check --- ui/js/component/fileActions/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/js/component/fileActions/index.js b/ui/js/component/fileActions/index.js index 3f3e43283..572783ee5 100644 --- a/ui/js/component/fileActions/index.js +++ b/ui/js/component/fileActions/index.js @@ -28,7 +28,8 @@ const makeSelect = () => { const select = (state, props) => ({ fileInfo: selectFileInfoForUri(state, props), - isAvailable: selectIsAvailableForUri(state, props), + /*availability check is disabled due to poor performance, TBD if it dies forever or requires daemon fix*/ + isAvailable: true, //selectIsAvailableForUri(state, props), platform: selectPlatform(state), modal: selectCurrentModal(state), downloading: selectDownloadingForUri(state, props), From 620ac04db26b7b733029448e70a7653f739d97f8 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Thu, 15 Jun 2017 20:05:15 -0400 Subject: [PATCH 25/30] remove deprecated metadata field --- ui/js/page/filePage/view.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ui/js/page/filePage/view.jsx b/ui/js/page/filePage/view.jsx index 9c8095d56..9f3f5fbfe 100644 --- a/ui/js/page/filePage/view.jsx +++ b/ui/js/page/filePage/view.jsx @@ -9,7 +9,7 @@ import Link from "component/link"; import UriIndicator from "component/uriIndicator"; const FormatItem = props => { - const { contentType, metadata: { author, language, license } } = props; + const { contentType, metadata: { language, license } } = props; const mediaType = lbry.getMediaType(contentType); @@ -19,9 +19,6 @@ const FormatItem = props => { {__("Content-Type")}{mediaType} - - {__("Author")}{author} - {__("Language")}{language} From 5074b368eef83e2dbb02236c7776f97f17b1806a Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Fri, 16 Jun 2017 09:48:55 +0700 Subject: [PATCH 26/30] Fix loading state on file card and uri indicator when claim is already available --- ui/js/component/fileCard/view.jsx | 6 ++---- ui/js/component/uriIndicator/view.jsx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/js/component/fileCard/view.jsx b/ui/js/component/fileCard/view.jsx index 70b8e8132..0cd9d7376 100644 --- a/ui/js/component/fileCard/view.jsx +++ b/ui/js/component/fileCard/view.jsx @@ -47,13 +47,11 @@ class FileCard extends React.PureComponent { const { claim, fileInfo, metadata, isResolvingUri, navigate } = this.props; const uri = lbryuri.normalize(this.props.uri); - const title = !isResolvingUri && metadata && metadata.title - ? metadata.title - : uri; + const title = metadata && metadata.title ? metadata.title : uri; const obscureNsfw = this.props.obscureNsfw && metadata && metadata.nsfw; let description = ""; - if (isResolvingUri) { + if (isResolvingUri && !claim) { description = __("Loading..."); } else if (metadata && metadata.description) { description = metadata.description; diff --git a/ui/js/component/uriIndicator/view.jsx b/ui/js/component/uriIndicator/view.jsx index 92db16629..b69abd591 100644 --- a/ui/js/component/uriIndicator/view.jsx +++ b/ui/js/component/uriIndicator/view.jsx @@ -21,7 +21,7 @@ class UriIndicator extends React.PureComponent { render() { const { claim, uri, isResolvingUri } = this.props; - if (isResolvingUri) { + if (isResolvingUri && !claim) { return Validating...; } From 5595b5b5b2fc34ff95e8f94009337c44c1985afa Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Fri, 16 Jun 2017 09:51:02 +0700 Subject: [PATCH 27/30] Remove doCancelResolveUri, it deletes claims from the store --- ui/js/actions/content.js | 10 ---------- ui/js/component/fileCard/index.js | 3 +-- ui/js/component/fileCard/view.jsx | 8 -------- ui/js/constants/action_types.js | 1 - ui/js/reducers/claims.js | 9 --------- 5 files changed, 1 insertion(+), 30 deletions(-) diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index 0d26947fe..652f1ca22 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -44,16 +44,6 @@ export function doResolveUri(uri) { }; } -export function doCancelResolveUri(uri) { - return function(dispatch, getState) { - lbry.cancelResolve({ uri }); - dispatch({ - type: types.RESOLVE_URI_CANCELED, - data: { uri }, - }); - }; -} - export function doFetchFeaturedUris() { return function(dispatch, getState) { const state = getState(); diff --git a/ui/js/component/fileCard/index.js b/ui/js/component/fileCard/index.js index dcf1aad5c..a3c699998 100644 --- a/ui/js/component/fileCard/index.js +++ b/ui/js/component/fileCard/index.js @@ -1,7 +1,7 @@ import React from "react"; import { connect } from "react-redux"; import { doNavigate } from "actions/app"; -import { doResolveUri, doCancelResolveUri } from "actions/content"; +import { doResolveUri } from "actions/content"; import { selectObscureNsfw } from "selectors/app"; import { makeSelectClaimForUri, @@ -31,7 +31,6 @@ const makeSelect = () => { const perform = dispatch => ({ navigate: (path, params) => dispatch(doNavigate(path, params)), resolveUri: uri => dispatch(doResolveUri(uri)), - cancelResolveUri: uri => dispatch(doCancelResolveUri(uri)), }); export default connect(makeSelect, perform)(FileCard); diff --git a/ui/js/component/fileCard/view.jsx b/ui/js/component/fileCard/view.jsx index 0cd9d7376..bf0901035 100644 --- a/ui/js/component/fileCard/view.jsx +++ b/ui/js/component/fileCard/view.jsx @@ -23,14 +23,6 @@ class FileCard extends React.PureComponent { } } - componentWillUnmount() { - const { isResolvingUri, cancelResolveUri, uri } = this.props; - - if (isResolvingUri) { - cancelResolveUri(uri); - } - } - handleMouseOver() { this.setState({ hovered: true, diff --git a/ui/js/constants/action_types.js b/ui/js/constants/action_types.js index 3450c1c1a..e5432b1fb 100644 --- a/ui/js/constants/action_types.js +++ b/ui/js/constants/action_types.js @@ -39,7 +39,6 @@ export const FETCH_FEATURED_CONTENT_COMPLETED = "FETCH_FEATURED_CONTENT_COMPLETED"; export const RESOLVE_URI_STARTED = "RESOLVE_URI_STARTED"; export const RESOLVE_URI_COMPLETED = "RESOLVE_URI_COMPLETED"; -export const RESOLVE_URI_CANCELED = "RESOLVE_URI_CANCELED"; export const FETCH_CHANNEL_CLAIMS_STARTED = "FETCH_CHANNEL_CLAIMS_STARTED"; export const FETCH_CHANNEL_CLAIMS_COMPLETED = "FETCH_CHANNEL_CLAIMS_COMPLETED"; export const FETCH_CLAIM_LIST_MINE_STARTED = "FETCH_CLAIM_LIST_MINE_STARTED"; diff --git a/ui/js/reducers/claims.js b/ui/js/reducers/claims.js index 9cfa92bcb..a237947b6 100644 --- a/ui/js/reducers/claims.js +++ b/ui/js/reducers/claims.js @@ -26,15 +26,6 @@ reducers[types.RESOLVE_URI_COMPLETED] = function(state, action) { }); }; -reducers[types.RESOLVE_URI_CANCELED] = function(state, action) { - const uri = action.data.uri; - const newClaims = Object.assign({}, state.claimsByUri); - delete newClaims[uri]; - return Object.assign({}, state, { - claimsByUri: newClaims, - }); -}; - reducers[types.FETCH_CLAIM_LIST_MINE_STARTED] = function(state, action) { return Object.assign({}, state, { isClaimListMinePending: true, From cf532b4e98e95c7219e889a88a332ab691e82cc7 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Fri, 16 Jun 2017 12:43:43 +0700 Subject: [PATCH 28/30] Add a way for users to clear their own cache --- ui/js/actions/app.js | 8 ++++++++ ui/js/page/settings/index.js | 2 ++ ui/js/page/settings/view.jsx | 38 ++++++++++++++++++++++++++++++++++++ ui/js/store.js | 2 +- 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/ui/js/actions/app.js b/ui/js/actions/app.js index 8609e1e3d..d82c51606 100644 --- a/ui/js/actions/app.js +++ b/ui/js/actions/app.js @@ -243,3 +243,11 @@ export function doRemoveSnackBarSnack() { type: types.REMOVE_SNACKBAR_SNACK, }; } + +export function doClearCache() { + return function(dispatch, getState) { + window.cacheStore.purge(); + + return Promise.resolve(); + }; +} diff --git a/ui/js/page/settings/index.js b/ui/js/page/settings/index.js index 6b6096451..96fd8aec1 100644 --- a/ui/js/page/settings/index.js +++ b/ui/js/page/settings/index.js @@ -1,5 +1,6 @@ import React from "react"; import { connect } from "react-redux"; +import { doClearCache } from "actions/app"; import { doSetDaemonSetting } from "actions/settings"; import { selectDaemonSettings } from "selectors/settings"; import SettingsPage from "./view"; @@ -10,6 +11,7 @@ const select = state => ({ const perform = dispatch => ({ setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)), + clearCache: () => dispatch(doClearCache()), }); export default connect(select, perform)(SettingsPage); diff --git a/ui/js/page/settings/view.jsx b/ui/js/page/settings/view.jsx index e7987d1ac..9a7d15f6c 100644 --- a/ui/js/page/settings/view.jsx +++ b/ui/js/page/settings/view.jsx @@ -2,6 +2,9 @@ import React from "react"; import { FormField, FormRow } from "component/form.js"; import SubHeader from "component/subHeader"; import lbry from "lbry.js"; +import Link from "component/link"; + +const { remote } = require("electron"); class SettingsPage extends React.PureComponent { constructor(props) { @@ -15,9 +18,23 @@ class SettingsPage extends React.PureComponent { showNsfw: lbry.getClientSetting("showNsfw"), showUnavailable: lbry.getClientSetting("showUnavailable"), language: lbry.getClientSetting("language"), + clearingCache: false, }; } + clearCache() { + this.setState({ + clearingCache: true, + }); + const success = () => { + this.setState({ clearingCache: false }); + window.location.href = `${remote.app.getAppPath()}/dist/index.html`; + }; + const clear = () => this.props.clearCache().then(success.bind(this)); + + setTimeout(clear, 1000, { once: true }); + } + setDaemonSetting(name, value) { this.props.setDaemonSetting(name, value); } @@ -274,6 +291,27 @@ class SettingsPage extends React.PureComponent { />
+ +
+
+

{__("Application Cache")}

+
+
+

+ +

+
+
); } diff --git a/ui/js/store.js b/ui/js/store.js index 23796c99e..5f75449de 100644 --- a/ui/js/store.js +++ b/ui/js/store.js @@ -100,6 +100,6 @@ const persistOptions = { debounce: 1000, storage: localForage, }; -persistStore(reduxStore, persistOptions); +window.cacheStore = persistStore(reduxStore, persistOptions); export default reduxStore; From 320eb8d93ad347ddb77ec404d9a54954cfe4077c Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Sun, 18 Jun 2017 10:53:06 -0400 Subject: [PATCH 29/30] update changelog --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd4340c1b..f98234a7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,24 +8,24 @@ Web UI version numbers should always match the corresponding version of LBRY App ## [Unreleased] ### Added - * - * + * State is persisted through app close and re-open, resulting in faster opens ### Changed * Upgraded to lbry daemon 0.13, including updating API signatures * Channels resolve much faster + * Resolve is no longer cancelled on navigate ### Fixed * Fix help menu force reloading whole app - * + * Show page updates correctly when navigating from show page to another show page ### Deprecated * * ### Removed - * - * + * The author metadata field is no longer shown, in favor of first-class identities + * Availability is no longer checked before showing Download options, due to unreliability ## [0.12.0] - 2017-06-09 From ac067b78d1b2a9c767dd5cda57c9c995ecb51258 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Sun, 18 Jun 2017 10:53:17 -0400 Subject: [PATCH 30/30] =?UTF-8?q?Bump=20version:=200.12.2rc2=20=E2=86=92?= =?UTF-8?q?=200.12.2rc3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- app/package.json | 2 +- ui/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7e94950bc..1143fe2b5 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.12.2rc2 +current_version = 0.12.2rc3 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/app/package.json b/app/package.json index 898fc36e6..b9a7cd69f 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.12.2rc2", + "version": "0.12.2rc3", "main": "main.js", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "author": { diff --git a/ui/package.json b/ui/package.json index b7f011ffd..0eb8fa38e 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.12.2rc2", + "version": "0.12.2rc3", "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1",