Merge branch 'matthewpi/yarn-upgrade' into feature/react-admin

This commit is contained in:
Matthew Penner 2021-07-13 15:25:43 -06:00
commit ef5380e59d
24 changed files with 13271 additions and 8566 deletions

View file

@ -1,11 +0,0 @@
module.exports = {
twin: {
preset: 'styled-components',
autoCssProp: true,
},
styledComponents: {
pure: true,
displayName: false,
fileName: false,
},
};

View file

@ -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]

View file

@ -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
View file

@ -1,2 +1,2 @@
github: [DaneEveritt] github: [ DaneEveritt ]
custom: ["https://paypal.me/PterodactylSoftware"] custom: [ "https://paypal.me/PterodactylSoftware" ]

View file

@ -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'))"

View file

@ -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

View file

@ -1,45 +1,36 @@
name: run tests name: Run Tests
on: on:
push: push:
branches-ignore: branches:
- master - 'develop'
- "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.5', '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 +39,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-fixer.dist.php
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

104
.gitignore vendored
View file

@ -1,38 +1,78 @@
#------------------#
# IDEs and Editors #
#------------------#
# Jetbrains
/.idea
*.iml
*.ipr
*.iws
# Visual Studio Code
/.vscode
# Sublime Text
*.sublime-*
#-------------------#
# Tools #
#-------------------#
# Vagrant
/.vagrant
#-------------------#
# Languages #
#-------------------#
# Node.js
/.npm
/node_modules
npm-debug.log
.cache
.eslintcache
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
.yarn-integrity
yarn-debug.log
yarn-error.log
# PHP
/vendor /vendor
*.DS_Store* .php_cs.cache
#-------------------#
# Operating Systems #
#-------------------#
# External Drives
.Spotlight-V100
.Trashes
# Linux
*~
# Mac OS
/.DS_Store
*.DS_Store
# VIM
.*.sw[a-p]
#-------------------#
# Project Files #
#-------------------#
# Environment Files
!.env.ci !.env.ci
!.env.dusk !.env.dusk
!.env.example !.env.example
.env* .env*
.vagrant/*
.vscode/*
storage/framework/*
/.idea
/nbproject
node_modules
*.log *.log
_ide_helper.php
.phpstorm.meta.php
.php_cs.cache
public/assets/manifest.json
# For local development with docker
# Remove if we ever put the Dockerfile in the repo
.dockerignore
#Dockerfile
docker-compose.yml
# for image related files
misc
.phpstorm.meta.php
.php_cs.cache
coverage.xml
# Vagrant
*.log
resources/lang/locales.js
resources/assets/pterodactyl/scripts/helpers/ziggy.js
resources/assets/scripts/helpers/ziggy.js
.phpunit.result.cache

55
.yarn/releases/yarn-berry.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
@types/react-native

4
.yarnrc.yml Normal file
View file

@ -0,0 +1,4 @@
nodeLinker: 'node-modules'
pnpIgnorePatterns:
- './public/**/*'
yarnPath: '.yarn/releases/yarn-berry.cjs'

View file

@ -21,7 +21,7 @@ class AllocationFactory extends Factory
{ {
return [ return [
'ip' => $this->faker->unique()->ipv4, 'ip' => $this->faker->unique()->ipv4,
'port' => $this->faker->unique()->randomNumber(5), 'port' => $this->faker->unique()->numberBetween(1024, 65535),
]; ];
} }
} }

View file

