diff --git a/package.json b/package.json index 5279042..923391c 100644 --- a/package.json +++ b/package.json @@ -1,28 +1,30 @@ { - "name": "email-renderer", + "name": "@elyby/emails-renderer", "version": "1.0.0", "description": "", - "main": "src/index.js", + "main": "dist/app.js", "repository": { "type": "git", - "url": "git+ssh://git@gitlab.com/elyby/email-renderer.git" + "url": "https://github.com/elyby/emails-renderer" }, - "keywords": [], "author": "SleepWalker ", "license": "Apache-2.0", "bugs": { - "url": "https://gitlab.com/elyby/email-renderer/issues" + "url": "https://github.com/elyby/emails-renderer/issues" }, - "homepage": "https://gitlab.com/elyby/email-renderer#README", + "homepage": "https://github.com/elyby/emails-renderer#README", "scripts": { - "start": "webpack-dev-server --mode=development --progress --colors", + "start": "webpack-dev-server --mode=development --application=devtool --progress --colors", + "start:server": "webpack --mode=development --application=server --progress --colors && node dist/app.js", "lint": "eslint \"{scripts,src,webpack-utils}/**/*.{js,jsx,ts,tsx}\"", "i18n:collect": "./scripts/i18n-collect/index.js", "i18n:pull": "node scripts/i18n-crowdin/index.js pull", "i18n:push": "node scripts/i18n-crowdin/index.js push", - "build": "rm -rf dist/ && webpack --mode=production --progress --colors" + "build": "rm -rf dist/ && webpack --mode=production --application=server --progress --colors" }, "dependencies": { + "fastify": "^2.4.1", + "fastify-static": "^2.4.0", "react": "^16.8.4", "react-dom": "^16.8.4", "react-intl": "^2.0.0" @@ -36,7 +38,6 @@ "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.3.3", "@elyby/eslint-plugin": "^0.2.0", - "@types/react": "^16.8.17", "@types/react-dom": "^16.8.4", "@types/react-intl": "^2.3.17", "@types/webpack-env": "^1.13.9", @@ -52,7 +53,6 @@ "html-webpack-plugin": "^3.2.0", "i18n-collect": "file:scripts/i18n-collect", "i18n-crowdin": "file:scripts/i18n-crowdin", - "ifdef-loader": "^2.1.1", "intl-json-loader": "file:./webpack-utils/intl-json-loader", "json-loader": "^0.5.7", "text2png-loader": "file:./webpack-utils/text2png-loader", @@ -60,7 +60,8 @@ "webpack": "^4.29.6", "webpack-bundle-analyzer": "^3.3.2", "webpack-cli": "^3.3.0", - "webpack-dev-server": "^3.2.1" + "webpack-dev-server": "^3.2.1", + "webpack-node-externals": "^1.7.2" }, "engines": { "node": ">=8.0" diff --git a/src/App.tsx b/src/App.tsx index 066649c..0dfb710 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,8 +11,7 @@ export interface Params { type: string; payload: { locale: string; - [key: string]: any; - }; + } & Record; } const App: FunctionComponent = ({ type, payload: { locale, ...params } }) => { diff --git a/src/devTools/DevApp.tsx b/src/devTools/DevApp.tsx index 9482d69..722dbac 100644 --- a/src/devTools/DevApp.tsx +++ b/src/devTools/DevApp.tsx @@ -1,4 +1,12 @@ -import React, { BaseSyntheticEvent, FunctionComponent, useCallback, useEffect, useMemo, useState } from 'react'; +import React, { + BaseSyntheticEvent, + FunctionComponent, + useCallback, + useEffect, + useLayoutEffect, + useMemo, + useState, +} from 'react'; import { DEFAULT_LANGUAGE, SUPPORTED_LANGUAGES } from 'params'; @@ -22,7 +30,7 @@ const DevApp: FunctionComponent = () => { const [ isMinimized, setIsMinimized ] = useState(false); // Load stored state from local storage on the first run - useEffect(() => { + useLayoutEffect(() => { let state: LocalStorageState; try { state = JSON.parse(localStorage.getItem('emailRendererState') || ''); diff --git a/src/devtool.tsx b/src/devtool.tsx new file mode 100644 index 0000000..5b774e4 --- /dev/null +++ b/src/devtool.tsx @@ -0,0 +1,6 @@ +import React from 'react'; + +import ReactDOM from 'react-dom'; +import DevApp from 'devTools'; + +ReactDOM.render(, document.getElementById('app')); diff --git a/src/index.tsx b/src/index.tsx deleted file mode 100644 index d903766..0000000 --- a/src/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable spaced-comment */ -import React from 'react'; - -/// #if !PRODUCTION - -import ReactDOM from 'react-dom'; -import DevApp from 'devTools'; - -ReactDOM.render(, document.getElementById('app')); - -/// #else - -import ReactDOMServer from 'react-dom/server'; -import { Html } from 'components'; -import App from 'App'; - -interface Props { - type: string; - payload: { - locale: string; - [key: string]: string; - }; - assetsHost?: string; -} - -export default ({ assetsHost, ...props }: Props) => { - if (assetsHost) { - // eslint-disable-next-line camelcase,@typescript-eslint/camelcase - __webpack_public_path__ = assetsHost.replace(/\/*$/, '/'); - } - - return ReactDOMServer.renderToStaticMarkup( - - - - ); -}; - -/// #endif diff --git a/src/server.tsx b/src/server.tsx new file mode 100644 index 0000000..63d3062 --- /dev/null +++ b/src/server.tsx @@ -0,0 +1,81 @@ +/* eslint-env node */ +/* eslint-disable spaced-comment */ +import React from 'react'; + +import path from 'path'; + +import createFastify from 'fastify'; +import fastifyStatic from 'fastify-static'; +import { AddressInfo } from 'net'; + +import ReactDOMServer from 'react-dom/server'; +import { Html } from 'components'; +import App, { Params } from 'App'; + +const fastify = createFastify({ + logger: { + level: 'warn', + }, +}); + +interface GetTemplateQueryParams { + assetsHost?: string; +} + +interface GetTemplateUrlParams { + locale: string; + template: string; +} + +fastify.register(fastifyStatic, { + root: path.join(__dirname, 'assets'), + prefix: '/assets/', +}); + +fastify.get('/templates/:locale/:template', { + schema: { + querystring: { + assetsHost: { type: 'string' }, + payload: { type: 'object' }, + }, + response: { + 200: { + type: 'string', + }, + }, + }, +}, async (request, reply) => { + const { template, locale } = request.params; + reply.header('Content-Type', 'text/html'); + + const { assetsHost, ...payloads } = request.query; + + const params: Params = { + type: template, + payload: { + locale, + ...payloads, + }, + }; + + if (assetsHost) { + // eslint-disable-next-line camelcase,@typescript-eslint/camelcase + __webpack_public_path__ = `${assetsHost.replace(/\/+$/, '')}/`; + } + + return ReactDOMServer.renderToStaticMarkup( + + + + ); +}); + +(async () => { + try { + await fastify.listen(3000); + fastify.log.info(`server listening on ${(fastify.server.address() as AddressInfo)!.port}`); + } catch (err) { + fastify.log.error(err); + process.exit(1); + } +})(); diff --git a/webpack.config.js b/webpack.config.js index e6218bb..5648c4a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,24 +5,35 @@ const path = require('path'); const { ContextReplacementPlugin } = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); +const nodeExternals = require('webpack-node-externals'); const SUPPORTED_LANGUAGES = Object.keys(require('./src/i18n/index.json')); -module.exports = (env, { mode = 'development' }) => { +module.exports = (env, { mode = 'development', application = 'server' }) => { const isProduction = mode === 'production'; + const isDevelopment = !isProduction; + const isDevTool = application === 'devtool'; + const isServer = !isDevTool; return { - devtool: isProduction ? false : 'source-map', + devtool: isDevTool ? 'source-map' : false, entry: { - app: path.join(__dirname, 'src'), + app: path.join(__dirname, 'src', application), + }, + + target: isServer ? 'node' : 'web', + + externals: isServer ? [nodeExternals()] : [], + + node: { + __dirname: false, }, output: { path: path.join(__dirname, 'dist'), publicPath: '/', - filename: isProduction ? '[name].js' : '[name].js?[hash]', - libraryTarget: isProduction ? 'commonjs2' : undefined, + filename: '[name].js', }, resolve: { @@ -59,7 +70,7 @@ module.exports = (env, { mode = 'development' }) => { new BundleAnalyzerPlugin({ openAnalyzer: false, generateStatsFile: true, - analyzerMode: isProduction ? 'static' : 'server', + analyzerMode: isDevTool ? 'server' : 'static', }), ], @@ -74,8 +85,8 @@ module.exports = (env, { mode = 'development' }) => { options: { presets: [ ['@babel/preset-env', { - targets: isProduction ? { - node: '8', + targets: isServer ? { + node: isDevelopment ? 'current' : '12', } : { browsers: [ 'last 1 chrome version', @@ -84,7 +95,7 @@ module.exports = (env, { mode = 'development' }) => { }, }], ['@babel/preset-react', { - development: !isProduction, + development: isDevelopment, }], ['@babel/preset-typescript', { jsx: true, @@ -97,12 +108,6 @@ module.exports = (env, { mode = 'development' }) => { ], }, }, - { - loader: 'ifdef-loader', - options: { - PRODUCTION: isProduction, - }, - }, ], }, { diff --git a/yarn.lock b/yarn.lock index 6d8f201..dd63353 100644 --- a/yarn.lock +++ b/yarn.lock @@ -802,14 +802,6 @@ "@types/prop-types" "*" csstype "^2.2.0" -"@types/react@^16.8.17": - version "16.8.19" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.19.tgz#629154ef05e2e1985cdde94477deefd823ad9be3" - integrity sha512-QzEzjrd1zFzY9cDlbIiFvdr+YUmefuuRYrPxmkwG0UQv5XF35gFIi7a95m1bNVcFU0VimxSZ5QVGSiBmlggQXQ== - dependencies: - "@types/prop-types" "*" - csstype "^2.2.0" - "@types/webpack-env@^1.13.9": version "1.13.9" resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.13.9.tgz#a67287861c928ebf4159a908d1fb1a2a34d4097a" @@ -1028,6 +1020,11 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +abstract-logging@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/abstract-logging/-/abstract-logging-1.0.0.tgz#8b7deafd310559bc28f77724dd1bb30177278c1b" + integrity sha1-i33q/TEFWbwo93ck3RuzAXcnjBs= + accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1066,7 +1063,7 @@ ajv-keywords@^3.1.0: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.0.tgz#4b831e7b531415a7cc518cd404e73f6193c6349d" integrity sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw== -ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1: +ajv@^6.1.0, ajv@^6.5.5, ajv@^6.8.1, ajv@^6.9.1, ajv@^6.9.2: version "6.10.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== @@ -1131,6 +1128,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== +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= + are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" @@ -1270,6 +1272,15 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +avvio@^6.1.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/avvio/-/avvio-6.2.1.tgz#d9a4e5ccb8411ff77dca42f24ad1137435893773" + integrity sha512-k+gTocL3yShwN1PtKEsSj7eFiApcZ4JZLAu/ecyzEb8jyx+Kmxb+7SXUsodB47g7fqhs/zkfsCdqq72a1ok5Ew== + dependencies: + archy "^1.0.0" + debug "^4.0.0" + fastq "^1.6.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2071,7 +2082,7 @@ debug@^3.2.5, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: +debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -2120,6 +2131,11 @@ deepmerge@1.5.0: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.0.tgz#00bc5b88fd23b8130f9f5049071c3420e07a5465" integrity sha512-Hm4+NyDQGgH3oYhKqR0gd99veBBZpnEUNoEfFl+3PRkQL+LKGJEBgqimeofAWzUn6aBzcaYPJrRigto/WfDzTg== +deepmerge@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.2.0.tgz#58ef463a57c08d376547f8869fdc5bcee957f44e" + integrity sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow== + default-gateway@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" @@ -2715,11 +2731,11 @@ extend@~3.0.2: "extended-translations-loader@file:webpack-utils/extended-translations-loader": version "1.0.0" dependencies: - "@lesechos/image-size-loader" "file:../../.cache/yarn/v4/npm-extended-translations-loader-1.0.0-d0252a94-e0b3-4ec9-9ec4-2cf66270a36e-1559076440419/node_modules/image-size-loader" + "@lesechos/image-size-loader" "file:../../.cache/yarn/v4/npm-extended-translations-loader-1.0.0-fe1c90c6-5a79-4e5e-8995-7c33cb1db7d9-1559762166005/node_modules/image-size-loader" glob "^7.1.4" loader-utils "^1.2.3" qs "^6.0.0" - text2png-loader "file:../../.cache/yarn/v4/npm-extended-translations-loader-1.0.0-d0252a94-e0b3-4ec9-9ec4-2cf66270a36e-1559076440419/node_modules/text2png-loader" + text2png-loader "file:../../.cache/yarn/v4/npm-extended-translations-loader-1.0.0-fe1c90c6-5a79-4e5e-8995-7c33cb1db7d9-1559762166005/node_modules/text2png-loader" tmp "^0.0.33" external-editor@^3.0.3: @@ -2760,6 +2776,11 @@ eyes@0.1.x: resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= +fast-decode-uri-component@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz#46f8b6c22b30ff7a81357d4f59abfae938202543" + integrity sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg== + fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" @@ -2770,11 +2791,73 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= +fast-json-stringify@^1.15.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-1.15.3.tgz#09258f2e5cb67cadd2e1cfd0baecf5b808294643" + integrity sha512-p+ucnySTbrUQ9M7u8ygFIxrmpG8B+8O4/PvLDdh+RqMMgj/h6OoDb7U2lP+kqg3PDclQBFbSIArRhkorFwZLLg== + dependencies: + ajv "^6.8.1" + deepmerge "^3.0.0" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-redact@^1.4.4: + version "1.5.0" + resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-1.5.0.tgz#302892f566750c4f5eec7b830bfc9bc473484034" + integrity sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ== + +fast-safe-stringify@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz#04b26106cc56681f51a044cfc0d76cf0008ac2c2" + integrity sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg== + +fastify-plugin@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/fastify-plugin/-/fastify-plugin-1.6.0.tgz#c8198b08608f20c502b5dad26b36e9ae27206d7c" + integrity sha512-lFa9txg8LZx4tljj33oG53nUXhVg0baZxtP9Pxi0dJmI0NQxzkDk5DS9kr3D7iMalUAp3mvIq16OQumc7eIvLA== + dependencies: + semver "^6.0.0" + +fastify-static@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/fastify-static/-/fastify-static-2.4.0.tgz#7d3937897a8feaa66a920a915f72a11e795c3351" + integrity sha512-JgpxLsy6ask3UUXrHd76Vi0TvBZ6VtFgHaBIBV8hZ02Mn7YY5Vq0n2QOmcyJqSAF4RWc7UjubRE+wTSDXYUYQg== + dependencies: + fastify-plugin "^1.5.0" + glob "^7.1.3" + readable-stream "^3.1.1" + send "^0.16.0" + +fastify@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/fastify/-/fastify-2.4.1.tgz#745b9c0793ce10ebd2c265898cbf3583ab572885" + integrity sha512-AVzNO8/gg6og8T/s7M3UUQjvI4AIJNm8CSHm+kf3S0mGoJfWpfRuTD1pRTQ5tM+0pJpybyT5nDVTy97/oTD1+w== + dependencies: + abstract-logging "^1.0.0" + ajv "^6.9.2" + avvio "^6.1.1" + fast-json-stringify "^1.15.0" + find-my-way "^2.0.0" + flatstr "^1.0.12" + light-my-request "^3.2.0" + middie "^4.0.1" + pino "^5.11.1" + proxy-addr "^2.0.4" + readable-stream "^3.1.1" + rfdc "^1.1.2" + secure-json-parse "^1.0.0" + tiny-lru "^6.0.1" + +fastq@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2" + integrity sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA== + dependencies: + reusify "^1.0.0" + faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -2866,6 +2949,15 @@ find-cache-dir@^2.0.0: make-dir "^2.0.0" pkg-dir "^3.0.0" +find-my-way@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/find-my-way/-/find-my-way-2.0.1.tgz#965aa7cacac2362d47d5d7ce219f51bf76216af7" + integrity sha512-c+YnWk4LKcWSNu743wfoqNOZTYQ6kZ/kzZCjALGblLpzbEAv3INakGMZ1K/by+Wmf/NP3+3LpOQMOFw6/q52wQ== + dependencies: + fast-decode-uri-component "^1.0.0" + safe-regex2 "^2.0.0" + semver-store "^0.3.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -2892,6 +2984,11 @@ flat-cache@^2.0.1: rimraf "2.6.3" write "1.0.3" +flatstr@^1.0.12, flatstr@^1.0.9: + version "1.0.12" + resolved "https://registry.yarnpkg.com/flatstr/-/flatstr-1.0.12.tgz#c2ba6a08173edbb6c9640e3055b95e287ceb5931" + integrity sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw== + flatted@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" @@ -3407,13 +3504,6 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== -ifdef-loader@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ifdef-loader/-/ifdef-loader-2.1.1.tgz#443cb6c99c68ae085966b9e2ada853001d368ee7" - integrity sha512-0jyVmSDGeiuWksoo44XXdMp+vbQ8Fp7PRz8X+6ecBfgSOF9OpsLj9M+N18YyXADC71jKZf93P81/SQtORPq6bg== - dependencies: - loader-utils "^1.1.0" - iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" @@ -3939,6 +4029,14 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +light-my-request@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/light-my-request/-/light-my-request-3.3.0.tgz#5cdb3c75c50bc57429f20b08e3be805662e23232" + integrity sha512-dLtwhjzbuHJ+KMMUBSlVid6Iqxx+KKvULWLnBD06WMgPHxiPkEh1cVyj+Xc8HGU64hULlSw/sZVCdFsvjNQeNA== + dependencies: + ajv "^6.8.1" + readable-stream "^3.1.1" + loader-runner@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -4097,6 +4195,14 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: snapdragon "^0.8.1" to-regex "^3.0.2" +middie@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/middie/-/middie-4.0.1.tgz#24b4333034926ebd7831ed58766d050c1ce6300a" + integrity sha512-eYK6EEHZiYpQMYPmeCb/vC9ZzJg1HCqi1ot/fQs1sPZKt/XREgXouQ7g6c9J5XvDV5203JjbpovCYNkHcHgTpQ== + dependencies: + path-to-regexp "^3.0.0" + reusify "^1.0.2" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -4766,6 +4872,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@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.0.0.tgz#c981a218f3df543fa28696be2f88e0c58d2e012a" + integrity sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A== + pbkdf2@^3.0.3: version "3.0.17" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" @@ -4804,6 +4915,23 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= +pino-std-serializers@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz#cb5e3e58c358b26f88969d7e619ae54bdfcc1ae1" + integrity sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ== + +pino@^5.11.1: + version "5.12.6" + resolved "https://registry.yarnpkg.com/pino/-/pino-5.12.6.tgz#04a668278d7616db71871f1bd3e26f6918e05feb" + integrity sha512-LM5ug2b27uymIIkaBw54ncF+9DSf8S4z1uzw+Y5I94dRu3Z+lFuB13j0kg1InAeyxy+CsLGnWHKy9+zgTreFOg== + dependencies: + fast-redact "^1.4.4" + fast-safe-stringify "^2.0.6" + flatstr "^1.0.9" + pino-std-serializers "^2.3.0" + quick-format-unescaped "^3.0.2" + sonic-boom "^0.7.3" + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -4904,7 +5032,7 @@ prop-types@^15.5.4, prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" -proxy-addr@~2.0.4, proxy-addr@~2.0.5: +proxy-addr@^2.0.4, proxy-addr@~2.0.4, proxy-addr@~2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== @@ -4999,6 +5127,11 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== +quick-format-unescaped@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz#0137e94d8fb37ffeb70040535111c378e75396fb" + integrity sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA== + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -5375,11 +5508,26 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +ret@~0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.2.2.tgz#b6861782a1f4762dce43402a71eb7a283f44573c" + integrity sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ== + +reusify@^1.0.0, reusify@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + revalidator@0.1.x: version "0.1.8" resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b" integrity sha1-/s5hv6DBtSoga9axgZgYS91SOjs= +rfdc@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" + integrity sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug== + rimraf@2.6.3, rimraf@2.x.x, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -5421,6 +5569,13 @@ safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-regex2@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/safe-regex2/-/safe-regex2-2.0.0.tgz#b287524c397c7a2994470367e0185e1916b1f5b9" + integrity sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ== + dependencies: + ret "~0.2.0" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -5455,6 +5610,11 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" +secure-json-parse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-1.0.0.tgz#fa32c6778166b783cf6315db967944e63f7747d0" + integrity sha512-kMg4jXttRQzVyLebIDc+MRxCueJ/zsmHpCn59BRd0mZUCd+V02wNd7/Pds8Nyhv7jfLHo1KkUOzdIF7cRMU4LQ== + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -5467,6 +5627,11 @@ selfsigned@^1.10.4: dependencies: node-forge "0.7.5" +semver-store@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/semver-store/-/semver-store-0.3.0.tgz#ce602ff07df37080ec9f4fb40b29576547befbe9" + integrity sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg== + semver@5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -5482,7 +5647,7 @@ semver@^6.0.0, semver@^6.1.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b" integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ== -send@0.16.2: +send@0.16.2, send@^0.16.0: version "0.16.2" resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== @@ -5696,6 +5861,13 @@ sockjs@0.3.19: faye-websocket "^0.10.0" uuid "^3.0.1" +sonic-boom@^0.7.3: + version "0.7.4" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-0.7.4.tgz#dc1740a900cf8646471f6ac1f4933a5c66c0ca60" + integrity sha512-8JRAJg0RxZtFLQMxolwETvWd2JSlH3ZGo/Z4xPxMbpqF14xCgVYPVeFCFOR3zyr3pcfG82QDVj6537Sx5ZWdNw== + dependencies: + flatstr "^1.0.9" + sort-keys@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-3.0.0.tgz#fa751737e3da363ef80632d4fd78e324d661fe9a" @@ -6070,6 +6242,11 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +tiny-lru@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/tiny-lru/-/tiny-lru-6.0.1.tgz#558bd6b7232b8b9dfa482147539676fdd75a3a07" + integrity sha512-k/vdHz+bFALjmik0URLWBYNuO0hCABTL5dullbZBXvFDdlL8RrKaeLR6YuHfX+6ZXOLkHw+HpNLCUA7DtLMQmg== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -6499,6 +6676,11 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" +webpack-node-externals@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.7.2.tgz#6e1ee79ac67c070402ba700ef033a9b8d52ac4e3" + integrity sha512-ajerHZ+BJKeCLviLUUmnyd5B4RavLF76uv3cs6KNuO8W+HuQaEs0y0L7o40NQxdPy5w0pcv8Ew7yPUAQG0UdCg== + webpack-sources@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85"