Skip to content

Commit

Permalink
Merge branch 'Azuriom:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Oxim0v authored Jan 14, 2023
2 parents 8cb408a + a51cc43 commit 3a6f205
Show file tree
Hide file tree
Showing 216 changed files with 6,406 additions and 7,204 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
Expand Down
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bugs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "Bug report"
description: "Report something that isn't working as expected with Azuriom"
assignees: []
body:
- type: markdown
attributes:
value: "Something is not working as expected with Azuriom and the answer isn't in the [documentation](https://azuriom.com/docs)."
- type: textarea
id: description
attributes:
label: "Bug description"
description: "A clear and concise description of what the bug is."
validations:
required: true
- type: textarea
id: reproduce-step
attributes:
label: "Step to reproduce"
description: "Explain all step to reproduce, with some element that can be particular to your setup and help us to fix it."
placeholder: "To reproduce, I do ... then ..."
validations:
required: true
- type: textarea
id: error-logs
attributes:
label: "Errors / Logs"
description: "If you have an error 500, please add error logs (located in `storage/logs`)"
placeholder: "<!-- Paste your logs here -->"
- type: dropdown
id: webserver
attributes:
label: "Web server"
multiple: true
options:
- Apache
- Nginx
- Other
- type: dropdown
id: database
attributes:
label: "Database type"
options:
- MySQL
- MariaDB
- PostgreSQL
- SQLite
- SQLServer
- type: input
id: php-version
attributes:
label: "PHP version"
- type: textarea
id: context
attributes:
label: "Additional context"
description: "Add any other context about the problem here."
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Documentation
url: https://azuriom.com/docs
about: Check out our documentation and FAQ for common questions.
- name: Discord for quick support
url: https://azuriom.com/discord
about: You can join our Discord server to get support about installing and using Azuriom.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/suggestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Suggestion"
description: "Suggest an idea for Azuriom"
body:
- type: markdown
attributes:
value: "Suggest an idea for Azuriom. Before posting a suggestion, please check to see if your suggestion was already proposed in the [issues](https://github.com/Azuriom/Azuriom/issues). Suggestions for plugins/themes should be posted on the corresponding GitHub repository."
- type: textarea
id: description
attributes:
label: "Description of your suggestion"
description: "Explain your idea with screenshoots, example, etc"
placeholder: "Explain your idea"
validations:
required: true
- type: textarea
id: advantages
attributes:
label: "Advantages"
description: "What are the advantages of your suggestion or the alternatives you've considered?"
26 changes: 23 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHP CI
name: Azuriom CI

on:
push:
Expand All @@ -8,7 +8,7 @@ jobs:
tests:
strategy:
matrix:
php-version: ['8.0', '8.1']
php-version: [ '8.0', '8.1', '8.2' ]

name: PHP ${{ matrix.php-version }}

Expand All @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
Expand All @@ -45,3 +45,23 @@ jobs:
DB_CONNECTION: mysql
DB_DATABASE: azuriom
DB_USERNAME: root

assets:
name: Bundle assets

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Build
run: npm run production
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
.vscode/
.history

# Fleet
.fleet/

# Mac
.DS_Store

Expand All @@ -21,6 +24,7 @@
/vendor
.env
.env.backup
.env.production
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Expand Down
7 changes: 4 additions & 3 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /public/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]

# Handle assets in the public/ directory
RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
Expand All @@ -19,5 +20,5 @@
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ public/index.php [L]
RewriteRule ^ server.php [L]
</IfModule>
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

Azuriom follows the [PSR-12 coding style](https://www.php-fig.org/psr/psr-12/).

You can also run [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) to automatically fix the code style.
[Laravel Pint](https://github.com/laravel/pint) is included in the Composer dev-dependencies,
and can be used to automatically fix code style issues with this command:
```
./vendor/bin/pint
```

## Manual installation for development

Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Azuriom

[![PHP CI](https://img.shields.io/github/workflow/status/Azuriom/Azuriom/PHP%20CI?style=flat-square)](https://github.com/Azuriom/Azuriom/actions)
[![Code Quality](https://img.shields.io/scrutinizer/quality/g/Azuriom/Azuriom?style=flat-square)](https://scrutinizer-ci.com/g/Azuriom/Azuriom/)
[![PHP CI](https://img.shields.io/github/actions/workflow/status/Azuriom/Azuriom/tests.yml?branch=master&style=flat-square)](https://github.com/Azuriom/Azuriom/actions/workflows/tests.yml)
[![Style](https://github.styleci.io/repos/237486333/shield)](https://github.styleci.io/repos/237486333)
[![CodeFactor](https://www.codefactor.io/repository/github/azuriom/azuriom/badge?style=flat-square)](https://www.codefactor.io/repository/github/azuriom/azuriom)
[![Latest release](https://img.shields.io/github/v/release/Azuriom/Azuriom?style=flat-square)](http://github.com/Azuriom/Azuriom/releases)
[![Chat](https://img.shields.io/discord/625774284823986183?color=5865f2&label=Discord&logo=discord&logoColor=fff&style=flat-square)](https://azuriom.com/discord)

Expand All @@ -14,14 +14,16 @@

## Supported Games

Currently, Azuriom supports the following games:
Azuriom natively supports the following games:
* [Minecraft](https://www.minecraft.net/)
* [Garry's Mod](https://store.steampowered.com/app/4000/Garrys_Mod/)
* [ARK: Survival Evolved](https://store.steampowered.com/app/346110/ARK_Survival_Evolved/)
* [Rust](https://store.steampowered.com/agecheck/app/252490/)
* [Garry's Mod](https://gmod.facepunch.com/)
* [ARK: Survival Evolved](https://playark.com/ark-survival-evolved/)
* [Rust](https://rust.facepunch.com/)
* [FiveM](https://fivem.net/)
* [Counter-Strike: Global Offensive](https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/)
* [Team Fortress 2](https://store.steampowered.com/app/440/Team_Fortress_2/)
* [Counter-Strike: Global Offensive](https://blog.counter-strike.net/)
* [Team Fortress 2](https://www.teamfortress.com/)

You can implement your own game like it was done for [Flyff](https://github.com/AzuriomCommunity/Game-Flyff) or [Dofus 1.29](https://github.com/Javdu10/Game-Dofus129). You can find the how-to in [this documentation](https://azuriom.com/en/docs/games)

## Documentation

Expand All @@ -41,7 +43,7 @@ Contributions are always welcome!

See [the contribution guidelines](CONTRIBUTING.md) for ways to get started.

Please adhere to this project's [code of conduct](CODE_OF_CONDUCT.md)`.
Please adhere to this project's [code of conduct](CODE_OF_CONDUCT.md).

## Translations

Expand Down
2 changes: 1 addition & 1 deletion app/Azuriom.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Azuriom
*
* @var string
*/
private const VERSION = '1.0.2';
private const VERSION = '1.0.12';

/**
* Get the current version of Azuriom CMS.
Expand Down
5 changes: 0 additions & 5 deletions app/Console/Commands/GameCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,4 @@ public function handle()

return 0;
}

private function replace(string $stub, string $name, string $id, string $namespace)
{
return str_replace(['DummyPlugin', 'DummyNamespace', 'DummyId'], [$name, $namespace, $id], $stub);
}
}
3 changes: 3 additions & 0 deletions app/Console/Commands/GamePingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Azuriom\Console\Commands;

use Azuriom\Models\Server;
use Azuriom\Models\Setting;
use Illuminate\Console\Command;

class GamePingCommand extends Command
Expand All @@ -28,6 +29,8 @@ class GamePingCommand extends Command
*/
public function handle()
{
Setting::updateSettings('schedule.last', now()->toISOString());

$servers = Server::pingable()->get();

foreach ($servers as $server) {
Expand Down
41 changes: 41 additions & 0 deletions app/Console/Commands/PluginDisableCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace Azuriom\Console\Commands;

use Azuriom\Extensions\Plugin\PluginManager;
use Illuminate\Console\Command;

class PluginDisableCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'plugin:disable {id : The id of the plugin}';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Disable an enabled plugin';

/**
* Execute the console command.
*/
public function handle(PluginManager $plugins)
{
$id = $this->argument('id');

if (! $plugins->disable($id)) {
$this->error('Unable to disable plugin with id '.$id);

return 1;
}

$this->info('Plugin "'.$id.'" disabled.');

return 0;
}
}
48 changes: 48 additions & 0 deletions app/Console/Commands/PluginDownloadCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace Azuriom\Console\Commands;

use Azuriom\Extensions\Plugin\PluginManager;
use Illuminate\Console\Command;

class PluginDownloadCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'plugin:download
{id : The id of the plugin}
{version? : The version of the plugin}';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Download a plugin from market.azuriom.com';

/**
* Execute the console command.
*/
public function handle(PluginManager $plugins)
{
$extensionId = $this->argument('id');

$plugin = $plugins->getOnlinePlugins()
->first(fn ($plugin) => $plugin['extension_id'] === $extensionId);

if ($plugin === null) {
$this->error('There is no plugin with id "'.$extensionId
.'", it is already downloaded or does not support this installation.');

return 1;
}

$plugins->install($plugin['id'], $this->argument('version'));
$this->info('Plugin '.$extensionId.' downloaded.');

return 0;
}
}
Loading

0 comments on commit 3a6f205

Please sign in to comment.