From 9b9da4cad49d2459feac7457105a3eb921ffff0a Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 30 Nov 2021 10:16:13 +0700 Subject: [PATCH 01/69] fix namespace --- TbsCoreTest/Factories/CombatFactory.cs | 27 ++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/TbsCoreTest/Factories/CombatFactory.cs b/TbsCoreTest/Factories/CombatFactory.cs index a3af5afdb..d48bdf2e9 100644 --- a/TbsCoreTest/Factories/CombatFactory.cs +++ b/TbsCoreTest/Factories/CombatFactory.cs @@ -3,12 +3,12 @@ using System.Text; using TbsCore.Models.AccModels; using TbsCore.Models.CombatModels; -using TravBotSharp.Files.Helpers; -using static TravBotSharp.Files.Helpers.Classificator; +using TbsCore.Helpers; +using static TbsCore.Helpers.Classificator; namespace TbsCoreTest.Factories { - class CombatFactory + internal class CombatFactory { public (CombatDeffender[], CombatAttacker[]) GetBoth() { @@ -28,6 +28,7 @@ class CombatFactory } #region Create deffenders + /// /// 100 phalanx /// Deffender: 1000 Population, gauls, wall level 0 @@ -77,12 +78,12 @@ public CombatDeffender CreateDeffender2() }; } - /// - /// Deff1: 2000 phalanx (20), 500 druids (15), 200 heudans, Hero: 50 strenght, 50 bonus, max phalanx, horse - /// Deff2: 1000 legionnaires (18), 1000 praetorian (19), 500 EC - /// Deffender: 450 Population, romans, wall level 15 - /// - public CombatDeffender CreateDeffender3() + /// + /// Deff1: 2000 phalanx (20), 500 druids (15), 200 heudans, Hero: 50 strenght, 50 bonus, max phalanx, horse + /// Deff2: 1000 legionnaires (18), 1000 praetorian (19), 500 EC + /// Deffender: 450 Population, romans, wall level 15 + /// + public CombatDeffender CreateDeffender3() { return new CombatDeffender { @@ -107,9 +108,11 @@ public CombatDeffender CreateDeffender3() Population = 450 }; } + #endregion Create deffenders #region Create hero + private CombatHero CreateHero1() { return new CombatHero @@ -133,6 +136,7 @@ private CombatHero CreateHero2() } }; } + private CombatHero CreateDeffHero() { return new CombatHero @@ -144,9 +148,11 @@ private CombatHero CreateDeffHero() } }; } + #endregion Create hero #region Create attackers + /// /// 100 imperians. 1000 population, hero 100 strength /// @@ -201,6 +207,7 @@ public CombatAttacker CreateAttacker3() Population = 1700 }; } + #endregion Create attackers } -} +} \ No newline at end of file From efc3ab551427bf8021e92a6125edc0a220239557 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 30 Nov 2021 11:28:10 +0700 Subject: [PATCH 02/69] init TBSReact --- TBSReact/.gitignore | 232 + TBSReact/ClientApp/.env | 1 + TBSReact/ClientApp/.env.development | 3 + TBSReact/ClientApp/.gitignore | 21 + TBSReact/ClientApp/README.md | 2228 ++ TBSReact/ClientApp/aspnetcore-https.js | 33 + TBSReact/ClientApp/aspnetcore-react.js | 55 + TBSReact/ClientApp/package-lock.json | 16782 ++++++++++++++++ TBSReact/ClientApp/package.json | 69 + TBSReact/ClientApp/public/favicon.ico | Bin 0 -> 5430 bytes TBSReact/ClientApp/public/index.html | 41 + TBSReact/ClientApp/public/manifest.json | 15 + TBSReact/ClientApp/src/App.js | 22 + TBSReact/ClientApp/src/App.test.js | 13 + TBSReact/ClientApp/src/components/Counter.js | 31 + .../ClientApp/src/components/FetchData.js | 59 + TBSReact/ClientApp/src/components/Home.js | 26 + TBSReact/ClientApp/src/components/Layout.js | 18 + TBSReact/ClientApp/src/components/NavMenu.css | 18 + TBSReact/ClientApp/src/components/NavMenu.js | 49 + TBSReact/ClientApp/src/custom.css | 14 + TBSReact/ClientApp/src/index.js | 26 + TBSReact/ClientApp/src/reportWebVitals.js | 13 + TBSReact/ClientApp/src/service-worker.js | 72 + .../src/serviceWorkerRegistration.js | 137 + TBSReact/ClientApp/src/setupProxy.js | 18 + .../Controllers/WeatherForecastController.cs | 32 + TBSReact/Pages/Error.cshtml | 26 + TBSReact/Pages/Error.cshtml.cs | 25 + TBSReact/Pages/_ViewImports.cshtml | 3 + TBSReact/Program.cs | 26 + TBSReact/Properties/launchSettings.json | 29 + TBSReact/TBSReact.csproj | 52 + TBSReact/WeatherForecast.cs | 12 + TBSReact/appsettings.Development.json | 10 + TBSReact/appsettings.json | 10 + TravBotSharp.sln | 18 +- 37 files changed, 20237 insertions(+), 2 deletions(-) create mode 100644 TBSReact/.gitignore create mode 100644 TBSReact/ClientApp/.env create mode 100644 TBSReact/ClientApp/.env.development create mode 100644 TBSReact/ClientApp/.gitignore create mode 100644 TBSReact/ClientApp/README.md create mode 100644 TBSReact/ClientApp/aspnetcore-https.js create mode 100644 TBSReact/ClientApp/aspnetcore-react.js create mode 100644 TBSReact/ClientApp/package-lock.json create mode 100644 TBSReact/ClientApp/package.json create mode 100644 TBSReact/ClientApp/public/favicon.ico create mode 100644 TBSReact/ClientApp/public/index.html create mode 100644 TBSReact/ClientApp/public/manifest.json create mode 100644 TBSReact/ClientApp/src/App.js create mode 100644 TBSReact/ClientApp/src/App.test.js create mode 100644 TBSReact/ClientApp/src/components/Counter.js create mode 100644 TBSReact/ClientApp/src/components/FetchData.js create mode 100644 TBSReact/ClientApp/src/components/Home.js create mode 100644 TBSReact/ClientApp/src/components/Layout.js create mode 100644 TBSReact/ClientApp/src/components/NavMenu.css create mode 100644 TBSReact/ClientApp/src/components/NavMenu.js create mode 100644 TBSReact/ClientApp/src/custom.css create mode 100644 TBSReact/ClientApp/src/index.js create mode 100644 TBSReact/ClientApp/src/reportWebVitals.js create mode 100644 TBSReact/ClientApp/src/service-worker.js create mode 100644 TBSReact/ClientApp/src/serviceWorkerRegistration.js create mode 100644 TBSReact/ClientApp/src/setupProxy.js create mode 100644 TBSReact/Controllers/WeatherForecastController.cs create mode 100644 TBSReact/Pages/Error.cshtml create mode 100644 TBSReact/Pages/Error.cshtml.cs create mode 100644 TBSReact/Pages/_ViewImports.cshtml create mode 100644 TBSReact/Program.cs create mode 100644 TBSReact/Properties/launchSettings.json create mode 100644 TBSReact/TBSReact.csproj create mode 100644 TBSReact/WeatherForecast.cs create mode 100644 TBSReact/appsettings.Development.json create mode 100644 TBSReact/appsettings.json diff --git a/TBSReact/.gitignore b/TBSReact/.gitignore new file mode 100644 index 000000000..8f8b43bb1 --- /dev/null +++ b/TBSReact/.gitignore @@ -0,0 +1,232 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +bin/ +Bin/ +obj/ +Obj/ + +# Visual Studio 2015 cache/options directory +.vs/ +/wwwroot/dist/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +orleans.codegen.cs + +/node_modules + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ diff --git a/TBSReact/ClientApp/.env b/TBSReact/ClientApp/.env new file mode 100644 index 000000000..6ce384e5c --- /dev/null +++ b/TBSReact/ClientApp/.env @@ -0,0 +1 @@ +BROWSER=none diff --git a/TBSReact/ClientApp/.env.development b/TBSReact/ClientApp/.env.development new file mode 100644 index 000000000..3ef2eef0b --- /dev/null +++ b/TBSReact/ClientApp/.env.development @@ -0,0 +1,3 @@ +PORT=44465 +HTTPS=true + diff --git a/TBSReact/ClientApp/.gitignore b/TBSReact/ClientApp/.gitignore new file mode 100644 index 000000000..d30f40ef4 --- /dev/null +++ b/TBSReact/ClientApp/.gitignore @@ -0,0 +1,21 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/TBSReact/ClientApp/README.md b/TBSReact/ClientApp/README.md new file mode 100644 index 000000000..9a2c94454 --- /dev/null +++ b/TBSReact/ClientApp/README.md @@ -0,0 +1,2228 @@ +This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). + +Below you will find some information on how to perform common tasks.
+You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md). + +## Table of Contents + +- [Updating to New Releases](#updating-to-new-releases) +- [Sending Feedback](#sending-feedback) +- [Folder Structure](#folder-structure) +- [Available Scripts](#available-scripts) + - [npm start](#npm-start) + - [npm test](#npm-test) + - [npm run build](#npm-run-build) + - [npm run eject](#npm-run-eject) +- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) +- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) +- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) +- [Debugging in the Editor](#debugging-in-the-editor) +- [Formatting Code Automatically](#formatting-code-automatically) +- [Changing the Page ``](#changing-the-page-title) +- [Installing a Dependency](#installing-a-dependency) +- [Importing a Component](#importing-a-component) +- [Code Splitting](#code-splitting) +- [Adding a Stylesheet](#adding-a-stylesheet) +- [Post-Processing CSS](#post-processing-css) +- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) +- [Adding Images, Fonts, and Files](#adding-images-fonts-and-files) +- [Using the `public` Folder](#using-the-public-folder) + - [Changing the HTML](#changing-the-html) + - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) + - [When to Use the `public` Folder](#when-to-use-the-public-folder) +- [Using Global Variables](#using-global-variables) +- [Adding Bootstrap](#adding-bootstrap) + - [Using a Custom Theme](#using-a-custom-theme) +- [Adding Flow](#adding-flow) +- [Adding Custom Environment Variables](#adding-custom-environment-variables) + - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) + - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) + - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) +- [Can I Use Decorators?](#can-i-use-decorators) +- [Integrating with an API Backend](#integrating-with-an-api-backend) + - [Node](#node) + - [Ruby on Rails](#ruby-on-rails) +- [Proxying API Requests in Development](#proxying-api-requests-in-development) + - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy) + - [Configuring the Proxy Manually](#configuring-the-proxy-manually) + - [Configuring a WebSocket Proxy](#configuring-a-websocket-proxy) +- [Using HTTPS in Development](#using-https-in-development) +- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) +- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) +- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) +- [Running Tests](#running-tests) + - [Filename Conventions](#filename-conventions) + - [Command Line Interface](#command-line-interface) + - [Version Control Integration](#version-control-integration) + - [Writing Tests](#writing-tests) + - [Testing Components](#testing-components) + - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) + - [Initializing Test Environment](#initializing-test-environment) + - [Focusing and Excluding Tests](#focusing-and-excluding-tests) + - [Coverage Reporting](#coverage-reporting) + - [Continuous Integration](#continuous-integration) + - [Disabling jsdom](#disabling-jsdom) + - [Snapshot Testing](#snapshot-testing) + - [Editor Integration](#editor-integration) +- [Developing Components in Isolation](#developing-components-in-isolation) + - [Getting Started with Storybook](#getting-started-with-storybook) + - [Getting Started with Styleguidist](#getting-started-with-styleguidist) +- [Making a Progressive Web App](#making-a-progressive-web-app) + - [Opting Out of Caching](#opting-out-of-caching) + - [Offline-First Considerations](#offline-first-considerations) + - [Progressive Web App Metadata](#progressive-web-app-metadata) +- [Analyzing the Bundle Size](#analyzing-the-bundle-size) +- [Deployment](#deployment) + - [Static Server](#static-server) + - [Other Solutions](#other-solutions) + - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) + - [Building for Relative Paths](#building-for-relative-paths) + - [Azure](#azure) + - [Firebase](#firebase) + - [GitHub Pages](#github-pages) + - [Heroku](#heroku) + - [Netlify](#netlify) + - [Now](#now) + - [S3 and CloudFront](#s3-and-cloudfront) + - [Surge](#surge) +- [Advanced Configuration](#advanced-configuration) +- [Troubleshooting](#troubleshooting) + - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) + - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) + - [`npm run build` exits too early](#npm-run-build-exits-too-early) + - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) + - [`npm run build` fails to minify](#npm-run-build-fails-to-minify) + - [Moment.js locales are missing](#momentjs-locales-are-missing) +- [Something Missing?](#something-missing) + +## Updating to New Releases + +Create React App is divided into two packages: + +* `create-react-app` is a global command-line utility that you use to create new projects. +* `react-scripts` is a development dependency in the generated projects (including this one). + +You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`. + +When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. + +To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. + +In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. + +We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. + +## Sending Feedback + +We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). + +## Folder Structure + +After creation, your project should look like this: + +``` +my-app/ + README.md + node_modules/ + package.json + public/ + index.html + favicon.ico + src/ + App.css + App.js + App.test.js + index.css + index.js + logo.svg +``` + +For the project to build, **these files must exist with exact filenames**: + +* `public/index.html` is the page template; +* `src/index.js` is the JavaScript entry point. + +You can delete or rename the other files. + +You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.<br> +You need to **put any JS and CSS files inside `src`**, otherwise Webpack won’t see them. + +Only files inside `public` can be used from `public/index.html`.<br> +Read instructions below for using assets from JavaScript and HTML. + +You can, however, create more top-level directories.<br> +They will not be included in the production build so you can use them for things like documentation. + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.<br> +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.<br> +You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.<br> +See the section about [running tests](#running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.<br> +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.<br> +Your app is ready to be deployed! + +See the section about [deployment](#deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Supported Language Features and Polyfills + +This project supports a superset of the latest JavaScript standard.<br> +In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports: + +* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016). +* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017). +* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal). +* [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal) +* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). +* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax. + +Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-). + +While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future. + +Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**: + +* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign). +* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise). +* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch). + +If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them. + +## Syntax Highlighting in the Editor + +To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered. + +## Displaying Lint Output in the Editor + +>Note: this feature is available with `react-scripts@0.2.0` and higher.<br> +>It also only works with npm 3 or higher. + +Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. + +They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. + +You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root: + +```js +{ + "extends": "react-app" +} +``` + +Now your editor should report the linting warnings. + +Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes. + +If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules. + +## Debugging in the Editor + +**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).** + +Visual Studio Code and WebStorm support debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools. + +### Visual Studio Code + +You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed. + +Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory. + +```json +{ + "version": "0.2.0", + "configurations": [{ + "name": "Chrome", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000", + "webRoot": "${workspaceRoot}/src", + "sourceMapPathOverrides": { + "webpack:///src/*": "${webRoot}/*" + } + }] +} +``` +>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). + +Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor. + +Having problems with VS Code Debugging? Please see their [troubleshooting guide](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#troubleshooting). + +### WebStorm + +You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed. + +In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration. + +>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). + +Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm. + +The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine. + +## Formatting Code Automatically + +Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/). + +To format our code whenever we make a commit in git, we need to install the following dependencies: + +```sh +npm install --save husky lint-staged prettier +``` + +Alternatively you may use `yarn`: + +```sh +yarn add husky lint-staged prettier +``` + +* `husky` makes it easy to use githooks as if they are npm scripts. +* `lint-staged` allows us to run scripts on staged files in git. See this [blog post about lint-staged to learn more about it](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8). +* `prettier` is the JavaScript formatter we will run before commits. + +Now we can make sure every file is formatted correctly by adding a few lines to the `package.json` in the project root. + +Add the following line to `scripts` section: + +```diff + "scripts": { ++ "precommit": "lint-staged", + "start": "react-scripts start", + "build": "react-scripts build", +``` + +Next we add a 'lint-staged' field to the `package.json`, for example: + +```diff + "dependencies": { + // ... + }, ++ "lint-staged": { ++ "src/**/*.{js,jsx,json,css}": [ ++ "prettier --single-quote --write", ++ "git add" ++ ] ++ }, + "scripts": { +``` + +Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --single-quote --write "src/**/*.{js,jsx}"` to format your entire project for the first time. + +Next you might want to integrate Prettier in your favorite editor. Read the section on [Editor Integration](https://github.com/prettier/prettier#editor-integration) on the Prettier GitHub page. + +## Changing the Page `<title>` + +You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else. + +Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML. + +If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library. + +If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files). + +## Installing a Dependency + +The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: + +```sh +npm install --save react-router +``` + +Alternatively you may use `yarn`: + +```sh +yarn add react-router +``` + +This works for any library, not just `react-router`. + +## Importing a Component + +This project setup supports ES6 modules thanks to Babel.<br> +While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. + +For example: + +### `Button.js` + +```js +import React, { Component } from 'react'; + +class Button extends Component { + render() { + // ... + } +} + +export default Button; // Don’t forget to use export default! +``` + +### `DangerButton.js` + + +```js +import React, { Component } from 'react'; +import Button from './Button'; // Import a component from another file + +class DangerButton extends Component { + render() { + return <Button color="red" />; + } +} + +export default DangerButton; +``` + +Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. + +We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. + +Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. + +Learn more about ES6 modules: + +* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) +* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) +* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) + +## Code Splitting + +Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand. + +This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 3. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module. + +Here is an example: + +### `moduleA.js` + +```js +const moduleA = 'Hello'; + +export { moduleA }; +``` +### `App.js` + +```js +import React, { Component } from 'react'; + +class App extends Component { + handleClick = () => { + import('./moduleA') + .then(({ moduleA }) => { + // Use moduleA + }) + .catch(err => { + // Handle failure + }); + }; + + render() { + return ( + <div> + <button onClick={this.handleClick}>Load</button> + </div> + ); + } +} + +export default App; +``` + +This will make `moduleA.js` and all its unique dependencies as a separate chunk that only loads after the user clicks the 'Load' button. + +You can also use it with `async` / `await` syntax if you prefer it. + +### With React Router + +If you are using React Router check out [this tutorial](http://serverless-stack.com/chapters/code-splitting-in-create-react-app.html) on how to use code splitting with it. You can find the companion GitHub repository [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client/tree/code-splitting-in-create-react-app). + +## Adding a Stylesheet + +This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: + +### `Button.css` + +```css +.Button { + padding: 20px; +} +``` + +### `Button.js` + +```js +import React, { Component } from 'react'; +import './Button.css'; // Tell Webpack that Button.js uses these styles + +class Button extends Component { + render() { + // You can use them as regular CSS styles + return <div className="Button" />; + } +} +``` + +**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. + +In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. + +If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. + +## Post-Processing CSS + +This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. + +For example, this: + +```css +.App { + display: flex; + flex-direction: row; + align-items: center; +} +``` + +becomes this: + +```css +.App { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} +``` + +If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling). + +## Adding a CSS Preprocessor (Sass, Less etc.) + +Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)). + +Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative. + +First, let’s install the command-line interface for Sass: + +```sh +npm install --save node-sass-chokidar +``` + +Alternatively you may use `yarn`: + +```sh +yarn add node-sass-chokidar +``` + +Then in `package.json`, add the following lines to `scripts`: + +```diff + "scripts": { ++ "build-css": "node-sass-chokidar src/ -o src/", ++ "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test --env=jsdom", +``` + +>Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. + +Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated. + +To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions. + +To enable importing files without using relative paths, you can add the `--include-path` option to the command in `package.json`. + +``` +"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/", +"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive", +``` + +This will allow you to do imports like + +```scss +@import 'styles/_colors.scss'; // assuming a styles directory under src/ +@import 'nprogress/nprogress'; // importing a css file from the nprogress node module +``` + +At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control. + +As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use the `&&` operator to execute two scripts sequentially. However, there is no cross-platform way to run two scripts in parallel, so we will install a package for this: + +```sh +npm install --save npm-run-all +``` + +Alternatively you may use `yarn`: + +```sh +yarn add npm-run-all +``` + +Then we can change `start` and `build` scripts to include the CSS preprocessor commands: + +```diff + "scripts": { + "build-css": "node-sass-chokidar src/ -o src/", + "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", +- "start": "react-scripts start", +- "build": "react-scripts build", ++ "start-js": "react-scripts start", ++ "start": "npm-run-all -p watch-css start-js", ++ "build-js": "react-scripts build", ++ "build": "npm-run-all build-css build-js", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + } +``` + +Now running `npm start` and `npm run build` also builds Sass files. + +**Why `node-sass-chokidar`?** + +`node-sass` has been reported as having the following issues: + +- `node-sass --watch` has been reported to have *performance issues* in certain conditions when used in a virtual machine or with docker. + +- Infinite styles compiling [#1939](https://github.com/facebookincubator/create-react-app/issues/1939) + +- `node-sass` has been reported as having issues with detecting new files in a directory [#1891](https://github.com/sass/node-sass/issues/1891) + + `node-sass-chokidar` is used here as it addresses these issues. + +## Adding Images, Fonts, and Files + +With Webpack, using static assets like images and fonts works similarly to CSS. + +You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF. + +To reduce the number of requests to the server, importing images that are less than 10,000 bytes returns a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) instead of a path. This applies to the following file extensions: bmp, gif, jpg, jpeg, and png. SVG files are excluded due to [#1153](https://github.com/facebookincubator/create-react-app/issues/1153). + +Here is an example: + +```js +import React from 'react'; +import logo from './logo.png'; // Tell Webpack this JS file uses this image + +console.log(logo); // /logo.84287d09.png + +function Header() { + // Import result is the URL of your image + return <img src={logo} alt="Logo" />; +} + +export default Header; +``` + +This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths. + +This works in CSS too: + +```css +.Logo { + background-image: url(./logo.png); +} +``` + +Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. + +Please be advised that this is also a custom feature of Webpack. + +**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).<br> +An alternative way of handling static assets is described in the next section. + +## Using the `public` Folder + +>Note: this feature is available with `react-scripts@0.5.0` and higher. + +### Changing the HTML + +The `public` folder contains the HTML file so you can tweak it, for example, to [set the page title](#changing-the-page-title). +The `<script>` tag with the compiled code will be added to it automatically during the build process. + +### Adding Assets Outside of the Module System + +You can also add other assets to the `public` folder. + +Note that we normally encourage you to `import` assets in JavaScript files instead. +For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-fonts-and-files). +This mechanism provides a number of benefits: + +* Scripts and stylesheets get minified and bundled together to avoid extra network requests. +* Missing files cause compilation errors instead of 404 errors for your users. +* Result filenames include content hashes so you don’t need to worry about browsers caching their old versions. + +However there is an **escape hatch** that you can use to add an asset outside of the module system. + +If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. + +Inside `index.html`, you can use it like this: + +```html +<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> +``` + +Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build. + +When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL. + +In JavaScript code, you can use `process.env.PUBLIC_URL` for similar purposes: + +```js +render() { + // Note: this is an escape hatch and should be used sparingly! + // Normally we recommend using `import` for getting asset URLs + // as described in “Adding Images and Fonts” above this section. + return <img src={process.env.PUBLIC_URL + '/img/logo.png'} />; +} +``` + +Keep in mind the downsides of this approach: + +* None of the files in `public` folder get post-processed or minified. +* Missing files will not be called at compilation time, and will cause 404 errors for your users. +* Result filenames won’t include content hashes so you’ll need to add query arguments or rename them every time they change. + +### When to Use the `public` Folder + +Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-fonts-and-files) from JavaScript. +The `public` folder is useful as a workaround for a number of less common cases: + +* You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest). +* You have thousands of images and need to dynamically reference their paths. +* You want to include a small script like [`pace.js`](http://github.hubspot.com/pace/docs/welcome/) outside of the bundled code. +* Some library may be incompatible with Webpack and you have no other option but to include it as a `<script>` tag. + +Note that if you add a `<script>` that declares global variables, you also need to read the next section on using them. + +## Using Global Variables + +When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable. + +You can avoid this by reading the global variable explicitly from the `window` object, for example: + +```js +const $ = window.$; +``` + +This makes it obvious you are using a global variable intentionally rather than because of a typo. + +Alternatively, you can force the linter to ignore any line by adding `// eslint-disable-line` after it. + +## Adding Bootstrap + +You don’t have to use [Reactstrap](https://reactstrap.github.io/) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: + +Install Reactstrap and Bootstrap from npm. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: + +```sh +npm install --save reactstrap bootstrap@4 +``` + +Alternatively you may use `yarn`: + +```sh +yarn add reactstrap bootstrap@4 +``` + +Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file: + +```js +import 'bootstrap/dist/css/bootstrap.css'; +// Put any other imports below so that CSS from your +// components takes precedence over default styles. +``` + +Import required React Bootstrap components within ```src/App.js``` file or your custom component files: + +```js +import { Navbar, Button } from 'reactstrap'; +``` + +Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. + +### Using a Custom Theme + +Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br> +We suggest the following approach: + +* Create a new package that depends on the package you wish to customize, e.g. Bootstrap. +* Add the necessary build steps to tweak the theme, and publish your package on npm. +* Install your own theme npm package as a dependency of your app. + +Here is an example of adding a [customized Bootstrap](https://medium.com/@tacomanator/customizing-create-react-app-aa9ffb88165) that follows these steps. + +## Adding Flow + +Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. + +Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box. + +To add Flow to a Create React App project, follow these steps: + +1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). +2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. +3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. +4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). + +Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. +You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience. +In the future we plan to integrate it into Create React App even more closely. + +To learn more about Flow, check out [its documentation](https://flowtype.org/). + +## Adding Custom Environment Variables + +>Note: this feature is available with `react-scripts@0.2.3` and higher. + +Your project can consume variables declared in your environment as if they were declared locally in your JS files. By +default you will have `NODE_ENV` defined for you, and any other environment variables starting with +`REACT_APP_`. + +**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them. + +>Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. + +These environment variables will be defined for you on `process.env`. For example, having an environment +variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`. + +There is also a special built-in environment variable called `NODE_ENV`. You can read it from `process.env.NODE_ENV`. When you run `npm start`, it is always equal to `'development'`, when you run `npm test` it is always equal to `'test'`, and when you run `npm run build` to make a production bundle, it is always equal to `'production'`. **You cannot override `NODE_ENV` manually.** This prevents developers from accidentally deploying a slow development build to production. + +These environment variables can be useful for displaying information conditionally based on where the project is +deployed or consuming sensitive data that lives outside of version control. + +First, you need to have environment variables defined. For example, let’s say you wanted to consume a secret defined +in the environment inside a `<form>`: + +```jsx +render() { + return ( + <div> + <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> + <form> + <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> + </form> + </div> + ); +} +``` + +During the build, `process.env.REACT_APP_SECRET_CODE` will be replaced with the current value of the `REACT_APP_SECRET_CODE` environment variable. Remember that the `NODE_ENV` variable will be set for you automatically. + +When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: + +```html +<div> + <small>You are running this application in <b>development</b> mode.</small> + <form> + <input type="hidden" value="abcdef" /> + </form> +</div> +``` + +The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this +value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in +a `.env` file. Both of these ways are described in the next few sections. + +Having access to the `NODE_ENV` is also useful for performing actions conditionally: + +```js +if (process.env.NODE_ENV !== 'production') { + analytics.disable(); +} +``` + +When you compile the app with `npm run build`, the minification step will strip out this condition, and the resulting bundle will be smaller. + +### Referencing Environment Variables in the HTML + +>Note: this feature is available with `react-scripts@0.9.0` and higher. + +You can also access the environment variables starting with `REACT_APP_` in the `public/index.html`. For example: + +```html +<title>%REACT_APP_WEBSITE_NAME% +``` + +Note that the caveats from the above section apply: + +* Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work. +* The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](#generating-dynamic-meta-tags-on-the-server). + +### Adding Temporary Environment Variables In Your Shell + +Defining environment variables can vary between OSes. It’s also important to know that this manner is temporary for the +life of the shell session. + +#### Windows (cmd.exe) + +```cmd +set REACT_APP_SECRET_CODE=abcdef&&npm start +``` + +(Note: the lack of whitespace is intentional.) + +#### Linux, macOS (Bash) + +```bash +REACT_APP_SECRET_CODE=abcdef npm start +``` + +### Adding Development Environment Variables In `.env` + +>Note: this feature is available with `react-scripts@0.5.0` and higher. + +To define permanent environment variables, create a file called `.env` in the root of your project: + +``` +REACT_APP_SECRET_CODE=abcdef +``` + +`.env` files **should be** checked into source control (with the exclusion of `.env*.local`). + +#### What other `.env` files can be used? + +>Note: this feature is **available with `react-scripts@1.0.0` and higher**. + +* `.env`: Default. +* `.env.local`: Local overrides. **This file is loaded for all environments except test.** +* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings. +* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings. + +Files on the left have more priority than files on the right: + +* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env` +* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env` +* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing) + +These variables will act as the defaults if the machine does not explicitly set them.
+Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. + +>Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need +these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). + +## Can I Use Decorators? + +Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
+Create React App doesn’t support decorator syntax at the moment because: + +* It is an experimental proposal and is subject to change. +* The current specification version is not officially supported by Babel. +* If the specification changes, we won’t be able to write a codemod because we don’t use them internally at Facebook. + +However in many cases you can rewrite decorator-based code without decorators just as fine.
+Please refer to these two threads for reference: + +* [#214](https://github.com/facebookincubator/create-react-app/issues/214) +* [#411](https://github.com/facebookincubator/create-react-app/issues/411) + +Create React App will add decorator support when the specification advances to a stable stage. + +## Integrating with an API Backend + +These tutorials will help you to integrate your app with an API backend running on another port, +using `fetch()` to access it. + +### Node +Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/). +You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). + +### Ruby on Rails + +Check out [this tutorial](https://www.fullstackreact.com/articles/how-to-get-create-react-app-to-work-with-your-rails-api/). +You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo-rails). + +## Proxying API Requests in Development + +>Note: this feature is available with `react-scripts@0.2.3` and higher. + +People often serve the front-end React app from the same host and port as their backend implementation.
+For example, a production setup might look like this after the app is deployed: + +``` +/ - static server returns index.html with React app +/todos - static server returns index.html with React app +/api/todos - server handles any /api/* requests using the backend implementation +``` + +Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. + +To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: + +```js + "proxy": "http://localhost:4000", +``` + +This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will **only** attempt to send requests without `text/html` in its `Accept` header to the proxy. + +Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: + +``` +Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. +``` + +Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`. + +The `proxy` option supports HTTP, HTTPS and WebSocket connections.
+If the `proxy` option is **not** flexible enough for you, alternatively you can: + +* [Configure the proxy yourself](#configuring-the-proxy-manually) +* Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). +* Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. + +### "Invalid Host Header" Errors After Configuring Proxy + +When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. The issue is explained in [this article](https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a) and [this issue](https://github.com/webpack/webpack-dev-server/issues/887). + +This shouldn’t affect you when developing on `localhost`, but if you develop remotely like [described here](https://github.com/facebookincubator/create-react-app/issues/2271), you will see this error in the browser after enabling the `proxy` option: + +>Invalid Host header + +To work around it, you can specify your public development host in a file called `.env.development` in the root of your project: + +``` +HOST=mypublicdevhost.com +``` + +If you restart the development server now and load the app from the specified host, it should work. + +If you are still having issues or if you’re using a more exotic environment like a cloud editor, you can bypass the host check completely by adding a line to `.env.development.local`. **Note that this is dangerous and exposes your machine to remote code execution from malicious websites:** + +``` +# NOTE: THIS IS DANGEROUS! +# It exposes your machine to attacks from the websites you visit. +DANGEROUSLY_DISABLE_HOST_CHECK=true +``` + +We don’t recommend this approach. + +### Configuring the Proxy Manually + +>Note: this feature is available with `react-scripts@1.0.0` and higher. + +If the `proxy` option is **not** flexible enough for you, you can specify an object in the following form (in `package.json`).
+You may also specify any configuration value [`http-proxy-middleware`](https://github.com/chimurai/http-proxy-middleware#options) or [`http-proxy`](https://github.com/nodejitsu/node-http-proxy#options) supports. +```js +{ + // ... + "proxy": { + "/api": { + "target": "", + "ws": true + // ... + } + } + // ... +} +``` + +All requests matching this path will be proxies, no exceptions. This includes requests for `text/html`, which the standard `proxy` option does not proxy. + +If you need to specify multiple proxies, you may do so by specifying additional entries. +Matches are regular expressions, so that you can use a regexp to match multiple paths. +```js +{ + // ... + "proxy": { + // Matches any request starting with /api + "/api": { + "target": "", + "ws": true + // ... + }, + // Matches any request starting with /foo + "/foo": { + "target": "", + "ssl": true, + "pathRewrite": { + "^/foo": "/foo/beta" + } + // ... + }, + // Matches /bar/abc.html but not /bar/sub/def.html + "/bar/[^/]*[.]html": { + "target": "", + // ... + }, + // Matches /baz/abc.html and /baz/sub/def.html + "/baz/.*/.*[.]html": { + "target": "" + // ... + } + } + // ... +} +``` + +### Configuring a WebSocket Proxy + +When setting up a WebSocket proxy, there are a some extra considerations to be aware of. + +If you’re using a WebSocket engine like [Socket.io](https://socket.io/), you must have a Socket.io server running that you can use as the proxy target. Socket.io will not work with a standard WebSocket server. Specifically, don't expect Socket.io to work with [the websocket.org echo test](http://websocket.org/echo.html). + +There’s some good documentation available for [setting up a Socket.io server](https://socket.io/docs/). + +Standard WebSockets **will** work with a standard WebSocket server as well as the websocket.org echo test. You can use libraries like [ws](https://github.com/websockets/ws) for the server, with [native WebSockets in the browser](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). + +Either way, you can proxy WebSocket requests manually in `package.json`: + +```js +{ + // ... + "proxy": { + "/socket": { + // Your compatible WebSocket server + "target": "ws://", + // Tell http-proxy-middleware that this is a WebSocket proxy. + // Also allows you to proxy WebSocket requests without an additional HTTP request + // https://github.com/chimurai/http-proxy-middleware#external-websocket-upgrade + "ws": true + // ... + } + } + // ... +} +``` + +## Using HTTPS in Development + +>Note: this feature is available with `react-scripts@0.4.0` and higher. + +You may require the dev server to serve pages over HTTPS. One particular case where this could be useful is when using [the "proxy" feature](#proxying-api-requests-in-development) to proxy requests to an API server when that API server is itself serving HTTPS. + +To do this, set the `HTTPS` environment variable to `true`, then start the dev server as usual with `npm start`: + +#### Windows (cmd.exe) + +```cmd +set HTTPS=true&&npm start +``` + +(Note: the lack of whitespace is intentional.) + +#### Linux, macOS (Bash) + +```bash +HTTPS=true npm start +``` + +Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page. + +## Generating Dynamic `` Tags on the Server + +Since Create React App doesn’t support server rendering, you might be wondering how to make `` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this: + +```html + + + + + +``` + +Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG_TITLE__`, `__OG_DESCRIPTION__`, and any other placeholders with values depending on the current URL. Just make sure to sanitize and escape the interpolated values so that they are safe to embed into HTML! + +If you use a Node server, you can even share the route matching logic between the client and the server. However duplicating it also works fine in simple cases. + +## Pre-Rendering into Static HTML Files + +If you’re hosting your `build` with a static hosting provider you can use [react-snapshot](https://www.npmjs.com/package/react-snapshot) or [react-snap](https://github.com/stereobooster/react-snap) to generate HTML pages for each route, or relative link, in your application. These pages will then seamlessly become active, or “hydrated”, when the JavaScript bundle has loaded. + +There are also opportunities to use this outside of static hosting, to take the pressure off the server when generating and caching routes. + +The primary benefit of pre-rendering is that you get the core content of each page _with_ the HTML payload—regardless of whether or not your JavaScript bundle successfully downloads. It also increases the likelihood that each route of your application will be picked up by search engines. + +You can read more about [zero-configuration pre-rendering (also called snapshotting) here](https://medium.com/superhighfives/an-almost-static-stack-6df0a2791319). + +## Injecting Data from the Server into the Page + +Similarly to the previous section, you can leave some placeholders in the HTML that inject global variables, for example: + +```js + + + + +``` + +Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.** + +## Running Tests + +>Note: this feature is available with `react-scripts@0.3.0` and higher.
+>[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) + +Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try. + +Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness. + +While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks. + +We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App. + +### Filename Conventions + +Jest will look for test files with any of the following popular naming conventions: + +* Files with `.js` suffix in `__tests__` folders. +* Files with `.test.js` suffix. +* Files with `.spec.js` suffix. + +The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder. + +We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects. + +### Command Line Interface + +When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code. + +The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run: + +![Jest watch mode](http://facebook.github.io/jest/img/blog/15-watch.gif) + +### Version Control Integration + +By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests run fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. + +Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests. + +Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository. + +### Writing Tests + +To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended. + +Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this: + +```js +import sum from './sum'; + +it('sums numbers', () => { + expect(sum(1, 2)).toEqual(3); + expect(sum(2, 2)).toEqual(4); +}); +``` + +All `expect()` matchers supported by Jest are [extensively documented here](https://facebook.github.io/jest/docs/en/expect.html#content).
+You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](https://facebook.github.io/jest/docs/en/expect.html#tohavebeencalled) to create “spies” or mock functions. + +### Testing Components + +There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes. + +Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components: + +```js +import React from 'react'; +import ReactDOM from 'react-dom'; +import App from './App'; + +it('renders without crashing', () => { + const div = document.createElement('div'); + ReactDOM.render(, div); +}); +``` + +This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. + +When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior. + +If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). To install it, run: + +```sh +npm install --save enzyme enzyme-adapter-react-16 react-test-renderer +``` + +Alternatively you may use `yarn`: + +```sh +yarn add enzyme enzyme-adapter-react-16 react-test-renderer +``` + +As of Enzyme 3, you will need to install Enzyme along with an Adapter corresponding to the version of React you are using. (The examples above use the adapter for React 16.) + +The adapter will also need to be configured in your [global setup file](#initializing-test-environment): + +#### `src/setupTests.js` +```js +import { configure } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; + +configure({ adapter: new Adapter() }); +``` + +Now you can write a smoke test with it: + +```js +import React from 'react'; +import { shallow } from 'enzyme'; +import App from './App'; + +it('renders without crashing', () => { + shallow(); +}); +``` + +Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a ` + + ); + } +} diff --git a/TBSReact/ClientApp/src/components/FetchData.js b/TBSReact/ClientApp/src/components/FetchData.js new file mode 100644 index 000000000..25d920654 --- /dev/null +++ b/TBSReact/ClientApp/src/components/FetchData.js @@ -0,0 +1,59 @@ +import React, { Component } from 'react'; + +export class FetchData extends Component { + static displayName = FetchData.name; + + constructor(props) { + super(props); + this.state = { forecasts: [], loading: true }; + } + + componentDidMount() { + this.populateWeatherData(); + } + + static renderForecastsTable(forecasts) { + return ( + + + + + + + + + + + {forecasts.map(forecast => + + + + + + + )} + +
DateTemp. (C)Temp. (F)Summary
{forecast.date}{forecast.temperatureC}{forecast.temperatureF}{forecast.summary}
+ ); + } + + render() { + let contents = this.state.loading + ?

Loading...

+ : FetchData.renderForecastsTable(this.state.forecasts); + + return ( +
+

Weather forecast

+

This component demonstrates fetching data from the server.

+ {contents} +
+ ); + } + + async populateWeatherData() { + const response = await fetch('weatherforecast'); + const data = await response.json(); + this.setState({ forecasts: data, loading: false }); + } +} diff --git a/TBSReact/ClientApp/src/components/Home.js b/TBSReact/ClientApp/src/components/Home.js new file mode 100644 index 000000000..7f6b28e71 --- /dev/null +++ b/TBSReact/ClientApp/src/components/Home.js @@ -0,0 +1,26 @@ +import React, { Component } from 'react'; + +export class Home extends Component { + static displayName = Home.name; + + render () { + return ( +
+

Hello, world!

+

Welcome to your new single-page application, built with:

+
+

To help you get started, we have also set up:

+
    +
  • Client-side navigation. For example, click Counter then Back to return here.
  • +
  • Development server integration. In development mode, the development server from create-react-app runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.
  • +
  • Efficient production builds. In production mode, development-time features are disabled, and your dotnet publish configuration produces minified, efficiently bundled JavaScript files.
  • +
+

The ClientApp subdirectory is a standard React application based on the create-react-app template. If you open a command prompt in that directory, you can run npm commands such as npm test or npm install.

+
+ ); + } +} diff --git a/TBSReact/ClientApp/src/components/Layout.js b/TBSReact/ClientApp/src/components/Layout.js new file mode 100644 index 000000000..6d4e876dc --- /dev/null +++ b/TBSReact/ClientApp/src/components/Layout.js @@ -0,0 +1,18 @@ +import React, { Component } from 'react'; +import { Container } from 'reactstrap'; +import { NavMenu } from './NavMenu'; + +export class Layout extends Component { + static displayName = Layout.name; + + render () { + return ( +
+ + + {this.props.children} + +
+ ); + } +} diff --git a/TBSReact/ClientApp/src/components/NavMenu.css b/TBSReact/ClientApp/src/components/NavMenu.css new file mode 100644 index 000000000..9214b0eae --- /dev/null +++ b/TBSReact/ClientApp/src/components/NavMenu.css @@ -0,0 +1,18 @@ +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +html { + font-size: 14px; +} +@media (min-width: 768px) { + html { + font-size: 16px; + } +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} diff --git a/TBSReact/ClientApp/src/components/NavMenu.js b/TBSReact/ClientApp/src/components/NavMenu.js new file mode 100644 index 000000000..8d8ae6ad3 --- /dev/null +++ b/TBSReact/ClientApp/src/components/NavMenu.js @@ -0,0 +1,49 @@ +import React, { Component } from 'react'; +import { Collapse, Container, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap'; +import { Link } from 'react-router-dom'; +import './NavMenu.css'; + +export class NavMenu extends Component { + static displayName = NavMenu.name; + + constructor (props) { + super(props); + + this.toggleNavbar = this.toggleNavbar.bind(this); + this.state = { + collapsed: true + }; + } + + toggleNavbar () { + this.setState({ + collapsed: !this.state.collapsed + }); + } + + render () { + return ( +
+ + + TBSReact + + +
    + + Home + + + Counter + + + Fetch data + +
+
+
+
+
+ ); + } +} diff --git a/TBSReact/ClientApp/src/custom.css b/TBSReact/ClientApp/src/custom.css new file mode 100644 index 000000000..5fdfd061c --- /dev/null +++ b/TBSReact/ClientApp/src/custom.css @@ -0,0 +1,14 @@ +/* Provide sufficient contrast against white background */ +a { + color: #0366d6; +} + +code { + color: #E01A76; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} diff --git a/TBSReact/ClientApp/src/index.js b/TBSReact/ClientApp/src/index.js new file mode 100644 index 000000000..fbb3bcc6d --- /dev/null +++ b/TBSReact/ClientApp/src/index.js @@ -0,0 +1,26 @@ +import 'bootstrap/dist/css/bootstrap.css'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import { BrowserRouter } from 'react-router-dom'; +import App from './App'; +import * as serviceWorkerRegistration from './serviceWorkerRegistration'; +import reportWebVitals from './reportWebVitals'; + +const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); +const rootElement = document.getElementById('root'); + +ReactDOM.render( + + + , + rootElement); + +// If you want your app to work offline and load faster, you can change +// unregister() to register() below. Note this comes with some pitfalls. +// Learn more about service workers: https://cra.link/PWA +serviceWorkerRegistration.unregister(); + +// If you want to start measuring performance in your app, pass a function +// to log results (for example: reportWebVitals(console.log)) +// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals +reportWebVitals(); diff --git a/TBSReact/ClientApp/src/reportWebVitals.js b/TBSReact/ClientApp/src/reportWebVitals.js new file mode 100644 index 000000000..532f29b0b --- /dev/null +++ b/TBSReact/ClientApp/src/reportWebVitals.js @@ -0,0 +1,13 @@ +const reportWebVitals = (onPerfEntry) => { + if (onPerfEntry && onPerfEntry instanceof Function) { + import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { + getCLS(onPerfEntry); + getFID(onPerfEntry); + getFCP(onPerfEntry); + getLCP(onPerfEntry); + getTTFB(onPerfEntry); + }); + } +}; + +export default reportWebVitals; diff --git a/TBSReact/ClientApp/src/service-worker.js b/TBSReact/ClientApp/src/service-worker.js new file mode 100644 index 000000000..0f1e0ce02 --- /dev/null +++ b/TBSReact/ClientApp/src/service-worker.js @@ -0,0 +1,72 @@ +/* eslint-disable no-restricted-globals */ + +// This service worker can be customized! +// See https://developers.google.com/web/tools/workbox/modules +// for the list of available Workbox modules, or add any other +// code you'd like. +// You can also remove this file if you'd prefer not to use a +// service worker, and the Workbox build step will be skipped. + +import { clientsClaim } from 'workbox-core'; +import { ExpirationPlugin } from 'workbox-expiration'; +import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'; +import { registerRoute } from 'workbox-routing'; +import { StaleWhileRevalidate } from 'workbox-strategies'; + +clientsClaim(); + +// Precache all of the assets generated by your build process. +// Their URLs are injected into the manifest variable below. +// This variable must be present somewhere in your service worker file, +// even if you decide not to use precaching. See https://cra.link/PWA +precacheAndRoute(self.__WB_MANIFEST); + +// Set up App Shell-style routing, so that all navigation requests +// are fulfilled with your index.html shell. Learn more at +// https://developers.google.com/web/fundamentals/architecture/app-shell +const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$'); +registerRoute( + // Return false to exempt requests from being fulfilled by index.html. + ({ request, url }) => { + // If this isn't a navigation, skip. + if (request.mode !== 'navigate') { + return false; + } // If this is a URL that starts with /_, skip. + + if (url.pathname.startsWith('/_')) { + return false; + } // If this looks like a URL for a resource, because it contains // a file extension, skip. + + if (url.pathname.match(fileExtensionRegexp)) { + return false; + } // Return true to signal that we want to use the handler. + + return true; + }, + createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html') +); + +// An example runtime caching route for requests that aren't handled by the +// precache, in this case same-origin .png requests like those from in public/ +registerRoute( + // Add in any other file extensions or routing criteria as needed. + ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'), // Customize this strategy as needed, e.g., by changing to CacheFirst. + new StaleWhileRevalidate({ + cacheName: 'images', + plugins: [ + // Ensure that once this runtime cache reaches a maximum size the + // least-recently used images are removed. + new ExpirationPlugin({ maxEntries: 50 }), + ], + }) +); + +// This allows the web app to trigger skipWaiting via +// registration.waiting.postMessage({type: 'SKIP_WAITING'}) +self.addEventListener('message', (event) => { + if (event.data && event.data.type === 'SKIP_WAITING') { + self.skipWaiting(); + } +}); + +// Any other custom service worker logic can go here. diff --git a/TBSReact/ClientApp/src/serviceWorkerRegistration.js b/TBSReact/ClientApp/src/serviceWorkerRegistration.js new file mode 100644 index 000000000..2262ecdbf --- /dev/null +++ b/TBSReact/ClientApp/src/serviceWorkerRegistration.js @@ -0,0 +1,137 @@ +// This optional code is used to register a service worker. +// register() is not called by default. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on subsequent visits to a page, after all the +// existing tabs open on the page have been closed, since previously cached +// resources are updated in the background. + +// To learn more about the benefits of this model and instructions on how to +// opt-in, read https://cra.link/PWA + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.0/8 are considered localhost for IPv4. + window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) +); + +export function register(config) { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebook/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Let's check if a service worker still exists or not. + checkValidServiceWorker(swUrl, config); + + // Add some additional logging to localhost, pointing developers to the + // service worker/PWA documentation. + navigator.serviceWorker.ready.then(() => { + console.log( + 'This web app is being served cache-first by a service ' + + 'worker. To learn more, visit https://cra.link/PWA' + ); + }); + } else { + // Is not localhost. Just register service worker + registerValidSW(swUrl, config); + } + }); + } +} + +function registerValidSW(swUrl, config) { + navigator.serviceWorker + .register(swUrl) + .then((registration) => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + if (installingWorker == null) { + return; + } + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the updated precached content has been fetched, + // but the previous service worker will still serve the older + // content until all client tabs are closed. + console.log( + 'New content is available and will be used when all ' + + 'tabs for this page are closed. See https://cra.link/PWA.' + ); + + // Execute callback + if (config && config.onUpdate) { + config.onUpdate(registration); + } + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + + // Execute callback + if (config && config.onSuccess) { + config.onSuccess(registration); + } + } + } + }; + }; + }) + .catch((error) => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl, config) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl, { + headers: { 'Service-Worker': 'script' }, + }) + .then((response) => { + // Ensure service worker exists, and that we really are getting a JS file. + const contentType = response.headers.get('content-type'); + if ( + response.status === 404 || + (contentType != null && contentType.indexOf('javascript') === -1) + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then((registration) => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl, config); + } + }) + .catch(() => { + console.log('No internet connection found. App is running in offline mode.'); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready + .then((registration) => { + registration.unregister(); + }) + .catch((error) => { + console.error(error.message); + }); + } +} diff --git a/TBSReact/ClientApp/src/setupProxy.js b/TBSReact/ClientApp/src/setupProxy.js new file mode 100644 index 000000000..2bf4e2a20 --- /dev/null +++ b/TBSReact/ClientApp/src/setupProxy.js @@ -0,0 +1,18 @@ +const createProxyMiddleware = require('http-proxy-middleware'); +const { env } = require('process'); + +const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` : + env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:57848'; + +const context = [ + "/weatherforecast", +]; + +module.exports = function(app) { + const appProxy = createProxyMiddleware(context, { + target: target, + secure: false + }); + + app.use(appProxy); +}; diff --git a/TBSReact/Controllers/WeatherForecastController.cs b/TBSReact/Controllers/WeatherForecastController.cs new file mode 100644 index 000000000..2f94ac5ad --- /dev/null +++ b/TBSReact/Controllers/WeatherForecastController.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Mvc; + +namespace TBSReact.Controllers; + +[ApiController] +[Route("[controller]")] +public class WeatherForecastController : ControllerBase +{ + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateTime.Now.AddDays(index), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } +} diff --git a/TBSReact/Pages/Error.cshtml b/TBSReact/Pages/Error.cshtml new file mode 100644 index 000000000..6f92b9565 --- /dev/null +++ b/TBSReact/Pages/Error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to the Development environment displays detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/TBSReact/Pages/Error.cshtml.cs b/TBSReact/Pages/Error.cshtml.cs new file mode 100644 index 000000000..9e6a45cbf --- /dev/null +++ b/TBSReact/Pages/Error.cshtml.cs @@ -0,0 +1,25 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace TBSReact.Pages; + +[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] +public class ErrorModel : PageModel +{ + private readonly ILogger _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } +} diff --git a/TBSReact/Pages/_ViewImports.cshtml b/TBSReact/Pages/_ViewImports.cshtml new file mode 100644 index 000000000..b13cbe54f --- /dev/null +++ b/TBSReact/Pages/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using TBSReact +@namespace TBSReact.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/TBSReact/Program.cs b/TBSReact/Program.cs new file mode 100644 index 000000000..a49441a66 --- /dev/null +++ b/TBSReact/Program.cs @@ -0,0 +1,26 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllersWithViews(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); +app.UseRouting(); + +app.MapControllerRoute( + name: "default", + pattern: "{controller}/{action=Index}/{id?}"); + +app.MapFallbackToFile("index.html"); ; + +app.Run(); \ No newline at end of file diff --git a/TBSReact/Properties/launchSettings.json b/TBSReact/Properties/launchSettings.json new file mode 100644 index 000000000..5f57b501b --- /dev/null +++ b/TBSReact/Properties/launchSettings.json @@ -0,0 +1,29 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:57848", + "sslPort": 44342 + } + }, + "profiles": { + "TBSReact": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:7216;http://localhost:5282", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + } + } + } +} diff --git a/TBSReact/TBSReact.csproj b/TBSReact/TBSReact.csproj new file mode 100644 index 000000000..7039724af --- /dev/null +++ b/TBSReact/TBSReact.csproj @@ -0,0 +1,52 @@ + + + + net6.0 + enable + true + Latest + false + ClientApp\ + $(DefaultItemExcludes);$(SpaRoot)node_modules\** + https://localhost:44465 + npm start + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wwwroot\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + true + + + + diff --git a/TBSReact/WeatherForecast.cs b/TBSReact/WeatherForecast.cs new file mode 100644 index 000000000..d5074d367 --- /dev/null +++ b/TBSReact/WeatherForecast.cs @@ -0,0 +1,12 @@ +namespace TBSReact; + +public class WeatherForecast +{ + public DateTime Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } +} diff --git a/TBSReact/appsettings.Development.json b/TBSReact/appsettings.Development.json new file mode 100644 index 000000000..84308c97f --- /dev/null +++ b/TBSReact/appsettings.Development.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.AspNetCore.SpaProxy": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/TBSReact/appsettings.json b/TBSReact/appsettings.json new file mode 100644 index 000000000..ad75fee41 --- /dev/null +++ b/TBSReact/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, +"AllowedHosts": "*" +} diff --git a/TravBotSharp.sln b/TravBotSharp.sln index f09bb3321..66d86fb4b 100644 --- a/TravBotSharp.sln +++ b/TravBotSharp.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28917.181 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31912.275 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TbsWinForms", "TravBotSharp\TbsWinForms.csproj", "{D0B75C28-A48F-4C0E-AD41-99A8EA28496D}" EndProject @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TbsCore", "TbsCore\TbsCore. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TbsCoreTest", "TbsCoreTest\TbsCoreTest.csproj", "{BD027CDE-12E3-4548-8B32-3EEF83B73646}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TBSReact", "TBSReact\TBSReact.csproj", "{7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +57,18 @@ Global {BD027CDE-12E3-4548-8B32-3EEF83B73646}.Release|x64.Build.0 = Release|Any CPU {BD027CDE-12E3-4548-8B32-3EEF83B73646}.Release|x86.ActiveCfg = Release|Any CPU {BD027CDE-12E3-4548-8B32-3EEF83B73646}.Release|x86.Build.0 = Release|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|x64.ActiveCfg = Debug|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|x64.Build.0 = Debug|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|x86.ActiveCfg = Debug|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|x86.Build.0 = Debug|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|Any CPU.Build.0 = Release|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|x64.ActiveCfg = Release|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|x64.Build.0 = Release|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|x86.ActiveCfg = Release|Any CPU + {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 8b600233f90a88ddc5a639948fd46a9bad002713 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Wed, 1 Dec 2021 02:27:10 +0700 Subject: [PATCH 03/69] add account part --- .editorconfig | 4 + TBSReact/ClientApp/package-lock.json | 445 ++++++++++++++++++ TBSReact/ClientApp/package.json | 7 + TBSReact/ClientApp/src/App.js | 32 +- TBSReact/ClientApp/src/components/Layout.js | 25 +- TBSReact/ClientApp/src/components/NavMenu.js | 60 +-- .../src/components/sidebar/AccountRow.js | 17 + .../src/components/sidebar/AccountTable.js | 44 ++ .../src/components/sidebar/Modal/AccessRow.js | 18 + .../components/sidebar/Modal/AccountModal.js | 157 ++++++ .../src/components/sidebar/SideBar.js | 44 ++ TBSReact/Controllers/AccountController.cs | 92 ++++ .../Controllers/WeatherForecastController.cs | 2 +- TBSReact/Models/Access.cs | 9 + TBSReact/Models/Account.cs | 11 + TBSReact/Models/Proxy.cs | 11 + TBSReact/Pages/Error.cshtml.cs | 2 +- TBSReact/Pages/_ViewImports.cshtml | 4 +- TBSReact/Program.cs | 6 +- TBSReact/Singleton/AccountManager.cs | 87 ++++ TBSReact/TBSReact.csproj | 4 + TBSReact/WeatherForecast.cs | 2 +- TBSReact/libman.json | 5 + TravBotSharp.sln | 5 + TravBotSharp/TbsWinForms.csproj | 3 + 25 files changed, 1013 insertions(+), 83 deletions(-) create mode 100644 .editorconfig create mode 100644 TBSReact/ClientApp/src/components/sidebar/AccountRow.js create mode 100644 TBSReact/ClientApp/src/components/sidebar/AccountTable.js create mode 100644 TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js create mode 100644 TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js create mode 100644 TBSReact/ClientApp/src/components/sidebar/SideBar.js create mode 100644 TBSReact/Controllers/AccountController.cs create mode 100644 TBSReact/Models/Access.cs create mode 100644 TBSReact/Models/Account.cs create mode 100644 TBSReact/Models/Proxy.cs create mode 100644 TBSReact/Singleton/AccountManager.cs create mode 100644 TBSReact/libman.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..8d2a1fcea --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# CS8618: Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. +dotnet_diagnostic.CS8618.severity = none diff --git a/TBSReact/ClientApp/package-lock.json b/TBSReact/ClientApp/package-lock.json index f00559ed7..ffab142f3 100644 --- a/TBSReact/ClientApp/package-lock.json +++ b/TBSReact/ClientApp/package-lock.json @@ -1186,6 +1186,120 @@ "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-10.1.0.tgz", "integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==" }, + "@emotion/babel-plugin": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.3.0.tgz", + "integrity": "sha512-UZKwBV2rADuhRp+ZOGgNWg2eYgbzKzQXfQPtJbu/PLy8onurxlNCLvxMQEvlr1/GudguPI5IU9qIY1+2z1M5bA==", + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/runtime": "^7.13.10", + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.5", + "@emotion/serialize": "^1.0.2", + "babel-plugin-macros": "^2.6.1", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "^4.0.3" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + } + } + }, + "@emotion/cache": { + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.6.0.tgz", + "integrity": "sha512-ElbsWY1KMwEowkv42vGo0UPuLgtPYfIs9BxxVrmvsaJVvktknsHYYlx5NQ5g6zLDcOTyamlDc7FkRg2TAcQDKQ==", + "requires": { + "@emotion/memoize": "^0.7.4", + "@emotion/sheet": "^1.1.0", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "stylis": "^4.0.10" + } + }, + "@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" + }, + "@emotion/is-prop-valid": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.1.1.tgz", + "integrity": "sha512-bW1Tos67CZkOURLc0OalnfxtSXQJMrAMV0jZTVGJUPSOd4qgjF3+tTD5CwJM13PHA8cltGW1WGbbvV9NpvUZPw==", + "requires": { + "@emotion/memoize": "^0.7.4" + } + }, + "@emotion/memoize": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", + "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==" + }, + "@emotion/react": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.7.0.tgz", + "integrity": "sha512-WL93hf9+/2s3cA1JVJlz8+Uy6p6QWukqQFOm2OZO5ki51hfucHMOmbSjiyC3t2Y4RI8XUmBoepoc/24ny/VBbA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/cache": "^11.6.0", + "@emotion/serialize": "^1.0.2", + "@emotion/sheet": "^1.1.0", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "hoist-non-react-statics": "^3.3.1" + } + }, + "@emotion/serialize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.2.tgz", + "integrity": "sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==", + "requires": { + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.4", + "@emotion/unitless": "^0.7.5", + "@emotion/utils": "^1.0.0", + "csstype": "^3.0.2" + } + }, + "@emotion/sheet": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.1.0.tgz", + "integrity": "sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==" + }, + "@emotion/styled": { + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.6.0.tgz", + "integrity": "sha512-mxVtVyIOTmCAkFbwIp+nCjTXJNgcz4VWkOYQro87jE2QBTydnkiYusMrRGFtzuruiGK4dDaNORk4gH049iiQuw==", + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/babel-plugin": "^11.3.0", + "@emotion/is-prop-valid": "^1.1.1", + "@emotion/serialize": "^1.0.2", + "@emotion/utils": "^1.0.0" + } + }, + "@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + }, + "@emotion/utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.0.0.tgz", + "integrity": "sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA==" + }, + "@emotion/weak-memoize": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", + "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" + }, "@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", @@ -1960,6 +2074,204 @@ } } }, + "@mui/base": { + "version": "5.0.0-alpha.58", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.58.tgz", + "integrity": "sha512-YZorCbbzkokQZUnj+sdjUWIe+jaesuSVpKgwWS2mWdE50v1Ti/qMmevIrOT1lvFAilpj80Bkcg4KtlGWBJ6utQ==", + "requires": { + "@babel/runtime": "^7.16.3", + "@emotion/is-prop-valid": "^1.1.1", + "@mui/utils": "^5.2.2", + "@popperjs/core": "^2.4.4", + "clsx": "^1.1.1", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, + "@mui/icons-material": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.2.0.tgz", + "integrity": "sha512-NvyrVaGKpP4R1yFw8BCnE0QcsQ67RtpgxPr4FtH8q60MDYPuPVczLOn5Ash5CFavoDWur/NfM/4DpT54yf3InA==", + "requires": { + "@babel/runtime": "^7.16.3" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@mui/material": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.2.2.tgz", + "integrity": "sha512-vqmZq+v59CT4V84WcvYkYldnjC6uRddYx0TJqgl2h5YRbbPYCGVVywVvg9cBwxy4j5xI3F2WH6z7WGkHqkJIQA==", + "requires": { + "@babel/runtime": "^7.16.3", + "@mui/base": "5.0.0-alpha.58", + "@mui/system": "^5.2.2", + "@mui/types": "^7.1.0", + "@mui/utils": "^5.2.2", + "@types/react-transition-group": "^4.4.4", + "clsx": "^1.1.1", + "csstype": "^3.0.10", + "hoist-non-react-statics": "^3.3.2", + "prop-types": "^15.7.2", + "react-is": "^17.0.2", + "react-transition-group": "^4.4.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "requires": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + }, + "react-transition-group": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", + "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", + "requires": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + } + } + } + }, + "@mui/private-theming": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.2.2.tgz", + "integrity": "sha512-BfTjZ5ao6KY4Sg11lgaVuQ9uUq8unaM2u9/RKDD12If0B2Vp/AhRSe7i5OTd+wErmK2guTX0kPSraGZzwDEIVg==", + "requires": { + "@babel/runtime": "^7.16.3", + "@mui/utils": "^5.2.2", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@mui/styled-engine": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.2.0.tgz", + "integrity": "sha512-NZ4pWYQcM5wreUfiXRd7IMFRF+Nq1vMzsIdXtXNjgctJTKHunrofasoBqv+cqevO+hqT75ezSbNHyaXzOXp6Mg==", + "requires": { + "@babel/runtime": "^7.16.3", + "@emotion/cache": "^11.6.0", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@mui/system": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.2.2.tgz", + "integrity": "sha512-221tPOcZC8A89GOt6LH9YPTj2Iqf880iqrHd7AHT/HznBKOlLrnWD83pCuLPyX2jeFz4OzhvmGbdt5a74UEgaA==", + "requires": { + "@babel/runtime": "^7.16.3", + "@mui/private-theming": "^5.2.2", + "@mui/styled-engine": "^5.2.0", + "@mui/types": "^7.1.0", + "@mui/utils": "^5.2.2", + "clsx": "^1.1.1", + "csstype": "^3.0.10", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@mui/types": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.1.0.tgz", + "integrity": "sha512-Hh7ALdq/GjfIwLvqH3XftuY3bcKhupktTm+S6qRIDGOtPtRuq2L21VWzOK4p7kblirK0XgGVH5BLwa6u8z/6QQ==" + }, + "@mui/utils": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.2.2.tgz", + "integrity": "sha512-0u9ImUfpCfTxmvQTfUzTSS+jKWMX15MBZeZCRQZ0f7o9Yi8BlrLj33lMx0mFBkUSYdTXnqL4yfOn7RBzV01HMQ==", + "requires": { + "@babel/runtime": "^7.16.3", + "@types/prop-types": "^15.7.4", + "@types/react-is": "^16.7.1 || ^17.0.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2027,6 +2339,11 @@ } } }, + "@popperjs/core": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.0.tgz", + "integrity": "sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ==" + }, "@rollup/plugin-node-resolve": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", @@ -2328,11 +2645,42 @@ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.2.tgz", "integrity": "sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog==" }, + "@types/prop-types": { + "version": "15.7.4", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", + "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" + }, "@types/q": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==" }, + "@types/react": { + "version": "17.0.37", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", + "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/react-is": { + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-17.0.3.tgz", + "integrity": "sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw==", + "requires": { + "@types/react": "*" + } + }, + "@types/react-transition-group": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", + "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", + "requires": { + "@types/react": "*" + } + }, "@types/resolve": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", @@ -2341,6 +2689,11 @@ "@types/node": "*" } }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, "@types/source-list-map": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", @@ -4137,6 +4490,11 @@ "wrap-ansi": "^6.2.0" } }, + "clsx": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", + "integrity": "sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==" + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -4788,6 +5146,11 @@ } } }, + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + }, "cyclist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", @@ -5660,6 +6023,11 @@ "confusing-browser-globals": "^1.0.10" } }, + "eslint-config-standard": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", + "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==" + }, "eslint-import-resolver-node": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", @@ -5698,6 +6066,30 @@ } } }, + "eslint-plugin-es": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "requires": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } + } + }, "eslint-plugin-flowtype": { "version": "5.9.0", "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.9.0.tgz", @@ -5778,6 +6170,44 @@ "language-tags": "^1.0.5" } }, + "eslint-plugin-node": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "requires": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + }, + "ignore": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "eslint-plugin-react": { "version": "7.24.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.24.0.tgz", @@ -6502,6 +6932,11 @@ } } }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -12606,6 +13041,11 @@ } } }, + "react-table": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/react-table/-/react-table-7.7.0.tgz", + "integrity": "sha512-jBlj70iBwOTvvImsU9t01LjFjy4sXEtclBovl3mTiqjz23Reu0DKnRza4zlLtOPACx6j2/7MrQIthIK1Wi+LIA==" + }, "react-transition-group": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", @@ -14306,6 +14746,11 @@ } } }, + "stylis": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz", + "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/TBSReact/ClientApp/package.json b/TBSReact/ClientApp/package.json index 24aaf5695..8e89cf387 100644 --- a/TBSReact/ClientApp/package.json +++ b/TBSReact/ClientApp/package.json @@ -3,7 +3,13 @@ "version": "0.1.0", "private": true, "dependencies": { + "@emotion/react": "^11.7.0", + "@emotion/styled": "^11.6.0", + "@mui/icons-material": "^5.2.0", + "@mui/material": "^5.2.2", "bootstrap": "^5.1.0", + "eslint-config-standard": "^16.0.3", + "eslint-plugin-node": "^11.1.0", "http-proxy-middleware": "^0.19.1", "jquery": "^3.5.1", "merge": "^2.1.1", @@ -13,6 +19,7 @@ "react-router-bootstrap": "^0.25.0", "react-router-dom": "^5.2.0", "react-scripts": "^4.0.3", + "react-table": "^7.7.0", "reactstrap": "^8.9.0", "rimraf": "^2.6.2", "web-vitals": "^0.2.4", diff --git a/TBSReact/ClientApp/src/App.js b/TBSReact/ClientApp/src/App.js index a3e347f1f..2d811524c 100644 --- a/TBSReact/ClientApp/src/App.js +++ b/TBSReact/ClientApp/src/App.js @@ -1,22 +1,18 @@ -import React, { Component } from 'react'; -import { Route } from 'react-router'; -import { Layout } from './components/Layout'; -import { Home } from './components/Home'; -import { FetchData } from './components/FetchData'; -import { Counter } from './components/Counter'; - +import React, { useState, useEffect } from 'react'; +import Layout from './components/Layout'; import './custom.css' -export default class App extends Component { - static displayName = App.name; +const App = () => { + const [selected, setSelected] = useState(0); + useEffect(() => { + console.log(selected); + }, [selected]) + + return ( + + + ); - render () { - return ( - - - - - - ); - } } + +export default App; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/components/Layout.js b/TBSReact/ClientApp/src/components/Layout.js index 6d4e876dc..4ced296ad 100644 --- a/TBSReact/ClientApp/src/components/Layout.js +++ b/TBSReact/ClientApp/src/components/Layout.js @@ -1,18 +1,13 @@ -import React, { Component } from 'react'; -import { Container } from 'reactstrap'; -import { NavMenu } from './NavMenu'; +import React from 'react'; +import NavMenu from './NavMenu'; -export class Layout extends Component { - static displayName = Layout.name; +const Layout = ({ selected, setSelected }) => { + return ( + <> + + + ); - render () { - return ( -
- - - {this.props.children} - -
- ); - } } + +export default Layout; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/components/NavMenu.js b/TBSReact/ClientApp/src/components/NavMenu.js index 8d8ae6ad3..616612bca 100644 --- a/TBSReact/ClientApp/src/components/NavMenu.js +++ b/TBSReact/ClientApp/src/components/NavMenu.js @@ -1,49 +1,21 @@ -import React, { Component } from 'react'; -import { Collapse, Container, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap'; +import React from 'react'; +import { Container, Navbar, NavbarBrand} from 'reactstrap'; import { Link } from 'react-router-dom'; import './NavMenu.css'; +import SideBar from './sidebar/SideBar'; -export class NavMenu extends Component { - static displayName = NavMenu.name; +const NavMenu = ({ selected, setSelected }) => { - constructor (props) { - super(props); - - this.toggleNavbar = this.toggleNavbar.bind(this); - this.state = { - collapsed: true - }; - } - - toggleNavbar () { - this.setState({ - collapsed: !this.state.collapsed - }); - } - - render () { - return ( -
- - - TBSReact - - -
    - - Home - - - Counter - - - Fetch data - -
-
-
-
-
- ); - } + return ( +
+ + + + TBSReact + + +
+ ); } + +export default NavMenu; diff --git a/TBSReact/ClientApp/src/components/sidebar/AccountRow.js b/TBSReact/ClientApp/src/components/sidebar/AccountRow.js new file mode 100644 index 000000000..a4d862ca2 --- /dev/null +++ b/TBSReact/ClientApp/src/components/sidebar/AccountRow.js @@ -0,0 +1,17 @@ +import { TableCell, TableRow } from "@mui/material"; + +const AccountRow = ({acc, handler, selected}) => { + return ( + <> + handler(acc)} + selected = {acc.Id === selected}> + {acc.Username} + {acc.ServerUrl} + + + ) +} + +export default AccountRow; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/components/sidebar/AccountTable.js b/TBSReact/ClientApp/src/components/sidebar/AccountTable.js new file mode 100644 index 000000000..77668cd6d --- /dev/null +++ b/TBSReact/ClientApp/src/components/sidebar/AccountTable.js @@ -0,0 +1,44 @@ +import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'; +import React from 'react' +import AccountRow from './AccountRow' + +const AccountTable = ({ selected, setSelected }) => { + const onClick = (acc) => { + setSelected(acc.Id) + }; + const accs = [ + { Id: 0, Username: "alsdao", ServerUrl: "ts50.x5.america.travian.com" }, + { Id: 1, Username: "alo", ServerUrl: "sadasd" }, + { Id: 2, Username: "ao", ServerUrl: "sadasd" }, + { Id: 3, Username: "a2lo", ServerUrl: "sadasd" }, + { Id: 4, Username: "al3o", ServerUrl: "sadasd" }, + { Id: 5, Username: "al4o", ServerUrl: "sadasd" }, + { Id: 6, Username: "al5o", ServerUrl: "sadasd" }, + ] + + const accsNode = accs.map((acc) => ( + ) + ) + + return ( + <> + + + + + Username + Server url + + + + {accsNode} + +
+
+ + ) +} + +export default AccountTable; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js b/TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js new file mode 100644 index 000000000..eef426185 --- /dev/null +++ b/TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js @@ -0,0 +1,18 @@ +import { TableCell, TableRow } from "@mui/material"; + +const AccountRow = ({access, handler, selected}) => { + return ( + <> + handler(access)} + selected = {access.id === selected}> + {[access.proxy.ip, ':', access.proxy.port].join()} + {access.proxy.username} + {access.proxy.OK === true ? "✔" : "❌"} + + + ) +} + +export default AccountRow; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js new file mode 100644 index 000000000..e2a9e3cff --- /dev/null +++ b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -0,0 +1,157 @@ +import { useEffect, useState } from 'react'; +import { Modal, Button, Box, Typography, Input, Table, TableHead, TableCell } from '@mui/material'; +import AccessRow from './AccessRow'; + +const style = { + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + bgcolor: 'background.paper', + border: '2px solid #000', + boxShadow: 24, + p: 4, +}; + +const AccountModal = ({ editMode = false, accID = -1 }) => { + const [selected, setSelected] = useState(0); + const [open, setOpen] = useState(false); + const [accesses, setAccesses] = useState([]); + + //Form + const [username, setUsername] = useState(""); + const [server, setServer] = useState(""); + const [password, setPassword] = useState(""); + const [proxyIP, setProxyIP] = useState(0); + const [proxyPort, setProxyPort] = useState(""); + const [proxyUsername, setProxyUsername] = useState(""); + const [proxyPassword, setProxyPassword] = useState(""); + + + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + const onClickTable = (access) => { + setSelected(access.id) + }; + const onClickAdd = () => { + const newAccess = { id: accesses.length, password: password, proxy: { ip: proxyIP, port: proxyPort, username: proxyUsername, password: proxyPassword, ok: false } } + setAccesses([...accesses, newAccess]) + console.log(newAccess) + update(); + } + const onClickEdit = () => { + const newAccess = { id: selected, password: password, proxy: { ip: proxyIP, port: proxyPort, username: proxyUsername, password: proxyPassword, ok: false } } + setAccesses( (old) => {old[selected] = newAccess; return old}) + console.log(newAccess) + update(); + + } + const onClickDelete = () => { + console.log("delete", selected); + update(); + + } + useEffect(() => { + console.log("access", selected) + }, [selected]); + + let accessNode = null; + + const update = () => { + accessNode = accesses.map((access) => ( + ) + ); + } + + + + return ( + <> + + + + + {editMode === true ? "Add account" : "Edit account"} + + + + + + + + + + + + + + + + + + + + + + + + +
+ Username + + setUsername(e.target.value)} /> + + Server + + setServer(e.target.value)} /> +
+ Password + + setPassword(e.target.value)} /> +
+ Proxy IP + + setProxyIP(e.target.value)} /> + + Proxy username + + setProxyUsername(e.target.value)} /> +
+ Proxy Port + + setProxyPort(e.target.value)} /> + + Proxy password + + setProxyPassword(e.target.value)} /> +
+ + + + +
+ + + + + +
+ + + Proxy + Proxy username + OK + + {accessNode} +
+
+
+ + ) +} + +export default AccountModal; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/components/sidebar/SideBar.js b/TBSReact/ClientApp/src/components/sidebar/SideBar.js new file mode 100644 index 000000000..a99c796dc --- /dev/null +++ b/TBSReact/ClientApp/src/components/sidebar/SideBar.js @@ -0,0 +1,44 @@ +import React from "react" +import { Drawer, IconButton } from "@mui/material" +import MenuIcon from '@mui/icons-material/Menu'; +import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; + +import AccountTable from "./AccountTable" +import AccountModal from "./Modal/AccountModal" +const SideBar = ({ selected, setSelected }) => { + const [open, setOpen] = React.useState(false); + const handleDrawerOpen = () => { + setOpen(true); + }; + + const handleDrawerClose = () => { + setOpen(false); + }; + + + return ( + <> + + + + + + + + + + + + + ) +} +export default SideBar; \ No newline at end of file diff --git a/TBSReact/Controllers/AccountController.cs b/TBSReact/Controllers/AccountController.cs new file mode 100644 index 000000000..7af666c3d --- /dev/null +++ b/TBSReact/Controllers/AccountController.cs @@ -0,0 +1,92 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; +using TbsReact.Singleton; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("[accounts]")] + public class AccountController : ControllerBase + { + // GET: Account + public ActionResult> GetAccounts() + { + var AccountInfoList = new List(); + for (int i = 0; i < AccountManager.Instance.Accounts.Count; i++) + { + AccountInfoList.Add(AccountManager.GetAccount(i, AccountManager.Instance.Accounts[i])); + } + + return AccountInfoList; + } + + // GET: Account/Details/5 + public ActionResult Details(int id) + { + return View(); + } + + // GET: Account/Create + public ActionResult Create() + { + return View(); + } + + // POST: Account/Create + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Create(IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + + // GET: Account/Edit/5 + public ActionResult Edit(int id) + { + return View(); + } + + // POST: Account/Edit/5 + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Edit(int id, IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + + // GET: Account/Delete/5 + public ActionResult Delete(int id) + { + return View(); + } + + // POST: Account/Delete/5 + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Delete(int id, IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + } +} \ No newline at end of file diff --git a/TBSReact/Controllers/WeatherForecastController.cs b/TBSReact/Controllers/WeatherForecastController.cs index 2f94ac5ad..52e413cd8 100644 --- a/TBSReact/Controllers/WeatherForecastController.cs +++ b/TBSReact/Controllers/WeatherForecastController.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; -namespace TBSReact.Controllers; +namespace TbsReact.Controllers; [ApiController] [Route("[controller]")] diff --git a/TBSReact/Models/Access.cs b/TBSReact/Models/Access.cs new file mode 100644 index 000000000..5170d6e50 --- /dev/null +++ b/TBSReact/Models/Access.cs @@ -0,0 +1,9 @@ +namespace TbsReact.Models +{ + public class Access + { + public int Id { get; set; } + public string Password { get; set; } + public Proxy Proxy { get; set; } + } +} \ No newline at end of file diff --git a/TBSReact/Models/Account.cs b/TBSReact/Models/Account.cs new file mode 100644 index 000000000..9b4e2dfc5 --- /dev/null +++ b/TBSReact/Models/Account.cs @@ -0,0 +1,11 @@ +namespace TbsReact.Models +{ + public class Account + { + public int Id { get; set; } + public string Name { get; set; } + public string ServerUrl { get; set; } + + public List Accesses { get; set; } + } +} \ No newline at end of file diff --git a/TBSReact/Models/Proxy.cs b/TBSReact/Models/Proxy.cs new file mode 100644 index 000000000..ac9ca7c87 --- /dev/null +++ b/TBSReact/Models/Proxy.cs @@ -0,0 +1,11 @@ +namespace TbsReact.Models +{ + public class Proxy + { + public string Ip { get; set; } + public int Port { get; set; } + public string? Username { get; set; } + public string? Password { get; set; } + public bool OK { get; set; } + } +} \ No newline at end of file diff --git a/TBSReact/Pages/Error.cshtml.cs b/TBSReact/Pages/Error.cshtml.cs index 9e6a45cbf..e18030e6f 100644 --- a/TBSReact/Pages/Error.cshtml.cs +++ b/TBSReact/Pages/Error.cshtml.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace TBSReact.Pages; +namespace TbsReact.Pages; [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel diff --git a/TBSReact/Pages/_ViewImports.cshtml b/TBSReact/Pages/_ViewImports.cshtml index b13cbe54f..7f96d899f 100644 --- a/TBSReact/Pages/_ViewImports.cshtml +++ b/TBSReact/Pages/_ViewImports.cshtml @@ -1,3 +1,3 @@ -@using TBSReact -@namespace TBSReact.Pages +@using TbsReact +@namespace TbsReact.Pages @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/TBSReact/Program.cs b/TBSReact/Program.cs index a49441a66..7140f3a6f 100644 --- a/TBSReact/Program.cs +++ b/TBSReact/Program.cs @@ -1,8 +1,12 @@ +using TbsReact.Singleton; + var builder = WebApplication.CreateBuilder(args); // Add services to the container. -builder.Services.AddControllersWithViews(); +builder.Services.AddControllers(); +builder.Services.AddSingleton(AccountManager.Instance); +AccountManager.test(); var app = builder.Build(); diff --git a/TBSReact/Singleton/AccountManager.cs b/TBSReact/Singleton/AccountManager.cs new file mode 100644 index 000000000..89dda05d5 --- /dev/null +++ b/TBSReact/Singleton/AccountManager.cs @@ -0,0 +1,87 @@ +using TbsCore.Database; +using TbsCore.Helpers; + +using TbsReact.Models; + +namespace TbsReact.Singleton + +{ + public sealed class AccountManager + { + private static readonly AccountManager instance = new(); + + private List accounts = new(); + + public List Accounts + { + get { return accounts; } + set { accounts = value; } + } + + static AccountManager() + { + } + + private AccountManager() + { + LoadAccounts(); + } + + public static AccountManager Instance + { + get + { + return instance; + } + } + + public static Account GetAccount(int index, TbsCore.Models.AccModels.Account acc) + { + var accesses = new List(); + + for (int i = 0; i < acc.Access.AllAccess.Count; i++) + { + var access = acc.Access.AllAccess[i]; + accesses.Add(new Access + { + Id = i, + Password = access.Password, + Proxy = new Proxy + { + Ip = access.Proxy, + Port = access.ProxyPort, + Username = access.ProxyUsername, + Password = access.Password, + OK = access.Ok + } + }); + } + return new Account + { + Id = index, + Name = acc.AccInfo.Nickname, + ServerUrl = acc.AccInfo.ServerUrl, + Accesses = accesses + }; + } + + private void LoadAccounts() + { + // For migration purposes only! Remove after few versions + if (IoHelperCore.AccountsTxtExists() && !IoHelperCore.SQLiteExists()) + { + DbRepository.SyncAccountsTxt(); + File.Delete(IoHelperCore.AccountsPath); + } + + accounts = DbRepository.GetAccounts(); + + accounts.ForEach(x => ObjectHelper.FixAccObj(x, x)); + } + + public void SaveAccounts() + { + IoHelperCore.SaveAccounts(accounts, true); + } + } +} \ No newline at end of file diff --git a/TBSReact/TBSReact.csproj b/TBSReact/TBSReact.csproj index 7039724af..b92ba4418 100644 --- a/TBSReact/TBSReact.csproj +++ b/TBSReact/TBSReact.csproj @@ -24,6 +24,10 @@ + + + + diff --git a/TBSReact/WeatherForecast.cs b/TBSReact/WeatherForecast.cs index d5074d367..e63aac348 100644 --- a/TBSReact/WeatherForecast.cs +++ b/TBSReact/WeatherForecast.cs @@ -1,4 +1,4 @@ -namespace TBSReact; +namespace TbsReact; public class WeatherForecast { diff --git a/TBSReact/libman.json b/TBSReact/libman.json new file mode 100644 index 000000000..ceee2710f --- /dev/null +++ b/TBSReact/libman.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "defaultProvider": "cdnjs", + "libraries": [] +} \ No newline at end of file diff --git a/TravBotSharp.sln b/TravBotSharp.sln index 66d86fb4b..da7e60258 100644 --- a/TravBotSharp.sln +++ b/TravBotSharp.sln @@ -11,6 +11,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TbsCoreTest", "TbsCoreTest\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TBSReact", "TBSReact\TBSReact.csproj", "{7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A387655F-C99A-4EA2-ADD7-C6D130F0D669}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/TravBotSharp/TbsWinForms.csproj b/TravBotSharp/TbsWinForms.csproj index 59b5a5560..150b4cbcc 100644 --- a/TravBotSharp/TbsWinForms.csproj +++ b/TravBotSharp/TbsWinForms.csproj @@ -674,6 +674,9 @@ VillagesUc.cs + + .editorconfig + From 421929ecc4b6e2e64c2e6e4d4fef231c93110b81 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Wed, 1 Dec 2021 21:24:24 +0700 Subject: [PATCH 04/69] update template --- TBSReact/ClientApp/README.md | 2 +- TBSReact/Controllers/AccountController.cs | 106 +- TBSReact/Models/Account.cs | 4 +- TBSReact/Models/Proxy.cs | 4 +- TBSReact/Pages/Error.cshtml.cs | 36 +- TBSReact/Program.cs | 52 +- TBSReact/Properties/launchSettings.json | 20 +- TBSReact/Singleton/AccountManager.cs | 4 +- TBSReact/TBSReact.csproj | 13 +- TBSReact/appsettings.Development.json | 1 - .../ClientApp/src/registerServiceWorker.js | 108 + TbsReact/Extension/AccountExtension.cs | 30 + TbsReact/Startup.cs | 70 + TbsReact_/.gitignore | 232 + TbsReact_/ClientApp/.env | 1 + .../ClientApp/.env.development | 0 TbsReact_/ClientApp/.gitignore | 21 + TbsReact_/ClientApp/README.md | 2228 ++ TbsReact_/ClientApp/aspnetcore-https.js | 33 + TbsReact_/ClientApp/aspnetcore-react.js | 55 + TbsReact_/ClientApp/package-lock.json | 17227 ++++++++++++++++ TbsReact_/ClientApp/package.json | 76 + TbsReact_/ClientApp/public/favicon.ico | Bin 0 -> 5430 bytes TbsReact_/ClientApp/public/index.html | 41 + TbsReact_/ClientApp/public/manifest.json | 15 + TbsReact_/ClientApp/src/App.js | 18 + TbsReact_/ClientApp/src/App.test.js | 13 + TbsReact_/ClientApp/src/components/Counter.js | 31 + .../ClientApp/src/components/FetchData.js | 59 + TbsReact_/ClientApp/src/components/Home.js | 26 + TbsReact_/ClientApp/src/components/Layout.js | 13 + .../ClientApp/src/components/NavMenu.css | 18 + TbsReact_/ClientApp/src/components/NavMenu.js | 21 + .../src/components/sidebar/AccountRow.js | 17 + .../src/components/sidebar/AccountTable.js | 44 + .../src/components/sidebar/Modal/AccessRow.js | 18 + .../components/sidebar/Modal/AccountModal.js | 157 + .../src/components/sidebar/SideBar.js | 44 + TbsReact_/ClientApp/src/custom.css | 14 + TbsReact_/ClientApp/src/index.js | 26 + TbsReact_/ClientApp/src/reportWebVitals.js | 13 + TbsReact_/ClientApp/src/service-worker.js | 72 + .../src/serviceWorkerRegistration.js | 137 + TbsReact_/ClientApp/src/setupProxy.js | 18 + TbsReact_/Controllers/AccountController.cs | 92 + .../Controllers/WeatherForecastController.cs | 0 TbsReact_/Models/Access.cs | 9 + TbsReact_/Models/Account.cs | 11 + TbsReact_/Models/Proxy.cs | 11 + TbsReact_/Pages/Error.cshtml | 26 + TbsReact_/Pages/Error.cshtml.cs | 25 + TbsReact_/Pages/_ViewImports.cshtml | 3 + TbsReact_/Program.cs | 29 + TbsReact_/Properties/launchSettings.json | 29 + TbsReact_/Singleton/AccountManager.cs | 87 + TbsReact_/TBSReact.csproj | 55 + {TBSReact => TbsReact_}/WeatherForecast.cs | 0 TbsReact_/appsettings.Development.json | 10 + TbsReact_/appsettings.json | 10 + {TBSReact => TbsReact_}/libman.json | 0 TravBotSharp.sln | 28 +- 61 files changed, 21432 insertions(+), 131 deletions(-) create mode 100644 TbsReact/ClientApp/src/registerServiceWorker.js create mode 100644 TbsReact/Extension/AccountExtension.cs create mode 100644 TbsReact/Startup.cs create mode 100644 TbsReact_/.gitignore create mode 100644 TbsReact_/ClientApp/.env rename {TBSReact => TbsReact_}/ClientApp/.env.development (100%) create mode 100644 TbsReact_/ClientApp/.gitignore create mode 100644 TbsReact_/ClientApp/README.md create mode 100644 TbsReact_/ClientApp/aspnetcore-https.js create mode 100644 TbsReact_/ClientApp/aspnetcore-react.js create mode 100644 TbsReact_/ClientApp/package-lock.json create mode 100644 TbsReact_/ClientApp/package.json create mode 100644 TbsReact_/ClientApp/public/favicon.ico create mode 100644 TbsReact_/ClientApp/public/index.html create mode 100644 TbsReact_/ClientApp/public/manifest.json create mode 100644 TbsReact_/ClientApp/src/App.js create mode 100644 TbsReact_/ClientApp/src/App.test.js create mode 100644 TbsReact_/ClientApp/src/components/Counter.js create mode 100644 TbsReact_/ClientApp/src/components/FetchData.js create mode 100644 TbsReact_/ClientApp/src/components/Home.js create mode 100644 TbsReact_/ClientApp/src/components/Layout.js create mode 100644 TbsReact_/ClientApp/src/components/NavMenu.css create mode 100644 TbsReact_/ClientApp/src/components/NavMenu.js create mode 100644 TbsReact_/ClientApp/src/components/sidebar/AccountRow.js create mode 100644 TbsReact_/ClientApp/src/components/sidebar/AccountTable.js create mode 100644 TbsReact_/ClientApp/src/components/sidebar/Modal/AccessRow.js create mode 100644 TbsReact_/ClientApp/src/components/sidebar/Modal/AccountModal.js create mode 100644 TbsReact_/ClientApp/src/components/sidebar/SideBar.js create mode 100644 TbsReact_/ClientApp/src/custom.css create mode 100644 TbsReact_/ClientApp/src/index.js create mode 100644 TbsReact_/ClientApp/src/reportWebVitals.js create mode 100644 TbsReact_/ClientApp/src/service-worker.js create mode 100644 TbsReact_/ClientApp/src/serviceWorkerRegistration.js create mode 100644 TbsReact_/ClientApp/src/setupProxy.js create mode 100644 TbsReact_/Controllers/AccountController.cs rename {TBSReact => TbsReact_}/Controllers/WeatherForecastController.cs (100%) create mode 100644 TbsReact_/Models/Access.cs create mode 100644 TbsReact_/Models/Account.cs create mode 100644 TbsReact_/Models/Proxy.cs create mode 100644 TbsReact_/Pages/Error.cshtml create mode 100644 TbsReact_/Pages/Error.cshtml.cs create mode 100644 TbsReact_/Pages/_ViewImports.cshtml create mode 100644 TbsReact_/Program.cs create mode 100644 TbsReact_/Properties/launchSettings.json create mode 100644 TbsReact_/Singleton/AccountManager.cs create mode 100644 TbsReact_/TBSReact.csproj rename {TBSReact => TbsReact_}/WeatherForecast.cs (100%) create mode 100644 TbsReact_/appsettings.Development.json create mode 100644 TbsReact_/appsettings.json rename {TBSReact => TbsReact_}/libman.json (100%) diff --git a/TBSReact/ClientApp/README.md b/TBSReact/ClientApp/README.md index 9a2c94454..5a608cbdc 100644 --- a/TBSReact/ClientApp/README.md +++ b/TBSReact/ClientApp/README.md @@ -1763,7 +1763,7 @@ npm install -g serve serve -s build ``` -The last command shown above will serve your static site on the port **5282**. Like many of [serve](https://github.com/zeit/serve)’s internal settings, the port can be adjusted using the `-p` or `--port` flags. +The last command shown above will serve your static site on the port **5000**. Like many of [serve](https://github.com/zeit/serve)’s internal settings, the port can be adjusted using the `-p` or `--port` flags. Run this command to get a full list of the options available: diff --git a/TBSReact/Controllers/AccountController.cs b/TBSReact/Controllers/AccountController.cs index 7af666c3d..84276b1be 100644 --- a/TBSReact/Controllers/AccountController.cs +++ b/TBSReact/Controllers/AccountController.cs @@ -1,17 +1,21 @@ using Microsoft.AspNetCore.Mvc; using TbsReact.Models; using TbsReact.Singleton; +using TbsReact.Extension; +using System.Collections.Generic; +using TbsCore.Database; namespace TbsReact.Controllers { [ApiController] - [Route("[accounts]")] + [Route("accounts")] public class AccountController : ControllerBase { - // GET: Account + [HttpGet] public ActionResult> GetAccounts() { var AccountInfoList = new List(); + for (int i = 0; i < AccountManager.Instance.Accounts.Count; i++) { AccountInfoList.Add(AccountManager.GetAccount(i, AccountManager.Instance.Accounts[i])); @@ -20,73 +24,75 @@ public ActionResult> GetAccounts() return AccountInfoList; } - // GET: Account/Details/5 - public ActionResult Details(int id) - { - return View(); - } - - // GET: Account/Create - public ActionResult Create() + [HttpGet("{index:int}")] + public ActionResult GetAccount(int index) { - return View(); - } - - // POST: Account/Create - [HttpPost] - [ValidateAntiForgeryToken] - public ActionResult Create(IFormCollection collection) - { - try - { - return RedirectToAction(nameof(Index)); - } - catch + if (index < 0 | index > AccountManager.Instance.Accounts.Count) { - return View(); + return NotFound(); } + return AccountManager.GetAccount(index, AccountManager.Instance.Accounts[index]); } - // GET: Account/Edit/5 - public ActionResult Edit(int id) + [HttpPost] + public ActionResult AddAccount([FromBody] Account data) { - return View(); + if (string.IsNullOrEmpty(data.Name) || + string.IsNullOrEmpty(data.ServerUrl)) return BadRequest(); + + var acc = data.GetAccount(); + DbRepository.SaveAccount(acc); + AccountManager.Instance.Accounts.Add(acc); + + return Ok(); } - // POST: Account/Edit/5 - [HttpPost] - [ValidateAntiForgeryToken] - public ActionResult Edit(int id, IFormCollection collection) + [HttpPut("{index:int}")] + public ActionResult EditAccount(int index, [FromBody] Account data) { - try + if (index < 0 || index > AccountManager.Instance.Accounts.Count - 1) { - return RedirectToAction(nameof(Index)); + return NotFound(); } - catch + + if (string.IsNullOrEmpty(data.Name) || + string.IsNullOrEmpty(data.ServerUrl)) return BadRequest(); + + var acc = AccountManager.Instance.Accounts[index]; + + acc.AccInfo.Nickname = data.Name; + acc.AccInfo.ServerUrl = data.ServerUrl; + + acc.Access.AllAccess.Clear(); + foreach (var access in data.Accesses) { - return View(); + acc.Access.AddNewAccess(new TbsCore.Models.Access.Access + { + Password = access.Password, + Proxy = access.Proxy.Ip, + ProxyPort = access.Proxy.Port, + ProxyUsername = access.Proxy.Username, + ProxyPassword = access.Proxy.Password, + }); } - } - // GET: Account/Delete/5 - public ActionResult Delete(int id) - { - return View(); + DbRepository.SaveAccount(acc); + + return Ok(); } - // POST: Account/Delete/5 - [HttpPost] - [ValidateAntiForgeryToken] - public ActionResult Delete(int id, IFormCollection collection) + [HttpDelete("{index:int}")] + public ActionResult DeleteAccount(int index) { - try - { - return RedirectToAction(nameof(Index)); - } - catch + if (index < 0 || index > AccountManager.Instance.Accounts.Count - 1) { - return View(); + return NotFound(); } + + DbRepository.RemoveAccount(AccountManager.Instance.Accounts[index]); + AccountManager.Instance.Accounts.RemoveAt(index); + + return Ok(); } } } \ No newline at end of file diff --git a/TBSReact/Models/Account.cs b/TBSReact/Models/Account.cs index 9b4e2dfc5..16c6f30a2 100644 --- a/TBSReact/Models/Account.cs +++ b/TBSReact/Models/Account.cs @@ -1,4 +1,6 @@ -namespace TbsReact.Models +using System.Collections.Generic; + +namespace TbsReact.Models { public class Account { diff --git a/TBSReact/Models/Proxy.cs b/TBSReact/Models/Proxy.cs index ac9ca7c87..4a1a49da4 100644 --- a/TBSReact/Models/Proxy.cs +++ b/TBSReact/Models/Proxy.cs @@ -4,8 +4,8 @@ public class Proxy { public string Ip { get; set; } public int Port { get; set; } - public string? Username { get; set; } - public string? Password { get; set; } + public string Username { get; set; } + public string Password { get; set; } public bool OK { get; set; } } } \ No newline at end of file diff --git a/TBSReact/Pages/Error.cshtml.cs b/TBSReact/Pages/Error.cshtml.cs index e18030e6f..a4e23bad8 100644 --- a/TBSReact/Pages/Error.cshtml.cs +++ b/TBSReact/Pages/Error.cshtml.cs @@ -1,25 +1,31 @@ -using System.Diagnostics; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; -namespace TbsReact.Pages; - -[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] -public class ErrorModel : PageModel +namespace TbsReact.Pages { - private readonly ILogger _logger; - - public ErrorModel(ILogger logger) + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public class ErrorModel : PageModel { - _logger = logger; - } + private readonly ILogger _logger; - public string? RequestId { get; set; } + public ErrorModel(ILogger logger) + { + _logger = logger; + } - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + public string RequestId { get; set; } - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } } } diff --git a/TBSReact/Program.cs b/TBSReact/Program.cs index 7140f3a6f..de50cee70 100644 --- a/TBSReact/Program.cs +++ b/TBSReact/Program.cs @@ -1,30 +1,26 @@ -using TbsReact.Singleton; - -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. - -builder.Services.AddControllers(); -builder.Services.AddSingleton(AccountManager.Instance); -AccountManager.test(); - -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (!app.Environment.IsDevelopment()) +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact { - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } } - -app.UseHttpsRedirection(); -app.UseStaticFiles(); -app.UseRouting(); - -app.MapControllerRoute( - name: "default", - pattern: "{controller}/{action=Index}/{id?}"); - -app.MapFallbackToFile("index.html"); ; - -app.Run(); \ No newline at end of file diff --git a/TBSReact/Properties/launchSettings.json b/TBSReact/Properties/launchSettings.json index 5f57b501b..3dbe16625 100644 --- a/TBSReact/Properties/launchSettings.json +++ b/TBSReact/Properties/launchSettings.json @@ -3,26 +3,24 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:57848", - "sslPort": 44342 + "applicationUrl": "http://localhost:3220", + "sslPort": 44303 } }, "profiles": { - "TBSReact": { - "commandName": "Project", + "IIS Express": { + "commandName": "IISExpress", "launchBrowser": true, - "applicationUrl": "https://localhost:7216;http://localhost:5282", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + "ASPNETCORE_ENVIRONMENT": "Development" } }, - "IIS Express": { - "commandName": "IISExpress", + "TbsReact": { + "commandName": "Project", "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + "ASPNETCORE_ENVIRONMENT": "Development" } } } diff --git a/TBSReact/Singleton/AccountManager.cs b/TBSReact/Singleton/AccountManager.cs index 89dda05d5..98ba1238e 100644 --- a/TBSReact/Singleton/AccountManager.cs +++ b/TBSReact/Singleton/AccountManager.cs @@ -1,4 +1,6 @@ -using TbsCore.Database; +using System.Collections.Generic; +using System.IO; +using TbsCore.Database; using TbsCore.Helpers; using TbsReact.Models; diff --git a/TBSReact/TBSReact.csproj b/TBSReact/TBSReact.csproj index b92ba4418..59e7e16e6 100644 --- a/TBSReact/TBSReact.csproj +++ b/TBSReact/TBSReact.csproj @@ -1,20 +1,18 @@ - net6.0 - enable + net5.0 true Latest false ClientApp\ $(DefaultItemExcludes);$(SpaRoot)node_modules\** - https://localhost:44465 - npm start - enable + true + Exe - + @@ -47,10 +45,11 @@ - wwwroot\%(RecursiveDir)%(FileName)%(Extension) + %(DistFiles.Identity) PreserveNewest true + diff --git a/TBSReact/appsettings.Development.json b/TBSReact/appsettings.Development.json index 84308c97f..8983e0fc1 100644 --- a/TBSReact/appsettings.Development.json +++ b/TBSReact/appsettings.Development.json @@ -3,7 +3,6 @@ "LogLevel": { "Default": "Information", "Microsoft": "Warning", - "Microsoft.AspNetCore.SpaProxy": "Information", "Microsoft.Hosting.Lifetime": "Information" } } diff --git a/TbsReact/ClientApp/src/registerServiceWorker.js b/TbsReact/ClientApp/src/registerServiceWorker.js new file mode 100644 index 000000000..10b0bafb3 --- /dev/null +++ b/TbsReact/ClientApp/src/registerServiceWorker.js @@ -0,0 +1,108 @@ +// In production, we register a service worker to serve assets from local cache. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on the "N+1" visit to a page, since previously +// cached resources are updated in the background. + +// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. +// This link also includes instructions on opting out of this behavior. + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.1/8 is considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +export default function register () { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Lets check if a service worker still exists or not. + checkValidServiceWorker(swUrl); + } else { + // Is not local host. Just register service worker + registerValidSW(swUrl); + } + }); + } +} + +function registerValidSW (swUrl) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the old content will have been purged and + // the fresh content will have been added to the cache. + // It's the perfect time to display a "New content is + // available; please refresh." message in your web app. + console.log('New content is available; please refresh.'); + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker (swUrl) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + if ( + response.status === 404 || + response.headers.get('content-type').indexOf('javascript') === -1 + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister () { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready.then(registration => { + registration.unregister(); + }); + } +} diff --git a/TbsReact/Extension/AccountExtension.cs b/TbsReact/Extension/AccountExtension.cs new file mode 100644 index 000000000..a7f64c1da --- /dev/null +++ b/TbsReact/Extension/AccountExtension.cs @@ -0,0 +1,30 @@ +using TbsReact.Models; + +namespace TbsReact.Extension +{ + public static class AccountExtension + { + public static TbsCore.Models.AccModels.Account GetAccount(this Account accout) + { + var acc = new TbsCore.Models.AccModels.Account(); + acc.Init(); + + acc.AccInfo.Nickname = accout.Name; + acc.AccInfo.ServerUrl = accout.ServerUrl; + + foreach (var access in accout.Accesses) + { + acc.Access.AllAccess.Add(new TbsCore.Models.Access.Access + { + Password = access.Password, + Proxy = access.Proxy.Ip, + ProxyPort = access.Proxy.Port, + ProxyUsername = access.Proxy.Username, + ProxyPassword = access.Proxy.Password, + }); + } + + return acc; + } + } +} \ No newline at end of file diff --git a/TbsReact/Startup.cs b/TbsReact/Startup.cs new file mode 100644 index 000000000..83d40f929 --- /dev/null +++ b/TbsReact/Startup.cs @@ -0,0 +1,70 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace TbsReact +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllersWithViews(); + + // In production, the React files will be served from this directory + services.AddSpaStaticFiles(configuration => + { + configuration.RootPath = "ClientApp/build"; + }); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseExceptionHandler("/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseStaticFiles(); + app.UseSpaStaticFiles(); + + app.UseRouting(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllerRoute( + name: "default", + pattern: "{controller}/{action=Index}/{id?}"); + }); + + app.UseSpa(spa => + { + spa.Options.SourcePath = "ClientApp"; + + if (env.IsDevelopment()) + { + spa.UseProxyToSpaDevelopmentServer("http://localhost:3000"); + } + }); + } + } +} \ No newline at end of file diff --git a/TbsReact_/.gitignore b/TbsReact_/.gitignore new file mode 100644 index 000000000..8f8b43bb1 --- /dev/null +++ b/TbsReact_/.gitignore @@ -0,0 +1,232 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +bin/ +Bin/ +obj/ +Obj/ + +# Visual Studio 2015 cache/options directory +.vs/ +/wwwroot/dist/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +orleans.codegen.cs + +/node_modules + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ diff --git a/TbsReact_/ClientApp/.env b/TbsReact_/ClientApp/.env new file mode 100644 index 000000000..6ce384e5c --- /dev/null +++ b/TbsReact_/ClientApp/.env @@ -0,0 +1 @@ +BROWSER=none diff --git a/TBSReact/ClientApp/.env.development b/TbsReact_/ClientApp/.env.development similarity index 100% rename from TBSReact/ClientApp/.env.development rename to TbsReact_/ClientApp/.env.development diff --git a/TbsReact_/ClientApp/.gitignore b/TbsReact_/ClientApp/.gitignore new file mode 100644 index 000000000..d30f40ef4 --- /dev/null +++ b/TbsReact_/ClientApp/.gitignore @@ -0,0 +1,21 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/TbsReact_/ClientApp/README.md b/TbsReact_/ClientApp/README.md new file mode 100644 index 000000000..9a2c94454 --- /dev/null +++ b/TbsReact_/ClientApp/README.md @@ -0,0 +1,2228 @@ +This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). + +Below you will find some information on how to perform common tasks.
+You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md). + +## Table of Contents + +- [Updating to New Releases](#updating-to-new-releases) +- [Sending Feedback](#sending-feedback) +- [Folder Structure](#folder-structure) +- [Available Scripts](#available-scripts) + - [npm start](#npm-start) + - [npm test](#npm-test) + - [npm run build](#npm-run-build) + - [npm run eject](#npm-run-eject) +- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) +- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) +- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) +- [Debugging in the Editor](#debugging-in-the-editor) +- [Formatting Code Automatically](#formatting-code-automatically) +- [Changing the Page ``](#changing-the-page-title) +- [Installing a Dependency](#installing-a-dependency) +- [Importing a Component](#importing-a-component) +- [Code Splitting](#code-splitting) +- [Adding a Stylesheet](#adding-a-stylesheet) +- [Post-Processing CSS](#post-processing-css) +- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) +- [Adding Images, Fonts, and Files](#adding-images-fonts-and-files) +- [Using the `public` Folder](#using-the-public-folder) + - [Changing the HTML](#changing-the-html) + - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) + - [When to Use the `public` Folder](#when-to-use-the-public-folder) +- [Using Global Variables](#using-global-variables) +- [Adding Bootstrap](#adding-bootstrap) + - [Using a Custom Theme](#using-a-custom-theme) +- [Adding Flow](#adding-flow) +- [Adding Custom Environment Variables](#adding-custom-environment-variables) + - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) + - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) + - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) +- [Can I Use Decorators?](#can-i-use-decorators) +- [Integrating with an API Backend](#integrating-with-an-api-backend) + - [Node](#node) + - [Ruby on Rails](#ruby-on-rails) +- [Proxying API Requests in Development](#proxying-api-requests-in-development) + - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy) + - [Configuring the Proxy Manually](#configuring-the-proxy-manually) + - [Configuring a WebSocket Proxy](#configuring-a-websocket-proxy) +- [Using HTTPS in Development](#using-https-in-development) +- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) +- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) +- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) +- [Running Tests](#running-tests) + - [Filename Conventions](#filename-conventions) + - [Command Line Interface](#command-line-interface) + - [Version Control Integration](#version-control-integration) + - [Writing Tests](#writing-tests) + - [Testing Components](#testing-components) + - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) + - [Initializing Test Environment](#initializing-test-environment) + - [Focusing and Excluding Tests](#focusing-and-excluding-tests) + - [Coverage Reporting](#coverage-reporting) + - [Continuous Integration](#continuous-integration) + - [Disabling jsdom](#disabling-jsdom) + - [Snapshot Testing](#snapshot-testing) + - [Editor Integration](#editor-integration) +- [Developing Components in Isolation](#developing-components-in-isolation) + - [Getting Started with Storybook](#getting-started-with-storybook) + - [Getting Started with Styleguidist](#getting-started-with-styleguidist) +- [Making a Progressive Web App](#making-a-progressive-web-app) + - [Opting Out of Caching](#opting-out-of-caching) + - [Offline-First Considerations](#offline-first-considerations) + - [Progressive Web App Metadata](#progressive-web-app-metadata) +- [Analyzing the Bundle Size](#analyzing-the-bundle-size) +- [Deployment](#deployment) + - [Static Server](#static-server) + - [Other Solutions](#other-solutions) + - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) + - [Building for Relative Paths](#building-for-relative-paths) + - [Azure](#azure) + - [Firebase](#firebase) + - [GitHub Pages](#github-pages) + - [Heroku](#heroku) + - [Netlify](#netlify) + - [Now](#now) + - [S3 and CloudFront](#s3-and-cloudfront) + - [Surge](#surge) +- [Advanced Configuration](#advanced-configuration) +- [Troubleshooting](#troubleshooting) + - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) + - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) + - [`npm run build` exits too early](#npm-run-build-exits-too-early) + - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) + - [`npm run build` fails to minify](#npm-run-build-fails-to-minify) + - [Moment.js locales are missing](#momentjs-locales-are-missing) +- [Something Missing?](#something-missing) + +## Updating to New Releases + +Create React App is divided into two packages: + +* `create-react-app` is a global command-line utility that you use to create new projects. +* `react-scripts` is a development dependency in the generated projects (including this one). + +You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`. + +When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. + +To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. + +In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. + +We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. + +## Sending Feedback + +We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). + +## Folder Structure + +After creation, your project should look like this: + +``` +my-app/ + README.md + node_modules/ + package.json + public/ + index.html + favicon.ico + src/ + App.css + App.js + App.test.js + index.css + index.js + logo.svg +``` + +For the project to build, **these files must exist with exact filenames**: + +* `public/index.html` is the page template; +* `src/index.js` is the JavaScript entry point. + +You can delete or rename the other files. + +You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.<br> +You need to **put any JS and CSS files inside `src`**, otherwise Webpack won’t see them. + +Only files inside `public` can be used from `public/index.html`.<br> +Read instructions below for using assets from JavaScript and HTML. + +You can, however, create more top-level directories.<br> +They will not be included in the production build so you can use them for things like documentation. + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.<br> +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.<br> +You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.<br> +See the section about [running tests](#running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.<br> +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.<br> +Your app is ready to be deployed! + +See the section about [deployment](#deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Supported Language Features and Polyfills + +This project supports a superset of the latest JavaScript standard.<br> +In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports: + +* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016). +* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017). +* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal). +* [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal) +* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). +* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax. + +Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-). + +While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future. + +Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**: + +* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign). +* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise). +* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch). + +If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them. + +## Syntax Highlighting in the Editor + +To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered. + +## Displaying Lint Output in the Editor + +>Note: this feature is available with `react-scripts@0.2.0` and higher.<br> +>It also only works with npm 3 or higher. + +Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. + +They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. + +You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root: + +```js +{ + "extends": "react-app" +} +``` + +Now your editor should report the linting warnings. + +Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes. + +If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules. + +## Debugging in the Editor + +**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).** + +Visual Studio Code and WebStorm support debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools. + +### Visual Studio Code + +You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed. + +Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory. + +```json +{ + "version": "0.2.0", + "configurations": [{ + "name": "Chrome", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000", + "webRoot": "${workspaceRoot}/src", + "sourceMapPathOverrides": { + "webpack:///src/*": "${webRoot}/*" + } + }] +} +``` +>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). + +Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor. + +Having problems with VS Code Debugging? Please see their [troubleshooting guide](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#troubleshooting). + +### WebStorm + +You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed. + +In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration. + +>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). + +Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm. + +The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine. + +## Formatting Code Automatically + +Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/). + +To format our code whenever we make a commit in git, we need to install the following dependencies: + +```sh +npm install --save husky lint-staged prettier +``` + +Alternatively you may use `yarn`: + +```sh +yarn add husky lint-staged prettier +``` + +* `husky` makes it easy to use githooks as if they are npm scripts. +* `lint-staged` allows us to run scripts on staged files in git. See this [blog post about lint-staged to learn more about it](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8). +* `prettier` is the JavaScript formatter we will run before commits. + +Now we can make sure every file is formatted correctly by adding a few lines to the `package.json` in the project root. + +Add the following line to `scripts` section: + +```diff + "scripts": { ++ "precommit": "lint-staged", + "start": "react-scripts start", + "build": "react-scripts build", +``` + +Next we add a 'lint-staged' field to the `package.json`, for example: + +```diff + "dependencies": { + // ... + }, ++ "lint-staged": { ++ "src/**/*.{js,jsx,json,css}": [ ++ "prettier --single-quote --write", ++ "git add" ++ ] ++ }, + "scripts": { +``` + +Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --single-quote --write "src/**/*.{js,jsx}"` to format your entire project for the first time. + +Next you might want to integrate Prettier in your favorite editor. Read the section on [Editor Integration](https://github.com/prettier/prettier#editor-integration) on the Prettier GitHub page. + +## Changing the Page `<title>` + +You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else. + +Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML. + +If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library. + +If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files). + +## Installing a Dependency + +The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: + +```sh +npm install --save react-router +``` + +Alternatively you may use `yarn`: + +```sh +yarn add react-router +``` + +This works for any library, not just `react-router`. + +## Importing a Component + +This project setup supports ES6 modules thanks to Babel.<br> +While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. + +For example: + +### `Button.js` + +```js +import React, { Component } from 'react'; + +class Button extends Component { + render() { + // ... + } +} + +export default Button; // Don’t forget to use export default! +``` + +### `DangerButton.js` + + +```js +import React, { Component } from 'react'; +import Button from './Button'; // Import a component from another file + +class DangerButton extends Component { + render() { + return <Button color="red" />; + } +} + +export default DangerButton; +``` + +Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. + +We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. + +Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. + +Learn more about ES6 modules: + +* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) +* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) +* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) + +## Code Splitting + +Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand. + +This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 3. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module. + +Here is an example: + +### `moduleA.js` + +```js +const moduleA = 'Hello'; + +export { moduleA }; +``` +### `App.js` + +```js +import React, { Component } from 'react'; + +class App extends Component { + handleClick = () => { + import('./moduleA') + .then(({ moduleA }) => { + // Use moduleA + }) + .catch(err => { + // Handle failure + }); + }; + + render() { + return ( + <div> + <button onClick={this.handleClick}>Load</button> + </div> + ); + } +} + +export default App; +``` + +This will make `moduleA.js` and all its unique dependencies as a separate chunk that only loads after the user clicks the 'Load' button. + +You can also use it with `async` / `await` syntax if you prefer it. + +### With React Router + +If you are using React Router check out [this tutorial](http://serverless-stack.com/chapters/code-splitting-in-create-react-app.html) on how to use code splitting with it. You can find the companion GitHub repository [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client/tree/code-splitting-in-create-react-app). + +## Adding a Stylesheet + +This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: + +### `Button.css` + +```css +.Button { + padding: 20px; +} +``` + +### `Button.js` + +```js +import React, { Component } from 'react'; +import './Button.css'; // Tell Webpack that Button.js uses these styles + +class Button extends Component { + render() { + // You can use them as regular CSS styles + return <div className="Button" />; + } +} +``` + +**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. + +In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. + +If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. + +## Post-Processing CSS + +This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. + +For example, this: + +```css +.App { + display: flex; + flex-direction: row; + align-items: center; +} +``` + +becomes this: + +```css +.App { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} +``` + +If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling). + +## Adding a CSS Preprocessor (Sass, Less etc.) + +Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)). + +Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative. + +First, let’s install the command-line interface for Sass: + +```sh +npm install --save node-sass-chokidar +``` + +Alternatively you may use `yarn`: + +```sh +yarn add node-sass-chokidar +``` + +Then in `package.json`, add the following lines to `scripts`: + +```diff + "scripts": { ++ "build-css": "node-sass-chokidar src/ -o src/", ++ "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test --env=jsdom", +``` + +>Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. + +Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated. + +To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions. + +To enable importing files without using relative paths, you can add the `--include-path` option to the command in `package.json`. + +``` +"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/", +"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive", +``` + +This will allow you to do imports like + +```scss +@import 'styles/_colors.scss'; // assuming a styles directory under src/ +@import 'nprogress/nprogress'; // importing a css file from the nprogress node module +``` + +At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control. + +As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use the `&&` operator to execute two scripts sequentially. However, there is no cross-platform way to run two scripts in parallel, so we will install a package for this: + +```sh +npm install --save npm-run-all +``` + +Alternatively you may use `yarn`: + +```sh +yarn add npm-run-all +``` + +Then we can change `start` and `build` scripts to include the CSS preprocessor commands: + +```diff + "scripts": { + "build-css": "node-sass-chokidar src/ -o src/", + "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", +- "start": "react-scripts start", +- "build": "react-scripts build", ++ "start-js": "react-scripts start", ++ "start": "npm-run-all -p watch-css start-js", ++ "build-js": "react-scripts build", ++ "build": "npm-run-all build-css build-js", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + } +``` + +Now running `npm start` and `npm run build` also builds Sass files. + +**Why `node-sass-chokidar`?** + +`node-sass` has been reported as having the following issues: + +- `node-sass --watch` has been reported to have *performance issues* in certain conditions when used in a virtual machine or with docker. + +- Infinite styles compiling [#1939](https://github.com/facebookincubator/create-react-app/issues/1939) + +- `node-sass` has been reported as having issues with detecting new files in a directory [#1891](https://github.com/sass/node-sass/issues/1891) + + `node-sass-chokidar` is used here as it addresses these issues. + +## Adding Images, Fonts, and Files + +With Webpack, using static assets like images and fonts works similarly to CSS. + +You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF. + +To reduce the number of requests to the server, importing images that are less than 10,000 bytes returns a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) instead of a path. This applies to the following file extensions: bmp, gif, jpg, jpeg, and png. SVG files are excluded due to [#1153](https://github.com/facebookincubator/create-react-app/issues/1153). + +Here is an example: + +```js +import React from 'react'; +import logo from './logo.png'; // Tell Webpack this JS file uses this image + +console.log(logo); // /logo.84287d09.png + +function Header() { + // Import result is the URL of your image + return <img src={logo} alt="Logo" />; +} + +export default Header; +``` + +This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths. + +This works in CSS too: + +```css +.Logo { + background-image: url(./logo.png); +} +``` + +Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. + +Please be advised that this is also a custom feature of Webpack. + +**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).<br> +An alternative way of handling static assets is described in the next section. + +## Using the `public` Folder + +>Note: this feature is available with `react-scripts@0.5.0` and higher. + +### Changing the HTML + +The `public` folder contains the HTML file so you can tweak it, for example, to [set the page title](#changing-the-page-title). +The `<script>` tag with the compiled code will be added to it automatically during the build process. + +### Adding Assets Outside of the Module System + +You can also add other assets to the `public` folder. + +Note that we normally encourage you to `import` assets in JavaScript files instead. +For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-fonts-and-files). +This mechanism provides a number of benefits: + +* Scripts and stylesheets get minified and bundled together to avoid extra network requests. +* Missing files cause compilation errors instead of 404 errors for your users. +* Result filenames include content hashes so you don’t need to worry about browsers caching their old versions. + +However there is an **escape hatch** that you can use to add an asset outside of the module system. + +If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. + +Inside `index.html`, you can use it like this: + +```html +<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> +``` + +Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build. + +When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL. + +In JavaScript code, you can use `process.env.PUBLIC_URL` for similar purposes: + +```js +render() { + // Note: this is an escape hatch and should be used sparingly! + // Normally we recommend using `import` for getting asset URLs + // as described in “Adding Images and Fonts” above this section. + return <img src={process.env.PUBLIC_URL + '/img/logo.png'} />; +} +``` + +Keep in mind the downsides of this approach: + +* None of the files in `public` folder get post-processed or minified. +* Missing files will not be called at compilation time, and will cause 404 errors for your users. +* Result filenames won’t include content hashes so you’ll need to add query arguments or rename them every time they change. + +### When to Use the `public` Folder + +Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-fonts-and-files) from JavaScript. +The `public` folder is useful as a workaround for a number of less common cases: + +* You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest). +* You have thousands of images and need to dynamically reference their paths. +* You want to include a small script like [`pace.js`](http://github.hubspot.com/pace/docs/welcome/) outside of the bundled code. +* Some library may be incompatible with Webpack and you have no other option but to include it as a `<script>` tag. + +Note that if you add a `<script>` that declares global variables, you also need to read the next section on using them. + +## Using Global Variables + +When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable. + +You can avoid this by reading the global variable explicitly from the `window` object, for example: + +```js +const $ = window.$; +``` + +This makes it obvious you are using a global variable intentionally rather than because of a typo. + +Alternatively, you can force the linter to ignore any line by adding `// eslint-disable-line` after it. + +## Adding Bootstrap + +You don’t have to use [Reactstrap](https://reactstrap.github.io/) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: + +Install Reactstrap and Bootstrap from npm. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: + +```sh +npm install --save reactstrap bootstrap@4 +``` + +Alternatively you may use `yarn`: + +```sh +yarn add reactstrap bootstrap@4 +``` + +Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file: + +```js +import 'bootstrap/dist/css/bootstrap.css'; +// Put any other imports below so that CSS from your +// components takes precedence over default styles. +``` + +Import required React Bootstrap components within ```src/App.js``` file or your custom component files: + +```js +import { Navbar, Button } from 'reactstrap'; +``` + +Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. + +### Using a Custom Theme + +Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br> +We suggest the following approach: + +* Create a new package that depends on the package you wish to customize, e.g. Bootstrap. +* Add the necessary build steps to tweak the theme, and publish your package on npm. +* Install your own theme npm package as a dependency of your app. + +Here is an example of adding a [customized Bootstrap](https://medium.com/@tacomanator/customizing-create-react-app-aa9ffb88165) that follows these steps. + +## Adding Flow + +Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. + +Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box. + +To add Flow to a Create React App project, follow these steps: + +1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). +2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. +3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. +4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). + +Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. +You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience. +In the future we plan to integrate it into Create React App even more closely. + +To learn more about Flow, check out [its documentation](https://flowtype.org/). + +## Adding Custom Environment Variables + +>Note: this feature is available with `react-scripts@0.2.3` and higher. + +Your project can consume variables declared in your environment as if they were declared locally in your JS files. By +default you will have `NODE_ENV` defined for you, and any other environment variables starting with +`REACT_APP_`. + +**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them. + +>Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. + +These environment variables will be defined for you on `process.env`. For example, having an environment +variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`. + +There is also a special built-in environment variable called `NODE_ENV`. You can read it from `process.env.NODE_ENV`. When you run `npm start`, it is always equal to `'development'`, when you run `npm test` it is always equal to `'test'`, and when you run `npm run build` to make a production bundle, it is always equal to `'production'`. **You cannot override `NODE_ENV` manually.** This prevents developers from accidentally deploying a slow development build to production. + +These environment variables can be useful for displaying information conditionally based on where the project is +deployed or consuming sensitive data that lives outside of version control. + +First, you need to have environment variables defined. For example, let’s say you wanted to consume a secret defined +in the environment inside a `<form>`: + +```jsx +render() { + return ( + <div> + <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> + <form> + <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> + </form> + </div> + ); +} +``` + +During the build, `process.env.REACT_APP_SECRET_CODE` will be replaced with the current value of the `REACT_APP_SECRET_CODE` environment variable. Remember that the `NODE_ENV` variable will be set for you automatically. + +When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: + +```html +<div> + <small>You are running this application in <b>development</b> mode.</small> + <form> + <input type="hidden" value="abcdef" /> + </form> +</div> +``` + +The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this +value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in +a `.env` file. Both of these ways are described in the next few sections. + +Having access to the `NODE_ENV` is also useful for performing actions conditionally: + +```js +if (process.env.NODE_ENV !== 'production') { + analytics.disable(); +} +``` + +When you compile the app with `npm run build`, the minification step will strip out this condition, and the resulting bundle will be smaller. + +### Referencing Environment Variables in the HTML + +>Note: this feature is available with `react-scripts@0.9.0` and higher. + +You can also access the environment variables starting with `REACT_APP_` in the `public/index.html`. For example: + +```html +<title>%REACT_APP_WEBSITE_NAME% +``` + +Note that the caveats from the above section apply: + +* Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work. +* The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](#generating-dynamic-meta-tags-on-the-server). + +### Adding Temporary Environment Variables In Your Shell + +Defining environment variables can vary between OSes. It’s also important to know that this manner is temporary for the +life of the shell session. + +#### Windows (cmd.exe) + +```cmd +set REACT_APP_SECRET_CODE=abcdef&&npm start +``` + +(Note: the lack of whitespace is intentional.) + +#### Linux, macOS (Bash) + +```bash +REACT_APP_SECRET_CODE=abcdef npm start +``` + +### Adding Development Environment Variables In `.env` + +>Note: this feature is available with `react-scripts@0.5.0` and higher. + +To define permanent environment variables, create a file called `.env` in the root of your project: + +``` +REACT_APP_SECRET_CODE=abcdef +``` + +`.env` files **should be** checked into source control (with the exclusion of `.env*.local`). + +#### What other `.env` files can be used? + +>Note: this feature is **available with `react-scripts@1.0.0` and higher**. + +* `.env`: Default. +* `.env.local`: Local overrides. **This file is loaded for all environments except test.** +* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings. +* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings. + +Files on the left have more priority than files on the right: + +* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env` +* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env` +* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing) + +These variables will act as the defaults if the machine does not explicitly set them.
+Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. + +>Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need +these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). + +## Can I Use Decorators? + +Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
+Create React App doesn’t support decorator syntax at the moment because: + +* It is an experimental proposal and is subject to change. +* The current specification version is not officially supported by Babel. +* If the specification changes, we won’t be able to write a codemod because we don’t use them internally at Facebook. + +However in many cases you can rewrite decorator-based code without decorators just as fine.
+Please refer to these two threads for reference: + +* [#214](https://github.com/facebookincubator/create-react-app/issues/214) +* [#411](https://github.com/facebookincubator/create-react-app/issues/411) + +Create React App will add decorator support when the specification advances to a stable stage. + +## Integrating with an API Backend + +These tutorials will help you to integrate your app with an API backend running on another port, +using `fetch()` to access it. + +### Node +Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/). +You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). + +### Ruby on Rails + +Check out [this tutorial](https://www.fullstackreact.com/articles/how-to-get-create-react-app-to-work-with-your-rails-api/). +You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo-rails). + +## Proxying API Requests in Development + +>Note: this feature is available with `react-scripts@0.2.3` and higher. + +People often serve the front-end React app from the same host and port as their backend implementation.
+For example, a production setup might look like this after the app is deployed: + +``` +/ - static server returns index.html with React app +/todos - static server returns index.html with React app +/api/todos - server handles any /api/* requests using the backend implementation +``` + +Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. + +To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: + +```js + "proxy": "http://localhost:4000", +``` + +This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will **only** attempt to send requests without `text/html` in its `Accept` header to the proxy. + +Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: + +``` +Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. +``` + +Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`. + +The `proxy` option supports HTTP, HTTPS and WebSocket connections.
+If the `proxy` option is **not** flexible enough for you, alternatively you can: + +* [Configure the proxy yourself](#configuring-the-proxy-manually) +* Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). +* Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. + +### "Invalid Host Header" Errors After Configuring Proxy + +When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. The issue is explained in [this article](https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a) and [this issue](https://github.com/webpack/webpack-dev-server/issues/887). + +This shouldn’t affect you when developing on `localhost`, but if you develop remotely like [described here](https://github.com/facebookincubator/create-react-app/issues/2271), you will see this error in the browser after enabling the `proxy` option: + +>Invalid Host header + +To work around it, you can specify your public development host in a file called `.env.development` in the root of your project: + +``` +HOST=mypublicdevhost.com +``` + +If you restart the development server now and load the app from the specified host, it should work. + +If you are still having issues or if you’re using a more exotic environment like a cloud editor, you can bypass the host check completely by adding a line to `.env.development.local`. **Note that this is dangerous and exposes your machine to remote code execution from malicious websites:** + +``` +# NOTE: THIS IS DANGEROUS! +# It exposes your machine to attacks from the websites you visit. +DANGEROUSLY_DISABLE_HOST_CHECK=true +``` + +We don’t recommend this approach. + +### Configuring the Proxy Manually + +>Note: this feature is available with `react-scripts@1.0.0` and higher. + +If the `proxy` option is **not** flexible enough for you, you can specify an object in the following form (in `package.json`).
+You may also specify any configuration value [`http-proxy-middleware`](https://github.com/chimurai/http-proxy-middleware#options) or [`http-proxy`](https://github.com/nodejitsu/node-http-proxy#options) supports. +```js +{ + // ... + "proxy": { + "/api": { + "target": "", + "ws": true + // ... + } + } + // ... +} +``` + +All requests matching this path will be proxies, no exceptions. This includes requests for `text/html`, which the standard `proxy` option does not proxy. + +If you need to specify multiple proxies, you may do so by specifying additional entries. +Matches are regular expressions, so that you can use a regexp to match multiple paths. +```js +{ + // ... + "proxy": { + // Matches any request starting with /api + "/api": { + "target": "", + "ws": true + // ... + }, + // Matches any request starting with /foo + "/foo": { + "target": "", + "ssl": true, + "pathRewrite": { + "^/foo": "/foo/beta" + } + // ... + }, + // Matches /bar/abc.html but not /bar/sub/def.html + "/bar/[^/]*[.]html": { + "target": "", + // ... + }, + // Matches /baz/abc.html and /baz/sub/def.html + "/baz/.*/.*[.]html": { + "target": "" + // ... + } + } + // ... +} +``` + +### Configuring a WebSocket Proxy + +When setting up a WebSocket proxy, there are a some extra considerations to be aware of. + +If you’re using a WebSocket engine like [Socket.io](https://socket.io/), you must have a Socket.io server running that you can use as the proxy target. Socket.io will not work with a standard WebSocket server. Specifically, don't expect Socket.io to work with [the websocket.org echo test](http://websocket.org/echo.html). + +There’s some good documentation available for [setting up a Socket.io server](https://socket.io/docs/). + +Standard WebSockets **will** work with a standard WebSocket server as well as the websocket.org echo test. You can use libraries like [ws](https://github.com/websockets/ws) for the server, with [native WebSockets in the browser](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). + +Either way, you can proxy WebSocket requests manually in `package.json`: + +```js +{ + // ... + "proxy": { + "/socket": { + // Your compatible WebSocket server + "target": "ws://", + // Tell http-proxy-middleware that this is a WebSocket proxy. + // Also allows you to proxy WebSocket requests without an additional HTTP request + // https://github.com/chimurai/http-proxy-middleware#external-websocket-upgrade + "ws": true + // ... + } + } + // ... +} +``` + +## Using HTTPS in Development + +>Note: this feature is available with `react-scripts@0.4.0` and higher. + +You may require the dev server to serve pages over HTTPS. One particular case where this could be useful is when using [the "proxy" feature](#proxying-api-requests-in-development) to proxy requests to an API server when that API server is itself serving HTTPS. + +To do this, set the `HTTPS` environment variable to `true`, then start the dev server as usual with `npm start`: + +#### Windows (cmd.exe) + +```cmd +set HTTPS=true&&npm start +``` + +(Note: the lack of whitespace is intentional.) + +#### Linux, macOS (Bash) + +```bash +HTTPS=true npm start +``` + +Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page. + +## Generating Dynamic `` Tags on the Server + +Since Create React App doesn’t support server rendering, you might be wondering how to make `` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this: + +```html + + + + + +``` + +Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG_TITLE__`, `__OG_DESCRIPTION__`, and any other placeholders with values depending on the current URL. Just make sure to sanitize and escape the interpolated values so that they are safe to embed into HTML! + +If you use a Node server, you can even share the route matching logic between the client and the server. However duplicating it also works fine in simple cases. + +## Pre-Rendering into Static HTML Files + +If you’re hosting your `build` with a static hosting provider you can use [react-snapshot](https://www.npmjs.com/package/react-snapshot) or [react-snap](https://github.com/stereobooster/react-snap) to generate HTML pages for each route, or relative link, in your application. These pages will then seamlessly become active, or “hydrated”, when the JavaScript bundle has loaded. + +There are also opportunities to use this outside of static hosting, to take the pressure off the server when generating and caching routes. + +The primary benefit of pre-rendering is that you get the core content of each page _with_ the HTML payload—regardless of whether or not your JavaScript bundle successfully downloads. It also increases the likelihood that each route of your application will be picked up by search engines. + +You can read more about [zero-configuration pre-rendering (also called snapshotting) here](https://medium.com/superhighfives/an-almost-static-stack-6df0a2791319). + +## Injecting Data from the Server into the Page + +Similarly to the previous section, you can leave some placeholders in the HTML that inject global variables, for example: + +```js + + + + +``` + +Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.** + +## Running Tests + +>Note: this feature is available with `react-scripts@0.3.0` and higher.
+>[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) + +Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try. + +Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness. + +While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks. + +We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App. + +### Filename Conventions + +Jest will look for test files with any of the following popular naming conventions: + +* Files with `.js` suffix in `__tests__` folders. +* Files with `.test.js` suffix. +* Files with `.spec.js` suffix. + +The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder. + +We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects. + +### Command Line Interface + +When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code. + +The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run: + +![Jest watch mode](http://facebook.github.io/jest/img/blog/15-watch.gif) + +### Version Control Integration + +By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests run fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. + +Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests. + +Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository. + +### Writing Tests + +To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended. + +Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this: + +```js +import sum from './sum'; + +it('sums numbers', () => { + expect(sum(1, 2)).toEqual(3); + expect(sum(2, 2)).toEqual(4); +}); +``` + +All `expect()` matchers supported by Jest are [extensively documented here](https://facebook.github.io/jest/docs/en/expect.html#content).
+You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](https://facebook.github.io/jest/docs/en/expect.html#tohavebeencalled) to create “spies” or mock functions. + +### Testing Components + +There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes. + +Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components: + +```js +import React from 'react'; +import ReactDOM from 'react-dom'; +import App from './App'; + +it('renders without crashing', () => { + const div = document.createElement('div'); + ReactDOM.render(, div); +}); +``` + +This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. + +When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior. + +If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). To install it, run: + +```sh +npm install --save enzyme enzyme-adapter-react-16 react-test-renderer +``` + +Alternatively you may use `yarn`: + +```sh +yarn add enzyme enzyme-adapter-react-16 react-test-renderer +``` + +As of Enzyme 3, you will need to install Enzyme along with an Adapter corresponding to the version of React you are using. (The examples above use the adapter for React 16.) + +The adapter will also need to be configured in your [global setup file](#initializing-test-environment): + +#### `src/setupTests.js` +```js +import { configure } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; + +configure({ adapter: new Adapter() }); +``` + +Now you can write a smoke test with it: + +```js +import React from 'react'; +import { shallow } from 'enzyme'; +import App from './App'; + +it('renders without crashing', () => { + shallow(); +}); +``` + +Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a ` + + ); + } +} diff --git a/TbsReact_/ClientApp/src/components/FetchData.js b/TbsReact_/ClientApp/src/components/FetchData.js new file mode 100644 index 000000000..25d920654 --- /dev/null +++ b/TbsReact_/ClientApp/src/components/FetchData.js @@ -0,0 +1,59 @@ +import React, { Component } from 'react'; + +export class FetchData extends Component { + static displayName = FetchData.name; + + constructor(props) { + super(props); + this.state = { forecasts: [], loading: true }; + } + + componentDidMount() { + this.populateWeatherData(); + } + + static renderForecastsTable(forecasts) { + return ( + + + + + + + + + + + {forecasts.map(forecast => + + + + + + + )} + +
DateTemp. (C)Temp. (F)Summary
{forecast.date}{forecast.temperatureC}{forecast.temperatureF}{forecast.summary}
+ ); + } + + render() { + let contents = this.state.loading + ?

Loading...

+ : FetchData.renderForecastsTable(this.state.forecasts); + + return ( +
+

Weather forecast

+

This component demonstrates fetching data from the server.

+ {contents} +
+ ); + } + + async populateWeatherData() { + const response = await fetch('weatherforecast'); + const data = await response.json(); + this.setState({ forecasts: data, loading: false }); + } +} diff --git a/TbsReact_/ClientApp/src/components/Home.js b/TbsReact_/ClientApp/src/components/Home.js new file mode 100644 index 000000000..7f6b28e71 --- /dev/null +++ b/TbsReact_/ClientApp/src/components/Home.js @@ -0,0 +1,26 @@ +import React, { Component } from 'react'; + +export class Home extends Component { + static displayName = Home.name; + + render () { + return ( +
+

Hello, world!

+

Welcome to your new single-page application, built with:

+
+

To help you get started, we have also set up:

+
    +
  • Client-side navigation. For example, click Counter then Back to return here.
  • +
  • Development server integration. In development mode, the development server from create-react-app runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.
  • +
  • Efficient production builds. In production mode, development-time features are disabled, and your dotnet publish configuration produces minified, efficiently bundled JavaScript files.
  • +
+

The ClientApp subdirectory is a standard React application based on the create-react-app template. If you open a command prompt in that directory, you can run npm commands such as npm test or npm install.

+
+ ); + } +} diff --git a/TbsReact_/ClientApp/src/components/Layout.js b/TbsReact_/ClientApp/src/components/Layout.js new file mode 100644 index 000000000..4ced296ad --- /dev/null +++ b/TbsReact_/ClientApp/src/components/Layout.js @@ -0,0 +1,13 @@ +import React from 'react'; +import NavMenu from './NavMenu'; + +const Layout = ({ selected, setSelected }) => { + return ( + <> + + + ); + +} + +export default Layout; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/NavMenu.css b/TbsReact_/ClientApp/src/components/NavMenu.css new file mode 100644 index 000000000..9214b0eae --- /dev/null +++ b/TbsReact_/ClientApp/src/components/NavMenu.css @@ -0,0 +1,18 @@ +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +html { + font-size: 14px; +} +@media (min-width: 768px) { + html { + font-size: 16px; + } +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} diff --git a/TbsReact_/ClientApp/src/components/NavMenu.js b/TbsReact_/ClientApp/src/components/NavMenu.js new file mode 100644 index 000000000..616612bca --- /dev/null +++ b/TbsReact_/ClientApp/src/components/NavMenu.js @@ -0,0 +1,21 @@ +import React from 'react'; +import { Container, Navbar, NavbarBrand} from 'reactstrap'; +import { Link } from 'react-router-dom'; +import './NavMenu.css'; +import SideBar from './sidebar/SideBar'; + +const NavMenu = ({ selected, setSelected }) => { + + return ( +
+ + + + TBSReact + + +
+ ); +} + +export default NavMenu; diff --git a/TbsReact_/ClientApp/src/components/sidebar/AccountRow.js b/TbsReact_/ClientApp/src/components/sidebar/AccountRow.js new file mode 100644 index 000000000..a4d862ca2 --- /dev/null +++ b/TbsReact_/ClientApp/src/components/sidebar/AccountRow.js @@ -0,0 +1,17 @@ +import { TableCell, TableRow } from "@mui/material"; + +const AccountRow = ({acc, handler, selected}) => { + return ( + <> + handler(acc)} + selected = {acc.Id === selected}> + {acc.Username} + {acc.ServerUrl} + + + ) +} + +export default AccountRow; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/sidebar/AccountTable.js b/TbsReact_/ClientApp/src/components/sidebar/AccountTable.js new file mode 100644 index 000000000..77668cd6d --- /dev/null +++ b/TbsReact_/ClientApp/src/components/sidebar/AccountTable.js @@ -0,0 +1,44 @@ +import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'; +import React from 'react' +import AccountRow from './AccountRow' + +const AccountTable = ({ selected, setSelected }) => { + const onClick = (acc) => { + setSelected(acc.Id) + }; + const accs = [ + { Id: 0, Username: "alsdao", ServerUrl: "ts50.x5.america.travian.com" }, + { Id: 1, Username: "alo", ServerUrl: "sadasd" }, + { Id: 2, Username: "ao", ServerUrl: "sadasd" }, + { Id: 3, Username: "a2lo", ServerUrl: "sadasd" }, + { Id: 4, Username: "al3o", ServerUrl: "sadasd" }, + { Id: 5, Username: "al4o", ServerUrl: "sadasd" }, + { Id: 6, Username: "al5o", ServerUrl: "sadasd" }, + ] + + const accsNode = accs.map((acc) => ( + ) + ) + + return ( + <> + + + + + Username + Server url + + + + {accsNode} + +
+
+ + ) +} + +export default AccountTable; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/sidebar/Modal/AccessRow.js b/TbsReact_/ClientApp/src/components/sidebar/Modal/AccessRow.js new file mode 100644 index 000000000..eef426185 --- /dev/null +++ b/TbsReact_/ClientApp/src/components/sidebar/Modal/AccessRow.js @@ -0,0 +1,18 @@ +import { TableCell, TableRow } from "@mui/material"; + +const AccountRow = ({access, handler, selected}) => { + return ( + <> + handler(access)} + selected = {access.id === selected}> + {[access.proxy.ip, ':', access.proxy.port].join()} + {access.proxy.username} + {access.proxy.OK === true ? "✔" : "❌"} + + + ) +} + +export default AccountRow; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TbsReact_/ClientApp/src/components/sidebar/Modal/AccountModal.js new file mode 100644 index 000000000..e2a9e3cff --- /dev/null +++ b/TbsReact_/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -0,0 +1,157 @@ +import { useEffect, useState } from 'react'; +import { Modal, Button, Box, Typography, Input, Table, TableHead, TableCell } from '@mui/material'; +import AccessRow from './AccessRow'; + +const style = { + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + bgcolor: 'background.paper', + border: '2px solid #000', + boxShadow: 24, + p: 4, +}; + +const AccountModal = ({ editMode = false, accID = -1 }) => { + const [selected, setSelected] = useState(0); + const [open, setOpen] = useState(false); + const [accesses, setAccesses] = useState([]); + + //Form + const [username, setUsername] = useState(""); + const [server, setServer] = useState(""); + const [password, setPassword] = useState(""); + const [proxyIP, setProxyIP] = useState(0); + const [proxyPort, setProxyPort] = useState(""); + const [proxyUsername, setProxyUsername] = useState(""); + const [proxyPassword, setProxyPassword] = useState(""); + + + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + const onClickTable = (access) => { + setSelected(access.id) + }; + const onClickAdd = () => { + const newAccess = { id: accesses.length, password: password, proxy: { ip: proxyIP, port: proxyPort, username: proxyUsername, password: proxyPassword, ok: false } } + setAccesses([...accesses, newAccess]) + console.log(newAccess) + update(); + } + const onClickEdit = () => { + const newAccess = { id: selected, password: password, proxy: { ip: proxyIP, port: proxyPort, username: proxyUsername, password: proxyPassword, ok: false } } + setAccesses( (old) => {old[selected] = newAccess; return old}) + console.log(newAccess) + update(); + + } + const onClickDelete = () => { + console.log("delete", selected); + update(); + + } + useEffect(() => { + console.log("access", selected) + }, [selected]); + + let accessNode = null; + + const update = () => { + accessNode = accesses.map((access) => ( + ) + ); + } + + + + return ( + <> + + + + + {editMode === true ? "Add account" : "Edit account"} + + + + + + + + + + + + + + + + + + + + + + + + +
+ Username + + setUsername(e.target.value)} /> + + Server + + setServer(e.target.value)} /> +
+ Password + + setPassword(e.target.value)} /> +
+ Proxy IP + + setProxyIP(e.target.value)} /> + + Proxy username + + setProxyUsername(e.target.value)} /> +
+ Proxy Port + + setProxyPort(e.target.value)} /> + + Proxy password + + setProxyPassword(e.target.value)} /> +
+ + + + +
+ + + + + +
+ + + Proxy + Proxy username + OK + + {accessNode} +
+
+
+ + ) +} + +export default AccountModal; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/sidebar/SideBar.js b/TbsReact_/ClientApp/src/components/sidebar/SideBar.js new file mode 100644 index 000000000..a99c796dc --- /dev/null +++ b/TbsReact_/ClientApp/src/components/sidebar/SideBar.js @@ -0,0 +1,44 @@ +import React from "react" +import { Drawer, IconButton } from "@mui/material" +import MenuIcon from '@mui/icons-material/Menu'; +import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; + +import AccountTable from "./AccountTable" +import AccountModal from "./Modal/AccountModal" +const SideBar = ({ selected, setSelected }) => { + const [open, setOpen] = React.useState(false); + const handleDrawerOpen = () => { + setOpen(true); + }; + + const handleDrawerClose = () => { + setOpen(false); + }; + + + return ( + <> + + + + + + + + + + + + + ) +} +export default SideBar; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/custom.css b/TbsReact_/ClientApp/src/custom.css new file mode 100644 index 000000000..5fdfd061c --- /dev/null +++ b/TbsReact_/ClientApp/src/custom.css @@ -0,0 +1,14 @@ +/* Provide sufficient contrast against white background */ +a { + color: #0366d6; +} + +code { + color: #E01A76; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} diff --git a/TbsReact_/ClientApp/src/index.js b/TbsReact_/ClientApp/src/index.js new file mode 100644 index 000000000..fbb3bcc6d --- /dev/null +++ b/TbsReact_/ClientApp/src/index.js @@ -0,0 +1,26 @@ +import 'bootstrap/dist/css/bootstrap.css'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import { BrowserRouter } from 'react-router-dom'; +import App from './App'; +import * as serviceWorkerRegistration from './serviceWorkerRegistration'; +import reportWebVitals from './reportWebVitals'; + +const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); +const rootElement = document.getElementById('root'); + +ReactDOM.render( + + + , + rootElement); + +// If you want your app to work offline and load faster, you can change +// unregister() to register() below. Note this comes with some pitfalls. +// Learn more about service workers: https://cra.link/PWA +serviceWorkerRegistration.unregister(); + +// If you want to start measuring performance in your app, pass a function +// to log results (for example: reportWebVitals(console.log)) +// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals +reportWebVitals(); diff --git a/TbsReact_/ClientApp/src/reportWebVitals.js b/TbsReact_/ClientApp/src/reportWebVitals.js new file mode 100644 index 000000000..532f29b0b --- /dev/null +++ b/TbsReact_/ClientApp/src/reportWebVitals.js @@ -0,0 +1,13 @@ +const reportWebVitals = (onPerfEntry) => { + if (onPerfEntry && onPerfEntry instanceof Function) { + import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { + getCLS(onPerfEntry); + getFID(onPerfEntry); + getFCP(onPerfEntry); + getLCP(onPerfEntry); + getTTFB(onPerfEntry); + }); + } +}; + +export default reportWebVitals; diff --git a/TbsReact_/ClientApp/src/service-worker.js b/TbsReact_/ClientApp/src/service-worker.js new file mode 100644 index 000000000..0f1e0ce02 --- /dev/null +++ b/TbsReact_/ClientApp/src/service-worker.js @@ -0,0 +1,72 @@ +/* eslint-disable no-restricted-globals */ + +// This service worker can be customized! +// See https://developers.google.com/web/tools/workbox/modules +// for the list of available Workbox modules, or add any other +// code you'd like. +// You can also remove this file if you'd prefer not to use a +// service worker, and the Workbox build step will be skipped. + +import { clientsClaim } from 'workbox-core'; +import { ExpirationPlugin } from 'workbox-expiration'; +import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'; +import { registerRoute } from 'workbox-routing'; +import { StaleWhileRevalidate } from 'workbox-strategies'; + +clientsClaim(); + +// Precache all of the assets generated by your build process. +// Their URLs are injected into the manifest variable below. +// This variable must be present somewhere in your service worker file, +// even if you decide not to use precaching. See https://cra.link/PWA +precacheAndRoute(self.__WB_MANIFEST); + +// Set up App Shell-style routing, so that all navigation requests +// are fulfilled with your index.html shell. Learn more at +// https://developers.google.com/web/fundamentals/architecture/app-shell +const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$'); +registerRoute( + // Return false to exempt requests from being fulfilled by index.html. + ({ request, url }) => { + // If this isn't a navigation, skip. + if (request.mode !== 'navigate') { + return false; + } // If this is a URL that starts with /_, skip. + + if (url.pathname.startsWith('/_')) { + return false; + } // If this looks like a URL for a resource, because it contains // a file extension, skip. + + if (url.pathname.match(fileExtensionRegexp)) { + return false; + } // Return true to signal that we want to use the handler. + + return true; + }, + createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html') +); + +// An example runtime caching route for requests that aren't handled by the +// precache, in this case same-origin .png requests like those from in public/ +registerRoute( + // Add in any other file extensions or routing criteria as needed. + ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'), // Customize this strategy as needed, e.g., by changing to CacheFirst. + new StaleWhileRevalidate({ + cacheName: 'images', + plugins: [ + // Ensure that once this runtime cache reaches a maximum size the + // least-recently used images are removed. + new ExpirationPlugin({ maxEntries: 50 }), + ], + }) +); + +// This allows the web app to trigger skipWaiting via +// registration.waiting.postMessage({type: 'SKIP_WAITING'}) +self.addEventListener('message', (event) => { + if (event.data && event.data.type === 'SKIP_WAITING') { + self.skipWaiting(); + } +}); + +// Any other custom service worker logic can go here. diff --git a/TbsReact_/ClientApp/src/serviceWorkerRegistration.js b/TbsReact_/ClientApp/src/serviceWorkerRegistration.js new file mode 100644 index 000000000..2262ecdbf --- /dev/null +++ b/TbsReact_/ClientApp/src/serviceWorkerRegistration.js @@ -0,0 +1,137 @@ +// This optional code is used to register a service worker. +// register() is not called by default. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on subsequent visits to a page, after all the +// existing tabs open on the page have been closed, since previously cached +// resources are updated in the background. + +// To learn more about the benefits of this model and instructions on how to +// opt-in, read https://cra.link/PWA + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.0/8 are considered localhost for IPv4. + window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) +); + +export function register(config) { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebook/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Let's check if a service worker still exists or not. + checkValidServiceWorker(swUrl, config); + + // Add some additional logging to localhost, pointing developers to the + // service worker/PWA documentation. + navigator.serviceWorker.ready.then(() => { + console.log( + 'This web app is being served cache-first by a service ' + + 'worker. To learn more, visit https://cra.link/PWA' + ); + }); + } else { + // Is not localhost. Just register service worker + registerValidSW(swUrl, config); + } + }); + } +} + +function registerValidSW(swUrl, config) { + navigator.serviceWorker + .register(swUrl) + .then((registration) => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + if (installingWorker == null) { + return; + } + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the updated precached content has been fetched, + // but the previous service worker will still serve the older + // content until all client tabs are closed. + console.log( + 'New content is available and will be used when all ' + + 'tabs for this page are closed. See https://cra.link/PWA.' + ); + + // Execute callback + if (config && config.onUpdate) { + config.onUpdate(registration); + } + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + + // Execute callback + if (config && config.onSuccess) { + config.onSuccess(registration); + } + } + } + }; + }; + }) + .catch((error) => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl, config) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl, { + headers: { 'Service-Worker': 'script' }, + }) + .then((response) => { + // Ensure service worker exists, and that we really are getting a JS file. + const contentType = response.headers.get('content-type'); + if ( + response.status === 404 || + (contentType != null && contentType.indexOf('javascript') === -1) + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then((registration) => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl, config); + } + }) + .catch(() => { + console.log('No internet connection found. App is running in offline mode.'); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready + .then((registration) => { + registration.unregister(); + }) + .catch((error) => { + console.error(error.message); + }); + } +} diff --git a/TbsReact_/ClientApp/src/setupProxy.js b/TbsReact_/ClientApp/src/setupProxy.js new file mode 100644 index 000000000..2bf4e2a20 --- /dev/null +++ b/TbsReact_/ClientApp/src/setupProxy.js @@ -0,0 +1,18 @@ +const createProxyMiddleware = require('http-proxy-middleware'); +const { env } = require('process'); + +const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` : + env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:57848'; + +const context = [ + "/weatherforecast", +]; + +module.exports = function(app) { + const appProxy = createProxyMiddleware(context, { + target: target, + secure: false + }); + + app.use(appProxy); +}; diff --git a/TbsReact_/Controllers/AccountController.cs b/TbsReact_/Controllers/AccountController.cs new file mode 100644 index 000000000..7af666c3d --- /dev/null +++ b/TbsReact_/Controllers/AccountController.cs @@ -0,0 +1,92 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; +using TbsReact.Singleton; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("[accounts]")] + public class AccountController : ControllerBase + { + // GET: Account + public ActionResult> GetAccounts() + { + var AccountInfoList = new List(); + for (int i = 0; i < AccountManager.Instance.Accounts.Count; i++) + { + AccountInfoList.Add(AccountManager.GetAccount(i, AccountManager.Instance.Accounts[i])); + } + + return AccountInfoList; + } + + // GET: Account/Details/5 + public ActionResult Details(int id) + { + return View(); + } + + // GET: Account/Create + public ActionResult Create() + { + return View(); + } + + // POST: Account/Create + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Create(IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + + // GET: Account/Edit/5 + public ActionResult Edit(int id) + { + return View(); + } + + // POST: Account/Edit/5 + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Edit(int id, IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + + // GET: Account/Delete/5 + public ActionResult Delete(int id) + { + return View(); + } + + // POST: Account/Delete/5 + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Delete(int id, IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + } +} \ No newline at end of file diff --git a/TBSReact/Controllers/WeatherForecastController.cs b/TbsReact_/Controllers/WeatherForecastController.cs similarity index 100% rename from TBSReact/Controllers/WeatherForecastController.cs rename to TbsReact_/Controllers/WeatherForecastController.cs diff --git a/TbsReact_/Models/Access.cs b/TbsReact_/Models/Access.cs new file mode 100644 index 000000000..5170d6e50 --- /dev/null +++ b/TbsReact_/Models/Access.cs @@ -0,0 +1,9 @@ +namespace TbsReact.Models +{ + public class Access + { + public int Id { get; set; } + public string Password { get; set; } + public Proxy Proxy { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact_/Models/Account.cs b/TbsReact_/Models/Account.cs new file mode 100644 index 000000000..9b4e2dfc5 --- /dev/null +++ b/TbsReact_/Models/Account.cs @@ -0,0 +1,11 @@ +namespace TbsReact.Models +{ + public class Account + { + public int Id { get; set; } + public string Name { get; set; } + public string ServerUrl { get; set; } + + public List Accesses { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact_/Models/Proxy.cs b/TbsReact_/Models/Proxy.cs new file mode 100644 index 000000000..ac9ca7c87 --- /dev/null +++ b/TbsReact_/Models/Proxy.cs @@ -0,0 +1,11 @@ +namespace TbsReact.Models +{ + public class Proxy + { + public string Ip { get; set; } + public int Port { get; set; } + public string? Username { get; set; } + public string? Password { get; set; } + public bool OK { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact_/Pages/Error.cshtml b/TbsReact_/Pages/Error.cshtml new file mode 100644 index 000000000..6f92b9565 --- /dev/null +++ b/TbsReact_/Pages/Error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to the Development environment displays detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/TbsReact_/Pages/Error.cshtml.cs b/TbsReact_/Pages/Error.cshtml.cs new file mode 100644 index 000000000..e18030e6f --- /dev/null +++ b/TbsReact_/Pages/Error.cshtml.cs @@ -0,0 +1,25 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace TbsReact.Pages; + +[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] +public class ErrorModel : PageModel +{ + private readonly ILogger _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } +} diff --git a/TbsReact_/Pages/_ViewImports.cshtml b/TbsReact_/Pages/_ViewImports.cshtml new file mode 100644 index 000000000..7f96d899f --- /dev/null +++ b/TbsReact_/Pages/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using TbsReact +@namespace TbsReact.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/TbsReact_/Program.cs b/TbsReact_/Program.cs new file mode 100644 index 000000000..f474a3821 --- /dev/null +++ b/TbsReact_/Program.cs @@ -0,0 +1,29 @@ +using TbsReact.Singleton; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +builder.Services.AddSingleton(AccountManager.Instance); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); +app.UseRouting(); + +app.MapControllerRoute( + name: "default", + pattern: "{controller}/{action=Index}/{id?}"); + +app.MapFallbackToFile("index.html"); ; + +app.Run(); \ No newline at end of file diff --git a/TbsReact_/Properties/launchSettings.json b/TbsReact_/Properties/launchSettings.json new file mode 100644 index 000000000..5f57b501b --- /dev/null +++ b/TbsReact_/Properties/launchSettings.json @@ -0,0 +1,29 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:57848", + "sslPort": 44342 + } + }, + "profiles": { + "TBSReact": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:7216;http://localhost:5282", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + } + } + } +} diff --git a/TbsReact_/Singleton/AccountManager.cs b/TbsReact_/Singleton/AccountManager.cs new file mode 100644 index 000000000..89dda05d5 --- /dev/null +++ b/TbsReact_/Singleton/AccountManager.cs @@ -0,0 +1,87 @@ +using TbsCore.Database; +using TbsCore.Helpers; + +using TbsReact.Models; + +namespace TbsReact.Singleton + +{ + public sealed class AccountManager + { + private static readonly AccountManager instance = new(); + + private List accounts = new(); + + public List Accounts + { + get { return accounts; } + set { accounts = value; } + } + + static AccountManager() + { + } + + private AccountManager() + { + LoadAccounts(); + } + + public static AccountManager Instance + { + get + { + return instance; + } + } + + public static Account GetAccount(int index, TbsCore.Models.AccModels.Account acc) + { + var accesses = new List(); + + for (int i = 0; i < acc.Access.AllAccess.Count; i++) + { + var access = acc.Access.AllAccess[i]; + accesses.Add(new Access + { + Id = i, + Password = access.Password, + Proxy = new Proxy + { + Ip = access.Proxy, + Port = access.ProxyPort, + Username = access.ProxyUsername, + Password = access.Password, + OK = access.Ok + } + }); + } + return new Account + { + Id = index, + Name = acc.AccInfo.Nickname, + ServerUrl = acc.AccInfo.ServerUrl, + Accesses = accesses + }; + } + + private void LoadAccounts() + { + // For migration purposes only! Remove after few versions + if (IoHelperCore.AccountsTxtExists() && !IoHelperCore.SQLiteExists()) + { + DbRepository.SyncAccountsTxt(); + File.Delete(IoHelperCore.AccountsPath); + } + + accounts = DbRepository.GetAccounts(); + + accounts.ForEach(x => ObjectHelper.FixAccObj(x, x)); + } + + public void SaveAccounts() + { + IoHelperCore.SaveAccounts(accounts, true); + } + } +} \ No newline at end of file diff --git a/TbsReact_/TBSReact.csproj b/TbsReact_/TBSReact.csproj new file mode 100644 index 000000000..bead7e963 --- /dev/null +++ b/TbsReact_/TBSReact.csproj @@ -0,0 +1,55 @@ + + + + net6.0 + true + Latest + false + ClientApp\ + $(DefaultItemExcludes);$(SpaRoot)node_modules\** + https://localhost:44465 + npm start + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wwwroot\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + true + + + + diff --git a/TBSReact/WeatherForecast.cs b/TbsReact_/WeatherForecast.cs similarity index 100% rename from TBSReact/WeatherForecast.cs rename to TbsReact_/WeatherForecast.cs diff --git a/TbsReact_/appsettings.Development.json b/TbsReact_/appsettings.Development.json new file mode 100644 index 000000000..84308c97f --- /dev/null +++ b/TbsReact_/appsettings.Development.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.AspNetCore.SpaProxy": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/TbsReact_/appsettings.json b/TbsReact_/appsettings.json new file mode 100644 index 000000000..ad75fee41 --- /dev/null +++ b/TbsReact_/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, +"AllowedHosts": "*" +} diff --git a/TBSReact/libman.json b/TbsReact_/libman.json similarity index 100% rename from TBSReact/libman.json rename to TbsReact_/libman.json diff --git a/TravBotSharp.sln b/TravBotSharp.sln index da7e60258..2c1cb82e6 100644 --- a/TravBotSharp.sln +++ b/TravBotSharp.sln @@ -9,13 +9,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TbsCore", "TbsCore\TbsCore. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TbsCoreTest", "TbsCoreTest\TbsCoreTest.csproj", "{BD027CDE-12E3-4548-8B32-3EEF83B73646}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TBSReact", "TBSReact\TBSReact.csproj", "{7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A387655F-C99A-4EA2-ADD7-C6D130F0D669}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TbsReact", "TbsReact\TbsReact.csproj", "{8A9D5FC4-E3FB-47FA-8253-6A68B604111D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -62,18 +62,18 @@ Global {BD027CDE-12E3-4548-8B32-3EEF83B73646}.Release|x64.Build.0 = Release|Any CPU {BD027CDE-12E3-4548-8B32-3EEF83B73646}.Release|x86.ActiveCfg = Release|Any CPU {BD027CDE-12E3-4548-8B32-3EEF83B73646}.Release|x86.Build.0 = Release|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|x64.ActiveCfg = Debug|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|x64.Build.0 = Debug|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|x86.ActiveCfg = Debug|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Debug|x86.Build.0 = Debug|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|Any CPU.Build.0 = Release|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|x64.ActiveCfg = Release|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|x64.Build.0 = Release|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|x86.ActiveCfg = Release|Any CPU - {7720E5B8-74AA-4B32-A3C2-3793B5ADE7C9}.Release|x86.Build.0 = Release|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Debug|x64.ActiveCfg = Debug|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Debug|x64.Build.0 = Debug|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Debug|x86.ActiveCfg = Debug|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Debug|x86.Build.0 = Debug|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Release|Any CPU.Build.0 = Release|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Release|x64.ActiveCfg = Release|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Release|x64.Build.0 = Release|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Release|x86.ActiveCfg = Release|Any CPU + {8A9D5FC4-E3FB-47FA-8253-6A68B604111D}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From d35053446a672d5169df303f60e38fb60f036c89 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 2 Dec 2021 10:09:12 +0700 Subject: [PATCH 05/69] add api fetch to front-end --- TBSReact/ClientApp/package-lock.json | 15 +++++ TBSReact/ClientApp/package.json | 1 + TBSReact/ClientApp/src/components/Counter.js | 31 ---------- .../ClientApp/src/components/FetchData.js | 59 ------------------- TBSReact/ClientApp/src/components/Home.js | 26 -------- TBSReact/Controllers/AccountController.cs | 5 +- TBSReact/Singleton/AccountManager.cs | 22 ------- TbsReact/ClientApp/src/api/Account.js | 36 +++++++++++ TbsReact/Startup.cs | 18 +++++- 9 files changed, 72 insertions(+), 141 deletions(-) delete mode 100644 TBSReact/ClientApp/src/components/Counter.js delete mode 100644 TBSReact/ClientApp/src/components/FetchData.js delete mode 100644 TBSReact/ClientApp/src/components/Home.js create mode 100644 TbsReact/ClientApp/src/api/Account.js diff --git a/TBSReact/ClientApp/package-lock.json b/TBSReact/ClientApp/package-lock.json index ffab142f3..11487e4b1 100644 --- a/TBSReact/ClientApp/package-lock.json +++ b/TBSReact/ClientApp/package-lock.json @@ -3372,6 +3372,21 @@ "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.3.2.tgz", "integrity": "sha512-5LMaDRWm8ZFPAEdzTYmgjjEdj1YnQcpfrVajO/sn/LhbpGp0Y0H64c2hLZI1gRMxfA+w1S71Uc/nHaOXgcCvGg==" }, + "axios": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "requires": { + "follow-redirects": "^1.14.4" + }, + "dependencies": { + "follow-redirects": { + "version": "1.14.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", + "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==" + } + } + }, "axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", diff --git a/TBSReact/ClientApp/package.json b/TBSReact/ClientApp/package.json index 8e89cf387..892ff0447 100644 --- a/TBSReact/ClientApp/package.json +++ b/TBSReact/ClientApp/package.json @@ -7,6 +7,7 @@ "@emotion/styled": "^11.6.0", "@mui/icons-material": "^5.2.0", "@mui/material": "^5.2.2", + "axios": "^0.24.0", "bootstrap": "^5.1.0", "eslint-config-standard": "^16.0.3", "eslint-plugin-node": "^11.1.0", diff --git a/TBSReact/ClientApp/src/components/Counter.js b/TBSReact/ClientApp/src/components/Counter.js deleted file mode 100644 index 9a4ec746b..000000000 --- a/TBSReact/ClientApp/src/components/Counter.js +++ /dev/null @@ -1,31 +0,0 @@ -import React, { Component } from 'react'; - -export class Counter extends Component { - static displayName = Counter.name; - - constructor(props) { - super(props); - this.state = { currentCount: 0 }; - this.incrementCounter = this.incrementCounter.bind(this); - } - - incrementCounter() { - this.setState({ - currentCount: this.state.currentCount + 1 - }); - } - - render() { - return ( -
-

Counter

- -

This is a simple example of a React component.

- -

Current count: {this.state.currentCount}

- - -
- ); - } -} diff --git a/TBSReact/ClientApp/src/components/FetchData.js b/TBSReact/ClientApp/src/components/FetchData.js deleted file mode 100644 index 25d920654..000000000 --- a/TBSReact/ClientApp/src/components/FetchData.js +++ /dev/null @@ -1,59 +0,0 @@ -import React, { Component } from 'react'; - -export class FetchData extends Component { - static displayName = FetchData.name; - - constructor(props) { - super(props); - this.state = { forecasts: [], loading: true }; - } - - componentDidMount() { - this.populateWeatherData(); - } - - static renderForecastsTable(forecasts) { - return ( - - - - - - - - - - - {forecasts.map(forecast => - - - - - - - )} - -
DateTemp. (C)Temp. (F)Summary
{forecast.date}{forecast.temperatureC}{forecast.temperatureF}{forecast.summary}
- ); - } - - render() { - let contents = this.state.loading - ?

Loading...

- : FetchData.renderForecastsTable(this.state.forecasts); - - return ( -
-

Weather forecast

-

This component demonstrates fetching data from the server.

- {contents} -
- ); - } - - async populateWeatherData() { - const response = await fetch('weatherforecast'); - const data = await response.json(); - this.setState({ forecasts: data, loading: false }); - } -} diff --git a/TBSReact/ClientApp/src/components/Home.js b/TBSReact/ClientApp/src/components/Home.js deleted file mode 100644 index 7f6b28e71..000000000 --- a/TBSReact/ClientApp/src/components/Home.js +++ /dev/null @@ -1,26 +0,0 @@ -import React, { Component } from 'react'; - -export class Home extends Component { - static displayName = Home.name; - - render () { - return ( -
-

Hello, world!

-

Welcome to your new single-page application, built with:

- -

To help you get started, we have also set up:

-
    -
  • Client-side navigation. For example, click Counter then Back to return here.
  • -
  • Development server integration. In development mode, the development server from create-react-app runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.
  • -
  • Efficient production builds. In production mode, development-time features are disabled, and your dotnet publish configuration produces minified, efficiently bundled JavaScript files.
  • -
-

The ClientApp subdirectory is a standard React application based on the create-react-app template. If you open a command prompt in that directory, you can run npm commands such as npm test or npm install.

-
- ); - } -} diff --git a/TBSReact/Controllers/AccountController.cs b/TBSReact/Controllers/AccountController.cs index 84276b1be..1d6c32892 100644 --- a/TBSReact/Controllers/AccountController.cs +++ b/TBSReact/Controllers/AccountController.cs @@ -4,6 +4,7 @@ using TbsReact.Extension; using System.Collections.Generic; using TbsCore.Database; +using System; namespace TbsReact.Controllers { @@ -27,7 +28,7 @@ public ActionResult> GetAccounts() [HttpGet("{index:int}")] public ActionResult GetAccount(int index) { - if (index < 0 | index > AccountManager.Instance.Accounts.Count) + if (index < 0 || index > AccountManager.Instance.Accounts.Count - 1) { return NotFound(); } @@ -47,7 +48,7 @@ public ActionResult AddAccount([FromBody] Account data) return Ok(); } - [HttpPut("{index:int}")] + [HttpPatch("{index:int}")] public ActionResult EditAccount(int index, [FromBody] Account data) { if (index < 0 || index > AccountManager.Instance.Accounts.Count - 1) diff --git a/TBSReact/Singleton/AccountManager.cs b/TBSReact/Singleton/AccountManager.cs index 98ba1238e..b12bd1724 100644 --- a/TBSReact/Singleton/AccountManager.cs +++ b/TBSReact/Singleton/AccountManager.cs @@ -6,7 +6,6 @@ using TbsReact.Models; namespace TbsReact.Singleton - { public sealed class AccountManager { @@ -39,31 +38,10 @@ public static AccountManager Instance public static Account GetAccount(int index, TbsCore.Models.AccModels.Account acc) { - var accesses = new List(); - - for (int i = 0; i < acc.Access.AllAccess.Count; i++) - { - var access = acc.Access.AllAccess[i]; - accesses.Add(new Access - { - Id = i, - Password = access.Password, - Proxy = new Proxy - { - Ip = access.Proxy, - Port = access.ProxyPort, - Username = access.ProxyUsername, - Password = access.Password, - OK = access.Ok - } - }); - } return new Account { - Id = index, Name = acc.AccInfo.Nickname, ServerUrl = acc.AccInfo.ServerUrl, - Accesses = accesses }; } diff --git a/TbsReact/ClientApp/src/api/Account.js b/TbsReact/ClientApp/src/api/Account.js new file mode 100644 index 000000000..72f6c0bdc --- /dev/null +++ b/TbsReact/ClientApp/src/api/Account.js @@ -0,0 +1,36 @@ +import axios from 'axios' + +const getAccounts = async () => { + try { + const {data} = await axios.get("/accounts"); + return data; + } + catch (e) { + console.log(e); + } +} + +const getAccount = async (index) => { + try { + const {data} = await axios.get(`/accounts/${index}`); + return data; + } + catch (e) { + console.log(e); + } +} +const addAccount = async (data) => { + try { + await axios.post('/accounts', data); + } catch (e) { + console.log(e); + } +} + +const deleteAccount = async (index) => { + try { + await axios.delete(`/accounts/${index}`); + } catch (e) { + console.log(e); + } +} \ No newline at end of file diff --git a/TbsReact/Startup.cs b/TbsReact/Startup.cs index 83d40f929..55766f4b2 100644 --- a/TbsReact/Startup.cs +++ b/TbsReact/Startup.cs @@ -5,6 +5,8 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using System; +using TbsReact.Singleton; namespace TbsReact { @@ -20,6 +22,7 @@ public Startup(IConfiguration configuration) // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { + services.AddSingleton(AccountManager.Instance); services.AddControllersWithViews(); // In production, the React files will be served from this directory @@ -30,7 +33,7 @@ public void ConfigureServices(IServiceCollection services) } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime lifetime) { if (env.IsDevelopment()) { @@ -65,6 +68,19 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) spa.UseProxyToSpaDevelopmentServer("http://localhost:3000"); } }); + + lifetime.ApplicationStopping.Register(OnShutdown, true); + + lifetime.ApplicationStopped.Register(() => + { + Console.WriteLine("*** Application is shut down ***"); + }, true); + } + + private void OnShutdown() + { + AccountManager.Instance.SaveAccounts(); + Console.WriteLine("*** Account saved ***"); } } } \ No newline at end of file From dab2e4a634eb036e6a6339bfdb825318462631a1 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 3 Dec 2021 01:55:58 +0700 Subject: [PATCH 06/69] add UI & api for account & accesses part --- TBSReact/ClientApp/src/App.js | 2 +- TBSReact/ClientApp/src/api/Accounts/Access.js | 13 ++ .../ClientApp/src/api/Accounts}/Account.js | 11 +- .../src/components/sidebar/AccountRow.js | 20 +- .../src/components/sidebar/AccountTable.js | 56 +++--- .../src/components/sidebar/Modal/AccessRow.js | 14 +- .../components/sidebar/Modal/AccountModal.js | 184 +++++++++++------- .../src/components/sidebar/SideBar.js | 4 +- TBSReact/ClientApp/src/index.js | 6 - TBSReact/ClientApp/src/reportWebVitals.js | 13 -- .../Controllers/Account/AccessesController.cs | 30 +++ .../{ => Account}/AccountController.cs | 44 +++-- TBSReact/Extension/AccessExtension.cs | 25 +++ TBSReact/Models/Account.cs | 2 - TBSReact/Models/NewAccount.cs | 10 + TBSReact/Singleton/AccountManager.cs | 13 -- TBSReact/Singleton/Datas/AccountData.cs | 59 ++++++ TbsReact/Extension/AccountExtension.cs | 7 +- TbsReact/Startup.cs | 3 +- 19 files changed, 339 insertions(+), 177 deletions(-) create mode 100644 TBSReact/ClientApp/src/api/Accounts/Access.js rename {TbsReact/ClientApp/src/api => TBSReact/ClientApp/src/api/Accounts}/Account.js (74%) delete mode 100644 TBSReact/ClientApp/src/reportWebVitals.js create mode 100644 TBSReact/Controllers/Account/AccessesController.cs rename TBSReact/Controllers/{ => Account}/AccountController.cs (63%) create mode 100644 TBSReact/Extension/AccessExtension.cs create mode 100644 TBSReact/Models/NewAccount.cs create mode 100644 TBSReact/Singleton/Datas/AccountData.cs diff --git a/TBSReact/ClientApp/src/App.js b/TBSReact/ClientApp/src/App.js index 2d811524c..9a3f3596f 100644 --- a/TBSReact/ClientApp/src/App.js +++ b/TBSReact/ClientApp/src/App.js @@ -3,7 +3,7 @@ import Layout from './components/Layout'; import './custom.css' const App = () => { - const [selected, setSelected] = useState(0); + const [selected, setSelected] = useState(-1); useEffect(() => { console.log(selected); }, [selected]) diff --git a/TBSReact/ClientApp/src/api/Accounts/Access.js b/TBSReact/ClientApp/src/api/Accounts/Access.js new file mode 100644 index 000000000..9b465c6ed --- /dev/null +++ b/TBSReact/ClientApp/src/api/Accounts/Access.js @@ -0,0 +1,13 @@ +import axios from 'axios' + +const getAccesses = async (index) => { + try { + const {data} = await axios.get(`/accounts/${index}/accesses`); + return data; + } + catch (e) { + console.log(e); + } +} + +export {getAccesses} \ No newline at end of file diff --git a/TbsReact/ClientApp/src/api/Account.js b/TBSReact/ClientApp/src/api/Accounts/Account.js similarity index 74% rename from TbsReact/ClientApp/src/api/Account.js rename to TBSReact/ClientApp/src/api/Accounts/Account.js index 72f6c0bdc..b5ce2aa26 100644 --- a/TbsReact/ClientApp/src/api/Account.js +++ b/TBSReact/ClientApp/src/api/Accounts/Account.js @@ -26,6 +26,13 @@ const addAccount = async (data) => { console.log(e); } } +const editAccount = async (index, data) => { + try { + await axios.patch(`/accounts/${index}`, data); + } catch (e) { + console.log(e); + } +} const deleteAccount = async (index) => { try { @@ -33,4 +40,6 @@ const deleteAccount = async (index) => { } catch (e) { console.log(e); } -} \ No newline at end of file +} + +export {getAccounts, getAccount, addAccount, editAccount, deleteAccount}; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/components/sidebar/AccountRow.js b/TBSReact/ClientApp/src/components/sidebar/AccountRow.js index a4d862ca2..133886c46 100644 --- a/TBSReact/ClientApp/src/components/sidebar/AccountRow.js +++ b/TBSReact/ClientApp/src/components/sidebar/AccountRow.js @@ -1,15 +1,19 @@ import { TableCell, TableRow } from "@mui/material"; -const AccountRow = ({acc, handler, selected}) => { +const AccountRow = ({ accounts, handler, selected }) => { + const rows = accounts.map(account => ( + handler(account)} + selected={account.id === selected} + key = {account.id}> + {account.name} + {account.serverUrl} + + )) return ( <> - handler(acc)} - selected = {acc.Id === selected}> - {acc.Username} - {acc.ServerUrl} - + {rows} ) } diff --git a/TBSReact/ClientApp/src/components/sidebar/AccountTable.js b/TBSReact/ClientApp/src/components/sidebar/AccountTable.js index 77668cd6d..5fbb0def7 100644 --- a/TBSReact/ClientApp/src/components/sidebar/AccountTable.js +++ b/TBSReact/ClientApp/src/components/sidebar/AccountTable.js @@ -1,42 +1,40 @@ import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'; -import React from 'react' +import React, { useEffect, useState } from 'react' +import { getAccounts } from '../../api/Accounts/Account'; import AccountRow from './AccountRow' const AccountTable = ({ selected, setSelected }) => { + + const [accounts, setAccounts] = useState([]); const onClick = (acc) => { - setSelected(acc.Id) + setSelected(acc.id) }; - const accs = [ - { Id: 0, Username: "alsdao", ServerUrl: "ts50.x5.america.travian.com" }, - { Id: 1, Username: "alo", ServerUrl: "sadasd" }, - { Id: 2, Username: "ao", ServerUrl: "sadasd" }, - { Id: 3, Username: "a2lo", ServerUrl: "sadasd" }, - { Id: 4, Username: "al3o", ServerUrl: "sadasd" }, - { Id: 5, Username: "al4o", ServerUrl: "sadasd" }, - { Id: 6, Username: "al5o", ServerUrl: "sadasd" }, - ] - const accsNode = accs.map((acc) => ( - ) - ) + useEffect(() => { + const fetchAccount = async () => { + const data = await getAccounts(); + setAccounts(data) + } + fetchAccount(); + }, [selected]); return ( <> - - - - - Username - Server url - - - - {accsNode} - -
-
+ + + + + Username + Server url + + + + + +
+
) } diff --git a/TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js b/TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js index eef426185..b0a6ea363 100644 --- a/TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js +++ b/TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js @@ -1,16 +1,20 @@ import { TableCell, TableRow } from "@mui/material"; -const AccountRow = ({access, handler, selected}) => { - return ( - <> +const AccountRow = ({accesses, handler, selected}) => { + const rows = accesses.map( access => ( handler(access)} - selected = {access.id === selected}> - {[access.proxy.ip, ':', access.proxy.port].join()} + selected = {access.id === selected} + key = {access.id}> + {[access.proxy.ip, ':', access.proxy.port].join('')} {access.proxy.username} {access.proxy.OK === true ? "✔" : "❌"} + )) + return ( + <> + {rows} ) } diff --git a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index e2a9e3cff..11477f18a 100644 --- a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -1,5 +1,8 @@ import { useEffect, useState } from 'react'; import { Modal, Button, Box, Typography, Input, Table, TableHead, TableCell } from '@mui/material'; + +import { getAccount, addAccount } from '../../../api/Accounts/Account'; +import { getAccesses } from '../../../api/Accounts/Access'; import AccessRow from './AccessRow'; const style = { @@ -13,8 +16,8 @@ const style = { p: 4, }; -const AccountModal = ({ editMode = false, accID = -1 }) => { - const [selected, setSelected] = useState(0); +const AccountModal = ({ editMode = false, accID = -1, setAccID}) => { + const [selected, setSelected] = useState(-1); const [open, setOpen] = useState(false); const [accesses, setAccesses] = useState([]); @@ -27,47 +30,70 @@ const AccountModal = ({ editMode = false, accID = -1 }) => { const [proxyUsername, setProxyUsername] = useState(""); const [proxyPassword, setProxyPassword] = useState(""); + useEffect(() => { + if (selected !== -1) { + setPassword(accesses[selected].password) + setProxyIP(accesses[selected].proxy.ip) + setProxyPort(accesses[selected].proxy.port) + setProxyUsername(accesses[selected].proxy.username) + setProxyPassword(accesses[selected].proxy.password) + } + }, [accesses, selected]); + + useEffect(() => { + if (accID !== -1) { + + const fetchAccount = async () => { + const getPromise = [getAccount(accID), getAccesses(accID)]; + const [{ name, serverUrl }, accesses] = await Promise.all(getPromise); + setUsername(name) + setServer(serverUrl) + setAccesses(accesses) + } + + fetchAccount(); + } + }, [accID]) - const handleOpen = () => setOpen(true); - const handleClose = () => setOpen(false); + + const handleOpen = () => { + if (editMode === true && accID === -1) { + alert("Cannot edit if you didn't choose account to edit") + } + else { + setOpen(true); + } + } + const handleClose = () => { + console.log("Setaccid", setAccID) + setAccID(-1) + setOpen(false); + } const onClickTable = (access) => { setSelected(access.id) }; - const onClickAdd = () => { + const onClickAdd = async () => { const newAccess = { id: accesses.length, password: password, proxy: { ip: proxyIP, port: proxyPort, username: proxyUsername, password: proxyPassword, ok: false } } - setAccesses([...accesses, newAccess]) - console.log(newAccess) - update(); + setAccesses(old => [...old, newAccess]) } const onClickEdit = () => { const newAccess = { id: selected, password: password, proxy: { ip: proxyIP, port: proxyPort, username: proxyUsername, password: proxyPassword, ok: false } } - setAccesses( (old) => {old[selected] = newAccess; return old}) - console.log(newAccess) - update(); - + setAccesses((old) => { old[selected] = newAccess; return old }) } const onClickDelete = () => { - console.log("delete", selected); - update(); - + setAccesses((accesses) => accesses.filter(access => access.id !== selected)) } - useEffect(() => { - console.log("access", selected) - }, [selected]); - - let accessNode = null; - const update = () => { - accessNode = accesses.map((access) => ( - ) - ); + const onClickAddAccount = async () => { + const data = { account: { name: username, serverUrl: server }, accesses: accesses }; + await addAccount(data) + console.log(data); + handleClose(); } - - return ( <> - + { {editMode === true ? "Add account" : "Edit account"} - - - + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +
- Username - - setUsername(e.target.value)} /> -
+ Username + + setUsername(e.target.value)} /> + + Server + + setServer(e.target.value)} /> +
- Server + Password - setServer(e.target.value)} /> + setPassword(e.target.value)} />
- Password - - setPassword(e.target.value)} /> -
- Proxy IP - - setProxyIP(e.target.value)} /> - - Proxy username - - setProxyUsername(e.target.value)} /> -
- Proxy Port - - setProxyPort(e.target.value)} /> - - Proxy password - - setProxyPassword(e.target.value)} /> -
+ Proxy IP + + setProxyIP(e.target.value)} /> + + Proxy username + + setProxyUsername(e.target.value)} /> +
+ Proxy Port + + setProxyPort(e.target.value)} /> + + Proxy password + + setProxyPassword(e.target.value)} /> +
@@ -146,8 +174,16 @@ const AccountModal = ({ editMode = false, accID = -1 }) => { Proxy username OK - {accessNode} +
+ + + +
+ + + +
diff --git a/TBSReact/ClientApp/src/components/sidebar/SideBar.js b/TBSReact/ClientApp/src/components/sidebar/SideBar.js index a99c796dc..afdbabf3d 100644 --- a/TBSReact/ClientApp/src/components/sidebar/SideBar.js +++ b/TBSReact/ClientApp/src/components/sidebar/SideBar.js @@ -35,8 +35,8 @@ const SideBar = ({ selected, setSelected }) => { - - + + ) diff --git a/TBSReact/ClientApp/src/index.js b/TBSReact/ClientApp/src/index.js index fbb3bcc6d..89be37de7 100644 --- a/TBSReact/ClientApp/src/index.js +++ b/TBSReact/ClientApp/src/index.js @@ -4,7 +4,6 @@ import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import App from './App'; import * as serviceWorkerRegistration from './serviceWorkerRegistration'; -import reportWebVitals from './reportWebVitals'; const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); const rootElement = document.getElementById('root'); @@ -19,8 +18,3 @@ ReactDOM.render( // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://cra.link/PWA serviceWorkerRegistration.unregister(); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/TBSReact/ClientApp/src/reportWebVitals.js b/TBSReact/ClientApp/src/reportWebVitals.js deleted file mode 100644 index 532f29b0b..000000000 --- a/TBSReact/ClientApp/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = (onPerfEntry) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/TBSReact/Controllers/Account/AccessesController.cs b/TBSReact/Controllers/Account/AccessesController.cs new file mode 100644 index 000000000..c475994e7 --- /dev/null +++ b/TBSReact/Controllers/Account/AccessesController.cs @@ -0,0 +1,30 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; +using TbsReact.Singleton; +using TbsReact.Extension; +using System.Collections.Generic; +using TbsCore.Database; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("accounts/{indexAcc:int}/accesses")] + public class AccessesControler : ControllerBase + { + [HttpGet] + public ActionResult> GetAccesses(int indexAcc) + { + if (indexAcc < 0 || indexAcc > AccountManager.Instance.Accounts.Count - 1) + { + return NotFound(); + } + var accesses = new List(); + for (int i = 0; i < AccountManager.Instance.Accounts[indexAcc].Access.AllAccess.Count; i++) + { + accesses.Add(AccountManager.Instance.Accounts[indexAcc].Access.AllAccess[i].GetAccount(i)); + } + + return accesses; + } + } +} \ No newline at end of file diff --git a/TBSReact/Controllers/AccountController.cs b/TBSReact/Controllers/Account/AccountController.cs similarity index 63% rename from TBSReact/Controllers/AccountController.cs rename to TBSReact/Controllers/Account/AccountController.cs index 1d6c32892..5f4237368 100644 --- a/TBSReact/Controllers/AccountController.cs +++ b/TBSReact/Controllers/Account/AccountController.cs @@ -16,10 +16,9 @@ public class AccountController : ControllerBase public ActionResult> GetAccounts() { var AccountInfoList = new List(); - - for (int i = 0; i < AccountManager.Instance.Accounts.Count; i++) + for (int i = 0; i < AccountData.Accounts.Count; i++) { - AccountInfoList.Add(AccountManager.GetAccount(i, AccountManager.Instance.Accounts[i])); + AccountInfoList.Add(AccountData.Accounts[i]); } return AccountInfoList; @@ -32,42 +31,52 @@ public ActionResult GetAccount(int index) { return NotFound(); } - return AccountManager.GetAccount(index, AccountManager.Instance.Accounts[index]); + return AccountData.GetAccount(index); } [HttpPost] - public ActionResult AddAccount([FromBody] Account data) + public ActionResult AddAccount([FromBody] NewAccount data) { - if (string.IsNullOrEmpty(data.Name) || - string.IsNullOrEmpty(data.ServerUrl)) return BadRequest(); - - var acc = data.GetAccount(); + var account = data.Account; + var accesses = data.Accesses; + if (string.IsNullOrEmpty(account.Name) + || string.IsNullOrEmpty(account.ServerUrl)) + { + return BadRequest(); + } + var acc = account.GetAccount(accesses); DbRepository.SaveAccount(acc); AccountManager.Instance.Accounts.Add(acc); + AccountData.AddAccount(account); return Ok(); } [HttpPatch("{index:int}")] - public ActionResult EditAccount(int index, [FromBody] Account data) + public ActionResult EditAccount(int index, [FromBody] NewAccount data) { if (index < 0 || index > AccountManager.Instance.Accounts.Count - 1) { return NotFound(); } + var account = data.Account; + var accesses = data.Accesses; - if (string.IsNullOrEmpty(data.Name) || - string.IsNullOrEmpty(data.ServerUrl)) return BadRequest(); + if (string.IsNullOrEmpty(account.Name) || + string.IsNullOrEmpty(account.ServerUrl)) + { + return BadRequest(); + } var acc = AccountManager.Instance.Accounts[index]; - acc.AccInfo.Nickname = data.Name; - acc.AccInfo.ServerUrl = data.ServerUrl; + acc.AccInfo.Nickname = account.Name; + acc.AccInfo.ServerUrl = account.ServerUrl; acc.Access.AllAccess.Clear(); - foreach (var access in data.Accesses) + foreach (var access in accesses) { - acc.Access.AddNewAccess(new TbsCore.Models.Access.Access + acc.Access.AllAccess.Add(new TbsCore.Models.Access.Access { Password = access.Password, Proxy = access.Proxy.Ip, @@ -76,9 +85,7 @@ public ActionResult EditAccount(int index, [FromBody] Account data) ProxyPassword = access.Proxy.Password, }); } - DbRepository.SaveAccount(acc); - return Ok(); } @@ -92,6 +99,7 @@ public ActionResult DeleteAccount(int index) DbRepository.RemoveAccount(AccountManager.Instance.Accounts[index]); AccountManager.Instance.Accounts.RemoveAt(index); + AccountData.DeleteAccount(index); return Ok(); } diff --git a/TBSReact/Extension/AccessExtension.cs b/TBSReact/Extension/AccessExtension.cs new file mode 100644 index 000000000..dad1c27e9 --- /dev/null +++ b/TBSReact/Extension/AccessExtension.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using TbsReact.Models; + +namespace TbsReact.Extension +{ + public static class AccessExtension + { + public static Access GetAccount(this TbsCore.Models.Access.Access access, int index) + { + return new Access + { + Id = index, + Password = access.Password, + Proxy = new Proxy + { + Ip = access.Proxy, + Port = access.ProxyPort, + Username = access.ProxyUsername, + Password = access.ProxyPassword, + OK = access.Ok + } + }; + } + } +} \ No newline at end of file diff --git a/TBSReact/Models/Account.cs b/TBSReact/Models/Account.cs index 16c6f30a2..1b2d8f790 100644 --- a/TBSReact/Models/Account.cs +++ b/TBSReact/Models/Account.cs @@ -7,7 +7,5 @@ public class Account public int Id { get; set; } public string Name { get; set; } public string ServerUrl { get; set; } - - public List Accesses { get; set; } } } \ No newline at end of file diff --git a/TBSReact/Models/NewAccount.cs b/TBSReact/Models/NewAccount.cs new file mode 100644 index 000000000..e0ecf3841 --- /dev/null +++ b/TBSReact/Models/NewAccount.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace TbsReact.Models +{ + public class NewAccount + { + public Account Account { get; set; } + public List Accesses { get; set; } + } +} \ No newline at end of file diff --git a/TBSReact/Singleton/AccountManager.cs b/TBSReact/Singleton/AccountManager.cs index b12bd1724..53247c4e5 100644 --- a/TBSReact/Singleton/AccountManager.cs +++ b/TBSReact/Singleton/AccountManager.cs @@ -19,10 +19,6 @@ public List Accounts set { accounts = value; } } - static AccountManager() - { - } - private AccountManager() { LoadAccounts(); @@ -36,15 +32,6 @@ public static AccountManager Instance } } - public static Account GetAccount(int index, TbsCore.Models.AccModels.Account acc) - { - return new Account - { - Name = acc.AccInfo.Nickname, - ServerUrl = acc.AccInfo.ServerUrl, - }; - } - private void LoadAccounts() { // For migration purposes only! Remove after few versions diff --git a/TBSReact/Singleton/Datas/AccountData.cs b/TBSReact/Singleton/Datas/AccountData.cs new file mode 100644 index 000000000..c9b71bdfa --- /dev/null +++ b/TBSReact/Singleton/Datas/AccountData.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; +using System.Linq; +using TbsReact.Models; + +namespace TbsReact.Singleton +{ + public sealed class AccountData + { + private static readonly AccountData _instance = new(); + private List _accounts = new(); + + private AccountData() + { + for (int i = 0; i < AccountManager.Instance.Accounts.Count; i++) + { + _accounts.Add(new Account + { + Id = i, + Name = AccountManager.Instance.Accounts[i].AccInfo.Nickname, + ServerUrl = AccountManager.Instance.Accounts[i].AccInfo.ServerUrl, + }); + } + } + + public static List Accounts => Instance._accounts; + + public static Account GetAccount(int index) + { + if (index < 0 || index > Accounts.Count + 1) return null; + return Accounts[index]; + } + + public static void AddAccount(Account account) + { + account.Id = Accounts.Last().Id + 1; + Accounts.Add(account); + } + + public static bool EditAccount(int index, Account account) + { + if (index < 0 || index > Accounts.Count + 1) return false; + if (account == null) return false; + + Accounts[index] = account; + return true; + } + + public static bool DeleteAccount(int index) + { + if (index < 0 || index > Accounts.Count + 1) return false; + return Accounts.Remove(Accounts.FirstOrDefault(x => x.Id == index)); + } + + public static AccountData Instance + { + get { return _instance; } + } + } +} \ No newline at end of file diff --git a/TbsReact/Extension/AccountExtension.cs b/TbsReact/Extension/AccountExtension.cs index a7f64c1da..29088b112 100644 --- a/TbsReact/Extension/AccountExtension.cs +++ b/TbsReact/Extension/AccountExtension.cs @@ -1,10 +1,11 @@ -using TbsReact.Models; +using System.Collections.Generic; +using TbsReact.Models; namespace TbsReact.Extension { public static class AccountExtension { - public static TbsCore.Models.AccModels.Account GetAccount(this Account accout) + public static TbsCore.Models.AccModels.Account GetAccount(this Account accout, List accesses) { var acc = new TbsCore.Models.AccModels.Account(); acc.Init(); @@ -12,7 +13,7 @@ public static TbsCore.Models.AccModels.Account GetAccount(this Account accout) acc.AccInfo.Nickname = accout.Name; acc.AccInfo.ServerUrl = accout.ServerUrl; - foreach (var access in accout.Accesses) + foreach (var access in accesses) { acc.Access.AllAccess.Add(new TbsCore.Models.Access.Access { diff --git a/TbsReact/Startup.cs b/TbsReact/Startup.cs index 55766f4b2..3e420a977 100644 --- a/TbsReact/Startup.cs +++ b/TbsReact/Startup.cs @@ -1,7 +1,5 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; -using Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -23,6 +21,7 @@ public Startup(IConfiguration configuration) public void ConfigureServices(IServiceCollection services) { services.AddSingleton(AccountManager.Instance); + services.AddSingleton(AccountData.Instance); services.AddControllersWithViews(); // In production, the React files will be served from this directory From 2f2c5e5454bd35012c7ba5d550c2e260b38c7c12 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 3 Dec 2021 12:45:07 +0700 Subject: [PATCH 07/69] make account editor look nicer (but still awful) --- .../components/sidebar/Modal/AccountModal.js | 106 ++++++++---------- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index 11477f18a..9fcf11f78 100644 --- a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { Modal, Button, Box, Typography, Input, Table, TableHead, TableCell } from '@mui/material'; +import { Modal, Button, Box, Typography, Input, Table, TableHead, TableCell, Grid } from '@mui/material'; import { getAccount, addAccount } from '../../../api/Accounts/Account'; import { getAccesses } from '../../../api/Accounts/Access'; @@ -14,9 +14,10 @@ const style = { border: '2px solid #000', boxShadow: 24, p: 4, + width:"80%" }; -const AccountModal = ({ editMode = false, accID = -1, setAccID}) => { +const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { const [selected, setSelected] = useState(-1); const [open, setOpen] = useState(false); const [accesses, setAccesses] = useState([]); @@ -103,60 +104,51 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID}) => { {editMode === true ? "Add account" : "Edit account"} - - - - - - - - - - - - - - - - - - - - - - - - - -
- Username - - setUsername(e.target.value)} /> - - Server - - setServer(e.target.value)} /> -
- Password - - setPassword(e.target.value)} /> -
- Proxy IP - - setProxyIP(e.target.value)} /> - - Proxy username - - setProxyUsername(e.target.value)} /> -
- Proxy Port - - setProxyPort(e.target.value)} /> - - Proxy password - - setProxyPassword(e.target.value)} /> -
+
+ + + Username + + + setUsername(e.target.value)} /> + + + Server + + + setServer(e.target.value)} /> + + + Password + + + setPassword(e.target.value)} /> + + + Proxy IP + + + setProxyIP(e.target.value)} /> + + + Proxy username + + + setProxyUsername(e.target.value)} /> + + + Proxy Port + + + setProxyPort(e.target.value)} /> + + + Proxy password + + + setProxyPassword(e.target.value)} /> + +
@@ -172,7 +164,7 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID}) => { Proxy Proxy username - OK + Is working
From 49e9e86883f8095348f62113852696208cba29c2 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 3 Dec 2021 15:49:53 +0700 Subject: [PATCH 08/69] add UI & api for driver things (login/logout/..) --- .../components/sidebar/Modal/AccountModal.js | 2 +- .../src/components/sidebar/SideBar.js | 57 +++++++++++++-- .../Controllers/Account/AccessesController.cs | 9 +-- .../Controllers/Account/AccountController.cs | 28 +++++--- TBSReact/Singleton/AccountManager.cs | 19 +++-- TBSReact/Singleton/Datas/AccountData.cs | 17 +++-- TbsReact/ClientApp/src/api/Accounts/Driver.js | 33 +++++++++ .../Controllers/Account/DriverController.cs | 72 +++++++++++++++++++ 8 files changed, 196 insertions(+), 41 deletions(-) create mode 100644 TbsReact/ClientApp/src/api/Accounts/Driver.js create mode 100644 TbsReact/Controllers/Account/DriverController.cs diff --git a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index 9fcf11f78..8ac53ce4c 100644 --- a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -121,7 +121,7 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { Password - + setPassword(e.target.value)} /> diff --git a/TBSReact/ClientApp/src/components/sidebar/SideBar.js b/TBSReact/ClientApp/src/components/sidebar/SideBar.js index afdbabf3d..066ef1c20 100644 --- a/TBSReact/ClientApp/src/components/sidebar/SideBar.js +++ b/TBSReact/ClientApp/src/components/sidebar/SideBar.js @@ -1,12 +1,17 @@ -import React from "react" -import { Drawer, IconButton } from "@mui/material" +import { useState } from "react" +import { Drawer, IconButton, Grid, Button } from "@mui/material" import MenuIcon from '@mui/icons-material/Menu'; import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; import AccountTable from "./AccountTable" import AccountModal from "./Modal/AccountModal" + +import { deleteAccount } from "../../api/Accounts/Account"; +import { login, logout, getStatus } from "../../api/Accounts/Driver"; + const SideBar = ({ selected, setSelected }) => { - const [open, setOpen] = React.useState(false); + const [open, setOpen] = useState(false); + const [status, setStatus] = useState(false); const handleDrawerOpen = () => { setOpen(true); }; @@ -14,6 +19,30 @@ const SideBar = ({ selected, setSelected }) => { const handleDrawerClose = () => { setOpen(false); }; + + const onDelete = async () => { + await deleteAccount(selected); + setSelected(-1) + } + + const onLog = async () => { + if (status === true) { + await logout(selected); + setStatus(await getStatus(selected)) + } + else { + await login(selected); + setStatus(await getStatus(selected)) + } + } + + const onLoginAll = () => { + + } + + const onLogoutAll = () => { + + } return ( @@ -35,8 +64,26 @@ const SideBar = ({ selected, setSelected }) => { - - + + + + + + + + + + + + + + + + + + + + ) diff --git a/TBSReact/Controllers/Account/AccessesController.cs b/TBSReact/Controllers/Account/AccessesController.cs index c475994e7..77fef9f6b 100644 --- a/TBSReact/Controllers/Account/AccessesController.cs +++ b/TBSReact/Controllers/Account/AccessesController.cs @@ -3,7 +3,6 @@ using TbsReact.Singleton; using TbsReact.Extension; using System.Collections.Generic; -using TbsCore.Database; namespace TbsReact.Controllers { @@ -14,14 +13,16 @@ public class AccessesControler : ControllerBase [HttpGet] public ActionResult> GetAccesses(int indexAcc) { - if (indexAcc < 0 || indexAcc > AccountManager.Instance.Accounts.Count - 1) + var account = AccountData.GetAccount(indexAcc); + if (account == null) { return NotFound(); } + var acc = AccountManager.GetAccount(account); var accesses = new List(); - for (int i = 0; i < AccountManager.Instance.Accounts[indexAcc].Access.AllAccess.Count; i++) + for (int i = 0; i < acc.Access.AllAccess.Count; i++) { - accesses.Add(AccountManager.Instance.Accounts[indexAcc].Access.AllAccess[i].GetAccount(i)); + accesses.Add(acc.Access.AllAccess[i].GetAccount(i)); } return accesses; diff --git a/TBSReact/Controllers/Account/AccountController.cs b/TBSReact/Controllers/Account/AccountController.cs index 5f4237368..bf212968a 100644 --- a/TBSReact/Controllers/Account/AccountController.cs +++ b/TBSReact/Controllers/Account/AccountController.cs @@ -27,11 +27,12 @@ public ActionResult> GetAccounts() [HttpGet("{index:int}")] public ActionResult GetAccount(int index) { - if (index < 0 || index > AccountManager.Instance.Accounts.Count - 1) + var acc = AccountData.GetAccount(index); + if (acc == null) { return NotFound(); } - return AccountData.GetAccount(index); + return acc; } [HttpPost] @@ -46,7 +47,7 @@ public ActionResult AddAccount([FromBody] NewAccount data) } var acc = account.GetAccount(accesses); DbRepository.SaveAccount(acc); - AccountManager.Instance.Accounts.Add(acc); + AccountManager.Accounts.Add(acc); AccountData.AddAccount(account); return Ok(); @@ -55,10 +56,6 @@ public ActionResult AddAccount([FromBody] NewAccount data) [HttpPatch("{index:int}")] public ActionResult EditAccount(int index, [FromBody] NewAccount data) { - if (index < 0 || index > AccountManager.Instance.Accounts.Count - 1) - { - return NotFound(); - } var account = data.Account; var accesses = data.Accesses; @@ -67,8 +64,15 @@ public ActionResult EditAccount(int index, [FromBody] NewAccount data) { return BadRequest(); } + var accountOld = AccountData.GetAccount(index); + if (accountOld == null) + { + return NotFound(); + } + + var acc = AccountManager.GetAccount(accountOld); - var acc = AccountManager.Instance.Accounts[index]; + AccountData.EditAccount(index, account); acc.AccInfo.Nickname = account.Name; acc.AccInfo.ServerUrl = account.ServerUrl; @@ -92,13 +96,15 @@ public ActionResult EditAccount(int index, [FromBody] NewAccount data) [HttpDelete("{index:int}")] public ActionResult DeleteAccount(int index) { - if (index < 0 || index > AccountManager.Instance.Accounts.Count - 1) + var account = AccountData.GetAccount(index); + if (account == null) { return NotFound(); } + var acc = AccountManager.GetAccount(account); - DbRepository.RemoveAccount(AccountManager.Instance.Accounts[index]); - AccountManager.Instance.Accounts.RemoveAt(index); + DbRepository.RemoveAccount(acc); + AccountManager.Accounts.Remove(acc); AccountData.DeleteAccount(index); return Ok(); diff --git a/TBSReact/Singleton/AccountManager.cs b/TBSReact/Singleton/AccountManager.cs index 53247c4e5..aca3dfcaa 100644 --- a/TBSReact/Singleton/AccountManager.cs +++ b/TBSReact/Singleton/AccountManager.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using System.Linq; using TbsCore.Database; using TbsCore.Helpers; @@ -13,10 +14,9 @@ public sealed class AccountManager private List accounts = new(); - public List Accounts + public static List Accounts { - get { return accounts; } - set { accounts = value; } + get { return Instance.accounts; } } private AccountManager() @@ -32,17 +32,14 @@ public static AccountManager Instance } } - private void LoadAccounts() + public static TbsCore.Models.AccModels.Account GetAccount(Account account) { - // For migration purposes only! Remove after few versions - if (IoHelperCore.AccountsTxtExists() && !IoHelperCore.SQLiteExists()) - { - DbRepository.SyncAccountsTxt(); - File.Delete(IoHelperCore.AccountsPath); - } + return Accounts.FirstOrDefault(x => x.AccInfo.Nickname.Equals(account.Name) && x.AccInfo.ServerUrl.Equals(account.ServerUrl)); + } + private void LoadAccounts() + { accounts = DbRepository.GetAccounts(); - accounts.ForEach(x => ObjectHelper.FixAccObj(x, x)); } diff --git a/TBSReact/Singleton/Datas/AccountData.cs b/TBSReact/Singleton/Datas/AccountData.cs index c9b71bdfa..10bd39285 100644 --- a/TBSReact/Singleton/Datas/AccountData.cs +++ b/TBSReact/Singleton/Datas/AccountData.cs @@ -11,13 +11,13 @@ public sealed class AccountData private AccountData() { - for (int i = 0; i < AccountManager.Instance.Accounts.Count; i++) + for (int i = 0; i < AccountManager.Accounts.Count; i++) { _accounts.Add(new Account { Id = i, - Name = AccountManager.Instance.Accounts[i].AccInfo.Nickname, - ServerUrl = AccountManager.Instance.Accounts[i].AccInfo.ServerUrl, + Name = AccountManager.Accounts[i].AccInfo.Nickname, + ServerUrl = AccountManager.Accounts[i].AccInfo.ServerUrl, }); } } @@ -26,8 +26,7 @@ private AccountData() public static Account GetAccount(int index) { - if (index < 0 || index > Accounts.Count + 1) return null; - return Accounts[index]; + return Accounts.FirstOrDefault(x => x.Id == index); } public static void AddAccount(Account account) @@ -38,16 +37,16 @@ public static void AddAccount(Account account) public static bool EditAccount(int index, Account account) { - if (index < 0 || index > Accounts.Count + 1) return false; - if (account == null) return false; + var current = Accounts.FirstOrDefault(x => x.Id == index); + if (current == null) return false; - Accounts[index] = account; + current.Name = account.Name; + current.ServerUrl = account.ServerUrl; return true; } public static bool DeleteAccount(int index) { - if (index < 0 || index > Accounts.Count + 1) return false; return Accounts.Remove(Accounts.FirstOrDefault(x => x.Id == index)); } diff --git a/TbsReact/ClientApp/src/api/Accounts/Driver.js b/TbsReact/ClientApp/src/api/Accounts/Driver.js new file mode 100644 index 000000000..5e9e302e7 --- /dev/null +++ b/TbsReact/ClientApp/src/api/Accounts/Driver.js @@ -0,0 +1,33 @@ +import axios from 'axios'; + +const login = async (index) => { + try { + await axios.post(`/accounts/${index}/login`); + return true; + } catch (e) { + console.log(e); + return false; + } +} + +const logout = async (index) => { + try { + await axios.post(`/accounts/${index}/logout`); + return true; + } catch (e) { + console.log(e); + return true; + } +} + +const getStatus = async (index) => { + try { + const { data } = await axios.get(`/accounts/${index}/status`); + return data; + } catch (e) { + console.log(e); + return false; + } +} + +export { login, logout, getStatus } \ No newline at end of file diff --git a/TbsReact/Controllers/Account/DriverController.cs b/TbsReact/Controllers/Account/DriverController.cs new file mode 100644 index 000000000..73d9a484b --- /dev/null +++ b/TbsReact/Controllers/Account/DriverController.cs @@ -0,0 +1,72 @@ +using Microsoft.AspNetCore.Mvc; +using System; +using System.Threading.Tasks; +using TbsCore.Helpers; +using TbsReact.Singleton; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("accounts/{index:int}")] + public class DriverController : ControllerBase + { + [HttpPost("login")] + public async Task Login(int index) + { + var account = AccountData.GetAccount(index); + if (account == null) + { + return NotFound(); + } + + var acc = AccountManager.GetAccount(account); + + if (acc.Access.AllAccess.Count > 0) + { + await IoHelperCore.LoginAccount(acc); + + return Ok(); + } + + return new BadRequestObjectResult("Account you are trying to login has no access defined. Please edit the account."); + } + + [HttpPost("logout")] + public ActionResult Logout(int index) + { + var account = AccountData.GetAccount(index); + if (account == null) + { + return NotFound(); + } + + var acc = AccountManager.GetAccount(account); + + if (acc.TaskTimer != null && acc.TaskTimer.IsBotRunning() == true) + { + IoHelperCore.Logout(acc); + return Ok(); + } + + return BadRequest(); + } + + [HttpGet("status")] + public ActionResult GetStatus(int index) + { + var account = AccountData.GetAccount(index); + if (account == null) + { + return NotFound(); + } + + var acc = AccountManager.GetAccount(account); + if (acc.TaskTimer != null && acc.TaskTimer.IsBotRunning() == true) + { + return true; + } + + return false; + } + } +} \ No newline at end of file From 65b5d832012588c971abfbc597ba30baf348d1b1 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 3 Dec 2021 16:15:47 +0700 Subject: [PATCH 09/69] update chromedriver v95 -> v96 --- TBSReact/TBSReact.csproj | 4 + TbsCore/TbsCore.csproj | 2 +- TbsCore/packages.lock.json | 6 +- TbsReact/packages.lock.json | 1047 +++++++++++++++++++++++++++++++ TravBotSharp/TbsWinForms.csproj | 4 +- TravBotSharp/packages.config | 2 +- 6 files changed, 1058 insertions(+), 7 deletions(-) create mode 100644 TbsReact/packages.lock.json diff --git a/TBSReact/TBSReact.csproj b/TBSReact/TBSReact.csproj index 59e7e16e6..236b6e4c3 100644 --- a/TBSReact/TBSReact.csproj +++ b/TBSReact/TBSReact.csproj @@ -10,9 +10,13 @@ true Exe + + true + + diff --git a/TbsCore/TbsCore.csproj b/TbsCore/TbsCore.csproj index 8961596a7..21ab804fc 100644 --- a/TbsCore/TbsCore.csproj +++ b/TbsCore/TbsCore.csproj @@ -22,7 +22,7 @@ - + diff --git a/TbsCore/packages.lock.json b/TbsCore/packages.lock.json index 01602d575..1a09bfdf8 100644 --- a/TbsCore/packages.lock.json +++ b/TbsCore/packages.lock.json @@ -66,9 +66,9 @@ }, "Selenium.WebDriver.ChromeDriver": { "type": "Direct", - "requested": "[95.0.4638.1700, )", - "resolved": "95.0.4638.1700", - "contentHash": "RuziiapHW2Yhw77AuvWmACzPOjjw7QdoSh9rhXxB+brO5ihsJE4V3xVY7tYX1VxKJOjRjB6ITAzmavlA1StkGw==" + "requested": "[96.0.4664.4500, )", + "resolved": "96.0.4664.4500", + "contentHash": "7bH+2/bX4IqPXxnMsbD820pCb1DFLeESIbjpUL/Zgq5wfKJHTxtknrQ1wnlMJmWtbpoNcj6Zck7OfoIVstl3zQ==" }, "Serilog": { "type": "Direct", diff --git a/TbsReact/packages.lock.json b/TbsReact/packages.lock.json new file mode 100644 index 000000000..750486e3c --- /dev/null +++ b/TbsReact/packages.lock.json @@ -0,0 +1,1047 @@ +{ + "version": 1, + "dependencies": { + ".NETCoreApp,Version=v5.0": { + "Microsoft.AspNetCore.SpaServices.Extensions": { + "type": "Direct", + "requested": "[5.0.12, )", + "resolved": "5.0.12", + "contentHash": "YX6KBH02frzePP2KM/31kwNK0BdtAbiaAJpmFWJF24yYkGuZ/rfDxWZsH4Hjp3yqAuBMZvuMCHSuFyCZl5K1Uw==", + "dependencies": { + "Microsoft.Extensions.FileProviders.Physical": "5.0.0" + } + }, + "Selenium.WebDriver.ChromeDriver": { + "type": "Direct", + "requested": "[96.0.4664.4500, )", + "resolved": "96.0.4664.4500", + "contentHash": "7bH+2/bX4IqPXxnMsbD820pCb1DFLeESIbjpUL/Zgq5wfKJHTxtknrQ1wnlMJmWtbpoNcj6Zck7OfoIVstl3zQ==" + }, + "Discord.Net.Core": { + "type": "Transitive", + "resolved": "2.3.1", + "contentHash": "/6wOZ8HVunSA1DHWGv3XxBZDxdCpF1zjyfDIKtXoTtP3Ot7d4jcf6RksqRlw1vLVmchBd56GR/UoDG6/0mbeAQ==", + "dependencies": { + "Newtonsoft.Json": "12.0.2", + "System.Collections.Immutable": "1.3.1", + "System.Interactive.Async": "4.0.0" + } + }, + "Discord.Net.Rest": { + "type": "Transitive", + "resolved": "2.3.1", + "contentHash": "t1aczyRbLpvKGQGOnFskcCteg0CwxefSuUJAuVkRZyHPDTRvk60IdJYh6cyYtKcGwJuCynNIIKrlSVNwDcY9Qw==", + "dependencies": { + "Discord.Net.Core": "2.3.1" + } + }, + "Discord.Net.Webhook": { + "type": "Transitive", + "resolved": "2.3.1", + "contentHash": "I/sPU3Ag1XdognQmdc+FmhwSdyv7YsMVhaamJ0h0QzlhwgX+8542esKxhuDSwVTloWkbO4sFlEOYZjyJVoDWjg==", + "dependencies": { + "Discord.Net.Core": "2.3.1", + "Discord.Net.Rest": "2.3.1" + } + }, + "HtmlAgilityPack": { + "type": "Transitive", + "resolved": "1.11.23", + "contentHash": "+cgMfM0ks6njN1HjeH157wcF9n9CksuLk4yzKZ3j5/dhC+t1xZ6SZVnksGZZ+6H22Y2RQ6gUEpue4E912271Hg==", + "dependencies": { + "System.Net.Http": "4.3.2", + "System.Xml.XPath": "4.3.0", + "System.Xml.XPath.XmlDocument": "4.3.0", + "System.Xml.XmlDocument": "4.3.0" + } + }, + "Microsoft.Bcl.AsyncInterfaces": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "yuvf07qFWFqtK3P/MRkEKLhn5r2UbSpVueRziSqj0yJQIKFwG1pq9mOayK3zE5qZCTs0CbrwL9M6R8VwqyGy2w==" + }, + "Microsoft.Bcl.HashCode": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "J2G1k+u5unBV+aYcwxo94ip16Rkp65pgWFb0R6zwJipzWNMgvqlWeuI7/+R+e8bob66LnSG+llLJ+z8wI94cHg==" + }, + "Microsoft.Data.Sqlite.Core": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "vTHfXSGN4NJHImb19W1847jLawbjxTMUtVDfEo8r/mUfazQqZxgPBUuMlV9LtHlwcf/VTsqKssLqrThXeeNpJQ==", + "dependencies": { + "SQLitePCLRaw.core": "2.0.2" + } + }, + "Microsoft.DotNet.PlatformAbstractions": { + "type": "Transitive", + "resolved": "3.1.6", + "contentHash": "jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==" + }, + "Microsoft.EntityFrameworkCore": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "0IhJl9mVJ4IhHobKvOo2iLB0xfxX2eYaSz4VZX+bMSm8IyZA1tOmyaOtg7oSzeUAe6eqpKVQLTgMFzk2AqCcaA==", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "1.1.1", + "Microsoft.Bcl.HashCode": "1.1.0", + "Microsoft.EntityFrameworkCore.Abstractions": "3.1.10", + "Microsoft.EntityFrameworkCore.Analyzers": "3.1.10", + "Microsoft.Extensions.Caching.Memory": "3.1.10", + "Microsoft.Extensions.DependencyInjection": "3.1.10", + "Microsoft.Extensions.Logging": "3.1.10", + "System.Collections.Immutable": "1.7.1", + "System.ComponentModel.Annotations": "4.7.0", + "System.Diagnostics.DiagnosticSource": "4.7.1" + } + }, + "Microsoft.EntityFrameworkCore.Abstractions": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "B1kUQ7o6+4Ly2neo86RJCpTYzTPpW1xzpHyRaTmGQS/p7umZOGoBJay+i/YDLmZkUPI4XULGnu5KJKipA0awUw==" + }, + "Microsoft.EntityFrameworkCore.Analyzers": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "reHrrF8i/Wao7l2PVXJ+JeZzEC4OkbcbfnQs8vtiT+SQ5P4MdQj3WzMkupjebaJWhIJZRc6qPT4BD9BUWQU4wQ==" + }, + "Microsoft.EntityFrameworkCore.Relational": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "JpDMpGDx+wPvFSbw9vu13nfZESdu2SPFhLI1bPZwqDU0ZV40TmUOUN91hHjWhgh5qRX1jQTWMuvK3EmlpywgAw==", + "dependencies": { + "Microsoft.EntityFrameworkCore": "3.1.10" + } + }, + "Microsoft.EntityFrameworkCore.Sqlite": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "0+/FLnUV1OY68q717Zm9XdAL/Aus3ovYxRzKqhFcndwNFwEGWBcpHtHzcqY2KI0YA0y10Rc8oORxUXjyAwRPRw==", + "dependencies": { + "Microsoft.EntityFrameworkCore.Sqlite.Core": "3.1.10", + "SQLitePCLRaw.bundle_e_sqlite3": "2.0.2" + } + }, + "Microsoft.EntityFrameworkCore.Sqlite.Core": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "Mu16ShWfrtcb7Q9mNv2+iCooXcapcrLPpoZL3SARD8jFrJluUeLdOw1YSv4ngWSZ6VkYDVmmnXbDIdGVeNGylQ==", + "dependencies": { + "Microsoft.Data.Sqlite.Core": "3.1.10", + "Microsoft.DotNet.PlatformAbstractions": "3.1.6", + "Microsoft.EntityFrameworkCore.Relational": "3.1.10", + "Microsoft.Extensions.DependencyModel": "3.1.6" + } + }, + "Microsoft.Extensions.Caching.Abstractions": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "xdl25cxDgwVxF9ckD9vJ5AdjzRE1vTGLYj9kZf6aL317ZneUijkxd/nSuzN1gEuO74dwG/Yfr1zfs636D6YZsA==", + "dependencies": { + "Microsoft.Extensions.Primitives": "3.1.10" + } + }, + "Microsoft.Extensions.Caching.Memory": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "pR6mRkJx67/itEnEpnBiiATeH/P6RnhqvriD6RdQsXepO+uisfUrd149CTGPc1G5J0Qf9bwSCJkb/MYkuQ6mqw==", + "dependencies": { + "Microsoft.Extensions.Caching.Abstractions": "3.1.10", + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.10", + "Microsoft.Extensions.Logging.Abstractions": "3.1.10", + "Microsoft.Extensions.Options": "3.1.10" + } + }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "HHBhCP3wAJe7UIXjim0wFXty0WG/rZAP3aZyy03uuaxiOOPHJjbUdY6K9qkfQuP+hsRzfiT+np5k4rFmcSo3og==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "3.1.10" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "UEfngyXt8XYhmekUza9JsWlA37pNOtZAjcK5EEKQrHo2LDKJmZVmcyAUFlkzCcf97OSr+w/MiDLifDDNQk9agw==", + "dependencies": { + "Microsoft.Extensions.Primitives": "3.1.10" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "B9nQBk0GZVkOgSB1oB9V/7kvxhBvLCqm2x4m8MIoSxrd9yga8MVq2HWqnai8zZdH1WL6OlOG5mCVrwgAVwNNJg==", + "dependencies": { + "Microsoft.Extensions.Configuration": "3.1.10" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "fla8hKhQmld2s/7arhUxlu3dzZLBFJLg4BQiQZdqKND4MlmnMU9jhoxY4MMlSYl6MtxumtwASHMJnuV9f96IQQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.10" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "bhjtAN7Ix5WOAr47RK16Lr1l2eizSBMCYQSavkooZyf6Xdf8XWAYGWsGsPqUFOeeRxzhpRho051rXaLn5wskVw==" + }, + "Microsoft.Extensions.DependencyModel": { + "type": "Transitive", + "resolved": "3.1.6", + "contentHash": "/UlDKULIVkLQYn1BaHcy/rc91ApDxJb7T75HcCbGdqwvxhnRQRKM2di1E70iCPMF9zsr6f4EgQTotBGxFIfXmw==", + "dependencies": { + "System.Text.Json": "4.7.2" + } + }, + "Microsoft.Extensions.FileProviders.Abstractions": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "iuZIiZ3mteEb+nsUqpGXKx2cGF+cv6gWPd5jqQI4hzqdiJ6I94ddLjKhQOuRW1lueHwocIw30xbSHGhQj0zjdQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "5.0.0" + } + }, + "Microsoft.Extensions.FileProviders.Physical": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "1rkd8UO2qf21biwO7X0hL9uHP7vtfmdv/NLvKgCRHkdz1XnW8zVQJXyEYiN68WYpExgtVWn55QF0qBzgfh1mGg==", + "dependencies": { + "Microsoft.Extensions.FileProviders.Abstractions": "5.0.0", + "Microsoft.Extensions.FileSystemGlobbing": "5.0.0", + "Microsoft.Extensions.Primitives": "5.0.0" + } + }, + "Microsoft.Extensions.FileSystemGlobbing": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "ArliS8lGk8sWRtrWpqI8yUVYJpRruPjCDT+EIjrgkA/AAPRctlAkRISVZ334chAKktTLzD1+PK8F5IZpGedSqA==" + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "GjP+4cUFdsNk/Px6BlJ7p7x7ibpawcaAV4tfrRJTv2s6Nb7yz5OEKA0kbNl1ZXKa6uMQzbNqc5+B/tJsqzgIXg==", + "dependencies": { + "Microsoft.Extensions.Configuration.Binder": "3.1.10", + "Microsoft.Extensions.DependencyInjection": "3.1.10", + "Microsoft.Extensions.Logging.Abstractions": "3.1.10", + "Microsoft.Extensions.Options": "3.1.10" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "bKHbgzbGsPZbEaExRaJqBz3WQ1GfhMttM23e1nivLJ8HbA3Ad526mW2G2K350q3Dc3HG83I5W8uSZWG4Rv4IpA==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "3.1.10", + "contentHash": "CusdV4eIv+CGb9Fy6a+JcRqpcVJREmvFI8eHk3nQ76VLtEAIJpKQY5r5sRSs5w6NevNi2ukdnKleH0YCPudFZQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.10", + "Microsoft.Extensions.Primitives": "3.1.10" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "cI/VWn9G1fghXrNDagX9nYaaB/nokkZn0HYAawGaELQrl8InSezfe9OnfPZLcJq3esXxygh3hkq2c3qoV3SDyQ==" + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" + }, + "Microsoft.NETCore.Targets": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" + }, + "Newtonsoft.Json": { + "type": "Transitive", + "resolved": "12.0.2", + "contentHash": "rTK0s2EKlfHsQsH6Yx2smvcTCeyoDNgCW7FEYyV01drPlh2T243PR2DiDXqtC5N4GDm4Ma/lkxfW5a/4793vbA==" + }, + "Octokit": { + "type": "Transitive", + "resolved": "0.50.0", + "contentHash": "J5vqespSvjxIAAtjG1Tc6ghBqyfRgDJtKnk/ifi4N0hD/f3JbPwyEDRT+Eelu/bS4C4M6mu5gt1WJqar+fByzg==" + }, + "RestSharp": { + "type": "Transitive", + "resolved": "106.13.0", + "contentHash": "vwUdmmtC5vtePeNfBWnFcixBF2KjUeVv3ss4ZFzCIkOf7NB7W/9qX8JNZD9DOrz2yGk4AJW8k9znwgPZhnoiNg==" + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.native.System": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", + "dependencies": { + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" + } + }, + "runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", + "dependencies": { + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "Selenium.WebDriver": { + "type": "Transitive", + "resolved": "3.141.0", + "contentHash": "wPqzXO3f79DzqauTZSzLMKiaBCN0Z2Mv7KvWP+hnV6EL88zh/pJJnFtdIR1X5wa3hsTOpF/bBJs45rz7kArsiA==", + "dependencies": { + "Newtonsoft.Json": "10.0.3" + } + }, + "Serilog": { + "type": "Transitive", + "resolved": "2.10.0", + "contentHash": "+QX0hmf37a0/OZLxM3wL7V6/ADvC1XihXN4Kq/p6d8lCPfgkRdiuhbWlMaFjR9Av0dy5F0+MBeDmDdRZN/YwQA==" + }, + "Serilog.Sinks.File": { + "type": "Transitive", + "resolved": "4.1.0", + "contentHash": "U0b34w+ZikbqWEZ3ui7BdzxY/19zwrdhLtI3o6tfmLdD3oXxg7n2TZJjwCCTlKPgRuYic9CBWfrZevbb70mTaw==", + "dependencies": { + "Serilog": "2.5.0", + "System.IO.FileSystem": "4.0.1", + "System.Text.Encoding.Extensions": "4.0.11", + "System.Threading.Timer": "4.0.1" + } + }, + "Serilog.Sinks.Map": { + "type": "Transitive", + "resolved": "1.0.2", + "contentHash": "JbPBAeD5hxUQw8TZg3FlOnqVsSu1269nvqFm5DQ7hc+AmsB+hItl+zMSDphMbPJXjL8KdpMRSWNkGi7zTKRmCA==", + "dependencies": { + "Serilog": "2.8.0" + } + }, + "Serilog.Sinks.TextWriter": { + "type": "Transitive", + "resolved": "2.1.0", + "contentHash": "rgDZVwl68RqOFogKO27RbYLlwCQehjUQv4gimLT/Fd7dYV7XRVtWTp73BJphjWgVq4DP8trv1ta9Ork5H8oDXw==", + "dependencies": { + "Serilog": "2.0.0", + "System.IO": "4.1.0" + } + }, + "SQLitePCLRaw.bundle_e_sqlite3": { + "type": "Transitive", + "resolved": "2.0.2", + "contentHash": "OVPI/nh5AqfLCIKhAYqjCa6AHhc7oKApGcGM3UhMRSerFiBx58nSpGwxVFdMgjOCWZR+fA49nzsnKlWp5hFo8w==", + "dependencies": { + "SQLitePCLRaw.core": "2.0.2", + "SQLitePCLRaw.lib.e_sqlite3": "2.0.2", + "SQLitePCLRaw.provider.dynamic_cdecl": "2.0.2" + } + }, + "SQLitePCLRaw.core": { + "type": "Transitive", + "resolved": "2.0.2", + "contentHash": "TFSBX426OelS1tkaVC254NVVlrJIe9YLhWPkEvuqJj2104QpmDmEYOhfdfDJD1E/2SmqDhoRw1ek5cQHj8olcQ==", + "dependencies": { + "System.Memory": "4.5.3" + } + }, + "SQLitePCLRaw.lib.e_sqlite3": { + "type": "Transitive", + "resolved": "2.0.2", + "contentHash": "S+Tsqe/M7wsc+9HeediI6UHtBKf2X586aRwhi1aBVLGe0WxkAo52O9ZxwEy/v8XMLefcrEMupd2e9CDlIT6QCw==" + }, + "SQLitePCLRaw.provider.dynamic_cdecl": { + "type": "Transitive", + "resolved": "2.0.2", + "contentHash": "ZSwacbKJUsxJEZxwT23uZVrGbaIvXcADZDz5Sr66fikO5eehdcceDncjzwzTzWfW13di8gpTpstx3WJSt/Ci5Q==", + "dependencies": { + "SQLitePCLRaw.core": "2.0.2" + } + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Collections.Concurrent": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "1.7.1", + "contentHash": "B43Zsz5EfMwyEbnObwRxW5u85fzJma3lrDeGcSAV1qkhSRTNY5uXAByTn9h9ddNdhM+4/YoLc/CI43umjwIl9Q==" + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "0YFqjhp/mYkDGpU0Ye1GjE53HMp9UVfGN7seGpAMttAC0C40v5gw598jCgpbBLMmCo0E5YRLBv5Z2doypO49ZQ==" + }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "4.7.1", + "contentHash": "j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==" + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.Interactive.Async": { + "type": "Transitive", + "resolved": "4.0.0", + "contentHash": "tYEzSDQ3rn0G7sGgjcNB91C3dDRJc8m8Lavvu88dwt8FEwKPGZdp/tFs+lQTdqHDV9UItkGIwI8Aa6gGTvzLoQ==", + "dependencies": { + "System.Linq.Async": "4.0.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Linq": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Linq.Async": { + "type": "Transitive", + "resolved": "4.0.0", + "contentHash": "WbiYEedFZeM+psmMyoCt1AKbZppAZg8Eq1ZTQ+521fGNeXqlgJj0tZYV5n1LsKRO5osQuitYxGNuzPTy3213sg==" + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.5.3", + "contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==" + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.2", + "contentHash": "y7hv0o0weI0j0mvEcBOdt1F3CAADiWlcw3e54m8TfYiRmBPDIsHElx8QUPDlY4x6yWXKPGN0Z2TuXCTPgkm5WQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Runtime.Numerics": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", + "dependencies": { + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "4.7.2", + "contentHash": "TcMd95wcrubm9nHvJEQs70rC0H/8omiSGGpU4FQ/ZA1URIqD4pjmFJh2Mfv1yH1eHgJDWTi2hMDXwTET+zOOyg==" + }, + "System.Text.RegularExpressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Timer": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + } + }, + "System.Xml.ReaderWriter": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Tasks.Extensions": "4.3.0" + } + }, + "System.Xml.XmlDocument": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "lJ8AxvkX7GQxpC6GFCeBj8ThYVyQczx2+f/cWHJU8tjS7YfI6Cv6bon70jVEgs2CiFbmmM8b9j1oZVx0dSI2Ww==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0" + } + }, + "System.Xml.XPath": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "v1JQ5SETnQusqmS3RwStF7vwQ3L02imIzl++sewmt23VGygix04pEH+FCj1yWb+z4GDzKiljr1W7Wfvrx0YwgA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0" + } + }, + "System.Xml.XPath.XmlDocument": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "A/uxsWi/Ifzkmd4ArTLISMbfFs6XpRPsXZonrIqyTY70xi8t+mDtvSM5Os0RqyRDobjMBwIDHDL4NOIbkDwf7A==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0", + "System.Xml.XPath": "4.3.0", + "System.Xml.XmlDocument": "4.3.0" + } + }, + "tbscore": { + "type": "Project", + "dependencies": { + "Discord.Net.Webhook": "2.3.1", + "HtmlAgilityPack": "1.11.23", + "Microsoft.EntityFrameworkCore.Sqlite": "3.1.10", + "Octokit": "0.50.0", + "RestSharp": "106.13.0", + "Selenium.WebDriver": "3.141.0", + "Selenium.WebDriver.ChromeDriver": "96.0.4664.4500", + "Serilog": "2.10.0", + "Serilog.Sinks.File": "4.1.0", + "Serilog.Sinks.Map": "1.0.2", + "Serilog.Sinks.TextWriter": "2.1.0" + } + } + } + } +} \ No newline at end of file diff --git a/TravBotSharp/TbsWinForms.csproj b/TravBotSharp/TbsWinForms.csproj index 150b4cbcc..eb1fedab4 100644 --- a/TravBotSharp/TbsWinForms.csproj +++ b/TravBotSharp/TbsWinForms.csproj @@ -743,7 +743,7 @@ - + @@ -751,5 +751,5 @@ - + \ No newline at end of file diff --git a/TravBotSharp/packages.config b/TravBotSharp/packages.config index f9d8a46d4..18f9ce4f2 100644 --- a/TravBotSharp/packages.config +++ b/TravBotSharp/packages.config @@ -37,7 +37,7 @@ - + From 390aace3f904573f6c847a11923c61698c5c1cb9 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 3 Dec 2021 16:19:22 +0700 Subject: [PATCH 10/69] update login all & logout all --- .../components/sidebar/Modal/AccountModal.js | 2 +- .../src/components/sidebar/SideBar.js | 20 ++++++--- TbsReact/ClientApp/src/api/Accounts/Driver.js | 28 +++++++++++-- .../Controllers/Account/DriverController.cs | 42 +++++++++++++++++-- 4 files changed, 78 insertions(+), 14 deletions(-) diff --git a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index 8ac53ce4c..54c4a27fa 100644 --- a/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -102,7 +102,7 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { aria-describedby="modal-modal-description"> - {editMode === true ? "Add account" : "Edit account"} + {editMode === false ? "Add account" : "Edit account"}
diff --git a/TBSReact/ClientApp/src/components/sidebar/SideBar.js b/TBSReact/ClientApp/src/components/sidebar/SideBar.js index 066ef1c20..0d05d9352 100644 --- a/TBSReact/ClientApp/src/components/sidebar/SideBar.js +++ b/TBSReact/ClientApp/src/components/sidebar/SideBar.js @@ -1,4 +1,4 @@ -import { useState } from "react" +import { useEffect, useState } from "react" import { Drawer, IconButton, Grid, Button } from "@mui/material" import MenuIcon from '@mui/icons-material/Menu'; import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; @@ -7,11 +7,18 @@ import AccountTable from "./AccountTable" import AccountModal from "./Modal/AccountModal" import { deleteAccount } from "../../api/Accounts/Account"; -import { login, logout, getStatus } from "../../api/Accounts/Driver"; +import { login, logout, loginAll, logoutAll, getStatus } from "../../api/Accounts/Driver"; const SideBar = ({ selected, setSelected }) => { const [open, setOpen] = useState(false); const [status, setStatus] = useState(false); + + useEffect( ( ) => { + const updateStatus = async () => { + setStatus(await getStatus(selected)) + } + updateStatus(); + }, [selected]) const handleDrawerOpen = () => { setOpen(true); }; @@ -36,11 +43,14 @@ const SideBar = ({ selected, setSelected }) => { } } - const onLoginAll = () => { - + const onLoginAll = async () => { + await loginAll(); + setSelected(-1) } - const onLogoutAll = () => { + const onLogoutAll = async () => { + await logoutAll(); + setSelected(-1) } diff --git a/TbsReact/ClientApp/src/api/Accounts/Driver.js b/TbsReact/ClientApp/src/api/Accounts/Driver.js index 5e9e302e7..4e44249d2 100644 --- a/TbsReact/ClientApp/src/api/Accounts/Driver.js +++ b/TbsReact/ClientApp/src/api/Accounts/Driver.js @@ -2,7 +2,7 @@ import axios from 'axios'; const login = async (index) => { try { - await axios.post(`/accounts/${index}/login`); + await axios.post(`/accounts/login/${index}`); return true; } catch (e) { console.log(e); @@ -12,7 +12,7 @@ const login = async (index) => { const logout = async (index) => { try { - await axios.post(`/accounts/${index}/logout`); + await axios.post(`/accounts/logout/${index}`); return true; } catch (e) { console.log(e); @@ -20,9 +20,29 @@ const logout = async (index) => { } } +const loginAll = async () => { + try { + await axios.post(`/accounts/login`); + return true; + } catch (e) { + console.log(e); + return false; + } +} + +const logoutAll = async () => { + try { + await axios.post(`/accounts/logout`); + return true; + } catch (e) { + console.log(e); + return false; + } +} + const getStatus = async (index) => { try { - const { data } = await axios.get(`/accounts/${index}/status`); + const { data } = await axios.get(`/accounts/status/${index}`); return data; } catch (e) { console.log(e); @@ -30,4 +50,4 @@ const getStatus = async (index) => { } } -export { login, logout, getStatus } \ No newline at end of file +export { login, logout, loginAll, logoutAll, getStatus } \ No newline at end of file diff --git a/TbsReact/Controllers/Account/DriverController.cs b/TbsReact/Controllers/Account/DriverController.cs index 73d9a484b..78b418b4d 100644 --- a/TbsReact/Controllers/Account/DriverController.cs +++ b/TbsReact/Controllers/Account/DriverController.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using System; +using System.Threading; using System.Threading.Tasks; using TbsCore.Helpers; using TbsReact.Singleton; @@ -7,10 +8,10 @@ namespace TbsReact.Controllers { [ApiController] - [Route("accounts/{index:int}")] + [Route("accounts")] public class DriverController : ControllerBase { - [HttpPost("login")] + [HttpPost("login/{index:int}")] public async Task Login(int index) { var account = AccountData.GetAccount(index); @@ -31,7 +32,7 @@ public async Task Login(int index) return new BadRequestObjectResult("Account you are trying to login has no access defined. Please edit the account."); } - [HttpPost("logout")] + [HttpPost("logout/{index:int}")] public ActionResult Logout(int index) { var account = AccountData.GetAccount(index); @@ -51,7 +52,40 @@ public ActionResult Logout(int index) return BadRequest(); } - [HttpGet("status")] + [HttpPost("login")] + public ActionResult LoginAll() + { + new Thread(async () => + { + var ran = new Random(); + foreach (var acc in AccountManager.Accounts) + { + // If account is already running, don't login + if (acc.TaskTimer?.IsBotRunning() ?? false) continue; + + _ = IoHelperCore.LoginAccount(acc); + await Task.Delay(AccountHelper.Delay(acc)); + } + }).Start(); + + return Ok(); + } + + [HttpPost("logout")] + public ActionResult LogoutAll() + { + new Thread(() => + { + foreach (var acc in AccountManager.Accounts) + { + IoHelperCore.Logout(acc); + } + }).Start(); + + return Ok(); + } + + [HttpGet("status/{index:int}")] public ActionResult GetStatus(int index) { var account = AccountData.GetAccount(index); From 57099636c2566e9860bcd86a981536aa3358c3d0 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 3 Dec 2021 19:55:07 +0700 Subject: [PATCH 11/69] remove abundance folder&file --- TbsReact_/.gitignore | 232 - TbsReact_/ClientApp/.env | 1 - TbsReact_/ClientApp/.env.development | 3 - TbsReact_/ClientApp/.gitignore | 21 - TbsReact_/ClientApp/README.md | 2228 -- TbsReact_/ClientApp/aspnetcore-https.js | 33 - TbsReact_/ClientApp/aspnetcore-react.js | 55 - TbsReact_/ClientApp/package-lock.json | 17227 ---------------- TbsReact_/ClientApp/package.json | 76 - TbsReact_/ClientApp/public/favicon.ico | Bin 5430 -> 0 bytes TbsReact_/ClientApp/public/index.html | 41 - TbsReact_/ClientApp/public/manifest.json | 15 - TbsReact_/ClientApp/src/App.js | 18 - TbsReact_/ClientApp/src/App.test.js | 13 - TbsReact_/ClientApp/src/components/Counter.js | 31 - .../ClientApp/src/components/FetchData.js | 59 - TbsReact_/ClientApp/src/components/Home.js | 26 - TbsReact_/ClientApp/src/components/Layout.js | 13 - .../ClientApp/src/components/NavMenu.css | 18 - TbsReact_/ClientApp/src/components/NavMenu.js | 21 - .../src/components/sidebar/AccountRow.js | 17 - .../src/components/sidebar/AccountTable.js | 44 - .../src/components/sidebar/Modal/AccessRow.js | 18 - .../components/sidebar/Modal/AccountModal.js | 157 - .../src/components/sidebar/SideBar.js | 44 - TbsReact_/ClientApp/src/custom.css | 14 - TbsReact_/ClientApp/src/index.js | 26 - TbsReact_/ClientApp/src/reportWebVitals.js | 13 - TbsReact_/ClientApp/src/service-worker.js | 72 - .../src/serviceWorkerRegistration.js | 137 - TbsReact_/ClientApp/src/setupProxy.js | 18 - TbsReact_/Controllers/AccountController.cs | 92 - .../Controllers/WeatherForecastController.cs | 32 - TbsReact_/Models/Access.cs | 9 - TbsReact_/Models/Account.cs | 11 - TbsReact_/Models/Proxy.cs | 11 - TbsReact_/Pages/Error.cshtml | 26 - TbsReact_/Pages/Error.cshtml.cs | 25 - TbsReact_/Pages/_ViewImports.cshtml | 3 - TbsReact_/Program.cs | 29 - TbsReact_/Properties/launchSettings.json | 29 - TbsReact_/Singleton/AccountManager.cs | 87 - TbsReact_/TBSReact.csproj | 55 - TbsReact_/WeatherForecast.cs | 12 - TbsReact_/appsettings.Development.json | 10 - TbsReact_/appsettings.json | 10 - TbsReact_/libman.json | 5 - TravBotSharp/TbsWinForms.csproj | 2 +- version.txt | 1 - 49 files changed, 1 insertion(+), 21139 deletions(-) delete mode 100644 TbsReact_/.gitignore delete mode 100644 TbsReact_/ClientApp/.env delete mode 100644 TbsReact_/ClientApp/.env.development delete mode 100644 TbsReact_/ClientApp/.gitignore delete mode 100644 TbsReact_/ClientApp/README.md delete mode 100644 TbsReact_/ClientApp/aspnetcore-https.js delete mode 100644 TbsReact_/ClientApp/aspnetcore-react.js delete mode 100644 TbsReact_/ClientApp/package-lock.json delete mode 100644 TbsReact_/ClientApp/package.json delete mode 100644 TbsReact_/ClientApp/public/favicon.ico delete mode 100644 TbsReact_/ClientApp/public/index.html delete mode 100644 TbsReact_/ClientApp/public/manifest.json delete mode 100644 TbsReact_/ClientApp/src/App.js delete mode 100644 TbsReact_/ClientApp/src/App.test.js delete mode 100644 TbsReact_/ClientApp/src/components/Counter.js delete mode 100644 TbsReact_/ClientApp/src/components/FetchData.js delete mode 100644 TbsReact_/ClientApp/src/components/Home.js delete mode 100644 TbsReact_/ClientApp/src/components/Layout.js delete mode 100644 TbsReact_/ClientApp/src/components/NavMenu.css delete mode 100644 TbsReact_/ClientApp/src/components/NavMenu.js delete mode 100644 TbsReact_/ClientApp/src/components/sidebar/AccountRow.js delete mode 100644 TbsReact_/ClientApp/src/components/sidebar/AccountTable.js delete mode 100644 TbsReact_/ClientApp/src/components/sidebar/Modal/AccessRow.js delete mode 100644 TbsReact_/ClientApp/src/components/sidebar/Modal/AccountModal.js delete mode 100644 TbsReact_/ClientApp/src/components/sidebar/SideBar.js delete mode 100644 TbsReact_/ClientApp/src/custom.css delete mode 100644 TbsReact_/ClientApp/src/index.js delete mode 100644 TbsReact_/ClientApp/src/reportWebVitals.js delete mode 100644 TbsReact_/ClientApp/src/service-worker.js delete mode 100644 TbsReact_/ClientApp/src/serviceWorkerRegistration.js delete mode 100644 TbsReact_/ClientApp/src/setupProxy.js delete mode 100644 TbsReact_/Controllers/AccountController.cs delete mode 100644 TbsReact_/Controllers/WeatherForecastController.cs delete mode 100644 TbsReact_/Models/Access.cs delete mode 100644 TbsReact_/Models/Account.cs delete mode 100644 TbsReact_/Models/Proxy.cs delete mode 100644 TbsReact_/Pages/Error.cshtml delete mode 100644 TbsReact_/Pages/Error.cshtml.cs delete mode 100644 TbsReact_/Pages/_ViewImports.cshtml delete mode 100644 TbsReact_/Program.cs delete mode 100644 TbsReact_/Properties/launchSettings.json delete mode 100644 TbsReact_/Singleton/AccountManager.cs delete mode 100644 TbsReact_/TBSReact.csproj delete mode 100644 TbsReact_/WeatherForecast.cs delete mode 100644 TbsReact_/appsettings.Development.json delete mode 100644 TbsReact_/appsettings.json delete mode 100644 TbsReact_/libman.json delete mode 100644 version.txt diff --git a/TbsReact_/.gitignore b/TbsReact_/.gitignore deleted file mode 100644 index 8f8b43bb1..000000000 --- a/TbsReact_/.gitignore +++ /dev/null @@ -1,232 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -bin/ -Bin/ -obj/ -Obj/ - -# Visual Studio 2015 cache/options directory -.vs/ -/wwwroot/dist/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Microsoft Azure ApplicationInsights config file -ApplicationInsights.config - -# Windows Store app package directory -AppPackages/ -BundleArtifacts/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -orleans.codegen.cs - -/node_modules - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe - -# FAKE - F# Make -.fake/ diff --git a/TbsReact_/ClientApp/.env b/TbsReact_/ClientApp/.env deleted file mode 100644 index 6ce384e5c..000000000 --- a/TbsReact_/ClientApp/.env +++ /dev/null @@ -1 +0,0 @@ -BROWSER=none diff --git a/TbsReact_/ClientApp/.env.development b/TbsReact_/ClientApp/.env.development deleted file mode 100644 index 3ef2eef0b..000000000 --- a/TbsReact_/ClientApp/.env.development +++ /dev/null @@ -1,3 +0,0 @@ -PORT=44465 -HTTPS=true - diff --git a/TbsReact_/ClientApp/.gitignore b/TbsReact_/ClientApp/.gitignore deleted file mode 100644 index d30f40ef4..000000000 --- a/TbsReact_/ClientApp/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/TbsReact_/ClientApp/README.md b/TbsReact_/ClientApp/README.md deleted file mode 100644 index 9a2c94454..000000000 --- a/TbsReact_/ClientApp/README.md +++ /dev/null @@ -1,2228 +0,0 @@ -This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). - -Below you will find some information on how to perform common tasks.
-You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md). - -## Table of Contents - -- [Updating to New Releases](#updating-to-new-releases) -- [Sending Feedback](#sending-feedback) -- [Folder Structure](#folder-structure) -- [Available Scripts](#available-scripts) - - [npm start](#npm-start) - - [npm test](#npm-test) - - [npm run build](#npm-run-build) - - [npm run eject](#npm-run-eject) -- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) -- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) -- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) -- [Debugging in the Editor](#debugging-in-the-editor) -- [Formatting Code Automatically](#formatting-code-automatically) -- [Changing the Page ``](#changing-the-page-title) -- [Installing a Dependency](#installing-a-dependency) -- [Importing a Component](#importing-a-component) -- [Code Splitting](#code-splitting) -- [Adding a Stylesheet](#adding-a-stylesheet) -- [Post-Processing CSS](#post-processing-css) -- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) -- [Adding Images, Fonts, and Files](#adding-images-fonts-and-files) -- [Using the `public` Folder](#using-the-public-folder) - - [Changing the HTML](#changing-the-html) - - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) - - [When to Use the `public` Folder](#when-to-use-the-public-folder) -- [Using Global Variables](#using-global-variables) -- [Adding Bootstrap](#adding-bootstrap) - - [Using a Custom Theme](#using-a-custom-theme) -- [Adding Flow](#adding-flow) -- [Adding Custom Environment Variables](#adding-custom-environment-variables) - - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) - - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) - - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) -- [Can I Use Decorators?](#can-i-use-decorators) -- [Integrating with an API Backend](#integrating-with-an-api-backend) - - [Node](#node) - - [Ruby on Rails](#ruby-on-rails) -- [Proxying API Requests in Development](#proxying-api-requests-in-development) - - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy) - - [Configuring the Proxy Manually](#configuring-the-proxy-manually) - - [Configuring a WebSocket Proxy](#configuring-a-websocket-proxy) -- [Using HTTPS in Development](#using-https-in-development) -- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) -- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) -- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) -- [Running Tests](#running-tests) - - [Filename Conventions](#filename-conventions) - - [Command Line Interface](#command-line-interface) - - [Version Control Integration](#version-control-integration) - - [Writing Tests](#writing-tests) - - [Testing Components](#testing-components) - - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) - - [Initializing Test Environment](#initializing-test-environment) - - [Focusing and Excluding Tests](#focusing-and-excluding-tests) - - [Coverage Reporting](#coverage-reporting) - - [Continuous Integration](#continuous-integration) - - [Disabling jsdom](#disabling-jsdom) - - [Snapshot Testing](#snapshot-testing) - - [Editor Integration](#editor-integration) -- [Developing Components in Isolation](#developing-components-in-isolation) - - [Getting Started with Storybook](#getting-started-with-storybook) - - [Getting Started with Styleguidist](#getting-started-with-styleguidist) -- [Making a Progressive Web App](#making-a-progressive-web-app) - - [Opting Out of Caching](#opting-out-of-caching) - - [Offline-First Considerations](#offline-first-considerations) - - [Progressive Web App Metadata](#progressive-web-app-metadata) -- [Analyzing the Bundle Size](#analyzing-the-bundle-size) -- [Deployment](#deployment) - - [Static Server](#static-server) - - [Other Solutions](#other-solutions) - - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) - - [Building for Relative Paths](#building-for-relative-paths) - - [Azure](#azure) - - [Firebase](#firebase) - - [GitHub Pages](#github-pages) - - [Heroku](#heroku) - - [Netlify](#netlify) - - [Now](#now) - - [S3 and CloudFront](#s3-and-cloudfront) - - [Surge](#surge) -- [Advanced Configuration](#advanced-configuration) -- [Troubleshooting](#troubleshooting) - - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) - - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) - - [`npm run build` exits too early](#npm-run-build-exits-too-early) - - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) - - [`npm run build` fails to minify](#npm-run-build-fails-to-minify) - - [Moment.js locales are missing](#momentjs-locales-are-missing) -- [Something Missing?](#something-missing) - -## Updating to New Releases - -Create React App is divided into two packages: - -* `create-react-app` is a global command-line utility that you use to create new projects. -* `react-scripts` is a development dependency in the generated projects (including this one). - -You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`. - -When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. - -To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. - -In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. - -We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. - -## Sending Feedback - -We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). - -## Folder Structure - -After creation, your project should look like this: - -``` -my-app/ - README.md - node_modules/ - package.json - public/ - index.html - favicon.ico - src/ - App.css - App.js - App.test.js - index.css - index.js - logo.svg -``` - -For the project to build, **these files must exist with exact filenames**: - -* `public/index.html` is the page template; -* `src/index.js` is the JavaScript entry point. - -You can delete or rename the other files. - -You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.<br> -You need to **put any JS and CSS files inside `src`**, otherwise Webpack won’t see them. - -Only files inside `public` can be used from `public/index.html`.<br> -Read instructions below for using assets from JavaScript and HTML. - -You can, however, create more top-level directories.<br> -They will not be included in the production build so you can use them for things like documentation. - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.<br> -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.<br> -You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.<br> -See the section about [running tests](#running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.<br> -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.<br> -Your app is ready to be deployed! - -See the section about [deployment](#deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Supported Language Features and Polyfills - -This project supports a superset of the latest JavaScript standard.<br> -In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports: - -* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016). -* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017). -* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal). -* [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal) -* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). -* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax. - -Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-). - -While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future. - -Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**: - -* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign). -* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise). -* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch). - -If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them. - -## Syntax Highlighting in the Editor - -To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered. - -## Displaying Lint Output in the Editor - ->Note: this feature is available with `react-scripts@0.2.0` and higher.<br> ->It also only works with npm 3 or higher. - -Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. - -They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. - -You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root: - -```js -{ - "extends": "react-app" -} -``` - -Now your editor should report the linting warnings. - -Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes. - -If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules. - -## Debugging in the Editor - -**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).** - -Visual Studio Code and WebStorm support debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools. - -### Visual Studio Code - -You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed. - -Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory. - -```json -{ - "version": "0.2.0", - "configurations": [{ - "name": "Chrome", - "type": "chrome", - "request": "launch", - "url": "http://localhost:3000", - "webRoot": "${workspaceRoot}/src", - "sourceMapPathOverrides": { - "webpack:///src/*": "${webRoot}/*" - } - }] -} -``` ->Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). - -Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor. - -Having problems with VS Code Debugging? Please see their [troubleshooting guide](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#troubleshooting). - -### WebStorm - -You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed. - -In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration. - ->Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). - -Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm. - -The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine. - -## Formatting Code Automatically - -Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/). - -To format our code whenever we make a commit in git, we need to install the following dependencies: - -```sh -npm install --save husky lint-staged prettier -``` - -Alternatively you may use `yarn`: - -```sh -yarn add husky lint-staged prettier -``` - -* `husky` makes it easy to use githooks as if they are npm scripts. -* `lint-staged` allows us to run scripts on staged files in git. See this [blog post about lint-staged to learn more about it](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8). -* `prettier` is the JavaScript formatter we will run before commits. - -Now we can make sure every file is formatted correctly by adding a few lines to the `package.json` in the project root. - -Add the following line to `scripts` section: - -```diff - "scripts": { -+ "precommit": "lint-staged", - "start": "react-scripts start", - "build": "react-scripts build", -``` - -Next we add a 'lint-staged' field to the `package.json`, for example: - -```diff - "dependencies": { - // ... - }, -+ "lint-staged": { -+ "src/**/*.{js,jsx,json,css}": [ -+ "prettier --single-quote --write", -+ "git add" -+ ] -+ }, - "scripts": { -``` - -Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --single-quote --write "src/**/*.{js,jsx}"` to format your entire project for the first time. - -Next you might want to integrate Prettier in your favorite editor. Read the section on [Editor Integration](https://github.com/prettier/prettier#editor-integration) on the Prettier GitHub page. - -## Changing the Page `<title>` - -You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else. - -Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML. - -If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library. - -If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files). - -## Installing a Dependency - -The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: - -```sh -npm install --save react-router -``` - -Alternatively you may use `yarn`: - -```sh -yarn add react-router -``` - -This works for any library, not just `react-router`. - -## Importing a Component - -This project setup supports ES6 modules thanks to Babel.<br> -While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. - -For example: - -### `Button.js` - -```js -import React, { Component } from 'react'; - -class Button extends Component { - render() { - // ... - } -} - -export default Button; // Don’t forget to use export default! -``` - -### `DangerButton.js` - - -```js -import React, { Component } from 'react'; -import Button from './Button'; // Import a component from another file - -class DangerButton extends Component { - render() { - return <Button color="red" />; - } -} - -export default DangerButton; -``` - -Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. - -We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. - -Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. - -Learn more about ES6 modules: - -* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) -* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) -* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) - -## Code Splitting - -Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand. - -This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 3. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module. - -Here is an example: - -### `moduleA.js` - -```js -const moduleA = 'Hello'; - -export { moduleA }; -``` -### `App.js` - -```js -import React, { Component } from 'react'; - -class App extends Component { - handleClick = () => { - import('./moduleA') - .then(({ moduleA }) => { - // Use moduleA - }) - .catch(err => { - // Handle failure - }); - }; - - render() { - return ( - <div> - <button onClick={this.handleClick}>Load</button> - </div> - ); - } -} - -export default App; -``` - -This will make `moduleA.js` and all its unique dependencies as a separate chunk that only loads after the user clicks the 'Load' button. - -You can also use it with `async` / `await` syntax if you prefer it. - -### With React Router - -If you are using React Router check out [this tutorial](http://serverless-stack.com/chapters/code-splitting-in-create-react-app.html) on how to use code splitting with it. You can find the companion GitHub repository [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client/tree/code-splitting-in-create-react-app). - -## Adding a Stylesheet - -This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: - -### `Button.css` - -```css -.Button { - padding: 20px; -} -``` - -### `Button.js` - -```js -import React, { Component } from 'react'; -import './Button.css'; // Tell Webpack that Button.js uses these styles - -class Button extends Component { - render() { - // You can use them as regular CSS styles - return <div className="Button" />; - } -} -``` - -**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. - -In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. - -If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. - -## Post-Processing CSS - -This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. - -For example, this: - -```css -.App { - display: flex; - flex-direction: row; - align-items: center; -} -``` - -becomes this: - -```css -.App { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -``` - -If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling). - -## Adding a CSS Preprocessor (Sass, Less etc.) - -Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)). - -Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative. - -First, let’s install the command-line interface for Sass: - -```sh -npm install --save node-sass-chokidar -``` - -Alternatively you may use `yarn`: - -```sh -yarn add node-sass-chokidar -``` - -Then in `package.json`, add the following lines to `scripts`: - -```diff - "scripts": { -+ "build-css": "node-sass-chokidar src/ -o src/", -+ "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test --env=jsdom", -``` - ->Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. - -Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated. - -To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions. - -To enable importing files without using relative paths, you can add the `--include-path` option to the command in `package.json`. - -``` -"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/", -"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive", -``` - -This will allow you to do imports like - -```scss -@import 'styles/_colors.scss'; // assuming a styles directory under src/ -@import 'nprogress/nprogress'; // importing a css file from the nprogress node module -``` - -At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control. - -As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use the `&&` operator to execute two scripts sequentially. However, there is no cross-platform way to run two scripts in parallel, so we will install a package for this: - -```sh -npm install --save npm-run-all -``` - -Alternatively you may use `yarn`: - -```sh -yarn add npm-run-all -``` - -Then we can change `start` and `build` scripts to include the CSS preprocessor commands: - -```diff - "scripts": { - "build-css": "node-sass-chokidar src/ -o src/", - "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", -- "start": "react-scripts start", -- "build": "react-scripts build", -+ "start-js": "react-scripts start", -+ "start": "npm-run-all -p watch-css start-js", -+ "build-js": "react-scripts build", -+ "build": "npm-run-all build-css build-js", - "test": "react-scripts test --env=jsdom", - "eject": "react-scripts eject" - } -``` - -Now running `npm start` and `npm run build` also builds Sass files. - -**Why `node-sass-chokidar`?** - -`node-sass` has been reported as having the following issues: - -- `node-sass --watch` has been reported to have *performance issues* in certain conditions when used in a virtual machine or with docker. - -- Infinite styles compiling [#1939](https://github.com/facebookincubator/create-react-app/issues/1939) - -- `node-sass` has been reported as having issues with detecting new files in a directory [#1891](https://github.com/sass/node-sass/issues/1891) - - `node-sass-chokidar` is used here as it addresses these issues. - -## Adding Images, Fonts, and Files - -With Webpack, using static assets like images and fonts works similarly to CSS. - -You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF. - -To reduce the number of requests to the server, importing images that are less than 10,000 bytes returns a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) instead of a path. This applies to the following file extensions: bmp, gif, jpg, jpeg, and png. SVG files are excluded due to [#1153](https://github.com/facebookincubator/create-react-app/issues/1153). - -Here is an example: - -```js -import React from 'react'; -import logo from './logo.png'; // Tell Webpack this JS file uses this image - -console.log(logo); // /logo.84287d09.png - -function Header() { - // Import result is the URL of your image - return <img src={logo} alt="Logo" />; -} - -export default Header; -``` - -This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths. - -This works in CSS too: - -```css -.Logo { - background-image: url(./logo.png); -} -``` - -Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. - -Please be advised that this is also a custom feature of Webpack. - -**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).<br> -An alternative way of handling static assets is described in the next section. - -## Using the `public` Folder - ->Note: this feature is available with `react-scripts@0.5.0` and higher. - -### Changing the HTML - -The `public` folder contains the HTML file so you can tweak it, for example, to [set the page title](#changing-the-page-title). -The `<script>` tag with the compiled code will be added to it automatically during the build process. - -### Adding Assets Outside of the Module System - -You can also add other assets to the `public` folder. - -Note that we normally encourage you to `import` assets in JavaScript files instead. -For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-fonts-and-files). -This mechanism provides a number of benefits: - -* Scripts and stylesheets get minified and bundled together to avoid extra network requests. -* Missing files cause compilation errors instead of 404 errors for your users. -* Result filenames include content hashes so you don’t need to worry about browsers caching their old versions. - -However there is an **escape hatch** that you can use to add an asset outside of the module system. - -If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. - -Inside `index.html`, you can use it like this: - -```html -<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> -``` - -Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build. - -When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL. - -In JavaScript code, you can use `process.env.PUBLIC_URL` for similar purposes: - -```js -render() { - // Note: this is an escape hatch and should be used sparingly! - // Normally we recommend using `import` for getting asset URLs - // as described in “Adding Images and Fonts” above this section. - return <img src={process.env.PUBLIC_URL + '/img/logo.png'} />; -} -``` - -Keep in mind the downsides of this approach: - -* None of the files in `public` folder get post-processed or minified. -* Missing files will not be called at compilation time, and will cause 404 errors for your users. -* Result filenames won’t include content hashes so you’ll need to add query arguments or rename them every time they change. - -### When to Use the `public` Folder - -Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-fonts-and-files) from JavaScript. -The `public` folder is useful as a workaround for a number of less common cases: - -* You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest). -* You have thousands of images and need to dynamically reference their paths. -* You want to include a small script like [`pace.js`](http://github.hubspot.com/pace/docs/welcome/) outside of the bundled code. -* Some library may be incompatible with Webpack and you have no other option but to include it as a `<script>` tag. - -Note that if you add a `<script>` that declares global variables, you also need to read the next section on using them. - -## Using Global Variables - -When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable. - -You can avoid this by reading the global variable explicitly from the `window` object, for example: - -```js -const $ = window.$; -``` - -This makes it obvious you are using a global variable intentionally rather than because of a typo. - -Alternatively, you can force the linter to ignore any line by adding `// eslint-disable-line` after it. - -## Adding Bootstrap - -You don’t have to use [Reactstrap](https://reactstrap.github.io/) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: - -Install Reactstrap and Bootstrap from npm. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: - -```sh -npm install --save reactstrap bootstrap@4 -``` - -Alternatively you may use `yarn`: - -```sh -yarn add reactstrap bootstrap@4 -``` - -Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file: - -```js -import 'bootstrap/dist/css/bootstrap.css'; -// Put any other imports below so that CSS from your -// components takes precedence over default styles. -``` - -Import required React Bootstrap components within ```src/App.js``` file or your custom component files: - -```js -import { Navbar, Button } from 'reactstrap'; -``` - -Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. - -### Using a Custom Theme - -Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br> -We suggest the following approach: - -* Create a new package that depends on the package you wish to customize, e.g. Bootstrap. -* Add the necessary build steps to tweak the theme, and publish your package on npm. -* Install your own theme npm package as a dependency of your app. - -Here is an example of adding a [customized Bootstrap](https://medium.com/@tacomanator/customizing-create-react-app-aa9ffb88165) that follows these steps. - -## Adding Flow - -Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. - -Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box. - -To add Flow to a Create React App project, follow these steps: - -1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). -2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. -3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. -4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). - -Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. -You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience. -In the future we plan to integrate it into Create React App even more closely. - -To learn more about Flow, check out [its documentation](https://flowtype.org/). - -## Adding Custom Environment Variables - ->Note: this feature is available with `react-scripts@0.2.3` and higher. - -Your project can consume variables declared in your environment as if they were declared locally in your JS files. By -default you will have `NODE_ENV` defined for you, and any other environment variables starting with -`REACT_APP_`. - -**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them. - ->Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. - -These environment variables will be defined for you on `process.env`. For example, having an environment -variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`. - -There is also a special built-in environment variable called `NODE_ENV`. You can read it from `process.env.NODE_ENV`. When you run `npm start`, it is always equal to `'development'`, when you run `npm test` it is always equal to `'test'`, and when you run `npm run build` to make a production bundle, it is always equal to `'production'`. **You cannot override `NODE_ENV` manually.** This prevents developers from accidentally deploying a slow development build to production. - -These environment variables can be useful for displaying information conditionally based on where the project is -deployed or consuming sensitive data that lives outside of version control. - -First, you need to have environment variables defined. For example, let’s say you wanted to consume a secret defined -in the environment inside a `<form>`: - -```jsx -render() { - return ( - <div> - <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> - <form> - <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> - </form> - </div> - ); -} -``` - -During the build, `process.env.REACT_APP_SECRET_CODE` will be replaced with the current value of the `REACT_APP_SECRET_CODE` environment variable. Remember that the `NODE_ENV` variable will be set for you automatically. - -When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: - -```html -<div> - <small>You are running this application in <b>development</b> mode.</small> - <form> - <input type="hidden" value="abcdef" /> - </form> -</div> -``` - -The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this -value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in -a `.env` file. Both of these ways are described in the next few sections. - -Having access to the `NODE_ENV` is also useful for performing actions conditionally: - -```js -if (process.env.NODE_ENV !== 'production') { - analytics.disable(); -} -``` - -When you compile the app with `npm run build`, the minification step will strip out this condition, and the resulting bundle will be smaller. - -### Referencing Environment Variables in the HTML - ->Note: this feature is available with `react-scripts@0.9.0` and higher. - -You can also access the environment variables starting with `REACT_APP_` in the `public/index.html`. For example: - -```html -<title>%REACT_APP_WEBSITE_NAME% -``` - -Note that the caveats from the above section apply: - -* Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work. -* The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](#generating-dynamic-meta-tags-on-the-server). - -### Adding Temporary Environment Variables In Your Shell - -Defining environment variables can vary between OSes. It’s also important to know that this manner is temporary for the -life of the shell session. - -#### Windows (cmd.exe) - -```cmd -set REACT_APP_SECRET_CODE=abcdef&&npm start -``` - -(Note: the lack of whitespace is intentional.) - -#### Linux, macOS (Bash) - -```bash -REACT_APP_SECRET_CODE=abcdef npm start -``` - -### Adding Development Environment Variables In `.env` - ->Note: this feature is available with `react-scripts@0.5.0` and higher. - -To define permanent environment variables, create a file called `.env` in the root of your project: - -``` -REACT_APP_SECRET_CODE=abcdef -``` - -`.env` files **should be** checked into source control (with the exclusion of `.env*.local`). - -#### What other `.env` files can be used? - ->Note: this feature is **available with `react-scripts@1.0.0` and higher**. - -* `.env`: Default. -* `.env.local`: Local overrides. **This file is loaded for all environments except test.** -* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings. -* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings. - -Files on the left have more priority than files on the right: - -* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env` -* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env` -* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing) - -These variables will act as the defaults if the machine does not explicitly set them.
-Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. - ->Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need -these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). - -## Can I Use Decorators? - -Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
-Create React App doesn’t support decorator syntax at the moment because: - -* It is an experimental proposal and is subject to change. -* The current specification version is not officially supported by Babel. -* If the specification changes, we won’t be able to write a codemod because we don’t use them internally at Facebook. - -However in many cases you can rewrite decorator-based code without decorators just as fine.
-Please refer to these two threads for reference: - -* [#214](https://github.com/facebookincubator/create-react-app/issues/214) -* [#411](https://github.com/facebookincubator/create-react-app/issues/411) - -Create React App will add decorator support when the specification advances to a stable stage. - -## Integrating with an API Backend - -These tutorials will help you to integrate your app with an API backend running on another port, -using `fetch()` to access it. - -### Node -Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/). -You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). - -### Ruby on Rails - -Check out [this tutorial](https://www.fullstackreact.com/articles/how-to-get-create-react-app-to-work-with-your-rails-api/). -You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo-rails). - -## Proxying API Requests in Development - ->Note: this feature is available with `react-scripts@0.2.3` and higher. - -People often serve the front-end React app from the same host and port as their backend implementation.
-For example, a production setup might look like this after the app is deployed: - -``` -/ - static server returns index.html with React app -/todos - static server returns index.html with React app -/api/todos - server handles any /api/* requests using the backend implementation -``` - -Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. - -To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: - -```js - "proxy": "http://localhost:4000", -``` - -This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will **only** attempt to send requests without `text/html` in its `Accept` header to the proxy. - -Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: - -``` -Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. -``` - -Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`. - -The `proxy` option supports HTTP, HTTPS and WebSocket connections.
-If the `proxy` option is **not** flexible enough for you, alternatively you can: - -* [Configure the proxy yourself](#configuring-the-proxy-manually) -* Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). -* Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. - -### "Invalid Host Header" Errors After Configuring Proxy - -When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. The issue is explained in [this article](https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a) and [this issue](https://github.com/webpack/webpack-dev-server/issues/887). - -This shouldn’t affect you when developing on `localhost`, but if you develop remotely like [described here](https://github.com/facebookincubator/create-react-app/issues/2271), you will see this error in the browser after enabling the `proxy` option: - ->Invalid Host header - -To work around it, you can specify your public development host in a file called `.env.development` in the root of your project: - -``` -HOST=mypublicdevhost.com -``` - -If you restart the development server now and load the app from the specified host, it should work. - -If you are still having issues or if you’re using a more exotic environment like a cloud editor, you can bypass the host check completely by adding a line to `.env.development.local`. **Note that this is dangerous and exposes your machine to remote code execution from malicious websites:** - -``` -# NOTE: THIS IS DANGEROUS! -# It exposes your machine to attacks from the websites you visit. -DANGEROUSLY_DISABLE_HOST_CHECK=true -``` - -We don’t recommend this approach. - -### Configuring the Proxy Manually - ->Note: this feature is available with `react-scripts@1.0.0` and higher. - -If the `proxy` option is **not** flexible enough for you, you can specify an object in the following form (in `package.json`).
-You may also specify any configuration value [`http-proxy-middleware`](https://github.com/chimurai/http-proxy-middleware#options) or [`http-proxy`](https://github.com/nodejitsu/node-http-proxy#options) supports. -```js -{ - // ... - "proxy": { - "/api": { - "target": "", - "ws": true - // ... - } - } - // ... -} -``` - -All requests matching this path will be proxies, no exceptions. This includes requests for `text/html`, which the standard `proxy` option does not proxy. - -If you need to specify multiple proxies, you may do so by specifying additional entries. -Matches are regular expressions, so that you can use a regexp to match multiple paths. -```js -{ - // ... - "proxy": { - // Matches any request starting with /api - "/api": { - "target": "", - "ws": true - // ... - }, - // Matches any request starting with /foo - "/foo": { - "target": "", - "ssl": true, - "pathRewrite": { - "^/foo": "/foo/beta" - } - // ... - }, - // Matches /bar/abc.html but not /bar/sub/def.html - "/bar/[^/]*[.]html": { - "target": "", - // ... - }, - // Matches /baz/abc.html and /baz/sub/def.html - "/baz/.*/.*[.]html": { - "target": "" - // ... - } - } - // ... -} -``` - -### Configuring a WebSocket Proxy - -When setting up a WebSocket proxy, there are a some extra considerations to be aware of. - -If you’re using a WebSocket engine like [Socket.io](https://socket.io/), you must have a Socket.io server running that you can use as the proxy target. Socket.io will not work with a standard WebSocket server. Specifically, don't expect Socket.io to work with [the websocket.org echo test](http://websocket.org/echo.html). - -There’s some good documentation available for [setting up a Socket.io server](https://socket.io/docs/). - -Standard WebSockets **will** work with a standard WebSocket server as well as the websocket.org echo test. You can use libraries like [ws](https://github.com/websockets/ws) for the server, with [native WebSockets in the browser](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). - -Either way, you can proxy WebSocket requests manually in `package.json`: - -```js -{ - // ... - "proxy": { - "/socket": { - // Your compatible WebSocket server - "target": "ws://", - // Tell http-proxy-middleware that this is a WebSocket proxy. - // Also allows you to proxy WebSocket requests without an additional HTTP request - // https://github.com/chimurai/http-proxy-middleware#external-websocket-upgrade - "ws": true - // ... - } - } - // ... -} -``` - -## Using HTTPS in Development - ->Note: this feature is available with `react-scripts@0.4.0` and higher. - -You may require the dev server to serve pages over HTTPS. One particular case where this could be useful is when using [the "proxy" feature](#proxying-api-requests-in-development) to proxy requests to an API server when that API server is itself serving HTTPS. - -To do this, set the `HTTPS` environment variable to `true`, then start the dev server as usual with `npm start`: - -#### Windows (cmd.exe) - -```cmd -set HTTPS=true&&npm start -``` - -(Note: the lack of whitespace is intentional.) - -#### Linux, macOS (Bash) - -```bash -HTTPS=true npm start -``` - -Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page. - -## Generating Dynamic `` Tags on the Server - -Since Create React App doesn’t support server rendering, you might be wondering how to make `` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this: - -```html - - - - - -``` - -Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG_TITLE__`, `__OG_DESCRIPTION__`, and any other placeholders with values depending on the current URL. Just make sure to sanitize and escape the interpolated values so that they are safe to embed into HTML! - -If you use a Node server, you can even share the route matching logic between the client and the server. However duplicating it also works fine in simple cases. - -## Pre-Rendering into Static HTML Files - -If you’re hosting your `build` with a static hosting provider you can use [react-snapshot](https://www.npmjs.com/package/react-snapshot) or [react-snap](https://github.com/stereobooster/react-snap) to generate HTML pages for each route, or relative link, in your application. These pages will then seamlessly become active, or “hydrated”, when the JavaScript bundle has loaded. - -There are also opportunities to use this outside of static hosting, to take the pressure off the server when generating and caching routes. - -The primary benefit of pre-rendering is that you get the core content of each page _with_ the HTML payload—regardless of whether or not your JavaScript bundle successfully downloads. It also increases the likelihood that each route of your application will be picked up by search engines. - -You can read more about [zero-configuration pre-rendering (also called snapshotting) here](https://medium.com/superhighfives/an-almost-static-stack-6df0a2791319). - -## Injecting Data from the Server into the Page - -Similarly to the previous section, you can leave some placeholders in the HTML that inject global variables, for example: - -```js - - - - -``` - -Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.** - -## Running Tests - ->Note: this feature is available with `react-scripts@0.3.0` and higher.
->[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) - -Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try. - -Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness. - -While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks. - -We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App. - -### Filename Conventions - -Jest will look for test files with any of the following popular naming conventions: - -* Files with `.js` suffix in `__tests__` folders. -* Files with `.test.js` suffix. -* Files with `.spec.js` suffix. - -The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder. - -We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects. - -### Command Line Interface - -When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code. - -The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run: - -![Jest watch mode](http://facebook.github.io/jest/img/blog/15-watch.gif) - -### Version Control Integration - -By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests run fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. - -Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests. - -Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository. - -### Writing Tests - -To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended. - -Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this: - -```js -import sum from './sum'; - -it('sums numbers', () => { - expect(sum(1, 2)).toEqual(3); - expect(sum(2, 2)).toEqual(4); -}); -``` - -All `expect()` matchers supported by Jest are [extensively documented here](https://facebook.github.io/jest/docs/en/expect.html#content).
-You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](https://facebook.github.io/jest/docs/en/expect.html#tohavebeencalled) to create “spies” or mock functions. - -### Testing Components - -There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes. - -Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components: - -```js -import React from 'react'; -import ReactDOM from 'react-dom'; -import App from './App'; - -it('renders without crashing', () => { - const div = document.createElement('div'); - ReactDOM.render(, div); -}); -``` - -This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. - -When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior. - -If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). To install it, run: - -```sh -npm install --save enzyme enzyme-adapter-react-16 react-test-renderer -``` - -Alternatively you may use `yarn`: - -```sh -yarn add enzyme enzyme-adapter-react-16 react-test-renderer -``` - -As of Enzyme 3, you will need to install Enzyme along with an Adapter corresponding to the version of React you are using. (The examples above use the adapter for React 16.) - -The adapter will also need to be configured in your [global setup file](#initializing-test-environment): - -#### `src/setupTests.js` -```js -import { configure } from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; - -configure({ adapter: new Adapter() }); -``` - -Now you can write a smoke test with it: - -```js -import React from 'react'; -import { shallow } from 'enzyme'; -import App from './App'; - -it('renders without crashing', () => { - shallow(); -}); -``` - -Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a ` - - ); - } -} diff --git a/TbsReact_/ClientApp/src/components/FetchData.js b/TbsReact_/ClientApp/src/components/FetchData.js deleted file mode 100644 index 25d920654..000000000 --- a/TbsReact_/ClientApp/src/components/FetchData.js +++ /dev/null @@ -1,59 +0,0 @@ -import React, { Component } from 'react'; - -export class FetchData extends Component { - static displayName = FetchData.name; - - constructor(props) { - super(props); - this.state = { forecasts: [], loading: true }; - } - - componentDidMount() { - this.populateWeatherData(); - } - - static renderForecastsTable(forecasts) { - return ( - - - - - - - - - - - {forecasts.map(forecast => - - - - - - - )} - -
DateTemp. (C)Temp. (F)Summary
{forecast.date}{forecast.temperatureC}{forecast.temperatureF}{forecast.summary}
- ); - } - - render() { - let contents = this.state.loading - ?

Loading...

- : FetchData.renderForecastsTable(this.state.forecasts); - - return ( -
-

Weather forecast

-

This component demonstrates fetching data from the server.

- {contents} -
- ); - } - - async populateWeatherData() { - const response = await fetch('weatherforecast'); - const data = await response.json(); - this.setState({ forecasts: data, loading: false }); - } -} diff --git a/TbsReact_/ClientApp/src/components/Home.js b/TbsReact_/ClientApp/src/components/Home.js deleted file mode 100644 index 7f6b28e71..000000000 --- a/TbsReact_/ClientApp/src/components/Home.js +++ /dev/null @@ -1,26 +0,0 @@ -import React, { Component } from 'react'; - -export class Home extends Component { - static displayName = Home.name; - - render () { - return ( -
-

Hello, world!

-

Welcome to your new single-page application, built with:

-
-

To help you get started, we have also set up:

-
    -
  • Client-side navigation. For example, click Counter then Back to return here.
  • -
  • Development server integration. In development mode, the development server from create-react-app runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.
  • -
  • Efficient production builds. In production mode, development-time features are disabled, and your dotnet publish configuration produces minified, efficiently bundled JavaScript files.
  • -
-

The ClientApp subdirectory is a standard React application based on the create-react-app template. If you open a command prompt in that directory, you can run npm commands such as npm test or npm install.

-
- ); - } -} diff --git a/TbsReact_/ClientApp/src/components/Layout.js b/TbsReact_/ClientApp/src/components/Layout.js deleted file mode 100644 index 4ced296ad..000000000 --- a/TbsReact_/ClientApp/src/components/Layout.js +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; -import NavMenu from './NavMenu'; - -const Layout = ({ selected, setSelected }) => { - return ( - <> - - - ); - -} - -export default Layout; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/NavMenu.css b/TbsReact_/ClientApp/src/components/NavMenu.css deleted file mode 100644 index 9214b0eae..000000000 --- a/TbsReact_/ClientApp/src/components/NavMenu.css +++ /dev/null @@ -1,18 +0,0 @@ -a.navbar-brand { - white-space: normal; - text-align: center; - word-break: break-all; -} - -html { - font-size: 14px; -} -@media (min-width: 768px) { - html { - font-size: 16px; - } -} - -.box-shadow { - box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); -} diff --git a/TbsReact_/ClientApp/src/components/NavMenu.js b/TbsReact_/ClientApp/src/components/NavMenu.js deleted file mode 100644 index 616612bca..000000000 --- a/TbsReact_/ClientApp/src/components/NavMenu.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import { Container, Navbar, NavbarBrand} from 'reactstrap'; -import { Link } from 'react-router-dom'; -import './NavMenu.css'; -import SideBar from './sidebar/SideBar'; - -const NavMenu = ({ selected, setSelected }) => { - - return ( -
- - - - TBSReact - - -
- ); -} - -export default NavMenu; diff --git a/TbsReact_/ClientApp/src/components/sidebar/AccountRow.js b/TbsReact_/ClientApp/src/components/sidebar/AccountRow.js deleted file mode 100644 index a4d862ca2..000000000 --- a/TbsReact_/ClientApp/src/components/sidebar/AccountRow.js +++ /dev/null @@ -1,17 +0,0 @@ -import { TableCell, TableRow } from "@mui/material"; - -const AccountRow = ({acc, handler, selected}) => { - return ( - <> - handler(acc)} - selected = {acc.Id === selected}> - {acc.Username} - {acc.ServerUrl} - - - ) -} - -export default AccountRow; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/sidebar/AccountTable.js b/TbsReact_/ClientApp/src/components/sidebar/AccountTable.js deleted file mode 100644 index 77668cd6d..000000000 --- a/TbsReact_/ClientApp/src/components/sidebar/AccountTable.js +++ /dev/null @@ -1,44 +0,0 @@ -import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'; -import React from 'react' -import AccountRow from './AccountRow' - -const AccountTable = ({ selected, setSelected }) => { - const onClick = (acc) => { - setSelected(acc.Id) - }; - const accs = [ - { Id: 0, Username: "alsdao", ServerUrl: "ts50.x5.america.travian.com" }, - { Id: 1, Username: "alo", ServerUrl: "sadasd" }, - { Id: 2, Username: "ao", ServerUrl: "sadasd" }, - { Id: 3, Username: "a2lo", ServerUrl: "sadasd" }, - { Id: 4, Username: "al3o", ServerUrl: "sadasd" }, - { Id: 5, Username: "al4o", ServerUrl: "sadasd" }, - { Id: 6, Username: "al5o", ServerUrl: "sadasd" }, - ] - - const accsNode = accs.map((acc) => ( - ) - ) - - return ( - <> - - - - - Username - Server url - - - - {accsNode} - -
-
- - ) -} - -export default AccountTable; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/sidebar/Modal/AccessRow.js b/TbsReact_/ClientApp/src/components/sidebar/Modal/AccessRow.js deleted file mode 100644 index eef426185..000000000 --- a/TbsReact_/ClientApp/src/components/sidebar/Modal/AccessRow.js +++ /dev/null @@ -1,18 +0,0 @@ -import { TableCell, TableRow } from "@mui/material"; - -const AccountRow = ({access, handler, selected}) => { - return ( - <> - handler(access)} - selected = {access.id === selected}> - {[access.proxy.ip, ':', access.proxy.port].join()} - {access.proxy.username} - {access.proxy.OK === true ? "✔" : "❌"} - - - ) -} - -export default AccountRow; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TbsReact_/ClientApp/src/components/sidebar/Modal/AccountModal.js deleted file mode 100644 index e2a9e3cff..000000000 --- a/TbsReact_/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ /dev/null @@ -1,157 +0,0 @@ -import { useEffect, useState } from 'react'; -import { Modal, Button, Box, Typography, Input, Table, TableHead, TableCell } from '@mui/material'; -import AccessRow from './AccessRow'; - -const style = { - position: 'absolute', - top: '50%', - left: '50%', - transform: 'translate(-50%, -50%)', - bgcolor: 'background.paper', - border: '2px solid #000', - boxShadow: 24, - p: 4, -}; - -const AccountModal = ({ editMode = false, accID = -1 }) => { - const [selected, setSelected] = useState(0); - const [open, setOpen] = useState(false); - const [accesses, setAccesses] = useState([]); - - //Form - const [username, setUsername] = useState(""); - const [server, setServer] = useState(""); - const [password, setPassword] = useState(""); - const [proxyIP, setProxyIP] = useState(0); - const [proxyPort, setProxyPort] = useState(""); - const [proxyUsername, setProxyUsername] = useState(""); - const [proxyPassword, setProxyPassword] = useState(""); - - - const handleOpen = () => setOpen(true); - const handleClose = () => setOpen(false); - const onClickTable = (access) => { - setSelected(access.id) - }; - const onClickAdd = () => { - const newAccess = { id: accesses.length, password: password, proxy: { ip: proxyIP, port: proxyPort, username: proxyUsername, password: proxyPassword, ok: false } } - setAccesses([...accesses, newAccess]) - console.log(newAccess) - update(); - } - const onClickEdit = () => { - const newAccess = { id: selected, password: password, proxy: { ip: proxyIP, port: proxyPort, username: proxyUsername, password: proxyPassword, ok: false } } - setAccesses( (old) => {old[selected] = newAccess; return old}) - console.log(newAccess) - update(); - - } - const onClickDelete = () => { - console.log("delete", selected); - update(); - - } - useEffect(() => { - console.log("access", selected) - }, [selected]); - - let accessNode = null; - - const update = () => { - accessNode = accesses.map((access) => ( - ) - ); - } - - - - return ( - <> - - - - - {editMode === true ? "Add account" : "Edit account"} - - - - - - - - - - - - - - - - - - - - - - - - -
- Username - - setUsername(e.target.value)} /> - - Server - - setServer(e.target.value)} /> -
- Password - - setPassword(e.target.value)} /> -
- Proxy IP - - setProxyIP(e.target.value)} /> - - Proxy username - - setProxyUsername(e.target.value)} /> -
- Proxy Port - - setProxyPort(e.target.value)} /> - - Proxy password - - setProxyPassword(e.target.value)} /> -
- - - - -
- - - - - -
- - - Proxy - Proxy username - OK - - {accessNode} -
-
-
- - ) -} - -export default AccountModal; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/components/sidebar/SideBar.js b/TbsReact_/ClientApp/src/components/sidebar/SideBar.js deleted file mode 100644 index a99c796dc..000000000 --- a/TbsReact_/ClientApp/src/components/sidebar/SideBar.js +++ /dev/null @@ -1,44 +0,0 @@ -import React from "react" -import { Drawer, IconButton } from "@mui/material" -import MenuIcon from '@mui/icons-material/Menu'; -import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; - -import AccountTable from "./AccountTable" -import AccountModal from "./Modal/AccountModal" -const SideBar = ({ selected, setSelected }) => { - const [open, setOpen] = React.useState(false); - const handleDrawerOpen = () => { - setOpen(true); - }; - - const handleDrawerClose = () => { - setOpen(false); - }; - - - return ( - <> - - - - - - - - - - - - - ) -} -export default SideBar; \ No newline at end of file diff --git a/TbsReact_/ClientApp/src/custom.css b/TbsReact_/ClientApp/src/custom.css deleted file mode 100644 index 5fdfd061c..000000000 --- a/TbsReact_/ClientApp/src/custom.css +++ /dev/null @@ -1,14 +0,0 @@ -/* Provide sufficient contrast against white background */ -a { - color: #0366d6; -} - -code { - color: #E01A76; -} - -.btn-primary { - color: #fff; - background-color: #1b6ec2; - border-color: #1861ac; -} diff --git a/TbsReact_/ClientApp/src/index.js b/TbsReact_/ClientApp/src/index.js deleted file mode 100644 index fbb3bcc6d..000000000 --- a/TbsReact_/ClientApp/src/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import 'bootstrap/dist/css/bootstrap.css'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import { BrowserRouter } from 'react-router-dom'; -import App from './App'; -import * as serviceWorkerRegistration from './serviceWorkerRegistration'; -import reportWebVitals from './reportWebVitals'; - -const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); -const rootElement = document.getElementById('root'); - -ReactDOM.render( - - - , - rootElement); - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://cra.link/PWA -serviceWorkerRegistration.unregister(); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/TbsReact_/ClientApp/src/reportWebVitals.js b/TbsReact_/ClientApp/src/reportWebVitals.js deleted file mode 100644 index 532f29b0b..000000000 --- a/TbsReact_/ClientApp/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = (onPerfEntry) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/TbsReact_/ClientApp/src/service-worker.js b/TbsReact_/ClientApp/src/service-worker.js deleted file mode 100644 index 0f1e0ce02..000000000 --- a/TbsReact_/ClientApp/src/service-worker.js +++ /dev/null @@ -1,72 +0,0 @@ -/* eslint-disable no-restricted-globals */ - -// This service worker can be customized! -// See https://developers.google.com/web/tools/workbox/modules -// for the list of available Workbox modules, or add any other -// code you'd like. -// You can also remove this file if you'd prefer not to use a -// service worker, and the Workbox build step will be skipped. - -import { clientsClaim } from 'workbox-core'; -import { ExpirationPlugin } from 'workbox-expiration'; -import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'; -import { registerRoute } from 'workbox-routing'; -import { StaleWhileRevalidate } from 'workbox-strategies'; - -clientsClaim(); - -// Precache all of the assets generated by your build process. -// Their URLs are injected into the manifest variable below. -// This variable must be present somewhere in your service worker file, -// even if you decide not to use precaching. See https://cra.link/PWA -precacheAndRoute(self.__WB_MANIFEST); - -// Set up App Shell-style routing, so that all navigation requests -// are fulfilled with your index.html shell. Learn more at -// https://developers.google.com/web/fundamentals/architecture/app-shell -const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$'); -registerRoute( - // Return false to exempt requests from being fulfilled by index.html. - ({ request, url }) => { - // If this isn't a navigation, skip. - if (request.mode !== 'navigate') { - return false; - } // If this is a URL that starts with /_, skip. - - if (url.pathname.startsWith('/_')) { - return false; - } // If this looks like a URL for a resource, because it contains // a file extension, skip. - - if (url.pathname.match(fileExtensionRegexp)) { - return false; - } // Return true to signal that we want to use the handler. - - return true; - }, - createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html') -); - -// An example runtime caching route for requests that aren't handled by the -// precache, in this case same-origin .png requests like those from in public/ -registerRoute( - // Add in any other file extensions or routing criteria as needed. - ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'), // Customize this strategy as needed, e.g., by changing to CacheFirst. - new StaleWhileRevalidate({ - cacheName: 'images', - plugins: [ - // Ensure that once this runtime cache reaches a maximum size the - // least-recently used images are removed. - new ExpirationPlugin({ maxEntries: 50 }), - ], - }) -); - -// This allows the web app to trigger skipWaiting via -// registration.waiting.postMessage({type: 'SKIP_WAITING'}) -self.addEventListener('message', (event) => { - if (event.data && event.data.type === 'SKIP_WAITING') { - self.skipWaiting(); - } -}); - -// Any other custom service worker logic can go here. diff --git a/TbsReact_/ClientApp/src/serviceWorkerRegistration.js b/TbsReact_/ClientApp/src/serviceWorkerRegistration.js deleted file mode 100644 index 2262ecdbf..000000000 --- a/TbsReact_/ClientApp/src/serviceWorkerRegistration.js +++ /dev/null @@ -1,137 +0,0 @@ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read https://cra.link/PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.0/8 are considered localhost for IPv4. - window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) -); - -export function register(config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://cra.link/PWA' - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl, config) { - navigator.serviceWorker - .register(swUrl) - .then((registration) => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://cra.link/PWA.' - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch((error) => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl, config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl, { - headers: { 'Service-Worker': 'script' }, - }) - .then((response) => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then((registration) => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log('No internet connection found. App is running in offline mode.'); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready - .then((registration) => { - registration.unregister(); - }) - .catch((error) => { - console.error(error.message); - }); - } -} diff --git a/TbsReact_/ClientApp/src/setupProxy.js b/TbsReact_/ClientApp/src/setupProxy.js deleted file mode 100644 index 2bf4e2a20..000000000 --- a/TbsReact_/ClientApp/src/setupProxy.js +++ /dev/null @@ -1,18 +0,0 @@ -const createProxyMiddleware = require('http-proxy-middleware'); -const { env } = require('process'); - -const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` : - env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:57848'; - -const context = [ - "/weatherforecast", -]; - -module.exports = function(app) { - const appProxy = createProxyMiddleware(context, { - target: target, - secure: false - }); - - app.use(appProxy); -}; diff --git a/TbsReact_/Controllers/AccountController.cs b/TbsReact_/Controllers/AccountController.cs deleted file mode 100644 index 7af666c3d..000000000 --- a/TbsReact_/Controllers/AccountController.cs +++ /dev/null @@ -1,92 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using TbsReact.Models; -using TbsReact.Singleton; - -namespace TbsReact.Controllers -{ - [ApiController] - [Route("[accounts]")] - public class AccountController : ControllerBase - { - // GET: Account - public ActionResult> GetAccounts() - { - var AccountInfoList = new List(); - for (int i = 0; i < AccountManager.Instance.Accounts.Count; i++) - { - AccountInfoList.Add(AccountManager.GetAccount(i, AccountManager.Instance.Accounts[i])); - } - - return AccountInfoList; - } - - // GET: Account/Details/5 - public ActionResult Details(int id) - { - return View(); - } - - // GET: Account/Create - public ActionResult Create() - { - return View(); - } - - // POST: Account/Create - [HttpPost] - [ValidateAntiForgeryToken] - public ActionResult Create(IFormCollection collection) - { - try - { - return RedirectToAction(nameof(Index)); - } - catch - { - return View(); - } - } - - // GET: Account/Edit/5 - public ActionResult Edit(int id) - { - return View(); - } - - // POST: Account/Edit/5 - [HttpPost] - [ValidateAntiForgeryToken] - public ActionResult Edit(int id, IFormCollection collection) - { - try - { - return RedirectToAction(nameof(Index)); - } - catch - { - return View(); - } - } - - // GET: Account/Delete/5 - public ActionResult Delete(int id) - { - return View(); - } - - // POST: Account/Delete/5 - [HttpPost] - [ValidateAntiForgeryToken] - public ActionResult Delete(int id, IFormCollection collection) - { - try - { - return RedirectToAction(nameof(Index)); - } - catch - { - return View(); - } - } - } -} \ No newline at end of file diff --git a/TbsReact_/Controllers/WeatherForecastController.cs b/TbsReact_/Controllers/WeatherForecastController.cs deleted file mode 100644 index 52e413cd8..000000000 --- a/TbsReact_/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace TbsReact.Controllers; - -[ApiController] -[Route("[controller]")] -public class WeatherForecastController : ControllerBase -{ - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }) - .ToArray(); - } -} diff --git a/TbsReact_/Models/Access.cs b/TbsReact_/Models/Access.cs deleted file mode 100644 index 5170d6e50..000000000 --- a/TbsReact_/Models/Access.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TbsReact.Models -{ - public class Access - { - public int Id { get; set; } - public string Password { get; set; } - public Proxy Proxy { get; set; } - } -} \ No newline at end of file diff --git a/TbsReact_/Models/Account.cs b/TbsReact_/Models/Account.cs deleted file mode 100644 index 9b4e2dfc5..000000000 --- a/TbsReact_/Models/Account.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace TbsReact.Models -{ - public class Account - { - public int Id { get; set; } - public string Name { get; set; } - public string ServerUrl { get; set; } - - public List Accesses { get; set; } - } -} \ No newline at end of file diff --git a/TbsReact_/Models/Proxy.cs b/TbsReact_/Models/Proxy.cs deleted file mode 100644 index ac9ca7c87..000000000 --- a/TbsReact_/Models/Proxy.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace TbsReact.Models -{ - public class Proxy - { - public string Ip { get; set; } - public int Port { get; set; } - public string? Username { get; set; } - public string? Password { get; set; } - public bool OK { get; set; } - } -} \ No newline at end of file diff --git a/TbsReact_/Pages/Error.cshtml b/TbsReact_/Pages/Error.cshtml deleted file mode 100644 index 6f92b9565..000000000 --- a/TbsReact_/Pages/Error.cshtml +++ /dev/null @@ -1,26 +0,0 @@ -@page -@model ErrorModel -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

- -@if (Model.ShowRequestId) -{ -

- Request ID: @Model.RequestId -

-} - -

Development Mode

-

- Swapping to the Development environment displays detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

diff --git a/TbsReact_/Pages/Error.cshtml.cs b/TbsReact_/Pages/Error.cshtml.cs deleted file mode 100644 index e18030e6f..000000000 --- a/TbsReact_/Pages/Error.cshtml.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Diagnostics; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; - -namespace TbsReact.Pages; - -[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] -public class ErrorModel : PageModel -{ - private readonly ILogger _logger; - - public ErrorModel(ILogger logger) - { - _logger = logger; - } - - public string? RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; - } -} diff --git a/TbsReact_/Pages/_ViewImports.cshtml b/TbsReact_/Pages/_ViewImports.cshtml deleted file mode 100644 index 7f96d899f..000000000 --- a/TbsReact_/Pages/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using TbsReact -@namespace TbsReact.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/TbsReact_/Program.cs b/TbsReact_/Program.cs deleted file mode 100644 index f474a3821..000000000 --- a/TbsReact_/Program.cs +++ /dev/null @@ -1,29 +0,0 @@ -using TbsReact.Singleton; - -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. - -builder.Services.AddControllers(); -builder.Services.AddSingleton(AccountManager.Instance); - -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (!app.Environment.IsDevelopment()) -{ - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); -} - -app.UseHttpsRedirection(); -app.UseStaticFiles(); -app.UseRouting(); - -app.MapControllerRoute( - name: "default", - pattern: "{controller}/{action=Index}/{id?}"); - -app.MapFallbackToFile("index.html"); ; - -app.Run(); \ No newline at end of file diff --git a/TbsReact_/Properties/launchSettings.json b/TbsReact_/Properties/launchSettings.json deleted file mode 100644 index 5f57b501b..000000000 --- a/TbsReact_/Properties/launchSettings.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:57848", - "sslPort": 44342 - } - }, - "profiles": { - "TBSReact": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "https://localhost:7216;http://localhost:5282", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" - } - } - } -} diff --git a/TbsReact_/Singleton/AccountManager.cs b/TbsReact_/Singleton/AccountManager.cs deleted file mode 100644 index 89dda05d5..000000000 --- a/TbsReact_/Singleton/AccountManager.cs +++ /dev/null @@ -1,87 +0,0 @@ -using TbsCore.Database; -using TbsCore.Helpers; - -using TbsReact.Models; - -namespace TbsReact.Singleton - -{ - public sealed class AccountManager - { - private static readonly AccountManager instance = new(); - - private List accounts = new(); - - public List Accounts - { - get { return accounts; } - set { accounts = value; } - } - - static AccountManager() - { - } - - private AccountManager() - { - LoadAccounts(); - } - - public static AccountManager Instance - { - get - { - return instance; - } - } - - public static Account GetAccount(int index, TbsCore.Models.AccModels.Account acc) - { - var accesses = new List(); - - for (int i = 0; i < acc.Access.AllAccess.Count; i++) - { - var access = acc.Access.AllAccess[i]; - accesses.Add(new Access - { - Id = i, - Password = access.Password, - Proxy = new Proxy - { - Ip = access.Proxy, - Port = access.ProxyPort, - Username = access.ProxyUsername, - Password = access.Password, - OK = access.Ok - } - }); - } - return new Account - { - Id = index, - Name = acc.AccInfo.Nickname, - ServerUrl = acc.AccInfo.ServerUrl, - Accesses = accesses - }; - } - - private void LoadAccounts() - { - // For migration purposes only! Remove after few versions - if (IoHelperCore.AccountsTxtExists() && !IoHelperCore.SQLiteExists()) - { - DbRepository.SyncAccountsTxt(); - File.Delete(IoHelperCore.AccountsPath); - } - - accounts = DbRepository.GetAccounts(); - - accounts.ForEach(x => ObjectHelper.FixAccObj(x, x)); - } - - public void SaveAccounts() - { - IoHelperCore.SaveAccounts(accounts, true); - } - } -} \ No newline at end of file diff --git a/TbsReact_/TBSReact.csproj b/TbsReact_/TBSReact.csproj deleted file mode 100644 index bead7e963..000000000 --- a/TbsReact_/TBSReact.csproj +++ /dev/null @@ -1,55 +0,0 @@ - - - - net6.0 - true - Latest - false - ClientApp\ - $(DefaultItemExcludes);$(SpaRoot)node_modules\** - https://localhost:44465 - npm start - enable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - wwwroot\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - true - - - - diff --git a/TbsReact_/WeatherForecast.cs b/TbsReact_/WeatherForecast.cs deleted file mode 100644 index e63aac348..000000000 --- a/TbsReact_/WeatherForecast.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace TbsReact; - -public class WeatherForecast -{ - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } -} diff --git a/TbsReact_/appsettings.Development.json b/TbsReact_/appsettings.Development.json deleted file mode 100644 index 84308c97f..000000000 --- a/TbsReact_/appsettings.Development.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.AspNetCore.SpaProxy": "Information", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/TbsReact_/appsettings.json b/TbsReact_/appsettings.json deleted file mode 100644 index ad75fee41..000000000 --- a/TbsReact_/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, -"AllowedHosts": "*" -} diff --git a/TbsReact_/libman.json b/TbsReact_/libman.json deleted file mode 100644 index ceee2710f..000000000 --- a/TbsReact_/libman.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": "1.0", - "defaultProvider": "cdnjs", - "libraries": [] -} \ No newline at end of file diff --git a/TravBotSharp/TbsWinForms.csproj b/TravBotSharp/TbsWinForms.csproj index eb1fedab4..46ee68f56 100644 --- a/TravBotSharp/TbsWinForms.csproj +++ b/TravBotSharp/TbsWinForms.csproj @@ -17,6 +17,7 @@ false + 1975.30.4.1 \TravBotSharp\Publish\ true Disk @@ -35,7 +36,6 @@ true true true - 1975.30.4.1 x86 diff --git a/version.txt b/version.txt deleted file mode 100644 index 8c9166749..000000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -298 \ No newline at end of file From aaa5175b8953377453ea1484f1021658e2e96396 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 3 Dec 2021 20:27:00 +0700 Subject: [PATCH 12/69] add publish profiles --- TBSReact/.gitignore | 4 +- TBSReact/TBSReact.csproj | 4 +- TbsCore/packages.lock.json | 645 +++++++++++++++++++++++++++++++++++ TbsReact/packages.lock.json | 662 ++++++++++++++++++++++++++++++++++++ 4 files changed, 1312 insertions(+), 3 deletions(-) diff --git a/TBSReact/.gitignore b/TBSReact/.gitignore index 8f8b43bb1..46991dc23 100644 --- a/TBSReact/.gitignore +++ b/TBSReact/.gitignore @@ -1,5 +1,6 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. +.config/ # User-specific files *.suo @@ -137,7 +138,8 @@ publish/ *.azurePubxml # TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted -*.pubxml +#*.pubxml +*.pubxml.user *.publishproj # NuGet Packages diff --git a/TBSReact/TBSReact.csproj b/TBSReact/TBSReact.csproj index 236b6e4c3..a05ce70a0 100644 --- a/TBSReact/TBSReact.csproj +++ b/TBSReact/TBSReact.csproj @@ -9,9 +9,9 @@ $(DefaultItemExcludes);$(SpaRoot)node_modules\** true Exe - - true + true + 2f4cf8f4-975c-481e-9f90-193010f82aca diff --git a/TbsCore/packages.lock.json b/TbsCore/packages.lock.json index 1a09bfdf8..416172005 100644 --- a/TbsCore/packages.lock.json +++ b/TbsCore/packages.lock.json @@ -1071,6 +1071,651 @@ "System.Xml.XmlDocument": "4.3.0" } } + }, + ".NETStandard,Version=v2.0/win-x64": { + "Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.win.Microsoft.Win32.Primitives": "4.3.0" + } + }, + "runtime.any.System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "23g6rqftKmovn2cLeGsuHUYm0FD7pdutb0uQMJpZ3qTvq+zHkgmt6J65VtRry4WDGYlmkMa4xDACtaQ94alNag==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "runtime.any.System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1lpifymjGDzoYIaam6/Hyqf8GhBI3xXYLK2TgEvTtuZMorG3Kb9QnMTIKhLjJYXIiu1JvxjngHvtVFQQlpQ3HQ==" + }, + "runtime.any.System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "sMDBnad4rp4t7GY442Jux0MCUuKL4otn5BK6Ni0ARTXTSpRNBzZ7hpMfKSvnVSED5kYJm96YOWsqV0JH0d2uuw==" + }, + "runtime.any.System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "M1r+760j1CNA6M/ZaW6KX8gOS8nxPRqloqDcJYVidRG566Ykwcs29AweZs2JF+nMOCgWDiMfPSTMfvwOI9F77w==" + }, + "runtime.any.System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "SDZ5AD1DtyRoxYtEcqQ3HDlcrorMYXZeCt7ZhG9US9I5Vva+gpIWDGMkcwa5XiKL0ceQKRZIX2x0XEjLX7PDzQ==" + }, + "runtime.any.System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "hLC3A3rI8jipR5d9k7+f0MgRCW6texsAp0MWkN/ci18FMtQ9KH7E2vDn/DH2LkxsszlpJpOn9qy6Z6/69rH6eQ==" + }, + "runtime.any.System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Nrm1p3armp6TTf2xuvaa+jGTTmncALWFq22CpmwRvhDf6dE9ZmH40EbOswD4GnFLrMRS0Ki6Kx5aUPmKK/hZBg==" + }, + "runtime.any.System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Lxb89SMvf8w9p9+keBLyL6H6x/TEmc6QVsIIA0T36IuyOY3kNvIdyGddA2qt35cRamzxF8K5p0Opq4G4HjNbhQ==" + }, + "runtime.any.System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "fRS7zJgaG9NkifaAxGGclDDoRn9HC7hXACl52Or06a/fxdzDajWb5wov3c6a+gVSlekRoexfjwQSK9sh5um5LQ==", + "dependencies": { + "System.Private.Uri": "4.3.0" + } + }, + "runtime.any.System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GG84X6vufoEzqx8PbeBKheE4srOhimv+yLtGb/JkR3Y2FmoqmueLNFU4Xx8Y67plFpltQSdK74x0qlEhIpv/CQ==" + }, + "runtime.any.System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "lBoFeQfxe/4eqjPi46E0LU/YaCMdNkQ8B4MZu/mkzdIAZh8RQ1NYZSj0egrQKdgdvlPFtP4STtob40r4o2DBAw==" + }, + "runtime.any.System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+ihI5VaXFCMVPJNstG4O4eo1CfbrByLxRrQQTqOTp1ttK0kUKDqOdBSTaCB2IBk/QtjDrs6+x4xuezyMXdm0HQ==" + }, + "runtime.any.System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NLrxmLsfRrOuVqPWG+2lrQZnE53MLVeo+w9c54EV+TUo4c8rILpsDXfY8pPiOy9kHpUHHP07ugKmtsU3vVW5Jg==" + }, + "runtime.any.System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OhBAVBQG5kFj1S+hCEQ3TUHBAEtZ3fbEMgZMRNdN8A0Pj4x+5nTELEqL59DU0TjKVE6II3dqKw4Dklb3szT65w==" + }, + "runtime.any.System.Threading.Timer": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "w4ehZJ+AwXYmGwYu+rMvym6RvMaRiUEQR1u6dwcyuKHxz8Heu/mO9AG1MquEgTyucnhv3M43X0iKpDOoN17C0w==" + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "runtime.win.Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NU51SEt/ZaD2MF48sJ17BIqx7rjeNNLXUevfMOjqQIetdndXwYjZfZsT6jD+rSWp/FYxjesdK4xUSl4OTEI0jw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "runtime.win.System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "hHHP0WCStene2jjeYcuDkETozUYF/3sHVRHAEOgS3L15hlip24ssqCTnJC28Z03Wpo078oMcJd0H4egD2aJI8g==" + }, + "runtime.win.System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Z37zcSCpXuGCYtFbqYO0TwOVXxS2d+BXgSoDFZmRg8BC4Cuy54edjyIvhhcfCrDQA9nl+EPFTgHN54dRAK7mNA==", + "dependencies": { + "System.Buffers": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Overlapped": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "runtime.win.System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "lkXXykakvXUU+Zq2j0pC6EO20lEhijjqMc01XXpp1CJN+DeCwl3nsj4t5Xbpz3kA7yQyTqw6d9SyIzsyLsV3zA==", + "dependencies": { + "Microsoft.Win32.Primitives": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "runtime.win.System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "RkgHVhUPvzZxuUubiZe8yr/6CypRVXj0VBzaR8hsqQ8f+rUo7e4PWrHTLOCjd8fBMGWCrY//fi7Ku3qXD7oHRw==", + "dependencies": { + "System.Private.Uri": "4.3.0" + } + }, + "SQLitePCLRaw.lib.e_sqlite3": { + "type": "Transitive", + "resolved": "2.0.2", + "contentHash": "S+Tsqe/M7wsc+9HeediI6UHtBKf2X586aRwhi1aBVLGe0WxkAo52O9ZxwEy/v8XMLefcrEMupd2e9CDlIT6QCw==" + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Collections": "4.3.0" + } + }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.win.System.Diagnostics.Debug": "4.3.0" + } + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Diagnostics.Tracing": "4.3.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Globalization": "4.3.0" + } + }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Globalization.Calendars": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.any.System.IO": "4.3.0" + } + }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.win.System.IO.FileSystem": "4.3.0" + } + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.2", + "contentHash": "y7hv0o0weI0j0mvEcBOdt1F3CAADiWlcw3e54m8TfYiRmBPDIsHElx8QUPDlY4x6yWXKPGN0Z2TuXCTPgkm5WQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "runtime.win.System.Net.Primitives": "4.3.0" + } + }, + "System.Private.Uri": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I4SwANiUGho1esj4V4oSlPllXjzCZDE+5XXso2P03LW2vOda2Enzh8DWOxwN6hnrJyp314c7KuVu31QYhRzOGg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Reflection": "4.3.0" + } + }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Reflection.Primitives": "4.3.0" + } + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Resources.ResourceManager": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.any.System.Runtime": "4.3.0" + } + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.win.System.Runtime.Extensions": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Runtime.Handles": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "runtime.any.System.Runtime.InteropServices": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Text.Encoding": "4.3.0" + } + }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.any.System.Text.Encoding.Extensions": "4.3.0" + } + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Overlapped": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "m3HQ2dPiX/DSTpf+yJt8B0c+SRvzfqAJKx+QDWi+VLhz8svLT23MVjEOHPF/KiSLeArKU/iHescrbLd3yVgyNg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Timer": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "runtime.any.System.Threading.Timer": "4.3.0" + } + } } } } \ No newline at end of file diff --git a/TbsReact/packages.lock.json b/TbsReact/packages.lock.json index 750486e3c..afac22dd8 100644 --- a/TbsReact/packages.lock.json +++ b/TbsReact/packages.lock.json @@ -1042,6 +1042,668 @@ "Serilog.Sinks.TextWriter": "2.1.0" } } + }, + ".NETCoreApp,Version=v5.0/osx-x64": { + "Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.unix.Microsoft.Win32.Primitives": "4.3.0" + } + }, + "runtime.any.System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "23g6rqftKmovn2cLeGsuHUYm0FD7pdutb0uQMJpZ3qTvq+zHkgmt6J65VtRry4WDGYlmkMa4xDACtaQ94alNag==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "runtime.any.System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1lpifymjGDzoYIaam6/Hyqf8GhBI3xXYLK2TgEvTtuZMorG3Kb9QnMTIKhLjJYXIiu1JvxjngHvtVFQQlpQ3HQ==" + }, + "runtime.any.System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "sMDBnad4rp4t7GY442Jux0MCUuKL4otn5BK6Ni0ARTXTSpRNBzZ7hpMfKSvnVSED5kYJm96YOWsqV0JH0d2uuw==" + }, + "runtime.any.System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "M1r+760j1CNA6M/ZaW6KX8gOS8nxPRqloqDcJYVidRG566Ykwcs29AweZs2JF+nMOCgWDiMfPSTMfvwOI9F77w==" + }, + "runtime.any.System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "SDZ5AD1DtyRoxYtEcqQ3HDlcrorMYXZeCt7ZhG9US9I5Vva+gpIWDGMkcwa5XiKL0ceQKRZIX2x0XEjLX7PDzQ==" + }, + "runtime.any.System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "hLC3A3rI8jipR5d9k7+f0MgRCW6texsAp0MWkN/ci18FMtQ9KH7E2vDn/DH2LkxsszlpJpOn9qy6Z6/69rH6eQ==" + }, + "runtime.any.System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Nrm1p3armp6TTf2xuvaa+jGTTmncALWFq22CpmwRvhDf6dE9ZmH40EbOswD4GnFLrMRS0Ki6Kx5aUPmKK/hZBg==" + }, + "runtime.any.System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Lxb89SMvf8w9p9+keBLyL6H6x/TEmc6QVsIIA0T36IuyOY3kNvIdyGddA2qt35cRamzxF8K5p0Opq4G4HjNbhQ==" + }, + "runtime.any.System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "fRS7zJgaG9NkifaAxGGclDDoRn9HC7hXACl52Or06a/fxdzDajWb5wov3c6a+gVSlekRoexfjwQSK9sh5um5LQ==", + "dependencies": { + "System.Private.Uri": "4.3.0" + } + }, + "runtime.any.System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GG84X6vufoEzqx8PbeBKheE4srOhimv+yLtGb/JkR3Y2FmoqmueLNFU4Xx8Y67plFpltQSdK74x0qlEhIpv/CQ==" + }, + "runtime.any.System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "lBoFeQfxe/4eqjPi46E0LU/YaCMdNkQ8B4MZu/mkzdIAZh8RQ1NYZSj0egrQKdgdvlPFtP4STtob40r4o2DBAw==" + }, + "runtime.any.System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+ihI5VaXFCMVPJNstG4O4eo1CfbrByLxRrQQTqOTp1ttK0kUKDqOdBSTaCB2IBk/QtjDrs6+x4xuezyMXdm0HQ==" + }, + "runtime.any.System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NLrxmLsfRrOuVqPWG+2lrQZnE53MLVeo+w9c54EV+TUo4c8rILpsDXfY8pPiOy9kHpUHHP07ugKmtsU3vVW5Jg==" + }, + "runtime.any.System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OhBAVBQG5kFj1S+hCEQ3TUHBAEtZ3fbEMgZMRNdN8A0Pj4x+5nTELEqL59DU0TjKVE6II3dqKw4Dklb3szT65w==" + }, + "runtime.any.System.Threading.Timer": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "w4ehZJ+AwXYmGwYu+rMvym6RvMaRiUEQR1u6dwcyuKHxz8Heu/mO9AG1MquEgTyucnhv3M43X0iKpDOoN17C0w==" + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "runtime.unix.Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "2mI2Mfq+CVatgr4RWGvAWBjoCfUafy6VNFU7G9OA52DjO8x/okfIbsEq2UPgeGfdpO7X5gmPXKT8slx0tn0Mhw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "runtime.unix.System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "WV8KLRHWVUVUDduFnvGMHt0FsEt2wK6xPl1EgDKlaMx2KnZ43A/O0GzP8wIuvAC7mq4T9V1mm90r+PXkL9FPdQ==", + "dependencies": { + "runtime.native.System": "4.3.0" + } + }, + "runtime.unix.System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ajmTcjrqc3vgV1TH54DRioshbEniaFbOAJ0kReGuNsp9uIcqYle0RmUo6+Qlwqe3JIs4TDxgnqs3UzX3gRJ1rA==", + "dependencies": { + "System.Buffers": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "runtime.unix.System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "AZcRXhH7Gamr+bckUfX3iHefPIrujJTt9XWQWo0elNiP1SNasX0KBWINZkDKY0GsOrsyJ7cB4MgIRTZzLlsTKg==", + "dependencies": { + "Microsoft.Win32.Primitives": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "runtime.unix.System.Private.Uri": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ooWzobr5RAq34r9uan1r/WPXJYG1XWy9KanrxNvEnBzbFdQbMG7Y3bVi4QxR7xZMNLOxLLTAyXvnSkfj5boZSg==", + "dependencies": { + "runtime.native.System": "4.3.0" + } + }, + "runtime.unix.System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "zQiTBVpiLftTQZW8GFsV0gjYikB1WMkEPIxF5O6RkUrSV/OgvRRTYgeFQha/0keBpuS0HYweraGRwhfhJ7dj7w==", + "dependencies": { + "System.Private.Uri": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "SQLitePCLRaw.lib.e_sqlite3": { + "type": "Transitive", + "resolved": "2.0.2", + "contentHash": "S+Tsqe/M7wsc+9HeediI6UHtBKf2X586aRwhi1aBVLGe0WxkAo52O9ZxwEy/v8XMLefcrEMupd2e9CDlIT6QCw==" + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Collections": "4.3.0" + } + }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.unix.System.Diagnostics.Debug": "4.3.0" + } + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Diagnostics.Tracing": "4.3.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Globalization": "4.3.0" + } + }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Globalization.Calendars": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.any.System.IO": "4.3.0" + } + }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.unix.System.IO.FileSystem": "4.3.0" + } + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.2", + "contentHash": "y7hv0o0weI0j0mvEcBOdt1F3CAADiWlcw3e54m8TfYiRmBPDIsHElx8QUPDlY4x6yWXKPGN0Z2TuXCTPgkm5WQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "runtime.unix.System.Net.Primitives": "4.3.0" + } + }, + "System.Private.Uri": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I4SwANiUGho1esj4V4oSlPllXjzCZDE+5XXso2P03LW2vOda2Enzh8DWOxwN6hnrJyp314c7KuVu31QYhRzOGg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.unix.System.Private.Uri": "4.3.0" + } + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Reflection": "4.3.0" + } + }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Reflection.Primitives": "4.3.0" + } + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Resources.ResourceManager": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.any.System.Runtime": "4.3.0" + } + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.unix.System.Runtime.Extensions": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Runtime.Handles": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "runtime.any.System.Runtime.InteropServices": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Text.Encoding": "4.3.0" + } + }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.any.System.Text.Encoding.Extensions": "4.3.0" + } + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "runtime.any.System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Timer": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "runtime.any.System.Threading.Timer": "4.3.0" + } + } } } } \ No newline at end of file From 12fb2a4bb5343630562da15f5b21bd7b0147fb7b Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 3 Dec 2021 21:59:39 +0700 Subject: [PATCH 13/69] fix case-sensitive folder in git --- TbsReact/.gitignore | 234 + TbsReact/ClientApp/.env | 1 + TbsReact/ClientApp/.gitignore | 21 + TbsReact/ClientApp/README.md | 2228 ++ TbsReact/ClientApp/aspnetcore-https.js | 33 + TbsReact/ClientApp/aspnetcore-react.js | 55 + TbsReact/ClientApp/package-lock.json | 17242 ++++++++++++++++ TbsReact/ClientApp/package.json | 77 + TbsReact/ClientApp/public/favicon.ico | Bin 0 -> 5430 bytes TbsReact/ClientApp/public/index.html | 41 + TbsReact/ClientApp/public/manifest.json | 15 + TbsReact/ClientApp/src/App.js | 18 + TbsReact/ClientApp/src/App.test.js | 13 + TbsReact/ClientApp/src/api/Accounts/Access.js | 13 + .../ClientApp/src/api/Accounts/Account.js | 45 + TbsReact/ClientApp/src/components/Layout.js | 13 + TbsReact/ClientApp/src/components/NavMenu.css | 18 + TbsReact/ClientApp/src/components/NavMenu.js | 21 + .../src/components/sidebar/AccountRow.js | 21 + .../src/components/sidebar/AccountTable.js | 42 + .../src/components/sidebar/Modal/AccessRow.js | 22 + .../components/sidebar/Modal/AccountModal.js | 185 + .../src/components/sidebar/SideBar.js | 101 + TbsReact/ClientApp/src/custom.css | 14 + TbsReact/ClientApp/src/index.js | 20 + TbsReact/ClientApp/src/service-worker.js | 72 + .../src/serviceWorkerRegistration.js | 137 + TbsReact/ClientApp/src/setupProxy.js | 18 + .../Controllers/Account/AccessesController.cs | 31 + .../Controllers/Account/AccountController.cs | 113 + TbsReact/Extension/AccessExtension.cs | 25 + TbsReact/Models/Access.cs | 9 + TbsReact/Models/Account.cs | 11 + TbsReact/Models/NewAccount.cs | 10 + TbsReact/Models/Proxy.cs | 11 + TbsReact/Pages/Error.cshtml | 26 + TbsReact/Pages/Error.cshtml.cs | 31 + TbsReact/Pages/_ViewImports.cshtml | 3 + TbsReact/Program.cs | 26 + TbsReact/Properties/launchSettings.json | 27 + TbsReact/Singleton/AccountManager.cs | 51 + TbsReact/Singleton/Datas/AccountData.cs | 58 + TbsReact/TbsReact.csproj | 59 + TbsReact/appsettings.Development.json | 9 + TbsReact/appsettings.json | 10 + 45 files changed, 21230 insertions(+) create mode 100644 TbsReact/.gitignore create mode 100644 TbsReact/ClientApp/.env create mode 100644 TbsReact/ClientApp/.gitignore create mode 100644 TbsReact/ClientApp/README.md create mode 100644 TbsReact/ClientApp/aspnetcore-https.js create mode 100644 TbsReact/ClientApp/aspnetcore-react.js create mode 100644 TbsReact/ClientApp/package-lock.json create mode 100644 TbsReact/ClientApp/package.json create mode 100644 TbsReact/ClientApp/public/favicon.ico create mode 100644 TbsReact/ClientApp/public/index.html create mode 100644 TbsReact/ClientApp/public/manifest.json create mode 100644 TbsReact/ClientApp/src/App.js create mode 100644 TbsReact/ClientApp/src/App.test.js create mode 100644 TbsReact/ClientApp/src/api/Accounts/Access.js create mode 100644 TbsReact/ClientApp/src/api/Accounts/Account.js create mode 100644 TbsReact/ClientApp/src/components/Layout.js create mode 100644 TbsReact/ClientApp/src/components/NavMenu.css create mode 100644 TbsReact/ClientApp/src/components/NavMenu.js create mode 100644 TbsReact/ClientApp/src/components/sidebar/AccountRow.js create mode 100644 TbsReact/ClientApp/src/components/sidebar/AccountTable.js create mode 100644 TbsReact/ClientApp/src/components/sidebar/Modal/AccessRow.js create mode 100644 TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js create mode 100644 TbsReact/ClientApp/src/components/sidebar/SideBar.js create mode 100644 TbsReact/ClientApp/src/custom.css create mode 100644 TbsReact/ClientApp/src/index.js create mode 100644 TbsReact/ClientApp/src/service-worker.js create mode 100644 TbsReact/ClientApp/src/serviceWorkerRegistration.js create mode 100644 TbsReact/ClientApp/src/setupProxy.js create mode 100644 TbsReact/Controllers/Account/AccessesController.cs create mode 100644 TbsReact/Controllers/Account/AccountController.cs create mode 100644 TbsReact/Extension/AccessExtension.cs create mode 100644 TbsReact/Models/Access.cs create mode 100644 TbsReact/Models/Account.cs create mode 100644 TbsReact/Models/NewAccount.cs create mode 100644 TbsReact/Models/Proxy.cs create mode 100644 TbsReact/Pages/Error.cshtml create mode 100644 TbsReact/Pages/Error.cshtml.cs create mode 100644 TbsReact/Pages/_ViewImports.cshtml create mode 100644 TbsReact/Program.cs create mode 100644 TbsReact/Properties/launchSettings.json create mode 100644 TbsReact/Singleton/AccountManager.cs create mode 100644 TbsReact/Singleton/Datas/AccountData.cs create mode 100644 TbsReact/TbsReact.csproj create mode 100644 TbsReact/appsettings.Development.json create mode 100644 TbsReact/appsettings.json diff --git a/TbsReact/.gitignore b/TbsReact/.gitignore new file mode 100644 index 000000000..46991dc23 --- /dev/null +++ b/TbsReact/.gitignore @@ -0,0 +1,234 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +.config/ + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +bin/ +Bin/ +obj/ +Obj/ + +# Visual Studio 2015 cache/options directory +.vs/ +/wwwroot/dist/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.pubxml.user +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +orleans.codegen.cs + +/node_modules + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ diff --git a/TbsReact/ClientApp/.env b/TbsReact/ClientApp/.env new file mode 100644 index 000000000..6ce384e5c --- /dev/null +++ b/TbsReact/ClientApp/.env @@ -0,0 +1 @@ +BROWSER=none diff --git a/TbsReact/ClientApp/.gitignore b/TbsReact/ClientApp/.gitignore new file mode 100644 index 000000000..d30f40ef4 --- /dev/null +++ b/TbsReact/ClientApp/.gitignore @@ -0,0 +1,21 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/TbsReact/ClientApp/README.md b/TbsReact/ClientApp/README.md new file mode 100644 index 000000000..5a608cbdc --- /dev/null +++ b/TbsReact/ClientApp/README.md @@ -0,0 +1,2228 @@ +This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). + +Below you will find some information on how to perform common tasks.
+You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md). + +## Table of Contents + +- [Updating to New Releases](#updating-to-new-releases) +- [Sending Feedback](#sending-feedback) +- [Folder Structure](#folder-structure) +- [Available Scripts](#available-scripts) + - [npm start](#npm-start) + - [npm test](#npm-test) + - [npm run build](#npm-run-build) + - [npm run eject](#npm-run-eject) +- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) +- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) +- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) +- [Debugging in the Editor](#debugging-in-the-editor) +- [Formatting Code Automatically](#formatting-code-automatically) +- [Changing the Page ``](#changing-the-page-title) +- [Installing a Dependency](#installing-a-dependency) +- [Importing a Component](#importing-a-component) +- [Code Splitting](#code-splitting) +- [Adding a Stylesheet](#adding-a-stylesheet) +- [Post-Processing CSS](#post-processing-css) +- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) +- [Adding Images, Fonts, and Files](#adding-images-fonts-and-files) +- [Using the `public` Folder](#using-the-public-folder) + - [Changing the HTML](#changing-the-html) + - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) + - [When to Use the `public` Folder](#when-to-use-the-public-folder) +- [Using Global Variables](#using-global-variables) +- [Adding Bootstrap](#adding-bootstrap) + - [Using a Custom Theme](#using-a-custom-theme) +- [Adding Flow](#adding-flow) +- [Adding Custom Environment Variables](#adding-custom-environment-variables) + - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) + - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) + - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) +- [Can I Use Decorators?](#can-i-use-decorators) +- [Integrating with an API Backend](#integrating-with-an-api-backend) + - [Node](#node) + - [Ruby on Rails](#ruby-on-rails) +- [Proxying API Requests in Development](#proxying-api-requests-in-development) + - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy) + - [Configuring the Proxy Manually](#configuring-the-proxy-manually) + - [Configuring a WebSocket Proxy](#configuring-a-websocket-proxy) +- [Using HTTPS in Development](#using-https-in-development) +- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) +- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) +- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) +- [Running Tests](#running-tests) + - [Filename Conventions](#filename-conventions) + - [Command Line Interface](#command-line-interface) + - [Version Control Integration](#version-control-integration) + - [Writing Tests](#writing-tests) + - [Testing Components](#testing-components) + - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) + - [Initializing Test Environment](#initializing-test-environment) + - [Focusing and Excluding Tests](#focusing-and-excluding-tests) + - [Coverage Reporting](#coverage-reporting) + - [Continuous Integration](#continuous-integration) + - [Disabling jsdom](#disabling-jsdom) + - [Snapshot Testing](#snapshot-testing) + - [Editor Integration](#editor-integration) +- [Developing Components in Isolation](#developing-components-in-isolation) + - [Getting Started with Storybook](#getting-started-with-storybook) + - [Getting Started with Styleguidist](#getting-started-with-styleguidist) +- [Making a Progressive Web App](#making-a-progressive-web-app) + - [Opting Out of Caching](#opting-out-of-caching) + - [Offline-First Considerations](#offline-first-considerations) + - [Progressive Web App Metadata](#progressive-web-app-metadata) +- [Analyzing the Bundle Size](#analyzing-the-bundle-size) +- [Deployment](#deployment) + - [Static Server](#static-server) + - [Other Solutions](#other-solutions) + - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) + - [Building for Relative Paths](#building-for-relative-paths) + - [Azure](#azure) + - [Firebase](#firebase) + - [GitHub Pages](#github-pages) + - [Heroku](#heroku) + - [Netlify](#netlify) + - [Now](#now) + - [S3 and CloudFront](#s3-and-cloudfront) + - [Surge](#surge) +- [Advanced Configuration](#advanced-configuration) +- [Troubleshooting](#troubleshooting) + - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) + - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) + - [`npm run build` exits too early](#npm-run-build-exits-too-early) + - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) + - [`npm run build` fails to minify](#npm-run-build-fails-to-minify) + - [Moment.js locales are missing](#momentjs-locales-are-missing) +- [Something Missing?](#something-missing) + +## Updating to New Releases + +Create React App is divided into two packages: + +* `create-react-app` is a global command-line utility that you use to create new projects. +* `react-scripts` is a development dependency in the generated projects (including this one). + +You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`. + +When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. + +To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. + +In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. + +We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. + +## Sending Feedback + +We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). + +## Folder Structure + +After creation, your project should look like this: + +``` +my-app/ + README.md + node_modules/ + package.json + public/ + index.html + favicon.ico + src/ + App.css + App.js + App.test.js + index.css + index.js + logo.svg +``` + +For the project to build, **these files must exist with exact filenames**: + +* `public/index.html` is the page template; +* `src/index.js` is the JavaScript entry point. + +You can delete or rename the other files. + +You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.<br> +You need to **put any JS and CSS files inside `src`**, otherwise Webpack won’t see them. + +Only files inside `public` can be used from `public/index.html`.<br> +Read instructions below for using assets from JavaScript and HTML. + +You can, however, create more top-level directories.<br> +They will not be included in the production build so you can use them for things like documentation. + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.<br> +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.<br> +You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.<br> +See the section about [running tests](#running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.<br> +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.<br> +Your app is ready to be deployed! + +See the section about [deployment](#deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Supported Language Features and Polyfills + +This project supports a superset of the latest JavaScript standard.<br> +In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports: + +* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016). +* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017). +* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal). +* [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal) +* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). +* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax. + +Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-). + +While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future. + +Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**: + +* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign). +* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise). +* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch). + +If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them. + +## Syntax Highlighting in the Editor + +To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered. + +## Displaying Lint Output in the Editor + +>Note: this feature is available with `react-scripts@0.2.0` and higher.<br> +>It also only works with npm 3 or higher. + +Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. + +They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. + +You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root: + +```js +{ + "extends": "react-app" +} +``` + +Now your editor should report the linting warnings. + +Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes. + +If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules. + +## Debugging in the Editor + +**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).** + +Visual Studio Code and WebStorm support debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools. + +### Visual Studio Code + +You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed. + +Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory. + +```json +{ + "version": "0.2.0", + "configurations": [{ + "name": "Chrome", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000", + "webRoot": "${workspaceRoot}/src", + "sourceMapPathOverrides": { + "webpack:///src/*": "${webRoot}/*" + } + }] +} +``` +>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). + +Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor. + +Having problems with VS Code Debugging? Please see their [troubleshooting guide](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#troubleshooting). + +### WebStorm + +You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed. + +In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration. + +>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). + +Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm. + +The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine. + +## Formatting Code Automatically + +Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/). + +To format our code whenever we make a commit in git, we need to install the following dependencies: + +```sh +npm install --save husky lint-staged prettier +``` + +Alternatively you may use `yarn`: + +```sh +yarn add husky lint-staged prettier +``` + +* `husky` makes it easy to use githooks as if they are npm scripts. +* `lint-staged` allows us to run scripts on staged files in git. See this [blog post about lint-staged to learn more about it](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8). +* `prettier` is the JavaScript formatter we will run before commits. + +Now we can make sure every file is formatted correctly by adding a few lines to the `package.json` in the project root. + +Add the following line to `scripts` section: + +```diff + "scripts": { ++ "precommit": "lint-staged", + "start": "react-scripts start", + "build": "react-scripts build", +``` + +Next we add a 'lint-staged' field to the `package.json`, for example: + +```diff + "dependencies": { + // ... + }, ++ "lint-staged": { ++ "src/**/*.{js,jsx,json,css}": [ ++ "prettier --single-quote --write", ++ "git add" ++ ] ++ }, + "scripts": { +``` + +Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --single-quote --write "src/**/*.{js,jsx}"` to format your entire project for the first time. + +Next you might want to integrate Prettier in your favorite editor. Read the section on [Editor Integration](https://github.com/prettier/prettier#editor-integration) on the Prettier GitHub page. + +## Changing the Page `<title>` + +You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else. + +Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML. + +If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library. + +If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files). + +## Installing a Dependency + +The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: + +```sh +npm install --save react-router +``` + +Alternatively you may use `yarn`: + +```sh +yarn add react-router +``` + +This works for any library, not just `react-router`. + +## Importing a Component + +This project setup supports ES6 modules thanks to Babel.<br> +While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. + +For example: + +### `Button.js` + +```js +import React, { Component } from 'react'; + +class Button extends Component { + render() { + // ... + } +} + +export default Button; // Don’t forget to use export default! +``` + +### `DangerButton.js` + + +```js +import React, { Component } from 'react'; +import Button from './Button'; // Import a component from another file + +class DangerButton extends Component { + render() { + return <Button color="red" />; + } +} + +export default DangerButton; +``` + +Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. + +We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. + +Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. + +Learn more about ES6 modules: + +* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) +* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) +* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) + +## Code Splitting + +Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand. + +This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 3. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module. + +Here is an example: + +### `moduleA.js` + +```js +const moduleA = 'Hello'; + +export { moduleA }; +``` +### `App.js` + +```js +import React, { Component } from 'react'; + +class App extends Component { + handleClick = () => { + import('./moduleA') + .then(({ moduleA }) => { + // Use moduleA + }) + .catch(err => { + // Handle failure + }); + }; + + render() { + return ( + <div> + <button onClick={this.handleClick}>Load</button> + </div> + ); + } +} + +export default App; +``` + +This will make `moduleA.js` and all its unique dependencies as a separate chunk that only loads after the user clicks the 'Load' button. + +You can also use it with `async` / `await` syntax if you prefer it. + +### With React Router + +If you are using React Router check out [this tutorial](http://serverless-stack.com/chapters/code-splitting-in-create-react-app.html) on how to use code splitting with it. You can find the companion GitHub repository [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client/tree/code-splitting-in-create-react-app). + +## Adding a Stylesheet + +This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: + +### `Button.css` + +```css +.Button { + padding: 20px; +} +``` + +### `Button.js` + +```js +import React, { Component } from 'react'; +import './Button.css'; // Tell Webpack that Button.js uses these styles + +class Button extends Component { + render() { + // You can use them as regular CSS styles + return <div className="Button" />; + } +} +``` + +**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. + +In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. + +If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. + +## Post-Processing CSS + +This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. + +For example, this: + +```css +.App { + display: flex; + flex-direction: row; + align-items: center; +} +``` + +becomes this: + +```css +.App { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} +``` + +If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling). + +## Adding a CSS Preprocessor (Sass, Less etc.) + +Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)). + +Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative. + +First, let’s install the command-line interface for Sass: + +```sh +npm install --save node-sass-chokidar +``` + +Alternatively you may use `yarn`: + +```sh +yarn add node-sass-chokidar +``` + +Then in `package.json`, add the following lines to `scripts`: + +```diff + "scripts": { ++ "build-css": "node-sass-chokidar src/ -o src/", ++ "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test --env=jsdom", +``` + +>Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. + +Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated. + +To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions. + +To enable importing files without using relative paths, you can add the `--include-path` option to the command in `package.json`. + +``` +"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/", +"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive", +``` + +This will allow you to do imports like + +```scss +@import 'styles/_colors.scss'; // assuming a styles directory under src/ +@import 'nprogress/nprogress'; // importing a css file from the nprogress node module +``` + +At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control. + +As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use the `&&` operator to execute two scripts sequentially. However, there is no cross-platform way to run two scripts in parallel, so we will install a package for this: + +```sh +npm install --save npm-run-all +``` + +Alternatively you may use `yarn`: + +```sh +yarn add npm-run-all +``` + +Then we can change `start` and `build` scripts to include the CSS preprocessor commands: + +```diff + "scripts": { + "build-css": "node-sass-chokidar src/ -o src/", + "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", +- "start": "react-scripts start", +- "build": "react-scripts build", ++ "start-js": "react-scripts start", ++ "start": "npm-run-all -p watch-css start-js", ++ "build-js": "react-scripts build", ++ "build": "npm-run-all build-css build-js", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + } +``` + +Now running `npm start` and `npm run build` also builds Sass files. + +**Why `node-sass-chokidar`?** + +`node-sass` has been reported as having the following issues: + +- `node-sass --watch` has been reported to have *performance issues* in certain conditions when used in a virtual machine or with docker. + +- Infinite styles compiling [#1939](https://github.com/facebookincubator/create-react-app/issues/1939) + +- `node-sass` has been reported as having issues with detecting new files in a directory [#1891](https://github.com/sass/node-sass/issues/1891) + + `node-sass-chokidar` is used here as it addresses these issues. + +## Adding Images, Fonts, and Files + +With Webpack, using static assets like images and fonts works similarly to CSS. + +You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF. + +To reduce the number of requests to the server, importing images that are less than 10,000 bytes returns a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) instead of a path. This applies to the following file extensions: bmp, gif, jpg, jpeg, and png. SVG files are excluded due to [#1153](https://github.com/facebookincubator/create-react-app/issues/1153). + +Here is an example: + +```js +import React from 'react'; +import logo from './logo.png'; // Tell Webpack this JS file uses this image + +console.log(logo); // /logo.84287d09.png + +function Header() { + // Import result is the URL of your image + return <img src={logo} alt="Logo" />; +} + +export default Header; +``` + +This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths. + +This works in CSS too: + +```css +.Logo { + background-image: url(./logo.png); +} +``` + +Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. + +Please be advised that this is also a custom feature of Webpack. + +**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).<br> +An alternative way of handling static assets is described in the next section. + +## Using the `public` Folder + +>Note: this feature is available with `react-scripts@0.5.0` and higher. + +### Changing the HTML + +The `public` folder contains the HTML file so you can tweak it, for example, to [set the page title](#changing-the-page-title). +The `<script>` tag with the compiled code will be added to it automatically during the build process. + +### Adding Assets Outside of the Module System + +You can also add other assets to the `public` folder. + +Note that we normally encourage you to `import` assets in JavaScript files instead. +For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-fonts-and-files). +This mechanism provides a number of benefits: + +* Scripts and stylesheets get minified and bundled together to avoid extra network requests. +* Missing files cause compilation errors instead of 404 errors for your users. +* Result filenames include content hashes so you don’t need to worry about browsers caching their old versions. + +However there is an **escape hatch** that you can use to add an asset outside of the module system. + +If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. + +Inside `index.html`, you can use it like this: + +```html +<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> +``` + +Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build. + +When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL. + +In JavaScript code, you can use `process.env.PUBLIC_URL` for similar purposes: + +```js +render() { + // Note: this is an escape hatch and should be used sparingly! + // Normally we recommend using `import` for getting asset URLs + // as described in “Adding Images and Fonts” above this section. + return <img src={process.env.PUBLIC_URL + '/img/logo.png'} />; +} +``` + +Keep in mind the downsides of this approach: + +* None of the files in `public` folder get post-processed or minified. +* Missing files will not be called at compilation time, and will cause 404 errors for your users. +* Result filenames won’t include content hashes so you’ll need to add query arguments or rename them every time they change. + +### When to Use the `public` Folder + +Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-fonts-and-files) from JavaScript. +The `public` folder is useful as a workaround for a number of less common cases: + +* You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest). +* You have thousands of images and need to dynamically reference their paths. +* You want to include a small script like [`pace.js`](http://github.hubspot.com/pace/docs/welcome/) outside of the bundled code. +* Some library may be incompatible with Webpack and you have no other option but to include it as a `<script>` tag. + +Note that if you add a `<script>` that declares global variables, you also need to read the next section on using them. + +## Using Global Variables + +When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable. + +You can avoid this by reading the global variable explicitly from the `window` object, for example: + +```js +const $ = window.$; +``` + +This makes it obvious you are using a global variable intentionally rather than because of a typo. + +Alternatively, you can force the linter to ignore any line by adding `// eslint-disable-line` after it. + +## Adding Bootstrap + +You don’t have to use [Reactstrap](https://reactstrap.github.io/) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: + +Install Reactstrap and Bootstrap from npm. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: + +```sh +npm install --save reactstrap bootstrap@4 +``` + +Alternatively you may use `yarn`: + +```sh +yarn add reactstrap bootstrap@4 +``` + +Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file: + +```js +import 'bootstrap/dist/css/bootstrap.css'; +// Put any other imports below so that CSS from your +// components takes precedence over default styles. +``` + +Import required React Bootstrap components within ```src/App.js``` file or your custom component files: + +```js +import { Navbar, Button } from 'reactstrap'; +``` + +Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. + +### Using a Custom Theme + +Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br> +We suggest the following approach: + +* Create a new package that depends on the package you wish to customize, e.g. Bootstrap. +* Add the necessary build steps to tweak the theme, and publish your package on npm. +* Install your own theme npm package as a dependency of your app. + +Here is an example of adding a [customized Bootstrap](https://medium.com/@tacomanator/customizing-create-react-app-aa9ffb88165) that follows these steps. + +## Adding Flow + +Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. + +Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box. + +To add Flow to a Create React App project, follow these steps: + +1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). +2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. +3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. +4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). + +Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. +You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience. +In the future we plan to integrate it into Create React App even more closely. + +To learn more about Flow, check out [its documentation](https://flowtype.org/). + +## Adding Custom Environment Variables + +>Note: this feature is available with `react-scripts@0.2.3` and higher. + +Your project can consume variables declared in your environment as if they were declared locally in your JS files. By +default you will have `NODE_ENV` defined for you, and any other environment variables starting with +`REACT_APP_`. + +**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them. + +>Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. + +These environment variables will be defined for you on `process.env`. For example, having an environment +variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`. + +There is also a special built-in environment variable called `NODE_ENV`. You can read it from `process.env.NODE_ENV`. When you run `npm start`, it is always equal to `'development'`, when you run `npm test` it is always equal to `'test'`, and when you run `npm run build` to make a production bundle, it is always equal to `'production'`. **You cannot override `NODE_ENV` manually.** This prevents developers from accidentally deploying a slow development build to production. + +These environment variables can be useful for displaying information conditionally based on where the project is +deployed or consuming sensitive data that lives outside of version control. + +First, you need to have environment variables defined. For example, let’s say you wanted to consume a secret defined +in the environment inside a `<form>`: + +```jsx +render() { + return ( + <div> + <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> + <form> + <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> + </form> + </div> + ); +} +``` + +During the build, `process.env.REACT_APP_SECRET_CODE` will be replaced with the current value of the `REACT_APP_SECRET_CODE` environment variable. Remember that the `NODE_ENV` variable will be set for you automatically. + +When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: + +```html +<div> + <small>You are running this application in <b>development</b> mode.</small> + <form> + <input type="hidden" value="abcdef" /> + </form> +</div> +``` + +The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this +value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in +a `.env` file. Both of these ways are described in the next few sections. + +Having access to the `NODE_ENV` is also useful for performing actions conditionally: + +```js +if (process.env.NODE_ENV !== 'production') { + analytics.disable(); +} +``` + +When you compile the app with `npm run build`, the minification step will strip out this condition, and the resulting bundle will be smaller. + +### Referencing Environment Variables in the HTML + +>Note: this feature is available with `react-scripts@0.9.0` and higher. + +You can also access the environment variables starting with `REACT_APP_` in the `public/index.html`. For example: + +```html +<title>%REACT_APP_WEBSITE_NAME% +``` + +Note that the caveats from the above section apply: + +* Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work. +* The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](#generating-dynamic-meta-tags-on-the-server). + +### Adding Temporary Environment Variables In Your Shell + +Defining environment variables can vary between OSes. It’s also important to know that this manner is temporary for the +life of the shell session. + +#### Windows (cmd.exe) + +```cmd +set REACT_APP_SECRET_CODE=abcdef&&npm start +``` + +(Note: the lack of whitespace is intentional.) + +#### Linux, macOS (Bash) + +```bash +REACT_APP_SECRET_CODE=abcdef npm start +``` + +### Adding Development Environment Variables In `.env` + +>Note: this feature is available with `react-scripts@0.5.0` and higher. + +To define permanent environment variables, create a file called `.env` in the root of your project: + +``` +REACT_APP_SECRET_CODE=abcdef +``` + +`.env` files **should be** checked into source control (with the exclusion of `.env*.local`). + +#### What other `.env` files can be used? + +>Note: this feature is **available with `react-scripts@1.0.0` and higher**. + +* `.env`: Default. +* `.env.local`: Local overrides. **This file is loaded for all environments except test.** +* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings. +* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings. + +Files on the left have more priority than files on the right: + +* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env` +* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env` +* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing) + +These variables will act as the defaults if the machine does not explicitly set them.
+Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. + +>Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need +these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). + +## Can I Use Decorators? + +Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
+Create React App doesn’t support decorator syntax at the moment because: + +* It is an experimental proposal and is subject to change. +* The current specification version is not officially supported by Babel. +* If the specification changes, we won’t be able to write a codemod because we don’t use them internally at Facebook. + +However in many cases you can rewrite decorator-based code without decorators just as fine.
+Please refer to these two threads for reference: + +* [#214](https://github.com/facebookincubator/create-react-app/issues/214) +* [#411](https://github.com/facebookincubator/create-react-app/issues/411) + +Create React App will add decorator support when the specification advances to a stable stage. + +## Integrating with an API Backend + +These tutorials will help you to integrate your app with an API backend running on another port, +using `fetch()` to access it. + +### Node +Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/). +You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). + +### Ruby on Rails + +Check out [this tutorial](https://www.fullstackreact.com/articles/how-to-get-create-react-app-to-work-with-your-rails-api/). +You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo-rails). + +## Proxying API Requests in Development + +>Note: this feature is available with `react-scripts@0.2.3` and higher. + +People often serve the front-end React app from the same host and port as their backend implementation.
+For example, a production setup might look like this after the app is deployed: + +``` +/ - static server returns index.html with React app +/todos - static server returns index.html with React app +/api/todos - server handles any /api/* requests using the backend implementation +``` + +Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. + +To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: + +```js + "proxy": "http://localhost:4000", +``` + +This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will **only** attempt to send requests without `text/html` in its `Accept` header to the proxy. + +Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: + +``` +Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. +``` + +Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`. + +The `proxy` option supports HTTP, HTTPS and WebSocket connections.
+If the `proxy` option is **not** flexible enough for you, alternatively you can: + +* [Configure the proxy yourself](#configuring-the-proxy-manually) +* Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). +* Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. + +### "Invalid Host Header" Errors After Configuring Proxy + +When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. The issue is explained in [this article](https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a) and [this issue](https://github.com/webpack/webpack-dev-server/issues/887). + +This shouldn’t affect you when developing on `localhost`, but if you develop remotely like [described here](https://github.com/facebookincubator/create-react-app/issues/2271), you will see this error in the browser after enabling the `proxy` option: + +>Invalid Host header + +To work around it, you can specify your public development host in a file called `.env.development` in the root of your project: + +``` +HOST=mypublicdevhost.com +``` + +If you restart the development server now and load the app from the specified host, it should work. + +If you are still having issues or if you’re using a more exotic environment like a cloud editor, you can bypass the host check completely by adding a line to `.env.development.local`. **Note that this is dangerous and exposes your machine to remote code execution from malicious websites:** + +``` +# NOTE: THIS IS DANGEROUS! +# It exposes your machine to attacks from the websites you visit. +DANGEROUSLY_DISABLE_HOST_CHECK=true +``` + +We don’t recommend this approach. + +### Configuring the Proxy Manually + +>Note: this feature is available with `react-scripts@1.0.0` and higher. + +If the `proxy` option is **not** flexible enough for you, you can specify an object in the following form (in `package.json`).
+You may also specify any configuration value [`http-proxy-middleware`](https://github.com/chimurai/http-proxy-middleware#options) or [`http-proxy`](https://github.com/nodejitsu/node-http-proxy#options) supports. +```js +{ + // ... + "proxy": { + "/api": { + "target": "", + "ws": true + // ... + } + } + // ... +} +``` + +All requests matching this path will be proxies, no exceptions. This includes requests for `text/html`, which the standard `proxy` option does not proxy. + +If you need to specify multiple proxies, you may do so by specifying additional entries. +Matches are regular expressions, so that you can use a regexp to match multiple paths. +```js +{ + // ... + "proxy": { + // Matches any request starting with /api + "/api": { + "target": "", + "ws": true + // ... + }, + // Matches any request starting with /foo + "/foo": { + "target": "", + "ssl": true, + "pathRewrite": { + "^/foo": "/foo/beta" + } + // ... + }, + // Matches /bar/abc.html but not /bar/sub/def.html + "/bar/[^/]*[.]html": { + "target": "", + // ... + }, + // Matches /baz/abc.html and /baz/sub/def.html + "/baz/.*/.*[.]html": { + "target": "" + // ... + } + } + // ... +} +``` + +### Configuring a WebSocket Proxy + +When setting up a WebSocket proxy, there are a some extra considerations to be aware of. + +If you’re using a WebSocket engine like [Socket.io](https://socket.io/), you must have a Socket.io server running that you can use as the proxy target. Socket.io will not work with a standard WebSocket server. Specifically, don't expect Socket.io to work with [the websocket.org echo test](http://websocket.org/echo.html). + +There’s some good documentation available for [setting up a Socket.io server](https://socket.io/docs/). + +Standard WebSockets **will** work with a standard WebSocket server as well as the websocket.org echo test. You can use libraries like [ws](https://github.com/websockets/ws) for the server, with [native WebSockets in the browser](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). + +Either way, you can proxy WebSocket requests manually in `package.json`: + +```js +{ + // ... + "proxy": { + "/socket": { + // Your compatible WebSocket server + "target": "ws://", + // Tell http-proxy-middleware that this is a WebSocket proxy. + // Also allows you to proxy WebSocket requests without an additional HTTP request + // https://github.com/chimurai/http-proxy-middleware#external-websocket-upgrade + "ws": true + // ... + } + } + // ... +} +``` + +## Using HTTPS in Development + +>Note: this feature is available with `react-scripts@0.4.0` and higher. + +You may require the dev server to serve pages over HTTPS. One particular case where this could be useful is when using [the "proxy" feature](#proxying-api-requests-in-development) to proxy requests to an API server when that API server is itself serving HTTPS. + +To do this, set the `HTTPS` environment variable to `true`, then start the dev server as usual with `npm start`: + +#### Windows (cmd.exe) + +```cmd +set HTTPS=true&&npm start +``` + +(Note: the lack of whitespace is intentional.) + +#### Linux, macOS (Bash) + +```bash +HTTPS=true npm start +``` + +Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page. + +## Generating Dynamic `` Tags on the Server + +Since Create React App doesn’t support server rendering, you might be wondering how to make `` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this: + +```html + + + + + +``` + +Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG_TITLE__`, `__OG_DESCRIPTION__`, and any other placeholders with values depending on the current URL. Just make sure to sanitize and escape the interpolated values so that they are safe to embed into HTML! + +If you use a Node server, you can even share the route matching logic between the client and the server. However duplicating it also works fine in simple cases. + +## Pre-Rendering into Static HTML Files + +If you’re hosting your `build` with a static hosting provider you can use [react-snapshot](https://www.npmjs.com/package/react-snapshot) or [react-snap](https://github.com/stereobooster/react-snap) to generate HTML pages for each route, or relative link, in your application. These pages will then seamlessly become active, or “hydrated”, when the JavaScript bundle has loaded. + +There are also opportunities to use this outside of static hosting, to take the pressure off the server when generating and caching routes. + +The primary benefit of pre-rendering is that you get the core content of each page _with_ the HTML payload—regardless of whether or not your JavaScript bundle successfully downloads. It also increases the likelihood that each route of your application will be picked up by search engines. + +You can read more about [zero-configuration pre-rendering (also called snapshotting) here](https://medium.com/superhighfives/an-almost-static-stack-6df0a2791319). + +## Injecting Data from the Server into the Page + +Similarly to the previous section, you can leave some placeholders in the HTML that inject global variables, for example: + +```js + + + + +``` + +Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.** + +## Running Tests + +>Note: this feature is available with `react-scripts@0.3.0` and higher.
+>[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) + +Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try. + +Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness. + +While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks. + +We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App. + +### Filename Conventions + +Jest will look for test files with any of the following popular naming conventions: + +* Files with `.js` suffix in `__tests__` folders. +* Files with `.test.js` suffix. +* Files with `.spec.js` suffix. + +The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder. + +We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects. + +### Command Line Interface + +When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code. + +The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run: + +![Jest watch mode](http://facebook.github.io/jest/img/blog/15-watch.gif) + +### Version Control Integration + +By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests run fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. + +Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests. + +Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository. + +### Writing Tests + +To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended. + +Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this: + +```js +import sum from './sum'; + +it('sums numbers', () => { + expect(sum(1, 2)).toEqual(3); + expect(sum(2, 2)).toEqual(4); +}); +``` + +All `expect()` matchers supported by Jest are [extensively documented here](https://facebook.github.io/jest/docs/en/expect.html#content).
+You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](https://facebook.github.io/jest/docs/en/expect.html#tohavebeencalled) to create “spies” or mock functions. + +### Testing Components + +There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes. + +Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components: + +```js +import React from 'react'; +import ReactDOM from 'react-dom'; +import App from './App'; + +it('renders without crashing', () => { + const div = document.createElement('div'); + ReactDOM.render(, div); +}); +``` + +This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. + +When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior. + +If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). To install it, run: + +```sh +npm install --save enzyme enzyme-adapter-react-16 react-test-renderer +``` + +Alternatively you may use `yarn`: + +```sh +yarn add enzyme enzyme-adapter-react-16 react-test-renderer +``` + +As of Enzyme 3, you will need to install Enzyme along with an Adapter corresponding to the version of React you are using. (The examples above use the adapter for React 16.) + +The adapter will also need to be configured in your [global setup file](#initializing-test-environment): + +#### `src/setupTests.js` +```js +import { configure } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; + +configure({ adapter: new Adapter() }); +``` + +Now you can write a smoke test with it: + +```js +import React from 'react'; +import { shallow } from 'enzyme'; +import App from './App'; + +it('renders without crashing', () => { + shallow(); +}); +``` + +Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a ` + + + + {editMode === false ? "Add account" : "Edit account"} + +
+ + + Username + + + setUsername(e.target.value)} /> + + + Server + + + setServer(e.target.value)} /> + + + Password + + + setPassword(e.target.value)} /> + + + Proxy IP + + + setProxyIP(e.target.value)} /> + + + Proxy username + + + setProxyUsername(e.target.value)} /> + + + Proxy Port + + + setProxyPort(e.target.value)} /> + + + Proxy password + + + setProxyPassword(e.target.value)} /> + + + + + + +
+ + + + + +
+ + + Proxy + Proxy username + Is working + + +
+ + + +
+ + + +
+
+
+ + ) +} + +export default AccountModal; \ No newline at end of file diff --git a/TbsReact/ClientApp/src/components/sidebar/SideBar.js b/TbsReact/ClientApp/src/components/sidebar/SideBar.js new file mode 100644 index 000000000..0d05d9352 --- /dev/null +++ b/TbsReact/ClientApp/src/components/sidebar/SideBar.js @@ -0,0 +1,101 @@ +import { useEffect, useState } from "react" +import { Drawer, IconButton, Grid, Button } from "@mui/material" +import MenuIcon from '@mui/icons-material/Menu'; +import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; + +import AccountTable from "./AccountTable" +import AccountModal from "./Modal/AccountModal" + +import { deleteAccount } from "../../api/Accounts/Account"; +import { login, logout, loginAll, logoutAll, getStatus } from "../../api/Accounts/Driver"; + +const SideBar = ({ selected, setSelected }) => { + const [open, setOpen] = useState(false); + const [status, setStatus] = useState(false); + + useEffect( ( ) => { + const updateStatus = async () => { + setStatus(await getStatus(selected)) + } + updateStatus(); + }, [selected]) + const handleDrawerOpen = () => { + setOpen(true); + }; + + const handleDrawerClose = () => { + setOpen(false); + }; + + const onDelete = async () => { + await deleteAccount(selected); + setSelected(-1) + } + + const onLog = async () => { + if (status === true) { + await logout(selected); + setStatus(await getStatus(selected)) + } + else { + await login(selected); + setStatus(await getStatus(selected)) + } + } + + const onLoginAll = async () => { + await loginAll(); + setSelected(-1) + } + + const onLogoutAll = async () => { + await logoutAll(); + setSelected(-1) + + } + + + return ( + <> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} +export default SideBar; \ No newline at end of file diff --git a/TbsReact/ClientApp/src/custom.css b/TbsReact/ClientApp/src/custom.css new file mode 100644 index 000000000..5fdfd061c --- /dev/null +++ b/TbsReact/ClientApp/src/custom.css @@ -0,0 +1,14 @@ +/* Provide sufficient contrast against white background */ +a { + color: #0366d6; +} + +code { + color: #E01A76; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} diff --git a/TbsReact/ClientApp/src/index.js b/TbsReact/ClientApp/src/index.js new file mode 100644 index 000000000..89be37de7 --- /dev/null +++ b/TbsReact/ClientApp/src/index.js @@ -0,0 +1,20 @@ +import 'bootstrap/dist/css/bootstrap.css'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import { BrowserRouter } from 'react-router-dom'; +import App from './App'; +import * as serviceWorkerRegistration from './serviceWorkerRegistration'; + +const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); +const rootElement = document.getElementById('root'); + +ReactDOM.render( + + + , + rootElement); + +// If you want your app to work offline and load faster, you can change +// unregister() to register() below. Note this comes with some pitfalls. +// Learn more about service workers: https://cra.link/PWA +serviceWorkerRegistration.unregister(); diff --git a/TbsReact/ClientApp/src/service-worker.js b/TbsReact/ClientApp/src/service-worker.js new file mode 100644 index 000000000..0f1e0ce02 --- /dev/null +++ b/TbsReact/ClientApp/src/service-worker.js @@ -0,0 +1,72 @@ +/* eslint-disable no-restricted-globals */ + +// This service worker can be customized! +// See https://developers.google.com/web/tools/workbox/modules +// for the list of available Workbox modules, or add any other +// code you'd like. +// You can also remove this file if you'd prefer not to use a +// service worker, and the Workbox build step will be skipped. + +import { clientsClaim } from 'workbox-core'; +import { ExpirationPlugin } from 'workbox-expiration'; +import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'; +import { registerRoute } from 'workbox-routing'; +import { StaleWhileRevalidate } from 'workbox-strategies'; + +clientsClaim(); + +// Precache all of the assets generated by your build process. +// Their URLs are injected into the manifest variable below. +// This variable must be present somewhere in your service worker file, +// even if you decide not to use precaching. See https://cra.link/PWA +precacheAndRoute(self.__WB_MANIFEST); + +// Set up App Shell-style routing, so that all navigation requests +// are fulfilled with your index.html shell. Learn more at +// https://developers.google.com/web/fundamentals/architecture/app-shell +const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$'); +registerRoute( + // Return false to exempt requests from being fulfilled by index.html. + ({ request, url }) => { + // If this isn't a navigation, skip. + if (request.mode !== 'navigate') { + return false; + } // If this is a URL that starts with /_, skip. + + if (url.pathname.startsWith('/_')) { + return false; + } // If this looks like a URL for a resource, because it contains // a file extension, skip. + + if (url.pathname.match(fileExtensionRegexp)) { + return false; + } // Return true to signal that we want to use the handler. + + return true; + }, + createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html') +); + +// An example runtime caching route for requests that aren't handled by the +// precache, in this case same-origin .png requests like those from in public/ +registerRoute( + // Add in any other file extensions or routing criteria as needed. + ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'), // Customize this strategy as needed, e.g., by changing to CacheFirst. + new StaleWhileRevalidate({ + cacheName: 'images', + plugins: [ + // Ensure that once this runtime cache reaches a maximum size the + // least-recently used images are removed. + new ExpirationPlugin({ maxEntries: 50 }), + ], + }) +); + +// This allows the web app to trigger skipWaiting via +// registration.waiting.postMessage({type: 'SKIP_WAITING'}) +self.addEventListener('message', (event) => { + if (event.data && event.data.type === 'SKIP_WAITING') { + self.skipWaiting(); + } +}); + +// Any other custom service worker logic can go here. diff --git a/TbsReact/ClientApp/src/serviceWorkerRegistration.js b/TbsReact/ClientApp/src/serviceWorkerRegistration.js new file mode 100644 index 000000000..2262ecdbf --- /dev/null +++ b/TbsReact/ClientApp/src/serviceWorkerRegistration.js @@ -0,0 +1,137 @@ +// This optional code is used to register a service worker. +// register() is not called by default. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on subsequent visits to a page, after all the +// existing tabs open on the page have been closed, since previously cached +// resources are updated in the background. + +// To learn more about the benefits of this model and instructions on how to +// opt-in, read https://cra.link/PWA + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.0/8 are considered localhost for IPv4. + window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) +); + +export function register(config) { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebook/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Let's check if a service worker still exists or not. + checkValidServiceWorker(swUrl, config); + + // Add some additional logging to localhost, pointing developers to the + // service worker/PWA documentation. + navigator.serviceWorker.ready.then(() => { + console.log( + 'This web app is being served cache-first by a service ' + + 'worker. To learn more, visit https://cra.link/PWA' + ); + }); + } else { + // Is not localhost. Just register service worker + registerValidSW(swUrl, config); + } + }); + } +} + +function registerValidSW(swUrl, config) { + navigator.serviceWorker + .register(swUrl) + .then((registration) => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + if (installingWorker == null) { + return; + } + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the updated precached content has been fetched, + // but the previous service worker will still serve the older + // content until all client tabs are closed. + console.log( + 'New content is available and will be used when all ' + + 'tabs for this page are closed. See https://cra.link/PWA.' + ); + + // Execute callback + if (config && config.onUpdate) { + config.onUpdate(registration); + } + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + + // Execute callback + if (config && config.onSuccess) { + config.onSuccess(registration); + } + } + } + }; + }; + }) + .catch((error) => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl, config) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl, { + headers: { 'Service-Worker': 'script' }, + }) + .then((response) => { + // Ensure service worker exists, and that we really are getting a JS file. + const contentType = response.headers.get('content-type'); + if ( + response.status === 404 || + (contentType != null && contentType.indexOf('javascript') === -1) + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then((registration) => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl, config); + } + }) + .catch(() => { + console.log('No internet connection found. App is running in offline mode.'); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready + .then((registration) => { + registration.unregister(); + }) + .catch((error) => { + console.error(error.message); + }); + } +} diff --git a/TbsReact/ClientApp/src/setupProxy.js b/TbsReact/ClientApp/src/setupProxy.js new file mode 100644 index 000000000..2bf4e2a20 --- /dev/null +++ b/TbsReact/ClientApp/src/setupProxy.js @@ -0,0 +1,18 @@ +const createProxyMiddleware = require('http-proxy-middleware'); +const { env } = require('process'); + +const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` : + env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:57848'; + +const context = [ + "/weatherforecast", +]; + +module.exports = function(app) { + const appProxy = createProxyMiddleware(context, { + target: target, + secure: false + }); + + app.use(appProxy); +}; diff --git a/TbsReact/Controllers/Account/AccessesController.cs b/TbsReact/Controllers/Account/AccessesController.cs new file mode 100644 index 000000000..77fef9f6b --- /dev/null +++ b/TbsReact/Controllers/Account/AccessesController.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; +using TbsReact.Singleton; +using TbsReact.Extension; +using System.Collections.Generic; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("accounts/{indexAcc:int}/accesses")] + public class AccessesControler : ControllerBase + { + [HttpGet] + public ActionResult> GetAccesses(int indexAcc) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var accesses = new List(); + for (int i = 0; i < acc.Access.AllAccess.Count; i++) + { + accesses.Add(acc.Access.AllAccess[i].GetAccount(i)); + } + + return accesses; + } + } +} \ No newline at end of file diff --git a/TbsReact/Controllers/Account/AccountController.cs b/TbsReact/Controllers/Account/AccountController.cs new file mode 100644 index 000000000..bf212968a --- /dev/null +++ b/TbsReact/Controllers/Account/AccountController.cs @@ -0,0 +1,113 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; +using TbsReact.Singleton; +using TbsReact.Extension; +using System.Collections.Generic; +using TbsCore.Database; +using System; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("accounts")] + public class AccountController : ControllerBase + { + [HttpGet] + public ActionResult> GetAccounts() + { + var AccountInfoList = new List(); + for (int i = 0; i < AccountData.Accounts.Count; i++) + { + AccountInfoList.Add(AccountData.Accounts[i]); + } + + return AccountInfoList; + } + + [HttpGet("{index:int}")] + public ActionResult GetAccount(int index) + { + var acc = AccountData.GetAccount(index); + if (acc == null) + { + return NotFound(); + } + return acc; + } + + [HttpPost] + public ActionResult AddAccount([FromBody] NewAccount data) + { + var account = data.Account; + var accesses = data.Accesses; + if (string.IsNullOrEmpty(account.Name) + || string.IsNullOrEmpty(account.ServerUrl)) + { + return BadRequest(); + } + var acc = account.GetAccount(accesses); + DbRepository.SaveAccount(acc); + AccountManager.Accounts.Add(acc); + AccountData.AddAccount(account); + + return Ok(); + } + + [HttpPatch("{index:int}")] + public ActionResult EditAccount(int index, [FromBody] NewAccount data) + { + var account = data.Account; + var accesses = data.Accesses; + + if (string.IsNullOrEmpty(account.Name) || + string.IsNullOrEmpty(account.ServerUrl)) + { + return BadRequest(); + } + var accountOld = AccountData.GetAccount(index); + if (accountOld == null) + { + return NotFound(); + } + + var acc = AccountManager.GetAccount(accountOld); + + AccountData.EditAccount(index, account); + + acc.AccInfo.Nickname = account.Name; + acc.AccInfo.ServerUrl = account.ServerUrl; + + acc.Access.AllAccess.Clear(); + foreach (var access in accesses) + { + acc.Access.AllAccess.Add(new TbsCore.Models.Access.Access + { + Password = access.Password, + Proxy = access.Proxy.Ip, + ProxyPort = access.Proxy.Port, + ProxyUsername = access.Proxy.Username, + ProxyPassword = access.Proxy.Password, + }); + } + DbRepository.SaveAccount(acc); + return Ok(); + } + + [HttpDelete("{index:int}")] + public ActionResult DeleteAccount(int index) + { + var account = AccountData.GetAccount(index); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + DbRepository.RemoveAccount(acc); + AccountManager.Accounts.Remove(acc); + AccountData.DeleteAccount(index); + + return Ok(); + } + } +} \ No newline at end of file diff --git a/TbsReact/Extension/AccessExtension.cs b/TbsReact/Extension/AccessExtension.cs new file mode 100644 index 000000000..dad1c27e9 --- /dev/null +++ b/TbsReact/Extension/AccessExtension.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using TbsReact.Models; + +namespace TbsReact.Extension +{ + public static class AccessExtension + { + public static Access GetAccount(this TbsCore.Models.Access.Access access, int index) + { + return new Access + { + Id = index, + Password = access.Password, + Proxy = new Proxy + { + Ip = access.Proxy, + Port = access.ProxyPort, + Username = access.ProxyUsername, + Password = access.ProxyPassword, + OK = access.Ok + } + }; + } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Access.cs b/TbsReact/Models/Access.cs new file mode 100644 index 000000000..5170d6e50 --- /dev/null +++ b/TbsReact/Models/Access.cs @@ -0,0 +1,9 @@ +namespace TbsReact.Models +{ + public class Access + { + public int Id { get; set; } + public string Password { get; set; } + public Proxy Proxy { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Account.cs b/TbsReact/Models/Account.cs new file mode 100644 index 000000000..1b2d8f790 --- /dev/null +++ b/TbsReact/Models/Account.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace TbsReact.Models +{ + public class Account + { + public int Id { get; set; } + public string Name { get; set; } + public string ServerUrl { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/NewAccount.cs b/TbsReact/Models/NewAccount.cs new file mode 100644 index 000000000..e0ecf3841 --- /dev/null +++ b/TbsReact/Models/NewAccount.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace TbsReact.Models +{ + public class NewAccount + { + public Account Account { get; set; } + public List Accesses { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Proxy.cs b/TbsReact/Models/Proxy.cs new file mode 100644 index 000000000..4a1a49da4 --- /dev/null +++ b/TbsReact/Models/Proxy.cs @@ -0,0 +1,11 @@ +namespace TbsReact.Models +{ + public class Proxy + { + public string Ip { get; set; } + public int Port { get; set; } + public string Username { get; set; } + public string Password { get; set; } + public bool OK { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Pages/Error.cshtml b/TbsReact/Pages/Error.cshtml new file mode 100644 index 000000000..6f92b9565 --- /dev/null +++ b/TbsReact/Pages/Error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to the Development environment displays detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/TbsReact/Pages/Error.cshtml.cs b/TbsReact/Pages/Error.cshtml.cs new file mode 100644 index 000000000..a4e23bad8 --- /dev/null +++ b/TbsReact/Pages/Error.cshtml.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Pages +{ + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public class ErrorModel : PageModel + { + private readonly ILogger _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public string RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } + } +} diff --git a/TbsReact/Pages/_ViewImports.cshtml b/TbsReact/Pages/_ViewImports.cshtml new file mode 100644 index 000000000..7f96d899f --- /dev/null +++ b/TbsReact/Pages/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using TbsReact +@namespace TbsReact.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/TbsReact/Program.cs b/TbsReact/Program.cs new file mode 100644 index 000000000..de50cee70 --- /dev/null +++ b/TbsReact/Program.cs @@ -0,0 +1,26 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } +} diff --git a/TbsReact/Properties/launchSettings.json b/TbsReact/Properties/launchSettings.json new file mode 100644 index 000000000..3dbe16625 --- /dev/null +++ b/TbsReact/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:3220", + "sslPort": 44303 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "TbsReact": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/TbsReact/Singleton/AccountManager.cs b/TbsReact/Singleton/AccountManager.cs new file mode 100644 index 000000000..aca3dfcaa --- /dev/null +++ b/TbsReact/Singleton/AccountManager.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using TbsCore.Database; +using TbsCore.Helpers; + +using TbsReact.Models; + +namespace TbsReact.Singleton +{ + public sealed class AccountManager + { + private static readonly AccountManager instance = new(); + + private List accounts = new(); + + public static List Accounts + { + get { return Instance.accounts; } + } + + private AccountManager() + { + LoadAccounts(); + } + + public static AccountManager Instance + { + get + { + return instance; + } + } + + public static TbsCore.Models.AccModels.Account GetAccount(Account account) + { + return Accounts.FirstOrDefault(x => x.AccInfo.Nickname.Equals(account.Name) && x.AccInfo.ServerUrl.Equals(account.ServerUrl)); + } + + private void LoadAccounts() + { + accounts = DbRepository.GetAccounts(); + accounts.ForEach(x => ObjectHelper.FixAccObj(x, x)); + } + + public void SaveAccounts() + { + IoHelperCore.SaveAccounts(accounts, true); + } + } +} \ No newline at end of file diff --git a/TbsReact/Singleton/Datas/AccountData.cs b/TbsReact/Singleton/Datas/AccountData.cs new file mode 100644 index 000000000..10bd39285 --- /dev/null +++ b/TbsReact/Singleton/Datas/AccountData.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; +using System.Linq; +using TbsReact.Models; + +namespace TbsReact.Singleton +{ + public sealed class AccountData + { + private static readonly AccountData _instance = new(); + private List _accounts = new(); + + private AccountData() + { + for (int i = 0; i < AccountManager.Accounts.Count; i++) + { + _accounts.Add(new Account + { + Id = i, + Name = AccountManager.Accounts[i].AccInfo.Nickname, + ServerUrl = AccountManager.Accounts[i].AccInfo.ServerUrl, + }); + } + } + + public static List Accounts => Instance._accounts; + + public static Account GetAccount(int index) + { + return Accounts.FirstOrDefault(x => x.Id == index); + } + + public static void AddAccount(Account account) + { + account.Id = Accounts.Last().Id + 1; + Accounts.Add(account); + } + + public static bool EditAccount(int index, Account account) + { + var current = Accounts.FirstOrDefault(x => x.Id == index); + if (current == null) return false; + + current.Name = account.Name; + current.ServerUrl = account.ServerUrl; + return true; + } + + public static bool DeleteAccount(int index) + { + return Accounts.Remove(Accounts.FirstOrDefault(x => x.Id == index)); + } + + public static AccountData Instance + { + get { return _instance; } + } + } +} \ No newline at end of file diff --git a/TbsReact/TbsReact.csproj b/TbsReact/TbsReact.csproj new file mode 100644 index 000000000..a05ce70a0 --- /dev/null +++ b/TbsReact/TbsReact.csproj @@ -0,0 +1,59 @@ + + + + net5.0 + true + Latest + false + ClientApp\ + $(DefaultItemExcludes);$(SpaRoot)node_modules\** + true + Exe + true + true + 2f4cf8f4-975c-481e-9f90-193010f82aca + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(DistFiles.Identity) + PreserveNewest + true + + + + + diff --git a/TbsReact/appsettings.Development.json b/TbsReact/appsettings.Development.json new file mode 100644 index 000000000..8983e0fc1 --- /dev/null +++ b/TbsReact/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/TbsReact/appsettings.json b/TbsReact/appsettings.json new file mode 100644 index 000000000..ad75fee41 --- /dev/null +++ b/TbsReact/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, +"AllowedHosts": "*" +} From 344f5f1d820c0b99288832225e87bfa018307f1a Mon Sep 17 00:00:00 2001 From: Erol444 Date: Fri, 3 Dec 2021 16:35:05 +0100 Subject: [PATCH 14/69] Deleted TBSReact --- TBSReact/.gitignore | 234 - TBSReact/ClientApp/.env | 1 - TBSReact/ClientApp/.gitignore | 21 - TBSReact/ClientApp/README.md | 2228 -- TBSReact/ClientApp/aspnetcore-https.js | 33 - TBSReact/ClientApp/aspnetcore-react.js | 55 - TBSReact/ClientApp/package-lock.json | 17242 ---------------- TBSReact/ClientApp/package.json | 77 - TBSReact/ClientApp/public/favicon.ico | Bin 5430 -> 0 bytes TBSReact/ClientApp/public/index.html | 41 - TBSReact/ClientApp/public/manifest.json | 15 - TBSReact/ClientApp/src/App.js | 18 - TBSReact/ClientApp/src/App.test.js | 13 - TBSReact/ClientApp/src/api/Accounts/Access.js | 13 - .../ClientApp/src/api/Accounts/Account.js | 45 - TBSReact/ClientApp/src/components/Layout.js | 13 - TBSReact/ClientApp/src/components/NavMenu.css | 18 - TBSReact/ClientApp/src/components/NavMenu.js | 21 - .../src/components/sidebar/AccountRow.js | 21 - .../src/components/sidebar/AccountTable.js | 42 - .../src/components/sidebar/Modal/AccessRow.js | 22 - .../components/sidebar/Modal/AccountModal.js | 185 - .../src/components/sidebar/SideBar.js | 101 - TBSReact/ClientApp/src/custom.css | 14 - TBSReact/ClientApp/src/index.js | 20 - TBSReact/ClientApp/src/service-worker.js | 72 - .../src/serviceWorkerRegistration.js | 137 - TBSReact/ClientApp/src/setupProxy.js | 18 - .../Controllers/Account/AccessesController.cs | 31 - .../Controllers/Account/AccountController.cs | 113 - TBSReact/Extension/AccessExtension.cs | 25 - TBSReact/Models/Access.cs | 9 - TBSReact/Models/Account.cs | 11 - TBSReact/Models/NewAccount.cs | 10 - TBSReact/Models/Proxy.cs | 11 - TBSReact/Pages/Error.cshtml | 26 - TBSReact/Pages/Error.cshtml.cs | 31 - TBSReact/Pages/_ViewImports.cshtml | 3 - TBSReact/Program.cs | 26 - TBSReact/Properties/launchSettings.json | 27 - TBSReact/Singleton/AccountManager.cs | 51 - TBSReact/Singleton/Datas/AccountData.cs | 58 - TBSReact/TBSReact.csproj | 59 - TBSReact/appsettings.Development.json | 9 - TBSReact/appsettings.json | 10 - 45 files changed, 21230 deletions(-) delete mode 100644 TBSReact/.gitignore delete mode 100644 TBSReact/ClientApp/.env delete mode 100644 TBSReact/ClientApp/.gitignore delete mode 100644 TBSReact/ClientApp/README.md delete mode 100644 TBSReact/ClientApp/aspnetcore-https.js delete mode 100644 TBSReact/ClientApp/aspnetcore-react.js delete mode 100644 TBSReact/ClientApp/package-lock.json delete mode 100644 TBSReact/ClientApp/package.json delete mode 100644 TBSReact/ClientApp/public/favicon.ico delete mode 100644 TBSReact/ClientApp/public/index.html delete mode 100644 TBSReact/ClientApp/public/manifest.json delete mode 100644 TBSReact/ClientApp/src/App.js delete mode 100644 TBSReact/ClientApp/src/App.test.js delete mode 100644 TBSReact/ClientApp/src/api/Accounts/Access.js delete mode 100644 TBSReact/ClientApp/src/api/Accounts/Account.js delete mode 100644 TBSReact/ClientApp/src/components/Layout.js delete mode 100644 TBSReact/ClientApp/src/components/NavMenu.css delete mode 100644 TBSReact/ClientApp/src/components/NavMenu.js delete mode 100644 TBSReact/ClientApp/src/components/sidebar/AccountRow.js delete mode 100644 TBSReact/ClientApp/src/components/sidebar/AccountTable.js delete mode 100644 TBSReact/ClientApp/src/components/sidebar/Modal/AccessRow.js delete mode 100644 TBSReact/ClientApp/src/components/sidebar/Modal/AccountModal.js delete mode 100644 TBSReact/ClientApp/src/components/sidebar/SideBar.js delete mode 100644 TBSReact/ClientApp/src/custom.css delete mode 100644 TBSReact/ClientApp/src/index.js delete mode 100644 TBSReact/ClientApp/src/service-worker.js delete mode 100644 TBSReact/ClientApp/src/serviceWorkerRegistration.js delete mode 100644 TBSReact/ClientApp/src/setupProxy.js delete mode 100644 TBSReact/Controllers/Account/AccessesController.cs delete mode 100644 TBSReact/Controllers/Account/AccountController.cs delete mode 100644 TBSReact/Extension/AccessExtension.cs delete mode 100644 TBSReact/Models/Access.cs delete mode 100644 TBSReact/Models/Account.cs delete mode 100644 TBSReact/Models/NewAccount.cs delete mode 100644 TBSReact/Models/Proxy.cs delete mode 100644 TBSReact/Pages/Error.cshtml delete mode 100644 TBSReact/Pages/Error.cshtml.cs delete mode 100644 TBSReact/Pages/_ViewImports.cshtml delete mode 100644 TBSReact/Program.cs delete mode 100644 TBSReact/Properties/launchSettings.json delete mode 100644 TBSReact/Singleton/AccountManager.cs delete mode 100644 TBSReact/Singleton/Datas/AccountData.cs delete mode 100644 TBSReact/TBSReact.csproj delete mode 100644 TBSReact/appsettings.Development.json delete mode 100644 TBSReact/appsettings.json diff --git a/TBSReact/.gitignore b/TBSReact/.gitignore deleted file mode 100644 index 46991dc23..000000000 --- a/TBSReact/.gitignore +++ /dev/null @@ -1,234 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -.config/ - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -bin/ -Bin/ -obj/ -Obj/ - -# Visual Studio 2015 cache/options directory -.vs/ -/wwwroot/dist/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -#*.pubxml -*.pubxml.user -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Microsoft Azure ApplicationInsights config file -ApplicationInsights.config - -# Windows Store app package directory -AppPackages/ -BundleArtifacts/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -orleans.codegen.cs - -/node_modules - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe - -# FAKE - F# Make -.fake/ diff --git a/TBSReact/ClientApp/.env b/TBSReact/ClientApp/.env deleted file mode 100644 index 6ce384e5c..000000000 --- a/TBSReact/ClientApp/.env +++ /dev/null @@ -1 +0,0 @@ -BROWSER=none diff --git a/TBSReact/ClientApp/.gitignore b/TBSReact/ClientApp/.gitignore deleted file mode 100644 index d30f40ef4..000000000 --- a/TBSReact/ClientApp/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/TBSReact/ClientApp/README.md b/TBSReact/ClientApp/README.md deleted file mode 100644 index 5a608cbdc..000000000 --- a/TBSReact/ClientApp/README.md +++ /dev/null @@ -1,2228 +0,0 @@ -This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). - -Below you will find some information on how to perform common tasks.
-You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md). - -## Table of Contents - -- [Updating to New Releases](#updating-to-new-releases) -- [Sending Feedback](#sending-feedback) -- [Folder Structure](#folder-structure) -- [Available Scripts](#available-scripts) - - [npm start](#npm-start) - - [npm test](#npm-test) - - [npm run build](#npm-run-build) - - [npm run eject](#npm-run-eject) -- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) -- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) -- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) -- [Debugging in the Editor](#debugging-in-the-editor) -- [Formatting Code Automatically](#formatting-code-automatically) -- [Changing the Page ``](#changing-the-page-title) -- [Installing a Dependency](#installing-a-dependency) -- [Importing a Component](#importing-a-component) -- [Code Splitting](#code-splitting) -- [Adding a Stylesheet](#adding-a-stylesheet) -- [Post-Processing CSS](#post-processing-css) -- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) -- [Adding Images, Fonts, and Files](#adding-images-fonts-and-files) -- [Using the `public` Folder](#using-the-public-folder) - - [Changing the HTML](#changing-the-html) - - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) - - [When to Use the `public` Folder](#when-to-use-the-public-folder) -- [Using Global Variables](#using-global-variables) -- [Adding Bootstrap](#adding-bootstrap) - - [Using a Custom Theme](#using-a-custom-theme) -- [Adding Flow](#adding-flow) -- [Adding Custom Environment Variables](#adding-custom-environment-variables) - - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) - - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) - - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) -- [Can I Use Decorators?](#can-i-use-decorators) -- [Integrating with an API Backend](#integrating-with-an-api-backend) - - [Node](#node) - - [Ruby on Rails](#ruby-on-rails) -- [Proxying API Requests in Development](#proxying-api-requests-in-development) - - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy) - - [Configuring the Proxy Manually](#configuring-the-proxy-manually) - - [Configuring a WebSocket Proxy](#configuring-a-websocket-proxy) -- [Using HTTPS in Development](#using-https-in-development) -- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) -- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) -- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) -- [Running Tests](#running-tests) - - [Filename Conventions](#filename-conventions) - - [Command Line Interface](#command-line-interface) - - [Version Control Integration](#version-control-integration) - - [Writing Tests](#writing-tests) - - [Testing Components](#testing-components) - - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) - - [Initializing Test Environment](#initializing-test-environment) - - [Focusing and Excluding Tests](#focusing-and-excluding-tests) - - [Coverage Reporting](#coverage-reporting) - - [Continuous Integration](#continuous-integration) - - [Disabling jsdom](#disabling-jsdom) - - [Snapshot Testing](#snapshot-testing) - - [Editor Integration](#editor-integration) -- [Developing Components in Isolation](#developing-components-in-isolation) - - [Getting Started with Storybook](#getting-started-with-storybook) - - [Getting Started with Styleguidist](#getting-started-with-styleguidist) -- [Making a Progressive Web App](#making-a-progressive-web-app) - - [Opting Out of Caching](#opting-out-of-caching) - - [Offline-First Considerations](#offline-first-considerations) - - [Progressive Web App Metadata](#progressive-web-app-metadata) -- [Analyzing the Bundle Size](#analyzing-the-bundle-size) -- [Deployment](#deployment) - - [Static Server](#static-server) - - [Other Solutions](#other-solutions) - - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) - - [Building for Relative Paths](#building-for-relative-paths) - - [Azure](#azure) - - [Firebase](#firebase) - - [GitHub Pages](#github-pages) - - [Heroku](#heroku) - - [Netlify](#netlify) - - [Now](#now) - - [S3 and CloudFront](#s3-and-cloudfront) - - [Surge](#surge) -- [Advanced Configuration](#advanced-configuration) -- [Troubleshooting](#troubleshooting) - - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) - - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) - - [`npm run build` exits too early](#npm-run-build-exits-too-early) - - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) - - [`npm run build` fails to minify](#npm-run-build-fails-to-minify) - - [Moment.js locales are missing](#momentjs-locales-are-missing) -- [Something Missing?](#something-missing) - -## Updating to New Releases - -Create React App is divided into two packages: - -* `create-react-app` is a global command-line utility that you use to create new projects. -* `react-scripts` is a development dependency in the generated projects (including this one). - -You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`. - -When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. - -To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. - -In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. - -We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. - -## Sending Feedback - -We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). - -## Folder Structure - -After creation, your project should look like this: - -``` -my-app/ - README.md - node_modules/ - package.json - public/ - index.html - favicon.ico - src/ - App.css - App.js - App.test.js - index.css - index.js - logo.svg -``` - -For the project to build, **these files must exist with exact filenames**: - -* `public/index.html` is the page template; -* `src/index.js` is the JavaScript entry point. - -You can delete or rename the other files. - -You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.<br> -You need to **put any JS and CSS files inside `src`**, otherwise Webpack won’t see them. - -Only files inside `public` can be used from `public/index.html`.<br> -Read instructions below for using assets from JavaScript and HTML. - -You can, however, create more top-level directories.<br> -They will not be included in the production build so you can use them for things like documentation. - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.<br> -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.<br> -You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.<br> -See the section about [running tests](#running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.<br> -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.<br> -Your app is ready to be deployed! - -See the section about [deployment](#deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Supported Language Features and Polyfills - -This project supports a superset of the latest JavaScript standard.<br> -In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports: - -* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016). -* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017). -* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal). -* [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal) -* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). -* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax. - -Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-). - -While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future. - -Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**: - -* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign). -* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise). -* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch). - -If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them. - -## Syntax Highlighting in the Editor - -To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered. - -## Displaying Lint Output in the Editor - ->Note: this feature is available with `react-scripts@0.2.0` and higher.<br> ->It also only works with npm 3 or higher. - -Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. - -They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. - -You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root: - -```js -{ - "extends": "react-app" -} -``` - -Now your editor should report the linting warnings. - -Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes. - -If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules. - -## Debugging in the Editor - -**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).** - -Visual Studio Code and WebStorm support debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools. - -### Visual Studio Code - -You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed. - -Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory. - -```json -{ - "version": "0.2.0", - "configurations": [{ - "name": "Chrome", - "type": "chrome", - "request": "launch", - "url": "http://localhost:3000", - "webRoot": "${workspaceRoot}/src", - "sourceMapPathOverrides": { - "webpack:///src/*": "${webRoot}/*" - } - }] -} -``` ->Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). - -Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor. - -Having problems with VS Code Debugging? Please see their [troubleshooting guide](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#troubleshooting). - -### WebStorm - -You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed. - -In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration. - ->Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). - -Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm. - -The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine. - -## Formatting Code Automatically - -Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/). - -To format our code whenever we make a commit in git, we need to install the following dependencies: - -```sh -npm install --save husky lint-staged prettier -``` - -Alternatively you may use `yarn`: - -```sh -yarn add husky lint-staged prettier -``` - -* `husky` makes it easy to use githooks as if they are npm scripts. -* `lint-staged` allows us to run scripts on staged files in git. See this [blog post about lint-staged to learn more about it](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8). -* `prettier` is the JavaScript formatter we will run before commits. - -Now we can make sure every file is formatted correctly by adding a few lines to the `package.json` in the project root. - -Add the following line to `scripts` section: - -```diff - "scripts": { -+ "precommit": "lint-staged", - "start": "react-scripts start", - "build": "react-scripts build", -``` - -Next we add a 'lint-staged' field to the `package.json`, for example: - -```diff - "dependencies": { - // ... - }, -+ "lint-staged": { -+ "src/**/*.{js,jsx,json,css}": [ -+ "prettier --single-quote --write", -+ "git add" -+ ] -+ }, - "scripts": { -``` - -Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --single-quote --write "src/**/*.{js,jsx}"` to format your entire project for the first time. - -Next you might want to integrate Prettier in your favorite editor. Read the section on [Editor Integration](https://github.com/prettier/prettier#editor-integration) on the Prettier GitHub page. - -## Changing the Page `<title>` - -You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else. - -Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML. - -If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library. - -If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files). - -## Installing a Dependency - -The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: - -```sh -npm install --save react-router -``` - -Alternatively you may use `yarn`: - -```sh -yarn add react-router -``` - -This works for any library, not just `react-router`. - -## Importing a Component - -This project setup supports ES6 modules thanks to Babel.<br> -While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. - -For example: - -### `Button.js` - -```js -import React, { Component } from 'react'; - -class Button extends Component { - render() { - // ... - } -} - -export default Button; // Don’t forget to use export default! -``` - -### `DangerButton.js` - - -```js -import React, { Component } from 'react'; -import Button from './Button'; // Import a component from another file - -class DangerButton extends Component { - render() { - return <Button color="red" />; - } -} - -export default DangerButton; -``` - -Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. - -We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. - -Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. - -Learn more about ES6 modules: - -* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) -* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) -* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) - -## Code Splitting - -Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand. - -This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 3. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module. - -Here is an example: - -### `moduleA.js` - -```js -const moduleA = 'Hello'; - -export { moduleA }; -``` -### `App.js` - -```js -import React, { Component } from 'react'; - -class App extends Component { - handleClick = () => { - import('./moduleA') - .then(({ moduleA }) => { - // Use moduleA - }) - .catch(err => { - // Handle failure - }); - }; - - render() { - return ( - <div> - <button onClick={this.handleClick}>Load</button> - </div> - ); - } -} - -export default App; -``` - -This will make `moduleA.js` and all its unique dependencies as a separate chunk that only loads after the user clicks the 'Load' button. - -You can also use it with `async` / `await` syntax if you prefer it. - -### With React Router - -If you are using React Router check out [this tutorial](http://serverless-stack.com/chapters/code-splitting-in-create-react-app.html) on how to use code splitting with it. You can find the companion GitHub repository [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client/tree/code-splitting-in-create-react-app). - -## Adding a Stylesheet - -This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: - -### `Button.css` - -```css -.Button { - padding: 20px; -} -``` - -### `Button.js` - -```js -import React, { Component } from 'react'; -import './Button.css'; // Tell Webpack that Button.js uses these styles - -class Button extends Component { - render() { - // You can use them as regular CSS styles - return <div className="Button" />; - } -} -``` - -**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. - -In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. - -If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. - -## Post-Processing CSS - -This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. - -For example, this: - -```css -.App { - display: flex; - flex-direction: row; - align-items: center; -} -``` - -becomes this: - -```css -.App { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -``` - -If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling). - -## Adding a CSS Preprocessor (Sass, Less etc.) - -Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)). - -Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative. - -First, let’s install the command-line interface for Sass: - -```sh -npm install --save node-sass-chokidar -``` - -Alternatively you may use `yarn`: - -```sh -yarn add node-sass-chokidar -``` - -Then in `package.json`, add the following lines to `scripts`: - -```diff - "scripts": { -+ "build-css": "node-sass-chokidar src/ -o src/", -+ "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test --env=jsdom", -``` - ->Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. - -Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated. - -To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions. - -To enable importing files without using relative paths, you can add the `--include-path` option to the command in `package.json`. - -``` -"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/", -"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive", -``` - -This will allow you to do imports like - -```scss -@import 'styles/_colors.scss'; // assuming a styles directory under src/ -@import 'nprogress/nprogress'; // importing a css file from the nprogress node module -``` - -At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control. - -As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use the `&&` operator to execute two scripts sequentially. However, there is no cross-platform way to run two scripts in parallel, so we will install a package for this: - -```sh -npm install --save npm-run-all -``` - -Alternatively you may use `yarn`: - -```sh -yarn add npm-run-all -``` - -Then we can change `start` and `build` scripts to include the CSS preprocessor commands: - -```diff - "scripts": { - "build-css": "node-sass-chokidar src/ -o src/", - "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", -- "start": "react-scripts start", -- "build": "react-scripts build", -+ "start-js": "react-scripts start", -+ "start": "npm-run-all -p watch-css start-js", -+ "build-js": "react-scripts build", -+ "build": "npm-run-all build-css build-js", - "test": "react-scripts test --env=jsdom", - "eject": "react-scripts eject" - } -``` - -Now running `npm start` and `npm run build` also builds Sass files. - -**Why `node-sass-chokidar`?** - -`node-sass` has been reported as having the following issues: - -- `node-sass --watch` has been reported to have *performance issues* in certain conditions when used in a virtual machine or with docker. - -- Infinite styles compiling [#1939](https://github.com/facebookincubator/create-react-app/issues/1939) - -- `node-sass` has been reported as having issues with detecting new files in a directory [#1891](https://github.com/sass/node-sass/issues/1891) - - `node-sass-chokidar` is used here as it addresses these issues. - -## Adding Images, Fonts, and Files - -With Webpack, using static assets like images and fonts works similarly to CSS. - -You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF. - -To reduce the number of requests to the server, importing images that are less than 10,000 bytes returns a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) instead of a path. This applies to the following file extensions: bmp, gif, jpg, jpeg, and png. SVG files are excluded due to [#1153](https://github.com/facebookincubator/create-react-app/issues/1153). - -Here is an example: - -```js -import React from 'react'; -import logo from './logo.png'; // Tell Webpack this JS file uses this image - -console.log(logo); // /logo.84287d09.png - -function Header() { - // Import result is the URL of your image - return <img src={logo} alt="Logo" />; -} - -export default Header; -``` - -This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths. - -This works in CSS too: - -```css -.Logo { - background-image: url(./logo.png); -} -``` - -Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. - -Please be advised that this is also a custom feature of Webpack. - -**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).<br> -An alternative way of handling static assets is described in the next section. - -## Using the `public` Folder - ->Note: this feature is available with `react-scripts@0.5.0` and higher. - -### Changing the HTML - -The `public` folder contains the HTML file so you can tweak it, for example, to [set the page title](#changing-the-page-title). -The `<script>` tag with the compiled code will be added to it automatically during the build process. - -### Adding Assets Outside of the Module System - -You can also add other assets to the `public` folder. - -Note that we normally encourage you to `import` assets in JavaScript files instead. -For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-fonts-and-files). -This mechanism provides a number of benefits: - -* Scripts and stylesheets get minified and bundled together to avoid extra network requests. -* Missing files cause compilation errors instead of 404 errors for your users. -* Result filenames include content hashes so you don’t need to worry about browsers caching their old versions. - -However there is an **escape hatch** that you can use to add an asset outside of the module system. - -If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. - -Inside `index.html`, you can use it like this: - -```html -<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> -``` - -Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build. - -When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL. - -In JavaScript code, you can use `process.env.PUBLIC_URL` for similar purposes: - -```js -render() { - // Note: this is an escape hatch and should be used sparingly! - // Normally we recommend using `import` for getting asset URLs - // as described in “Adding Images and Fonts” above this section. - return <img src={process.env.PUBLIC_URL + '/img/logo.png'} />; -} -``` - -Keep in mind the downsides of this approach: - -* None of the files in `public` folder get post-processed or minified. -* Missing files will not be called at compilation time, and will cause 404 errors for your users. -* Result filenames won’t include content hashes so you’ll need to add query arguments or rename them every time they change. - -### When to Use the `public` Folder - -Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-fonts-and-files) from JavaScript. -The `public` folder is useful as a workaround for a number of less common cases: - -* You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest). -* You have thousands of images and need to dynamically reference their paths. -* You want to include a small script like [`pace.js`](http://github.hubspot.com/pace/docs/welcome/) outside of the bundled code. -* Some library may be incompatible with Webpack and you have no other option but to include it as a `<script>` tag. - -Note that if you add a `<script>` that declares global variables, you also need to read the next section on using them. - -## Using Global Variables - -When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable. - -You can avoid this by reading the global variable explicitly from the `window` object, for example: - -```js -const $ = window.$; -``` - -This makes it obvious you are using a global variable intentionally rather than because of a typo. - -Alternatively, you can force the linter to ignore any line by adding `// eslint-disable-line` after it. - -## Adding Bootstrap - -You don’t have to use [Reactstrap](https://reactstrap.github.io/) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: - -Install Reactstrap and Bootstrap from npm. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: - -```sh -npm install --save reactstrap bootstrap@4 -``` - -Alternatively you may use `yarn`: - -```sh -yarn add reactstrap bootstrap@4 -``` - -Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file: - -```js -import 'bootstrap/dist/css/bootstrap.css'; -// Put any other imports below so that CSS from your -// components takes precedence over default styles. -``` - -Import required React Bootstrap components within ```src/App.js``` file or your custom component files: - -```js -import { Navbar, Button } from 'reactstrap'; -``` - -Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. - -### Using a Custom Theme - -Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br> -We suggest the following approach: - -* Create a new package that depends on the package you wish to customize, e.g. Bootstrap. -* Add the necessary build steps to tweak the theme, and publish your package on npm. -* Install your own theme npm package as a dependency of your app. - -Here is an example of adding a [customized Bootstrap](https://medium.com/@tacomanator/customizing-create-react-app-aa9ffb88165) that follows these steps. - -## Adding Flow - -Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. - -Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box. - -To add Flow to a Create React App project, follow these steps: - -1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). -2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. -3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. -4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). - -Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. -You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience. -In the future we plan to integrate it into Create React App even more closely. - -To learn more about Flow, check out [its documentation](https://flowtype.org/). - -## Adding Custom Environment Variables - ->Note: this feature is available with `react-scripts@0.2.3` and higher. - -Your project can consume variables declared in your environment as if they were declared locally in your JS files. By -default you will have `NODE_ENV` defined for you, and any other environment variables starting with -`REACT_APP_`. - -**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them. - ->Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. - -These environment variables will be defined for you on `process.env`. For example, having an environment -variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`. - -There is also a special built-in environment variable called `NODE_ENV`. You can read it from `process.env.NODE_ENV`. When you run `npm start`, it is always equal to `'development'`, when you run `npm test` it is always equal to `'test'`, and when you run `npm run build` to make a production bundle, it is always equal to `'production'`. **You cannot override `NODE_ENV` manually.** This prevents developers from accidentally deploying a slow development build to production. - -These environment variables can be useful for displaying information conditionally based on where the project is -deployed or consuming sensitive data that lives outside of version control. - -First, you need to have environment variables defined. For example, let’s say you wanted to consume a secret defined -in the environment inside a `<form>`: - -```jsx -render() { - return ( - <div> - <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> - <form> - <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> - </form> - </div> - ); -} -``` - -During the build, `process.env.REACT_APP_SECRET_CODE` will be replaced with the current value of the `REACT_APP_SECRET_CODE` environment variable. Remember that the `NODE_ENV` variable will be set for you automatically. - -When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: - -```html -<div> - <small>You are running this application in <b>development</b> mode.</small> - <form> - <input type="hidden" value="abcdef" /> - </form> -</div> -``` - -The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this -value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in -a `.env` file. Both of these ways are described in the next few sections. - -Having access to the `NODE_ENV` is also useful for performing actions conditionally: - -```js -if (process.env.NODE_ENV !== 'production') { - analytics.disable(); -} -``` - -When you compile the app with `npm run build`, the minification step will strip out this condition, and the resulting bundle will be smaller. - -### Referencing Environment Variables in the HTML - ->Note: this feature is available with `react-scripts@0.9.0` and higher. - -You can also access the environment variables starting with `REACT_APP_` in the `public/index.html`. For example: - -```html -<title>%REACT_APP_WEBSITE_NAME% -``` - -Note that the caveats from the above section apply: - -* Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work. -* The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](#generating-dynamic-meta-tags-on-the-server). - -### Adding Temporary Environment Variables In Your Shell - -Defining environment variables can vary between OSes. It’s also important to know that this manner is temporary for the -life of the shell session. - -#### Windows (cmd.exe) - -```cmd -set REACT_APP_SECRET_CODE=abcdef&&npm start -``` - -(Note: the lack of whitespace is intentional.) - -#### Linux, macOS (Bash) - -```bash -REACT_APP_SECRET_CODE=abcdef npm start -``` - -### Adding Development Environment Variables In `.env` - ->Note: this feature is available with `react-scripts@0.5.0` and higher. - -To define permanent environment variables, create a file called `.env` in the root of your project: - -``` -REACT_APP_SECRET_CODE=abcdef -``` - -`.env` files **should be** checked into source control (with the exclusion of `.env*.local`). - -#### What other `.env` files can be used? - ->Note: this feature is **available with `react-scripts@1.0.0` and higher**. - -* `.env`: Default. -* `.env.local`: Local overrides. **This file is loaded for all environments except test.** -* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings. -* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings. - -Files on the left have more priority than files on the right: - -* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env` -* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env` -* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing) - -These variables will act as the defaults if the machine does not explicitly set them.
-Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. - ->Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need -these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). - -## Can I Use Decorators? - -Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
-Create React App doesn’t support decorator syntax at the moment because: - -* It is an experimental proposal and is subject to change. -* The current specification version is not officially supported by Babel. -* If the specification changes, we won’t be able to write a codemod because we don’t use them internally at Facebook. - -However in many cases you can rewrite decorator-based code without decorators just as fine.
-Please refer to these two threads for reference: - -* [#214](https://github.com/facebookincubator/create-react-app/issues/214) -* [#411](https://github.com/facebookincubator/create-react-app/issues/411) - -Create React App will add decorator support when the specification advances to a stable stage. - -## Integrating with an API Backend - -These tutorials will help you to integrate your app with an API backend running on another port, -using `fetch()` to access it. - -### Node -Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/). -You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). - -### Ruby on Rails - -Check out [this tutorial](https://www.fullstackreact.com/articles/how-to-get-create-react-app-to-work-with-your-rails-api/). -You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo-rails). - -## Proxying API Requests in Development - ->Note: this feature is available with `react-scripts@0.2.3` and higher. - -People often serve the front-end React app from the same host and port as their backend implementation.
-For example, a production setup might look like this after the app is deployed: - -``` -/ - static server returns index.html with React app -/todos - static server returns index.html with React app -/api/todos - server handles any /api/* requests using the backend implementation -``` - -Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. - -To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: - -```js - "proxy": "http://localhost:4000", -``` - -This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will **only** attempt to send requests without `text/html` in its `Accept` header to the proxy. - -Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: - -``` -Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. -``` - -Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`. - -The `proxy` option supports HTTP, HTTPS and WebSocket connections.
-If the `proxy` option is **not** flexible enough for you, alternatively you can: - -* [Configure the proxy yourself](#configuring-the-proxy-manually) -* Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). -* Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. - -### "Invalid Host Header" Errors After Configuring Proxy - -When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. The issue is explained in [this article](https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a) and [this issue](https://github.com/webpack/webpack-dev-server/issues/887). - -This shouldn’t affect you when developing on `localhost`, but if you develop remotely like [described here](https://github.com/facebookincubator/create-react-app/issues/2271), you will see this error in the browser after enabling the `proxy` option: - ->Invalid Host header - -To work around it, you can specify your public development host in a file called `.env.development` in the root of your project: - -``` -HOST=mypublicdevhost.com -``` - -If you restart the development server now and load the app from the specified host, it should work. - -If you are still having issues or if you’re using a more exotic environment like a cloud editor, you can bypass the host check completely by adding a line to `.env.development.local`. **Note that this is dangerous and exposes your machine to remote code execution from malicious websites:** - -``` -# NOTE: THIS IS DANGEROUS! -# It exposes your machine to attacks from the websites you visit. -DANGEROUSLY_DISABLE_HOST_CHECK=true -``` - -We don’t recommend this approach. - -### Configuring the Proxy Manually - ->Note: this feature is available with `react-scripts@1.0.0` and higher. - -If the `proxy` option is **not** flexible enough for you, you can specify an object in the following form (in `package.json`).
-You may also specify any configuration value [`http-proxy-middleware`](https://github.com/chimurai/http-proxy-middleware#options) or [`http-proxy`](https://github.com/nodejitsu/node-http-proxy#options) supports. -```js -{ - // ... - "proxy": { - "/api": { - "target": "", - "ws": true - // ... - } - } - // ... -} -``` - -All requests matching this path will be proxies, no exceptions. This includes requests for `text/html`, which the standard `proxy` option does not proxy. - -If you need to specify multiple proxies, you may do so by specifying additional entries. -Matches are regular expressions, so that you can use a regexp to match multiple paths. -```js -{ - // ... - "proxy": { - // Matches any request starting with /api - "/api": { - "target": "", - "ws": true - // ... - }, - // Matches any request starting with /foo - "/foo": { - "target": "", - "ssl": true, - "pathRewrite": { - "^/foo": "/foo/beta" - } - // ... - }, - // Matches /bar/abc.html but not /bar/sub/def.html - "/bar/[^/]*[.]html": { - "target": "", - // ... - }, - // Matches /baz/abc.html and /baz/sub/def.html - "/baz/.*/.*[.]html": { - "target": "" - // ... - } - } - // ... -} -``` - -### Configuring a WebSocket Proxy - -When setting up a WebSocket proxy, there are a some extra considerations to be aware of. - -If you’re using a WebSocket engine like [Socket.io](https://socket.io/), you must have a Socket.io server running that you can use as the proxy target. Socket.io will not work with a standard WebSocket server. Specifically, don't expect Socket.io to work with [the websocket.org echo test](http://websocket.org/echo.html). - -There’s some good documentation available for [setting up a Socket.io server](https://socket.io/docs/). - -Standard WebSockets **will** work with a standard WebSocket server as well as the websocket.org echo test. You can use libraries like [ws](https://github.com/websockets/ws) for the server, with [native WebSockets in the browser](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). - -Either way, you can proxy WebSocket requests manually in `package.json`: - -```js -{ - // ... - "proxy": { - "/socket": { - // Your compatible WebSocket server - "target": "ws://", - // Tell http-proxy-middleware that this is a WebSocket proxy. - // Also allows you to proxy WebSocket requests without an additional HTTP request - // https://github.com/chimurai/http-proxy-middleware#external-websocket-upgrade - "ws": true - // ... - } - } - // ... -} -``` - -## Using HTTPS in Development - ->Note: this feature is available with `react-scripts@0.4.0` and higher. - -You may require the dev server to serve pages over HTTPS. One particular case where this could be useful is when using [the "proxy" feature](#proxying-api-requests-in-development) to proxy requests to an API server when that API server is itself serving HTTPS. - -To do this, set the `HTTPS` environment variable to `true`, then start the dev server as usual with `npm start`: - -#### Windows (cmd.exe) - -```cmd -set HTTPS=true&&npm start -``` - -(Note: the lack of whitespace is intentional.) - -#### Linux, macOS (Bash) - -```bash -HTTPS=true npm start -``` - -Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page. - -## Generating Dynamic `` Tags on the Server - -Since Create React App doesn’t support server rendering, you might be wondering how to make `` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this: - -```html - - - - - -``` - -Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG_TITLE__`, `__OG_DESCRIPTION__`, and any other placeholders with values depending on the current URL. Just make sure to sanitize and escape the interpolated values so that they are safe to embed into HTML! - -If you use a Node server, you can even share the route matching logic between the client and the server. However duplicating it also works fine in simple cases. - -## Pre-Rendering into Static HTML Files - -If you’re hosting your `build` with a static hosting provider you can use [react-snapshot](https://www.npmjs.com/package/react-snapshot) or [react-snap](https://github.com/stereobooster/react-snap) to generate HTML pages for each route, or relative link, in your application. These pages will then seamlessly become active, or “hydrated”, when the JavaScript bundle has loaded. - -There are also opportunities to use this outside of static hosting, to take the pressure off the server when generating and caching routes. - -The primary benefit of pre-rendering is that you get the core content of each page _with_ the HTML payload—regardless of whether or not your JavaScript bundle successfully downloads. It also increases the likelihood that each route of your application will be picked up by search engines. - -You can read more about [zero-configuration pre-rendering (also called snapshotting) here](https://medium.com/superhighfives/an-almost-static-stack-6df0a2791319). - -## Injecting Data from the Server into the Page - -Similarly to the previous section, you can leave some placeholders in the HTML that inject global variables, for example: - -```js - - - - -``` - -Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.** - -## Running Tests - ->Note: this feature is available with `react-scripts@0.3.0` and higher.
->[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) - -Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try. - -Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness. - -While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks. - -We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App. - -### Filename Conventions - -Jest will look for test files with any of the following popular naming conventions: - -* Files with `.js` suffix in `__tests__` folders. -* Files with `.test.js` suffix. -* Files with `.spec.js` suffix. - -The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder. - -We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects. - -### Command Line Interface - -When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code. - -The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run: - -![Jest watch mode](http://facebook.github.io/jest/img/blog/15-watch.gif) - -### Version Control Integration - -By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests run fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. - -Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests. - -Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository. - -### Writing Tests - -To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended. - -Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this: - -```js -import sum from './sum'; - -it('sums numbers', () => { - expect(sum(1, 2)).toEqual(3); - expect(sum(2, 2)).toEqual(4); -}); -``` - -All `expect()` matchers supported by Jest are [extensively documented here](https://facebook.github.io/jest/docs/en/expect.html#content).
-You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](https://facebook.github.io/jest/docs/en/expect.html#tohavebeencalled) to create “spies” or mock functions. - -### Testing Components - -There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes. - -Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components: - -```js -import React from 'react'; -import ReactDOM from 'react-dom'; -import App from './App'; - -it('renders without crashing', () => { - const div = document.createElement('div'); - ReactDOM.render(, div); -}); -``` - -This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. - -When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior. - -If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). To install it, run: - -```sh -npm install --save enzyme enzyme-adapter-react-16 react-test-renderer -``` - -Alternatively you may use `yarn`: - -```sh -yarn add enzyme enzyme-adapter-react-16 react-test-renderer -``` - -As of Enzyme 3, you will need to install Enzyme along with an Adapter corresponding to the version of React you are using. (The examples above use the adapter for React 16.) - -The adapter will also need to be configured in your [global setup file](#initializing-test-environment): - -#### `src/setupTests.js` -```js -import { configure } from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; - -configure({ adapter: new Adapter() }); -``` - -Now you can write a smoke test with it: - -```js -import React from 'react'; -import { shallow } from 'enzyme'; -import App from './App'; - -it('renders without crashing', () => { - shallow(); -}); -``` - -Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a `
- - - - {editMode === false ? "Add account" : "Edit account"} - -
- - - Username - - - setUsername(e.target.value)} /> - - - Server - - - setServer(e.target.value)} /> - - - Password - - - setPassword(e.target.value)} /> - - - Proxy IP - - - setProxyIP(e.target.value)} /> - - - Proxy username - - - setProxyUsername(e.target.value)} /> - - - Proxy Port - - - setProxyPort(e.target.value)} /> - - - Proxy password - - - setProxyPassword(e.target.value)} /> - - - - - - -
- - - - - -
- - - Proxy - Proxy username - Is working - - -
- - - -
- - - -
-
-
- - ) -} - -export default AccountModal; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/components/sidebar/SideBar.js b/TBSReact/ClientApp/src/components/sidebar/SideBar.js deleted file mode 100644 index 0d05d9352..000000000 --- a/TBSReact/ClientApp/src/components/sidebar/SideBar.js +++ /dev/null @@ -1,101 +0,0 @@ -import { useEffect, useState } from "react" -import { Drawer, IconButton, Grid, Button } from "@mui/material" -import MenuIcon from '@mui/icons-material/Menu'; -import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; - -import AccountTable from "./AccountTable" -import AccountModal from "./Modal/AccountModal" - -import { deleteAccount } from "../../api/Accounts/Account"; -import { login, logout, loginAll, logoutAll, getStatus } from "../../api/Accounts/Driver"; - -const SideBar = ({ selected, setSelected }) => { - const [open, setOpen] = useState(false); - const [status, setStatus] = useState(false); - - useEffect( ( ) => { - const updateStatus = async () => { - setStatus(await getStatus(selected)) - } - updateStatus(); - }, [selected]) - const handleDrawerOpen = () => { - setOpen(true); - }; - - const handleDrawerClose = () => { - setOpen(false); - }; - - const onDelete = async () => { - await deleteAccount(selected); - setSelected(-1) - } - - const onLog = async () => { - if (status === true) { - await logout(selected); - setStatus(await getStatus(selected)) - } - else { - await login(selected); - setStatus(await getStatus(selected)) - } - } - - const onLoginAll = async () => { - await loginAll(); - setSelected(-1) - } - - const onLogoutAll = async () => { - await logoutAll(); - setSelected(-1) - - } - - - return ( - <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) -} -export default SideBar; \ No newline at end of file diff --git a/TBSReact/ClientApp/src/custom.css b/TBSReact/ClientApp/src/custom.css deleted file mode 100644 index 5fdfd061c..000000000 --- a/TBSReact/ClientApp/src/custom.css +++ /dev/null @@ -1,14 +0,0 @@ -/* Provide sufficient contrast against white background */ -a { - color: #0366d6; -} - -code { - color: #E01A76; -} - -.btn-primary { - color: #fff; - background-color: #1b6ec2; - border-color: #1861ac; -} diff --git a/TBSReact/ClientApp/src/index.js b/TBSReact/ClientApp/src/index.js deleted file mode 100644 index 89be37de7..000000000 --- a/TBSReact/ClientApp/src/index.js +++ /dev/null @@ -1,20 +0,0 @@ -import 'bootstrap/dist/css/bootstrap.css'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import { BrowserRouter } from 'react-router-dom'; -import App from './App'; -import * as serviceWorkerRegistration from './serviceWorkerRegistration'; - -const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); -const rootElement = document.getElementById('root'); - -ReactDOM.render( - - - , - rootElement); - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://cra.link/PWA -serviceWorkerRegistration.unregister(); diff --git a/TBSReact/ClientApp/src/service-worker.js b/TBSReact/ClientApp/src/service-worker.js deleted file mode 100644 index 0f1e0ce02..000000000 --- a/TBSReact/ClientApp/src/service-worker.js +++ /dev/null @@ -1,72 +0,0 @@ -/* eslint-disable no-restricted-globals */ - -// This service worker can be customized! -// See https://developers.google.com/web/tools/workbox/modules -// for the list of available Workbox modules, or add any other -// code you'd like. -// You can also remove this file if you'd prefer not to use a -// service worker, and the Workbox build step will be skipped. - -import { clientsClaim } from 'workbox-core'; -import { ExpirationPlugin } from 'workbox-expiration'; -import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'; -import { registerRoute } from 'workbox-routing'; -import { StaleWhileRevalidate } from 'workbox-strategies'; - -clientsClaim(); - -// Precache all of the assets generated by your build process. -// Their URLs are injected into the manifest variable below. -// This variable must be present somewhere in your service worker file, -// even if you decide not to use precaching. See https://cra.link/PWA -precacheAndRoute(self.__WB_MANIFEST); - -// Set up App Shell-style routing, so that all navigation requests -// are fulfilled with your index.html shell. Learn more at -// https://developers.google.com/web/fundamentals/architecture/app-shell -const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$'); -registerRoute( - // Return false to exempt requests from being fulfilled by index.html. - ({ request, url }) => { - // If this isn't a navigation, skip. - if (request.mode !== 'navigate') { - return false; - } // If this is a URL that starts with /_, skip. - - if (url.pathname.startsWith('/_')) { - return false; - } // If this looks like a URL for a resource, because it contains // a file extension, skip. - - if (url.pathname.match(fileExtensionRegexp)) { - return false; - } // Return true to signal that we want to use the handler. - - return true; - }, - createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html') -); - -// An example runtime caching route for requests that aren't handled by the -// precache, in this case same-origin .png requests like those from in public/ -registerRoute( - // Add in any other file extensions or routing criteria as needed. - ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'), // Customize this strategy as needed, e.g., by changing to CacheFirst. - new StaleWhileRevalidate({ - cacheName: 'images', - plugins: [ - // Ensure that once this runtime cache reaches a maximum size the - // least-recently used images are removed. - new ExpirationPlugin({ maxEntries: 50 }), - ], - }) -); - -// This allows the web app to trigger skipWaiting via -// registration.waiting.postMessage({type: 'SKIP_WAITING'}) -self.addEventListener('message', (event) => { - if (event.data && event.data.type === 'SKIP_WAITING') { - self.skipWaiting(); - } -}); - -// Any other custom service worker logic can go here. diff --git a/TBSReact/ClientApp/src/serviceWorkerRegistration.js b/TBSReact/ClientApp/src/serviceWorkerRegistration.js deleted file mode 100644 index 2262ecdbf..000000000 --- a/TBSReact/ClientApp/src/serviceWorkerRegistration.js +++ /dev/null @@ -1,137 +0,0 @@ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read https://cra.link/PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.0/8 are considered localhost for IPv4. - window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) -); - -export function register(config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://cra.link/PWA' - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl, config) { - navigator.serviceWorker - .register(swUrl) - .then((registration) => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://cra.link/PWA.' - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch((error) => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl, config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl, { - headers: { 'Service-Worker': 'script' }, - }) - .then((response) => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then((registration) => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log('No internet connection found. App is running in offline mode.'); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready - .then((registration) => { - registration.unregister(); - }) - .catch((error) => { - console.error(error.message); - }); - } -} diff --git a/TBSReact/ClientApp/src/setupProxy.js b/TBSReact/ClientApp/src/setupProxy.js deleted file mode 100644 index 2bf4e2a20..000000000 --- a/TBSReact/ClientApp/src/setupProxy.js +++ /dev/null @@ -1,18 +0,0 @@ -const createProxyMiddleware = require('http-proxy-middleware'); -const { env } = require('process'); - -const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` : - env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:57848'; - -const context = [ - "/weatherforecast", -]; - -module.exports = function(app) { - const appProxy = createProxyMiddleware(context, { - target: target, - secure: false - }); - - app.use(appProxy); -}; diff --git a/TBSReact/Controllers/Account/AccessesController.cs b/TBSReact/Controllers/Account/AccessesController.cs deleted file mode 100644 index 77fef9f6b..000000000 --- a/TBSReact/Controllers/Account/AccessesController.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using TbsReact.Models; -using TbsReact.Singleton; -using TbsReact.Extension; -using System.Collections.Generic; - -namespace TbsReact.Controllers -{ - [ApiController] - [Route("accounts/{indexAcc:int}/accesses")] - public class AccessesControler : ControllerBase - { - [HttpGet] - public ActionResult> GetAccesses(int indexAcc) - { - var account = AccountData.GetAccount(indexAcc); - if (account == null) - { - return NotFound(); - } - var acc = AccountManager.GetAccount(account); - var accesses = new List(); - for (int i = 0; i < acc.Access.AllAccess.Count; i++) - { - accesses.Add(acc.Access.AllAccess[i].GetAccount(i)); - } - - return accesses; - } - } -} \ No newline at end of file diff --git a/TBSReact/Controllers/Account/AccountController.cs b/TBSReact/Controllers/Account/AccountController.cs deleted file mode 100644 index bf212968a..000000000 --- a/TBSReact/Controllers/Account/AccountController.cs +++ /dev/null @@ -1,113 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using TbsReact.Models; -using TbsReact.Singleton; -using TbsReact.Extension; -using System.Collections.Generic; -using TbsCore.Database; -using System; - -namespace TbsReact.Controllers -{ - [ApiController] - [Route("accounts")] - public class AccountController : ControllerBase - { - [HttpGet] - public ActionResult> GetAccounts() - { - var AccountInfoList = new List(); - for (int i = 0; i < AccountData.Accounts.Count; i++) - { - AccountInfoList.Add(AccountData.Accounts[i]); - } - - return AccountInfoList; - } - - [HttpGet("{index:int}")] - public ActionResult GetAccount(int index) - { - var acc = AccountData.GetAccount(index); - if (acc == null) - { - return NotFound(); - } - return acc; - } - - [HttpPost] - public ActionResult AddAccount([FromBody] NewAccount data) - { - var account = data.Account; - var accesses = data.Accesses; - if (string.IsNullOrEmpty(account.Name) - || string.IsNullOrEmpty(account.ServerUrl)) - { - return BadRequest(); - } - var acc = account.GetAccount(accesses); - DbRepository.SaveAccount(acc); - AccountManager.Accounts.Add(acc); - AccountData.AddAccount(account); - - return Ok(); - } - - [HttpPatch("{index:int}")] - public ActionResult EditAccount(int index, [FromBody] NewAccount data) - { - var account = data.Account; - var accesses = data.Accesses; - - if (string.IsNullOrEmpty(account.Name) || - string.IsNullOrEmpty(account.ServerUrl)) - { - return BadRequest(); - } - var accountOld = AccountData.GetAccount(index); - if (accountOld == null) - { - return NotFound(); - } - - var acc = AccountManager.GetAccount(accountOld); - - AccountData.EditAccount(index, account); - - acc.AccInfo.Nickname = account.Name; - acc.AccInfo.ServerUrl = account.ServerUrl; - - acc.Access.AllAccess.Clear(); - foreach (var access in accesses) - { - acc.Access.AllAccess.Add(new TbsCore.Models.Access.Access - { - Password = access.Password, - Proxy = access.Proxy.Ip, - ProxyPort = access.Proxy.Port, - ProxyUsername = access.Proxy.Username, - ProxyPassword = access.Proxy.Password, - }); - } - DbRepository.SaveAccount(acc); - return Ok(); - } - - [HttpDelete("{index:int}")] - public ActionResult DeleteAccount(int index) - { - var account = AccountData.GetAccount(index); - if (account == null) - { - return NotFound(); - } - var acc = AccountManager.GetAccount(account); - - DbRepository.RemoveAccount(acc); - AccountManager.Accounts.Remove(acc); - AccountData.DeleteAccount(index); - - return Ok(); - } - } -} \ No newline at end of file diff --git a/TBSReact/Extension/AccessExtension.cs b/TBSReact/Extension/AccessExtension.cs deleted file mode 100644 index dad1c27e9..000000000 --- a/TBSReact/Extension/AccessExtension.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; -using TbsReact.Models; - -namespace TbsReact.Extension -{ - public static class AccessExtension - { - public static Access GetAccount(this TbsCore.Models.Access.Access access, int index) - { - return new Access - { - Id = index, - Password = access.Password, - Proxy = new Proxy - { - Ip = access.Proxy, - Port = access.ProxyPort, - Username = access.ProxyUsername, - Password = access.ProxyPassword, - OK = access.Ok - } - }; - } - } -} \ No newline at end of file diff --git a/TBSReact/Models/Access.cs b/TBSReact/Models/Access.cs deleted file mode 100644 index 5170d6e50..000000000 --- a/TBSReact/Models/Access.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TbsReact.Models -{ - public class Access - { - public int Id { get; set; } - public string Password { get; set; } - public Proxy Proxy { get; set; } - } -} \ No newline at end of file diff --git a/TBSReact/Models/Account.cs b/TBSReact/Models/Account.cs deleted file mode 100644 index 1b2d8f790..000000000 --- a/TBSReact/Models/Account.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; - -namespace TbsReact.Models -{ - public class Account - { - public int Id { get; set; } - public string Name { get; set; } - public string ServerUrl { get; set; } - } -} \ No newline at end of file diff --git a/TBSReact/Models/NewAccount.cs b/TBSReact/Models/NewAccount.cs deleted file mode 100644 index e0ecf3841..000000000 --- a/TBSReact/Models/NewAccount.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; - -namespace TbsReact.Models -{ - public class NewAccount - { - public Account Account { get; set; } - public List Accesses { get; set; } - } -} \ No newline at end of file diff --git a/TBSReact/Models/Proxy.cs b/TBSReact/Models/Proxy.cs deleted file mode 100644 index 4a1a49da4..000000000 --- a/TBSReact/Models/Proxy.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace TbsReact.Models -{ - public class Proxy - { - public string Ip { get; set; } - public int Port { get; set; } - public string Username { get; set; } - public string Password { get; set; } - public bool OK { get; set; } - } -} \ No newline at end of file diff --git a/TBSReact/Pages/Error.cshtml b/TBSReact/Pages/Error.cshtml deleted file mode 100644 index 6f92b9565..000000000 --- a/TBSReact/Pages/Error.cshtml +++ /dev/null @@ -1,26 +0,0 @@ -@page -@model ErrorModel -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

- -@if (Model.ShowRequestId) -{ -

- Request ID: @Model.RequestId -

-} - -

Development Mode

-

- Swapping to the Development environment displays detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

diff --git a/TBSReact/Pages/Error.cshtml.cs b/TBSReact/Pages/Error.cshtml.cs deleted file mode 100644 index a4e23bad8..000000000 --- a/TBSReact/Pages/Error.cshtml.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; - -namespace TbsReact.Pages -{ - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public class ErrorModel : PageModel - { - private readonly ILogger _logger; - - public ErrorModel(ILogger logger) - { - _logger = logger; - } - - public string RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; - } - } -} diff --git a/TBSReact/Pages/_ViewImports.cshtml b/TBSReact/Pages/_ViewImports.cshtml deleted file mode 100644 index 7f96d899f..000000000 --- a/TBSReact/Pages/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using TbsReact -@namespace TbsReact.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/TBSReact/Program.cs b/TBSReact/Program.cs deleted file mode 100644 index de50cee70..000000000 --- a/TBSReact/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace TbsReact -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} diff --git a/TBSReact/Properties/launchSettings.json b/TBSReact/Properties/launchSettings.json deleted file mode 100644 index 3dbe16625..000000000 --- a/TBSReact/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:3220", - "sslPort": 44303 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "TbsReact": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/TBSReact/Singleton/AccountManager.cs b/TBSReact/Singleton/AccountManager.cs deleted file mode 100644 index aca3dfcaa..000000000 --- a/TBSReact/Singleton/AccountManager.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using TbsCore.Database; -using TbsCore.Helpers; - -using TbsReact.Models; - -namespace TbsReact.Singleton -{ - public sealed class AccountManager - { - private static readonly AccountManager instance = new(); - - private List accounts = new(); - - public static List Accounts - { - get { return Instance.accounts; } - } - - private AccountManager() - { - LoadAccounts(); - } - - public static AccountManager Instance - { - get - { - return instance; - } - } - - public static TbsCore.Models.AccModels.Account GetAccount(Account account) - { - return Accounts.FirstOrDefault(x => x.AccInfo.Nickname.Equals(account.Name) && x.AccInfo.ServerUrl.Equals(account.ServerUrl)); - } - - private void LoadAccounts() - { - accounts = DbRepository.GetAccounts(); - accounts.ForEach(x => ObjectHelper.FixAccObj(x, x)); - } - - public void SaveAccounts() - { - IoHelperCore.SaveAccounts(accounts, true); - } - } -} \ No newline at end of file diff --git a/TBSReact/Singleton/Datas/AccountData.cs b/TBSReact/Singleton/Datas/AccountData.cs deleted file mode 100644 index 10bd39285..000000000 --- a/TBSReact/Singleton/Datas/AccountData.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using TbsReact.Models; - -namespace TbsReact.Singleton -{ - public sealed class AccountData - { - private static readonly AccountData _instance = new(); - private List _accounts = new(); - - private AccountData() - { - for (int i = 0; i < AccountManager.Accounts.Count; i++) - { - _accounts.Add(new Account - { - Id = i, - Name = AccountManager.Accounts[i].AccInfo.Nickname, - ServerUrl = AccountManager.Accounts[i].AccInfo.ServerUrl, - }); - } - } - - public static List Accounts => Instance._accounts; - - public static Account GetAccount(int index) - { - return Accounts.FirstOrDefault(x => x.Id == index); - } - - public static void AddAccount(Account account) - { - account.Id = Accounts.Last().Id + 1; - Accounts.Add(account); - } - - public static bool EditAccount(int index, Account account) - { - var current = Accounts.FirstOrDefault(x => x.Id == index); - if (current == null) return false; - - current.Name = account.Name; - current.ServerUrl = account.ServerUrl; - return true; - } - - public static bool DeleteAccount(int index) - { - return Accounts.Remove(Accounts.FirstOrDefault(x => x.Id == index)); - } - - public static AccountData Instance - { - get { return _instance; } - } - } -} \ No newline at end of file diff --git a/TBSReact/TBSReact.csproj b/TBSReact/TBSReact.csproj deleted file mode 100644 index a05ce70a0..000000000 --- a/TBSReact/TBSReact.csproj +++ /dev/null @@ -1,59 +0,0 @@ - - - - net5.0 - true - Latest - false - ClientApp\ - $(DefaultItemExcludes);$(SpaRoot)node_modules\** - true - Exe - true - true - 2f4cf8f4-975c-481e-9f90-193010f82aca - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %(DistFiles.Identity) - PreserveNewest - true - - - - - diff --git a/TBSReact/appsettings.Development.json b/TBSReact/appsettings.Development.json deleted file mode 100644 index 8983e0fc1..000000000 --- a/TBSReact/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/TBSReact/appsettings.json b/TBSReact/appsettings.json deleted file mode 100644 index ad75fee41..000000000 --- a/TBSReact/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, -"AllowedHosts": "*" -} From 1342c8be67bf7672009a82e0f5386a5f700bd0fc Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 4 Dec 2021 10:39:02 +0700 Subject: [PATCH 15/69] fix default value on add account modal --- .../ClientApp/src/components/sidebar/Modal/AccountModal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index 54c4a27fa..995d22790 100644 --- a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -26,8 +26,8 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { const [username, setUsername] = useState(""); const [server, setServer] = useState(""); const [password, setPassword] = useState(""); - const [proxyIP, setProxyIP] = useState(0); - const [proxyPort, setProxyPort] = useState(""); + const [proxyIP, setProxyIP] = useState(""); + const [proxyPort, setProxyPort] = useState(0); const [proxyUsername, setProxyUsername] = useState(""); const [proxyPassword, setProxyPassword] = useState(""); From 8117c597495aeb255fcb4921e77ef60103597709 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 4 Dec 2021 10:47:41 +0700 Subject: [PATCH 16/69] add publish profiles --- .gitignore | 3 ++- .../Properties/PublishProfiles/Linux.pubxml | 21 ++++++++++++++++++ .../Properties/PublishProfiles/Mac.pubxml | 21 ++++++++++++++++++ .../Properties/PublishProfiles/Windows.pubxml | 22 +++++++++++++++++++ TbsReact/TbsReact.csproj | 1 - 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 TbsReact/Properties/PublishProfiles/Linux.pubxml create mode 100644 TbsReact/Properties/PublishProfiles/Mac.pubxml create mode 100644 TbsReact/Properties/PublishProfiles/Windows.pubxml diff --git a/.gitignore b/.gitignore index ea3bbe348..f69cc275e 100644 --- a/.gitignore +++ b/.gitignore @@ -181,7 +181,8 @@ publish/ *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted -*.pubxml +#*.pubxml +*.pubxml.user *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to diff --git a/TbsReact/Properties/PublishProfiles/Linux.pubxml b/TbsReact/Properties/PublishProfiles/Linux.pubxml new file mode 100644 index 000000000..8b675cd3a --- /dev/null +++ b/TbsReact/Properties/PublishProfiles/Linux.pubxml @@ -0,0 +1,21 @@ + + + + + True + False + True + Release + Any CPU + FileSystem + bin\Publish\Linux + FileSystem + + net5.0 + linux-x64 + 8a9d5fc4-e3fb-47fa-8253-6a68b604111d + true + + \ No newline at end of file diff --git a/TbsReact/Properties/PublishProfiles/Mac.pubxml b/TbsReact/Properties/PublishProfiles/Mac.pubxml new file mode 100644 index 000000000..3beab410b --- /dev/null +++ b/TbsReact/Properties/PublishProfiles/Mac.pubxml @@ -0,0 +1,21 @@ + + + + + True + False + True + Release + Any CPU + FileSystem + bin\Publish\Mac + FileSystem + + net5.0 + osx-x64 + 8a9d5fc4-e3fb-47fa-8253-6a68b604111d + true + + \ No newline at end of file diff --git a/TbsReact/Properties/PublishProfiles/Windows.pubxml b/TbsReact/Properties/PublishProfiles/Windows.pubxml new file mode 100644 index 000000000..c60442eb9 --- /dev/null +++ b/TbsReact/Properties/PublishProfiles/Windows.pubxml @@ -0,0 +1,22 @@ + + + + + True + False + True + Release + x64 + FileSystem + bin\Publish\Windows + FileSystem + + net5.0 + win-x64 + False + 8a9d5fc4-e3fb-47fa-8253-6a68b604111d + true + + \ No newline at end of file diff --git a/TbsReact/TbsReact.csproj b/TbsReact/TbsReact.csproj index a05ce70a0..079865206 100644 --- a/TbsReact/TbsReact.csproj +++ b/TbsReact/TbsReact.csproj @@ -9,7 +9,6 @@ $(DefaultItemExcludes);$(SpaRoot)node_modules\** true Exe - true true 2f4cf8f4-975c-481e-9f90-193010f82aca From 7b1ce96d3bb1eeed707f041e3e1c873bb44ed6d9 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 4 Dec 2021 09:53:26 +0700 Subject: [PATCH 17/69] update readme --- README.md | 161 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 135 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 2050b716b..9b6428750 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,145 @@ # TravianBotSharp (TBS) -
+[![TBS Discord](https://discordapp.com/api/guilds/740829801446637601/widget.png?style=banner2)](https://discord.gg/mBa4f2K) + +## About -### About I have worked on this bot for over 2 years, ~15k LoC. It has been since completely ported to the newest version of Travian T4.5. Bot is under active development (at least until summer 2021). Instructions are on the Discord channel. If you have any question/recommendation, feel free to contact me (on Discord). +--- + +## Getting started + +### Windows + +#### Prerequisites + +- Google Chrome + +#### Installation + +1. Download ZIP file from [here](holder) +2. Extract it to any empty folder +3. Run TbsReact file +4. Open your browser at [localhost:5001](localhost:5001) + +### Linux OS + +#### Prerequisites + +- Google Chrome +- OpenSSH (for https certificate) +- Xvfb (for running Chrome on GUI-less server) + +#### Installation + +1. Download .tar.gz + + ```sh + wget https://will.update.later/tbs-linux.tar.gz + ``` + +2. Extract it + + ```sh + hm what is command for extracting file on linux ? + ``` + +3. Go to inside folder + + ``` sh + cd tbs + ``` + +4. Create https certificate for your browser + + ``` sh + openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <( \ + printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") + ``` + + This will create 2 file in your folder - localhost.key & localhost.crt + +5. Install certificate to your browser + + - For linux: + + ``` sh + sudo mkdir /usr/local/share/ca-certificates/extra + sudo cp localhost.crt /usr/local/share/ca-certificates/extra/localhost.crt + sudo update-ca-certificates + ``` + + If fail, make sure the permissions are OK (755 for the folder, 644 for the file) + + - For windows: + 1. Copy localhost.crt to your windows machine + 2. Run localhost.crt file + 3. Click on "Install certificate..." + 4. Choose "Current user" and Next + 5. Choose "Automatically select the certificate store based on the type of certificate" and Next > Finish + It should show "The import was successful." + +6. Run bot + + - For normal Linux machine: + + Hm not sure :) + + - For GUI-less Linux machine: + + ``` sh + xvfb-run TbsReact + ``` + +### Mac OS + +We couldn't test on this OS yet + +#### Prerequisites + +#### Installation + +--- + ## Features -#### - Auto-Change proxy + +### - Auto-Change proxy + TBS can change proxy by itself. This means you are far less likely to be banned for using a bot. Main reason for a bot ban is high activity from same IP (12h+). TBS supports proxy authentication. -#### - Auto-Settle new villages + +### - Auto-Settle new villages + TBS can find appropriate valleys to settle around your capital village. Or you can input coordinates in advance and it will automatically settle one valley after another. -#### - Auto-Fill troops and send resources to/from capital + +### - Auto-Fill troops and send resources to/from capital + TBS will automatically send resources from capital village to off/deff villages, train troops there and send the remaining resources back. This is a perfect feature for any deff account. -#### - Attack/Fake at specific time with multiple waves and oasis farming for T4.6 + +### - Attack/Fake at specific time with multiple waves and oasis farming for T4.6 + Dream-come-true for any offensive player. -![alt text](./pics/attack.png) -#### - Building -![alt text](./pics/build.png) -#### - Farming -![alt text](./pics/FL.png) -#### - Send hero to adventures -![alt text](./pics/hero.png) -#### - Multiple accounts, proxy options -![alt text](./pics/accounts.png) -#### - Auto NPC when crop is above 99% -#### - Send resources to new villages -![alt text](./pics/market.png) -#### - Alert on attack -![alt text](./pics/alertOnAttack.png) -#### - Auto-Claim beginner and daily quests - - - -#### Tech specification -It's a Windows Forms app written in C#. It only works on Windows. My plan is to make a web app for the frontend and I have already ported the TBS Core to the .Net Standard, so it could be used by .Net core project (cross-platform option). + +### - Building list + +### - Auto farming + +### - Send hero to adventures + +### - Multiple accounts, proxy options + +### - Auto NPC when crop is above 99% + +### - Send resources to new villages + +### - Alert on attack + +### - Auto-Claim beginner and daily quests + +--- + +## Tech specification + +~~It's a Windows Forms app written in C#. It only works on Windows. My plan is to make a web app for the frontend and I have already ported the TBS Core to the .Net Standard, so it could be used by .Net core project (cross-platform option).~~ + +It is now a Web app which backend written in C# and front end is made from React From b8affcf01e19f5be625105be9fbfe261b1b297bc Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 4 Dec 2021 15:34:18 +0700 Subject: [PATCH 18/69] fix missing check on update login status --- .../src/components/sidebar/SideBar.js | 8 +++++--- TbsReact/Properties/launchSettings.json | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/TbsReact/ClientApp/src/components/sidebar/SideBar.js b/TbsReact/ClientApp/src/components/sidebar/SideBar.js index 0d05d9352..d1ef1369c 100644 --- a/TbsReact/ClientApp/src/components/sidebar/SideBar.js +++ b/TbsReact/ClientApp/src/components/sidebar/SideBar.js @@ -14,10 +14,12 @@ const SideBar = ({ selected, setSelected }) => { const [status, setStatus] = useState(false); useEffect( ( ) => { - const updateStatus = async () => { - setStatus(await getStatus(selected)) + if ( selected !== -1) { + const updateStatus = async () => { + setStatus(await getStatus(selected)) + } + updateStatus(); } - updateStatus(); }, [selected]) const handleDrawerOpen = () => { setOpen(true); diff --git a/TbsReact/Properties/launchSettings.json b/TbsReact/Properties/launchSettings.json index 3dbe16625..d7a7ed2f2 100644 --- a/TbsReact/Properties/launchSettings.json +++ b/TbsReact/Properties/launchSettings.json @@ -1,4 +1,4 @@ -{ +{ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, @@ -18,10 +18,20 @@ "TbsReact": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "https://localhost:5001;http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "applicationUrl": "https://localhost:5001;http://localhost:5000" + }, + "WSL": { + "commandName": "WSL2", + "launchBrowser": true, + "launchUrl": "https://localhost:5001", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000" + }, + "distributionName": "" } } -} +} \ No newline at end of file From f86947e75a92cace2920891ce17e007c6e1bfb94 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 4 Dec 2021 17:43:07 +0700 Subject: [PATCH 19/69] fix html error on Account modal --- .../components/sidebar/Modal/AccountModal.js | 76 ++++++++++++------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index 995d22790..213faec46 100644 --- a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { Modal, Button, Box, Typography, Input, Table, TableHead, TableCell, Grid } from '@mui/material'; +import { Modal, Button, Box, Typography, Input, Table, TableHead, TableRow, TableCell, TableBody, Grid } from '@mui/material'; import { getAccount, addAccount } from '../../../api/Accounts/Account'; import { getAccesses } from '../../../api/Accounts/Access'; @@ -14,7 +14,7 @@ const style = { border: '2px solid #000', boxShadow: 24, p: 4, - width:"80%" + width: "80%" }; const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { @@ -66,7 +66,6 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { } } const handleClose = () => { - console.log("Setaccid", setAccID) setAccID(-1) setOpen(false); } @@ -88,7 +87,6 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { const onClickAddAccount = async () => { const data = { account: { name: username, serverUrl: server }, accesses: accesses }; await addAccount(data) - console.log(data); handleClose(); } @@ -104,7 +102,7 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { {editMode === false ? "Add account" : "Edit account"} -
+
Username @@ -149,33 +147,55 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { setProxyPassword(e.target.value)} /> - - - - -
- - - - - -
+ + + + + + + + + + + + + + +
- Proxy - Proxy username - Is working + + Proxy + Proxy username + Is working + - + + + +
+ + + + + + + + + + +
- - - -
- - - -
From 2e7f5ccd07ccc4cb0e17b08ffe269596c136ff01 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 4 Dec 2021 20:52:39 +0700 Subject: [PATCH 20/69] update api add account --- TbsReact/ClientApp/src/api/Accounts/Account.js | 5 +++-- .../src/components/sidebar/Modal/AccountModal.js | 3 ++- TbsReact/Controllers/Account/AccountController.cs | 12 ++++++------ TbsReact/Singleton/Datas/AccountData.cs | 12 ++++++++++-- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/TbsReact/ClientApp/src/api/Accounts/Account.js b/TbsReact/ClientApp/src/api/Accounts/Account.js index b5ce2aa26..b08138ff8 100644 --- a/TbsReact/ClientApp/src/api/Accounts/Account.js +++ b/TbsReact/ClientApp/src/api/Accounts/Account.js @@ -19,9 +19,10 @@ const getAccount = async (index) => { console.log(e); } } -const addAccount = async (data) => { +const addAccount = async (acc) => { try { - await axios.post('/accounts', data); + const {data} = await axios.post('/accounts', acc); + return data; } catch (e) { console.log(e); } diff --git a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index 213faec46..ba72ba1e2 100644 --- a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -86,7 +86,8 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { const onClickAddAccount = async () => { const data = { account: { name: username, serverUrl: server }, accesses: accesses }; - await addAccount(data) + const result = await addAccount(data); + setAccID(result.id) handleClose(); } diff --git a/TbsReact/Controllers/Account/AccountController.cs b/TbsReact/Controllers/Account/AccountController.cs index bf212968a..117e1e983 100644 --- a/TbsReact/Controllers/Account/AccountController.cs +++ b/TbsReact/Controllers/Account/AccountController.cs @@ -13,7 +13,7 @@ namespace TbsReact.Controllers public class AccountController : ControllerBase { [HttpGet] - public ActionResult> GetAccounts() + public ActionResult GetAccounts() { var AccountInfoList = new List(); for (int i = 0; i < AccountData.Accounts.Count; i++) @@ -21,18 +21,18 @@ public ActionResult> GetAccounts() AccountInfoList.Add(AccountData.Accounts[i]); } - return AccountInfoList; + return Ok(AccountInfoList); } [HttpGet("{index:int}")] - public ActionResult GetAccount(int index) + public ActionResult GetAccount(int index) { var acc = AccountData.GetAccount(index); if (acc == null) { return NotFound(); } - return acc; + return Ok(acc); } [HttpPost] @@ -48,9 +48,9 @@ public ActionResult AddAccount([FromBody] NewAccount data) var acc = account.GetAccount(accesses); DbRepository.SaveAccount(acc); AccountManager.Accounts.Add(acc); - AccountData.AddAccount(account); + var result = AccountData.AddAccount(account); - return Ok(); + return CreatedAtAction(nameof(GetAccount), new { id = result.Id }, result); } [HttpPatch("{index:int}")] diff --git a/TbsReact/Singleton/Datas/AccountData.cs b/TbsReact/Singleton/Datas/AccountData.cs index 10bd39285..f4169d753 100644 --- a/TbsReact/Singleton/Datas/AccountData.cs +++ b/TbsReact/Singleton/Datas/AccountData.cs @@ -29,10 +29,18 @@ public static Account GetAccount(int index) return Accounts.FirstOrDefault(x => x.Id == index); } - public static void AddAccount(Account account) + public static Account AddAccount(Account account) { - account.Id = Accounts.Last().Id + 1; + if (Accounts.Count > 0) + { + account.Id = Accounts.Last().Id + 1; + } + else + { + account.Id = 0; + } Accounts.Add(account); + return Accounts.Last(); } public static bool EditAccount(int index, Account account) From 499f9dafccefa432b682ca1ff448a95f2dbed273 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 5 Dec 2021 11:52:37 +0700 Subject: [PATCH 21/69] add Info view --- TbsReact/ClientApp/src/components/Layout.js | 2 + TbsReact/ClientApp/src/components/NavMenu.js | 28 ++++++---- .../ClientApp/src/components/Views/Info.js | 54 +++++++++++++++++++ 3 files changed, 74 insertions(+), 10 deletions(-) create mode 100644 TbsReact/ClientApp/src/components/Views/Info.js diff --git a/TbsReact/ClientApp/src/components/Layout.js b/TbsReact/ClientApp/src/components/Layout.js index 4ced296ad..a887201d4 100644 --- a/TbsReact/ClientApp/src/components/Layout.js +++ b/TbsReact/ClientApp/src/components/Layout.js @@ -1,10 +1,12 @@ import React from 'react'; import NavMenu from './NavMenu'; +import Info from './Views/Info'; const Layout = ({ selected, setSelected }) => { return ( <> + ); diff --git a/TbsReact/ClientApp/src/components/NavMenu.js b/TbsReact/ClientApp/src/components/NavMenu.js index 616612bca..59bd31b8f 100644 --- a/TbsReact/ClientApp/src/components/NavMenu.js +++ b/TbsReact/ClientApp/src/components/NavMenu.js @@ -1,20 +1,28 @@ import React from 'react'; -import { Container, Navbar, NavbarBrand} from 'reactstrap'; -import { Link } from 'react-router-dom'; +import { AppBar, Container, Toolbar, Typography } from '@mui/material' import './NavMenu.css'; import SideBar from './sidebar/SideBar'; -const NavMenu = ({ selected, setSelected }) => { +const NavMenu = ({ selected, setSelected }) => { return ( -
- - - - TBSReact + <> + + + + + + TbsReact + + - -
+ + ); } diff --git a/TbsReact/ClientApp/src/components/Views/Info.js b/TbsReact/ClientApp/src/components/Views/Info.js new file mode 100644 index 000000000..45f61a0a0 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/Info.js @@ -0,0 +1,54 @@ +import { Grid, Box, Typography } from '@mui/material' +const style = { + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + bgcolor: 'background.paper', + border: '2px solid #000', + boxShadow: 24, + p: 4, + width: "80%", + height: "80%" +}; + +const Info = () => { + return ( + <> + + + + + TravianBotSharp + + + + Join our Discord Server
+ TravianBotSharp Discord server +
+ + If you would like to make a donation, here it is
+ Buy Me a Coffee at ko-fi.com +
+
+
+ + ) +} + +export default Info; \ No newline at end of file From ca32ec0124017d7ef3f8c97421e894782ea225a1 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 5 Dec 2021 12:02:08 +0700 Subject: [PATCH 22/69] add VIetnamese donate link --- TbsReact/ClientApp/src/components/Views/Info.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TbsReact/ClientApp/src/components/Views/Info.js b/TbsReact/ClientApp/src/components/Views/Info.js index 45f61a0a0..4c9269168 100644 --- a/TbsReact/ClientApp/src/components/Views/Info.js +++ b/TbsReact/ClientApp/src/components/Views/Info.js @@ -24,8 +24,6 @@ const Info = () => { spacing={2} container direction="column" - alignItems="center" - justifyContent="center" > { TravianBotSharp - + Join our Discord Server
TravianBotSharp Discord server
@@ -45,6 +43,10 @@ const Info = () => { If you would like to make a donation, here it is
Buy Me a Coffee at ko-fi.com
+ + In case you are Vietnamese, đây là link cho Momo ._.
+ Buy Me a Coffee at ko-fi.com +
From 32eab10b91ac587cc05867b25c619db8c9f24477 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 9 Dec 2021 09:53:15 +0700 Subject: [PATCH 23/69] add logger controller and other things --- TbsCore/packages.lock.json | 645 ------------ .../Controllers/Account/DriverController.cs | 2 +- TbsReact/Controllers/DebugController.cs | 25 + .../{ => Account}/AccessExtension.cs | 0 .../{ => Account}/AccountExtension.cs | 0 TbsReact/Hub/GroupHub.cs | 23 + TbsReact/Models/{ => Account}/Access.cs | 0 TbsReact/Models/{ => Account}/Account.cs | 0 TbsReact/Models/{ => Account}/NewAccount.cs | 0 TbsReact/Models/{ => Account}/Proxy.cs | 0 TbsReact/Program.cs | 16 +- TbsReact/Singleton/AccountManager.cs | 39 +- TbsReact/Singleton/LogManager.cs | 54 + TbsReact/Startup.cs | 9 + TbsReact/TbsReact.csproj | 1 + TbsReact/packages.lock.json | 951 ++++++------------ 16 files changed, 445 insertions(+), 1320 deletions(-) create mode 100644 TbsReact/Controllers/DebugController.cs rename TbsReact/Extension/{ => Account}/AccessExtension.cs (100%) rename TbsReact/Extension/{ => Account}/AccountExtension.cs (100%) create mode 100644 TbsReact/Hub/GroupHub.cs rename TbsReact/Models/{ => Account}/Access.cs (100%) rename TbsReact/Models/{ => Account}/Account.cs (100%) rename TbsReact/Models/{ => Account}/NewAccount.cs (100%) rename TbsReact/Models/{ => Account}/Proxy.cs (100%) create mode 100644 TbsReact/Singleton/LogManager.cs diff --git a/TbsCore/packages.lock.json b/TbsCore/packages.lock.json index 416172005..1a09bfdf8 100644 --- a/TbsCore/packages.lock.json +++ b/TbsCore/packages.lock.json @@ -1071,651 +1071,6 @@ "System.Xml.XmlDocument": "4.3.0" } } - }, - ".NETStandard,Version=v2.0/win-x64": { - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.win.Microsoft.Win32.Primitives": "4.3.0" - } - }, - "runtime.any.System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "23g6rqftKmovn2cLeGsuHUYm0FD7pdutb0uQMJpZ3qTvq+zHkgmt6J65VtRry4WDGYlmkMa4xDACtaQ94alNag==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "runtime.any.System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1lpifymjGDzoYIaam6/Hyqf8GhBI3xXYLK2TgEvTtuZMorG3Kb9QnMTIKhLjJYXIiu1JvxjngHvtVFQQlpQ3HQ==" - }, - "runtime.any.System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sMDBnad4rp4t7GY442Jux0MCUuKL4otn5BK6Ni0ARTXTSpRNBzZ7hpMfKSvnVSED5kYJm96YOWsqV0JH0d2uuw==" - }, - "runtime.any.System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "M1r+760j1CNA6M/ZaW6KX8gOS8nxPRqloqDcJYVidRG566Ykwcs29AweZs2JF+nMOCgWDiMfPSTMfvwOI9F77w==" - }, - "runtime.any.System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "SDZ5AD1DtyRoxYtEcqQ3HDlcrorMYXZeCt7ZhG9US9I5Vva+gpIWDGMkcwa5XiKL0ceQKRZIX2x0XEjLX7PDzQ==" - }, - "runtime.any.System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "hLC3A3rI8jipR5d9k7+f0MgRCW6texsAp0MWkN/ci18FMtQ9KH7E2vDn/DH2LkxsszlpJpOn9qy6Z6/69rH6eQ==" - }, - "runtime.any.System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Nrm1p3armp6TTf2xuvaa+jGTTmncALWFq22CpmwRvhDf6dE9ZmH40EbOswD4GnFLrMRS0Ki6Kx5aUPmKK/hZBg==" - }, - "runtime.any.System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Lxb89SMvf8w9p9+keBLyL6H6x/TEmc6QVsIIA0T36IuyOY3kNvIdyGddA2qt35cRamzxF8K5p0Opq4G4HjNbhQ==" - }, - "runtime.any.System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fRS7zJgaG9NkifaAxGGclDDoRn9HC7hXACl52Or06a/fxdzDajWb5wov3c6a+gVSlekRoexfjwQSK9sh5um5LQ==", - "dependencies": { - "System.Private.Uri": "4.3.0" - } - }, - "runtime.any.System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GG84X6vufoEzqx8PbeBKheE4srOhimv+yLtGb/JkR3Y2FmoqmueLNFU4Xx8Y67plFpltQSdK74x0qlEhIpv/CQ==" - }, - "runtime.any.System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "lBoFeQfxe/4eqjPi46E0LU/YaCMdNkQ8B4MZu/mkzdIAZh8RQ1NYZSj0egrQKdgdvlPFtP4STtob40r4o2DBAw==" - }, - "runtime.any.System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+ihI5VaXFCMVPJNstG4O4eo1CfbrByLxRrQQTqOTp1ttK0kUKDqOdBSTaCB2IBk/QtjDrs6+x4xuezyMXdm0HQ==" - }, - "runtime.any.System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NLrxmLsfRrOuVqPWG+2lrQZnE53MLVeo+w9c54EV+TUo4c8rILpsDXfY8pPiOy9kHpUHHP07ugKmtsU3vVW5Jg==" - }, - "runtime.any.System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OhBAVBQG5kFj1S+hCEQ3TUHBAEtZ3fbEMgZMRNdN8A0Pj4x+5nTELEqL59DU0TjKVE6II3dqKw4Dklb3szT65w==" - }, - "runtime.any.System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "w4ehZJ+AwXYmGwYu+rMvym6RvMaRiUEQR1u6dwcyuKHxz8Heu/mO9AG1MquEgTyucnhv3M43X0iKpDOoN17C0w==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "runtime.win.Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NU51SEt/ZaD2MF48sJ17BIqx7rjeNNLXUevfMOjqQIetdndXwYjZfZsT6jD+rSWp/FYxjesdK4xUSl4OTEI0jw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "runtime.win.System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "hHHP0WCStene2jjeYcuDkETozUYF/3sHVRHAEOgS3L15hlip24ssqCTnJC28Z03Wpo078oMcJd0H4egD2aJI8g==" - }, - "runtime.win.System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z37zcSCpXuGCYtFbqYO0TwOVXxS2d+BXgSoDFZmRg8BC4Cuy54edjyIvhhcfCrDQA9nl+EPFTgHN54dRAK7mNA==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Overlapped": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "runtime.win.System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "lkXXykakvXUU+Zq2j0pC6EO20lEhijjqMc01XXpp1CJN+DeCwl3nsj4t5Xbpz3kA7yQyTqw6d9SyIzsyLsV3zA==", - "dependencies": { - "Microsoft.Win32.Primitives": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "runtime.win.System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RkgHVhUPvzZxuUubiZe8yr/6CypRVXj0VBzaR8hsqQ8f+rUo7e4PWrHTLOCjd8fBMGWCrY//fi7Ku3qXD7oHRw==", - "dependencies": { - "System.Private.Uri": "4.3.0" - } - }, - "SQLitePCLRaw.lib.e_sqlite3": { - "type": "Transitive", - "resolved": "2.0.2", - "contentHash": "S+Tsqe/M7wsc+9HeediI6UHtBKf2X586aRwhi1aBVLGe0WxkAo52O9ZxwEy/v8XMLefcrEMupd2e9CDlIT6QCw==" - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Collections": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.win.System.Diagnostics.Debug": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Diagnostics.Tracing": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Globalization": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Globalization.Calendars": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.any.System.IO": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.win.System.IO.FileSystem": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.2", - "contentHash": "y7hv0o0weI0j0mvEcBOdt1F3CAADiWlcw3e54m8TfYiRmBPDIsHElx8QUPDlY4x6yWXKPGN0Z2TuXCTPgkm5WQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "runtime.win.System.Net.Primitives": "4.3.0" - } - }, - "System.Private.Uri": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I4SwANiUGho1esj4V4oSlPllXjzCZDE+5XXso2P03LW2vOda2Enzh8DWOxwN6hnrJyp314c7KuVu31QYhRzOGg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Reflection": "4.3.0" - } - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Reflection.Primitives": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Resources.ResourceManager": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "runtime.any.System.Runtime": "4.3.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.win.System.Runtime.Extensions": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "runtime.any.System.Runtime.InteropServices": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.any.System.Text.Encoding.Extensions": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Overlapped": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m3HQ2dPiX/DSTpf+yJt8B0c+SRvzfqAJKx+QDWi+VLhz8svLT23MVjEOHPF/KiSLeArKU/iHescrbLd3yVgyNg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.0.1", - "contentHash": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0", - "runtime.any.System.Threading.Timer": "4.3.0" - } - } } } } \ No newline at end of file diff --git a/TbsReact/Controllers/Account/DriverController.cs b/TbsReact/Controllers/Account/DriverController.cs index 78b418b4d..284c506c7 100644 --- a/TbsReact/Controllers/Account/DriverController.cs +++ b/TbsReact/Controllers/Account/DriverController.cs @@ -25,7 +25,7 @@ public async Task Login(int index) if (acc.Access.AllAccess.Count > 0) { await IoHelperCore.LoginAccount(acc); - + AccountManager.SendMessage(account.Name, "message", $"Account {account.Name} logged in"); return Ok(); } diff --git a/TbsReact/Controllers/DebugController.cs b/TbsReact/Controllers/DebugController.cs new file mode 100644 index 000000000..2e4e52f67 --- /dev/null +++ b/TbsReact/Controllers/DebugController.cs @@ -0,0 +1,25 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; +using TbsReact.Singleton; +using TbsReact.Extension; +using System.Collections.Generic; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("accounts/{indexAcc:int}/")] + public class DebugController : ControllerBase + { + [HttpGet] + [Route("/log")] + public ActionResult GetLog(int indexAcc) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + return Ok(LogManager.GetLogData(account.Name)); + } + } +} \ No newline at end of file diff --git a/TbsReact/Extension/AccessExtension.cs b/TbsReact/Extension/Account/AccessExtension.cs similarity index 100% rename from TbsReact/Extension/AccessExtension.cs rename to TbsReact/Extension/Account/AccessExtension.cs diff --git a/TbsReact/Extension/AccountExtension.cs b/TbsReact/Extension/Account/AccountExtension.cs similarity index 100% rename from TbsReact/Extension/AccountExtension.cs rename to TbsReact/Extension/Account/AccountExtension.cs diff --git a/TbsReact/Hub/GroupHub.cs b/TbsReact/Hub/GroupHub.cs new file mode 100644 index 000000000..3412ca838 --- /dev/null +++ b/TbsReact/Hub/GroupHub.cs @@ -0,0 +1,23 @@ +using Microsoft.AspNetCore.SignalR; +using System.Threading.Tasks; +using TbsReact.Singleton; + +namespace TbsReact.Hubs +{ + public class GroupHub : Hub + { + public async Task AddGroup(string groupkey) + { + await Groups.AddToGroupAsync(Context.ConnectionId, groupkey); + await Clients.Caller.SendAsync("Message", $"{Context.ConnectionId} is now on account {groupkey}"); + AccountManager.ClientConnect(groupkey); + } + + public async Task RemoveGroup(string groupkey) + { + await Groups.RemoveFromGroupAsync(Context.ConnectionId, groupkey); + await Clients.Caller.SendAsync("Message", $"{Context.ConnectionId} didn't watch account {groupkey} anymore"); + AccountManager.ClientDisconnect(groupkey); + } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Access.cs b/TbsReact/Models/Account/Access.cs similarity index 100% rename from TbsReact/Models/Access.cs rename to TbsReact/Models/Account/Access.cs diff --git a/TbsReact/Models/Account.cs b/TbsReact/Models/Account/Account.cs similarity index 100% rename from TbsReact/Models/Account.cs rename to TbsReact/Models/Account/Account.cs diff --git a/TbsReact/Models/NewAccount.cs b/TbsReact/Models/Account/NewAccount.cs similarity index 100% rename from TbsReact/Models/NewAccount.cs rename to TbsReact/Models/Account/NewAccount.cs diff --git a/TbsReact/Models/Proxy.cs b/TbsReact/Models/Account/Proxy.cs similarity index 100% rename from TbsReact/Models/Proxy.cs rename to TbsReact/Models/Account/Proxy.cs diff --git a/TbsReact/Program.cs b/TbsReact/Program.cs index de50cee70..2b509f3f6 100644 --- a/TbsReact/Program.cs +++ b/TbsReact/Program.cs @@ -1,11 +1,8 @@ using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; +using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using TbsReact.Hubs; +using TbsReact.Singleton; namespace TbsReact { @@ -13,7 +10,10 @@ public class Program { public static void Main(string[] args) { - CreateHostBuilder(args).Build().Run(); + var host = CreateHostBuilder(args).Build(); + var hubContext = host.Services.GetService(typeof(IHubContext)) as IHubContext; + AccountManager.SetHub(hubContext); + host.Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => @@ -23,4 +23,4 @@ public static IHostBuilder CreateHostBuilder(string[] args) => webBuilder.UseStartup(); }); } -} +} \ No newline at end of file diff --git a/TbsReact/Singleton/AccountManager.cs b/TbsReact/Singleton/AccountManager.cs index aca3dfcaa..7f0497e90 100644 --- a/TbsReact/Singleton/AccountManager.cs +++ b/TbsReact/Singleton/AccountManager.cs @@ -1,9 +1,11 @@ -using System.Collections.Generic; +using Microsoft.AspNetCore.SignalR; +using System.Collections.Concurrent; +using System.Collections.Generic; using System.IO; using System.Linq; using TbsCore.Database; using TbsCore.Helpers; - +using TbsReact.Hubs; using TbsReact.Models; namespace TbsReact.Singleton @@ -12,6 +14,9 @@ public sealed class AccountManager { private static readonly AccountManager instance = new(); + private ConcurrentDictionary group = new(); + + private IHubContext _groupContext; private List accounts = new(); public static List Accounts @@ -47,5 +52,35 @@ public void SaveAccounts() { IoHelperCore.SaveAccounts(accounts, true); } + + #region Hub SignalR + + public static void SetHub(IHubContext groupContext) + { + instance._groupContext = groupContext; + } + + public static void ClientConnect(string key) + { + instance.group.AddOrUpdate(key, 1, (key, value) => value++); + } + + public static void ClientDisconnect(string key) + { + instance.group.AddOrUpdate(key, 0, (key, value) => value--); + } + + public static bool CheckGroup(string key) + { + instance.group.TryGetValue(key, out int value); + return (value > 0); + } + + public static async void SendMessage(string groupkey, string type, string message) + { + await Instance._groupContext.Clients.Group(groupkey).SendAsync(type, message); + } + + #endregion Hub SignalR } } \ No newline at end of file diff --git a/TbsReact/Singleton/LogManager.cs b/TbsReact/Singleton/LogManager.cs new file mode 100644 index 000000000..c3233f176 --- /dev/null +++ b/TbsReact/Singleton/LogManager.cs @@ -0,0 +1,54 @@ +using TbsCore.Models.Logging; + +namespace TbsReact.Singleton +{ + public class LogManager + { + private static readonly LogManager instance = new(); + private LogOutput Log; + + private LogManager() + { + } + + public static LogManager Instance + { + get + { + return instance; + } + } + + private void _setLogOutput(LogOutput logOutput) + { + instance.Log = logOutput; + instance.Log.LogUpdated += LogUpdate; + } + + public static void SetLogOutput(LogOutput logOutput) + { + instance._setLogOutput(logOutput); + } + + private string _getLogData(string username) + { + return Log.GetLog(username); + } + + public static string GetLogData(string username) + { + return instance._getLogData(username); + } + + private void LogUpdate(object sender, UpdateLogEventArgs e) + { + UpdateLogData(e.Username); + } + + public void UpdateLogData(string username) + { + if (!AccountManager.CheckGroup(username)) return; + AccountManager.SendMessage(username, "logger", Log.GetLastLog(username)); + } + } +} \ No newline at end of file diff --git a/TbsReact/Startup.cs b/TbsReact/Startup.cs index 3e420a977..277fe4751 100644 --- a/TbsReact/Startup.cs +++ b/TbsReact/Startup.cs @@ -5,6 +5,7 @@ using Microsoft.Extensions.Hosting; using System; using TbsReact.Singleton; +using TbsReact.Hubs; namespace TbsReact { @@ -22,6 +23,12 @@ public void ConfigureServices(IServiceCollection services) { services.AddSingleton(AccountManager.Instance); services.AddSingleton(AccountData.Instance); + services.AddSingleton(LogManager.Instance); + services.AddSignalR(); + + TbsCore.Models.Logging.SerilogSingleton.Init(); + LogManager.SetLogOutput(TbsCore.Models.Logging.SerilogSingleton.LogOutput); + services.AddControllersWithViews(); // In production, the React files will be served from this directory @@ -56,6 +63,8 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApp endpoints.MapControllerRoute( name: "default", pattern: "{controller}/{action=Index}/{id?}"); + + endpoints.MapHub("/live"); }); app.UseSpa(spa => diff --git a/TbsReact/TbsReact.csproj b/TbsReact/TbsReact.csproj index 079865206..70d0e00d1 100644 --- a/TbsReact/TbsReact.csproj +++ b/TbsReact/TbsReact.csproj @@ -14,6 +14,7 @@ + diff --git a/TbsReact/packages.lock.json b/TbsReact/packages.lock.json index afac22dd8..a8dd66a4c 100644 --- a/TbsReact/packages.lock.json +++ b/TbsReact/packages.lock.json @@ -2,6 +2,16 @@ "version": 1, "dependencies": { ".NETCoreApp,Version=v5.0": { + "Microsoft.AspNetCore.SignalR": { + "type": "Direct", + "requested": "[1.1.0, )", + "resolved": "1.1.0", + "contentHash": "V5X5XkeAHaFyyBOGPrddVeqTNo6zRPJNS5PRhlzEyBXiNG9AtqUbMyWFdZahQyMiIWJau550z59A4kdC9g5I9A==", + "dependencies": { + "Microsoft.AspNetCore.Http.Connections": "1.1.0", + "Microsoft.AspNetCore.SignalR.Core": "1.1.0" + } + }, "Microsoft.AspNetCore.SpaServices.Extensions": { "type": "Direct", "requested": "[5.0.12, )", @@ -55,6 +65,201 @@ "System.Xml.XmlDocument": "4.3.0" } }, + "Microsoft.AspNetCore.Authentication.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "VloMLDJMf3n/9ic5lCBOa42IBYJgyB1JhzLsL68Zqg+2bEPWfGBj/xCJy/LrKTArN0coOcZp3wyVTZlx0y9pHQ==", + "dependencies": { + "Microsoft.AspNetCore.Http.Abstractions": "2.2.0", + "Microsoft.Extensions.Logging.Abstractions": "2.2.0", + "Microsoft.Extensions.Options": "2.2.0" + } + }, + "Microsoft.AspNetCore.Authorization": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "/L0W8H3jMYWyaeA9gBJqS/tSWBegP9aaTM0mjRhxTttBY9z4RVDRYJ2CwPAmAXIuPr3r1sOw+CS8jFVRGHRezQ==", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "2.2.0", + "Microsoft.Extensions.Options": "2.2.0" + } + }, + "Microsoft.AspNetCore.Authorization.Policy": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "aJCo6niDRKuNg2uS2WMEmhJTooQUGARhV2ENQ2tO5443zVHUo19MSgrgGo9FIrfD+4yKPF8Q+FF33WkWfPbyKw==", + "dependencies": { + "Microsoft.AspNetCore.Authentication.Abstractions": "2.2.0", + "Microsoft.AspNetCore.Authorization": "2.2.0" + } + }, + "Microsoft.AspNetCore.Connections.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "Aqr/16Cu5XmGv7mLKJvXRxhhd05UJ7cTTSaUV4MZ3ynAzfgWjsAdpIU8FWuxwAjmVdmI8oOWuVDrbs+sRkhKnA==", + "dependencies": { + "Microsoft.AspNetCore.Http.Features": "2.2.0", + "System.IO.Pipelines": "4.5.2" + } + }, + "Microsoft.AspNetCore.Hosting.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "ubycklv+ZY7Kutdwuy1W4upWcZ6VFR8WUXU7l7B2+mvbDBBPAcfpi+E+Y5GFe+Q157YfA3C49D2GCjAZc7Mobw==", + "dependencies": { + "Microsoft.AspNetCore.Hosting.Server.Abstractions": "2.2.0", + "Microsoft.AspNetCore.Http.Abstractions": "2.2.0", + "Microsoft.Extensions.Hosting.Abstractions": "2.2.0" + } + }, + "Microsoft.AspNetCore.Hosting.Server.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "1PMijw8RMtuQF60SsD/JlKtVfvh4NORAhF4wjysdABhlhTrYmtgssqyncR0Stq5vqtjplZcj6kbT4LRTglt9IQ==", + "dependencies": { + "Microsoft.AspNetCore.Http.Features": "2.2.0", + "Microsoft.Extensions.Configuration.Abstractions": "2.2.0" + } + }, + "Microsoft.AspNetCore.Http": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "YogBSMotWPAS/X5967pZ+yyWPQkThxhmzAwyCHCSSldzYBkW5W5d6oPfBaPqQOnSHYTpSOSOkpZoAce0vwb6+A==", + "dependencies": { + "Microsoft.AspNetCore.Http.Abstractions": "2.2.0", + "Microsoft.AspNetCore.WebUtilities": "2.2.0", + "Microsoft.Extensions.ObjectPool": "2.2.0", + "Microsoft.Extensions.Options": "2.2.0", + "Microsoft.Net.Http.Headers": "2.2.0" + } + }, + "Microsoft.AspNetCore.Http.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "Nxs7Z1q3f1STfLYKJSVXCs1iBl+Ya6E8o4Oy1bCxJ/rNI44E/0f6tbsrVqAWfB7jlnJfyaAtIalBVxPKUPQb4Q==", + "dependencies": { + "Microsoft.AspNetCore.Http.Features": "2.2.0", + "System.Text.Encodings.Web": "4.5.0" + } + }, + "Microsoft.AspNetCore.Http.Connections": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "ZcwAM9rE5yjGC+vtiNAK0INybpKIqnvB+/rntZn2/CPtyiBAtovVrEp4UZOoC31zH5t0P78ix9gLNJzII/ODsA==", + "dependencies": { + "Microsoft.AspNetCore.Authorization.Policy": "2.2.0", + "Microsoft.AspNetCore.Hosting.Abstractions": "2.2.0", + "Microsoft.AspNetCore.Http": "2.2.0", + "Microsoft.AspNetCore.Http.Connections.Common": "1.1.0", + "Microsoft.AspNetCore.Routing": "2.2.0", + "Microsoft.AspNetCore.WebSockets": "2.2.0", + "Newtonsoft.Json": "11.0.2", + "System.Security.Principal.Windows": "4.5.0" + } + }, + "Microsoft.AspNetCore.Http.Connections.Common": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "mYk5QUUjyXQmlyDHWDjkLYDArt97plwe6KsDsNVhDEQ+HgZMKGjISyM6YSA7BERQNR25kXBTbIYfSy1vePGQgg==", + "dependencies": { + "Microsoft.AspNetCore.Connections.Abstractions": "2.2.0", + "Newtonsoft.Json": "11.0.2", + "System.Buffers": "4.5.0" + } + }, + "Microsoft.AspNetCore.Http.Extensions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "2DgZ9rWrJtuR7RYiew01nGRzuQBDaGHGmK56Rk54vsLLsCdzuFUPqbDTJCS1qJQWTbmbIQ9wGIOjpxA1t0l7/w==", + "dependencies": { + "Microsoft.AspNetCore.Http.Abstractions": "2.2.0", + "Microsoft.Extensions.FileProviders.Abstractions": "2.2.0", + "Microsoft.Net.Http.Headers": "2.2.0", + "System.Buffers": "4.5.0" + } + }, + "Microsoft.AspNetCore.Http.Features": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "ziFz5zH8f33En4dX81LW84I6XrYXKf9jg6aM39cM+LffN9KJahViKZ61dGMSO2gd3e+qe5yBRwsesvyqlZaSMg==", + "dependencies": { + "Microsoft.Extensions.Primitives": "2.2.0" + } + }, + "Microsoft.AspNetCore.Routing": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "jAhDBy0wryOnMhhZTtT9z63gJbvCzFuLm8yC6pHzuVu9ZD1dzg0ltxIwT4cfwuNkIL/TixdKsm3vpVOpG8euWQ==", + "dependencies": { + "Microsoft.AspNetCore.Http.Extensions": "2.2.0", + "Microsoft.AspNetCore.Routing.Abstractions": "2.2.0", + "Microsoft.Extensions.Logging.Abstractions": "2.2.0", + "Microsoft.Extensions.ObjectPool": "2.2.0", + "Microsoft.Extensions.Options": "2.2.0" + } + }, + "Microsoft.AspNetCore.Routing.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "lRRaPN7jDlUCVCp9i0W+PB0trFaKB0bgMJD7hEJS9Uo4R9MXaMC8X2tJhPLmeVE3SGDdYI4QNKdVmhNvMJGgPQ==", + "dependencies": { + "Microsoft.AspNetCore.Http.Abstractions": "2.2.0" + } + }, + "Microsoft.AspNetCore.SignalR.Common": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "TyLgQ4y4RVUIxiYFnHT181/rJ33/tL/NcBWC9BwLpulDt5/yGCG4EvsToZ49EBQ7256zj+R6OGw6JF+jj6MdPQ==", + "dependencies": { + "Microsoft.AspNetCore.Connections.Abstractions": "2.2.0", + "Microsoft.Extensions.Options": "2.2.0", + "Newtonsoft.Json": "11.0.2", + "System.Buffers": "4.5.0" + } + }, + "Microsoft.AspNetCore.SignalR.Core": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "mk69z50oFk2e89d3F/AfKeAvP3kvGG7MHG4ErydZiUd3ncSRq0kl0czq/COn/QVKYua9yGr2LIDwuR1C6/pu8Q==", + "dependencies": { + "Microsoft.AspNetCore.Authorization": "2.2.0", + "Microsoft.AspNetCore.SignalR.Common": "1.1.0", + "Microsoft.AspNetCore.SignalR.Protocols.Json": "1.1.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0", + "Microsoft.Extensions.Logging.Abstractions": "2.2.0", + "System.Reflection.Emit": "4.3.0", + "System.Threading.Channels": "4.5.0" + } + }, + "Microsoft.AspNetCore.SignalR.Protocols.Json": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "BOsjatDJnvnnXCMajOlC0ISmiFnJi/EyJzMo0i//5fZJVCLrQ4fyV/HzrhhAhSJuwJOQDdDozKQ9MB9jHq84pg==", + "dependencies": { + "Microsoft.AspNetCore.SignalR.Common": "1.1.0", + "Newtonsoft.Json": "11.0.2" + } + }, + "Microsoft.AspNetCore.WebSockets": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "ZpOcg2V0rCwU9ErfDb9y3Hcjoe7rU42XlmUS0mO4pVZQSgJVqR+DfyZtYd5LDa11F7bFNS2eezI9cBM3CmfGhw==", + "dependencies": { + "Microsoft.AspNetCore.Http.Extensions": "2.2.0", + "Microsoft.Extensions.Logging.Abstractions": "2.2.0", + "Microsoft.Extensions.Options": "2.2.0", + "System.Net.WebSockets.WebSocketProtocol": "4.5.1" + } + }, + "Microsoft.AspNetCore.WebUtilities": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "9ErxAAKaDzxXASB/b5uLEkLgUWv1QbeVxyJYEHQwMaxXOeFFVkQxiq8RyfVcifLU7NR0QY0p3acqx4ZpYfhHDg==", + "dependencies": { + "Microsoft.Net.Http.Headers": "2.2.0", + "System.Text.Encodings.Web": "4.5.0" + } + }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", "resolved": "1.1.1", @@ -220,6 +425,17 @@ "resolved": "5.0.0", "contentHash": "ArliS8lGk8sWRtrWpqI8yUVYJpRruPjCDT+EIjrgkA/AAPRctlAkRISVZ334chAKktTLzD1+PK8F5IZpGedSqA==" }, + "Microsoft.Extensions.Hosting.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "+k4AEn68HOJat5gj1TWa6X28WlirNQO9sPIIeQbia+91n03esEtMSSoekSTpMjUzjqtJWQN3McVx0GvSPFHF/Q==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "2.2.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0", + "Microsoft.Extensions.FileProviders.Abstractions": "2.2.0", + "Microsoft.Extensions.Logging.Abstractions": "2.2.0" + } + }, "Microsoft.Extensions.Logging": { "type": "Transitive", "resolved": "3.1.10", @@ -236,6 +452,11 @@ "resolved": "3.1.10", "contentHash": "bKHbgzbGsPZbEaExRaJqBz3WQ1GfhMttM23e1nivLJ8HbA3Ad526mW2G2K350q3Dc3HG83I5W8uSZWG4Rv4IpA==" }, + "Microsoft.Extensions.ObjectPool": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "gA8H7uQOnM5gb+L0uTNjViHYr+hRDqCdfugheGo/MxQnuHzmhhzCBTIPm19qL1z1Xe0NEMabfcOBGv9QghlZ8g==" + }, "Microsoft.Extensions.Options": { "type": "Transitive", "resolved": "3.1.10", @@ -250,10 +471,19 @@ "resolved": "5.0.0", "contentHash": "cI/VWn9G1fghXrNDagX9nYaaB/nokkZn0HYAawGaELQrl8InSezfe9OnfPZLcJq3esXxygh3hkq2c3qoV3SDyQ==" }, + "Microsoft.Net.Http.Headers": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "iZNkjYqlo8sIOI0bQfpsSoMTmB/kyvmV2h225ihyZT33aTp48ZpF6qYnXxzSXmHt8DpBAwBTX+1s1UFLbYfZKg==", + "dependencies": { + "Microsoft.Extensions.Primitives": "2.2.0", + "System.Buffers": "4.5.0" + } + }, "Microsoft.NETCore.Platforms": { "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" + "resolved": "2.0.0", + "contentHash": "VdLJOCXhZaEMY7Hm2GKiULmn7IEPFE4XC5LPSfBVCUIA8YLZVh846gtfBJalsPQF2PlzdD7ecX7DZEulJ402ZQ==" }, "Microsoft.NETCore.Targets": { "type": "Transitive", @@ -445,6 +675,11 @@ "SQLitePCLRaw.core": "2.0.2" } }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.5.0", + "contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A==" + }, "System.Collections": { "type": "Transitive", "resolved": "4.3.0", @@ -584,6 +819,11 @@ "System.Runtime": "4.3.0" } }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "4.5.2", + "contentHash": "NOC/SO4gSX6t0tB25xxDPqPEzkksuzW7NVFBTQGAkjXXUPQl7ZtyE83T7tUCP2huFBbPombfCKvq1Ox1aG8D9w==" + }, "System.Linq": { "type": "Transitive", "resolved": "4.3.0", @@ -650,6 +890,11 @@ "System.Runtime.Handles": "4.3.0" } }, + "System.Net.WebSockets.WebSocketProtocol": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "FquLjdb/0CeMqb15u9Px6TwnyFl306WztKWu6sKKc5kWPYMdpi5BFEkdxzGoieYFp9UksyGwJnCw4KKAUfJjrw==" + }, "System.Reflection": { "type": "Transitive", "resolved": "4.3.0", @@ -662,6 +907,28 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Emit": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.ILGeneration": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -881,6 +1148,14 @@ "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" } }, + "System.Security.Principal.Windows": { + "type": "Transitive", + "resolved": "4.5.0", + "contentHash": "U77HfRXlZlOeIXd//Yoj6Jnk8AXlbeisf1oq1os+hxOGVnuG+lGSfGqTwTZBoORFF6j/0q7HXIl8cqwQ9aUGqQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "2.0.0" + } + }, "System.Text.Encoding": { "type": "Transitive", "resolved": "4.3.0", @@ -902,6 +1177,11 @@ "System.Text.Encoding": "4.3.0" } }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "4.5.0", + "contentHash": "Xg4G4Indi4dqP1iuAiMSwpiWS54ZghzR644OtsRCm/m/lBMG8dUBhLVN7hLm8NNrNTR+iGbshCPTwrvxZPlm4g==" + }, "System.Text.Json": { "type": "Transitive", "resolved": "4.7.2", @@ -924,6 +1204,11 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.Threading.Channels": { + "type": "Transitive", + "resolved": "4.5.0", + "contentHash": "MEH06N0rIGmRT4LOKQ2BmUO0IxfvmIY/PaouSq+DFQku72OL8cxfw8W99uGpTCFf2vx2QHLRSh374iSM3asdTA==" + }, "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.3.0", @@ -1042,668 +1327,6 @@ "Serilog.Sinks.TextWriter": "2.1.0" } } - }, - ".NETCoreApp,Version=v5.0/osx-x64": { - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.unix.Microsoft.Win32.Primitives": "4.3.0" - } - }, - "runtime.any.System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "23g6rqftKmovn2cLeGsuHUYm0FD7pdutb0uQMJpZ3qTvq+zHkgmt6J65VtRry4WDGYlmkMa4xDACtaQ94alNag==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "runtime.any.System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1lpifymjGDzoYIaam6/Hyqf8GhBI3xXYLK2TgEvTtuZMorG3Kb9QnMTIKhLjJYXIiu1JvxjngHvtVFQQlpQ3HQ==" - }, - "runtime.any.System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sMDBnad4rp4t7GY442Jux0MCUuKL4otn5BK6Ni0ARTXTSpRNBzZ7hpMfKSvnVSED5kYJm96YOWsqV0JH0d2uuw==" - }, - "runtime.any.System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "M1r+760j1CNA6M/ZaW6KX8gOS8nxPRqloqDcJYVidRG566Ykwcs29AweZs2JF+nMOCgWDiMfPSTMfvwOI9F77w==" - }, - "runtime.any.System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "SDZ5AD1DtyRoxYtEcqQ3HDlcrorMYXZeCt7ZhG9US9I5Vva+gpIWDGMkcwa5XiKL0ceQKRZIX2x0XEjLX7PDzQ==" - }, - "runtime.any.System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "hLC3A3rI8jipR5d9k7+f0MgRCW6texsAp0MWkN/ci18FMtQ9KH7E2vDn/DH2LkxsszlpJpOn9qy6Z6/69rH6eQ==" - }, - "runtime.any.System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Nrm1p3armp6TTf2xuvaa+jGTTmncALWFq22CpmwRvhDf6dE9ZmH40EbOswD4GnFLrMRS0Ki6Kx5aUPmKK/hZBg==" - }, - "runtime.any.System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Lxb89SMvf8w9p9+keBLyL6H6x/TEmc6QVsIIA0T36IuyOY3kNvIdyGddA2qt35cRamzxF8K5p0Opq4G4HjNbhQ==" - }, - "runtime.any.System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fRS7zJgaG9NkifaAxGGclDDoRn9HC7hXACl52Or06a/fxdzDajWb5wov3c6a+gVSlekRoexfjwQSK9sh5um5LQ==", - "dependencies": { - "System.Private.Uri": "4.3.0" - } - }, - "runtime.any.System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GG84X6vufoEzqx8PbeBKheE4srOhimv+yLtGb/JkR3Y2FmoqmueLNFU4Xx8Y67plFpltQSdK74x0qlEhIpv/CQ==" - }, - "runtime.any.System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "lBoFeQfxe/4eqjPi46E0LU/YaCMdNkQ8B4MZu/mkzdIAZh8RQ1NYZSj0egrQKdgdvlPFtP4STtob40r4o2DBAw==" - }, - "runtime.any.System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+ihI5VaXFCMVPJNstG4O4eo1CfbrByLxRrQQTqOTp1ttK0kUKDqOdBSTaCB2IBk/QtjDrs6+x4xuezyMXdm0HQ==" - }, - "runtime.any.System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NLrxmLsfRrOuVqPWG+2lrQZnE53MLVeo+w9c54EV+TUo4c8rILpsDXfY8pPiOy9kHpUHHP07ugKmtsU3vVW5Jg==" - }, - "runtime.any.System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OhBAVBQG5kFj1S+hCEQ3TUHBAEtZ3fbEMgZMRNdN8A0Pj4x+5nTELEqL59DU0TjKVE6II3dqKw4Dklb3szT65w==" - }, - "runtime.any.System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "w4ehZJ+AwXYmGwYu+rMvym6RvMaRiUEQR1u6dwcyuKHxz8Heu/mO9AG1MquEgTyucnhv3M43X0iKpDOoN17C0w==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "runtime.unix.Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "2mI2Mfq+CVatgr4RWGvAWBjoCfUafy6VNFU7G9OA52DjO8x/okfIbsEq2UPgeGfdpO7X5gmPXKT8slx0tn0Mhw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "WV8KLRHWVUVUDduFnvGMHt0FsEt2wK6xPl1EgDKlaMx2KnZ43A/O0GzP8wIuvAC7mq4T9V1mm90r+PXkL9FPdQ==", - "dependencies": { - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ajmTcjrqc3vgV1TH54DRioshbEniaFbOAJ0kReGuNsp9uIcqYle0RmUo6+Qlwqe3JIs4TDxgnqs3UzX3gRJ1rA==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "AZcRXhH7Gamr+bckUfX3iHefPIrujJTt9XWQWo0elNiP1SNasX0KBWINZkDKY0GsOrsyJ7cB4MgIRTZzLlsTKg==", - "dependencies": { - "Microsoft.Win32.Primitives": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.Private.Uri": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ooWzobr5RAq34r9uan1r/WPXJYG1XWy9KanrxNvEnBzbFdQbMG7Y3bVi4QxR7xZMNLOxLLTAyXvnSkfj5boZSg==", - "dependencies": { - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "zQiTBVpiLftTQZW8GFsV0gjYikB1WMkEPIxF5O6RkUrSV/OgvRRTYgeFQha/0keBpuS0HYweraGRwhfhJ7dj7w==", - "dependencies": { - "System.Private.Uri": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "SQLitePCLRaw.lib.e_sqlite3": { - "type": "Transitive", - "resolved": "2.0.2", - "contentHash": "S+Tsqe/M7wsc+9HeediI6UHtBKf2X586aRwhi1aBVLGe0WxkAo52O9ZxwEy/v8XMLefcrEMupd2e9CDlIT6QCw==" - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Collections": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.unix.System.Diagnostics.Debug": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Diagnostics.Tracing": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Globalization": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Globalization.Calendars": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.any.System.IO": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.unix.System.IO.FileSystem": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.2", - "contentHash": "y7hv0o0weI0j0mvEcBOdt1F3CAADiWlcw3e54m8TfYiRmBPDIsHElx8QUPDlY4x6yWXKPGN0Z2TuXCTPgkm5WQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "runtime.unix.System.Net.Primitives": "4.3.0" - } - }, - "System.Private.Uri": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I4SwANiUGho1esj4V4oSlPllXjzCZDE+5XXso2P03LW2vOda2Enzh8DWOxwN6hnrJyp314c7KuVu31QYhRzOGg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "runtime.unix.System.Private.Uri": "4.3.0" - } - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Reflection": "4.3.0" - } - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Reflection.Primitives": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Resources.ResourceManager": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "runtime.any.System.Runtime": "4.3.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.unix.System.Runtime.Extensions": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "runtime.any.System.Runtime.InteropServices": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.any.System.Text.Encoding.Extensions": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.0.1", - "contentHash": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0", - "runtime.any.System.Threading.Timer": "4.3.0" - } - } } } } \ No newline at end of file From b37173c73c71313950cc08d63c044431937b18fe Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 9 Dec 2021 12:04:40 +0700 Subject: [PATCH 24/69] add logger in frontend --- TbsReact/ClientApp/package-lock.json | 62 +++++++++++++++++++ TbsReact/ClientApp/package.json | 1 + TbsReact/ClientApp/src/App.js | 54 +++++++++++++--- TbsReact/ClientApp/src/api/Debug.js | 13 ++++ TbsReact/ClientApp/src/components/Layout.js | 11 +++- .../ClientApp/src/components/Views/Debug.js | 10 +++ TbsReact/ClientApp/src/hooks/usePrevious.js | 9 +++ TbsReact/ClientApp/src/realtime/account.js | 12 ++++ TbsReact/ClientApp/src/realtime/connection.js | 11 ++++ TbsReact/Hub/GroupHub.cs | 19 +++--- 10 files changed, 181 insertions(+), 21 deletions(-) create mode 100644 TbsReact/ClientApp/src/api/Debug.js create mode 100644 TbsReact/ClientApp/src/components/Views/Debug.js create mode 100644 TbsReact/ClientApp/src/hooks/usePrevious.js create mode 100644 TbsReact/ClientApp/src/realtime/account.js create mode 100644 TbsReact/ClientApp/src/realtime/connection.js diff --git a/TbsReact/ClientApp/package-lock.json b/TbsReact/ClientApp/package-lock.json index 11487e4b1..f3ea11f8a 100644 --- a/TbsReact/ClientApp/package-lock.json +++ b/TbsReact/ClientApp/package-lock.json @@ -2074,6 +2074,18 @@ } } }, + "@microsoft/signalr": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-6.0.0.tgz", + "integrity": "sha512-Y38bG/i9V1fOfOLcfTl2+OqPH7+0A7DgojJ7YILgfQ0vGGmnZwdCtrzCvSsRIzKTIrB/ZSQ3n4BA5VOO+MFkrA==", + "requires": { + "abort-controller": "^3.0.0", + "eventsource": "^1.0.7", + "fetch-cookie": "^0.11.0", + "node-fetch": "^2.6.1", + "ws": "^7.4.5" + } + }, "@mui/base": { "version": "5.0.0-alpha.58", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.58.tgz", @@ -3021,6 +3033,14 @@ "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -6448,6 +6468,11 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, "eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -6813,6 +6838,14 @@ "bser": "2.1.1" } }, + "fetch-cookie": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.11.0.tgz", + "integrity": "sha512-BQm7iZLFhMWFy5CZ/162sAGjBfdNWb7a8LEqqnzsHFhxT/X/SVj/z2t2nu3aJvjlbQkrAlTUApplPRjWyH4mhA==", + "requires": { + "tough-cookie": "^2.3.3 || ^3.0.1 || ^4.0.0" + } + }, "figgy-pudding": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", @@ -10752,6 +10785,35 @@ "tslib": "^2.0.3" } }, + "node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "requires": { + "whatwg-url": "^5.0.0" + }, + "dependencies": { + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + } + }, "node-forge": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index 892ff0447..cae133510 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -5,6 +5,7 @@ "dependencies": { "@emotion/react": "^11.7.0", "@emotion/styled": "^11.6.0", + "@microsoft/signalr": "^6.0.0", "@mui/icons-material": "^5.2.0", "@mui/material": "^5.2.2", "axios": "^0.24.0", diff --git a/TbsReact/ClientApp/src/App.js b/TbsReact/ClientApp/src/App.js index 9a3f3596f..59ae3a72e 100644 --- a/TbsReact/ClientApp/src/App.js +++ b/TbsReact/ClientApp/src/App.js @@ -1,17 +1,51 @@ import React, { useState, useEffect } from 'react'; -import Layout from './components/Layout'; +import Layout from './components/Layout'; import './custom.css' +import { signalRConnection, initConnection } from './realtime/connection' +import { changeAccount } from './realtime/account'; +import { usePrevious } from './hooks/usePrevious' const App = () => { - const [selected, setSelected] = useState(-1); - useEffect(() => { - console.log(selected); - }, [selected]) - - return ( - - - ); + const [selected, setSelected] = useState(-1); + const [joined, setJoined] = useState(false); + const prev = usePrevious(selected); + + // look complicated + // may change later when i "pro" React ._. + // - Vinaghost + useEffect(() => { + if (joined === false) { + const join = async () => { + try { + initConnection(); + await signalRConnection.start(); + setJoined(true); + signalRConnection.on("message", data => { + console.log(data); + + }); + } + catch (e) { + console.log(e); + } + } + + join(); + } + + }, [joined]) + + useEffect(() => { + if (joined === true) { + changeAccount(selected, prev); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [selected, joined]) + + return ( + + + ); } diff --git a/TbsReact/ClientApp/src/api/Debug.js b/TbsReact/ClientApp/src/api/Debug.js new file mode 100644 index 000000000..928f57241 --- /dev/null +++ b/TbsReact/ClientApp/src/api/Debug.js @@ -0,0 +1,13 @@ +import axios from 'axios' + +const getLogData = async (index) => { + try { + const {data} = await axios.get(`/accounts/${index}/log`); + return data; + } + catch (e) { + console.log(e); + } +} + +export {getLogData} \ No newline at end of file diff --git a/TbsReact/ClientApp/src/components/Layout.js b/TbsReact/ClientApp/src/components/Layout.js index a887201d4..16208b07a 100644 --- a/TbsReact/ClientApp/src/components/Layout.js +++ b/TbsReact/ClientApp/src/components/Layout.js @@ -1,12 +1,17 @@ import React from 'react'; import NavMenu from './NavMenu'; -import Info from './Views/Info'; -const Layout = ({ selected, setSelected }) => { +//debug view +import Debug from './Views/Debug'; +import LogBoard from './Views/Debug/LogBoard' + +const Layout = ({ selected, setSelected, isConnect }) => { return ( <> - + } + /> ); diff --git a/TbsReact/ClientApp/src/components/Views/Debug.js b/TbsReact/ClientApp/src/components/Views/Debug.js new file mode 100644 index 000000000..9805218cf --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/Debug.js @@ -0,0 +1,10 @@ + +const Debug = ({logBoard}) => { + return ( + <> + {logBoard} + + ) +} + +export default Debug; \ No newline at end of file diff --git a/TbsReact/ClientApp/src/hooks/usePrevious.js b/TbsReact/ClientApp/src/hooks/usePrevious.js new file mode 100644 index 000000000..fa3f9c53f --- /dev/null +++ b/TbsReact/ClientApp/src/hooks/usePrevious.js @@ -0,0 +1,9 @@ +import {useRef, useEffect} from 'react' + +export function usePrevious(value) { + const ref = useRef(); + useEffect(() => { + ref.current = value; + }, [value]); + return ref.current; +} diff --git a/TbsReact/ClientApp/src/realtime/account.js b/TbsReact/ClientApp/src/realtime/account.js new file mode 100644 index 000000000..2ec560f07 --- /dev/null +++ b/TbsReact/ClientApp/src/realtime/account.js @@ -0,0 +1,12 @@ +import {signalRConnection} from './connection' + +const changeAccount = (index, oldIndex) => { + if ( index !== -1 ) { + signalRConnection.invoke("AddGroup", index ) + } + if ( oldIndex !== -1 ) { + signalRConnection.invoke("RemoveGroup", oldIndex ) + } +} + +export {changeAccount} \ No newline at end of file diff --git a/TbsReact/ClientApp/src/realtime/connection.js b/TbsReact/ClientApp/src/realtime/connection.js new file mode 100644 index 000000000..1ee6cda41 --- /dev/null +++ b/TbsReact/ClientApp/src/realtime/connection.js @@ -0,0 +1,11 @@ +import {HubConnectionBuilder} from '@microsoft/signalr' + +let signalRConnection + +const initConnection = () => { + signalRConnection = new HubConnectionBuilder() + .withUrl("/live") + .build(); +} + +export {signalRConnection, initConnection}; \ No newline at end of file diff --git a/TbsReact/Hub/GroupHub.cs b/TbsReact/Hub/GroupHub.cs index 3412ca838..a5466cf16 100644 --- a/TbsReact/Hub/GroupHub.cs +++ b/TbsReact/Hub/GroupHub.cs @@ -6,18 +6,21 @@ namespace TbsReact.Hubs { public class GroupHub : Hub { - public async Task AddGroup(string groupkey) + public async Task AddGroup(int index) { - await Groups.AddToGroupAsync(Context.ConnectionId, groupkey); - await Clients.Caller.SendAsync("Message", $"{Context.ConnectionId} is now on account {groupkey}"); - AccountManager.ClientConnect(groupkey); + var acc = AccountData.GetAccount(index); + await Groups.AddToGroupAsync(Context.ConnectionId, acc.Name); + await Clients.Caller.SendAsync("message", $"{Context.ConnectionId} is now on account {acc.Name}"); + + AccountManager.ClientConnect(acc.Name); } - public async Task RemoveGroup(string groupkey) + public async Task RemoveGroup(int index) { - await Groups.RemoveFromGroupAsync(Context.ConnectionId, groupkey); - await Clients.Caller.SendAsync("Message", $"{Context.ConnectionId} didn't watch account {groupkey} anymore"); - AccountManager.ClientDisconnect(groupkey); + var acc = AccountData.GetAccount(index); + await Groups.RemoveFromGroupAsync(Context.ConnectionId, acc.Name); + await Clients.Caller.SendAsync("message", $"{Context.ConnectionId} didn't watch account {acc.Name} anymore"); + AccountManager.ClientDisconnect(acc.Name); } } } \ No newline at end of file From a002e2b61c80292a20238cec57d49fdc75103dec Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 10 Dec 2021 23:54:48 +0700 Subject: [PATCH 25/69] show log in frontend --- .gitignore | 3 ++- TbsReact/Controllers/Account/DriverController.cs | 2 ++ TbsReact/Controllers/DebugController.cs | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f69cc275e..aa4b40690 100644 --- a/.gitignore +++ b/.gitignore @@ -377,4 +377,5 @@ data/ Web/Client/ Web/Server/ -Web/Shared/ \ No newline at end of file +Web/Shared/ +TbsReact/logs/ diff --git a/TbsReact/Controllers/Account/DriverController.cs b/TbsReact/Controllers/Account/DriverController.cs index 284c506c7..6e3f8c31b 100644 --- a/TbsReact/Controllers/Account/DriverController.cs +++ b/TbsReact/Controllers/Account/DriverController.cs @@ -24,8 +24,10 @@ public async Task Login(int index) if (acc.Access.AllAccess.Count > 0) { + AccountManager.SendMessage(account.Name, "message", $"Account {account.Name} is logging"); await IoHelperCore.LoginAccount(acc); AccountManager.SendMessage(account.Name, "message", $"Account {account.Name} logged in"); + return Ok(); } diff --git a/TbsReact/Controllers/DebugController.cs b/TbsReact/Controllers/DebugController.cs index 2e4e52f67..e883f1fde 100644 --- a/TbsReact/Controllers/DebugController.cs +++ b/TbsReact/Controllers/DebugController.cs @@ -7,11 +7,11 @@ namespace TbsReact.Controllers { [ApiController] - [Route("accounts/{indexAcc:int}/")] + [Route("accounts/{indexAcc:int}")] public class DebugController : ControllerBase { [HttpGet] - [Route("/log")] + [Route("log")] public ActionResult GetLog(int indexAcc) { var account = AccountData.GetAccount(indexAcc); From 13b5f1fdd084bfe7f9a91a55b08a388210b5a846 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 10 Dec 2021 23:55:07 +0700 Subject: [PATCH 26/69] fix frontend doesnt add https --- .../src/components/sidebar/Modal/AccountModal.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index ba72ba1e2..395ea3f09 100644 --- a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -56,6 +56,14 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { } }, [accID]) + useEffect(() => { + if (!server.includes("https://")) { + setServer((prev) => `https://${prev}`) + } + + }, [server]) + + const handleOpen = () => { if (editMode === true && accID === -1) { From 3c5be78152eb581050b4e6a23c10aa9af3a93c44 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 10 Dec 2021 23:55:40 +0700 Subject: [PATCH 27/69] fix null obj exception when delete account --- TbsReact/ClientApp/src/components/sidebar/SideBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TbsReact/ClientApp/src/components/sidebar/SideBar.js b/TbsReact/ClientApp/src/components/sidebar/SideBar.js index d1ef1369c..1c88b93b7 100644 --- a/TbsReact/ClientApp/src/components/sidebar/SideBar.js +++ b/TbsReact/ClientApp/src/components/sidebar/SideBar.js @@ -30,8 +30,8 @@ const SideBar = ({ selected, setSelected }) => { }; const onDelete = async () => { - await deleteAccount(selected); setSelected(-1) + await deleteAccount(selected); } const onLog = async () => { From eb56cbccb8b983b72b73bb81292fbca995badfd8 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 12 Dec 2021 15:16:07 +0700 Subject: [PATCH 28/69] complete UI for debug screen --- TbsCore/Helpers/IoHelperCore.cs | 2 +- TbsCore/Models/AccModels/Account.cs | 2 +- TbsCore/Models/AccModels/TaskList.cs | 10 +- TbsReact/ClientApp/package-lock.json | 196 ++++++++++++++++++ TbsReact/ClientApp/package.json | 3 + TbsReact/ClientApp/src/api/Debug.js | 15 +- TbsReact/ClientApp/src/components/Layout.js | 4 + .../ClientApp/src/components/Views/Debug.js | 13 +- .../Controllers/Account/DriverController.cs | 1 + TbsReact/Controllers/DebugController.cs | 17 ++ TbsReact/Models/Task.cs | 14 ++ TbsReact/Singleton/TaskManager.cs | 67 ++++++ TbsReact/Startup.cs | 1 + TravBotSharp/ControlPanel.cs | 4 +- TravBotSharp/Views/DebugUc.cs | 6 +- 15 files changed, 341 insertions(+), 14 deletions(-) create mode 100644 TbsReact/Models/Task.cs create mode 100644 TbsReact/Singleton/TaskManager.cs diff --git a/TbsCore/Helpers/IoHelperCore.cs b/TbsCore/Helpers/IoHelperCore.cs index 5077d7278..82a1622ad 100644 --- a/TbsCore/Helpers/IoHelperCore.cs +++ b/TbsCore/Helpers/IoHelperCore.cs @@ -215,7 +215,7 @@ public static async Task LoginAccount(Account acc) acc.Logger = new Logger(acc.AccInfo.Nickname); - acc.Tasks = new TaskList(); + acc.Tasks = new TaskList(acc.AccInfo.Nickname); acc.Villages.ForEach(vill => vill.UnfinishedTasks = new List()); acc.Wb = new WebBrowserInfo(); diff --git a/TbsCore/Models/AccModels/Account.cs b/TbsCore/Models/AccModels/Account.cs index 592896bb9..93d3e232f 100644 --- a/TbsCore/Models/AccModels/Account.cs +++ b/TbsCore/Models/AccModels/Account.cs @@ -24,12 +24,12 @@ public void Init() Hero = new Hero(); Hero.init(); - Tasks = new TaskList(); Villages = new List(); Access = new AccessInfo(); Access.Init(); AccInfo = new AccInfo(); AccInfo.Init(); + Tasks = new TaskList(AccInfo.Nickname); Quests = new QuestsSettings(); Quests.Init(); Settings = new GeneralSettings(); diff --git a/TbsCore/Models/AccModels/TaskList.cs b/TbsCore/Models/AccModels/TaskList.cs index 79a97fb80..998c8fc8b 100644 --- a/TbsCore/Models/AccModels/TaskList.cs +++ b/TbsCore/Models/AccModels/TaskList.cs @@ -9,14 +9,16 @@ namespace TbsCore.Models.AccModels { public class TaskList { - public delegate void TaskUpdated(); + public delegate void TaskUpdated(string username); private readonly List _tasks; + private readonly string _username; public TaskUpdated OnUpdateTask; - public TaskList() + public TaskList(string username) { _tasks = new List(); + _username = username; } public void Add(BotTask task, bool IfNotExists = false, Village vill = null) @@ -116,13 +118,13 @@ public void Remove(Type typeTask, Village vill = null, int timeBelow = 0, BotTas public void Clear() { _tasks.Clear(); - OnUpdateTask?.Invoke(); + OnUpdateTask?.Invoke(_username); } public void ReOrder() { _tasks.Sort((a, b) => DateTime.Compare(a.ExecuteAt, b.ExecuteAt)); - OnUpdateTask?.Invoke(); + OnUpdateTask?.Invoke(_username); } public bool IsTaskExcuting() diff --git a/TbsReact/ClientApp/package-lock.json b/TbsReact/ClientApp/package-lock.json index f3ea11f8a..bd306b986 100644 --- a/TbsReact/ClientApp/package-lock.json +++ b/TbsReact/ClientApp/package-lock.json @@ -2227,6 +2227,67 @@ } } }, + "@mui/styles": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@mui/styles/-/styles-5.2.3.tgz", + "integrity": "sha512-Art4qjlEI9H2h34mLL8s+CE9nWZWZbuJLbNpievaIM6DGuayz3DYkJHcH5mXJYFPhTNoe9IQYbpyKofjE0YVag==", + "requires": { + "@babel/runtime": "^7.16.3", + "@emotion/hash": "^0.8.0", + "@mui/private-theming": "^5.2.3", + "@mui/types": "^7.1.0", + "@mui/utils": "^5.2.3", + "clsx": "^1.1.1", + "csstype": "^3.0.10", + "hoist-non-react-statics": "^3.3.2", + "jss": "^10.8.2", + "jss-plugin-camel-case": "^10.8.2", + "jss-plugin-default-unit": "^10.8.2", + "jss-plugin-global": "^10.8.2", + "jss-plugin-nested": "^10.8.2", + "jss-plugin-props-sort": "^10.8.2", + "jss-plugin-rule-value-function": "^10.8.2", + "jss-plugin-vendor-prefixer": "^10.8.2", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", + "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@mui/private-theming": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.2.3.tgz", + "integrity": "sha512-Lc1Cmu8lSsYZiXADi9PBb17Ho82ZbseHQujUFAcp6bCJ5x/d+87JYCIpCBMagPu/isRlFCwbziuXPmz7WOzJPQ==", + "requires": { + "@babel/runtime": "^7.16.3", + "@mui/utils": "^5.2.3", + "prop-types": "^15.7.2" + } + }, + "@mui/utils": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.2.3.tgz", + "integrity": "sha512-sQujlajIS0zQKcGIS6tZR0L1R+ib26B6UtuEn+cZqwKHsPo3feuS+SkdscYBdcCdMbrZs4gj8WIJHl2z6tbSzQ==", + "requires": { + "@babel/runtime": "^7.16.3", + "@types/prop-types": "^15.7.4", + "@types/react-is": "^16.7.1 || ^17.0.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, "@mui/system": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.2.2.tgz", @@ -2284,6 +2345,29 @@ } } }, + "@mui/x-data-grid": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-5.2.0.tgz", + "integrity": "sha512-Hen9hItbmggxt1TPxUfu6khz9BJA8iOf1H4A4/j62EPH/4DKgyxZD3TgdpbNmo4JY7dIIwdq2XNzMwqqgZtlaA==", + "requires": { + "@mui/utils": "^5.2.2", + "clsx": "^1.1.1", + "prop-types": "^15.7.2", + "reselect": "^4.1.5" + } + }, + "@mui/x-data-grid-generator": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@mui/x-data-grid-generator/-/x-data-grid-generator-5.2.0.tgz", + "integrity": "sha512-f2lANANodCZksRSKKD/HWPwqYenbkCj0B01VoxnjTW4ZUVaYZtm50e9fvLiSHW+iuZeZ6f1VDOVDXJPJ7aVBDQ==", + "requires": { + "@mui/base": "^5.0.0-alpha.58", + "@types/chance": "^1.1.3", + "chance": "^1.1.7", + "clsx": "^1.1.1", + "lru-cache": "^6.0.0" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2570,6 +2654,11 @@ "@babel/types": "^7.3.0" } }, + "@types/chance": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/chance/-/chance-1.1.3.tgz", + "integrity": "sha512-X6c6ghhe4/sQh4XzcZWSFaTAUOda38GQHmq9BUanYkOE/EO7ZrkazwKmtsj3xzTjkLWmwULE++23g3d3CCWaWw==" + }, "@types/eslint": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", @@ -4363,6 +4452,11 @@ "supports-color": "^5.3.0" } }, + "chance": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.8.tgz", + "integrity": "sha512-v7fi5Hj2VbR6dJEGRWLmJBA83LJMS47pkAbmROFxHWd9qmE1esHRZW8Clf1Fhzr3rjxnNZVCjOEv/ivFxeIMtg==" + }, "char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -5010,6 +5104,15 @@ } } }, + "css-vendor": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz", + "integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==", + "requires": { + "@babel/runtime": "^7.8.3", + "is-in-browser": "^1.0.2" + } + }, "css-what": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", @@ -7848,6 +7951,11 @@ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" }, + "hyphenate-style-name": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", + "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -8218,6 +8326,11 @@ "is-extglob": "^2.1.1" } }, + "is-in-browser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", + "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=" + }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -10171,6 +10284,84 @@ "universalify": "^2.0.0" } }, + "jss": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.9.0.tgz", + "integrity": "sha512-YpzpreB6kUunQBbrlArlsMpXYyndt9JATbt95tajx0t4MTJJcCJdd4hdNpHmOIDiUJrF/oX5wtVFrS3uofWfGw==", + "requires": { + "@babel/runtime": "^7.3.1", + "csstype": "^3.0.2", + "is-in-browser": "^1.1.3", + "tiny-warning": "^1.0.2" + } + }, + "jss-plugin-camel-case": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.9.0.tgz", + "integrity": "sha512-UH6uPpnDk413/r/2Olmw4+y54yEF2lRIV8XIZyuYpgPYTITLlPOsq6XB9qeqv+75SQSg3KLocq5jUBXW8qWWww==", + "requires": { + "@babel/runtime": "^7.3.1", + "hyphenate-style-name": "^1.0.3", + "jss": "10.9.0" + } + }, + "jss-plugin-default-unit": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.9.0.tgz", + "integrity": "sha512-7Ju4Q9wJ/MZPsxfu4T84mzdn7pLHWeqoGd/D8O3eDNNJ93Xc8PxnLmV8s8ZPNRYkLdxZqKtm1nPQ0BM4JRlq2w==", + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.0" + } + }, + "jss-plugin-global": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.9.0.tgz", + "integrity": "sha512-4G8PHNJ0x6nwAFsEzcuVDiBlyMsj2y3VjmFAx/uHk/R/gzJV+yRHICjT4MKGGu1cJq2hfowFWCyrr/Gg37FbgQ==", + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.0" + } + }, + "jss-plugin-nested": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.9.0.tgz", + "integrity": "sha512-2UJnDrfCZpMYcpPYR16oZB7VAC6b/1QLsRiAutOt7wJaaqwCBvNsosLEu/fUyKNQNGdvg2PPJFDO5AX7dwxtoA==", + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.0", + "tiny-warning": "^1.0.2" + } + }, + "jss-plugin-props-sort": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.9.0.tgz", + "integrity": "sha512-7A76HI8bzwqrsMOJTWKx/uD5v+U8piLnp5bvru7g/3ZEQOu1+PjHvv7bFdNO3DwNPC9oM0a//KwIJsIcDCjDzw==", + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.0" + } + }, + "jss-plugin-rule-value-function": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.9.0.tgz", + "integrity": "sha512-IHJv6YrEf8pRzkY207cPmdbBstBaE+z8pazhPShfz0tZSDtRdQua5jjg6NMz3IbTasVx9FdnmptxPqSWL5tyJg==", + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.0", + "tiny-warning": "^1.0.2" + } + }, + "jss-plugin-vendor-prefixer": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.9.0.tgz", + "integrity": "sha512-MbvsaXP7iiVdYVSEoi+blrW+AYnTDvHTW6I6zqi7JcwXdc6I9Kbm234nEblayhF38EftoenbM+5218pidmC5gA==", + "requires": { + "@babel/runtime": "^7.3.1", + "css-vendor": "^2.0.8", + "jss": "10.9.0" + } + }, "jsx-ast-utils": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz", @@ -13380,6 +13571,11 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, + "reselect": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.5.tgz", + "integrity": "sha512-uVdlz8J7OO+ASpBYoz1Zypgx0KasCY20H+N8JD13oUMtPvSHQuscrHop4KbXrbsBcdB9Ds7lVK7eRkBIfO43vQ==" + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index cae133510..8b0a55764 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -8,6 +8,9 @@ "@microsoft/signalr": "^6.0.0", "@mui/icons-material": "^5.2.0", "@mui/material": "^5.2.2", + "@mui/styles": "^5.2.3", + "@mui/x-data-grid": "^5.2.0", + "@mui/x-data-grid-generator": "^5.2.0", "axios": "^0.24.0", "bootstrap": "^5.1.0", "eslint-config-standard": "^16.0.3", diff --git a/TbsReact/ClientApp/src/api/Debug.js b/TbsReact/ClientApp/src/api/Debug.js index 928f57241..a4e99c295 100644 --- a/TbsReact/ClientApp/src/api/Debug.js +++ b/TbsReact/ClientApp/src/api/Debug.js @@ -10,4 +10,17 @@ const getLogData = async (index) => { } } -export {getLogData} \ No newline at end of file +const getTaskList = async (index) => { + try { + const {data} = await axios.get(`/accounts/${index}/task`); + return data; + } + catch (e) { + if ( e.response.status === 404 ) { + return null + } + console.log(e); + } +} + +export {getLogData, getTaskList} \ No newline at end of file diff --git a/TbsReact/ClientApp/src/components/Layout.js b/TbsReact/ClientApp/src/components/Layout.js index 16208b07a..19d943fe8 100644 --- a/TbsReact/ClientApp/src/components/Layout.js +++ b/TbsReact/ClientApp/src/components/Layout.js @@ -4,14 +4,18 @@ import NavMenu from './NavMenu'; //debug view import Debug from './Views/Debug'; import LogBoard from './Views/Debug/LogBoard' +import TaskTable from './Views/Debug/TaskTable'; const Layout = ({ selected, setSelected, isConnect }) => { return ( <> +
} logBoard={} /> +
); diff --git a/TbsReact/ClientApp/src/components/Views/Debug.js b/TbsReact/ClientApp/src/components/Views/Debug.js index 9805218cf..76138dfeb 100644 --- a/TbsReact/ClientApp/src/components/Views/Debug.js +++ b/TbsReact/ClientApp/src/components/Views/Debug.js @@ -1,8 +1,17 @@ +import Grid from '@mui/material/Grid'; -const Debug = ({logBoard}) => { +const Debug = ({ taskTable, logBoard }) => { return ( <> - {logBoard} + + + {taskTable} + + + {logBoard} + + + ) } diff --git a/TbsReact/Controllers/Account/DriverController.cs b/TbsReact/Controllers/Account/DriverController.cs index 6e3f8c31b..0eae914a8 100644 --- a/TbsReact/Controllers/Account/DriverController.cs +++ b/TbsReact/Controllers/Account/DriverController.cs @@ -26,6 +26,7 @@ public async Task Login(int index) { AccountManager.SendMessage(account.Name, "message", $"Account {account.Name} is logging"); await IoHelperCore.LoginAccount(acc); + TaskManager.AddAccount(acc); AccountManager.SendMessage(account.Name, "message", $"Account {account.Name} logged in"); return Ok(); diff --git a/TbsReact/Controllers/DebugController.cs b/TbsReact/Controllers/DebugController.cs index e883f1fde..875115e9c 100644 --- a/TbsReact/Controllers/DebugController.cs +++ b/TbsReact/Controllers/DebugController.cs @@ -21,5 +21,22 @@ public ActionResult GetLog(int indexAcc) } return Ok(LogManager.GetLogData(account.Name)); } + + [HttpGet] + [Route("task")] + public ActionResult GetTask(int indexAcc) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var list = TaskManager.GetTaskList(account.Name); + if (list == null) + { + return Ok("null"); + } + return Ok(list); + } } } \ No newline at end of file diff --git a/TbsReact/Models/Task.cs b/TbsReact/Models/Task.cs new file mode 100644 index 000000000..bcdba4721 --- /dev/null +++ b/TbsReact/Models/Task.cs @@ -0,0 +1,14 @@ +using System; + +namespace TbsReact.Models +{ + public class Task + { + public int Id { get; set; } + public string Name { get; set; } + public string VillName { get; set; } + public string Priority { get; set; } + public string Stage { get; set; } + public DateTime ExecuteAt { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Singleton/TaskManager.cs b/TbsReact/Singleton/TaskManager.cs new file mode 100644 index 000000000..bfb5d6c4d --- /dev/null +++ b/TbsReact/Singleton/TaskManager.cs @@ -0,0 +1,67 @@ +using System.Collections.Generic; +using System.Linq; +using TbsReact.Models; + +namespace TbsReact.Singleton +{ + public class TaskManager + { + private static readonly TaskManager instance = new(); + + private TaskManager() + { + } + + public static TaskManager Instance + { + get + { + return instance; + } + } + + private static void UpdateTaskTable(string username) + { + if (!AccountManager.CheckGroup(username)) return; + AccountManager.SendMessage(username, "task", "reset"); + } + + private List _getTaskList(string username) + { + var acc = AccountManager.Accounts.FirstOrDefault(x => x.AccInfo.Nickname.Equals(username)); + if (acc == null) return null; + if (acc.Tasks == null) return null; + List list = new(); + foreach (var task in acc.Tasks.ToList()) + { + var tasKOjb = new Task + { + Id = list.Count, + Name = task.ToString().Split('.').Last(), + VillName = task.Vill?.Name ?? "/", + Priority = task.Priority.ToString(), + Stage = task.Stage.ToString(), + ExecuteAt = task.ExecuteAt + }; + list.Add(tasKOjb); + } + + return list; + } + + public static void AddAccount(TbsCore.Models.AccModels.Account account) + { + account.Tasks.OnUpdateTask = UpdateTaskTable; + if (account.Tasks.Count < 1) + { + if (!AccountManager.CheckGroup(account.AccInfo.Nickname)) return; + AccountManager.SendMessage(account.AccInfo.Nickname, "task", "waiting"); + } + } + + public static List GetTaskList(string username) + { + return instance._getTaskList(username); + } + } +} \ No newline at end of file diff --git a/TbsReact/Startup.cs b/TbsReact/Startup.cs index 277fe4751..4010bfd0e 100644 --- a/TbsReact/Startup.cs +++ b/TbsReact/Startup.cs @@ -24,6 +24,7 @@ public void ConfigureServices(IServiceCollection services) services.AddSingleton(AccountManager.Instance); services.AddSingleton(AccountData.Instance); services.AddSingleton(LogManager.Instance); + services.AddSingleton(TaskManager.Instance); services.AddSignalR(); TbsCore.Models.Logging.SerilogSingleton.Init(); diff --git a/TravBotSharp/ControlPanel.cs b/TravBotSharp/ControlPanel.cs index 16a59cc68..e8389827d 100644 --- a/TravBotSharp/ControlPanel.cs +++ b/TravBotSharp/ControlPanel.cs @@ -143,7 +143,7 @@ private void button2_Click(object sender, EventArgs e) //login button { await IoHelperCore.LoginAccount(acc); acc.Tasks.OnUpdateTask = debugUc1.UpdateTaskTable; - debugUc1.UpdateTaskTable(); + debugUc1.UpdateTaskTable(acc.AccInfo.Nickname); }).Start(); generalUc1.UpdateBotRunning("true"); return; @@ -197,7 +197,7 @@ private void accListView_SelectedIndexChanged(object sender, EventArgs e) // Dif if (acc.Tasks != null) { acc.Tasks.OnUpdateTask = debugUc1.UpdateTaskTable; - debugUc1.UpdateTaskTable(); + debugUc1.UpdateTaskTable(acc.AccInfo.Nickname); } } diff --git a/TravBotSharp/Views/DebugUc.cs b/TravBotSharp/Views/DebugUc.cs index 74f7f890b..889b1108e 100644 --- a/TravBotSharp/Views/DebugUc.cs +++ b/TravBotSharp/Views/DebugUc.cs @@ -28,7 +28,7 @@ public void InitLog(LogOutput log) public void UpdateUc() { active = true; - UpdateTaskTable(); + UpdateTaskTable(GetSelectedAcc()?.AccInfo.Nickname ?? ""); GetLogData(); this.Focus(); } @@ -80,14 +80,14 @@ public void UpdateLogData() logTextBox.Text = $"{Log.GetLastLog(acc.AccInfo.Nickname)}{logTextBox.Text}"; } - public void UpdateTaskTable() + public void UpdateTaskTable(string username) { if (!active) return; if (taskListView.InvokeRequired) { taskListView.BeginInvoke(new Action(delegate { - UpdateTaskTable(); + UpdateTaskTable(username); })); return; } From 9ef54dae6cb01567a8d70219fe1e6e82be5b3738 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 12 Dec 2021 17:01:58 +0700 Subject: [PATCH 29/69] add route --- TbsReact/ClientApp/src/components/Layout.js | 38 ++++++++++++++++---- TbsReact/ClientApp/src/components/NavMenu.js | 33 +++++++++++------ 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/TbsReact/ClientApp/src/components/Layout.js b/TbsReact/ClientApp/src/components/Layout.js index 19d943fe8..b4ffa239d 100644 --- a/TbsReact/ClientApp/src/components/Layout.js +++ b/TbsReact/ClientApp/src/components/Layout.js @@ -1,6 +1,19 @@ import React from 'react'; + +// header import NavMenu from './NavMenu'; +// Router +import { + BrowserRouter as Router, + Switch, + Route, + Redirect +} from "react-router-dom"; + +// info view +import Info from './Views/Info' + //debug view import Debug from './Views/Debug'; import LogBoard from './Views/Debug/LogBoard' @@ -9,13 +22,26 @@ import TaskTable from './Views/Debug/TaskTable'; const Layout = ({ selected, setSelected, isConnect }) => { return ( <> - -
- } - logBoard={} - /> + + +
+ + + } + logBoard={} + /> + + + + + + + +
+
+ ); diff --git a/TbsReact/ClientApp/src/components/NavMenu.js b/TbsReact/ClientApp/src/components/NavMenu.js index 59bd31b8f..e9a2aea18 100644 --- a/TbsReact/ClientApp/src/components/NavMenu.js +++ b/TbsReact/ClientApp/src/components/NavMenu.js @@ -1,24 +1,35 @@ import React from 'react'; -import { AppBar, Container, Toolbar, Typography } from '@mui/material' +import { AppBar, Container, Toolbar, Typography, Tab, Tabs } from '@mui/material' import './NavMenu.css'; import SideBar from './sidebar/SideBar'; - - +import { + Link, +} from "react-router-dom"; const NavMenu = ({ selected, setSelected }) => { + const [value, setValue] = React.useState("/general"); + + const handleChange = (event, newValue) => { + setValue(newValue); + } return ( <> - - TbsReact - + + TbsReact + + {/*Im not sure how to change style now, that is why these tab has black instead of white color*/} + + + + From 82b9489b0b4eabad1be9acb3fed787e8fc7910ea Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Mon, 13 Dec 2021 10:54:58 +0700 Subject: [PATCH 30/69] add eslint & prettier --- TbsReact/ClientApp/.eslintrc.js | 24 + TbsReact/ClientApp/.husky/pre-commit | 4 + TbsReact/ClientApp/.lintstagedrc | 3 + TbsReact/ClientApp/README.md | 2228 -- TbsReact/ClientApp/aspnetcore-https.js | 43 +- TbsReact/ClientApp/aspnetcore-react.js | 36 +- TbsReact/ClientApp/package-lock.json | 24466 +++++++++++++++- TbsReact/ClientApp/package.json | 19 +- TbsReact/ClientApp/public/index.html | 17 +- TbsReact/ClientApp/src/App.js | 96 +- TbsReact/ClientApp/src/App.test.js | 18 +- TbsReact/ClientApp/src/api/Accounts/Access.js | 19 +- .../ClientApp/src/api/Accounts/Account.js | 72 +- TbsReact/ClientApp/src/api/Accounts/Driver.js | 84 +- TbsReact/ClientApp/src/api/Debug.js | 38 +- TbsReact/ClientApp/src/components/Layout.js | 69 +- TbsReact/ClientApp/src/components/NavMenu.css | 18 - TbsReact/ClientApp/src/components/NavMenu.js | 54 +- .../ClientApp/src/components/Views/Debug.js | 36 +- .../ClientApp/src/components/Views/Info.js | 127 +- .../src/components/sidebar/AccountRow.js | 39 +- .../src/components/sidebar/AccountTable.js | 84 +- .../src/components/sidebar/Modal/AccessRow.js | 45 +- .../components/sidebar/Modal/AccountModal.js | 460 +- .../src/components/sidebar/SideBar.js | 190 +- TbsReact/ClientApp/src/custom.css | 14 - TbsReact/ClientApp/src/hooks/usePrevious.js | 12 +- TbsReact/ClientApp/src/index.js | 19 +- TbsReact/ClientApp/src/realtime/account.js | 18 +- TbsReact/ClientApp/src/realtime/connection.js | 12 +- .../ClientApp/src/registerServiceWorker.js | 50 +- TbsReact/ClientApp/src/service-worker.js | 27 +- .../src/serviceWorkerRegistration.js | 38 +- TbsReact/ClientApp/src/setupProxy.js | 19 +- 34 files changed, 25136 insertions(+), 3362 deletions(-) create mode 100644 TbsReact/ClientApp/.eslintrc.js create mode 100644 TbsReact/ClientApp/.husky/pre-commit create mode 100644 TbsReact/ClientApp/.lintstagedrc delete mode 100644 TbsReact/ClientApp/src/components/NavMenu.css delete mode 100644 TbsReact/ClientApp/src/custom.css diff --git a/TbsReact/ClientApp/.eslintrc.js b/TbsReact/ClientApp/.eslintrc.js new file mode 100644 index 000000000..34600420e --- /dev/null +++ b/TbsReact/ClientApp/.eslintrc.js @@ -0,0 +1,24 @@ +module.exports = { + env: { + browser: true, + es2021: true, + "jest/globals": true, + }, + extends: ["plugin:react/recommended", "standard", "prettier"], + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + ecmaVersion: 12, + sourceType: "module", + }, + plugins: ["react", "jest", "react-hooks"], + rules: { + "react-hooks/exhaustive-deps": "error", + }, + settings: { + react: { + version: "detect", + }, + }, +}; diff --git a/TbsReact/ClientApp/.husky/pre-commit b/TbsReact/ClientApp/.husky/pre-commit new file mode 100644 index 000000000..68e60f9ba --- /dev/null +++ b/TbsReact/ClientApp/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +cd ./TbsReact/ClientApp && npx lint-staged \ No newline at end of file diff --git a/TbsReact/ClientApp/.lintstagedrc b/TbsReact/ClientApp/.lintstagedrc new file mode 100644 index 000000000..6e9fbfb63 --- /dev/null +++ b/TbsReact/ClientApp/.lintstagedrc @@ -0,0 +1,3 @@ +{ + "*.{js,ts,tsx,scss,css,md}": ["eslint --fix .", "prettier --write ."] +} \ No newline at end of file diff --git a/TbsReact/ClientApp/README.md b/TbsReact/ClientApp/README.md index 5a608cbdc..e69de29bb 100644 --- a/TbsReact/ClientApp/README.md +++ b/TbsReact/ClientApp/README.md @@ -1,2228 +0,0 @@ -This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). - -Below you will find some information on how to perform common tasks.
-You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md). - -## Table of Contents - -- [Updating to New Releases](#updating-to-new-releases) -- [Sending Feedback](#sending-feedback) -- [Folder Structure](#folder-structure) -- [Available Scripts](#available-scripts) - - [npm start](#npm-start) - - [npm test](#npm-test) - - [npm run build](#npm-run-build) - - [npm run eject](#npm-run-eject) -- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) -- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) -- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) -- [Debugging in the Editor](#debugging-in-the-editor) -- [Formatting Code Automatically](#formatting-code-automatically) -- [Changing the Page ``](#changing-the-page-title) -- [Installing a Dependency](#installing-a-dependency) -- [Importing a Component](#importing-a-component) -- [Code Splitting](#code-splitting) -- [Adding a Stylesheet](#adding-a-stylesheet) -- [Post-Processing CSS](#post-processing-css) -- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) -- [Adding Images, Fonts, and Files](#adding-images-fonts-and-files) -- [Using the `public` Folder](#using-the-public-folder) - - [Changing the HTML](#changing-the-html) - - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) - - [When to Use the `public` Folder](#when-to-use-the-public-folder) -- [Using Global Variables](#using-global-variables) -- [Adding Bootstrap](#adding-bootstrap) - - [Using a Custom Theme](#using-a-custom-theme) -- [Adding Flow](#adding-flow) -- [Adding Custom Environment Variables](#adding-custom-environment-variables) - - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) - - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) - - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) -- [Can I Use Decorators?](#can-i-use-decorators) -- [Integrating with an API Backend](#integrating-with-an-api-backend) - - [Node](#node) - - [Ruby on Rails](#ruby-on-rails) -- [Proxying API Requests in Development](#proxying-api-requests-in-development) - - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy) - - [Configuring the Proxy Manually](#configuring-the-proxy-manually) - - [Configuring a WebSocket Proxy](#configuring-a-websocket-proxy) -- [Using HTTPS in Development](#using-https-in-development) -- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) -- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) -- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) -- [Running Tests](#running-tests) - - [Filename Conventions](#filename-conventions) - - [Command Line Interface](#command-line-interface) - - [Version Control Integration](#version-control-integration) - - [Writing Tests](#writing-tests) - - [Testing Components](#testing-components) - - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) - - [Initializing Test Environment](#initializing-test-environment) - - [Focusing and Excluding Tests](#focusing-and-excluding-tests) - - [Coverage Reporting](#coverage-reporting) - - [Continuous Integration](#continuous-integration) - - [Disabling jsdom](#disabling-jsdom) - - [Snapshot Testing](#snapshot-testing) - - [Editor Integration](#editor-integration) -- [Developing Components in Isolation](#developing-components-in-isolation) - - [Getting Started with Storybook](#getting-started-with-storybook) - - [Getting Started with Styleguidist](#getting-started-with-styleguidist) -- [Making a Progressive Web App](#making-a-progressive-web-app) - - [Opting Out of Caching](#opting-out-of-caching) - - [Offline-First Considerations](#offline-first-considerations) - - [Progressive Web App Metadata](#progressive-web-app-metadata) -- [Analyzing the Bundle Size](#analyzing-the-bundle-size) -- [Deployment](#deployment) - - [Static Server](#static-server) - - [Other Solutions](#other-solutions) - - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) - - [Building for Relative Paths](#building-for-relative-paths) - - [Azure](#azure) - - [Firebase](#firebase) - - [GitHub Pages](#github-pages) - - [Heroku](#heroku) - - [Netlify](#netlify) - - [Now](#now) - - [S3 and CloudFront](#s3-and-cloudfront) - - [Surge](#surge) -- [Advanced Configuration](#advanced-configuration) -- [Troubleshooting](#troubleshooting) - - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) - - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) - - [`npm run build` exits too early](#npm-run-build-exits-too-early) - - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) - - [`npm run build` fails to minify](#npm-run-build-fails-to-minify) - - [Moment.js locales are missing](#momentjs-locales-are-missing) -- [Something Missing?](#something-missing) - -## Updating to New Releases - -Create React App is divided into two packages: - -* `create-react-app` is a global command-line utility that you use to create new projects. -* `react-scripts` is a development dependency in the generated projects (including this one). - -You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`. - -When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. - -To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. - -In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. - -We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. - -## Sending Feedback - -We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). - -## Folder Structure - -After creation, your project should look like this: - -``` -my-app/ - README.md - node_modules/ - package.json - public/ - index.html - favicon.ico - src/ - App.css - App.js - App.test.js - index.css - index.js - logo.svg -``` - -For the project to build, **these files must exist with exact filenames**: - -* `public/index.html` is the page template; -* `src/index.js` is the JavaScript entry point. - -You can delete or rename the other files. - -You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.<br> -You need to **put any JS and CSS files inside `src`**, otherwise Webpack won’t see them. - -Only files inside `public` can be used from `public/index.html`.<br> -Read instructions below for using assets from JavaScript and HTML. - -You can, however, create more top-level directories.<br> -They will not be included in the production build so you can use them for things like documentation. - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.<br> -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.<br> -You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.<br> -See the section about [running tests](#running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.<br> -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.<br> -Your app is ready to be deployed! - -See the section about [deployment](#deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Supported Language Features and Polyfills - -This project supports a superset of the latest JavaScript standard.<br> -In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports: - -* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016). -* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017). -* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal). -* [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal) -* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). -* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax. - -Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-). - -While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future. - -Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**: - -* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign). -* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise). -* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch). - -If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them. - -## Syntax Highlighting in the Editor - -To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered. - -## Displaying Lint Output in the Editor - ->Note: this feature is available with `react-scripts@0.2.0` and higher.<br> ->It also only works with npm 3 or higher. - -Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. - -They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. - -You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root: - -```js -{ - "extends": "react-app" -} -``` - -Now your editor should report the linting warnings. - -Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes. - -If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules. - -## Debugging in the Editor - -**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).** - -Visual Studio Code and WebStorm support debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools. - -### Visual Studio Code - -You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed. - -Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory. - -```json -{ - "version": "0.2.0", - "configurations": [{ - "name": "Chrome", - "type": "chrome", - "request": "launch", - "url": "http://localhost:3000", - "webRoot": "${workspaceRoot}/src", - "sourceMapPathOverrides": { - "webpack:///src/*": "${webRoot}/*" - } - }] -} -``` ->Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). - -Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor. - -Having problems with VS Code Debugging? Please see their [troubleshooting guide](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#troubleshooting). - -### WebStorm - -You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed. - -In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration. - ->Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). - -Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm. - -The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine. - -## Formatting Code Automatically - -Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/). - -To format our code whenever we make a commit in git, we need to install the following dependencies: - -```sh -npm install --save husky lint-staged prettier -``` - -Alternatively you may use `yarn`: - -```sh -yarn add husky lint-staged prettier -``` - -* `husky` makes it easy to use githooks as if they are npm scripts. -* `lint-staged` allows us to run scripts on staged files in git. See this [blog post about lint-staged to learn more about it](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8). -* `prettier` is the JavaScript formatter we will run before commits. - -Now we can make sure every file is formatted correctly by adding a few lines to the `package.json` in the project root. - -Add the following line to `scripts` section: - -```diff - "scripts": { -+ "precommit": "lint-staged", - "start": "react-scripts start", - "build": "react-scripts build", -``` - -Next we add a 'lint-staged' field to the `package.json`, for example: - -```diff - "dependencies": { - // ... - }, -+ "lint-staged": { -+ "src/**/*.{js,jsx,json,css}": [ -+ "prettier --single-quote --write", -+ "git add" -+ ] -+ }, - "scripts": { -``` - -Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --single-quote --write "src/**/*.{js,jsx}"` to format your entire project for the first time. - -Next you might want to integrate Prettier in your favorite editor. Read the section on [Editor Integration](https://github.com/prettier/prettier#editor-integration) on the Prettier GitHub page. - -## Changing the Page `<title>` - -You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else. - -Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML. - -If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library. - -If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files). - -## Installing a Dependency - -The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: - -```sh -npm install --save react-router -``` - -Alternatively you may use `yarn`: - -```sh -yarn add react-router -``` - -This works for any library, not just `react-router`. - -## Importing a Component - -This project setup supports ES6 modules thanks to Babel.<br> -While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. - -For example: - -### `Button.js` - -```js -import React, { Component } from 'react'; - -class Button extends Component { - render() { - // ... - } -} - -export default Button; // Don’t forget to use export default! -``` - -### `DangerButton.js` - - -```js -import React, { Component } from 'react'; -import Button from './Button'; // Import a component from another file - -class DangerButton extends Component { - render() { - return <Button color="red" />; - } -} - -export default DangerButton; -``` - -Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. - -We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. - -Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. - -Learn more about ES6 modules: - -* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) -* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) -* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) - -## Code Splitting - -Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand. - -This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 3. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module. - -Here is an example: - -### `moduleA.js` - -```js -const moduleA = 'Hello'; - -export { moduleA }; -``` -### `App.js` - -```js -import React, { Component } from 'react'; - -class App extends Component { - handleClick = () => { - import('./moduleA') - .then(({ moduleA }) => { - // Use moduleA - }) - .catch(err => { - // Handle failure - }); - }; - - render() { - return ( - <div> - <button onClick={this.handleClick}>Load</button> - </div> - ); - } -} - -export default App; -``` - -This will make `moduleA.js` and all its unique dependencies as a separate chunk that only loads after the user clicks the 'Load' button. - -You can also use it with `async` / `await` syntax if you prefer it. - -### With React Router - -If you are using React Router check out [this tutorial](http://serverless-stack.com/chapters/code-splitting-in-create-react-app.html) on how to use code splitting with it. You can find the companion GitHub repository [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client/tree/code-splitting-in-create-react-app). - -## Adding a Stylesheet - -This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: - -### `Button.css` - -```css -.Button { - padding: 20px; -} -``` - -### `Button.js` - -```js -import React, { Component } from 'react'; -import './Button.css'; // Tell Webpack that Button.js uses these styles - -class Button extends Component { - render() { - // You can use them as regular CSS styles - return <div className="Button" />; - } -} -``` - -**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. - -In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. - -If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. - -## Post-Processing CSS - -This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. - -For example, this: - -```css -.App { - display: flex; - flex-direction: row; - align-items: center; -} -``` - -becomes this: - -```css -.App { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -``` - -If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling). - -## Adding a CSS Preprocessor (Sass, Less etc.) - -Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)). - -Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative. - -First, let’s install the command-line interface for Sass: - -```sh -npm install --save node-sass-chokidar -``` - -Alternatively you may use `yarn`: - -```sh -yarn add node-sass-chokidar -``` - -Then in `package.json`, add the following lines to `scripts`: - -```diff - "scripts": { -+ "build-css": "node-sass-chokidar src/ -o src/", -+ "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test --env=jsdom", -``` - ->Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. - -Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated. - -To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions. - -To enable importing files without using relative paths, you can add the `--include-path` option to the command in `package.json`. - -``` -"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/", -"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive", -``` - -This will allow you to do imports like - -```scss -@import 'styles/_colors.scss'; // assuming a styles directory under src/ -@import 'nprogress/nprogress'; // importing a css file from the nprogress node module -``` - -At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control. - -As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use the `&&` operator to execute two scripts sequentially. However, there is no cross-platform way to run two scripts in parallel, so we will install a package for this: - -```sh -npm install --save npm-run-all -``` - -Alternatively you may use `yarn`: - -```sh -yarn add npm-run-all -``` - -Then we can change `start` and `build` scripts to include the CSS preprocessor commands: - -```diff - "scripts": { - "build-css": "node-sass-chokidar src/ -o src/", - "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", -- "start": "react-scripts start", -- "build": "react-scripts build", -+ "start-js": "react-scripts start", -+ "start": "npm-run-all -p watch-css start-js", -+ "build-js": "react-scripts build", -+ "build": "npm-run-all build-css build-js", - "test": "react-scripts test --env=jsdom", - "eject": "react-scripts eject" - } -``` - -Now running `npm start` and `npm run build` also builds Sass files. - -**Why `node-sass-chokidar`?** - -`node-sass` has been reported as having the following issues: - -- `node-sass --watch` has been reported to have *performance issues* in certain conditions when used in a virtual machine or with docker. - -- Infinite styles compiling [#1939](https://github.com/facebookincubator/create-react-app/issues/1939) - -- `node-sass` has been reported as having issues with detecting new files in a directory [#1891](https://github.com/sass/node-sass/issues/1891) - - `node-sass-chokidar` is used here as it addresses these issues. - -## Adding Images, Fonts, and Files - -With Webpack, using static assets like images and fonts works similarly to CSS. - -You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF. - -To reduce the number of requests to the server, importing images that are less than 10,000 bytes returns a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) instead of a path. This applies to the following file extensions: bmp, gif, jpg, jpeg, and png. SVG files are excluded due to [#1153](https://github.com/facebookincubator/create-react-app/issues/1153). - -Here is an example: - -```js -import React from 'react'; -import logo from './logo.png'; // Tell Webpack this JS file uses this image - -console.log(logo); // /logo.84287d09.png - -function Header() { - // Import result is the URL of your image - return <img src={logo} alt="Logo" />; -} - -export default Header; -``` - -This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths. - -This works in CSS too: - -```css -.Logo { - background-image: url(./logo.png); -} -``` - -Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. - -Please be advised that this is also a custom feature of Webpack. - -**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).<br> -An alternative way of handling static assets is described in the next section. - -## Using the `public` Folder - ->Note: this feature is available with `react-scripts@0.5.0` and higher. - -### Changing the HTML - -The `public` folder contains the HTML file so you can tweak it, for example, to [set the page title](#changing-the-page-title). -The `<script>` tag with the compiled code will be added to it automatically during the build process. - -### Adding Assets Outside of the Module System - -You can also add other assets to the `public` folder. - -Note that we normally encourage you to `import` assets in JavaScript files instead. -For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-fonts-and-files). -This mechanism provides a number of benefits: - -* Scripts and stylesheets get minified and bundled together to avoid extra network requests. -* Missing files cause compilation errors instead of 404 errors for your users. -* Result filenames include content hashes so you don’t need to worry about browsers caching their old versions. - -However there is an **escape hatch** that you can use to add an asset outside of the module system. - -If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. - -Inside `index.html`, you can use it like this: - -```html -<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> -``` - -Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build. - -When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL. - -In JavaScript code, you can use `process.env.PUBLIC_URL` for similar purposes: - -```js -render() { - // Note: this is an escape hatch and should be used sparingly! - // Normally we recommend using `import` for getting asset URLs - // as described in “Adding Images and Fonts” above this section. - return <img src={process.env.PUBLIC_URL + '/img/logo.png'} />; -} -``` - -Keep in mind the downsides of this approach: - -* None of the files in `public` folder get post-processed or minified. -* Missing files will not be called at compilation time, and will cause 404 errors for your users. -* Result filenames won’t include content hashes so you’ll need to add query arguments or rename them every time they change. - -### When to Use the `public` Folder - -Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-fonts-and-files) from JavaScript. -The `public` folder is useful as a workaround for a number of less common cases: - -* You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest). -* You have thousands of images and need to dynamically reference their paths. -* You want to include a small script like [`pace.js`](http://github.hubspot.com/pace/docs/welcome/) outside of the bundled code. -* Some library may be incompatible with Webpack and you have no other option but to include it as a `<script>` tag. - -Note that if you add a `<script>` that declares global variables, you also need to read the next section on using them. - -## Using Global Variables - -When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable. - -You can avoid this by reading the global variable explicitly from the `window` object, for example: - -```js -const $ = window.$; -``` - -This makes it obvious you are using a global variable intentionally rather than because of a typo. - -Alternatively, you can force the linter to ignore any line by adding `// eslint-disable-line` after it. - -## Adding Bootstrap - -You don’t have to use [Reactstrap](https://reactstrap.github.io/) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: - -Install Reactstrap and Bootstrap from npm. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: - -```sh -npm install --save reactstrap bootstrap@4 -``` - -Alternatively you may use `yarn`: - -```sh -yarn add reactstrap bootstrap@4 -``` - -Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file: - -```js -import 'bootstrap/dist/css/bootstrap.css'; -// Put any other imports below so that CSS from your -// components takes precedence over default styles. -``` - -Import required React Bootstrap components within ```src/App.js``` file or your custom component files: - -```js -import { Navbar, Button } from 'reactstrap'; -``` - -Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. - -### Using a Custom Theme - -Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br> -We suggest the following approach: - -* Create a new package that depends on the package you wish to customize, e.g. Bootstrap. -* Add the necessary build steps to tweak the theme, and publish your package on npm. -* Install your own theme npm package as a dependency of your app. - -Here is an example of adding a [customized Bootstrap](https://medium.com/@tacomanator/customizing-create-react-app-aa9ffb88165) that follows these steps. - -## Adding Flow - -Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. - -Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box. - -To add Flow to a Create React App project, follow these steps: - -1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). -2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. -3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. -4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). - -Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. -You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience. -In the future we plan to integrate it into Create React App even more closely. - -To learn more about Flow, check out [its documentation](https://flowtype.org/). - -## Adding Custom Environment Variables - ->Note: this feature is available with `react-scripts@0.2.3` and higher. - -Your project can consume variables declared in your environment as if they were declared locally in your JS files. By -default you will have `NODE_ENV` defined for you, and any other environment variables starting with -`REACT_APP_`. - -**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them. - ->Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. - -These environment variables will be defined for you on `process.env`. For example, having an environment -variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`. - -There is also a special built-in environment variable called `NODE_ENV`. You can read it from `process.env.NODE_ENV`. When you run `npm start`, it is always equal to `'development'`, when you run `npm test` it is always equal to `'test'`, and when you run `npm run build` to make a production bundle, it is always equal to `'production'`. **You cannot override `NODE_ENV` manually.** This prevents developers from accidentally deploying a slow development build to production. - -These environment variables can be useful for displaying information conditionally based on where the project is -deployed or consuming sensitive data that lives outside of version control. - -First, you need to have environment variables defined. For example, let’s say you wanted to consume a secret defined -in the environment inside a `<form>`: - -```jsx -render() { - return ( - <div> - <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> - <form> - <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> - </form> - </div> - ); -} -``` - -During the build, `process.env.REACT_APP_SECRET_CODE` will be replaced with the current value of the `REACT_APP_SECRET_CODE` environment variable. Remember that the `NODE_ENV` variable will be set for you automatically. - -When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: - -```html -<div> - <small>You are running this application in <b>development</b> mode.</small> - <form> - <input type="hidden" value="abcdef" /> - </form> -</div> -``` - -The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this -value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in -a `.env` file. Both of these ways are described in the next few sections. - -Having access to the `NODE_ENV` is also useful for performing actions conditionally: - -```js -if (process.env.NODE_ENV !== 'production') { - analytics.disable(); -} -``` - -When you compile the app with `npm run build`, the minification step will strip out this condition, and the resulting bundle will be smaller. - -### Referencing Environment Variables in the HTML - ->Note: this feature is available with `react-scripts@0.9.0` and higher. - -You can also access the environment variables starting with `REACT_APP_` in the `public/index.html`. For example: - -```html -<title>%REACT_APP_WEBSITE_NAME% -``` - -Note that the caveats from the above section apply: - -* Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work. -* The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](#generating-dynamic-meta-tags-on-the-server). - -### Adding Temporary Environment Variables In Your Shell - -Defining environment variables can vary between OSes. It’s also important to know that this manner is temporary for the -life of the shell session. - -#### Windows (cmd.exe) - -```cmd -set REACT_APP_SECRET_CODE=abcdef&&npm start -``` - -(Note: the lack of whitespace is intentional.) - -#### Linux, macOS (Bash) - -```bash -REACT_APP_SECRET_CODE=abcdef npm start -``` - -### Adding Development Environment Variables In `.env` - ->Note: this feature is available with `react-scripts@0.5.0` and higher. - -To define permanent environment variables, create a file called `.env` in the root of your project: - -``` -REACT_APP_SECRET_CODE=abcdef -``` - -`.env` files **should be** checked into source control (with the exclusion of `.env*.local`). - -#### What other `.env` files can be used? - ->Note: this feature is **available with `react-scripts@1.0.0` and higher**. - -* `.env`: Default. -* `.env.local`: Local overrides. **This file is loaded for all environments except test.** -* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings. -* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings. - -Files on the left have more priority than files on the right: - -* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env` -* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env` -* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing) - -These variables will act as the defaults if the machine does not explicitly set them.
-Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. - ->Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need -these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). - -## Can I Use Decorators? - -Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
-Create React App doesn’t support decorator syntax at the moment because: - -* It is an experimental proposal and is subject to change. -* The current specification version is not officially supported by Babel. -* If the specification changes, we won’t be able to write a codemod because we don’t use them internally at Facebook. - -However in many cases you can rewrite decorator-based code without decorators just as fine.
-Please refer to these two threads for reference: - -* [#214](https://github.com/facebookincubator/create-react-app/issues/214) -* [#411](https://github.com/facebookincubator/create-react-app/issues/411) - -Create React App will add decorator support when the specification advances to a stable stage. - -## Integrating with an API Backend - -These tutorials will help you to integrate your app with an API backend running on another port, -using `fetch()` to access it. - -### Node -Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/). -You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). - -### Ruby on Rails - -Check out [this tutorial](https://www.fullstackreact.com/articles/how-to-get-create-react-app-to-work-with-your-rails-api/). -You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo-rails). - -## Proxying API Requests in Development - ->Note: this feature is available with `react-scripts@0.2.3` and higher. - -People often serve the front-end React app from the same host and port as their backend implementation.
-For example, a production setup might look like this after the app is deployed: - -``` -/ - static server returns index.html with React app -/todos - static server returns index.html with React app -/api/todos - server handles any /api/* requests using the backend implementation -``` - -Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. - -To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: - -```js - "proxy": "http://localhost:4000", -``` - -This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will **only** attempt to send requests without `text/html` in its `Accept` header to the proxy. - -Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: - -``` -Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. -``` - -Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`. - -The `proxy` option supports HTTP, HTTPS and WebSocket connections.
-If the `proxy` option is **not** flexible enough for you, alternatively you can: - -* [Configure the proxy yourself](#configuring-the-proxy-manually) -* Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). -* Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. - -### "Invalid Host Header" Errors After Configuring Proxy - -When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. The issue is explained in [this article](https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a) and [this issue](https://github.com/webpack/webpack-dev-server/issues/887). - -This shouldn’t affect you when developing on `localhost`, but if you develop remotely like [described here](https://github.com/facebookincubator/create-react-app/issues/2271), you will see this error in the browser after enabling the `proxy` option: - ->Invalid Host header - -To work around it, you can specify your public development host in a file called `.env.development` in the root of your project: - -``` -HOST=mypublicdevhost.com -``` - -If you restart the development server now and load the app from the specified host, it should work. - -If you are still having issues or if you’re using a more exotic environment like a cloud editor, you can bypass the host check completely by adding a line to `.env.development.local`. **Note that this is dangerous and exposes your machine to remote code execution from malicious websites:** - -``` -# NOTE: THIS IS DANGEROUS! -# It exposes your machine to attacks from the websites you visit. -DANGEROUSLY_DISABLE_HOST_CHECK=true -``` - -We don’t recommend this approach. - -### Configuring the Proxy Manually - ->Note: this feature is available with `react-scripts@1.0.0` and higher. - -If the `proxy` option is **not** flexible enough for you, you can specify an object in the following form (in `package.json`).
-You may also specify any configuration value [`http-proxy-middleware`](https://github.com/chimurai/http-proxy-middleware#options) or [`http-proxy`](https://github.com/nodejitsu/node-http-proxy#options) supports. -```js -{ - // ... - "proxy": { - "/api": { - "target": "", - "ws": true - // ... - } - } - // ... -} -``` - -All requests matching this path will be proxies, no exceptions. This includes requests for `text/html`, which the standard `proxy` option does not proxy. - -If you need to specify multiple proxies, you may do so by specifying additional entries. -Matches are regular expressions, so that you can use a regexp to match multiple paths. -```js -{ - // ... - "proxy": { - // Matches any request starting with /api - "/api": { - "target": "", - "ws": true - // ... - }, - // Matches any request starting with /foo - "/foo": { - "target": "", - "ssl": true, - "pathRewrite": { - "^/foo": "/foo/beta" - } - // ... - }, - // Matches /bar/abc.html but not /bar/sub/def.html - "/bar/[^/]*[.]html": { - "target": "", - // ... - }, - // Matches /baz/abc.html and /baz/sub/def.html - "/baz/.*/.*[.]html": { - "target": "" - // ... - } - } - // ... -} -``` - -### Configuring a WebSocket Proxy - -When setting up a WebSocket proxy, there are a some extra considerations to be aware of. - -If you’re using a WebSocket engine like [Socket.io](https://socket.io/), you must have a Socket.io server running that you can use as the proxy target. Socket.io will not work with a standard WebSocket server. Specifically, don't expect Socket.io to work with [the websocket.org echo test](http://websocket.org/echo.html). - -There’s some good documentation available for [setting up a Socket.io server](https://socket.io/docs/). - -Standard WebSockets **will** work with a standard WebSocket server as well as the websocket.org echo test. You can use libraries like [ws](https://github.com/websockets/ws) for the server, with [native WebSockets in the browser](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). - -Either way, you can proxy WebSocket requests manually in `package.json`: - -```js -{ - // ... - "proxy": { - "/socket": { - // Your compatible WebSocket server - "target": "ws://", - // Tell http-proxy-middleware that this is a WebSocket proxy. - // Also allows you to proxy WebSocket requests without an additional HTTP request - // https://github.com/chimurai/http-proxy-middleware#external-websocket-upgrade - "ws": true - // ... - } - } - // ... -} -``` - -## Using HTTPS in Development - ->Note: this feature is available with `react-scripts@0.4.0` and higher. - -You may require the dev server to serve pages over HTTPS. One particular case where this could be useful is when using [the "proxy" feature](#proxying-api-requests-in-development) to proxy requests to an API server when that API server is itself serving HTTPS. - -To do this, set the `HTTPS` environment variable to `true`, then start the dev server as usual with `npm start`: - -#### Windows (cmd.exe) - -```cmd -set HTTPS=true&&npm start -``` - -(Note: the lack of whitespace is intentional.) - -#### Linux, macOS (Bash) - -```bash -HTTPS=true npm start -``` - -Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page. - -## Generating Dynamic `` Tags on the Server - -Since Create React App doesn’t support server rendering, you might be wondering how to make `` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this: - -```html - - - - - -``` - -Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG_TITLE__`, `__OG_DESCRIPTION__`, and any other placeholders with values depending on the current URL. Just make sure to sanitize and escape the interpolated values so that they are safe to embed into HTML! - -If you use a Node server, you can even share the route matching logic between the client and the server. However duplicating it also works fine in simple cases. - -## Pre-Rendering into Static HTML Files - -If you’re hosting your `build` with a static hosting provider you can use [react-snapshot](https://www.npmjs.com/package/react-snapshot) or [react-snap](https://github.com/stereobooster/react-snap) to generate HTML pages for each route, or relative link, in your application. These pages will then seamlessly become active, or “hydrated”, when the JavaScript bundle has loaded. - -There are also opportunities to use this outside of static hosting, to take the pressure off the server when generating and caching routes. - -The primary benefit of pre-rendering is that you get the core content of each page _with_ the HTML payload—regardless of whether or not your JavaScript bundle successfully downloads. It also increases the likelihood that each route of your application will be picked up by search engines. - -You can read more about [zero-configuration pre-rendering (also called snapshotting) here](https://medium.com/superhighfives/an-almost-static-stack-6df0a2791319). - -## Injecting Data from the Server into the Page - -Similarly to the previous section, you can leave some placeholders in the HTML that inject global variables, for example: - -```js - - - - -``` - -Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.** - -## Running Tests - ->Note: this feature is available with `react-scripts@0.3.0` and higher.
->[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) - -Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try. - -Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness. - -While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks. - -We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App. - -### Filename Conventions - -Jest will look for test files with any of the following popular naming conventions: - -* Files with `.js` suffix in `__tests__` folders. -* Files with `.test.js` suffix. -* Files with `.spec.js` suffix. - -The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder. - -We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects. - -### Command Line Interface - -When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code. - -The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run: - -![Jest watch mode](http://facebook.github.io/jest/img/blog/15-watch.gif) - -### Version Control Integration - -By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests run fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. - -Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests. - -Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository. - -### Writing Tests - -To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended. - -Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this: - -```js -import sum from './sum'; - -it('sums numbers', () => { - expect(sum(1, 2)).toEqual(3); - expect(sum(2, 2)).toEqual(4); -}); -``` - -All `expect()` matchers supported by Jest are [extensively documented here](https://facebook.github.io/jest/docs/en/expect.html#content).
-You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](https://facebook.github.io/jest/docs/en/expect.html#tohavebeencalled) to create “spies” or mock functions. - -### Testing Components - -There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes. - -Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components: - -```js -import React from 'react'; -import ReactDOM from 'react-dom'; -import App from './App'; - -it('renders without crashing', () => { - const div = document.createElement('div'); - ReactDOM.render(, div); -}); -``` - -This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. - -When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior. - -If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). To install it, run: - -```sh -npm install --save enzyme enzyme-adapter-react-16 react-test-renderer -``` - -Alternatively you may use `yarn`: - -```sh -yarn add enzyme enzyme-adapter-react-16 react-test-renderer -``` - -As of Enzyme 3, you will need to install Enzyme along with an Adapter corresponding to the version of React you are using. (The examples above use the adapter for React 16.) - -The adapter will also need to be configured in your [global setup file](#initializing-test-environment): - -#### `src/setupTests.js` -```js -import { configure } from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; - -configure({ adapter: new Adapter() }); -``` - -Now you can write a smoke test with it: - -```js -import React from 'react'; -import { shallow } from 'enzyme'; -import App from './App'; - -it('renders without crashing', () => { - shallow(); -}); -``` - -Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a ` - - - ); -}; -ChromeSettings.propTypes = { - selected: PropTypes.number.isRequired, -}; -export default ChromeSettings; diff --git a/TbsReact/ClientApp/src/components/Views/General.js b/TbsReact/ClientApp/src/components/Views/Setting.js similarity index 86% rename from TbsReact/ClientApp/src/components/Views/General.js rename to TbsReact/ClientApp/src/components/Views/Setting.js index 32ee89a02..e4aa81e98 100644 --- a/TbsReact/ClientApp/src/components/Views/General.js +++ b/TbsReact/ClientApp/src/components/Views/Setting.js @@ -1,6 +1,6 @@ import React from "react"; import PropTypes from "prop-types"; -import ChromeSettings from "./GeneralChild/ChromeSettings"; +import ChromeSettings from "./SettingChild/ChromeSettings"; import { Grid } from "@mui/material"; const General = ({ selected }) => { diff --git a/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js b/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js new file mode 100644 index 000000000..820772591 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js @@ -0,0 +1,257 @@ +import PropTypes from "prop-types"; +import React, { useEffect } from "react"; +import { useForm } from "react-hook-form"; +import { + List, + ListItem, + ListItemText, + Grid, + Typography, + TextField, + Button, + Switch, + Box, +} from "@mui/material"; +import { yupResolver } from "@hookform/resolvers/yup"; +import * as yup from "yup"; + +import { getChromeSetting, setChromeSetting } from "../../../api/Setting"; + +const schema = yup + .object() + .shape({ + work_min: yup + .number() + .min(1) + .integer() + .label("Work time min") + .typeError("Work time min must be a number"), + work_max: yup + .number() + .moreThan(yup.ref("work_min")) + .integer() + .label("Work time max") + .typeError("Work time max must be a number"), + sleep_min: yup + .number() + .min(1) + .integer() + .label("Sleep time min") + .typeError("Sleep time min must be a number"), + sleep_max: yup + .number() + .moreThan(yup.ref("sleep_min")) + .integer() + .label("Sleep time max") + .typeError("Sleep time max must be a number"), + click_min: yup + .number() + .min(1) + .integer() + .label("Click time min") + .typeError("Click time min must be a number"), + click_max: yup + .number() + .moreThan(yup.ref("click_min")) + .integer() + .label("Click time max") + .typeError("Click time max must be a number"), + }) + .required(); + +const style = { + bgcolor: "background.paper", + border: "2px solid #000", + boxShadow: 24, + p: 4, + width: "100%", + height: "100%", +}; +const ChromeSettings = ({ selected }) => { + const { + register, + handleSubmit, + formState: { errors }, + setValue, + } = useForm({ + resolver: yupResolver(schema), + }); + + const onSubmit = async (data) => { + await setChromeSetting(selected, data); + }; + + useEffect(() => { + if (selected !== -1) { + getChromeSetting(selected).then((data) => { + const { workTime, sleepTime, disableImages, click, autoClose } = + data; + setValue("work_min", workTime.min); + setValue("work_max", workTime.max); + setValue("sleep_min", sleepTime.min); + setValue("sleep_max", sleepTime.max); + setValue("click_min", click.min); + setValue("click_max", click.max); + setValue("disable_image", disableImages); + setValue("close_chrome", autoClose); + }); + } + }, [selected, setValue]); + + return ( + <> + + + Chrome settings + +
+ + + + Work time + + + + + + + + + + + + Sleep time + + + + + + + + + + + + Click delay + + + + + + + + + + + + + + + + + + + + + + +
+
+ + ); +}; +ChromeSettings.propTypes = { + selected: PropTypes.number.isRequired, +}; +export default ChromeSettings; From ab3a8ee9cf0a61f57f24bda2bb5e81d0c2045223 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 16 Jan 2022 17:46:59 +0700 Subject: [PATCH 36/69] add notify --- TbsReact/ClientApp/.lintstagedrc | 2 +- TbsReact/ClientApp/package-lock.json | 21 +++++++++++++++++++ TbsReact/ClientApp/package.json | 1 + TbsReact/ClientApp/src/App.js | 5 +++++ .../Views/SettingChild/ChromeSettings.js | 4 ++++ 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/TbsReact/ClientApp/.lintstagedrc b/TbsReact/ClientApp/.lintstagedrc index 4cfd38a47..662cb95c5 100644 --- a/TbsReact/ClientApp/.lintstagedrc +++ b/TbsReact/ClientApp/.lintstagedrc @@ -1,3 +1,3 @@ { - "*.{js,ts,tsx,scss,css,md}": ["eslint ./src", "prettier --check ./src"] + "*.{js,ts,tsx,scss,css,md}": ["eslint --fix", "prettier --write"] } \ No newline at end of file diff --git a/TbsReact/ClientApp/package-lock.json b/TbsReact/ClientApp/package-lock.json index d218c1b93..e5d70f1e0 100644 --- a/TbsReact/ClientApp/package-lock.json +++ b/TbsReact/ClientApp/package-lock.json @@ -30,6 +30,7 @@ "react-router-dom": "^5.2.0", "react-scripts": "^4.0.3", "react-table": "^7.7.0", + "react-toastify": "^8.1.0", "reactstrap": "^8.9.0", "rimraf": "^2.6.2", "web-vitals": "^0.2.4", @@ -18206,6 +18207,18 @@ "react": "^16.8.3 || ^17.0.0-0" } }, + "node_modules/react-toastify": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-8.1.0.tgz", + "integrity": "sha512-M+Q3rTmEw/53Csr7NsV/YnldJe4c7uERcY7Tma9mvLU98QT2VhIkKwjBzzxZkJRk/oBKyUAtkyMjMgO00hx6gQ==", + "dependencies": { + "clsx": "^1.1.1" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, "node_modules/react-transition-group": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", @@ -37058,6 +37071,14 @@ "integrity": "sha512-jBlj70iBwOTvvImsU9t01LjFjy4sXEtclBovl3mTiqjz23Reu0DKnRza4zlLtOPACx6j2/7MrQIthIK1Wi+LIA==", "requires": {} }, + "react-toastify": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-8.1.0.tgz", + "integrity": "sha512-M+Q3rTmEw/53Csr7NsV/YnldJe4c7uERcY7Tma9mvLU98QT2VhIkKwjBzzxZkJRk/oBKyUAtkyMjMgO00hx6gQ==", + "requires": { + "clsx": "^1.1.1" + } + }, "react-transition-group": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index b49282395..9b7a382c6 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -25,6 +25,7 @@ "react-router-dom": "^5.2.0", "react-scripts": "^4.0.3", "react-table": "^7.7.0", + "react-toastify": "^8.1.0", "reactstrap": "^8.9.0", "rimraf": "^2.6.2", "web-vitals": "^0.2.4", diff --git a/TbsReact/ClientApp/src/App.js b/TbsReact/ClientApp/src/App.js index 08bf2bfb0..61b05ee65 100644 --- a/TbsReact/ClientApp/src/App.js +++ b/TbsReact/ClientApp/src/App.js @@ -1,10 +1,15 @@ import React, { useState, useEffect } from "react"; +import { toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; + import Layout from "./components/Layout"; import { signalRConnection, initConnection } from "./realtime/connection"; import { changeAccount } from "./realtime/account"; import { usePrevious } from "./hooks/usePrevious"; const App = () => { + toast.configure(); + const [selected, setSelected] = useState(-1); const [joined, setJoined] = useState(false); const prev = usePrevious(selected); diff --git a/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js b/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js index 820772591..ac6521073 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js @@ -14,6 +14,7 @@ import { } from "@mui/material"; import { yupResolver } from "@hookform/resolvers/yup"; import * as yup from "yup"; +import { toast } from "react-toastify"; import { getChromeSetting, setChromeSetting } from "../../../api/Setting"; @@ -79,6 +80,9 @@ const ChromeSettings = ({ selected }) => { const onSubmit = async (data) => { await setChromeSetting(selected, data); + toast.success("Chrome settings saved !", { + position: toast.POSITION.TOP_RIGHT, + }); }; useEffect(() => { From b39971ac5406a1d878f106ede70d7017a980c942 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 16 Jan 2022 18:11:30 +0700 Subject: [PATCH 37/69] change color tab --- TbsReact/ClientApp/src/components/Header/LeftHeader.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/TbsReact/ClientApp/src/components/Header/LeftHeader.js b/TbsReact/ClientApp/src/components/Header/LeftHeader.js index 83f343f32..d102ee85d 100644 --- a/TbsReact/ClientApp/src/components/Header/LeftHeader.js +++ b/TbsReact/ClientApp/src/components/Header/LeftHeader.js @@ -10,9 +10,8 @@ const LeftHeader = ({ selected, setSelected }) => { }; return ( <> - - {/* Im not sure how to change style now, that is why these tab has black instead of white color */} - + + Date: Tue, 18 Jan 2022 00:50:17 +0700 Subject: [PATCH 38/69] add redux --- TbsReact/ClientApp/package-lock.json | 392 +++++++++++++----- TbsReact/ClientApp/package.json | 7 +- .../src/components/Header/LeftHeader.js | 8 +- .../src/components/sidebar/AccountTable.js | 31 +- .../components/sidebar/Modal/AccountModal.js | 27 +- .../src/components/sidebar/SideBar.js | 57 ++- TbsReact/ClientApp/src/index.js | 28 +- TbsReact/ClientApp/src/slices/account.js | 38 ++ TbsReact/ClientApp/src/store.js | 36 ++ 9 files changed, 460 insertions(+), 164 deletions(-) create mode 100644 TbsReact/ClientApp/src/slices/account.js create mode 100644 TbsReact/ClientApp/src/store.js diff --git a/TbsReact/ClientApp/package-lock.json b/TbsReact/ClientApp/package-lock.json index e5d70f1e0..3f8287bba 100644 --- a/TbsReact/ClientApp/package-lock.json +++ b/TbsReact/ClientApp/package-lock.json @@ -17,6 +17,7 @@ "@mui/styles": "^5.2.3", "@mui/x-data-grid": "^5.2.0", "@mui/x-data-grid-generator": "^5.2.0", + "@reduxjs/toolkit": "^1.7.1", "axios": "^0.24.0", "bootstrap": "^5.1.0", "http-proxy-middleware": "^0.19.1", @@ -26,13 +27,15 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-hook-form": "^7.22.4", + "react-redux": "^7.2.6", "react-router-bootstrap": "^0.25.0", "react-router-dom": "^5.2.0", "react-scripts": "^4.0.3", "react-table": "^7.7.0", "react-toastify": "^8.1.0", "reactstrap": "^8.9.0", - "rimraf": "^2.6.2", + "redux": "^4.1.2", + "redux-persist": "^6.0.0", "web-vitals": "^0.2.4", "workbox-background-sync": "^5.1.3", "workbox-broadcast-update": "^5.1.3", @@ -66,6 +69,8 @@ "husky": "^7.0.4", "lint-staged": "^12.1.2", "nan": "^2.14.2", + "redux-devtools-extension": "^2.13.9", + "rimraf": "^3.0.2", "typescript": "^4.2.4" } }, @@ -2494,20 +2499,6 @@ "node": ">=8" } }, - "node_modules/@jest/core/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@jest/core/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3496,20 +3487,6 @@ "node": ">=10" } }, - "node_modules/@npmcli/move-file/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@pmmmwh/react-refresh-webpack-plugin": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.3.tgz", @@ -3573,6 +3550,38 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@reduxjs/toolkit": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.7.1.tgz", + "integrity": "sha512-wXwXYjBVz/ItxB7SMzEAMmEE/FBiY1ze18N+VVVX7NtVbRUrdOGKhpQMHivIJfkbJvSdLUU923a/yAagJQzY0Q==", + "dependencies": { + "immer": "^9.0.7", + "redux": "^4.1.2", + "redux-thunk": "^2.4.1", + "reselect": "^4.1.5" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || 18.0.0-beta", + "react-redux": "^7.2.1 || ^8.0.0-beta" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-redux": { + "optional": true + } + } + }, + "node_modules/@reduxjs/toolkit/node_modules/immer": { + "version": "9.0.12", + "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz", + "integrity": "sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, "node_modules/@rollup/plugin-node-resolve": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", @@ -3937,6 +3946,15 @@ "@types/node": "*" } }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "node_modules/@types/html-minifier-terser": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz", @@ -4031,6 +4049,17 @@ "@types/react": "*" } }, + "node_modules/@types/react-redux": { + "version": "7.1.22", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.22.tgz", + "integrity": "sha512-GxIA1kM7ClU73I6wg9IRTVwSO9GS+SAKZKe0Enj+82HMU6aoESFU2HNAdNi3+J53IaOHPiUfT3kSG4L828joDQ==", + "dependencies": { + "@types/hoist-non-react-statics": "^3.3.0", + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0", + "redux": "^4.0.0" + } + }, "node_modules/@types/react-transition-group": { "version": "4.4.4", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", @@ -6003,20 +6032,6 @@ "node": ">=10" } }, - "node_modules/cacache/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -6740,6 +6755,17 @@ "run-queue": "^1.0.0" } }, + "node_modules/copy-concurrently/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -7626,6 +7652,17 @@ "node": ">=6" } }, + "node_modules/del/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -9798,20 +9835,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/flatted": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", @@ -15122,6 +15145,17 @@ "run-queue": "^1.0.3" } }, + "node_modules/move-concurrently/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -17994,6 +18028,35 @@ "react": "0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/react-redux": { + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.6.tgz", + "integrity": "sha512-10RPdsz0UUrRL1NZE0ejTkucnclYSgXp5q+tB5SWx2qeG2ZJQJyymgAhwKy73yiL/13btfB6fPr+rgbMAaZIAQ==", + "dependencies": { + "@babel/runtime": "^7.15.4", + "@types/react-redux": "^7.1.20", + "hoist-non-react-statics": "^3.3.2", + "loose-envify": "^1.4.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "peerDependencies": { + "react": "^16.8.3 || ^17" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/react-redux/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + }, "node_modules/react-refresh": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz", @@ -18300,6 +18363,40 @@ "node": ">=0.10.0" } }, + "node_modules/redux": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.2.tgz", + "integrity": "sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw==", + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, + "node_modules/redux-devtools-extension": { + "version": "2.13.9", + "resolved": "https://registry.npmjs.org/redux-devtools-extension/-/redux-devtools-extension-2.13.9.tgz", + "integrity": "sha512-cNJ8Q/EtjhQaZ71c8I9+BPySIBVEKssbPpskBfsXqb8HJ002A3KRVHfeRzwRo6mGPqsm7XuHTqNSNeS1Khig0A==", + "deprecated": "Package moved to @redux-devtools/extension.", + "dev": true, + "peerDependencies": { + "redux": "^3.1.0 || ^4.0.0" + } + }, + "node_modules/redux-persist": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-6.0.0.tgz", + "integrity": "sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ==", + "peerDependencies": { + "redux": ">4.0.0" + } + }, + "node_modules/redux-thunk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz", + "integrity": "sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==", + "peerDependencies": { + "redux": "^4" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -18703,14 +18800,17 @@ "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=" }, "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ripemd160": { @@ -22862,6 +22962,17 @@ "node": ">=0.10.0" } }, + "node_modules/webpack/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/webpack/node_modules/schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", @@ -25188,14 +25299,6 @@ "type-fest": "^0.8.1" } }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -25846,14 +25949,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } } } }, @@ -25882,6 +25977,24 @@ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.0.tgz", "integrity": "sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ==" }, + "@reduxjs/toolkit": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.7.1.tgz", + "integrity": "sha512-wXwXYjBVz/ItxB7SMzEAMmEE/FBiY1ze18N+VVVX7NtVbRUrdOGKhpQMHivIJfkbJvSdLUU923a/yAagJQzY0Q==", + "requires": { + "immer": "^9.0.7", + "redux": "^4.1.2", + "redux-thunk": "^2.4.1", + "reselect": "^4.1.5" + }, + "dependencies": { + "immer": { + "version": "9.0.12", + "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz", + "integrity": "sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA==" + } + } + }, "@rollup/plugin-node-resolve": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", @@ -26132,6 +26245,15 @@ "@types/node": "*" } }, + "@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "requires": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "@types/html-minifier-terser": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz", @@ -26226,6 +26348,17 @@ "@types/react": "*" } }, + "@types/react-redux": { + "version": "7.1.22", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.22.tgz", + "integrity": "sha512-GxIA1kM7ClU73I6wg9IRTVwSO9GS+SAKZKe0Enj+82HMU6aoESFU2HNAdNi3+J53IaOHPiUfT3kSG4L828joDQ==", + "requires": { + "@types/hoist-non-react-statics": "^3.3.0", + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0", + "redux": "^4.0.0" + } + }, "@types/react-transition-group": { "version": "4.4.4", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", @@ -27790,14 +27923,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } } } }, @@ -28364,6 +28489,16 @@ "mkdirp": "^0.5.1", "rimraf": "^2.5.4", "run-queue": "^1.0.0" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + } } }, "copy-descriptor": { @@ -29044,6 +29179,14 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } } } }, @@ -30666,16 +30809,6 @@ "requires": { "flatted": "^3.1.0", "rimraf": "^3.0.2" - }, - "dependencies": { - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - } } }, "flatted": { @@ -34619,6 +34752,16 @@ "mkdirp": "^0.5.1", "rimraf": "^2.5.4", "run-queue": "^1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + } } }, "ms": { @@ -36909,6 +37052,26 @@ "warning": "^4.0.2" } }, + "react-redux": { + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.6.tgz", + "integrity": "sha512-10RPdsz0UUrRL1NZE0ejTkucnclYSgXp5q+tB5SWx2qeG2ZJQJyymgAhwKy73yiL/13btfB6fPr+rgbMAaZIAQ==", + "requires": { + "@babel/runtime": "^7.15.4", + "@types/react-redux": "^7.1.20", + "hoist-non-react-statics": "^3.3.2", + "loose-envify": "^1.4.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "dependencies": { + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, "react-refresh": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz", @@ -37148,6 +37311,33 @@ "minimatch": "3.0.4" } }, + "redux": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.2.tgz", + "integrity": "sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw==", + "requires": { + "@babel/runtime": "^7.9.2" + } + }, + "redux-devtools-extension": { + "version": "2.13.9", + "resolved": "https://registry.npmjs.org/redux-devtools-extension/-/redux-devtools-extension-2.13.9.tgz", + "integrity": "sha512-cNJ8Q/EtjhQaZ71c8I9+BPySIBVEKssbPpskBfsXqb8HJ002A3KRVHfeRzwRo6mGPqsm7XuHTqNSNeS1Khig0A==", + "dev": true, + "requires": {} + }, + "redux-persist": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-6.0.0.tgz", + "integrity": "sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ==", + "requires": {} + }, + "redux-thunk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz", + "integrity": "sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==", + "requires": {} + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -37469,9 +37659,9 @@ "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=" }, "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "requires": { "glob": "^7.1.3" } @@ -40210,6 +40400,14 @@ "to-regex": "^3.0.2" } }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index 9b7a382c6..55cae55f0 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -12,6 +12,7 @@ "@mui/styles": "^5.2.3", "@mui/x-data-grid": "^5.2.0", "@mui/x-data-grid-generator": "^5.2.0", + "@reduxjs/toolkit": "^1.7.1", "axios": "^0.24.0", "bootstrap": "^5.1.0", "http-proxy-middleware": "^0.19.1", @@ -21,13 +22,15 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-hook-form": "^7.22.4", + "react-redux": "^7.2.6", "react-router-bootstrap": "^0.25.0", "react-router-dom": "^5.2.0", "react-scripts": "^4.0.3", "react-table": "^7.7.0", "react-toastify": "^8.1.0", "reactstrap": "^8.9.0", - "rimraf": "^2.6.2", + "redux": "^4.1.2", + "redux-persist": "^6.0.0", "web-vitals": "^0.2.4", "workbox-background-sync": "^5.1.3", "workbox-broadcast-update": "^5.1.3", @@ -61,6 +64,8 @@ "husky": "^7.0.4", "lint-staged": "^12.1.2", "nan": "^2.14.2", + "redux-devtools-extension": "^2.13.9", + "rimraf": "^3.0.2", "typescript": "^4.2.4" }, "scripts": { diff --git a/TbsReact/ClientApp/src/components/Header/LeftHeader.js b/TbsReact/ClientApp/src/components/Header/LeftHeader.js index d102ee85d..d68bbd949 100644 --- a/TbsReact/ClientApp/src/components/Header/LeftHeader.js +++ b/TbsReact/ClientApp/src/components/Header/LeftHeader.js @@ -1,8 +1,7 @@ import React, { useState } from "react"; -import PropTypes from "prop-types"; import { Tabs, Tab, Box } from "@mui/material"; import { Link } from "react-router-dom"; -const LeftHeader = ({ selected, setSelected }) => { +const LeftHeader = () => { const [value, setValue] = useState("/info"); const handleChange = (event, newValue) => { @@ -36,9 +35,4 @@ const LeftHeader = ({ selected, setSelected }) => { ); }; -LeftHeader.propTypes = { - selected: PropTypes.number.isRequired, - setSelected: PropTypes.func.isRequired, -}; - export default LeftHeader; diff --git a/TbsReact/ClientApp/src/components/sidebar/AccountTable.js b/TbsReact/ClientApp/src/components/sidebar/AccountTable.js index ec2155545..88b17f729 100644 --- a/TbsReact/ClientApp/src/components/sidebar/AccountTable.js +++ b/TbsReact/ClientApp/src/components/sidebar/AccountTable.js @@ -1,4 +1,3 @@ -import PropTypes from "prop-types"; import { Table, TableBody, @@ -8,23 +7,32 @@ import { TableRow, } from "@mui/material"; import React, { useEffect, useState } from "react"; -import { getAccounts } from "../../api/Accounts/Account"; import AccountRow from "./AccountRow"; +import { getAccounts } from "../../api/Accounts/Account"; -const AccountTable = ({ selected, setSelected }) => { +import { useDispatch, useSelector } from "react-redux"; +import { fetchAccountByID } from "../../slices/account"; + +const AccountTable = () => { + const account = useSelector((state) => state.account); const [accounts, setAccounts] = useState([]); + const [selected, setSelected] = useState(account.id); + const dispatch = useDispatch(); + const onClick = (acc) => { setSelected(acc.id); }; useEffect(() => { - const fetchAccount = async () => { - const data = await getAccounts(); - setAccounts(data); - }; - fetchAccount(); - }, [selected]); + getAccounts().then((data) => setAccounts(data)); + if (selected !== -1) { + dispatch(fetchAccountByID(selected)); + } + }, [selected, dispatch]); + useEffect(() => { + console.log("Current account", account); + }, [account]); return ( <> @@ -48,9 +56,4 @@ const AccountTable = ({ selected, setSelected }) => { ); }; -AccountTable.propTypes = { - selected: PropTypes.number.isRequired, - setSelected: PropTypes.func.isRequired, -}; - export default AccountTable; diff --git a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index a00927218..1ace2212b 100644 --- a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -1,5 +1,8 @@ import PropTypes from "prop-types"; import React, { useEffect, useState } from "react"; +import { useSelector, useDispatch } from "react-redux"; +import { resetAccount, fetchAccountByID } from "../../../slices/account"; + import { Modal, Button, @@ -30,11 +33,14 @@ const style = { width: "80%", }; -const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { +const AccountModal = ({ editMode = false }) => { const [selected, setSelected] = useState(-1); const [open, setOpen] = useState(false); const [accesses, setAccesses] = useState([]); + const dispatch = useDispatch(); + const account = useSelector((state) => state.account); + // Form const [username, setUsername] = useState(""); const [server, setServer] = useState(""); @@ -55,9 +61,12 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { }, [accesses, selected]); useEffect(() => { - if (accID !== -1) { + if (account.id !== -1) { const fetchAccount = async () => { - const getPromise = [getAccount(accID), getAccesses(accID)]; + const getPromise = [ + getAccount(account.id), + getAccesses(account.id), + ]; const [{ name, serverUrl }, accesses] = await Promise.all( getPromise ); @@ -68,7 +77,7 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { fetchAccount(); } - }, [accID]); + }, [account.id]); useEffect(() => { if (!server.includes("https://")) { @@ -77,14 +86,14 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { }, [server]); const handleOpen = () => { - if (editMode === true && accID === -1) { + if (editMode === true && account.id === -1) { alert("Cannot edit if you didn't choose account to edit"); } else { setOpen(true); } }; const handleClose = () => { - setAccID(-1); + dispatch(resetAccount); setOpen(false); }; const onClickTable = (access) => { @@ -132,8 +141,8 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { account: { name: username, serverUrl: server }, accesses: accesses, }; - const result = await addAccount(data); - setAccID(result.id); + const { id } = await addAccount(data); + dispatch(fetchAccountByID(id)); handleClose(); }; @@ -286,9 +295,7 @@ const AccountModal = ({ editMode = false, accID = -1, setAccID }) => { }; AccountModal.propTypes = { - accID: PropTypes.number, editMode: PropTypes.bool.isRequired, - setAccID: PropTypes.func.isRequired, }; export default AccountModal; diff --git a/TbsReact/ClientApp/src/components/sidebar/SideBar.js b/TbsReact/ClientApp/src/components/sidebar/SideBar.js index 3de4205bf..86cf7b467 100644 --- a/TbsReact/ClientApp/src/components/sidebar/SideBar.js +++ b/TbsReact/ClientApp/src/components/sidebar/SideBar.js @@ -1,8 +1,10 @@ -import PropTypes from "prop-types"; import React, { useEffect, useState } from "react"; +import { useSelector, useDispatch } from "react-redux"; + +import { resetAccount } from "../../slices/account"; + import { Drawer, IconButton, Grid, Button } from "@mui/material"; -import MenuIcon from "@mui/icons-material/Menu"; -import ChevronLeftIcon from "@mui/icons-material/ChevronLeft"; +import { Menu, ChevronLeft } from "@mui/icons-material"; import AccountTable from "./AccountTable"; import AccountModal from "./Modal/AccountModal"; @@ -16,18 +18,19 @@ import { getStatus, } from "../../api/Accounts/Driver"; -const SideBar = ({ selected, setSelected }) => { +const SideBar = () => { const [open, setOpen] = useState(false); const [status, setStatus] = useState(false); + const dispatch = useDispatch(); + const account = useSelector((state) => state.account); + useEffect(() => { - if (selected !== -1) { - const updateStatus = async () => { - setStatus(await getStatus(selected)); - }; - updateStatus(); + if (account.id !== -1) { + getStatus(account.id).then((status) => setStatus(status)); } - }, [selected]); + }, [account.id]); + const handleDrawerOpen = () => { setOpen(true); }; @@ -37,28 +40,28 @@ const SideBar = ({ selected, setSelected }) => { }; const onDelete = async () => { - setSelected(-1); - await deleteAccount(selected); + dispatch(resetAccount); + await deleteAccount(account.id); }; const onLog = async () => { if (status === true) { - await logout(selected); - setStatus(await getStatus(selected)); + await logout(account.id); + setStatus(await getStatus(account.id)); } else { - await login(selected); - setStatus(await getStatus(selected)); + await login(account.id); + setStatus(await getStatus(account.id)); } }; const onLoginAll = async () => { await loginAll(); - setSelected(-1); + dispatch(resetAccount); }; const onLogoutAll = async () => { await logoutAll(); - setSelected(-1); + dispatch(resetAccount); }; return ( @@ -70,23 +73,19 @@ const SideBar = ({ selected, setSelected }) => { edge="start" sx={{ mr: 2, ...(open && { display: "none" }) }} > - +
- + - + - + - + @@ -108,8 +107,4 @@ const SideBar = ({ selected, setSelected }) => { ); }; -SideBar.propTypes = { - selected: PropTypes.number.isRequired, - setSelected: PropTypes.func.isRequired, -}; export default SideBar; diff --git a/TbsReact/ClientApp/src/index.js b/TbsReact/ClientApp/src/index.js index 1d99eb5f8..f3c1d2d81 100644 --- a/TbsReact/ClientApp/src/index.js +++ b/TbsReact/ClientApp/src/index.js @@ -1,17 +1,26 @@ -import "bootstrap/dist/css/bootstrap.css"; import React from "react"; import ReactDOM from "react-dom"; import { BrowserRouter } from "react-router-dom"; import App from "./App"; import * as serviceWorkerRegistration from "./serviceWorkerRegistration"; +import { Provider } from "react-redux"; +import store from "./store"; +import { PersistGate } from "redux-persist/integration/react"; +import { persistStore } from "redux-persist"; + const baseUrl = document.getElementsByTagName("base")[0].getAttribute("href"); const rootElement = document.getElementById("root"); +const persistor = persistStore(store); ReactDOM.render( - - - , + + + + + + + , rootElement ); @@ -19,3 +28,14 @@ ReactDOM.render( // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://cra.link/PWA serviceWorkerRegistration.unregister(); + +if (module.hot) { + module.hot.accept(); // already had this init code + + module.hot.addStatusHandler((status) => { + if (status === "prepare") { + console.log("============================="); + console.log("Reloaded"); + } + }); +} diff --git a/TbsReact/ClientApp/src/slices/account.js b/TbsReact/ClientApp/src/slices/account.js new file mode 100644 index 000000000..22a3ae3ee --- /dev/null +++ b/TbsReact/ClientApp/src/slices/account.js @@ -0,0 +1,38 @@ +import { createSlice, createAsyncThunk } from "@reduxjs/toolkit"; + +import { getAccount } from "../api/Accounts/Account"; +export const fetchAccountByID = createAsyncThunk( + "account/fetchById", + async (id, thunkAPI) => { + const data = await getAccount(id); + return data; + } +); + +const initialState = { + id: -1, + name: "Not selected", + serverUrl: "", +}; + +export const accountSlice = createSlice({ + name: "account", + initialState, + reducers: { + setAccount: (state, action) => { + return action.payload; + }, + + resetAccount: (state, action) => { + return initialState; + }, + }, + extraReducers: (builder) => { + builder.addCase(fetchAccountByID.fulfilled, (state, action) => { + return action.payload; + }); + }, +}); + +export const { setAccount, resetAccount } = accountSlice.actions; +export default accountSlice.reducer; diff --git a/TbsReact/ClientApp/src/store.js b/TbsReact/ClientApp/src/store.js new file mode 100644 index 000000000..34a34155c --- /dev/null +++ b/TbsReact/ClientApp/src/store.js @@ -0,0 +1,36 @@ +/* import { configureStore } from '@reduxjs/toolkit' +import accountReducer from './slices/account' +export default configureStore({ + reducer: { + account: accountReducer, + }, + devTools: process.env.NODE_ENV !== 'production', +}) */ + +import { configureStore } from "@reduxjs/toolkit"; + +import storage from "redux-persist/lib/storage"; +import { combineReducers } from "redux"; +import { persistReducer } from "redux-persist"; +import autoMergeLevel2 from "redux-persist/lib/stateReconciler/autoMergeLevel2"; + +import thunk from "redux-thunk"; + +import accountReducer from "./slices/account"; + +const reducers = combineReducers({ + account: accountReducer, +}); +const persistConfig = { + key: "tbsroot", + storage, + stateReconciler: autoMergeLevel2, +}; + +const persistedReducer = persistReducer(persistConfig, reducers); + +export default configureStore({ + reducer: persistedReducer, + devTools: process.env.NODE_ENV !== "production", + middleware: [thunk], +}); From a7452d8b1e1f0d4e88043abe57b6bfca70a5f721 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 18 Jan 2022 15:29:38 +0700 Subject: [PATCH 39/69] add info current account to top right screen corner --- .../src/components/Header/RightHeader.js | 85 +++++-------------- .../components/Views/DebugChild/TaskTable.js | 2 - .../ClientApp/src/components/Views/Info.js | 8 +- .../src/components/sidebar/AccountTable.js | 5 +- .../components/sidebar/Modal/AccountModal.js | 2 +- .../src/components/sidebar/SideBar.js | 2 +- TbsReact/ClientApp/src/slices/account.js | 31 +++++-- 7 files changed, 50 insertions(+), 85 deletions(-) diff --git a/TbsReact/ClientApp/src/components/Header/RightHeader.js b/TbsReact/ClientApp/src/components/Header/RightHeader.js index 6f440be12..b5231f9a1 100644 --- a/TbsReact/ClientApp/src/components/Header/RightHeader.js +++ b/TbsReact/ClientApp/src/components/Header/RightHeader.js @@ -1,75 +1,28 @@ -import React, { useState } from "react"; -import { Box, IconButton, Menu, MenuItem, ListItemIcon } from "@mui/material"; -import { AccountCircle, Settings, Logout } from "@mui/icons-material"; +import React from "react"; +import { Box, Chip } from "@mui/material"; +import { AccountCircle } from "@mui/icons-material"; +import { useSelector } from "react-redux"; const RightHeader = () => { - const [anchorEl, setAnchorEl] = useState(); - const open = Boolean(anchorEl); - const handleClick = (event) => { - setAnchorEl(event.currentTarget); - }; - const handleClose = () => { - setAnchorEl(null); - }; + const account = useSelector((state) => state.account); return ( <> - - - + } + label={account.info.name} + color="success" + /> + {account.info.id !== -1 && ( + <> + + + + )} - - - - - - Settings - - - - - - Logout - - ); }; diff --git a/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js b/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js index d9c306c93..e66d9da24 100644 --- a/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js +++ b/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js @@ -28,7 +28,6 @@ const TaskTable = ({ selected, isConnect }) => { useEffect(() => { if (isConnect === true) { signalRConnection.on("task", (message) => { - console.log("task message", message); if (message === "waiting") { setValue([ { @@ -89,7 +88,6 @@ const TaskTable = ({ selected, isConnect }) => { } else { setValue(data); } - console.log({ data }); }; getData(); } diff --git a/TbsReact/ClientApp/src/components/Views/Info.js b/TbsReact/ClientApp/src/components/Views/Info.js index c3c2b89d7..467bcc1d4 100644 --- a/TbsReact/ClientApp/src/components/Views/Info.js +++ b/TbsReact/ClientApp/src/components/Views/Info.js @@ -1,16 +1,14 @@ import React from "react"; import { Grid, Box, Typography } from "@mui/material"; const style = { - position: "absolute", top: "50%", - left: "50%", - transform: "translate(-50%, -50%)", + left: "10%", bgcolor: "background.paper", border: "2px solid #000", boxShadow: 24, p: 4, - width: "80%", - height: "80%", + width: "30%", + height: "100%", }; const Info = () => { diff --git a/TbsReact/ClientApp/src/components/sidebar/AccountTable.js b/TbsReact/ClientApp/src/components/sidebar/AccountTable.js index 88b17f729..88e57a4aa 100644 --- a/TbsReact/ClientApp/src/components/sidebar/AccountTable.js +++ b/TbsReact/ClientApp/src/components/sidebar/AccountTable.js @@ -14,7 +14,7 @@ import { useDispatch, useSelector } from "react-redux"; import { fetchAccountByID } from "../../slices/account"; const AccountTable = () => { - const account = useSelector((state) => state.account); + const account = useSelector((state) => state.account.info); const [accounts, setAccounts] = useState([]); const [selected, setSelected] = useState(account.id); const dispatch = useDispatch(); @@ -30,9 +30,6 @@ const AccountTable = () => { } }, [selected, dispatch]); - useEffect(() => { - console.log("Current account", account); - }, [account]); return ( <> diff --git a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js index 1ace2212b..fd593c276 100644 --- a/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js +++ b/TbsReact/ClientApp/src/components/sidebar/Modal/AccountModal.js @@ -39,7 +39,7 @@ const AccountModal = ({ editMode = false }) => { const [accesses, setAccesses] = useState([]); const dispatch = useDispatch(); - const account = useSelector((state) => state.account); + const account = useSelector((state) => state.account.info); // Form const [username, setUsername] = useState(""); diff --git a/TbsReact/ClientApp/src/components/sidebar/SideBar.js b/TbsReact/ClientApp/src/components/sidebar/SideBar.js index 86cf7b467..261956ebe 100644 --- a/TbsReact/ClientApp/src/components/sidebar/SideBar.js +++ b/TbsReact/ClientApp/src/components/sidebar/SideBar.js @@ -23,7 +23,7 @@ const SideBar = () => { const [status, setStatus] = useState(false); const dispatch = useDispatch(); - const account = useSelector((state) => state.account); + const account = useSelector((state) => state.account.info); useEffect(() => { if (account.id !== -1) { diff --git a/TbsReact/ClientApp/src/slices/account.js b/TbsReact/ClientApp/src/slices/account.js index 22a3ae3ee..1ed9537bd 100644 --- a/TbsReact/ClientApp/src/slices/account.js +++ b/TbsReact/ClientApp/src/slices/account.js @@ -1,18 +1,30 @@ import { createSlice, createAsyncThunk } from "@reduxjs/toolkit"; import { getAccount } from "../api/Accounts/Account"; +import { getStatus } from "../api/Accounts/Driver"; export const fetchAccountByID = createAsyncThunk( - "account/fetchById", + "account/fetcInfohById", async (id, thunkAPI) => { const data = await getAccount(id); return data; } ); +export const fetchStatusByID = createAsyncThunk( + "account/fetchStatusById", + async (id, thunkAPI) => { + const data = await getStatus(id); + return data; + } +); + const initialState = { - id: -1, - name: "Not selected", - serverUrl: "", + info: { + id: -1, + name: "Not selected", + serverUrl: "", + }, + status: false, }; export const accountSlice = createSlice({ @@ -20,16 +32,23 @@ export const accountSlice = createSlice({ initialState, reducers: { setAccount: (state, action) => { - return action.payload; + state.info = action.payload; }, resetAccount: (state, action) => { return initialState; }, + + setStatus: (state, action) => { + state.status = action.payload; + }, }, extraReducers: (builder) => { builder.addCase(fetchAccountByID.fulfilled, (state, action) => { - return action.payload; + state.info = action.payload; + }); + builder.addCase(fetchStatusByID.fulfilled, (state, action) => { + state.status = action.payload; }); }, }); From 380381c946c970e272ed946ca130eb1fee4050d4 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 18 Jan 2022 21:24:54 +0700 Subject: [PATCH 40/69] remove state pass through props --- TbsReact/ClientApp/src/App.js | 54 +++++----------- TbsReact/ClientApp/src/components/Layout.js | 33 ++-------- TbsReact/ClientApp/src/components/NavMenu.js | 19 +----- .../ClientApp/src/components/Views/Debug.js | 14 ++-- .../components/Views/DebugChild/LogBoard.js | 26 ++++---- .../components/Views/DebugChild/TaskTable.js | 64 +++++++++---------- .../ClientApp/src/components/Views/Setting.js | 9 +-- .../Views/SettingChild/ChromeSettings.js | 18 +++--- TbsReact/ClientApp/src/slices/account.js | 3 +- 9 files changed, 84 insertions(+), 156 deletions(-) diff --git a/TbsReact/ClientApp/src/App.js b/TbsReact/ClientApp/src/App.js index 61b05ee65..18fe7783d 100644 --- a/TbsReact/ClientApp/src/App.js +++ b/TbsReact/ClientApp/src/App.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from "react"; +import React, { useEffect } from "react"; import { toast } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; @@ -7,49 +7,29 @@ import Layout from "./components/Layout"; import { signalRConnection, initConnection } from "./realtime/connection"; import { changeAccount } from "./realtime/account"; import { usePrevious } from "./hooks/usePrevious"; -const App = () => { - toast.configure(); +import { useDispatch, useSelector } from "react-redux"; - const [selected, setSelected] = useState(-1); - const [joined, setJoined] = useState(false); - const prev = usePrevious(selected); +import { HubConnectionState } from "@microsoft/signalr/dist/esm/HubConnection"; - // look complicated - // may change later when i "pro" React ._. - // - Vinaghost +const App = () => { + toast.configure(); + const account = useSelector((state) => state.account.info.id); + const prev = usePrevious(account); + const dispatch = useDispatch(); useEffect(() => { - if (joined === false) { - const join = async () => { - try { - initConnection(); - await signalRConnection.start(); - setJoined(true); - signalRConnection.on("message", (data) => { - console.log(data); - }); - } catch (e) { - console.log(e); - } - }; - - join(); - } - }, [joined]); + initConnection(); + signalRConnection.start().then(() => { + signalRConnection.on("message", (data) => console.log(data)); + }); + }, [dispatch]); useEffect(() => { - if (joined === true) { - changeAccount(selected, prev); + if (signalRConnection.State === HubConnectionState.Connected) { + changeAccount(account, prev); } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [selected, joined]); + }, [account, prev]); - return ( - - ); + return ; }; export default App; diff --git a/TbsReact/ClientApp/src/components/Layout.js b/TbsReact/ClientApp/src/components/Layout.js index 372f47f9c..a4da841df 100644 --- a/TbsReact/ClientApp/src/components/Layout.js +++ b/TbsReact/ClientApp/src/components/Layout.js @@ -1,7 +1,4 @@ -import PropTypes from "prop-types"; import React from "react"; - -// header import NavMenu from "./NavMenu"; // Router @@ -17,34 +14,20 @@ import Info from "./Views/Info"; // debug view import Debug from "./Views/Debug"; -import LogBoard from "./Views/DebugChild/LogBoard"; -import TaskTable from "./Views/DebugChild/TaskTable"; + import Setting from "./Views/Setting"; -const Layout = ({ selected, setSelected, isConnect }) => { +const Layout = () => { return ( - +
- + - - } - logBoard={ - - } - /> + @@ -58,10 +41,4 @@ const Layout = ({ selected, setSelected, isConnect }) => { ); }; -Layout.propTypes = { - isConnect: PropTypes.bool.isRequired, - selected: PropTypes.number.isRequired, - setSelected: PropTypes.func.isRequired, -}; - export default Layout; diff --git a/TbsReact/ClientApp/src/components/NavMenu.js b/TbsReact/ClientApp/src/components/NavMenu.js index 3bf9db0c0..4af3f514a 100644 --- a/TbsReact/ClientApp/src/components/NavMenu.js +++ b/TbsReact/ClientApp/src/components/NavMenu.js @@ -1,20 +1,16 @@ -import PropTypes from "prop-types"; import React from "react"; import { AppBar, Container, Toolbar, Typography } from "@mui/material"; import SideBar from "./sidebar/SideBar"; import RightHeader from "./Header/RightHeader"; import LeftHeader from "./Header/LeftHeader"; -const NavMenu = ({ selected, setSelected }) => { +const NavMenu = () => { return ( <> - + { > TbsReact - + @@ -34,10 +27,4 @@ const NavMenu = ({ selected, setSelected }) => { ); }; - -NavMenu.propTypes = { - selected: PropTypes.number.isRequired, - setSelected: PropTypes.func.isRequired, -}; - export default NavMenu; diff --git a/TbsReact/ClientApp/src/components/Views/Debug.js b/TbsReact/ClientApp/src/components/Views/Debug.js index d0d56dae3..c29985d3c 100644 --- a/TbsReact/ClientApp/src/components/Views/Debug.js +++ b/TbsReact/ClientApp/src/components/Views/Debug.js @@ -1,25 +1,21 @@ -import PropTypes from "prop-types"; import React from "react"; import Grid from "@mui/material/Grid"; -const Debug = ({ taskTable, logBoard }) => { +import LogBoard from "./DebugChild/LogBoard"; +import TaskTable from "./DebugChild/TaskTable"; +const Debug = () => { return ( <> - {taskTable} + - {logBoard} + ); }; -Debug.propTypes = { - logBoard: PropTypes.object.isRequired, - taskTable: PropTypes.object.isRequired, -}; - export default Debug; diff --git a/TbsReact/ClientApp/src/components/Views/DebugChild/LogBoard.js b/TbsReact/ClientApp/src/components/Views/DebugChild/LogBoard.js index 8fdaf8551..272bcaeb3 100644 --- a/TbsReact/ClientApp/src/components/Views/DebugChild/LogBoard.js +++ b/TbsReact/ClientApp/src/components/Views/DebugChild/LogBoard.js @@ -1,14 +1,18 @@ import React, { useEffect, useState } from "react"; -import PropTypes from "prop-types"; import { Typography, TextareaAutosize } from "@mui/material"; import { getLogData } from "../../../api/Debug"; import { signalRConnection } from "../../../realtime/connection"; -const LogBoard = ({ selected, isConnect }) => { + +import { useSelector } from "react-redux"; +import { HubConnectionState } from "@microsoft/signalr/dist/esm/HubConnection"; +const LogBoard = () => { const [value, setValue] = useState(); + const account = useSelector((state) => state.account.info.id); + const signalr = useSelector((state) => state.signalr); useEffect(() => { - if (isConnect === true) { + if (signalRConnection.State === HubConnectionState.Connected) { signalRConnection.on("logger", (data) => { setValue((prev) => `${data}${prev}`); }); @@ -17,17 +21,13 @@ const LogBoard = ({ selected, isConnect }) => { signalRConnection.off("logger"); }; } - }, [isConnect]); + }, [signalr]); useEffect(() => { - if (selected !== -1) { - const getData = async () => { - const data = await getLogData(selected); - setValue(data); - }; - getData(); + if (account !== -1) { + getLogData(account).then((data) => setValue(data)); } - }, [selected]); + }, [account]); return ( <> @@ -44,8 +44,4 @@ const LogBoard = ({ selected, isConnect }) => { ); }; -LogBoard.propTypes = { - selected: PropTypes.number.isRequired, - isConnect: PropTypes.bool.isRequired, -}; export default LogBoard; diff --git a/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js b/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js index e66d9da24..b74182ae1 100644 --- a/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js +++ b/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js @@ -1,12 +1,13 @@ import React, { useEffect, useState } from "react"; -import PropTypes from "prop-types"; import { getTaskList } from "../../../api/Debug"; import { signalRConnection } from "../../../realtime/connection"; import { DataGrid } from "@mui/x-data-grid"; import { Typography } from "@mui/material"; +import { useSelector } from "react-redux"; +import { HubConnectionState } from "@microsoft/signalr/dist/esm/HubConnection"; -const TaskTable = ({ selected, isConnect }) => { +const TaskTable = () => { const [value, setValue] = useState([ { id: 0, @@ -25,24 +26,28 @@ const TaskTable = ({ selected, isConnect }) => { { field: "executeAt", headerName: "Execute at", width: 100 }, ]; + const account = useSelector((state) => state.account.info.id); + const signalr = useSelector((state) => state.signalr); useEffect(() => { - if (isConnect === true) { + if (signalRConnection.State === HubConnectionState.Connected) { signalRConnection.on("task", (message) => { - if (message === "waiting") { - setValue([ - { - id: 0, - name: "hi", - villName: "Bot", - priority: "is", - stage: "loading", - executeAt: "task", - }, - ]); - } else if (message === "reset") { - if (selected !== -1) { - const getData = async () => { - const data = await getTaskList(selected); + switch (message) { + case "waiting": + setValue([ + { + id: 0, + name: "hi", + villName: "TBS", + priority: "is", + stage: "loading", + executeAt: "task", + }, + ]); + break; + + case "reset": + if (account === -1) break; + getTaskList(account).then((data) => { if (data === null) { setValue([ { @@ -57,9 +62,9 @@ const TaskTable = ({ selected, isConnect }) => { } else { setValue(data); } - }; - getData(); - } + }); + + break; } }); @@ -67,13 +72,11 @@ const TaskTable = ({ selected, isConnect }) => { signalRConnection.off("task"); }; } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isConnect]); + }, [account, signalr]); useEffect(() => { - if (selected !== -1) { - const getData = async () => { - const data = await getTaskList(selected); + if (account !== -1) { + getTaskList(account).then((data) => { if (data === null) { setValue([ { @@ -88,10 +91,9 @@ const TaskTable = ({ selected, isConnect }) => { } else { setValue(data); } - }; - getData(); + }); } - }, [selected]); + }, [account]); return ( <> @@ -113,8 +115,4 @@ const TaskTable = ({ selected, isConnect }) => { ); }; -TaskTable.propTypes = { - selected: PropTypes.number.isRequired, - isConnect: PropTypes.bool.isRequired, -}; export default TaskTable; diff --git a/TbsReact/ClientApp/src/components/Views/Setting.js b/TbsReact/ClientApp/src/components/Views/Setting.js index e4aa81e98..e94f5f504 100644 --- a/TbsReact/ClientApp/src/components/Views/Setting.js +++ b/TbsReact/ClientApp/src/components/Views/Setting.js @@ -1,22 +1,17 @@ import React from "react"; -import PropTypes from "prop-types"; import ChromeSettings from "./SettingChild/ChromeSettings"; import { Grid } from "@mui/material"; -const General = ({ selected }) => { +const General = () => { return ( <> - + ); }; -General.propTypes = { - selected: PropTypes.number.isRequired, -}; - export default General; diff --git a/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js b/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js index ac6521073..90284238e 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js @@ -1,4 +1,3 @@ -import PropTypes from "prop-types"; import React, { useEffect } from "react"; import { useForm } from "react-hook-form"; import { @@ -17,6 +16,7 @@ import * as yup from "yup"; import { toast } from "react-toastify"; import { getChromeSetting, setChromeSetting } from "../../../api/Setting"; +import { useSelector } from "react-redux"; const schema = yup .object() @@ -68,7 +68,7 @@ const style = { width: "100%", height: "100%", }; -const ChromeSettings = ({ selected }) => { +const ChromeSettings = () => { const { register, handleSubmit, @@ -77,17 +77,17 @@ const ChromeSettings = ({ selected }) => { } = useForm({ resolver: yupResolver(schema), }); - + const account = useSelector((state) => state.account.info.id); const onSubmit = async (data) => { - await setChromeSetting(selected, data); + await setChromeSetting(account, data); toast.success("Chrome settings saved !", { position: toast.POSITION.TOP_RIGHT, }); }; useEffect(() => { - if (selected !== -1) { - getChromeSetting(selected).then((data) => { + if (account !== -1) { + getChromeSetting(account).then((data) => { const { workTime, sleepTime, disableImages, click, autoClose } = data; setValue("work_min", workTime.min); @@ -100,7 +100,7 @@ const ChromeSettings = ({ selected }) => { setValue("close_chrome", autoClose); }); } - }, [selected, setValue]); + }, [account, setValue]); return ( <> @@ -255,7 +255,5 @@ const ChromeSettings = ({ selected }) => { ); }; -ChromeSettings.propTypes = { - selected: PropTypes.number.isRequired, -}; + export default ChromeSettings; diff --git a/TbsReact/ClientApp/src/slices/account.js b/TbsReact/ClientApp/src/slices/account.js index 1ed9537bd..3b5d05db1 100644 --- a/TbsReact/ClientApp/src/slices/account.js +++ b/TbsReact/ClientApp/src/slices/account.js @@ -6,6 +6,7 @@ export const fetchAccountByID = createAsyncThunk( "account/fetcInfohById", async (id, thunkAPI) => { const data = await getAccount(id); + console.log("i fetched"); return data; } ); @@ -53,5 +54,5 @@ export const accountSlice = createSlice({ }, }); -export const { setAccount, resetAccount } = accountSlice.actions; +export const { setAccount, resetAccount, setStatus } = accountSlice.actions; export default accountSlice.reducer; From 5697be5f2a1e2c21cbf21a037f7bd90df0e9b9cb Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Fri, 28 Jan 2022 19:45:09 +0700 Subject: [PATCH 41/69] add village tab --- .../src/components/Header/LeftHeader.js | 6 ++ TbsReact/ClientApp/src/components/Layout.js | 9 ++- .../components/Views/{ => DebugView}/Debug.js | 4 +- .../{DebugChild => DebugView}/LogBoard.js | 0 .../{DebugChild => DebugView}/TaskTable.js | 0 .../ChromeSettings.js | 10 +--- .../Views/{ => SettingsView}/Setting.js | 4 +- .../Views/VillagesView/ContentBox.js | 14 +++++ .../Views/VillagesView/VillageRows.js | 26 +++++++++ .../components/Views/VillagesView/Villages.js | 27 +++++++++ .../Views/VillagesView/VillagesTable.js | 58 +++++++++++++++++++ TbsReact/ClientApp/src/styles/box.js | 6 ++ 12 files changed, 150 insertions(+), 14 deletions(-) rename TbsReact/ClientApp/src/components/Views/{ => DebugView}/Debug.js (75%) rename TbsReact/ClientApp/src/components/Views/{DebugChild => DebugView}/LogBoard.js (100%) rename TbsReact/ClientApp/src/components/Views/{DebugChild => DebugView}/TaskTable.js (100%) rename TbsReact/ClientApp/src/components/Views/{SettingChild => SettingsView}/ChromeSettings.js (97%) rename TbsReact/ClientApp/src/components/Views/{ => SettingsView}/Setting.js (69%) create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/ContentBox.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/VillageRows.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js create mode 100644 TbsReact/ClientApp/src/styles/box.js diff --git a/TbsReact/ClientApp/src/components/Header/LeftHeader.js b/TbsReact/ClientApp/src/components/Header/LeftHeader.js index d68bbd949..917f51f36 100644 --- a/TbsReact/ClientApp/src/components/Header/LeftHeader.js +++ b/TbsReact/ClientApp/src/components/Header/LeftHeader.js @@ -17,6 +17,12 @@ const LeftHeader = () => { to="/setting" component={Link} /> + { return ( @@ -32,6 +34,9 @@ const Layout = () => { + + + diff --git a/TbsReact/ClientApp/src/components/Views/Debug.js b/TbsReact/ClientApp/src/components/Views/DebugView/Debug.js similarity index 75% rename from TbsReact/ClientApp/src/components/Views/Debug.js rename to TbsReact/ClientApp/src/components/Views/DebugView/Debug.js index c29985d3c..3d121f53b 100644 --- a/TbsReact/ClientApp/src/components/Views/Debug.js +++ b/TbsReact/ClientApp/src/components/Views/DebugView/Debug.js @@ -1,8 +1,8 @@ import React from "react"; import Grid from "@mui/material/Grid"; -import LogBoard from "./DebugChild/LogBoard"; -import TaskTable from "./DebugChild/TaskTable"; +import LogBoard from "./LogBoard"; +import TaskTable from "./TaskTable"; const Debug = () => { return ( <> diff --git a/TbsReact/ClientApp/src/components/Views/DebugChild/LogBoard.js b/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js similarity index 100% rename from TbsReact/ClientApp/src/components/Views/DebugChild/LogBoard.js rename to TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js diff --git a/TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js b/TbsReact/ClientApp/src/components/Views/DebugView/TaskTable.js similarity index 100% rename from TbsReact/ClientApp/src/components/Views/DebugChild/TaskTable.js rename to TbsReact/ClientApp/src/components/Views/DebugView/TaskTable.js diff --git a/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js similarity index 97% rename from TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js rename to TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js index 90284238e..978720591 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingChild/ChromeSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js @@ -18,6 +18,8 @@ import { toast } from "react-toastify"; import { getChromeSetting, setChromeSetting } from "../../../api/Setting"; import { useSelector } from "react-redux"; +import style from "../../../styles/box"; + const schema = yup .object() .shape({ @@ -60,14 +62,6 @@ const schema = yup }) .required(); -const style = { - bgcolor: "background.paper", - border: "2px solid #000", - boxShadow: 24, - p: 4, - width: "100%", - height: "100%", -}; const ChromeSettings = () => { const { register, diff --git a/TbsReact/ClientApp/src/components/Views/Setting.js b/TbsReact/ClientApp/src/components/Views/SettingsView/Setting.js similarity index 69% rename from TbsReact/ClientApp/src/components/Views/Setting.js rename to TbsReact/ClientApp/src/components/Views/SettingsView/Setting.js index e94f5f504..712e31ec3 100644 --- a/TbsReact/ClientApp/src/components/Views/Setting.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/Setting.js @@ -1,11 +1,11 @@ import React from "react"; -import ChromeSettings from "./SettingChild/ChromeSettings"; +import ChromeSettings from "./ChromeSettings"; import { Grid } from "@mui/material"; const General = () => { return ( <> - + diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/ContentBox.js b/TbsReact/ClientApp/src/components/Views/VillagesView/ContentBox.js new file mode 100644 index 000000000..9d9ef79cf --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/ContentBox.js @@ -0,0 +1,14 @@ +import React from "react"; +import { Box } from "@mui/material"; + +import style from "../../../styles/box"; + +const ContentBox = () => { + return ( + <> + + + ); +}; + +export default ContentBox; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/VillageRows.js b/TbsReact/ClientApp/src/components/Views/VillagesView/VillageRows.js new file mode 100644 index 000000000..210db2eec --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/VillageRows.js @@ -0,0 +1,26 @@ +import PropTypes from "prop-types"; +import React from "react"; +import { TableCell, TableRow } from "@mui/material"; + +const VillageRows = ({ villages, handler, selected }) => { + const rows = villages.map((village) => ( + handler(village)} + selected={village.id === selected} + key={village.id} + > + {village.name} + {`${village.coords.x}/${village.coords.y}`} + + )); + return <>{rows}; +}; + +VillageRows.propTypes = { + villages: PropTypes.array.isRequired, + handler: PropTypes.func.isRequired, + selected: PropTypes.number.isRequired, +}; + +export default VillageRows; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js new file mode 100644 index 000000000..bc3d5fe2c --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js @@ -0,0 +1,27 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "./ContentBox"; +import VillagesTable from "./VillagesTable"; + +const Villages = () => { + return ( + <> + + + + + + + + + + ); +}; + +export default Villages; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js b/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js new file mode 100644 index 000000000..6de6da7c9 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js @@ -0,0 +1,58 @@ +import React, { useEffect, useState } from "react"; +import { + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableRow, + Box, +} from "@mui/material"; +// import VillageRows from "./VillageRows"; +import { useDispatch /* , useSelector */ } from "react-redux"; + +import style from "../../../styles/box"; + +const VillagesTable = () => { + // const account = useSelector((state) => state.account.info); + // const [villages, setVillages] = useState([]); + const [selected /*, setSelected */] = useState(-1); + const dispatch = useDispatch(); + + /* const onClick = (vill) => { + setSelected(vill.id); + }; */ + + useEffect(() => { + // getAccounts().then((data) => setAccounts(data)); + if (selected !== -1) { + // dispatch(fetchAccountByID(selected)); + } + }, [selected, dispatch]); + + return ( + <> + + + + + + Name + Coords + + + + {/* */} + +
+
+
+ + ); +}; + +export default VillagesTable; diff --git a/TbsReact/ClientApp/src/styles/box.js b/TbsReact/ClientApp/src/styles/box.js new file mode 100644 index 000000000..1a82b493f --- /dev/null +++ b/TbsReact/ClientApp/src/styles/box.js @@ -0,0 +1,6 @@ +export default { + bgcolor: "background.paper", + border: "2px solid #000", + boxShadow: 24, + p: 4, +}; From f99889bb4b6c8a4466220a3e16f4b2513a5b55de Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Mon, 7 Feb 2022 17:22:10 +0700 Subject: [PATCH 42/69] add json server for testing without backend --- TbsReact/ClientApp/.env | 1 + TbsReact/ClientApp/db.json | 230 +++ TbsReact/ClientApp/package-lock.json | 2105 +++++++++++++++++++++++++- TbsReact/ClientApp/package.json | 5 +- TbsReact/ClientApp/src/server.js | 22 + TbsReact/ClientApp/src/setupProxy.js | 19 - 6 files changed, 2348 insertions(+), 34 deletions(-) create mode 100644 TbsReact/ClientApp/db.json create mode 100644 TbsReact/ClientApp/src/server.js delete mode 100644 TbsReact/ClientApp/src/setupProxy.js diff --git a/TbsReact/ClientApp/.env b/TbsReact/ClientApp/.env index 6ce384e5c..e4feab932 100644 --- a/TbsReact/ClientApp/.env +++ b/TbsReact/ClientApp/.env @@ -1 +1,2 @@ BROWSER=none +PORT_API=3001 \ No newline at end of file diff --git a/TbsReact/ClientApp/db.json b/TbsReact/ClientApp/db.json new file mode 100644 index 000000000..4c4687963 --- /dev/null +++ b/TbsReact/ClientApp/db.json @@ -0,0 +1,230 @@ +{ + "accounts": [ + { + "id": "1", + "name": "Abcg", + "serverUrl": "abc.xyz" + }, + { + "id": "2", + "name": "Abce", + "serverUrl": "abd.xyz" + }, + { + "id": "3", + "name": "Abcf", + "serverUrl": "abe.xyz" + }, + { + "id": "4", + "name": "Abcg", + "serverUrl": "abf.xyz" + } + ], + "accesses": [ + { + "id": "1", + "accesses": [ + { + "id": "1", + "password": "abc", + "proxy": { + "ip": "1.1.1.1", + "port": "8080", + "username": "xyz", + "password": "efg", + "ok": "true" + } + }, + { + "id": "2", + "password": "abc", + "proxy": { + "ip": "1.1.1.1", + "port": "8080", + "username": "xyz", + "password": "efg", + "ok": "true" + } + } + ] + }, + { + "id": "2", + "accesses": [ + { + "id": "1", + "password": "abc", + "proxy": { + "ip": "1.1.1.1", + "port": "8080", + "username": "xyz", + "password": "efg", + "ok": "true" + } + }, + { + "id": "2", + "password": "abc", + "proxy": { + "ip": "1.1.1.1", + "port": "8080", + "username": "xyz", + "password": "efg", + "ok": "true" + } + } + ] + }, + { + "id": "3", + "accesses": [ + { + "id": "1", + "password": "abc", + "proxy": { + "ip": "1.1.1.1", + "port": "8080", + "username": "xyz", + "password": "efg", + "ok": "true" + } + }, + { + "id": "2", + "password": "abc", + "proxy": { + "ip": "1.1.1.1", + "port": "8080", + "username": "xyz", + "password": "efg", + "ok": "true" + } + } + ] + }, + { + "id": "4", + "accesses": [ + { + "id": "1", + "password": "abc", + "proxy": { + "ip": "1.1.1.1", + "port": "8080", + "username": "xyz", + "password": "efg", + "ok": "true" + } + }, + { + "id": "2", + "password": "abc", + "proxy": { + "ip": "1.1.1.1", + "port": "8080", + "username": "xyz", + "password": "efg", + "ok": "true" + } + } + ] + } + ], + "status": [ + { + "id": "1", + "status": "true" + }, + { + "id": "2", + "status": "true" + }, + { + "id": "3", + "status": "false" + }, + { + "id": "4", + "status": "true" + } + ], + "settings": [ + { + "id": "1", + "chrome": { + "click": { + "min": "1", + "max": "2" + }, + "workTime": { + "min": "1", + "max": "2" + }, + "sleepTime": { + "min": "1", + "max": "2" + }, + "disableImages": "true", + "autoClose": "true" + } + }, + { + "id": "2", + "chrome": { + "click": { + "min": "1", + "max": "2" + }, + "workTime": { + "min": "1", + "max": "2" + }, + "sleepTime": { + "min": "1", + "max": "2" + }, + "disableImages": "true", + "autoClose": "true" + } + }, + { + "id": "3", + "chrome": { + "click": { + "min": "1", + "max": "2" + }, + "workTime": { + "min": "1", + "max": "2" + }, + "sleepTime": { + "min": "1", + "max": "2" + }, + "disableImages": "true", + "autoClose": "true" + } + }, + { + "id": "4", + "chrome": { + "click": { + "min": "1", + "max": "2" + }, + "workTime": { + "min": "1", + "max": "2" + }, + "sleepTime": { + "min": "1", + "max": "2" + }, + "disableImages": "true", + "autoClose": "true" + } + } + ] +} diff --git a/TbsReact/ClientApp/package-lock.json b/TbsReact/ClientApp/package-lock.json index 3f8287bba..6d6a7f08e 100644 --- a/TbsReact/ClientApp/package-lock.json +++ b/TbsReact/ClientApp/package-lock.json @@ -67,6 +67,7 @@ "eslint-plugin-react": "^7.27.1", "eslint-plugin-react-hooks": "^4.3.0", "husky": "^7.0.4", + "json-server": "^0.17.0", "lint-staged": "^12.1.2", "nan": "^2.14.2", "redux-devtools-extension": "^2.13.9", @@ -3633,6 +3634,15 @@ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" }, + "node_modules/@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -3865,6 +3875,18 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "dependencies": { + "defer-to-connect": "^1.0.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -4623,6 +4645,15 @@ "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "dependencies": { + "string-width": "^4.1.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -4668,9 +4699,9 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { "node": ">=8" } @@ -5659,6 +5690,18 @@ } ] }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -5776,6 +5819,127 @@ "@popperjs/core": "^2.9.3" } }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/boxen/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/boxen/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/boxen/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -6051,6 +6215,42 @@ "node": ">=0.10.0" } }, + "node_modules/cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -6369,6 +6569,18 @@ "node": ">=6" } }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -6491,6 +6703,15 @@ "wrap-ansi": "^6.2.0" } }, + "node_modules/clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + } + }, "node_modules/clsx": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", @@ -6679,6 +6900,68 @@ "typedarray": "^0.0.6" } }, + "node_modules/configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "dependencies": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/configstore/node_modules/crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/configstore/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/configstore/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/configstore/node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "dependencies": { + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -6692,6 +6975,15 @@ "node": ">=0.8" } }, + "node_modules/connect-pause": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/connect-pause/-/connect-pause-0.1.1.tgz", + "integrity": "sha1-smmyu4Ldsaw9tQmcD7WCq6mfs3o=", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -6820,6 +7112,19 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/cosmiconfig": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", @@ -7416,6 +7721,18 @@ "node": ">=0.10" } }, + "node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -7437,6 +7754,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -7570,6 +7896,12 @@ "which": "bin/which" } }, + "node_modules/defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -7943,6 +8275,12 @@ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" }, + "node_modules/duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, "node_modules/duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -8103,6 +8441,19 @@ "stackframe": "^1.1.1" } }, + "node_modules/errorhandler": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz", + "integrity": "sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==", + "dev": true, + "dependencies": { + "accepts": "~1.3.7", + "escape-html": "~1.0.3" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/es-abstract": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", @@ -8189,6 +8540,15 @@ "node": ">=6" } }, + "node_modules/escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -9462,6 +9822,16 @@ "node": ">= 0.10.0" } }, + "node_modules/express-urlrewrite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/express-urlrewrite/-/express-urlrewrite-1.4.0.tgz", + "integrity": "sha512-PI5h8JuzoweS26vFizwQl6UTF25CAHSggNv0J25Dn/IKZscJHWZzPrI5z2Y2jgOzIaw2qh8l6+/jUcig23Z2SA==", + "dev": true, + "dependencies": { + "debug": "*", + "path-to-regexp": "^1.0.3" + } + }, "node_modules/express/node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -10251,6 +10621,30 @@ "node": ">= 6" } }, + "node_modules/global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/global-dirs/node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -10321,6 +10715,40 @@ "node": ">= 4" } }, + "node_modules/got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/got/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -10469,6 +10897,15 @@ "node": ">=0.10.0" } }, + "node_modules/has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -10706,6 +11143,12 @@ "entities": "^2.0.0" } }, + "node_modules/http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, "node_modules/http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -11061,6 +11504,15 @@ "node": ">=4" } }, + "node_modules/import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/import-local": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", @@ -11481,6 +11933,31 @@ "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=" }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-installed-globally/node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -11497,6 +11974,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -11581,6 +12070,12 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -11699,6 +12194,12 @@ "node": ">=8" } }, + "node_modules/is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -14058,6 +14559,12 @@ "node": ">=8" } }, + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, "node_modules/jquery": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", @@ -14147,6 +14654,12 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -14157,11 +14670,188 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "node_modules/json-parse-helpfulerror": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", + "dev": true, + "dependencies": { + "jju": "^1.1.0" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "node_modules/json-server": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/json-server/-/json-server-0.17.0.tgz", + "integrity": "sha512-+e/nW0mf666j1yTK+5dRx7hgxq5wJTkc5QhTYa/cBfD6vLlQWHfB4l8XKPgzeO55A8Hqm38g44OtZ5SooXi6MQ==", + "dev": true, + "dependencies": { + "body-parser": "^1.19.0", + "chalk": "^4.1.2", + "compression": "^1.7.4", + "connect-pause": "^0.1.1", + "cors": "^2.8.5", + "errorhandler": "^1.5.1", + "express": "^4.17.1", + "express-urlrewrite": "^1.4.0", + "json-parse-helpfulerror": "^1.0.3", + "lodash": "^4.17.21", + "lodash-id": "^0.14.1", + "lowdb": "^1.0.0", + "method-override": "^3.0.0", + "morgan": "^1.10.0", + "nanoid": "^3.1.23", + "please-upgrade-node": "^3.2.0", + "pluralize": "^8.0.0", + "server-destroy": "^1.0.1", + "update-notifier": "^5.1.0", + "yargs": "^17.0.1" + }, + "bin": { + "json-server": "lib/cli/bin.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/json-server/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/json-server/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/json-server/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/json-server/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/json-server/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/json-server/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/json-server/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/json-server/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/json-server/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/json-server/node_modules/yargs": { + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", + "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/json-server/node_modules/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -14291,6 +14981,15 @@ "node": ">=4.0" } }, + "node_modules/keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.0" + } + }, "node_modules/killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -14342,6 +15041,18 @@ "webpack-sources": "^1.1.0" } }, + "node_modules/latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "dependencies": { + "package-json": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -14634,6 +15345,15 @@ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, + "node_modules/lodash-id": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/lodash-id/-/lodash-id-0.14.1.tgz", + "integrity": "sha512-ikQPBTiq/d5m6dfKQlFdIXFzvThPi2Be9/AHxktOnDSfSxE1j9ICbBT5Elk1ke7HSTgM38LHTpmJovo9/klnLg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", @@ -14727,6 +15447,31 @@ "loose-envify": "cli.js" } }, + "node_modules/lowdb": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowdb/-/lowdb-1.0.0.tgz", + "integrity": "sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.3", + "is-promise": "^2.1.0", + "lodash": "4", + "pify": "^3.0.0", + "steno": "^0.4.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lowdb/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -14735,6 +15480,15 @@ "tslib": "^2.0.3" } }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -14856,6 +15610,36 @@ "node": ">= 8" } }, + "node_modules/method-override": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/method-override/-/method-override-3.0.0.tgz", + "integrity": "sha512-IJ2NNN/mSl9w3kzWB92rcdHpz+HjkxhDJWNDBqSlas+zQdP8wBiJzITPg08M/k2uVvMow7Sk41atndNtt/PHSA==", + "dev": true, + "dependencies": { + "debug": "3.1.0", + "methods": "~1.1.2", + "parseurl": "~1.3.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/method-override/node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/method-override/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -14936,6 +15720,15 @@ "node": ">=6" } }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/mini-create-react-context": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", @@ -15132,6 +15925,46 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "dev": true, + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/morgan/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/morgan/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "node_modules/move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -15814,6 +16647,15 @@ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" }, + "node_modules/p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/p-each-series": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", @@ -15888,6 +16730,30 @@ "node": ">=4" } }, + "node_modules/package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "dependencies": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -16127,6 +16993,24 @@ "node": ">=4" } }, + "node_modules/please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "dependencies": { + "semver-compare": "^1.0.0" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/pnp-webpack-plugin": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz", @@ -17600,6 +18484,18 @@ "node": ">=6" } }, + "node_modules/pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "dependencies": { + "escape-goat": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -17725,6 +18621,30 @@ "node": ">= 0.8" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", @@ -18485,6 +19405,30 @@ "node": ">=4" } }, + "node_modules/registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "dependencies": { + "rc": "^1.2.8" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "dependencies": { + "rc": "^1.2.8" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/regjsgen": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", @@ -18726,6 +19670,15 @@ "node": ">=0.10.0" } }, + "node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -19370,6 +20323,33 @@ "node": ">=10" } }, + "node_modules/semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "node_modules/semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "dependencies": { + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -19487,6 +20467,12 @@ "node": ">= 0.8.0" } }, + "node_modules/server-destroy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", + "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", + "dev": true + }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -20171,6 +21157,15 @@ "node": ">= 0.6" } }, + "node_modules/steno": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/steno/-/steno-0.4.4.tgz", + "integrity": "sha1-BxEFvfwobmYVwEA8J+nXtdy4Vcs=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.3" + } + }, "node_modules/stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", @@ -20268,13 +21263,13 @@ "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==" }, "node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" @@ -20285,6 +21280,17 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.6.tgz", @@ -21048,6 +22054,15 @@ "node": ">=0.10.0" } }, + "node_modules/to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -21219,6 +22234,19 @@ "node": ">=4" } }, + "node_modules/type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "optional": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -21449,6 +22477,104 @@ "yarn": "*" } }, + "node_modules/update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "dev": true, + "dependencies": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/update-notifier/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/update-notifier/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-notifier/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -21524,6 +22650,27 @@ "requires-port": "^1.0.0" } }, + "node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "dependencies": { + "prepend-http": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/url-parse-lax/node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", @@ -23127,6 +24274,18 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -23443,6 +24602,15 @@ } } }, + "node_modules/xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", @@ -26033,6 +27201,12 @@ } } }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, "@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -26167,6 +27341,15 @@ "loader-utils": "^2.0.0" } }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -26808,6 +27991,15 @@ "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" }, + "ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "requires": { + "string-width": "^4.1.0" + } + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -26834,9 +28026,9 @@ "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "3.2.1", @@ -27612,6 +28804,15 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -27710,6 +28911,90 @@ "integrity": "sha512-bs74WNI9BgBo3cEovmdMHikSKoXnDgA6VQjJ7TyTotU6L7d41ZyCEEelPwkYEzsG/Zjv3ie9IE3EMAje0W9Xew==", "requires": {} }, + "boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -27942,6 +29227,35 @@ "unset-value": "^1.0.0" } }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + }, + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true + } + } + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -28189,6 +29503,12 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -28268,6 +29588,15 @@ "wrap-ansi": "^6.2.0" } }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "clsx": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", @@ -28427,6 +29756,52 @@ "typedarray": "^0.0.6" } }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + } + } + }, "confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -28437,6 +29812,12 @@ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" }, + "connect-pause": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/connect-pause/-/connect-pause-0.1.1.tgz", + "integrity": "sha1-smmyu4Ldsaw9tQmcD7WCq6mfs3o=", + "dev": true + }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -28537,6 +29918,16 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, "cosmiconfig": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", @@ -29000,6 +30391,15 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -29018,6 +30418,12 @@ "regexp.prototype.flags": "^1.2.0" } }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -29117,6 +30523,12 @@ } } }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -29416,6 +30828,12 @@ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -29549,6 +30967,16 @@ "stackframe": "^1.1.1" } }, + "errorhandler": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz", + "integrity": "sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==", + "dev": true, + "requires": { + "accepts": "~1.3.7", + "escape-html": "~1.0.3" + } + }, "es-abstract": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", @@ -29620,6 +31048,12 @@ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -30534,6 +31968,16 @@ } } }, + "express-urlrewrite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/express-urlrewrite/-/express-urlrewrite-1.4.0.tgz", + "integrity": "sha512-PI5h8JuzoweS26vFizwQl6UTF25CAHSggNv0J25Dn/IKZscJHWZzPrI5z2Y2jgOzIaw2qh8l6+/jUcig23Z2SA==", + "dev": true, + "requires": { + "debug": "*", + "path-to-regexp": "^1.0.3" + } + }, "ext": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.5.0.tgz", @@ -31122,6 +32566,23 @@ "is-glob": "^4.0.1" } }, + "global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "requires": { + "ini": "2.0.0" + }, + "dependencies": { + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + } + } + }, "global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -31175,6 +32636,36 @@ } } }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + } + } + }, "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -31288,6 +32779,12 @@ } } }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -31475,6 +32972,12 @@ "entities": "^2.0.0" } }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -31743,6 +33246,12 @@ } } }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, "import-local": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", @@ -32042,6 +33551,24 @@ "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=" }, + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "dependencies": { + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + } + } + }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -32052,6 +33579,12 @@ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" }, + "is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", + "dev": true + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -32109,6 +33642,12 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -32185,6 +33724,12 @@ "is-docker": "^2.0.0" } }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -33902,6 +35447,12 @@ } } }, + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, "jquery": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", @@ -33967,6 +35518,12 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -33977,11 +35534,148 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "json-parse-helpfulerror": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", + "dev": true, + "requires": { + "jju": "^1.1.0" + } + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-server": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/json-server/-/json-server-0.17.0.tgz", + "integrity": "sha512-+e/nW0mf666j1yTK+5dRx7hgxq5wJTkc5QhTYa/cBfD6vLlQWHfB4l8XKPgzeO55A8Hqm38g44OtZ5SooXi6MQ==", + "dev": true, + "requires": { + "body-parser": "^1.19.0", + "chalk": "^4.1.2", + "compression": "^1.7.4", + "connect-pause": "^0.1.1", + "cors": "^2.8.5", + "errorhandler": "^1.5.1", + "express": "^4.17.1", + "express-urlrewrite": "^1.4.0", + "json-parse-helpfulerror": "^1.0.3", + "lodash": "^4.17.21", + "lodash-id": "^0.14.1", + "lowdb": "^1.0.0", + "method-override": "^3.0.0", + "morgan": "^1.10.0", + "nanoid": "^3.1.23", + "please-upgrade-node": "^3.2.0", + "pluralize": "^8.0.0", + "server-destroy": "^1.0.1", + "update-notifier": "^5.1.0", + "yargs": "^17.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", + "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + } + }, + "yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", + "dev": true + } + } + }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -34096,6 +35790,15 @@ "object.assign": "^4.1.2" } }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -34138,6 +35841,15 @@ "webpack-sources": "^1.1.0" } }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -34348,6 +36060,12 @@ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, + "lodash-id": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/lodash-id/-/lodash-id-0.14.1.tgz", + "integrity": "sha512-ikQPBTiq/d5m6dfKQlFdIXFzvThPi2Be9/AHxktOnDSfSxE1j9ICbBT5Elk1ke7HSTgM38LHTpmJovo9/klnLg==", + "dev": true + }, "lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", @@ -34425,6 +36143,27 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lowdb": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowdb/-/lowdb-1.0.0.tgz", + "integrity": "sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.3", + "is-promise": "^2.1.0", + "lodash": "4", + "pify": "^3.0.0", + "steno": "^0.4.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -34433,6 +36172,12 @@ "tslib": "^2.0.3" } }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -34535,6 +36280,35 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, + "method-override": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/method-override/-/method-override-3.0.0.tgz", + "integrity": "sha512-IJ2NNN/mSl9w3kzWB92rcdHpz+HjkxhDJWNDBqSlas+zQdP8wBiJzITPg08M/k2uVvMow7Sk41atndNtt/PHSA==", + "dev": true, + "requires": { + "debug": "3.1.0", + "methods": "~1.1.2", + "parseurl": "~1.3.2", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -34593,6 +36367,12 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, "mini-create-react-context": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", @@ -34741,6 +36521,42 @@ "minimist": "^1.2.5" } }, + "morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "dev": true, + "requires": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -35290,6 +37106,12 @@ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, "p-each-series": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", @@ -35337,6 +37159,26 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -35525,6 +37367,21 @@ "find-up": "^2.1.0" } }, + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true + }, "pnp-webpack-plugin": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz", @@ -36740,6 +38597,15 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -36827,6 +38693,26 @@ } } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, "react": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", @@ -37405,6 +39291,24 @@ "unicode-match-property-value-ecmascript": "^1.2.0" } }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, "regjsgen": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", @@ -37596,6 +39500,15 @@ } } }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -38091,6 +40004,29 @@ "lru-cache": "^6.0.0" } }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -38202,6 +40138,12 @@ "send": "0.17.1" } }, + "server-destroy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", + "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", + "dev": true + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -38776,6 +40718,15 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "steno": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/steno/-/steno-0.4.4.tgz", + "integrity": "sha1-BxEFvfwobmYVwEA8J+nXtdy4Vcs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.3" + } + }, "stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", @@ -38852,19 +40803,27 @@ "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==" }, "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1" }, "dependencies": { "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } } } }, @@ -39449,6 +41408,12 @@ } } }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -39582,6 +41547,13 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, + "type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "optional": true, + "peer": true + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -39762,6 +41734,79 @@ "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" }, + "update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "dev": true, + "requires": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -39827,6 +41872,23 @@ "requires-port": "^1.0.0" } }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + } + } + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -41099,6 +43161,15 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -41372,6 +43443,12 @@ "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", "requires": {} }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true + }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index 55cae55f0..42af7f908 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -62,6 +62,7 @@ "eslint-plugin-react": "^7.27.1", "eslint-plugin-react-hooks": "^4.3.0", "husky": "^7.0.4", + "json-server": "^0.17.0", "lint-staged": "^12.1.2", "nan": "^2.14.2", "redux-devtools-extension": "^2.13.9", @@ -75,6 +76,7 @@ "eject": "react-scripts eject", "lint": "eslint ./src && prettier --check ./src", "lint-fix": "eslint --fix ./src && prettier --write ./src", + "server": "node src/server.js", "prepare": "cd ../../ && husky install ./TbsReact/ClientApp/.husky" }, "eslintConfig": { @@ -96,5 +98,6 @@ }, "eslintIgnore": [ "build/" - ] + ], + "proxy": "http://localhost:3001" } diff --git a/TbsReact/ClientApp/src/server.js b/TbsReact/ClientApp/src/server.js new file mode 100644 index 000000000..0512dffcc --- /dev/null +++ b/TbsReact/ClientApp/src/server.js @@ -0,0 +1,22 @@ +require("dotenv").config(); + +const jsonServer = require("json-server"); +const server = jsonServer.create(); +const router = jsonServer.router("db.json"); +const middlewares = jsonServer.defaults(); + +server.use(middlewares); +server.use(router); +router.render = (req, res) => { + if (req.path.includes("/accesses/") && req.path !== "/accesses/") { + res.jsonp(res.locals.data.accesses); + } else if (req.path.includes("/status/") && req.path !== "/status/") { + res.jsonp(res.locals.data.status); + } else { + res.jsonp(res.locals.data); + } +}; +const port = process.env.PORT_API || 3001; +server.listen(port, () => { + console.log(`JSON Server is running at ${port}`); +}); diff --git a/TbsReact/ClientApp/src/setupProxy.js b/TbsReact/ClientApp/src/setupProxy.js deleted file mode 100644 index a471302f2..000000000 --- a/TbsReact/ClientApp/src/setupProxy.js +++ /dev/null @@ -1,19 +0,0 @@ -const createProxyMiddleware = require("http-proxy-middleware"); -const { env } = require("process"); - -const target = env.ASPNETCORE_HTTPS_PORT - ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` - : env.ASPNETCORE_URLS - ? env.ASPNETCORE_URLS.split(";")[0] - : "http://localhost:57848"; - -const context = ["/weatherforecast"]; - -module.exports = function (app) { - const appProxy = createProxyMiddleware(context, { - target: target, - secure: false, - }); - - app.use(appProxy); -}; From fdbdf1aee8c23773604a2aed0070894efdd1495b Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Mon, 7 Feb 2022 17:42:51 +0700 Subject: [PATCH 43/69] fix api request on frontend --- TbsReact/ClientApp/src/App.js | 11 ++++++++--- TbsReact/ClientApp/src/api/Accounts/Access.js | 2 +- TbsReact/ClientApp/src/api/Accounts/Driver.js | 2 +- TbsReact/ClientApp/src/api/Debug.js | 4 ++-- TbsReact/ClientApp/src/api/Setting.js | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/TbsReact/ClientApp/src/App.js b/TbsReact/ClientApp/src/App.js index 18fe7783d..e2386992a 100644 --- a/TbsReact/ClientApp/src/App.js +++ b/TbsReact/ClientApp/src/App.js @@ -18,9 +18,14 @@ const App = () => { const dispatch = useDispatch(); useEffect(() => { initConnection(); - signalRConnection.start().then(() => { - signalRConnection.on("message", (data) => console.log(data)); - }); + signalRConnection + .start() + .then(() => { + signalRConnection.on("message", (data) => console.log(data)); + }) + .catch((err) => { + console.error(err); + }); }, [dispatch]); useEffect(() => { diff --git a/TbsReact/ClientApp/src/api/Accounts/Access.js b/TbsReact/ClientApp/src/api/Accounts/Access.js index 3cb04edb9..7a1ad81c0 100644 --- a/TbsReact/ClientApp/src/api/Accounts/Access.js +++ b/TbsReact/ClientApp/src/api/Accounts/Access.js @@ -2,7 +2,7 @@ import axios from "axios"; const getAccesses = async (index) => { try { - const { data } = await axios.get(`/accounts/${index}/accesses`); + const { data } = await axios.get(`/accesses/${index}`); return data; } catch (e) { console.log(e); diff --git a/TbsReact/ClientApp/src/api/Accounts/Driver.js b/TbsReact/ClientApp/src/api/Accounts/Driver.js index 8be70b612..de4e1a0a0 100644 --- a/TbsReact/ClientApp/src/api/Accounts/Driver.js +++ b/TbsReact/ClientApp/src/api/Accounts/Driver.js @@ -42,7 +42,7 @@ const logoutAll = async () => { const getStatus = async (index) => { try { - const { data } = await axios.get(`/accounts/status/${index}`); + const { data } = await axios.get(`/status/${index}`); return data; } catch (e) { console.log(e); diff --git a/TbsReact/ClientApp/src/api/Debug.js b/TbsReact/ClientApp/src/api/Debug.js index 4e2e81e4c..1ea51b50f 100644 --- a/TbsReact/ClientApp/src/api/Debug.js +++ b/TbsReact/ClientApp/src/api/Debug.js @@ -2,7 +2,7 @@ import axios from "axios"; const getLogData = async (index) => { try { - const { data } = await axios.get(`/accounts/${index}/log`); + const { data } = await axios.get(`/log/${index}`); return data; } catch (e) { console.log(e); @@ -11,7 +11,7 @@ const getLogData = async (index) => { const getTaskList = async (index) => { try { - const { data } = await axios.get(`/accounts/${index}/task`); + const { data } = await axios.get(`/task/${index}`); return data; } catch (e) { if (e.response.status === 404) { diff --git a/TbsReact/ClientApp/src/api/Setting.js b/TbsReact/ClientApp/src/api/Setting.js index 37fd7826f..4a7c981fb 100644 --- a/TbsReact/ClientApp/src/api/Setting.js +++ b/TbsReact/ClientApp/src/api/Setting.js @@ -2,7 +2,7 @@ import axios from "axios"; const getChromeSetting = async (index) => { try { - const { data } = await axios.get(`/accounts/${index}/settings/chrome`); + const { data } = await axios.get(`/settings/chrome/${index}`); return data; } catch (e) { console.log(e); From 854d8c211325efaa56c1c1d00dba220e0171d35c Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 8 Feb 2022 11:39:21 +0700 Subject: [PATCH 44/69] fix api request --- TbsReact/ClientApp/db.json | 348 +++++++++++++++--- TbsReact/ClientApp/package.json | 2 +- TbsReact/ClientApp/src/api/Setting.js | 4 +- TbsReact/ClientApp/src/api/Village.js | 21 ++ .../components/Views/DebugView/LogBoard.js | 6 +- TbsReact/ClientApp/src/server.js | 10 +- 6 files changed, 343 insertions(+), 48 deletions(-) create mode 100644 TbsReact/ClientApp/src/api/Village.js diff --git a/TbsReact/ClientApp/db.json b/TbsReact/ClientApp/db.json index 4c4687963..dbdbc9f0a 100644 --- a/TbsReact/ClientApp/db.json +++ b/TbsReact/ClientApp/db.json @@ -149,9 +149,43 @@ "status": "true" } ], - "settings": [ + "settings_chrome": [ { "id": "1", + "click": { + "min": "1", + "max": "2" + }, + "workTime": { + "min": "1", + "max": "2" + }, + "sleepTime": { + "min": "1", + "max": "2" + }, + "disableImages": "true", + "autoClose": "true" + }, + { + "id": "2", + "click": { + "min": 1, + "max": 2 + }, + "workTime": { + "min": 1, + "max": 5 + }, + "sleepTime": { + "min": 1, + "max": 2 + }, + "disableImages": "true", + "autoClose": "true" + }, + { + "id": "3", "chrome": { "click": { "min": "1", @@ -169,62 +203,294 @@ "autoClose": "true" } }, + { + "id": "4", + "click": { + "min": "1", + "max": "2" + }, + "workTime": { + "min": "1", + "max": "2" + }, + "sleepTime": { + "min": "1", + "max": "2" + }, + "disableImages": "true", + "autoClose": "true" + } + ], + "villages": [ + { + "id": "1", + "villages": [ + { + "id": "112", + "name": "1", + "coords": { + "x": "1", + "y": "1" + } + }, + { + "id": "113", + "name": "2", + "coords": { + "x": "2", + "y": "-1" + } + } + ] + }, { "id": "2", - "chrome": { - "click": { - "min": "1", - "max": "2" + "villages": [ + { + "id": "114", + "name": "1", + "coords": { + "x": "1", + "y": "1" + } }, - "workTime": { - "min": "1", - "max": "2" + { + "id": "115", + "name": "2", + "coords": { + "x": "2", + "y": "-5" + } + } + ] + }, + { + "id": "3", + "villages": [ + { + "id": "116", + "name": "1", + "coords": { + "x": "1", + "y": "1" + } }, - "sleepTime": { - "min": "1", - "max": "2" + { + "id": "117", + "name": "2", + "coords": { + "x": "2", + "y": "-1" + } + } + ] + }, + { + "id": "4", + "villages": [ + { + "id": "118", + "name": "1", + "coords": { + "x": "1", + "y": "1" + } }, - "disableImages": "true", - "autoClose": "true" + { + "id": "119", + "name": "2", + "coords": { + "x": "2", + "y": "-1" + } + } + ] + } + ], + "village": [ + { + "id": "113", + "name": "1", + "coords": { + "x": "1", + "y": "1" + } + }, + { + "id": "114", + "name": "2", + "coords": { + "x": "1", + "y": "1" + } + }, + { + "id": "115", + "name": "3", + "coords": { + "x": "1", + "y": "1" } }, + { + "id": "116", + "name": "4", + "coords": { + "x": "1", + "y": "1" + } + }, + { + "id": "117", + "name": "5", + "coords": { + "x": "1", + "y": "1" + } + }, + { + "id": "118", + "name": "6", + "coords": { + "x": "1", + "y": "1" + } + }, + { + "id": "119", + "name": "7", + "coords": { + "x": "1", + "y": "1" + } + } + ], + "log": [ + { + "id": "1", + "log": [ + "a: dasdasd", + "a: dasdasd", + "a: dasdasd", + "a: dasdasd", + "a: dasdasd" + ] + }, + { + "id": "2", + "log": [ + "a: dasdasd", + "a: dasdasd", + "a: dasdasd", + "a: dasdasd", + "a: dasdasd" + ] + }, { "id": "3", - "chrome": { - "click": { - "min": "1", - "max": "2" + "log": [ + "a: dasdasd", + "a: dasdasd", + "a: dasdasd", + "a: dasdasd", + "a: dasdasd" + ] + }, + { + "id": "4", + "log": [ + "a: dasdasd", + "a: dasdasd", + "a: dasdasd", + "a: dasdasd", + "a: dasdasd" + ] + } + ], + "task": [ + { + "id": "1", + "task": [ + { + "id": 0, + "name": "login", + "villName": "_MyVill", + "priority": "Medium", + "stage": "Waiting", + "executeAt": "11:22 08/02/2022" }, - "workTime": { - "min": "1", - "max": "2" + { + "id": 0, + "name": "enter_vill", + "villName": "_MyVill", + "priority": "Medium", + "stage": "Waiting", + "executeAt": "11:22 08/02/2022" + } + ] + }, + { + "id": "2", + "task": [ + { + "id": 0, + "name": "login", + "villName": "_MyVill", + "priority": "Medium", + "stage": "Waiting", + "executeAt": "11:22 08/02/2022" }, - "sleepTime": { - "min": "1", - "max": "2" + { + "id": 0, + "name": "enter_vill", + "villName": "_MyVill", + "priority": "Medium", + "stage": "Waiting", + "executeAt": "11:22 08/02/2022" + } + ] + }, + { + "id": "3", + "task": [ + { + "id": 0, + "name": "login", + "villName": "_MyVill", + "priority": "Medium", + "stage": "Waiting", + "executeAt": "11:22 08/02/2022" }, - "disableImages": "true", - "autoClose": "true" - } + { + "id": 0, + "name": "enter_vill", + "villName": "_MyVill", + "priority": "Medium", + "stage": "Waiting", + "executeAt": "11:22 08/02/2022" + } + ] }, { "id": "4", - "chrome": { - "click": { - "min": "1", - "max": "2" - }, - "workTime": { - "min": "1", - "max": "2" - }, - "sleepTime": { - "min": "1", - "max": "2" + "task": [ + { + "id": 0, + "name": "login", + "villName": "_MyVill", + "priority": "Medium", + "stage": "Waiting", + "executeAt": "11:22 08/02/2022" }, - "disableImages": "true", - "autoClose": "true" - } + { + "id": 0, + "name": "enter_vill", + "villName": "_MyVill", + "priority": "Medium", + "stage": "Waiting", + "executeAt": "11:22 08/02/2022" + } + ] } ] } diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index 42af7f908..940e41e3f 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -99,5 +99,5 @@ "eslintIgnore": [ "build/" ], - "proxy": "http://localhost:3001" + "proxy": "http://localhost:3001/api" } diff --git a/TbsReact/ClientApp/src/api/Setting.js b/TbsReact/ClientApp/src/api/Setting.js index 4a7c981fb..c6e1ef69b 100644 --- a/TbsReact/ClientApp/src/api/Setting.js +++ b/TbsReact/ClientApp/src/api/Setting.js @@ -2,7 +2,7 @@ import axios from "axios"; const getChromeSetting = async (index) => { try { - const { data } = await axios.get(`/settings/chrome/${index}`); + const { data } = await axios.get(`/settings_chrome/${index}`); return data; } catch (e) { console.log(e); @@ -25,7 +25,7 @@ const setChromeSetting = async (index, data) => { max: data.sleep_max, }, }; - await axios.patch(`/accounts/${index}/settings/chrome`, patchData); + await axios.patch(`/settings_chrome/${index}/`, patchData); } catch (e) { console.log(e); } diff --git a/TbsReact/ClientApp/src/api/Village.js b/TbsReact/ClientApp/src/api/Village.js new file mode 100644 index 000000000..dadb05d55 --- /dev/null +++ b/TbsReact/ClientApp/src/api/Village.js @@ -0,0 +1,21 @@ +import axios from "axios"; + +const getVillages = async (index) => { + try { + const { data } = await axios.get(`/villages/${index}`); + return data; + } catch (e) { + console.log(e); + } +}; + +const getVillageInfo = async (index) => { + try { + const { data } = await axios.get(`/village/${index}`); + return data; + } catch (e) { + console.log(e); + } +}; + +export { getVillages, getVillageInfo }; diff --git a/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js b/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js index 272bcaeb3..f3f408ed9 100644 --- a/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js +++ b/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js @@ -7,14 +7,14 @@ import { signalRConnection } from "../../../realtime/connection"; import { useSelector } from "react-redux"; import { HubConnectionState } from "@microsoft/signalr/dist/esm/HubConnection"; const LogBoard = () => { - const [value, setValue] = useState(); + const [value, setValue] = useState([]); const account = useSelector((state) => state.account.info.id); const signalr = useSelector((state) => state.signalr); useEffect(() => { if (signalRConnection.State === HubConnectionState.Connected) { signalRConnection.on("logger", (data) => { - setValue((prev) => `${data}${prev}`); + setValue((prev) => `${data}\n${prev}`); }); return () => { @@ -37,7 +37,7 @@ const LogBoard = () => { style={{ width: "100%" }} maxRows={20} minRows={20} - value={value} + value={value.join("\n")} readOnly={true} defaultValue="Nothing here" /> diff --git a/TbsReact/ClientApp/src/server.js b/TbsReact/ClientApp/src/server.js index 0512dffcc..7bdfa7e2d 100644 --- a/TbsReact/ClientApp/src/server.js +++ b/TbsReact/ClientApp/src/server.js @@ -6,16 +6,24 @@ const router = jsonServer.router("db.json"); const middlewares = jsonServer.defaults(); server.use(middlewares); -server.use(router); + router.render = (req, res) => { if (req.path.includes("/accesses/") && req.path !== "/accesses/") { res.jsonp(res.locals.data.accesses); } else if (req.path.includes("/status/") && req.path !== "/status/") { res.jsonp(res.locals.data.status); + } else if (req.path.includes("/villages/") && req.path !== "/villages/") { + res.jsonp(res.locals.data.villages); + } else if (req.path.includes("/task/") && req.path !== "/task/") { + res.jsonp(res.locals.data.task); + } else if (req.path.includes("/log/") && req.path !== "/log/") { + res.jsonp(res.locals.data.log); } else { res.jsonp(res.locals.data); } }; +server.use("/api", router); + const port = process.env.PORT_API || 3001; server.listen(port, () => { console.log(`JSON Server is running at ${port}`); From 444cbcfab7fa2f0f2e68706ccb90eafa863cdee9 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 8 Feb 2022 12:03:18 +0700 Subject: [PATCH 45/69] add bone for village tab --- .../ClientApp/src/components/ContentBox.js | 23 +++++ .../Views/VillagesView/ContentBox.js | 14 --- .../components/Views/VillagesView/Villages.js | 86 ++++++++++++++++++- .../Views/VillagesView/VillagesTable.js | 42 +++++---- TbsReact/ClientApp/src/index.js | 11 +-- TbsReact/ClientApp/src/slices/account.js | 1 - TbsReact/ClientApp/src/slices/village.js | 43 ++++++++++ TbsReact/ClientApp/src/store.js | 35 ++------ 8 files changed, 181 insertions(+), 74 deletions(-) create mode 100644 TbsReact/ClientApp/src/components/ContentBox.js delete mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/ContentBox.js create mode 100644 TbsReact/ClientApp/src/slices/village.js diff --git a/TbsReact/ClientApp/src/components/ContentBox.js b/TbsReact/ClientApp/src/components/ContentBox.js new file mode 100644 index 000000000..189a8ff5f --- /dev/null +++ b/TbsReact/ClientApp/src/components/ContentBox.js @@ -0,0 +1,23 @@ +import PropTypes from "prop-types"; +import React from "react"; +import { Box } from "@mui/material"; + +import style from "../styles/box"; + +const ContentBox = ({ name }) => { + return ( + <> + +

[WIP] this is placeholder

+ + {name} +
+ + ); +}; + +ContentBox.propTypes = { + name: PropTypes.string.isRequired, +}; + +export default ContentBox; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/ContentBox.js b/TbsReact/ClientApp/src/components/Views/VillagesView/ContentBox.js deleted file mode 100644 index 9d9ef79cf..000000000 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/ContentBox.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; -import { Box } from "@mui/material"; - -import style from "../../../styles/box"; - -const ContentBox = () => { - return ( - <> - - - ); -}; - -export default ContentBox; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js index bc3d5fe2c..b45634828 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js @@ -1,9 +1,19 @@ -import React from "react"; -import { Grid } from "@mui/material"; -import ContentBox from "./ContentBox"; +import React, { useState } from "react"; + +import { Grid, Tabs, Tab, Box } from "@mui/material"; +import { Link, useRouteMatch, Switch, Route, Redirect } from "react-router-dom"; + +import style from "../../../styles/box"; import VillagesTable from "./VillagesTable"; +import ContentBox from "../../ContentBox"; const Villages = () => { + const { path, url } = useRouteMatch(); + const [value, setValue] = useState("/build"); + + const handleChange = (event, newValue) => { + setValue(newValue); + }; return ( <> { - + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js b/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js index 6de6da7c9..7ec311465 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js @@ -8,27 +8,35 @@ import { TableRow, Box, } from "@mui/material"; -// import VillageRows from "./VillageRows"; -import { useDispatch /* , useSelector */ } from "react-redux"; + +import { getVillages } from "../../../api/Village"; + +import VillageRows from "./VillageRows"; + +import { useDispatch, useSelector } from "react-redux"; +import { fetchVillageByID } from "../../../slices/village"; import style from "../../../styles/box"; const VillagesTable = () => { - // const account = useSelector((state) => state.account.info); - // const [villages, setVillages] = useState([]); - const [selected /*, setSelected */] = useState(-1); + const account = useSelector((state) => state.account.info); + const village = useSelector((state) => state.village.info); + const [villages, setVillages] = useState([]); + const [selected, setSelected] = useState(village.id); const dispatch = useDispatch(); - /* const onClick = (vill) => { - setSelected(vill.id); - }; */ + const onClick = (vill) => { + setSelected(vill.id); + }; useEffect(() => { - // getAccounts().then((data) => setAccounts(data)); - if (selected !== -1) { - // dispatch(fetchAccountByID(selected)); + if (account.id !== -1) { + getVillages(account.id).then((data) => setVillages(data)); + if (selected !== -1) { + dispatch(fetchVillageByID(selected)); + } } - }, [selected, dispatch]); + }, [selected, dispatch, account.id]); return ( <> @@ -42,11 +50,11 @@ const VillagesTable = () => { - {/* */} + diff --git a/TbsReact/ClientApp/src/index.js b/TbsReact/ClientApp/src/index.js index f3c1d2d81..0f6500dfe 100644 --- a/TbsReact/ClientApp/src/index.js +++ b/TbsReact/ClientApp/src/index.js @@ -6,20 +6,15 @@ import * as serviceWorkerRegistration from "./serviceWorkerRegistration"; import { Provider } from "react-redux"; import store from "./store"; -import { PersistGate } from "redux-persist/integration/react"; -import { persistStore } from "redux-persist"; const baseUrl = document.getElementsByTagName("base")[0].getAttribute("href"); const rootElement = document.getElementById("root"); -const persistor = persistStore(store); ReactDOM.render( - - - - - + + + , rootElement ); diff --git a/TbsReact/ClientApp/src/slices/account.js b/TbsReact/ClientApp/src/slices/account.js index 3b5d05db1..cb33468b9 100644 --- a/TbsReact/ClientApp/src/slices/account.js +++ b/TbsReact/ClientApp/src/slices/account.js @@ -6,7 +6,6 @@ export const fetchAccountByID = createAsyncThunk( "account/fetcInfohById", async (id, thunkAPI) => { const data = await getAccount(id); - console.log("i fetched"); return data; } ); diff --git a/TbsReact/ClientApp/src/slices/village.js b/TbsReact/ClientApp/src/slices/village.js new file mode 100644 index 000000000..961626fce --- /dev/null +++ b/TbsReact/ClientApp/src/slices/village.js @@ -0,0 +1,43 @@ +import { createSlice, createAsyncThunk } from "@reduxjs/toolkit"; + +import { getVillageInfo } from "../api/Village"; +export const fetchVillageByID = createAsyncThunk( + "village/fetcInfohById", + async (id, thunkAPI) => { + const data = await getVillageInfo(id); + return data; + } +); + +const initialState = { + info: { + id: -1, + name: 1, + coords: { + x: 1, + y: 1, + }, + }, +}; + +export const villageSlice = createSlice({ + name: "village", + initialState, + reducers: { + setVillage: (state, action) => { + state.info = action.payload; + }, + + resetVillage: (state, action) => { + return initialState; + }, + }, + extraReducers: (builder) => { + builder.addCase(fetchVillageByID.fulfilled, (state, action) => { + state.info = action.payload; + }); + }, +}); + +export const { setVillage, resetVillage } = villageSlice.actions; +export default villageSlice.reducer; diff --git a/TbsReact/ClientApp/src/store.js b/TbsReact/ClientApp/src/store.js index 34a34155c..44b844eb1 100644 --- a/TbsReact/ClientApp/src/store.js +++ b/TbsReact/ClientApp/src/store.js @@ -1,36 +1,11 @@ -/* import { configureStore } from '@reduxjs/toolkit' -import accountReducer from './slices/account' -export default configureStore({ - reducer: { - account: accountReducer, - }, - devTools: process.env.NODE_ENV !== 'production', -}) */ - import { configureStore } from "@reduxjs/toolkit"; -import storage from "redux-persist/lib/storage"; -import { combineReducers } from "redux"; -import { persistReducer } from "redux-persist"; -import autoMergeLevel2 from "redux-persist/lib/stateReconciler/autoMergeLevel2"; - -import thunk from "redux-thunk"; - import accountReducer from "./slices/account"; - -const reducers = combineReducers({ - account: accountReducer, -}); -const persistConfig = { - key: "tbsroot", - storage, - stateReconciler: autoMergeLevel2, -}; - -const persistedReducer = persistReducer(persistConfig, reducers); +import villageReducer from "./slices/village"; export default configureStore({ - reducer: persistedReducer, - devTools: process.env.NODE_ENV !== "production", - middleware: [thunk], + reducer: { + account: accountReducer, + village: villageReducer, + }, }); From 93ba006cedc919a8272f790938c48adf48538c44 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 8 Feb 2022 18:07:56 +0700 Subject: [PATCH 46/69] add wireframe village tab --- .../ClientApp/src/components/ContentBox.js | 7 ++- .../Views/VillagesView/SubView/Attack.js | 34 ++++++++++++ .../Views/VillagesView/SubView/Build.js | 34 ++++++++++++ .../Views/VillagesView/SubView/Farming.js | 55 +++++++++++++++++++ .../Views/VillagesView/SubView/Info.js | 8 +++ .../Views/VillagesView/SubView/Market.js | 17 ++++++ .../Views/VillagesView/SubView/Troops.js | 33 +++++++++++ .../components/Views/VillagesView/Villages.js | 19 ++++--- 8 files changed, 197 insertions(+), 10 deletions(-) create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Attack.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Build.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Farming.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Info.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Market.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Troops.js diff --git a/TbsReact/ClientApp/src/components/ContentBox.js b/TbsReact/ClientApp/src/components/ContentBox.js index 189a8ff5f..3831bc8bb 100644 --- a/TbsReact/ClientApp/src/components/ContentBox.js +++ b/TbsReact/ClientApp/src/components/ContentBox.js @@ -4,11 +4,11 @@ import { Box } from "@mui/material"; import style from "../styles/box"; -const ContentBox = ({ name }) => { +const ContentBox = ({ children, name }) => { return ( <> -

[WIP] this is placeholder

+ {children} {name}
@@ -17,7 +17,8 @@ const ContentBox = ({ name }) => { }; ContentBox.propTypes = { - name: PropTypes.string.isRequired, + children: PropTypes.any, + name: PropTypes.string, }; export default ContentBox; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Attack.js b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Attack.js new file mode 100644 index 000000000..1ebe365a0 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Attack.js @@ -0,0 +1,34 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "../../../ContentBox"; + +const Attack = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default Attack; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Build.js b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Build.js new file mode 100644 index 000000000..5a2b963f6 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Build.js @@ -0,0 +1,34 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "../../../ContentBox"; + +const Build = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default Build; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Farming.js b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Farming.js new file mode 100644 index 000000000..90a42df4e --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Farming.js @@ -0,0 +1,55 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "../../../ContentBox"; + +const Farming = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default Farming; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Info.js b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Info.js new file mode 100644 index 000000000..4deaea59e --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Info.js @@ -0,0 +1,8 @@ +import React from "react"; +import ContentBox from "../../../ContentBox"; + +const Info = () => { + return ; +}; + +export default Info; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Market.js b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Market.js new file mode 100644 index 000000000..d4708d774 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Market.js @@ -0,0 +1,17 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "../../../ContentBox"; + +const Market = () => { + return ( + + + + + + + + ); +}; + +export default Market; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Troops.js b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Troops.js new file mode 100644 index 000000000..1fa40d23c --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Troops.js @@ -0,0 +1,33 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "../../../ContentBox"; + +const Troops = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default Troops; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js index b45634828..a23b244a5 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js @@ -5,7 +5,12 @@ import { Link, useRouteMatch, Switch, Route, Redirect } from "react-router-dom"; import style from "../../../styles/box"; import VillagesTable from "./VillagesTable"; -import ContentBox from "../../ContentBox"; +import Build from "./SubView/Build"; +import Market from "./SubView/Market"; +import Troops from "./SubView/Troops"; +import Attack from "./SubView/Attack"; +import Farming from "./SubView/Farming"; +import Info from "./SubView/Info"; const Villages = () => { const { path, url } = useRouteMatch(); @@ -76,22 +81,22 @@ const Villages = () => {
- + - + - + - + - + - +
From 001a605632389db37c2767b58ce93c11164b73c6 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 8 Feb 2022 18:27:37 +0700 Subject: [PATCH 47/69] add wireframe new villages tab --- .../src/components/Header/LeftHeader.js | 12 +++++ TbsReact/ClientApp/src/components/Layout.js | 15 +++++-- .../src/components/Views/HeroView/Hero.js | 44 +++++++++++++++++++ .../Views/NewVillageView/NewVilalge.js | 40 +++++++++++++++++ 4 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 TbsReact/ClientApp/src/components/Views/HeroView/Hero.js create mode 100644 TbsReact/ClientApp/src/components/Views/NewVillageView/NewVilalge.js diff --git a/TbsReact/ClientApp/src/components/Header/LeftHeader.js b/TbsReact/ClientApp/src/components/Header/LeftHeader.js index 917f51f36..080473827 100644 --- a/TbsReact/ClientApp/src/components/Header/LeftHeader.js +++ b/TbsReact/ClientApp/src/components/Header/LeftHeader.js @@ -17,12 +17,24 @@ const LeftHeader = () => { to="/setting" component={Link} /> + + { return ( @@ -28,15 +30,22 @@ const Layout = () => { + + + + + + + + + - - - + diff --git a/TbsReact/ClientApp/src/components/Views/HeroView/Hero.js b/TbsReact/ClientApp/src/components/Views/HeroView/Hero.js new file mode 100644 index 000000000..57e1abedf --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/HeroView/Hero.js @@ -0,0 +1,44 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "../../ContentBox"; + +const Hero = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default Hero; diff --git a/TbsReact/ClientApp/src/components/Views/NewVillageView/NewVilalge.js b/TbsReact/ClientApp/src/components/Views/NewVillageView/NewVilalge.js new file mode 100644 index 000000000..81957f391 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/NewVillageView/NewVilalge.js @@ -0,0 +1,40 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "../../ContentBox"; + +const NewVillages = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default NewVillages; From 276a40e677ae466ffea900774e7c4d83a34ed925 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 8 Feb 2022 20:56:20 +0700 Subject: [PATCH 48/69] Fix ci Fix ci (remove docker temporarily) --- .github/workflows/build.yml | 107 ++- TbsCore/packages.lock.json | 650 ------------------ .../Properties/PublishProfiles/Mac.pubxml | 2 + 3 files changed, 45 insertions(+), 714 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e23de9f5e..a3e6ec6ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,83 +5,61 @@ on: types: [opened, reopened, synchronize, labeled] jobs: build-react-linux: - runs-on: ubuntu-latest + runs-on: ubuntu-latest if: ${{ contains( github.event.pull_request.labels.*.name, 'TbsReact') }} steps: - - name: 'Checkout repo' + - name: "Checkout repo" uses: actions/checkout@v2 - name: Setup dotnet uses: actions/setup-dotnet@v1 - with: - dotnet-version: '5.x' + with: + dotnet-version: "5.x" - name: Build TbsCore run: dotnet build TbsCore/TbsCore.csproj --configuration Release - name: Publish TbsReact run: dotnet publish TbsReact/TbsReact.csproj /p:PublishProfile=TbsReact/Properties/PublishProfiles/Linux.pubxml - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-TbsReact-Test - restore-keys: | - ${{ runner.os }}-buildx-TbsReact - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 + - name: Rename folder + run: mv TbsReact/bin/Debug/net5.0/linux-x64/publish/ TbsReact/bin/Debug/net5.0/linux-x64/TbsReact-build/ + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 with: - context: ./TbsReact - file: ./TbsReact/Dockerfile - push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/tbsreact:build - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - create-linux-folder: + name: TbsReact-Linux-Build + path: TbsReact/bin/Debug/net5.0/linux-x64/TbsReact-build/ + if-no-files-found: error + + build-react-mac: runs-on: ubuntu-latest - needs: build-react-linux if: ${{ contains( github.event.pull_request.labels.*.name, 'TbsReact') }} - steps: - - name: 'Checkout repo' + steps: + - name: "Checkout repo" uses: actions/checkout@v2 - - name: Create folder - run: mkdir TbsReact-build - - name: Copy file - run: | - cp TbsReact/docker-compose.yml TbsReact-build - cp TbsReact/install_docker.sh TbsReact-build - cp TbsReact/start_bot.sh TbsReact-build - - name: Create .env - run: | - cd TbsReact-build - touch .env - echo "# Don't change TAG variable if you don't know what you are doing" >> .env - echo "TAG=build" >> .env - echo "WEB_PORT=5000" >> .env - echo "VNC_PASS=1975" >> .env - echo "VNC_PORT=5009" >> .env - + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "5.x" + - name: Build TbsCore + run: dotnet build TbsCore/TbsCore.csproj --configuration Release + - name: Publish TbsReact + run: dotnet publish TbsReact/TbsReact.csproj /p:PublishProfile=TbsReact/Properties/PublishProfiles/Mac.pubxml + - name: Rename folder + run: mv TbsReact/bin/Debug/net5.0/osx-x64/publish/ TbsReact/bin/Debug/net5.0/osx-x64/TbsReact-build/ - name: Upload a Build Artifact uses: actions/upload-artifact@v2 with: - name: TbsReact-Linux-Build - path: TbsReact-build + name: TbsReact-Mac-Build + path: TbsReact/bin/Debug/net5.0/osx-x64/TbsReact-build/ if-no-files-found: error + build-react-window: - runs-on: ubuntu-latest + runs-on: ubuntu-latest if: ${{ contains( github.event.pull_request.labels.*.name, 'TbsReact') }} steps: - - name: 'Checkout repo' + - name: "Checkout repo" uses: actions/checkout@v2 - name: Setup dotnet uses: actions/setup-dotnet@v1 - with: - dotnet-version: '5.x' + with: + dotnet-version: "5.x" - name: Build TbsCore run: dotnet build TbsCore/TbsCore.csproj --configuration Release - name: Publish TbsReact @@ -99,10 +77,10 @@ jobs: if: ${{ contains( github.event.pull_request.labels.*.name, 'TbsWinform') }} steps: - name: setup-msbuild - uses: microsoft/setup-msbuild@v1 + uses: microsoft/setup-msbuild@v1 - name: Setup NuGet uses: NuGet/setup-nuget@v1.0.5 - - name: 'Checkout repo' + - name: "Checkout repo" uses: actions/checkout@v2 - name: Navigate to Workspace run: cd $GITHUB_WORKSPACE @@ -110,13 +88,13 @@ jobs: uses: actions/cache@v2 with: path: | - packages - TbsCore/obj/project.assets.json - TbsCore/TbsCore.csproj.nuget.g.targets - TbsCore/TbsCore.csproj.nuget.g.props. + packages + TbsCore/obj/project.assets.json + TbsCore/TbsCore.csproj.nuget.g.targets + TbsCore/TbsCore.csproj.nuget.g.props. key: ${{ runner.os }}-nuget-${{ hashFiles('TbsCore/packages.lock.json') }} restore-keys: | - ${{ runner.os }}-nuget- + ${{ runner.os }}-nuget- - name: Restore Packages run: | nuget restore TbsCore/TbsCore.csproj -PackagesDirectory packages @@ -132,9 +110,10 @@ jobs: if-no-files-found: error message: runs-on: ubuntu-latest - needs: [create-linux-folder, build-react-window, build-winform] + needs: + [build-react-linux, build-react-mac, build-react-window, build-winform] if: ${{ always() && (contains(needs.*.result, 'success') || (contains(needs.*.result, 'failure'))) }} - steps: + steps: - name: Comment on PR when success uses: actions/github-script@0.3.0 if: | @@ -152,4 +131,4 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { issue: { number: issue_number }, repo: { owner, repo } } = context; - github.issues.createComment({ issue_number, owner, repo, body: "[Tbs Autobuild] There is error while building this commit. Check detail [here](https://github.com/Erol444/TravianBotSharp/actions/runs/${{ github.run_id }}?check_suite_focus=true)" }); \ No newline at end of file + github.issues.createComment({ issue_number, owner, repo, body: "[Tbs Autobuild] There is error while building this commit. Check detail [here](https://github.com/Erol444/TravianBotSharp/actions/runs/${{ github.run_id }}?check_suite_focus=true)" }); diff --git a/TbsCore/packages.lock.json b/TbsCore/packages.lock.json index 8a00cf31f..1a09bfdf8 100644 --- a/TbsCore/packages.lock.json +++ b/TbsCore/packages.lock.json @@ -1071,656 +1071,6 @@ "System.Xml.XmlDocument": "4.3.0" } } - }, - ".NETStandard,Version=v2.0/linux-x64": { - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.unix.Microsoft.Win32.Primitives": "4.3.0" - } - }, - "runtime.any.System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "23g6rqftKmovn2cLeGsuHUYm0FD7pdutb0uQMJpZ3qTvq+zHkgmt6J65VtRry4WDGYlmkMa4xDACtaQ94alNag==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "runtime.any.System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1lpifymjGDzoYIaam6/Hyqf8GhBI3xXYLK2TgEvTtuZMorG3Kb9QnMTIKhLjJYXIiu1JvxjngHvtVFQQlpQ3HQ==" - }, - "runtime.any.System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sMDBnad4rp4t7GY442Jux0MCUuKL4otn5BK6Ni0ARTXTSpRNBzZ7hpMfKSvnVSED5kYJm96YOWsqV0JH0d2uuw==" - }, - "runtime.any.System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "M1r+760j1CNA6M/ZaW6KX8gOS8nxPRqloqDcJYVidRG566Ykwcs29AweZs2JF+nMOCgWDiMfPSTMfvwOI9F77w==" - }, - "runtime.any.System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "SDZ5AD1DtyRoxYtEcqQ3HDlcrorMYXZeCt7ZhG9US9I5Vva+gpIWDGMkcwa5XiKL0ceQKRZIX2x0XEjLX7PDzQ==" - }, - "runtime.any.System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "hLC3A3rI8jipR5d9k7+f0MgRCW6texsAp0MWkN/ci18FMtQ9KH7E2vDn/DH2LkxsszlpJpOn9qy6Z6/69rH6eQ==" - }, - "runtime.any.System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Nrm1p3armp6TTf2xuvaa+jGTTmncALWFq22CpmwRvhDf6dE9ZmH40EbOswD4GnFLrMRS0Ki6Kx5aUPmKK/hZBg==" - }, - "runtime.any.System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Lxb89SMvf8w9p9+keBLyL6H6x/TEmc6QVsIIA0T36IuyOY3kNvIdyGddA2qt35cRamzxF8K5p0Opq4G4HjNbhQ==" - }, - "runtime.any.System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fRS7zJgaG9NkifaAxGGclDDoRn9HC7hXACl52Or06a/fxdzDajWb5wov3c6a+gVSlekRoexfjwQSK9sh5um5LQ==", - "dependencies": { - "System.Private.Uri": "4.3.0" - } - }, - "runtime.any.System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GG84X6vufoEzqx8PbeBKheE4srOhimv+yLtGb/JkR3Y2FmoqmueLNFU4Xx8Y67plFpltQSdK74x0qlEhIpv/CQ==" - }, - "runtime.any.System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "lBoFeQfxe/4eqjPi46E0LU/YaCMdNkQ8B4MZu/mkzdIAZh8RQ1NYZSj0egrQKdgdvlPFtP4STtob40r4o2DBAw==" - }, - "runtime.any.System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+ihI5VaXFCMVPJNstG4O4eo1CfbrByLxRrQQTqOTp1ttK0kUKDqOdBSTaCB2IBk/QtjDrs6+x4xuezyMXdm0HQ==" - }, - "runtime.any.System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NLrxmLsfRrOuVqPWG+2lrQZnE53MLVeo+w9c54EV+TUo4c8rILpsDXfY8pPiOy9kHpUHHP07ugKmtsU3vVW5Jg==" - }, - "runtime.any.System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OhBAVBQG5kFj1S+hCEQ3TUHBAEtZ3fbEMgZMRNdN8A0Pj4x+5nTELEqL59DU0TjKVE6II3dqKw4Dklb3szT65w==" - }, - "runtime.any.System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "w4ehZJ+AwXYmGwYu+rMvym6RvMaRiUEQR1u6dwcyuKHxz8Heu/mO9AG1MquEgTyucnhv3M43X0iKpDOoN17C0w==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "runtime.unix.Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "2mI2Mfq+CVatgr4RWGvAWBjoCfUafy6VNFU7G9OA52DjO8x/okfIbsEq2UPgeGfdpO7X5gmPXKT8slx0tn0Mhw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "WV8KLRHWVUVUDduFnvGMHt0FsEt2wK6xPl1EgDKlaMx2KnZ43A/O0GzP8wIuvAC7mq4T9V1mm90r+PXkL9FPdQ==", - "dependencies": { - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ajmTcjrqc3vgV1TH54DRioshbEniaFbOAJ0kReGuNsp9uIcqYle0RmUo6+Qlwqe3JIs4TDxgnqs3UzX3gRJ1rA==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "AZcRXhH7Gamr+bckUfX3iHefPIrujJTt9XWQWo0elNiP1SNasX0KBWINZkDKY0GsOrsyJ7cB4MgIRTZzLlsTKg==", - "dependencies": { - "Microsoft.Win32.Primitives": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.Private.Uri": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ooWzobr5RAq34r9uan1r/WPXJYG1XWy9KanrxNvEnBzbFdQbMG7Y3bVi4QxR7xZMNLOxLLTAyXvnSkfj5boZSg==", - "dependencies": { - "runtime.native.System": "4.3.0" - } - }, - "runtime.unix.System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "zQiTBVpiLftTQZW8GFsV0gjYikB1WMkEPIxF5O6RkUrSV/OgvRRTYgeFQha/0keBpuS0HYweraGRwhfhJ7dj7w==", - "dependencies": { - "System.Private.Uri": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "SQLitePCLRaw.lib.e_sqlite3": { - "type": "Transitive", - "resolved": "2.0.2", - "contentHash": "S+Tsqe/M7wsc+9HeediI6UHtBKf2X586aRwhi1aBVLGe0WxkAo52O9ZxwEy/v8XMLefcrEMupd2e9CDlIT6QCw==" - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Collections": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.unix.System.Diagnostics.Debug": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Diagnostics.Tracing": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Globalization": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Globalization.Calendars": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.any.System.IO": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.unix.System.IO.FileSystem": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.2", - "contentHash": "y7hv0o0weI0j0mvEcBOdt1F3CAADiWlcw3e54m8TfYiRmBPDIsHElx8QUPDlY4x6yWXKPGN0Z2TuXCTPgkm5WQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "runtime.unix.System.Net.Primitives": "4.3.0" - } - }, - "System.Private.Uri": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I4SwANiUGho1esj4V4oSlPllXjzCZDE+5XXso2P03LW2vOda2Enzh8DWOxwN6hnrJyp314c7KuVu31QYhRzOGg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "runtime.unix.System.Private.Uri": "4.3.0" - } - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Reflection": "4.3.0" - } - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Reflection.Primitives": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Resources.ResourceManager": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "runtime.any.System.Runtime": "4.3.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.unix.System.Runtime.Extensions": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "runtime.any.System.Runtime.InteropServices": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.any.System.Text.Encoding.Extensions": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "runtime.any.System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.0.1", - "contentHash": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0", - "runtime.any.System.Threading.Timer": "4.3.0" - } - } } } } \ No newline at end of file diff --git a/TbsReact/Properties/PublishProfiles/Mac.pubxml b/TbsReact/Properties/PublishProfiles/Mac.pubxml index 3beab410b..6d15cc161 100644 --- a/TbsReact/Properties/PublishProfiles/Mac.pubxml +++ b/TbsReact/Properties/PublishProfiles/Mac.pubxml @@ -17,5 +17,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. osx-x64 8a9d5fc4-e3fb-47fa-8253-6a68b604111d true + True + True \ No newline at end of file From 023411f3576038e3dc2c8885b194f1baf15d25f8 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 8 Feb 2022 21:34:44 +0700 Subject: [PATCH 49/69] updatae chromedriver v97 --- TbsCoreTest/TbsCoreTest.csproj | 1 + TbsReact/TbsReact.csproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TbsCoreTest/TbsCoreTest.csproj b/TbsCoreTest/TbsCoreTest.csproj index 8ac8ae367..2231ace00 100644 --- a/TbsCoreTest/TbsCoreTest.csproj +++ b/TbsCoreTest/TbsCoreTest.csproj @@ -9,6 +9,7 @@ + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TbsReact/TbsReact.csproj b/TbsReact/TbsReact.csproj index 39a48bebf..e695a038c 100644 --- a/TbsReact/TbsReact.csproj +++ b/TbsReact/TbsReact.csproj @@ -15,7 +15,7 @@ - + From 0f66aa9494d0c29fbca6bbdc1c538134094dc25e Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 12 Feb 2022 10:25:47 +0700 Subject: [PATCH 50/69] add wireframe for farming & overview tab --- .../src/components/Header/LeftHeader.js | 12 +++++ TbsReact/ClientApp/src/components/Layout.js | 8 +++ .../Views/FarmingView/FarmingView.js | 52 +++++++++++++++++++ .../src/components/Views/Overview/Overview.js | 8 +++ 4 files changed, 80 insertions(+) create mode 100644 TbsReact/ClientApp/src/components/Views/FarmingView/FarmingView.js create mode 100644 TbsReact/ClientApp/src/components/Views/Overview/Overview.js diff --git a/TbsReact/ClientApp/src/components/Header/LeftHeader.js b/TbsReact/ClientApp/src/components/Header/LeftHeader.js index 080473827..b595d64a1 100644 --- a/TbsReact/ClientApp/src/components/Header/LeftHeader.js +++ b/TbsReact/ClientApp/src/components/Header/LeftHeader.js @@ -29,6 +29,18 @@ const LeftHeader = () => { to="/villages" component={Link} /> + + { return ( @@ -39,9 +41,15 @@ const Layout = () => { + + + + + + diff --git a/TbsReact/ClientApp/src/components/Views/FarmingView/FarmingView.js b/TbsReact/ClientApp/src/components/Views/FarmingView/FarmingView.js new file mode 100644 index 000000000..2f5dd763c --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/FarmingView/FarmingView.js @@ -0,0 +1,52 @@ +import React from "react"; +import { Grid } from "@mui/material"; +import ContentBox from "../../ContentBox"; + +const NewVillages = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default NewVillages; diff --git a/TbsReact/ClientApp/src/components/Views/Overview/Overview.js b/TbsReact/ClientApp/src/components/Views/Overview/Overview.js new file mode 100644 index 000000000..ddf3c5f07 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/Overview/Overview.js @@ -0,0 +1,8 @@ +import React from "react"; +import ContentBox from "../../ContentBox"; + +const Overview = () => { + return ; +}; + +export default Overview; From c73d63532a28d6b9f0334830d05e6a9ea50c2994 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 12 Feb 2022 11:08:30 +0700 Subject: [PATCH 51/69] update info & icon --- TbsReact/ClientApp/.env | 3 +- TbsReact/ClientApp/public/favicon.ico | Bin 5430 -> 38078 bytes TbsReact/ClientApp/public/index.html | 2 +- TbsReact/ClientApp/public/manifest.json | 4 +- TbsReact/ClientApp/src/components/NavMenu.js | 2 +- .../ClientApp/src/components/Views/Info.js | 146 ++++++++++-------- 6 files changed, 85 insertions(+), 72 deletions(-) diff --git a/TbsReact/ClientApp/.env b/TbsReact/ClientApp/.env index e4feab932..f1bc0abd7 100644 --- a/TbsReact/ClientApp/.env +++ b/TbsReact/ClientApp/.env @@ -1,2 +1,3 @@ BROWSER=none -PORT_API=3001 \ No newline at end of file +PORT_API=3001 +REACT_APP_TBS_VERSION=1975_build \ No newline at end of file diff --git a/TbsReact/ClientApp/public/favicon.ico b/TbsReact/ClientApp/public/favicon.ico index 63e859b476eff5055e0e557aaa151ca8223fbeef..ff2fb34b1f715083b8610f450430e01c8f13ece1 100644 GIT binary patch literal 38078 zcmeHQ2Yij!`@e`4dlT8)s!h!pv5DBDlxk_KLv5|SV~Y_ID@1}2#NIoEMC`qjkUhx| z;rstS=jNuDmQr2+&*!I~r|-FM-h1EkexK(&>pbVY8ch!V*T27p|2NlcT%ysG)@U^L zB%ab7Bgy%<{d+gQPkNy3R{r+E# z?;rgh08K_(vL+(@q3@N8!MGH14l)MhIdpu`|Bb)<`9AjdKlc0j&-zcaU%g1vh@6K% zybHnq^vR=mc<&bEIezc{fA{l!?C*c<_kZu1_0PTe`}%*A_WS<*xyUyuB{^Ob7yU%( z9>HJeLeLqAJ`&rYyH0nMv7%3J-tW!Nx@+G&uj}`l=l|``x_-Uw_-6m!yzYJfuESF> z7JYO3#uZ$>bRL&41R?O$G01rMAO64kLK&28q4&jCcio%((c!K;rY0w8q8^94+`oMj zH?LmCl?x#V4m^X)A?J}CAFFwumhu|u^_fQK#q(q>aZJALxBiLq zZ{n4io~jYbASo=e^o9;U9ba@u-Fe+ncV2f?=k+jsnv|e<{OAE5+_?qe!Hp}Ia54BC zP8~ansEEgd-o!sWJxQZa&xzY_NUx9SS^7#JJB4>@n&t&5BZbeFjep|5$Ac{XXJ$Or zD3Ulpuun@@l#!mUdCvZ(rKf08+254sT1w5}XHwdWRCRooo~#kl{r%~)WKHtZq->JU z2?+_B%omybom5SDcsL&1yNCOC@2ca?>(?Q4E-(_;<)3zg#^pwlvqu2S`>dj zj`vK^Jb#&_C@q6=gpT+uspOMTS{8rOQj;_(DT$gC-e3J@a)u^@l=<|zCNqV$KAnAf z9{=CLU-+Qo0r~JEBVEyR9);2~pKDT|r)pBjk7sGm6iHjo3#IWI`MdBdEscE3qF1k8 z5eH(Lk)cUWPFDEeBmP47@88Gm+qZFpxQB#<;Nr!LNT+-zCrFH@)kCSz6UgUy-h;N8 z*e9h#DW0UH$Mb#(nsoL%<0WM}ld?_9e3`C!MUwu@7?iP-mcna@yTbn&ulX6duIIMr-2ZqxfBp z1NyD8F%g=igg8w)$7JS<=h?PGK1*MvPcnv;o)KL{8PCXwr4Pk%BYfa>%0^KBGf2t~ z{EId~#r_<#zrmk;kaO`d@tXMPL`_^&ye2jx!7=7Z{GjN^u`W^JF}^}KuiT;SyoR%< zf^p)=N$lITU(p^Og?8@Pi!-OsLimuJ^i1I|xC`BX@JJm6|C_h&;NYPn91{-_6c~j4 zd-lSA`%diNdk6>iAI9N>$8hA(aRi;A&lGYMcW>T9*n@ETO^?a5m_gDURb(#t)eB1JR!8$b&aA$3szy#!j*7cumVe$tiimwZdks|6N?tP zV;A}GJOk8CnF@cwT}Lt&Zr#4CKA#IZuiC*px-DG}S64U8oZ*UD)7>z~WjW@~UXJ;5 zJ+f)u9CrvUoVP;tVcC*(Shs33*00%$4ePdJQa`-5&)6Yswh^8K*%=1|@6%Vv= z#XpL<{y59R|5YY+J=uuV9MmRm_EfD(2P=7fmySc;(W+u#8NIF zJ_>{Ap9c>^vq`6eb-18LIub(l8En|<|B{hK^d+uvC;)??nxwOF~t8wd9s!QET8wQ;r%f9j%t4S(SU zao6d4(XkhTE@I;ed>IPbvxLkjj z8hrt?@&go^8-IneB|k%%61~;=3FEe7$r2w#L`M6jre|m(qN02sg@xf^XejQ7Y3V_D zm}-YbMBu{JD>!!Ql=|%DLp-Os!_uS|j7twh`BGnHlX00ZAymHf0F*DoK9u_s7N!GX zWAP0t*#3Z8)kdRf11Amz;%Pkno>Z;uiyipa@fSNwdh+;D z@Xl=q;o-UigSyW_Ez5zhEj8;wNC z5o9$~C-3A?Kcif!F^Z%wX2#=SZZaOG<;SXimMzVGm;4d- zWxqj>meVkIiVyrY?nmt77?+o+w9~&6C;T0}_)UBzKBkUnUteY69~OEaJ9Zq!xG_Gc zL;0~W9R+hfvvC=D<{6atEGjpRm`{UA`57=Vo(>a}sftX^rb5Wlat4YP8;(+?$6(Z` zqgd^}8@spdLg@W4L_Lmn2@8Ep9TY~)A3G;ODa&=T2QjQcQ{_?9mg2|D*6M{KH}?`^mT;5s8cUZeqhuf4Hxu-gfmw z+xDYjRBnX2pSkHm%J>3BCgta|e_Aps&;DgmIrgh;+1V&lW|o%9%|MB=<6u{5G=>fJ zz$U@}%6+_i##oGT#(x6;7xang2R{nCi|v$u9sZ`qlc-x~@_G5(FA zh9iWr*v9P#FlDAE`g}eUHdX_9?+K*&+WYC@uj7R&`66Uy=E^=SKzZZ&+59k~YzY3= z6-VL6q3+l~{BK=(pv9kY*na~5OvWQ`;9tG!MB+LH#${bN-WS8dWQq1DZIbXp9r@g^ z@xgd5EG_sq^95>LlrA+Iw$?wOb<44s<+26$AEnUGjD+|>p|ruFVGj}Z_&y?H!+q~Z zJi>(=cd>f?0d(y)2^A}RM}0pWmc}z^gBQYr_{zQXNzMuGLgwa+vfDbIn3~U1_}fta ze;VfTTl^W{N!<4D>K`rsq2c#%@JJ9QOxTGU)h6*dsn4ljvhf!l=#i!AQdpWT(T)i{ zTr7!$klG6Nll?b&Ap9`5$1<%Q-& ziZ(`mGspNgJ^!}zAFcmiNz9(0(Z|1L^~rqBY1BP)--^FJFW%bbSSeF>CM;~Gp<|Dw zxP0douHB2m-G`58k00R)W8J7n_YoHn<`~L2_QHiQELeCLRjZ7K74L6By<=msn0(Zd zj<-5K$WbTjx^bX8zKQ>jlz)BvU;bC{r~Y}K7O#2u_#XCW$-m%lWig%dJ}(=8GZQz; zvRn2Tu%`T5n=FHcv6d`N#8-ERwXv40$}gkdc1N)iODKa2(5CAu>UZGc-ALSgc%O5Q z5AozqD5CE@LR@H6eAwM6gakikOnnA5s!xEeC3P9^VP#Hw7yi_RY79{4nF;CXBYpWF zGJGZcDF1gT|6+eLB@g$Ev8Uw584Ky?ZF2s$^B*Pu^o5YYd#5I9Wc=?x9E=GQ{ZYNf zBv@Kar$0F#rshlde9K7gipJAgrC1}@W z4T6b($h{}H{^%a=KDdw2yP=4@8;+QVad>n$8X-XuSn75THET_Sz0D%nT6hruWr_#Z z7H+TcK{p1>**`_JJLW>tUy_+6ZI#tRrGIQI|BN3;uEOSRM{t{YBk@095qmlQ+xWj? zzF2(W(69)cKKBsgr}*QOnq#Rm=~nyuk+C9HWbYm4QiUwL3YhJ*dteR`09KKDy|LFY3%KuB|@+IdUMn7Dh zUx&Y??M(FyWvrH>6rbIQIGCERU_7)8wpMORHU<9*mReH$AWjv{Rw}Awu?m&hu1q|t zSDKG5J(ghGkvrIO{0uf7I{>f!d*HQuFE;ExhK;*VV$dR#1Q{Pj(yI>d<6Ewn~%j`;&6pO=G1GTD;hrRVIh>VrDUWhV$HX}Zl zDe<%<{?^uR3Ku)#VrR1ycD73tRbab<^)lkdzjKUOo6e)o8V8FCL*d{&7Nh2QV$`B# z7`k8qzIU06ucyt!*Di}NXx3tUJ=Yaq&031C!(36W+Se#yG7M#mrVzjRjOiA`&U(3) z2Qn5o7Ogqf%-J95S81!|C~dO@W!bN?{4BC!#B-)rOJHR>o4KpW7&+PpI}QZl*2CLK zOOMk$XC1(Q0)O#;X^TYu&z*aK=~I1Czs@jJt3bceo-tH~=_qfL9xGguO~`du0V0}rlgG<%CKKXHH7k$D=utk{wJ#Vq?%zXl zns#3D73Ker^vfUp{X^wn>Yr|2y96JvHE>(B5KCQ`V42$r%v<1!aTBJaW2b(!e;r^{ z)`2+{XA~;i7e&jDfT;!bt&JxviMgdMZLW~bD$1lMW2{w5{>_Pdd8;8PV$>7)%eIB4 zP#u`n=!DA6dZ0#|9;n=+1FE%Zk1EYt!=^zCSk-O@i|UPG^J#NbXweoG+IK>uK_gJ3 z-$>YX9RsVjzrdmn^Lw_#P}XcDOf05Q{}ES_e}(^Al%h@){7X~zjcgXf)P5c;E4aY6 z!VFZV+}oP{glZKBqf6JZn8d?TJ#^ED;x9EeTQ;pnwJH^mFOLCoXbg}$S3cyz8JI6J8_4|6XDC(N83pq?Adf*66fA0s zGA4E?RJsgIZLCqNZUZ>BXoG(JKgXnrW3hSD1~pG3bH#Z1Ld`{qPx?nZ_)z@i`n|ih zqe1;TC|bB6auRRWRx2{dnG^X8@*}UN5b|h|r4Jd_J3%?P{3Wt%iyHN*LQO zr*5K;Nqr=|F|nG03U#NTy5kram^6l_peZzYvar^Wx1=1o@HGhJ2<;k$Nm6+I_G4^U$+k3;@ zn*Ea8h{a_7wgY9V5|6yUrX*#c40+Ff7_bipd`=;`za|$+``kqe8=_|Qsu(x+XB<6z z5HjcdKG+LyJ`{hcah00C*|VmjPw$@0lNlj@z5>XVBM0(IAK9l|nu6qk8F8tJd_|p5 z&UzGVD=kB%>KkEV>q&dC8s+Skp?u{f9QQ8NyOUs5cN!eJFGA1ZtMO@1+Ri5Jk;BrK zzn23BISlxlGS+gEH0rZqzI-TFun>wBD2!tH3ZroDLMUKRQ1L%s?z|k2#K#~9`H+{q zERB4|wO~`bFDz>fhiR3`Ft?*^r+u}r;;rODa!wZJBX~bcQgPm|2=B!)C*#hLd@Yn8 z1xgh|QKPabT(T4j6eZ`9%v`BG4=diA9&7vS^deQlh{{Tv!ML93Q+(6U7< zG;QL@@#uiswd=#m+8)JAQ)lJS%BD_64e}L3j)E4b*yab=x1EGy%xRXeo{X~8`Q{Zp z6hDluzoooW=JOjMXCB@&H^&=wodL0~Qo9j8ANT{lA37RSXUxWk5kI4&Qz!aRCQ1(r z{&@^?Djs}6ofLE~P}zj+aUk^}ze67?|8l+fyub@ha$>y3-QAu3O9je{21W80WFOdP z>Ym(rThiuEfQ{V>SXg^ew|gqtH>p6KOZ`)#!Xg+_-xsa^6RP%fLEEuD_|k0;My%e8 z0rNf4nSN!f5o3_6M5)*D&ykD1j19j2W-umBp2|6v@fh{XIE)xQ7Q;sVj9&e}K$DiO zsLyQJ4=oRJlNT~xauUbFHCv)`ukondk-6o{<51R~x~LL!9u=7DvnBopv?GQ&sK>|y z(Pw##I8GYihoRH4=fGK}a@P95c(HSK!&a!UTi9u_H7fcDIS`e7y> zKDY;6UgE_I+Je6Tf2lW-F(605fBpLP)SDLS{sky6Vvl9~=F8uPwr(1%h`*W5T1BRI zYnA+$wfCU>%|?kD6H&GET(lms7F}I;<4e!On7aEMepv2<&s|*U%a20d;&0$jOwBE< z@Z*r7m^*(VX3m+5S@SqYFnxWXhDH=d04 zqc-C6#Rt%1Acx1%5H76wkAi~hq$qi~5b$Ze1(OaJ6VF1D?0?eXn*KVZ_7 zX_z{57IO~suwaoJ7B5?Yh0B&Jnzwif9GbV#>SyAw>_INtg2G0q&~XsDOxlF%pE2I5 zG99*677_mi%!>?X|IO%I6{bC>-XSl{jk=dBLjDDNo&1Z>yLqc0<=hr|==&IC z`vsK$g6&{ic?NUm^fT?(QTKZ*Do;IBuF4V=W{#%L7t7Gk?I`+s9z%zfJJDvT4|=oy z=bO1pFu~0oV_jy$u&~&;+zS63Sw2TOBV%;$*<0~IbkFozbFgs9Qh2QP#APz>hHI-$d~HR!!?Kdf4D&bjt9SXN}d%7oWzj7X(X zD8Cho8`edgN+Z#v&Qweow*`UBZ^@j0aw`3sOx9XIk5OwuwsNkyaDjr#28tgdV?lJ1 z=pd;Z5<8p5nC#x_1EYqtu8t!JVHxs`Nq#;gb_^fX~&Pk2H z1df5Z3m0KI>wP@e`(T~VMl4_Bi8UOT!$yr(*NZJy_~+vIG%N%=#}4Q;kNB_NkNSg` zp?J*^C}qQ3h23QOJ59-R2b3w^1|}tXp_c7LG^sV?b^KY=`<%7AlJ`w}nylIAwO-vv z{BQ9A#TJWQo+>0KW?w|k3|*ca_RG!*lvIcbx`@rtC*XiuQ_!$ zhHN{FUONKNcGG@1dv3v3Yc^uu=51KH*$>|S+puWGGL$S+`ZxHC{T2Ub%GBvtw0J4j zaI6USoA|xW+gR^Nec5DYF&+MIuKoB}{V(z__^aFxvDe{W zq^L70)@F@O^;IbMi8m}NZGu&m^(bLSo7`qThHbop;rlM*%biE@<(3^7vtb(+Z)HAz z=RWLU?eY%hx5Tyx{yDO2nqV*aj*1m3GyWNc1@m38VWThnckaf%1BVnzTln$AkRiyM zm;O$cK2Wxou|u(1bwMvT8jR|@u(ZTL(THZU$&&zu~` zLaikjH)SUdAG?g`$T-LQ_itd=-c1}|J?VQJE14I)pFitOO8FAl+9>^`s`WsSriq2A8&eWYz|Wy>1fA2DOP3+t*^V;yz>dM_WW zr5>6ydoG+hIHOdlQi^Zl{|opuS#@~@A-L6-j4;a{=dTG-a6Ox4(eYPEe}S7!lwjoFK- zJ8xmwrX%>7wQaLD?u5^-qd0Wz9L@!BPVsCA0)m2Z=+p`NIwnfDNsdWK@Gn@P5a-xy zp;oOrDi7gEKfhTs<{%n0LX|326|Y401$V(;+EqTOhCxF{V$=dROxdy#e&m zYX2d8blAu!}3j+_aEk+I|H)!gPdM$iWxA|5yYO({(nr}v< zHtra);51eQvQ{MEI+h(ghZQ@HVAsJjxN_+pu3zL@mMeE~@%k;CzHkv`%azZ5M(wj| z?Y!=}1#jVlknWru#pV_&REV{3owp};%!%gHFvlhNJ&u8VhPhF; zOer`tYM|mRS*sz~OI@5C|0(=+{*PAvi%{N33;wfZ%J_v*iC*Ig_y-Q--0>joJCRCpa}9XKbNOKF6t;deBP%w zyw&kTaOKqYq|L~^l%jdsJ{ssSE{eLa~4V!zQX}hg(XtNW|Tkk@Pw%hQj zqdUHtd>9_5Lg9TQ3@a|&!qVfcX*h8fXD;2rwd-6@bn79m+_{gSD_2>w!rUHp%dhi1 zIawoWg>UKq4;wmy>x*V78!UEM+JnFS9+fM7qP4lyK?cMrUjakZ`;_uI+Z6|n2g92_ z&z2C@Qe1xm?~6|`ed`U>?9Lh(#}%m1bO|hLj77nc?a4=(~hRK=WKdOBl?n=4KnKMKi3W@Ap-mw8CFzK{8uci}JfBl;xs`Y$-gqT5qP_@mm) zcgng<$>)hp7rs7ws*S&N{{LI?Z|jey4ltmpB(d=p!P zxpw8kOrjKM?)T`G7(-(Tc_h=A&FWkX4*39|ciNvH0XVB2u19ctUP^$^oXV`G=*?@Bh zoLAGRxuil$wh9>-!n(W#oEg7OpD_jd5A8x!WY{2C6aFeQLp$%wdN`@ck{taX$+p7w zE%?hkmyQQ=%+_O)e|rOeUH(DvmvO4$+>z*?MwBO!|3<`Ju$N=)7Mszqn>XB!gkdY| z);5JkV(pb%*m&+D4hCPt`Rn&_l{~q8`yPTXUHc9GqUZJTKS2NG7S}&UMnt*D+Q)|v z9zoXM4IMgEJ0~rATG@l#C|%kFUwl6j{(;x9^G*bOZ%1GYY2vz*Xwi8M$EZ6RH5-aN zhUOeM1z?bec~{DNF6#WE1xldtr;RY-=W#f6a6iIWZ!hb$6)tMsD)aI(_nw9S`(Xbz z{K4F^1aUkBF|H3d7ou`)T79ndfkY39?O4wEYjMq}%8{|Wt{E|=3gTjWT@oDYGm@;9iT4yggHOapvKaEm4K=h7UuPr)9 z#{**aK0MIZJ<^u7Wuk+E&j!GI-D<3IXMSbna<0KW0UZx?F@@xzBu3TAzvSPv@?V@a zo1ddet2MN@JJGQ1Zp8zK4x3Tik@e+uenk7PCNaSBOP6q_4wjXnEzP`SU37RSVa~R}8 zzPzl-$XyUcO>8lE@_eoQ-;Bl5gZI(@mz`+VZXNR#3t?EKp_=p3kXJc)FTuZbaZ~i` zGf1r;790EQSsZi!sU*s$;LNr1qJKo+e<=RH$0OO_Xv2C>I5hke#^p+}meqo`Z3<$d zpIE+-`LC>;Ml9vPZ@ZuJF(m%TOo8#iJj z$&0yDiHFy&U5nnmdn-R(@YjBy`lLu%bQwGfn=amk&*f;$+HxE1zVP9kr8gQnEJdDz zpAz#zoHLMEk9i~3xY$@!;o8(WxJbEp9QG(aMb-gxt-s1a(}xirh#lCz%@;1yCSk#x znb^8{1D=FE2>v~M-*ryxhU{bKv1~DOQP#@m%Fh_@t1tWE^5ydo{B=InQ|hGcTyIse zN+lKh<;^8NxZqSq;qTaXJ(_nsfW{pTaUASM>(0zW)ELP5JxgB0=PO9wwspqhqbK2a zoBqh9t60Z1@Y{|CC|~i|!IR7*S|KNEPIUf{;8?$2LzQpX!#tbV-+lY`Wz$~f;lu{} z`}?DBU(Vk%PEvC)s$cA1-lFLA%?Nm(zXgwghZr#RFq(DWK>uJ1nmT%*XgQ7<+Aj@j zDWvAbFi&w*tyGt}{Kd-7Xz}M-_$>TI7V+x2<|6kY`n+#16faUh$!veNWnZFqVf}l5 z6I&~_4NF|-aXwCROPtpywQkj%d6`3yoQACVkUAsT*JP{zR@hav)8;=|C!)o_oWj3F zJ8v}abOcSDj-ge@eQ4js3;9d3w#Ptxbg7-n2b<=tF`s!$ANrbJK_PJ6z6&e2?8LTh zdvKEV#ug^8<1c!=QNzaA?CYm=&GF;Mp-%y)PGg7vE*v;OzBlH*-o)RqB)Wb#8t%t} zF=pKfH2=~Ejk|0^Q~Cxi+HjuQzB6Mh)_LV9Kp)mH8~=rK7UK@>R9N^Uh}_A(9kN$S zI`?u(N>0$M^IWaw-3{2kJe+59?$G8>;V(SV$$yoKw!}#4Z8X#aR0ITK$ar^tV4*8BBB^A79Kvikuzb~}t#U0Ac#d^Z2iTpeXU2kWKe zx2v}8f`xmIVI}SF!hNaM)vk|+PD?NDd zAoqPZpgpoJV`9set;#>u<=`X_q|-lz%G%a^g->c>@joN3|!{^Dq&$^kUep9_{*Ltk3t_{)X3p#?p@~k4Os^v z_@6j>@Pp-FYWbgXe~?ux+?flsrT!!S%wY+2Xx9eEj~<5jyRwIfknctx)TqUr7i*9d z{!;VA`jeuTUEtVb6&iL~k5->=MSZ6woL{0o)<`~qV_Vg+<$-CPmKf!+4GRwh!{giy ztfB6A<2abQZx1GK@N?4+W?b3mUMVfi*-L`jVDan&HPuUKl#_C_e4vf%-jmpkAi~aOiN9 zV{|X7vj#7xVI6g?Ca>1!lrL8T1Hb%2?dfrkdNL+9+ET`TGWQ{nHGuA%r?aIDN-k9J zk~#>d_HA*Pa-r6TQC@Za`|s%-{d2OW@)=_}ef(uUM}E`7+!RBH{6HDoiL-&H$%~_$ zW1Go*Fy|lgY4K719&=Rr%Qs}*139j9YlKgEIOkLs zpK;%ZshiGVHFFXR0Kr9bc^hD_Lv-rwy*)MvL~$`CIp64Hj)wKB+Nfj)(GGty(pFIbfjT@7}$8apcGmrQ_z!pTj&| zWre+9Bs`E@oU>DV96NFdZ|(!8kM-}h-^5?XQ|W`$cNuX$q(;?hXw;wq_ef}h>Q$rwsxGIX2XFi~yc>3VSL?SlT} zIbZ7)f{EKh@RQdz3~-%}8eN;R{wFt|pSe!zw}ScErk_=k*jBKth$^;~QM+1o)T~;C zHTw4S7i>|{&Wd?>juU<-PnP_O9nDq1nDd~m(6O&8dVfP*-)$F~cHtOsK88=7PNHFl z0P==*s`C!iX*P#-k)7xt*wI!=98BMpIiFIcj8VO6EtThP+{giS>wLE$-jPt&R#)BrJU?qFx zEW?_$g7g7d^O}qLO>&J=$D?vh%s1uFpC9>H*QRQ()%`gBsVBwe<{Jd_FATTKBo z7*}>e+g@|fw??CZBbt;Rre`Uy?wCs%1S8HJ6VVPIH`&tp!K zu|WTcdQYRqCMz_3ENqmrhu=bTRX|H;SZD5GQkAvywNb42rzmaI z7$s>7N*OmoX_Lk%W7-tuO`E~ktOe&5omtyA6-`_FQ5PIR{Z4z(sJkD^R2qtWC0M_2 z+8Ab^v_KUHCsb|L5!Q8^!lXuBQXQDos;S7hRyA$AW-XZ3sE<#YbVReRgYnsS)6jR= zVs!XsIa+dH15V&oUurQcBhoQH*_NI&galrsACWsksqRm8g)2EUK~bq=e=mt zk+A{mQ~G{A7h|U_!ob1baxSbl`u6CKKHan-;Ph)AB98bKs4!gn%Esh{We^~#N2h` zcCK*xY9adlybM3i-GEU`w_wP^br`aE6^1PFzz{b#{OGm_Ll`R#;eJ=cmv~|Lf^GP2 zx<9^|v=4np??vl@+tK*5U8vJ(FY3_85j`Wa?$G(Hx~Cik|0W$tPC<$qJDrD+W5+<{ z6Se8YJ*4LC#bM4DUAle^_wHQA{Tr8X^Wu5652oZKo;(f^P6zQ|waU^MH-XYP82SbvjOcyp6uA51a0QW>vD1*BLDBS4PrOscXcFVih01NX>pq9_$bF4 z%%`vLyg>Z7pn2DQl;tyM-sL}!HU&a(XHP$ICP_b z-TgG0b`3^T;;*A-T`uDHNcbS<L+HWB8af(ZPWSnJUM4V$nbeu-=QL%9`nkSKw!S@~|!PEB=dVcMP zW<6zG`Ph9q9f8B6S+@kvQTV-S_6`h7^jJhj&^w%o&>KgSJC_1 z?P%WXIGXjk{2Kmh9FQNv104zOLNZR(kz-CDf5#4@e<=TMC%MONC}JX$iNAI&QRZKO z|C{qKAM#o0F0QN5;eYjJ1Uyz=LD#>BXi`bVdGMDCkV|0<#^HtTVYc48++ zPCA0eQHYO=%FsNGrOhWji%(K{K*>Kw$Hh8^Mm&S>&O6!i-?-a_Z2X&ar+kYZlJOu| z)7A@#&DW9Am7?>qs72Rv(BZ#m=?TtjJ|zDW9aEE-^XIsKk;(Nda{N#ou6O;1;Qi*c za_?8%|3~IQMgIQ|{2jWShC`?AO8-9!2mT0uk$=(uBL9w`U40FI;eihKraeL+)S|}) zMa{d1KuCN5ef(QE9Z>Qw_@4{9$NJ9%N7)1azkvTs?prQ4D4qLQN5)3DT)zJJFPHxY z&L@e-4$NG15#f=4jQ_?Rx6oq{=Tdqcc}@Q-?B9XE@ZnwfFIaLMXU=i2Eq(ks_CH4U z<-2dn^ap(={^Em)4=VouMb`5yUwr|c`)#5A*+(BRP%BG1e}+e$o&CL|&gP15u41ts z$CdBX_j~RGeJBp`Pr?1PIo}aSpO>We>E=8{LYDpsk4VOWlMgWPrwyEU*vhz$xg7ey zqHlEau8y?J&3n+l>`BZ?*<(OH^SlG~k5F^!ADO>%>fsB8|JnQ5_E+Y;WWVKq9e?hB zD84{+LZoBJjR#odc?O*Z_@YHuV%PH;ns?)KcH{HDmE`ZFu2&SV1g|FaUFvq(iWYr0 zVelB%=K5XZx|4K-MO+B`?`K_up6KCDUSQ;eJTp(^V^M$9>n?FYjVa6TM2qo3ot?6aDfiaYVoa5L%| zu0DB+tKq4*_V_ujglF(G_s6;yjjhKnVC&BFTo-mp;a9I+0CPV4?JQqYj?I`05pvWg z@%P!!rX5c+2YpiMp0?fn@YVOeSmzx?|K}cLKYhVp$v^8&{#E>0F9g0vkoerTT=Zc$fUaCeLcT8V(4;v3X!G;q&UXH?=kZ{&(K882_@YU4CE6zN`3g(17 z0wS>dR1B7#iH1i|BUVMNAJLwBerpT z_~NtgH_%V_L8pEjsb783mN~B0oi?Ivw+)oN<~!TEI#xYzwEt@Z;yqd*Y4Z+ z=5RO$lfF3;ib13S2gC6Bp2z61{RukzJ%-b^F!bHZnr6RX%=12{ey4fIHE7G)i}u}o z;M{8yy7ciw?=Sq(=PQ5o`*t%1P`THvOrCxi<0lyzLvd!Pv) zNFaan}$Ka0O@1u-=fz zU98dZImi0+Yf^`F7!X2MW&Xe^HI{ecp(?b84{J(*{+5?mC zsmUG#d_R#|??j(i;^Bmp7)?S_v?eJjN%NHN&5>M<7Wc`+I-2CQ#a=lz5dzq55-;u;~Pt(&h;ZIX=A@LdfW8$#(NetG9C&T?t zA{N|E!KAAR_~mv2Cf-fJOs=I^bR`@cZztkJXe#bSXCNjf%~E(T`AV5bk~yW{++Xim z_4CN8E%GhTL4w4ZV(+r_kKq5YvM=`fH}_wYX2Q<+kAtGYxdzrOa|goKpm3F`gu|^H0jBiYM*lXo$R{sH}03+ zkN4og-*K(JynSf0iQK$IB1JT>pB7|9j&8XXIb*rTR(zD>*)C%f90e z@5Nxsd~fC|e&js)*YMnY3~{1sWKR-)N9ZYW7ZQ8&R_t}Z|1a`D*WW*L{JZfN|00F? zjTB-p@6MEW(8<2zp?n9%q=oA_pYj816$WD6mcvNkUNG_uYCeSgN}=r#Qs?CS+vs1! zUgYV|;I8}5-;KY#6E%VF%}jV1r%B0-W6p~{INyC4`XB<6T-UO$VKDP*1F&xEek47m zFTk;gbneS6r2OSSkp2J3|8L|{$6Gmy{3r4KR!Nx&3V+c-I{c>)|3<{We&;W+dfPrE zJY(IM_=ubfQbeCe%Y%2w{{QfQC;o~TERIUk!Y?<*xqtSY<`zxb`X=YRPB1{;0(m$nW&ZM>Pn_Xoey++++kZV~rX zY5z4Ubp9Ii{Es5?1zZw1C-sc-FY}@5J(AwHgsV@heh)sd(`3LB?@g!Q!-;GvN_F?eK%W4iFFgy)U$s?5`ps$o&8}dK= zv*-DhJnGBb8`$W}zvLgDGM-IhEESiUsk!(3B{qe}U~xnWe&V|IegTo_xFs9|_r_!R zo;%nd@dCmlxyMW55Aj#|ej15=-$uXbkAC0&fwunherQ|9vM#QA-{Wtd_Z|34?39+m zdMnCw9P`_EUSweJ(=@onJj28%=@@W69{o#@j4-)^#^j9uwO|Hy~lKzMP>oqPP zg1_)rd`O|Ej0M6nQxK4th)q%Pm=m6eAA%lZ@V+Pbc`x@8Iva&sNkHuL7tGm7-biwm zd_U{|nukzdazzNNiAm+qQ}nra$NBlRhr zuPoteE(iIL$fa*=tFJ%QYai2IlUJ@`TmI?VMc>lazvl03v-{eA4nTIB50KqvN3+{G zfLFTf+2*RZtbf0@xsEXVd|v(bB)#)*YwKOF|2tf}mi?Pt2l@ML;f=040^lJXq)L>Q@DTD?>yAXtxldb{P)f_W-$ zP(b@n@iVJEDSJ%uD`r_Ic}O?o|FZt2JLp&(QB_ve7>^E#o2mu=cO~A%R>DU-_hfbSRv1t;m7zJ_AMrntN zy0+^f&8be>q&YYzH%(88lQ?#KwiCzaCO*ZEo%j&v;<}&Lj_stKTKK>#U3nin@AF>w zb3ONSAFR{u(S1d?cdw53y}Gt1b-Hirbh;;bm(Rcbnoc*%@jiaXM|4jU^1WO~`TYZ~ zC-~jh9~b-f?fX`DmwvcguQzn*uV}c^Vd&~?H|RUs4Epv~gTAfR(B0lT&?RWQOtduM z^1vUD9{HQsW!{a9|0crA34m7Z6lpG^}f6f?={zD+ zXAzk^i^aKN_}s2$eX81wjSMONE#WVdzf|MT)Ap*}Vsn!XbvsI#6o&ij{87^d%$|A{ z=F{KB%)g%@z76yBzbb7seW**Ju8r4e*Z3PWNX3_tTDgzZatz7)Q6ytwB%@&@A|XT; zecM`Snxx5po$C)%yCP!KEtos~eOS)@2=kX-RIm)4glMCoagTEFxrBeSX%Euz734Fk z%7)x(k~T!@Hbg_37NSQL!vlTBXoURSzt~I**Zw`&F24fH*&kx=%nvZv|49SC*daD( zIw<~%#=lk8{2-l(BcIjy^Q$Q&m#KlWL9?UG{b8@qhlD z;umc+6p%|NsAT~0@DgV4-NKgQuWPWrmPIK&&XhV&n%`{l zOl^bbWYjQNuVXTXESO)@|iUKVmErPUDfz2Wh`4dF@OFiaCW|d`3paV^@|r^8T_ZxM)Z+$p5qx# z#K=z@%;aBPO=C4JNNGqVv6@UGolIz;KZsAro``Rz8X%vq_gpi^qEV&evgHb_=Y9-l z`)imdx0UC>GWZYj)3+3aKh?zVb}=@%oNzg7a8%kfVl)SV-Amp1Okw&+hEZ3|v(k8vRjXW9?ih`&FFM zV$~{j3IzhtcXk?Mu_!12;=+I7XK-IR2>Yd%VB^?oI9c^E&Chb&&je$NV0P-R;ujkP z;cbLCCPEF6|22NDj=S`F^2e~XwT1ZnRX8ra0#DaFa9-X|8(xNW_+JhD75WnSd7cxo z2>I_J5{c|WPfrgl7E2R)^c}F7ry()Z>$Jhk9CzZxiPKL#_0%`&{MX>P_%b~Dx0D^S z7xP1(DQ!d_Icpk!RN3I1w@~|O1ru#CO==h#9M~S4Chx*@?=EKUPGBv$tmU+7Zs_al z`!jR?6T&Z7(%uVq>#yLu`abWk!FBlnY{RFNHlj~6zh*;@u}+}viRKsD`IIxN#R-X3 z@vxu#EA_m}I503U(8Qmx^}u;)KfGP`O9E1H1Q|xeeksX8jC%@!{YT1)!lWgO=+Y3*jr=iSxvOW1}^HSy=y){tOMQJ@an>sOl4FYniE z;GOxd7AqxZNbYFNqobpv&HVO$c-w!Y*6r;$2oJ~h(a#(Bp<-)dg*mNigX~9rPqcHv z^;c*|Md?tD)$y?6FO$DWl$jUGV`F1G_^E&E>sY*YnA~ruv3=z9F8&&~Xpm<<75?N3 z>x~`I&M9q)O1=zWZHN9hZWx>RQ}zLP+iL57Q)%&_^$Sme^^G7;e-P~CR?kqU#Io#( z(nH1Wn*Ig)|M>WLGrxoU?FZrS`4GO&w;+39A3f8w{{Q7eg|$+dIlNFPAe+tN=FOYU z{A&Fg|H73+w1IK(W=j*L>JQgz$g0 z7JpKXLHIh}#$wm|N`s}o-@|L_`>*(gTQ~)wr3Eap7g%PVNisKw82im;Gdv#85x#s+ zoqqtnwu4ycd>cOQgRh-=aEJbnvVK`}ja%+FZx}&ehtX)n(9nVfe4{mn0bgijUbNr7Tf5X^$*{qh2%`?--%+sbSrjE^;1e3>% zqa%jdY16{Y)a1hSy*mr0JGU05Z%=qlx5vGvTjSpTt6k%nR06q}1DU`SQh_ZAeJ}A@`hL~xvv05U?0%=spP`R>dk?cOWM9^KNb7B?xjex>OZo%JMQQ1Q zB|q@}8RiP@DWn-(fB;phPaIOP2Yp)XN3-Fsn)S3w($4&+p8f5W_f%gac}QvmkHfCj$2=!t`boCvQ zCW;&Dto=f8v##}dy^wg3VNaBy&kCe3N;1|@n@pUaMPT?(aJ9b*(gJ28$}(2qFt$H~u5z94xcIQkcOI++)*exzbrk?WOOOf*|%k5#KV zL=&ky3)Eirv$wbRJ2F2s_ILQY--D~~7>^f}W|Aw^e7inXr#WLI{@h`0|jHud2Y~cI~Yn{r_kU^Vo{1gja - TBSReact + TravianBotSharp diff --git a/TbsReact/ClientApp/public/manifest.json b/TbsReact/ClientApp/public/manifest.json index 2f647f390..306d88a91 100644 --- a/TbsReact/ClientApp/public/manifest.json +++ b/TbsReact/ClientApp/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "TBSReact", - "name": "TBSReact", + "short_name": "TBS", + "name": "TravianBotSharp", "icons": [ { "src": "favicon.ico", diff --git a/TbsReact/ClientApp/src/components/NavMenu.js b/TbsReact/ClientApp/src/components/NavMenu.js index 4af3f514a..1f5ebdde5 100644 --- a/TbsReact/ClientApp/src/components/NavMenu.js +++ b/TbsReact/ClientApp/src/components/NavMenu.js @@ -17,7 +17,7 @@ const NavMenu = () => { component="div" sx={{ mr: 2, display: { xs: "none", md: "flex" } }} > - TbsReact + TravianBotSharp diff --git a/TbsReact/ClientApp/src/components/Views/Info.js b/TbsReact/ClientApp/src/components/Views/Info.js index 467bcc1d4..bd0a1e198 100644 --- a/TbsReact/ClientApp/src/components/Views/Info.js +++ b/TbsReact/ClientApp/src/components/Views/Info.js @@ -1,80 +1,92 @@ import React from "react"; -import { Grid, Box, Typography } from "@mui/material"; -const style = { - top: "50%", - left: "10%", - bgcolor: "background.paper", - border: "2px solid #000", - boxShadow: 24, - p: 4, - width: "30%", - height: "100%", -}; +import { Grid, Typography } from "@mui/material"; +import ContentBox from "../ContentBox"; const Info = () => { return ( <> - - - - - TravianBotSharp - - + + - Join our Discord Server -
-
- TravianBotSharp Discord server - + + + TBS - React version + + Build: + {process.env.REACT_APP_TBS_VERSION} + - - If you would like to make a donation, here it is
- - Buy Me a Coffee at ko-fi.com - + + + Join our Discord Server +
+ + TravianBotSharp Discord server + +
- - In case you are Vietnamese, đây là link cho Momo ._.{" "} -
- - Buy Me a Coffee at ko-fi.com - + + + +
+ If you would like to make a donation, here it is{" "} +
+ + Buy Me a Coffee at ko-fi.com + +
+
+ In case you are Vietnamese, đây là link cho Momo + ._.
+ + Buy Me a Coffee at ko-fi.com + +
+
- + ); }; From 22b059e2f630b22f5c5e7f960109aa63bbf0d736 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 13 Feb 2022 10:13:55 +0700 Subject: [PATCH 52/69] update chrome v97 to v98 for tbsreact --- TbsCoreTest/TbsCoreTest.csproj | 2 +- TbsReact/TbsReact.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TbsCoreTest/TbsCoreTest.csproj b/TbsCoreTest/TbsCoreTest.csproj index 2231ace00..48f57655b 100644 --- a/TbsCoreTest/TbsCoreTest.csproj +++ b/TbsCoreTest/TbsCoreTest.csproj @@ -9,7 +9,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TbsReact/TbsReact.csproj b/TbsReact/TbsReact.csproj index e695a038c..e5f22aced 100644 --- a/TbsReact/TbsReact.csproj +++ b/TbsReact/TbsReact.csproj @@ -15,7 +15,7 @@ - + From a5fb1a70150cbda88fa2eedd217ee14fcf72da12 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Mon, 14 Feb 2022 00:55:23 +0700 Subject: [PATCH 53/69] [TBSReact] add setting models and controllers to backend --- ...ttingController.cs => ChromeController.cs} | 28 +++---- .../Controllers/Setting/DiscordController.cs | 50 +++++++++++ .../Controllers/Setting/HeroController.cs | 82 +++++++++++++++++++ .../Controllers/Setting/QuestController.cs | 50 +++++++++++ TbsReact/Models/Setting/Chrome.cs | 11 +++ TbsReact/Models/Setting/ChromeSetting.cs | 17 ---- TbsReact/Models/Setting/DiscordWebhook.cs | 9 ++ TbsReact/Models/Setting/Hero.cs | 36 ++++++++ TbsReact/Models/Setting/Quest.cs | 9 ++ TbsReact/Models/Setting/Utils.cs | 8 ++ 10 files changed, 267 insertions(+), 33 deletions(-) rename TbsReact/Controllers/Setting/{ChromeSettingController.cs => ChromeController.cs} (72%) create mode 100644 TbsReact/Controllers/Setting/DiscordController.cs create mode 100644 TbsReact/Controllers/Setting/HeroController.cs create mode 100644 TbsReact/Controllers/Setting/QuestController.cs create mode 100644 TbsReact/Models/Setting/Chrome.cs delete mode 100644 TbsReact/Models/Setting/ChromeSetting.cs create mode 100644 TbsReact/Models/Setting/DiscordWebhook.cs create mode 100644 TbsReact/Models/Setting/Hero.cs create mode 100644 TbsReact/Models/Setting/Quest.cs create mode 100644 TbsReact/Models/Setting/Utils.cs diff --git a/TbsReact/Controllers/Setting/ChromeSettingController.cs b/TbsReact/Controllers/Setting/ChromeController.cs similarity index 72% rename from TbsReact/Controllers/Setting/ChromeSettingController.cs rename to TbsReact/Controllers/Setting/ChromeController.cs index 95a94b152..d8d41ecd0 100644 --- a/TbsReact/Controllers/Setting/ChromeSettingController.cs +++ b/TbsReact/Controllers/Setting/ChromeController.cs @@ -1,19 +1,15 @@ using Microsoft.AspNetCore.Mvc; -using System; -using System.Threading; -using System.Threading.Tasks; -using TbsCore.Helpers; -using TbsReact.Models; +using TbsReact.Models.Setting; using TbsReact.Singleton; -namespace TbsReact.Controllers +namespace TbsReact.Controllers.Setting { [ApiController] - [Route("accounts/{indexAcc:int}/settings/chrome")] - public class ChromeSettingController : ControllerBase + [Route("settings/chrome/{indexAcc:int}")] + public class ChromeController : ControllerBase { [HttpGet] - public ActionResult GetSetting(int indexAcc) + public ActionResult GetSetting(int indexAcc) { var account = AccountData.GetAccount(indexAcc); @@ -23,32 +19,32 @@ public ActionResult GetSetting(int indexAcc) } var acc = AccountManager.GetAccount(account); - var setting = new ChromeSetting + var setting = new Chrome { - SleepTime = new Delay + SleepTime = new Range { Min = acc.Settings.Time.MinSleep, Max = acc.Settings.Time.MaxSleep, }, - WorkTime = new Delay + WorkTime = new Range { Min = acc.Settings.Time.MinWork, Max = acc.Settings.Time.MaxWork, }, - Click = new Delay + Click = new Range { Min = acc.Settings.DelayClickingMin, Max = acc.Settings.DelayClickingMax, }, DisableImages = acc.Settings.DisableImages, - AutoClose = acc.Settings.AutoCloseDriver + AutoClose = acc.Settings.AutoCloseDriver, }; return Ok(setting); } - [HttpPatch] - public ActionResult Logout(int indexAcc, [FromBody] ChromeSetting setting) + [HttpPut] + public ActionResult PutSetting(int indexAcc, [FromBody] Chrome setting) { var account = AccountData.GetAccount(indexAcc); diff --git a/TbsReact/Controllers/Setting/DiscordController.cs b/TbsReact/Controllers/Setting/DiscordController.cs new file mode 100644 index 000000000..0b556963e --- /dev/null +++ b/TbsReact/Controllers/Setting/DiscordController.cs @@ -0,0 +1,50 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models.Setting; +using TbsReact.Singleton; + +namespace TbsReact.Controllers.Setting +{ + [ApiController] + [Route("settings/discordwebhook/{indexAcc:int}")] + public class DiscordController : ControllerBase + { + [HttpGet] + public ActionResult GetSetting(int indexAcc) + { + var account = AccountData.GetAccount(indexAcc); + + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + var setting = new DiscordWebhook + { + IsActive = acc.Settings.DiscordWebhook, + IsOnlineMsg = acc.Settings.DiscordOnlineAnnouncement, + UrlWebhook = acc.AccInfo.WebhookUrl, + }; + + return Ok(setting); + } + + [HttpPut] + public ActionResult PutSetting(int indexAcc, [FromBody] DiscordWebhook setting) + { + var account = AccountData.GetAccount(indexAcc); + + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + acc.Settings.DiscordWebhook = setting.IsActive; + acc.Settings.DiscordOnlineAnnouncement = setting.IsOnlineMsg; + acc.AccInfo.WebhookUrl = setting.UrlWebhook; + + return Ok(); + } + } +} \ No newline at end of file diff --git a/TbsReact/Controllers/Setting/HeroController.cs b/TbsReact/Controllers/Setting/HeroController.cs new file mode 100644 index 000000000..9498450b3 --- /dev/null +++ b/TbsReact/Controllers/Setting/HeroController.cs @@ -0,0 +1,82 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models.Setting; +using TbsReact.Singleton; + +namespace TbsReact.Controllers.Setting +{ + [ApiController] + [Route("settings/hero/{indexAcc:int}")] + public class HeroController : ControllerBase + { + [HttpGet] + public ActionResult GetSetting(int indexAcc) + { + var account = AccountData.GetAccount(indexAcc); + + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + var setting = new Hero + { + AutoAdventure = new AutoAdventure + { + IsActive = acc.Hero.Settings.AutoSendToAdventure, + MaxDistance = acc.Hero.Settings.MaxDistance, + MinHealth = acc.Hero.Settings.MinHealth, + }, + AutoPoint = new AutoPoint + { + IsActive = acc.Hero.Settings.AutoSetPoints, + Points = acc.Hero.Settings.Upgrades, + }, + AutoRefresh = new AutoRefresh + { + IsActive = acc.Hero.Settings.AutoRefreshInfo, + Frequency = new Range + { + Min = acc.Hero.Settings.MinUpdate, + Max = acc.Hero.Settings.MaxUpdate, + } + }, + AutoRevive = new AutoRevive + { + IsActive = acc.Hero.Settings.AutoReviveHero, + VillageId = acc.Hero.HomeVillageId, + }, + }; + + return Ok(setting); + } + + [HttpPut] + public ActionResult PutSetting(int indexAcc, [FromBody] Hero setting) + { + var account = AccountData.GetAccount(indexAcc); + + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + acc.Hero.Settings.AutoSendToAdventure = setting.AutoAdventure.IsActive; + acc.Hero.Settings.MaxDistance = setting.AutoAdventure.MaxDistance; + acc.Hero.Settings.MinHealth = setting.AutoAdventure.MinHealth; + + acc.Hero.Settings.AutoSetPoints = setting.AutoPoint.IsActive; + acc.Hero.Settings.Upgrades = setting.AutoPoint.Points; + + acc.Hero.Settings.AutoRefreshInfo = setting.AutoRefresh.IsActive; + acc.Hero.Settings.MinUpdate = setting.AutoRefresh.Frequency.Min; + acc.Hero.Settings.MaxUpdate = setting.AutoRefresh.Frequency.Max; + + acc.Hero.Settings.AutoReviveHero = setting.AutoRevive.IsActive; + acc.Hero.HomeVillageId = setting.AutoRevive.VillageId; + + return Ok(); + } + } +} \ No newline at end of file diff --git a/TbsReact/Controllers/Setting/QuestController.cs b/TbsReact/Controllers/Setting/QuestController.cs new file mode 100644 index 000000000..8557f7e3c --- /dev/null +++ b/TbsReact/Controllers/Setting/QuestController.cs @@ -0,0 +1,50 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models.Setting; +using TbsReact.Singleton; + +namespace TbsReact.Controllers.Setting +{ + [ApiController] + [Route("settings/quest/{indexAcc:int}")] + public class QuestController : ControllerBase + { + [HttpGet] + public ActionResult GetSetting(int indexAcc) + { + var account = AccountData.GetAccount(indexAcc); + + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + var setting = new Quest + { + Beginner = acc.Quests.ClaimBeginnerQuests, + Daily = acc.Quests.ClaimDailyQuests, + VillageId = acc.Quests.VillToClaim, + }; + + return Ok(setting); + } + + [HttpPut] + public ActionResult PutSetting(int indexAcc, [FromBody] Quest setting) + { + var account = AccountData.GetAccount(indexAcc); + + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + acc.Quests.ClaimBeginnerQuests = setting.Beginner; + acc.Quests.ClaimDailyQuests = setting.Daily; + acc.Quests.VillToClaim = setting.VillageId; + + return Ok(); + } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Setting/Chrome.cs b/TbsReact/Models/Setting/Chrome.cs new file mode 100644 index 000000000..562c65d93 --- /dev/null +++ b/TbsReact/Models/Setting/Chrome.cs @@ -0,0 +1,11 @@ +namespace TbsReact.Models.Setting +{ + public class Chrome + { + public Range Click { get; set; } + public Range WorkTime { get; set; } + public Range SleepTime { get; set; } + public bool DisableImages { get; set; } + public bool AutoClose { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Setting/ChromeSetting.cs b/TbsReact/Models/Setting/ChromeSetting.cs deleted file mode 100644 index 93c52fa8a..000000000 --- a/TbsReact/Models/Setting/ChromeSetting.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace TbsReact.Models -{ - public class ChromeSetting - { - public Delay Click { get; set; } - public Delay WorkTime { get; set; } - public Delay SleepTime { get; set; } - public bool DisableImages { get; set; } - public bool AutoClose { get; set; } - } - - public class Delay - { - public int Min { get; set; } - public int Max { get; set; } - } -} \ No newline at end of file diff --git a/TbsReact/Models/Setting/DiscordWebhook.cs b/TbsReact/Models/Setting/DiscordWebhook.cs new file mode 100644 index 000000000..a00201ff3 --- /dev/null +++ b/TbsReact/Models/Setting/DiscordWebhook.cs @@ -0,0 +1,9 @@ +namespace TbsReact.Models.Setting +{ + public class DiscordWebhook + { + public bool IsActive { get; set; } + public bool IsOnlineMsg { get; set; } + public string UrlWebhook { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Setting/Hero.cs b/TbsReact/Models/Setting/Hero.cs new file mode 100644 index 000000000..317560ff8 --- /dev/null +++ b/TbsReact/Models/Setting/Hero.cs @@ -0,0 +1,36 @@ +namespace TbsReact.Models.Setting +{ + public class Hero + { + public AutoAdventure AutoAdventure { get; set; } + public AutoRefresh AutoRefresh { get; set; } + public AutoPoint AutoPoint { get; set; } + public AutoRevive AutoRevive { get; set; } + } + + public class AutoAdventure + { + public bool IsActive { get; set; } + + public int MinHealth { get; set; } + public int MaxDistance { get; set; } + } + + public class AutoRefresh + { + public bool IsActive { get; set; } + public Range Frequency { get; set; } + } + + public class AutoRevive + { + public bool IsActive { get; set; } + public int VillageId { get; set; } + } + + public class AutoPoint + { + public bool IsActive { get; set; } + public byte[] Points { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Setting/Quest.cs b/TbsReact/Models/Setting/Quest.cs new file mode 100644 index 000000000..684713f69 --- /dev/null +++ b/TbsReact/Models/Setting/Quest.cs @@ -0,0 +1,9 @@ +namespace TbsReact.Models.Setting +{ + public class Quest + { + public bool Daily { get; set; } + public bool Beginner { get; set; } + public int VillageId { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Setting/Utils.cs b/TbsReact/Models/Setting/Utils.cs new file mode 100644 index 000000000..5d7a743d2 --- /dev/null +++ b/TbsReact/Models/Setting/Utils.cs @@ -0,0 +1,8 @@ +namespace TbsReact.Models.Setting +{ + public class Range + { + public int Min { get; set; } + public int Max { get; set; } + } +} \ No newline at end of file From 72857427d9bcf1c37d353c5da5be8324e3802c96 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Mon, 14 Feb 2022 13:55:13 +0700 Subject: [PATCH 54/69] [TBSReact] Change API Url --- .../{Account => }/AccessesController.cs | 2 +- .../{Account => }/AccountController.cs | 0 ...bugController.cs => ActivityController.cs} | 29 +++++++-------- .../{Account => }/DriverController.cs | 36 +------------------ 4 files changed, 14 insertions(+), 53 deletions(-) rename TbsReact/Controllers/{Account => }/AccessesController.cs (94%) rename TbsReact/Controllers/{Account => }/AccountController.cs (100%) rename TbsReact/Controllers/{DebugController.cs => ActivityController.cs} (77%) rename TbsReact/Controllers/{Account => }/DriverController.cs (68%) diff --git a/TbsReact/Controllers/Account/AccessesController.cs b/TbsReact/Controllers/AccessesController.cs similarity index 94% rename from TbsReact/Controllers/Account/AccessesController.cs rename to TbsReact/Controllers/AccessesController.cs index 77fef9f6b..113f16bfb 100644 --- a/TbsReact/Controllers/Account/AccessesController.cs +++ b/TbsReact/Controllers/AccessesController.cs @@ -7,7 +7,7 @@ namespace TbsReact.Controllers { [ApiController] - [Route("accounts/{indexAcc:int}/accesses")] + [Route("accesses/{indexAcc:int}")] public class AccessesControler : ControllerBase { [HttpGet] diff --git a/TbsReact/Controllers/Account/AccountController.cs b/TbsReact/Controllers/AccountController.cs similarity index 100% rename from TbsReact/Controllers/Account/AccountController.cs rename to TbsReact/Controllers/AccountController.cs diff --git a/TbsReact/Controllers/DebugController.cs b/TbsReact/Controllers/ActivityController.cs similarity index 77% rename from TbsReact/Controllers/DebugController.cs rename to TbsReact/Controllers/ActivityController.cs index 875115e9c..7f6019a2f 100644 --- a/TbsReact/Controllers/DebugController.cs +++ b/TbsReact/Controllers/ActivityController.cs @@ -1,42 +1,37 @@ using Microsoft.AspNetCore.Mvc; -using TbsReact.Models; using TbsReact.Singleton; -using TbsReact.Extension; -using System.Collections.Generic; namespace TbsReact.Controllers { - [ApiController] - [Route("accounts/{indexAcc:int}")] - public class DebugController : ControllerBase + public class ActivityController : ControllerBase { [HttpGet] - [Route("log")] - public ActionResult GetLog(int indexAcc) + [Route("task/{indexAcc:int}")] + public ActionResult GetTask(int indexAcc) { var account = AccountData.GetAccount(indexAcc); if (account == null) { return NotFound(); } - return Ok(LogManager.GetLogData(account.Name)); + var list = TaskManager.GetTaskList(account.Name); + if (list == null) + { + return Ok("null"); + } + return Ok(list); } [HttpGet] - [Route("task")] - public ActionResult GetTask(int indexAcc) + [Route("logger/{indexAcc:int}")] + public ActionResult GetLog(int indexAcc) { var account = AccountData.GetAccount(indexAcc); if (account == null) { return NotFound(); } - var list = TaskManager.GetTaskList(account.Name); - if (list == null) - { - return Ok("null"); - } - return Ok(list); + return Ok(LogManager.GetLogData(account.Name)); } } } \ No newline at end of file diff --git a/TbsReact/Controllers/Account/DriverController.cs b/TbsReact/Controllers/DriverController.cs similarity index 68% rename from TbsReact/Controllers/Account/DriverController.cs rename to TbsReact/Controllers/DriverController.cs index 0eae914a8..b92c9f549 100644 --- a/TbsReact/Controllers/Account/DriverController.cs +++ b/TbsReact/Controllers/DriverController.cs @@ -8,7 +8,6 @@ namespace TbsReact.Controllers { [ApiController] - [Route("accounts")] public class DriverController : ControllerBase { [HttpPost("login/{index:int}")] @@ -55,40 +54,7 @@ public ActionResult Logout(int index) return BadRequest(); } - [HttpPost("login")] - public ActionResult LoginAll() - { - new Thread(async () => - { - var ran = new Random(); - foreach (var acc in AccountManager.Accounts) - { - // If account is already running, don't login - if (acc.TaskTimer?.IsBotRunning() ?? false) continue; - - _ = IoHelperCore.LoginAccount(acc); - await Task.Delay(AccountHelper.Delay(acc)); - } - }).Start(); - - return Ok(); - } - - [HttpPost("logout")] - public ActionResult LogoutAll() - { - new Thread(() => - { - foreach (var acc in AccountManager.Accounts) - { - IoHelperCore.Logout(acc); - } - }).Start(); - - return Ok(); - } - - [HttpGet("status/{index:int}")] + [Route("status/{index:int}")] public ActionResult GetStatus(int index) { var account = AccountData.GetAccount(index); From 53aed18883e233e0d9d520963bd307f9d1bae5f7 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Mon, 14 Feb 2022 17:53:42 +0700 Subject: [PATCH 55/69] [TBSReact] Move InfoView to its folder --- TbsReact/ClientApp/src/components/Layout.js | 9 ++------- .../src/components/Views/{ => InfoView}/Info.js | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) rename TbsReact/ClientApp/src/components/Views/{ => InfoView}/Info.js (97%) diff --git a/TbsReact/ClientApp/src/components/Layout.js b/TbsReact/ClientApp/src/components/Layout.js index 6a0a06452..13db14804 100644 --- a/TbsReact/ClientApp/src/components/Layout.js +++ b/TbsReact/ClientApp/src/components/Layout.js @@ -9,14 +9,9 @@ import { Redirect, } from "react-router-dom"; -// info view -import Info from "./Views/Info"; - -// debug view +import InfoView from "./Views/InfoView/Info"; import Debug from "./Views/DebugView/Debug"; - import Setting from "./Views/SettingsView/Setting"; - import Villages from "./Views/VillagesView/Villages"; import Hero from "./Views/HeroView/Hero"; import NewVillages from "./Views/NewVillageView/NewVilalge"; @@ -51,7 +46,7 @@ const Layout = () => { - + diff --git a/TbsReact/ClientApp/src/components/Views/Info.js b/TbsReact/ClientApp/src/components/Views/InfoView/Info.js similarity index 97% rename from TbsReact/ClientApp/src/components/Views/Info.js rename to TbsReact/ClientApp/src/components/Views/InfoView/Info.js index bd0a1e198..b91401912 100644 --- a/TbsReact/ClientApp/src/components/Views/Info.js +++ b/TbsReact/ClientApp/src/components/Views/InfoView/Info.js @@ -1,6 +1,6 @@ import React from "react"; import { Grid, Typography } from "@mui/material"; -import ContentBox from "../ContentBox"; +import ContentBox from "../../ContentBox"; const Info = () => { return ( From 4bd45b9cf1ee6e6761795a0f865be327bddbe47d Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Mon, 14 Feb 2022 23:00:36 +0700 Subject: [PATCH 56/69] [TBSReact] Add more setting UI --- .../Views/SettingsView/ActivitySettings.js | 15 ++++ .../Views/SettingsView/DiscordSettings.js | 75 +++++++++++++++++ .../Views/SettingsView/QuestSettings.js | 83 +++++++++++++++++++ .../components/Views/SettingsView/Setting.js | 68 +++++++++++++-- 4 files changed, 234 insertions(+), 7 deletions(-) create mode 100644 TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js create mode 100644 TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js create mode 100644 TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js new file mode 100644 index 000000000..5613de40d --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js @@ -0,0 +1,15 @@ +import React, { useEffect } from "react"; + +import ContentBox from "../../ContentBox"; + +const ActivitySettings = () => { + useEffect(() => { + console.log("ActivitySettings"); + }, []); + return ( + <> + + + ); +}; +export default ActivitySettings; diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js new file mode 100644 index 000000000..04c586691 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js @@ -0,0 +1,75 @@ +import { + Button, + FormControlLabel, + Grid, + Switch, + TextField, + Typography, +} from "@mui/material"; +import React, { useEffect, useState } from "react"; + +import ContentBox from "../../ContentBox"; + +const DiscordSettings = () => { + const [value, setValue] = useState(false); + useEffect(() => { + console.log("value", value); + }, [value]); + return ( + <> + + + + Discord Settings + + + + + { + setValue(event.target.checked); + }} + /> + } + label="Active" + /> + + + { + setValue(event.target.checked); + }} + /> + } + label="Send message when account online" + /> + + + + + + + + + + + + + + + + ); +}; +export default DiscordSettings; diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js new file mode 100644 index 000000000..e45cfdce7 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js @@ -0,0 +1,83 @@ +import { + Button, + FormControl, + FormControlLabel, + FormHelperText, + Grid, + InputLabel, + MenuItem, + Select, + Switch, + Typography, +} from "@mui/material"; +import React, { useEffect, useState } from "react"; + +import ContentBox from "../../ContentBox"; + +const QuestSettings = () => { + const [value, setValue] = useState(false); + useEffect(() => { + console.log("value", value); + }, [value]); + return ( + <> + + + + Quest Settings + + + + + { + setValue(event.target.checked); + }} + /> + } + label="Daily quest claim" + /> + + + { + setValue(event.target.checked); + }} + /> + } + label="Beginner quest claim" + /> + + + + Village claim + + + + Only for privated server + + + + + + + + + + + + ); +}; +export default QuestSettings; diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/Setting.js b/TbsReact/ClientApp/src/components/Views/SettingsView/Setting.js index 712e31ec3..cd7252a7e 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/Setting.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/Setting.js @@ -1,15 +1,69 @@ -import React from "react"; +import React, { useState } from "react"; +import { Tabs, Tab } from "@mui/material"; +import { Link, useRouteMatch, Switch, Route, Redirect } from "react-router-dom"; +import ContentBox from "../../ContentBox"; + import ChromeSettings from "./ChromeSettings"; -import { Grid } from "@mui/material"; +import ActivitySettings from "./ActivitySettings"; +import QuestSettings from "./QuestSettings"; +import DiscordSettings from "./DiscordSettings"; const General = () => { + const { path, url } = useRouteMatch(); + const [value, setValue] = useState("/chrome"); + + const handleChange = (event, newValue) => { + setValue(newValue); + }; return ( <> - - - - - + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+
); }; From d5fed4faadef899abb614d4546d0ffa1a045b34a Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 15 Feb 2022 11:05:46 +0700 Subject: [PATCH 57/69] [TBSReact] Add react-hook-form to setting views --- .../Views/SettingsView/ActivitySettings.js | 85 ++++++++- .../Views/SettingsView/ChromeSettings.js | 177 ++++-------------- .../Views/SettingsView/DiscordSettings.js | 96 +++++----- .../Views/SettingsView/QuestSettings.js | 113 +++++------ .../src/components/ref/MaterialSelect.js | 46 +++++ 5 files changed, 261 insertions(+), 256 deletions(-) create mode 100644 TbsReact/ClientApp/src/components/ref/MaterialSelect.js diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js index 5613de40d..c09fbcc82 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js @@ -1,14 +1,89 @@ -import React, { useEffect } from "react"; +import { Button, Grid, TextField, Typography } from "@mui/material"; +import React from "react"; +import { useForm } from "react-hook-form"; import ContentBox from "../../ContentBox"; const ActivitySettings = () => { - useEffect(() => { - console.log("ActivitySettings"); - }, []); + const { + register, + handleSubmit, + formState: { errors }, + } = useForm(); + const onSubmit = (data) => console.log(data); return ( <> - + + Acitvity Settings +
+ + + + Working time: + + + + + + + + + + + Sleeping time: + + + + + + + + + + + + +
+
); }; diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js index 978720591..1ff91d8c1 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js @@ -1,15 +1,12 @@ import React, { useEffect } from "react"; import { useForm } from "react-hook-form"; import { - List, - ListItem, - ListItemText, Grid, Typography, TextField, Button, Switch, - Box, + FormControlLabel, } from "@mui/material"; import { yupResolver } from "@hookform/resolvers/yup"; import * as yup from "yup"; @@ -18,7 +15,7 @@ import { toast } from "react-toastify"; import { getChromeSetting, setChromeSetting } from "../../../api/Setting"; import { useSelector } from "react-redux"; -import style from "../../../styles/box"; +import ContentBox from "../../ContentBox"; const schema = yup .object() @@ -82,14 +79,9 @@ const ChromeSettings = () => { useEffect(() => { if (account !== -1) { getChromeSetting(account).then((data) => { - const { workTime, sleepTime, disableImages, click, autoClose } = - data; - setValue("work_min", workTime.min); - setValue("work_max", workTime.max); - setValue("sleep_min", sleepTime.min); - setValue("sleep_max", sleepTime.max); - setValue("click_min", click.min); - setValue("click_max", click.max); + const { disableImages, click, autoClose } = data; + setValue("click.min", click.min); + setValue("click.max", click.max); setValue("disable_image", disableImages); setValue("close_chrome", autoClose); }); @@ -98,154 +90,67 @@ const ChromeSettings = () => { return ( <> - - - Chrome settings - + + Chrome Settings
- + - - Work time + + Click delay: - - - - Sleep time - - - - + + } + label="Disable images" /> - - + + } + label="Close if no task in 5 minutes" /> - - + - -
+
); }; diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js index 04c586691..5689724c9 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js @@ -6,68 +6,58 @@ import { TextField, Typography, } from "@mui/material"; -import React, { useEffect, useState } from "react"; +import React from "react"; +import { useForm } from "react-hook-form"; import ContentBox from "../../ContentBox"; const DiscordSettings = () => { - const [value, setValue] = useState(false); - useEffect(() => { - console.log("value", value); - }, [value]); + const { register, handleSubmit, getValues } = useForm(); + const onSubmit = (data) => console.log(data); + const onChecking = () => console.log(getValues("url")); return ( <> - - - Discord Settings - - - - - { - setValue(event.target.checked); - }} - /> - } - label="Active" - /> - - - { - setValue(event.target.checked); - }} - /> - } - label="Send message when account online" - /> - - - - - - - + Discord Settings +
+ + + } + label="Active" + /> + + + } + label="Send message when account online" + /> + + + + + + + + + - - - - +
); diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js index e45cfdce7..e501461eb 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js @@ -1,81 +1,70 @@ import { Button, - FormControl, FormControlLabel, - FormHelperText, Grid, - InputLabel, - MenuItem, - Select, Switch, Typography, + MenuItem, } from "@mui/material"; -import React, { useEffect, useState } from "react"; +import React from "react"; +import { useForm } from "react-hook-form"; import ContentBox from "../../ContentBox"; +import MaterialSelect from "../../ref/MaterialSelect"; const QuestSettings = () => { - const [value, setValue] = useState(false); - useEffect(() => { - console.log("value", value); - }, [value]); + const { register, control, handleSubmit } = useForm(); + const onSubmit = (data) => console.log(data); + + const options = [ + { value: "1", label: "1" }, + { value: "2", label: "2" }, + { value: "3", label: "3" }, + ]; return ( <> - - - Quest Settings - - - - - { - setValue(event.target.checked); - }} - /> - } - label="Daily quest claim" - /> - - - { - setValue(event.target.checked); - }} - /> - } - label="Beginner quest claim" - /> - - - - Village claim - - - - Only for privated server - - - + Quest Settings +
+ + + } + label="Daily quest claim" + /> + + + } + label="Beginner quest claim" + /> + + + + Ten + Twenty + Thirty + + + + - - - - +
); diff --git a/TbsReact/ClientApp/src/components/ref/MaterialSelect.js b/TbsReact/ClientApp/src/components/ref/MaterialSelect.js new file mode 100644 index 000000000..f025f9c63 --- /dev/null +++ b/TbsReact/ClientApp/src/components/ref/MaterialSelect.js @@ -0,0 +1,46 @@ +import React from "react"; +import { FormControl, InputLabel, Select } from "@mui/material"; +import { Controller } from "react-hook-form"; + +import PropTypes from "prop-types"; + +// src for who wonder what is this +// https://dev.to/raduan/4-ways-to-use-material-ui-select-with-react-hook-form-41b2 +// because we use react-hook-form v7, "as" become "render" +// you can check their documment for more info +const MaterialSelect = ({ + name, + label, + control, + defaultValue, + children, + ...props +}) => { + const labelId = `${name}-label`; + + return ( + + {label} + ( + + )} + name={name} + control={control} + defaultValue={defaultValue} + /> + + ); +}; + +MaterialSelect.propTypes = { + name: PropTypes.string.isRequired, + label: PropTypes.string.isRequired, + control: PropTypes.object.isRequired, + defaultValue: PropTypes.any.isRequired, + children: PropTypes.any.isRequired, +}; + +export default MaterialSelect; From 525791553d193a2a44bb3bc8a1155ee0a0632159 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Tue, 15 Feb 2022 18:16:26 +0700 Subject: [PATCH 58/69] [TBSReact] add yup validation to setting views --- TbsReact/ClientApp/src/api/Discord.js | 12 +++++ .../Views/SettingsView/ActivitySettings.js | 6 ++- .../Views/SettingsView/ChromeSettings.js | 46 +----------------- .../Views/SettingsView/DiscordSettings.js | 48 +++++++++++++++++-- .../src/yup/Settings/ActivitySchema.js | 43 +++++++++++++++++ .../src/yup/Settings/ChomreSchema.js | 26 ++++++++++ 6 files changed, 132 insertions(+), 49 deletions(-) create mode 100644 TbsReact/ClientApp/src/api/Discord.js create mode 100644 TbsReact/ClientApp/src/yup/Settings/ActivitySchema.js create mode 100644 TbsReact/ClientApp/src/yup/Settings/ChomreSchema.js diff --git a/TbsReact/ClientApp/src/api/Discord.js b/TbsReact/ClientApp/src/api/Discord.js new file mode 100644 index 000000000..e7cf8552c --- /dev/null +++ b/TbsReact/ClientApp/src/api/Discord.js @@ -0,0 +1,12 @@ +import axios from "axios"; + +const checkUrlDiscordWebhook = async (url) => { + try { + const { status } = await axios.get(url); + return status; + } catch (err) { + return err.response.status; + } +}; + +export { checkUrlDiscordWebhook }; diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js index c09fbcc82..0b5d6a75f 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js @@ -1,15 +1,19 @@ import { Button, Grid, TextField, Typography } from "@mui/material"; import React from "react"; import { useForm } from "react-hook-form"; +import { yupResolver } from "@hookform/resolvers/yup"; import ContentBox from "../../ContentBox"; +import ActivitySchema from "../../../yup/Settings/ActivitySchema.js"; const ActivitySettings = () => { const { register, handleSubmit, formState: { errors }, - } = useForm(); + } = useForm({ + resolver: yupResolver(ActivitySchema), + }); const onSubmit = (data) => console.log(data); return ( <> diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js index 1ff91d8c1..358b51bbe 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js @@ -9,55 +9,13 @@ import { FormControlLabel, } from "@mui/material"; import { yupResolver } from "@hookform/resolvers/yup"; -import * as yup from "yup"; import { toast } from "react-toastify"; import { getChromeSetting, setChromeSetting } from "../../../api/Setting"; import { useSelector } from "react-redux"; import ContentBox from "../../ContentBox"; - -const schema = yup - .object() - .shape({ - work_min: yup - .number() - .min(1) - .integer() - .label("Work time min") - .typeError("Work time min must be a number"), - work_max: yup - .number() - .moreThan(yup.ref("work_min")) - .integer() - .label("Work time max") - .typeError("Work time max must be a number"), - sleep_min: yup - .number() - .min(1) - .integer() - .label("Sleep time min") - .typeError("Sleep time min must be a number"), - sleep_max: yup - .number() - .moreThan(yup.ref("sleep_min")) - .integer() - .label("Sleep time max") - .typeError("Sleep time max must be a number"), - click_min: yup - .number() - .min(1) - .integer() - .label("Click time min") - .typeError("Click time min must be a number"), - click_max: yup - .number() - .moreThan(yup.ref("click_min")) - .integer() - .label("Click time max") - .typeError("Click time max must be a number"), - }) - .required(); +import ChromeSchema from "../../../yup/Settings/ChomreSchema.js"; const ChromeSettings = () => { const { @@ -66,7 +24,7 @@ const ChromeSettings = () => { formState: { errors }, setValue, } = useForm({ - resolver: yupResolver(schema), + resolver: yupResolver(ChromeSchema), }); const account = useSelector((state) => state.account.info.id); const onSubmit = async (data) => { diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js index 5689724c9..0015ef9cb 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js @@ -8,13 +8,51 @@ import { } from "@mui/material"; import React from "react"; import { useForm } from "react-hook-form"; - +import { toast } from "react-toastify"; +import { checkUrlDiscordWebhook } from "../../../api/Discord"; import ContentBox from "../../ContentBox"; const DiscordSettings = () => { - const { register, handleSubmit, getValues } = useForm(); - const onSubmit = (data) => console.log(data); - const onChecking = () => console.log(getValues("url")); + const { + register, + handleSubmit, + getValues, + formState: { errors }, + setError, + } = useForm(); + + const onSubmit = async (data) => { + const isUrlValid = await checkUrl(getValues("url"), false); + if (!isUrlValid) return; + console.log(data); + }; + const onChecking = async () => { + const url = getValues("url"); + await checkUrl(url, true); + }; + + const checkUrl = async (url, show) => { + if (url === "") return; + const data = await checkUrlDiscordWebhook(url); + switch (data) { + case 200: + if (show) { + toast.success("Webhook url is valid", { + position: toast.POSITION.TOP_RIGHT, + }); + } + return true; + case 401: + case 404: + toast.error("Webhook url is invaild", { + position: toast.POSITION.TOP_RIGHT, + }); + setError("url", { message: "Reinput webhook url" }); + + return false; + } + }; + return ( <> @@ -38,6 +76,8 @@ const DiscordSettings = () => { fullWidth label="URL webhook" variant="outlined" + error={!!errors.url} + helperText={errors.url?.message} {...register("url")} />
diff --git a/TbsReact/ClientApp/src/yup/Settings/ActivitySchema.js b/TbsReact/ClientApp/src/yup/Settings/ActivitySchema.js new file mode 100644 index 000000000..47c135618 --- /dev/null +++ b/TbsReact/ClientApp/src/yup/Settings/ActivitySchema.js @@ -0,0 +1,43 @@ +import * as yup from "yup"; + +const ActivitySchema = yup + .object() + .shape({ + work: yup.object().shape({ + min: yup + .number() + .min(1) + .integer() + .required("Minimum is required") + .typeError("Minimum must be a number"), + max: yup + .number() + .moreThan( + yup.ref("min"), + `Maximum must be greater than minimum` + ) + .integer() + .required("Maximum is required") + .typeError("Maximum must be a number"), + }), + sleep: yup.object().shape({ + min: yup + .number() + .min(1) + .integer() + .required("Minimum is required") + .typeError("Minimum must be a number"), + max: yup + .number() + .moreThan( + yup.ref("min"), + `Maximum must be greater than minimum` + ) + .integer() + .required("Maximum is required") + .typeError("Maximum must be a number"), + }), + }) + .required(); + +export default ActivitySchema; diff --git a/TbsReact/ClientApp/src/yup/Settings/ChomreSchema.js b/TbsReact/ClientApp/src/yup/Settings/ChomreSchema.js new file mode 100644 index 000000000..cbd90affc --- /dev/null +++ b/TbsReact/ClientApp/src/yup/Settings/ChomreSchema.js @@ -0,0 +1,26 @@ +import * as yup from "yup"; + +const ChromeSchema = yup + .object() + .shape({ + click: yup.object().shape({ + min: yup + .number() + .min(1) + .integer() + .required("Minimum is required") + .typeError("Minimum must be a number"), + max: yup + .number() + .moreThan( + yup.ref("min"), + `Maximum must be greater than minimum` + ) + .integer() + .required("Maximum is required") + .typeError("Maximum must be a number"), + }), + }) + .required(); + +export default ChromeSchema; From e9dca275e391b2d28a608c487b0e845d88a504c3 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 17 Feb 2022 11:30:43 +0700 Subject: [PATCH 59/69] [TBSReact] Connect Backend & Frontend Settings Views --- TbsReact/ClientApp/db.json | 496 -- TbsReact/ClientApp/package-lock.json | 7414 ++++------------- TbsReact/ClientApp/package.json | 5 +- TbsReact/ClientApp/src/api/Accounts/Driver.js | 22 +- TbsReact/ClientApp/src/api/Discord.js | 6 +- TbsReact/ClientApp/src/api/Setting.js | 30 +- TbsReact/ClientApp/src/api/Village.js | 11 +- TbsReact/ClientApp/src/api/api.js | 21 + .../Views/SettingsView/ActivitySettings.js | 36 +- .../Views/SettingsView/ChromeSettings.js | 51 +- .../Views/SettingsView/DiscordSettings.js | 92 +- .../Views/SettingsView/QuestSettings.js | 87 +- .../Views/VillagesView/VillagesTable.js | 4 - .../ClientApp/src/components/ref/MUISelect.js | 47 + .../ClientApp/src/components/ref/MUISwitch.js | 38 + .../src/components/ref/MaterialSelect.js | 46 - .../src/components/sidebar/SideBar.js | 24 +- TbsReact/ClientApp/src/server.js | 30 - TbsReact/ClientApp/src/slices/village.js | 16 +- .../Controllers/Setting/ActivityController.cs | 59 + .../Controllers/Setting/ChromeController.cs | 15 +- .../Controllers/Setting/HeroController.cs | 1 + TbsReact/Controllers/VillagesController.cs | 31 + TbsReact/Extension/VillageExtension.cs | 22 + TbsReact/Models/Setting/Activity.cs | 10 + TbsReact/Models/Setting/Chrome.cs | 6 +- TbsReact/Models/Setting/Hero.cs | 4 +- TbsReact/Models/Setting/Utils.cs | 8 - TbsReact/Models/Utils.cs | 14 + TbsReact/Models/Villages/Village.cs | 12 + 30 files changed, 2258 insertions(+), 6400 deletions(-) delete mode 100644 TbsReact/ClientApp/db.json create mode 100644 TbsReact/ClientApp/src/api/api.js create mode 100644 TbsReact/ClientApp/src/components/ref/MUISelect.js create mode 100644 TbsReact/ClientApp/src/components/ref/MUISwitch.js delete mode 100644 TbsReact/ClientApp/src/components/ref/MaterialSelect.js delete mode 100644 TbsReact/ClientApp/src/server.js create mode 100644 TbsReact/Controllers/Setting/ActivityController.cs create mode 100644 TbsReact/Controllers/VillagesController.cs create mode 100644 TbsReact/Extension/VillageExtension.cs create mode 100644 TbsReact/Models/Setting/Activity.cs delete mode 100644 TbsReact/Models/Setting/Utils.cs create mode 100644 TbsReact/Models/Utils.cs create mode 100644 TbsReact/Models/Villages/Village.cs diff --git a/TbsReact/ClientApp/db.json b/TbsReact/ClientApp/db.json deleted file mode 100644 index dbdbc9f0a..000000000 --- a/TbsReact/ClientApp/db.json +++ /dev/null @@ -1,496 +0,0 @@ -{ - "accounts": [ - { - "id": "1", - "name": "Abcg", - "serverUrl": "abc.xyz" - }, - { - "id": "2", - "name": "Abce", - "serverUrl": "abd.xyz" - }, - { - "id": "3", - "name": "Abcf", - "serverUrl": "abe.xyz" - }, - { - "id": "4", - "name": "Abcg", - "serverUrl": "abf.xyz" - } - ], - "accesses": [ - { - "id": "1", - "accesses": [ - { - "id": "1", - "password": "abc", - "proxy": { - "ip": "1.1.1.1", - "port": "8080", - "username": "xyz", - "password": "efg", - "ok": "true" - } - }, - { - "id": "2", - "password": "abc", - "proxy": { - "ip": "1.1.1.1", - "port": "8080", - "username": "xyz", - "password": "efg", - "ok": "true" - } - } - ] - }, - { - "id": "2", - "accesses": [ - { - "id": "1", - "password": "abc", - "proxy": { - "ip": "1.1.1.1", - "port": "8080", - "username": "xyz", - "password": "efg", - "ok": "true" - } - }, - { - "id": "2", - "password": "abc", - "proxy": { - "ip": "1.1.1.1", - "port": "8080", - "username": "xyz", - "password": "efg", - "ok": "true" - } - } - ] - }, - { - "id": "3", - "accesses": [ - { - "id": "1", - "password": "abc", - "proxy": { - "ip": "1.1.1.1", - "port": "8080", - "username": "xyz", - "password": "efg", - "ok": "true" - } - }, - { - "id": "2", - "password": "abc", - "proxy": { - "ip": "1.1.1.1", - "port": "8080", - "username": "xyz", - "password": "efg", - "ok": "true" - } - } - ] - }, - { - "id": "4", - "accesses": [ - { - "id": "1", - "password": "abc", - "proxy": { - "ip": "1.1.1.1", - "port": "8080", - "username": "xyz", - "password": "efg", - "ok": "true" - } - }, - { - "id": "2", - "password": "abc", - "proxy": { - "ip": "1.1.1.1", - "port": "8080", - "username": "xyz", - "password": "efg", - "ok": "true" - } - } - ] - } - ], - "status": [ - { - "id": "1", - "status": "true" - }, - { - "id": "2", - "status": "true" - }, - { - "id": "3", - "status": "false" - }, - { - "id": "4", - "status": "true" - } - ], - "settings_chrome": [ - { - "id": "1", - "click": { - "min": "1", - "max": "2" - }, - "workTime": { - "min": "1", - "max": "2" - }, - "sleepTime": { - "min": "1", - "max": "2" - }, - "disableImages": "true", - "autoClose": "true" - }, - { - "id": "2", - "click": { - "min": 1, - "max": 2 - }, - "workTime": { - "min": 1, - "max": 5 - }, - "sleepTime": { - "min": 1, - "max": 2 - }, - "disableImages": "true", - "autoClose": "true" - }, - { - "id": "3", - "chrome": { - "click": { - "min": "1", - "max": "2" - }, - "workTime": { - "min": "1", - "max": "2" - }, - "sleepTime": { - "min": "1", - "max": "2" - }, - "disableImages": "true", - "autoClose": "true" - } - }, - { - "id": "4", - "click": { - "min": "1", - "max": "2" - }, - "workTime": { - "min": "1", - "max": "2" - }, - "sleepTime": { - "min": "1", - "max": "2" - }, - "disableImages": "true", - "autoClose": "true" - } - ], - "villages": [ - { - "id": "1", - "villages": [ - { - "id": "112", - "name": "1", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "113", - "name": "2", - "coords": { - "x": "2", - "y": "-1" - } - } - ] - }, - { - "id": "2", - "villages": [ - { - "id": "114", - "name": "1", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "115", - "name": "2", - "coords": { - "x": "2", - "y": "-5" - } - } - ] - }, - { - "id": "3", - "villages": [ - { - "id": "116", - "name": "1", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "117", - "name": "2", - "coords": { - "x": "2", - "y": "-1" - } - } - ] - }, - { - "id": "4", - "villages": [ - { - "id": "118", - "name": "1", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "119", - "name": "2", - "coords": { - "x": "2", - "y": "-1" - } - } - ] - } - ], - "village": [ - { - "id": "113", - "name": "1", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "114", - "name": "2", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "115", - "name": "3", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "116", - "name": "4", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "117", - "name": "5", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "118", - "name": "6", - "coords": { - "x": "1", - "y": "1" - } - }, - { - "id": "119", - "name": "7", - "coords": { - "x": "1", - "y": "1" - } - } - ], - "log": [ - { - "id": "1", - "log": [ - "a: dasdasd", - "a: dasdasd", - "a: dasdasd", - "a: dasdasd", - "a: dasdasd" - ] - }, - { - "id": "2", - "log": [ - "a: dasdasd", - "a: dasdasd", - "a: dasdasd", - "a: dasdasd", - "a: dasdasd" - ] - }, - { - "id": "3", - "log": [ - "a: dasdasd", - "a: dasdasd", - "a: dasdasd", - "a: dasdasd", - "a: dasdasd" - ] - }, - { - "id": "4", - "log": [ - "a: dasdasd", - "a: dasdasd", - "a: dasdasd", - "a: dasdasd", - "a: dasdasd" - ] - } - ], - "task": [ - { - "id": "1", - "task": [ - { - "id": 0, - "name": "login", - "villName": "_MyVill", - "priority": "Medium", - "stage": "Waiting", - "executeAt": "11:22 08/02/2022" - }, - { - "id": 0, - "name": "enter_vill", - "villName": "_MyVill", - "priority": "Medium", - "stage": "Waiting", - "executeAt": "11:22 08/02/2022" - } - ] - }, - { - "id": "2", - "task": [ - { - "id": 0, - "name": "login", - "villName": "_MyVill", - "priority": "Medium", - "stage": "Waiting", - "executeAt": "11:22 08/02/2022" - }, - { - "id": 0, - "name": "enter_vill", - "villName": "_MyVill", - "priority": "Medium", - "stage": "Waiting", - "executeAt": "11:22 08/02/2022" - } - ] - }, - { - "id": "3", - "task": [ - { - "id": 0, - "name": "login", - "villName": "_MyVill", - "priority": "Medium", - "stage": "Waiting", - "executeAt": "11:22 08/02/2022" - }, - { - "id": 0, - "name": "enter_vill", - "villName": "_MyVill", - "priority": "Medium", - "stage": "Waiting", - "executeAt": "11:22 08/02/2022" - } - ] - }, - { - "id": "4", - "task": [ - { - "id": 0, - "name": "login", - "villName": "_MyVill", - "priority": "Medium", - "stage": "Waiting", - "executeAt": "11:22 08/02/2022" - }, - { - "id": 0, - "name": "enter_vill", - "villName": "_MyVill", - "priority": "Medium", - "stage": "Waiting", - "executeAt": "11:22 08/02/2022" - } - ] - } - ] -} diff --git a/TbsReact/ClientApp/package-lock.json b/TbsReact/ClientApp/package-lock.json index 6d6a7f08e..8af827421 100644 --- a/TbsReact/ClientApp/package-lock.json +++ b/TbsReact/ClientApp/package-lock.json @@ -67,7 +67,6 @@ "eslint-plugin-react": "^7.27.1", "eslint-plugin-react-hooks": "^4.3.0", "husky": "^7.0.4", - "json-server": "^0.17.0", "lint-staged": "^12.1.2", "nan": "^2.14.2", "redux-devtools-extension": "^2.13.9", @@ -76,43 +75,44 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dependencies": { - "@babel/highlight": "^7.16.0" + "@babel/highlight": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz", - "integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", + "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", - "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", + "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", - "semver": "^6.3.0", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", "source-map": "^0.5.0" }, "engines": { @@ -124,19 +124,19 @@ } }, "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "bin": { - "semver": "bin/semver.js" + "semver": "bin/semver" } }, "node_modules/@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", + "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", "dependencies": { - "@babel/types": "^7.16.0", + "@babel/types": "^7.17.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -145,35 +145,35 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz", - "integrity": "sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", - "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz", - "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "dependencies": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-validator-option": "^7.14.5", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", "browserslist": "^4.17.5", "semver": "^6.3.0" }, @@ -193,16 +193,17 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", - "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.1.tgz", + "integrity": "sha512-JBdSr/LtyYIno/pNnJ75lBcqc3Z1XXujzPanHqjvvrhOA+DTceTFuJi8XjmWTZh4r3fsdfqaCMN0iZemdkxZHQ==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-split-export-declaration": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -212,12 +213,12 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", - "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", + "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "regexpu-core": "^4.7.1" + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^5.0.1" }, "engines": { "node": ">=6.9.0" @@ -226,124 +227,109 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", - "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dependencies": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "@babel/types": "^7.16.7" }, - "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", - "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz", - "integrity": "sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dependencies": { - "@babel/helper-get-function-arity": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-get-function-arity": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz", - "integrity": "sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz", - "integrity": "sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", - "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz", - "integrity": "sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==", - "dependencies": { - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", - "@babel/helper-simple-access": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", + "dependencies": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz", - "integrity": "sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -358,114 +344,115 @@ } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", - "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-wrap-function": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz", - "integrity": "sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", - "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz", - "integrity": "sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", - "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", "dependencies": { - "@babel/helper-function-name": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.3.tgz", - "integrity": "sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", + "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", "dependencies": { - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", - "@babel/types": "^7.16.0" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.0", + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", - "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -474,9 +461,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", + "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -484,29 +471,13 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz", - "integrity": "sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", - "@babel/plugin-proposal-optional-chaining": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", - "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -517,12 +488,12 @@ } }, "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", - "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -531,22 +502,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz", - "integrity": "sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg==", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, "node_modules/@babel/plugin-proposal-decorators": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.12.1.tgz", @@ -561,11 +516,11 @@ } }, "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", - "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -576,11 +531,11 @@ } }, "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", - "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -591,11 +546,11 @@ } }, "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", - "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -606,11 +561,11 @@ } }, "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", - "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -621,11 +576,11 @@ } }, "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", - "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { @@ -636,11 +591,11 @@ } }, "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", - "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -651,15 +606,15 @@ } }, "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", - "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", + "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", "dependencies": { - "@babel/compat-data": "^7.14.7", - "@babel/helper-compilation-targets": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/compat-data": "^7.17.0", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.14.5" + "@babel/plugin-transform-parameters": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -669,11 +624,11 @@ } }, "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", - "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -684,12 +639,12 @@ } }, "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", - "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { @@ -700,29 +655,12 @@ } }, "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", - "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q==", + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", + "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.10", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -732,12 +670,12 @@ } }, "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", - "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=4" @@ -779,20 +717,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-decorators": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.14.5.tgz", @@ -866,11 +790,11 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.0.tgz", - "integrity": "sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz", + "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -945,20 +869,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -988,11 +898,11 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", - "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1002,13 +912,13 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", - "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", "dependencies": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5" + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" }, "engines": { "node": ">=6.9.0" @@ -1018,11 +928,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", - "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1032,11 +942,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", - "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1046,16 +956,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", - "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", "globals": "^11.1.0" }, "engines": { @@ -1066,11 +977,11 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", - "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1080,11 +991,11 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", - "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.3.tgz", + "integrity": "sha512-dDFzegDYKlPqa72xIlbmSkly5MluLoaC1JswABGktyt6NTXSBcUuse/kWE/wvKFWJHPETpi158qJZFS3JmykJg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1094,12 +1005,12 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", - "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1109,11 +1020,11 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", - "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1123,12 +1034,12 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", - "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1150,11 +1061,11 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", - "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1164,12 +1075,13 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", - "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", "dependencies": { - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1179,11 +1091,11 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", - "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1193,11 +1105,11 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", - "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1207,12 +1119,12 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", - "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", "dependencies": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1223,13 +1135,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", - "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", "dependencies": { - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1240,14 +1152,14 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", - "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", "dependencies": { - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1258,12 +1170,12 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", - "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", "dependencies": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1273,11 +1185,11 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", - "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1287,11 +1199,11 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", - "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1301,12 +1213,12 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", - "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1316,11 +1228,11 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", - "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1330,11 +1242,11 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", - "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1358,11 +1270,11 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.15.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.15.1.tgz", - "integrity": "sha512-yQZ/i/pUCJAHI/LbtZr413S3VT26qNrEm0M5RRxQJA947/YNYwbZbBaXGDrq6CG5QsZycI1VIP6d7pQaBfP+8Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", + "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1372,15 +1284,15 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.0.tgz", - "integrity": "sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.3.tgz", + "integrity": "sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-jsx": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-jsx": "^7.16.7", + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" @@ -1390,11 +1302,11 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz", - "integrity": "sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz", + "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==", "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.14.5" + "@babel/plugin-transform-react-jsx": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1418,12 +1330,12 @@ } }, "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz", - "integrity": "sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz", + "integrity": "sha512-hs71ToC97k3QWxswh2ElzMFABXHvGiJ01IB1TbYQDGeWRKWz/MPUTh5jGExdHvosYKpnJW5Pm3S4+TA3FyX+GA==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1433,9 +1345,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", - "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", "dependencies": { "regenerator-transform": "^0.14.2" }, @@ -1447,11 +1359,11 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", - "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1483,11 +1395,11 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", - "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1497,12 +1409,12 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.14.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", - "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" }, "engines": { "node": ">=6.9.0" @@ -1512,11 +1424,11 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", - "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1526,11 +1438,11 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", - "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1540,11 +1452,11 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", - "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1570,11 +1482,11 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", - "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1584,12 +1496,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", - "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1599,103 +1511,93 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.0.tgz", - "integrity": "sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz", + "integrity": "sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg==", "dependencies": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.0", - "@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.9", - "@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/compat-data": "^7.12.1", + "@babel/helper-compilation-targets": "^7.12.1", + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-option": "^7.12.1", + "@babel/plugin-proposal-async-generator-functions": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-dynamic-import": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-json-strings": "^7.12.1", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.1", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.1", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.12.1", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", "@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.9", - "@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.15.0", - "@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.9", - "@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.15.0", - "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.16.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.12.1", + "@babel/plugin-transform-arrow-functions": "^7.12.1", + "@babel/plugin-transform-async-to-generator": "^7.12.1", + "@babel/plugin-transform-block-scoped-functions": "^7.12.1", + "@babel/plugin-transform-block-scoping": "^7.12.1", + "@babel/plugin-transform-classes": "^7.12.1", + "@babel/plugin-transform-computed-properties": "^7.12.1", + "@babel/plugin-transform-destructuring": "^7.12.1", + "@babel/plugin-transform-dotall-regex": "^7.12.1", + "@babel/plugin-transform-duplicate-keys": "^7.12.1", + "@babel/plugin-transform-exponentiation-operator": "^7.12.1", + "@babel/plugin-transform-for-of": "^7.12.1", + "@babel/plugin-transform-function-name": "^7.12.1", + "@babel/plugin-transform-literals": "^7.12.1", + "@babel/plugin-transform-member-expression-literals": "^7.12.1", + "@babel/plugin-transform-modules-amd": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-modules-systemjs": "^7.12.1", + "@babel/plugin-transform-modules-umd": "^7.12.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", + "@babel/plugin-transform-new-target": "^7.12.1", + "@babel/plugin-transform-object-super": "^7.12.1", + "@babel/plugin-transform-parameters": "^7.12.1", + "@babel/plugin-transform-property-literals": "^7.12.1", + "@babel/plugin-transform-regenerator": "^7.12.1", + "@babel/plugin-transform-reserved-words": "^7.12.1", + "@babel/plugin-transform-shorthand-properties": "^7.12.1", + "@babel/plugin-transform-spread": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.1", + "@babel/plugin-transform-template-literals": "^7.12.1", + "@babel/plugin-transform-typeof-symbol": "^7.12.1", + "@babel/plugin-transform-unicode-escapes": "^7.12.1", + "@babel/plugin-transform-unicode-regex": "^7.12.1", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.12.1", + "core-js-compat": "^3.6.2", + "semver": "^5.5.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/@babel/preset-env/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "bin": { - "semver": "bin/semver.js" + "semver": "bin/semver" } }, "node_modules/@babel/preset-modules": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", - "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", @@ -1708,16 +1610,16 @@ } }, "node_modules/@babel/preset-react": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.14.5.tgz", - "integrity": "sha512-XFxBkjyObLvBaAvkx1Ie95Iaq4S/GUEIrejyrntQ/VCMKUYvKLoyKxOBzJ2kjA3b6rC9/KL6KXfDC2GqvLiNqQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz", + "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-transform-react-display-name": "^7.14.5", - "@babel/plugin-transform-react-jsx": "^7.14.5", - "@babel/plugin-transform-react-jsx-development": "^7.14.5", - "@babel/plugin-transform-react-pure-annotations": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-react-display-name": "^7.16.7", + "@babel/plugin-transform-react-jsx": "^7.16.7", + "@babel/plugin-transform-react-jsx-development": "^7.16.7", + "@babel/plugin-transform-react-pure-annotations": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1739,9 +1641,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.5.tgz", - "integrity": "sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", + "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "dependencies": { "regenerator-runtime": "^0.13.4" }, @@ -1762,30 +1664,31 @@ } }, "node_modules/@babel/template": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz", - "integrity": "sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", - "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-function-name": "^7.16.0", - "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", - "@babel/types": "^7.16.0", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1794,11 +1697,11 @@ } }, "node_modules/@babel/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", - "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2004,9 +1907,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dependencies": { "type-fest": "^0.20.2" }, @@ -2028,6 +1931,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@gar/promisify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", + "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==" + }, "node_modules/@hapi/address": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", @@ -2372,18 +2280,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/@jest/core/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/core/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2410,96 +2306,6 @@ "node": ">= 10.14.2" } }, - "node_modules/@jest/core/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@jest/core/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/@jest/core/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@jest/core/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/core/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2511,14 +2317,6 @@ "node": ">=8" } }, - "node_modules/@jest/core/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/environment": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", @@ -2644,18 +2442,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/@jest/reporters/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/reporters/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2682,96 +2468,6 @@ "node": ">= 10.14.2" } }, - "node_modules/@jest/reporters/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/reporters/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@jest/reporters/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/reporters/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/@jest/reporters/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/reporters/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/reporters/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@jest/reporters/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/reporters/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -2791,14 +2487,6 @@ "node": ">=8" } }, - "node_modules/@jest/reporters/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/source-map": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", @@ -3164,12 +2852,12 @@ } }, "node_modules/@mui/private-theming": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.2.2.tgz", - "integrity": "sha512-BfTjZ5ao6KY4Sg11lgaVuQ9uUq8unaM2u9/RKDD12If0B2Vp/AhRSe7i5OTd+wErmK2guTX0kPSraGZzwDEIVg==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.4.2.tgz", + "integrity": "sha512-mlPDYYko4wIcwXjCPEmOWbNTT4DZ6h9YHdnRtQPnWM28+TRUHEo7SbydnnmVDQLRXUfaH4Y6XtEHIfBNPE/SLg==", "dependencies": { - "@babel/runtime": "^7.16.3", - "@mui/utils": "^5.2.2", + "@babel/runtime": "^7.17.0", + "@mui/utils": "^5.4.2", "prop-types": "^15.7.2" }, "engines": { @@ -3177,11 +2865,11 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/material-ui" + "url": "https://opencollective.com/mui" }, "peerDependencies": { "@types/react": "^16.8.6 || ^17.0.0", - "react": "^17.0.2" + "react": "^17.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -3259,59 +2947,6 @@ } } }, - "node_modules/@mui/styles/node_modules/@mui/private-theming": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.2.3.tgz", - "integrity": "sha512-Lc1Cmu8lSsYZiXADi9PBb17Ho82ZbseHQujUFAcp6bCJ5x/d+87JYCIpCBMagPu/isRlFCwbziuXPmz7WOzJPQ==", - "dependencies": { - "@babel/runtime": "^7.16.3", - "@mui/utils": "^5.2.3", - "prop-types": "^15.7.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@types/react": "^16.8.6 || ^17.0.0", - "react": "^17.0.2" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/styles/node_modules/@mui/utils": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.2.3.tgz", - "integrity": "sha512-sQujlajIS0zQKcGIS6tZR0L1R+ib26B6UtuEn+cZqwKHsPo3feuS+SkdscYBdcCdMbrZs4gj8WIJHl2z6tbSzQ==", - "dependencies": { - "@babel/runtime": "^7.16.3", - "@types/prop-types": "^15.7.4", - "@types/react-is": "^16.7.1 || ^17.0.0", - "prop-types": "^15.7.2", - "react-is": "^17.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "react": "^17.0.2" - } - }, - "node_modules/@mui/styles/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" - }, "node_modules/@mui/system": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.2.2.tgz", @@ -3365,11 +3000,11 @@ } }, "node_modules/@mui/utils": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.2.2.tgz", - "integrity": "sha512-0u9ImUfpCfTxmvQTfUzTSS+jKWMX15MBZeZCRQZ0f7o9Yi8BlrLj33lMx0mFBkUSYdTXnqL4yfOn7RBzV01HMQ==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.4.2.tgz", + "integrity": "sha512-646dBCC57MXTo/Gf3AnZSHRHznaTETQq5x7AWp5FRQ4jPeyT4WSs18cpJVwkV01cAHKh06pNQTIufIALIWCL5g==", "dependencies": { - "@babel/runtime": "^7.16.3", + "@babel/runtime": "^7.17.0", "@types/prop-types": "^15.7.4", "@types/react-is": "^16.7.1 || ^17.0.0", "prop-types": "^15.7.2", @@ -3378,8 +3013,12 @@ "engines": { "node": ">=12.0.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, "peerDependencies": { - "react": "^17.0.2" + "react": "^17.0.0" } }, "node_modules/@mui/utils/node_modules/react-is": { @@ -3465,6 +3104,15 @@ "node": ">= 8" } }, + "node_modules/@npmcli/fs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "dependencies": { + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" + } + }, "node_modules/@npmcli/move-file": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", @@ -3629,20 +3277,6 @@ "rollup": "^1.20.0||^2.0.0" } }, - "node_modules/@rollup/pluginutils/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" - }, - "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -3875,18 +3509,6 @@ "url": "https://github.com/sponsors/gregberge" } }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -3947,9 +3569,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==" + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" }, "node_modules/@types/glob": { "version": "7.1.4", @@ -4645,15 +4267,6 @@ "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "dependencies": { - "string-width": "^4.1.0" - } - }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -5013,25 +4626,6 @@ "follow-redirects": "^1.14.4" } }, - "node_modules/axios/node_modules/follow-redirects": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", - "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, "node_modules/axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", @@ -5274,50 +4868,6 @@ "@babel/core": "^7.1.0" } }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", - "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", - "dependencies": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.2.2", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", - "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.2.2", - "core-js-compat": "^3.14.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", - "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.2.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/babel-plugin-syntax-object-rest-spread": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", @@ -5396,36 +4946,6 @@ "babel-plugin-transform-react-remove-prop-types": "0.4.24" } }, - "node_modules/babel-preset-react-app/node_modules/@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", - "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, "node_modules/babel-preset-react-app/node_modules/@babel/plugin-proposal-class-properties": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz", @@ -5486,82 +5006,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/babel-preset-react-app/node_modules/@babel/preset-env": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz", - "integrity": "sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg==", - "dependencies": { - "@babel/compat-data": "^7.12.1", - "@babel/helper-compilation-targets": "^7.12.1", - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-validator-option": "^7.12.1", - "@babel/plugin-proposal-async-generator-functions": "^7.12.1", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/plugin-proposal-dynamic-import": "^7.12.1", - "@babel/plugin-proposal-export-namespace-from": "^7.12.1", - "@babel/plugin-proposal-json-strings": "^7.12.1", - "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", - "@babel/plugin-proposal-numeric-separator": "^7.12.1", - "@babel/plugin-proposal-object-rest-spread": "^7.12.1", - "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", - "@babel/plugin-proposal-optional-chaining": "^7.12.1", - "@babel/plugin-proposal-private-methods": "^7.12.1", - "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", - "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-class-properties": "^7.12.1", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.0", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.12.1", - "@babel/plugin-transform-arrow-functions": "^7.12.1", - "@babel/plugin-transform-async-to-generator": "^7.12.1", - "@babel/plugin-transform-block-scoped-functions": "^7.12.1", - "@babel/plugin-transform-block-scoping": "^7.12.1", - "@babel/plugin-transform-classes": "^7.12.1", - "@babel/plugin-transform-computed-properties": "^7.12.1", - "@babel/plugin-transform-destructuring": "^7.12.1", - "@babel/plugin-transform-dotall-regex": "^7.12.1", - "@babel/plugin-transform-duplicate-keys": "^7.12.1", - "@babel/plugin-transform-exponentiation-operator": "^7.12.1", - "@babel/plugin-transform-for-of": "^7.12.1", - "@babel/plugin-transform-function-name": "^7.12.1", - "@babel/plugin-transform-literals": "^7.12.1", - "@babel/plugin-transform-member-expression-literals": "^7.12.1", - "@babel/plugin-transform-modules-amd": "^7.12.1", - "@babel/plugin-transform-modules-commonjs": "^7.12.1", - "@babel/plugin-transform-modules-systemjs": "^7.12.1", - "@babel/plugin-transform-modules-umd": "^7.12.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", - "@babel/plugin-transform-new-target": "^7.12.1", - "@babel/plugin-transform-object-super": "^7.12.1", - "@babel/plugin-transform-parameters": "^7.12.1", - "@babel/plugin-transform-property-literals": "^7.12.1", - "@babel/plugin-transform-regenerator": "^7.12.1", - "@babel/plugin-transform-reserved-words": "^7.12.1", - "@babel/plugin-transform-shorthand-properties": "^7.12.1", - "@babel/plugin-transform-spread": "^7.12.1", - "@babel/plugin-transform-sticky-regex": "^7.12.1", - "@babel/plugin-transform-template-literals": "^7.12.1", - "@babel/plugin-transform-typeof-symbol": "^7.12.1", - "@babel/plugin-transform-unicode-escapes": "^7.12.1", - "@babel/plugin-transform-unicode-regex": "^7.12.1", - "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.12.1", - "core-js-compat": "^3.6.2", - "semver": "^5.5.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/babel-preset-react-app/node_modules/@babel/preset-react": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.12.1.tgz", @@ -5601,14 +5045,6 @@ "regenerator-runtime": "^0.13.4" } }, - "node_modules/babel-preset-react-app/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -5690,18 +5126,6 @@ } ] }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dev": true, - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -5819,127 +5243,6 @@ "@popperjs/core": "^2.9.3" } }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/boxen/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/boxen/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/boxen/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/boxen/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/boxen/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -6070,12 +5373,12 @@ } }, "node_modules/browserslist": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz", - "integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "dependencies": { - "caniuse-lite": "^1.0.30001280", - "electron-to-chromium": "^1.3.896", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", "node-releases": "^2.0.1", "picocolors": "^1.0.0" @@ -6092,9 +5395,9 @@ } }, "node_modules/browserslist/node_modules/node-releases": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==" }, "node_modules/bser": { "version": "2.1.1", @@ -6159,10 +5462,11 @@ } }, "node_modules/cacache": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.2.0.tgz", - "integrity": "sha512-uKoJSHmnrqXgthDFx/IU6ED/5xd+NNGe+Bb+kLZy7Ku4P+BaiWEUflAKPZ7eAzsYGcsAGASJZsybXp+quEcHTw==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", "dependencies": { + "@npmcli/fs": "^1.0.0", "@npmcli/move-file": "^1.0.1", "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -6215,42 +5519,6 @@ "node": ">=0.10.0" } }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -6311,9 +5579,9 @@ } }, "node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "engines": { "node": ">=10" }, @@ -6392,9 +5660,15 @@ "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==" }, "node_modules/chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "optional": true, "dependencies": { "anymatch": "~3.1.2", @@ -6569,18 +5843,6 @@ "node": ">=6" } }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -6662,13 +5924,13 @@ } }, "node_modules/cli-truncate/node_modules/string-width": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.0.1.tgz", - "integrity": "sha512-5ohWO/M4//8lErlUUtrFy3b11GtNOuMOU0ysKCDXFcfXuuvUXu95akgj/i8ofmaGdN0hCqyl6uu9i8dS/mQp5g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz", + "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==", "dev": true, "dependencies": { + "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", - "is-fullwidth-code-point": "^4.0.0", "strip-ansi": "^7.0.1" }, "engines": { @@ -6703,15 +5965,6 @@ "wrap-ansi": "^6.2.0" } }, - "node_modules/clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - } - }, "node_modules/clsx": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", @@ -6791,9 +6044,9 @@ } }, "node_modules/colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" }, "node_modules/combined-stream": { "version": "1.0.8", @@ -6900,68 +6153,6 @@ "typedarray": "^0.0.6" } }, - "node_modules/configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/configstore/node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/configstore/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/configstore/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/configstore/node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -6975,15 +6166,6 @@ "node": ">=0.8" } }, - "node_modules/connect-pause": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/connect-pause/-/connect-pause-0.1.1.tgz", - "integrity": "sha1-smmyu4Ldsaw9tQmcD7WCq6mfs3o=", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -7014,9 +6196,9 @@ } }, "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dependencies": { "safe-buffer": "~5.1.1" } @@ -7067,9 +6249,9 @@ } }, "node_modules/core-js": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.16.2.tgz", - "integrity": "sha512-P0KPukO6OjMpjBtHSceAZEWlDD1M2Cpzpg6dBbrjFqFhBHe/BwhxaP820xKOjRn/lZRQirrCusIpLS/n2sgXLQ==", + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz", + "integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -7077,11 +6259,11 @@ } }, "node_modules/core-js-compat": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.2.tgz", - "integrity": "sha512-4lUshXtBXsdmp8cDWh6KKiHUg40AjiuPD3bOWkNVsr1xkAhpUqCjaZ8lB1bKx9Gb5fXcbRbFJ4f4qpRIRTuJqQ==", + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.0.tgz", + "integrity": "sha512-OSXseNPSK2OPJa6GdtkMz/XxeXx8/CJvfhQWTqd6neuUraujcL4jVsjkLQz1OWnax8xVQJnRPe0V2jqNWORA+A==", "dependencies": { - "browserslist": "^4.16.7", + "browserslist": "^4.19.1", "semver": "7.0.0" }, "funding": { @@ -7112,19 +6294,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/cosmiconfig": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", @@ -7372,15 +6541,15 @@ } }, "node_modules/css-select": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", - "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", + "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", "dependencies": { "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" + "css-what": "^5.1.0", + "domhandler": "^4.3.0", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" }, "funding": { "url": "https://github.com/sponsors/fb55" @@ -7421,9 +6590,9 @@ } }, "node_modules/css-what": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", - "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", + "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", "engines": { "node": ">= 6" }, @@ -7685,9 +6854,9 @@ } }, "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dependencies": { "ms": "2.1.2" }, @@ -7721,18 +6890,6 @@ "node": ">=0.10" } }, - "node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -7754,15 +6911,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -7896,12 +7044,6 @@ "which": "bin/which" } }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -8203,9 +7345,9 @@ } }, "node_modules/domhandler": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", - "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", + "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", "dependencies": { "domelementtype": "^2.2.0" }, @@ -8217,9 +7359,9 @@ } }, "node_modules/domutils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz", - "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", "dependencies": { "dom-serializer": "^1.0.1", "domelementtype": "^2.2.0", @@ -8275,12 +7417,6 @@ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" }, - "node_modules/duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, "node_modules/duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -8292,6 +7428,12 @@ "stream-shift": "^1.0.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -8307,9 +7449,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.16", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.16.tgz", - "integrity": "sha512-BQb7FgYwnu6haWLU63/CdVW+9xhmHls3RCQUFiV4lvw3wimEHTVcUk2hkuZo76QhR8nnDdfZE7evJIZqijwPdA==" + "version": "1.4.71", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz", + "integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -8441,19 +7583,6 @@ "stackframe": "^1.1.1" } }, - "node_modules/errorhandler": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz", - "integrity": "sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==", - "dev": true, - "dependencies": { - "accepts": "~1.3.7", - "escape-html": "~1.0.3" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/es-abstract": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", @@ -8540,15 +7669,6 @@ "node": ">=6" } }, - "node_modules/escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -8584,9 +7704,9 @@ } }, "node_modules/escodegen/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "engines": { "node": ">=4.0" } @@ -9008,9 +8128,9 @@ } }, "node_modules/eslint-plugin-node/node_modules/ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, "engines": { "node": ">= 4" @@ -9392,9 +8512,9 @@ } }, "node_modules/eslint/node_modules/globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dependencies": { "type-fest": "^0.20.2" }, @@ -9480,9 +8600,9 @@ } }, "node_modules/esquery/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "engines": { "node": ">=4.0" } @@ -9499,9 +8619,9 @@ } }, "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "engines": { "node": ">=4.0" } @@ -9822,16 +8942,6 @@ "node": ">= 0.10.0" } }, - "node_modules/express-urlrewrite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/express-urlrewrite/-/express-urlrewrite-1.4.0.tgz", - "integrity": "sha512-PI5h8JuzoweS26vFizwQl6UTF25CAHSggNv0J25Dn/IKZscJHWZzPrI5z2Y2jgOzIaw2qh8l6+/jUcig23Z2SA==", - "dev": true, - "dependencies": { - "debug": "*", - "path-to-regexp": "^1.0.3" - } - }, "node_modules/express/node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -9864,9 +8974,9 @@ } }, "node_modules/ext/node_modules/type": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", - "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz", + "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==" }, "node_modules/extend-shallow": { "version": "3.0.2", @@ -9934,9 +9044,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -9945,7 +9055,7 @@ "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" } }, "node_modules/fast-json-stable-stringify": { @@ -10226,9 +9336,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz", - "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "funding": [ { "type": "individual", @@ -10621,30 +9731,6 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dev": true, - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-dirs/node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -10689,15 +9775,15 @@ } }, "node_modules/globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" }, "engines": { @@ -10708,47 +9794,13 @@ } }, "node_modules/globby/node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "engines": { "node": ">= 4" } }, - "node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/got/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -10897,15 +9949,6 @@ "node": ">=0.10.0" } }, - "node_modules/has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -11143,12 +10186,6 @@ "entities": "^2.0.0" } }, - "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true - }, "node_modules/http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -11206,11 +10243,11 @@ } }, "node_modules/http-proxy-middleware": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.2.tgz", - "integrity": "sha512-aYk1rTKqLTus23X3L96LGNCGNgWpG4cG0XoZIT1GUPhhulEHX/QalnO6Vbo+WmKWi4AL2IidjuC0wZtbpg0yhQ==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", "dependencies": { - "http-proxy": "^1.18.1", + "http-proxy": "^1.17.0", "is-glob": "^4.0.0", "lodash": "^4.17.11", "micromatch": "^3.1.10" @@ -11504,19 +10541,10 @@ "node": ">=4" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/import-local": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", - "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -11526,6 +10554,9 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/import-local/node_modules/find-up": { @@ -11812,9 +10843,9 @@ } }, "node_modules/is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "dependencies": { "has": "^1.0.3" }, @@ -11933,31 +10964,6 @@ "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=" }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-installed-globally/node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -11974,18 +10980,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -12070,12 +11064,6 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, - "node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -12194,12 +11182,6 @@ "node": ">=8" } }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -12630,18 +11612,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/jest-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-config/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -12668,96 +11638,6 @@ "node": ">= 10.14.2" } }, - "node_modules/jest-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-config/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-config/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-config/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -12769,14 +11649,6 @@ "node": ">=8" } }, - "node_modules/jest-config/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-diff": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", @@ -13389,18 +12261,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/jest-resolve/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-resolve/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -13409,96 +12269,6 @@ "node": ">=8" } }, - "node_modules/jest-resolve/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-resolve/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-resolve/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-resolve/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-resolve/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-resolve/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-resolve/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-resolve/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-resolve/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -13510,14 +12280,6 @@ "node": ">=8" } }, - "node_modules/jest-resolve/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runner": { "version": "26.6.3", "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", @@ -13593,18 +12355,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/jest-runner/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runner/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -13631,96 +12381,6 @@ "node": ">= 10.14.2" } }, - "node_modules/jest-runner/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-runner/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-runner/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-runner/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runner/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -13732,14 +12392,6 @@ "node": ">=8" } }, - "node_modules/jest-runner/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runtime": { "version": "26.6.3", "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", @@ -13825,18 +12477,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/jest-runtime/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runtime/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -13863,96 +12503,6 @@ "node": ">= 10.14.2" } }, - "node_modules/jest-runtime/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-runtime/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-runtime/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-runtime/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runtime/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -13964,14 +12514,6 @@ "node": ">=8" } }, - "node_modules/jest-runtime/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-serializer": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", @@ -14055,18 +12597,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/jest-snapshot/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-snapshot/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -14093,96 +12623,6 @@ "node": ">= 10.14.2" } }, - "node_modules/jest-snapshot/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-snapshot/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-snapshot/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-snapshot/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-snapshot/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-snapshot/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-snapshot/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-snapshot/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-snapshot/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -14194,14 +12634,6 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-util": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", @@ -14559,12 +12991,6 @@ "node": ">=8" } }, - "node_modules/jju": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", - "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", - "dev": true - }, "node_modules/jquery": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", @@ -14633,9 +13059,9 @@ } }, "node_modules/jsdom/node_modules/acorn": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", - "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "bin": { "acorn": "bin/acorn" }, @@ -14654,12 +13080,6 @@ "node": ">=4" } }, - "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -14670,188 +13090,11 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, - "node_modules/json-parse-helpfulerror": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", - "dev": true, - "dependencies": { - "jju": "^1.1.0" - } - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, - "node_modules/json-server": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/json-server/-/json-server-0.17.0.tgz", - "integrity": "sha512-+e/nW0mf666j1yTK+5dRx7hgxq5wJTkc5QhTYa/cBfD6vLlQWHfB4l8XKPgzeO55A8Hqm38g44OtZ5SooXi6MQ==", - "dev": true, - "dependencies": { - "body-parser": "^1.19.0", - "chalk": "^4.1.2", - "compression": "^1.7.4", - "connect-pause": "^0.1.1", - "cors": "^2.8.5", - "errorhandler": "^1.5.1", - "express": "^4.17.1", - "express-urlrewrite": "^1.4.0", - "json-parse-helpfulerror": "^1.0.3", - "lodash": "^4.17.21", - "lodash-id": "^0.14.1", - "lowdb": "^1.0.0", - "method-override": "^3.0.0", - "morgan": "^1.10.0", - "nanoid": "^3.1.23", - "please-upgrade-node": "^3.2.0", - "pluralize": "^8.0.0", - "server-destroy": "^1.0.1", - "update-notifier": "^5.1.0", - "yargs": "^17.0.1" - }, - "bin": { - "json-server": "lib/cli/bin.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/json-server/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/json-server/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/json-server/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/json-server/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/json-server/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/json-server/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/json-server/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/json-server/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/json-server/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/json-server/node_modules/yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/json-server/node_modules/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -14981,15 +13224,6 @@ "node": ">=4.0" } }, - "node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" - } - }, "node_modules/killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -15041,18 +13275,6 @@ "webpack-sources": "^1.1.0" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -15345,15 +13567,6 @@ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, - "node_modules/lodash-id": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/lodash-id/-/lodash-id-0.14.1.tgz", - "integrity": "sha512-ikQPBTiq/d5m6dfKQlFdIXFzvThPi2Be9/AHxktOnDSfSxE1j9ICbBT5Elk1ke7HSTgM38LHTpmJovo9/klnLg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", @@ -15364,11 +13577,6 @@ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -15447,31 +13655,6 @@ "loose-envify": "cli.js" } }, - "node_modules/lowdb": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowdb/-/lowdb-1.0.0.tgz", - "integrity": "sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.3", - "is-promise": "^2.1.0", - "lodash": "4", - "pify": "^3.0.0", - "steno": "^0.4.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/lowdb/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -15480,15 +13663,6 @@ "tslib": "^2.0.3" } }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -15610,36 +13784,6 @@ "node": ">= 8" } }, - "node_modules/method-override": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/method-override/-/method-override-3.0.0.tgz", - "integrity": "sha512-IJ2NNN/mSl9w3kzWB92rcdHpz+HjkxhDJWNDBqSlas+zQdP8wBiJzITPg08M/k2uVvMow7Sk41atndNtt/PHSA==", - "dev": true, - "dependencies": { - "debug": "3.1.0", - "methods": "~1.1.2", - "parseurl": "~1.3.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/method-override/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/method-override/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -15720,15 +13864,6 @@ "node": ">=6" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/mini-create-react-context": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", @@ -15925,46 +14060,6 @@ "mkdirp": "bin/cmd.js" } }, - "node_modules/morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "dev": true, - "dependencies": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/morgan/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/morgan/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/morgan/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "node_modules/move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -16023,9 +14118,9 @@ "integrity": "sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==" }, "node_modules/nanoid": { - "version": "3.1.25", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", - "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz", + "integrity": "sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -16200,9 +14295,9 @@ } }, "node_modules/node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==" + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==" }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -16265,9 +14360,9 @@ } }, "node_modules/nth-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", - "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", + "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", "dependencies": { "boolbase": "^1.0.0" }, @@ -16647,15 +14742,6 @@ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/p-each-series": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", @@ -16730,30 +14816,6 @@ "node": ">=4" } }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -16993,24 +15055,6 @@ "node": ">=4" } }, - "node_modules/please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "dev": true, - "dependencies": { - "semver-compare": "^1.0.0" - } - }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/pnp-webpack-plugin": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz", @@ -18148,13 +16192,13 @@ } }, "node_modules/postcss-safe-parser/node_modules/postcss": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", - "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "version": "8.4.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.6.tgz", + "integrity": "sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA==", "dependencies": { - "colorette": "^1.2.2", - "nanoid": "^3.1.23", - "source-map-js": "^0.6.2" + "nanoid": "^3.2.0", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" }, "engines": { "node": "^10 || ^12 || >=14" @@ -18183,9 +16227,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", - "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz", + "integrity": "sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -18226,9 +16270,9 @@ } }, "node_modules/postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/postcss-values-parser": { "version": "2.0.1", @@ -18484,18 +16528,6 @@ "node": ">=6" } }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -18526,9 +16558,9 @@ } }, "node_modules/querystring": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", - "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", "engines": { "node": ">=0.4.x" @@ -18621,30 +16653,6 @@ "node": ">= 0.8" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/react": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", @@ -18776,9 +16784,9 @@ } }, "node_modules/react-dev-utils/node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "engines": { "node": ">= 4" } @@ -19117,44 +17125,6 @@ } } }, - "node_modules/react-scripts/node_modules/@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", - "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/react-scripts/node_modules/@babel/core/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/react-scripts/node_modules/resolve": { "version": "1.18.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", @@ -19233,6 +17203,116 @@ "react-dom": ">=16.3.0" } }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "engines": { + "node": ">=8" + } + }, "node_modules/readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -19252,14 +17332,6 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "node_modules/readable-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -19323,11 +17395,11 @@ "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" }, "node_modules/regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", "dependencies": { - "regenerate": "^1.4.0" + "regenerate": "^1.4.2" }, "engines": { "node": ">=4" @@ -19390,54 +17462,30 @@ } }, "node_modules/regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", + "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", "dependencies": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" }, "engines": { "node": ">=4" } }, - "node_modules/registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==" }, "node_modules/regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", "dependencies": { "jsesc": "~0.5.0" }, @@ -19545,12 +17593,16 @@ "integrity": "sha512-uVdlz8J7OO+ASpBYoz1Zypgx0KasCY20H+N8JD13oUMtPvSHQuscrHop4KbXrbsBcdB9Ds7lVK7eRkBIfO43vQ==" }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -19622,14 +17674,6 @@ "node": ">=6" } }, - "node_modules/resolve-url-loader/node_modules/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, "node_modules/resolve-url-loader/node_modules/emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", @@ -19670,15 +17714,6 @@ "node": ">=0.10.0" } }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -19900,12 +17935,6 @@ "tslib": "~2.1.0" } }, - "node_modules/rxjs/node_modules/tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -20323,33 +18352,6 @@ "node": ">=10" } }, - "node_modules/semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -20467,12 +18469,6 @@ "node": ">= 0.8.0" } }, - "node_modules/server-destroy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", - "dev": true - }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -20890,9 +18886,9 @@ } }, "node_modules/source-map-js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", - "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "engines": { "node": ">=0.10.0" } @@ -20910,9 +18906,9 @@ } }, "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -20960,9 +18956,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" }, "node_modules/spdy": { "version": "4.0.2", @@ -21157,15 +19153,6 @@ "node": ">= 0.6" } }, - "node_modules/steno": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/steno/-/steno-0.4.4.tgz", - "integrity": "sha1-BxEFvfwobmYVwEA8J+nXtdy4Vcs=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.3" - } - }, "node_modules/stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", @@ -21210,32 +19197,13 @@ } }, "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dependencies": { - "safe-buffer": "~5.2.0" + "safe-buffer": "~5.1.0" } }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", @@ -21496,6 +19464,17 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/svg-parser": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", @@ -21603,9 +19582,9 @@ } }, "node_modules/table/node_modules/ajv": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", - "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -21743,15 +19722,28 @@ "webpack": "^4.0.0 || ^5.0.0" } }, + "node_modules/terser-webpack-plugin/node_modules/acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "optional": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/terser-webpack-plugin/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "node_modules/terser-webpack-plugin/node_modules/find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -21909,19 +19901,27 @@ } }, "node_modules/terser-webpack-plugin/node_modules/terser": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz", - "integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "dependencies": { "commander": "^2.20.0", "source-map": "~0.7.2", - "source-map-support": "~0.5.19" + "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" }, "engines": { "node": ">=10" + }, + "peerDependencies": { + "acorn": "^8.5.0" + }, + "peerDependenciesMeta": { + "acorn": { + "optional": true + } } }, "node_modules/terser-webpack-plugin/node_modules/terser/node_modules/source-map": { @@ -22054,15 +20054,6 @@ "node": ">=0.10.0" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -22182,9 +20173,9 @@ } }, "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -22304,37 +20295,37 @@ } }, "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", "engines": { "node": ">=4" } }, "node_modules/unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dependencies": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" }, "engines": { "node": ">=4" } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "engines": { "node": ">=4" } }, "node_modules/unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "engines": { "node": ">=4" } @@ -22477,104 +20468,6 @@ "yarn": "*" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/update-notifier/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/update-notifier/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/update-notifier/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -22650,41 +20543,11 @@ "requires-port": "^1.0.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/url-parse-lax/node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" }, - "node_modules/url/node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -23199,9 +21062,9 @@ } }, "node_modules/webpack-dev-middleware/node_modules/mime": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", - "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", "bin": { "mime": "cli.js" }, @@ -23468,20 +21331,6 @@ "node": ">=0.10.0" } }, - "node_modules/webpack-dev-server/node_modules/http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", - "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", - "dependencies": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/webpack-dev-server/node_modules/import-local": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", @@ -24274,18 +22123,6 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -24583,9 +22420,9 @@ } }, "node_modules/ws": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "engines": { "node": ">=8.3.0" }, @@ -24602,15 +22439,6 @@ } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", @@ -24783,81 +22611,82 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "requires": { - "@babel/highlight": "^7.16.0" + "@babel/highlight": "^7.16.7" } }, "@babel/compat-data": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz", - "integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==" + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", + "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==" }, "@babel/core": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", + "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", - "semver": "^6.3.0", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" } } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", + "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", "requires": { - "@babel/types": "^7.16.0", + "@babel/types": "^7.17.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz", - "integrity": "sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", - "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", "requires": { - "@babel/helper-explode-assignable-expression": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-compilation-targets": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz", - "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "requires": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-validator-option": "^7.14.5", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", "browserslist": "^4.17.5", "semver": "^6.3.0" }, @@ -24870,120 +22699,107 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", - "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.1.tgz", + "integrity": "sha512-JBdSr/LtyYIno/pNnJ75lBcqc3Z1XXujzPanHqjvvrhOA+DTceTFuJi8XjmWTZh4r3fsdfqaCMN0iZemdkxZHQ==", "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-split-export-declaration": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", - "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", + "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "regexpu-core": "^4.7.1" + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^5.0.1" } }, - "@babel/helper-define-polyfill-provider": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", - "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "requires": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } + "@babel/types": "^7.16.7" } }, "@babel/helper-explode-assignable-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", - "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-function-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz", - "integrity": "sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "requires": { - "@babel/helper-get-function-arity": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-get-function-arity": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz", - "integrity": "sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-hoist-variables": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz", - "integrity": "sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-imports": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", - "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-transforms": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz", - "integrity": "sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==", - "requires": { - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", - "@babel/helper-simple-access": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-optimise-call-expression": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz", - "integrity": "sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-plugin-utils": { @@ -24992,133 +22808,114 @@ "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==" }, "@babel/helper-remap-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", - "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-wrap-function": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" } }, "@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-simple-access": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz", - "integrity": "sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", - "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.0" } }, "@babel/helper-split-export-declaration": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz", - "integrity": "sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==" + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==" }, "@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==" + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==" }, "@babel/helper-wrap-function": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", - "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", "requires": { - "@babel/helper-function-name": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" } }, "@babel/helpers": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.3.tgz", - "integrity": "sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", + "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", "requires": { - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", - "@babel/types": "^7.16.0" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.0", + "@babel/types": "^7.17.0" } }, "@babel/highlight": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", - "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", "requires": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==" - }, - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz", - "integrity": "sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ==", - "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", - "@babel/plugin-proposal-optional-chaining": "^7.14.5" - } + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", + "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", - "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", - "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", - "requires": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-proposal-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz", - "integrity": "sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-proposal-decorators": { @@ -25132,117 +22929,106 @@ } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", - "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", - "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", - "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", - "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", - "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", - "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", - "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", + "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", "requires": { - "@babel/compat-data": "^7.14.7", - "@babel/helper-compilation-targets": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/compat-data": "^7.17.0", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.14.5" + "@babel/plugin-transform-parameters": "^7.16.7" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", - "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", - "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-proposal-private-methods": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", - "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", - "requires": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-proposal-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q==", + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", + "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.10", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", - "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-syntax-async-generators": { @@ -25269,14 +23055,6 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, - "@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, "@babel/plugin-syntax-decorators": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.14.5.tgz", @@ -25326,11 +23104,11 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.0.tgz", - "integrity": "sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz", + "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-syntax-logical-assignment-operators": { @@ -25381,14 +23159,6 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, - "@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, "@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -25406,93 +23176,94 @@ } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", - "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", - "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", "requires": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5" + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", - "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", - "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-classes": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", - "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", - "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", - "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-destructuring": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", - "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.3.tgz", + "integrity": "sha512-dDFzegDYKlPqa72xIlbmSkly5MluLoaC1JswABGktyt6NTXSBcUuse/kWE/wvKFWJHPETpi158qJZFS3JmykJg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", - "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", - "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", - "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-flow-strip-types": { @@ -25505,119 +23276,120 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", - "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", - "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", "requires": { - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", - "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", - "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", - "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", "requires": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", - "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", "requires": { - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", - "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", "requires": { - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", - "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", "requires": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", - "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7" } }, "@babel/plugin-transform-new-target": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", - "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-object-super": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", - "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" } }, "@babel/plugin-transform-parameters": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", - "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-property-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", - "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-react-constant-elements": { @@ -25629,31 +23401,31 @@ } }, "@babel/plugin-transform-react-display-name": { - "version": "7.15.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.15.1.tgz", - "integrity": "sha512-yQZ/i/pUCJAHI/LbtZr413S3VT26qNrEm0M5RRxQJA947/YNYwbZbBaXGDrq6CG5QsZycI1VIP6d7pQaBfP+8Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", + "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.0.tgz", - "integrity": "sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.3.tgz", + "integrity": "sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ==", "requires": { - "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-jsx": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-jsx": "^7.16.7", + "@babel/types": "^7.17.0" } }, "@babel/plugin-transform-react-jsx-development": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz", - "integrity": "sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz", + "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==", "requires": { - "@babel/plugin-transform-react-jsx": "^7.14.5" + "@babel/plugin-transform-react-jsx": "^7.16.7" } }, "@babel/plugin-transform-react-jsx-source": { @@ -25665,28 +23437,28 @@ } }, "@babel/plugin-transform-react-pure-annotations": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz", - "integrity": "sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz", + "integrity": "sha512-hs71ToC97k3QWxswh2ElzMFABXHvGiJ01IB1TbYQDGeWRKWz/MPUTh5jGExdHvosYKpnJW5Pm3S4+TA3FyX+GA==", "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-regenerator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", - "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", "requires": { "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", - "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-runtime": { @@ -25708,44 +23480,44 @@ } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", - "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-spread": { - "version": "7.14.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", - "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", - "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-template-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", - "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", - "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-typescript": { @@ -25759,113 +23531,106 @@ } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", - "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", - "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/preset-env": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.0.tgz", - "integrity": "sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz", + "integrity": "sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg==", "requires": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.0", - "@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.9", - "@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/compat-data": "^7.12.1", + "@babel/helper-compilation-targets": "^7.12.1", + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-option": "^7.12.1", + "@babel/plugin-proposal-async-generator-functions": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-dynamic-import": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-json-strings": "^7.12.1", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.1", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.1", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.12.1", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", "@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.9", - "@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.15.0", - "@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.9", - "@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.15.0", - "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.16.0", - "semver": "^6.3.0" + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.12.1", + "@babel/plugin-transform-arrow-functions": "^7.12.1", + "@babel/plugin-transform-async-to-generator": "^7.12.1", + "@babel/plugin-transform-block-scoped-functions": "^7.12.1", + "@babel/plugin-transform-block-scoping": "^7.12.1", + "@babel/plugin-transform-classes": "^7.12.1", + "@babel/plugin-transform-computed-properties": "^7.12.1", + "@babel/plugin-transform-destructuring": "^7.12.1", + "@babel/plugin-transform-dotall-regex": "^7.12.1", + "@babel/plugin-transform-duplicate-keys": "^7.12.1", + "@babel/plugin-transform-exponentiation-operator": "^7.12.1", + "@babel/plugin-transform-for-of": "^7.12.1", + "@babel/plugin-transform-function-name": "^7.12.1", + "@babel/plugin-transform-literals": "^7.12.1", + "@babel/plugin-transform-member-expression-literals": "^7.12.1", + "@babel/plugin-transform-modules-amd": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-modules-systemjs": "^7.12.1", + "@babel/plugin-transform-modules-umd": "^7.12.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", + "@babel/plugin-transform-new-target": "^7.12.1", + "@babel/plugin-transform-object-super": "^7.12.1", + "@babel/plugin-transform-parameters": "^7.12.1", + "@babel/plugin-transform-property-literals": "^7.12.1", + "@babel/plugin-transform-regenerator": "^7.12.1", + "@babel/plugin-transform-reserved-words": "^7.12.1", + "@babel/plugin-transform-shorthand-properties": "^7.12.1", + "@babel/plugin-transform-spread": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.1", + "@babel/plugin-transform-template-literals": "^7.12.1", + "@babel/plugin-transform-typeof-symbol": "^7.12.1", + "@babel/plugin-transform-unicode-escapes": "^7.12.1", + "@babel/plugin-transform-unicode-regex": "^7.12.1", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.12.1", + "core-js-compat": "^3.6.2", + "semver": "^5.5.0" }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" } } }, "@babel/preset-modules": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", - "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", @@ -25875,16 +23640,16 @@ } }, "@babel/preset-react": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.14.5.tgz", - "integrity": "sha512-XFxBkjyObLvBaAvkx1Ie95Iaq4S/GUEIrejyrntQ/VCMKUYvKLoyKxOBzJ2kjA3b6rC9/KL6KXfDC2GqvLiNqQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz", + "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-transform-react-display-name": "^7.14.5", - "@babel/plugin-transform-react-jsx": "^7.14.5", - "@babel/plugin-transform-react-jsx-development": "^7.14.5", - "@babel/plugin-transform-react-pure-annotations": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-react-display-name": "^7.16.7", + "@babel/plugin-transform-react-jsx": "^7.16.7", + "@babel/plugin-transform-react-jsx-development": "^7.16.7", + "@babel/plugin-transform-react-pure-annotations": "^7.16.7" } }, "@babel/preset-typescript": { @@ -25897,9 +23662,9 @@ } }, "@babel/runtime": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.5.tgz", - "integrity": "sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", + "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -25914,37 +23679,38 @@ } }, "@babel/template": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz", - "integrity": "sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-function-name": "^7.16.0", - "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", - "@babel/types": "^7.16.0", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", - "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "requires": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" } }, @@ -26103,9 +23869,9 @@ }, "dependencies": { "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "requires": { "type-fest": "^0.20.2" } @@ -26117,6 +23883,11 @@ } } }, + "@gar/promisify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", + "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==" + }, "@hapi/address": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", @@ -26296,95 +24067,86 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "@jest/core": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", - "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", - "requires": { - "@jest/console": "^26.6.2", - "@jest/reporters": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.6.2", - "jest-config": "^26.6.3", - "jest-haste-map": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-resolve-dependencies": "^26.6.3", - "jest-runner": "^26.6.3", - "jest-runtime": "^26.6.3", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "jest-watcher": "^26.6.2", - "micromatch": "^4.0.2", - "p-each-series": "^2.1.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "has-flag": "^4.0.0" + } + } + } + }, + "@jest/core": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", + "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", + "requires": { + "@jest/console": "^26.6.2", + "@jest/reporters": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-changed-files": "^26.6.2", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-resolve-dependencies": "^26.6.3", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "jest-watcher": "^26.6.2", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" } }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -26405,68 +24167,6 @@ "slash": "^3.0.0" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -26474,11 +24174,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -26578,15 +24273,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -26607,68 +24293,6 @@ "slash": "^3.0.0" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -26681,11 +24305,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -26946,12 +24565,12 @@ } }, "@mui/private-theming": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.2.2.tgz", - "integrity": "sha512-BfTjZ5ao6KY4Sg11lgaVuQ9uUq8unaM2u9/RKDD12If0B2Vp/AhRSe7i5OTd+wErmK2guTX0kPSraGZzwDEIVg==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.4.2.tgz", + "integrity": "sha512-mlPDYYko4wIcwXjCPEmOWbNTT4DZ6h9YHdnRtQPnWM28+TRUHEo7SbydnnmVDQLRXUfaH4Y6XtEHIfBNPE/SLg==", "requires": { - "@babel/runtime": "^7.16.3", - "@mui/utils": "^5.2.2", + "@babel/runtime": "^7.17.0", + "@mui/utils": "^5.4.2", "prop-types": "^15.7.2" } }, @@ -26987,35 +24606,6 @@ "jss-plugin-rule-value-function": "^10.8.2", "jss-plugin-vendor-prefixer": "^10.8.2", "prop-types": "^15.7.2" - }, - "dependencies": { - "@mui/private-theming": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.2.3.tgz", - "integrity": "sha512-Lc1Cmu8lSsYZiXADi9PBb17Ho82ZbseHQujUFAcp6bCJ5x/d+87JYCIpCBMagPu/isRlFCwbziuXPmz7WOzJPQ==", - "requires": { - "@babel/runtime": "^7.16.3", - "@mui/utils": "^5.2.3", - "prop-types": "^15.7.2" - } - }, - "@mui/utils": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.2.3.tgz", - "integrity": "sha512-sQujlajIS0zQKcGIS6tZR0L1R+ib26B6UtuEn+cZqwKHsPo3feuS+SkdscYBdcCdMbrZs4gj8WIJHl2z6tbSzQ==", - "requires": { - "@babel/runtime": "^7.16.3", - "@types/prop-types": "^15.7.4", - "@types/react-is": "^16.7.1 || ^17.0.0", - "prop-types": "^15.7.2", - "react-is": "^17.0.2" - } - }, - "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" - } } }, "@mui/system": { @@ -27040,11 +24630,11 @@ "requires": {} }, "@mui/utils": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.2.2.tgz", - "integrity": "sha512-0u9ImUfpCfTxmvQTfUzTSS+jKWMX15MBZeZCRQZ0f7o9Yi8BlrLj33lMx0mFBkUSYdTXnqL4yfOn7RBzV01HMQ==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.4.2.tgz", + "integrity": "sha512-646dBCC57MXTo/Gf3AnZSHRHznaTETQq5x7AWp5FRQ4jPeyT4WSs18cpJVwkV01cAHKh06pNQTIufIALIWCL5g==", "requires": { - "@babel/runtime": "^7.16.3", + "@babel/runtime": "^7.17.0", "@types/prop-types": "^15.7.4", "@types/react-is": "^16.7.1 || ^17.0.0", "prop-types": "^15.7.2", @@ -27104,6 +24694,15 @@ "fastq": "^1.6.0" } }, + "@npmcli/fs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "requires": { + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" + } + }, "@npmcli/move-file": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", @@ -27192,21 +24791,8 @@ "@types/estree": "0.0.39", "estree-walker": "^1.0.1", "picomatch": "^2.2.2" - }, - "dependencies": { - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" - } } }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, "@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -27341,15 +24927,6 @@ "loader-utils": "^2.0.0" } }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "requires": { - "defer-to-connect": "^1.0.1" - } - }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -27407,9 +24984,9 @@ } }, "@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==" + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" }, "@types/glob": { "version": "7.1.4", @@ -27991,15 +25568,6 @@ "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" }, - "ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "requires": { - "string-width": "^4.1.0" - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -28266,13 +25834,6 @@ "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", "requires": { "follow-redirects": "^1.14.4" - }, - "dependencies": { - "follow-redirects": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", - "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==" - } } }, "axobject-query": { @@ -28461,40 +26022,6 @@ "integrity": "sha512-squySRkf+6JGnvjoUtDEjSREJEBirnXi9NqP6rjSYsylxQxqBTz+pkmf395i9E2zsvmYUaI40BHo6SqZUdydlw==", "requires": {} }, - "babel-plugin-polyfill-corejs2": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", - "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", - "requires": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.2.2", - "semver": "^6.1.1" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, - "babel-plugin-polyfill-corejs3": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", - "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", - "requires": { - "@babel/helper-define-polyfill-provider": "^0.2.2", - "core-js-compat": "^3.14.0" - } - }, - "babel-plugin-polyfill-regenerator": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", - "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", - "requires": { - "@babel/helper-define-polyfill-provider": "^0.2.2" - } - }, "babel-plugin-syntax-object-rest-spread": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", @@ -28564,29 +26091,6 @@ "babel-plugin-transform-react-remove-prop-types": "0.4.24" }, "dependencies": { - "@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", - "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - } - }, "@babel/plugin-proposal-class-properties": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz", @@ -28632,79 +26136,6 @@ "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/preset-env": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz", - "integrity": "sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg==", - "requires": { - "@babel/compat-data": "^7.12.1", - "@babel/helper-compilation-targets": "^7.12.1", - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-validator-option": "^7.12.1", - "@babel/plugin-proposal-async-generator-functions": "^7.12.1", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/plugin-proposal-dynamic-import": "^7.12.1", - "@babel/plugin-proposal-export-namespace-from": "^7.12.1", - "@babel/plugin-proposal-json-strings": "^7.12.1", - "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", - "@babel/plugin-proposal-numeric-separator": "^7.12.1", - "@babel/plugin-proposal-object-rest-spread": "^7.12.1", - "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", - "@babel/plugin-proposal-optional-chaining": "^7.12.1", - "@babel/plugin-proposal-private-methods": "^7.12.1", - "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", - "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-class-properties": "^7.12.1", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.0", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.12.1", - "@babel/plugin-transform-arrow-functions": "^7.12.1", - "@babel/plugin-transform-async-to-generator": "^7.12.1", - "@babel/plugin-transform-block-scoped-functions": "^7.12.1", - "@babel/plugin-transform-block-scoping": "^7.12.1", - "@babel/plugin-transform-classes": "^7.12.1", - "@babel/plugin-transform-computed-properties": "^7.12.1", - "@babel/plugin-transform-destructuring": "^7.12.1", - "@babel/plugin-transform-dotall-regex": "^7.12.1", - "@babel/plugin-transform-duplicate-keys": "^7.12.1", - "@babel/plugin-transform-exponentiation-operator": "^7.12.1", - "@babel/plugin-transform-for-of": "^7.12.1", - "@babel/plugin-transform-function-name": "^7.12.1", - "@babel/plugin-transform-literals": "^7.12.1", - "@babel/plugin-transform-member-expression-literals": "^7.12.1", - "@babel/plugin-transform-modules-amd": "^7.12.1", - "@babel/plugin-transform-modules-commonjs": "^7.12.1", - "@babel/plugin-transform-modules-systemjs": "^7.12.1", - "@babel/plugin-transform-modules-umd": "^7.12.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", - "@babel/plugin-transform-new-target": "^7.12.1", - "@babel/plugin-transform-object-super": "^7.12.1", - "@babel/plugin-transform-parameters": "^7.12.1", - "@babel/plugin-transform-property-literals": "^7.12.1", - "@babel/plugin-transform-regenerator": "^7.12.1", - "@babel/plugin-transform-reserved-words": "^7.12.1", - "@babel/plugin-transform-shorthand-properties": "^7.12.1", - "@babel/plugin-transform-spread": "^7.12.1", - "@babel/plugin-transform-sticky-regex": "^7.12.1", - "@babel/plugin-transform-template-literals": "^7.12.1", - "@babel/plugin-transform-typeof-symbol": "^7.12.1", - "@babel/plugin-transform-unicode-escapes": "^7.12.1", - "@babel/plugin-transform-unicode-regex": "^7.12.1", - "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.12.1", - "core-js-compat": "^3.6.2", - "semver": "^5.5.0" - } - }, "@babel/preset-react": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.12.1.tgz", @@ -28736,11 +26167,6 @@ "requires": { "regenerator-runtime": "^0.13.4" } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" } } }, @@ -28804,15 +26230,6 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, - "basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - } - }, "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -28911,90 +26328,6 @@ "integrity": "sha512-bs74WNI9BgBo3cEovmdMHikSKoXnDgA6VQjJ7TyTotU6L7d41ZyCEEelPwkYEzsG/Zjv3ie9IE3EMAje0W9Xew==", "requires": {} }, - "boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - } - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -29107,21 +26440,21 @@ } }, "browserslist": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz", - "integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "requires": { - "caniuse-lite": "^1.0.30001280", - "electron-to-chromium": "^1.3.896", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", "node-releases": "^2.0.1", "picocolors": "^1.0.0" }, "dependencies": { "node-releases": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==" } } }, @@ -29181,10 +26514,11 @@ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, "cacache": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.2.0.tgz", - "integrity": "sha512-uKoJSHmnrqXgthDFx/IU6ED/5xd+NNGe+Bb+kLZy7Ku4P+BaiWEUflAKPZ7eAzsYGcsAGASJZsybXp+quEcHTw==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", "requires": { + "@npmcli/fs": "^1.0.0", "@npmcli/move-file": "^1.0.1", "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -29227,35 +26561,6 @@ "unset-value": "^1.0.0" } }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - }, - "normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true - } - } - }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -29303,9 +26608,9 @@ } }, "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" }, "caniuse-api": { "version": "3.0.0", @@ -29362,9 +26667,9 @@ "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==" }, "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "optional": true, "requires": { "anymatch": "~3.1.2", @@ -29503,12 +26808,6 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" }, - "cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true - }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -29557,13 +26856,13 @@ } }, "string-width": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.0.1.tgz", - "integrity": "sha512-5ohWO/M4//8lErlUUtrFy3b11GtNOuMOU0ysKCDXFcfXuuvUXu95akgj/i8ofmaGdN0hCqyl6uu9i8dS/mQp5g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz", + "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==", "dev": true, "requires": { + "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", - "is-fullwidth-code-point": "^4.0.0", "strip-ansi": "^7.0.1" } }, @@ -29588,15 +26887,6 @@ "wrap-ansi": "^6.2.0" } }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, "clsx": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", @@ -29663,9 +26953,9 @@ } }, "colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" }, "combined-stream": { "version": "1.0.8", @@ -29756,52 +27046,6 @@ "typedarray": "^0.0.6" } }, - "configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "dependencies": { - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "requires": { - "crypto-random-string": "^2.0.0" - } - } - } - }, "confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -29812,12 +27056,6 @@ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" }, - "connect-pause": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/connect-pause/-/connect-pause-0.1.1.tgz", - "integrity": "sha1-smmyu4Ldsaw9tQmcD7WCq6mfs3o=", - "dev": true - }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -29842,9 +27080,9 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "requires": { "safe-buffer": "~5.1.1" } @@ -29888,16 +27126,16 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.16.2.tgz", - "integrity": "sha512-P0KPukO6OjMpjBtHSceAZEWlDD1M2Cpzpg6dBbrjFqFhBHe/BwhxaP820xKOjRn/lZRQirrCusIpLS/n2sgXLQ==" + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz", + "integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ==" }, "core-js-compat": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.2.tgz", - "integrity": "sha512-4lUshXtBXsdmp8cDWh6KKiHUg40AjiuPD3bOWkNVsr1xkAhpUqCjaZ8lB1bKx9Gb5fXcbRbFJ4f4qpRIRTuJqQ==", + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.0.tgz", + "integrity": "sha512-OSXseNPSK2OPJa6GdtkMz/XxeXx8/CJvfhQWTqd6neuUraujcL4jVsjkLQz1OWnax8xVQJnRPe0V2jqNWORA+A==", "requires": { - "browserslist": "^4.16.7", + "browserslist": "^4.19.1", "semver": "7.0.0" }, "dependencies": { @@ -29918,16 +27156,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, "cosmiconfig": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", @@ -30122,15 +27350,15 @@ } }, "css-select": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", - "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", + "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", "requires": { "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" + "css-what": "^5.1.0", + "domhandler": "^4.3.0", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" } }, "css-select-base-adapter": { @@ -30164,9 +27392,9 @@ } }, "css-what": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", - "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", + "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==" }, "cssdb": { "version": "4.4.0", @@ -30369,9 +27597,9 @@ } }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "requires": { "ms": "2.1.2" } @@ -30391,15 +27619,6 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -30418,12 +27637,6 @@ "regexp.prototype.flags": "^1.2.0" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -30523,12 +27736,6 @@ } } }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -30772,17 +27979,17 @@ } }, "domhandler": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", - "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", + "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", "requires": { "domelementtype": "^2.2.0" } }, "domutils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz", - "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", "requires": { "dom-serializer": "^1.0.1", "domelementtype": "^2.2.0", @@ -30828,12 +28035,6 @@ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -30845,6 +28046,12 @@ "stream-shift": "^1.0.0" } }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -30856,9 +28063,9 @@ "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" }, "electron-to-chromium": { - "version": "1.4.16", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.16.tgz", - "integrity": "sha512-BQb7FgYwnu6haWLU63/CdVW+9xhmHls3RCQUFiV4lvw3wimEHTVcUk2hkuZo76QhR8nnDdfZE7evJIZqijwPdA==" + "version": "1.4.71", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz", + "integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==" }, "elliptic": { "version": "6.5.4", @@ -30967,16 +28174,6 @@ "stackframe": "^1.1.1" } }, - "errorhandler": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz", - "integrity": "sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==", - "dev": true, - "requires": { - "accepts": "~1.3.7", - "escape-html": "~1.0.3" - } - }, "es-abstract": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", @@ -31048,12 +28245,6 @@ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, - "escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -31077,9 +28268,9 @@ }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" }, "levn": { "version": "0.3.0", @@ -31230,9 +28421,9 @@ } }, "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "requires": { "type-fest": "^0.20.2" } @@ -31453,9 +28644,9 @@ "dev": true }, "ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "semver": { @@ -31670,9 +28861,9 @@ }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" } } }, @@ -31685,9 +28876,9 @@ }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" } } }, @@ -31968,16 +29159,6 @@ } } }, - "express-urlrewrite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/express-urlrewrite/-/express-urlrewrite-1.4.0.tgz", - "integrity": "sha512-PI5h8JuzoweS26vFizwQl6UTF25CAHSggNv0J25Dn/IKZscJHWZzPrI5z2Y2jgOzIaw2qh8l6+/jUcig23Z2SA==", - "dev": true, - "requires": { - "debug": "*", - "path-to-regexp": "^1.0.3" - } - }, "ext": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.5.0.tgz", @@ -31987,9 +29168,9 @@ }, "dependencies": { "type": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", - "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz", + "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==" } } }, @@ -32046,9 +29227,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -32275,9 +29456,9 @@ } }, "follow-redirects": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz", - "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA==" + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" }, "for-in": { "version": "1.0.2", @@ -32566,23 +29747,6 @@ "is-glob": "^4.0.1" } }, - "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dev": true, - "requires": { - "ini": "2.0.0" - }, - "dependencies": { - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true - } - } - }, "global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -32617,52 +29781,22 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" }, "dependencies": { "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" - } - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" } } }, @@ -32779,12 +29913,6 @@ } } }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true - }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -32972,12 +30100,6 @@ "entities": "^2.0.0" } }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true - }, "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -33028,11 +30150,11 @@ } }, "http-proxy-middleware": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.2.tgz", - "integrity": "sha512-aYk1rTKqLTus23X3L96LGNCGNgWpG4cG0XoZIT1GUPhhulEHX/QalnO6Vbo+WmKWi4AL2IidjuC0wZtbpg0yhQ==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", "requires": { - "http-proxy": "^1.18.1", + "http-proxy": "^1.17.0", "is-glob": "^4.0.0", "lodash": "^4.17.11", "micromatch": "^3.1.10" @@ -33246,16 +30368,10 @@ } } }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, "import-local": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", - "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "requires": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -33472,9 +30588,9 @@ } }, "is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "requires": { "has": "^1.0.3" } @@ -33551,24 +30667,6 @@ "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=" }, - "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "dependencies": { - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - } - } - }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -33579,12 +30677,6 @@ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" }, - "is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -33642,12 +30734,6 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, - "is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true - }, "is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -33724,12 +30810,6 @@ "is-docker": "^2.0.0" } }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -34045,15 +31125,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -34074,68 +31145,6 @@ "slash": "^3.0.0" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -34143,11 +31152,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -34586,82 +31590,11 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -34669,11 +31602,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -34744,15 +31672,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -34773,68 +31692,6 @@ "slash": "^3.0.0" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -34842,11 +31699,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -34914,15 +31766,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -34943,68 +31786,6 @@ "slash": "^3.0.0" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -35012,11 +31793,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -35082,15 +31858,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -35111,68 +31878,6 @@ "slash": "^3.0.0" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -35180,11 +31885,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -35447,12 +32147,6 @@ } } }, - "jju": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", - "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", - "dev": true - }, "jquery": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", @@ -35507,9 +32201,9 @@ }, "dependencies": { "acorn": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", - "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==" + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==" } } }, @@ -35518,12 +32212,6 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -35534,148 +32222,11 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, - "json-parse-helpfulerror": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", - "dev": true, - "requires": { - "jju": "^1.1.0" - } - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, - "json-server": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/json-server/-/json-server-0.17.0.tgz", - "integrity": "sha512-+e/nW0mf666j1yTK+5dRx7hgxq5wJTkc5QhTYa/cBfD6vLlQWHfB4l8XKPgzeO55A8Hqm38g44OtZ5SooXi6MQ==", - "dev": true, - "requires": { - "body-parser": "^1.19.0", - "chalk": "^4.1.2", - "compression": "^1.7.4", - "connect-pause": "^0.1.1", - "cors": "^2.8.5", - "errorhandler": "^1.5.1", - "express": "^4.17.1", - "express-urlrewrite": "^1.4.0", - "json-parse-helpfulerror": "^1.0.3", - "lodash": "^4.17.21", - "lodash-id": "^0.14.1", - "lowdb": "^1.0.0", - "method-override": "^3.0.0", - "morgan": "^1.10.0", - "nanoid": "^3.1.23", - "please-upgrade-node": "^3.2.0", - "pluralize": "^8.0.0", - "server-destroy": "^1.0.1", - "update-notifier": "^5.1.0", - "yargs": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } - }, - "yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", - "dev": true - } - } - }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -35790,15 +32341,6 @@ "object.assign": "^4.1.2" } }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -35841,15 +32383,6 @@ "webpack-sources": "^1.1.0" } }, - "latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "requires": { - "package-json": "^6.3.0" - } - }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -36060,12 +32593,6 @@ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, - "lodash-id": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/lodash-id/-/lodash-id-0.14.1.tgz", - "integrity": "sha512-ikQPBTiq/d5m6dfKQlFdIXFzvThPi2Be9/AHxktOnDSfSxE1j9ICbBT5Elk1ke7HSTgM38LHTpmJovo9/klnLg==", - "dev": true - }, "lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", @@ -36076,11 +32603,6 @@ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -36143,27 +32665,6 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, - "lowdb": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowdb/-/lowdb-1.0.0.tgz", - "integrity": "sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.3", - "is-promise": "^2.1.0", - "lodash": "4", - "pify": "^3.0.0", - "steno": "^0.4.1" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, "lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -36172,12 +32673,6 @@ "tslib": "^2.0.3" } }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -36280,35 +32775,6 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, - "method-override": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/method-override/-/method-override-3.0.0.tgz", - "integrity": "sha512-IJ2NNN/mSl9w3kzWB92rcdHpz+HjkxhDJWNDBqSlas+zQdP8wBiJzITPg08M/k2uVvMow7Sk41atndNtt/PHSA==", - "dev": true, - "requires": { - "debug": "3.1.0", - "methods": "~1.1.2", - "parseurl": "~1.3.2", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -36367,12 +32833,6 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, "mini-create-react-context": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", @@ -36521,42 +32981,6 @@ "minimist": "^1.2.5" } }, - "morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "dev": true, - "requires": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -36611,9 +33035,9 @@ "integrity": "sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==" }, "nanoid": { - "version": "3.1.25", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", - "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz", + "integrity": "sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==" }, "nanomatch": { "version": "1.2.13", @@ -36771,9 +33195,9 @@ } }, "node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==" + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==" }, "normalize-package-data": { "version": "2.5.0", @@ -36823,9 +33247,9 @@ } }, "nth-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", - "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", + "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", "requires": { "boolbase": "^1.0.0" } @@ -37106,12 +33530,6 @@ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true - }, "p-each-series": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", @@ -37159,26 +33577,6 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" }, - "package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "requires": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -37367,21 +33765,6 @@ "find-up": "^2.1.0" } }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "dev": true, - "requires": { - "semver-compare": "^1.0.0" - } - }, - "pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true - }, "pnp-webpack-plugin": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz", @@ -38328,13 +34711,13 @@ }, "dependencies": { "postcss": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", - "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "version": "8.4.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.6.tgz", + "integrity": "sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA==", "requires": { - "colorette": "^1.2.2", - "nanoid": "^3.1.23", - "source-map-js": "^0.6.2" + "nanoid": "^3.2.0", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" } } } @@ -38358,9 +34741,9 @@ } }, "postcss-selector-parser": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", - "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz", + "integrity": "sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==", "requires": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -38394,9 +34777,9 @@ } }, "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "postcss-values-parser": { "version": "2.0.1", @@ -38597,15 +34980,6 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "requires": { - "escape-goat": "^2.0.0" - } - }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -38626,9 +35000,9 @@ } }, "querystring": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", - "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, "querystring-es3": { "version": "0.2.1", @@ -38693,26 +35067,6 @@ } } }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - } - } - }, "react": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", @@ -38813,9 +35167,9 @@ } }, "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" }, "locate-path": { "version": "5.0.0", @@ -39068,36 +35422,6 @@ "workbox-webpack-plugin": "5.1.4" }, "dependencies": { - "@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", - "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "resolve": { "version": "1.18.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", @@ -39151,6 +35475,84 @@ "react-transition-group": "^2.3.1" } }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + } + } + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -39169,14 +35571,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } } } }, @@ -39230,11 +35624,11 @@ "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" }, "regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", "requires": { - "regenerate": "^1.4.0" + "regenerate": "^1.4.2" } }, "regenerator-runtime": { @@ -39279,45 +35673,27 @@ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" }, "regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" - } - }, - "registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } - }, - "registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", + "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", "requires": { - "rc": "^1.2.8" + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" } }, "regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==" }, "regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", "requires": { "jsesc": "~0.5.0" }, @@ -39402,12 +35778,13 @@ "integrity": "sha512-uVdlz8J7OO+ASpBYoz1Zypgx0KasCY20H+N8JD13oUMtPvSHQuscrHop4KbXrbsBcdB9Ds7lVK7eRkBIfO43vQ==" }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-cwd": { @@ -39462,14 +35839,6 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "requires": { - "safe-buffer": "~5.1.1" - } - }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", @@ -39500,15 +35869,6 @@ } } }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - } - }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -39681,14 +36041,6 @@ "dev": true, "requires": { "tslib": "~2.1.0" - }, - "dependencies": { - "tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", - "dev": true - } } }, "safe-buffer": { @@ -40004,29 +36356,6 @@ "lru-cache": "^6.0.0" } }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -40138,12 +36467,6 @@ "send": "0.17.1" } }, - "server-destroy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", - "dev": true - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -40490,9 +36813,9 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", - "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" }, "source-map-resolve": { "version": "0.5.3", @@ -40507,9 +36830,9 @@ } }, "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -40556,9 +36879,9 @@ } }, "spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" }, "spdy": { "version": "4.0.2", @@ -40718,15 +37041,6 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, - "steno": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/steno/-/steno-0.4.4.tgz", - "integrity": "sha1-BxEFvfwobmYVwEA8J+nXtdy4Vcs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.3" - } - }, "stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", @@ -40768,18 +37082,11 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } + "safe-buffer": "~5.1.0" } }, "string-argv": { @@ -40975,6 +37282,11 @@ } } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, "svg-parser": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", @@ -41070,9 +37382,9 @@ }, "dependencies": { "ajv": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", - "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -41181,15 +37493,22 @@ "webpack-sources": "^1.4.3" }, "dependencies": { + "acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "optional": true, + "peer": true + }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "requires": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -41294,13 +37613,13 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "terser": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz", - "integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", - "source-map-support": "~0.5.19" + "source-map-support": "~0.5.20" }, "dependencies": { "source-map": { @@ -41408,12 +37727,6 @@ } } }, - "to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true - }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -41505,9 +37818,9 @@ } }, "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" }, "tsutils": { "version": "3.21.0", @@ -41598,28 +37911,28 @@ } }, "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==" }, "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" } }, "unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==" }, "unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==" }, "union-value": { "version": "1.0.1", @@ -41734,79 +38047,6 @@ "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" }, - "update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "requires": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -41833,11 +38073,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" } } }, @@ -41872,23 +38107,6 @@ "requires-port": "^1.0.0" } }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0" - }, - "dependencies": { - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - } - } - }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -42538,9 +38756,9 @@ }, "dependencies": { "mime": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", - "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" } } }, @@ -42752,17 +38970,6 @@ } } }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", - "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", - "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - } - }, "import-local": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", @@ -43161,15 +39368,6 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "requires": { - "string-width": "^4.0.0" - } - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -43438,17 +39636,11 @@ } }, "ws": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "requires": {} }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true - }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index 940e41e3f..55cae55f0 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -62,7 +62,6 @@ "eslint-plugin-react": "^7.27.1", "eslint-plugin-react-hooks": "^4.3.0", "husky": "^7.0.4", - "json-server": "^0.17.0", "lint-staged": "^12.1.2", "nan": "^2.14.2", "redux-devtools-extension": "^2.13.9", @@ -76,7 +75,6 @@ "eject": "react-scripts eject", "lint": "eslint ./src && prettier --check ./src", "lint-fix": "eslint --fix ./src && prettier --write ./src", - "server": "node src/server.js", "prepare": "cd ../../ && husky install ./TbsReact/ClientApp/.husky" }, "eslintConfig": { @@ -98,6 +96,5 @@ }, "eslintIgnore": [ "build/" - ], - "proxy": "http://localhost:3001/api" + ] } diff --git a/TbsReact/ClientApp/src/api/Accounts/Driver.js b/TbsReact/ClientApp/src/api/Accounts/Driver.js index de4e1a0a0..29d7f7035 100644 --- a/TbsReact/ClientApp/src/api/Accounts/Driver.js +++ b/TbsReact/ClientApp/src/api/Accounts/Driver.js @@ -20,26 +20,6 @@ const logout = async (index) => { } }; -const loginAll = async () => { - try { - await axios.post(`/accounts/login`); - return true; - } catch (e) { - console.log(e); - return false; - } -}; - -const logoutAll = async () => { - try { - await axios.post(`/accounts/logout`); - return true; - } catch (e) { - console.log(e); - return false; - } -}; - const getStatus = async (index) => { try { const { data } = await axios.get(`/status/${index}`); @@ -50,4 +30,4 @@ const getStatus = async (index) => { } }; -export { login, logout, loginAll, logoutAll, getStatus }; +export { login, logout, getStatus }; diff --git a/TbsReact/ClientApp/src/api/Discord.js b/TbsReact/ClientApp/src/api/Discord.js index e7cf8552c..f01bb56af 100644 --- a/TbsReact/ClientApp/src/api/Discord.js +++ b/TbsReact/ClientApp/src/api/Discord.js @@ -2,10 +2,10 @@ import axios from "axios"; const checkUrlDiscordWebhook = async (url) => { try { - const { status } = await axios.get(url); - return status; + await axios.get(url); + return true; } catch (err) { - return err.response.status; + return false; } }; diff --git a/TbsReact/ClientApp/src/api/Setting.js b/TbsReact/ClientApp/src/api/Setting.js index c6e1ef69b..723aa6519 100644 --- a/TbsReact/ClientApp/src/api/Setting.js +++ b/TbsReact/ClientApp/src/api/Setting.js @@ -1,33 +1,21 @@ import axios from "axios"; -const getChromeSetting = async (index) => { +const getSetting = async (index, type) => { try { - const { data } = await axios.get(`/settings_chrome/${index}`); + const { data } = await axios.get(`/settings/${type}/${index}`); return data; } catch (e) { - console.log(e); + return e.response.status; } }; -const setChromeSetting = async (index, data) => { +const setSetting = async (index, type, data) => { try { - const patchData = { - click: { - min: data.click_min, - max: data.click_max, - }, - workTime: { - min: data.work_min, - max: data.work_max, - }, - sleepTime: { - min: data.sleep_min, - max: data.sleep_max, - }, - }; - await axios.patch(`/settings_chrome/${index}/`, patchData); + await axios.put(`/settings/${type}/${index}/`, data); + return true; } catch (e) { - console.log(e); + return e.response.status; } }; -export { getChromeSetting, setChromeSetting }; + +export { getSetting, setSetting }; diff --git a/TbsReact/ClientApp/src/api/Village.js b/TbsReact/ClientApp/src/api/Village.js index dadb05d55..1d2e7013b 100644 --- a/TbsReact/ClientApp/src/api/Village.js +++ b/TbsReact/ClientApp/src/api/Village.js @@ -9,13 +9,4 @@ const getVillages = async (index) => { } }; -const getVillageInfo = async (index) => { - try { - const { data } = await axios.get(`/village/${index}`); - return data; - } catch (e) { - console.log(e); - } -}; - -export { getVillages, getVillageInfo }; +export { getVillages }; diff --git a/TbsReact/ClientApp/src/api/api.js b/TbsReact/ClientApp/src/api/api.js new file mode 100644 index 000000000..5803c395d --- /dev/null +++ b/TbsReact/ClientApp/src/api/api.js @@ -0,0 +1,21 @@ +/** /settings/${type}/ **/ +export const CHROME_SETTING = "chrome"; +export const ACTIVITY_SETTING = "activity"; +export const DISCORD_WEBHOOK_SETTING = "discordwebhook"; +export const HERO_SETTING = "hero"; +export const QUEST_SETTING = "quest"; + +export { getVillages } from "./Village"; +export { getLogData, getTaskList } from "./Debug"; +export { checkUrlDiscordWebhook } from "./Discord"; +export { getSetting, setSetting } from "./Setting"; + +export { + getAccounts, + getAccount, + addAccount, + editAccount, + deleteAccount, +} from "./Accounts/Account"; +export { getAccesses } from "./Accounts/Access"; +export { login, logout, getStatus } from "./Accounts/Driver"; diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js index 0b5d6a75f..c7252ff1f 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/ActivitySettings.js @@ -1,20 +1,52 @@ import { Button, Grid, TextField, Typography } from "@mui/material"; -import React from "react"; import { useForm } from "react-hook-form"; import { yupResolver } from "@hookform/resolvers/yup"; import ContentBox from "../../ContentBox"; import ActivitySchema from "../../../yup/Settings/ActivitySchema.js"; +import React, { useEffect } from "react"; +import { toast } from "react-toastify"; +import { getSetting, setSetting, ACTIVITY_SETTING } from "../../../api/api"; +import { useSelector } from "react-redux"; + const ActivitySettings = () => { const { register, handleSubmit, formState: { errors }, + setValue, } = useForm({ resolver: yupResolver(ActivitySchema), }); - const onSubmit = (data) => console.log(data); + + const account = useSelector((state) => state.account.info.id); + const onSubmit = (data) => { + setSetting(account, ACTIVITY_SETTING, data).then((result) => { + if (result === true) { + toast.success("Activity settings saved!", { + position: toast.POSITION.TOP_RIGHT, + }); + } else { + toast.warning("Activity settings not saved! Try again later", { + position: toast.POSITION.TOP_RIGHT, + }); + } + }); + }; + + useEffect(() => { + if (account !== -1) { + getSetting(account, ACTIVITY_SETTING).then((data) => { + const { sleepTime, workTime } = data; + setValue("sleep.min", sleepTime.min); + setValue("sleep.max", sleepTime.max); + setValue("work.min", workTime.min); + setValue("work.max", workTime.max); + }); + } + }, [account, setValue]); + return ( <> diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js index 358b51bbe..4142fcfee 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/ChromeSettings.js @@ -1,21 +1,14 @@ import React, { useEffect } from "react"; import { useForm } from "react-hook-form"; -import { - Grid, - Typography, - TextField, - Button, - Switch, - FormControlLabel, -} from "@mui/material"; +import { Grid, Typography, TextField, Button } from "@mui/material"; import { yupResolver } from "@hookform/resolvers/yup"; import { toast } from "react-toastify"; - -import { getChromeSetting, setChromeSetting } from "../../../api/Setting"; +import { getSetting, setSetting, CHROME_SETTING } from "../../../api/api"; import { useSelector } from "react-redux"; +import MUISwitch from "../../ref/MUISwitch"; import ContentBox from "../../ContentBox"; -import ChromeSchema from "../../../yup/Settings/ChomreSchema.js"; +import ChromeSchema from "../../../yup/Settings/ChomreSchema"; const ChromeSettings = () => { const { @@ -23,25 +16,33 @@ const ChromeSettings = () => { handleSubmit, formState: { errors }, setValue, + control, } = useForm({ resolver: yupResolver(ChromeSchema), }); const account = useSelector((state) => state.account.info.id); - const onSubmit = async (data) => { - await setChromeSetting(account, data); - toast.success("Chrome settings saved !", { - position: toast.POSITION.TOP_RIGHT, + const onSubmit = (data) => { + setSetting(account, CHROME_SETTING, data).then((result) => { + if (result === true) { + toast.success("Chrome settings saved!", { + position: toast.POSITION.TOP_RIGHT, + }); + } else { + toast.warning("Chrome settings not saved! Try again later", { + position: toast.POSITION.TOP_RIGHT, + }); + } }); }; useEffect(() => { if (account !== -1) { - getChromeSetting(account).then((data) => { + getSetting(account, CHROME_SETTING).then((data) => { const { disableImages, click, autoClose } = data; setValue("click.min", click.min); setValue("click.max", click.max); - setValue("disable_image", disableImages); - setValue("close_chrome", autoClose); + setValue("disableImages", disableImages); + setValue("autoClose", autoClose); }); } }, [account, setValue]); @@ -80,18 +81,16 @@ const ChromeSettings = () => { /> - - } + - - } + diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js index 0015ef9cb..3271f2dea 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/DiscordSettings.js @@ -1,55 +1,81 @@ -import { - Button, - FormControlLabel, - Grid, - Switch, - TextField, - Typography, -} from "@mui/material"; -import React from "react"; +import { Button, Grid, TextField, Typography } from "@mui/material"; import { useForm } from "react-hook-form"; -import { toast } from "react-toastify"; -import { checkUrlDiscordWebhook } from "../../../api/Discord"; import ContentBox from "../../ContentBox"; +import React, { useEffect } from "react"; +import { toast } from "react-toastify"; +import { + getSetting, + setSetting, + checkUrlDiscordWebhook, + DISCORD_WEBHOOK_SETTING, +} from "../../../api/api"; +import { useSelector } from "react-redux"; +import MUISwitch from "../../ref/MUISwitch"; const DiscordSettings = () => { const { register, handleSubmit, + setValue, getValues, formState: { errors }, setError, + control, } = useForm(); + const account = useSelector((state) => state.account.info.id); + + useEffect(() => { + if (account !== -1) { + getSetting(account, DISCORD_WEBHOOK_SETTING).then((data) => { + const { isActive, isOnlineMsg, urlWebhook } = data; + setValue("isActive", isActive); + setValue("isOnlineMsg", isOnlineMsg); + setValue("urlWebhook", urlWebhook); + }); + } + }, [account, setValue]); const onSubmit = async (data) => { const isUrlValid = await checkUrl(getValues("url"), false); if (!isUrlValid) return; - console.log(data); + setSetting(account, DISCORD_WEBHOOK_SETTING, data).then((result) => { + if (result === true) { + toast.success("Discord settings saved!", { + position: toast.POSITION.TOP_RIGHT, + }); + } else { + toast.warning("Discord settings not saved! Try again later", { + position: toast.POSITION.TOP_RIGHT, + }); + } + }); }; + const onChecking = async () => { const url = getValues("url"); await checkUrl(url, true); }; const checkUrl = async (url, show) => { - if (url === "") return; - const data = await checkUrlDiscordWebhook(url); - switch (data) { - case 200: - if (show) { - toast.success("Webhook url is valid", { - position: toast.POSITION.TOP_RIGHT, - }); - } - return true; - case 401: - case 404: - toast.error("Webhook url is invaild", { + if (url === "") { + toast.error("Webhook url is empty", { + position: toast.POSITION.TOP_RIGHT, + }); + setError("url", { message: "Input webhook url" }); + return; + } + const result = await checkUrlDiscordWebhook(url); + if (result === true) { + if (show) { + toast.success("Webhook url is valid", { position: toast.POSITION.TOP_RIGHT, }); - setError("url", { message: "Reinput webhook url" }); - - return false; + } + } else { + toast.error("Webhook url is invaild", { + position: toast.POSITION.TOP_RIGHT, + }); + setError("url", { message: "Reinput webhook url" }); } }; @@ -60,14 +86,16 @@ const DiscordSettings = () => {
- } + - } + diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js index e501461eb..50dcc2fa5 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js @@ -1,26 +1,56 @@ -import { - Button, - FormControlLabel, - Grid, - Switch, - Typography, - MenuItem, -} from "@mui/material"; -import React from "react"; +import { Button, Grid, Typography } from "@mui/material"; import { useForm } from "react-hook-form"; import ContentBox from "../../ContentBox"; -import MaterialSelect from "../../ref/MaterialSelect"; +import MUISelect from "../../ref/MUISelect"; +import MUISwitch from "../../ref/MUISwitch"; +import React, { useState, useEffect } from "react"; +import { toast } from "react-toastify"; +import { + getSetting, + setSetting, + QUEST_SETTING, + getVillages, +} from "../../../api/api"; +import { useSelector } from "react-redux"; const QuestSettings = () => { - const { register, control, handleSubmit } = useForm(); - const onSubmit = (data) => console.log(data); + const { control, handleSubmit, setValue } = useForm(); + const account = useSelector((state) => state.account.info.id); + const [villages, setVillages] = useState([]); + + const onSubmit = (data) => { + setSetting(account, QUEST_SETTING, data).then((result) => { + if (result === true) { + toast.success("Quest settings saved!", { + position: toast.POSITION.TOP_RIGHT, + }); + } else { + toast.warning("Quest settings not saved! Try again later", { + position: toast.POSITION.TOP_RIGHT, + }); + } + }); + }; + + useEffect(() => { + if (account !== -1) { + getSetting(account, QUEST_SETTING).then((data) => { + const { beginner, daily, villageId } = data; + setValue("beginner", beginner); + setValue("daily", daily); + console.log(data); + console.log("beginner: " + beginner); + console.log("daily: " + daily); + + getVillages(account).then((data) => { + setVillages(data); + setValue("villageId", villageId); + }); + }); + } + }, [account, setValue]); - const options = [ - { value: "1", label: "1" }, - { value: "2", label: "2" }, - { value: "3", label: "3" }, - ]; return ( <> @@ -28,30 +58,27 @@ const QuestSettings = () => { - } + - } + - - Ten - Twenty - Thirty - + /> - - - - - - diff --git a/TbsReact/ClientApp/src/server.js b/TbsReact/ClientApp/src/server.js deleted file mode 100644 index 7bdfa7e2d..000000000 --- a/TbsReact/ClientApp/src/server.js +++ /dev/null @@ -1,30 +0,0 @@ -require("dotenv").config(); - -const jsonServer = require("json-server"); -const server = jsonServer.create(); -const router = jsonServer.router("db.json"); -const middlewares = jsonServer.defaults(); - -server.use(middlewares); - -router.render = (req, res) => { - if (req.path.includes("/accesses/") && req.path !== "/accesses/") { - res.jsonp(res.locals.data.accesses); - } else if (req.path.includes("/status/") && req.path !== "/status/") { - res.jsonp(res.locals.data.status); - } else if (req.path.includes("/villages/") && req.path !== "/villages/") { - res.jsonp(res.locals.data.villages); - } else if (req.path.includes("/task/") && req.path !== "/task/") { - res.jsonp(res.locals.data.task); - } else if (req.path.includes("/log/") && req.path !== "/log/") { - res.jsonp(res.locals.data.log); - } else { - res.jsonp(res.locals.data); - } -}; -server.use("/api", router); - -const port = process.env.PORT_API || 3001; -server.listen(port, () => { - console.log(`JSON Server is running at ${port}`); -}); diff --git a/TbsReact/ClientApp/src/slices/village.js b/TbsReact/ClientApp/src/slices/village.js index 961626fce..71c6703c0 100644 --- a/TbsReact/ClientApp/src/slices/village.js +++ b/TbsReact/ClientApp/src/slices/village.js @@ -1,13 +1,4 @@ -import { createSlice, createAsyncThunk } from "@reduxjs/toolkit"; - -import { getVillageInfo } from "../api/Village"; -export const fetchVillageByID = createAsyncThunk( - "village/fetcInfohById", - async (id, thunkAPI) => { - const data = await getVillageInfo(id); - return data; - } -); +import { createSlice } from "@reduxjs/toolkit"; const initialState = { info: { @@ -32,11 +23,6 @@ export const villageSlice = createSlice({ return initialState; }, }, - extraReducers: (builder) => { - builder.addCase(fetchVillageByID.fulfilled, (state, action) => { - state.info = action.payload; - }); - }, }); export const { setVillage, resetVillage } = villageSlice.actions; diff --git a/TbsReact/Controllers/Setting/ActivityController.cs b/TbsReact/Controllers/Setting/ActivityController.cs new file mode 100644 index 000000000..c45ad6aef --- /dev/null +++ b/TbsReact/Controllers/Setting/ActivityController.cs @@ -0,0 +1,59 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; +using TbsReact.Models.Setting; +using TbsReact.Singleton; + +namespace TbsReact.Controllers.Setting +{ + [ApiController] + [Route("settings/activity/{indexAcc:int}")] + public class ActivityController : ControllerBase + { + [HttpGet] + public ActionResult GetSetting(int indexAcc) + { + var account = AccountData.GetAccount(indexAcc); + + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + var setting = new Activity + { + SleepTime = new Range + { + Min = acc.Settings.Time.MinSleep, + Max = acc.Settings.Time.MaxSleep, + }, + WorkTime = new Range + { + Min = acc.Settings.Time.MinWork, + Max = acc.Settings.Time.MaxWork, + } + }; + + return Ok(setting); + } + + [HttpPut] + public ActionResult PutSetting(int indexAcc, [FromBody] Activity setting) + { + var account = AccountData.GetAccount(indexAcc); + + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + + acc.Settings.Time.MinSleep = setting.SleepTime.Min; + acc.Settings.Time.MaxSleep = setting.SleepTime.Max; + acc.Settings.Time.MinWork = setting.WorkTime.Min; + acc.Settings.Time.MaxWork = setting.WorkTime.Max; + + return Ok(); + } + } +} \ No newline at end of file diff --git a/TbsReact/Controllers/Setting/ChromeController.cs b/TbsReact/Controllers/Setting/ChromeController.cs index d8d41ecd0..1ea8ae129 100644 --- a/TbsReact/Controllers/Setting/ChromeController.cs +++ b/TbsReact/Controllers/Setting/ChromeController.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; using TbsReact.Models.Setting; using TbsReact.Singleton; @@ -21,16 +22,6 @@ public ActionResult GetSetting(int indexAcc) var setting = new Chrome { - SleepTime = new Range - { - Min = acc.Settings.Time.MinSleep, - Max = acc.Settings.Time.MaxSleep, - }, - WorkTime = new Range - { - Min = acc.Settings.Time.MinWork, - Max = acc.Settings.Time.MaxWork, - }, Click = new Range { Min = acc.Settings.DelayClickingMin, @@ -54,10 +45,6 @@ public ActionResult PutSetting(int indexAcc, [FromBody] Chrome setting) } var acc = AccountManager.GetAccount(account); - acc.Settings.Time.MinSleep = setting.SleepTime.Min; - acc.Settings.Time.MaxSleep = setting.SleepTime.Max; - acc.Settings.Time.MinWork = setting.WorkTime.Min; - acc.Settings.Time.MaxWork = setting.WorkTime.Max; acc.Settings.DelayClickingMin = setting.Click.Min; acc.Settings.DelayClickingMax = setting.Click.Max; acc.Settings.DisableImages = setting.DisableImages; diff --git a/TbsReact/Controllers/Setting/HeroController.cs b/TbsReact/Controllers/Setting/HeroController.cs index 9498450b3..16ab23caf 100644 --- a/TbsReact/Controllers/Setting/HeroController.cs +++ b/TbsReact/Controllers/Setting/HeroController.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Mvc; +using TbsReact.Models; using TbsReact.Models.Setting; using TbsReact.Singleton; diff --git a/TbsReact/Controllers/VillagesController.cs b/TbsReact/Controllers/VillagesController.cs new file mode 100644 index 000000000..68146d674 --- /dev/null +++ b/TbsReact/Controllers/VillagesController.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models.Villages; +using TbsReact.Singleton; +using TbsReact.Extension; +using System.Collections.Generic; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("villages/{indexAcc:int}")] + public class VillagesController : ControllerBase + { + [HttpGet] + public ActionResult> GetVillages(int indexAcc) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var villages = new List(); + for (int i = 0; i < acc.Villages.Count; i++) + { + villages.Add(acc.Villages[i].GetInfo()); + } + + return villages; + } + } +} \ No newline at end of file diff --git a/TbsReact/Extension/VillageExtension.cs b/TbsReact/Extension/VillageExtension.cs new file mode 100644 index 000000000..5cae07b7d --- /dev/null +++ b/TbsReact/Extension/VillageExtension.cs @@ -0,0 +1,22 @@ +using TbsReact.Models; +using TbsReact.Models.Villages; + +namespace TbsReact.Extension +{ + public static class VillageExtension + { + public static Village GetInfo(this TbsCore.Models.VillageModels.Village village) + { + return new Village + { + Id = village.Id, + Name = village.Name, + Coordinate = new Coordinate + { + X = village.Coordinates.x, + Y = village.Coordinates.y, + }, + }; + } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Setting/Activity.cs b/TbsReact/Models/Setting/Activity.cs new file mode 100644 index 000000000..e3537e26f --- /dev/null +++ b/TbsReact/Models/Setting/Activity.cs @@ -0,0 +1,10 @@ +using TbsReact.Models; + +namespace TbsReact.Models.Setting +{ + public class Activity + { + public Range WorkTime { get; set; } + public Range SleepTime { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Setting/Chrome.cs b/TbsReact/Models/Setting/Chrome.cs index 562c65d93..5b89af3af 100644 --- a/TbsReact/Models/Setting/Chrome.cs +++ b/TbsReact/Models/Setting/Chrome.cs @@ -1,10 +1,10 @@ -namespace TbsReact.Models.Setting +using TbsReact.Models; + +namespace TbsReact.Models.Setting { public class Chrome { public Range Click { get; set; } - public Range WorkTime { get; set; } - public Range SleepTime { get; set; } public bool DisableImages { get; set; } public bool AutoClose { get; set; } } diff --git a/TbsReact/Models/Setting/Hero.cs b/TbsReact/Models/Setting/Hero.cs index 317560ff8..1f2689252 100644 --- a/TbsReact/Models/Setting/Hero.cs +++ b/TbsReact/Models/Setting/Hero.cs @@ -1,4 +1,6 @@ -namespace TbsReact.Models.Setting +using TbsReact.Models; + +namespace TbsReact.Models.Setting { public class Hero { diff --git a/TbsReact/Models/Setting/Utils.cs b/TbsReact/Models/Setting/Utils.cs deleted file mode 100644 index 5d7a743d2..000000000 --- a/TbsReact/Models/Setting/Utils.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace TbsReact.Models.Setting -{ - public class Range - { - public int Min { get; set; } - public int Max { get; set; } - } -} \ No newline at end of file diff --git a/TbsReact/Models/Utils.cs b/TbsReact/Models/Utils.cs new file mode 100644 index 000000000..1b7c349a5 --- /dev/null +++ b/TbsReact/Models/Utils.cs @@ -0,0 +1,14 @@ +namespace TbsReact.Models +{ + public class Range + { + public int Min { get; set; } + public int Max { get; set; } + } + + public class Coordinate + { + public int X { get; set; } + public int Y { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/Village.cs b/TbsReact/Models/Villages/Village.cs new file mode 100644 index 000000000..31518ced1 --- /dev/null +++ b/TbsReact/Models/Villages/Village.cs @@ -0,0 +1,12 @@ +using TbsReact.Models; + +namespace TbsReact.Models.Villages +{ + public class Village + + { + public int Id { get; set; } + public string Name { get; set; } + public Coordinate Coordinate { get; set; } + } +} \ No newline at end of file From 98615ff59bf879e43e2f0f1e793ae2b4bfb81613 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 19 Feb 2022 19:27:59 +0700 Subject: [PATCH 60/69] [TBSReact] Add more UI to Villages/Build --- TbsReact/ClientApp/package-lock.json | 13 +-- TbsReact/ClientApp/package.json | 1 + .../ClientApp/src/components/ContentBox.js | 8 +- .../Views/SettingsView/QuestSettings.js | 3 - .../{SubView => BuildView}/Build.js | 21 +++-- .../VillagesView/BuildView/ButtonBuilding.js | 29 +++++++ .../VillagesView/BuildView/CurrentBuilding.js | 42 ++++++++++ .../BuildView/Modal/ButtonBuildingModal.js | 59 +++++++++++++ .../BuildView/Modal/NormalBuilding.js | 67 +++++++++++++++ .../BuildView/Modal/OptionBuildingModal.js | 61 ++++++++++++++ .../BuildView/Modal/PrerequisiteBuilding.js | 51 ++++++++++++ .../BuildView/Modal/ResourceBuilding.js | 82 +++++++++++++++++++ .../VillagesView/BuildView/OptionBuilding.js | 29 +++++++ .../VillagesView/BuildView/QueueBuilding.js | 32 ++++++++ .../VillagesView/BuildView/VillageBuilding.js | 29 +++++++ .../Views/VillagesView/VillageRows.js | 26 ------ .../components/Views/VillagesView/Villages.js | 6 +- .../Views/VillagesView/VillagesTable.js | 51 ++++-------- .../ClientApp/src/components/ref/MUISelect.js | 3 +- .../ClientApp/src/components/ref/MUITable.js | 63 ++++++++++++++ TbsReact/ClientApp/src/styles/box.js | 3 +- TbsReact/ClientApp/src/styles/modal.js | 11 +++ 22 files changed, 605 insertions(+), 85 deletions(-) rename TbsReact/ClientApp/src/components/Views/VillagesView/{SubView => BuildView}/Build.js (52%) create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/ButtonBuilding.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/CurrentBuilding.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/NormalBuilding.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/OptionBuildingModal.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/PrerequisiteBuilding.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ResourceBuilding.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/OptionBuilding.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js create mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/VillageBuilding.js delete mode 100644 TbsReact/ClientApp/src/components/Views/VillagesView/VillageRows.js create mode 100644 TbsReact/ClientApp/src/components/ref/MUITable.js create mode 100644 TbsReact/ClientApp/src/styles/modal.js diff --git a/TbsReact/ClientApp/package-lock.json b/TbsReact/ClientApp/package-lock.json index 8af827421..a632d0da5 100644 --- a/TbsReact/ClientApp/package-lock.json +++ b/TbsReact/ClientApp/package-lock.json @@ -23,6 +23,7 @@ "http-proxy-middleware": "^0.19.1", "jquery": "^3.5.1", "merge": "^2.1.1", + "nanoid": "^3.3.1", "oidc-client": "^1.11.5", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -14118,9 +14119,9 @@ "integrity": "sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==" }, "node_modules/nanoid": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz", - "integrity": "sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -33035,9 +33036,9 @@ "integrity": "sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==" }, "nanoid": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz", - "integrity": "sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==" }, "nanomatch": { "version": "1.2.13", diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index 55cae55f0..a780960a5 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -18,6 +18,7 @@ "http-proxy-middleware": "^0.19.1", "jquery": "^3.5.1", "merge": "^2.1.1", + "nanoid": "^3.3.1", "oidc-client": "^1.11.5", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/TbsReact/ClientApp/src/components/ContentBox.js b/TbsReact/ClientApp/src/components/ContentBox.js index 3831bc8bb..baa2b4d75 100644 --- a/TbsReact/ClientApp/src/components/ContentBox.js +++ b/TbsReact/ClientApp/src/components/ContentBox.js @@ -2,12 +2,13 @@ import PropTypes from "prop-types"; import React from "react"; import { Box } from "@mui/material"; -import style from "../styles/box"; +import boxStyle from "../styles/box"; +import modalStyle from "../styles/modal"; -const ContentBox = ({ children, name }) => { +const ContentBox = ({ children, name, modal }) => { return ( <> - + {children} {name} @@ -19,6 +20,7 @@ const ContentBox = ({ children, name }) => { ContentBox.propTypes = { children: PropTypes.any, name: PropTypes.string, + modal: PropTypes.bool, }; export default ContentBox; diff --git a/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js b/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js index 50dcc2fa5..85b3c16c3 100644 --- a/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js +++ b/TbsReact/ClientApp/src/components/Views/SettingsView/QuestSettings.js @@ -39,9 +39,6 @@ const QuestSettings = () => { const { beginner, daily, villageId } = data; setValue("beginner", beginner); setValue("daily", daily); - console.log(data); - console.log("beginner: " + beginner); - console.log("daily: " + daily); getVillages(account).then((data) => { setVillages(data); diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Build.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Build.js similarity index 52% rename from TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Build.js rename to TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Build.js index 5a2b963f6..57392c5e3 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/SubView/Build.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Build.js @@ -1,28 +1,35 @@ import React from "react"; import { Grid } from "@mui/material"; import ContentBox from "../../../ContentBox"; +import VillageBuilding from "./VillageBuilding"; +import CurrentBuilding from "./CurrentBuilding"; +import QueueBuilding from "./QueueBuilding"; +import ButtonBuilding from "./ButtonBuilding"; +import OptionBuilding from "./OptionBuilding"; const Build = () => { return ( - + - + + +
+
+ +
- + - - - - +
diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/ButtonBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/ButtonBuilding.js new file mode 100644 index 000000000..c778c3514 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/ButtonBuilding.js @@ -0,0 +1,29 @@ +import { Button, Modal } from "@mui/material"; +import React, { useState } from "react"; + +import ButtonBuildingModal from "./Modal/ButtonBuildingModal"; + +const ButtonBuilding = () => { + const [open, setOpen] = useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + + return ( + <> + + + + + + ); +}; + +export default ButtonBuilding; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/CurrentBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/CurrentBuilding.js new file mode 100644 index 000000000..d64bda794 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/CurrentBuilding.js @@ -0,0 +1,42 @@ +import { Typography } from "@mui/material"; +import React, { useState } from "react"; +import ContentBox from "../../../ContentBox"; +import MUITable from "../../../ref/MUITable"; + +const CurrentBuilding = () => { + const header = ["Building", "Level", "Time"]; + const data = [ + { + id: 0, + building: "Loading ...", + level: 3, + time: "2022/02/02 02:02:02", + }, + { + id: 1, + building: "Loading ...", + level: 2, + time: "2022/02/02 02:02:02", + }, + ]; + const [selected, setSelected] = useState(0); + + const onClick = (vill) => { + setSelected(vill.id); + }; + return ( + <> + + Current Building + + + + ); +}; + +export default CurrentBuilding; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js new file mode 100644 index 000000000..5c203c683 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js @@ -0,0 +1,59 @@ +import React, { useState } from "react"; +import { Tabs, Tab } from "@mui/material"; +import { Link, useRouteMatch, Switch, Route, Redirect } from "react-router-dom"; +import ContentBox from "../../../../ContentBox"; +import NormalBuilding from "./NormalBuilding"; +import PrerequisiteBuilding from "./PrerequisiteBuilding"; +import ResourceBuilding from "./ResourceBuilding"; +const ButtonBuildingModal = () => { + const { path, url } = useRouteMatch(); + const [value, setValue] = useState("/build"); + + const handleChange = (event, newValue) => { + setValue(newValue); + }; + return ( + <> + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + ); +}; + +export default ButtonBuildingModal; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/NormalBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/NormalBuilding.js new file mode 100644 index 000000000..32196958e --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/NormalBuilding.js @@ -0,0 +1,67 @@ +import { Grid, TextField, Button, Typography } from "@mui/material"; +import React from "react"; +import { useForm } from "react-hook-form"; + +import ContentBox from "../../../../ContentBox"; +import MUISelect from "../../../../ref/MUISelect"; + +const NormalBuilding = () => { + const { + register, + control, + handleSubmit, + formState: { errors }, + } = useForm(); + + const onSubmit = (data) => { + console.log(data); + }; + + const buildings = [ + { id: 1, name: "Marketplace" }, + { id: 2, name: "Embassy" }, + ]; + return ( + <> + + Normal Building + + + + + + + + + + + + + + + + ); +}; + +export default NormalBuilding; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/OptionBuildingModal.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/OptionBuildingModal.js new file mode 100644 index 000000000..3d7fb919e --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/OptionBuildingModal.js @@ -0,0 +1,61 @@ +import { Grid, TextField, Button } from "@mui/material"; +import React from "react"; +import { useForm } from "react-hook-form"; + +import ContentBox from "../../../../ContentBox"; +import MUISwitch from "../../../../ref/MUISwitch"; + +const OptionBuildingModal = () => { + const { + register, + control, + handleSubmit, + formState: { errors }, + } = useForm(); + + const onSubmit = (data) => { + console.log(data); + }; + + return ( + <> + +
+ + + + + + + + + + + +
+
+ + ); +}; + +export default OptionBuildingModal; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/PrerequisiteBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/PrerequisiteBuilding.js new file mode 100644 index 000000000..05d059c64 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/PrerequisiteBuilding.js @@ -0,0 +1,51 @@ +import { Grid, Button, Typography } from "@mui/material"; +import React from "react"; +import { useForm } from "react-hook-form"; + +import ContentBox from "../../../../ContentBox"; +import MUISelect from "../../../../ref/MUISelect"; + +const PrerequisiteBuilding = () => { + const { control, handleSubmit } = useForm(); + + const onSubmit = (data) => { + console.log(data); + }; + + const buildings = [ + { id: 1, name: "Marketplace" }, + { id: 2, name: "Embassy" }, + ]; + return ( + <> + + Prerequisite Building +
+ + + + + + + + +
+
+ + ); +}; + +export default PrerequisiteBuilding; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ResourceBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ResourceBuilding.js new file mode 100644 index 000000000..0a7b54c3e --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ResourceBuilding.js @@ -0,0 +1,82 @@ +import { Grid, TextField, Button, Typography } from "@mui/material"; +import React from "react"; +import { useForm } from "react-hook-form"; + +import ContentBox from "../../../../ContentBox"; +import MUISelect from "../../../../ref/MUISelect"; + +const ResourceBuilding = () => { + const { + register, + control, + handleSubmit, + formState: { errors }, + } = useForm(); + + const onSubmit = (data) => { + console.log(data); + }; + + const type = [ + { id: 1, name: "All resource" }, + { id: 2, name: "Exclude crop" }, + { id: 3, name: "Only crop" }, + ]; + const strategy = [ + { id: 1, name: "Based on resource" }, + { id: 2, name: "Based on level" }, + { id: 3, name: "Based on production" }, + ]; + return ( + <> + + Resource auto build +
+ + + + + + + + + + + + + + +
+
+ + ); +}; + +export default ResourceBuilding; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/OptionBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/OptionBuilding.js new file mode 100644 index 000000000..90de6d4ed --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/OptionBuilding.js @@ -0,0 +1,29 @@ +import { Button, Modal } from "@mui/material"; +import React, { useState } from "react"; + +import OptionBuildingModal from "./Modal/OptionBuildingModal"; + +const OptionBuilding = () => { + const [open, setOpen] = useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + + return ( + <> + + + + + + ); +}; + +export default OptionBuilding; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js new file mode 100644 index 000000000..0f486bec2 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js @@ -0,0 +1,32 @@ +import { Typography } from "@mui/material"; +import React, { useState } from "react"; +import ContentBox from "../../../ContentBox"; +import MUITable from "../../../ref/MUITable"; + +const QueueBuilding = () => { + const header = ["Building", "Level", "Location"]; + const data = [ + { id: 0, building: "Loading ...", level: 3, location: 23 }, + { id: 1, building: "Loading ...", level: 2, location: 44 }, + ]; + const [selected, setSelected] = useState(0); + + const onClick = (vill) => { + setSelected(vill.id); + }; + return ( + <> + + Queue Building + + + + ); +}; + +export default QueueBuilding; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/VillageBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/VillageBuilding.js new file mode 100644 index 000000000..c4da5ae49 --- /dev/null +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/VillageBuilding.js @@ -0,0 +1,29 @@ +import { Typography } from "@mui/material"; +import React, { useState } from "react"; +import ContentBox from "../../../ContentBox"; +import MUITable from "../../../ref/MUITable"; + +const VillageBuilding = () => { + const header = ["Building", "Level"]; + const data = [{ id: 0, building: "Loading ...", level: 0 }]; + const [selected, setSelected] = useState(0); + + const onClick = (vill) => { + setSelected(vill.id); + }; + return ( + <> + + Village Building + + + + ); +}; + +export default VillageBuilding; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/VillageRows.js b/TbsReact/ClientApp/src/components/Views/VillagesView/VillageRows.js deleted file mode 100644 index 210db2eec..000000000 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/VillageRows.js +++ /dev/null @@ -1,26 +0,0 @@ -import PropTypes from "prop-types"; -import React from "react"; -import { TableCell, TableRow } from "@mui/material"; - -const VillageRows = ({ villages, handler, selected }) => { - const rows = villages.map((village) => ( - handler(village)} - selected={village.id === selected} - key={village.id} - > - {village.name} - {`${village.coords.x}/${village.coords.y}`} - - )); - return <>{rows}; -}; - -VillageRows.propTypes = { - villages: PropTypes.array.isRequired, - handler: PropTypes.func.isRequired, - selected: PropTypes.number.isRequired, -}; - -export default VillageRows; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js index a23b244a5..a97aac5ea 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js @@ -5,7 +5,7 @@ import { Link, useRouteMatch, Switch, Route, Redirect } from "react-router-dom"; import style from "../../../styles/box"; import VillagesTable from "./VillagesTable"; -import Build from "./SubView/Build"; +import Build from "./BuildView/Build"; import Market from "./SubView/Market"; import Troops from "./SubView/Troops"; import Attack from "./SubView/Attack"; @@ -28,10 +28,10 @@ const Villages = () => { justifyContent="flex-start" alignItems="baseline" > - + - + { const account = useSelector((state) => state.account.info); const village = useSelector((state) => state.village.info); - const [villages, setVillages] = useState([]); - const [selected, setSelected] = useState(village.id); + const [villages, setVillages] = useState([ + { id: 0, name: "Loading ...", coords: { x: 0, y: 0 } }, + ]); + const [selected, setSelected] = useState(village.id || 0); const dispatch = useDispatch(); const onClick = (vill) => { @@ -34,27 +24,18 @@ const VillagesTable = () => { } }, [selected, dispatch, account.id]); + const header = ["Name", "Coords"]; + return ( <> - - - - - - Name - Coords - - - - - -
-
-
+ + + ); }; diff --git a/TbsReact/ClientApp/src/components/ref/MUISelect.js b/TbsReact/ClientApp/src/components/ref/MUISelect.js index 19e918b58..b4ded55ef 100644 --- a/TbsReact/ClientApp/src/components/ref/MUISelect.js +++ b/TbsReact/ClientApp/src/components/ref/MUISelect.js @@ -3,6 +3,7 @@ import { FormControl, InputLabel, MenuItem, Select } from "@mui/material"; import { Controller } from "react-hook-form"; import PropTypes from "prop-types"; +import { nanoid } from "nanoid"; // src for who wonder what is this // https://react-hook-form.com/advanced-usage#ControlledmixedwithUncontrolledComponents @@ -20,7 +21,7 @@ const MUISelect = ({ name, label, control, options, ...props }) => { {options.map((item) => { return ( {item.name} diff --git a/TbsReact/ClientApp/src/components/ref/MUITable.js b/TbsReact/ClientApp/src/components/ref/MUITable.js new file mode 100644 index 000000000..1da4292e3 --- /dev/null +++ b/TbsReact/ClientApp/src/components/ref/MUITable.js @@ -0,0 +1,63 @@ +import PropTypes from "prop-types"; +import { + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableRow, +} from "@mui/material"; +import React from "react"; +import { nanoid } from "nanoid"; + +const MUITable = ({ header, data, handler, selected }) => { + return ( + <> + + + + + {header.map((item, index) => ( + + {item} + + ))} + + + + {data.map((row) => { + const cells = []; + Object.entries(row).forEach((item) => { + if (item[0] === "id") return; + cells.push( + + {JSON.stringify(item[1])} + + ); + }); + return ( + handler(row.id)} + selected={row.id === selected} + key={nanoid(10)} + > + {cells} + + ); + })} + +
+
+ + ); +}; + +MUITable.propTypes = { + data: PropTypes.array.isRequired, + handler: PropTypes.func.isRequired, + header: PropTypes.array.isRequired, + selected: PropTypes.number.isRequired, +}; + +export default MUITable; diff --git a/TbsReact/ClientApp/src/styles/box.js b/TbsReact/ClientApp/src/styles/box.js index 1a82b493f..e6bb79554 100644 --- a/TbsReact/ClientApp/src/styles/box.js +++ b/TbsReact/ClientApp/src/styles/box.js @@ -2,5 +2,6 @@ export default { bgcolor: "background.paper", border: "2px solid #000", boxShadow: 24, - p: 4, + p: 2, + justifyContent: "center", }; diff --git a/TbsReact/ClientApp/src/styles/modal.js b/TbsReact/ClientApp/src/styles/modal.js new file mode 100644 index 000000000..c7e9fef62 --- /dev/null +++ b/TbsReact/ClientApp/src/styles/modal.js @@ -0,0 +1,11 @@ +export default { + bgcolor: "background.paper", + border: "2px solid #000", + boxShadow: 24, + p: 4, + justifyContent: "center", + position: "absolute", + top: "50%", + left: "50%", + transform: "translate(-50%, -50%)", +}; From 6fb65ebe3410c04c506bda2a33f8e796145f7f53 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sat, 19 Feb 2022 23:45:34 +0700 Subject: [PATCH 61/69] [TBSReact] Add API get list for Village/Build Views --- TbsReact/Controllers/BuildController.cs | 86 +++++++++++++++++++++ TbsReact/Extension/VillageExtension.cs | 78 ++++++++++++++++++- TbsReact/Models/Villages/Building.cs | 15 ++++ TbsReact/Models/Villages/CurrentBuilding.cs | 14 ++++ TbsReact/Models/Villages/TaskBuilding.cs | 14 ++++ 5 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 TbsReact/Controllers/BuildController.cs create mode 100644 TbsReact/Models/Villages/Building.cs create mode 100644 TbsReact/Models/Villages/CurrentBuilding.cs create mode 100644 TbsReact/Models/Villages/TaskBuilding.cs diff --git a/TbsReact/Controllers/BuildController.cs b/TbsReact/Controllers/BuildController.cs new file mode 100644 index 000000000..30f5d0168 --- /dev/null +++ b/TbsReact/Controllers/BuildController.cs @@ -0,0 +1,86 @@ +using Microsoft.AspNetCore.Mvc; +using TbsReact.Models.Villages; +using TbsReact.Singleton; +using TbsReact.Extension; +using System.Collections.Generic; +using System.Linq; + +namespace TbsReact.Controllers +{ + [ApiController] + [Route("villages/{indexAcc:int}/build/{indexVill:int}")] + public class BuildController : ControllerBase + { + [HttpGet("buildings")] + public ActionResult> GetBuildings(int indexAcc, int indexVill) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + var buildings = village.Build.Buildings; + var result = new List(); + for (int i = 0; i < buildings.Length; i++) + { + result.Add(buildings[i].GetInfo()); + } + + return result; + } + + [HttpGet("current")] + public ActionResult> GetCurrent(int indexAcc, int indexVill) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + var buildings = village.Build.CurrentlyBuilding; + var result = new List(); + for (int i = 0; i < buildings.Count; i++) + { + result.Add(buildings[i].GetInfo()); + } + + return result; + } + + [HttpGet("queue")] + public ActionResult> GetQueue(int indexAcc, int indexVill) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + var buildings = village.Build.Tasks; + var result = new List(); + for (int i = 0; i < buildings.Count; i++) + { + result.Add(buildings[i].GetInfo()); + } + + return result; + } + } +} \ No newline at end of file diff --git a/TbsReact/Extension/VillageExtension.cs b/TbsReact/Extension/VillageExtension.cs index 5cae07b7d..0a18bbac5 100644 --- a/TbsReact/Extension/VillageExtension.cs +++ b/TbsReact/Extension/VillageExtension.cs @@ -1,4 +1,5 @@ -using TbsReact.Models; +using TbsCore.Tasks; +using TbsReact.Models; using TbsReact.Models.Villages; namespace TbsReact.Extension @@ -18,5 +19,80 @@ public static Village GetInfo(this TbsCore.Models.VillageModels.Village village) }, }; } + + public static Building GetInfo(this TbsCore.Models.VillageModels.Building building) + { + return new Building + { + Name = building.Type.ToString(), + Location = building.Id, + Level = building.Level, + UnderConstruction = building.UnderConstruction, + }; + } + + public static TaskBuilding GetInfo(this TbsCore.Models.BuildingModels.BuildingTask task) + { + string Name; + if (task.TaskType == TbsCore.Helpers.Classificator.BuildingType.AutoUpgradeResFields) + { + Name = AutoBuildResFieldsStr(task); + } + else + { + Name = TbsCore.Helpers.VillageHelper.BuildingTypeToString(task.Building); + } + return new TaskBuilding + { + Name = Name, + Level = task.Level, + Location = task.BuildingId ?? -1, + }; + } + + public static CurrentBuilding GetInfo(this TbsCore.Models.VillageModels.BuildingCurrently building) + { + return new CurrentBuilding + { + Name = building.Building.ToString(), + Level = building.Level, + CompleteTime = building.Duration, + }; + } + + private static string AutoBuildResFieldsStr(TbsCore.Models.BuildingModels.BuildingTask task) + { + var str = ""; + switch (task.ResourceType) + { + case ResTypeEnum.AllResources: + str += "All fields"; + break; + + case ResTypeEnum.ExcludeCrop: + str += "Exclude crop"; + break; + + case ResTypeEnum.OnlyCrop: + str += "Only crop"; + break; + } + str += "-"; + switch (task.BuildingStrategy) + { + case BuildingStrategyEnum.BasedOnLevel: + str += "Based on level"; + break; + + case BuildingStrategyEnum.BasedOnProduction: + str += "Based on production"; + break; + + case BuildingStrategyEnum.BasedOnRes: + str += "Based on storage"; + break; + } + return str; + } } } \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building.cs b/TbsReact/Models/Villages/Building.cs new file mode 100644 index 000000000..882be230a --- /dev/null +++ b/TbsReact/Models/Villages/Building.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models.Villages +{ + public class Building + { + public string Name { get; set; } + public int Level { get; set; } + public int Location { get; set; } + public bool UnderConstruction { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/CurrentBuilding.cs b/TbsReact/Models/Villages/CurrentBuilding.cs new file mode 100644 index 000000000..d8c5ef18c --- /dev/null +++ b/TbsReact/Models/Villages/CurrentBuilding.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models.Villages +{ + public class CurrentBuilding + { + public string Name { get; set; } + public int Level { get; set; } + public DateTime CompleteTime { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/TaskBuilding.cs b/TbsReact/Models/Villages/TaskBuilding.cs new file mode 100644 index 000000000..ca672b513 --- /dev/null +++ b/TbsReact/Models/Villages/TaskBuilding.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models.Villages +{ + public class TaskBuilding + { + public string Name { get; set; } + public int Level { get; set; } + public int Location { get; set; } + } +} \ No newline at end of file From ecb5c4bb37268456797245bf47f6419ebf3c7758 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 20 Feb 2022 14:31:42 +0700 Subject: [PATCH 62/69] [TBSReact] Add draggable table for queue building --- TbsReact/ClientApp/package-lock.json | 59 ++++++++++++ TbsReact/ClientApp/package.json | 2 + .../VillagesView/BuildView/QueueBuilding.js | 35 +++++-- .../src/components/ref/MUIDraggableTable.js | 91 +++++++++++++++++++ 4 files changed, 178 insertions(+), 9 deletions(-) create mode 100644 TbsReact/ClientApp/src/components/ref/MUIDraggableTable.js diff --git a/TbsReact/ClientApp/package-lock.json b/TbsReact/ClientApp/package-lock.json index a632d0da5..62044a089 100644 --- a/TbsReact/ClientApp/package-lock.json +++ b/TbsReact/ClientApp/package-lock.json @@ -18,6 +18,7 @@ "@mui/x-data-grid": "^5.2.0", "@mui/x-data-grid-generator": "^5.2.0", "@reduxjs/toolkit": "^1.7.1", + "array-move": "^4.0.0", "axios": "^0.24.0", "bootstrap": "^5.1.0", "http-proxy-middleware": "^0.19.1", @@ -32,6 +33,7 @@ "react-router-bootstrap": "^0.25.0", "react-router-dom": "^5.2.0", "react-scripts": "^4.0.3", + "react-sortable-hoc": "^2.0.0", "react-table": "^7.7.0", "react-toastify": "^8.1.0", "reactstrap": "^8.9.0", @@ -4420,6 +4422,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-move": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/array-move/-/array-move-4.0.0.tgz", + "integrity": "sha512-+RY54S8OuVvg94THpneQvFRmqWdAHeqtMzgMW6JNurHxe8rsS07cHQdfGkXnTUXiBcyZ0j3SiDIxxj0RPiqCkQ==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -10705,6 +10718,14 @@ "node": ">= 0.4" } }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -17149,6 +17170,21 @@ "node": ">=10" } }, + "node_modules/react-sortable-hoc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/react-sortable-hoc/-/react-sortable-hoc-2.0.0.tgz", + "integrity": "sha512-JZUw7hBsAHXK7PTyErJyI7SopSBFRcFHDjWW5SWjcugY0i6iH7f+eJkY8cJmGMlZ1C9xz1J3Vjz0plFpavVeRg==", + "dependencies": { + "@babel/runtime": "^7.2.0", + "invariant": "^2.2.4", + "prop-types": "^15.5.7" + }, + "peerDependencies": { + "prop-types": "^15.5.7", + "react": "^16.3.0 || ^17.0.0", + "react-dom": "^16.3.0 || ^17.0.0" + } + }, "node_modules/react-table": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/react-table/-/react-table-7.7.0.tgz", @@ -25675,6 +25711,11 @@ "is-string": "^1.0.7" } }, + "array-move": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/array-move/-/array-move-4.0.0.tgz", + "integrity": "sha512-+RY54S8OuVvg94THpneQvFRmqWdAHeqtMzgMW6JNurHxe8rsS07cHQdfGkXnTUXiBcyZ0j3SiDIxxj0RPiqCkQ==" + }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -30489,6 +30530,14 @@ "side-channel": "^1.0.4" } }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -35439,6 +35488,16 @@ } } }, + "react-sortable-hoc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/react-sortable-hoc/-/react-sortable-hoc-2.0.0.tgz", + "integrity": "sha512-JZUw7hBsAHXK7PTyErJyI7SopSBFRcFHDjWW5SWjcugY0i6iH7f+eJkY8cJmGMlZ1C9xz1J3Vjz0plFpavVeRg==", + "requires": { + "@babel/runtime": "^7.2.0", + "invariant": "^2.2.4", + "prop-types": "^15.5.7" + } + }, "react-table": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/react-table/-/react-table-7.7.0.tgz", diff --git a/TbsReact/ClientApp/package.json b/TbsReact/ClientApp/package.json index a780960a5..449c7143c 100644 --- a/TbsReact/ClientApp/package.json +++ b/TbsReact/ClientApp/package.json @@ -13,6 +13,7 @@ "@mui/x-data-grid": "^5.2.0", "@mui/x-data-grid-generator": "^5.2.0", "@reduxjs/toolkit": "^1.7.1", + "array-move": "^4.0.0", "axios": "^0.24.0", "bootstrap": "^5.1.0", "http-proxy-middleware": "^0.19.1", @@ -27,6 +28,7 @@ "react-router-bootstrap": "^0.25.0", "react-router-dom": "^5.2.0", "react-scripts": "^4.0.3", + "react-sortable-hoc": "^2.0.0", "react-table": "^7.7.0", "react-toastify": "^8.1.0", "reactstrap": "^8.9.0", diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js index 0f486bec2..eeddfde53 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js @@ -1,28 +1,45 @@ import { Typography } from "@mui/material"; -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import ContentBox from "../../../ContentBox"; -import MUITable from "../../../ref/MUITable"; +import MUIDraggableTable from "../../../ref/MUIDraggableTable"; +import { arrayMoveImmutable } from "array-move"; const QueueBuilding = () => { const header = ["Building", "Level", "Location"]; const data = [ { id: 0, building: "Loading ...", level: 3, location: 23 }, { id: 1, building: "Loading ...", level: 2, location: 44 }, + { id: 2, building: "Loading ...", level: 1, location: 55 }, + { id: 3, building: "Loading ...", level: 0, location: 66 }, + { id: 4, building: "Loading ...", level: 0, location: 77 }, ]; - const [selected, setSelected] = useState(0); - const onClick = (vill) => { - setSelected(vill.id); + const [items, setItems] = useState(data); + + const onRemove = (index) => { + setItems((items) => items.filter((item) => item.id !== index)); + console.log("remove", index); + }; + + const onSortEnd = ({ oldIndex, newIndex }) => { + setItems(arrayMoveImmutable(items, oldIndex, newIndex)); + console.log("sort", oldIndex, newIndex); }; + + useEffect(() => { + console.log(items); + }, [items]); + return ( <> Queue Building - diff --git a/TbsReact/ClientApp/src/components/ref/MUIDraggableTable.js b/TbsReact/ClientApp/src/components/ref/MUIDraggableTable.js new file mode 100644 index 000000000..66a3a9463 --- /dev/null +++ b/TbsReact/ClientApp/src/components/ref/MUIDraggableTable.js @@ -0,0 +1,91 @@ +import PropTypes from "prop-types"; +import { + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableRow, +} from "@mui/material"; +import { DragHandle, RemoveCircle } from "@mui/icons-material"; + +import { + SortableContainer, + SortableElement, + SortableHandle, +} from "react-sortable-hoc"; + +import React from "react"; +import { nanoid } from "nanoid"; + +const DragHandleIcon = SortableHandle(() => { + return ; +}); +const SortableRow = SortableElement(({ items, onRemove, selected }) => { + const cells = []; + Object.entries(items).forEach((item) => { + if (item[0] === "id") return; + cells.push( + {JSON.stringify(item[1])} + ); + }); + cells.push( + + + + ); + cells.push( + + onRemove(items.id)} /> + + ); + + return ( + + {cells} + + ); +}); + +const MUIDraggableTable = SortableContainer(({ header, data, onRemove }) => { + if (data.length === 0) return
Empty queue
; + return ( + <> + + + + + {header.map((item, index) => ( + + {item} + + ))} + Move + Remove + + + + {data.map((row, index) => { + return ( + + ); + })} + +
+
+ + ); +}); + +MUIDraggableTable.propTypes = { + data: PropTypes.array.isRequired, + onRemove: PropTypes.func.isRequired, + header: PropTypes.array.isRequired, +}; + +export default MUIDraggableTable; From eb3b8c4038a983ea0d0843666f54a070c2ee8ec3 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Sun, 20 Feb 2022 22:13:32 +0700 Subject: [PATCH 63/69] [TBSReact] Add more route API for updating QueueBuilding --- TbsReact/Controllers/BuildController.cs | 193 +++++++++++++++++- TbsReact/Extension/VillageExtension.cs | 10 +- .../Villages/{ => Building}/Building.cs | 3 +- .../{ => Building}/CurrentBuilding.cs | 4 +- .../Models/Villages/Building/RequestChange.cs | 13 ++ .../Models/Villages/Building/RequestDelete.cs | 12 ++ .../Models/Villages/Building/RequestNormal.cs | 15 ++ .../Villages/Building/RequestPrerequisites.cs | 12 ++ .../Villages/Building/RequestResource.cs | 14 ++ .../Villages/{ => Building}/TaskBuilding.cs | 3 +- 10 files changed, 269 insertions(+), 10 deletions(-) rename TbsReact/Models/Villages/{ => Building}/Building.cs (79%) rename TbsReact/Models/Villages/{ => Building}/CurrentBuilding.cs (76%) create mode 100644 TbsReact/Models/Villages/Building/RequestChange.cs create mode 100644 TbsReact/Models/Villages/Building/RequestDelete.cs create mode 100644 TbsReact/Models/Villages/Building/RequestNormal.cs create mode 100644 TbsReact/Models/Villages/Building/RequestPrerequisites.cs create mode 100644 TbsReact/Models/Villages/Building/RequestResource.cs rename TbsReact/Models/Villages/{ => Building}/TaskBuilding.cs (76%) diff --git a/TbsReact/Controllers/BuildController.cs b/TbsReact/Controllers/BuildController.cs index 30f5d0168..7093a921b 100644 --- a/TbsReact/Controllers/BuildController.cs +++ b/TbsReact/Controllers/BuildController.cs @@ -1,9 +1,14 @@ using Microsoft.AspNetCore.Mvc; -using TbsReact.Models.Villages; +using TbsReact.Models.Villages.Building; using TbsReact.Singleton; using TbsReact.Extension; using System.Collections.Generic; using System.Linq; +using TbsCore.Models.BuildingModels; +using static TbsCore.Helpers.Classificator; +using System; +using TbsCore.Helpers; +using TbsCore.Tasks; namespace TbsReact.Controllers { @@ -29,7 +34,7 @@ public ActionResult> GetBuildings(int indexAcc, int indexVill) var result = new List(); for (int i = 0; i < buildings.Length; i++) { - result.Add(buildings[i].GetInfo()); + result.Add(buildings[i].GetInfo(i)); } return result; @@ -53,7 +58,7 @@ public ActionResult> GetCurrent(int indexAcc, int indexVil var result = new List(); for (int i = 0; i < buildings.Count; i++) { - result.Add(buildings[i].GetInfo()); + result.Add(buildings[i].GetInfo(i)); } return result; @@ -77,10 +82,190 @@ public ActionResult> GetQueue(int indexAcc, int indexVill) var result = new List(); for (int i = 0; i < buildings.Count; i++) { - result.Add(buildings[i].GetInfo()); + result.Add(buildings[i].GetInfo(i)); } return result; } + + [HttpPost("queue/normal")] + public ActionResult> AddNormal(int indexAcc, int indexVill, [FromBody] RequestNormal request) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + var buildings = village.Build.Tasks; + + var task = new BuildingTask + { + TaskType = BuildingType.General, + Level = request.Level, + BuildingId = (byte)request.Location, + }; + + // Building already planned on this ID + var plannedBuilding = buildings.FirstOrDefault(x => x.BuildingId == task.BuildingId); + var selectedBuilding = village.Build.Buildings.FirstOrDefault(x => x.Id == task.BuildingId); + + //Create building task, construct new building + if (selectedBuilding.Type == BuildingEnum.Site) + { + if (plannedBuilding == null) // No building has been planned on this ID + { + _ = Enum.TryParse(request.Building.ToString(), out BuildingEnum building); + task.Building = building; + task.ConstructNew = true; + } + else // Building was already planned + { + task.Building = plannedBuilding.Building; + } + } + else //upgrade existing building + { + task.Building = selectedBuilding.Type; + } + + BuildingHelper.AddBuildingTask(acc, village, task); + + var result = new List(); + for (int i = 0; i < buildings.Count; i++) + { + result.Add(buildings[i].GetInfo(i)); + } + return Ok(result); + } + + [HttpPost("queue/resource")] + public ActionResult> AddResource(int indexAcc, int indexVill, [FromBody] RequestResource request) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + var buildings = village.Build.Tasks; + + var task = new BuildingTask + { + TaskType = BuildingType.AutoUpgradeResFields, + Level = request.Level, + ResourceType = (ResTypeEnum)request.Type, + BuildingStrategy = (BuildingStrategyEnum)request.Strategy + }; + BuildingHelper.AddBuildingTask(acc, village, task); + + var result = new List(); + for (int i = 0; i < buildings.Count; i++) + { + result.Add(buildings[i].GetInfo(i)); + } + return Ok(result); + } + + [HttpPost("queue/prerequisites")] + public ActionResult> AddPrerequisites(int indexAcc, int indexVill, [FromBody] RequestPrerequisites request) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + var buildings = village.Build.Tasks; + _ = Enum.TryParse(request.Building, out BuildingEnum building); + BuildingHelper.AddBuildingPrerequisites(acc, village, building); + + BuildingHelper.AddBuildingTask(acc, village, new BuildingTask() + { + Building = building, + Level = 1, + TaskType = BuildingType.General + }); + + var result = new List(); + for (int i = 0; i < buildings.Count; i++) + { + result.Add(buildings[i].GetInfo(i)); + } + return Ok(result); + } + + [HttpPatch("queue")] + public ActionResult> UpdatePosition(int indexAcc, int indexVill, [FromBody] RequestChange request) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + var buildings = village.Build.Tasks; + + Swap(buildings, request.IndexNew, request.IndexOld); + + var result = new List(); + for (int i = 0; i < buildings.Count; i++) + { + result.Add(buildings[i].GetInfo(i)); + } + return Ok(result); + } + + [HttpDelete("queue/{position:int}")] + public ActionResult> DeletePosition(int indexAcc, int indexVill, int position) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + var buildings = village.Build.Tasks; + buildings.RemoveAt(position); + + var result = new List(); + for (int i = 0; i < buildings.Count; i++) + { + result.Add(buildings[i].GetInfo(i)); + } + return Ok(result); + } + + private static void Swap(List list, int indexA, int indexB) + { + BuildingTask tmp = list[indexA]; + list[indexA] = list[indexB]; + list[indexB] = tmp; + } } } \ No newline at end of file diff --git a/TbsReact/Extension/VillageExtension.cs b/TbsReact/Extension/VillageExtension.cs index 0a18bbac5..3305f168b 100644 --- a/TbsReact/Extension/VillageExtension.cs +++ b/TbsReact/Extension/VillageExtension.cs @@ -1,6 +1,7 @@ using TbsCore.Tasks; using TbsReact.Models; using TbsReact.Models.Villages; +using TbsReact.Models.Villages.Building; namespace TbsReact.Extension { @@ -20,10 +21,11 @@ public static Village GetInfo(this TbsCore.Models.VillageModels.Village village) }; } - public static Building GetInfo(this TbsCore.Models.VillageModels.Building building) + public static Building GetInfo(this TbsCore.Models.VillageModels.Building building, int index) { return new Building { + Index = index, Name = building.Type.ToString(), Location = building.Id, Level = building.Level, @@ -31,7 +33,7 @@ public static Building GetInfo(this TbsCore.Models.VillageModels.Building buildi }; } - public static TaskBuilding GetInfo(this TbsCore.Models.BuildingModels.BuildingTask task) + public static TaskBuilding GetInfo(this TbsCore.Models.BuildingModels.BuildingTask task, int index) { string Name; if (task.TaskType == TbsCore.Helpers.Classificator.BuildingType.AutoUpgradeResFields) @@ -44,16 +46,18 @@ public static TaskBuilding GetInfo(this TbsCore.Models.BuildingModels.BuildingTa } return new TaskBuilding { + Index = index, Name = Name, Level = task.Level, Location = task.BuildingId ?? -1, }; } - public static CurrentBuilding GetInfo(this TbsCore.Models.VillageModels.BuildingCurrently building) + public static CurrentBuilding GetInfo(this TbsCore.Models.VillageModels.BuildingCurrently building, int index) { return new CurrentBuilding { + Index = index, Name = building.Building.ToString(), Level = building.Level, CompleteTime = building.Duration, diff --git a/TbsReact/Models/Villages/Building.cs b/TbsReact/Models/Villages/Building/Building.cs similarity index 79% rename from TbsReact/Models/Villages/Building.cs rename to TbsReact/Models/Villages/Building/Building.cs index 882be230a..82fabdede 100644 --- a/TbsReact/Models/Villages/Building.cs +++ b/TbsReact/Models/Villages/Building/Building.cs @@ -3,10 +3,11 @@ using System.Linq; using System.Threading.Tasks; -namespace TbsReact.Models.Villages +namespace TbsReact.Models.Villages.Building { public class Building { + public int Index { get; set; } public string Name { get; set; } public int Level { get; set; } public int Location { get; set; } diff --git a/TbsReact/Models/Villages/CurrentBuilding.cs b/TbsReact/Models/Villages/Building/CurrentBuilding.cs similarity index 76% rename from TbsReact/Models/Villages/CurrentBuilding.cs rename to TbsReact/Models/Villages/Building/CurrentBuilding.cs index d8c5ef18c..ae7cdd337 100644 --- a/TbsReact/Models/Villages/CurrentBuilding.cs +++ b/TbsReact/Models/Villages/Building/CurrentBuilding.cs @@ -3,10 +3,12 @@ using System.Linq; using System.Threading.Tasks; -namespace TbsReact.Models.Villages +namespace TbsReact.Models.Villages.Building { public class CurrentBuilding { + public int Index { get; set; } + public string Name { get; set; } public int Level { get; set; } public DateTime CompleteTime { get; set; } diff --git a/TbsReact/Models/Villages/Building/RequestChange.cs b/TbsReact/Models/Villages/Building/RequestChange.cs new file mode 100644 index 000000000..86cc39e9b --- /dev/null +++ b/TbsReact/Models/Villages/Building/RequestChange.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models.Villages.Building +{ + public class RequestChange + { + public int IndexOld { get; set; } + public int IndexNew { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/RequestDelete.cs b/TbsReact/Models/Villages/Building/RequestDelete.cs new file mode 100644 index 000000000..645da7784 --- /dev/null +++ b/TbsReact/Models/Villages/Building/RequestDelete.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models.Villages.Building +{ + public class RequestDelete + { + public int Index { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/RequestNormal.cs b/TbsReact/Models/Villages/Building/RequestNormal.cs new file mode 100644 index 000000000..6be9674ff --- /dev/null +++ b/TbsReact/Models/Villages/Building/RequestNormal.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models.Villages.Building +{ + public class RequestNormal + { + public string Building { get; set; } + public int Level { get; set; } + + public int Location { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/RequestPrerequisites.cs b/TbsReact/Models/Villages/Building/RequestPrerequisites.cs new file mode 100644 index 000000000..cb2be610a --- /dev/null +++ b/TbsReact/Models/Villages/Building/RequestPrerequisites.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models.Villages.Building +{ + public class RequestPrerequisites + { + public string Building { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/RequestResource.cs b/TbsReact/Models/Villages/Building/RequestResource.cs new file mode 100644 index 000000000..5d1c0e4f5 --- /dev/null +++ b/TbsReact/Models/Villages/Building/RequestResource.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models.Villages.Building +{ + public class RequestResource + { + public int Level { get; set; } + public int Type { get; set; } + public int Strategy { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/TaskBuilding.cs b/TbsReact/Models/Villages/Building/TaskBuilding.cs similarity index 76% rename from TbsReact/Models/Villages/TaskBuilding.cs rename to TbsReact/Models/Villages/Building/TaskBuilding.cs index ca672b513..993af83ef 100644 --- a/TbsReact/Models/Villages/TaskBuilding.cs +++ b/TbsReact/Models/Villages/Building/TaskBuilding.cs @@ -3,10 +3,11 @@ using System.Linq; using System.Threading.Tasks; -namespace TbsReact.Models.Villages +namespace TbsReact.Models.Villages.Building { public class TaskBuilding { + public int Index { get; set; } public string Name { get; set; } public int Level { get; set; } public int Location { get; set; } From 9fad0d7a8c6b9ee407305f360ecc4842805bdd03 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Wed, 23 Feb 2022 23:24:07 +0700 Subject: [PATCH 64/69] [TBSReact] Connect Backend & Frontend Villages/Build Views --- TbsReact/ClientApp/src/api/Building.js | 91 ++++++++++ TbsReact/ClientApp/src/api/api.js | 15 ++ .../ClientApp/src/components/ContentBox.js | 6 +- .../Views/VillagesView/BuildView/Build.js | 55 +++--- .../VillagesView/BuildView/ButtonBuilding.js | 7 +- .../VillagesView/BuildView/CurrentBuilding.js | 33 +++- .../BuildView/Modal/ButtonBuildingModal.js | 78 ++++---- .../BuildView/Modal/NormalBuilding.js | 50 +++++- .../BuildView/Modal/OptionBuildingModal.js | 67 ++++--- .../BuildView/Modal/PrerequisiteBuilding.js | 43 ++++- .../BuildView/Modal/ResourceBuilding.js | 33 +++- .../VillagesView/BuildView/OptionBuilding.js | 7 +- .../VillagesView/BuildView/QueueBuilding.js | 23 ++- .../VillagesView/BuildView/VillageBuilding.js | 39 +++- .../components/Views/VillagesView/Villages.js | 170 +++++++++--------- .../Views/VillagesView/VillagesTable.js | 29 ++- .../src/components/ref/MUIDraggableTable.js | 6 +- .../ClientApp/src/components/ref/MUITable.js | 12 +- TbsReact/ClientApp/src/hooks/useVillage.js | 15 ++ TbsReact/Controllers/BuildController.cs | 100 +++++++++++ TbsReact/Extension/VillageExtension.cs | 6 +- TbsReact/Models/Entity.cs | 13 ++ TbsReact/Models/Villages/Building/Building.cs | 4 +- .../Villages/Building/CurrentBuilding.cs | 2 +- .../Models/Villages/Building/NormalBuild.cs | 10 ++ .../Models/Villages/Building/RequestDelete.cs | 12 -- .../Models/Villages/Building/RequestNormal.cs | 1 - .../Models/Villages/Building/TaskBuilding.cs | 2 +- 28 files changed, 661 insertions(+), 268 deletions(-) create mode 100644 TbsReact/ClientApp/src/api/Building.js create mode 100644 TbsReact/ClientApp/src/hooks/useVillage.js create mode 100644 TbsReact/Models/Entity.cs create mode 100644 TbsReact/Models/Villages/Building/NormalBuild.cs delete mode 100644 TbsReact/Models/Villages/Building/RequestDelete.cs diff --git a/TbsReact/ClientApp/src/api/Building.js b/TbsReact/ClientApp/src/api/Building.js new file mode 100644 index 000000000..7ad4e34fa --- /dev/null +++ b/TbsReact/ClientApp/src/api/Building.js @@ -0,0 +1,91 @@ +import axios from "axios"; + +const getBuildingList = async (accountIndex, villageIndex) => { + try { + const { data } = await axios.get( + `/villages/${accountIndex}/build/${villageIndex}/buildings` + ); + return data; + } catch (e) { + console.log(e); + } +}; + +const getCurrentList = async (accountIndex, villageIndex) => { + try { + const { data } = await axios.get( + `/villages/${accountIndex}/build/${villageIndex}/current` + ); + return data; + } catch (e) { + console.log(e); + } +}; + +const getQueueList = async (accountIndex, villageIndex) => { + try { + const { data } = await axios.get( + `/villages/${accountIndex}/build/${villageIndex}/queue` + ); + return data; + } catch (e) { + console.log(e); + } +}; + +const addToQueue = async (accountIndex, villageIndex, type, building) => { + try { + const { data } = await axios.post( + `/villages/${accountIndex}/build/${villageIndex}/queue/${type}`, + building + ); + return data; + } catch (e) { + console.log(e); + } +}; + +const editQueue = async (accountIndex, villageIndex, position) => { + try { + const { data } = await axios.patch( + `/villages/${accountIndex}/build/${villageIndex}/queue/`, + position + ); + return data; + } catch (e) { + console.log(e); + } +}; + +const deleteQueue = async (accountIndex, villageIndex, position) => { + try { + const { data } = await axios.delete( + `/villages/${accountIndex}/build/${villageIndex}/queue/${position}` + ); + return data; + } catch (e) { + console.log(e); + } +}; + +const getBuilds = async (accountIndex, villageIndex, type, position) => { + try { + const { data } = await axios.get( + `/villages/${accountIndex}/build/${villageIndex}/buildings/${type}/${ + position ?? "" + }` + ); + return data; + } catch (e) { + console.log(e); + } +}; +export { + getBuildingList, + getCurrentList, + getQueueList, + addToQueue, + editQueue, + deleteQueue, + getBuilds, +}; diff --git a/TbsReact/ClientApp/src/api/api.js b/TbsReact/ClientApp/src/api/api.js index 5803c395d..75408c8d1 100644 --- a/TbsReact/ClientApp/src/api/api.js +++ b/TbsReact/ClientApp/src/api/api.js @@ -5,6 +5,11 @@ export const DISCORD_WEBHOOK_SETTING = "discordwebhook"; export const HERO_SETTING = "hero"; export const QUEST_SETTING = "quest"; +/** / **/ +export const NORMAL = "normal"; +export const RESOURCE = "resource"; +export const PREREQUISITE = "prerequisites"; + export { getVillages } from "./Village"; export { getLogData, getTaskList } from "./Debug"; export { checkUrlDiscordWebhook } from "./Discord"; @@ -19,3 +24,13 @@ export { } from "./Accounts/Account"; export { getAccesses } from "./Accounts/Access"; export { login, logout, getStatus } from "./Accounts/Driver"; + +export { + getBuildingList, + getCurrentList, + getQueueList, + addToQueue, + editQueue, + deleteQueue, + getBuilds, +} from "./Building"; diff --git a/TbsReact/ClientApp/src/components/ContentBox.js b/TbsReact/ClientApp/src/components/ContentBox.js index baa2b4d75..15a1c6126 100644 --- a/TbsReact/ClientApp/src/components/ContentBox.js +++ b/TbsReact/ClientApp/src/components/ContentBox.js @@ -3,12 +3,11 @@ import React from "react"; import { Box } from "@mui/material"; import boxStyle from "../styles/box"; -import modalStyle from "../styles/modal"; -const ContentBox = ({ children, name, modal }) => { +const ContentBox = ({ children, name }) => { return ( <> - + {children} {name} @@ -20,7 +19,6 @@ const ContentBox = ({ children, name, modal }) => { ContentBox.propTypes = { children: PropTypes.any, name: PropTypes.string, - modal: PropTypes.bool, }; export default ContentBox; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Build.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Build.js index 57392c5e3..673120b4a 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Build.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Build.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState, createContext } from "react"; import { Grid } from "@mui/material"; import ContentBox from "../../../ContentBox"; import VillageBuilding from "./VillageBuilding"; @@ -7,35 +7,44 @@ import QueueBuilding from "./QueueBuilding"; import ButtonBuilding from "./ButtonBuilding"; import OptionBuilding from "./OptionBuilding"; +const BuildingContext = createContext(); + const Build = () => { + const [selected, setSelected] = useState(-1); + const buildingValue = [selected, setSelected]; return ( - - - - - - - - - - -
-
- -
-
- - - + + + + + + + + + + +
+ +
+
+ +
+
+
+ + + - - + + +
-
-
+
+ ); }; +export { BuildingContext }; export default Build; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/ButtonBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/ButtonBuilding.js index c778c3514..107b25ef8 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/ButtonBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/ButtonBuilding.js @@ -1,7 +1,8 @@ -import { Button, Modal } from "@mui/material"; +import { Button, Modal, Box } from "@mui/material"; import React, { useState } from "react"; import ButtonBuildingModal from "./Modal/ButtonBuildingModal"; +import modalStyle from "../../../../styles/modal"; const ButtonBuilding = () => { const [open, setOpen] = useState(false); @@ -20,7 +21,9 @@ const ButtonBuilding = () => { Add building - + + + ); diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/CurrentBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/CurrentBuilding.js index d64bda794..3d06f288b 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/CurrentBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/CurrentBuilding.js @@ -1,8 +1,10 @@ import { Typography } from "@mui/material"; -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import ContentBox from "../../../ContentBox"; import MUITable from "../../../ref/MUITable"; - +import { useSelector } from "react-redux"; +import { useVillage } from "../../../../hooks/useVillage"; +import { getCurrentList } from "../../../../api/api"; const CurrentBuilding = () => { const header = ["Building", "Level", "Time"]; const data = [ @@ -19,10 +21,27 @@ const CurrentBuilding = () => { time: "2022/02/02 02:02:02", }, ]; - const [selected, setSelected] = useState(0); - const onClick = (vill) => { - setSelected(vill.id); + const [items, setItems] = useState(data); + const [selected, setSelected] = useState(0); + const account = useSelector((state) => state.account.info); + const [villageId] = useVillage(); + useEffect(() => { + if (account.id !== -1 && villageId !== -1) { + getCurrentList(account.id, villageId).then((data) => { + data.forEach((item) => { + item.completeTime = new Date( + item.completeTime + ).toLocaleString("vi-VN"); + // i will leave this here until EriK or me (VINAGHOST) make an option for this like Travian do + // now it will show "hh:mm:ss dd/mm/yyyy" + }); + setItems(data); + }); + } + }, [account.id, villageId]); + const onClick = (selected) => { + setSelected(selected); }; return ( <> @@ -30,9 +49,9 @@ const CurrentBuilding = () => { Current Building
diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js index 5c203c683..978b754b7 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js @@ -1,57 +1,55 @@ import React, { useState } from "react"; import { Tabs, Tab } from "@mui/material"; import { Link, useRouteMatch, Switch, Route, Redirect } from "react-router-dom"; -import ContentBox from "../../../../ContentBox"; import NormalBuilding from "./NormalBuilding"; import PrerequisiteBuilding from "./PrerequisiteBuilding"; import ResourceBuilding from "./ResourceBuilding"; + const ButtonBuildingModal = () => { const { path, url } = useRouteMatch(); - const [value, setValue] = useState("/build"); + const [value, setValue] = useState("/normal"); const handleChange = (event, newValue) => { setValue(newValue); }; return ( <> - - - - - - -
- - - - - - - - - - - - - - -
-
+ + + + + +
+ + + + + + + + + + + + + + +
); }; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/NormalBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/NormalBuilding.js index 32196958e..6ffc827bf 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/NormalBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/NormalBuilding.js @@ -1,30 +1,62 @@ import { Grid, TextField, Button, Typography } from "@mui/material"; -import React from "react"; +import React, { useState, useEffect, useContext } from "react"; import { useForm } from "react-hook-form"; +import { useSelector } from "react-redux"; import ContentBox from "../../../../ContentBox"; import MUISelect from "../../../../ref/MUISelect"; +import { getBuilds, addToQueue, NORMAL } from "../../../../../api/api"; +import { useVillage } from "../../../../../hooks/useVillage"; + +import { BuildingContext } from "../Build"; + const NormalBuilding = () => { const { register, control, handleSubmit, formState: { errors }, + setValue, } = useForm(); + const account = useSelector((state) => state.account.info); + const [buildingId] = useContext(BuildingContext); + const [villageId] = useVillage(); - const onSubmit = (data) => { - console.log(data); - }; + const [builds, setBuilds] = useState([ + { id: 1, name: "Loading ..." }, + { id: 2, name: "Loading ..." }, + { id: 3, name: "Loading ..." }, + ]); - const buildings = [ - { id: 1, name: "Marketplace" }, - { id: 2, name: "Embassy" }, - ]; + useEffect(() => { + if (account.id !== -1 && villageId !== -1 && buildingId !== -1) { + getBuilds(account.id, villageId, NORMAL, buildingId).then( + (data) => { + const { buildList, level } = data; + setBuilds(buildList); + setValue("level", level); + if (buildList.length > 0) { + setValue("building", buildList[0].id); + } + } + ); + } + }, [account.id, villageId, buildingId, setValue]); + const onSubmit = async (data) => { + const request = { + building: builds[data.building].name, + level: data.level, + location: buildingId + 1, + }; + await addToQueue(account.id, villageId, NORMAL, request); + }; return ( <> Normal Building +
+
@@ -32,7 +64,7 @@ const NormalBuilding = () => { label="Building" name="building" control={control} - options={buildings} + options={builds} fullWidth /> diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/OptionBuildingModal.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/OptionBuildingModal.js index 3d7fb919e..d06e84990 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/OptionBuildingModal.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/OptionBuildingModal.js @@ -2,7 +2,6 @@ import { Grid, TextField, Button } from "@mui/material"; import React from "react"; import { useForm } from "react-hook-form"; -import ContentBox from "../../../../ContentBox"; import MUISwitch from "../../../../ref/MUISwitch"; const OptionBuildingModal = () => { @@ -19,41 +18,39 @@ const OptionBuildingModal = () => { return ( <> - - - - - - - - - - - - + + + + - - + + + + + + +
+ ); }; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/PrerequisiteBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/PrerequisiteBuilding.js index 05d059c64..e835aeef6 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/PrerequisiteBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/PrerequisiteBuilding.js @@ -1,25 +1,50 @@ import { Grid, Button, Typography } from "@mui/material"; -import React from "react"; +import React, { useState, useEffect, useContext } from "react"; import { useForm } from "react-hook-form"; +import { useSelector } from "react-redux"; import ContentBox from "../../../../ContentBox"; import MUISelect from "../../../../ref/MUISelect"; +import { getBuilds, addToQueue, PREREQUISITE } from "../../../../../api/api"; +import { useVillage } from "../../../../../hooks/useVillage"; + +import { BuildingContext } from "../Build"; const PrerequisiteBuilding = () => { - const { control, handleSubmit } = useForm(); + const { control, handleSubmit, setValue } = useForm(); + + const account = useSelector((state) => state.account.info); + const [buildingId] = useContext(BuildingContext); + const [villageId] = useVillage(); - const onSubmit = (data) => { - console.log(data); + const [builds, setBuilds] = useState([ + { id: 1, name: "Loading ..." }, + { id: 2, name: "Loading ..." }, + { id: 3, name: "Loading ..." }, + ]); + useEffect(() => { + if (account.id !== -1 && villageId !== -1) { + getBuilds(account.id, villageId, PREREQUISITE).then((data) => { + setBuilds(data); + if (data.length > 0) { + setValue("building", data[0].id); + } + }); + } + }, [account.id, villageId, buildingId, setValue]); + + const onSubmit = async (data) => { + await addToQueue(account.id, villageId, PREREQUISITE, { + building: builds[data.building].name, + }); }; - const buildings = [ - { id: 1, name: "Marketplace" }, - { id: 2, name: "Embassy" }, - ]; return ( <> Prerequisite Building +
+
@@ -27,7 +52,7 @@ const PrerequisiteBuilding = () => { label="Building" name="building" control={control} - options={buildings} + options={builds} fullWidth /> diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ResourceBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ResourceBuilding.js index 0a7b54c3e..540af3b11 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ResourceBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ResourceBuilding.js @@ -1,36 +1,51 @@ import { Grid, TextField, Button, Typography } from "@mui/material"; import React from "react"; import { useForm } from "react-hook-form"; +import { useSelector } from "react-redux"; import ContentBox from "../../../../ContentBox"; import MUISelect from "../../../../ref/MUISelect"; +import { addToQueue, RESOURCE } from "../../../../../api/api"; +import { useVillage } from "../../../../../hooks/useVillage"; + const ResourceBuilding = () => { const { register, control, handleSubmit, formState: { errors }, - } = useForm(); + } = useForm({ + defaultValues: { + type: 0, + strategy: 0, + level: 1, + }, + }); + + const account = useSelector((state) => state.account.info); + const [villageId] = useVillage(); - const onSubmit = (data) => { - console.log(data); + const onSubmit = async (data) => { + await addToQueue(account.id, villageId, RESOURCE, data); }; const type = [ - { id: 1, name: "All resource" }, - { id: 2, name: "Exclude crop" }, - { id: 3, name: "Only crop" }, + { id: 0, name: "All resource" }, + { id: 1, name: "Exclude crop" }, + { id: 2, name: "Only crop" }, ]; const strategy = [ - { id: 1, name: "Based on resource" }, - { id: 2, name: "Based on level" }, - { id: 3, name: "Based on production" }, + { id: 0, name: "Based on resource" }, + { id: 1, name: "Based on level" }, + { id: 2, name: "Based on production" }, ]; + return ( <> Resource auto build +
diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/OptionBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/OptionBuilding.js index 90de6d4ed..218d434e8 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/OptionBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/OptionBuilding.js @@ -1,7 +1,8 @@ -import { Button, Modal } from "@mui/material"; +import { Button, Modal, Box } from "@mui/material"; import React, { useState } from "react"; import OptionBuildingModal from "./Modal/OptionBuildingModal"; +import modalStyle from "../../../../styles/modal"; const OptionBuilding = () => { const [open, setOpen] = useState(false); @@ -20,7 +21,9 @@ const OptionBuilding = () => { Option - + + + ); diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js index eeddfde53..86272dc5c 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/QueueBuilding.js @@ -3,6 +3,9 @@ import React, { useState, useEffect } from "react"; import ContentBox from "../../../ContentBox"; import MUIDraggableTable from "../../../ref/MUIDraggableTable"; import { arrayMoveImmutable } from "array-move"; +import { useSelector } from "react-redux"; +import { useVillage } from "../../../../hooks/useVillage"; +import { getQueueList, editQueue, deleteQueue } from "../../../../api/api"; const QueueBuilding = () => { const header = ["Building", "Level", "Location"]; @@ -15,21 +18,29 @@ const QueueBuilding = () => { ]; const [items, setItems] = useState(data); + const account = useSelector((state) => state.account.info); + const [villageId] = useVillage(); + useEffect(() => { + if (account.id !== -1 && villageId !== -1) { + getQueueList(account.id, villageId).then((data) => { + setItems(data); + }); + } + }, [account.id, villageId]); const onRemove = (index) => { setItems((items) => items.filter((item) => item.id !== index)); - console.log("remove", index); + deleteQueue(account.id, villageId, index); }; const onSortEnd = ({ oldIndex, newIndex }) => { setItems(arrayMoveImmutable(items, oldIndex, newIndex)); - console.log("sort", oldIndex, newIndex); + editQueue(account.id, villageId, { + indexOld: oldIndex, + indexNew: newIndex, + }); }; - useEffect(() => { - console.log(items); - }, [items]); - return ( <> diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/VillageBuilding.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/VillageBuilding.js index c4da5ae49..68321b91a 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/VillageBuilding.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/VillageBuilding.js @@ -1,15 +1,38 @@ import { Typography } from "@mui/material"; -import React, { useState } from "react"; +import React, { useState, useEffect, useContext } from "react"; import ContentBox from "../../../ContentBox"; import MUITable from "../../../ref/MUITable"; +import { useSelector } from "react-redux"; +import { useVillage } from "../../../../hooks/useVillage"; +import { getBuildingList } from "../../../../api/api"; +import { BuildingContext } from "./Build"; const VillageBuilding = () => { - const header = ["Building", "Level"]; - const data = [{ id: 0, building: "Loading ...", level: 0 }]; - const [selected, setSelected] = useState(0); + const header = ["Location", "Building", "Level"]; - const onClick = (vill) => { - setSelected(vill.id); + const account = useSelector((state) => state.account.info); + const [villageId] = useVillage(); + const [buildingId, setBuildingId] = useContext(BuildingContext); + const [data, setData] = useState([ + { id: 0, name: "Loading ...", level: 0 }, + { id: 1, name: "Loading ...", level: 0 }, + { id: 2, name: "Loading ...", level: 0 }, + { id: 3, name: "Loading ...", level: 0 }, + { id: 4, name: "Loading ...", level: 0 }, + ]); + useEffect(() => { + if (account.id !== -1 && villageId !== -1) { + getBuildingList(account.id, villageId).then((data) => { + const newData = data.map( + ({ underConstruction, ...keepAttrs }) => keepAttrs + ); + setData(newData); + }); + } + }, [account.id, villageId]); + + const onClick = (buildingId) => { + setBuildingId(buildingId); }; return ( <> @@ -18,8 +41,8 @@ const VillageBuilding = () => { diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js index a97aac5ea..83206155f 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js @@ -12,97 +12,105 @@ import Attack from "./SubView/Attack"; import Farming from "./SubView/Farming"; import Info from "./SubView/Info"; +import { VillageContext } from "../../../hooks/useVillage"; + const Villages = () => { const { path, url } = useRouteMatch(); const [value, setValue] = useState("/build"); + const [village, setVillage] = useState(-1); + const contextValue = [village, setVillage]; + const handleChange = (event, newValue) => { setValue(newValue); }; + return ( <> - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
-
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+
-
+ ); }; diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js b/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js index 40a107883..3eaa46b5c 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/VillagesTable.js @@ -5,24 +5,39 @@ import { useDispatch, useSelector } from "react-redux"; import MUITable from "../../ref/MUITable"; import ContentBox from "../../ContentBox"; +import { useVillage } from "../../../hooks/useVillage"; + const VillagesTable = () => { const account = useSelector((state) => state.account.info); - const village = useSelector((state) => state.village.info); const [villages, setVillages] = useState([ { id: 0, name: "Loading ...", coords: { x: 0, y: 0 } }, + { id: 1, name: "Loading ...", coords: { x: 0, y: 0 } }, + { id: 2, name: "Loading ...", coords: { x: 0, y: 0 } }, + { id: 3, name: "Loading ...", coords: { x: 0, y: 0 } }, + { id: 4, name: "Loading ...", coords: { x: 0, y: 0 } }, ]); - const [selected, setSelected] = useState(village.id || 0); + + const [selected, setSelected] = useVillage(); + const dispatch = useDispatch(); - const onClick = (vill) => { - setSelected(vill.id); + const onClick = (villageId) => { + setSelected(villageId); }; useEffect(() => { if (account.id !== -1) { - getVillages(account.id).then((data) => setVillages(data)); + getVillages(account.id).then((data) => { + if (data.length > 0) { + data.forEach((item) => { + item.coordinate = `(${item.coordinate.x} | ${item.coordinate.y})`; + }); + setVillages(data); + setSelected(data[0].id); + } + }); } - }, [selected, dispatch, account.id]); + }, [selected, dispatch, account.id, setSelected]); const header = ["Name", "Coords"]; @@ -32,7 +47,7 @@ const VillagesTable = () => {
diff --git a/TbsReact/ClientApp/src/components/ref/MUIDraggableTable.js b/TbsReact/ClientApp/src/components/ref/MUIDraggableTable.js index 66a3a9463..fa7872a4b 100644 --- a/TbsReact/ClientApp/src/components/ref/MUIDraggableTable.js +++ b/TbsReact/ClientApp/src/components/ref/MUIDraggableTable.js @@ -26,7 +26,11 @@ const SortableRow = SortableElement(({ items, onRemove, selected }) => { Object.entries(items).forEach((item) => { if (item[0] === "id") return; cells.push( - {JSON.stringify(item[1])} + + {typeof item[1] === "string" + ? item[1] + : JSON.stringify(item[1])} + ); }); cells.push( diff --git a/TbsReact/ClientApp/src/components/ref/MUITable.js b/TbsReact/ClientApp/src/components/ref/MUITable.js index 1da4292e3..5864cc21d 100644 --- a/TbsReact/ClientApp/src/components/ref/MUITable.js +++ b/TbsReact/ClientApp/src/components/ref/MUITable.js @@ -10,7 +10,7 @@ import { import React from "react"; import { nanoid } from "nanoid"; -const MUITable = ({ header, data, handler, selected }) => { +const MUITable = ({ header, data, onClick, selected }) => { return ( <> @@ -31,14 +31,16 @@ const MUITable = ({ header, data, handler, selected }) => { if (item[0] === "id") return; cells.push( - {JSON.stringify(item[1])} + {typeof item[1] === "string" + ? item[1] + : JSON.stringify(item[1])} ); }); return ( handler(row.id)} + onClick={() => onClick(row.id)} selected={row.id === selected} key={nanoid(10)} > @@ -55,9 +57,9 @@ const MUITable = ({ header, data, handler, selected }) => { MUITable.propTypes = { data: PropTypes.array.isRequired, - handler: PropTypes.func.isRequired, + onClick: PropTypes.func, header: PropTypes.array.isRequired, - selected: PropTypes.number.isRequired, + selected: PropTypes.number, }; export default MUITable; diff --git a/TbsReact/ClientApp/src/hooks/useVillage.js b/TbsReact/ClientApp/src/hooks/useVillage.js new file mode 100644 index 000000000..a152f19ef --- /dev/null +++ b/TbsReact/ClientApp/src/hooks/useVillage.js @@ -0,0 +1,15 @@ +import { createContext, useContext } from "react"; + +const VillageContext = createContext(); + +const useVillage = () => { + const context = useContext(VillageContext); + + if (!context) { + throw new Error("useVillage must be used within a "); + } + + return context; +}; + +export { VillageContext, useVillage }; diff --git a/TbsReact/Controllers/BuildController.cs b/TbsReact/Controllers/BuildController.cs index 7093a921b..c3914fc13 100644 --- a/TbsReact/Controllers/BuildController.cs +++ b/TbsReact/Controllers/BuildController.cs @@ -9,6 +9,7 @@ using System; using TbsCore.Helpers; using TbsCore.Tasks; +using TbsReact.Models; namespace TbsReact.Controllers { @@ -261,6 +262,105 @@ public ActionResult> DeletePosition(int indexAcc, int indexVi return Ok(result); } + /// + /// Get buildings can build in normal + /// + /// + /// + /// + /// + [HttpGet("buildings/normal/{position:int}")] + public ActionResult GetNormalBuildings(int indexAcc, int indexVill, int position) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + + if (position < 0 || position > village.Build.Buildings.Length) return null; + + var result = new NormalBuild(); + // Check if there is already a building planner for that id + var selectedBuilding = village.Build.Buildings[position]; + var planedBuilding = village.Build.Tasks.LastOrDefault(x => x.BuildingId == position); + + // level + if (selectedBuilding.Type != BuildingEnum.Site) result.Level = selectedBuilding.Level + 1; + else if (planedBuilding != null) result.Level = planedBuilding.Level + 1; + else result.Level = 1; + + result.BuildList = new List(); + // build list + if (selectedBuilding.Type == BuildingEnum.Site) + { + if (planedBuilding != null) + { + result.BuildList.Add(new Entity + { + Name = planedBuilding.Building.ToString(), + Id = result.BuildList.Count + }); + return result; + } + + for (int i = 5; i <= 45; i++) + { + if (BuildingHelper.BuildingRequirementsAreMet((BuildingEnum)i, village, acc.AccInfo.Tribe ?? TribeEnum.Natars)) + { + result.BuildList.Add(new Entity + { + Name = ((BuildingEnum)i).ToString(), + Id = result.BuildList.Count + }); + } + } + return result; + } + else // Building already there + { + result.BuildList.Add(new Entity + { + Name = selectedBuilding.Type.ToString(), + Id = result.BuildList.Count + }); + return result; + } + } + + [HttpGet("buildings/prerequisites")] + public ActionResult> GetPrerequisitesBuildings(int indexAcc, int indexVill) + { + var account = AccountData.GetAccount(indexAcc); + if (account == null) + { + return NotFound(); + } + var acc = AccountManager.GetAccount(account); + var village = acc.Villages.FirstOrDefault(x => x.Id == indexVill); + if (village == null) + { + return NotFound(); + } + + var result = new List(); + var prereqComboList = BuildingHelper.SetPrereqCombo(acc, village); + + prereqComboList.ForEach(x => result.Add(new Entity + { + Name = x, + Id = result.Count + })); + + return result; + } + private static void Swap(List list, int indexA, int indexB) { BuildingTask tmp = list[indexA]; diff --git a/TbsReact/Extension/VillageExtension.cs b/TbsReact/Extension/VillageExtension.cs index 3305f168b..b2e445ac6 100644 --- a/TbsReact/Extension/VillageExtension.cs +++ b/TbsReact/Extension/VillageExtension.cs @@ -25,7 +25,7 @@ public static Building GetInfo(this TbsCore.Models.VillageModels.Building buildi { return new Building { - Index = index, + Id = index, Name = building.Type.ToString(), Location = building.Id, Level = building.Level, @@ -46,7 +46,7 @@ public static TaskBuilding GetInfo(this TbsCore.Models.BuildingModels.BuildingTa } return new TaskBuilding { - Index = index, + Id = index, Name = Name, Level = task.Level, Location = task.BuildingId ?? -1, @@ -57,7 +57,7 @@ public static CurrentBuilding GetInfo(this TbsCore.Models.VillageModels.Building { return new CurrentBuilding { - Index = index, + Id = index, Name = building.Building.ToString(), Level = building.Level, CompleteTime = building.Duration, diff --git a/TbsReact/Models/Entity.cs b/TbsReact/Models/Entity.cs new file mode 100644 index 000000000..4169d0589 --- /dev/null +++ b/TbsReact/Models/Entity.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TbsReact.Models +{ + public class Entity + { + public int Id { get; set; } + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/Building.cs b/TbsReact/Models/Villages/Building/Building.cs index 82fabdede..7dac52de7 100644 --- a/TbsReact/Models/Villages/Building/Building.cs +++ b/TbsReact/Models/Villages/Building/Building.cs @@ -7,10 +7,10 @@ namespace TbsReact.Models.Villages.Building { public class Building { - public int Index { get; set; } + public int Id { get; set; } + public int Location { get; set; } public string Name { get; set; } public int Level { get; set; } - public int Location { get; set; } public bool UnderConstruction { get; set; } } } \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/CurrentBuilding.cs b/TbsReact/Models/Villages/Building/CurrentBuilding.cs index ae7cdd337..484e7816c 100644 --- a/TbsReact/Models/Villages/Building/CurrentBuilding.cs +++ b/TbsReact/Models/Villages/Building/CurrentBuilding.cs @@ -7,7 +7,7 @@ namespace TbsReact.Models.Villages.Building { public class CurrentBuilding { - public int Index { get; set; } + public int Id { get; set; } public string Name { get; set; } public int Level { get; set; } diff --git a/TbsReact/Models/Villages/Building/NormalBuild.cs b/TbsReact/Models/Villages/Building/NormalBuild.cs new file mode 100644 index 000000000..300e9fd25 --- /dev/null +++ b/TbsReact/Models/Villages/Building/NormalBuild.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace TbsReact.Models.Villages.Building +{ + public class NormalBuild + { + public List BuildList { get; set; } + public int Level { get; set; } + } +} \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/RequestDelete.cs b/TbsReact/Models/Villages/Building/RequestDelete.cs deleted file mode 100644 index 645da7784..000000000 --- a/TbsReact/Models/Villages/Building/RequestDelete.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace TbsReact.Models.Villages.Building -{ - public class RequestDelete - { - public int Index { get; set; } - } -} \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/RequestNormal.cs b/TbsReact/Models/Villages/Building/RequestNormal.cs index 6be9674ff..74c15bf4e 100644 --- a/TbsReact/Models/Villages/Building/RequestNormal.cs +++ b/TbsReact/Models/Villages/Building/RequestNormal.cs @@ -9,7 +9,6 @@ public class RequestNormal { public string Building { get; set; } public int Level { get; set; } - public int Location { get; set; } } } \ No newline at end of file diff --git a/TbsReact/Models/Villages/Building/TaskBuilding.cs b/TbsReact/Models/Villages/Building/TaskBuilding.cs index 993af83ef..40ebf1ca5 100644 --- a/TbsReact/Models/Villages/Building/TaskBuilding.cs +++ b/TbsReact/Models/Villages/Building/TaskBuilding.cs @@ -7,7 +7,7 @@ namespace TbsReact.Models.Villages.Building { public class TaskBuilding { - public int Index { get; set; } + public int Id { get; set; } public string Name { get; set; } public int Level { get; set; } public int Location { get; set; } From 6470370b637be58699428b90c5703a6a6b44deaf Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 24 Feb 2022 02:20:43 +0700 Subject: [PATCH 65/69] [TBSReact] Add token authenticated --- TbsReact/ClientApp/.env | 4 +- TbsReact/ClientApp/src/App.js | 22 ++++- TbsReact/ClientApp/src/api/api.js | 19 ++--- TbsReact/ClientApp/src/api/axios.js | 7 ++ TbsReact/ClientApp/src/api/constant.js | 11 +++ .../ClientApp/src/components/TokenInput.js | 37 +++++++++ TbsReact/ClientApp/src/index.js | 3 + TbsReact/Controllers/AccessesController.cs | 2 +- TbsReact/Controllers/AccountController.cs | 2 +- TbsReact/Controllers/ActivityController.cs | 2 +- TbsReact/Controllers/BuildController.cs | 2 +- TbsReact/Controllers/DriverController.cs | 2 +- .../Controllers/Setting/ActivityController.cs | 2 +- .../Controllers/Setting/ChromeController.cs | 2 +- .../Controllers/Setting/DiscordController.cs | 2 +- .../Controllers/Setting/HeroController.cs | 2 +- .../Controllers/Setting/QuestController.cs | 2 +- TbsReact/Controllers/VillagesController.cs | 2 +- TbsReact/Startup.cs | 59 +++++++++++--- TbsReact/TokenGenerator.cs | 81 +++++++++++++++++++ 20 files changed, 228 insertions(+), 37 deletions(-) create mode 100644 TbsReact/ClientApp/src/api/axios.js create mode 100644 TbsReact/ClientApp/src/api/constant.js create mode 100644 TbsReact/ClientApp/src/components/TokenInput.js create mode 100644 TbsReact/TokenGenerator.cs diff --git a/TbsReact/ClientApp/.env b/TbsReact/ClientApp/.env index f1bc0abd7..fcfde3e89 100644 --- a/TbsReact/ClientApp/.env +++ b/TbsReact/ClientApp/.env @@ -1,3 +1,3 @@ BROWSER=none -PORT_API=3001 -REACT_APP_TBS_VERSION=1975_build \ No newline at end of file +REACT_APP_TBS_VERSION=1975_build +REACT_APP_API_BASE_URL=http://127.0.0.1:5000/api/ \ No newline at end of file diff --git a/TbsReact/ClientApp/src/App.js b/TbsReact/ClientApp/src/App.js index e2386992a..162de8423 100644 --- a/TbsReact/ClientApp/src/App.js +++ b/TbsReact/ClientApp/src/App.js @@ -1,9 +1,11 @@ -import React, { useEffect } from "react"; +import React, { useState, useEffect } from "react"; import { toast } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; +import axios from "axios"; +import { setHeaderToken } from "./api/axios"; import Layout from "./components/Layout"; - +import TokenInput from "./components/TokenInput"; import { signalRConnection, initConnection } from "./realtime/connection"; import { changeAccount } from "./realtime/account"; import { usePrevious } from "./hooks/usePrevious"; @@ -34,7 +36,21 @@ const App = () => { } }, [account, prev]); - return ; + const [token, setToken] = useState(axios.defaults.headers.common.token); + + useEffect(() => { + setHeaderToken(token); + }, [token]); + + return ( + <> + {token === undefined ? ( + + ) : ( + + )} + + ); }; export default App; diff --git a/TbsReact/ClientApp/src/api/api.js b/TbsReact/ClientApp/src/api/api.js index 75408c8d1..ad413db50 100644 --- a/TbsReact/ClientApp/src/api/api.js +++ b/TbsReact/ClientApp/src/api/api.js @@ -1,14 +1,11 @@ -/** /settings/${type}/ **/ -export const CHROME_SETTING = "chrome"; -export const ACTIVITY_SETTING = "activity"; -export const DISCORD_WEBHOOK_SETTING = "discordwebhook"; -export const HERO_SETTING = "hero"; -export const QUEST_SETTING = "quest"; - -/** / **/ -export const NORMAL = "normal"; -export const RESOURCE = "resource"; -export const PREREQUISITE = "prerequisites"; +export { + CHROME_SETTING, + ACTIVITY_SETTING, + DISCORD_WEBHOOK_SETTING, + HERO_SETTING, + QUEST_SETTING, +} from "./constant"; +export { NORMAL, RESOURCE, PREREQUISITE } from "./constant"; export { getVillages } from "./Village"; export { getLogData, getTaskList } from "./Debug"; diff --git a/TbsReact/ClientApp/src/api/axios.js b/TbsReact/ClientApp/src/api/axios.js new file mode 100644 index 000000000..4414941c1 --- /dev/null +++ b/TbsReact/ClientApp/src/api/axios.js @@ -0,0 +1,7 @@ +import axios from "axios"; + +const setHeaderToken = (token) => { + axios.defaults.headers.common.token = `${token}`; +}; + +export { setHeaderToken }; diff --git a/TbsReact/ClientApp/src/api/constant.js b/TbsReact/ClientApp/src/api/constant.js new file mode 100644 index 000000000..c0cdcd5c4 --- /dev/null +++ b/TbsReact/ClientApp/src/api/constant.js @@ -0,0 +1,11 @@ +/** /settings/${type}/ **/ +export const CHROME_SETTING = "chrome"; +export const ACTIVITY_SETTING = "activity"; +export const DISCORD_WEBHOOK_SETTING = "discordwebhook"; +export const HERO_SETTING = "hero"; +export const QUEST_SETTING = "quest"; + +/** type build **/ +export const NORMAL = "normal"; +export const RESOURCE = "resource"; +export const PREREQUISITE = "prerequisites"; diff --git a/TbsReact/ClientApp/src/components/TokenInput.js b/TbsReact/ClientApp/src/components/TokenInput.js new file mode 100644 index 000000000..cf5ca8b00 --- /dev/null +++ b/TbsReact/ClientApp/src/components/TokenInput.js @@ -0,0 +1,37 @@ +import PropTypes from "prop-types"; +import React from "react"; +import { Button, TextField } from "@mui/material"; +import { useForm } from "react-hook-form"; +const TokenInput = ({ setToken }) => { + const { register, handleSubmit } = useForm(); + + const onSubmit = (data) => { + setToken(data.token); + }; + return ( + <> + + + + + + ); +}; + +TokenInput.propTypes = { + setToken: PropTypes.func.isRequired, +}; + +export default TokenInput; diff --git a/TbsReact/ClientApp/src/index.js b/TbsReact/ClientApp/src/index.js index 0f6500dfe..127e56454 100644 --- a/TbsReact/ClientApp/src/index.js +++ b/TbsReact/ClientApp/src/index.js @@ -6,6 +6,9 @@ import * as serviceWorkerRegistration from "./serviceWorkerRegistration"; import { Provider } from "react-redux"; import store from "./store"; +import axios from "axios"; + +axios.defaults.baseURL = "api/"; const baseUrl = document.getElementsByTagName("base")[0].getAttribute("href"); const rootElement = document.getElementById("root"); diff --git a/TbsReact/Controllers/AccessesController.cs b/TbsReact/Controllers/AccessesController.cs index 113f16bfb..093b4e4ee 100644 --- a/TbsReact/Controllers/AccessesController.cs +++ b/TbsReact/Controllers/AccessesController.cs @@ -7,7 +7,7 @@ namespace TbsReact.Controllers { [ApiController] - [Route("accesses/{indexAcc:int}")] + [Route("api/accesses/{indexAcc:int}")] public class AccessesControler : ControllerBase { [HttpGet] diff --git a/TbsReact/Controllers/AccountController.cs b/TbsReact/Controllers/AccountController.cs index 117e1e983..6edbccb8c 100644 --- a/TbsReact/Controllers/AccountController.cs +++ b/TbsReact/Controllers/AccountController.cs @@ -9,7 +9,7 @@ namespace TbsReact.Controllers { [ApiController] - [Route("accounts")] + [Route("api/accounts")] public class AccountController : ControllerBase { [HttpGet] diff --git a/TbsReact/Controllers/ActivityController.cs b/TbsReact/Controllers/ActivityController.cs index 7f6019a2f..442c98e71 100644 --- a/TbsReact/Controllers/ActivityController.cs +++ b/TbsReact/Controllers/ActivityController.cs @@ -6,7 +6,7 @@ namespace TbsReact.Controllers public class ActivityController : ControllerBase { [HttpGet] - [Route("task/{indexAcc:int}")] + [Route("api/task/{indexAcc:int}")] public ActionResult GetTask(int indexAcc) { var account = AccountData.GetAccount(indexAcc); diff --git a/TbsReact/Controllers/BuildController.cs b/TbsReact/Controllers/BuildController.cs index c3914fc13..d95dd0c0e 100644 --- a/TbsReact/Controllers/BuildController.cs +++ b/TbsReact/Controllers/BuildController.cs @@ -14,7 +14,7 @@ namespace TbsReact.Controllers { [ApiController] - [Route("villages/{indexAcc:int}/build/{indexVill:int}")] + [Route("api/villages/{indexAcc:int}/build/{indexVill:int}")] public class BuildController : ControllerBase { [HttpGet("buildings")] diff --git a/TbsReact/Controllers/DriverController.cs b/TbsReact/Controllers/DriverController.cs index b92c9f549..92239b971 100644 --- a/TbsReact/Controllers/DriverController.cs +++ b/TbsReact/Controllers/DriverController.cs @@ -10,7 +10,7 @@ namespace TbsReact.Controllers [ApiController] public class DriverController : ControllerBase { - [HttpPost("login/{index:int}")] + [HttpPost("api/login/{index:int}")] public async Task Login(int index) { var account = AccountData.GetAccount(index); diff --git a/TbsReact/Controllers/Setting/ActivityController.cs b/TbsReact/Controllers/Setting/ActivityController.cs index c45ad6aef..e9be1daf5 100644 --- a/TbsReact/Controllers/Setting/ActivityController.cs +++ b/TbsReact/Controllers/Setting/ActivityController.cs @@ -6,7 +6,7 @@ namespace TbsReact.Controllers.Setting { [ApiController] - [Route("settings/activity/{indexAcc:int}")] + [Route("api/settings/activity/{indexAcc:int}")] public class ActivityController : ControllerBase { [HttpGet] diff --git a/TbsReact/Controllers/Setting/ChromeController.cs b/TbsReact/Controllers/Setting/ChromeController.cs index 1ea8ae129..e74a9a19b 100644 --- a/TbsReact/Controllers/Setting/ChromeController.cs +++ b/TbsReact/Controllers/Setting/ChromeController.cs @@ -6,7 +6,7 @@ namespace TbsReact.Controllers.Setting { [ApiController] - [Route("settings/chrome/{indexAcc:int}")] + [Route("api/settings/chrome/{indexAcc:int}")] public class ChromeController : ControllerBase { [HttpGet] diff --git a/TbsReact/Controllers/Setting/DiscordController.cs b/TbsReact/Controllers/Setting/DiscordController.cs index 0b556963e..c032cb90a 100644 --- a/TbsReact/Controllers/Setting/DiscordController.cs +++ b/TbsReact/Controllers/Setting/DiscordController.cs @@ -5,7 +5,7 @@ namespace TbsReact.Controllers.Setting { [ApiController] - [Route("settings/discordwebhook/{indexAcc:int}")] + [Route("api/ssettings/discordwebhook/{indexAcc:int}")] public class DiscordController : ControllerBase { [HttpGet] diff --git a/TbsReact/Controllers/Setting/HeroController.cs b/TbsReact/Controllers/Setting/HeroController.cs index 16ab23caf..ba7d913a3 100644 --- a/TbsReact/Controllers/Setting/HeroController.cs +++ b/TbsReact/Controllers/Setting/HeroController.cs @@ -6,7 +6,7 @@ namespace TbsReact.Controllers.Setting { [ApiController] - [Route("settings/hero/{indexAcc:int}")] + [Route("api/settings/hero/{indexAcc:int}")] public class HeroController : ControllerBase { [HttpGet] diff --git a/TbsReact/Controllers/Setting/QuestController.cs b/TbsReact/Controllers/Setting/QuestController.cs index 8557f7e3c..9b95dbe3c 100644 --- a/TbsReact/Controllers/Setting/QuestController.cs +++ b/TbsReact/Controllers/Setting/QuestController.cs @@ -5,7 +5,7 @@ namespace TbsReact.Controllers.Setting { [ApiController] - [Route("settings/quest/{indexAcc:int}")] + [Route("api/settings/quest/{indexAcc:int}")] public class QuestController : ControllerBase { [HttpGet] diff --git a/TbsReact/Controllers/VillagesController.cs b/TbsReact/Controllers/VillagesController.cs index 68146d674..0bb5180be 100644 --- a/TbsReact/Controllers/VillagesController.cs +++ b/TbsReact/Controllers/VillagesController.cs @@ -7,7 +7,7 @@ namespace TbsReact.Controllers { [ApiController] - [Route("villages/{indexAcc:int}")] + [Route("api/villages/{indexAcc:int}")] public class VillagesController : ControllerBase { [HttpGet] diff --git a/TbsReact/Startup.cs b/TbsReact/Startup.cs index 575b85f7b..06cb8e2bd 100644 --- a/TbsReact/Startup.cs +++ b/TbsReact/Startup.cs @@ -6,17 +6,27 @@ using System; using TbsReact.Singleton; using TbsReact.Hubs; +using System.Globalization; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Primitives; namespace TbsReact { public class Startup { - public Startup(IConfiguration configuration) + public Startup() + { + _token = TokenGenerator.Generate(12, 3); + } + + public Startup(IConfiguration configuration) : this() + { Configuration = configuration; } public IConfiguration Configuration { get; } + private string _token; // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) @@ -52,19 +62,34 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApp // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } - app.UseStaticFiles(); app.UseSpaStaticFiles(); - app.UseRouting(); + app.Use(async (context, next) => + { + if (context.Request.Path.Value.Contains("/api")) + { + if (context.Request.Headers.TryGetValue("token", out StringValues token)) + { + if (token[0].Contains(_token)) + { + await next(); + return; + } + } + context.Response.StatusCode = 401; + await context.Response.WriteAsync("401 - Lacks valid authentication credentials"); + return; + } + await next(); + }); + app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", - pattern: "{controller}/{action=Index}/{id?}"); - - endpoints.MapHub("/live"); + pattern: "{controller=Home}/{action=Index}/{id?}"); }); app.UseSpa(spa => @@ -76,13 +101,27 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApp spa.UseProxyToSpaDevelopmentServer("http://localhost:3000"); } }); - - lifetime.ApplicationStopping.Register(OnShutdown, true); - + app.UseEndpoints(endpoints => + { + endpoints.MapHub("/live"); + }); + lifetime.ApplicationStarted.Register(() => + { + Console.WriteLine("====================="); + Console.WriteLine("====================="); + Console.WriteLine("YOUR TOKEN"); + Console.WriteLine("=====================\n\n"); + Console.WriteLine(_token); + Console.WriteLine("\n\n====================="); + Console.WriteLine("YOUR TOKEN"); + Console.WriteLine("====================="); + Console.WriteLine("====================="); + }); + lifetime.ApplicationStopping.Register(OnShutdown); lifetime.ApplicationStopped.Register(() => { Console.WriteLine("*** Application is shut down ***"); - }, true); + }); } private void OnShutdown() diff --git a/TbsReact/TokenGenerator.cs b/TbsReact/TokenGenerator.cs new file mode 100644 index 000000000..7a5acf603 --- /dev/null +++ b/TbsReact/TokenGenerator.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography; +using System.Threading.Tasks; + +namespace TbsReact +{ + public static class TokenGenerator + { + private static readonly char[] Punctuations = "!@#$%^&*()_-+=[{]};:>|./?".ToCharArray(); + + public static string Generate(int length, int numberOfNonAlphanumericCharacters) + { + if (length < 1 || length > 128) + { + throw new ArgumentException(nameof(length)); + } + + if (numberOfNonAlphanumericCharacters > length || numberOfNonAlphanumericCharacters < 0) + { + throw new ArgumentException(nameof(numberOfNonAlphanumericCharacters)); + } + + using (var rng = RandomNumberGenerator.Create()) + { + var byteBuffer = new byte[length]; + + rng.GetBytes(byteBuffer); + + var count = 0; + var characterBuffer = new char[length]; + + for (var iter = 0; iter < length; iter++) + { + var i = byteBuffer[iter] % 87; + + if (i < 10) + { + characterBuffer[iter] = (char)('0' + i); + } + else if (i < 36) + { + characterBuffer[iter] = (char)('A' + i - 10); + } + else if (i < 62) + { + characterBuffer[iter] = (char)('a' + i - 36); + } + else + { + characterBuffer[iter] = Punctuations[i - 62]; + count++; + } + } + + if (count >= numberOfNonAlphanumericCharacters) + { + return new string(characterBuffer); + } + + int j; + var rand = new Random(); + + for (j = 0; j < numberOfNonAlphanumericCharacters - count; j++) + { + int k; + do + { + k = rand.Next(0, length); + } + while (!char.IsLetterOrDigit(characterBuffer[k])); + + characterBuffer[k] = Punctuations[rand.Next(0, Punctuations.Length)]; + } + + return new string(characterBuffer); + } + } + } +} \ No newline at end of file From e4066ee101a78ac4f21ed525386cf71bc4a328dc Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 24 Feb 2022 11:10:39 +0700 Subject: [PATCH 66/69] [TBSReact] Improve UX for token input --- TbsReact/ClientApp/src/App.js | 29 +++++++++-------- TbsReact/ClientApp/src/api/axios.js | 8 ++++- .../src/components/Header/LeftHeader.js | 10 ++++-- .../ClientApp/src/components/TokenInput.js | 32 +++++++++++++++++-- .../BuildView/Modal/ButtonBuildingModal.js | 18 +++++++++-- .../components/Views/VillagesView/Villages.js | 17 ++++++++-- 6 files changed, 91 insertions(+), 23 deletions(-) diff --git a/TbsReact/ClientApp/src/App.js b/TbsReact/ClientApp/src/App.js index 162de8423..d379c2a9d 100644 --- a/TbsReact/ClientApp/src/App.js +++ b/TbsReact/ClientApp/src/App.js @@ -1,8 +1,6 @@ -import React, { useState, useEffect } from "react"; +import React, { useState, useEffect, useRef } from "react"; import { toast } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; -import axios from "axios"; -import { setHeaderToken } from "./api/axios"; import Layout from "./components/Layout"; import TokenInput from "./components/TokenInput"; @@ -18,6 +16,7 @@ const App = () => { const account = useSelector((state) => state.account.info.id); const prev = usePrevious(account); const dispatch = useDispatch(); + const toastId = useRef(null); useEffect(() => { initConnection(); signalRConnection @@ -36,20 +35,24 @@ const App = () => { } }, [account, prev]); - const [token, setToken] = useState(axios.defaults.headers.common.token); + const [token, setToken] = useState(false); useEffect(() => { - setHeaderToken(token); - }, [token]); + if (account === -1 && token) { + toastId.current = toast.warning( + "Selecte account by clicking on left icon", + { autoClose: false } + ); + } else { + if (toastId.current !== null) { + toast.dismiss(toastId.current); + toastId.current = null; + } + } + }, [account, token]); return ( - <> - {token === undefined ? ( - - ) : ( - - )} - + <>{token === false ? : } ); }; diff --git a/TbsReact/ClientApp/src/api/axios.js b/TbsReact/ClientApp/src/api/axios.js index 4414941c1..acd882474 100644 --- a/TbsReact/ClientApp/src/api/axios.js +++ b/TbsReact/ClientApp/src/api/axios.js @@ -1,7 +1,13 @@ import axios from "axios"; const setHeaderToken = (token) => { + window.localStorage.setItem("token", token); axios.defaults.headers.common.token = `${token}`; }; -export { setHeaderToken }; +const getHeaderToken = () => { + const token = window.localStorage.getItem("token"); + axios.defaults.headers.common.token = `${token}`; +}; + +export { setHeaderToken, getHeaderToken }; diff --git a/TbsReact/ClientApp/src/components/Header/LeftHeader.js b/TbsReact/ClientApp/src/components/Header/LeftHeader.js index b595d64a1..ea191dd97 100644 --- a/TbsReact/ClientApp/src/components/Header/LeftHeader.js +++ b/TbsReact/ClientApp/src/components/Header/LeftHeader.js @@ -1,12 +1,18 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import { Tabs, Tab, Box } from "@mui/material"; -import { Link } from "react-router-dom"; +import { Link, useLocation } from "react-router-dom"; const LeftHeader = () => { + const location = useLocation(); const [value, setValue] = useState("/info"); const handleChange = (event, newValue) => { setValue(newValue); }; + + useEffect(() => { + const path = location.pathname.split("/")[1]; + setValue(`/${path || "info"}`); + }, [location]); return ( <> diff --git a/TbsReact/ClientApp/src/components/TokenInput.js b/TbsReact/ClientApp/src/components/TokenInput.js index cf5ca8b00..6c5a9e59e 100644 --- a/TbsReact/ClientApp/src/components/TokenInput.js +++ b/TbsReact/ClientApp/src/components/TokenInput.js @@ -1,13 +1,39 @@ import PropTypes from "prop-types"; -import React from "react"; +import React, { useEffect } from "react"; +import { toast } from "react-toastify"; + import { Button, TextField } from "@mui/material"; import { useForm } from "react-hook-form"; +import axios from "axios"; +import { setHeaderToken, getHeaderToken } from "../api/axios"; const TokenInput = ({ setToken }) => { const { register, handleSubmit } = useForm(); - const onSubmit = (data) => { - setToken(data.token); + const onSubmit = async (token) => { + setHeaderToken(token.token); + try { + await axios.get("/api/checkToken"); + setToken(true); + } catch (err) { + if (err.response.status === 401) { + toast.error("Invalid token"); + } + } }; + useEffect(() => { + getHeaderToken(); + + axios + .get("/api/checkToken") + .then(() => { + setToken(true); + }) + .catch((err) => { + if (err.response.status === 401) { + toast.warn("Input token from TBS console to continue"); + } + }); + }, [setToken]); return ( <>
diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js index 978b754b7..f58569dc2 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/BuildView/Modal/ButtonBuildingModal.js @@ -1,17 +1,31 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import { Tabs, Tab } from "@mui/material"; -import { Link, useRouteMatch, Switch, Route, Redirect } from "react-router-dom"; +import { + Link, + useRouteMatch, + Switch, + Route, + Redirect, + useLocation, +} from "react-router-dom"; import NormalBuilding from "./NormalBuilding"; import PrerequisiteBuilding from "./PrerequisiteBuilding"; import ResourceBuilding from "./ResourceBuilding"; const ButtonBuildingModal = () => { + const location = useLocation(); const { path, url } = useRouteMatch(); const [value, setValue] = useState("/normal"); const handleChange = (event, newValue) => { setValue(newValue); }; + + useEffect(() => { + const path = location.pathname.split("/")[3]; + console.log(path); + setValue(`/${path}`); + }, [location]); return ( <> diff --git a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js index 83206155f..2cb71d5b3 100644 --- a/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js +++ b/TbsReact/ClientApp/src/components/Views/VillagesView/Villages.js @@ -1,7 +1,14 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import { Grid, Tabs, Tab, Box } from "@mui/material"; -import { Link, useRouteMatch, Switch, Route, Redirect } from "react-router-dom"; +import { + Link, + useRouteMatch, + Switch, + Route, + Redirect, + useLocation, +} from "react-router-dom"; import style from "../../../styles/box"; import VillagesTable from "./VillagesTable"; @@ -15,6 +22,7 @@ import Info from "./SubView/Info"; import { VillageContext } from "../../../hooks/useVillage"; const Villages = () => { + const location = useLocation(); const { path, url } = useRouteMatch(); const [value, setValue] = useState("/build"); @@ -25,6 +33,11 @@ const Villages = () => { setValue(newValue); }; + useEffect(() => { + const path = location.pathname.split("/")[2]; + setValue(`/${path}`); + }, [location]); + return ( <> From 36bf1bb661a266ba72bc042e38300b52d015a730 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 24 Feb 2022 11:30:28 +0700 Subject: [PATCH 67/69] [TBSReact] Fix url API --- TbsReact/Controllers/ActivityController.cs | 3 ++- TbsReact/Controllers/DriverController.cs | 3 ++- TbsReact/Startup.cs | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/TbsReact/Controllers/ActivityController.cs b/TbsReact/Controllers/ActivityController.cs index 442c98e71..d2577eef9 100644 --- a/TbsReact/Controllers/ActivityController.cs +++ b/TbsReact/Controllers/ActivityController.cs @@ -3,10 +3,11 @@ namespace TbsReact.Controllers { + [Route("api")] public class ActivityController : ControllerBase { [HttpGet] - [Route("api/task/{indexAcc:int}")] + [Route("task/{indexAcc:int}")] public ActionResult GetTask(int indexAcc) { var account = AccountData.GetAccount(indexAcc); diff --git a/TbsReact/Controllers/DriverController.cs b/TbsReact/Controllers/DriverController.cs index 92239b971..15dc359c9 100644 --- a/TbsReact/Controllers/DriverController.cs +++ b/TbsReact/Controllers/DriverController.cs @@ -8,9 +8,10 @@ namespace TbsReact.Controllers { [ApiController] + [Route("api")] public class DriverController : ControllerBase { - [HttpPost("api/login/{index:int}")] + [HttpPost("login/{index:int}")] public async Task Login(int index) { var account = AccountData.GetAccount(index); diff --git a/TbsReact/Startup.cs b/TbsReact/Startup.cs index 06cb8e2bd..12df7ebea 100644 --- a/TbsReact/Startup.cs +++ b/TbsReact/Startup.cs @@ -73,6 +73,13 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApp { if (token[0].Contains(_token)) { + if (context.Request.Path.Value.Contains("/api/checkToken")) + { + context.Response.StatusCode = 200; + await context.Response.WriteAsync("OK"); + + return; + } await next(); return; } From f21713a3dac90b62ae3f84b7a8132012f4bbbee5 Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 24 Feb 2022 11:43:52 +0700 Subject: [PATCH 68/69] [TBSReact] Fix API request on Debug views --- TbsReact/ClientApp/src/api/Accounts/Driver.js | 4 ++-- TbsReact/ClientApp/src/api/Debug.js | 2 +- .../ClientApp/src/components/Views/DebugView/LogBoard.js | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/TbsReact/ClientApp/src/api/Accounts/Driver.js b/TbsReact/ClientApp/src/api/Accounts/Driver.js index 29d7f7035..5ea403c91 100644 --- a/TbsReact/ClientApp/src/api/Accounts/Driver.js +++ b/TbsReact/ClientApp/src/api/Accounts/Driver.js @@ -2,7 +2,7 @@ import axios from "axios"; const login = async (index) => { try { - await axios.post(`/accounts/login/${index}`); + await axios.post(`/login/${index}`); return true; } catch (e) { console.log(e); @@ -12,7 +12,7 @@ const login = async (index) => { const logout = async (index) => { try { - await axios.post(`/accounts/logout/${index}`); + await axios.post(`/logout/${index}`); return true; } catch (e) { console.log(e); diff --git a/TbsReact/ClientApp/src/api/Debug.js b/TbsReact/ClientApp/src/api/Debug.js index 1ea51b50f..04fa2167c 100644 --- a/TbsReact/ClientApp/src/api/Debug.js +++ b/TbsReact/ClientApp/src/api/Debug.js @@ -2,7 +2,7 @@ import axios from "axios"; const getLogData = async (index) => { try { - const { data } = await axios.get(`/log/${index}`); + const { data } = await axios.get(`/logger/${index}`); return data; } catch (e) { console.log(e); diff --git a/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js b/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js index f3f408ed9..305fb1ed9 100644 --- a/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js +++ b/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js @@ -7,7 +7,7 @@ import { signalRConnection } from "../../../realtime/connection"; import { useSelector } from "react-redux"; import { HubConnectionState } from "@microsoft/signalr/dist/esm/HubConnection"; const LogBoard = () => { - const [value, setValue] = useState([]); + const [value, setValue] = useState("Loading ..."); const account = useSelector((state) => state.account.info.id); const signalr = useSelector((state) => state.signalr); @@ -25,7 +25,9 @@ const LogBoard = () => { useEffect(() => { if (account !== -1) { - getLogData(account).then((data) => setValue(data)); + getLogData(account).then((data) => { + setValue(data); + }); } }, [account]); return ( @@ -37,9 +39,8 @@ const LogBoard = () => { style={{ width: "100%" }} maxRows={20} minRows={20} - value={value.join("\n")} + value={value} readOnly={true} - defaultValue="Nothing here" /> ); From 0025174f85b9db3b7c32b94ad683c77525b458cc Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Thu, 24 Feb 2022 17:12:29 +0700 Subject: [PATCH 69/69] [TBSReact] Fix SignalR connection --- TbsReact/ClientApp/src/App.js | 57 +++++++++++++------ .../components/Views/DebugView/LogBoard.js | 15 +++-- .../components/Views/DebugView/TaskTable.js | 7 ++- TbsReact/ClientApp/src/hooks/useSignalR.js | 15 +++++ TbsReact/ClientApp/src/realtime/account.js | 4 +- TbsReact/ClientApp/src/realtime/connection.js | 9 --- TbsReact/Singleton/AccountManager.cs | 7 ++- TbsReact/Singleton/TaskManager.cs | 10 ++-- 8 files changed, 79 insertions(+), 45 deletions(-) create mode 100644 TbsReact/ClientApp/src/hooks/useSignalR.js delete mode 100644 TbsReact/ClientApp/src/realtime/connection.js diff --git a/TbsReact/ClientApp/src/App.js b/TbsReact/ClientApp/src/App.js index d379c2a9d..1bd8663d1 100644 --- a/TbsReact/ClientApp/src/App.js +++ b/TbsReact/ClientApp/src/App.js @@ -4,36 +4,51 @@ import "react-toastify/dist/ReactToastify.css"; import Layout from "./components/Layout"; import TokenInput from "./components/TokenInput"; -import { signalRConnection, initConnection } from "./realtime/connection"; import { changeAccount } from "./realtime/account"; import { usePrevious } from "./hooks/usePrevious"; -import { useDispatch, useSelector } from "react-redux"; +import { useSelector } from "react-redux"; import { HubConnectionState } from "@microsoft/signalr/dist/esm/HubConnection"; +import { HubConnectionBuilder } from "@microsoft/signalr"; +import { SignalRContext } from "./hooks/useSignalR"; const App = () => { toast.configure(); const account = useSelector((state) => state.account.info.id); const prev = usePrevious(account); - const dispatch = useDispatch(); const toastId = useRef(null); + + const [connection, setConnection] = useState(null); + useEffect(() => { - initConnection(); - signalRConnection - .start() - .then(() => { - signalRConnection.on("message", (data) => console.log(data)); - }) - .catch((err) => { - console.error(err); - }); - }, [dispatch]); + const connect = new HubConnectionBuilder() + .withUrl("/live") + .withAutomaticReconnect() + .build(); + setConnection(connect); + }, [setConnection]); + + useEffect(() => { + if ( + connection && + connection.state === HubConnectionState.Disconnected + ) { + connection + .start() + .then(() => { + connection.on("message", (message) => { + console.log(message); + }); + }) + .catch((error) => console.log(error)); + } + }, [connection]); useEffect(() => { - if (signalRConnection.State === HubConnectionState.Connected) { - changeAccount(account, prev); + if (connection && connection.state === HubConnectionState.Connected) { + changeAccount(connection, account, prev); } - }, [account, prev]); + }, [connection, account, prev]); const [token, setToken] = useState(false); @@ -52,7 +67,15 @@ const App = () => { }, [account, token]); return ( - <>{token === false ? : } + <> + + {token === false ? ( + + ) : ( + + )} + + ); }; diff --git a/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js b/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js index 305fb1ed9..26aac3ed3 100644 --- a/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js +++ b/TbsReact/ClientApp/src/components/Views/DebugView/LogBoard.js @@ -2,18 +2,19 @@ import React, { useEffect, useState } from "react"; import { Typography, TextareaAutosize } from "@mui/material"; import { getLogData } from "../../../api/Debug"; -import { signalRConnection } from "../../../realtime/connection"; import { useSelector } from "react-redux"; import { HubConnectionState } from "@microsoft/signalr/dist/esm/HubConnection"; +import { useSignalR } from "../../../hooks/useSignalR"; + const LogBoard = () => { const [value, setValue] = useState("Loading ..."); const account = useSelector((state) => state.account.info.id); - const signalr = useSelector((state) => state.signalr); - + const signalRConnection = useSignalR(); useEffect(() => { if (signalRConnection.State === HubConnectionState.Connected) { signalRConnection.on("logger", (data) => { + console.log(data); setValue((prev) => `${data}\n${prev}`); }); @@ -21,12 +22,16 @@ const LogBoard = () => { signalRConnection.off("logger"); }; } - }, [signalr]); + }, [signalRConnection]); useEffect(() => { if (account !== -1) { getLogData(account).then((data) => { - setValue(data); + if (data.length > 0) { + setValue(data); + } else { + setValue("No Logs"); + } }); } }, [account]); diff --git a/TbsReact/ClientApp/src/components/Views/DebugView/TaskTable.js b/TbsReact/ClientApp/src/components/Views/DebugView/TaskTable.js index b74182ae1..86503f53b 100644 --- a/TbsReact/ClientApp/src/components/Views/DebugView/TaskTable.js +++ b/TbsReact/ClientApp/src/components/Views/DebugView/TaskTable.js @@ -1,11 +1,11 @@ import React, { useEffect, useState } from "react"; import { getTaskList } from "../../../api/Debug"; -import { signalRConnection } from "../../../realtime/connection"; import { DataGrid } from "@mui/x-data-grid"; import { Typography } from "@mui/material"; import { useSelector } from "react-redux"; import { HubConnectionState } from "@microsoft/signalr/dist/esm/HubConnection"; +import { useSignalR } from "../../../hooks/useSignalR"; const TaskTable = () => { const [value, setValue] = useState([ @@ -27,10 +27,11 @@ const TaskTable = () => { ]; const account = useSelector((state) => state.account.info.id); - const signalr = useSelector((state) => state.signalr); + const signalRConnection = useSignalR(); useEffect(() => { if (signalRConnection.State === HubConnectionState.Connected) { signalRConnection.on("task", (message) => { + console.log(message); switch (message) { case "waiting": setValue([ @@ -72,7 +73,7 @@ const TaskTable = () => { signalRConnection.off("task"); }; } - }, [account, signalr]); + }, [account, signalRConnection]); useEffect(() => { if (account !== -1) { diff --git a/TbsReact/ClientApp/src/hooks/useSignalR.js b/TbsReact/ClientApp/src/hooks/useSignalR.js new file mode 100644 index 000000000..0b236ca1a --- /dev/null +++ b/TbsReact/ClientApp/src/hooks/useSignalR.js @@ -0,0 +1,15 @@ +import { createContext, useContext } from "react"; + +const SignalRContext = createContext(); + +const useSignalR = () => { + const context = useContext(SignalRContext); + + if (!context) { + throw new Error("useSignalR must be used within a "); + } + + return context; +}; + +export { SignalRContext, useSignalR }; diff --git a/TbsReact/ClientApp/src/realtime/account.js b/TbsReact/ClientApp/src/realtime/account.js index 07b2ca490..744d5a9f2 100644 --- a/TbsReact/ClientApp/src/realtime/account.js +++ b/TbsReact/ClientApp/src/realtime/account.js @@ -1,6 +1,4 @@ -import { signalRConnection } from "./connection"; - -const changeAccount = (index, oldIndex) => { +const changeAccount = (signalRConnection, index, oldIndex) => { if (index !== -1) { signalRConnection.invoke("AddGroup", index); } diff --git a/TbsReact/ClientApp/src/realtime/connection.js b/TbsReact/ClientApp/src/realtime/connection.js deleted file mode 100644 index eb6737353..000000000 --- a/TbsReact/ClientApp/src/realtime/connection.js +++ /dev/null @@ -1,9 +0,0 @@ -import { HubConnectionBuilder } from "@microsoft/signalr"; - -let signalRConnection; - -const initConnection = () => { - signalRConnection = new HubConnectionBuilder().withUrl("/live").build(); -}; - -export { signalRConnection, initConnection }; diff --git a/TbsReact/Singleton/AccountManager.cs b/TbsReact/Singleton/AccountManager.cs index 7f0497e90..2fe9f46fb 100644 --- a/TbsReact/Singleton/AccountManager.cs +++ b/TbsReact/Singleton/AccountManager.cs @@ -72,8 +72,11 @@ public static void ClientDisconnect(string key) public static bool CheckGroup(string key) { - instance.group.TryGetValue(key, out int value); - return (value > 0); + if (instance.group.TryGetValue(key, out int value)) + { + return (value > 0); + } + return false; } public static async void SendMessage(string groupkey, string type, string message) diff --git a/TbsReact/Singleton/TaskManager.cs b/TbsReact/Singleton/TaskManager.cs index bfb5d6c4d..be265e59f 100644 --- a/TbsReact/Singleton/TaskManager.cs +++ b/TbsReact/Singleton/TaskManager.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using TbsReact.Models; @@ -52,11 +53,8 @@ private List _getTaskList(string username) public static void AddAccount(TbsCore.Models.AccModels.Account account) { account.Tasks.OnUpdateTask = UpdateTaskTable; - if (account.Tasks.Count < 1) - { - if (!AccountManager.CheckGroup(account.AccInfo.Nickname)) return; - AccountManager.SendMessage(account.AccInfo.Nickname, "task", "waiting"); - } + if (!AccountManager.CheckGroup(account.AccInfo.Nickname)) return; + AccountManager.SendMessage(account.AccInfo.Nickname, "task", "waiting"); } public static List GetTaskList(string username)