diff --git a/jest.config.front.js b/jest.config.front.js index a7b652ba57..168fa3b07b 100644 --- a/jest.config.front.js +++ b/jest.config.front.js @@ -38,14 +38,16 @@ module.exports = { __webpack_public_path__: 'http://localhost:4000', strapi: { backendURL: 'http://localhost:1337', + isEE: false, + features: [], + projectType: 'Community', }, BACKEND_URL: 'http://localhost:1337', ADMIN_PATH: '/admin', NODE_ENV: 'test', - 'process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES': [], - STRAPI_ADMIN_ENABLED_EE_FEATURES: [], 'process.env.STRAPI_ADMIN_SHOW_TUTORIALS': 'false', 'process.env.STRAPI_ADMIN_UPDATE_NOTIFICATION': 'false', + // FIXME create a clean config file }, moduleDirectories: [ 'node_modules', diff --git a/packages/core/admin/admin/src/StrapiApp.js b/packages/core/admin/admin/src/StrapiApp.js index 4644dcf6dc..b89d800ebe 100644 --- a/packages/core/admin/admin/src/StrapiApp.js +++ b/packages/core/admin/admin/src/StrapiApp.js @@ -18,10 +18,6 @@ import { import injectionZones from './injectionZones'; import themes from './themes'; -window.strapi = { - backendURL: process.env.STRAPI_ADMIN_BACKEND_URL, -}; - class StrapiApp { constructor({ appPlugins, library, locales, middlewares, reducers }) { this.appLocales = ['en', ...locales.filter(loc => loc !== 'en')]; diff --git a/packages/core/admin/admin/src/components/LeftMenu/compos/Footer/index.js b/packages/core/admin/admin/src/components/LeftMenu/compos/Footer/index.js index 1e8a3ceb33..17ad753299 100644 --- a/packages/core/admin/admin/src/components/LeftMenu/compos/Footer/index.js +++ b/packages/core/admin/admin/src/components/LeftMenu/compos/Footer/index.js @@ -10,7 +10,7 @@ import { useAppInfos } from '@strapi/helper-plugin'; import Wrapper, { A } from './Wrapper'; function LeftMenuFooter() { - const projectType = process.env.STRAPI_ADMIN_PROJECT_TYPE; + const projectType = strapi.projectType; const { strapiVersion } = useAppInfos(); return ( diff --git a/packages/core/admin/admin/src/index.js b/packages/core/admin/admin/src/index.js index fa7647432d..2dbc1d6c50 100644 --- a/packages/core/admin/admin/src/index.js +++ b/packages/core/admin/admin/src/index.js @@ -1,10 +1,21 @@ import ReactDOM from 'react-dom'; + import StrapiApp from './StrapiApp'; import { Components, Fields, Middlewares, Reducers } from './core/apis'; +import { axiosInstance } from './core/utils'; import appCustomisations from './admin.config'; import plugins from './plugins'; import appReducers from './reducers'; +window.strapi = { + backendURL: process.env.STRAPI_ADMIN_BACKEND_URL, + isEE: false, + features: { + SSO: 'sso', + }, + projectType: 'Community', +}; + const appConfig = { locales: [], }; @@ -28,7 +39,26 @@ const app = StrapiApp({ const MOUNT_NODE = document.getElementById('app'); const run = async () => { - await app.bootstrapAdmin(); + try { + const { + data: { + data: { isEE, features }, + }, + } = await axiosInstance.get('/admin/project-type'); + + window.strapi.isEE = isEE; + window.strapi.features = { + ...window.strapi.features, + allFeatures: features, + isEnabled: f => features.includes(f), + }; + + window.strapi.projectType = isEE ? 'Enterprise' : 'Community'; + } catch (err) { + console.error(err); + } + + await await app.bootstrapAdmin(); await app.initialize(); await app.boot(); await app.loadTrads(); diff --git a/packages/core/admin/config/routes.json b/packages/core/admin/config/routes.json index 0f75dfa914..cf07d368ec 100644 --- a/packages/core/admin/config/routes.json +++ b/packages/core/admin/config/routes.json @@ -16,14 +16,17 @@ "path": "/init", "handler": "admin.init" }, + { + "method": "GET", + "path": "/project-type", + "handler": "admin.getProjectType" + }, { "method": "GET", "path": "/information", "handler": "admin.information", "config": { - "policies": [ - "admin::isAuthenticatedAdmin" - ] + "policies": ["admin::isAuthenticatedAdmin"] } }, { @@ -230,9 +233,7 @@ "path": "/users/:id", "handler": "user.deleteOne", "config": { - "policies": [ - ["admin::hasPermissions", ["admin::users.delete"]] - ] + "policies": [["admin::hasPermissions", ["admin::users.delete"]]] } }, { @@ -240,9 +241,7 @@ "path": "/users/batch-delete", "handler": "user.deleteMany", "config": { - "policies": [ - ["admin::hasPermissions", ["admin::users.delete"]] - ] + "policies": [["admin::hasPermissions", ["admin::users.delete"]]] } }, { diff --git a/packages/core/admin/controllers/__tests__/admin.test.js b/packages/core/admin/controllers/__tests__/admin.test.js index 445efc13b4..41addef785 100644 --- a/packages/core/admin/controllers/__tests__/admin.test.js +++ b/packages/core/admin/controllers/__tests__/admin.test.js @@ -1,5 +1,22 @@ 'use strict'; +jest.mock('@strapi/strapi/lib/utils/ee', () => { + const eeModule = () => false; + + Object.assign(eeModule, { + features: { + isEnabled() { + return false; + }, + getEnabled() { + return []; + }, + }, + }); + + return eeModule; +}); + const adminController = require('../admin'); describe('Admin Controller', () => { diff --git a/packages/core/admin/controllers/admin.js b/packages/core/admin/controllers/admin.js index 91df62d7cc..d8d3afb7c4 100644 --- a/packages/core/admin/controllers/admin.js +++ b/packages/core/admin/controllers/admin.js @@ -3,6 +3,10 @@ const execa = require('execa'); const _ = require('lodash'); +// FIXME +// eslint-disable-next-line node/no-extraneous-require +const { features } = require('@strapi/strapi/lib/utils/ee'); + const PLUGIN_NAME_REGEX = /^[A-Za-z][A-Za-z0-9-_]+$/; /** @@ -17,6 +21,13 @@ const isValidPluginName = plugin => { */ module.exports = { + // TODO very temporary to check the switch ee/ce + // When removing this we need to update the /admin/src/index.js file + // where we set the strapi.window.isEE value + async getProjectType() { + return { data: { isEE: strapi.EE, features: features.getEnabled() } }; + }, + async init() { const uuid = strapi.config.get('uuid', false); const hasAdmin = await strapi.admin.services.user.exists(); diff --git a/packages/core/admin/ee/admin/components/Users/ModalCreateBody/utils/formDataModel.js b/packages/core/admin/ee/admin/components/Users/ModalCreateBody/utils/formDataModel.js index 214f9cf9b6..c1db4d08c9 100644 --- a/packages/core/admin/ee/admin/components/Users/ModalCreateBody/utils/formDataModel.js +++ b/packages/core/admin/ee/admin/components/Users/ModalCreateBody/utils/formDataModel.js @@ -1,6 +1,6 @@ import baseModel from '../../../../../../admin/src/components/Users/ModalCreateBody/utils/formDataModel'; -const ssoInputsModel = process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES.includes('sso') +const ssoInputsModel = strapi.features.isEnabled(strapi.features.SSO) ? { useSSORegistration: true, } diff --git a/packages/core/admin/ee/admin/components/Users/ModalCreateBody/utils/roleSettingsForm.js b/packages/core/admin/ee/admin/components/Users/ModalCreateBody/utils/roleSettingsForm.js index c1868cd6a9..f636ae819e 100644 --- a/packages/core/admin/ee/admin/components/Users/ModalCreateBody/utils/roleSettingsForm.js +++ b/packages/core/admin/ee/admin/components/Users/ModalCreateBody/utils/roleSettingsForm.js @@ -1,6 +1,6 @@ import baseForm from '../../../../../../admin/src/components/Users/ModalCreateBody/utils/roleSettingsForm'; -const ssoInputs = process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES.includes('sso') +const ssoInputs = strapi.features.isEnabled(strapi.features.SSO) ? { useSSORegistration: { label: 'Settings.permissions.users.form.sso', diff --git a/packages/core/admin/ee/admin/hooks/useSettingsMenu/utils/customGlobalLinks.js b/packages/core/admin/ee/admin/hooks/useSettingsMenu/utils/customGlobalLinks.js index b6ff34c07f..ec5e790c8b 100644 --- a/packages/core/admin/ee/admin/hooks/useSettingsMenu/utils/customGlobalLinks.js +++ b/packages/core/admin/ee/admin/hooks/useSettingsMenu/utils/customGlobalLinks.js @@ -1,6 +1,6 @@ import adminPermissions from '../../../../../admin/src/permissions'; -const ssoGlobalRoutes = process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES.includes('sso') +const ssoGlobalRoutes = strapi.features.isEnabled(strapi.features.SSO) ? [ { intlLabel: { id: 'Settings.sso.title', defaultMessage: 'Single Sign-On' }, diff --git a/packages/core/admin/ee/admin/pages/AuthPage/components/Login/index.js b/packages/core/admin/ee/admin/pages/AuthPage/components/Login/index.js index 88006bb65c..cc9ce8020e 100644 --- a/packages/core/admin/ee/admin/pages/AuthPage/components/Login/index.js +++ b/packages/core/admin/ee/admin/pages/AuthPage/components/Login/index.js @@ -16,7 +16,7 @@ import { import { useAuthProviders } from '../../../../hooks'; const Login = loginProps => { - const ssoEnabled = process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES.includes('sso'); + const ssoEnabled = strapi.features.isEnabled(strapi.features.SSO); const theme = useTheme(); const { isLoading, data: providers } = useAuthProviders({ ssoEnabled }); diff --git a/packages/core/admin/ee/admin/pages/AuthPage/components/Providers/index.js b/packages/core/admin/ee/admin/pages/AuthPage/components/Providers/index.js index 1ef32729b9..920c245036 100644 --- a/packages/core/admin/ee/admin/pages/AuthPage/components/Providers/index.js +++ b/packages/core/admin/ee/admin/pages/AuthPage/components/Providers/index.js @@ -16,7 +16,7 @@ const ProviderWrapper = styled.div` `; const Providers = () => { - const ssoEnabled = process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES.includes('sso'); + const ssoEnabled = strapi.features.isEnabled(strapi.features.SSO); const { push } = useHistory(); const { formatMessage } = useIntl(); diff --git a/packages/core/admin/ee/admin/pages/SettingsPage/utils/customRoutes.js b/packages/core/admin/ee/admin/pages/SettingsPage/utils/customRoutes.js index 50a153c76d..10ebd519a4 100644 --- a/packages/core/admin/ee/admin/pages/SettingsPage/utils/customRoutes.js +++ b/packages/core/admin/ee/admin/pages/SettingsPage/utils/customRoutes.js @@ -1,6 +1,6 @@ import SingleSignOn from '../SingleSignOn'; -const ssoRoutes = process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES.includes('sso') +const ssoRoutes = strapi.features.isEnabled(strapi.features.SSO) ? [ { Component: SingleSignOn, diff --git a/packages/core/admin/env.js b/packages/core/admin/env.js index b3249821bb..6c96f57ecb 100644 --- a/packages/core/admin/env.js +++ b/packages/core/admin/env.js @@ -12,7 +12,7 @@ if (fs.existsSync(dotenvFilePath)) { const STRAPI_ADMIN = /^STRAPI_ADMIN_/i; -const getClientEnvironment = (useEE, options) => { +const getClientEnvironment = options => { const raw = Object.keys(process.env) .filter(key => STRAPI_ADMIN.test(key)) .reduce( @@ -25,8 +25,6 @@ const getClientEnvironment = (useEE, options) => { ADMIN_PATH: options.adminPath, NODE_ENV: options.env || 'development', STRAPI_ADMIN_BACKEND_URL: options.backend, - STRAPI_ADMIN_ENABLED_EE_FEATURES: options.features, - STRAPI_ADMIN_PROJECT_TYPE: useEE ? 'Enterprise' : 'Community', STRAPI_ADMIN_SHOW_TUTORIALS: 'true', STRAPI_ADMIN_UPDATE_NOTIFICATION: 'true', } diff --git a/packages/core/admin/index.js b/packages/core/admin/index.js index 8cf81cb20a..63a5d62ab6 100644 --- a/packages/core/admin/index.js +++ b/packages/core/admin/index.js @@ -7,8 +7,6 @@ const webpack = require('webpack'); const WebpackDevServer = require('webpack-dev-server'); const chalk = require('chalk'); const chokidar = require('chokidar'); -// eslint-disable-next-line node/no-extraneous-require -const hasEE = require('@strapi/strapi/lib/utils/ee'); const getWebpackConfig = require('./webpack.config'); const getPkgPath = name => path.dirname(require.resolve(`${name}/package.json`)); @@ -16,7 +14,7 @@ const getPkgPath = name => path.dirname(require.resolve(`${name}/package.json`)) function getCustomWebpackConfig(dir, config) { const adminConfigPath = path.join(dir, 'admin', 'admin.config.js'); - let webpackConfig = getWebpackConfig({ useEE: hasEE({ dir }), ...config }); + let webpackConfig = getWebpackConfig(config); if (fs.existsSync(adminConfigPath)) { const adminConfig = require(path.resolve(adminConfigPath)); @@ -43,37 +41,38 @@ async function build({ dir, env, options, optimize }) { const cacheDir = path.resolve(dir, '.cache'); const entry = path.resolve(cacheDir, 'admin', 'src'); const dest = path.resolve(dir, 'build'); - const config = getCustomWebpackConfig(dir, { entry, dest, env, options, optimize }); + + // Roots for the @strapi/babel-plugin-switch-ee-ce + const roots = { + eeRoot: path.resolve(cacheDir, 'ee', 'admin'), + ceRoot: path.resolve(cacheDir, 'admin', 'src'), + }; + + const config = getCustomWebpackConfig(dir, { entry, dest, env, options, optimize, roots }); const compiler = webpack(config); return new Promise((resolve, reject) => { compiler.run((err, stats) => { - let messages; if (err) { - if (!err.message) { - return reject(err); + console.error(err.stack || err); + + if (err.details) { + console.error(err.details); } - messages = { - errors: [err.message], - warnings: [], - }; - } else { - messages = stats.toJson({ all: false, warnings: true, errors: true }); + return reject(err); } - if (messages.errors.length) { - // Only keep the first error. Others are often indicative - // of the same problem, but confuse the reader with noise. - if (messages.errors.length > 1) { - messages.errors.length = 1; - } - return reject(new Error(messages.errors.join('\n\n'))); + const info = stats.toJson(); + + if (stats.hasErrors()) { + console.error(info.errors); } return resolve({ stats, - warnings: messages.warnings, + + warnings: info.warnings, }); }); }); @@ -241,12 +240,21 @@ async function watchAdmin({ dir, host, port, browser, options }) { const dest = path.join(dir, 'build'); const env = 'development'; + const cacheDir = path.join(dir, '.cache'); + + // Roots for the @strapi/babel-plugin-switch-ee-ce + const roots = { + eeRoot: path.resolve(cacheDir, 'ee', 'admin'), + ceRoot: path.resolve(cacheDir, 'admin', 'src'), + }; + const args = { entry, dest, env, port, options, + roots, }; const opts = { diff --git a/packages/core/admin/package.json b/packages/core/admin/package.json index 4052cc4d8d..0812c1166d 100644 --- a/packages/core/admin/package.json +++ b/packages/core/admin/package.json @@ -39,6 +39,7 @@ "@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/react-fontawesome": "^0.1.14", "@strapi/helper-plugin": "3.6.5", + "@strapi/babel-plugin-switch-ee-ce": "1.0.0", "@strapi/utils": "3.6.5", "axios": "^0.21.1", "babel-loader": "8.2.2", diff --git a/packages/core/admin/scripts/build.js b/packages/core/admin/scripts/build.js index ed71db647d..f9f7056f8c 100644 --- a/packages/core/admin/scripts/build.js +++ b/packages/core/admin/scripts/build.js @@ -16,9 +16,7 @@ const buildAdmin = async () => { options: { backend: 'http://localhost:1337', adminPath: '/admin/', - features: [], }, - useEE: false, }; const compiler = webpack(webpackConfig(args)); diff --git a/packages/core/admin/webpack.config.dev.js b/packages/core/admin/webpack.config.dev.js index e97c340324..d2a4f9255c 100644 --- a/packages/core/admin/webpack.config.dev.js +++ b/packages/core/admin/webpack.config.dev.js @@ -18,17 +18,13 @@ module.exports = () => { const options = { backend: 'http://localhost:1337', adminPath: '/admin/', - features: process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES || ['sso'], }; - const useEE = process.env.STRAPI_DISABLE_EE === 'true' ? false : true; - const args = { entry, dest, env, options, - useEE, }; const config = webpackConfig(args); @@ -45,7 +41,6 @@ module.exports = () => { ...config, snapshot: { managedPaths: [ - path.resolve(__dirname, '../content-manager'), path.resolve(__dirname, '../content-type-builder'), path.resolve(__dirname, '../upload'), path.resolve(__dirname, '../helper-plugin'), diff --git a/packages/core/admin/webpack.config.js b/packages/core/admin/webpack.config.js index 5a229462d0..6acf203c6b 100644 --- a/packages/core/admin/webpack.config.js +++ b/packages/core/admin/webpack.config.js @@ -12,7 +12,6 @@ const alias = require('./webpack.alias'); const getClientEnvironment = require('./env'); module.exports = ({ - useEE, entry, dest, env, @@ -22,10 +21,14 @@ module.exports = ({ adminPath: '/admin/', features: [], }, + roots = { + eeRoot: './ee/admin', + ceRoot: './admin/src', + }, }) => { const isProduction = env === 'production'; - const envVariables = getClientEnvironment(useEE, { ...options, env }); + const envVariables = getClientEnvironment({ ...options, env }); const webpackPlugins = isProduction ? [ @@ -92,7 +95,7 @@ module.exports = ({ { test: /\.m?js$/, // TODO remove when plugins are built separately - exclude: /node_modules\/(?!(@strapi\/plugin-content-manager|@strapi\/plugin-content-type-builder|@strapi\/plugin-upload)\/).*/, + exclude: /node_modules\/(?!(@strapi\/plugin-content-type-builder|@strapi\/plugin-upload)\/).*/, use: { loader: require.resolve('babel-loader'), options: { @@ -104,13 +107,22 @@ module.exports = ({ require.resolve('@babel/preset-react'), ], plugins: [ + [ + require.resolve('@strapi/babel-plugin-switch-ee-ce'), + { + // Imported this tells the custom plugin where to look for the ee folder + roots, + }, + ], require.resolve('@babel/plugin-proposal-class-properties'), require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('@babel/plugin-transform-modules-commonjs'), require.resolve('@babel/plugin-proposal-async-generator-functions'), + [ require.resolve('@babel/plugin-transform-runtime'), { + // absoluteRuntime: true,s helpers: true, regenerator: true, }, @@ -164,21 +176,7 @@ module.exports = ({ // favicon: path.resolve(__dirname, 'admin/src/favicon.ico'), }), new webpack.DefinePlugin(envVariables), - new webpack.NormalModuleReplacementPlugin(/ee_else_ce(\.*)/, function(resource) { - let wantedPath = path.join( - resource.context.substr(0, resource.context.lastIndexOf(`${path.sep}src${path.sep}`)), - 'src' - ); - if (useEE) { - resource.request = resource.request.replace( - /ee_else_ce/, - path.join(wantedPath, '../..', 'ee/admin') - ); - } else { - resource.request = resource.request.replace(/ee_else_ce/, path.join(wantedPath)); - } - }), new NodePolyfillPlugin(), ...webpackPlugins, ], diff --git a/packages/core/helper-plugin/lib/src/hooks/useTracking/index.js b/packages/core/helper-plugin/lib/src/hooks/useTracking/index.js index 3a0f33c079..cf0a41b00e 100644 --- a/packages/core/helper-plugin/lib/src/hooks/useTracking/index.js +++ b/packages/core/helper-plugin/lib/src/hooks/useTracking/index.js @@ -11,7 +11,7 @@ const useTracking = () => { try { axios.post('https://analytics.strapi.io/track', { event, - properties: { ...properties, projectType: process.env.STRAPI_ADMIN_PROJECT_TYPE }, + properties: { ...properties, projectType: strapi.projectType }, uuid, }); } catch (err) { diff --git a/packages/core/strapi/lib/commands/build.js b/packages/core/strapi/lib/commands/build.js index 24161a78e8..2073e66649 100644 --- a/packages/core/strapi/lib/commands/build.js +++ b/packages/core/strapi/lib/commands/build.js @@ -34,7 +34,6 @@ module.exports = async ({ clean, optimization }) => { options: { backend: serverUrl, adminPath: addSlash(adminPath), - features: ee.isEE ? ee.features.getEnabled() : [], }, }) .then(() => { diff --git a/packages/utils/babel-plugin-switch-ee-ce/.babelrc b/packages/utils/babel-plugin-switch-ee-ce/.babelrc new file mode 100644 index 0000000000..a0f9eb6f85 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/.babelrc @@ -0,0 +1,13 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "node": 12 + }, + "loose": true + } + ] + ] +} diff --git a/packages/utils/babel-plugin-switch-ee-ce/.gitignore b/packages/utils/babel-plugin-switch-ee-ce/.gitignore new file mode 100644 index 0000000000..cdf77068f9 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/.gitignore @@ -0,0 +1,7 @@ +############################ +# Node.js +############################ + +node_modules +.DS_STORE +# public \ No newline at end of file diff --git a/packages/utils/babel-plugin-switch-ee-ce/LICENCE b/packages/utils/babel-plugin-switch-ee-ce/LICENCE new file mode 100644 index 0000000000..db018546b5 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2015-present Strapi Solutions SAS + +Portions of the Strapi software are licensed as follows: + +* All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined in "ee/LICENSE". + +* All software outside of the above-mentioned directories or restrictions above is available under the "MIT Expat" license as set forth below. + +MIT Expat License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/utils/babel-plugin-switch-ee-ce/README.md b/packages/utils/babel-plugin-switch-ee-ce/README.md new file mode 100644 index 0000000000..a822d3a6be --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/README.md @@ -0,0 +1,3 @@ +# Strapi babel plugin switch EE CE + +This plugin allows to switch from EE to CE at runtime. diff --git a/packages/utils/babel-plugin-switch-ee-ce/lib/index.js b/packages/utils/babel-plugin-switch-ee-ce/lib/index.js new file mode 100644 index 0000000000..27aaac5262 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/lib/index.js @@ -0,0 +1,42 @@ +'use strict'; + +// Widely inspired from https://github.com/tleunen/babel-plugin-module-resolver/tree/master/src + +const transformImport = require('./transformers/import'); +const normalizeOptions = require('./normalizeOptions'); + +const importVisitors = { + ImportDeclaration: transformImport, +}; + +const visitor = { + Program: { + enter(programPath, state) { + programPath.traverse(importVisitors, state); + }, + exit(programPath, state) { + programPath.traverse(importVisitors, state); + }, + }, +}; + +module.exports = ({ types: t }) => { + return { + name: 'module-resolver', + visitor, + + pre(file) { + this.types = t; + + const currentFile = file.opts.filename; + + this.normalizedOpts = normalizeOptions(currentFile, this.opts); + + this.moduleResolverVisited = new Set(); + }, + + post() { + this.moduleResolverVisited.clear(); + }, + }; +}; diff --git a/packages/utils/babel-plugin-switch-ee-ce/lib/mapToRelative.js b/packages/utils/babel-plugin-switch-ee-ce/lib/mapToRelative.js new file mode 100644 index 0000000000..9d1c0e4f0a --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/lib/mapToRelative.js @@ -0,0 +1,19 @@ +'use strict'; + +// From https://github.com/tleunen/babel-plugin-module-resolver/blob/master/src/mapToRelative.js + +const path = require('path'); + +const { toPosixPath } = require('./utils'); + +module.exports = function mapToRelative(cwd, currentFile, module) { + let from = path.dirname(currentFile); + let to = path.normalize(module); + + from = path.resolve(cwd, from); + to = path.resolve(cwd, to); + + const moduleMapped = path.relative(from, to); + + return toPosixPath(moduleMapped); +}; diff --git a/packages/utils/babel-plugin-switch-ee-ce/lib/normalizeOptions.js b/packages/utils/babel-plugin-switch-ee-ce/lib/normalizeOptions.js new file mode 100644 index 0000000000..15662e74b4 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/lib/normalizeOptions.js @@ -0,0 +1,36 @@ +'use strict'; + +// Adapted from https://github.com/tleunen/babel-plugin-module-resolver/blob/master/src/normalizeOptions.js + +const path = require('path'); +const { createSelector } = require('reselect'); + +const defaultExtensions = ['.js']; + +const normalizeRoots = (optsRoot, cwd) => { + return Object.keys(optsRoot).reduce((acc, current) => { + const dirPath = path.resolve(cwd, optsRoot[current]); + + acc[current] = dirPath; + + return acc; + }, {}); +}; + +const normalizeOptions = createSelector( + // TODO check if needed + currentFile => (currentFile.includes('.') ? path.dirname(currentFile) : currentFile), + (_, opts) => opts, + (_, opts) => { + const cwd = process.cwd(); + const roots = normalizeRoots(opts.roots, cwd); + + return { + cwd, + roots, + extensions: defaultExtensions, + }; + } +); + +module.exports = normalizeOptions; diff --git a/packages/utils/babel-plugin-switch-ee-ce/lib/resolvePath.js b/packages/utils/babel-plugin-switch-ee-ce/lib/resolvePath.js new file mode 100644 index 0000000000..1405738041 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/lib/resolvePath.js @@ -0,0 +1,71 @@ +'use strict'; + +// Adapted from https://github.com/tleunen/babel-plugin-module-resolver/blob/master/src/resolvePath.js + +const path = require('path'); +const normalizeOptions = require('./normalizeOptions'); +const mapToRelative = require('./mapToRelative'); +const { nodeResolvePath, replaceExtension, toLocalPath, toPosixPath } = require('./utils'); + +function getRelativePath(sourcePath, currentFile, absFileInRoot, opts) { + const realSourceFileExtension = path.extname(absFileInRoot); + const sourceFileExtension = path.extname(sourcePath); + + let relativePath = mapToRelative(opts.cwd, currentFile, absFileInRoot); + + if (realSourceFileExtension !== sourceFileExtension) { + relativePath = replaceExtension(relativePath, opts); + } + + return toLocalPath(toPosixPath(relativePath)); +} + +function findPathInRoots(sourcePath, { extensions, roots }) { + // Search the source path inside every custom root directory + + const resolvedEESourceFile = nodeResolvePath( + `./${sourcePath.replace('ee_else_ce', '')}`, + roots.eeRoot, + extensions + ); + const resolvedCESourceFile = nodeResolvePath( + `./${sourcePath.replace('ee_else_ce', '')}`, + roots.ceRoot, + extensions + ); + + return { resolvedEESourceFile, resolvedCESourceFile }; +} + +function resolvePathFromRootConfig(sourcePath, currentFile, opts) { + const absFileInRoot = findPathInRoots(sourcePath, opts); + + const relativeEEPath = getRelativePath( + sourcePath, + currentFile, + absFileInRoot.resolvedEESourceFile, + opts + ); + + const relativeCEPath = getRelativePath( + sourcePath, + currentFile, + absFileInRoot.resolvedCESourceFile, + opts + ); + + return { relativeCEPath, relativeEEPath }; +} + +function resolvePath(sourcePath, currentFile, opts) { + const normalizedOpts = normalizeOptions(currentFile, opts); + + // File param is a relative path from the environment current working directory + // (not from cwd param) + const absoluteCurrentFile = path.resolve(currentFile); + const resolvedPaths = resolvePathFromRootConfig(sourcePath, absoluteCurrentFile, normalizedOpts); + + return resolvedPaths; +} + +module.exports = resolvePath; diff --git a/packages/utils/babel-plugin-switch-ee-ce/lib/transformers/import.js b/packages/utils/babel-plugin-switch-ee-ce/lib/transformers/import.js new file mode 100644 index 0000000000..931d0bd9f0 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/lib/transformers/import.js @@ -0,0 +1,30 @@ +'use strict'; + +const template = require('@babel/template').default; +const resolvePath = require('../resolvePath'); + +module.exports = function transformImport(nodePath, state) { + if (state.moduleResolverVisited.has(nodePath)) { + return; + } + state.moduleResolverVisited.add(nodePath); + + const source = nodePath.get('source').node.value; + + const currentFile = state.file.opts.filename; + + if (source.includes('ee_else_ce')) { + const modulePaths = resolvePath(source, currentFile, state.opts); + const specifiers = nodePath.node.specifiers.map(s => ` ${s.local.name}`); + + const tmpNode = `const ${specifiers[0]} = (() => { + if (window && window.strapi && window.strapi.isEE) { + return require('${modulePaths.relativeEEPath}').default; + } + + return require('${modulePaths.relativeCEPath}').default; + })();`; + + nodePath.replaceWith(template.statement.ast(tmpNode)); + } +}; diff --git a/packages/utils/babel-plugin-switch-ee-ce/lib/utils.js b/packages/utils/babel-plugin-switch-ee-ce/lib/utils.js new file mode 100644 index 0000000000..3cad1240d0 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/lib/utils.js @@ -0,0 +1,58 @@ +'use strict'; + +// From https://github.com/tleunen/babel-plugin-module-resolver/blob/master/src/utils.js + +const path = require('path'); +const resolve = require('resolve'); + +const nodeResolvePath = (modulePath, basedir, extensions) => { + try { + return resolve.sync(modulePath, { basedir, extensions }); + } catch (e) { + return null; + } +}; + +const toPosixPath = modulePath => { + return modulePath.replace(/\\/g, '/'); +}; + +const stripExtension = (modulePath, stripExtensions) => { + let name = path.basename(modulePath); + stripExtensions.some(extension => { + if (name.endsWith(extension)) { + name = name.slice(0, name.length - extension.length); + return true; + } + return false; + }); + return name; +}; + +const replaceExtension = (modulePath, opts) => { + const filename = stripExtension(modulePath, opts.extensions); + return path.join(path.dirname(modulePath), filename); +}; + +const toLocalPath = modulePath => { + let localPath = modulePath.replace(/\/index$/, ''); // remove trailing /index + + if (!isRelativePath(localPath)) { + localPath = `./${localPath}`; // insert `./` to make it a relative path + } + + return localPath; +}; + +const isRelativePath = nodePath => { + return nodePath.match(/^\.?\.\//); +}; + +module.exports = { + nodeResolvePath, + replaceExtension, + stripExtension, + toPosixPath, + toLocalPath, + isRelativePath, +}; diff --git a/packages/utils/babel-plugin-switch-ee-ce/package.json b/packages/utils/babel-plugin-switch-ee-ce/package.json new file mode 100644 index 0000000000..547fc214f7 --- /dev/null +++ b/packages/utils/babel-plugin-switch-ee-ce/package.json @@ -0,0 +1,24 @@ +{ + "name": "@strapi/babel-plugin-switch-ee-ce", + "version": "1.0.0", + "description": "Babel plugin to switch from CE to EE at runtime", + "main": "lib/index.js", + "repository": "git://github.com/strapi/strapi.git", + "author": "Strapi Team", + "license": "SEE LICENSE IN LICENSE", + "private": false, + "devDependencies": { + "@babel/cli": "7.14.5", + "@babel/core": "7.14.6", + "@babel/generator": "7.14.5", + "@babel/parser": "7.14.7", + "@babel/plugin-syntax-dynamic-import": "7.8.3", + "@babel/plugin-transform-modules-commonjs": "7.14.5", + "@babel/plugin-transform-runtime": "7.14.5", + "@babel/preset-env": "7.14.7", + "@babel/template": "7.14.5", + "reselect": "4.0.0", + "resolve": "1.20.0" + }, + "dependencies": {} +} diff --git a/test/config/front/strapi.js b/test/config/front/strapi.js index dcd4e5f059..2e2996048e 100644 --- a/test/config/front/strapi.js +++ b/test/config/front/strapi.js @@ -7,35 +7,18 @@ // Setup the strapi function global variable +// FIXME create a better jest setup import '@testing-library/jest-dom/extend-expect'; -const React = require('react'); -const hoistNonReactStatics = require('hoist-non-react-statics'); - -const hoc = () => WrappedComponent => { - class HocInjector extends React.Component { - static WrappedComponent = WrappedComponent; - - render() { - return ; - } - } - - return hoistNonReactStatics(HocInjector, WrappedComponent); -}; - -// FIXME -global.process.env.STRAPI_ADMIN_ENABLED_EE_FEATURES = []; global.process.env.ADMIN_PATH = '/admin/'; global.strapi = { backendURL: 'http://localhost:1337', - injectReducer: hoc, - injectSaga: hoc, - notification: { - error: jest.fn(), - info: jest.fn(), - success: jest.fn(), - warning: jest.fn(), + isEE: false, + features: { + SSO: 'sso', + allFeatures: [], + isEnabled: () => false, }, + projectType: 'Community', }; diff --git a/yarn.lock b/yarn.lock index c3f510d545..5d2613d54c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -70,6 +70,22 @@ dependencies: tslib "~2.0.1" +"@babel/cli@7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.14.5.tgz#9551b194f02360729de6060785bbdcce52c69f0a" + integrity sha512-poegjhRvXHWO0EAsnYajwYZuqcz7gyfxwfaecUESxDujrqOivf3zrjFbub8IJkrqEaz3fvJWh001EzxBub54fg== + dependencies: + commander "^4.0.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.1.0" + glob "^7.0.0" + make-dir "^2.1.0" + slash "^2.0.0" + source-map "^0.5.0" + optionalDependencies: + "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.2" + chokidar "^3.4.0" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -110,7 +126,7 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.7.5": +"@babel/core@7.14.6", "@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.14.6" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab" integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA== @@ -131,7 +147,7 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.14.0", "@babel/generator@^7.14.5": +"@babel/generator@7.14.5", "@babel/generator@^7.14.0", "@babel/generator@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.5.tgz#848d7b9f031caca9d0cd0af01b063f226f52d785" integrity sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA== @@ -347,12 +363,12 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.6", "@babel/parser@^7.14.7", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3": +"@babel/parser@7.14.7", "@babel/parser@^7.1.0", "@babel/parser@^7.14.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.6", "@babel/parser@^7.14.7", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.7.tgz#6099720c8839ca865a2637e6c85852ead0bdb595" integrity sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA== -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.13.12": +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.13.12", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz#4b467302e1548ed3b1be43beae2cc9cf45e0bb7e" integrity sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ== @@ -370,7 +386,7 @@ "@babel/helper-remap-async-to-generator" "^7.13.0" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-async-generator-functions@^7.13.15": +"@babel/plugin-proposal-async-generator-functions@^7.13.15", "@babel/plugin-proposal-async-generator-functions@^7.14.7": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.7.tgz#784a48c3d8ed073f65adcf30b57bcbf6c8119ace" integrity sha512-RK8Wj7lXLY3bqei69/cc25gwS5puEc3dknoFPFbqfy3XxYQBQFvu4ioWpafMBAB+L9NyptQK4nMOa5Xz16og8Q== @@ -387,7 +403,7 @@ "@babel/helper-create-class-features-plugin" "^7.13.0" "@babel/helper-plugin-utils" "^7.13.0" -"@babel/plugin-proposal-class-properties@^7.13.0": +"@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz#40d1ee140c5b1e31a350f4f5eed945096559b42e" integrity sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg== @@ -395,7 +411,7 @@ "@babel/helper-create-class-features-plugin" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-proposal-class-static-block@^7.13.11": +"@babel/plugin-proposal-class-static-block@^7.13.11", "@babel/plugin-proposal-class-static-block@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz#158e9e10d449c3849ef3ecde94a03d9f1841b681" integrity sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg== @@ -404,7 +420,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-proposal-dynamic-import@^7.13.8": +"@babel/plugin-proposal-dynamic-import@^7.13.8", "@babel/plugin-proposal-dynamic-import@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz#0c6617df461c0c1f8fff3b47cd59772360101d2c" integrity sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g== @@ -412,7 +428,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-proposal-export-namespace-from@^7.12.13": +"@babel/plugin-proposal-export-namespace-from@^7.12.13", "@babel/plugin-proposal-export-namespace-from@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz#dbad244310ce6ccd083072167d8cea83a52faf76" integrity sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA== @@ -420,7 +436,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-json-strings@^7.13.8": +"@babel/plugin-proposal-json-strings@^7.13.8", "@babel/plugin-proposal-json-strings@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz#38de60db362e83a3d8c944ac858ddf9f0c2239eb" integrity sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ== @@ -428,7 +444,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.13.8": +"@babel/plugin-proposal-logical-assignment-operators@^7.13.8", "@babel/plugin-proposal-logical-assignment-operators@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz#6e6229c2a99b02ab2915f82571e0cc646a40c738" integrity sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw== @@ -436,7 +452,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz#ee38589ce00e2cc59b299ec3ea406fcd3a0fdaf6" integrity sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg== @@ -444,7 +460,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-proposal-numeric-separator@^7.12.13": +"@babel/plugin-proposal-numeric-separator@^7.12.13", "@babel/plugin-proposal-numeric-separator@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz#83631bf33d9a51df184c2102a069ac0c58c05f18" integrity sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg== @@ -452,7 +468,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.13.8": +"@babel/plugin-proposal-object-rest-spread@^7.13.8", "@babel/plugin-proposal-object-rest-spread@^7.14.7": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz#5920a2b3df7f7901df0205974c0641b13fd9d363" integrity sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g== @@ -463,7 +479,7 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.14.5" -"@babel/plugin-proposal-optional-catch-binding@^7.13.8": +"@babel/plugin-proposal-optional-catch-binding@^7.13.8", "@babel/plugin-proposal-optional-catch-binding@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz#939dd6eddeff3a67fdf7b3f044b5347262598c3c" integrity sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ== @@ -480,7 +496,7 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-proposal-private-methods@^7.13.0": +"@babel/plugin-proposal-private-methods@^7.13.0", "@babel/plugin-proposal-private-methods@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz#37446495996b2945f30f5be5b60d5e2aa4f5792d" integrity sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g== @@ -488,7 +504,7 @@ "@babel/helper-create-class-features-plugin" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-proposal-private-property-in-object@^7.14.0": +"@babel/plugin-proposal-private-property-in-object@^7.14.0", "@babel/plugin-proposal-private-property-in-object@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz#9f65a4d0493a940b4c01f8aa9d3f1894a587f636" integrity sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q== @@ -498,7 +514,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-proposal-unicode-property-regex@^7.12.13", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": +"@babel/plugin-proposal-unicode-property-regex@^7.12.13", "@babel/plugin-proposal-unicode-property-regex@^7.14.5", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz#0f95ee0e757a5d647f378daa0eca7e93faa8bbe8" integrity sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q== @@ -618,21 +634,21 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-top-level-await@^7.12.13", "@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-top-level-await@^7.12.13", "@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-arrow-functions@^7.13.0": +"@babel/plugin-transform-arrow-functions@^7.13.0", "@babel/plugin-transform-arrow-functions@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz#f7187d9588a768dd080bf4c9ffe117ea62f7862a" integrity sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-async-to-generator@^7.13.0": +"@babel/plugin-transform-async-to-generator@^7.13.0", "@babel/plugin-transform-async-to-generator@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz#72c789084d8f2094acb945633943ef8443d39e67" integrity sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA== @@ -641,21 +657,21 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-remap-async-to-generator" "^7.14.5" -"@babel/plugin-transform-block-scoped-functions@^7.12.13": +"@babel/plugin-transform-block-scoped-functions@^7.12.13", "@babel/plugin-transform-block-scoped-functions@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz#e48641d999d4bc157a67ef336aeb54bc44fd3ad4" integrity sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-block-scoping@^7.13.16": +"@babel/plugin-transform-block-scoping@^7.13.16", "@babel/plugin-transform-block-scoping@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.5.tgz#8cc63e61e50f42e078e6f09be775a75f23ef9939" integrity sha512-LBYm4ZocNgoCqyxMLoOnwpsmQ18HWTQvql64t3GvMUzLQrNoV1BDG0lNftC8QKYERkZgCCT/7J5xWGObGAyHDw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-classes@^7.13.0": +"@babel/plugin-transform-classes@^7.13.0", "@babel/plugin-transform-classes@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz#0e98e82097b38550b03b483f9b51a78de0acb2cf" integrity sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA== @@ -668,21 +684,21 @@ "@babel/helper-split-export-declaration" "^7.14.5" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.13.0": +"@babel/plugin-transform-computed-properties@^7.13.0", "@babel/plugin-transform-computed-properties@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz#1b9d78987420d11223d41195461cc43b974b204f" integrity sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-destructuring@^7.13.17": +"@babel/plugin-transform-destructuring@^7.13.17", "@babel/plugin-transform-destructuring@^7.14.7": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz#0ad58ed37e23e22084d109f185260835e5557576" integrity sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-dotall-regex@^7.12.13", "@babel/plugin-transform-dotall-regex@^7.4.4": +"@babel/plugin-transform-dotall-regex@^7.12.13", "@babel/plugin-transform-dotall-regex@^7.14.5", "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz#2f6bf76e46bdf8043b4e7e16cf24532629ba0c7a" integrity sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw== @@ -690,14 +706,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-duplicate-keys@^7.12.13": +"@babel/plugin-transform-duplicate-keys@^7.12.13", "@babel/plugin-transform-duplicate-keys@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz#365a4844881bdf1501e3a9f0270e7f0f91177954" integrity sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-exponentiation-operator@^7.12.13": +"@babel/plugin-transform-exponentiation-operator@^7.12.13", "@babel/plugin-transform-exponentiation-operator@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz#5154b8dd6a3dfe6d90923d61724bd3deeb90b493" integrity sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA== @@ -705,14 +721,14 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-for-of@^7.13.0": +"@babel/plugin-transform-for-of@^7.13.0", "@babel/plugin-transform-for-of@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz#dae384613de8f77c196a8869cbf602a44f7fc0eb" integrity sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-function-name@^7.12.13": +"@babel/plugin-transform-function-name@^7.12.13", "@babel/plugin-transform-function-name@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz#e81c65ecb900746d7f31802f6bed1f52d915d6f2" integrity sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ== @@ -720,21 +736,21 @@ "@babel/helper-function-name" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-literals@^7.12.13": +"@babel/plugin-transform-literals@^7.12.13", "@babel/plugin-transform-literals@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz#41d06c7ff5d4d09e3cf4587bd3ecf3930c730f78" integrity sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-member-expression-literals@^7.12.13": +"@babel/plugin-transform-member-expression-literals@^7.12.13", "@babel/plugin-transform-member-expression-literals@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz#b39cd5212a2bf235a617d320ec2b48bcc091b8a7" integrity sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-modules-amd@^7.14.0": +"@babel/plugin-transform-modules-amd@^7.14.0", "@babel/plugin-transform-modules-amd@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz#4fd9ce7e3411cb8b83848480b7041d83004858f7" integrity sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g== @@ -753,7 +769,7 @@ "@babel/helper-simple-access" "^7.13.12" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.14.0": +"@babel/plugin-transform-modules-commonjs@7.14.5", "@babel/plugin-transform-modules-commonjs@^7.14.0", "@babel/plugin-transform-modules-commonjs@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz#7aaee0ea98283de94da98b28f8c35701429dad97" integrity sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A== @@ -763,7 +779,7 @@ "@babel/helper-simple-access" "^7.14.5" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.13.8": +"@babel/plugin-transform-modules-systemjs@^7.13.8", "@babel/plugin-transform-modules-systemjs@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz#c75342ef8b30dcde4295d3401aae24e65638ed29" integrity sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA== @@ -774,7 +790,7 @@ "@babel/helper-validator-identifier" "^7.14.5" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-umd@^7.14.0": +"@babel/plugin-transform-modules-umd@^7.14.0", "@babel/plugin-transform-modules-umd@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz#fb662dfee697cce274a7cda525190a79096aa6e0" integrity sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA== @@ -782,21 +798,21 @@ "@babel/helper-module-transforms" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-named-capturing-groups-regex@^7.12.13": +"@babel/plugin-transform-named-capturing-groups-regex@^7.12.13", "@babel/plugin-transform-named-capturing-groups-regex@^7.14.7": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.7.tgz#60c06892acf9df231e256c24464bfecb0908fd4e" integrity sha512-DTNOTaS7TkW97xsDMrp7nycUVh6sn/eq22VaxWfEdzuEbRsiaOU0pqU7DlyUGHVsbQbSghvjKRpEl+nUCKGQSg== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.14.5" -"@babel/plugin-transform-new-target@^7.12.13": +"@babel/plugin-transform-new-target@^7.12.13", "@babel/plugin-transform-new-target@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz#31bdae8b925dc84076ebfcd2a9940143aed7dbf8" integrity sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-object-super@^7.12.13": +"@babel/plugin-transform-object-super@^7.12.13", "@babel/plugin-transform-object-super@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz#d0b5faeac9e98597a161a9cf78c527ed934cdc45" integrity sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg== @@ -811,7 +827,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-property-literals@^7.12.13": +"@babel/plugin-transform-property-literals@^7.12.13", "@babel/plugin-transform-property-literals@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz#0ddbaa1f83db3606f1cdf4846fa1dfb473458b34" integrity sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw== @@ -851,14 +867,14 @@ "@babel/helper-annotate-as-pure" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-regenerator@^7.13.15": +"@babel/plugin-transform-regenerator@^7.13.15", "@babel/plugin-transform-regenerator@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz#9676fd5707ed28f522727c5b3c0aa8544440b04f" integrity sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg== dependencies: regenerator-transform "^0.14.2" -"@babel/plugin-transform-reserved-words@^7.12.13": +"@babel/plugin-transform-reserved-words@^7.12.13", "@babel/plugin-transform-reserved-words@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz#c44589b661cfdbef8d4300dcc7469dffa92f8304" integrity sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg== @@ -877,14 +893,26 @@ babel-plugin-polyfill-regenerator "^0.2.0" semver "^6.3.0" -"@babel/plugin-transform-shorthand-properties@^7.12.13": +"@babel/plugin-transform-runtime@7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.14.5.tgz#30491dad49c6059f8f8fa5ee8896a0089e987523" + integrity sha512-fPMBhh1AV8ZyneiCIA+wYYUH1arzlXR1UMcApjvchDhfKxhy2r2lReJv8uHEyihi4IFIGlr1Pdx7S5fkESDQsg== + dependencies: + "@babel/helper-module-imports" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + babel-plugin-polyfill-corejs2 "^0.2.2" + babel-plugin-polyfill-corejs3 "^0.2.2" + babel-plugin-polyfill-regenerator "^0.2.2" + semver "^6.3.0" + +"@babel/plugin-transform-shorthand-properties@^7.12.13", "@babel/plugin-transform-shorthand-properties@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz#97f13855f1409338d8cadcbaca670ad79e091a58" integrity sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-spread@^7.13.0": +"@babel/plugin-transform-spread@^7.13.0", "@babel/plugin-transform-spread@^7.14.6": version "7.14.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz#6bd40e57fe7de94aa904851963b5616652f73144" integrity sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag== @@ -892,35 +920,35 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" -"@babel/plugin-transform-sticky-regex@^7.12.13": +"@babel/plugin-transform-sticky-regex@^7.12.13", "@babel/plugin-transform-sticky-regex@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz#5b617542675e8b7761294381f3c28c633f40aeb9" integrity sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-template-literals@^7.13.0": +"@babel/plugin-transform-template-literals@^7.13.0", "@babel/plugin-transform-template-literals@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz#a5f2bc233937d8453885dc736bdd8d9ffabf3d93" integrity sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-typeof-symbol@^7.12.13": +"@babel/plugin-transform-typeof-symbol@^7.12.13", "@babel/plugin-transform-typeof-symbol@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz#39af2739e989a2bd291bf6b53f16981423d457d4" integrity sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-unicode-escapes@^7.12.13": +"@babel/plugin-transform-unicode-escapes@^7.12.13", "@babel/plugin-transform-unicode-escapes@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz#9d4bd2a681e3c5d7acf4f57fa9e51175d91d0c6b" integrity sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-unicode-regex@^7.12.13": +"@babel/plugin-transform-unicode-regex@^7.12.13", "@babel/plugin-transform-unicode-regex@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz#4cd09b6c8425dd81255c7ceb3fb1836e7414382e" integrity sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw== @@ -1015,6 +1043,85 @@ core-js-compat "^3.9.0" semver "^6.3.0" +"@babel/preset-env@7.14.7": + version "7.14.7" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.14.7.tgz#5c70b22d4c2d893b03d8c886a5c17422502b932a" + integrity sha512-itOGqCKLsSUl0Y+1nSfhbuuOlTs0MJk2Iv7iSH+XT/mR8U1zRLO7NjWlYXB47yhK4J/7j+HYty/EhFZDYKa/VA== + dependencies: + "@babel/compat-data" "^7.14.7" + "@babel/helper-compilation-targets" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.14.5" + "@babel/plugin-proposal-async-generator-functions" "^7.14.7" + "@babel/plugin-proposal-class-properties" "^7.14.5" + "@babel/plugin-proposal-class-static-block" "^7.14.5" + "@babel/plugin-proposal-dynamic-import" "^7.14.5" + "@babel/plugin-proposal-export-namespace-from" "^7.14.5" + "@babel/plugin-proposal-json-strings" "^7.14.5" + "@babel/plugin-proposal-logical-assignment-operators" "^7.14.5" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.14.5" + "@babel/plugin-proposal-numeric-separator" "^7.14.5" + "@babel/plugin-proposal-object-rest-spread" "^7.14.7" + "@babel/plugin-proposal-optional-catch-binding" "^7.14.5" + "@babel/plugin-proposal-optional-chaining" "^7.14.5" + "@babel/plugin-proposal-private-methods" "^7.14.5" + "@babel/plugin-proposal-private-property-in-object" "^7.14.5" + "@babel/plugin-proposal-unicode-property-regex" "^7.14.5" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-transform-arrow-functions" "^7.14.5" + "@babel/plugin-transform-async-to-generator" "^7.14.5" + "@babel/plugin-transform-block-scoped-functions" "^7.14.5" + "@babel/plugin-transform-block-scoping" "^7.14.5" + "@babel/plugin-transform-classes" "^7.14.5" + "@babel/plugin-transform-computed-properties" "^7.14.5" + "@babel/plugin-transform-destructuring" "^7.14.7" + "@babel/plugin-transform-dotall-regex" "^7.14.5" + "@babel/plugin-transform-duplicate-keys" "^7.14.5" + "@babel/plugin-transform-exponentiation-operator" "^7.14.5" + "@babel/plugin-transform-for-of" "^7.14.5" + "@babel/plugin-transform-function-name" "^7.14.5" + "@babel/plugin-transform-literals" "^7.14.5" + "@babel/plugin-transform-member-expression-literals" "^7.14.5" + "@babel/plugin-transform-modules-amd" "^7.14.5" + "@babel/plugin-transform-modules-commonjs" "^7.14.5" + "@babel/plugin-transform-modules-systemjs" "^7.14.5" + "@babel/plugin-transform-modules-umd" "^7.14.5" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.14.7" + "@babel/plugin-transform-new-target" "^7.14.5" + "@babel/plugin-transform-object-super" "^7.14.5" + "@babel/plugin-transform-parameters" "^7.14.5" + "@babel/plugin-transform-property-literals" "^7.14.5" + "@babel/plugin-transform-regenerator" "^7.14.5" + "@babel/plugin-transform-reserved-words" "^7.14.5" + "@babel/plugin-transform-shorthand-properties" "^7.14.5" + "@babel/plugin-transform-spread" "^7.14.6" + "@babel/plugin-transform-sticky-regex" "^7.14.5" + "@babel/plugin-transform-template-literals" "^7.14.5" + "@babel/plugin-transform-typeof-symbol" "^7.14.5" + "@babel/plugin-transform-unicode-escapes" "^7.14.5" + "@babel/plugin-transform-unicode-regex" "^7.14.5" + "@babel/preset-modules" "^0.1.4" + "@babel/types" "^7.14.5" + babel-plugin-polyfill-corejs2 "^0.2.2" + babel-plugin-polyfill-corejs3 "^0.2.2" + babel-plugin-polyfill-regenerator "^0.2.2" + core-js-compat "^3.15.0" + semver "^6.3.0" + "@babel/preset-modules@^0.1.4": version "0.1.4" resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.4.tgz#362f2b68c662842970fdb5e254ffc8fc1c2e415e" @@ -1060,7 +1167,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.12.13", "@babel/template@^7.14.5", "@babel/template@^7.3.3": +"@babel/template@7.14.5", "@babel/template@^7.12.13", "@babel/template@^7.14.5", "@babel/template@^7.3.3": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" integrity sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g== @@ -2571,6 +2678,23 @@ resolved "https://registry.yarnpkg.com/@napi-rs/triples/-/triples-1.0.2.tgz#2ce4c6a78568358772008f564ee5009093d20a19" integrity sha512-EL3SiX43m9poFSnhDx4d4fn9SSaqyO2rHsCNhETi9bWPmjXK3uPJ0QpPFtx39FEdHcz1vJmsiW41kqc0AgvtzQ== +"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.2": + version "2.1.8-no-fsevents.2" + resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.2.tgz#e324c0a247a5567192dd7180647709d7e2faf94b" + integrity sha512-Fb8WxUFOBQVl+CX4MWet5o7eCc6Pj04rXIwVKZ6h1NnqTo45eOQW6aWyhG25NIODvWFwTDMwBsYxrQ3imxpetg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^5.1.2" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + "@node-rs/helper@^1.0.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@node-rs/helper/-/helper-1.2.0.tgz#c72c9f04527ee5d65700ac4842e3ea21ad0714c1" @@ -5333,7 +5457,7 @@ babel-plugin-jest-hoist@^26.6.2: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-plugin-polyfill-corejs2@^0.2.0: +babel-plugin-polyfill-corejs2@^0.2.0, babel-plugin-polyfill-corejs2@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz#e9124785e6fd94f94b618a7954e5693053bf5327" integrity sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ== @@ -5342,7 +5466,7 @@ babel-plugin-polyfill-corejs2@^0.2.0: "@babel/helper-define-polyfill-provider" "^0.2.2" semver "^6.1.1" -babel-plugin-polyfill-corejs3@^0.2.0: +babel-plugin-polyfill-corejs3@^0.2.0, babel-plugin-polyfill-corejs3@^0.2.2: version "0.2.3" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.3.tgz#72add68cf08a8bf139ba6e6dfc0b1d504098e57b" integrity sha512-rCOFzEIJpJEAU14XCcV/erIf/wZQMmMT5l5vXOpL5uoznyOGfDIjPj6FVytMvtzaKSTSVKouOCTPJ5OMUZH30g== @@ -5350,7 +5474,7 @@ babel-plugin-polyfill-corejs3@^0.2.0: "@babel/helper-define-polyfill-provider" "^0.2.2" core-js-compat "^3.14.0" -babel-plugin-polyfill-regenerator@^0.2.0: +babel-plugin-polyfill-regenerator@^0.2.0, babel-plugin-polyfill-regenerator@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz#b310c8d642acada348c1fa3b3e6ce0e851bee077" integrity sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg== @@ -6257,7 +6381,7 @@ chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.5.1: +chokidar@^3.4.0, chokidar@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== @@ -6651,7 +6775,7 @@ commander@^2.19.0, commander@^2.20.0, commander@^2.20.3: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.1.1: +commander@^4.0.1, commander@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== @@ -6921,7 +7045,7 @@ conventional-recommended-bump@^5.0.0: meow "^4.0.0" q "^1.5.1" -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== @@ -6998,6 +7122,14 @@ core-js-compat@^3.14.0, core-js-compat@^3.9.0: browserslist "^4.16.6" semver "7.0.0" +core-js-compat@^3.15.0: + version "3.15.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.15.2.tgz#47272fbb479880de14b4e6081f71f3492f5bd3cb" + integrity sha512-Wp+BJVvwopjI+A1EFqm2dwUmWYXrvucmtIB2LgXn/Rb+gWPKYxtmb4GKHGKG/KGF1eK9jfjzT38DITbTOCX/SQ== + dependencies: + browserslist "^4.16.6" + semver "7.0.0" + core-js-pure@^3.10.2, core-js-pure@^3.15.0: version "3.15.1" resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.15.1.tgz#8356f6576fa2aa8e54ca6fe02620968ff010eed7" @@ -9475,6 +9607,11 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -9837,7 +9974,7 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7: +glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -17655,7 +17792,7 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= -reselect@^4.0.0: +reselect@4.0.0, reselect@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== @@ -17730,7 +17867,7 @@ resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.9.0: +resolve@1.20.0, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.9.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==