yarn: update dependencies, prepare for Plug'n'Play
This commit is contained in:
parent
3a3caee715
commit
98c54cba3a
18 changed files with 2619 additions and 2137 deletions
|
@ -1,11 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
twin: {
|
|
||||||
preset: 'styled-components',
|
|
||||||
autoCssProp: true,
|
|
||||||
},
|
|
||||||
styledComponents: {
|
|
||||||
pure: true,
|
|
||||||
displayName: false,
|
|
||||||
fileName: false,
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -8,7 +8,7 @@ indent_size = 4
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[.*yml]
|
[*.yml]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
public
|
public
|
||||||
node_modules
|
node_modules
|
||||||
resources/views
|
resources/views
|
||||||
|
babel.config.js
|
||||||
webpack.config.js
|
webpack.config.js
|
||||||
|
|
4
.github/FUNDING.yml
vendored
4
.github/FUNDING.yml
vendored
|
@ -1,2 +1,2 @@
|
||||||
github: [DaneEveritt]
|
github: [ DaneEveritt ]
|
||||||
custom: ["https://paypal.me/PterodactylSoftware"]
|
custom: [ "https://paypal.me/PterodactylSoftware" ]
|
||||||
|
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
@ -8,7 +8,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
push_to_registry:
|
push_to_registry:
|
||||||
name: Push Image to GitHub Packages
|
name: Push Image to GitHub Packages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
# Always run against a tag, even if the commit into the tag has [docker skip]
|
# Always run against a tag, even if the commit into the tag has [docker skip]
|
||||||
# within the commit message.
|
# within the commit message.
|
||||||
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
|
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
|
||||||
|
|
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
|
@ -7,11 +7,13 @@ jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
- uses: actions/setup-node@v1
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '12'
|
node-version: '14'
|
||||||
|
cache: 'yarn'
|
||||||
- name: Create release branch and bump version
|
- name: Create release branch and bump version
|
||||||
env:
|
env:
|
||||||
REF: ${{ github.ref }}
|
REF: ${{ github.ref }}
|
||||||
|
@ -25,17 +27,14 @@ jobs:
|
||||||
git add config/app.php
|
git add config/app.php
|
||||||
git commit -m "bump version for release"
|
git commit -m "bump version for release"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
- name: Build assets
|
- name: Build assets
|
||||||
run: |
|
run: |
|
||||||
yarn install
|
yarn install
|
||||||
yarn run build:production
|
yarn run build:production
|
||||||
|
|
||||||
- name: Create release archive
|
- name: Create release archive
|
||||||
run: |
|
run: |
|
||||||
rm -rf node_modules/ test/ codecov.yml CODE_OF_CONDUCT.md CONTRIBUTING.md phpunit.dusk.xml phpunit.xml Vagrantfile
|
rm -rf node_modules/ test/ codecov.yml CODE_OF_CONDUCT.md CONTRIBUTING.md phpunit.dusk.xml phpunit.xml
|
||||||
tar -czf panel.tar.gz * .env.example .babel-plugin-macrosrc.js
|
tar -czf panel.tar.gz * .env.example .eslintignore .eslintrc.yml .yarnclean
|
||||||
|
|
||||||
- name: Extract changelog
|
- name: Extract changelog
|
||||||
id: extract_changelog
|
id: extract_changelog
|
||||||
env:
|
env:
|
||||||
|
@ -43,13 +42,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG
|
sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG
|
||||||
echo ::set-output name=version_name::`sed -nr "s/^## (${REF:10} .*)$/\1/p" CHANGELOG.md`
|
echo ::set-output name=version_name::`sed -nr "s/^## (${REF:10} .*)$/\1/p" CHANGELOG.md`
|
||||||
|
|
||||||
- name: Create checksum and add to changelog
|
- name: Create checksum and add to changelog
|
||||||
run: |
|
run: |
|
||||||
SUM=`sha256sum panel.tar.gz`
|
SUM=`sha256sum panel.tar.gz`
|
||||||
echo -e "\n#### SHA256 Checksum\n\n\`\`\`\n$SUM\n\`\`\`\n" >> ./RELEASE_CHANGELOG
|
echo -e "\n#### SHA256 Checksum\n\n\`\`\`\n$SUM\n\`\`\`\n" >> ./RELEASE_CHANGELOG
|
||||||
echo $SUM > checksum.txt
|
echo $SUM > checksum.txt
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
|
@ -61,7 +58,6 @@ jobs:
|
||||||
body_path: ./RELEASE_CHANGELOG
|
body_path: ./RELEASE_CHANGELOG
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
|
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
|
||||||
|
|
||||||
- name: Upload binary
|
- name: Upload binary
|
||||||
id: upload-release-archive
|
id: upload-release-archive
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
|
@ -72,7 +68,6 @@ jobs:
|
||||||
asset_path: panel.tar.gz
|
asset_path: panel.tar.gz
|
||||||
asset_name: panel.tar.gz
|
asset_name: panel.tar.gz
|
||||||
asset_content_type: application/gzip
|
asset_content_type: application/gzip
|
||||||
|
|
||||||
- name: Upload checksum
|
- name: Upload checksum
|
||||||
id: upload-release-checksum
|
id: upload-release-checksum
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
|
|
65
.github/workflows/tests.yml
vendored
65
.github/workflows/tests.yml
vendored
|
@ -1,45 +1,37 @@
|
||||||
name: run tests
|
name: Run Tests
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- master
|
- master
|
||||||
- "release/**"
|
- 'release/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
|
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
|
||||||
services:
|
|
||||||
mariadb:
|
|
||||||
image: mariadb:10.2
|
|
||||||
env:
|
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
||||||
MYSQL_DATABASE: panel_test
|
|
||||||
ports:
|
|
||||||
- 3306
|
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
||||||
mysql:
|
|
||||||
image: mysql:8
|
|
||||||
env:
|
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
||||||
MYSQL_DATABASE: panel_test
|
|
||||||
ports:
|
|
||||||
- 3306
|
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php: [ 7.4, 8.0 ]
|
php: [ 7.4, 8.0 ]
|
||||||
database: [ mysql, mariadb ]
|
database: [ mariadb:10.2, mariadb:10.6, mysql:8 ]
|
||||||
name: "php-${{ matrix.php }} (engine: ${{ matrix.database }})"
|
services:
|
||||||
|
database:
|
||||||
|
image: ${{ matrix.database }}
|
||||||
|
env:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||||
|
MYSQL_DATABASE: panel_test
|
||||||
|
ports:
|
||||||
|
- 3306
|
||||||
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
name: "php-${{ matrix.php }} (${{ matrix.database }})"
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: get cache directory
|
- name: Get cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
- name: cache dependencies
|
- name: Cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
@ -48,35 +40,28 @@ jobs:
|
||||||
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }}
|
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-cache-${{ matrix.php }}-
|
${{ runner.os }}-cache-${{ matrix.php }}-
|
||||||
- name: setup
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php }}
|
php-version: ${{ matrix.php }}
|
||||||
extensions: cli, openssl, gd, mysql, pdo, mbstring, tokenizer, bcmath, xml, curl, zip
|
extensions: bcmath, cli, curl, gd, mbstring, mysql, openssl, pdo, tokenizer, xml, zip
|
||||||
tools: composer:v2
|
tools: composer:v2
|
||||||
coverage: none
|
coverage: none
|
||||||
- name: configure
|
- name: Configure .env
|
||||||
run: cp .env.ci .env
|
run: cp .env.ci .env
|
||||||
- name: install dependencies
|
- name: composer install
|
||||||
run: composer install --prefer-dist --no-interaction --no-progress
|
run: composer install --prefer-dist --no-interaction --no-progress
|
||||||
- name: run cs-fixer
|
- name: Run cs-fixer
|
||||||
run: vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff --config .php_cs.dist
|
run: vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff --config .php_cs.dist
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: execute unit tests
|
- name: Execute Unit Tests
|
||||||
run: vendor/bin/phpunit --bootstrap bootstrap/app.php tests/Unit
|
run: vendor/bin/phpunit --bootstrap bootstrap/app.php tests/Unit
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
env:
|
env:
|
||||||
DB_CONNECTION: testing
|
DB_CONNECTION: testing
|
||||||
TESTING_DB_HOST: UNIT_NO_DB
|
TESTING_DB_HOST: UNIT_NO_DB
|
||||||
- name: execute integration tests (mysql)
|
- name: Execute Integration Tests
|
||||||
run: vendor/bin/phpunit tests/Integration
|
run: vendor/bin/phpunit tests/Integration
|
||||||
if: "${{ matrix.database }} == 'mysql'"
|
|
||||||
env:
|
env:
|
||||||
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
|
TESTING_DB_PORT: ${{ job.services.database.ports[3306] }}
|
||||||
TESTING_DB_USERNAME: root
|
|
||||||
- name: execute integration tests (mariadb)
|
|
||||||
run: vendor/bin/phpunit tests/Integration
|
|
||||||
if: "${{ matrix.database }} == 'mariadb'"
|
|
||||||
env:
|
|
||||||
TESTING_DB_PORT: ${{ job.services.mariadb.ports[3306] }}
|
|
||||||
TESTING_DB_USERNAME: root
|
TESTING_DB_USERNAME: root
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
nodeLinker: 'node-modules'
|
nodeLinker: 'node-modules'
|
||||||
|
pnpIgnorePatterns:
|
||||||
|
- './public/**/*'
|
||||||
yarnPath: '.yarn/releases/yarn-berry.cjs'
|
yarnPath: '.yarn/releases/yarn-berry.cjs'
|
||||||
|
|
243
package.json
243
package.json
|
@ -1,124 +1,147 @@
|
||||||
{
|
{
|
||||||
"name": "pterodactyl-panel",
|
"name": "pterodactyl-panel",
|
||||||
"dependencies": {
|
"private": true,
|
||||||
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
||||||
"@fortawesome/react-fontawesome": "^0.1.11",
|
|
||||||
"@tailwindcss/forms": "^0.2.1",
|
|
||||||
"axios": "^0.21.1",
|
|
||||||
"chart.js": "^2.8.0",
|
|
||||||
"codemirror": "^5.57.0",
|
|
||||||
"date-fns": "^2.16.1",
|
|
||||||
"debounce": "^1.2.0",
|
|
||||||
"deepmerge": "^4.2.2",
|
|
||||||
"easy-peasy": "^4.0.1",
|
|
||||||
"events": "^3.0.0",
|
|
||||||
"formik": "^2.2.6",
|
|
||||||
"i18next": "^19.0.0",
|
|
||||||
"i18next-chained-backend": "^2.0.0",
|
|
||||||
"i18next-localstorage-backend": "^3.0.0",
|
|
||||||
"i18next-xhr-backend": "^3.2.2",
|
|
||||||
"qrcode.react": "^1.0.1",
|
|
||||||
"query-string": "^6.7.0",
|
|
||||||
"react": "^16.13.1",
|
|
||||||
"react-copy-to-clipboard": "^5.0.2",
|
|
||||||
"react-dom": "npm:@hot-loader/react-dom",
|
|
||||||
"react-fast-compare": "^3.2.0",
|
|
||||||
"react-ga": "^3.1.2",
|
|
||||||
"react-google-recaptcha": "^2.0.1",
|
|
||||||
"react-hot-loader": "^4.12.21",
|
|
||||||
"react-i18next": "^11.2.1",
|
|
||||||
"react-router-dom": "^5.1.2",
|
|
||||||
"react-transition-group": "^4.4.1",
|
|
||||||
"reaptcha": "^1.7.2",
|
|
||||||
"sockette": "^2.0.6",
|
|
||||||
"styled-components": "^5.2.1",
|
|
||||||
"styled-components-breakpoint": "^3.0.0-preview.20",
|
|
||||||
"swr": "^0.2.3",
|
|
||||||
"tailwindcss": "^2.0.2",
|
|
||||||
"uuid": "^3.3.2",
|
|
||||||
"xterm": "^4.12.0",
|
|
||||||
"xterm-addon-attach": "^0.6.0",
|
|
||||||
"xterm-addon-fit": "^0.4.0",
|
|
||||||
"xterm-addon-search": "^0.7.0",
|
|
||||||
"xterm-addon-search-bar": "^0.2.0",
|
|
||||||
"xterm-addon-web-links": "^0.4.0",
|
|
||||||
"yup": "^0.29.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.12.1",
|
|
||||||
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
|
||||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
|
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
|
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
||||||
"@babel/plugin-transform-react-jsx": "^7.12.1",
|
|
||||||
"@babel/plugin-transform-runtime": "^7.12.1",
|
|
||||||
"@babel/preset-env": "^7.12.1",
|
|
||||||
"@babel/preset-react": "^7.12.1",
|
|
||||||
"@babel/preset-typescript": "^7.12.1",
|
|
||||||
"@babel/runtime": "^7.12.1",
|
|
||||||
"@types/chart.js": "^2.8.5",
|
|
||||||
"@types/codemirror": "^0.0.98",
|
|
||||||
"@types/debounce": "^1.2.0",
|
|
||||||
"@types/events": "^3.0.0",
|
|
||||||
"@types/node": "^14.11.10",
|
|
||||||
"@types/qrcode.react": "^1.0.1",
|
|
||||||
"@types/query-string": "^6.3.0",
|
|
||||||
"@types/react": "^16.9.41",
|
|
||||||
"@types/react-copy-to-clipboard": "^4.3.0",
|
|
||||||
"@types/react-dom": "^16.9.8",
|
|
||||||
"@types/react-helmet": "^6.0.0",
|
|
||||||
"@types/react-redux": "^7.1.1",
|
|
||||||
"@types/react-router": "^5.1.3",
|
|
||||||
"@types/react-router-dom": "^5.1.3",
|
|
||||||
"@types/react-transition-group": "^4.4.0",
|
|
||||||
"@types/styled-components": "^5.1.7",
|
|
||||||
"@types/uuid": "^3.4.5",
|
|
||||||
"@types/webpack-env": "^1.15.2",
|
|
||||||
"@types/yup": "^0.29.3",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^4.25.0",
|
|
||||||
"@typescript-eslint/parser": "^4.25.0",
|
|
||||||
"autoprefixer": "^10.1.0",
|
|
||||||
"babel-loader": "^8.0.6",
|
|
||||||
"babel-plugin-styled-components": "^1.12.0",
|
|
||||||
"cross-env": "^7.0.2",
|
|
||||||
"css-loader": "^3.2.1",
|
|
||||||
"eslint": "^7.27.0",
|
|
||||||
"eslint-config-standard": "^16.0.3",
|
|
||||||
"eslint-plugin-import": "^2.23.3",
|
|
||||||
"eslint-plugin-node": "^11.1.0",
|
|
||||||
"eslint-plugin-promise": "^5.1.0",
|
|
||||||
"eslint-plugin-react": "^7.23.2",
|
|
||||||
"eslint-plugin-react-hooks": "^4.2.0",
|
|
||||||
"fork-ts-checker-webpack-plugin": "^6.2.10",
|
|
||||||
"postcss": "^8.2.1",
|
|
||||||
"redux-devtools-extension": "^2.13.8",
|
|
||||||
"source-map-loader": "^1.0.1",
|
|
||||||
"style-loader": "^1.2.1",
|
|
||||||
"svg-url-loader": "^6.0.0",
|
|
||||||
"terser-webpack-plugin": "^3.0.6",
|
|
||||||
"twin.macro": "^2.0.7",
|
|
||||||
"typescript": "^4.2.4",
|
|
||||||
"webpack": "^4.43.0",
|
|
||||||
"webpack-assets-manifest": "^3.1.1",
|
|
||||||
"webpack-bundle-analyzer": "^3.8.0",
|
|
||||||
"webpack-cli": "^3.3.12",
|
|
||||||
"webpack-dev-server": "^3.11.0",
|
|
||||||
"yarn-deduplicate": "^1.1.1"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "cd public/assets && find . \\( -name \"*.js\" -o -name \"*.map\" \\) -type f -delete",
|
"clean": "cd public/assets && find . \\( -name \"*.js\" -o -name \"*.map\" \\) -type f -delete",
|
||||||
"lint": "eslint ./resources/scripts/**/*.{ts,tsx} --ext .ts,.tsx",
|
"lint": "eslint ./resources/scripts/**/*.{ts,tsx} --ext .ts,.tsx",
|
||||||
"watch": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
|
"watch": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
|
||||||
"build": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --progress",
|
"build": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --progress",
|
||||||
"build:production": "yarn run clean && cross-env NODE_ENV=production ./node_modules/.bin/webpack --mode production",
|
"build:production": "$npm_execpath run clean && cross-env NODE_ENV=production ./node_modules/.bin/webpack --mode production",
|
||||||
"serve": "yarn run clean && cross-env PUBLIC_PATH=https://pterodactyl.test:8080 NODE_ENV=development webpack-dev-server --host 0.0.0.0 --hot --https --key /etc/ssl/private/pterodactyl.test-key.pem --cert /etc/ssl/private/pterodactyl.test.pem"
|
"serve": "$npm_execpath run clean && cross-env PUBLIC_PATH=https://pterodactyl.test:8080 NODE_ENV=development webpack-dev-server --host 0.0.0.0 --hot --https --key /etc/ssl/private/pterodactyl.test-key.pem --cert /etc/ssl/private/pterodactyl.test.pem"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@": "link:./resources/scripts",
|
||||||
|
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
||||||
|
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||||
|
"@fortawesome/react-fontawesome": "^0.1.14",
|
||||||
|
"@hot-loader/react-dom": "^17.0.1",
|
||||||
|
"axios": "^0.21.1",
|
||||||
|
"chart.js": "^2.9.3",
|
||||||
|
"codemirror": "^5.62.0",
|
||||||
|
"date-fns": "^2.22.1",
|
||||||
|
"debounce": "^1.2.1",
|
||||||
|
"deepmerge": "^4.2.2",
|
||||||
|
"easy-peasy": "^5.0.3",
|
||||||
|
"events": "^3.3.0",
|
||||||
|
"feature": "link:./resources/scripts/components/server/features",
|
||||||
|
"formik": "^2.2.9",
|
||||||
|
"history": "^4.10.1",
|
||||||
|
"i18next": "^20.3.2",
|
||||||
|
"i18next-chained-backend": "^3.0.2",
|
||||||
|
"i18next-localstorage-backend": "^3.1.3",
|
||||||
|
"i18next-xhr-backend": "^3.2.2",
|
||||||
|
"qrcode.react": "^1.0.1",
|
||||||
|
"query-string": "^7.0.1",
|
||||||
|
"react": "^16.14.0",
|
||||||
|
"react-copy-to-clipboard": "^5.0.3",
|
||||||
|
"react-dom": "^17.0.2",
|
||||||
|
"react-fast-compare": "^3.2.0",
|
||||||
|
"react-ga": "^3.3.0",
|
||||||
|
"react-google-recaptcha": "^2.1.0",
|
||||||
|
"react-hot-loader": "^4.13.0",
|
||||||
|
"react-i18next": "^11.11.1",
|
||||||
|
"react-router": "^5.2.0",
|
||||||
|
"react-router-dom": "^5.2.0",
|
||||||
|
"react-transition-group": "^4.4.2",
|
||||||
|
"reaptcha": "^1.7.2",
|
||||||
|
"sockette": "^2.0.6",
|
||||||
|
"styled-components": "^5.2.1",
|
||||||
|
"styled-components-breakpoint": "^3.0.0-preview.20",
|
||||||
|
"swr": "^0.2.3",
|
||||||
|
"uuid": "^3.3.2",
|
||||||
|
"xterm": "^4.13.0",
|
||||||
|
"xterm-addon-attach": "^0.6.0",
|
||||||
|
"xterm-addon-fit": "^0.5.0",
|
||||||
|
"xterm-addon-search": "^0.8.0",
|
||||||
|
"xterm-addon-search-bar": "^0.2.0",
|
||||||
|
"xterm-addon-web-links": "^0.4.0",
|
||||||
|
"yup": "^0.32.9"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.14.5",
|
||||||
|
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
|
||||||
|
"@babel/plugin-proposal-object-rest-spread": "^7.14.5",
|
||||||
|
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
||||||
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||||
|
"@babel/plugin-transform-react-jsx": "^7.14.5",
|
||||||
|
"@babel/plugin-transform-runtime": "^7.14.5",
|
||||||
|
"@babel/preset-env": "^7.14.5",
|
||||||
|
"@babel/preset-react": "^7.14.5",
|
||||||
|
"@babel/preset-typescript": "^7.14.5",
|
||||||
|
"@babel/runtime": "^7.14.5",
|
||||||
|
"@tailwindcss/forms": "^0.3.3",
|
||||||
|
"@types/chart.js": "^2.9.34",
|
||||||
|
"@types/codemirror": "^5.60.2",
|
||||||
|
"@types/debounce": "^1.2.0",
|
||||||
|
"@types/events": "^3.0.0",
|
||||||
|
"@types/history": "^4.7.9",
|
||||||
|
"@types/node": "^16.3.0",
|
||||||
|
"@types/qrcode.react": "^1.0.2",
|
||||||
|
"@types/query-string": "^6.3.0",
|
||||||
|
"@types/react": "^16.14.11",
|
||||||
|
"@types/react-copy-to-clipboard": "^5.0.1",
|
||||||
|
"@types/react-dom": "^16.9.14",
|
||||||
|
"@types/react-helmet": "^6.1.2",
|
||||||
|
"@types/react-redux": "^7.1.18",
|
||||||
|
"@types/react-router": "^5.1.16",
|
||||||
|
"@types/react-router-dom": "^5.1.8",
|
||||||
|
"@types/react-transition-group": "^4.4.2",
|
||||||
|
"@types/styled-components": "^5.1.7",
|
||||||
|
"@types/uuid": "^3.4.5",
|
||||||
|
"@types/webpack-env": "^1.16.2",
|
||||||
|
"@types/yup": "^0.29.13",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.28.2",
|
||||||
|
"@typescript-eslint/parser": "^4.28.2",
|
||||||
|
"autoprefixer": "^10.2.6",
|
||||||
|
"babel-loader": "^8.2.2",
|
||||||
|
"babel-plugin-styled-components": "^1.13.2",
|
||||||
|
"browserslist": "^4.16.6",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"css-loader": "^5.2.6",
|
||||||
|
"eslint": "^7.30.0",
|
||||||
|
"eslint-config-standard": "^16.0.3",
|
||||||
|
"eslint-plugin-import": "^2.23.4",
|
||||||
|
"eslint-plugin-node": "^11.1.0",
|
||||||
|
"eslint-plugin-promise": "^5.1.0",
|
||||||
|
"eslint-plugin-react": "^7.24.0",
|
||||||
|
"eslint-plugin-react-hooks": "^4.2.0",
|
||||||
|
"fork-ts-checker-webpack-plugin": "^6.2.12",
|
||||||
|
"postcss": "^8.3.5",
|
||||||
|
"redux-devtools-extension": "^2.13.9",
|
||||||
|
"source-map-loader": "^1.1.3",
|
||||||
|
"style-loader": "^2.0.0",
|
||||||
|
"svg-url-loader": "^7.1.1",
|
||||||
|
"tailwindcss": "^2.2.4",
|
||||||
|
"terser-webpack-plugin": "^4.2.3",
|
||||||
|
"twin.macro": "^2.6.1",
|
||||||
|
"typescript": "^4.3.5",
|
||||||
|
"webpack": "^4.46.0",
|
||||||
|
"webpack-assets-manifest": "^4.0.6",
|
||||||
|
"webpack-bundle-analyzer": "^4.4.2",
|
||||||
|
"webpack-cli": "^4.7.2",
|
||||||
|
"webpack-dev-server": "^3.11.2",
|
||||||
|
"yarn-deduplicate": "^3.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12",
|
||||||
|
"yarn": "^1.22.x"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 0.5%",
|
"> 0.5%",
|
||||||
"last 2 versions",
|
"last 2 versions",
|
||||||
"firefox esr",
|
"firefox esr",
|
||||||
"not dead"
|
"not dead"
|
||||||
]
|
],
|
||||||
|
"babelMacros": {
|
||||||
|
"twin": {
|
||||||
|
"preset": "styled-components",
|
||||||
|
"autoCssProp": true
|
||||||
|
},
|
||||||
|
"styledComponents": {
|
||||||
|
"pure": true,
|
||||||
|
"displayName": false,
|
||||||
|
"fileName": false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ const FlashMessageRender = ({ byKey, className }: Props) => {
|
||||||
{
|
{
|
||||||
flashes.map((flash, index) => (
|
flashes.map((flash, index) => (
|
||||||
<React.Fragment key={flash.id || flash.type + flash.message}>
|
<React.Fragment key={flash.id || flash.type + flash.message}>
|
||||||
{index > 0 && <div css={tw`mt-2`}></div>}
|
{index > 0 && <div css={tw`mt-2`}/>}
|
||||||
<MessageBox type={flash.type} title={flash.title}>
|
<MessageBox type={flash.type} title={flash.title}>
|
||||||
{flash.message}
|
{flash.message}
|
||||||
</MessageBox>
|
</MessageBox>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
import { StaticContext } from 'react-router';
|
||||||
import { Link, RouteComponentProps } from 'react-router-dom';
|
import { Link, RouteComponentProps } from 'react-router-dom';
|
||||||
import loginCheckpoint from '@/api/auth/loginCheckpoint';
|
import loginCheckpoint from '@/api/auth/loginCheckpoint';
|
||||||
import LoginFormContainer from '@/components/auth/LoginFormContainer';
|
import LoginFormContainer from '@/components/auth/LoginFormContainer';
|
||||||
import { ActionCreator } from 'easy-peasy';
|
import { ActionCreator } from 'easy-peasy';
|
||||||
import { StaticContext } from 'react-router';
|
|
||||||
import { useFormikContext, withFormik } from 'formik';
|
import { useFormikContext, withFormik } from 'formik';
|
||||||
import useFlash from '@/plugins/useFlash';
|
import useFlash from '@/plugins/useFlash';
|
||||||
import { FlashStore } from '@/state/flashes';
|
import { FlashStore } from '@/state/flashes';
|
||||||
|
|
|
@ -158,9 +158,10 @@ export default ({ style, initialContent, filename, mode, fetchContent, onContent
|
||||||
indentWithTabs: false,
|
indentWithTabs: false,
|
||||||
lineWrapping: true,
|
lineWrapping: true,
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
|
// @ts-ignore
|
||||||
foldGutter: true,
|
foldGutter: true,
|
||||||
fixedGutter: true,
|
fixedGutter: true,
|
||||||
scrollbarStyle: 'overlay',
|
scrollbarStyle: 'native',
|
||||||
coverGutterNextToScrollbar: false,
|
coverGutterNextToScrollbar: false,
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
showCursorWhenSelecting: false,
|
showCursorWhenSelecting: false,
|
||||||
|
@ -169,8 +170,6 @@ export default ({ style, initialContent, filename, mode, fetchContent, onContent
|
||||||
autocorrect: false,
|
autocorrect: false,
|
||||||
autocapitalize: false,
|
autocapitalize: false,
|
||||||
lint: false,
|
lint: false,
|
||||||
// This property is actually used, the d.ts file for CodeMirror is incorrect.
|
|
||||||
// @ts-ignore
|
|
||||||
autoCloseBrackets: true,
|
autoCloseBrackets: true,
|
||||||
matchBrackets: true,
|
matchBrackets: true,
|
||||||
gutters: [ 'CodeMirror-linenumbers', 'CodeMirror-foldgutter' ],
|
gutters: [ 'CodeMirror-linenumbers', 'CodeMirror-foldgutter' ],
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ServerContentBlock from '@/components/elements/ServerContentBlock';
|
||||||
import ServerDetailsBlock from '@/components/server/ServerDetailsBlock';
|
import ServerDetailsBlock from '@/components/server/ServerDetailsBlock';
|
||||||
import isEqual from 'react-fast-compare';
|
import isEqual from 'react-fast-compare';
|
||||||
import PowerControls from '@/components/server/PowerControls';
|
import PowerControls from '@/components/server/PowerControls';
|
||||||
import { EulaModalFeature } from '@feature/index';
|
import { EulaModalFeature } from 'feature/index';
|
||||||
import ErrorBoundary from '@/components/elements/ErrorBoundary';
|
import ErrorBoundary from '@/components/elements/ErrorBoundary';
|
||||||
import Spinner from '@/components/elements/Spinner';
|
import Spinner from '@/components/elements/Spinner';
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,6 @@ import { lazy } from 'react';
|
||||||
* whenever they are actually loaded for the client (which may be never, depending
|
* whenever they are actually loaded for the client (which may be never, depending
|
||||||
* on the feature and the egg).
|
* on the feature and the egg).
|
||||||
*/
|
*/
|
||||||
const EulaModalFeature = lazy(() => import(/* webpackChunkName: "feature.eula" */'@feature/eula/EulaModalFeature'));
|
const EulaModalFeature = lazy(() => import(/* webpackChunkName: "feature.eula" */'feature/eula/EulaModalFeature'));
|
||||||
|
|
||||||
export { EulaModalFeature };
|
export { EulaModalFeature };
|
||||||
|
|
|
@ -35,7 +35,7 @@ interface Values {
|
||||||
const schema = object().shape({
|
const schema = object().shape({
|
||||||
action: string().required().oneOf([ 'command', 'power', 'backup' ]),
|
action: string().required().oneOf([ 'command', 'power', 'backup' ]),
|
||||||
payload: string().when('action', {
|
payload: string().when('action', {
|
||||||
is: v => v !== 'backup',
|
is: (v: string) => v !== 'backup',
|
||||||
then: string().required('A task payload must be provided.'),
|
then: string().required('A task payload must be provided.'),
|
||||||
otherwise: string(),
|
otherwise: string(),
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -60,7 +60,8 @@ module.exports = {
|
||||||
extensions: ['.ts', '.tsx', '.js', '.json'],
|
extensions: ['.ts', '.tsx', '.js', '.json'],
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.join(__dirname, '/resources/scripts'),
|
'@': path.join(__dirname, '/resources/scripts'),
|
||||||
'@feature': path.join(__dirname, '/resources/scripts/components/server/features'),
|
'feature': path.join(__dirname, '/resources/scripts/components/server/features'),
|
||||||
|
'react-dom': '@hot-loader/react-dom',
|
||||||
},
|
},
|
||||||
symlinks: false,
|
symlinks: false,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue