diff --git a/build-scripts/babel.js b/build-scripts/babel.js index 978d84899e..c02b53e413 100644 --- a/build-scripts/babel.js +++ b/build-scripts/babel.js @@ -24,17 +24,8 @@ module.exports.options = ({ latestBuild }) => ({ ], }); -module.exports.babelLoaderConfig = ({ latestBuild }) => { - if (latestBuild === undefined) { - throw Error("latestBuild not defined for babel loader config"); - } - return { - test: /\.m?js$|\.tsx?$/, - // Are already ES5, cause warnings when babelified. - exclude: [require.resolve("@mdi/js/mdi.js"), require.resolve("hls.js")], - use: { - loader: "babel-loader", - options: module.exports.options({ latestBuild }), - }, - }; -}; +// Are already ES5, cause warnings when babelified. +module.exports.exclude = [ + require.resolve("@mdi/js/mdi.js"), + require.resolve("hls.js"), +]; diff --git a/build-scripts/bundle.js b/build-scripts/bundle.js index 7627d8588b..51f3bc345d 100644 --- a/build-scripts/bundle.js +++ b/build-scripts/bundle.js @@ -36,6 +36,7 @@ module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({ module.exports.terserOptions = (latestBuild) => ({ safari10: true, ecma: latestBuild ? undefined : 5, + output: { comments: false }, }); const outputPath = (outputRoot, latestBuild) => diff --git a/build-scripts/env.js b/build-scripts/env.js index 72a9e794d2..8980d3bf92 100644 --- a/build-scripts/env.js +++ b/build-scripts/env.js @@ -3,8 +3,13 @@ const path = require("path"); const paths = require("./paths.js"); module.exports = { + useRollup() { + return process.env.ROLLUP === "1"; + }, isProdBuild() { - return process.env.NODE_ENV === "production"; + return ( + process.env.NODE_ENV === "production" || module.exports.isStatsBuild() + ); }, isStatsBuild() { return process.env.STATS === "1"; diff --git a/build-scripts/gulp/app.js b/build-scripts/gulp/app.js index 1bd5c4750b..9429260617 100644 --- a/build-scripts/gulp/app.js +++ b/build-scripts/gulp/app.js @@ -1,7 +1,7 @@ // Run HA develop mode const gulp = require("gulp"); -const envVars = require("../env"); +const env = require("../env"); require("./clean.js"); require("./translations.js"); @@ -11,6 +11,7 @@ require("./compress.js"); require("./webpack.js"); require("./service-worker.js"); require("./entry-html.js"); +require("./rollup.js"); gulp.task( "develop-app", @@ -26,8 +27,8 @@ gulp.task( "gen-index-app-dev", "build-translations" ), - "copy-static", - "webpack-watch-app" + "copy-static-app", + env.useRollup() ? "rollup-watch-app" : "webpack-watch-app" ) ); @@ -39,10 +40,10 @@ gulp.task( }, "clean", gulp.parallel("gen-icons-json", "build-translations"), - "copy-static", - "webpack-prod-app", + "copy-static-app", + env.useRollup() ? "rollup-prod-app" : "webpack-prod-app", ...// Don't compress running tests - (envVars.isTest() ? [] : ["compress-app"]), + (env.isTest() ? [] : ["compress-app"]), gulp.parallel( "gen-pages-prod", "gen-index-app-prod", diff --git a/build-scripts/gulp/cast.js b/build-scripts/gulp/cast.js index ad393f74b4..4d9a7fe34f 100644 --- a/build-scripts/gulp/cast.js +++ b/build-scripts/gulp/cast.js @@ -1,11 +1,14 @@ const gulp = require("gulp"); +const env = require("../env"); + require("./clean.js"); require("./translations.js"); require("./gather-static.js"); require("./webpack.js"); require("./service-worker.js"); require("./entry-html.js"); +require("./rollup.js"); gulp.task( "develop-cast", @@ -17,7 +20,7 @@ gulp.task( "translations-enable-merge-backend", gulp.parallel("gen-icons-json", "build-translations"), "copy-static-cast", - "webpack-dev-server-cast" + env.useRollup() ? "rollup-dev-server-cast" : "webpack-dev-server-cast" ) ); @@ -31,7 +34,7 @@ gulp.task( "translations-enable-merge-backend", gulp.parallel("gen-icons-json", "build-translations"), "copy-static-cast", - "webpack-prod-cast", + env.useRollup() ? "rollup-prod-cast" : "webpack-prod-cast", "gen-index-cast-prod" ) ); diff --git a/build-scripts/gulp/demo.js b/build-scripts/gulp/demo.js index eef9ebbecf..466ade84b2 100644 --- a/build-scripts/gulp/demo.js +++ b/build-scripts/gulp/demo.js @@ -1,6 +1,8 @@ // Run demo develop mode const gulp = require("gulp"); +const env = require("../env"); + require("./clean.js"); require("./translations.js"); require("./gen-icons-json.js"); @@ -8,6 +10,7 @@ require("./gather-static.js"); require("./webpack.js"); require("./service-worker.js"); require("./entry-html.js"); +require("./rollup.js"); gulp.task( "develop-demo", @@ -19,7 +22,7 @@ gulp.task( "translations-enable-merge-backend", gulp.parallel("gen-icons-json", "gen-index-demo-dev", "build-translations"), "copy-static-demo", - "webpack-dev-server-demo" + env.useRollup() ? "rollup-dev-server-demo" : "webpack-dev-server-demo" ) ); @@ -34,7 +37,7 @@ gulp.task( "translations-enable-merge-backend", gulp.parallel("gen-icons-json", "build-translations"), "copy-static-demo", - "webpack-prod-demo", + env.useRollup() ? "rollup-prod-demo" : "webpack-prod-demo", "gen-index-demo-prod" ) ); diff --git a/build-scripts/gulp/entry-html.js b/build-scripts/gulp/entry-html.js index 71fd5dd0e8..094a41cc47 100644 --- a/build-scripts/gulp/entry-html.js +++ b/build-scripts/gulp/entry-html.js @@ -6,31 +6,36 @@ const fs = require("fs-extra"); const path = require("path"); const template = require("lodash.template"); const minify = require("html-minifier").minify; -const config = require("../paths.js"); +const paths = require("../paths.js"); +const env = require("../env.js"); const templatePath = (tpl) => - path.resolve(config.polymer_dir, "src/html/", `${tpl}.html.template`); + path.resolve(paths.polymer_dir, "src/html/", `${tpl}.html.template`); const readFile = (pth) => fs.readFileSync(pth).toString(); const renderTemplate = (pth, data = {}, pathFunc = templatePath) => { const compiled = template(readFile(pathFunc(pth))); - return compiled({ ...data, renderTemplate }); + return compiled({ + ...data, + useRollup: env.useRollup(), + renderTemplate, + }); }; const renderDemoTemplate = (pth, data = {}) => renderTemplate(pth, data, (tpl) => - path.resolve(config.demo_dir, "src/html/", `${tpl}.html.template`) + path.resolve(paths.demo_dir, "src/html/", `${tpl}.html.template`) ); const renderCastTemplate = (pth, data = {}) => renderTemplate(pth, data, (tpl) => - path.resolve(config.cast_dir, "src/html/", `${tpl}.html.template`) + path.resolve(paths.cast_dir, "src/html/", `${tpl}.html.template`) ); const renderGalleryTemplate = (pth, data = {}) => renderTemplate(pth, data, (tpl) => - path.resolve(config.gallery_dir, "src/html/", `${tpl}.html.template`) + path.resolve(paths.gallery_dir, "src/html/", `${tpl}.html.template`) ); const minifyHtml = (content) => @@ -52,14 +57,14 @@ gulp.task("gen-pages-dev", (done) => { es5PageJS: `/frontend_es5/${page}.js`, }); - fs.outputFileSync(path.resolve(config.root, `${page}.html`), content); + fs.outputFileSync(path.resolve(paths.root, `${page}.html`), content); } done(); }); gulp.task("gen-pages-prod", (done) => { - const latestManifest = require(path.resolve(config.output, "manifest.json")); - const es5Manifest = require(path.resolve(config.output_es5, "manifest.json")); + const latestManifest = require(path.resolve(paths.output, "manifest.json")); + const es5Manifest = require(path.resolve(paths.output_es5, "manifest.json")); for (const page of PAGES) { const content = renderTemplate(page, { @@ -70,7 +75,7 @@ gulp.task("gen-pages-prod", (done) => { }); fs.outputFileSync( - path.resolve(config.root, `${page}.html`), + path.resolve(paths.root, `${page}.html`), minifyHtml(content) ); } @@ -91,13 +96,13 @@ gulp.task("gen-index-app-dev", (done) => { es5CustomPanelJS: "/frontend_es5/custom-panel.js", }).replace(/#THEMEC/g, "{{ theme_color }}"); - fs.outputFileSync(path.resolve(config.root, "index.html"), content); + fs.outputFileSync(path.resolve(paths.root, "index.html"), content); done(); }); gulp.task("gen-index-app-prod", (done) => { - const latestManifest = require(path.resolve(config.output, "manifest.json")); - const es5Manifest = require(path.resolve(config.output_es5, "manifest.json")); + const latestManifest = require(path.resolve(paths.output, "manifest.json")); + const es5Manifest = require(path.resolve(paths.output_es5, "manifest.json")); const content = renderTemplate("index", { latestAppJS: latestManifest["app.js"], latestCoreJS: latestManifest["core.js"], @@ -110,7 +115,7 @@ gulp.task("gen-index-app-prod", (done) => { }); const minified = minifyHtml(content).replace(/#THEMEC/g, "{{ theme_color }}"); - fs.outputFileSync(path.resolve(config.root, "index.html"), minified); + fs.outputFileSync(path.resolve(paths.root, "index.html"), minified); done(); }); @@ -119,7 +124,7 @@ gulp.task("gen-index-cast-dev", (done) => { latestReceiverJS: "/frontend_latest/receiver.js", }); fs.outputFileSync( - path.resolve(config.cast_root, "receiver.html"), + path.resolve(paths.cast_root, "receiver.html"), contentReceiver ); @@ -127,14 +132,14 @@ gulp.task("gen-index-cast-dev", (done) => { latestLauncherJS: "/frontend_latest/launcher.js", es5LauncherJS: "/frontend_es5/launcher.js", }); - fs.outputFileSync(path.resolve(config.cast_root, "faq.html"), contentFAQ); + fs.outputFileSync(path.resolve(paths.cast_root, "faq.html"), contentFAQ); const contentLauncher = renderCastTemplate("launcher", { latestLauncherJS: "/frontend_latest/launcher.js", es5LauncherJS: "/frontend_es5/launcher.js", }); fs.outputFileSync( - path.resolve(config.cast_root, "index.html"), + path.resolve(paths.cast_root, "index.html"), contentLauncher ); done(); @@ -142,11 +147,11 @@ gulp.task("gen-index-cast-dev", (done) => { gulp.task("gen-index-cast-prod", (done) => { const latestManifest = require(path.resolve( - config.cast_output, + paths.cast_output, "manifest.json" )); const es5Manifest = require(path.resolve( - config.cast_output_es5, + paths.cast_output_es5, "manifest.json" )); @@ -154,7 +159,7 @@ gulp.task("gen-index-cast-prod", (done) => { latestReceiverJS: latestManifest["receiver.js"], }); fs.outputFileSync( - path.resolve(config.cast_root, "receiver.html"), + path.resolve(paths.cast_root, "receiver.html"), contentReceiver ); @@ -162,14 +167,14 @@ gulp.task("gen-index-cast-prod", (done) => { latestLauncherJS: latestManifest["launcher.js"], es5LauncherJS: es5Manifest["launcher.js"], }); - fs.outputFileSync(path.resolve(config.cast_root, "faq.html"), contentFAQ); + fs.outputFileSync(path.resolve(paths.cast_root, "faq.html"), contentFAQ); const contentLauncher = renderCastTemplate("launcher", { latestLauncherJS: latestManifest["launcher.js"], es5LauncherJS: es5Manifest["launcher.js"], }); fs.outputFileSync( - path.resolve(config.cast_root, "index.html"), + path.resolve(paths.cast_root, "index.html"), contentLauncher ); done(); @@ -185,17 +190,17 @@ gulp.task("gen-index-demo-dev", (done) => { es5DemoJS: "/frontend_es5/main.js", }); - fs.outputFileSync(path.resolve(config.demo_root, "index.html"), content); + fs.outputFileSync(path.resolve(paths.demo_root, "index.html"), content); done(); }); gulp.task("gen-index-demo-prod", (done) => { const latestManifest = require(path.resolve( - config.demo_output, + paths.demo_output, "manifest.json" )); const es5Manifest = require(path.resolve( - config.demo_output_es5, + paths.demo_output_es5, "manifest.json" )); const content = renderDemoTemplate("index", { @@ -206,7 +211,7 @@ gulp.task("gen-index-demo-prod", (done) => { }); const minified = minifyHtml(content); - fs.outputFileSync(path.resolve(config.demo_root, "index.html"), minified); + fs.outputFileSync(path.resolve(paths.demo_root, "index.html"), minified); done(); }); @@ -217,13 +222,13 @@ gulp.task("gen-index-gallery-dev", (done) => { latestGalleryJS: "./frontend_latest/entrypoint.js", }); - fs.outputFileSync(path.resolve(config.gallery_root, "index.html"), content); + fs.outputFileSync(path.resolve(paths.gallery_root, "index.html"), content); done(); }); gulp.task("gen-index-gallery-prod", (done) => { const latestManifest = require(path.resolve( - config.gallery_output, + paths.gallery_output, "manifest.json" )); const content = renderGalleryTemplate("index", { @@ -231,6 +236,6 @@ gulp.task("gen-index-gallery-prod", (done) => { }); const minified = minifyHtml(content); - fs.outputFileSync(path.resolve(config.gallery_root, "index.html"), minified); + fs.outputFileSync(path.resolve(paths.gallery_root, "index.html"), minified); done(); }); diff --git a/build-scripts/gulp/gallery.js b/build-scripts/gulp/gallery.js index 559b0debde..ec430118e5 100644 --- a/build-scripts/gulp/gallery.js +++ b/build-scripts/gulp/gallery.js @@ -1,6 +1,8 @@ // Run demo develop mode const gulp = require("gulp"); +const env = require("../env"); + require("./clean.js"); require("./translations.js"); require("./gen-icons-json.js"); @@ -8,6 +10,7 @@ require("./gather-static.js"); require("./webpack.js"); require("./service-worker.js"); require("./entry-html.js"); +require("./rollup.js"); gulp.task( "develop-gallery", @@ -20,7 +23,7 @@ gulp.task( gulp.parallel("gen-icons-json", "build-translations"), "copy-static-gallery", "gen-index-gallery-dev", - "webpack-dev-server-gallery" + env.useRollup() ? "rollup-dev-server-gallery" : "webpack-dev-server-gallery" ) ); @@ -34,7 +37,7 @@ gulp.task( "translations-enable-merge-backend", gulp.parallel("gen-icons-json", "build-translations"), "copy-static-gallery", - "webpack-prod-gallery", + env.useRollup() ? "rollup-prod-gallery" : "webpack-prod-gallery", "gen-index-gallery-prod" ) ); diff --git a/build-scripts/gulp/gather-static.js b/build-scripts/gulp/gather-static.js index 7dc4e19443..55ad3ec1ca 100644 --- a/build-scripts/gulp/gather-static.js +++ b/build-scripts/gulp/gather-static.js @@ -51,6 +51,12 @@ function copyPolyfills(staticDir) { ); } +function copyLoaderJS(staticDir) { + const staticPath = genStaticPath(staticDir); + copyFileDir(npmPath("systemjs/dist/s.min.js"), staticPath("js")); + copyFileDir(npmPath("systemjs/dist/s.min.js.map"), staticPath("js")); +} + function copyFonts(staticDir) { const staticPath = genStaticPath(staticDir); // Local fonts @@ -72,17 +78,17 @@ function copyMapPanel(staticDir) { ); } -gulp.task("copy-translations", (done) => { +gulp.task("copy-translations-app", async () => { const staticDir = paths.static; copyTranslations(staticDir); - done(); }); -gulp.task("copy-static", (done) => { +gulp.task("copy-static-app", async () => { const staticDir = paths.static; // Basic static files fs.copySync(polyPath("public"), paths.root); + copyLoaderJS(staticDir); copyPolyfills(staticDir); copyFonts(staticDir); copyTranslations(staticDir); @@ -90,10 +96,9 @@ gulp.task("copy-static", (done) => { // Panel assets copyMapPanel(staticDir); - done(); }); -gulp.task("copy-static-demo", (done) => { +gulp.task("copy-static-demo", async () => { // Copy app static files fs.copySync( polyPath("public/static"), @@ -102,28 +107,29 @@ gulp.task("copy-static-demo", (done) => { // Copy demo static files fs.copySync(path.resolve(paths.demo_dir, "public"), paths.demo_root); + copyLoaderJS(paths.demo_static); copyPolyfills(paths.demo_static); copyMapPanel(paths.demo_static); copyFonts(paths.demo_static); copyTranslations(paths.demo_static); copyMdiIcons(paths.demo_static); - done(); }); -gulp.task("copy-static-cast", (done) => { +gulp.task("copy-static-cast", async () => { // Copy app static files fs.copySync(polyPath("public/static"), paths.cast_static); // Copy cast static files fs.copySync(path.resolve(paths.cast_dir, "public"), paths.cast_root); + copyLoaderJS(paths.cast_static); + copyPolyfills(paths.cast_static); copyMapPanel(paths.cast_static); copyFonts(paths.cast_static); copyTranslations(paths.cast_static); copyMdiIcons(paths.cast_static); - done(); }); -gulp.task("copy-static-gallery", (done) => { +gulp.task("copy-static-gallery", async () => { // Copy app static files fs.copySync(polyPath("public/static"), paths.gallery_static); // Copy gallery static files @@ -133,5 +139,4 @@ gulp.task("copy-static-gallery", (done) => { copyFonts(paths.gallery_static); copyTranslations(paths.gallery_static); copyMdiIcons(paths.gallery_static); - done(); }); diff --git a/build-scripts/gulp/hassio.js b/build-scripts/gulp/hassio.js index 9591d60278..595752008c 100644 --- a/build-scripts/gulp/hassio.js +++ b/build-scripts/gulp/hassio.js @@ -1,11 +1,12 @@ const gulp = require("gulp"); -const envVars = require("../env"); +const env = require("../env"); require("./clean.js"); require("./gen-icons-json.js"); require("./webpack.js"); require("./compress.js"); +require("./rollup.js"); gulp.task( "develop-hassio", @@ -15,7 +16,7 @@ gulp.task( }, "clean-hassio", "gen-icons-json", - "webpack-watch-hassio" + env.useRollup() ? "rollup-watch-hassio" : "webpack-watch-hassio" ) ); @@ -27,8 +28,8 @@ gulp.task( }, "clean-hassio", "gen-icons-json", - "webpack-prod-hassio", + env.useRollup() ? "rollup-prod-hassio" : "webpack-prod-hassio", ...// Don't compress running tests - (envVars.isTest() ? [] : ["compress-hassio"]) + (env.isTest() ? [] : ["compress-hassio"]) ) ); diff --git a/build-scripts/gulp/rollup.js b/build-scripts/gulp/rollup.js new file mode 100644 index 0000000000..606432c634 --- /dev/null +++ b/build-scripts/gulp/rollup.js @@ -0,0 +1,149 @@ +// Tasks to run Rollup +const path = require("path"); +const gulp = require("gulp"); +const rollup = require("rollup"); +const handler = require("serve-handler"); +const http = require("http"); +const log = require("fancy-log"); +const rollupConfig = require("../rollup"); +const paths = require("../paths"); +const open = require("open"); + +const bothBuilds = (createConfigFunc, params) => + gulp.series( + async function buildLatest() { + await buildRollup( + createConfigFunc({ + ...params, + latestBuild: true, + }) + ); + }, + async function buildES5() { + await buildRollup( + createConfigFunc({ + ...params, + latestBuild: false, + }) + ); + } + ); + +function createServer(serveOptions) { + const server = http.createServer((request, response) => { + return handler(request, response, { + public: serveOptions.root, + }); + }); + + server.listen( + serveOptions.port, + serveOptions.networkAccess ? "0.0.0.0" : undefined, + () => { + log.info(`Available at http://localhost:${serveOptions.port}`); + open(`http://localhost:${serveOptions.port}`); + } + ); +} + +function watchRollup(createConfig, extraWatchSrc = [], serveOptions) { + const { inputOptions, outputOptions } = createConfig({ + isProdBuild: false, + latestBuild: true, + }); + + const watcher = rollup.watch({ + ...inputOptions, + output: [outputOptions], + watch: { + include: ["src"] + extraWatchSrc, + }, + }); + + let startedHttp = false; + + watcher.on("event", (event) => { + if (event.code === "ERROR") { + log.error(event.error); + } else if (event.code === "END") { + if (startedHttp || !serveOptions) { + return; + } + startedHttp = true; + createServer(serveOptions); + } + }); + + gulp.watch( + path.join(paths.translations_src, "en.json"), + gulp.series("build-translations", "copy-translations-app") + ); +} + +async function buildRollup(config) { + const bundle = await rollup.rollup(config.inputOptions); + await bundle.write(config.outputOptions); +} + +gulp.task("rollup-watch-app", () => { + watchRollup(rollupConfig.createAppConfig); +}); + +gulp.task("rollup-watch-hassio", () => { + watchRollup(rollupConfig.createHassioConfig, ["hassio/src"]); +}); + +gulp.task("rollup-dev-server-demo", () => { + watchRollup(rollupConfig.createDemoConfig, ["demo/src"], { + root: paths.demo_root, + port: 8090, + }); +}); + +gulp.task("rollup-dev-server-cast", () => { + watchRollup(rollupConfig.createCastConfig, ["cast/src"], { + root: paths.cast_root, + port: 8080, + networkAccess: true, + }); +}); + +gulp.task("rollup-dev-server-gallery", () => { + watchRollup(rollupConfig.createGalleryConfig, ["gallery/src"], { + root: paths.gallery_root, + port: 8100, + }); +}); + +gulp.task( + "rollup-prod-app", + bothBuilds(rollupConfig.createAppConfig, { isProdBuild: true }) +); + +gulp.task( + "rollup-prod-demo", + bothBuilds(rollupConfig.createDemoConfig, { isProdBuild: true }) +); + +gulp.task( + "rollup-prod-cast", + bothBuilds(rollupConfig.createCastConfig, { isProdBuild: true }) +); + +gulp.task("rollup-prod-hassio", () => + buildRollup( + rollupConfig.createHassioConfig({ + isProdBuild: true, + latestBuild: false, + }) + ) +); + +gulp.task("rollup-prod-gallery", () => + buildRollup( + rollupConfig.createGalleryConfig({ + isProdBuild: true, + latestBuild: true, + }) + ) +); diff --git a/build-scripts/gulp/webpack.js b/build-scripts/gulp/webpack.js index a9e39c7bd5..226bb967bc 100644 --- a/build-scripts/gulp/webpack.js +++ b/build-scripts/gulp/webpack.js @@ -38,9 +38,9 @@ const runDevServer = ({ const handler = (done) => (err, stats) => { if (err) { - console.log(err.stack || err); + log.error(err.stack || err); if (err.details) { - console.log(err.details); + log.error(err.details); } return; } @@ -48,7 +48,7 @@ const handler = (done) => (err, stats) => { log(`Build done @ ${new Date().toLocaleTimeString()}`); if (stats.hasErrors() || stats.hasWarnings()) { - console.log(stats.toString("minimal")); + log.warn(stats.toString("minimal")); } if (done) { @@ -64,7 +64,7 @@ gulp.task("webpack-watch-app", () => { ); gulp.watch( path.join(paths.translations_src, "en.json"), - gulp.series("build-translations", "copy-translations") + gulp.series("build-translations", "copy-translations-app") ); }); diff --git a/build-scripts/rollup-plugins/dont-hash-plugin.js b/build-scripts/rollup-plugins/dont-hash-plugin.js new file mode 100644 index 0000000000..89082b90c2 --- /dev/null +++ b/build-scripts/rollup-plugins/dont-hash-plugin.js @@ -0,0 +1,14 @@ +module.exports = function (opts = {}) { + const dontHash = opts.dontHash || new Set(); + + return { + name: "dont-hash", + renderChunk(_code, chunk, _options) { + if (!chunk.isEntry || !dontHash.has(chunk.name)) { + return null; + } + chunk.fileName = `${chunk.name}.js`; + return null; + }, + }; +}; diff --git a/build-scripts/rollup-plugins/manifest-plugin.js b/build-scripts/rollup-plugins/manifest-plugin.js new file mode 100644 index 0000000000..bf4bbaac05 --- /dev/null +++ b/build-scripts/rollup-plugins/manifest-plugin.js @@ -0,0 +1,34 @@ +const url = require("url"); + +const defaultOptions = { + publicPath: "", +}; + +module.exports = function (userOptions = {}) { + const options = { ...defaultOptions, ...userOptions }; + + return { + name: "manifest", + generateBundle(outputOptions, bundle) { + const manifest = {}; + + for (const chunk of Object.values(bundle)) { + if (!chunk.isEntry) { + continue; + } + // Add js extension to mimic Webpack manifest. + manifest[`${chunk.name}.js`] = url.resolve( + options.publicPath, + chunk.fileName + ); + } + + this.emitFile({ + type: "asset", + source: JSON.stringify(manifest, undefined, 2), + name: "manifest.json", + fileName: "manifest.json", + }); + }, + }; +}; diff --git a/build-scripts/rollup-plugins/worker-plugin.js b/build-scripts/rollup-plugins/worker-plugin.js new file mode 100644 index 0000000000..c075a08495 --- /dev/null +++ b/build-scripts/rollup-plugins/worker-plugin.js @@ -0,0 +1,148 @@ +// Worker plugin +// Each worker will include all of its dependencies +// instead of relying on an importer. + +// Forked from v.1.4.1 +// https://github.com/surma/rollup-plugin-off-main-thread +/** + * Copyright 2018 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const rollup = require("rollup"); +const path = require("path"); +const MagicString = require("magic-string"); + +const defaultOpts = { + // A RegExp to find `new Workers()` calls. The second capture group _must_ + // capture the provided file name without the quotes. + workerRegexp: /new Worker\((["'])(.+?)\1(,[^)]+)?\)/g, + plugins: ["node-resolve", "commonjs", "babel"], +}; + +async function getBundledWorker(workerPath, rollupOptions) { + const bundle = await rollup.rollup({ + ...rollupOptions, + input: { + worker: workerPath, + }, + }); + const { output } = await bundle.generate({ + // Generates cleanest output, we shouldn't have any imports/exports + // that would be incompatible with ES5. + format: "es", + // We should not export anything. This will fail build if we are. + exports: "none", + }); + + let code; + + for (const chunkOrAsset of output) { + if (chunkOrAsset.name === "worker") { + code = chunkOrAsset.code; + } else if (chunkOrAsset.type !== "asset") { + throw new Error("Unexpected extra output"); + } + } + + return code; +} + +module.exports = function (opts = {}) { + opts = { ...defaultOpts, ...opts }; + + let rollupOptions; + let refIds; + + return { + name: "hass-worker", + + async buildStart(options) { + refIds = {}; + rollupOptions = { + plugins: options.plugins.filter((plugin) => + opts.plugins.includes(plugin.name) + ), + }; + }, + + async transform(code, id) { + // Copy the regexp as they are stateful and this hook is async. + const workerRegexp = new RegExp( + opts.workerRegexp.source, + opts.workerRegexp.flags + ); + if (!workerRegexp.test(code)) { + return; + } + + const ms = new MagicString(code); + // Reset the regexp + workerRegexp.lastIndex = 0; + while (true) { + const match = workerRegexp.exec(code); + if (!match) { + break; + } + + const workerFile = match[2]; + let optionsObject = {}; + // Parse the optional options object + if (match[3] && match[3].length > 0) { + // FIXME: ooooof! + optionsObject = new Function(`return ${match[3].slice(1)};`)(); + } + delete optionsObject.type; + + if (!new RegExp("^.*/").test(workerFile)) { + this.warn( + `Paths passed to the Worker constructor must be relative or absolute, i.e. start with /, ./ or ../ (just like dynamic import!). Ignoring "${workerFile}".` + ); + continue; + } + + // Find worker file and store it as a chunk with ID prefixed for our loader + const resolvedWorkerFile = (await this.resolve(workerFile, id)).id; + let chunkRefId; + if (resolvedWorkerFile in refIds) { + chunkRefId = refIds[resolvedWorkerFile]; + } else { + const source = await getBundledWorker( + resolvedWorkerFile, + rollupOptions + ); + chunkRefId = refIds[resolvedWorkerFile] = this.emitFile({ + name: path.basename(resolvedWorkerFile), + source, + type: "asset", + }); + } + + const workerParametersStartIndex = match.index + "new Worker(".length; + const workerParametersEndIndex = + match.index + match[0].length - ")".length; + + ms.overwrite( + workerParametersStartIndex, + workerParametersEndIndex, + `import.meta.ROLLUP_FILE_URL_${chunkRefId}, ${JSON.stringify( + optionsObject + )}` + ); + } + + return { + code: ms.toString(), + map: ms.generateMap({ hires: true }), + }; + }, + }; +}; diff --git a/build-scripts/rollup.js b/build-scripts/rollup.js new file mode 100644 index 0000000000..ad3474a73b --- /dev/null +++ b/build-scripts/rollup.js @@ -0,0 +1,141 @@ +const path = require("path"); + +const commonjs = require("@rollup/plugin-commonjs"); +const resolve = require("@rollup/plugin-node-resolve"); +const json = require("@rollup/plugin-json"); +const babel = require("rollup-plugin-babel"); +const replace = require("@rollup/plugin-replace"); +const visualizer = require("rollup-plugin-visualizer"); +const { string } = require("rollup-plugin-string"); +const { terser } = require("rollup-plugin-terser"); +const manifest = require("./rollup-plugins/manifest-plugin"); +const worker = require("./rollup-plugins/worker-plugin"); +const dontHashPlugin = require("./rollup-plugins/dont-hash-plugin"); + +const babelConfig = require("./babel"); +const bundle = require("./bundle"); + +const extensions = [".js", ".ts"]; + +/** + * @param {Object} arg + * @param { import("rollup").InputOption } arg.input + */ +const createRollupConfig = ({ + entry, + outputPath, + defineOverlay, + isProdBuild, + latestBuild, + isStatsBuild, + publicPath, + dontHash, +}) => { + return { + /** + * @type { import("rollup").InputOptions } + */ + inputOptions: { + input: entry, + // Some entry points contain no JavaScript. This setting silences a warning about that. + // https://rollupjs.org/guide/en/#preserveentrysignatures + preserveEntrySignatures: false, + external: bundle.ignorePackages + bundle.emptyPackages, + plugins: [ + resolve({ extensions, preferBuiltins: false, browser: true }), + commonjs({ + namedExports: { + "js-yaml": ["safeDump", "safeLoad"], + }, + }), + json(), + babel({ + ...babelConfig.options({ latestBuild }), + extensions, + babelrc: false, + exclude: babelConfig.exclude, + }), + string({ + // Import certain extensions as strings + include: ["**/*.css"], + }), + replace( + bundle.definedVars({ isProdBuild, latestBuild, defineOverlay }) + ), + manifest({ + publicPath, + }), + worker(), + dontHashPlugin({ dontHash }), + isProdBuild && terser(bundle.terserOptions(latestBuild)), + isStatsBuild && + visualizer({ + // https://github.com/btd/rollup-plugin-visualizer#options + open: true, + sourcemap: true, + }), + ], + }, + /** + * @type { import("rollup").OutputOptions } + */ + outputOptions: { + // https://rollupjs.org/guide/en/#outputdir + dir: outputPath, + // https://rollupjs.org/guide/en/#outputformat + format: latestBuild ? "es" : "systemjs", + // https://rollupjs.org/guide/en/#outputexternallivebindings + externalLiveBindings: false, + // https://rollupjs.org/guide/en/#outputentryfilenames + // https://rollupjs.org/guide/en/#outputchunkfilenames + // https://rollupjs.org/guide/en/#outputassetfilenames + entryFileNames: isProdBuild ? "[name]-[hash].js" : "[name].js", + chunkFileNames: isProdBuild ? "c.[hash].js" : "[name].js", + assetFileNames: isProdBuild ? "a.[hash].js" : "[name].js", + // https://rollupjs.org/guide/en/#outputsourcemap + sourcemap: isProdBuild ? true : "inline", + }, + }; +}; + +const createAppConfig = ({ isProdBuild, latestBuild, isStatsBuild }) => { + return createRollupConfig( + bundle.config.app({ + isProdBuild, + latestBuild, + isStatsBuild, + }) + ); +}; + +const createDemoConfig = ({ isProdBuild, latestBuild, isStatsBuild }) => { + return createRollupConfig( + bundle.config.demo({ + isProdBuild, + latestBuild, + isStatsBuild, + }) + ); +}; + +const createCastConfig = ({ isProdBuild, latestBuild }) => { + return createRollupConfig(bundle.config.cast({ isProdBuild, latestBuild })); +}; + +const createHassioConfig = ({ isProdBuild, latestBuild }) => { + return createRollupConfig(bundle.config.hassio({ isProdBuild, latestBuild })); +}; + +const createGalleryConfig = ({ isProdBuild, latestBuild }) => { + return createRollupConfig( + bundle.config.gallery({ isProdBuild, latestBuild }) + ); +}; + +module.exports = { + createAppConfig, + createDemoConfig, + createCastConfig, + createHassioConfig, + createGalleryConfig, +}; diff --git a/build-scripts/webpack.js b/build-scripts/webpack.js index 7b88936d8a..eb940caccb 100644 --- a/build-scripts/webpack.js +++ b/build-scripts/webpack.js @@ -4,7 +4,7 @@ const TerserPlugin = require("terser-webpack-plugin"); const ManifestPlugin = require("webpack-manifest-plugin"); const WorkerPlugin = require("worker-plugin"); const paths = require("./paths.js"); -const { babelLoaderConfig } = require("./babel.js"); +const babel = require("./babel.js"); const bundle = require("./bundle"); const createWebpackConfig = ({ @@ -29,7 +29,14 @@ const createWebpackConfig = ({ node: false, module: { rules: [ - babelLoaderConfig({ latestBuild }), + { + test: /\.js$|\.ts$/, + exclude: babel.exclude, + use: { + loader: "babel-loader", + options: babel.options({ latestBuild }), + }, + }, { test: /\.css$/, use: "raw-loader", diff --git a/cast/rollup.config.js b/cast/rollup.config.js new file mode 100644 index 0000000000..5460a82216 --- /dev/null +++ b/cast/rollup.config.js @@ -0,0 +1,10 @@ +const rollup = require("../build-scripts/rollup.js"); +const env = require("../build-scripts/env.js"); + +const config = rollup.createCastConfig({ + isProdBuild: env.isProdBuild(), + latestBuild: true, + isStatsBuild: env.isStatsBuild(), +}); + +module.exports = { ...config.inputOptions, output: config.outputOptions }; diff --git a/cast/src/html/launcher-faq.html.template b/cast/src/html/launcher-faq.html.template index 20640e8b54..30589f2703 100644 --- a/cast/src/html/launcher-faq.html.template +++ b/cast/src/html/launcher-faq.html.template @@ -46,7 +46,13 @@ // // Safari 10.1 supports type=module but ignores nomodule, so we add this check. if (!isS101) { _ls("/static/polyfills/custom-elements-es5-adapter.js"); - _ls("<%= es5LauncherJS %>"); + <% if (useRollup) { %> + _ls("/static/js/s.min.js").onload = function() { + System.import("<%= es5LauncherJS %>"); + }; + <% } else { %> + _ls("<%= es5LauncherJS %>"); + <% } %> } })(); diff --git a/cast/src/html/launcher.html.template b/cast/src/html/launcher.html.template index 25b2eba1a5..fd176a1e59 100644 --- a/cast/src/html/launcher.html.template +++ b/cast/src/html/launcher.html.template @@ -37,7 +37,13 @@ // // Safari 10.1 supports type=module but ignores nomodule, so we add this check. if (!isS101) { _ls("/static/polyfills/custom-elements-es5-adapter.js"); - _ls("<%= es5LauncherJS %>"); + <% if (useRollup) { %> + _ls("/static/js/s.min.js").onload = function() { + System.import("<%= es5LauncherJS %>"); + }; + <% } else { %> + _ls("<%= es5LauncherJS %>"); + <% } %> } })(); diff --git a/demo/rollup.config.js b/demo/rollup.config.js new file mode 100644 index 0000000000..d236491002 --- /dev/null +++ b/demo/rollup.config.js @@ -0,0 +1,10 @@ +const rollup = require("../build-scripts/rollup.js"); +const env = require("../build-scripts/env.js"); + +const config = rollup.createDemoConfig({ + isProdBuild: env.isProdBuild(), + latestBuild: true, + isStatsBuild: env.isStatsBuild(), +}); + +module.exports = { ...config.inputOptions, output: config.outputOptions }; diff --git a/demo/src/html/index.html.template b/demo/src/html/index.html.template index a9decd4502..c626161b69 100644 --- a/demo/src/html/index.html.template +++ b/demo/src/html/index.html.template @@ -104,8 +104,16 @@ // // Safari 10.1 supports type=module but ignores nomodule, so we add this check. if (!isS101) { _ls("/static/polyfills/custom-elements-es5-adapter.js"); - _ls("<%= es5Compatibility %>"); - _ls("<%= es5DemoJS %>"); + <% if (useRollup) { %> + _ls("/static/js/s.min.js").onload = function() { + System.import("<%= es5Compatibility %>").then(function() { + System.import("<%= es5DemoJS %>"); + }); + }; + <% } else { %> + _ls("<%= es5Compatibility %>"); + _ls("<%= es5DemoJS %>"); + <% } %> } })(); diff --git a/gallery/rollup.config.js b/gallery/rollup.config.js new file mode 100644 index 0000000000..787bf5a448 --- /dev/null +++ b/gallery/rollup.config.js @@ -0,0 +1,10 @@ +const rollup = require("../build-scripts/rollup.js"); +const env = require("../build-scripts/env.js"); + +const config = rollup.createGalleryConfig({ + isProdBuild: env.isProdBuild(), + latestBuild: true, + isStatsBuild: env.isStatsBuild(), +}); + +module.exports = { ...config.inputOptions, output: config.outputOptions }; diff --git a/hassio/rollup.config.js b/hassio/rollup.config.js new file mode 100644 index 0000000000..4beee60e48 --- /dev/null +++ b/hassio/rollup.config.js @@ -0,0 +1,10 @@ +const rollup = require("../build-scripts/rollup.js"); +const env = require("../build-scripts/env.js"); + +const config = rollup.createHassioConfig({ + isProdBuild: env.isProdBuild(), + latestBuild: false, + isStatsBuild: env.isStatsBuild(), +}); + +module.exports = { ...config.inputOptions, output: config.outputOptions }; diff --git a/package.json b/package.json index 4252ee18a7..cb89179ba0 100644 --- a/package.json +++ b/package.json @@ -126,6 +126,10 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/preset-env": "^7.9.5", "@babel/preset-typescript": "^7.9.0", + "@rollup/plugin-commonjs": "^11.1.0", + "@rollup/plugin-json": "^4.0.3", + "@rollup/plugin-node-resolve": "^7.1.3", + "@rollup/plugin-replace": "^2.3.2", "@types/chai": "^4.1.7", "@types/chromecast-caf-receiver": "^3.0.12", "@types/codemirror": "^0.0.78", @@ -165,15 +169,24 @@ "lint-staged": "^8.1.5", "lit-analyzer": "^1.1.10", "lodash.template": "^4.5.0", + "magic-string": "^0.25.7", "map-stream": "^0.0.7", "merge-stream": "^1.0.1", "mocha": "^6.0.2", "object-hash": "^2.0.3", + "open": "^7.0.4", "prettier": "^2.0.4", "raw-loader": "^2.0.0", "require-dir": "^1.2.0", + "rollup": "^2.8.2", + "rollup-plugin-babel": "^4.4.0", + "rollup-plugin-string": "^3.0.0", + "rollup-plugin-terser": "^5.3.0", + "rollup-plugin-visualizer": "^4.0.4", + "serve": "^11.3.0", "sinon": "^7.3.1", "source-map-url": "^0.4.0", + "systemjs": "^6.3.2", "terser-webpack-plugin": "^1.2.3", "ts-lit-plugin": "^1.1.10", "ts-mocha": "^6.0.0", diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000000..2eb552dbfe --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,10 @@ +const rollup = require("./build-scripts/rollup.js"); +const env = require("./build-scripts/env.js"); + +const config = rollup.createAppConfig({ + isProdBuild: env.isProdBuild(), + latestBuild: true, + isStatsBuild: env.isStatsBuild(), +}); + +module.exports = { ...config.inputOptions, output: config.outputOptions }; diff --git a/src/components/data-table/sort-filter.ts b/src/components/data-table/sort-filter.ts index 9e89e866df..33fa6ecdb9 100644 --- a/src/components/data-table/sort-filter.ts +++ b/src/components/data-table/sort-filter.ts @@ -1,9 +1,11 @@ import { wrap } from "comlink"; -type FilterDataType = typeof import("./sort_filter_worker").api["filterData"]; +import type { api } from "./sort_filter_worker"; + +type FilterDataType = api["filterData"]; type FilterDataParamTypes = Parameters; -type SortDataType = typeof import("./sort_filter_worker").api["sortData"]; +type SortDataType = api["sortData"]; type SortDataParamTypes = Parameters; let worker: any | undefined; diff --git a/src/components/data-table/sort_filter_worker.ts b/src/components/data-table/sort_filter_worker.ts index de3e1c67b2..4c0d6d1987 100644 --- a/src/components/data-table/sort_filter_worker.ts +++ b/src/components/data-table/sort_filter_worker.ts @@ -67,10 +67,11 @@ const sortData = ( return 0; }); -// Export for types -export const api = { +const api = { filterData, sortData, }; +export type api = typeof api; + expose(api); diff --git a/src/html/_js_base.html.template b/src/html/_js_base.html.template index c9bf4d4b49..2864581ce2 100644 --- a/src/html/_js_base.html.template +++ b/src/html/_js_base.html.template @@ -7,6 +7,7 @@ ); script.defer = true; script.src = src; + return script; } window.Polymer = { lazyRegister: true, diff --git a/src/html/authorize.html.template b/src/html/authorize.html.template index 3169c62b45..ed3bbb27b0 100644 --- a/src/html/authorize.html.template +++ b/src/html/authorize.html.template @@ -59,8 +59,16 @@ // Safari 10.1 supports type=module but ignores nomodule, so we add this check. if (!isS101) { _ls("/static/polyfills/custom-elements-es5-adapter.js"); - _ls("<%= es5Compatibility %>"); - _ls("<%= es5PageJS %>"); + <% if (useRollup) { %> + _ls("/static/js/s.min.js").onload = function() { + System.import("<%= es5Compatibility %>").then(function() { + System.import("<%= es5PageJS %>"); + }); + } + <% } else { %> + _ls("<%= es5Compatibility %>"); + _ls("<%= es5PageJS %>"); + <% } %> } })(); diff --git a/src/html/index.html.template b/src/html/index.html.template index 1c36cc718d..47deba231b 100644 --- a/src/html/index.html.template +++ b/src/html/index.html.template @@ -70,17 +70,28 @@ {% for extra_module in extra_modules -%} {% endfor -%} - + diff --git a/src/resources/markdown_worker.ts b/src/resources/markdown_worker.ts index 70507bb9fa..f248520b6a 100644 --- a/src/resources/markdown_worker.ts +++ b/src/resources/markdown_worker.ts @@ -49,9 +49,10 @@ const renderMarkdown = ( }); }; -// Export for types -export const api = { +const api = { renderMarkdown, }; +export type api = typeof api; + expose(api); diff --git a/src/resources/render-markdown.ts b/src/resources/render-markdown.ts index d4a4397f21..4df0794ea0 100644 --- a/src/resources/render-markdown.ts +++ b/src/resources/render-markdown.ts @@ -1,6 +1,8 @@ import { wrap } from "comlink"; -type RenderMarkdownType = typeof import("./markdown_worker").api["renderMarkdown"]; +import type { api } from "./markdown_worker"; + +type RenderMarkdownType = api["renderMarkdown"]; type renderMarkdownParamTypes = Parameters; let worker: any | undefined; diff --git a/yarn.lock b/yarn.lock index 8bca36beda..55bef23820 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2772,7 +2772,27 @@ resolved "https://registry.yarnpkg.com/@polymer/test-fixture/-/test-fixture-0.0.3.tgz#4443752697d4d9293bbc412ea0b5e4d341f149d9" integrity sha1-REN1JpfU2Sk7vEEuoLXk00HxSdk= -"@rollup/plugin-node-resolve@^7.1.1": +"@rollup/plugin-commonjs@^11.1.0": + version "11.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz#60636c7a722f54b41e419e1709df05c7234557ef" + integrity sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA== + dependencies: + "@rollup/pluginutils" "^3.0.8" + commondir "^1.0.1" + estree-walker "^1.0.1" + glob "^7.1.2" + is-reference "^1.1.2" + magic-string "^0.25.2" + resolve "^1.11.0" + +"@rollup/plugin-json@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.0.3.tgz#747e2c2884c5a0fa00b66c9c0f3f1012cddca534" + integrity sha512-QMUT0HZNf4CX17LMdwaslzlYHUKTYGuuk34yYIgZrNdu+pMEfqMS55gck7HEeHBKXHM4cz5Dg1OVwythDdbbuQ== + dependencies: + "@rollup/pluginutils" "^3.0.8" + +"@rollup/plugin-node-resolve@^7.1.1", "@rollup/plugin-node-resolve@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz#80de384edfbd7bfc9101164910f86078151a3eca" integrity sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q== @@ -2783,7 +2803,7 @@ is-module "^1.0.0" resolve "^1.14.2" -"@rollup/plugin-replace@^2.3.1": +"@rollup/plugin-replace@^2.3.1", "@rollup/plugin-replace@^2.3.2": version "2.3.2" resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.3.2.tgz#da4e0939047f793c2eb5eedfd6c271232d0a033f" integrity sha512-KEEL7V2tMNOsbAoNMKg91l1sNXBDoiP31GFlqXVOuV5691VQKzKBh91+OKKOG4uQWYqcFskcjFyh1d5YnZd0Zw== @@ -3652,6 +3672,11 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== +"@zeit/schemas@2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" + integrity sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg== + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -3752,6 +3777,16 @@ ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== +ajv@6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" + integrity sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1: version "6.10.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" @@ -3886,7 +3921,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== @@ -3952,6 +3987,11 @@ aproba@^1.0.3, aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== +arch@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.2.tgz#0c52bbe7344bb4fa260c443d2cbad9c00ff2f0bf" + integrity sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ== + archiver-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-1.3.0.tgz#e50b4c09c70bf3d680e32ff1b7994e9f9d895174" @@ -3991,6 +4031,11 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +arg@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arg/-/arg-2.0.0.tgz#c06e7ff69ab05b3a4a03ebe0407fac4cba657545" + integrity sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -4812,7 +4857,7 @@ bower-config@^1.4.0, bower-config@^1.4.1: osenv "^0.1.3" untildify "^2.1.0" -boxen@^1.2.1: +boxen@1.3.0, boxen@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== @@ -5249,6 +5294,15 @@ chai@^4.2.0: pathval "^1.1.0" type-detect "^4.0.5" +chalk@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -5488,6 +5542,14 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= +clipboardy@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.3.tgz#0526361bf78724c1f20be248d428e365433c07ef" + integrity sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA== + dependencies: + arch "^2.1.0" + execa "^0.8.0" + cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -5515,6 +5577,15 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + clone-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" @@ -5741,6 +5812,13 @@ compress-commons@^1.2.0: normalize-path "^2.0.0" readable-stream "^2.0.0" +compressible@~2.0.14: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== + dependencies: + mime-db ">= 1.43.0 < 2" + compressible@~2.0.16: version "2.0.16" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.16.tgz#a49bf9858f3821b64ce1be0296afc7380466a77f" @@ -5748,6 +5826,19 @@ compressible@~2.0.16: dependencies: mime-db ">= 1.38.0 < 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" + compression@^1.6.2, compression@^1.7.4: version "1.7.4" resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" @@ -6781,6 +6872,11 @@ es6-weak-map@^2.0.1: es6-iterator "^2.0.1" es6-symbol "^3.1.1" +escape-goat@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" + integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== + escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -7089,6 +7185,19 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" + integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -7349,6 +7458,13 @@ fast-safe-stringify@^2.0.4: resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz#04b26106cc56681f51a044cfc0d76cf0008ac2c2" integrity sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg== +fast-url-parser@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" + integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= + dependencies: + punycode "^1.3.2" + fastq@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.7.0.tgz#fcd79a08c5bd7ec5b55cd3f5c4720db551929801" @@ -7545,6 +7661,14 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + findup-sync@2.0.0, findup-sync@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" @@ -7768,6 +7892,11 @@ fsevents@^1.0.0, fsevents@^1.2.7: nan "^2.12.1" node-pre-gyp "^0.12.0" +fsevents@~2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" + integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -8940,6 +9069,11 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= +is-docker@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.0.0.tgz#2cb0df0e75e2d064fe1864c37cdeacb7b2dcf25b" + integrity sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ== + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -9146,6 +9280,13 @@ is-redirect@^1.0.0: resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= +is-reference@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427" + integrity sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== + dependencies: + "@types/estree" "0.0.39" + is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" @@ -9226,6 +9367,13 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -9751,6 +9899,13 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + lodash._escapehtmlchar@~2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz#df67c3bb6b7e8e1e831ab48bfa0795b92afe899d" @@ -10051,7 +10206,7 @@ magic-string@^0.22.4: dependencies: vlq "^0.2.2" -magic-string@^0.25.0, magic-string@^0.25.5: +magic-string@^0.25.0, magic-string@^0.25.2, magic-string@^0.25.5, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== @@ -10308,6 +10463,23 @@ mime-db@1.40.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad" integrity sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg== +"mime-db@>= 1.43.0 < 2": + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== + +mime-types@2.1.18: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== + dependencies: + mime-db "~1.33.0" + mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19: version "2.1.22" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.22.tgz#fe6b355a190926ab7698c9a0556a11199b2199bd" @@ -10606,6 +10778,11 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== +nanoid@^3.0.1: + version "3.1.9" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.9.tgz#1f148669c70bb2072dc5af0666e46edb6cd31fb2" + integrity sha512-fFiXlFo4Wkuei3i6w9SQI6yuzGRTGi8Z2zZKZpUxv/bQlBi4jtbVPBSNFZHQA9PNjofWqtIa8p+pnsc0kgZrhQ== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -11044,7 +11221,7 @@ on-finished@^2.3.0, on-finished@~2.3.0: dependencies: ee-first "1.1.1" -on-headers@~1.0.2: +on-headers@~1.0.1, on-headers@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== @@ -11075,6 +11252,14 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" +open@^7.0.3, open@^7.0.4: + version "7.0.4" + resolved "https://registry.yarnpkg.com/open/-/open-7.0.4.tgz#c28a9d315e5c98340bf979fdcb2e58664aa10d83" + integrity sha512-brSA+/yq+b08Hsr4c8fsEW2CRzk1BmfN3SAK/5VCHQ9bdoZJ4qa/+AfR0xHjlbbZUyPkUHs1b8x1RqdyZdkVqQ== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + opn@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/opn/-/opn-3.0.3.tgz#b6d99e7399f78d65c3baaffef1fb288e9b85243a" @@ -11199,6 +11384,13 @@ p-limit@^2.0.0: dependencies: p-try "^2.0.0" +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -11213,6 +11405,13 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + p-map@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" @@ -11440,12 +11639,17 @@ path-exists@^3.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.1, path-is-inside@^1.0.2: +path-is-inside@1.0.2, path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= @@ -11477,6 +11681,11 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= +path-to-regexp@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" + integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== + path-to-regexp@^1.0.1, path-to-regexp@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" @@ -12027,7 +12236,7 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@^1.2.4, punycode@^1.4.1: +punycode@^1.2.4, punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= @@ -12037,6 +12246,13 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +pupa@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726" + integrity sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA== + dependencies: + escape-goat "^2.0.0" + q@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" @@ -12101,16 +12317,16 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" +range-parser@1.2.0, range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= + range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - raw-body@2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" @@ -12366,6 +12582,14 @@ regexpu-core@^4.7.0: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.2.0" +registry-auth-token@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" + integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== + dependencies: + rc "^1.1.6" + safe-buffer "^5.0.1" + registry-auth-token@^3.0.1: version "3.4.0" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e" @@ -12374,7 +12598,7 @@ registry-auth-token@^3.0.1: rc "^1.1.6" safe-buffer "^5.0.1" -registry-url@^3.0.3: +registry-url@3.1.0, registry-url@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= @@ -12583,10 +12807,17 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.4.0, dependencies: path-parse "^1.0.6" +resolve@^1.11.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.16.0.tgz#063dc704fa3413e13ac1d0d1756a7cbfe95dd1a7" + integrity sha512-LarL/PIKJvc09k1jaeT4kQb/8/7P+qV4qSnN2K80AES+OHdfZELAKVOBjxsvtToT/uLOfFbvYvKfZmV8cee7nA== + dependencies: + path-parse "^1.0.6" + resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== dependencies: path-parse "^1.0.6" @@ -12653,7 +12884,7 @@ roboto-fontface@^0.10.0: resolved "https://registry.yarnpkg.com/roboto-fontface/-/roboto-fontface-0.10.0.tgz#7eee40cfa18b1f7e4e605eaf1a2740afb6fd71b0" integrity sha512-OlwfYEgA2RdboZohpldlvJ1xngOins5d7ejqnIBWr9KaMxsnBqotpptRXTyfNRLnFpqzX6sTDt+X+a+6udnU8g== -rollup-plugin-babel@^4.3.3: +rollup-plugin-babel@^4.3.3, rollup-plugin-babel@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz#d15bd259466a9d1accbdb2fe2fff17c52d030acb" integrity sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw== @@ -12661,7 +12892,14 @@ rollup-plugin-babel@^4.3.3: "@babel/helper-module-imports" "^7.0.0" rollup-pluginutils "^2.8.1" -rollup-plugin-terser@^5.2.0: +rollup-plugin-string@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-string/-/rollup-plugin-string-3.0.0.tgz#fed2d6301fae1e59eb610957df757ef13fada3f0" + integrity sha512-vqyzgn9QefAgeKi+Y4A7jETeIAU1zQmS6VotH6bzm/zmUQEnYkpIGRaOBPY41oiWYV4JyBoGAaBjYMYuv+6wVw== + dependencies: + rollup-pluginutils "^2.4.1" + +rollup-plugin-terser@^5.2.0, rollup-plugin-terser@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz#9c0dd33d5771df9630cd027d6a2559187f65885e" integrity sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g== @@ -12672,7 +12910,18 @@ rollup-plugin-terser@^5.2.0: serialize-javascript "^2.1.2" terser "^4.6.2" -rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: +rollup-plugin-visualizer@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-4.0.4.tgz#69b9140c6faf46328997ed2d08b974252bf9d683" + integrity sha512-odkyLiVxCEXh4AWFSl75+pbIapzhEZkOVww8pKUgraOHicSH67MYMnAOHWQVK/BYeD1cCiF/0kk8/XNX2+LM9A== + dependencies: + nanoid "^3.0.1" + open "^7.0.3" + pupa "^2.0.0" + source-map "^0.7.3" + yargs "^15.0.0" + +rollup-pluginutils@^2.4.1, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: version "2.8.2" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== @@ -12697,6 +12946,13 @@ rollup@^1.31.1: "@types/node" "*" acorn "^7.1.0" +rollup@^2.8.2: + version "2.8.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.8.2.tgz#08427a8eb118e6e4ac8d80eba22774bc1d059c81" + integrity sha512-LRzMcB8V1M69pSvf6uCbR+W9OPCy5FuxcIwqioWg5RKidrrqKbzjJF9pEGXceaMVkbptNFZgIVJlUokCU0sfng== + optionalDependencies: + fsevents "~2.1.2" + run-async@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" @@ -12913,6 +13169,20 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== +serve-handler@6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.2.tgz#f05b0421a313fff2d257838cba00cbcc512cd2b6" + integrity sha512-RFh49wX7zJmmOVDcIjiDSJnMH+ItQEvyuYLYuDBVoA/xmQSCuj+uRmk1cmBB5QQlI3qOiWKp6p4DUGY+Z5AB2A== + dependencies: + bytes "3.0.0" + content-disposition "0.5.2" + fast-url-parser "1.1.3" + mime-types "2.1.18" + minimatch "3.0.4" + path-is-inside "1.0.2" + path-to-regexp "2.2.1" + range-parser "1.2.0" + serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -12946,6 +13216,21 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" +serve@^11.3.0: + version "11.3.0" + resolved "https://registry.yarnpkg.com/serve/-/serve-11.3.0.tgz#1d342e13e310501ecf17b6602f1f35da640d6448" + integrity sha512-AU0g50Q1y5EVFX56bl0YX5OtVjUX1N737/Htj93dQGKuHiuLvVB45PD8Muar70W6Kpdlz8aNJfoUqTyAq9EE/A== + dependencies: + "@zeit/schemas" "2.6.0" + ajv "6.5.3" + arg "2.0.0" + boxen "1.3.0" + chalk "2.4.1" + clipboardy "1.2.3" + compression "1.7.3" + serve-handler "6.1.2" + update-check "1.5.2" + server-destroy@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" @@ -13504,7 +13789,7 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0: +string-width@^4.1.0, string-width@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== @@ -13765,6 +14050,11 @@ synchronous-promise@^2.0.5: resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.7.tgz#3574b3d2fae86b145356a4b89103e1577f646fe3" integrity sha512-16GbgwTmFMYFyQMLvtQjvNWh30dsFe1cAW5Fg1wm5+dg84L9Pe36mftsIRU95/W2YsISxsz/xq4VB23sqpgb/A== +systemjs@^6.3.2: + version "6.3.2" + resolved "https://registry.yarnpkg.com/systemjs/-/systemjs-6.3.2.tgz#2c3407f949260fdfb3b837c191869db933d1fe0f" + integrity sha512-zcALS1RIYtsQBG4fbaE+cJzKx+UoEuSM8xCkGGH99i7p7Ym3ALvhi9QrpF2lo0CMQaejqrE1GnbkuG2m/+H7ew== + table-layout@^0.4.3: version "0.4.4" resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-0.4.4.tgz#bc5398b2a05e58b67b05dd9238354b89ef27be0f" @@ -13925,9 +14215,9 @@ terser@^4.1.2: source-map-support "~0.5.12" terser@^4.6.2: - version "4.6.13" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.13.tgz#e879a7364a5e0db52ba4891ecde007422c56a916" - integrity sha512-wMvqukYgVpQlymbnNbabVZbtM6PN63AzqexpwJL8tbh/mRT9LE5o+ruVduAGL7D6Fpjl+Q+06U5I9Ul82odAhw== + version "4.6.6" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.6.tgz#da2382e6cafbdf86205e82fb9a115bd664d54863" + integrity sha512-4lYPyeNmstjIIESr/ysHg2vUPRGf2tzF9z2yYwnowXVuVzLEamPN1Gfrz7f8I9uEPuHcbFlW4PLIAsJoxXyJ1g== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -14477,6 +14767,14 @@ upath@^1.2.0: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== +update-check@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.5.2.tgz#2fe09f725c543440b3d7dabe8971f2d5caaedc28" + integrity sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ== + dependencies: + registry-auth-token "3.3.2" + registry-url "3.1.0" + update-notifier@^2.2.0, update-notifier@^2.3.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" @@ -15331,6 +15629,15 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -15468,6 +15775,14 @@ yargs-parser@^13.1.0: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^18.1.1: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" @@ -15519,6 +15834,23 @@ yargs@13.2.4: y18n "^4.0.0" yargs-parser "^13.1.0" +yargs@^15.0.0: + version "15.3.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" + integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.1" + yargs@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8"