diff --git a/app/browser/api/ledger.js b/app/browser/api/ledger.js index 98d9e8473f9..17f77245df6 100644 --- a/app/browser/api/ledger.js +++ b/app/browser/api/ledger.js @@ -1408,6 +1408,77 @@ const clientprep = () => { _internal.verboseP = ledgerClient.prototype.boolion(process.env.LEDGER_PUBLISHER_VERBOSE) } +/** + * This callback that we do it in roundtrips + * + * @callback roundtripCallback + * @param {Error|null} error - error when doing a request, null if no errors + * @param {object} response - response object that we get from request.request + * @param {any} payload - data that we get from the request + */ + +/** + * Round trip for fetching data (scrap data from html) inside window process + * @param {object} params - contains params from roundtrip + * @param {string} params.url - url of the site that we want to scrap + * @param {string} params.verboseP - tells us if we want to log the process or not + * @param {roundtripCallback} callback - The callback that handles the response + */ +const roundTripFromWindow = (params, callback) => { + if (!callback) { + return + } + + if (!params || !params.url) { + if (params && params.verboseP) { + console.log(`We are missing url. Params ${JSON.stringify(params)}`) + } + + callback(new Error('Url is missing')) + return + } + + request.fetchPublisherInfo(params.url, { + method: 'GET', + responseType: 'text', + headers: { + 'content-type': 'application/json; charset=utf-8' + } + }, (error, body) => { + if (error) { + if (params.verboseP) { + console.log(`roundTripFromWindow error: ${error.toString()}`) + } + return callback(error) + } + + if (params.verboseP) { + console.log(`roundTripFromWindow success: ${JSON.stringify(body)}`) + } + + return callback(null, null, body) + }) +} + +/** + * Round trip function for executing actions + * from the bat libraries (mostly server calls) + * @param {object} params - params that are directly tied to request.request + * @param {string} params.server - server url + * @param {string} params.method - HTTP method (GET, PUT, etc) + * @param {object} params.payload - payload that we want to send to the server + * @param {object} params.headers - HTTP headers + * @param {string} params.path - relative path to requested url + * @param {object} options + * @param {boolean} options.verboseP - tells us if we want to log the process or not + * @param {object} options.headers - headers that are used in the request.request + * @param {string} options.server - server url + * @param {boolean} options.binaryP - are we receiving binary payload back + * @param {boolean} options.rawP - are we receiving raw payload back + * @param {boolean} options.scrapeP - are we doping scraping + * @param {boolean} options.windowP - do we want to run this request in the window process + * @param {roundtripCallback} callback - The callback that handles the response + */ const roundtrip = (params, options, callback) => { let parts = typeof params.server === 'string' ? urlParse(params.server) : typeof params.server !== 'undefined' ? params.server @@ -1436,6 +1507,11 @@ const roundtrip = (params, options, callback) => { parts.pathname = parts.path } + if (options.windowP) { + roundTripFromWindow({url: urlFormat(parts), verboseP: options.verboseP}, callback) + return + } + options = { url: urlFormat(parts), method: params.method, @@ -2869,6 +2945,7 @@ const getMethods = () => { activityRoundTrip, pathName, onReferralInit, + roundTripFromWindow, onReferralCodeRead, onVerifiedPStatus } diff --git a/app/extensions.js b/app/extensions.js index 336ce451314..59e61707a75 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -38,7 +38,7 @@ let generateBraveManifest = () => { manifest_version: 2, version: '1.0', background: { - scripts: [ 'content/scripts/requestHandler.js', 'content/scripts/idleHandler.js' ], + scripts: [ 'content/scripts/metaScraper.js', 'content/scripts/requestHandler.js', 'content/scripts/idleHandler.js' ], persistent: true }, content_scripts: [ @@ -198,7 +198,7 @@ let generateBraveManifest = () => { 'style-src': '\'self\' \'unsafe-inline\'', 'font-src': '\'self\' data:', 'img-src': '* data: file://*', - 'connect-src': 'https://www.youtube.com https://www.twitch.tv', + 'connect-src': 'https://www.youtube.com', 'frame-src': '\'self\' https://brave.com' } diff --git a/app/extensions/brave/content/scripts/metaScraper.js b/app/extensions/brave/content/scripts/metaScraper.js new file mode 100644 index 00000000000..e8855b2ff04 --- /dev/null +++ b/app/extensions/brave/content/scripts/metaScraper.js @@ -0,0 +1,102 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + + // Main repository + // Version 3.9.2 +// https://github.com/microlinkhq/metascraper + +// Image +// https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-image + +// Author +// https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-author + +// Title +// https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-title + +// YouTube +// https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-youtube + +const metaScraperRules = { + // Rules + getImageRules: () => { + const wrap = rule => ({htmlDom,url}) => { + const value = rule(htmlDom) + return requestHandlerApi.isUrl(value) && requestHandlerApi.getUrl(url, value) + } + + return [ + // Youtube + ({htmlDom,url}) => { + const {id,service} = requestHandlerApi.getVideoId(url) + return service === 'youtube' && id && requestHandlerApi.getThumbnailUrl(id) + }, + // Regular + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[property="og:image:secure_url"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[property="og:image:url"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[property="og:image"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="twitter:image:src"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="twitter:image"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="sailthru.image.thumb"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="sailthru.image.full"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="sailthru.image"]'))), + wrap(html => requestHandlerApi.getValue(html.querySelectorAll('article img[src]'), requestHandlerApi.getSrc)), + wrap(html => requestHandlerApi.getValue(html.querySelectorAll('#content img[src]'), requestHandlerApi.getSrc)), + wrap(html => requestHandlerApi.getSrc(html.querySelector('img[alt*="author"]'))), + wrap(html => requestHandlerApi.getSrc(html.querySelector('img[src]'))) + ] + }, + + getTitleRules: () => { + const wrap = rule => ({htmlDom}) => { + const value = rule(htmlDom) + return requestHandlerApi.isString(value) && requestHandlerApi.titleize(value) + } + + return [ + // Regular + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[property="og:title"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="twitter:title"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="sailthru.title"]'))), + wrap(html => requestHandlerApi.getText(html.querySelector('.post-title'))), + wrap(html => requestHandlerApi.getText(html.querySelector('.entry-title'))), + wrap(html => requestHandlerApi.getText(html.querySelector('[itemtype="http://schema.org/BlogPosting"] [itemprop="name"]'))), + wrap(html => requestHandlerApi.getText(html.querySelector('h1[class*="title"] a'))), + wrap(html => requestHandlerApi.getText(html.querySelector('h1[class*="title"]'))), + wrap(html => requestHandlerApi.getText(html.querySelector('title'))) + ] + }, + + getAuthorRules: () => { + const wrap = rule => ({htmlDom}) => { + const value = rule(htmlDom) + + return requestHandlerApi.isString(value) && + !requestHandlerApi.isUrl(value, {relative: false}) && + requestHandlerApi.titleize(value, {removeBy: true}) + } + + return [ + // Youtube + wrap(html => requestHandlerApi.getText(html.querySelector('#owner-name'))), + wrap(html => requestHandlerApi.getText(html.querySelector('#channel-title'))), + wrap(html => requestHandlerApi.getValue(html.querySelectorAll('[class*="user-info"]'))), + // Regular + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[property="author"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[property="article:author"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="author"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[name="sailthru.author"]'))), + wrap(html => requestHandlerApi.getValue(html.querySelectorAll('[rel="author"]'))), + wrap(html => requestHandlerApi.getValue(html.querySelectorAll('[itemprop*="author"] [itemprop="name"]'))), + wrap(html => requestHandlerApi.getValue(html.querySelectorAll('[itemprop*="author"]'))), + wrap(html => requestHandlerApi.getContent(html.querySelector('meta[property="book:author"]'))), + requestHandlerApi.strict(wrap(html => requestHandlerApi.getValue(html.querySelectorAll('a[class*="author"]')))), + requestHandlerApi.strict(wrap(html => requestHandlerApi.getValue(html.querySelectorAll('[class*="author"] a')))), + requestHandlerApi.strict(wrap(html => requestHandlerApi.getValue(html.querySelectorAll('a[href*="/author/"]')))), + wrap(html => requestHandlerApi.getValue(html.querySelectorAll('a[class*="screenname"]'))), + requestHandlerApi.strict(wrap(html => requestHandlerApi.getValue(html.querySelectorAll('[class*="author"]')))), + requestHandlerApi.strict(wrap(html => requestHandlerApi.getValue(html.querySelectorAll('[class*="byline"]')))) + ] + } +} diff --git a/app/extensions/brave/content/scripts/requestHandler.js b/app/extensions/brave/content/scripts/requestHandler.js index c0d15eead26..16afec1ee48 100644 --- a/app/extensions/brave/content/scripts/requestHandler.js +++ b/app/extensions/brave/content/scripts/requestHandler.js @@ -1,7 +1,11 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + const ipc = chrome.ipcRenderer ipc.send('got-background-page-webcontents') -const parser = new DOMParser() +const domParser = new DOMParser() ipc.on('fetch-publisher-info', (e, url, options) => { let finalUrl = url @@ -9,19 +13,362 @@ ipc.on('fetch-publisher-info', (e, url, options) => { finalUrl = response.url return response.text() }).then((text) => { - const html = parser.parseFromString(text, 'text/html') - const image = html.querySelector('meta[property="og:image:secure_url"],meta[property="og:image:url"],meta[property="og:image"],meta[name="twitter:image:src"],meta[name="twitter:image"]').content - ipc.send('got-publisher-info-' + url, { - error: null, - url: finalUrl, - title: html.title, - image: (new URL(image, finalUrl)).href - }) + const html = domParser.parseFromString(text, 'text/html') + requestHandlerApi.getMetaData(html, url, finalUrl) }).catch((err) => { - console.log('fetch error', err) - ipc.send('got-publisher-info-' + url, { - url: finalUrl, - error: err.message - }) + requestHandlerApi.onError(err, url, finalUrl) }) }) + +const requestHandlerApi = { + onError: (err, url, finalUrl) => { + console.error('fetch error', err) + ipc.send(`got-publisher-info-${url}`, { + error: err.message, + body: { + url: finalUrl + } + }) + }, + + getMetaData: async (htmlDom, url, finalUrl) => { + try { + const result = { + image: await requestHandlerApi.getData({ htmlDom, finalUrl, conditions: metaScraperRules.getImageRules() }), + title: await requestHandlerApi.getData({ htmlDom, finalUrl, conditions: metaScraperRules.getTitleRules() }), + author: await requestHandlerApi.getData({ htmlDom, finalUrl, conditions: metaScraperRules.getAuthorRules() }) + } + + ipc.send(`got-publisher-info-${url}`, { + error: null, + body: { + url: finalUrl, + title: result.title || '', + image: result.image || '', + author: result.author || '' + } + }) + } catch (err) { + requestHandlerApi.onError(err, url, finalUrl) + } + }, + + // Basic logic + getData: async ({htmlDom,url,conditions}) => { + const size = conditions.length + let index = -1 + let value + + while (!value && index++ < size - 1) { + value = await conditions[index]({htmlDom,url}) + } + + return value + }, + + // Helpers + getText: (node) => { + if (!node) { + return '' + } + + const html = (node.outerHTML || new XMLSerializer().serializeToString(node)) || '' + return html.replace(/([\s\n]*<[^>]*>[\s\n]*)+/g, ' ') + }, + + urlCheck: (url) => { + try { + new URL(url) + return true + } catch (e) { + return false + } + }, + + getContent: (selector) => { + if (!selector) { + return null + } + + return selector.content + }, + + getSrc: (selector) => { + if (!selector) { + return null + } + + return selector.src + }, + + urlTest: (url, opts) => { + let relative + if (opts == null) { + relative = true + } else { + relative = opts.relative == null ? true : opts.relative + } + + return relative + ? requestHandlerApi.isAbsoluteUrl(url) === false || requestHandlerApi.urlCheck(url) + : requestHandlerApi.urlCheck(url) + }, + + isEmpty: (value) => { + return value == null || value.length === 0 + }, + + isUrl: (url, opts = {}) => { + return !requestHandlerApi.isEmpty(url) && requestHandlerApi.urlTest(url, opts) + }, + + getUrl: (baseUrl, relativePath = '') => { + return requestHandlerApi.isAbsoluteUrl(relativePath) === false + ? requestHandlerApi.resolveUrl(baseUrl, relativePath) + : relativePath + }, + + strict: rule => htmlDom => { + const value = rule(htmlDom) + return requestHandlerApi.isStrictString(value) + }, + + isStrictString: value => { + return /^\S+\s+\S+/.test(value) && value + }, + + titleize: (src, {removeBy = false} = {}) => { + if (!src) { + return '' + } + + let title = requestHandlerApi.createTitle(src) + if (removeBy) title = requestHandlerApi.removeByPrefix(title).trim() + return title + }, + + defaultFn: (el) => { + if (!el) { + return '' + } + + const text = requestHandlerApi.getText(el) || '' + return text.trim() + }, + + getValue: (collection, fn = requestHandlerApi.defaultFn) => { + if (!collection || !fn) { + return null + } + + if (!NodeList.prototype.isPrototypeOf(collection)) { + return fn(collection) + } + + for (const ele of collection) { + const value = fn(ele) + if (value) { + return value + } + } + + return null + }, + + getThumbnailUrl: (id) => { + if (id == null) { + return null + } + + return `https://img.youtube.com/vi/${id}/sddefault.jpg` + }, + + getVideoId: (str) => { + let metadata = {} + + if (typeof str !== 'string') { + return metadata + } + + // remove surrounding white spaces or line feeds + str = str.trim() + + // remove the '-nocookie' flag from youtube urls + str = str.replace('-nocookie', '') + + // remove any leading `www.` + str = str.replace('/www.', '/') + + if (/youtube|youtu\.be|i.ytimg\./.test(str)) { + metadata = { + id: requestHandlerApi.getYouTubeId(str), + service: 'youtube' + } + } + + return metadata + }, + + // https://github.com/radiovisual/get-video-id + getYouTubeId: (str) => { + if (str == null) { + return '' + } + + // short code + const shortCode = /youtube:\/\/|https?:\/\/youtu\.be\//g + if (shortCode.test(str)) { + const shortCodeId = str.split(shortCode)[1] + return requestHandlerApi.stripParameters(shortCodeId) + } + + // /v/ or /vi/ + const inlineV = /\/v\/|\/vi\//g + if (inlineV.test(str)) { + const inlineId = str.split(inlineV)[1] + return requestHandlerApi.stripParameters(inlineId) + } + + // v= or vi= + const parameterV = /v=|vi=/g + if (parameterV.test(str)) { + const arr = str.split(parameterV) + return arr[1].split('&')[0] + } + + // v= or vi= + const parameterWebP = /\/an_webp\//g + if (parameterWebP.test(str)) { + const webP = str.split(parameterWebP)[1] + return requestHandlerApi.stripParameters(webP) + } + + // embed + const embedReg = /\/embed\//g + if (embedReg.test(str)) { + const embedId = str.split(embedReg)[1] + return requestHandlerApi.stripParameters(embedId) + } + + // user + const userReg = /\/user\//g + if (userReg.test(str)) { + const elements = str.split('/') + return requestHandlerApi.stripParameters(elements.pop()) + } + + // attribution_link + const attrReg = /\/attribution_link\?.*v%3D([^%&]*)(%26|&|$)/ + if (attrReg.test(str)) { + return str.match(attrReg)[1] + } + }, + + stripParameters: (str) => { + if (str == null) { + return '' + } + + // Split parameters + if (str.includes('?')) { + return str.split('?')[0] + } + + // Split folder separator + if (str.includes('/')) { + return str.split('/')[0] + } + + return str + }, + + // https://github.com/kellym/smartquotesjs + getReplacements: () => { + return [ + // triple prime + [/'''/g, retainLength => '\u2034' + (retainLength ? '\u2063\u2063' : '')], + // beginning " + [/(\W|^)"(\w)/g, '$1\u201c$2'], + // ending " + [/(\u201c[^"]*)"([^"]*$|[^\u201c"]*\u201c)/g, '$1\u201d$2'], + // remaining " at end of word + [/([^0-9])"/g, '$1\u201d'], + // double prime as two single quotes + [/''/g, retainLength => '\u2033' + (retainLength ? '\u2063' : '')], + // beginning ' + [/(\W|^)'(\S)/g, '$1\u2018$2'], + // conjunction's possession + [/([a-z])'([a-z])/ig, '$1\u2019$2'], + // abbrev. years like '93 + [/(\u2018)([0-9]{2}[^\u2019]*)(\u2018([^0-9]|$)|$|\u2019[a-z])/ig, '\u2019$2$3'], + // ending ' + [/((\u2018[^']*)|[a-z])'([^0-9]|$)/ig, '$1\u2019$3'], + // backwards apostrophe + [/(\B|^)\u2018(?=([^\u2018\u2019]*\u2019\b)*([^\u2018\u2019]*\B\W[\u2018\u2019]\b|[^\u2018\u2019]*$))/ig, '$1\u2019'], + // double prime + [/"/g, '\u2033'], + // prime + [/'/g, '\u2032'] + ] + }, + + smartQuotes: (str) => { + const replacements = requestHandlerApi.getReplacements() + if (!replacements || !str) { + return '' + } + + replacements.forEach(replace => { + const replacement = typeof replace[1] === 'function' ? replace[1]({}) : replace[1] + str = str.replace(replace[0], replacement) + }) + + return str + }, + + removeByPrefix: (str = '') => { + if (str == null) { + return '' + } + + return str.replace(/^[\s\n]*by|@[\s\n]*/i, '').trim() + }, + + createTitle: (str = '') => { + if (str == null) { + return '' + } + + str = str.trim().replace(/\s{2,}/g, ' ') + return requestHandlerApi.smartQuotes(str) + }, + + // https://github.com/sindresorhus/is-absolute-url + isAbsoluteUrl: (url) => { + if (!requestHandlerApi.isString(url)) { + return + } + + return /^[a-z][a-z0-9+.-]*:/.test(url) + }, + + resolveUrl: (baseUrl, relativePath) => { + let url = baseUrl + + if (!relativePath) { + return url + } + + try { + url = new URL(relativePath, [baseUrl]) + } catch (e) {} + + return url + }, + + isString: (str) => { + return typeof str === 'string' + } +} + +if (module) module.exports = requestHandlerApi diff --git a/js/lib/request.js b/js/lib/request.js index c91e72a8ea5..af5cfba1cbc 100644 --- a/js/lib/request.js +++ b/js/lib/request.js @@ -103,14 +103,11 @@ module.exports.requestDataFile = (url, headers, path, reject, resolve) => { */ module.exports.fetchPublisherInfo = (url, options, callback) => { if (!backgroundPageWebContents) { - callback({ - url, - error: 'Background page web contents not initialized.' - }) + callback(new Error('Background page web contents not initialized.'), { url }) return } backgroundPageWebContents.send('fetch-publisher-info', url, options) ipc.once('got-publisher-info-' + url, (e, response) => { - callback(response) + callback(response.error, response.body) }) } diff --git a/package-lock.json b/package-lock.json index 7e266ad03fa..6a5fa895965 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,9 +40,9 @@ } }, "accepts": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", - "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "requires": { "mime-types": "2.1.18", "negotiator": "0.6.1" @@ -125,7 +125,7 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { "co": "4.6.0", - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -247,110 +247,14 @@ "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", "dev": true }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" - }, "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { - "micromatch": "2.3.11", + "micromatch": "3.1.9", "normalize-path": "2.1.1" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "1.1.0" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } - } } }, "aphrodite": { @@ -824,6 +728,13 @@ "private": "0.1.8", "slash": "1.0.0", "source-map": "0.5.7" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } } }, "babel-eslint": { @@ -851,6 +762,13 @@ "lodash": "4.17.5", "source-map": "0.5.7", "trim-right": "1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } } }, "babel-helper-builder-binary-assignment-operator-visitor": { @@ -1661,8 +1579,8 @@ "requires": { "@ambassify/backoff-strategies": "1.0.0", "bat-balance": "1.0.7", - "bat-publisher": "2.0.11", - "bitgo": "4.20.0", + "bat-publisher": "2.0.13", + "bitgo": "4.21.0", "brave-crypto": "0.0.1", "http-request-signature": "0.0.2", "joi": "13.1.2", @@ -1687,9 +1605,9 @@ } }, "bat-publisher": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/bat-publisher/-/bat-publisher-2.0.11.tgz", - "integrity": "sha512-zXYPS208qBOhzWaMPx5hkU96kZuPVgjhqigJy/MtMGavOuKIAW2RgzJES140PM2QHPwTfLsWS5zQhOotNbv65Q==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/bat-publisher/-/bat-publisher-2.0.13.tgz", + "integrity": "sha512-Ij4D+DtpIBv7glLH+FyS8asxILwgR+nkFsFL9G3NF8wS797dikzFQif6AlzvcXjeU1VVoSSQLrPIE+enmGxKAQ==", "requires": { "@ambassify/backoff-strategies": "1.0.0", "async": "2.6.0", @@ -1698,7 +1616,6 @@ "jimp": "0.2.28", "joi": "13.1.2", "jsdom": "11.2.0", - "metascraper": "1.0.7", "node-cache": "4.1.1", "parse-cache-control": "1.0.1", "random-lib": "2.1.0", @@ -1759,9 +1676,9 @@ "dev": true }, "bencode": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bencode/-/bencode-1.0.0.tgz", - "integrity": "sha512-N+VOSP5MkoX+xgnp6Y056iCY5TmCZg9rgPNPQe0bIiXchxYFP4vs/Tf0dTdQ+qQhP7HM2gvfFq+sUVjQsGy5Zw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bencode/-/bencode-2.0.0.tgz", + "integrity": "sha512-wr2HwwrUpfB5c68zmAudOltC7rZ1G0+lQOcnuEcfIM3AWAVnB3rHI3nlgd/2CWTfQ3w3zagKt89zni/M+VLZ8g==", "requires": { "safe-buffer": "5.1.1" } @@ -1895,9 +1812,9 @@ "integrity": "sha512-4xM4DYejOHQ/qWBfeqBXNA4mJ12PwcOibFYnH1kYh5U9BHciCqEJBqGNVnMJXUhm8mflujNRLSv7IiVQxovgjw==" }, "bitgo": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/bitgo/-/bitgo-4.20.0.tgz", - "integrity": "sha1-MCZM90atGOVlW+vJbl71pODttEc=", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/bitgo/-/bitgo-4.21.0.tgz", + "integrity": "sha1-cA7IjJS2xsNQ3PyF3RM6GIDYwCc=", "requires": { "argparse": "0.1.16", "assert": "0.4.9", @@ -1994,11 +1911,11 @@ } }, "bittorrent-dht": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/bittorrent-dht/-/bittorrent-dht-8.0.1.tgz", - "integrity": "sha512-YJnRF3Tz1HU4e/RqgeTTHX+33ro3PyJXFiiugP8+MnucjjrIhWrsKjRanxCogCOjYzBIeINAPaYt5/p6h4FVkQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/bittorrent-dht/-/bittorrent-dht-8.1.0.tgz", + "integrity": "sha512-Lm8iBOIjeVRz+28aKYANGeJzQLNDr49bWobde86vCcx2/DVKIao3lOWEnlzu0j39D8PHfGmO7L/ixMiCv1/CJQ==", "requires": { - "bencode": "1.0.0", + "bencode": "2.0.0", "buffer-equals": "1.0.4", "debug": "3.1.0", "inherits": "2.0.3", @@ -2028,11 +1945,11 @@ "integrity": "sha1-n2dWEvDmr8bvNFDfulH/cjir83E=" }, "bittorrent-protocol": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/bittorrent-protocol/-/bittorrent-protocol-2.3.0.tgz", - "integrity": "sha512-vUxGxaJ7boAE+JJkbnOT+gbRT0MwSUNE4G82fmgAPMsZjSHPxM1szutch9j5ugMc718ABCUa+epdfUP4HXnKtw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bittorrent-protocol/-/bittorrent-protocol-2.4.0.tgz", + "integrity": "sha512-q5ILfNwWpVLu1/+djBaDeDZBvJq0fXpKy2jchyfFZlyTqOG2snMd3jlpss4BVsklpjs8rbLPH/7N+SfvrsT3+g==", "requires": { - "bencode": "1.0.0", + "bencode": "2.0.0", "bitfield": "2.0.0", "debug": "3.1.0", "inherits": "2.0.3", @@ -2055,11 +1972,11 @@ } }, "bittorrent-tracker": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/bittorrent-tracker/-/bittorrent-tracker-9.5.0.tgz", - "integrity": "sha512-6zSPhd4eJmKVpd/OJIzeRgYTIDqU2Rqn8lcSdAe3O4SiARphs1UtcJ9J9Qv69sX2DT+A6EhFiP5C5yUDaJGMGA==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/bittorrent-tracker/-/bittorrent-tracker-9.6.0.tgz", + "integrity": "sha512-WEypMPSaVnfeWD1dEE83CqkykFjEzxmMPziHKuBEayaE3M9e1E/HYORrZ+29NoePB9ysiGHy7c8wMrtaoUfjcw==", "requires": { - "bencode": "1.0.0", + "bencode": "2.0.0", "bittorrent-peerid": "1.2.0", "bn.js": "4.11.8", "bufferutil": "3.0.3", @@ -2307,7 +2224,8 @@ "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true }, "boom": { "version": "4.3.1", @@ -2670,7 +2588,7 @@ "github-from-package": "0.0.0", "minimist": "1.2.0", "mkdirp": "0.5.1", - "node-abi": "2.2.0", + "node-abi": "2.3.0", "noop-logger": "0.1.1", "npmlog": "4.1.2", "os-homedir": "1.0.2", @@ -2737,12 +2655,6 @@ "ms": "2.0.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "source-map-support": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz", @@ -3012,23 +2924,23 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", "requires": { - "ansi-styles": "3.2.0", + "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "5.2.0" + "supports-color": "5.3.0" }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { "color-convert": "1.9.1" } }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "requires": { "has-flag": "3.0.0" } @@ -3041,108 +2953,56 @@ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" }, "cheerio": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.20.0.tgz", - "integrity": "sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU=", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "dev": true, "requires": { "css-select": "1.2.0", "dom-serializer": "0.1.0", "entities": "1.1.1", - "htmlparser2": "3.8.3", - "jsdom": "7.2.2", - "lodash": "4.17.5" - }, - "dependencies": { - "acorn": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", - "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=" - }, - "acorn-globals": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", - "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", - "optional": true, - "requires": { - "acorn": "2.7.0" - } - }, - "jsdom": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz", - "integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=", - "optional": true, - "requires": { - "abab": "1.0.4", - "acorn": "2.7.0", - "acorn-globals": "1.0.9", - "cssom": "0.3.2", - "cssstyle": "0.2.37", - "escodegen": "1.9.0", - "nwmatcher": "1.4.3", - "parse5": "1.5.1", - "request": "2.83.0", - "sax": "1.2.4", - "symbol-tree": "3.2.2", - "tough-cookie": "2.3.3", - "webidl-conversions": "2.0.1", - "whatwg-url-compat": "0.6.5", - "xml-name-validator": "2.0.1" - } - }, - "parse5": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", - "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=", - "optional": true - }, - "webidl-conversions": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz", - "integrity": "sha1-O/glj30xjHRDw28uFpQCoaZwNQY=", - "optional": true - } + "htmlparser2": "3.9.2", + "lodash.assignin": "4.2.0", + "lodash.bind": "4.2.1", + "lodash.defaults": "4.2.0", + "lodash.filter": "4.6.0", + "lodash.flatten": "4.4.0", + "lodash.foreach": "4.5.0", + "lodash.map": "4.6.0", + "lodash.merge": "4.6.1", + "lodash.pick": "4.4.0", + "lodash.reduce": "4.6.0", + "lodash.reject": "4.6.0", + "lodash.some": "4.6.0" } }, "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz", + "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==", "dev": true, "requires": { - "anymatch": "1.3.2", + "anymatch": "2.0.0", "async-each": "1.0.1", + "braces": "2.3.1", "fsevents": "1.1.3", - "glob-parent": "2.0.0", + "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", - "is-glob": "2.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "readdirp": "2.1.0", + "upath": "1.0.4" }, "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "2.0.1" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "2.1.1" } } } @@ -3184,14 +3044,6 @@ "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz", "integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU=" }, - "chrono-node": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/chrono-node/-/chrono-node-1.3.5.tgz", - "integrity": "sha1-oklSmKMtqCvMAa2b59d++l4kQSI=", - "requires": { - "moment": "2.20.1" - } - }, "chunk-store-stream": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/chunk-store-stream/-/chunk-store-stream-2.0.2.tgz", @@ -3406,9 +3258,9 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "co-mocha": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/co-mocha/-/co-mocha-1.2.1.tgz", - "integrity": "sha512-hlgDSWGXG1PuXiBTWUi+9ewhy0gII2hbNpS4lE0Esyr/eJlYx2xuIVV8ufEYxcBCzYOqiwcEZ7ck1CidWGNWkA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/co-mocha/-/co-mocha-1.2.2.tgz", + "integrity": "sha512-ocdJRn3sxonOqpdjSU2VwTwWzjTSoatzsTqCWiC3eGvJFNs8ZNMlZwfgYolQCdfddMz4muiZl99KIV9gKoNvxg==", "dev": true, "requires": { "co": "4.6.0", @@ -3572,7 +3424,7 @@ "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "dev": true, "requires": { - "accepts": "1.3.4", + "accepts": "1.3.5", "bytes": "3.0.0", "compressible": "2.0.13", "debug": "2.6.9", @@ -3587,9 +3439,9 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", "requires": { "inherits": "2.0.3", "readable-stream": "2.3.4", @@ -3788,11 +3640,11 @@ } }, "create-torrent": { - "version": "3.29.2", - "resolved": "https://registry.npmjs.org/create-torrent/-/create-torrent-3.29.2.tgz", - "integrity": "sha512-UG4yQZ9XiXXHAJdb0HI4If+GQg3PMRIpYoFYvMbgrL4vgjOpcPs7qQPBWqnxWul/gGGVdBk/n0Oa6XLV6xGONA==", + "version": "3.30.0", + "resolved": "https://registry.npmjs.org/create-torrent/-/create-torrent-3.30.0.tgz", + "integrity": "sha512-sTpbGpKKw/PaV7FHW6xhluPeAHe+hA+j4BIp8QY5abHxco45TCk08H5Joiv7lDAjP9YhSw6jWnJzJwJc6sILSw==", "requires": { - "bencode": "1.0.0", + "bencode": "2.0.0", "block-stream2": "1.1.0", "filestream": "4.1.3", "flatten": "1.0.2", @@ -3981,11 +3833,24 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, "requires": { "boolbase": "1.0.0", "css-what": "2.1.0", "domutils": "1.5.1", "nth-check": "1.0.1" + }, + "dependencies": { + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + } } }, "css-selector-tokenizer": { @@ -4021,7 +3886,8 @@ "css-what": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", - "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true }, "cssesc": { "version": "0.1.0", @@ -4077,6 +3943,14 @@ "requires": { "clap": "1.2.3", "source-map": "0.5.7" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, "cssom": { @@ -4214,7 +4088,7 @@ "dev": true, "requires": { "buffer-to-vinyl": "1.1.0", - "concat-stream": "1.6.0", + "concat-stream": "1.6.1", "decompress-tar": "3.1.0", "decompress-tarbz2": "3.1.0", "decompress-targz": "3.1.0", @@ -4437,7 +4311,7 @@ "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", "dev": true, "requires": { - "duplexify": "3.5.3", + "duplexify": "3.5.4", "glob-stream": "5.3.5", "graceful-fs": "4.1.11", "gulp-sourcemaps": "1.6.0", @@ -4774,7 +4648,7 @@ "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", "requires": { "ast-types": "0.11.2", - "escodegen": "1.9.0", + "escodegen": "1.9.1", "esprima": "3.1.3" } }, @@ -5000,17 +4874,17 @@ "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" }, "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", + "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", "requires": { "domelementtype": "1.3.0" } }, "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "requires": { "dom-serializer": "0.1.0", "domelementtype": "1.3.0" @@ -5098,9 +4972,9 @@ "dev": true }, "duplexify": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.3.tgz", - "integrity": "sha512-g8ID9OroF9hKt2POf8YLayy+9594PzmM3scI00/uBXocX3TWNgoB67hjzkFe9ITAbQOne/lLdBxHXvYUM4ZgGA==", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", "dev": true, "requires": { "end-of-stream": "1.4.1", @@ -5785,48 +5659,8 @@ "object.assign": "4.1.0", "object.entries": "1.0.4", "object.values": "1.0.4", - "prop-types": "15.6.0", + "prop-types": "15.6.1", "uuid": "3.1.0" - }, - "dependencies": { - "cheerio": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", - "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", - "dev": true, - "requires": { - "css-select": "1.2.0", - "dom-serializer": "0.1.0", - "entities": "1.1.1", - "htmlparser2": "3.9.2", - "lodash.assignin": "4.2.0", - "lodash.bind": "4.2.1", - "lodash.defaults": "4.2.0", - "lodash.filter": "4.6.0", - "lodash.flatten": "4.4.0", - "lodash.foreach": "4.5.0", - "lodash.map": "4.6.0", - "lodash.merge": "4.6.1", - "lodash.pick": "4.4.0", - "lodash.reduce": "4.6.0", - "lodash.reject": "4.6.0", - "lodash.some": "4.6.0" - } - }, - "htmlparser2": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", - "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", - "dev": true, - "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.3.0", - "domutils": "1.5.1", - "entities": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.4" - } - } } }, "eol": { @@ -5970,26 +5804,21 @@ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, - "escape-regexp-component": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/escape-regexp-component/-/escape-regexp-component-1.0.2.tgz", - "integrity": "sha1-nGO20LJf8qiMOtvRjFthrMO5+qI=" - }, "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=" }, "escodegen": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", - "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", + "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", "requires": { "esprima": "3.1.3", "estraverse": "4.2.0", "esutils": "2.0.2", "optionator": "0.8.2", - "source-map": "0.5.7" + "source-map": "0.6.1" } }, "escope": { @@ -6000,7 +5829,7 @@ "requires": { "es6-map": "0.1.5", "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", + "esrecurse": "4.2.1", "estraverse": "4.2.0" } }, @@ -6012,7 +5841,7 @@ "ajv": "5.5.2", "babel-code-frame": "6.26.0", "chalk": "2.3.1", - "concat-stream": "1.6.0", + "concat-stream": "1.6.1", "cross-spawn": "5.1.0", "debug": "3.1.0", "doctrine": "2.1.0", @@ -6236,7 +6065,7 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "requires": { - "esrecurse": "4.2.0", + "esrecurse": "4.2.1", "estraverse": "4.2.0" } }, @@ -6250,14 +6079,14 @@ "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.3.tgz", "integrity": "sha512-Zy3tAJDORxQZLl2baguiRU1syPERAIg0L+JB2MWorORgTu/CplzvxS9WWA7Xh4+Q+eOQihNs/1o1Xep8cvCxWQ==", "requires": { - "acorn": "5.4.1", + "acorn": "5.5.0", "acorn-jsx": "3.0.1" }, "dependencies": { "acorn": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", - "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==" + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", + "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==" } } }, @@ -6275,12 +6104,11 @@ } }, "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "requires": { - "estraverse": "4.2.0", - "object-assign": "4.1.1" + "estraverse": "4.2.0" } }, "estraverse": { @@ -6548,7 +6376,7 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", "integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=", "requires": { - "accepts": "1.3.4", + "accepts": "1.3.5", "array-flatten": "1.1.1", "body-parser": "1.18.2", "content-disposition": "0.5.2", @@ -6676,6 +6504,17 @@ "yauzl": "2.4.1" }, "dependencies": { + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.4", + "typedarray": "0.0.6" + } + }, "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", @@ -6710,9 +6549,9 @@ } }, "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" }, "fast-future": { "version": "1.0.2", @@ -9345,43 +9184,16 @@ "dev": true }, "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.3.0", - "domutils": "1.5.1", - "entities": "1.0.0", - "readable-stream": "1.1.14" - }, - "dependencies": { - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=" - }, - "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.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } + "domelementtype": "1.3.0", + "domhandler": "2.4.1", + "domutils": "1.7.0", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.4" } }, "http-deceiver": { @@ -9640,19 +9452,13 @@ "requires": { "chalk": "2.3.1", "source-map": "0.6.1", - "supports-color": "5.2.0" + "supports-color": "5.3.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -10068,11 +9874,6 @@ "is-path-inside": "1.0.1" } }, - "is-isodate": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/is-isodate/-/is-isodate-0.0.1.tgz", - "integrity": "sha1-T+LpN9UPO6aMe2mwIYAItiSqUDY=" - }, "is-my-ip-valid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", @@ -10287,11 +10088,6 @@ "unc-path-regex": "0.1.2" } }, - "is-url": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.2.tgz", - "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=" - }, "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", @@ -10503,6 +10299,12 @@ "requires": { "glob": "7.1.2" } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true } } }, @@ -10685,7 +10487,7 @@ "content-type-parser": "1.0.2", "cssom": "0.3.2", "cssstyle": "0.2.37", - "escodegen": "1.9.0", + "escodegen": "1.9.1", "html-encoding-sniffer": "1.0.2", "nwmatcher": "1.4.3", "parse5": "3.0.3", @@ -10694,7 +10496,7 @@ "request-promise-native": "1.0.5", "sax": "1.2.4", "symbol-tree": "3.2.2", - "tough-cookie": "2.3.3", + "tough-cookie": "2.3.4", "webidl-conversions": "4.0.2", "whatwg-encoding": "1.0.3", "whatwg-url": "6.4.0", @@ -10833,17 +10635,17 @@ "requires": { "buffer-equals": "1.0.4", "k-bucket": "3.3.1", - "k-rpc-socket": "1.7.2", + "k-rpc-socket": "1.8.0", "randombytes": "2.0.6", "safe-buffer": "5.1.1" } }, "k-rpc-socket": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/k-rpc-socket/-/k-rpc-socket-1.7.2.tgz", - "integrity": "sha512-g1FH/9Ahiy9iAfH/fwqpoaD6KgpgKRdzG++1hEuH6Lg9epAgYwG2ca37CMDgIIegyju0Ct8GO1eVaBCkAcbABQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/k-rpc-socket/-/k-rpc-socket-1.8.0.tgz", + "integrity": "sha512-f/9TynsO8YYjZ6JjNNtSSH7CJcIHcio1buy3zqByGxb/GX8AWLdL6FZEWTrN8V3/J7W4/E0ZTQQ+Jt2rVq7ELg==", "requires": { - "bencode": "1.0.0", + "bencode": "2.0.0", "buffer-equals": "1.0.4", "safe-buffer": "5.1.1" } @@ -11097,7 +10899,7 @@ "qs": "6.4.0", "safe-buffer": "5.1.1", "stringstream": "0.0.5", - "tough-cookie": "2.3.3", + "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", "uuid": "3.1.0" } @@ -11111,6 +10913,13 @@ "requires": { "hoek": "2.16.3" } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true } } }, @@ -11449,12 +11258,6 @@ "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", "dev": true }, - "lodash.endswith": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.endswith/-/lodash.endswith-4.2.1.tgz", - "integrity": "sha1-/tWawXOO0+I27dcGTsRWRIs3vAk=", - "dev": true - }, "lodash.escape": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", @@ -11506,18 +11309,6 @@ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, - "lodash.isfunction": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", - "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", - "dev": true - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", - "dev": true - }, "lodash.keys": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", @@ -11582,12 +11373,6 @@ "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" }, - "lodash.startswith": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.startswith/-/lodash.startswith-4.2.1.tgz", - "integrity": "sha1-xZjErc4YiiflMUVzHNxsDnF3YAw=", - "dev": true - }, "lodash.template": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", @@ -11708,19 +11493,6 @@ } } }, - "make-error": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", - "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==" - }, - "make-error-cause": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", - "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", - "requires": { - "make-error": "1.3.4" - } - }, "make-iterator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.0.tgz", @@ -11864,19 +11636,6 @@ "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz", "integrity": "sha1-grjbrnXieneFOItz+ddyXQ9vMyY=" }, - "metascraper": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/metascraper/-/metascraper-1.0.7.tgz", - "integrity": "sha512-UPGR9eGM4u6iS3oWNS/KQoHrfINz8N33a1astWECiLz9st6e1PUc7+sGyHvQuzXDzYvc+Qu0/TrzOWUNuw+Fcg==", - "requires": { - "cheerio": "0.20.0", - "chrono-node": "1.3.5", - "is-isodate": "0.0.1", - "is-url": "1.2.2", - "popsicle": "6.2.2", - "to-title-case": "1.0.0" - } - }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -11978,8 +11737,8 @@ "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "dev": true, "requires": { - "concat-stream": "1.6.0", - "duplexify": "3.5.3", + "concat-stream": "1.6.1", + "duplexify": "3.5.4", "end-of-stream": "1.4.1", "flush-write-stream": "1.0.2", "from2": "2.3.0", @@ -12417,6 +12176,12 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, + "neo-async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.0.tgz", + "integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==", + "dev": true + }, "netmask": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", @@ -12437,9 +12202,9 @@ } }, "node-abi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.2.0.tgz", - "integrity": "sha512-FqVC0WNNL8fQWQK3GYTESfwZXZKDbSIiEEIvufq7HV6Lj0IDDZRVa4CU/KTA0JVlqY9eTDSuPiC8FS9UfGVuzA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.3.0.tgz", + "integrity": "sha512-zwm6vU3SsVgw3e9fu48JBaRBCJGIvAgysDsqtf5+vEexFE71bEOtaMWb5zr/zODZNzTPtQlqUUpC79k68Hspow==", "requires": { "semver": "5.5.0" } @@ -12621,7 +12386,7 @@ "hosted-git-info": "2.5.0", "is-builtin-module": "1.0.0", "semver": "5.5.0", - "validate-npm-package-license": "3.0.1" + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -12866,6 +12631,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, "requires": { "boolbase": "1.0.0" } @@ -13520,16 +13286,16 @@ "blob-to-buffer": "1.2.7", "get-stdin": "5.0.1", "magnet-uri": "5.1.7", - "parse-torrent-file": "4.0.3", + "parse-torrent-file": "4.1.0", "simple-get": "2.7.0" } }, "parse-torrent-file": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/parse-torrent-file/-/parse-torrent-file-4.0.3.tgz", - "integrity": "sha512-Ob1IK1FC165T6dslPBdgxfbQIZI1+QE0sqOfoB+YS/XfDda2Xa2xDZmE0vcGD4ei5Lw6FQYNhsHX9RzZzHwFtQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/parse-torrent-file/-/parse-torrent-file-4.1.0.tgz", + "integrity": "sha512-Bd6yLjRgkl0dfMi7/x9hJDL1eaAnmhFD3JoCLTuIjR+CM9gr55YMHNo+hTbObYjoj2SPWIUAelZMQ5IbpmzbmQ==", "requires": { - "bencode": "1.0.0", + "bencode": "2.0.0", "simple-sha1": "2.1.0", "uniq": "1.0.1" } @@ -13815,64 +13581,6 @@ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.3.2.tgz", "integrity": "sha512-bVNd3LMXRzdo6s4ehr4XW2wFMu9cb40nPgHEjSSppm8/++Xc+g0b2QQb+SeDesgfANXbjydOr1or9YQ+pcCZPQ==" }, - "popsicle": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/popsicle/-/popsicle-6.2.2.tgz", - "integrity": "sha1-4nPIvUgYH3OlmxmeKl4ltpKz4jc=", - "requires": { - "any-promise": "1.3.0", - "arrify": "1.0.1", - "concat-stream": "1.6.0", - "form-data": "0.2.0", - "make-error-cause": "1.2.2", - "throwback": "1.1.1", - "tough-cookie": "2.3.3", - "xtend": "4.0.1" - }, - "dependencies": { - "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" - }, - "combined-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", - "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=", - "requires": { - "delayed-stream": "0.0.5" - } - }, - "delayed-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", - "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=" - }, - "form-data": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", - "integrity": "sha1-Jvi8JtpkQOKZy9z7aQNcT3em5GY=", - "requires": { - "async": "0.9.2", - "combined-stream": "0.0.7", - "mime-types": "2.0.14" - } - }, - "mime-db": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", - "integrity": "sha1-PQxjGA9FjrENMlqqN9fFiuMS6dc=" - }, - "mime-types": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", - "integrity": "sha1-MQ4VnbI+B3+Lsit0jav6SVcUCqY=", - "requires": { - "mime-db": "1.12.0" - } - } - } - }, "portfinder": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", @@ -13937,6 +13645,12 @@ "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", @@ -14243,19 +13957,13 @@ "requires": { "chalk": "2.3.1", "source-map": "0.6.1", - "supports-color": "5.2.0" + "supports-color": "5.3.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -14281,19 +13989,13 @@ "requires": { "chalk": "2.3.1", "source-map": "0.6.1", - "supports-color": "5.2.0" + "supports-color": "5.3.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -14319,19 +14021,13 @@ "requires": { "chalk": "2.3.1", "source-map": "0.6.1", - "supports-color": "5.2.0" + "supports-color": "5.3.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -14357,19 +14053,13 @@ "requires": { "chalk": "2.3.1", "source-map": "0.6.1", - "supports-color": "5.2.0" + "supports-color": "5.3.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -14565,14 +14255,14 @@ "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", "dev": true, "requires": { - "lru-cache": "4.1.1", + "lru-cache": "4.1.2", "which": "1.2.14" } }, "lru-cache": { - "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==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", "dev": true, "requires": { "pseudomap": "1.0.2", @@ -14617,7 +14307,7 @@ "github-from-package": "0.0.0", "minimist": "1.2.0", "mkdirp": "0.5.1", - "node-abi": "2.2.0", + "node-abi": "2.3.0", "noop-logger": "0.1.1", "npmlog": "4.1.2", "os-homedir": "1.0.2", @@ -14771,9 +14461,9 @@ "dev": true }, "prop-types": { - "version": "15.6.0", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz", - "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz", + "integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==", "requires": { "fbjs": "0.8.16", "loose-envify": "1.3.1", @@ -14932,7 +14622,7 @@ "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", "dev": true, "requires": { - "duplexify": "3.5.3", + "duplexify": "3.5.4", "inherits": "2.0.3", "pump": "2.0.1" } @@ -15110,7 +14800,7 @@ "fbjs": "0.8.16", "loose-envify": "1.3.1", "object-assign": "4.1.1", - "prop-types": "15.6.0" + "prop-types": "15.6.1" } }, "react-addons-perf": { @@ -15139,7 +14829,7 @@ "hoist-non-react-statics": "2.5.0", "invariant": "2.2.3", "lodash": "4.17.5", - "prop-types": "15.6.0" + "prop-types": "15.6.1" } }, "react-dnd-html5-backend": { @@ -15158,7 +14848,7 @@ "fbjs": "0.8.16", "loose-envify": "1.3.1", "object-assign": "4.1.1", - "prop-types": "15.6.0" + "prop-types": "15.6.1" } }, "react-input-autosize": { @@ -15194,7 +14884,7 @@ "classnames": "2.2.5", "dom-helpers": "3.3.1", "loose-envify": "1.3.1", - "prop-types": "15.6.0", + "prop-types": "15.6.1", "warning": "3.0.0" } }, @@ -15573,7 +15263,7 @@ "qs": "6.5.1", "safe-buffer": "5.1.1", "stringstream": "0.0.5", - "tough-cookie": "2.3.3", + "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", "uuid": "3.1.0" }, @@ -15600,7 +15290,7 @@ "requires": { "request-promise-core": "1.1.1", "stealthy-require": "1.1.1", - "tough-cookie": "2.3.3" + "tough-cookie": "2.3.4" } }, "require-directory": { @@ -15878,9 +15568,9 @@ "integrity": "sha1-iac93F51ye+KtjIMChYA1qQRebk=" }, "rusha": { - "version": "0.8.12", - "resolved": "https://registry.npmjs.org/rusha/-/rusha-0.8.12.tgz", - "integrity": "sha1-XYOM4fzosUVnTudx6q1byyV15ks=" + "version": "0.8.13", + "resolved": "https://registry.npmjs.org/rusha/-/rusha-0.8.13.tgz", + "integrity": "sha1-mghOe4YLF7/zAVuSxnpqM2GRUTo=" }, "rx": { "version": "4.1.0", @@ -15944,21 +15634,6 @@ "htmlparser2": "3.9.2", "regexp-quote": "0.0.0", "xtend": "4.0.1" - }, - "dependencies": { - "htmlparser2": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", - "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", - "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.3.0", - "domutils": "1.5.1", - "entities": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.4" - } - } } }, "sax": { @@ -16093,7 +15768,7 @@ "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", "dev": true, "requires": { - "accepts": "1.3.4", + "accepts": "1.3.5", "batch": "0.6.1", "debug": "2.6.9", "escape-html": "1.0.3", @@ -16267,7 +15942,7 @@ "resolved": "https://registry.npmjs.org/simple-sha1/-/simple-sha1-2.1.0.tgz", "integrity": "sha1-lCe7lv8SY8wQqEFM7dUaGLkZ6LM=", "requires": { - "rusha": "0.8.12" + "rusha": "0.8.13" } }, "simple-websocket": { @@ -16438,6 +16113,12 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true } } }, @@ -16484,28 +16165,30 @@ } }, "snazzy": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/snazzy/-/snazzy-7.0.0.tgz", - "integrity": "sha1-le2szEqNb4D0rFzHtSDo+PmsIyU=", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/snazzy/-/snazzy-7.1.1.tgz", + "integrity": "sha512-gJ46s+jcwOeRhO9uEkTyzcREFZ0c5LZOgcVakLxTPIvhRIywKvbvArvMg5e8bBbpWe4InC/8eyEQOGXgJVNOfw==", "requires": { - "chalk": "1.1.3", + "chalk": "2.3.1", "inherits": "2.0.3", "minimist": "1.2.0", "readable-stream": "2.3.4", "standard-json": "1.0.2", + "strip-ansi": "4.0.0", "text-table": "0.2.0" }, "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-regex": "3.0.0" } } } @@ -16604,9 +16287,9 @@ "dev": true }, "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-resolve": { "version": "0.5.1", @@ -16627,6 +16310,13 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { "source-map": "0.5.7" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } } }, "source-map-url": { @@ -16647,27 +16337,37 @@ "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", "dev": true, "requires": { - "concat-stream": "1.6.0", + "concat-stream": "1.6.1", "os-shim": "0.1.3" } }, "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "requires": { - "spdx-license-ids": "1.2.2" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" + }, "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } }, "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" }, "spdy": { "version": "3.4.7", @@ -16859,7 +16559,7 @@ "requires": { "babel-code-frame": "6.26.0", "chalk": "1.1.3", - "concat-stream": "1.6.0", + "concat-stream": "1.6.1", "debug": "2.6.9", "doctrine": "2.1.0", "escope": "3.6.0", @@ -17074,7 +16774,7 @@ "resolved": "https://registry.npmjs.org/standard-json/-/standard-json-1.0.2.tgz", "integrity": "sha1-gt6koUx4zZ4104zeS4isa2JZaiM=", "requires": { - "concat-stream": "1.6.0" + "concat-stream": "1.6.1" } }, "stat-mode": { @@ -17585,7 +17285,7 @@ "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "requires": { - "ajv": "6.1.1", + "ajv": "6.2.0", "ajv-keywords": "3.1.0", "chalk": "2.3.1", "lodash": "4.17.5", @@ -17594,11 +17294,11 @@ }, "dependencies": { "ajv": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.1.1.tgz", - "integrity": "sha1-l41Zf7wrfQ5aXD3esUmmgvKr+g4=", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", "requires": { - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -17798,14 +17498,6 @@ } } }, - "throwback": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/throwback/-/throwback-1.1.1.tgz", - "integrity": "sha1-8AfnwXYEptFtegfEGqDo/txhhKQ=", - "requires": { - "any-promise": "1.3.0" - } - }, "thunkify": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", @@ -17851,11 +17543,6 @@ "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" }, - "title-case-minors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/title-case-minors/-/title-case-minors-1.0.0.tgz", - "integrity": "sha1-UfFwN8KUdHodHNpCS1AEyG2OsRU=" - }, "tldjs": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tldjs/-/tldjs-2.3.1.tgz", @@ -17904,14 +17591,6 @@ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" }, - "to-capital-case": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-capital-case/-/to-capital-case-1.0.0.tgz", - "integrity": "sha1-pXxQFP1aNyF88FCZ/4pCG7+cm38=", - "requires": { - "to-space-case": "1.0.0" - } - }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", @@ -17923,11 +17602,6 @@ "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=", "dev": true }, - "to-no-case": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", - "integrity": "sha1-xyKQcWTvaxeBMsjmmTAhLRtKoWo=" - }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -17970,33 +17644,6 @@ "repeat-string": "1.6.1" } }, - "to-sentence-case": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-sentence-case/-/to-sentence-case-1.0.0.tgz", - "integrity": "sha1-xIO/NkdzflxzjvcAb+Ng1fmcVy4=", - "requires": { - "to-no-case": "1.0.2" - } - }, - "to-space-case": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-1.0.0.tgz", - "integrity": "sha1-sFLar7Gysp3HcM6gFj5ewOvJ/Bc=", - "requires": { - "to-no-case": "1.0.2" - } - }, - "to-title-case": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-title-case/-/to-title-case-1.0.0.tgz", - "integrity": "sha1-rKiPidYGTeUBCKl86g20SCfoAGE=", - "requires": { - "escape-regexp-component": "1.0.2", - "title-case-minors": "1.0.0", - "to-capital-case": "1.0.0", - "to-sentence-case": "1.0.0" - } - }, "topo": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.0.tgz", @@ -18010,8 +17657,8 @@ "resolved": "https://registry.npmjs.org/torrent-discovery/-/torrent-discovery-8.4.0.tgz", "integrity": "sha512-UzlkS9UBynp1HdkuNjFfRIKVLG/TyEiKQGkvHDiBV2pzyD0mpB+vn15iqDuNkNXX6qF0OwBVe1eU/PyvI14I0w==", "requires": { - "bittorrent-dht": "8.0.1", - "bittorrent-tracker": "9.5.0", + "bittorrent-dht": "8.1.0", + "bittorrent-tracker": "9.6.0", "debug": "3.1.0", "inherits": "2.0.3", "run-parallel": "1.1.7", @@ -18052,9 +17699,9 @@ } }, "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { "punycode": "1.4.1" }, @@ -18198,6 +17845,12 @@ "wordwrap": "0.0.2" } }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", @@ -18244,16 +17897,16 @@ "source-map": "0.6.1", "uglify-es": "3.3.9", "webpack-sources": "1.1.0", - "worker-farm": "1.5.2" + "worker-farm": "1.5.4" }, "dependencies": { "ajv": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.1.1.tgz", - "integrity": "sha1-l41Zf7wrfQ5aXD3esUmmgvKr+g4=", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", "dev": true, "requires": { - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -18270,16 +17923,10 @@ "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "dev": true, "requires": { - "ajv": "6.1.1", + "ajv": "6.2.0", "ajv-keywords": "3.1.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "uglify-es": { "version": "3.3.9", "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", @@ -18473,16 +18120,10 @@ "optional": true }, "upath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.2.tgz", - "integrity": "sha512-fCmij7T5LnwUme3dbnVSejvOHHlARjB3ikJFwgZfz386pHmf/gueuTLRFU94FZEaeCLlbQrweiUU700gG41tUw==", - "dev": true, - "requires": { - "lodash.endswith": "4.2.1", - "lodash.isfunction": "3.0.9", - "lodash.isstring": "4.0.1", - "lodash.startswith": "4.2.1" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", + "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==", + "dev": true }, "update-notifier": { "version": "2.3.0", @@ -18662,11 +18303,11 @@ "dev": true }, "ut_metadata": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ut_metadata/-/ut_metadata-3.1.0.tgz", - "integrity": "sha512-nfT/jrEup+ksmbKb4CccRd7ytralrL3CenChMp318bQrjfVhITIUmvhwgJXrHOZnKEtBVVL9M+doNmM6IrGnZg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ut_metadata/-/ut_metadata-3.2.0.tgz", + "integrity": "sha512-EfEV2pPUYCBDSLb1ZO5e+XloK2npOJKb3adc7Oxc4nZyPpB5Ke7SSdLk1TVlsc6LJG1KCP9ARQ1WrwmLdgGF2A==", "requires": { - "bencode": "1.0.0", + "bencode": "2.0.0", "bitfield": "2.0.0", "debug": "3.1.0", "inherits": "2.0.3", @@ -18685,11 +18326,11 @@ } }, "ut_pex": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/ut_pex/-/ut_pex-1.1.6.tgz", - "integrity": "sha512-cgIQHCp7FSGFmuD8qzDL0cSBT0rnImYwxWkCzpfhgCc6XMKqmZdNT8+fgw4U0Fbba/Az/q8uZR2loR8EymFmLg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ut_pex/-/ut_pex-1.2.0.tgz", + "integrity": "sha512-ICiTfNctYEW7k70OYtRA5cqg1hwOKIRiC903CIJDLZQM0afPV0drf8c4LHFSaDuNZTyZeC5P5EjGLOTfWQIn1g==", "requires": { - "bencode": "1.0.0", + "bencode": "2.0.0", "compact2string": "1.4.0", "inherits": "2.0.3", "string2compact": "1.2.2" @@ -18752,12 +18393,12 @@ "dev": true }, "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "validator": { @@ -18941,14 +18582,14 @@ } }, "watchpack": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz", - "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", + "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", "dev": true, "requires": { - "async": "2.6.0", - "chokidar": "1.7.0", - "graceful-fs": "4.1.11" + "chokidar": "2.0.2", + "graceful-fs": "4.1.11", + "neo-async": "2.5.0" } }, "wbuf": { @@ -19243,7 +18884,7 @@ "qs": "6.4.0", "safe-buffer": "5.0.1", "stringstream": "0.0.5", - "tough-cookie": "2.3.3", + "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", "uuid": "3.1.0" } @@ -19306,9 +18947,9 @@ "integrity": "sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg==", "dev": true, "requires": { - "acorn": "5.4.1", + "acorn": "5.5.0", "acorn-dynamic-import": "2.0.2", - "ajv": "6.1.1", + "ajv": "6.2.0", "ajv-keywords": "3.1.0", "async": "2.6.0", "enhanced-resolve": "3.4.1", @@ -19325,24 +18966,24 @@ "supports-color": "4.5.0", "tapable": "0.2.8", "uglifyjs-webpack-plugin": "0.4.6", - "watchpack": "1.4.0", + "watchpack": "1.5.0", "webpack-sources": "1.1.0", "yargs": "8.0.2" }, "dependencies": { "acorn": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", - "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", + "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==", "dev": true }, "ajv": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.1.1.tgz", - "integrity": "sha1-l41Zf7wrfQ5aXD3esUmmgvKr+g4=", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", "dev": true, "requires": { - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -19424,6 +19065,12 @@ "read-pkg": "2.0.0" } }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -19529,9 +19176,9 @@ } }, "webpack-dev-server": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.1.tgz", - "integrity": "sha512-ombhu5KsO/85sVshIDTyQ5HF3xjZR3N0sf5Ao6h3vFwpNyzInEzA1GV3QPVjTMLTNckp8PjfG1PFGznzBwS5lg==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.2.tgz", + "integrity": "sha512-zrPoX97bx47vZiAXfDrkw8pe9QjJ+lunQl3dypojyWwWr1M5I2h0VSrMPfTjopHQPRNn+NqfjcMmhoLcUJe2gA==", "dev": true, "requires": { "ansi-html": "0.0.7", @@ -19558,47 +19205,17 @@ "sockjs-client": "1.1.4", "spdy": "3.4.7", "strip-ansi": "3.0.1", - "supports-color": "5.2.0", + "supports-color": "5.3.0", "webpack-dev-middleware": "1.12.2", "yargs": "6.6.0" }, "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "3.1.9", - "normalize-path": "2.1.1" - } - }, "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true }, - "chokidar": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz", - "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==", - "dev": true, - "requires": { - "anymatch": "2.0.0", - "async-each": "1.0.1", - "braces": "2.3.1", - "fsevents": "1.1.3", - "glob-parent": "3.1.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "4.0.0", - "normalize-path": "2.1.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0", - "upath": "1.0.2" - } - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -19643,15 +19260,6 @@ } } }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "2.1.1" - } - }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -19659,9 +19267,9 @@ "dev": true }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -19718,14 +19326,6 @@ "requires": { "source-list-map": "2.0.0", "source-map": "0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, "websocket-driver": { @@ -19751,10 +19351,10 @@ "requires": { "addr-to-ip-port": "1.4.3", "bitfield": "2.0.0", - "bittorrent-dht": "8.0.1", - "bittorrent-protocol": "2.3.0", + "bittorrent-dht": "8.1.0", + "bittorrent-protocol": "2.4.0", "chunk-store-stream": "2.0.2", - "create-torrent": "3.29.2", + "create-torrent": "3.30.0", "debug": "3.1.0", "end-of-stream": "1.4.1", "fs-chunk-store": "1.6.5", @@ -19787,8 +19387,8 @@ "torrent-piece": "1.1.1", "uniq": "1.0.1", "unordered-array-remove": "1.0.2", - "ut_metadata": "3.1.0", - "ut_pex": "1.1.6", + "ut_metadata": "3.2.0", + "ut_pex": "1.2.0", "xtend": "4.0.1", "zero-fill": "2.2.3" }, @@ -19856,23 +19456,6 @@ "webidl-conversions": "4.0.2" } }, - "whatwg-url-compat": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz", - "integrity": "sha1-AImBEa9om7CXVBzVpFymyHmERb8=", - "optional": true, - "requires": { - "tr46": "0.0.3" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "optional": true - } - } - }, "whet.extend": { "version": "0.9.9", "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", @@ -19972,9 +19555,9 @@ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" }, "worker-farm": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.2.tgz", - "integrity": "sha512-XxiQ9kZN5n6mmnW+mFJ+wXjNNI/Nx4DIdaAKLX1Bn6LYBWlN/zaBhu34DQYPZ1AJobQuu67S2OfDdNSVULvXkQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.4.tgz", + "integrity": "sha512-ITyClEvcfv0ozqJl1vmWFWhvI+OIrkbInYqkEPE50wFPXj8J9Gd3FYf8+CkZJXJJsQBYe+2DvmoK9Zhx5w8W+w==", "dev": true, "requires": { "errno": "0.1.7", diff --git a/package.json b/package.json index 7ef2ebeb7d7..3d097949c6f 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "start-brk": "node ./tools/start.js --debug-brk=5858 -enable-logging --v=0 --enable-dcheck --user-data-dir-name=brave-development", "test": "cross-env NODE_ENV=test mocha \"test/**/*Test.js\"", "testsuite": "node ./tools/test.js", - "unittest": "cross-env NODE_ENV=test mocha \"test/unit/**/*Test.js\"", + "unittest": "cross-env NODE_ENV=test mocha \"test/unit/**/*Test.js\" --globals chrome,DOMParser,XMLSerializer", "unittest-cov": "node --harmony node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --report lcovonly --report html --report text -x \"test/unit/**/*Test.js\" -- \"test/unit/**/*Test.js\"", "update-pdfjs": "rm -r app/extensions/pdfjs/; cp -r ../pdf.js/build/chromium/ app/extensions/pdfjs/", "update-psl": "./tools/updatepsl.sh", @@ -90,7 +90,7 @@ "async": "^2.0.1", "bat-balance": "^1.0.7", "bat-client": "^2.0.11", - "bat-publisher": "^2.0.11", + "bat-publisher": "^2.0.12", "bignumber.js": "^4.0.4", "bloodhound-js": "brave/bloodhound", "clipboard-copy": "^1.0.0", diff --git a/test/unit/app/browser/api/ledgerTest.js b/test/unit/app/browser/api/ledgerTest.js index 857f5003c0e..251947afda1 100644 --- a/test/unit/app/browser/api/ledgerTest.js +++ b/test/unit/app/browser/api/ledgerTest.js @@ -2663,4 +2663,35 @@ describe('ledger api unit tests', function () { assert.deepEqual(ledgerApi.getSynopsis(), expectedSynopsis) }) }) + + describe('roundTripFromWindow', function () { + let fetchPublisherInfoSpy + + before(() => { + fetchPublisherInfoSpy = sinon.spy(request, 'fetchPublisherInfo') + }) + + afterEach(() => { + fetchPublisherInfoSpy.reset() + }) + + after(() => { + fetchPublisherInfoSpy.restore() + }) + + it('null case', function () { + ledgerApi.roundTripFromWindow() + assert(fetchPublisherInfoSpy.notCalled) + }) + + it('url is missing', function () { + ledgerApi.roundTripFromWindow({}) + assert(fetchPublisherInfoSpy.notCalled) + }) + + it('fetch is called', function () { + ledgerApi.roundTripFromWindow({url: 'test.com'}, () => true) + assert(fetchPublisherInfoSpy.withArgs('test.com', sinon.match.any, sinon.match.any)) + }) + }) }) diff --git a/test/unit/app/extensions/brave/content/scripts/requestHandlerTest.js b/test/unit/app/extensions/brave/content/scripts/requestHandlerTest.js new file mode 100644 index 00000000000..df7530a0f34 --- /dev/null +++ b/test/unit/app/extensions/brave/content/scripts/requestHandlerTest.js @@ -0,0 +1,619 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* global describe, it, before */ +const assert = require('assert') + +const fakeElectron = require('../../../../../lib/fakeElectron') +require('../../../../../braveUnit') + +describe('requestHandler unit test', function () { + let requestHandler, parseFromStringHTML + + before(() => { + global.chrome = { + ipcRenderer: fakeElectron.ipcRenderer + } + + global.DOMParser = class { + parseFromString () { + return parseFromStringHTML + } + } + + global.XMLSerializer = class { + serializeToString () { + return '' + } + } + + requestHandler = require('../../../../../../../app/extensions/brave/content/scripts/requestHandler') + }) + + describe('getText', function () { + it('null case', function () { + const result = requestHandler.getText() + assert.equal(result, '') + }) + + it('node is actually number', function () { + const result = requestHandler.getText(123) + assert.equal(result, '') + }) + + it('span is provided', function () { + let span = document.createElement('span') + span.innerHTML = ('Span hello') + const result = requestHandler.getText(span) + assert.equal(result, ' Span hello ') + }) + }) + + describe('urlCheck', function () { + it('null case', function () { + const result = requestHandler.urlCheck() + assert.equal(result, false) + }) + + it('is not url', function () { + const result = requestHandler.urlCheck(123) + assert.equal(result, false) + }) + + it('is http url', function () { + const result = requestHandler.urlCheck('http://test.com') + assert.equal(result, true) + }) + }) + + describe('getContent', function () { + it('null case', function () { + const result = requestHandler.getContent() + assert.equal(result, null) + }) + + it('empty object', function () { + const result = requestHandler.getContent({}) + assert.equal(result, null) + }) + + it('src is provided', function () { + const result = requestHandler.getContent({content: 'some text'}) + assert.equal(result, 'some text') + }) + }) + + describe('getSrc', function () { + it('null case', function () { + const result = requestHandler.getSrc() + assert.equal(result, null) + }) + + it('empty object', function () { + const result = requestHandler.getSrc({}) + assert.equal(result, null) + }) + + it('src is provided', function () { + const result = requestHandler.getSrc({src: 'url'}) + assert.equal(result, 'url') + }) + }) + + describe('urlTest', function () { + it('null case', function () { + const result = requestHandler.urlTest() + assert.equal(result, false) + }) + + it('is not url', function () { + const result = requestHandler.urlTest(123) + assert.equal(result, false) + }) + + it('is simple url', function () { + const result = requestHandler.urlTest('test.com') + assert.equal(result, true) + }) + + it('is http url', function () { + const result = requestHandler.urlTest('http://test.com') + assert.equal(result, true) + }) + + it('is file url', function () { + const result = requestHandler.urlTest('file://test.png') + assert.equal(result, true) + }) + + it('relative url', function () { + const result = requestHandler.urlTest('/page', {relative: true}) + assert.equal(result, true) + }) + + it('do not allow relative url', function () { + const result = requestHandler.urlTest('/page', {relative: false}) + assert.equal(result, false) + }) + }) + + describe('isEmpty', function () { + it('null case', function () { + const result = requestHandler.isEmpty() + assert.equal(result, true) + }) + + it('empty string', function () { + const result = requestHandler.isEmpty('') + assert.equal(result, true) + }) + + it('string is provided', function () { + const result = requestHandler.isEmpty('test.com') + assert.equal(result, false) + }) + }) + + describe('isUrl', function () { + it('null case', function () { + const result = requestHandler.isUrl() + assert.equal(result, false) + }) + + it('emtpy string', function () { + const result = requestHandler.isUrl('') + assert.equal(result, false) + }) + + it('is not url', function () { + const result = requestHandler.isUrl(123) + assert.equal(result, false) + }) + + it('is simple url', function () { + const result = requestHandler.isUrl('test.com') + assert.equal(result, true) + }) + + it('is http url', function () { + const result = requestHandler.isUrl('http://test.com') + assert.equal(result, true) + }) + + it('is file url', function () { + const result = requestHandler.isUrl('file://test.png') + assert.equal(result, true) + }) + + it('relative url', function () { + const result = requestHandler.isUrl('/page', {relative: true}) + assert.equal(result, true) + }) + + it('do not allow relative url', function () { + const result = requestHandler.isUrl('/page', {relative: false}) + assert.equal(result, false) + }) + }) + + describe('getUrl', function () { + it('null case', function () { + const result = requestHandler.getUrl() + assert.equal(result, undefined) + }) + + it('relative path is absolute link', function () { + const result = requestHandler.getUrl('https://youtube.com', '/page') + assert.equal(result, 'https://youtube.com/page') + }) + + it('relative path is relative link', function () { + const result = requestHandler.getUrl('https://youtube.com', '/page') + assert.equal(result, 'https://youtube.com/page') + }) + + it('relative path is absolute link', function () { + const result = requestHandler.getUrl('https://youtube.com', 'https://youtube.com/page') + assert.equal(result, 'https://youtube.com/page') + }) + }) + + describe('isStrictString', function () { + it('null case', function () { + const result = requestHandler.isStrictString() + assert.equal(result, false) + }) + + it('value is no in correct format', function () { + const result = requestHandler.isStrictString('firstlast') + assert.equal(result, false) + }) + + it('value is in correct format', function () { + const result = requestHandler.isStrictString('first last') + assert.equal(result, 'first last') + }) + }) + + describe('titleize', function () { + it('null case', function () { + const result = requestHandler.titleize() + assert.equal(result, '') + }) + + it('remove multiple spaces', function () { + const result = requestHandler.titleize('this is long title') + assert.equal(result, 'this is long title') + }) + + it('keep by by default', function () { + const result = requestHandler.titleize('by Author') + assert.equal(result, 'by Author') + }) + + it('keep by by default', function () { + const result = requestHandler.titleize('by Author', {removeBy: true}) + assert.equal(result, 'Author') + }) + }) + + describe('defaultFn', function () { + it('null case', function () { + const result = requestHandler.defaultFn() + assert.equal(result, '') + }) + + it('parameter is not HTML element', function () { + const result = requestHandler.defaultFn('something') + assert.equal(result, '') + }) + + it('text is trimmed', function () { + let span = document.createElement('span') + span.innerHTML = (' Span as a child ') + + const result = requestHandler.defaultFn(span) + assert.equal(result, 'Span as a child') + }) + }) + + describe('getValue', function () { + it('null case', function () { + const result = requestHandler.getValue() + assert.equal(result, null) + }) + + it('collection has only one element', function () { + let wrap = document.createElement('div') + let span = document.createElement('span') + span.innerHTML = ('Span as a child') + wrap.appendChild(span) + const result = requestHandler.getValue(wrap.querySelector('span')) + assert.equal(result, 'Span as a child') + }) + + it('collection has multiple elements', function () { + let wrap = document.createElement('div') + let span = document.createElement('span') + span.innerHTML = ('Span as a first child') + wrap.appendChild(span) + let span2 = document.createElement('span') + span2.innerHTML = ('Span as a second child') + wrap.appendChild(span2) + const result = requestHandler.getValue(wrap.querySelectorAll('span')) + assert.equal(result, 'Span as a first child') + }) + + it('first element has empty span', function () { + let wrap = document.createElement('div') + let span = document.createElement('span') + span.innerHTML = ('') + wrap.appendChild(span) + let span2 = document.createElement('span') + span2.innerHTML = ('Span as a second child') + wrap.appendChild(span2) + const result = requestHandler.getValue(wrap.querySelectorAll('span')) + assert.equal(result, 'Span as a second child') + }) + }) + + describe('getThumbnailUrl', function () { + it('null case', function () { + const result = requestHandler.getThumbnailUrl() + assert.equal(result, null) + }) + + it('id is passed in', function () { + const result = requestHandler.getThumbnailUrl('ABC12302') + assert.equal(result, `https://img.youtube.com/vi/ABC12302/sddefault.jpg`) + }) + }) + + describe('getVideoId', function () { + it('null case', function () { + const result = requestHandler.getVideoId() + assert.deepEqual(result, {}) + }) + + it('strip white space', function () { + const result = requestHandler.getVideoId(' https://youtu.be/ABC12302 ') + assert.deepEqual(result, { + id: 'ABC12302', + service: 'youtube' + }) + }) + + it('strip white space', function () { + const result = requestHandler.getVideoId(' https://youtu.be/ABC12302 ') + assert.deepEqual(result, { + id: 'ABC12302', + service: 'youtube' + }) + }) + + it('nocookie ', function () { + const result = requestHandler.getVideoId('http://www.youtube-nocookie.com/ytscreeningroom?v=ABC12300') + assert.deepEqual(result, { + id: 'ABC12300', + service: 'youtube' + }) + }) + + it('removes www', function () { + const result = requestHandler.getVideoId('https://www.youtu.be/ABC12302') + assert.deepEqual(result, { + id: 'ABC12302', + service: 'youtube' + }) + }) + }) + + // source https://github.com/radiovisual/get-video-id/blob/master/test.js + describe('getYouTubeId', function () { + it('null case', function () { + const result = requestHandler.getYouTubeId() + assert.equal(result, '') + }) + + it('gets metadata from youtube short code formats', () => { + assert.equal(requestHandler.getYouTubeId('youtube://ABC12301'), 'ABC12301') + assert.equal(requestHandler.getYouTubeId('https://youtu.be/ABC12302'), 'ABC12302') + assert.equal(requestHandler.getYouTubeId('http://youtu.be/ABC12303'), 'ABC12303') + assert.equal(requestHandler.getYouTubeId('http://youtu.be/ABC12304?feature=youtube_gdata_player'), 'ABC12304') + }) + + it('handles youtube v= and vi= formats', () => { + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/ytscreeningroom?v=ABC1230'), 'ABC1230') + assert.equal(requestHandler.getYouTubeId('https://www.youtube.com/watch?v=ABC12301'), 'ABC12301') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/watch?v=ABC12302&list=abc123&index=2&feature=plpp_video'), 'ABC12302') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/watch?v=ABC12303&feature=channel'), 'ABC12303') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/watch?v=ABC12304&playnext_from=TL&videos=abc123&feature=sub'), 'ABC12304') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/watch?v=ABC12305&feature=channel'), 'ABC12305') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/watch?v=ABC12306&playnext_from=TL&videos=abc123&feature=sub'), 'ABC12306') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/watch?v=ABC12307'), 'ABC12307') + assert.equal(requestHandler.getYouTubeId('http://youtube.com/?v=ABC12308&feature=youtube_gdata_player'), 'ABC12308') + assert.equal(requestHandler.getYouTubeId('http://youtube.com/?vi=ABC12309&feature=youtube_gdata_player'), 'ABC12309') + assert.equal(requestHandler.getYouTubeId('http://youtube.com/watch?v=ABC12310&feature=youtube_gdata_player'), 'ABC12310') + assert.equal(requestHandler.getYouTubeId('http://youtube.com/watch?vi=ABC12311&feature=youtube_gdata_player'), 'ABC12311') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/watch?v=ABC12312&feature=youtube_gdata_player'), 'ABC12312') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/watch?v=ABC12313&feature=youtu.be'), 'ABC12313') + }) + + it('handles youtube /v/ and /vi/ formats', () => { + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/v/ABC1230'), 'ABC1230') + assert.equal(requestHandler.getYouTubeId('http://youtube.com/v/ABC12301?feature=youtube_gdata_player'), 'ABC12301') + assert.equal(requestHandler.getYouTubeId('http://youtube.com/vi/ABC12302?feature=youtube_gdata_player'), 'ABC12302') + assert.equal(requestHandler.getYouTubeId('https://i.ytimg.com/vi/0okagl9U2eo/hqdefault.jpg'), '0okagl9U2eo') + }) + + it('handles youtube image /an_webp/{id}/ formats', () => { + assert.equal(requestHandler.getYouTubeId('https://i.ytimg.com/an_webp/MYDcdp-VNmQ/mqdefault_6s.webp'), 'MYDcdp-VNmQ') + }) + + it('handles youtube /embed/ formats', () => { + assert.equal(requestHandler.getYouTubeId('https://www.youtube.com/embed/ABC1230'), 'ABC1230') + assert.equal(requestHandler.getYouTubeId('www.youtube-nocookie.com/embed/ABC12301?rel=0'), 'ABC12301') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/embed/ABC12302?rel=0'), 'ABC12302') + }) + + it('handles youtube /user/ formats', () => { + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/user/username#p/u/1/ABC1230'), 'ABC1230') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/user/username#p/a/u/2/ABC12301'), 'ABC12301') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/user/username#p/u/1/ABC12302?rel=0'), 'ABC12302') + }) + + it('handles youtube attribution_links', () => { + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/attribution_link?u=%2Fwatch%3Fv%3DABC12300%26feature%3Dshare&a=JdfC0C9V6ZI'), 'ABC12300') + assert.equal(requestHandler.getYouTubeId('https://www.youtube.com/attribution_link?a=JdfC0C9V6ZI&u=%2Fwatch%3Fv%3DABC12301%26feature%3Dshare'), 'ABC12301') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/attribution_link?u=/watch?v=ABC12302&feature=share&list=UUsnCjinFcybOuyJU1NFOJmg&a=LjnCygXKl21WkJdyKu9O-w'), 'ABC12302') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/attribution_link?u=/watch?v=ABC12303&feature=share&a=9QlmP1yvjcllp0h3l0NwuA'), 'ABC12303') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/attribution_link?a=fF1CWYwxCQ4&u=/watch?v=ABC12304&feature=em-uploademail'), 'ABC12304') + assert.equal(requestHandler.getYouTubeId('http://www.youtube.com/attribution_link?a=fF1CWYwxCQ4&feature=em-uploademail&u=/watch?v=ABC12305'), 'ABC12305') + }) + }) + + describe('stripParameters', function () { + it('null case', function () { + const result = requestHandler.stripParameters() + assert.equal(result, '') + }) + + it('string with parms', function () { + const result = requestHandler.stripParameters('this is test') + assert.equal(result, 'this is test') + }) + + it('string with /', function () { + const result = requestHandler.stripParameters('this is/test') + assert.equal(result, 'this is') + }) + + it('string with ?', function () { + const result = requestHandler.stripParameters('this is?test') + assert.equal(result, 'this is') + }) + }) + + describe('smartQuotes', function () { + it('null case', function () { + const result = requestHandler.smartQuotes() + assert.equal(result, '') + }) + + it('regular quote', function () { + const result = requestHandler.smartQuotes(`'test'`) + assert.equal(result, `‘test’`) + }) + + it('double quote (start)', function () { + const result = requestHandler.smartQuotes(`'test'`) + assert.equal(result, `‘test’`) + }) + + it('double quote (start)', function () { + const result = requestHandler.smartQuotes(`this is "test"`) + assert.equal(result, `this is “test”`) + }) + + it('compilation 1', function () { + const result = requestHandler.smartQuotes(`Ma'am, this "test" is from '95`) + assert.equal(result, `Ma’am, this “test” is from ’95`) + }) + + it('compilation 2', function () { + const result = requestHandler.smartQuotes(`something of 'Something's`) + assert.equal(result, `something of ’Something’s`) + }) + }) + + describe('removeByPrefix', function () { + it('null case', function () { + const result = requestHandler.removeByPrefix() + assert.equal(result, '') + }) + + it('case with param null', function () { + const result = requestHandler.removeByPrefix(null) + assert.equal(result, '') + }) + + it('removes @ prefix', function () { + const result = requestHandler.removeByPrefix('test @this') + assert.equal(result, 'test this') + }) + + it('removes by prefix', function () { + const result = requestHandler.removeByPrefix(' by me author') + assert.equal(result, 'me author') + }) + + it('removes BY prefix', function () { + const result = requestHandler.removeByPrefix(' BY me author') + assert.equal(result, 'me author') + }) + }) + + describe('createTitle', function () { + it('null case', function () { + const result = requestHandler.createTitle() + assert.equal(result, '') + }) + + it('case with param null', function () { + const result = requestHandler.createTitle(null) + assert.equal(result, '') + }) + + it('trim string', function () { + const result = requestHandler.createTitle(' this is test ') + assert.equal(result, 'this is test') + }) + + it('remove double and more spaces', function () { + const result = requestHandler.createTitle('this is test ') + assert.equal(result, 'this is test') + }) + + it('create smart quotes', function () { + const result = requestHandler.createTitle(`this "is" test which is 'ok'`) + assert.strictEqual(result, `this “is” test which is ‘ok’`) + }) + }) + + describe('isAbsoluteUrl', function () { + it('null case', function () { + const result = requestHandler.isAbsoluteUrl() + assert.equal(result, undefined) + }) + + it('object was send in', function () { + const result = requestHandler.isAbsoluteUrl({}) + assert.equal(result, undefined) + }) + + it('http url', function () { + const result = requestHandler.isAbsoluteUrl('http://clifton.io') + assert.equal(result, true) + }) + + it('http url', function () { + const result = requestHandler.isAbsoluteUrl('https://clifton.io') + assert.equal(result, true) + }) + + it('data url', function () { + const result = requestHandler.isAbsoluteUrl('data:text/plain;base64,31c4c5flv') + assert.equal(result, true) + }) + + it('file url', function () { + const result = requestHandler.isAbsoluteUrl('file://clifton.io') + assert.equal(result, true) + }) + }) + + describe('resolveUrl', function () { + it('null case', function () { + const result = requestHandler.resolveUrl() + assert.equal(result, null) + }) + + it('args are not urls', function () { + const result = requestHandler.resolveUrl('brave', 'com') + assert.equal(result, 'brave') + }) + + it('we only have base url', function () { + const result = requestHandler.resolveUrl('https://brave.com') + assert.equal(result, 'https://brave.com') + }) + + it('relative path is added', function () { + const result = requestHandler.resolveUrl('https://brave.com', 'test') + assert.equal(result, 'https://brave.com/test') + }) + }) + + describe('isString', function () { + it('null case', function () { + const result = requestHandler.isString() + assert.equal(result, false) + }) + + it('we send object in', function () { + const result = requestHandler.isString({}) + assert.equal(result, false) + }) + + it('we send number in', function () { + const result = requestHandler.isString(10) + assert.equal(result, false) + }) + + it('we send string in', function () { + const result = requestHandler.isString('I am string') + assert.equal(result, true) + }) + }) +}) diff --git a/tools/test.js b/tools/test.js index 0c93e248e43..d7ec6c0bc88 100644 --- a/tools/test.js +++ b/tools/test.js @@ -23,7 +23,7 @@ switch (TEST_DIR) { } // Intentionally no break, because perf tests also run the below default: // eslint-disable-line - cmd.push(`mocha "test/${TEST_DIR}/**/*Test.js"`) + cmd.push(`mocha "test/${TEST_DIR}/**/*Test.js" --globals chrome,DOMParser,XMLSerializer`) } execute(cmd, process.env, (err) => {