From c18c8aad8195f50ebc64c8ff56f6d552c122e097 Mon Sep 17 00:00:00 2001 From: wreulicke Date: Sat, 26 Aug 2017 17:27:46 +0900 Subject: [PATCH] migrate puppeteer --- lib/cli.js | 79 ++------------ lib/index.js | 11 +- lib/phantomscript.js | 231 ---------------------------------------- lib/processor.js | 226 +++++++++++++++++++++++++++++++++++++++ package.json | 2 +- test/cli_test-output.js | 41 ++----- yarn.lock | 61 ++++++++++- 7 files changed, 304 insertions(+), 347 deletions(-) delete mode 100644 lib/phantomscript.js create mode 100644 lib/processor.js diff --git a/lib/cli.js b/lib/cli.js index 8ec9403970..d3543cac09 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -1,13 +1,8 @@ var fs = require('fs') -var exec = require('child_process').exec var chalk = require('chalk') -var which = require('which') var parseArgs = require('minimist') -var semver = require('semver') var path = require('path') -var PHANTOM_VERSION = '^2.1.0' - var info = chalk.blue.bold module.exports = (function () { @@ -23,7 +18,6 @@ function Cli (options) { outputSuffix: 'O', svg: 's', verbose: 'v', - phantomPath: 'e', sequenceConfig: 'c', ganttConfig: 'g', css: 't', @@ -46,7 +40,6 @@ function Cli (options) { ' -p --png If SVG was selected, and you also want PNG, set this flag', ' -o --outputDir Directory to save files, will be created automatically, defaults to `cwd`', " -O --outputSuffix Suffix to output filenames in front of '.svg' or '.png', defaults to ''", - ' -e --phantomPath Specify the path to the phantomjs executable', ' -t --css Specify the path to a CSS file to be included when processing output', ' -c --sequenceConfig Specify the path to the file with the configuration to be applied in the sequence diagram', ' -g --ganttConfig Specify the path to the file with the configuration to be applied in the gantt diagram', @@ -78,7 +71,7 @@ Cli.prototype.parse = function (argv, next) { } // ensure that parameter-expecting options have parameters - ;['outputDir', 'outputSuffix', 'phantomPath', 'sequenceConfig', 'ganttConfig', 'css'].forEach(function (i) { + ;['outputDir', 'outputSuffix', 'sequenceConfig', 'ganttConfig', 'css'].forEach(function (i) { if (typeof options[i] !== 'undefined') { if (typeof options[i] !== 'string' || options[i].length < 1) { this.errors.push(new Error(i + ' expects a value.')) @@ -127,70 +120,10 @@ Cli.prototype.parse = function (argv, next) { if (!options.width) { options.width = 1200 } - - this.checkPhantom = createCheckPhantom(options.phantomPath) - - this.checkPhantom(function (err, path) { - if (err) { - this.errors.push(err) - } - options.phantomPath = path - next( - this.errors.length > 0 ? this.errors : null - , this.message - , options - ) - }.bind(this)) - } -} - -function createCheckPhantom (_phantomPath) { - var phantomPath = _phantomPath - - return function checkPhantom (_next) { - var next = _next || function () { } - var err - - if (typeof phantomPath === 'undefined') { - try { - var phantom = require('phantomjs') - phantomPath = phantom.path - } catch (e) { - try { - phantomPath = which.sync('phantomjs') - } catch (e) { - if (!phantomPath) { - phantomPath = null - err = new Error( - [ - 'Cannot find phantomjs in your PATH. If phantomjs is installed', - "you may need to specify its path manually with the '-e' option.", - "Run this executable with '--help' or view the README for more", - 'details.' - ].join('\n') - ) - - next(err) - return - } - } - } - } - - // If we have phantompath, see if its version satisfies our requirements - exec('"' + phantomPath + '" --version', function (err, stdout, stderr) { - if (err) { - next(new Error('Could not find phantomjs at the specified path.')) - } else if (!semver.satisfies(stdout, PHANTOM_VERSION)) { - next(new Error( - 'mermaid requires phantomjs ' + - PHANTOM_VERSION + - ' to be installed, found version ' + - stdout - )) - } else { - next(null, phantomPath) - } - }) + next( + this.errors.length > 0 ? this.errors : null + , this.message + , options + ) } } diff --git a/lib/index.js b/lib/index.js index 329ca507fa..4ceb36ebea 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,9 +1,7 @@ -var path = require('path') -var spawn = require('child_process').spawn var mkdirp = require('mkdirp') -var phantomscript = path.join(__dirname, 'phantomscript.js') +var processor = require('./processor') module.exports = { process: processMermaid } @@ -13,7 +11,6 @@ function processMermaid (files, _options, _next) { var outputSuffix = options.outputSuffix || '' var next = _next || function () { } var phantomArgs = [ - phantomscript, outputDir, options.png, options.svg, @@ -33,11 +30,7 @@ function processMermaid (files, _options, _next) { if (err) { throw err } - var phantom = spawn(options.phantomPath, phantomArgs) - phantom.on('exit', next) - - phantom.stderr.pipe(process.stderr) - phantom.stdout.pipe(process.stdout) + processor(...(phantomArgs)).then(() => next()).catch(e => next(e)) }) } diff --git a/lib/phantomscript.js b/lib/phantomscript.js deleted file mode 100644 index 2a24e150ac..0000000000 --- a/lib/phantomscript.js +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Credits: - * - SVG Processing from the NYTimes svg-crowbar, under an MIT license - * https://github.com/NYTimes/svg-crowbar - * - Thanks to the grunticon project for some guidance - * https://github.com/filamentgroup/grunticon - */ - -window.phantom.onError = function (msg, trace) { - var msgStack = ['PHANTOM ERROR: ' + msg] - if (trace && trace.length) { - msgStack.push('TRACE:') - trace.forEach(function (t) { - msgStack.push( - ' -> ' + - (t.file || t.sourceURL) + - ': ' + - t.line + - (t.function ? ' (in function ' + t.function + ')' : '') - ) - }) - } - system.stderr.write(msgStack.join('\n')) - window.phantom.exit(1) -} - -var system = require('system') -var fs = require('fs') -var webpage = require('webpage') - -var page = webpage.create() -var files = system.args.slice(10, system.args.length) -var width = system.args[8] - -if (typeof width === 'undefined' || width === 'undefined') { - width = 1200 -} -var options = { - outputDir: system.args[1], - png: system.args[2] === 'true', - svg: system.args[3] === 'true', - css: fs.read(system.args[4]), - sequenceConfig: system.args[5] !== 'null' ? JSON.parse(fs.read(system.args[5])) : {}, - ganttConfig: system.args[6] !== 'null' ? JSON.parse(fs.read(system.args[6])) : {}, - verbose: system.args[7] === 'true', - width: width, - outputSuffix: system.args[9] -} -var log = logger(options.verbose) -options.sequenceConfig.useMaxWidth = false - -page.content = [ - '', - '', - '', - '', - '', - '', - '' -].join('\n') - -page.injectJs('../dist/mermaid.js') -page.onConsoleMessage = function (msg, lineNum, sourceId) { - log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")') -} - -log('Num files to execute : ' + files.length) - -files.forEach(function (file) { - var contents = fs.read(file) - var filename = file.split(fs.separator).slice(-1) - var oParser = new window.DOMParser() - var oDOM - var svgContent - - log('ready to execute: ' + file) - - // this JS is executed in this statement is sandboxed, even though it doesn't - // look like it. we need to serialize then unserialize the svgContent that's - // taken from the DOM - svgContent = page.evaluate(executeInPage, { - contents: contents, - ganttConfig: options.ganttConfig, - sequenceConfig: options.sequenceConfig, - confWidth: options.width - }) - - oDOM = oParser.parseFromString(svgContent, 'text/xml') - - resolveSVGElement(oDOM.firstChild) - setSVGStyle(oDOM.firstChild, options.css) - - var outputPath = options.outputDir + fs.separator + filename + options.outputSuffix - if (options.png) { - page.viewportSize = { - width: ~~oDOM.documentElement.attributes.getNamedItem('width').value, - height: ~~oDOM.documentElement.attributes.getNamedItem('height').value - } - - page.render(outputPath + '.png') - log('saved png: ' + outputPath + '.png') - } - - if (options.svg) { - var serialize = new window.XMLSerializer() - fs.write(outputPath + '.svg' - , serialize.serializeToString(oDOM) + '\n' - , 'w' - ) - log('saved svg: ' + outputPath + '.svg') - } -}) - -window.phantom.exit() - -function logger (_verbose) { - var verbose = _verbose - - return function (_message, _level) { - var level = _level - var message = _message - var log - - log = level === 'error' ? system.stderr : system.stdout - - if (verbose) { - log.write(message + '\n') - } - } -} - -function resolveSVGElement (element) { - var prefix = { - xmlns: 'http://www.w3.org/2000/xmlns/', - xlink: 'http://www.w3.org/1999/xlink', - svg: 'http://www.w3.org/2000/svg' - } - - element.setAttribute('version', '1.1') - // removing attributes so they aren't doubled up - element.removeAttribute('xmlns') - element.removeAttribute('xlink') - // These are needed for the svg - if (!element.hasAttributeNS(prefix.xmlns, 'xmlns')) { - element.setAttributeNS(prefix.xmlns, 'xmlns', prefix.svg) - } - if (!element.hasAttributeNS(prefix.xmlns, 'xmlns:xlink')) { - element.setAttributeNS(prefix.xmlns, 'xmlns:xlink', prefix.xlink) - } -} - -function setSVGStyle (svg, css) { - if (!css || !svg) { return } - var styles = svg.getElementsByTagName('style') - if (!styles || styles.length === 0) { return } - styles[0].textContent = css -} - -// The sandboxed function that's executed in-page by phantom -function executeInPage (data) { - var xmlSerializer = new window.XMLSerializer() - var contents = data.contents - var sequenceConfig = JSON.stringify(data.sequenceConfig) - var ganttConfig = JSON.stringify(data.ganttConfig).replace(/"(function.*})"/, '$1') - var svg - var svgValue - var boundingBox - var width - var height - var confWidth = data.confWidth - - var toRemove = document.getElementsByClassName('mermaid') - if (toRemove && toRemove.length) { - for (var i = 0, len = toRemove.length; i < len; i++) { - toRemove[i].parentNode.removeChild(toRemove[i]) - } - } - - var el = document.createElement('div') - el.className = 'mermaid' - el.appendChild(document.createTextNode(contents)) - document.body.appendChild(el) - - var config = { - sequenceDiagram: JSON.parse(sequenceConfig), - flowchart: { useMaxWidth: false }, - logLevel: 1 - } - - window.mermaid.initialize(config) - - var sc = document.createElement('script') - sc.appendChild(document.createTextNode('mermaid.ganttConfig = ' + ganttConfig + ';')) - document.body.appendChild(sc) - - window.mermaid.init() - - svg = document.querySelector('svg') - - boundingBox = svg.getBoundingClientRect() // the initial bonding box of the svg - width = boundingBox.width * 1.5 // adding the scale factor for consistency with output in chrome browser - height = boundingBox.height * 1.5 // adding the scale factor for consistency with output in chrome browser - - var scalefactor = confWidth / (width - 8) - - // resizing the body to fit the svg - document.body.setAttribute( - 'style' - , 'width: ' + (confWidth - 8) + '; height: ' + (height * scalefactor) + ';' - ) - // resizing the svg via css for consistent display - svg.setAttribute( - 'style' - , 'width: ' + (confWidth - 8) + '; height: ' + (height * scalefactor) + ';' - ) - - // set witdth and height attributes used to set the viewport when rending png image - svg.setAttribute( - 'width' - , confWidth - ) - svg.setAttribute( - 'height' - , height * scalefactor - ) - - svgValue = xmlSerializer.serializeToString(svg) + '\n' - return svgValue -} diff --git a/lib/processor.js b/lib/processor.js new file mode 100644 index 0000000000..e02fd750d9 --- /dev/null +++ b/lib/processor.js @@ -0,0 +1,226 @@ +/** + * Credits: + * - SVG Processing from the NYTimes svg-crowbar, under an MIT license + * https://github.com/NYTimes/svg-crowbar + * - Thanks to the grunticon project for some guidance + * https://github.com/filamentgroup/grunticon + */ + +var fs = require('fs') +var path = require('path') + +module.exports = async function ( + outputDir, + png, + svg, + cssPath, + sequenceConfigPath, + ganttConfigPath, + verbose, + width, + outputSuffix, + ...files +) { + const ganttConfig = ganttConfigPath ? JSON.parse(fs.readFileSync(ganttConfigPath)) : {} + const sequenceConfig = sequenceConfigPath ? JSON.parse(fs.readFileSync(sequenceConfigPath)) : {} + + var options = { + outputDir: outputDir, + png: png, + svg: svg, + css: fs.readFileSync(cssPath).toString(), + verbose: true, + width: width, + outputSuffix: outputSuffix + } + var log = logger(options.verbose) + + var puppeteer = require('puppeteer') + await puppeteer.launch().then(async browser => { + const page = await browser.newPage() + + await page.setContent([ + '', + '', + '', + '', + '', + '', + '' + ].join('\n')) + await page.injectFile('dist/mermaid.js') + page.on('console', (...args) => { + if(options.verbose)console.log(...args) + }) + sequenceConfig.useMaxWidth = false + + log('Num files to execute : ' + files.length) + + + if (typeof width === 'undefined' || width === 'undefined') { + width = 1200 + } + + for (let file of files) { + var contents = fs.readFileSync(file).toString() + var filename = path.basename(file) + + log('ready to execute: ' + file) + + // this JS is executed in this statement is sandboxed, even though it doesn't + // look like it. we need to serialize then unserialize the svgContent that's + // taken from the DOM + const svgContent = await page.evaluate(executeInPage, { + contents: contents, + ganttConfig: ganttConfig, + sequenceConfig: sequenceConfig, + confWidth: width + }) + const viewport = await page.evaluate((svg, css) => { + var oParser = new window.DOMParser() + window.oDOM = oParser.parseFromString(svg, 'text/xml') + resolveSVGElement(window.oDOM.firstChild) + setSVGStyle(window.oDOM.firstChild) + + function resolveSVGElement (element) { + var prefix = { + xmlns: 'http://www.w3.org/2000/xmlns/', + xlink: 'http://www.w3.org/1999/xlink', + svg: 'http://www.w3.org/2000/svg' + } + + element.setAttribute('version', '1.1') + // removing attributes so they aren't doubled up + element.removeAttribute('xmlns') + element.removeAttribute('xlink') + // These are needed for the svg + if (!element.hasAttributeNS(prefix.xmlns, 'xmlns')) { + element.setAttributeNS(prefix.xmlns, 'xmlns', prefix.svg) + } + if (!element.hasAttributeNS(prefix.xmlns, 'xmlns:xlink')) { + element.setAttributeNS(prefix.xmlns, 'xmlns:xlink', prefix.xlink) + } + } + + function setSVGStyle (svg, css) { + if (!css || !svg) { return } + var styles = svg.getElementsByTagName('style') + if (!styles || styles.length === 0) { return } + styles[0].textContent = css + } + + return { + width: ~~window.oDOM.documentElement.attributes.getNamedItem('width').value, + height: ~~window.oDOM.documentElement.attributes.getNamedItem('height').value + } + }, svgContent, options.css) + + await page.setViewport(viewport) + var outputPath = options.outputDir + path.sep + filename + options.outputSuffix + if (options.png) { + console.log(outputPath) + await page.screenshot({ path: outputPath + '.png' }) + log('saved png: ' + outputPath + '.png') + } + + if (options.svg) { + const svg = await page.evaluate(() => { + var serialize = new window.XMLSerializer() + return serialize.serializeToString(window.oDOM) + '\n' + }) + fs.writeFileSync(outputPath + '.svg', svg) + log('saved svg: ' + outputPath + '.svg') + } + } + browser.close() + }) +} + +function logger (_verbose) { + var verbose = _verbose + + return function (_message, _level) { + var level = _level + var message = _message + var log + + log = level === 'error' ? console.error : console.log + + if (verbose) { + log(message) + } + } +} +// The sandboxed function that's executed in-page by phantom +function executeInPage (data) { + var xmlSerializer = new window.XMLSerializer() + var contents = data.contents + var sequenceConfig = JSON.stringify(data.sequenceConfig) + var ganttConfig = JSON.stringify(data.ganttConfig).replace(/"(function.*})"/, '$1') + var svg + var svgValue + var boundingBox + var width + var height + var confWidth = data.confWidth + + var toRemove = document.getElementsByClassName('mermaid') + if (toRemove && toRemove.length) { + for (var i = 0, len = toRemove.length; i < len; i++) { + toRemove[i].parentNode.removeChild(toRemove[i]) + } + } + + var el = document.createElement('div') + el.className = 'mermaid' + el.appendChild(document.createTextNode(contents)) + document.body.appendChild(el) + + var config = { + sequenceDiagram: JSON.parse(sequenceConfig), + flowchart: { useMaxWidth: false }, + logLevel: 1 + } + + window.mermaid.initialize(config) + + var sc = document.createElement('script') + sc.appendChild(document.createTextNode('mermaid.ganttConfig = ' + ganttConfig + ';')) + document.body.appendChild(sc) + + window.mermaid.init() + + svg = document.querySelector('svg') + + boundingBox = svg.getBoundingClientRect() // the initial bonding box of the svg + width = boundingBox.width * 1.5 // adding the scale factor for consistency with output in chrome browser + height = boundingBox.height * 1.5 // adding the scale factor for consistency with output in chrome browser + + var scalefactor = confWidth / (width - 8) + + // resizing the body to fit the svg + document.body.setAttribute( + 'style' + , 'width: ' + (confWidth - 8) + '; height: ' + (height * scalefactor) + ';' + ) + // resizing the svg via css for consistent display + svg.setAttribute( + 'style' + , 'width: ' + (confWidth - 8) + '; height: ' + (height * scalefactor) + ';' + ) + + // set witdth and height attributes used to set the viewport when rending png image + svg.setAttribute( + 'width' + , confWidth + ) + svg.setAttribute( + 'height' + , height * scalefactor + ) + + svgValue = xmlSerializer.serializeToString(svg) + '\n' + return svgValue +} diff --git a/package.json b/package.json index a65fd766cd..07d359a2d1 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "minimist": "^1.2.0", "mkdirp": "^0.5.1", "moment": "^2.18.1", + "puppeteer": "^0.10.0", "semver": "^5.4.1", "which": "^1.3.0" }, @@ -114,7 +115,6 @@ "marked": "^0.3.6", "mock-browser": "^0.92.14", "npm-check-updates": "^2.12.1", - "phantomjs-prebuilt": "^2.1.15", "require-dir": "^0.3.2", "rimraf": "^2.6.1", "standard": "^10.0.3", diff --git a/test/cli_test-output.js b/test/cli_test-output.js index 7bc1ddcf10..3a92608ed8 100644 --- a/test/cli_test-output.js +++ b/test/cli_test-output.js @@ -9,17 +9,9 @@ const rimraf = require('rimraf') const mermaid = require('../lib') const fileTestMermaid = path.join('test', 'fixtures', 'test.mermaid') -const isWin = /^win/.test(process.platform) -let phantomCmd -if (isWin) { - phantomCmd = 'node_modules/.bin/phantomjs.cmd' -} else { - phantomCmd = 'node_modules/.bin/phantomjs' -} const singleFile = { files: [fileTestMermaid], outputDir: path.join(process.cwd(), 'test/tmp_single'), - phantomPath: path.join(process.cwd(), phantomCmd), width: 1200, css: path.join(__dirname, '..', 'dist', 'mermaid.css'), sequenceConfig: null, @@ -32,7 +24,6 @@ const multiFile = { path.join('test', 'fixtures', 'sequence.mermaid') ], outputDir: 'test/tmp_multi', - phantomPath: path.join(process.cwd(), phantomCmd), width: 1200, css: path.join(__dirname, '..', 'dist', 'mermaid.css'), sequenceConfig: null, @@ -40,7 +31,7 @@ const multiFile = { } test('output of single png', function (t) { - t.plan(3) + t.plan(2) const expected = ['test.mermaid.png'] @@ -48,15 +39,13 @@ test('output of single png', function (t) { opt.outputDir += '_png' opt.png = true - mermaid.process(opt.files, opt, function (code) { - t.equal(code, 0, 'has clean exit code') - + mermaid.process(opt.files, opt, function () { verifyFiles(expected, opt.outputDir, t) }) }) test('output of multiple png', function (t) { - t.plan(3) + t.plan(2) const expected = ['test.mermaid.png', 'test2.mermaid.png', 'gantt.mermaid.png', 'sequence.mermaid.png'] @@ -65,15 +54,13 @@ test('output of multiple png', function (t) { opt.outputDir += '_png' opt.png = true - mermaid.process(opt.files, opt, function (code) { - t.equal(code, 0, 'has clean exit code') - + mermaid.process(opt.files, opt, function () { verifyFiles(expected, opt.outputDir, t) }) }) test('output of single svg', function (t) { - t.plan(3) + t.plan(2) const expected = ['test.mermaid.svg'] @@ -81,15 +68,13 @@ test('output of single svg', function (t) { opt.outputDir += '_svg' opt.svg = true - mermaid.process(opt.files, opt, function (code) { - t.equal(code, 0, 'has clean exit code') - + mermaid.process(opt.files, opt, function () { verifyFiles(expected, opt.outputDir, t) }) }) test('output of multiple svg', function (t) { - t.plan(3) + t.plan(2) const expected = ['test.mermaid.svg', 'test2.mermaid.svg', 'gantt.mermaid.svg', 'sequence.mermaid.svg'] @@ -98,15 +83,13 @@ test('output of multiple svg', function (t) { opt.outputDir += '_svg' opt.svg = true - mermaid.process(opt.files, opt, function (code) { - t.equal(code, 0, 'has clean exit code') - + mermaid.process(opt.files, opt, function () { verifyFiles(expected, opt.outputDir, t) }) }) test('output including CSS', function (t) { - t.plan(5) + t.plan(3) const expected = ['test.mermaid.png'] const opt = clone(singleFile) @@ -117,15 +100,13 @@ test('output including CSS', function (t) { opt2.png = true opt2.outputDir += '_css_png' - mermaid.process(opt.files, opt, function (code) { - t.equal(code, 0, 'has clean exit code') + mermaid.process(opt.files, opt, function () { const filename = path.join(opt.outputDir, path.basename(expected[0])) const one = fs.statSync(filename) opt2.css = path.join('test', 'fixtures', 'test.css') - mermaid.process(opt2.files, opt2, function (code) { - t.equal(code, 0, 'has clean exit code') + mermaid.process(opt2.files, opt2, function () { const two = fs.statSync(filename) t.notEqual(one.size, two.size) diff --git a/yarn.lock b/yarn.lock index 1c328b1832..7db580756a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -86,6 +86,12 @@ after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" +agent-base@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.1.tgz#92d8a4fc2524a3b09b3666a33b6c97960f23d6a4" + dependencies: + es6-promisify "^5.0.0" + ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" @@ -1917,7 +1923,7 @@ debug@2.6.7: dependencies: ms "2.0.0" -debug@2.6.8, debug@^2.1.0, debug@^2.1.1, debug@^2.2.0, debug@^2.6.8: +debug@2.6.8, debug@^2.1.0, debug@^2.1.1, debug@^2.2.0, debug@^2.4.1, debug@^2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: @@ -2295,10 +2301,20 @@ es6-promise@^3.0.2, es6-promise@^3.1.2: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" +es6-promise@^4.0.3: + version "4.1.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" + es6-promise@~4.0.3: version "4.0.5" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + dependencies: + es6-promise "^4.0.3" + es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" @@ -2675,7 +2691,7 @@ extract-text-webpack-plugin@^3.0.0: schema-utils "^0.3.0" webpack-sources "^1.0.1" -extract-zip@~1.6.5: +extract-zip@^1.6.5, extract-zip@~1.6.5: version "1.6.5" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.5.tgz#99a06735b6ea20ea9b705d779acffcc87cff0440" dependencies: @@ -3785,6 +3801,13 @@ https-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" +https-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.1.0.tgz#1391bee7fd66aeabc0df2a1fa90f58954f43e443" + dependencies: + agent-base "^4.1.0" + debug "^2.4.1" + iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" @@ -6119,7 +6142,7 @@ performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" -phantomjs-prebuilt@^2.1.15, phantomjs-prebuilt@^2.1.3: +phantomjs-prebuilt@^2.1.3: version "2.1.15" resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.15.tgz#20f86e82d3349c505917527745b7a411e08b3903" dependencies: @@ -6491,6 +6514,10 @@ progress@^1.1.8, progress@~1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + "promise@>=3.2 <8", promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" @@ -6514,6 +6541,10 @@ proxy-addr@~1.1.5: forwarded "~0.1.0" ipaddr.js "1.4.0" +proxy-from-env@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + proxy-middleware@latest: version "0.15.0" resolved "https://registry.yarnpkg.com/proxy-middleware/-/proxy-middleware-0.15.0.tgz#a3fdf1befb730f951965872ac2f6074c61477a56" @@ -6544,6 +6575,19 @@ punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +puppeteer@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-0.10.0.tgz#f0a95de4b2660608fa9dbc54f525d013ef6262e7" + dependencies: + debug "^2.6.8" + extract-zip "^1.6.5" + https-proxy-agent "^2.1.0" + mime "^1.3.4" + progress "^2.0.0" + proxy-from-env "^1.0.0" + rimraf "^2.6.1" + ws "^3.0.0" + q@^1.1.2: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" @@ -8107,6 +8151,10 @@ ultron@1.0.x: version "1.0.2" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" +ultron@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" + umask@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" @@ -8618,6 +8666,13 @@ ws@1.1.2: options ">=0.0.5" ultron "1.0.x" +ws@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.1.0.tgz#8afafecdeab46d572e5397ee880739367aa2f41c" + dependencies: + safe-buffer "~5.1.0" + ultron "~1.1.0" + wtf-8@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a"