@ -1,6 +1,16 @@
{ {
"name": "pterodactyl-panel", "name": "pterodactyl-panel",
"private": true,
"scripts": {
"clean": "cd public/assets && find . \\( -name \"*.js\" -o -name \"*.map\" \\) -type f -delete",
"lint": "$npm_execpath eslint ./resources/scripts/**/*.{ts,tsx} --ext .ts,.tsx",
"watch": "$npm_execpath cross-env NODE_ENV=development $npm_execpath webpack --watch --progress",
"build": "$npm_execpath cross-env NODE_ENV=development $npm_execpath webpack --progress",
"build:production": "$npm_execpath run clean && $npm_execpath cross-env NODE_ENV=production $npm_execpath webpack --mode production",
"serve": "$npm_execpath run clean && $npm_execpath cross-env PUBLIC_PATH=https://pterodactyl.test:8080 NODE_ENV=development $npm_execpath 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": { "dependencies": {
"@": "link:./resources/scripts",
"@codemirror/autocomplete": "^0.18.5", "@codemirror/autocomplete": "^0.18.5",
"@codemirror/closebrackets": "^0.18.0", "@codemirror/closebrackets": "^0.18.0",
"@codemirror/commands": "^0.18.2", "@codemirror/commands": "^0.18.2",
@ -20,44 +30,46 @@
"@codemirror/stream-parser": "^0.18.2", "@codemirror/stream-parser": "^0.18.2",
"@codemirror/theme-one-dark": "^0.18.1", "@codemirror/theme-one-dark": "^0.18.1",
"@codemirror/view": "^0.18.12", "@codemirror/view": "^0.18.12",
"@fortawesome/fontawesome-svg-core": "^1.2.34", "@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.2", "@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.1.14", "@fortawesome/react-fontawesome": "^0.1.14",
"@tailwindcss/forms": "^0.2.1", "@hot-loader/react-dom": "^16.14.0",
"axios": "^0.21.1", "axios": "^0.21.1",
"chart.js": "^2.8.0", "chart.js": "^2.9.3",
"codemirror": "^5.57.0", "codemirror": "^5.62.0",
"date-fns": "^2.16.1", "date-fns": "^2.22.1",
"debounce": "^1.2.0", "debounce": "^1.2.1",
"deepmerge": "^4.2.2", "deepmerge": "^4.2.2",
"easy-peasy": "^4.0.1", "easy-peasy": "^5.0.3",
"events": "^3.0.0", "events": "^3.3.0",
"formik": "^2.2.6", "feature": "link:./resources/scripts/components/server/features",
"i18next": "^19.0.0", "formik": "^2.2.9",
"i18next-chained-backend": "^2.0.0", "history": "^4.10.1",
"i18next-localstorage-backend": "^3.0.0", "i18next": "^20.3.2",
"i18next-chained-backend": "^3.0.2",
"i18next-localstorage-backend": "^3.1.3",
"i18next-xhr-backend": "^3.2.2", "i18next-xhr-backend": "^3.2.2",
"qrcode.react": "^1.0.1", "qrcode.react": "^1.0.1",
"query-string": "^6.7.0", "query-string": "^7.0.1",
"react": "^16.13.1", "react": "^16.14.0",
"react-copy-to-clipboard": "^5.0.3", "react-copy-to-clipboard": "^5.0.3",
"react-dom": "npm:@hot-loader/react-dom", "react-dom": "^16.14.0",
"react-fast-compare": "^3.2.0", "react-fast-compare": "^3.2.0",
"react-ga": "^3.3.0", "react-ga": "^3.3.0",
"react-google-recaptcha": "^2.1.0", "react-google-recaptcha": "^2.1.0",
"react-hot-loader": "^4.13.0", "react-hot-loader": "^4.13.0",
"react-i18next": "^11.8.5", "react-i18next": "^11.11.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-select": "^4.3.1", "react-select": "^4.3.1",
"react-transition-group": "^4.4.1", "react-transition-group": "^4.4.2",
"reaptcha": "^1.7.2", "reaptcha": "^1.7.2",
"sockette": "^2.0.6", "sockette": "^2.0.6",
"styled-components": "^5.2.1", "styled-components": "^5.2.1",
"styled-components-breakpoint": "^3.0.0-preview.20", "styled-components-breakpoint": "^3.0.0-preview.20",
"swr": "^0.5.6", "swr": "^0.5.6",
"tailwindcss": "^2.0.2",
"uuid": "^3.3.2", "uuid": "^3.3.2",
"xterm": "^4.12.0", "xterm": "^4.13.0",
"xterm-addon-attach": "^0.6.0", "xterm-addon-attach": "^0.6.0",
"xterm-addon-fit": "^0.5.0", "xterm-addon-fit": "^0.5.0",
"xterm-addon-search": "^0.8.0", "xterm-addon-search": "^0.8.0",
@ -66,80 +78,90 @@
"yup": "^0.32.9" "yup": "^0.32.9"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.1", "@babel/core": "^7.14.5",
"@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1", "@babel/plugin-proposal-object-rest-spread": "^7.14.5",
"@babel/plugin-proposal-optional-chaining": "^7.12.1", "@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-react-jsx": "^7.12.1", "@babel/plugin-transform-react-jsx": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.12.1", "@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.12.1", "@babel/preset-env": "^7.14.5",
"@babel/preset-react": "^7.12.1", "@babel/preset-react": "^7.14.5",
"@babel/preset-typescript": "^7.12.1", "@babel/preset-typescript": "^7.14.5",
"@babel/runtime": "^7.12.1", "@babel/runtime": "^7.14.5",
"@types/chart.js": "^2.8.5", "@tailwindcss/forms": "^0.3.3",
"@types/codemirror": "^0.0.98", "@types/chart.js": "^2.9.34",
"@types/codemirror": "^5.60.2",
"@types/debounce": "^1.2.0", "@types/debounce": "^1.2.0",
"@types/events": "^3.0.0", "@types/events": "^3.0.0",
"@types/node": "^14.11.10", "@types/history": "^4.7.9",
"@types/qrcode.react": "^1.0.1", "@types/node": "^16.3.0",
"@types/qrcode.react": "^1.0.2",
"@types/query-string": "^6.3.0", "@types/query-string": "^6.3.0",
"@types/react": "^16.9.41", "@types/react": "^16.14.11",
"@types/react-copy-to-clipboard": "^4.3.0", "@types/react-copy-to-clipboard": "^5.0.1",
"@types/react-dom": "^16.9.8", "@types/react-dom": "^16.9.14",
"@types/react-helmet": "^6.0.0", "@types/react-helmet": "^6.1.2",
"@types/react-redux": "^7.1.1", "@types/react-redux": "^7.1.18",
"@types/react-router": "^5.1.3", "@types/react-router": "^5.1.16",
"@types/react-router-dom": "^5.1.3", "@types/react-router-dom": "^5.1.8",
"@types/react-select": "^4.0.15", "@types/react-select": "^4.0.17",
"@types/react-transition-group": "^4.4.0", "@types/react-transition-group": "^4.4.2",
"@types/styled-components": "^5.1.7", "@types/styled-components": "^5.1.7",
"@types/uuid": "^3.4.5", "@types/uuid": "^3.4.5",
"@types/webpack-env": "^1.15.2", "@types/webpack-env": "^1.16.2",
"@types/yup": "^0.29.3", "@types/yup": "^0.29.13",
"@typescript-eslint/eslint-plugin": "^4.25.0", "@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.25.0", "@typescript-eslint/parser": "^4.28.2",
"autoprefixer": "^10.1.0", "autoprefixer": "^10.2.6",
"babel-loader": "^8.0.6", "babel-loader": "^8.2.2",
"babel-plugin-styled-components": "^1.12.0", "babel-plugin-styled-components": "^1.13.2",
"cross-env": "^7.0.2", "browserslist": "^4.16.6",
"css-loader": "^3.2.1", "cross-env": "^7.0.3",
"eslint": "^7.27.0", "css-loader": "^5.2.6",
"eslint": "^7.30.0",
"eslint-config-standard": "^16.0.3", "eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.3", "eslint-plugin-import": "^2.23.4",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0", "eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "^7.23.2", "eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-hooks": "^4.2.0",
"fork-ts-checker-webpack-plugin": "^6.2.10", "fork-ts-checker-webpack-plugin": "^6.2.12",
"postcss": "^8.2.4", "postcss": "^8.3.5",
"redux-devtools-extension": "^2.13.8", "redux-devtools-extension": "^2.13.9",
"source-map-loader": "^1.0.1", "source-map-loader": "^1.1.3",
"style-loader": "^1.2.1", "style-loader": "^2.0.0",
"svg-url-loader": "^6.0.0", "svg-url-loader": "^7.1.1",
"terser-webpack-plugin": "^3.0.6", "tailwindcss": "^2.2.4",
"twin.macro": "^2.0.7", "terser-webpack-plugin": "^4.2.3",
"typescript": "^4.2.4", "twin.macro": "^2.6.2",
"webpack": "^4.43.0", "typescript": "^4.3.5",
"webpack-assets-manifest": "^3.1.1", "webpack": "^4.46.0",
"webpack-bundle-analyzer": "^3.8.0", "webpack-assets-manifest": "^4.0.6",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^3.3.12", "webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0", "webpack-dev-server": "^3.11.2"
"yarn-deduplicate": "^1.1.1"
}, },
"scripts": { "engines": {
"clean": "cd public/assets && find . \\( -name \"*.js\" -o -name \"*.map\" \\) -type f -delete", "node": ">=12",
"lint": "eslint ./resources/scripts/**/*.{ts,tsx} --ext .ts,.tsx", "yarn": "^1.22.x"
"watch": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --watch --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",
"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"
}, },
"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
}
}
} }

View file

@ -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';

View file

@ -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' ],

View file

@ -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';

View file

@ -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 };

View file

@ -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,
}, },

21360
yarn.lock

File diff suppressed because it is too large Load diff