diff --git a/packages/core/package.json b/packages/core/package.json index 8efd01c..8d11ca7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -23,8 +23,7 @@ ], "dependencies": { "debug": "4.3.1", - "js-yaml": "3.14.0", - "webpack-virtual-modules": "0.3.2" + "js-yaml": "3.14.0" }, "devDependencies": { "@neutrinojs/airbnb-base": "^9.4.0", diff --git a/packages/core/src/index.js b/packages/core/src/index.js index 879fa82..c18d54d 100644 --- a/packages/core/src/index.js +++ b/packages/core/src/index.js @@ -11,7 +11,6 @@ export {compose, fastApply} from './function'; export {default as Middleware} from './middleware'; export {default as Latus} from './latus'; export {default as readConfig} from './read-config'; -export {default as WebpackPlugin} from './webpack-plugin'; export const Class = class {}; diff --git a/packages/core/src/latus.js b/packages/core/src/latus.js index aa19c49..bdcb364 100644 --- a/packages/core/src/latus.js +++ b/packages/core/src/latus.js @@ -31,7 +31,7 @@ export default class Latus { } } else { - throw new Error( + debug( `'${paths[i]}' specified as a latus path, but there was no default export`, ); } diff --git a/packages/core/src/webpack-plugin.js b/packages/core/src/webpack-plugin.js deleted file mode 100644 index d22ffe1..0000000 --- a/packages/core/src/webpack-plugin.js +++ /dev/null @@ -1,40 +0,0 @@ -const {join} = require('path'); - -const VirtualModulesPlugin = require('webpack-virtual-modules'); - -export default class WebpackPlugin { - - constructor(paths) { - this.paths = paths; - } - - apply(compiler) { - // eslint-disable-next-line no-eval - eval('require')('@babel/register')({ - presets: ['@babel/preset-react'], - }); - const paths = this.paths.map((plugin) => { - try { - const local = join(process.cwd(), 'src', plugin); - // eslint-disable-next-line no-eval - eval('require.resolve')(local); - return local; - } - catch (error) { - return plugin; - } - }); - const modules = paths.map((path) => `require('${path}')`).join(','); - const body = [ - '/* eslint-disable global-require, no-undef */', - 'window.$$latus = {', - ` modules: [${modules}],`, - '};', - ].join('\n'); - const plugin = new VirtualModulesPlugin({ - 'node_modules/@latus/core/virtual': body, - }); - plugin.apply(compiler); - } - -} diff --git a/packages/core/yarn.lock b/packages/core/yarn.lock index c906775..b5e0cef 100644 --- a/packages/core/yarn.lock +++ b/packages/core/yarn.lock @@ -1996,13 +1996,6 @@ debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@^3.0.0: - version "3.2.7" - resolved "https://npm.i12e.cha0s.io/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - decamelize@^1.2.0: version "1.2.0" resolved "https://npm.i12e.cha0s.io/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -3650,7 +3643,7 @@ ms@2.0.0: resolved "https://npm.i12e.cha0s.io/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.2, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://npm.i12e.cha0s.io/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -5189,13 +5182,6 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1: source-list-map "^2.0.0" source-map "~0.6.1" -webpack-virtual-modules@0.3.2: - version "0.3.2" - resolved "https://npm.i12e.cha0s.io/webpack-virtual-modules/-/webpack-virtual-modules-0.3.2.tgz#b7baa30971a22d99451f897db053af48ec29ad2c" - integrity sha512-RXQXioY6MhzM4CNQwmBwKXYgBs6ulaiQ8bkNQEl2J6Z+V+s7lgl/wGvaI/I0dLnYKB8cKsxQc17QOAVIphPLDw== - dependencies: - debug "^3.0.0" - webpack@^4: version "4.44.2" resolved "https://npm.i12e.cha0s.io/webpack/-/webpack-4.44.2.tgz#6bfe2b0af055c8b2d1e90ed2cd9363f841266b72" diff --git a/packages/http/.neutrinorc.js b/packages/http/.neutrinorc.js index 3ff43bf..df036cf 100644 --- a/packages/http/.neutrinorc.js +++ b/packages/http/.neutrinorc.js @@ -13,7 +13,7 @@ module.exports[0].use.push(copy({ patterns: ['index.js', 'index.ejs', 'latus.js'].map((path) => ({ from: `src/client/${path}`, to: 'client', - })).concat(['.neutrinorc.js', 'webpack.config.js'].map((path) => ({ + })).concat(['.neutrinorc.js', 'plugins.js', 'webpack.config.js'].map((path) => ({ from: `src/build/${path}`, to: 'build', }))), diff --git a/packages/http/package.json b/packages/http/package.json index 16f35f7..e27edb7 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -30,7 +30,8 @@ "webpack": "^4", "webpack-dev-middleware": "^4.0.2", "webpack-dev-server": "^3.11.0", - "webpack-hot-middleware": "^2.25.0" + "webpack-hot-middleware": "^2.25.0", + "webpack-virtual-modules": "^0.4.1" }, "devDependencies": { "@neutrinojs/airbnb-base": "^9.4.0", diff --git a/packages/http/src/build/.neutrinorc.js b/packages/http/src/build/.neutrinorc.js index dcce9db..46c7a44 100644 --- a/packages/http/src/build/.neutrinorc.js +++ b/packages/http/src/build/.neutrinorc.js @@ -1,35 +1,60 @@ +const {isAbsolute, join} = require('path'); + const fs = require('fs'); -const {readConfig, WebpackPlugin} = require('@latus/core'); const web = require('@neutrinojs/web'); const {DefinePlugin, EnvironmentPlugin} = require('webpack'); +const {readConfig, Latus} = require('@latus/core'); +const VirtualModulesPlugin = require('webpack-virtual-modules'); + +const plugins = require('./plugins'); + +const config = readConfig(); +const paths = Object.entries(config).map(([plugin]) => { + try { + const local = join(process.cwd(), 'src', plugin); + require.resolve(local); + return local; + } + catch (error) { + return plugin; + } +}); +const latus = new Latus({ + config, + // eslint-disable-next-line global-require, import/no-dynamic-require + modules: paths.map((path) => require(path)), +}); + const { HTTP_DEV_HOST, HTTP_DEV_PORT, HTTP_DEV_PUBLIC, - LATUS_TITLE, NODE_ENV, } = process.env; -module.exports = { +const client = { use: [ (neutrino) => { - const root = process.argv.find((arg) => 'production' === arg) - ? __dirname - : `${__dirname}/..`; + const root = `${__dirname}/..`; neutrino.options.root = fs.realpathSync(root); neutrino.options.source = 'client'; neutrino.options.mains.index = 'index'; - neutrino.options.output = `client`; + const output = 'build'; + neutrino.options.output = join( + isAbsolute(output) + ? output + : join(process.cwd(), output), + 'http', + ); }, (neutrino) => { web({ clean: false, - hot: false, html: { + inject: false, template: `${neutrino.options.root}/client/index.ejs`, - title: LATUS_TITLE, }, })(neutrino); }, @@ -45,7 +70,63 @@ module.exports = { .port(HTTP_DEV_PORT) .public(HTTP_DEV_PUBLIC); } - neutrino.config.node.delete('Buffer'); + neutrino.config.node.set('Buffer', true); + neutrino.config.module.rule('compile').include.add(`${process.cwd()}/src`); }, ], }; + +client.use.push((neutrino) => { + class LatusPlugin { + + constructor(latus) { + this.latus = latus; + } + + apply(compiler) { + const plugin = new VirtualModulesPlugin(); + plugin.apply(compiler); + // eslint-disable-next-line no-eval + eval('require')('@babel/register')({ + presets: ['@babel/preset-react'], + }); + compiler.hooks.beforeCompile.tapPromise('LatusPlugin', async () => { + const paths = Object.keys(await plugins(this.latus)) + .map((plugin) => { + try { + const local = join(process.cwd(), 'src', plugin); + // eslint-disable-next-line no-eval + eval('require.resolve')(local); + return local; + } + catch (error) { + return plugin; + } + }); + plugin.writeModule('node_modules/@latus/core/virtual', [ + '/* eslint-disable global-require, no-undef */', + 'window.$$latus = {', + ' config: window.$$latusConfig,', + ` modules: [${paths.map((path) => `require('${path}')`).join(',')}],`, + '};', + ].join('\n')); + }); + } + + } + neutrino.config + .plugin('latus') + .use(LatusPlugin, [latus]); +}); +latus.invokeFlat('@latus/http/build', client); +client.use.push((neutrino) => { + const {title} = latus.config['@latus/http']; + neutrino.config + .plugin('html-index') + .tap(([options]) => [{ + ...options, + title, + }]); +}); + +module.exports = client; diff --git a/packages/http/src/plugins.js b/packages/http/src/build/plugins.js similarity index 92% rename from packages/http/src/plugins.js rename to packages/http/src/build/plugins.js index 2b5a00e..45f9a11 100644 --- a/packages/http/src/plugins.js +++ b/packages/http/src/build/plugins.js @@ -1,4 +1,4 @@ -export default async (latus, req) => { +module.exports = async (latus, req) => { const config = await latus.invokeReduceAsync( '@latus/http/plugins', undefined, diff --git a/packages/http/src/client/index.ejs b/packages/http/src/client/index.ejs index dd89bbe..3b64e6d 100644 --- a/packages/http/src/client/index.ejs +++ b/packages/http/src/client/index.ejs @@ -2,15 +2,16 @@ + <%= htmlWebpackPlugin.options.title %> - -
+ + <%= htmlWebpackPlugin.tags.bodyTags %> diff --git a/packages/http/src/client/index.js b/packages/http/src/client/index.js index 3e617b1..8256aa1 100644 --- a/packages/http/src/client/index.js +++ b/packages/http/src/client/index.js @@ -1,4 +1,6 @@ -const {Latus} = require('@latus/core'); +import {Latus} from '@latus/core'; +// eslint-disable-next-line import/no-unresolved +import '@latus/core/virtual'; (async () => { if (!window.$$latus) { @@ -9,5 +11,3 @@ const {Latus} = require('@latus/core'); // eslint-disable-next-line no-console console.log('Latus up!\n'); })(); - -export default {}; diff --git a/packages/http/src/config-middleware.js b/packages/http/src/config-middleware.js new file mode 100644 index 0000000..5da6d8d --- /dev/null +++ b/packages/http/src/config-middleware.js @@ -0,0 +1,11 @@ +import plugins from './build/plugins'; + +export default (latus) => async (req, res, next) => { + if ('/latus.config.js' !== req.path) { + next(); + return; + } + res.setHeader('Content-Type', 'application/javascript; charset=UTF-8'); + const codedConfig = encodeURIComponent(JSON.stringify(await plugins(latus, req))); + res.send(`window.$$latusConfig = JSON.parse(decodeURIComponent("${codedConfig}"));`); +}; diff --git a/packages/http/src/index.js b/packages/http/src/index.js index 409232a..87953af 100644 --- a/packages/http/src/index.js +++ b/packages/http/src/index.js @@ -6,6 +6,7 @@ import {createHttpServer} from './server'; export default { hooks: { '@latus/core/config': () => ({ + build: 'build/http', devPort: 32341, devPublic: undefined, host: '0.0.0.0', @@ -15,32 +16,19 @@ export default { title: 'Latus', trust: false, }), - '@latus/core/build': ( - configs, - { + '@latus/core/build': (configs, latus) => { + const { config: { '@latus/http': { devPort, devPublic, host, - title, }, }, - }, - ) => { + } = latus; if (process.argv.find((arg) => 'production' === arg)) { - // eslint-disable-next-line global-require - const client = require('./build/.neutrinorc'); - client.use.push((neutrino) => { - neutrino.config - .plugin('html-index') - .tap(([options]) => [{ - ...options, - title, - }]); - }); - // eslint-disable-next-line no-param-reassign - configs.client = client; + // eslint-disable-next-line global-require, no-eval, no-param-reassign + configs.client = eval('require')('./build/.neutrinorc'); } else { const binary = `$(npm --prefix ${process.cwd()} bin)/webpack-dev-server`; @@ -50,7 +38,6 @@ export default { ...process.env, HTTP_DEV_HOST: host, HTTP_DEV_PORT: devPort, - LATUS_TITLE: title, ...(devPublic ? {HTTP_DEV_PUBLIC: devPublic} : {}), }, shell: true, diff --git a/packages/http/src/latus.js b/packages/http/src/latus.js deleted file mode 100644 index db6f003..0000000 --- a/packages/http/src/latus.js +++ /dev/null @@ -1,122 +0,0 @@ -import {WebpackPlugin} from '@latus/core'; -import neutrino from 'neutrino'; -import webpack, {HotModuleReplacementPlugin} from 'webpack'; -import devMiddleware from 'webpack-dev-middleware'; -import hotMiddleware from 'webpack-hot-middleware'; - -import plugins from './plugins'; - -// TODO watch latus.yml. - -const { - NODE_ENV, -} = process.env; - -const common = async (latus, req) => { - const paths = Object.keys(await plugins(latus, req)); - const instance = neutrino({ - root: process.cwd(), - use: [ - /* eslint-disable no-param-reassign */ - (neutrino) => { - neutrino.config - .entry('latus') - .add(`${__dirname}/client/latus`); - neutrino.config - .plugin('WebpackPlugin') - .use(WebpackPlugin, [paths]); - }, - (neutrino) => { - latus.invokeFlat('@latus/http/build').forEach((middleware) => neutrino.use(middleware)); - }, - (neutrino) => { - neutrino.config.node.set('Buffer', true); - neutrino.config.output - .filename('latus.js') - .path('/'); - }, - /* eslint-enable no-param-reassign */ - ], - }); - return instance.webpack(); -}; - -const varyBy = () => 0; - -const vary = (latus, fn) => { - // eslint-disable-next-line no-param-reassign - latus.config['%compilers'] = new Map(); - return async (req, res, next) => { - const id = varyBy(req); - if (!latus.config['%compilers'].has(id)) { - latus.config['%compilers'].set(id, await fn(req)); - } - latus.config['%compilers'].get(id)(req, res, next); - }; -}; - -const dev = (latus) => vary( - latus, - async (req) => { - const config = { - ...(await common(latus, req)), - mode: 'development', - }; - config.entry.latus.push('webpack-hot-middleware/client'); - config.plugins.push(new HotModuleReplacementPlugin()); - const compiler = webpack(config); - const dm = devMiddleware(compiler, { - index: false, - }); - const hm = hotMiddleware(compiler); - return (req, res, next) => { - dm(req, res, () => { - hm(req, res, next); - }); - }; - }, -); - -const production = (latus) => vary( - latus, - async (req) => { - const config = { - ...(await common(latus, req)), - mode: 'production', - }; - config.output.path = `${config.context}/build/assets`; - const compiler = webpack(config); - const promise = new Promise((resolve, reject) => { - compiler.run((error, stats) => { - if (error) { - reject(error); - return; - } - if (stats.hasErrors()) { - reject(new Error(stats.toString({ - all: false, - errors: true, - }).replace(new RegExp(process.cwd(), 'g'), '<cwd>'))); - } - else { - resolve(); - } - }); - }); - return (req, res, next) => { - promise.then(next).catch(next); - }; - }, -); - -export const modulesMiddleware = ('production' === NODE_ENV ? production : dev); - -export const configMiddleware = (latus) => async (req, res, next) => { - if ('/latus.config.js' !== req.path) { - next(); - return; - } - res.setHeader('Content-Type', 'application/javascript; charset=UTF-8'); - const codedConfig = encodeURIComponent(JSON.stringify(await plugins(latus, req))); - res.send(`window.$$latus.config = JSON.parse(decodeURIComponent("${codedConfig}"));`); -}; diff --git a/packages/http/src/server.js b/packages/http/src/server.js index e8ef338..021acb9 100644 --- a/packages/http/src/server.js +++ b/packages/http/src/server.js @@ -6,7 +6,7 @@ import {arrayFlatten} from '@latus/core'; import express from 'express'; import httpProxy from 'http-proxy'; -import {configMiddleware, modulesMiddleware} from './latus'; +import configMiddleware from './config-middleware'; const { HTTP_HOST, @@ -17,6 +17,7 @@ export const createHttpServer = async (latus) => { const { config: { '@latus/http': { + build, devPort, host, port, @@ -37,9 +38,7 @@ export const createHttpServer = async (latus) => { routes.forEach(({method, path, handler}) => app[method](path, requestMiddleware, handler)); // Serve latus. app.get('/latus.config.js', requestMiddleware, configMiddleware(latus)); - app.get('/latus.js', requestMiddleware, modulesMiddleware(latus)); - // TODO THIS IS BAD - app.use(express.static(join(process.cwd(), 'build/assets'))); + app.use(express.static(join(process.cwd(), build))); // eslint-disable-next-line no-eval if ('production' !== eval('process.env.NODE_ENV')) { const proxy = httpProxy.createProxyServer({ @@ -75,7 +74,7 @@ export const createHttpServer = async (latus) => { app.use(express.static(join(__dirname, 'client'))); app.get('*', async (req, res) => { res.setHeader('Content-Type', 'text/html; charset=UTF-8'); - const stream = createReadStream(join(__dirname, 'client', 'index.html')); + const stream = createReadStream(join(process.cwd(), build, 'index.html')); stream.pipe(res); }); } diff --git a/packages/http/yarn.lock b/packages/http/yarn.lock index 52fadc6..781dd2a 100644 --- a/packages/http/yarn.lock +++ b/packages/http/yarn.lock @@ -3,9 +3,9 @@ "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4": - version "7.10.4" - resolved "https://npm.i12e.cha0s.io/@babel%2fcode-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fcode-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== dependencies: "@babel/highlight" "^7.10.4" @@ -15,42 +15,41 @@ integrity sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw== "@babel/core@^7.11.4": - version "7.12.9" - resolved "https://npm.i12e.cha0s.io/@babel%2fcore/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" - integrity sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ== + version "7.12.10" + resolved "https://npm.i12e.cha0s.io/@babel%2fcore/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" + "@babel/generator" "^7.12.10" "@babel/helper-module-transforms" "^7.12.1" "@babel/helpers" "^7.12.5" - "@babel/parser" "^7.12.7" + "@babel/parser" "^7.12.10" "@babel/template" "^7.12.7" - "@babel/traverse" "^7.12.9" - "@babel/types" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" json5 "^2.1.2" lodash "^4.17.19" - resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.12.5": - version "7.12.5" - resolved "https://npm.i12e.cha0s.io/@babel%2fgenerator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de" - integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== +"@babel/generator@^7.12.10": + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fgenerator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" + integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== dependencies: - "@babel/types" "^7.12.5" + "@babel/types" "^7.12.11" jsesc "^2.5.1" source-map "^0.5.0" "@babel/helper-annotate-as-pure@^7.10.4": - version "7.10.4" - resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" - integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== + version "7.12.10" + resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz#54ab9b000e60a93644ce17b3f37d313aaf1d115d" + integrity sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ== dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.10" "@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": version "7.10.4" @@ -106,20 +105,20 @@ "@babel/types" "^7.12.1" "@babel/helper-function-name@^7.10.4": - version "7.10.4" - resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" - integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" + integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== dependencies: - "@babel/helper-get-function-arity" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/helper-get-function-arity" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/types" "^7.12.11" -"@babel/helper-get-function-arity@^7.10.4": - version "7.10.4" - resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" - integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== +"@babel/helper-get-function-arity@^7.12.10": + version "7.12.10" + resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.10" "@babel/helper-hoist-variables@^7.10.4": version "7.10.4" @@ -128,7 +127,7 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-member-expression-to-functions@^7.12.1": +"@babel/helper-member-expression-to-functions@^7.12.1", "@babel/helper-member-expression-to-functions@^7.12.7": version "7.12.7" resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855" integrity sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw== @@ -157,12 +156,12 @@ "@babel/types" "^7.12.1" lodash "^4.17.19" -"@babel/helper-optimise-call-expression@^7.10.4": - version "7.12.7" - resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz#7f94ae5e08721a49467346aa04fd22f750033b9c" - integrity sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw== +"@babel/helper-optimise-call-expression@^7.10.4", "@babel/helper-optimise-call-expression@^7.12.10": + version "7.12.10" + resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d" + integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ== dependencies: - "@babel/types" "^7.12.7" + "@babel/types" "^7.12.10" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.10.4" @@ -179,14 +178,14 @@ "@babel/types" "^7.12.1" "@babel/helper-replace-supers@^7.12.1": - version "7.12.5" - resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9" - integrity sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA== + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-replace-supers/-/helper-replace-supers-7.12.11.tgz#ea511658fc66c7908f923106dd88e08d1997d60d" + integrity sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA== dependencies: - "@babel/helper-member-expression-to-functions" "^7.12.1" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/traverse" "^7.12.5" - "@babel/types" "^7.12.5" + "@babel/helper-member-expression-to-functions" "^7.12.7" + "@babel/helper-optimise-call-expression" "^7.12.10" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.11" "@babel/helper-simple-access@^7.12.1": version "7.12.1" @@ -203,21 +202,21 @@ "@babel/types" "^7.12.1" "@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": - version "7.11.0" - resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" - integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" + integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== dependencies: - "@babel/types" "^7.11.0" + "@babel/types" "^7.12.11" -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== -"@babel/helper-validator-option@^7.12.1": - version "7.12.1" - resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-validator-option/-/helper-validator-option-7.12.1.tgz#175567380c3e77d60ff98a54bb015fe78f2178d9" - integrity sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A== +"@babel/helper-validator-option@^7.12.1", "@babel/helper-validator-option@^7.12.11": + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fhelper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f" + integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw== "@babel/helper-wrap-function@^7.10.4": version "7.12.3" @@ -247,10 +246,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.7", "@babel/parser@^7.7.0": - version "7.12.7" - resolved "https://npm.i12e.cha0s.io/@babel%2fparser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056" - integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg== +"@babel/parser@^7.12.10", "@babel/parser@^7.12.7", "@babel/parser@^7.7.0": + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fparser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" + integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== "@babel/plugin-proposal-async-generator-functions@^7.12.1": version "7.12.1" @@ -466,10 +465,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-block-scoping@^7.12.1": - version "7.12.1" - resolved "https://npm.i12e.cha0s.io/@babel%2fplugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz#f0ee727874b42a208a48a586b84c3d222c2bbef1" - integrity sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w== +"@babel/plugin-transform-block-scoping@^7.12.11": + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fplugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.11.tgz#83ae92a104dbb93a7d6c6dd1844f351083c46b4f" + integrity sha512-atR1Rxc3hM+VPg/NvNvfYw0npQEAcHuJ+MGZnFn6h3bo+1U3BWXMdFMlvVRApBTWKQMX7SOwRJZA5FBF/JQbvA== dependencies: "@babel/helper-plugin-utils" "^7.10.4" @@ -670,10 +669,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-typeof-symbol@^7.12.1": - version "7.12.1" - resolved "https://npm.i12e.cha0s.io/@babel%2fplugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz#9ca6be343d42512fbc2e68236a82ae64bc7af78a" - integrity sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q== +"@babel/plugin-transform-typeof-symbol@^7.12.10": + version "7.12.10" + resolved "https://npm.i12e.cha0s.io/@babel%2fplugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz#de01c4c8f96580bd00f183072b0d0ecdcf0dec4b" + integrity sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA== dependencies: "@babel/helper-plugin-utils" "^7.10.4" @@ -693,15 +692,15 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/preset-env@^7.11.0": - version "7.12.7" - resolved "https://npm.i12e.cha0s.io/@babel%2fpreset-env/-/preset-env-7.12.7.tgz#54ea21dbe92caf6f10cb1a0a576adc4ebf094b55" - integrity sha512-OnNdfAr1FUQg7ksb7bmbKoby4qFOHw6DKWWUNB9KqnnCldxhxJlP+21dpyaWFmf2h0rTbOkXJtAGevY3XW1eew== + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2fpreset-env/-/preset-env-7.12.11.tgz#55d5f7981487365c93dbbc84507b1c7215e857f9" + integrity sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw== dependencies: "@babel/compat-data" "^7.12.7" "@babel/helper-compilation-targets" "^7.12.5" "@babel/helper-module-imports" "^7.12.5" "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-validator-option" "^7.12.1" + "@babel/helper-validator-option" "^7.12.11" "@babel/plugin-proposal-async-generator-functions" "^7.12.1" "@babel/plugin-proposal-class-properties" "^7.12.1" "@babel/plugin-proposal-dynamic-import" "^7.12.1" @@ -730,7 +729,7 @@ "@babel/plugin-transform-arrow-functions" "^7.12.1" "@babel/plugin-transform-async-to-generator" "^7.12.1" "@babel/plugin-transform-block-scoped-functions" "^7.12.1" - "@babel/plugin-transform-block-scoping" "^7.12.1" + "@babel/plugin-transform-block-scoping" "^7.12.11" "@babel/plugin-transform-classes" "^7.12.1" "@babel/plugin-transform-computed-properties" "^7.12.1" "@babel/plugin-transform-destructuring" "^7.12.1" @@ -756,12 +755,12 @@ "@babel/plugin-transform-spread" "^7.12.1" "@babel/plugin-transform-sticky-regex" "^7.12.7" "@babel/plugin-transform-template-literals" "^7.12.1" - "@babel/plugin-transform-typeof-symbol" "^7.12.1" + "@babel/plugin-transform-typeof-symbol" "^7.12.10" "@babel/plugin-transform-unicode-escapes" "^7.12.1" "@babel/plugin-transform-unicode-regex" "^7.12.1" "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.12.7" - core-js-compat "^3.7.0" + "@babel/types" "^7.12.11" + core-js-compat "^3.8.0" semver "^5.5.0" "@babel/preset-modules@^0.1.3": @@ -776,9 +775,9 @@ esutils "^2.0.2" "@babel/register@^7.10.5": - version "7.12.1" - resolved "https://npm.i12e.cha0s.io/@babel%2fregister/-/register-7.12.1.tgz#cdb087bdfc4f7241c03231f22e15d211acf21438" - integrity sha512-XWcmseMIncOjoydKZnWvWi0/5CUCD+ZYKhRwgYlWOrA8fGZ/FjuLRpqtIhLOVD/fvR1b9DQHtZPn68VvhpYf+Q== + version "7.12.10" + resolved "https://npm.i12e.cha0s.io/@babel%2fregister/-/register-7.12.10.tgz#19b87143f17128af4dbe7af54c735663b3999f60" + integrity sha512-EvX/BvMMJRAA3jZgILWgbsrHwBQvllC5T8B29McyME8DvkdOxk4ujESfrMvME8IHSDvWXrmMXxPvA/lx2gqPLQ== dependencies: find-cache-dir "^2.0.0" lodash "^4.17.19" @@ -802,27 +801,27 @@ "@babel/parser" "^7.12.7" "@babel/types" "^7.12.7" -"@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.9", "@babel/traverse@^7.7.0": - version "7.12.9" - resolved "https://npm.i12e.cha0s.io/@babel%2ftraverse/-/traverse-7.12.9.tgz#fad26c972eabbc11350e0b695978de6cc8e8596f" - integrity sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw== +"@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.7.0": + version "7.12.10" + resolved "https://npm.i12e.cha0s.io/@babel%2ftraverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a" + integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" + "@babel/generator" "^7.12.10" "@babel/helper-function-name" "^7.10.4" "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" + "@babel/parser" "^7.12.10" + "@babel/types" "^7.12.10" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.4.4", "@babel/types@^7.7.0": - version "7.12.7" - resolved "https://npm.i12e.cha0s.io/@babel%2ftypes/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13" - integrity sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ== +"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.4.4", "@babel/types@^7.7.0": + version "7.12.11" + resolved "https://npm.i12e.cha0s.io/@babel%2ftypes/-/types-7.12.11.tgz#a86e4d71e30a9b6ee102590446c98662589283ce" + integrity sha512-ukA9SQtKThINm++CX1CwmliMrE54J6nIYB5XTwL5f/CLFW9owfls+YSU8tVW15RQ2w+a3fSbPjC6HdQNtWZkiA== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" lodash "^4.17.19" to-fast-properties "^2.0.0" @@ -844,8 +843,8 @@ "@latus/core@1.0.0": version "1.0.0" - resolved "https://npm.i12e.cha0s.io/@latus%2fcore/-/core-1.0.0.tgz#d549ba1169ac744101943403f2f97484b8860877" - integrity sha512-yXwmiXCxzkNVIx0XbDJ9b3eNZe+IU/jnL9XDeNvK90EHY4V1JFaYmYOBG0NUfi4TODNHaZKlWnJbAiEFCk7dbw== + resolved "https://npm.i12e.cha0s.io/@latus%2fcore/-/core-1.0.0.tgz#e2a29fa134373b453c8bd999b8eec7fad6e242a9" + integrity sha512-Gvq1bCQrAnK5Naln6/Yehn5aoB6Y4xVMKV7fpq82AtefZ1FcwPJ4LV5haYG5cfygHvT4/uxYehIUb2cYDYJtag== dependencies: debug "4.3.1" js-yaml "3.14.0" @@ -1020,9 +1019,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*": - version "14.14.10" - resolved "https://npm.i12e.cha0s.io/@types%2fnode/-/node-14.14.10.tgz#5958a82e41863cfc71f2307b3748e3491ba03785" - integrity sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ== + version "14.14.14" + resolved "https://npm.i12e.cha0s.io/@types%2fnode/-/node-14.14.14.tgz#f7fd5f3cc8521301119f63910f0fb965c7d761ae" + integrity sha512-UHnOPWVWV1z+VV8k6L1HhG7UbGBgIdghqF3l9Ny9ApPghbjICXkUJSd/b9gOgQfjM1r+37cipdw/HJ3F6ICEnQ== "@types/source-list-map@*": version "0.1.2" @@ -1707,13 +1706,13 @@ browserify-zlib@^0.2.0: pako "~1.0.5" browserslist@^4.14.5, browserslist@^4.15.0: - version "4.15.0" - resolved "https://npm.i12e.cha0s.io/browserslist/-/browserslist-4.15.0.tgz#3d48bbca6a3f378e86102ffd017d9a03f122bdb0" - integrity sha512-IJ1iysdMkGmjjYeRlDU8PQejVwxvVO5QOfXH7ylW31GO6LwNRSmm/SgRXtNsEXqMLl2e+2H5eEJ7sfynF8TCaQ== + version "4.16.0" + resolved "https://npm.i12e.cha0s.io/browserslist/-/browserslist-4.16.0.tgz#410277627500be3cb28a1bfe037586fbedf9488b" + integrity sha512-/j6k8R0p3nxOC6kx5JGAxsnhc9ixaWJfYc+TNTzxg6+ARaESAvQGV7h0uNOB4t+pLQJZWzcrMxXOxjgsCj3dqQ== dependencies: - caniuse-lite "^1.0.30001164" + caniuse-lite "^1.0.30001165" colorette "^1.2.1" - electron-to-chromium "^1.3.612" + electron-to-chromium "^1.3.621" escalade "^3.1.1" node-releases "^1.1.67" @@ -1831,10 +1830,10 @@ camelcase@^6.0.0: resolved "https://npm.i12e.cha0s.io/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001164: - version "1.0.30001165" - resolved "https://npm.i12e.cha0s.io/caniuse-lite/-/caniuse-lite-1.0.30001165.tgz#32955490d2f60290bb186bb754f2981917fa744f" - integrity sha512-8cEsSMwXfx7lWSUMA2s08z9dIgsnR5NAqjXP23stdsU3AUWkCr/rr4s4OFtHXn5XXr6+7kam3QFVoYyXNPdJPA== +caniuse-lite@^1.0.30001165: + version "1.0.30001168" + resolved "https://npm.i12e.cha0s.io/caniuse-lite/-/caniuse-lite-1.0.30001168.tgz#6fcd098c139d003b9bd484cbb9ca26cb89907f9a" + integrity sha512-P2zmX7swIXKu+GMMR01TWa4csIKELTNnZKc+f1CjebmZJQtTAEXmpQSoKVJVVcvPGAA0TEYTOUp3VehavZSFPQ== chai@4.2.0: version "4.2.0" @@ -2149,7 +2148,7 @@ copy-webpack-plugin@^5.1.1: serialize-javascript "^4.0.0" webpack-log "^2.0.0" -core-js-compat@^3.7.0: +core-js-compat@^3.8.0: version "3.8.1" resolved "https://npm.i12e.cha0s.io/core-js-compat/-/core-js-compat-3.8.1.tgz#8d1ddd341d660ba6194cbe0ce60f4c794c87a36e" integrity sha512-a16TLmy9NVD1rkjUGbwuyWkiDoN0FDpAwrfLONvHFQx0D9k7J9y0srwMT8QP/Z6HE3MIFaVynEeYwZwPX1o5RQ== @@ -2561,10 +2560,10 @@ ee-first@1.1.1: resolved "https://npm.i12e.cha0s.io/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.612: - version "1.3.616" - resolved "https://npm.i12e.cha0s.io/electron-to-chromium/-/electron-to-chromium-1.3.616.tgz#de63d1c79bb8eb61168774df0c11c9e1af69f9e8" - integrity sha512-CI8L38UN2BEnqXw3/oRIQTmde0LiSeqWSRlPA42ZTYgJQ8fYenzAM2Z3ni+jtILTcrs5aiXZCGJ96Pm+3/yGyQ== +electron-to-chromium@^1.3.621: + version "1.3.627" + resolved "https://npm.i12e.cha0s.io/electron-to-chromium/-/electron-to-chromium-1.3.627.tgz#4acdbbbbe31eb605fba8380063fd9c8a7e5ca4a0" + integrity sha512-O5IVRS4sCxP2+vECAp7uHkaI8V+dKYpuCyBcLn+hqVAOy/RONd8zx+6eH7TuWSTBYs/oUrzBXkNMZuVsQd58kQ== elliptic@^6.5.3: version "6.5.3" @@ -3236,9 +3235,9 @@ flush-write-stream@^1.0.0: readable-stream "^2.3.6" follow-redirects@^1.0.0: - version "1.13.0" - resolved "https://npm.i12e.cha0s.io/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" - integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== + version "1.13.1" + resolved "https://npm.i12e.cha0s.io/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7" + integrity sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg== for-in@^1.0.2: version "1.0.2" @@ -3578,9 +3577,9 @@ hpack.js@^2.1.6: wbuf "^1.1.0" html-entities@^1.2.0, html-entities@^1.3.1: - version "1.3.1" - resolved "https://npm.i12e.cha0s.io/html-entities/-/html-entities-1.3.1.tgz#fb9a1a4b5b14c5daba82d3e34c6ae4fe701a0e44" - integrity sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA== + version "1.3.3" + resolved "https://npm.i12e.cha0s.io/html-entities/-/html-entities-1.3.3.tgz#3dca638a43ee7de316fc23067398491152ad4736" + integrity sha512-/VulV3SYni1taM7a4RMdceqzJWR39gpZHjBwUnsCFKWV/GJkD14CJ5F7eWcZozmHJK0/f/H5U3b3SiPkuvxMgg== html-loader@^0.5.5: version "0.5.5" @@ -3801,9 +3800,9 @@ inherits@2.0.3: integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ini@^1.3.4, ini@^1.3.5: - version "1.3.5" - resolved "https://npm.i12e.cha0s.io/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.8" + resolved "https://npm.i12e.cha0s.io/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== internal-ip@^4.3.0: version "4.3.0" @@ -4087,7 +4086,7 @@ js-tokens@^4.0.0: resolved "https://npm.i12e.cha0s.io/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.14.0, js-yaml@^3.13.1: +js-yaml@3.14.0: version "3.14.0" resolved "https://npm.i12e.cha0s.io/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== @@ -4095,6 +4094,14 @@ js-yaml@3.14.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://npm.i12e.cha0s.io/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsesc@^2.5.1: version "2.5.2" resolved "https://npm.i12e.cha0s.io/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4443,9 +4450,9 @@ mime@1.6.0: integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.4.4: - version "2.4.6" - resolved "https://npm.i12e.cha0s.io/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" - integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== + version "2.4.7" + resolved "https://npm.i12e.cha0s.io/mime/-/mime-2.4.7.tgz#962aed9be0ed19c91fd7dc2ece5d7f4e89a90d74" + integrity sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== mimic-fn@^3.1.0: version "3.1.0" @@ -4568,11 +4575,16 @@ ms@2.1.1: resolved "https://npm.i12e.cha0s.io/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@2.1.2, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://npm.i12e.cha0s.io/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.1: + version "2.1.3" + resolved "https://npm.i12e.cha0s.io/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://npm.i12e.cha0s.io/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -5645,7 +5657,7 @@ resolve-url@^0.2.1: resolved "https://npm.i12e.cha0s.io/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0: version "1.19.0" resolved "https://npm.i12e.cha0s.io/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== @@ -6673,9 +6685,9 @@ webpack-cli@^3: yargs "^13.3.2" webpack-dev-middleware@^3.7.2: - version "3.7.2" - resolved "https://npm.i12e.cha0s.io/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" - integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== + version "3.7.3" + resolved "https://npm.i12e.cha0s.io/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz#0639372b143262e2b84ab95d3b91a7597061c2c5" + integrity sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== dependencies: memory-fs "^0.4.1" mime "^2.4.4" @@ -6771,6 +6783,11 @@ webpack-virtual-modules@0.3.2: dependencies: debug "^3.0.0" +webpack-virtual-modules@^0.4.1: + version "0.4.1" + resolved "https://npm.i12e.cha0s.io/webpack-virtual-modules/-/webpack-virtual-modules-0.4.1.tgz#cae5a7085d34331d077225f77037bea233dbfdad" + integrity sha512-BH/RKOHk223WdBDLFqghztx3DF5AqR3CKg3ue1KN9S1SAaXP68Kj/4rF0lsdysxXaanzx7aWl1u0+lnfj7+OtQ== + webpack@^4: version "4.44.2" resolved "https://npm.i12e.cha0s.io/webpack/-/webpack-4.44.2.tgz#6bfe2b0af055c8b2d1e90ed2cd9363f841266b72" diff --git a/packages/react/src/index.js b/packages/react/src/index.js index 06d1d87..4756edd 100644 --- a/packages/react/src/index.js +++ b/packages/react/src/index.js @@ -3,7 +3,10 @@ const react = require('@neutrinojs/react'); const middleware = (neutrino) => { neutrino.use(react({ clean: false, - hot: false, + html: { + inject: false, + template: `${neutrino.options.root}/client/index.ejs`, + }, style: { extract: { enabled: false, @@ -37,15 +40,8 @@ const middleware = (neutrino) => { 'scss', ].forEach((path) => { neutrino.config.resolve.alias - .set(path, `${neutrino.options.source}/react/${path}`); + .set(path, `${process.cwd()}/src/react/${path}`); }); - neutrino.config.optimization - .runtimeChunk(false) - .splitChunks(false); - neutrino.config.plugins - .delete('html-index'); - neutrino.config.entryPoints - .delete('index'); }); }; @@ -54,7 +50,9 @@ export default { '@latus/core/config': () => ({ entry: './react', }), - '@latus/http/build': () => middleware, + '@latus/http/build': (client) => { + client.use.splice(1, 1, middleware); + }, '@latus/http/plugins': (req, {config: {'@latus/react': {entry}}}) => ({ [entry]: {}, }),