From 54c67e629446c1fcb9ce41eacaf5c3c6710d466b Mon Sep 17 00:00:00 2001 From: Zhicheng WANG Date: Thu, 14 Feb 2019 22:41:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B9=E7=94=A8=20puppeteer=20?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=20prerender=EF=BC=8C=E6=94=BE=E5=BC=83=20`pr?= =?UTF-8?q?erender`=20=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/deploy-cn.sh | 8 +- aio/package.json | 14 +- aio/tools/translator/bin/prerender.ts | 51 +++++ aio/tools/translator/ssr/ssr-server.js | 3 - aio/tools/translator/ssr/ssr.ts | 55 ------ aio/yarn.lock | 263 ++++++++++++++----------- 6 files changed, 205 insertions(+), 189 deletions(-) create mode 100644 aio/tools/translator/bin/prerender.ts delete mode 100644 aio/tools/translator/ssr/ssr-server.js delete mode 100644 aio/tools/translator/ssr/ssr.ts diff --git a/aio/deploy-cn.sh b/aio/deploy-cn.sh index 9e1006ec9d..c584e7802b 100755 --- a/aio/deploy-cn.sh +++ b/aio/deploy-cn.sh @@ -10,19 +10,17 @@ cd `dirname $0` yarn build -yarn start & - -node ./tools/translator/ssr/ssr-server.js & +yarn preview & sleep 3; -ts-node ./tools/translator/ssr/ssr.ts +ts-node ./tools/translator/bin/prerender.ts killall -9 node if [[ ! -d "./ng-docs.github.io" ]] then - git clone https://asnowwolf:${GITHUB_ACCESS_TOKEN}@github.com/ng-docs/ng-docs.github.io.git ./ng-docs.github.io + git clone https://asnowwolf:${GITHUB_ACCESS_TOKEN}@github.com/ng-docs/preview.angular.cn.git ./ng-docs.github.io fi cp -r dist/* ./ng-docs.github.io diff --git a/aio/package.json b/aio/package.json index 06141c17dc..0bc2d1ecd0 100644 --- a/aio/package.json +++ b/aio/package.json @@ -13,6 +13,7 @@ "aio-check-local": "node tools/ng-packages-installer check .", "ng": "yarn check-env && ng", "start": "yarn check-env && ng serve --configuration=fast", + "preview": "http-server-spa ./dist index.html 4200", "build": "yarn build-for stable", "prebuild-for": "yarn setup", "build-for": "yarn ~~build --configuration", @@ -91,12 +92,8 @@ "@angular/service-worker": "^7.0.0", "@awesome-fe/translate": "0.2.6", "@webcomponents/custom-elements": "^1.2.0", - "chai": "^4.1.2", "classlist.js": "^1.1.20150312", "core-js": "^2.4.1", - "klaw-sync": "^6.0.0", - "node-fetch": "^2.3.0", - "prerender": "^5.4.5", "rxjs": "^6.3.0", "tslib": "^1.9.0", "web-animations-js": "^2.2.5", @@ -108,11 +105,14 @@ "@angular/compiler": "^7.0.0", "@angular/compiler-cli": "^7.0.0", "@angular/language-service": "^7.0.0", + "@types/html-minifier": "^3.5.3", "@types/jasmine": "^2.5.52", "@types/jasminewd2": "^2.0.4", "@types/node": "~6.0.60", + "@types/puppeteer": "^1.12.1", "archiver": "^1.3.0", "canonical-path": "1.0.0", + "chai": "^4.1.2", "chalk": "^2.1.0", "cjson": "^0.5.0", "codelyzer": "~4.2.1", @@ -129,8 +129,8 @@ "hast-util-is-element": "^1.0.0", "hast-util-to-string": "^1.0.0", "html": "^1.0.0", - "html-minifier": "^3.5.20", - "http-server": "^0.9.0", + "html-minifier": "^3.5.21", + "http-server-spa": "^1.3.0", "ignore": "^3.3.3", "image-size": "^0.5.1", "jasmine": "^2.6.0", @@ -147,6 +147,7 @@ "karma-coverage-istanbul-reporter": "^1.3.0", "karma-jasmine": "^1.1.0", "karma-jasmine-html-reporter": "^0.2.2", + "klaw-sync": "^6.0.0", "lighthouse": "^3.2.1", "lodash": "^4.17.4", "lunr": "^2.1.0", @@ -154,6 +155,7 @@ "mocha": "^5.2.0", "npm-run-all": "^4.1.5", "protractor": "^5.2.0", + "puppeteer": "^1.12.2", "rehype": "^6.0.0", "rehype-slug": "^2.0.0", "remark": "^9.0.0", diff --git a/aio/tools/translator/bin/prerender.ts b/aio/tools/translator/bin/prerender.ts new file mode 100644 index 0000000000..318d3454cc --- /dev/null +++ b/aio/tools/translator/bin/prerender.ts @@ -0,0 +1,51 @@ +import { readFileSync, writeFileSync } from 'fs'; +import * as klawSync from 'klaw-sync'; +import { sync as mkdirp } from 'mkdirp'; +import { minify } from 'html-minifier'; +import { dirname, join } from 'path'; +import { launch } from 'puppeteer'; + +const minifyOptions = { + collapseWhitespace: true, + ignoreCustomFragments: [/[\s\S]*?<\/code>/], + minifyCSS: true, + minifyJS: true, + removeComments: true, + removeScriptTypeAttributes: true, + removeStyleLinkTypeAttributes: true, +}; + +function getGuideUrls(): string[] { + const navigation = readFileSync('./content/navigation.json', 'utf-8'); + return (navigation.match(/"url": "(.*?)"/g) || []) + .map((entry) => entry.replace(/^"url": "(.*?)".*$/, '$1')) + .filter(url => url.slice(0, 4) !== 'http'); +} + +function getApiUrls(): string[] { + return klawSync('./dist/generated/docs/api', { nodir: true }) + .map(file => file.path.replace(/^.*generated\/docs\/(.*).json$/, '$1')); +} + +const urls = [...getGuideUrls(), ...getApiUrls(), 'index.html']; + +async function prerender() { + const browser = await launch({ headless: false }); + const page = await browser.newPage(); + for (let i = 0; i < urls.length; ++i) { + const url = urls[i]; + await page.goto(`http://localhost:4200/${url}`, { waitUntil: 'domcontentloaded' }); + await page.waitForSelector('#top-of-page'); + const content = await page.content(); + const filename = join('dist', `${url}.html`); + mkdirp(dirname(filename)); + writeFileSync(filename, minify(content, minifyOptions), 'utf-8'); + console.log(`rendered ${url}...`); + } +} + +prerender().then(() => { + process.exit(0); +}).catch(() => { + process.exit(-1); +}); diff --git a/aio/tools/translator/ssr/ssr-server.js b/aio/tools/translator/ssr/ssr-server.js deleted file mode 100644 index 81585ab955..0000000000 --- a/aio/tools/translator/ssr/ssr-server.js +++ /dev/null @@ -1,3 +0,0 @@ -const prerender = require('prerender'); -const server = prerender(); -server.start(); diff --git a/aio/tools/translator/ssr/ssr.ts b/aio/tools/translator/ssr/ssr.ts deleted file mode 100644 index f44b14c684..0000000000 --- a/aio/tools/translator/ssr/ssr.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as fs from 'fs'; -import * as klawSync from 'klaw-sync'; -import { concat, defer, Observable } from 'rxjs'; -import * as fetch from 'node-fetch'; -import { fromPromise } from 'rxjs/internal-compatibility'; -import { map } from 'rxjs/operators'; -import * as path from 'path'; -import { minify } from 'html-minifier'; -import mkdirp = require('mkdirp'); - -const minifyOptions = { - collapseWhitespace: true, - ignoreCustomFragments: [/[\s\S]*?<\/code>/], - minifyCSS: true, - minifyJS: true, - removeComments: true, - removeScriptTypeAttributes: true, - removeStyleLinkTypeAttributes: true, -}; - -function renderPage(url: string): Observable { - return defer(() => fromPromise(fetch(`http://localhost:3000/render?url=http://localhost:4200/${url}`).then(resp => resp.text()))).pipe( - map(content => { - const filename = path.join('dist', `${url}.html`); - mkdirp.sync(path.dirname(filename)); - fs.writeFileSync(filename, minify(content, minifyOptions), 'utf-8'); - console.log(`rendered ${url}...`); - }), - ); -} - -function getGuideUrls(): string[] { - const navigation = fs.readFileSync('./content/navigation.json', 'utf-8'); - return (navigation.match(/"url": "(.*?)"/g) || []) - .map((entry) => entry.replace(/^"url": "(.*?)".*$/, '$1')) - .filter(url => url.slice(0, 4) !== 'http'); -} - -function getApiUrls(): string[] { - return klawSync('./dist/generated/docs/api', { nodir: true }) - .map(file => file.path.replace(/^.*generated\/docs\/(.*).json$/, '$1')); -} - -const urls = [...getGuideUrls(), ...getApiUrls(), 'index.html']; -const tasks = urls.map(url => renderPage(url)); -concat(...tasks).subscribe((url) => { -}, () => { -}, () => { - process.exit(0); -}); - -// 不自动退出 -setInterval(function () { -}, 24 * 60 * 60 * 1000); - diff --git a/aio/yarn.lock b/aio/yarn.lock index 3c5b90f1b6..eaec5b4d7e 100644 --- a/aio/yarn.lock +++ b/aio/yarn.lock @@ -362,10 +362,26 @@ version "0.7.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" +"@types/clean-css@*": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@types/clean-css/-/clean-css-4.2.0.tgz#785749d3ba799ae2cd3efcb3ce622781efd00340" + integrity sha512-P+gDCIBAXZ/Q5e9d/Z9Rtn16P5Pr1YIO3gZcY7ZvaQ9ErgmOYtFQlLHZ2P/xcrIyN8TEZrI03EZmdmv1154sjA== + dependencies: + "@types/node" "*" + "@types/core-js@^0.9.41": version "0.9.43" resolved "https://registry.yarnpkg.com/@types/core-js/-/core-js-0.9.43.tgz#65d646c5e8c0cd1bdee37065799f9d3d48748253" +"@types/html-minifier@^3.5.3": + version "3.5.3" + resolved "https://registry.yarnpkg.com/@types/html-minifier/-/html-minifier-3.5.3.tgz#5276845138db2cebc54c789e0aaf87621a21e84f" + integrity sha512-j1P/4PcWVVCPEy5lofcHnQ6BtXz9tHGiFPWzqm7TtGuWZEfCHEP446HlkSNc9fQgNJaJZ6ewPtp2aaFla/Uerg== + dependencies: + "@types/clean-css" "*" + "@types/relateurl" "*" + "@types/uglify-js" "*" + "@types/jasmine@*": version "2.6.2" resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.6.2.tgz#6e6d4cb183cd55c7a1ad6270bced10fdd5367a3c" @@ -396,10 +412,22 @@ version "9.6.35" resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.35.tgz#197dd535c094362a7c95f0b78f07583d6681ed26" +"@types/puppeteer@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-1.12.1.tgz#f61f9e0da45e36cdbbeab3b088995a8a2cad47a4" + integrity sha512-6qpe7XXM93iWh8quEP8Ay516Vmfc2r+ZAxFH3Mt6fx3vzmZz+4Q+hYxc9PxeEIXJhWLAAPYAgAiM/vLHEUwGpw== + dependencies: + "@types/node" "*" + "@types/q@^0.0.32": version "0.0.32" resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" +"@types/relateurl@*": + version "0.2.28" + resolved "https://registry.yarnpkg.com/@types/relateurl/-/relateurl-0.2.28.tgz#6bda7db8653fa62643f5ee69e9f69c11a392e3a6" + integrity sha1-a9p9uGU/piZD9e5p6facEaOS46Y= + "@types/rimraf@^0.0.28": version "0.0.28" resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-0.0.28.tgz#5562519bc7963caca8abf7f128cae3b594d41d06" @@ -408,6 +436,13 @@ version "2.53.42" resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.42.tgz#74cb77fb6052edaff2a8984ddafd88d419f25cac" +"@types/uglify-js@*": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082" + integrity sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ== + dependencies: + source-map "^0.6.1" + "@types/unist@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.2.tgz#5dc0a7f76809b7518c0df58689cd16a19bd751c6" @@ -1048,10 +1083,6 @@ async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" -async@0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/async/-/async-0.9.0.tgz#ac3613b1da9bed1b47510bb4651b8931e47146c7" - async@1.x, async@^1.3.0, async@^1.4.0, async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -1325,7 +1356,7 @@ body-parser@1.18.2, body-parser@^1.16.1: raw-body "2.3.2" type-is "~1.6.15" -body-parser@1.18.3, body-parser@^1.18.3, body-parser@~1.18.3: +body-parser@1.18.3, body-parser@^1.18.3: version "1.18.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" dependencies: @@ -1902,14 +1933,6 @@ chrome-launcher@^0.10.5: mkdirp "0.5.1" rimraf "^2.6.1" -chrome-remote-interface@~0.25.7: - version "0.25.7" - resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.25.7.tgz#827e85fbef3cc561a9ef2404eb7eee355968c5bc" - integrity sha512-6zI6LbR2IiGmduFZededaerEr9hHXabxT/L+fRrdq65a0CfyLMzpq0BKuZiqN0Upqcacsb6q2POj7fmobwBsEA== - dependencies: - commander "2.11.x" - ws "3.3.x" - chrome-trace-event@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz#45a91bd2c20c9411f0963b5aaeb9a1b95e09cc48" @@ -2141,10 +2164,6 @@ comma-separated-tokens@^1.0.0, comma-separated-tokens@^1.0.1: dependencies: trim "0.0.1" -commander@2.11.x, commander@^2.8.1, commander@~2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - commander@2.15.1, commander@^2.12.1, commander@^2.9.0: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" @@ -2153,6 +2172,10 @@ commander@2.17.x, commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" +commander@^2.8.1, commander@~2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" @@ -2196,7 +2219,7 @@ compress-commons@^1.2.0: normalize-path "^2.0.0" readable-stream "^2.0.0" -compressible@^2.0.12, compressible@~2.0.14: +compressible@^2.0.12: version "2.0.15" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.15.tgz#857a9ab0a7e5a07d8d837ed43fe2defff64fe212" dependencies: @@ -2238,23 +2261,20 @@ compression@^1.7.0: safe-buffer "5.1.1" vary "~1.1.2" -compression@~1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" - integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.14" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.2" - vary "~1.1.2" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" +concat-stream@1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + concat-stream@^1.4.7, concat-stream@^1.5.0, concat-stream@^1.5.2, concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" @@ -2408,10 +2428,6 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -corser@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/corser/-/corser-2.0.1.tgz#8eda252ecaab5840dcd975ceb90d9370c819ff87" - cosmiconfig@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" @@ -2666,6 +2682,13 @@ debug@^3.0.0: dependencies: ms "^2.1.1" +debug@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -3066,15 +3089,6 @@ ecdsa-sig-formatter@1.0.9: base64url "^2.0.0" safe-buffer "^5.0.1" -ecstatic@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/ecstatic/-/ecstatic-1.4.1.tgz#32cb7b6fa2e290d58668674d115e8f0c3d567d6a" - dependencies: - he "^0.5.0" - mime "^1.2.11" - minimist "^1.1.0" - url-join "^1.0.0" - editions@^1.1.1, editions@^1.1.2, editions@^1.3.1, editions@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.3.tgz#0907101bdda20fac3cbe334c27cbd0688dc99a5b" @@ -3585,7 +3599,7 @@ express@^4.16.2: utils-merge "1.0.1" vary "~1.1.2" -express@^4.16.3, express@~4.16.3: +express@^4.16.3: version "4.16.4" resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" dependencies: @@ -3683,6 +3697,16 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +extract-zip@^1.6.6: + version "1.6.7" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9" + integrity sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k= + dependencies: + concat-stream "1.6.2" + debug "2.6.9" + mkdirp "0.5.1" + yauzl "2.4.1" + extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -3741,6 +3765,13 @@ faye-websocket@^0.10.0: dependencies: websocket-driver ">=0.5.1" +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + integrity sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU= + dependencies: + pend "~1.2.0" + figgy-pudding@^3.1.0, figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" @@ -4734,14 +4765,15 @@ hawk@~6.0.2: hoek "4.x.x" sntp "2.x.x" -he@1.1.1, he@1.1.x, he@~1.1.1: +he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= -he@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/he/-/he-0.5.0.tgz#2c05ffaef90b68e860f3fd2b54ef580989277ee2" +he@1.2.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== header-case@^1.0.0: version "1.0.1" @@ -4804,15 +4836,15 @@ html-entities@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" -html-minifier@^3.5.20: - version "3.5.20" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.20.tgz#7b19fd3caa0cb79f7cde5ee5c3abdf8ecaa6bb14" - integrity sha512-ZmgNLaTp54+HFKkONyLFEfs5dd/ZOtlquKaTnqIWFmx3Av5zG6ZPcV2d0o9XM2fXOTxxIf6eDcwzFFotke/5zA== +html-minifier@^3.5.21: + version "3.5.21" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.21.tgz#d0040e054730e354db008463593194015212d20c" + integrity sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA== dependencies: camel-case "3.0.x" clean-css "4.2.x" commander "2.17.x" - he "1.1.x" + he "1.2.x" param-case "2.1.x" relateurl "0.2.x" uglify-js "3.4.x" @@ -4889,25 +4921,19 @@ http-proxy-middleware@~0.18.0: lodash "^4.17.5" micromatch "^3.1.9" -http-proxy@1.16.2, http-proxy@^1.13.0, http-proxy@^1.16.2, http-proxy@^1.8.1: +http-proxy@1.16.2, http-proxy@^1.13.0, http-proxy@^1.16.2: version "1.16.2" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" dependencies: eventemitter3 "1.x.x" requires-port "1.x.x" -http-server@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/http-server/-/http-server-0.9.0.tgz#8f1b06bdc733618d4dc42831c7ba1aff4e06001a" +http-server-spa@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/http-server-spa/-/http-server-spa-1.3.0.tgz#2892c0ade750e1c3826b3589744e1c17c46aa6a5" + integrity sha512-NfXBksDzoiBOo1IrMDtxpKJ8FOHLqy0YdijYjqMoRcS7AWPf6MzhRvKe2KiXxENlqTRqkOH418SvbxC6GzG2TA== dependencies: - colors "1.0.3" - corser "~2.0.0" - ecstatic "^1.4.0" - http-proxy "^1.8.1" - opener "~1.4.0" - optimist "0.6.x" - portfinder "0.4.x" - union "~0.4.3" + mime "^1.3.4" http-signature@~1.1.0: version "1.1.1" @@ -6730,10 +6756,15 @@ mime-types@~2.1.7: dependencies: mime-db "~1.37.0" -mime@1.4.1, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1: +mime@1.4.1, mime@^1.3.4, mime@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" +mime@^2.0.3: + version "2.4.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.0.tgz#e051fd881358585f3279df333fe694da0bcffdd6" + integrity sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w== + mime@^2.2.0, mime@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" @@ -7028,11 +7059,6 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5" - integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA== - node-forge@0.7.1, node-forge@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300" @@ -7386,10 +7412,6 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -opener@~1.4.0: - version "1.4.3" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8" - opn@4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" @@ -7409,7 +7431,7 @@ opn@^5.3.0: dependencies: is-wsl "^1.1.0" -optimist@0.6.x, optimist@^0.6.1, optimist@~0.6.0, optimist@~0.6.1: +optimist@^0.6.1, optimist@~0.6.0, optimist@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" dependencies: @@ -7804,6 +7826,11 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" @@ -7865,13 +7892,6 @@ pn@^1.1.0: resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== -portfinder@0.4.x: - version "0.4.0" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-0.4.0.tgz#a3ffadffafe4fb98e0601a85eda27c27ce84ca1e" - dependencies: - async "0.9.0" - mkdirp "0.5.x" - portfinder@1.0.17: version "1.0.17" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.17.tgz#a8a1691143e46c4735edefcf4fbcccedad26456a" @@ -7970,18 +7990,6 @@ prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" -prerender@^5.4.5: - version "5.4.5" - resolved "https://registry.yarnpkg.com/prerender/-/prerender-5.4.5.tgz#1ba1a1136a27362840fb0c2f97d3acfec35ecf0f" - integrity sha512-oA/tZpCcWkpUj7KLtBJfb46OZN5cQLgqnSLtG6VsQgpPglv/deP0UCNR3ZKoNrrJaxcruGhfwhPL3c8gx1ncuw== - dependencies: - body-parser "~1.18.3" - chrome-remote-interface "~0.25.7" - compression "~1.7.3" - express "~4.16.3" - he "~1.1.1" - valid-url "~1.0.9" - preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" @@ -8006,6 +8014,11 @@ progress@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" +progress@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" @@ -8080,6 +8093,11 @@ proxy-addr@~2.0.3, proxy-addr@~2.0.4: forwarded "~0.1.2" ipaddr.js "1.8.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" + integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4= + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -8161,6 +8179,20 @@ punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +puppeteer@^1.12.2: + version "1.12.2" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.12.2.tgz#dbc36afc3ba2d7182b1a37523c0081a0e8507c9a" + integrity sha512-xWSyCeD6EazGlfnQweMpM+Hs6X6PhUYhNTHKFj/axNZDq4OmrVERf70isBf7HsnFgB3zOC1+23/8+wCAZYg+Pg== + dependencies: + debug "^4.1.0" + extract-zip "^1.6.6" + https-proxy-agent "^2.2.1" + mime "^2.0.3" + progress "^2.0.1" + proxy-from-env "^1.0.0" + rimraf "^2.6.1" + ws "^6.1.0" + q@1.4.1, q@~1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" @@ -8181,10 +8213,6 @@ qs@6.5.2, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" -qs@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-2.3.3.tgz#e9e85adbe75da0bbe4c8e0476a086290f863b404" - qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" @@ -10484,12 +10512,6 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" -union@~0.4.3: - version "0.4.6" - resolved "https://registry.yarnpkg.com/union/-/union-0.4.6.tgz#198fbdaeba254e788b0efcb630bc11f24a2959e0" - dependencies: - qs "~2.3.3" - unique-filename@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" @@ -10671,10 +10693,6 @@ url-join@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/url-join/-/url-join-0.0.1.tgz#1db48ad422d3402469a87f7d97bdebfe4fb1e3c8" -url-join@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-1.1.0.tgz#741c6c2f4596c4830d6718460920d0c92202dc78" - url-join@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" @@ -10792,7 +10810,7 @@ v8flags@^3.0.0: dependencies: homedir-polyfill "^1.0.1" -valid-url@^1, valid-url@~1.0.9: +valid-url@^1: version "1.0.9" resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" @@ -11305,15 +11323,6 @@ ws@3.3.2: safe-buffer "~5.1.0" ultron "~1.1.0" -ws@3.3.x: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - ws@^1.0.1: version "1.1.4" resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.4.tgz#57f40d036832e5f5055662a397c4de76ed66bf61" @@ -11321,6 +11330,13 @@ ws@^1.0.1: options ">=0.0.5" ultron "1.0.x" +ws@^6.1.0: + version "6.1.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.3.tgz#d2d2e5f0e3c700ef2de89080ebc0ac6e1bf3a72d" + integrity sha512-tbSxiT+qJI223AP4iLfQbkbxkwdFcneYinM2+x46Gx2wgvbaOMO36czfdfVUBRTHvzAMRhDd98sA5d/BuWbQdg== + dependencies: + async-limiter "~1.0.0" + ws@^6.1.2: version "6.1.2" resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.2.tgz#3cc7462e98792f0ac679424148903ded3b9c3ad8" @@ -11565,6 +11581,13 @@ yargs@~3.10.0: decamelize "^1.0.0" window-size "0.1.0" +yauzl@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + integrity sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU= + dependencies: + fd-slicer "~1.0.1" + yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"