From b9d67459b207bb24a69ca1d9239522bd24c9bdfa Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 17 Dec 2017 13:07:38 -0600 Subject: [PATCH 01/11] Update to Laravel 5.5 (#814) --- .travis.yml | 4 - CHANGELOG.md | 2 + .../CleanServiceBackupFilesCommand.php | 27 +- app/Console/Kernel.php | 34 +- app/Http/Controllers/Admin/PackController.php | 2 +- .../Controllers/Admin/ServersController.php | 2 +- app/Http/Controllers/Auth/LoginController.php | 5 +- .../Controllers/Base/SecurityController.php | 23 - app/Http/Kernel.php | 8 +- app/Http/Middleware/TrustProxies.php | 29 + app/Http/Middleware/VerifyReCaptcha.php | 2 +- app/Http/Requests/Admin/AdminFormRequest.php | 5 +- .../Admin/DatabaseHostFormRequest.php | 2 +- app/Http/Requests/Admin/UserFormRequest.php | 9 +- app/Models/Pack.php | 26 - app/Policies/ServerPolicy.php | 13 + app/Providers/AppServiceProvider.php | 13 - app/Providers/EventServiceProvider.php | 8 - app/Providers/SettingsServiceProvider.php | 18 + composer.json | 45 +- composer.lock | 1331 ++++++++++------- config/app.php | 45 +- config/cache.php | 5 +- config/database.php | 2 +- config/filesystems.php | 12 +- config/session.php | 19 +- database/factories/ModelFactory.php | 38 +- phpunit.xml | 2 +- public/.htaccess | 13 +- public/index.php | 7 +- .../pterodactyl/admin/packs/view.blade.php | 7 - .../CleanServiceBackupFilesCommandTest.php | 55 +- .../Base/AccountControllerTest.php | 12 +- .../Base/SecurityControllerTest.php | 12 +- .../Servers/ServerCreationServiceTest.php | 2 +- 35 files changed, 1021 insertions(+), 818 deletions(-) create mode 100644 app/Http/Middleware/TrustProxies.php diff --git a/.travis.yml b/.travis.yml index d07b2cbf..f24f6911 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,6 @@ php: - 7.0 - 7.1 - 7.2 -matrix: - fast_finish: true - allow_failures: - - php: 7.2 sudo: false cache: directories: diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b2a8505..e9b6bcc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ### Changed * Revoking the administrative status for an admin will revoke all authentication tokens currently assigned to their account. +* Updated core framework to Laravel 5.5. This includes many dependency updates. +* Certain AWS specific environment keys were changed, this should have minimal impact on users unless you specifically enabled AWS specific features. The renames are: `AWS_KEY -> AWS_ACCESS_KEY_ID`, `AWS_SECRET -> AWS_SECRET_ACCESS_KEY`, `AWS_REGION -> AWS_DEFAULT_REGION` ### Added * Added star indicators to user listing in Admin CP to indicate users who are set as a root admin. diff --git a/app/Console/Commands/Maintenance/CleanServiceBackupFilesCommand.php b/app/Console/Commands/Maintenance/CleanServiceBackupFilesCommand.php index f3982921..1b5ded4d 100644 --- a/app/Console/Commands/Maintenance/CleanServiceBackupFilesCommand.php +++ b/app/Console/Commands/Maintenance/CleanServiceBackupFilesCommand.php @@ -1,14 +1,8 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Console\Commands\Maintenance; +use SplFileInfo; use Carbon\Carbon; use Illuminate\Console\Command; use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory; @@ -17,11 +11,6 @@ class CleanServiceBackupFilesCommand extends Command { const BACKUP_THRESHOLD_MINUTES = 5; - /** - * @var \Carbon\Carbon - */ - protected $carbon; - /** * @var string */ @@ -40,14 +29,12 @@ class CleanServiceBackupFilesCommand extends Command /** * CleanServiceBackupFilesCommand constructor. * - * @param \Carbon\Carbon $carbon * @param \Illuminate\Contracts\Filesystem\Factory $filesystem */ - public function __construct(Carbon $carbon, FilesystemFactory $filesystem) + public function __construct(FilesystemFactory $filesystem) { parent::__construct(); - $this->carbon = $carbon; $this->disk = $filesystem->disk(); } @@ -58,11 +45,11 @@ class CleanServiceBackupFilesCommand extends Command { $files = $this->disk->files('services/.bak'); - collect($files)->each(function ($file) { - $lastModified = $this->carbon->timestamp($this->disk->lastModified($file)); - if ($lastModified->diffInMinutes($this->carbon->now()) > self::BACKUP_THRESHOLD_MINUTES) { - $this->disk->delete($file); - $this->info(trans('command/messages.maintenance.deleting_service_backup', ['file' => $file])); + collect($files)->each(function (SplFileInfo $file) { + $lastModified = Carbon::createFromTimestamp($this->disk->lastModified($file->getPath())); + if ($lastModified->diffInMinutes(Carbon::now()) > self::BACKUP_THRESHOLD_MINUTES) { + $this->disk->delete($file->getPath()); + $this->info(trans('command/messages.maintenance.deleting_service_backup', ['file' => $file->getFilename()])); } }); } diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 46856183..c87cd539 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -3,41 +3,17 @@ namespace Pterodactyl\Console; use Illuminate\Console\Scheduling\Schedule; -use Pterodactyl\Console\Commands\InfoCommand; -use Pterodactyl\Console\Commands\User\MakeUserCommand; -use Pterodactyl\Console\Commands\User\DeleteUserCommand; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; -use Pterodactyl\Console\Commands\Server\RebuildServerCommand; -use Pterodactyl\Console\Commands\Location\MakeLocationCommand; -use Pterodactyl\Console\Commands\User\DisableTwoFactorCommand; -use Pterodactyl\Console\Commands\Environment\AppSettingsCommand; -use Pterodactyl\Console\Commands\Location\DeleteLocationCommand; -use Pterodactyl\Console\Commands\Schedule\ProcessRunnableCommand; -use Pterodactyl\Console\Commands\Environment\EmailSettingsCommand; -use Pterodactyl\Console\Commands\Environment\DatabaseSettingsCommand; -use Pterodactyl\Console\Commands\Maintenance\CleanServiceBackupFilesCommand; class Kernel extends ConsoleKernel { /** - * The Artisan commands provided by your application. - * - * @var array + * Register the commands for the application. */ - protected $commands = [ - AppSettingsCommand::class, - CleanServiceBackupFilesCommand::class, - DatabaseSettingsCommand::class, - DeleteLocationCommand::class, - DeleteUserCommand::class, - DisableTwoFactorCommand::class, - EmailSettingsCommand::class, - InfoCommand::class, - MakeLocationCommand::class, - MakeUserCommand::class, - ProcessRunnableCommand::class, - RebuildServerCommand::class, - ]; + protected function commands() + { + $this->load(__DIR__ . '/Commands'); + } /** * Define the application's command schedule. diff --git a/app/Http/Controllers/Admin/PackController.php b/app/Http/Controllers/Admin/PackController.php index ae6c86fd..fed86f3a 100644 --- a/app/Http/Controllers/Admin/PackController.php +++ b/app/Http/Controllers/Admin/PackController.php @@ -163,7 +163,7 @@ class PackController extends Controller */ public function store(PackFormRequest $request) { - if ($request->has('from_template')) { + if ($request->filled('from_template')) { $pack = $this->templateUploadService->handle($request->input('egg_id'), $request->file('file_upload')); } else { $pack = $this->creationService->handle($request->normalize(), $request->file('file_upload')); diff --git a/app/Http/Controllers/Admin/ServersController.php b/app/Http/Controllers/Admin/ServersController.php index 1cd63a20..427bb7d2 100644 --- a/app/Http/Controllers/Admin/ServersController.php +++ b/app/Http/Controllers/Admin/ServersController.php @@ -524,7 +524,7 @@ class ServersController extends Controller */ public function delete(Request $request, Server $server) { - $this->deletionService->withForce($request->has('force_delete'))->handle($server); + $this->deletionService->withForce($request->filled('force_delete'))->handle($server); $this->alert->success(trans('admin/server.alerts.server_deleted'))->flash(); return redirect()->route('admin.servers'); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 8e67d9f1..127802d2 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -107,6 +107,8 @@ class LoginController extends Controller * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response + * + * @throws \Illuminate\Validation\ValidationException */ public function login(Request $request) { @@ -115,8 +117,7 @@ class LoginController extends Controller if ($this->hasTooManyLoginAttempts($request)) { $this->fireLockoutEvent($request); - - return $this->sendLockoutResponse($request); + $this->sendLockoutResponse($request); } try { diff --git a/app/Http/Controllers/Base/SecurityController.php b/app/Http/Controllers/Base/SecurityController.php index 62f07738..8a7babec 100644 --- a/app/Http/Controllers/Base/SecurityController.php +++ b/app/Http/Controllers/Base/SecurityController.php @@ -1,27 +1,4 @@ - * Some Modifications (c) 2015 Dylan Seidt . - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ namespace Pterodactyl\Http\Controllers\Base; diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 13a7b29c..9f418488 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -2,10 +2,10 @@ namespace Pterodactyl\Http; -use Fideloper\Proxy\TrustProxies; use Illuminate\Auth\Middleware\Authorize; use Illuminate\Auth\Middleware\Authenticate; use Pterodactyl\Http\Middleware\TrimStrings; +use Pterodactyl\Http\Middleware\TrustProxies; use Illuminate\Session\Middleware\StartSession; use Pterodactyl\Http\Middleware\EncryptCookies; use Pterodactyl\Http\Middleware\VerifyCsrfToken; @@ -23,6 +23,7 @@ use Pterodactyl\Http\Middleware\RedirectIfAuthenticated; use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth; use Pterodactyl\Http\Middleware\API\AuthenticateIPAccess; use Pterodactyl\Http\Middleware\Daemon\DaemonAuthenticate; +use Illuminate\Foundation\Http\Middleware\ValidatePostSize; use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse; use Pterodactyl\Http\Middleware\API\HasPermissionToResource; use Pterodactyl\Http\Middleware\Server\AuthenticateAsSubuser; @@ -31,6 +32,7 @@ use Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication; use Pterodactyl\Http\Middleware\Server\DatabaseBelongsToServer; use Pterodactyl\Http\Middleware\Server\ScheduleBelongsToServer; use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode; +use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull; use Pterodactyl\Http\Middleware\DaemonAuthenticate as OldDaemonAuthenticate; class Kernel extends HttpKernel @@ -42,9 +44,9 @@ class Kernel extends HttpKernel */ protected $middleware = [ CheckForMaintenanceMode::class, - EncryptCookies::class, - AddQueuedCookiesToResponse::class, + ValidatePostSize::class, TrimStrings::class, + ConvertEmptyStringsToNull::class, TrustProxies::class, ]; diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php new file mode 100644 index 00000000..f44f1d6e --- /dev/null +++ b/app/Http/Middleware/TrustProxies.php @@ -0,0 +1,29 @@ + 'FORWARDED', + Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', + Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', + Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', + Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', + ]; +} diff --git a/app/Http/Middleware/VerifyReCaptcha.php b/app/Http/Middleware/VerifyReCaptcha.php index 16c3a2f5..7464e854 100644 --- a/app/Http/Middleware/VerifyReCaptcha.php +++ b/app/Http/Middleware/VerifyReCaptcha.php @@ -39,7 +39,7 @@ class VerifyReCaptcha return $next($request); } - if ($request->has('g-recaptcha-response')) { + if ($request->filled('g-recaptcha-response')) { $client = new Client(); $res = $client->post($this->config->get('recaptcha.domain'), [ 'form_params' => [ diff --git a/app/Http/Requests/Admin/AdminFormRequest.php b/app/Http/Requests/Admin/AdminFormRequest.php index 7f7ce8cb..0e629373 100644 --- a/app/Http/Requests/Admin/AdminFormRequest.php +++ b/app/Http/Requests/Admin/AdminFormRequest.php @@ -44,9 +44,6 @@ abstract class AdminFormRequest extends FormRequest */ public function normalize($only = []) { - return array_merge( - $this->only($only), - $this->intersect(array_keys($this->rules())) - ); + return $this->all(empty($only) ? array_keys($this->rules()) : $only); } } diff --git a/app/Http/Requests/Admin/DatabaseHostFormRequest.php b/app/Http/Requests/Admin/DatabaseHostFormRequest.php index 1feb42ed..76a2f1e5 100644 --- a/app/Http/Requests/Admin/DatabaseHostFormRequest.php +++ b/app/Http/Requests/Admin/DatabaseHostFormRequest.php @@ -18,7 +18,7 @@ class DatabaseHostFormRequest extends AdminFormRequest */ public function rules() { - if (! $this->has('node_id')) { + if (! $this->filled('node_id')) { $this->merge(['node_id' => null]); } diff --git a/app/Http/Requests/Admin/UserFormRequest.php b/app/Http/Requests/Admin/UserFormRequest.php index d705c86e..757be434 100644 --- a/app/Http/Requests/Admin/UserFormRequest.php +++ b/app/Http/Requests/Admin/UserFormRequest.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Http\Requests\Admin; @@ -33,7 +26,7 @@ class UserFormRequest extends AdminFormRequest { if ($this->method === 'PATCH') { return array_merge( - $this->intersect('password'), + $this->all(['password']), $this->only(['email', 'username', 'name_first', 'name_last', 'root_admin', 'ignore_connection_error']) ); } diff --git a/app/Models/Pack.php b/app/Models/Pack.php index a029b361..5d172c25 100644 --- a/app/Models/Pack.php +++ b/app/Models/Pack.php @@ -9,8 +9,6 @@ namespace Pterodactyl\Models; -use File; -use Storage; use Sofa\Eloquence\Eloquence; use Sofa\Eloquence\Validable; use Illuminate\Database\Eloquent\Model; @@ -88,30 +86,6 @@ class Pack extends Model implements CleansAttributes, ValidableContract 'version' => 2, ]; - /** - * Returns all of the archived files for a given pack. - * - * @param bool $collection - * @return \Illuminate\Support\Collection|object - * @deprecated - */ - public function files($collection = false) - { - $files = collect(Storage::files('packs/' . $this->uuid)); - - $files = $files->map(function ($item) { - $path = storage_path('app/' . $item); - - return (object) [ - 'name' => basename($item), - 'hash' => sha1_file($path), - 'size' => File::humanReadableSize($path), - ]; - }); - - return ($collection) ? $files : (object) $files->all(); - } - /** * Gets egg associated with a service pack. * diff --git a/app/Policies/ServerPolicy.php b/app/Policies/ServerPolicy.php index c5e1860c..9b4db6f0 100644 --- a/app/Policies/ServerPolicy.php +++ b/app/Policies/ServerPolicy.php @@ -51,4 +51,17 @@ class ServerPolicy return $this->checkPermission($user, $server, $ability); } + + /** + * This is a horrendous hack to avoid Laravel's "smart" behavior that does + * not call the before() function if there isn't a function matching the + * policy permission. + * + * @param string $name + * @param mixed $arguments + */ + public function __call($name, $arguments) + { + // do nothing + } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index b3a7c33e..fdc7e2ac 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -12,8 +12,6 @@ use Illuminate\Support\ServiceProvider; use Pterodactyl\Observers\UserObserver; use Pterodactyl\Observers\ServerObserver; use Pterodactyl\Observers\SubuserObserver; -use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider; -use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider; class AppServiceProvider extends ServiceProvider { @@ -32,17 +30,6 @@ class AppServiceProvider extends ServiceProvider View::share('appIsGit', $this->versionData()['is_git'] ?? false); } - /** - * Register any application services. - */ - public function register() - { - if ($this->app->environment() !== 'production') { - $this->app->register(DebugbarServiceProvider::class); - $this->app->register(IdeHelperServiceProvider::class); - } - } - /** * Return version information for the footer. * diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index c7c928f1..2ecc663f 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -12,12 +12,4 @@ class EventServiceProvider extends ServiceProvider * @var array */ protected $listen = []; - - /** - * Register any other events for your application. - */ - public function boot() - { - parent::boot(); - } } diff --git a/app/Providers/SettingsServiceProvider.php b/app/Providers/SettingsServiceProvider.php index dc9e9cdc..40802f5c 100644 --- a/app/Providers/SettingsServiceProvider.php +++ b/app/Providers/SettingsServiceProvider.php @@ -87,6 +87,24 @@ class SettingsServiceProvider extends ServiceProvider } } + switch (strtolower($value)) { + case 'true': + case '(true)': + $value = true; + break; + case 'false': + case '(false)': + $value = false; + break; + case 'empty': + case '(empty)': + $value = ''; + break; + case 'null': + case '(null)': + $value = null; + } + $config->set(str_replace(':', '.', $key), $value); } } diff --git a/composer.json b/composer.json index 6b1271f8..091416ef 100644 --- a/composer.json +++ b/composer.json @@ -15,43 +15,40 @@ "ext-mbstring": "*", "ext-pdo_mysql": "*", "ext-zip": "*", - "appstract/laravel-blade-directives": "^0.6.0", - "aws/aws-sdk-php": "^3.29", - "daneeveritt/login-notifications": "^1.0", + "appstract/laravel-blade-directives": "^0.7", + "aws/aws-sdk-php": "^3.48", "doctrine/dbal": "^2.5", - "edvinaskrucas/settings": "^2.0", "fideloper/proxy": "^3.3", - "guzzlehttp/guzzle": "~6.3.0", + "guzzlehttp/guzzle": "^6.3", "hashids/hashids": "^2.0", "igaster/laravel-theme": "^1.16", "laracasts/utilities": "^3.0", - "laravel/framework": "5.4.27", - "laravel/tinker": "1.0.1", - "lord/laroute": "~2.4.5", + "laravel/framework": "5.5.*", + "laravel/tinker": "^1.0", + "lord/laroute": "^2.4", "matriphe/iso-639": "^1.2", "mtdowling/cron-expression": "^1.2", "nesbot/carbon": "^1.22", - "nicolaslopezj/searchable": "^1.9", "pragmarx/google2fa": "^2.0", "predis/predis": "^1.1", "prologue/alerts": "^0.4", "ramsey/uuid": "^3.7", "s1lentium/iptools": "^1.1", - "sofa/eloquence": "~5.4.1", - "spatie/laravel-fractal": "^4.0", - "watson/validating": "^3.0", + "sofa/eloquence-base": "v5.5", + "sofa/eloquence-validable": "v5.5", + "spatie/laravel-fractal": "^5.3", "webmozart/assert": "^1.2", - "webpatser/laravel-uuid": "^2.0", "znck/belongs-to-through": "^2.3" }, "require-dev": { - "barryvdh/laravel-debugbar": "^2.4", + "barryvdh/laravel-debugbar": "^3.1", "barryvdh/laravel-ide-helper": "^2.4", + "filp/whoops": "^2.1", "friendsofphp/php-cs-fixer": "^2.8.0", "fzaninotto/faker": "^1.6", - "mockery/mockery": "^0.9", - "php-mock/php-mock-phpunit": "^1.1", - "phpunit/phpunit": "^5.7" + "mockery/mockery": "^1.0", + "php-mock/php-mock-phpunit": "^2.0", + "phpunit/phpunit": "~6.4.0" }, "autoload": { "classmap": [ @@ -70,13 +67,15 @@ } }, "scripts": { - "post-install-cmd": [ - "Illuminate\\Foundation\\ComposerScripts::postInstall", - "php artisan optimize" + "post-root-package-install": [ + "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], - "post-update-cmd": [ - "Illuminate\\Foundation\\ComposerScripts::postUpdate", - "php artisan optimize" + "post-create-project-cmd": [ + "@php artisan key:generate" + ], + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover" ] }, "prefer-stable": true, diff --git a/composer.lock b/composer.lock index 139e3c1c..40dbb34d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "bd42f43877e96cca4d4af755c590eb25", + "content-hash": "5cdbf1cd4e3e64e939ca2201704d0141", "packages": [ { "name": "appstract/laravel-blade-directives", - "version": "0.6.0", + "version": "0.7.0", "source": { "type": "git", "url": "https://github.com/appstract/laravel-blade-directives.git", - "reference": "3b0e146b3f2511d69e51160e7312ed5e57616460" + "reference": "8e8627f191e968ae48a3ce0a7e9118f497a705fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appstract/laravel-blade-directives/zipball/3b0e146b3f2511d69e51160e7312ed5e57616460", - "reference": "3b0e146b3f2511d69e51160e7312ed5e57616460", + "url": "https://api.github.com/repos/appstract/laravel-blade-directives/zipball/8e8627f191e968ae48a3ce0a7e9118f497a705fb", + "reference": "8e8627f191e968ae48a3ce0a7e9118f497a705fb", "shasum": "" }, "require": { @@ -57,20 +57,20 @@ "appstract", "laravel-blade-directives" ], - "time": "2017-10-13T08:41:27+00:00" + "time": "2017-11-09T19:31:07+00:00" }, { "name": "aws/aws-sdk-php", - "version": "3.38.1", + "version": "3.48.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "9f704274f4748d2039a16d45b3388ed8dde74e89" + "reference": "f5aef5671cd7f6e3b9ede0a3ff17c131cc05f4d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/9f704274f4748d2039a16d45b3388ed8dde74e89", - "reference": "9f704274f4748d2039a16d45b3388ed8dde74e89", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f5aef5671cd7f6e3b9ede0a3ff17c131cc05f4d3", + "reference": "f5aef5671cd7f6e3b9ede0a3ff17c131cc05f4d3", "shasum": "" }, "require": { @@ -92,7 +92,7 @@ "ext-dom": "*", "ext-openssl": "*", "nette/neon": "^2.3", - "phpunit/phpunit": "^4.8.35|^5.4.0", + "phpunit/phpunit": "^4.8.35|^5.4.3", "psr/cache": "^1.0" }, "suggest": { @@ -137,52 +137,7 @@ "s3", "sdk" ], - "time": "2017-11-09T19:15:59+00:00" - }, - { - "name": "daneeveritt/login-notifications", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/DaneEveritt/login-notifications.git", - "reference": "a12e9b25e9a5e42d3f25c16579ba6dc2b8aba910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/DaneEveritt/login-notifications/zipball/a12e9b25e9a5e42d3f25c16579ba6dc2b8aba910", - "reference": "a12e9b25e9a5e42d3f25c16579ba6dc2b8aba910", - "shasum": "" - }, - "require": { - "laravel/framework": "~5.3.0|~5.4.0", - "nesbot/carbon": "1.22.*", - "php": "^5.6|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "DaneEveritt\\LoginNotifications\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dane Everitt", - "email": "dane@daneeveritt.com" - } - ], - "description": "Login notifications for Laravel", - "keywords": [ - "email", - "events", - "laravel", - "login", - "notifications" - ], - "time": "2017-04-14T20:57:26+00:00" + "time": "2017-12-15T19:49:31+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -688,22 +643,82 @@ "time": "2014-09-09T13:34:57+00:00" }, { - "name": "erusev/parsedown", - "version": "1.6.3", + "name": "egulias/email-validator", + "version": "2.1.3", "source": { "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "728952b90a333b5c6f77f06ea9422b94b585878d" + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d", - "reference": "728952b90a333b5c6f77f06ea9422b94b585878d", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/1bec00a10039b823cc94eef4eddd47dcd3b2ca04", + "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.0.1", + "php": ">= 5.5" + }, + "require-dev": { + "dominicsayers/isemail": "dev-master", + "phpunit/phpunit": "^4.8.35", + "satooshi/php-coveralls": "^1.0.1" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "EmailValidator" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "time": "2017-11-15T23:40:40+00:00" + }, + { + "name": "erusev/parsedown", + "version": "1.6.4", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "fbe3fe878f4fe69048bb8a52783a09802004f548" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/fbe3fe878f4fe69048bb8a52783a09802004f548", + "reference": "fbe3fe878f4fe69048bb8a52783a09802004f548", "shasum": "" }, "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, "type": "library", "autoload": { "psr-0": { @@ -727,7 +742,7 @@ "markdown", "parser" ], - "time": "2017-05-14T14:47:48+00:00" + "time": "2017-11-14T20:44:03+00:00" }, { "name": "fideloper/proxy", @@ -1235,39 +1250,40 @@ }, { "name": "laravel/framework", - "version": "v5.4.27", + "version": "v5.5.25", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "66f5e1b37cbd66e730ea18850ded6dc0ad570404" + "reference": "0a5b6112f325c56ae5a6679c08a0a10723153fe0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/66f5e1b37cbd66e730ea18850ded6dc0ad570404", - "reference": "66f5e1b37cbd66e730ea18850ded6dc0ad570404", + "url": "https://api.github.com/repos/laravel/framework/zipball/0a5b6112f325c56ae5a6679c08a0a10723153fe0", + "reference": "0a5b6112f325c56ae5a6679c08a0a10723153fe0", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", + "doctrine/inflector": "~1.1", "erusev/parsedown": "~1.6", "ext-mbstring": "*", "ext-openssl": "*", "league/flysystem": "~1.0", - "monolog/monolog": "~1.11", + "monolog/monolog": "~1.12", "mtdowling/cron-expression": "~1.0", "nesbot/carbon": "~1.20", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4", + "php": ">=7.0", + "psr/container": "~1.0", + "psr/simple-cache": "^1.0", "ramsey/uuid": "~3.0", - "swiftmailer/swiftmailer": "~5.4", - "symfony/console": "~3.2", - "symfony/debug": "~3.2", - "symfony/finder": "~3.2", - "symfony/http-foundation": "~3.2", - "symfony/http-kernel": "~3.2", - "symfony/process": "~3.2", - "symfony/routing": "~3.2", - "symfony/var-dumper": "~3.2", + "swiftmailer/swiftmailer": "~6.0", + "symfony/console": "~3.3", + "symfony/debug": "~3.3", + "symfony/finder": "~3.3", + "symfony/http-foundation": "~3.3", + "symfony/http-kernel": "~3.3", + "symfony/process": "~3.3", + "symfony/routing": "~3.3", + "symfony/var-dumper": "~3.3", "tijsverkoyen/css-to-inline-styles": "~2.2", "vlucas/phpdotenv": "~2.2" }, @@ -1284,7 +1300,6 @@ "illuminate/database": "self.version", "illuminate/encryption": "self.version", "illuminate/events": "self.version", - "illuminate/exception": "self.version", "illuminate/filesystem": "self.version", "illuminate/hashing": "self.version", "illuminate/http": "self.version", @@ -1306,33 +1321,38 @@ "require-dev": { "aws/aws-sdk-php": "~3.0", "doctrine/dbal": "~2.5", - "mockery/mockery": "~0.9.4", + "filp/whoops": "^2.1.4", + "mockery/mockery": "~1.0", + "orchestra/testbench-core": "3.5.*", "pda/pheanstalk": "~3.0", - "phpunit/phpunit": "~5.7", - "predis/predis": "~1.0", - "symfony/css-selector": "~3.2", - "symfony/dom-crawler": "~3.2" + "phpunit/phpunit": "~6.0", + "predis/predis": "^1.1.1", + "symfony/css-selector": "~3.3", + "symfony/dom-crawler": "~3.3" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", + "ext-pcntl": "Required to use all features of the queue worker.", + "ext-posix": "Required to use all features of the queue worker.", "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", "laravel/tinker": "Required to use the tinker console command (~1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-cached-adapter": "Required to use Flysystem caching (~1.0).", "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", "nexmo/client": "Required to use the Nexmo transport (~1.0).", "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.2).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.2).", - "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.3).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.3).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -1360,20 +1380,20 @@ "framework", "laravel" ], - "time": "2017-06-15T19:08:25+00:00" + "time": "2017-12-11T14:59:28+00:00" }, { "name": "laravel/tinker", - "version": "v1.0.1", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "7eb2e281395131897407285672ef5532e87e17f9" + "reference": "203978fd67f118902acff95925847e70b72e3daf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/7eb2e281395131897407285672ef5532e87e17f9", - "reference": "7eb2e281395131897407285672ef5532e87e17f9", + "url": "https://api.github.com/repos/laravel/tinker/zipball/203978fd67f118902acff95925847e70b72e3daf", + "reference": "203978fd67f118902acff95925847e70b72e3daf", "shasum": "" }, "require": { @@ -1423,7 +1443,7 @@ "laravel", "psysh" ], - "time": "2017-06-01T16:31:26+00:00" + "time": "2017-07-13T13:11:05+00:00" }, { "name": "league/flysystem", @@ -1897,52 +1917,6 @@ ], "time": "2017-01-16T07:55:07+00:00" }, - { - "name": "nicolaslopezj/searchable", - "version": "1.9.6", - "source": { - "type": "git", - "url": "https://github.com/nicolaslopezj/searchable.git", - "reference": "c067f11a993c274c9da0d4a2e70ca07614bb92da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nicolaslopezj/searchable/zipball/c067f11a993c274c9da0d4a2e70ca07614bb92da", - "reference": "c067f11a993c274c9da0d4a2e70ca07614bb92da", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "illuminate/database": "4.2.x|~5.0", - "php": ">=5.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Nicolaslopezj\\Searchable\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Lopez", - "email": "nicolaslopezj@me.com" - } - ], - "description": "Eloquent model search trait.", - "keywords": [ - "database", - "eloquent", - "laravel", - "model", - "search", - "searchable" - ], - "time": "2017-08-09T04:37:57+00:00" - }, { "name": "nikic/php-parser", "version": "v3.1.2", @@ -2265,6 +2239,55 @@ ], "time": "2017-01-24T13:22:25+00:00" }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -2363,17 +2386,65 @@ "time": "2016-10-10T12:19:37+00:00" }, { - "name": "psy/psysh", - "version": "v0.8.14", + "name": "psr/simple-cache", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/bobthecow/psysh.git", - "reference": "91e53c16560bdb8b9592544bb38429ae00d6baee" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/91e53c16560bdb8b9592544bb38429ae00d6baee", - "reference": "91e53c16560bdb8b9592544bb38429ae00d6baee", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-01-02T13:31:39+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.8.16", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "d4c8eab0683dc056f2ca54ca67f5388527c068b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/d4c8eab0683dc056f2ca54ca67f5388527c068b1", + "reference": "d4c8eab0683dc056f2ca54ca67f5388527c068b1", "shasum": "" }, "require": { @@ -2381,14 +2452,13 @@ "jakub-onderka/php-console-highlighter": "0.3.*", "nikic/php-parser": "~1.3|~2.0|~3.0", "php": ">=5.3.9", - "symfony/console": "~2.3.10|^2.4.2|~3.0", - "symfony/var-dumper": "~2.7|~3.0" + "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", + "symfony/var-dumper": "~2.7|~3.0|~4.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~1.11", "hoa/console": "~3.16|~1.14", - "phpunit/phpunit": "~4.4|~5.0", - "symfony/finder": "~2.1|~3.0" + "phpunit/phpunit": "^4.8.35|^5.4.3", + "symfony/finder": "~2.1|~3.0|~4.0" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -2433,7 +2503,7 @@ "interactive", "shell" ], - "time": "2017-11-04T16:06:49+00:00" + "time": "2017-12-10T21:49:27+00:00" }, { "name": "ramsey/uuid", @@ -2568,23 +2638,23 @@ "time": "2016-08-21T15:57:09+00:00" }, { - "name": "sofa/eloquence", - "version": "5.4.1", + "name": "sofa/eloquence-base", + "version": "v5.5", "source": { "type": "git", - "url": "https://github.com/jarektkaczyk/eloquence.git", - "reference": "6f821bcf24950b58e633cb0cac7bbee6acb0f34a" + "url": "https://github.com/jarektkaczyk/eloquence-base.git", + "reference": "41e9b10073d0592b37437cdd06eea40a2b86f3e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jarektkaczyk/eloquence/zipball/6f821bcf24950b58e633cb0cac7bbee6acb0f34a", - "reference": "6f821bcf24950b58e633cb0cac7bbee6acb0f34a", + "url": "https://api.github.com/repos/jarektkaczyk/eloquence-base/zipball/41e9b10073d0592b37437cdd06eea40a2b86f3e0", + "reference": "41e9b10073d0592b37437cdd06eea40a2b86f3e0", "shasum": "" }, "require": { - "illuminate/database": "5.4.*", - "php": ">=5.6.4", - "sofa/hookable": "5.4.*" + "illuminate/database": "5.5.*", + "php": ">=7.0.0", + "sofa/hookable": "5.5.*" }, "require-dev": { "mockery/mockery": "0.9.4", @@ -2592,6 +2662,13 @@ "squizlabs/php_codesniffer": "2.3.3" }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "Sofa\\Eloquence\\BaseServiceProvider" + ] + } + }, "autoload": { "psr-4": { "Sofa\\Eloquence\\": "src" @@ -2608,7 +2685,7 @@ { "name": "Jarek Tkaczyk", "email": "jarek@softonsofa.com", - "homepage": "http://softonsofa.com/", + "homepage": "https://softonsofa.com/", "role": "Developer" } ], @@ -2621,24 +2698,76 @@ "mutable", "searchable" ], - "time": "2017-04-22T14:38:11+00:00" + "time": "2017-10-13T14:26:50+00:00" }, { - "name": "sofa/hookable", - "version": "5.4.1", + "name": "sofa/eloquence-validable", + "version": "v5.5", "source": { "type": "git", - "url": "https://github.com/jarektkaczyk/hookable.git", - "reference": "1791d001bdf483136a11b3ea600462f446b82401" + "url": "https://github.com/jarektkaczyk/eloquence-validable.git", + "reference": "ac93ec8180558d3c70328de166c33a765732bb12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jarektkaczyk/hookable/zipball/1791d001bdf483136a11b3ea600462f446b82401", - "reference": "1791d001bdf483136a11b3ea600462f446b82401", + "url": "https://api.github.com/repos/jarektkaczyk/eloquence-validable/zipball/ac93ec8180558d3c70328de166c33a765732bb12", + "reference": "ac93ec8180558d3c70328de166c33a765732bb12", "shasum": "" }, "require": { - "illuminate/database": "5.3.*|5.4.*", + "php": ">=7.0.0", + "sofa/eloquence-base": "5.5.*" + }, + "require-dev": { + "mockery/mockery": "0.9.4", + "phpunit/phpunit": "4.5.0", + "squizlabs/php_codesniffer": "2.3.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sofa\\Eloquence\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jarek Tkaczyk", + "email": "jarek@softonsofa.com", + "homepage": "https://softonsofa.com/", + "role": "Developer" + } + ], + "description": "Flexible Searchable, Mappable, Metable, Validation and more extensions for Laravel Eloquent ORM.", + "keywords": [ + "eloquent", + "laravel", + "mappable", + "metable", + "mutable", + "searchable" + ], + "time": "2017-10-13T14:42:08+00:00" + }, + { + "name": "sofa/hookable", + "version": "v5.5.1", + "source": { + "type": "git", + "url": "https://github.com/jarektkaczyk/hookable.git", + "reference": "7eb58b5cadeebca4ef74d5bd742dd4ff93348524" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jarektkaczyk/hookable/zipball/7eb58b5cadeebca4ef74d5bd742dd4ff93348524", + "reference": "7eb58b5cadeebca4ef74d5bd742dd4ff93348524", + "shasum": "" + }, + "require": { + "illuminate/database": "5.3.*|5.4.*|5.5.*", "php": ">=5.6.4" }, "require-dev": { @@ -2667,7 +2796,7 @@ "eloquent", "laravel" ], - "time": "2017-05-27T15:48:52+00:00" + "time": "2017-11-17T14:11:31+00:00" }, { "name": "spatie/fractalistic", @@ -2722,27 +2851,27 @@ }, { "name": "spatie/laravel-fractal", - "version": "4.5.0", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-fractal.git", - "reference": "445364122d4e6d6da6f599939962e689668c2b5f" + "reference": "f395eb645cd454b209bc628f974ed137d16e03da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-fractal/zipball/445364122d4e6d6da6f599939962e689668c2b5f", - "reference": "445364122d4e6d6da6f599939962e689668c2b5f", + "url": "https://api.github.com/repos/spatie/laravel-fractal/zipball/f395eb645cd454b209bc628f974ed137d16e03da", + "reference": "f395eb645cd454b209bc628f974ed137d16e03da", "shasum": "" }, "require": { - "illuminate/contracts": "~5.1.0|~5.2.0|~5.3.0|~5.4.0", - "illuminate/support": "~5.1.0|~5.2.0|~5.3.0|~5.4.0", - "php": "^5.6|^7.0", + "illuminate/contracts": "~5.5.0", + "illuminate/support": "~5.5.0", + "php": "^7.0", "spatie/fractalistic": "^2.5" }, "require-dev": { - "orchestra/testbench": "~3.2.0|3.3.0|~3.4.0", - "phpunit/phpunit": "^5.7.5" + "orchestra/testbench": "~3.5.0", + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { @@ -2786,33 +2915,34 @@ "spatie", "transform" ], - "time": "2017-08-22T17:52:05+00:00" + "time": "2017-11-28T16:33:26+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v5.4.8", + "version": "v6.0.2", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517" + "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/9a06dc570a0367850280eefd3f1dc2da45aef517", - "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/412333372fb6c8ffb65496a2bbd7321af75733fc", + "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc", "shasum": "" }, "require": { - "php": ">=5.3.3" + "egulias/email-validator": "~2.0", + "php": ">=7.0.0" }, "require-dev": { "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.2" + "symfony/phpunit-bridge": "~3.3@dev" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -2834,13 +2964,13 @@ } ], "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.org", + "homepage": "http://swiftmailer.symfony.com", "keywords": [ "email", "mail", "mailer" ], - "time": "2017-05-01T15:54:03+00:00" + "time": "2017-09-30T22:39:41+00:00" }, { "name": "symfony/console", @@ -3795,56 +3925,6 @@ ], "time": "2016-09-01T10:05:43+00:00" }, - { - "name": "watson/validating", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/dwightwatson/validating.git", - "reference": "22edd06d45893f5d4f79c9e901bd7fbce174a79f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dwightwatson/validating/zipball/22edd06d45893f5d4f79c9e901bd7fbce174a79f", - "reference": "22edd06d45893f5d4f79c9e901bd7fbce174a79f", - "shasum": "" - }, - "require": { - "illuminate/contracts": ">=5.3", - "illuminate/database": ">=5.3", - "illuminate/events": ">=5.3", - "illuminate/support": ">=5.3", - "illuminate/validation": ">=5.3", - "php": ">=5.4.0" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Watson\\Validating\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dwight Watson", - "email": "dwight@studiousapp.com" - } - ], - "description": "Eloquent model validating trait.", - "keywords": [ - "eloquent", - "laravel", - "validation" - ], - "time": "2017-11-06T21:35:49+00:00" - }, { "name": "webmozart/assert", "version": "1.2.0", @@ -3895,60 +3975,6 @@ ], "time": "2016-11-23T20:04:58+00:00" }, - { - "name": "webpatser/laravel-uuid", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/webpatser/laravel-uuid.git", - "reference": "c87d5c631938edad7aae96d27881e3ea3de23d80" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webpatser/laravel-uuid/zipball/c87d5c631938edad7aae96d27881e3ea3de23d80", - "reference": "c87d5c631938edad7aae96d27881e3ea3de23d80", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "fzaninotto/faker": "1.5.*", - "phpunit/phpunit": "4.7.*" - }, - "suggest": { - "paragonie/random_compat": "A random_bytes Php 5.x polyfill." - }, - "type": "library", - "extra": { - "laravel": { - "aliases": { - "Uuid": "Webpatser\\Uuid\\Uuid" - } - } - }, - "autoload": { - "psr-0": { - "Webpatser\\Uuid": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christoph Kempen", - "email": "christoph@downsized.nl" - } - ], - "description": "Class to generate a UUID according to the RFC 4122 standard. Support for version 1, 3, 4 and 5 UUID are built-in.", - "homepage": "https://github.com/webpatser/uuid", - "keywords": [ - "UUID RFC4122" - ], - "time": "2017-09-10T21:34:32+00:00" - }, { "name": "znck/belongs-to-through", "version": "v2.3.1", @@ -4005,25 +4031,44 @@ "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v2.4.3", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "d7c88f08131f6404cb714f3f6cf0642f6afa3903" + "reference": "01a859752094e00aa8548832312366753272f8af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/d7c88f08131f6404cb714f3f6cf0642f6afa3903", - "reference": "d7c88f08131f6404cb714f3f6cf0642f6afa3903", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/01a859752094e00aa8548832312366753272f8af", + "reference": "01a859752094e00aa8548832312366753272f8af", "shasum": "" }, "require": { - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*", - "maximebf/debugbar": "~1.13.0", - "php": ">=5.5.9", - "symfony/finder": "~2.7|~3.0" + "illuminate/routing": "5.5.x", + "illuminate/session": "5.5.x", + "illuminate/support": "5.5.x", + "maximebf/debugbar": "~1.14.0", + "php": ">=7.0", + "symfony/debug": "^3", + "symfony/finder": "^3" + }, + "require-dev": { + "illuminate/framework": "5.5.x" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, "autoload": { "psr-4": { "Barryvdh\\Debugbar\\": "src/" @@ -4050,7 +4095,7 @@ "profiler", "webprofiler" ], - "time": "2017-07-21T11:56:48+00:00" + "time": "2017-09-18T13:32:46+00:00" }, { "name": "barryvdh/laravel-ide-helper", @@ -4291,17 +4336,78 @@ "time": "2015-06-14T21:17:01+00:00" }, { - "name": "friendsofphp/php-cs-fixer", - "version": "v2.8.1", + "name": "filp/whoops", + "version": "2.1.14", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "04f71e56e03ba2627e345e8c949c80dcef0e683e" + "url": "https://github.com/filp/whoops.git", + "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/04f71e56e03ba2627e345e8c949c80dcef0e683e", - "reference": "04f71e56e03ba2627e345e8c949c80dcef0e683e", + "url": "https://api.github.com/repos/filp/whoops/zipball/c6081b8838686aa04f1e83ba7e91f78b7b2a23e6", + "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0", + "psr/log": "^1.0.1" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "symfony/var-dumper": "^2.6 || ^3.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "time": "2017-11-23T18:22:44+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.9.0", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "454ddbe65da6a9297446f442bad244e8a99a9a38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/454ddbe65da6a9297446f442bad244e8a99a9a38", + "reference": "454ddbe65da6a9297446f442bad244e8a99a9a38", "shasum": "" }, "require": { @@ -4328,7 +4434,8 @@ "require-dev": { "johnkary/phpunit-speedtrap": "^1.1 || ^2.0@dev", "justinrainbow/json-schema": "^5.0", - "php-coveralls/php-coveralls": "^1.0.2", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.0", "php-cs-fixer/accessible-object": "^1.0", "phpunit/phpunit": "^5.7.23 || ^6.4.3", "symfony/phpunit-bridge": "^3.2.2 || ^4.0" @@ -4368,7 +4475,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2017-11-09T13:31:39+00:00" + "time": "2017-12-08T16:36:20+00:00" }, { "name": "fzaninotto/faker", @@ -4471,20 +4578,20 @@ }, { "name": "hamcrest/hamcrest-php", - "version": "v1.2.2", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^5.3|^7.0" }, "replace": { "cordoval/hamcrest-php": "*", @@ -4493,15 +4600,18 @@ }, "require-dev": { "phpunit/php-file-iterator": "1.3.3", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "hamcrest" - ], - "files": [ - "hamcrest/Hamcrest.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -4512,20 +4622,20 @@ "keywords": [ "test" ], - "time": "2015-05-11T14:41:42+00:00" + "time": "2016-01-20T08:20:44+00:00" }, { "name": "maximebf/debugbar", - "version": "1.13.1", + "version": "v1.14.1", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "afee79a236348e39a44cb837106b7c5b4897ac2a" + "reference": "64251a392344e3d22f3d21c3b7c531ba96eb01d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/afee79a236348e39a44cb837106b7c5b4897ac2a", - "reference": "afee79a236348e39a44cb837106b7c5b4897ac2a", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/64251a392344e3d22f3d21c3b7c531ba96eb01d2", + "reference": "64251a392344e3d22f3d21c3b7c531ba96eb01d2", "shasum": "" }, "require": { @@ -4544,7 +4654,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4573,34 +4683,34 @@ "debug", "debugbar" ], - "time": "2017-01-05T08:46:19+00:00" + "time": "2017-09-13T12:19:36+00:00" }, { "name": "mockery/mockery", - "version": "0.9.9", + "version": "1.0", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856" + "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/6fdb61243844dc924071d3404bb23994ea0b6856", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1bac8c362b12f522fdd1f1fa3556284c91affa38", + "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "~1.1", + "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.3.2" + "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~5.7|~6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -4625,7 +4735,7 @@ } ], "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", + "homepage": "http://github.com/mockery/mockery", "keywords": [ "BDD", "TDD", @@ -4638,7 +4748,7 @@ "test double", "testing" ], - "time": "2017-02-28T12:52:32+00:00" + "time": "2017-10-06T16:20:43+00:00" }, { "name": "myclabs/deep-copy", @@ -4685,6 +4795,108 @@ ], "time": "2017-10-19T19:58:43+00:00" }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, { "name": "php-cs-fixer/diff", "version": "v1.2.0", @@ -4735,30 +4947,29 @@ }, { "name": "php-mock/php-mock", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock.git", - "reference": "bfa2d17d64dbf129073a7ba2051a96ce52749570" + "reference": "22d297231118e6fd5b9db087fbe1ef866c2b95d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock/zipball/bfa2d17d64dbf129073a7ba2051a96ce52749570", - "reference": "bfa2d17d64dbf129073a7ba2051a96ce52749570", + "url": "https://api.github.com/repos/php-mock/php-mock/zipball/22d297231118e6fd5b9db087fbe1ef866c2b95d2", + "reference": "22d297231118e6fd5b9db087fbe1ef866c2b95d2", "shasum": "" }, "require": { - "php": ">=5.5", + "php": ">=5.6", "phpunit/php-text-template": "^1" }, "replace": { "malkusch/php-mock": "*" }, "require-dev": { - "phpunit/phpunit": "^4|^5" + "phpunit/phpunit": "^5.7" }, "suggest": { - "php-mock/php-mock-mockery": "Allows using PHPMockery for Mockery integration", "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock." }, "type": "library", @@ -4766,7 +4977,7 @@ "psr-4": { "phpmock\\": [ "classes/", - "tests/unit/" + "tests/" ] } }, @@ -4793,25 +5004,25 @@ "test", "test double" ], - "time": "2015-11-11T22:37:09+00:00" + "time": "2017-02-17T20:52:52+00:00" }, { "name": "php-mock/php-mock-integration", - "version": "1.0.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock-integration.git", - "reference": "e83fb65dd20cd3cf250d554cbd4682b96b684f4b" + "reference": "5a0d7d7755f823bc2a230cfa45058b40f9013bc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/e83fb65dd20cd3cf250d554cbd4682b96b684f4b", - "reference": "e83fb65dd20cd3cf250d554cbd4682b96b684f4b", + "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/5a0d7d7755f823bc2a230cfa45058b40f9013bc4", + "reference": "5a0d7d7755f823bc2a230cfa45058b40f9013bc4", "shasum": "" }, "require": { - "php": ">=5.5", - "php-mock/php-mock": "^1", + "php": ">=5.6", + "php-mock/php-mock": "^2", "phpunit/php-text-template": "^1" }, "require-dev": { @@ -4846,29 +5057,26 @@ "test", "test double" ], - "time": "2015-10-26T21:21:42+00:00" + "time": "2017-02-17T21:31:34+00:00" }, { "name": "php-mock/php-mock-phpunit", - "version": "1.1.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock-phpunit.git", - "reference": "359e3038c016cee4c8f8db6387bcab3fcdebada0" + "reference": "b42fc41ecb7538564067527f6c30b8854f149d32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/359e3038c016cee4c8f8db6387bcab3fcdebada0", - "reference": "359e3038c016cee4c8f8db6387bcab3fcdebada0", + "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/b42fc41ecb7538564067527f6c30b8854f149d32", + "reference": "b42fc41ecb7538564067527f6c30b8854f149d32", "shasum": "" }, "require": { - "php": ">=5.5", - "php-mock/php-mock-integration": "^1", - "phpunit/phpunit": "^4.0.0 || ^5.0.0" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "3.2.0" + "php": ">=7", + "php-mock/php-mock-integration": "^2", + "phpunit/phpunit": "^6 <6.5" }, "type": "library", "autoload": { @@ -4900,7 +5108,7 @@ "test", "test double" ], - "time": "2016-06-15T23:36:13+00:00" + "time": "2017-12-02T09:49:02+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -4958,29 +5166,35 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.1.1", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2" + "reference": "66465776cfc249844bde6d117abff1d22e06c2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2", - "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/66465776cfc249844bde6d117abff1d22e06c2da", + "reference": "66465776cfc249844bde6d117abff1d22e06c2da", "shasum": "" }, "require": { "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/reflection-common": "^1.0.0", "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -4999,7 +5213,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-08-30T18:51:59+00:00" + "time": "2017-11-27T17:38:31+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -5050,16 +5264,16 @@ }, { "name": "phpspec/prophecy", - "version": "v1.7.2", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6" + "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", + "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", "shasum": "" }, "require": { @@ -5071,7 +5285,7 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7" }, "type": "library", "extra": { @@ -5109,44 +5323,44 @@ "spy", "stub" ], - "time": "2017-09-04T11:05:03+00:00" + "time": "2017-11-24T13:59:53+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "4.0.8", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1", + "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.2 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", - "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "^1.0 || ^2.0" + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": "^2.1.4", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-xdebug": "^2.5.1" + "ext-xdebug": "^2.5.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "5.3.x-dev" } }, "autoload": { @@ -5161,7 +5375,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -5172,20 +5386,20 @@ "testing", "xunit" ], - "time": "2017-04-02T07:44:40+00:00" + "time": "2017-12-06T09:29:45+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.2", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -5219,7 +5433,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03T07:40:28+00:00" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -5313,16 +5527,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0", - "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { @@ -5358,20 +5572,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-08-20T05:47:52+00:00" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.23", + "version": "6.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "78532d5269d984660080d8e0f4c99c5c2ea65ffe" + "reference": "562f7dc75d46510a4ed5d16189ae57fbe45a9932" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/78532d5269d984660080d8e0f4c99c5c2ea65ffe", - "reference": "78532d5269d984660080d8e0f4c99c5c2ea65ffe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/562f7dc75d46510a4ed5d16189ae57fbe45a9932", + "reference": "562f7dc75d46510a4ed5d16189ae57fbe45a9932", "shasum": "" }, "require": { @@ -5380,33 +5594,35 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.6.2", - "phpunit/php-code-coverage": "^4.0.4", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "^1.2.4", - "sebastian/diff": "^1.4.3", - "sebastian/environment": "^1.3.4 || ^2.0", - "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.1", - "sebastian/object-enumerator": "~2.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0" + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.2.2", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^4.0.3", + "sebastian/comparator": "^2.0.2", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", - "phpunit/php-invoker": "~1.1" + "phpunit/php-invoker": "^1.1" }, "bin": [ "phpunit" @@ -5414,7 +5630,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.7.x-dev" + "dev-master": "6.4.x-dev" } }, "autoload": { @@ -5440,33 +5656,33 @@ "testing", "xunit" ], - "time": "2017-10-15T06:13:55+00:00" + "time": "2017-11-08T11:26:09+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.4.4", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" + "reference": "2f789b59ab89669015ad984afa350c4ec577ade0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", - "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0", + "reference": "2f789b59ab89669015ad984afa350c4ec577ade0", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.0" }, "conflict": { - "phpunit/phpunit": "<5.4.0" + "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "^5.4" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-soap": "*" @@ -5474,7 +5690,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -5499,7 +5715,7 @@ "mock", "xunit" ], - "time": "2017-06-30T09:13:00+00:00" + "time": "2017-08-03T14:08:16+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5548,30 +5764,30 @@ }, { "name": "sebastian/comparator", - "version": "1.2.4", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "reference": "1174d9018191e93cb9d719edec01257fc05f8158" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158", + "reference": "1174d9018191e93cb9d719edec01257fc05f8158", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": "^7.0", + "sebastian/diff": "^2.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -5602,38 +5818,38 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "time": "2017-11-03T07:16:52+00:00" }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -5660,32 +5876,32 @@ "keywords": [ "diff" ], - "time": "2017-05-22T07:24:03+00:00" + "time": "2017-08-03T08:09:46+00:00" }, { "name": "sebastian/environment", - "version": "2.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^5.0" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -5710,34 +5926,34 @@ "environment", "hhvm" ], - "time": "2016-11-26T07:53:53+00:00" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", - "version": "2.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~2.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -5777,27 +5993,27 @@ "export", "exporter" ], - "time": "2016-11-19T08:54:04+00:00" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -5805,7 +6021,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -5828,33 +6044,34 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", - "version": "2.0.1", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~2.0" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -5874,32 +6091,77 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18T15:18:39+00:00" + "time": "2017-08-03T12:35:26+00:00" }, { - "name": "sebastian/recursion-context", - "version": "2.0.0", + "name": "sebastian/object-reflector", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -5927,7 +6189,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19T07:33:16+00:00" + "time": "2017-03-03T06:23:57+00:00" }, { "name": "sebastian/resource-operations", @@ -6337,59 +6599,44 @@ "time": "2017-04-12T14:14:56+00:00" }, { - "name": "symfony/yaml", - "version": "v3.3.6", + "name": "theseer/tokenizer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ddc23324e6cfe066f3dd34a37ff494fa80b617ed", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-07-23T12:43:26+00:00" + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" } ], "aliases": [], diff --git a/config/app.php b/config/app.php index d56b8063..5ffe58f2 100644 --- a/config/app.php +++ b/config/app.php @@ -1,10 +1,15 @@ env('APP_ENV', 'production'), + /* + |-------------------------------------------------------------------------- + | Application Version + |-------------------------------------------------------------------------- + | This value is set when creating a Pterodactyl release. You should not + | change this value if you are not maintaining your own internal versions. + */ - 'version' => env('APP_VERSION', 'canary'), + 'version' => 'canary', /* |-------------------------------------------------------------------------- @@ -15,8 +20,22 @@ return [ | framework needs to place the application's name in a notification or | any other location as required by the application or its packages. */ + 'name' => env('APP_NAME', 'Pterodactyl'), + /* + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services your application utilizes. Set this in your ".env" file. + | + */ + + 'env' => env('APP_ENV', 'production'), + /* |-------------------------------------------------------------------------- | Application Debug Mode @@ -93,7 +112,7 @@ return [ | */ - 'key' => env('APP_KEY', 'SomeRandomString3232RandomString'), + 'key' => env('APP_KEY'), 'cipher' => 'AES-256-CBC', @@ -112,7 +131,7 @@ return [ 'log' => env('APP_LOG', 'daily'), - 'log_level' => env('APP_LOG_LEVEL', 'debug'), + 'log_level' => env('APP_LOG_LEVEL', 'info'), /* |-------------------------------------------------------------------------- @@ -141,6 +160,7 @@ return [ Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class, Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class, @@ -149,12 +169,6 @@ return [ Illuminate\Session\SessionServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, - Illuminate\Notifications\NotificationServiceProvider::class, - - /* - * Package Service Providers... - */ - Laravel\Tinker\TinkerServiceProvider::class, /* * Application Service Providers... @@ -175,12 +189,7 @@ return [ */ igaster\laravelTheme\themeServiceProvider::class, Prologue\Alerts\AlertsServiceProvider::class, - Fideloper\Proxy\TrustedProxyServiceProvider::class, - Laracasts\Utilities\JavaScript\JavaScriptServiceProvider::class, Lord\Laroute\LarouteServiceProvider::class, - Spatie\Fractal\FractalServiceProvider::class, - Sofa\Eloquence\ServiceProvider::class, - Appstract\BladeDirectives\BladeDirectivesServiceProvider::class, ], /* @@ -205,17 +214,14 @@ return [ 'Carbon' => Carbon\Carbon::class, 'Config' => Illuminate\Support\Facades\Config::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Cron' => Cron\CronExpression::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class, 'DB' => Illuminate\Support\Facades\DB::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Event' => Illuminate\Support\Facades\Event::class, 'File' => Illuminate\Support\Facades\File::class, - 'Fractal' => Spatie\Fractal\FractalFacade::class, 'Gate' => Illuminate\Support\Facades\Gate::class, 'Hash' => Illuminate\Support\Facades\Hash::class, 'Input' => Illuminate\Support\Facades\Input::class, - 'Inspiring' => Illuminate\Foundation\Inspiring::class, 'Javascript' => Laracasts\Utilities\JavaScript\JavaScriptFacade::class, 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, @@ -233,7 +239,6 @@ return [ 'Storage' => Illuminate\Support\Facades\Storage::class, 'Theme' => igaster\laravelTheme\Facades\Theme::class, 'URL' => Illuminate\Support\Facades\URL::class, - 'Uuid' => Webpatser\Uuid\Uuid::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, ], diff --git a/config/cache.php b/config/cache.php index 6109216c..86bbeb61 100644 --- a/config/cache.php +++ b/config/cache.php @@ -10,6 +10,8 @@ return [ | using this caching library. This connection is used when another is | not explicitly specified when executing a given caching function. | + | Supported: "apc", "array", "database", "file", "memcached", "redis" + | */ 'default' => env('CACHE_DRIVER', 'file'), @@ -39,6 +41,7 @@ return [ 'table' => 'cache', 'connection' => null, ], + 'file' => [ 'driver' => 'file', 'path' => storage_path('framework/cache/data'), @@ -80,5 +83,5 @@ return [ | */ - 'prefix' => 'pterodactyl', + 'prefix' => env('CACHE_PREFIX', str_slug(env('APP_NAME', 'pterodactyl'), '_') . '_cache'), ]; diff --git a/config/database.php b/config/database.php index ee865cf6..15d708f1 100644 --- a/config/database.php +++ b/config/database.php @@ -75,7 +75,7 @@ return [ 'host' => env('REDIS_HOST', 'localhost'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), - 'database' => 0, + 'database' => env('REDIS_DATBASE', 0), ], ], ]; diff --git a/config/filesystems.php b/config/filesystems.php index 30514293..809742be 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -10,11 +10,9 @@ return [ | by the framework. A "local" driver, as well as a variety of cloud | based drivers are available for your choosing. Just store away! | - | Supported: "local", "ftp", "s3", "rackspace" - | */ - 'default' => 'local', + 'default' => env('FILESYSTEM_DRIVER', 'local'), /* |-------------------------------------------------------------------------- @@ -27,7 +25,7 @@ return [ | */ - 'cloud' => 's3', + 'cloud' => env('FILESYSTEM_CLOUD', 's3'), /* |-------------------------------------------------------------------------- @@ -56,9 +54,9 @@ return [ 's3' => [ 'driver' => 's3', - 'key' => env('AWS_KEY'), - 'secret' => env('AWS_SECRET'), - 'region' => env('AWS_REGION'), + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), ], ], diff --git a/config/session.php b/config/session.php index 08d97fd5..837809f6 100644 --- a/config/session.php +++ b/config/session.php @@ -28,7 +28,7 @@ return [ | */ - 'lifetime' => 10080, + 'lifetime' => env('SESSION_LIFETIME', 10080), 'expire_on_close' => false, @@ -121,7 +121,7 @@ return [ | */ - 'cookie' => 'pterodactyl_session', + 'cookie' => env('SESSION_COOKIE', str_slug(env('APP_NAME', 'pterodactyl'), '_') . '_session'), /* |-------------------------------------------------------------------------- @@ -174,4 +174,19 @@ return [ */ 'http_only' => true, + + /* + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | do not enable this as other CSRF protection services are in place. + | + | Supported: "lax", "strict" + | + */ + + 'same_site' => null, ]; diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index e117b59b..c5501d11 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -1,5 +1,7 @@ define(Pterodactyl\Models\Server::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Server::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'node_id' => $faker->randomNumber(), @@ -39,7 +39,7 @@ $factory->define(Pterodactyl\Models\Server::class, function (Faker\Generator $fa ]; }); -$factory->define(Pterodactyl\Models\User::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\User::class, function (Faker $faker) { static $password; return [ @@ -63,7 +63,7 @@ $factory->state(Pterodactyl\Models\User::class, 'admin', function () { ]; }); -$factory->define(Pterodactyl\Models\Location::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Location::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'short' => $faker->domainWord, @@ -71,7 +71,7 @@ $factory->define(Pterodactyl\Models\Location::class, function (Faker\Generator $ ]; }); -$factory->define(Pterodactyl\Models\Node::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Node::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'uuid' => $faker->unique()->uuid, @@ -92,7 +92,7 @@ $factory->define(Pterodactyl\Models\Node::class, function (Faker\Generator $fake ]; }); -$factory->define(Pterodactyl\Models\Nest::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Nest::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'uuid' => $faker->unique()->uuid, @@ -102,7 +102,7 @@ $factory->define(Pterodactyl\Models\Nest::class, function (Faker\Generator $fake ]; }); -$factory->define(Pterodactyl\Models\Egg::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Egg::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'uuid' => $faker->unique()->uuid, @@ -113,7 +113,7 @@ $factory->define(Pterodactyl\Models\Egg::class, function (Faker\Generator $faker ]; }); -$factory->define(Pterodactyl\Models\EggVariable::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\EggVariable::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'name' => $faker->firstName, @@ -134,7 +134,7 @@ $factory->state(Pterodactyl\Models\EggVariable::class, 'editable', function () { return ['user_editable' => 1]; }); -$factory->define(Pterodactyl\Models\Pack::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Pack::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'egg_id' => $faker->randomNumber(), @@ -148,7 +148,7 @@ $factory->define(Pterodactyl\Models\Pack::class, function (Faker\Generator $fake ]; }); -$factory->define(Pterodactyl\Models\Subuser::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Subuser::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'user_id' => $faker->randomNumber(), @@ -156,7 +156,7 @@ $factory->define(Pterodactyl\Models\Subuser::class, function (Faker\Generator $f ]; }); -$factory->define(Pterodactyl\Models\Allocation::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Allocation::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'node_id' => $faker->randomNumber(), @@ -165,7 +165,7 @@ $factory->define(Pterodactyl\Models\Allocation::class, function (Faker\Generator ]; }); -$factory->define(Pterodactyl\Models\DatabaseHost::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\DatabaseHost::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'name' => $faker->colorName, @@ -177,7 +177,7 @@ $factory->define(Pterodactyl\Models\DatabaseHost::class, function (Faker\Generat ]; }); -$factory->define(Pterodactyl\Models\Database::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Database::class, function (Faker $faker) { static $password; return [ @@ -192,7 +192,7 @@ $factory->define(Pterodactyl\Models\Database::class, function (Faker\Generator $ ]; }); -$factory->define(Pterodactyl\Models\Schedule::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Schedule::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'server_id' => $faker->randomNumber(), @@ -200,7 +200,7 @@ $factory->define(Pterodactyl\Models\Schedule::class, function (Faker\Generator $ ]; }); -$factory->define(Pterodactyl\Models\Task::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\Task::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'schedule_id' => $faker->randomNumber(), @@ -212,7 +212,7 @@ $factory->define(Pterodactyl\Models\Task::class, function (Faker\Generator $fake ]; }); -$factory->define(Pterodactyl\Models\DaemonKey::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\DaemonKey::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'server_id' => $faker->randomNumber(), @@ -222,7 +222,7 @@ $factory->define(Pterodactyl\Models\DaemonKey::class, function (Faker\Generator ]; }); -$factory->define(Pterodactyl\Models\APIKey::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\APIKey::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'user_id' => $faker->randomNumber(), @@ -233,7 +233,7 @@ $factory->define(Pterodactyl\Models\APIKey::class, function (Faker\Generator $fa ]; }); -$factory->define(Pterodactyl\Models\APIPermission::class, function (Faker\Generator $faker) { +$factory->define(Pterodactyl\Models\APIPermission::class, function (Faker $faker) { return [ 'id' => $faker->unique()->randomNumber(), 'key_id' => $faker->randomNumber(), diff --git a/phpunit.xml b/phpunit.xml index 89b3c0b2..26ecd5b4 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ - Options -MultiViews + Options -MultiViews -Indexes RewriteEngine On + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)/$ /$1 [L,R=301] - - # Prevent stripping authorization headers - RewriteCond %{HTTP:Authorization} ^(.*) - RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] + RewriteCond %{REQUEST_URI} (.+)/$ + RewriteRule ^ %1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d diff --git a/public/index.php b/public/index.php index f2bd8213..233cba74 100644 --- a/public/index.php +++ b/public/index.php @@ -3,8 +3,9 @@ /** * Laravel - A PHP Framework For Web Artisans. * - * @author Taylor Otwell + * @author Taylor Otwell */ +define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- @@ -14,11 +15,11 @@ | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We'll simply require it | into the script here so that we don't have to worry about manual -| loading any of our classes later on. It feels nice to relax. +| loading any of our classes later on. It feels great to relax. | */ -require __DIR__ . '/../bootstrap/autoload.php'; +require __DIR__ . '/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- diff --git a/resources/themes/pterodactyl/admin/packs/view.blade.php b/resources/themes/pterodactyl/admin/packs/view.blade.php index e9e5804e..d9bb5039 100644 --- a/resources/themes/pterodactyl/admin/packs/view.blade.php +++ b/resources/themes/pterodactyl/admin/packs/view.blade.php @@ -113,13 +113,6 @@ SHA1 Hash File Size - @foreach($pack->files() as $file) - - {{ $file->name }} - {{ $file->hash }} - {{ $file->size }} - - @endforeach -

In most cases you should select to use a SSL connection. If using an IP Address or you do not wish to use SSL at all, select a HTTP connection.

+ @if(request()->isSecure()) +

Your Panel is currently configured to use a secure connection. In order for browsers to connect to your node it must use a SSL connection.

+ @else +

In most cases you should select to use a SSL connection. If using an IP Address or you do not wish to use SSL at all, select a HTTP connection.

+ @endif
From 1eaf1e3571b312b92b642564cbe1ec3aba09f8a7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 30 Dec 2017 19:39:59 -0600 Subject: [PATCH 07/11] Fix default values in environment file to address issues with certain commands --- .env.example | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index c9cc2bac..beabc0b0 100644 --- a/.env.example +++ b/.env.example @@ -1,12 +1,11 @@ APP_ENV=production APP_DEBUG=false -APP_KEY=SomeRandomString3232RandomString +APP_KEY= APP_THEME=pterodactyl APP_TIMEZONE=America/New_York APP_CLEAR_TASKLOG=720 APP_DELETE_MINUTES=10 APP_ENVIRONMENT_ONLY=true -APP_URL= DB_HOST=127.0.0.1 DB_PORT=3306 @@ -14,9 +13,6 @@ DB_DATABASE=panel DB_USERNAME=pterodactyl DB_PASSWORD= -CACHE_DRIVER= -SESSION_DRIVER= - HASHIDS_SALT= HASHIDS_LENGTH=8 @@ -28,9 +24,8 @@ MAIL_PASSWORD= MAIL_ENCRYPTION=tls MAIL_FROM=no-reply@example.com -QUEUE_DRIVER= QUEUE_HIGH=high QUEUE_STANDARD=standard QUEUE_LOW=low -APP_SERVICE_AUTHOR=undefined@unknown-author.com +APP_SERVICE_AUTHOR=undefined@example.com From 10e2e6e379f6aa42a26445bbfdcec67dad1411d8 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 30 Dec 2017 19:56:42 -0600 Subject: [PATCH 08/11] close #841 --- CHANGELOG.md | 5 ++++ .../Variables/VariableCreationService.php | 9 +----- .../Eggs/Variables/VariableUpdateService.php | 9 +----- .../Variables/VariableCreationServiceTest.php | 28 +++++++++++++------ .../Variables/VariableUpdateServiceTest.php | 25 ++++++++++++----- 5 files changed, 45 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dc64f1c..8c456398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ This file is a running track of new features and fixes to each version of the pa This project follows [Semantic Versioning](http://semver.org) guidelines. +## v0.7.0-beta.4 (Derelict Dermodactylus) +### Fixed +* `[beta.3]` — Fixes a bug with the default environment file that was causing an inability to perform a fresh install when running package discovery. +* `[beta.3]` — Fixes an edge case caused by the Laravel 5.5 upgrade that would try to perform an in_array check aganist a null value. + ## v0.7.0-beta.3 (Derelict Dermodactylus) ### Fixed * `[beta.2]` — Fixes a bug that would cause an endless exception message stream in the console when attemping to setup environment settings in certain instances. diff --git a/app/Services/Eggs/Variables/VariableCreationService.php b/app/Services/Eggs/Variables/VariableCreationService.php index 920ca312..47d6a57a 100644 --- a/app/Services/Eggs/Variables/VariableCreationService.php +++ b/app/Services/Eggs/Variables/VariableCreationService.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Services\Eggs\Variables; @@ -49,7 +42,7 @@ class VariableCreationService )); } - $options = array_get($data, 'options', []); + $options = array_get($data, 'options') ?? []; return $this->repository->create(array_merge($data, [ 'egg_id' => $egg, diff --git a/app/Services/Eggs/Variables/VariableUpdateService.php b/app/Services/Eggs/Variables/VariableUpdateService.php index 9c4f67fa..0249e4fb 100644 --- a/app/Services/Eggs/Variables/VariableUpdateService.php +++ b/app/Services/Eggs/Variables/VariableUpdateService.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Services\Eggs\Variables; @@ -69,7 +62,7 @@ class VariableUpdateService } } - $options = array_get($data, 'options', []); + $options = array_get($data, 'options') ?? []; return $this->repository->withoutFresh()->update($variable->id, array_merge($data, [ 'user_viewable' => in_array('user_viewable', $options), diff --git a/tests/Unit/Services/Eggs/Variables/VariableCreationServiceTest.php b/tests/Unit/Services/Eggs/Variables/VariableCreationServiceTest.php index 320d85aa..968a7674 100644 --- a/tests/Unit/Services/Eggs/Variables/VariableCreationServiceTest.php +++ b/tests/Unit/Services/Eggs/Variables/VariableCreationServiceTest.php @@ -1,17 +1,9 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Tests\Unit\Services\Eggs\Variables; use Mockery as m; use Tests\TestCase; -use Pterodactyl\Models\Egg; use Pterodactyl\Models\EggVariable; use Pterodactyl\Services\Eggs\Variables\VariableCreationService; use Pterodactyl\Contracts\Repository\EggVariableRepositoryInterface; @@ -73,6 +65,26 @@ class VariableCreationServiceTest extends TestCase $this->assertInstanceOf(EggVariable::class, $this->service->handle(1, $data)); } + /** + * Test that an empty (null) value passed in the option key is handled + * properly as an array. + * + * @see https://github.com/Pterodactyl/Panel/issues/841 + */ + public function testNullOptionValueIsPassedAsArray() + { + $data = ['env_variable' => 'TEST_VAR_123', 'options' => null]; + $this->repository->shouldReceive('create')->with([ + 'egg_id' => 1, + 'user_viewable' => false, + 'user_editable' => false, + 'env_variable' => 'TEST_VAR_123', + 'options' => null, + ])->once()->andReturn(new EggVariable); + + $this->assertInstanceOf(EggVariable::class, $this->service->handle(1, $data)); + } + /** * Test that all of the reserved variables defined in the model trigger an exception. * diff --git a/tests/Unit/Services/Eggs/Variables/VariableUpdateServiceTest.php b/tests/Unit/Services/Eggs/Variables/VariableUpdateServiceTest.php index 48703f8e..bf1f209a 100644 --- a/tests/Unit/Services/Eggs/Variables/VariableUpdateServiceTest.php +++ b/tests/Unit/Services/Eggs/Variables/VariableUpdateServiceTest.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Tests\Unit\Services\Eggs\Variables; @@ -100,6 +93,24 @@ class VariableUpdateServiceTest extends TestCase $this->assertTrue($this->service->handle($this->model, ['env_variable' => 'TEST_VAR_123'])); } + /** + * Test that an empty (null) value passed in the option key is handled + * properly as an array. + * + * @see https://github.com/Pterodactyl/Panel/issues/841 + */ + public function testNullOptionValueIsPassedAsArray() + { + $this->repository->shouldReceive('withoutFresh')->withNoArgs()->once()->andReturnSelf() + ->shouldReceive('update')->with($this->model->id, [ + 'user_viewable' => false, + 'user_editable' => false, + 'options' => null, + ])->once()->andReturn(true); + + $this->assertTrue($this->service->handle($this->model, ['options' => null])); + } + /** * Test that data passed into the handler is overwritten inside the handler. */ From 5efee34378ee7710ac68afca95f0d0225cae992e Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 30 Dec 2017 20:25:04 -0600 Subject: [PATCH 09/11] close #840 --- CHANGELOG.md | 1 + app/Http/Controllers/Admin/UserController.php | 12 +++- app/Http/Requests/Admin/AdminFormRequest.php | 13 +--- app/Http/Requests/Admin/UserFormRequest.php | 8 ++- app/Models/User.php | 9 +-- app/Observers/UserObserver.php | 15 ----- app/Services/Components/UuidService.php | 63 ------------------- app/Services/Users/UserCreationService.php | 6 +- .../pterodactyl/admin/users/new.blade.php | 11 ++++ .../pterodactyl/admin/users/view.blade.php | 59 +++++++++-------- .../Users/UserCreationServiceTest.php | 49 ++++++++++++--- 11 files changed, 111 insertions(+), 135 deletions(-) delete mode 100644 app/Services/Components/UuidService.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c456398..fd6c1de4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ### Fixed * `[beta.3]` — Fixes a bug with the default environment file that was causing an inability to perform a fresh install when running package discovery. * `[beta.3]` — Fixes an edge case caused by the Laravel 5.5 upgrade that would try to perform an in_array check aganist a null value. +* `[beta.3]` — Fixes a bug that would cause an error when attempting to create a new user on the Panel. ## v0.7.0-beta.3 (Derelict Dermodactylus) ### Fixed diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index ad5dead0..faa535b6 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -9,6 +9,7 @@ use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Http\Controllers\Controller; use Illuminate\Contracts\Translation\Translator; use Pterodactyl\Services\Users\UserUpdateService; +use Pterodactyl\Traits\Helpers\AvailableLanguages; use Pterodactyl\Services\Users\UserCreationService; use Pterodactyl\Services\Users\UserDeletionService; use Pterodactyl\Http\Requests\Admin\UserFormRequest; @@ -16,6 +17,8 @@ use Pterodactyl\Contracts\Repository\UserRepositoryInterface; class UserController extends Controller { + use AvailableLanguages; + /** * @var \Prologue\Alerts\AlertsMessageBag */ @@ -92,7 +95,9 @@ class UserController extends Controller */ public function create() { - return view('admin.users.new'); + return view('admin.users.new', [ + 'languages' => $this->getAvailableLanguages(true), + ]); } /** @@ -103,7 +108,10 @@ class UserController extends Controller */ public function view(User $user) { - return view('admin.users.view', ['user' => $user]); + return view('admin.users.view', [ + 'user' => $user, + 'languages' => $this->getAvailableLanguages(true), + ]); } /** diff --git a/app/Http/Requests/Admin/AdminFormRequest.php b/app/Http/Requests/Admin/AdminFormRequest.php index 0e629373..012d7336 100644 --- a/app/Http/Requests/Admin/AdminFormRequest.php +++ b/app/Http/Requests/Admin/AdminFormRequest.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Http\Requests\Admin; @@ -39,11 +32,11 @@ abstract class AdminFormRequest extends FormRequest * Return only the fields that we are interested in from the request. * This will include empty fields as a null value. * - * @param array $only + * @param array|null $only * @return array */ - public function normalize($only = []) + public function normalize(array $only = null) { - return $this->all(empty($only) ? array_keys($this->rules()) : $only); + return $this->only($only ?? array_keys($this->rules())); } } diff --git a/app/Http/Requests/Admin/UserFormRequest.php b/app/Http/Requests/Admin/UserFormRequest.php index 757be434..ab760a7f 100644 --- a/app/Http/Requests/Admin/UserFormRequest.php +++ b/app/Http/Requests/Admin/UserFormRequest.php @@ -22,12 +22,16 @@ class UserFormRequest extends AdminFormRequest return User::getCreateRules(); } - public function normalize($only = []) + /** + * @param array|null $only + * @return array + */ + public function normalize(array $only = null) { if ($this->method === 'PATCH') { return array_merge( $this->all(['password']), - $this->only(['email', 'username', 'name_first', 'name_last', 'root_admin', 'ignore_connection_error']) + $this->only(['email', 'username', 'name_first', 'name_last', 'root_admin', 'language', 'ignore_connection_error']) ); } diff --git a/app/Models/User.php b/app/Models/User.php index 39e4a0a0..02c7e7ad 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Models; @@ -127,6 +120,8 @@ class User extends Model implements 'name_first' => 'required', 'name_last' => 'required', 'password' => 'sometimes', + 'language' => 'sometimes', + 'use_totp' => 'sometimes', ]; /** diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php index 8537d061..dd29d908 100644 --- a/app/Observers/UserObserver.php +++ b/app/Observers/UserObserver.php @@ -1,27 +1,14 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Observers; use Pterodactyl\Events; use Pterodactyl\Models\User; -use Pterodactyl\Services\Components\UuidService; class UserObserver { protected $uuid; - public function __construct(UuidService $uuid) - { - $this->uuid = $uuid; - } - /** * Listen to the User creating event. * @@ -29,8 +16,6 @@ class UserObserver */ public function creating(User $user) { - $user->uuid = $this->uuid->generate('users', 'uuid'); - event(new Events\User\Creating($user)); } diff --git a/app/Services/Components/UuidService.php b/app/Services/Components/UuidService.php deleted file mode 100644 index 1e5c2a2b..00000000 --- a/app/Services/Components/UuidService.php +++ /dev/null @@ -1,63 +0,0 @@ -. - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ - -namespace Pterodactyl\Services\Components; - -use DB; -use Uuid; - -class UuidService -{ - /** - * Generate a unique UUID validating against specified table and column. - * Defaults to `users.uuid`. - * - * @param string $table - * @param string $field - * @param int $type - * @return string - * @deprecated - */ - public function generate($table = 'users', $field = 'uuid', $type = 4) - { - $return = false; - do { - $uuid = Uuid::generate($type); - if (! DB::table($table)->where($field, $uuid)->exists()) { - $return = $uuid; - } - } while (! $return); - - return (string) $return; - } - - /** - * Generates a ShortUUID code which is 8 characters long and is used for identifying servers in the system. - * - * @param string $table - * @param string $field - * @param null|string $attachedUuid - * @return string - * @deprecated - */ - public function generateShort($table = 'servers', $field = 'uuidShort', $attachedUuid = null) - { - $return = false; - do { - $short = (is_null($attachedUuid)) ? substr(Uuid::generate(4), 0, 8) : substr($attachedUuid, 0, 8); - $attachedUuid = null; - - if (! DB::table($table)->where($field, $short)->exists()) { - $return = $short; - } - } while (! $return); - - return (string) $return; - } -} diff --git a/app/Services/Users/UserCreationService.php b/app/Services/Users/UserCreationService.php index 4a34b7a9..b267a18f 100644 --- a/app/Services/Users/UserCreationService.php +++ b/app/Services/Users/UserCreationService.php @@ -9,6 +9,7 @@ namespace Pterodactyl\Services\Users; +use Ramsey\Uuid\Uuid; use Illuminate\Foundation\Application; use Illuminate\Contracts\Hashing\Hasher; use Illuminate\Database\ConnectionInterface; @@ -96,7 +97,10 @@ class UserCreationService $token = $this->passwordService->handle($data['email']); } - $user = $this->repository->create($data); + $user = $this->repository->create(array_merge($data, [ + 'uuid' => Uuid::uuid4()->toString(), + ])); + $this->connection->commit(); // @todo fire event, handle notification there diff --git a/resources/themes/pterodactyl/admin/users/new.blade.php b/resources/themes/pterodactyl/admin/users/new.blade.php index 3e1b8274..4f4da9bd 100644 --- a/resources/themes/pterodactyl/admin/users/new.blade.php +++ b/resources/themes/pterodactyl/admin/users/new.blade.php @@ -51,6 +51,17 @@
+
+ +
+ +

The default language to use when rendering the Panel for this user.

+
+
+
+ +
+ +

The default language to use when rendering the Panel for this user.

+
+
-
-
-
-

Associated Servers

-
-
- - - - - - - - - - - - - Oh dear, this hasn't been fixed yet? + {{--
--}} + {{--
--}} + {{--
--}} + {{--

Associated Servers

--}} + {{--
--}} + {{--
--}} + {{--
IdentifierServer NameAccessNode
--}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} {{--@foreach($user->setAccessLevel('subuser')->access()->get() as $server)--}} {{----}} {{----}} @@ -136,12 +146,11 @@ {{----}} {{----}} {{--@endforeach--}} - -
IdentifierServer NameAccessNode
@if($server->suspended === 0)Active@elseSuspended@endif
-
- -
-
+ {{----}} + {{----}} + {{----}} + {{----}} + {{----}}
diff --git a/tests/Unit/Services/Users/UserCreationServiceTest.php b/tests/Unit/Services/Users/UserCreationServiceTest.php index 9e83eca9..5650b032 100644 --- a/tests/Unit/Services/Users/UserCreationServiceTest.php +++ b/tests/Unit/Services/Users/UserCreationServiceTest.php @@ -1,16 +1,10 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Tests\Unit\Services; use Mockery as m; use Tests\TestCase; +use Tests\Traits\MocksUuids; use Illuminate\Foundation\Application; use Illuminate\Contracts\Hashing\Hasher; use Illuminate\Database\ConnectionInterface; @@ -22,6 +16,8 @@ use Pterodactyl\Contracts\Repository\UserRepositoryInterface; class UserCreationServiceTest extends TestCase { + use MocksUuids; + /** * @var \Illuminate\Foundation\Application */ @@ -93,9 +89,10 @@ class UserCreationServiceTest extends TestCase $this->hasher->shouldReceive('make')->with('raw-password')->once()->andReturn('enc-password'); $this->database->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull(); - $this->hasher->shouldNotReceive('make'); - $this->passwordService->shouldNotReceive('handle'); - $this->repository->shouldReceive('create')->with(['password' => 'enc-password'])->once()->andReturn($user); + $this->repository->shouldReceive('create')->with([ + 'password' => 'enc-password', + 'uuid' => $this->getKnownUuid(), + ])->once()->andReturn($user); $this->database->shouldReceive('commit')->withNoArgs()->once()->andReturnNull(); $this->appMock->shouldReceive('makeWith')->with(AccountCreated::class, [ 'user' => [ @@ -116,6 +113,37 @@ class UserCreationServiceTest extends TestCase $this->assertEquals($user->name_first, 'FirstName'); } + /** + * Test that a UUID passed in the submission data is not used when + * creating the user. + */ + public function testUuidPassedInDataIsIgnored() + { + $user = (object) [ + 'name_first' => 'FirstName', + 'username' => 'user_name', + ]; + + $this->hasher->shouldReceive('make')->andReturn('enc-password'); + $this->database->shouldReceive('beginTransaction')->andReturnNull(); + $this->repository->shouldReceive('create')->with([ + 'password' => 'enc-password', + 'uuid' => $this->getKnownUuid(), + ])->once()->andReturn($user); + $this->database->shouldReceive('commit')->andReturnNull(); + $this->appMock->shouldReceive('makeWith')->andReturnNull(); + $this->notification->shouldReceive('send')->andReturnNull(); + + $response = $this->service->handle([ + 'password' => 'raw-password', + 'uuid' => 'test-uuid', + ]); + + $this->assertNotNull($response); + $this->assertEquals($user->username, $response->username); + $this->assertEquals($user->name_first, 'FirstName'); + } + /** * Test that a user is created with a random password when no password is provided. */ @@ -138,6 +166,7 @@ class UserCreationServiceTest extends TestCase $this->repository->shouldReceive('create')->with([ 'password' => 'created-enc-password', 'email' => 'user@example.com', + 'uuid' => $this->getKnownUuid(), ])->once()->andReturn($user); $this->database->shouldReceive('commit')->withNoArgs()->once()->andReturnNull(); From 8ce0863559ba9b5a0dff364b36e8dd3b6392c268 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 30 Dec 2017 20:53:34 -0600 Subject: [PATCH 10/11] Fix settings service provider to actually work when no migrations have been run. --- .env.example | 2 -- CHANGELOG.md | 1 + app/Providers/SettingsServiceProvider.php | 17 +++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index beabc0b0..e6eba87e 100644 --- a/.env.example +++ b/.env.example @@ -27,5 +27,3 @@ MAIL_FROM=no-reply@example.com QUEUE_HIGH=high QUEUE_STANDARD=standard QUEUE_LOW=low - -APP_SERVICE_AUTHOR=undefined@example.com diff --git a/CHANGELOG.md b/CHANGELOG.md index fd6c1de4..fa25d0db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * `[beta.3]` — Fixes a bug with the default environment file that was causing an inability to perform a fresh install when running package discovery. * `[beta.3]` — Fixes an edge case caused by the Laravel 5.5 upgrade that would try to perform an in_array check aganist a null value. * `[beta.3]` — Fixes a bug that would cause an error when attempting to create a new user on the Panel. +* `[beta.3]` — Fixes error handling of the settings service provider when no migrations have been run. ## v0.7.0-beta.3 (Derelict Dermodactylus) ### Fixed diff --git a/app/Providers/SettingsServiceProvider.php b/app/Providers/SettingsServiceProvider.php index 060b1388..1b9596d8 100644 --- a/app/Providers/SettingsServiceProvider.php +++ b/app/Providers/SettingsServiceProvider.php @@ -2,6 +2,8 @@ namespace Pterodactyl\Providers; +use Illuminate\Contracts\Logging\Log; +use Illuminate\Database\QueryException; use Illuminate\Support\ServiceProvider; use Illuminate\Contracts\Encryption\Encrypter; use Illuminate\Contracts\Encryption\DecryptException; @@ -60,9 +62,10 @@ class SettingsServiceProvider extends ServiceProvider * * @param \Illuminate\Contracts\Config\Repository $config * @param \Illuminate\Contracts\Encryption\Encrypter $encrypter + * @param \Illuminate\Contracts\Logging\Log $log * @param \Pterodactyl\Contracts\Repository\SettingsRepositoryInterface $settings */ - public function boot(ConfigRepository $config, Encrypter $encrypter, SettingsRepositoryInterface $settings) + public function boot(ConfigRepository $config, Encrypter $encrypter, Log $log, SettingsRepositoryInterface $settings) { // Only set the email driver settings from the database if we // are configured using SMTP as the driver. @@ -70,9 +73,15 @@ class SettingsServiceProvider extends ServiceProvider $this->keys = array_merge($this->keys, $this->emailKeys); } - $values = $settings->all()->mapWithKeys(function ($setting) { - return [$setting->key => $setting->value]; - })->toArray(); + try { + $values = $settings->all()->mapWithKeys(function ($setting) { + return [$setting->key => $setting->value]; + })->toArray(); + } catch (QueryException $exception) { + $log->notice('A query exception was encountered while trying to load settings from the database.'); + + return; + } foreach ($this->keys as $key) { $value = array_get($values, 'settings::' . $key, $config->get(str_replace(':', '.', $key))); From 6b2d7b6488ee5c3fff63d6f43ac73f9631066855 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 31 Dec 2017 10:30:19 -0600 Subject: [PATCH 11/11] If folder does not exist, reload the file manager index --- .../Connection/DaemonConnectionException.php | 22 ++++++++++++++++++- .../js/frontend/files/filemanager.min.js | 2 +- .../js/frontend/files/filemanager.min.js.map | 2 +- .../js/frontend/files/src/index.js | 5 +++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/app/Exceptions/Http/Connection/DaemonConnectionException.php b/app/Exceptions/Http/Connection/DaemonConnectionException.php index 2e602f80..d6e0ed72 100644 --- a/app/Exceptions/Http/Connection/DaemonConnectionException.php +++ b/app/Exceptions/Http/Connection/DaemonConnectionException.php @@ -7,18 +7,38 @@ use Pterodactyl\Exceptions\DisplayException; class DaemonConnectionException extends DisplayException { + /** + * @var int + */ + private $statusCode = 500; + /** * Throw a displayable exception caused by a daemon connection error. * * @param \GuzzleHttp\Exception\GuzzleException $previous + * @param bool $useStatusCode */ - public function __construct(GuzzleException $previous) + public function __construct(GuzzleException $previous, bool $useStatusCode = false) { /** @var \GuzzleHttp\Psr7\Response|null $response */ $response = method_exists($previous, 'getResponse') ? $previous->getResponse() : null; + if ($useStatusCode) { + $this->statusCode = is_null($response) ? 500 : $response->getStatusCode(); + } + parent::__construct(trans('admin/server.exceptions.daemon_exception', [ 'code' => is_null($response) ? 'E_CONN_REFUSED' : $response->getStatusCode(), ]), $previous, DisplayException::LEVEL_WARNING); } + + /** + * Return the HTTP status code for this exception. + * + * @return int + */ + public function getStatusCode() + { + return $this->statusCode; + } } diff --git a/public/themes/pterodactyl/js/frontend/files/filemanager.min.js b/public/themes/pterodactyl/js/frontend/files/filemanager.min.js index 31c08a18..8f55f860 100644 --- a/public/themes/pterodactyl/js/frontend/files/filemanager.min.js +++ b/public/themes/pterodactyl/js/frontend/files/filemanager.min.js @@ -1,5 +1,5 @@ 'use strict';var _createClass=function(){function defineProperties(target,props){for(var i=0;i\n \n ';nameBlock.html(attachEditor);var inputField=nameBlock.find('input');var inputLoader=nameBlock.find('.input-loader');inputField.focus();inputField.on('blur keydown',function(e){if(e.type==='keydown'&&e.which===27||e.type==='blur'||e.type==='keydown'&&e.which===13&¤tName===inputField.val()){if(!_.isEmpty(currentLink)){nameBlock.html(currentLink)}else{nameBlock.html(currentName)}inputField.remove();ContextMenu.unbind().run();return}if(e.type==='keydown'&&e.which!==13)return;inputLoader.show();var currentPath=decodeURIComponent(nameBlock.data('path'));$.ajax({type:'POST',headers:{'X-Access-Token':Pterodactyl.server.daemonSecret,'X-Access-Server':Pterodactyl.server.uuid},contentType:'application/json; charset=utf-8',url:Pterodactyl.node.scheme+'://'+Pterodactyl.node.fqdn+':'+Pterodactyl.node.daemonListen+'/v1/server/file/rename',timeout:10000,data:JSON.stringify({from:''+currentPath+currentName,to:''+currentPath+inputField.val()})}).done(function(data){nameBlock.attr('data-name',inputField.val());if(!_.isEmpty(currentLink)){var newLink=currentLink.attr('href');if(nameBlock.parent().data('type')!=='folder'){newLink=newLink.substr(0,newLink.lastIndexOf('/'))+'/'+inputField.val()}currentLink.attr('href',newLink);nameBlock.html(currentLink.html(inputField.val()))}else{nameBlock.html(inputField.val())}inputField.remove()}).fail(function(jqXHR){console.error(jqXHR);var error='An error occured while trying to process this request.';if(typeof jqXHR.responseJSON!=='undefined'&&typeof jqXHR.responseJSON.error!=='undefined'){error=jqXHR.responseJSON.error}nameBlock.addClass('has-error').delay(2000).queue(function(){nameBlock.removeClass('has-error').dequeue()});inputField.popover({animation:true,placement:'top',content:error,title:'Save Error'}).popover('show')}).always(function(){inputLoader.remove();ContextMenu.unbind().run()})})}},{key:'copy',value:function copy(){var nameBlock=$(this.element).find('td[data-identifier="name"]');var currentName=decodeURIComponent(nameBlock.attr('data-name'));var currentPath=decodeURIComponent(nameBlock.data('path'));swal({type:'input',title:'Copy File',text:'Please enter the new path for the copied file below.',showCancelButton:true,showConfirmButton:true,closeOnConfirm:false,showLoaderOnConfirm:true,inputValue:''+currentPath+currentName},function(val){$.ajax({type:'POST',headers:{'X-Access-Token':Pterodactyl.server.daemonSecret,'X-Access-Server':Pterodactyl.server.uuid},contentType:'application/json; charset=utf-8',url:Pterodactyl.node.scheme+'://'+Pterodactyl.node.fqdn+':'+Pterodactyl.node.daemonListen+'/v1/server/file/copy',timeout:10000,data:JSON.stringify({from:''+currentPath+currentName,to:''+val})}).done(function(data){swal({type:'success',title:'',text:'File successfully copied.'});Files.list()}).fail(function(jqXHR){console.error(jqXHR);var error='An error occured while trying to process this request.';if(typeof jqXHR.responseJSON!=='undefined'&&typeof jqXHR.responseJSON.error!=='undefined'){error=jqXHR.responseJSON.error}swal({type:'error',title:'',text:error})})})}},{key:'download',value:function download(){var nameBlock=$(this.element).find('td[data-identifier="name"]');var fileName=decodeURIComponent(nameBlock.attr('data-name'));var filePath=decodeURIComponent(nameBlock.data('path'));window.location='/server/'+Pterodactyl.server.uuidShort+'/files/download/'+filePath+fileName}},{key:'delete',value:function _delete(){var nameBlock=$(this.element).find('td[data-identifier="name"]');var delPath=decodeURIComponent(nameBlock.data('path'));var delName=decodeURIComponent(nameBlock.data('name'));swal({type:'warning',title:'',text:'Are you sure you want to delete '+delName+'? There is no reversing this action.',html:true,showCancelButton:true,showConfirmButton:true,closeOnConfirm:false,showLoaderOnConfirm:true},function(){$.ajax({type:'POST',headers:{'X-Access-Token':Pterodactyl.server.daemonSecret,'X-Access-Server':Pterodactyl.server.uuid},contentType:'application/json; charset=utf-8',url:Pterodactyl.node.scheme+'://'+Pterodactyl.node.fqdn+':'+Pterodactyl.node.daemonListen+'/v1/server/file/delete',timeout:10000,data:JSON.stringify({items:[''+delPath+delName]})}).done(function(data){nameBlock.parent().addClass('warning').delay(200).fadeOut();swal({type:'success',title:'File Deleted'})}).fail(function(jqXHR){console.error(jqXHR);swal({type:'error',title:'Whoops!',html:true,text:'An error occured while attempting to delete this file. Please try again.'})})})}},{key:'toggleMassActions',value:function toggleMassActions(){if($('#file_listing input[type="checkbox"]:checked').length){$('#mass_actions').removeClass('disabled')}else{$('#mass_actions').addClass('disabled')}}},{key:'toggleHighlight',value:function toggleHighlight(event){var parent=$(event.currentTarget);var item=$(event.currentTarget).find('input');if($(item).is(':checked')){$(item).prop('checked',false);parent.removeClass('warning').delay(200)}else{$(item).prop('checked',true);parent.addClass('warning').delay(200)}}},{key:'highlightAll',value:function highlightAll(event){var parent=void 0;var item=$(event.currentTarget).find('input');if($(item).is(':checked')){$('#file_listing input[type=checkbox]').prop('checked',false);$('#file_listing input[data-action="addSelection"]').each(function(){parent=$(this).closest('tr');parent.removeClass('warning').delay(200)})}else{$('#file_listing input[type=checkbox]').prop('checked',true);$('#file_listing input[data-action="addSelection"]').each(function(){parent=$(this).closest('tr');parent.addClass('warning').delay(200)})}}},{key:'deleteSelected',value:function deleteSelected(){var selectedItems=[];var selectedItemsElements=[];var parent=void 0;var nameBlock=void 0;var delLocation=void 0;$('#file_listing input[data-action="addSelection"]:checked').each(function(){parent=$(this).closest('tr');nameBlock=$(parent).find('td[data-identifier="name"]');delLocation=decodeURIComponent(nameBlock.data('path'))+decodeURIComponent(nameBlock.data('name'));selectedItems.push(delLocation);selectedItemsElements.push(parent)});if(selectedItems.length!=0){var formattedItems='';$.each(selectedItems,function(key,value){formattedItems+=''+value+', '});formattedItems=formattedItems.slice(0,-2);swal({type:'warning',title:'',text:'Are you sure you want to delete:'+formattedItems+'? There is no reversing this action.',html:true,showCancelButton:true,showConfirmButton:true,closeOnConfirm:false,showLoaderOnConfirm:true},function(){$.ajax({type:'POST',headers:{'X-Access-Token':Pterodactyl.server.daemonSecret,'X-Access-Server':Pterodactyl.server.uuid},contentType:'application/json; charset=utf-8',url:Pterodactyl.node.scheme+'://'+Pterodactyl.node.fqdn+':'+Pterodactyl.node.daemonListen+'/v1/server/file/delete',timeout:10000,data:JSON.stringify({items:selectedItems})}).done(function(data){$('#file_listing input:checked').each(function(){$(this).prop('checked',false)});$.each(selectedItemsElements,function(){$(this).addClass('warning').delay(200).fadeOut()});swal({type:'success',title:'Files Deleted'})}).fail(function(jqXHR){console.error(jqXHR);swal({type:'error',title:'Whoops!',html:true,text:'An error occured while attempting to delete these files. Please try again.'})})})}else{swal({type:'warning',title:'',text:'Please select files/folders to delete.'})}}},{key:'decompress',value:function decompress(){var nameBlock=$(this.element).find('td[data-identifier="name"]');var compPath=decodeURIComponent(nameBlock.data('path'));var compName=decodeURIComponent(nameBlock.data('name'));swal({title:' Decompressing...',text:'This might take a few seconds to complete.',html:true,allowOutsideClick:false,allowEscapeKey:false,showConfirmButton:false});$.ajax({type:'POST',url:Pterodactyl.node.scheme+'://'+Pterodactyl.node.fqdn+':'+Pterodactyl.node.daemonListen+'/v1/server/file/decompress',headers:{'X-Access-Token':Pterodactyl.server.daemonSecret,'X-Access-Server':Pterodactyl.server.uuid},contentType:'application/json; charset=utf-8',data:JSON.stringify({files:''+compPath+compName})}).done(function(data){swal.close();Files.list(compPath)}).fail(function(jqXHR){console.error(jqXHR);var error='An error occured while trying to process this request.';if(typeof jqXHR.responseJSON!=='undefined'&&typeof jqXHR.responseJSON.error!=='undefined'){error=jqXHR.responseJSON.error}swal({type:'error',title:'Whoops!',html:true,text:error})})}},{key:'compress',value:function compress(){var nameBlock=$(this.element).find('td[data-identifier="name"]');var compPath=decodeURIComponent(nameBlock.data('path'));var compName=decodeURIComponent(nameBlock.data('name'));$.ajax({type:'POST',url:Pterodactyl.node.scheme+'://'+Pterodactyl.node.fqdn+':'+Pterodactyl.node.daemonListen+'/v1/server/file/compress',headers:{'X-Access-Token':Pterodactyl.server.daemonSecret,'X-Access-Server':Pterodactyl.server.uuid},contentType:'application/json; charset=utf-8',data:JSON.stringify({files:''+compPath+compName,to:compPath.toString()})}).done(function(data){Files.list(compPath,function(err){if(err)return;var fileListing=$('#file_listing').find('[data-name="'+data.saved_as+'"]').parent();fileListing.addClass('success pulsate').delay(3000).queue(function(){fileListing.removeClass('success pulsate').dequeue()})})}).fail(function(jqXHR){console.error(jqXHR);var error='An error occured while trying to process this request.';if(typeof jqXHR.responseJSON!=='undefined'&&typeof jqXHR.responseJSON.error!=='undefined'){error=jqXHR.responseJSON.error}swal({type:'error',title:'Whoops!',html:true,text:error})})}}]);return ActionsClass}(); 'use strict';var _createClass=function(){function defineProperties(target,props){for(var i=0;i New File
  • New Folder
  • '}if(Pterodactyl.permissions.downloadFiles||Pterodactyl.permissions.deleteFiles){buildMenu+='
  • '}if(Pterodactyl.permissions.downloadFiles){buildMenu+=''}if(Pterodactyl.permissions.deleteFiles){buildMenu+='
  • Delete
  • '}buildMenu+='';return buildMenu}},{key:'rightClick',value:function rightClick(){var _this=this;$('[data-action="toggleMenu"]').on('mousedown',function(event){event.preventDefault();if($(document).find('#fileOptionMenu').is(':visible')){$('body').trigger('click');return}_this.showMenu(event)});$('#file_listing > tbody td').on('contextmenu',function(event){_this.showMenu(event)})}},{key:'showMenu',value:function showMenu(event){var _this2=this;var parent=$(event.target).closest('tr');var menu=$(this.makeMenu(parent));if(parent.data('type')==='disabled')return;event.preventDefault();$(menu).appendTo('body');$(menu).data('invokedOn',$(event.target)).show().css({position:'absolute',left:event.pageX-150,top:event.pageY});this.activeLine=parent;this.activeLine.addClass('active');var Actions=new ActionsClass(parent,menu);if(Pterodactyl.permissions.moveFiles){$(menu).find('li[data-action="move"]').unbind().on('click',function(e){e.preventDefault();Actions.move()});$(menu).find('li[data-action="rename"]').unbind().on('click',function(e){e.preventDefault();Actions.rename()})}if(Pterodactyl.permissions.copyFiles){$(menu).find('li[data-action="copy"]').unbind().on('click',function(e){e.preventDefault();Actions.copy()})}if(Pterodactyl.permissions.compressFiles){if(parent.data('type')==='folder'){$(menu).find('li[data-action="compress"]').removeClass('hidden')}$(menu).find('li[data-action="compress"]').unbind().on('click',function(e){e.preventDefault();Actions.compress()})}if(Pterodactyl.permissions.decompressFiles){if(_.without(['application/zip','application/gzip','application/x-gzip'],parent.data('mime')).length<3){$(menu).find('li[data-action="decompress"]').removeClass('hidden')}$(menu).find('li[data-action="decompress"]').unbind().on('click',function(e){e.preventDefault();Actions.decompress()})}if(Pterodactyl.permissions.createFiles){$(menu).find('li[data-action="folder"]').unbind().on('click',function(e){e.preventDefault();Actions.folder()})}if(Pterodactyl.permissions.downloadFiles){if(parent.data('type')==='file'){$(menu).find('li[data-action="download"]').removeClass('hidden')}$(menu).find('li[data-action="download"]').unbind().on('click',function(e){e.preventDefault();Actions.download()})}if(Pterodactyl.permissions.deleteFiles){$(menu).find('li[data-action="delete"]').unbind().on('click',function(e){e.preventDefault();Actions.delete()})}$(window).unbind().on('click',function(event){if($(event.target).is('.disable-menu-hide')){event.preventDefault();return}$(menu).unbind().remove();if(!_.isNull(_this2.activeLine))_this2.activeLine.removeClass('active')})}},{key:'directoryClick',value:function directoryClick(){$('a[data-action="directory-view"]').on('click',function(event){event.preventDefault();var path=$(this).parent().data('path')||'';var name=$(this).parent().data('name')||'';window.location.hash=encodeURIComponent(path+name);Files.list()})}}]);return ContextMenuClass}();window.ContextMenu=new ContextMenuClass; -'use strict';var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};var _createClass=function(){function defineProperties(target,props){for(var i=0;i\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ActionsClass {\n constructor(element, menu) {\n this.element = element;\n this.menu = menu;\n }\n\n destroy() {\n this.element = undefined;\n }\n\n folder(path) {\n let inputValue\n if (path) {\n inputValue = path\n } else {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.data('name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n if ($(this.element).data('type') === 'file') {\n inputValue = currentPath;\n } else {\n inputValue = `${currentPath}${currentName}/`;\n }\n }\n\n swal({\n type: 'input',\n title: 'Create Folder',\n text: 'Please enter the path and folder name below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: inputValue\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/folder`,\n timeout: 10000,\n data: JSON.stringify({\n path: val,\n }),\n }).done(data => {\n swal.close();\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n move() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Move File',\n text: 'Please enter the new path for the file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/move`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal.close();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n\n }\n\n rename() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentLink = nameBlock.find('a');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const attachEditor = `\n \n \n `;\n\n nameBlock.html(attachEditor);\n const inputField = nameBlock.find('input');\n const inputLoader = nameBlock.find('.input-loader');\n\n inputField.focus();\n inputField.on('blur keydown', e => {\n // Save Field\n if (\n (e.type === 'keydown' && e.which === 27)\n || e.type === 'blur'\n || (e.type === 'keydown' && e.which === 13 && currentName === inputField.val())\n ) {\n if (!_.isEmpty(currentLink)) {\n nameBlock.html(currentLink);\n } else {\n nameBlock.html(currentName);\n }\n inputField.remove();\n ContextMenu.unbind().run();\n return;\n }\n\n if (e.type === 'keydown' && e.which !== 13) return;\n\n inputLoader.show();\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/rename`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${currentPath}${inputField.val()}`,\n }),\n }).done(data => {\n nameBlock.attr('data-name', inputField.val());\n if (!_.isEmpty(currentLink)) {\n let newLink = currentLink.attr('href');\n if (nameBlock.parent().data('type') !== 'folder') {\n newLink = newLink.substr(0, newLink.lastIndexOf('/')) + '/' + inputField.val();\n }\n currentLink.attr('href', newLink);\n nameBlock.html(\n currentLink.html(inputField.val())\n );\n } else {\n nameBlock.html(inputField.val());\n }\n inputField.remove();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n nameBlock.addClass('has-error').delay(2000).queue(() => {\n nameBlock.removeClass('has-error').dequeue();\n });\n inputField.popover({\n animation: true,\n placement: 'top',\n content: error,\n title: 'Save Error'\n }).popover('show');\n }).always(() => {\n inputLoader.remove();\n ContextMenu.unbind().run();\n });\n });\n }\n\n copy() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Copy File',\n text: 'Please enter the new path for the copied file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/copy`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n swal({\n type: 'success',\n title: '',\n text: 'File successfully copied.'\n });\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n download() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const fileName = decodeURIComponent(nameBlock.attr('data-name'));\n const filePath = decodeURIComponent(nameBlock.data('path'));\n\n window.location = `/server/${Pterodactyl.server.uuidShort}/files/download/${filePath}${fileName}`;\n }\n\n delete() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const delPath = decodeURIComponent(nameBlock.data('path'));\n const delName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete ' + delName + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/delete`,\n timeout: 10000,\n data: JSON.stringify({\n items: [`${delPath}${delName}`]\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal({\n type: 'success',\n title: 'File Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete this file. Please try again.',\n });\n });\n });\n }\n\n toggleMassActions() {\n if ($('#file_listing input[type=\"checkbox\"]:checked').length) {\n $('#mass_actions').removeClass('disabled');\n } else {\n $('#mass_actions').addClass('disabled');\n }\n }\n\n toggleHighlight(event) {\n const parent = $(event.currentTarget);\n const item = $(event.currentTarget).find('input');\n\n if($(item).is(':checked')) {\n $(item).prop('checked', false);\n parent.removeClass('warning').delay(200);\n } else {\n $(item).prop('checked', true);\n parent.addClass('warning').delay(200);\n }\n }\n\n highlightAll(event) {\n let parent;\n const item = $(event.currentTarget).find('input');\n\n if($(item).is(':checked')) {\n $('#file_listing input[type=checkbox]').prop('checked', false);\n $('#file_listing input[data-action=\"addSelection\"]').each(function() {\n parent = $(this).closest('tr');\n parent.removeClass('warning').delay(200);\n });\n } else {\n $('#file_listing input[type=checkbox]').prop('checked', true);\n $('#file_listing input[data-action=\"addSelection\"]').each(function() {\n parent = $(this).closest('tr');\n parent.addClass('warning').delay(200);\n });\n }\n }\n\n deleteSelected() {\n let selectedItems = [];\n let selectedItemsElements = [];\n let parent;\n let nameBlock;\n let delLocation;\n\n $('#file_listing input[data-action=\"addSelection\"]:checked').each(function() {\n parent = $(this).closest('tr');\n nameBlock = $(parent).find('td[data-identifier=\"name\"]');\n delLocation = decodeURIComponent(nameBlock.data('path')) + decodeURIComponent(nameBlock.data('name'));\n\n selectedItems.push(delLocation);\n selectedItemsElements.push(parent);\n });\n\n if (selectedItems.length != 0)\n {\n let formattedItems = \"\";\n $.each(selectedItems, function(key, value) {\n formattedItems += (\"\" + value + \", \");\n })\n\n formattedItems = formattedItems.slice(0, -2);\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete:' + formattedItems + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/delete`,\n timeout: 10000,\n data: JSON.stringify({\n items: selectedItems\n }),\n }).done(data => {\n $('#file_listing input:checked').each(function() {\n $(this).prop('checked', false);\n });\n\n $.each(selectedItemsElements, function() {\n $(this).addClass('warning').delay(200).fadeOut();\n })\n\n swal({\n type: 'success',\n title: 'Files Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete these files. Please try again.',\n });\n });\n });\n } else {\n swal({\n type: 'warning',\n title: '',\n text: 'Please select files/folders to delete.',\n });\n }\n }\n\n decompress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n title: ' Decompressing...',\n text: 'This might take a few seconds to complete.',\n html: true,\n allowOutsideClick: false,\n allowEscapeKey: false,\n showConfirmButton: false,\n });\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/decompress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`\n })\n }).done(data => {\n swal.close();\n Files.list(compPath);\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n\n compress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/compress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`,\n to: compPath.toString()\n })\n }).done(data => {\n Files.list(compPath, err => {\n if (err) return;\n const fileListing = $('#file_listing').find(`[data-name=\"${data.saved_as}\"]`).parent();\n fileListing.addClass('success pulsate').delay(3000).queue(() => {\n fileListing.removeClass('success pulsate').dequeue();\n });\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n}\n","\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ContextMenuClass {\n constructor() {\n this.activeLine = null;\n }\n\n run() {\n this.directoryClick();\n this.rightClick();\n }\n\n makeMenu(parent) {\n $(document).find('#fileOptionMenu').remove();\n if (!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n\n let newFilePath = $('#file_listing').data('current-dir');\n if (parent.data('type') === 'folder') {\n const nameBlock = parent.find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n newFilePath = `${currentPath}${currentName}`;\n }\n\n let buildMenu = '
      ';\n\n if (Pterodactyl.permissions.moveFiles) {\n buildMenu += '
    • Rename
    • \\\n
    • Move
    • ';\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n buildMenu += '
    • Copy
    • ';\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n buildMenu += '
    • Compress
    • ';\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n buildMenu += '
    • Decompress
    • ';\n }\n\n if (Pterodactyl.permissions.createFiles) {\n buildMenu += '
    • \\\n
    • New File
    • \\\n
    • New Folder
    • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles || Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
    • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n buildMenu += '
    • Download
    • ';\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
    • Delete
    • ';\n }\n\n buildMenu += '
    ';\n return buildMenu;\n }\n\n rightClick() {\n $('[data-action=\"toggleMenu\"]').on('mousedown', event => {\n event.preventDefault();\n if ($(document).find('#fileOptionMenu').is(':visible')) {\n $('body').trigger('click');\n return;\n }\n this.showMenu(event);\n });\n $('#file_listing > tbody td').on('contextmenu', event => {\n this.showMenu(event);\n });\n }\n\n showMenu(event) {\n const parent = $(event.target).closest('tr');\n const menu = $(this.makeMenu(parent));\n\n if (parent.data('type') === 'disabled') return;\n event.preventDefault();\n\n $(menu).appendTo('body');\n $(menu).data('invokedOn', $(event.target)).show().css({\n position: 'absolute',\n left: event.pageX - 150,\n top: event.pageY,\n });\n\n this.activeLine = parent;\n this.activeLine.addClass('active');\n\n // Handle Events\n const Actions = new ActionsClass(parent, menu);\n if (Pterodactyl.permissions.moveFiles) {\n $(menu).find('li[data-action=\"move\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.move();\n });\n $(menu).find('li[data-action=\"rename\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.rename();\n });\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n $(menu).find('li[data-action=\"copy\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.copy();\n });\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n if (parent.data('type') === 'folder') {\n $(menu).find('li[data-action=\"compress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"compress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.compress();\n });\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {\n $(menu).find('li[data-action=\"decompress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"decompress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.decompress();\n });\n }\n\n if (Pterodactyl.permissions.createFiles) {\n $(menu).find('li[data-action=\"folder\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.folder();\n });\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n if (parent.data('type') === 'file') {\n $(menu).find('li[data-action=\"download\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"download\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.download();\n });\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n $(menu).find('li[data-action=\"delete\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.delete();\n });\n }\n\n $(window).unbind().on('click', event => {\n if($(event.target).is('.disable-menu-hide')) {\n event.preventDefault();\n return;\n }\n $(menu).unbind().remove();\n if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n });\n }\n\n directoryClick() {\n $('a[data-action=\"directory-view\"]').on('click', function (event) {\n event.preventDefault();\n\n const path = $(this).parent().data('path') || '';\n const name = $(this).parent().data('name') || '';\n\n window.location.hash = encodeURIComponent(path + name);\n Files.list();\n });\n }\n}\n\nwindow.ContextMenu = new ContextMenuClass;\n","\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass FileManager {\n constructor() {\n this.list(this.decodeHash());\n }\n\n list(path, next) {\n if (_.isUndefined(path)) {\n path = this.decodeHash();\n }\n\n this.loader(true);\n $.ajax({\n type: 'POST',\n url: Pterodactyl.meta.directoryList,\n headers: {\n 'X-CSRF-Token': Pterodactyl.meta.csrftoken,\n },\n data: {\n directory: path,\n },\n }).done(data => {\n this.loader(false);\n $('#load_files').slideUp(10).html(data).slideDown(10, () => {\n ContextMenu.run();\n this.reloadFilesButton();\n this.addFolderButton();\n this.selectItem();\n this.selectAll();\n this.selectiveDeletion();\n this.selectRow();\n if (_.isFunction(next)) {\n return next();\n }\n });\n $('#internal_alert').slideUp();\n\n if (typeof Siofu === 'object') {\n Siofu.listenOnInput(document.getElementById(\"files_touch_target\"));\n }\n }).fail(jqXHR => {\n this.loader(false);\n if (_.isFunction(next)) {\n return next(new Error('Failed to load file listing.'));\n }\n swal({\n type: 'error',\n title: 'File Error',\n text: jqXHR.responseJSON.error || 'An error occured while attempting to process this request. Please try again.',\n });\n console.error(jqXHR);\n });\n }\n\n loader(show) {\n if (show){\n $('.file-overlay').fadeIn(100);\n } else {\n $('.file-overlay').fadeOut(100);\n }\n }\n\n reloadFilesButton() {\n $('i[data-action=\"reload-files\"]').unbind().on('click', () => {\n $('i[data-action=\"reload-files\"]').addClass('fa-spin');\n this.list();\n });\n }\n\n selectItem() {\n $('[data-action=\"addSelection\"]').on('click', event => {\n event.preventDefault();\n });\n }\n\n selectAll() {\n $('[data-action=\"selectAll\"]').on('click', event => {\n event.preventDefault();\n });\n }\n\n selectiveDeletion() {\n $('[data-action=\"selective-deletion\"]').on('mousedown', event => {\n new ActionsClass().deleteSelected();\n });\n }\n\n addFolderButton() {\n $('[data-action=\"add-folder\"]').unbind().on('click', () => {\n new ActionsClass().folder($('#file_listing').data('current-dir') || '/');\n })\n }\n\n selectRow() {\n $('#file_listing tr').on('mousedown', event => {\n if (event.which === 1) {\n if ($(event.target).is('th') || $(event.target).is('input[data-action=\"selectAll\"]')) {\n new ActionsClass().highlightAll(event);\n } else if ($(event.target).is('td') || $(event.target).is('input[data-action=\"addSelection\"]')) {\n new ActionsClass().toggleHighlight(event);\n }\n\n new ActionsClass().toggleMassActions();\n }\n });\n }\n\n decodeHash() {\n return decodeURIComponent(window.location.hash.substring(1));\n }\n\n}\n\nwindow.Files = new FileManager;\n"]} \ No newline at end of file +{"version":3,"sources":["src/actions.js","src/contextmenu.js","src/index.js"],"names":[],"mappings":"AAAA,a,8oBAqBM,a,YACF,sBAAY,OAAZ,CAAqB,IAArB,CAA2B,oCACvB,KAAK,OAAL,CAAe,OAAf,CACA,KAAK,IAAL,CAAY,IACf,C,kEAES,CACN,KAAK,OAAL,CAAe,SAClB,C,sCAEM,I,CAAM,CACT,GAAI,kBAAJ,CACA,GAAI,IAAJ,CAAU,CACN,WAAa,IAChB,CAFD,IAEO,CACH,GAAM,WAAY,EAAE,KAAK,OAAP,EAAgB,IAAhB,CAAqB,4BAArB,CAAlB,CACA,GAAM,aAAc,mBAAmB,UAAU,IAAV,CAAe,MAAf,CAAnB,CAApB,CACA,GAAM,aAAc,mBAAmB,UAAU,IAAV,CAAe,MAAf,CAAnB,CAApB,CAEA,GAAI,EAAE,KAAK,OAAP,EAAgB,IAAhB,CAAqB,MAArB,IAAiC,MAArC,CAA6C,CACzC,WAAa,WAChB,CAFD,IAEO,CACH,cAAgB,WAAhB,CAA8B,WAA9B,IACH,CACJ,CAED,KAAK,CAC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AnB,EACH,CACJ,CAVD,CAWD,C,+CAEY,CACT,MAAO,oBAAmB,OAAO,QAAP,CAAgB,IAAhB,CAAqB,SAArB,CAA+B,CAA/B,CAAnB,CACV,C,0BAIL,OAAO,KAAP,CAAe,GAAI,YAAnB","file":"filemanager.min.js","sourcesContent":["\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ActionsClass {\n constructor(element, menu) {\n this.element = element;\n this.menu = menu;\n }\n\n destroy() {\n this.element = undefined;\n }\n\n folder(path) {\n let inputValue\n if (path) {\n inputValue = path\n } else {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.data('name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n if ($(this.element).data('type') === 'file') {\n inputValue = currentPath;\n } else {\n inputValue = `${currentPath}${currentName}/`;\n }\n }\n\n swal({\n type: 'input',\n title: 'Create Folder',\n text: 'Please enter the path and folder name below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: inputValue\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/folder`,\n timeout: 10000,\n data: JSON.stringify({\n path: val,\n }),\n }).done(data => {\n swal.close();\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n move() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Move File',\n text: 'Please enter the new path for the file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/move`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal.close();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n\n }\n\n rename() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentLink = nameBlock.find('a');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const attachEditor = `\n \n \n `;\n\n nameBlock.html(attachEditor);\n const inputField = nameBlock.find('input');\n const inputLoader = nameBlock.find('.input-loader');\n\n inputField.focus();\n inputField.on('blur keydown', e => {\n // Save Field\n if (\n (e.type === 'keydown' && e.which === 27)\n || e.type === 'blur'\n || (e.type === 'keydown' && e.which === 13 && currentName === inputField.val())\n ) {\n if (!_.isEmpty(currentLink)) {\n nameBlock.html(currentLink);\n } else {\n nameBlock.html(currentName);\n }\n inputField.remove();\n ContextMenu.unbind().run();\n return;\n }\n\n if (e.type === 'keydown' && e.which !== 13) return;\n\n inputLoader.show();\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/rename`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${currentPath}${inputField.val()}`,\n }),\n }).done(data => {\n nameBlock.attr('data-name', inputField.val());\n if (!_.isEmpty(currentLink)) {\n let newLink = currentLink.attr('href');\n if (nameBlock.parent().data('type') !== 'folder') {\n newLink = newLink.substr(0, newLink.lastIndexOf('/')) + '/' + inputField.val();\n }\n currentLink.attr('href', newLink);\n nameBlock.html(\n currentLink.html(inputField.val())\n );\n } else {\n nameBlock.html(inputField.val());\n }\n inputField.remove();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n nameBlock.addClass('has-error').delay(2000).queue(() => {\n nameBlock.removeClass('has-error').dequeue();\n });\n inputField.popover({\n animation: true,\n placement: 'top',\n content: error,\n title: 'Save Error'\n }).popover('show');\n }).always(() => {\n inputLoader.remove();\n ContextMenu.unbind().run();\n });\n });\n }\n\n copy() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n\n swal({\n type: 'input',\n title: 'Copy File',\n text: 'Please enter the new path for the copied file below.',\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true,\n inputValue: `${currentPath}${currentName}`,\n }, (val) => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/copy`,\n timeout: 10000,\n data: JSON.stringify({\n from: `${currentPath}${currentName}`,\n to: `${val}`,\n }),\n }).done(data => {\n swal({\n type: 'success',\n title: '',\n text: 'File successfully copied.'\n });\n Files.list();\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: '',\n text: error,\n });\n });\n });\n }\n\n download() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const fileName = decodeURIComponent(nameBlock.attr('data-name'));\n const filePath = decodeURIComponent(nameBlock.data('path'));\n\n window.location = `/server/${Pterodactyl.server.uuidShort}/files/download/${filePath}${fileName}`;\n }\n\n delete() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const delPath = decodeURIComponent(nameBlock.data('path'));\n const delName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete ' + delName + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/delete`,\n timeout: 10000,\n data: JSON.stringify({\n items: [`${delPath}${delName}`]\n }),\n }).done(data => {\n nameBlock.parent().addClass('warning').delay(200).fadeOut();\n swal({\n type: 'success',\n title: 'File Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete this file. Please try again.',\n });\n });\n });\n }\n\n toggleMassActions() {\n if ($('#file_listing input[type=\"checkbox\"]:checked').length) {\n $('#mass_actions').removeClass('disabled');\n } else {\n $('#mass_actions').addClass('disabled');\n }\n }\n\n toggleHighlight(event) {\n const parent = $(event.currentTarget);\n const item = $(event.currentTarget).find('input');\n\n if($(item).is(':checked')) {\n $(item).prop('checked', false);\n parent.removeClass('warning').delay(200);\n } else {\n $(item).prop('checked', true);\n parent.addClass('warning').delay(200);\n }\n }\n\n highlightAll(event) {\n let parent;\n const item = $(event.currentTarget).find('input');\n\n if($(item).is(':checked')) {\n $('#file_listing input[type=checkbox]').prop('checked', false);\n $('#file_listing input[data-action=\"addSelection\"]').each(function() {\n parent = $(this).closest('tr');\n parent.removeClass('warning').delay(200);\n });\n } else {\n $('#file_listing input[type=checkbox]').prop('checked', true);\n $('#file_listing input[data-action=\"addSelection\"]').each(function() {\n parent = $(this).closest('tr');\n parent.addClass('warning').delay(200);\n });\n }\n }\n\n deleteSelected() {\n let selectedItems = [];\n let selectedItemsElements = [];\n let parent;\n let nameBlock;\n let delLocation;\n\n $('#file_listing input[data-action=\"addSelection\"]:checked').each(function() {\n parent = $(this).closest('tr');\n nameBlock = $(parent).find('td[data-identifier=\"name\"]');\n delLocation = decodeURIComponent(nameBlock.data('path')) + decodeURIComponent(nameBlock.data('name'));\n\n selectedItems.push(delLocation);\n selectedItemsElements.push(parent);\n });\n\n if (selectedItems.length != 0)\n {\n let formattedItems = \"\";\n $.each(selectedItems, function(key, value) {\n formattedItems += (\"\" + value + \", \");\n })\n\n formattedItems = formattedItems.slice(0, -2);\n\n swal({\n type: 'warning',\n title: '',\n text: 'Are you sure you want to delete:' + formattedItems + '? There is no reversing this action.',\n html: true,\n showCancelButton: true,\n showConfirmButton: true,\n closeOnConfirm: false,\n showLoaderOnConfirm: true\n }, () => {\n $.ajax({\n type: 'POST',\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/delete`,\n timeout: 10000,\n data: JSON.stringify({\n items: selectedItems\n }),\n }).done(data => {\n $('#file_listing input:checked').each(function() {\n $(this).prop('checked', false);\n });\n\n $.each(selectedItemsElements, function() {\n $(this).addClass('warning').delay(200).fadeOut();\n })\n\n swal({\n type: 'success',\n title: 'Files Deleted'\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: 'An error occured while attempting to delete these files. Please try again.',\n });\n });\n });\n } else {\n swal({\n type: 'warning',\n title: '',\n text: 'Please select files/folders to delete.',\n });\n }\n }\n\n decompress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n swal({\n title: ' Decompressing...',\n text: 'This might take a few seconds to complete.',\n html: true,\n allowOutsideClick: false,\n allowEscapeKey: false,\n showConfirmButton: false,\n });\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/decompress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`\n })\n }).done(data => {\n swal.close();\n Files.list(compPath);\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n\n compress() {\n const nameBlock = $(this.element).find('td[data-identifier=\"name\"]');\n const compPath = decodeURIComponent(nameBlock.data('path'));\n const compName = decodeURIComponent(nameBlock.data('name'));\n\n $.ajax({\n type: 'POST',\n url: `${Pterodactyl.node.scheme}://${Pterodactyl.node.fqdn}:${Pterodactyl.node.daemonListen}/v1/server/file/compress`,\n headers: {\n 'X-Access-Token': Pterodactyl.server.daemonSecret,\n 'X-Access-Server': Pterodactyl.server.uuid,\n },\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n files: `${compPath}${compName}`,\n to: compPath.toString()\n })\n }).done(data => {\n Files.list(compPath, err => {\n if (err) return;\n const fileListing = $('#file_listing').find(`[data-name=\"${data.saved_as}\"]`).parent();\n fileListing.addClass('success pulsate').delay(3000).queue(() => {\n fileListing.removeClass('success pulsate').dequeue();\n });\n });\n }).fail(jqXHR => {\n console.error(jqXHR);\n var error = 'An error occured while trying to process this request.';\n if (typeof jqXHR.responseJSON !== 'undefined' && typeof jqXHR.responseJSON.error !== 'undefined') {\n error = jqXHR.responseJSON.error;\n }\n swal({\n type: 'error',\n title: 'Whoops!',\n html: true,\n text: error\n });\n });\n }\n}\n","\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass ContextMenuClass {\n constructor() {\n this.activeLine = null;\n }\n\n run() {\n this.directoryClick();\n this.rightClick();\n }\n\n makeMenu(parent) {\n $(document).find('#fileOptionMenu').remove();\n if (!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n\n let newFilePath = $('#file_listing').data('current-dir');\n if (parent.data('type') === 'folder') {\n const nameBlock = parent.find('td[data-identifier=\"name\"]');\n const currentName = decodeURIComponent(nameBlock.attr('data-name'));\n const currentPath = decodeURIComponent(nameBlock.data('path'));\n newFilePath = `${currentPath}${currentName}`;\n }\n\n let buildMenu = '
      ';\n\n if (Pterodactyl.permissions.moveFiles) {\n buildMenu += '
    • Rename
    • \\\n
    • Move
    • ';\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n buildMenu += '
    • Copy
    • ';\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n buildMenu += '
    • Compress
    • ';\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n buildMenu += '
    • Decompress
    • ';\n }\n\n if (Pterodactyl.permissions.createFiles) {\n buildMenu += '
    • \\\n
    • New File
    • \\\n
    • New Folder
    • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles || Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
    • ';\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n buildMenu += '
    • Download
    • ';\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n buildMenu += '
    • Delete
    • ';\n }\n\n buildMenu += '
    ';\n return buildMenu;\n }\n\n rightClick() {\n $('[data-action=\"toggleMenu\"]').on('mousedown', event => {\n event.preventDefault();\n if ($(document).find('#fileOptionMenu').is(':visible')) {\n $('body').trigger('click');\n return;\n }\n this.showMenu(event);\n });\n $('#file_listing > tbody td').on('contextmenu', event => {\n this.showMenu(event);\n });\n }\n\n showMenu(event) {\n const parent = $(event.target).closest('tr');\n const menu = $(this.makeMenu(parent));\n\n if (parent.data('type') === 'disabled') return;\n event.preventDefault();\n\n $(menu).appendTo('body');\n $(menu).data('invokedOn', $(event.target)).show().css({\n position: 'absolute',\n left: event.pageX - 150,\n top: event.pageY,\n });\n\n this.activeLine = parent;\n this.activeLine.addClass('active');\n\n // Handle Events\n const Actions = new ActionsClass(parent, menu);\n if (Pterodactyl.permissions.moveFiles) {\n $(menu).find('li[data-action=\"move\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.move();\n });\n $(menu).find('li[data-action=\"rename\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.rename();\n });\n }\n\n if (Pterodactyl.permissions.copyFiles) {\n $(menu).find('li[data-action=\"copy\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.copy();\n });\n }\n\n if (Pterodactyl.permissions.compressFiles) {\n if (parent.data('type') === 'folder') {\n $(menu).find('li[data-action=\"compress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"compress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.compress();\n });\n }\n\n if (Pterodactyl.permissions.decompressFiles) {\n if (_.without(['application/zip', 'application/gzip', 'application/x-gzip'], parent.data('mime')).length < 3) {\n $(menu).find('li[data-action=\"decompress\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"decompress\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.decompress();\n });\n }\n\n if (Pterodactyl.permissions.createFiles) {\n $(menu).find('li[data-action=\"folder\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.folder();\n });\n }\n\n if (Pterodactyl.permissions.downloadFiles) {\n if (parent.data('type') === 'file') {\n $(menu).find('li[data-action=\"download\"]').removeClass('hidden');\n }\n $(menu).find('li[data-action=\"download\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.download();\n });\n }\n\n if (Pterodactyl.permissions.deleteFiles) {\n $(menu).find('li[data-action=\"delete\"]').unbind().on('click', e => {\n e.preventDefault();\n Actions.delete();\n });\n }\n\n $(window).unbind().on('click', event => {\n if($(event.target).is('.disable-menu-hide')) {\n event.preventDefault();\n return;\n }\n $(menu).unbind().remove();\n if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');\n });\n }\n\n directoryClick() {\n $('a[data-action=\"directory-view\"]').on('click', function (event) {\n event.preventDefault();\n\n const path = $(this).parent().data('path') || '';\n const name = $(this).parent().data('name') || '';\n\n window.location.hash = encodeURIComponent(path + name);\n Files.list();\n });\n }\n}\n\nwindow.ContextMenu = new ContextMenuClass;\n","\"use strict\";\n\n// Copyright (c) 2015 - 2017 Dane Everitt \n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nclass FileManager {\n constructor() {\n this.list(this.decodeHash());\n }\n\n list(path, next) {\n if (_.isUndefined(path)) {\n path = this.decodeHash();\n }\n\n this.loader(true);\n $.ajax({\n type: 'POST',\n url: Pterodactyl.meta.directoryList,\n headers: {\n 'X-CSRF-Token': Pterodactyl.meta.csrftoken,\n },\n data: {\n directory: path,\n },\n }).done(data => {\n this.loader(false);\n $('#load_files').slideUp(10).html(data).slideDown(10, () => {\n ContextMenu.run();\n this.reloadFilesButton();\n this.addFolderButton();\n this.selectItem();\n this.selectAll();\n this.selectiveDeletion();\n this.selectRow();\n if (_.isFunction(next)) {\n return next();\n }\n });\n $('#internal_alert').slideUp();\n\n if (typeof Siofu === 'object') {\n Siofu.listenOnInput(document.getElementById(\"files_touch_target\"));\n }\n }).fail(jqXHR => {\n this.loader(false);\n if (_.isFunction(next)) {\n return next(new Error('Failed to load file listing.'));\n }\n\n if ((path !== '' && path !== '/') && jqXHR.status === 404) {\n return this.list('', next);\n }\n\n swal({\n type: 'error',\n title: 'File Error',\n text: jqXHR.responseJSON.error || 'An error occured while attempting to process this request. Please try again.',\n });\n console.error(jqXHR);\n });\n }\n\n loader(show) {\n if (show){\n $('.file-overlay').fadeIn(100);\n } else {\n $('.file-overlay').fadeOut(100);\n }\n }\n\n reloadFilesButton() {\n $('i[data-action=\"reload-files\"]').unbind().on('click', () => {\n $('i[data-action=\"reload-files\"]').addClass('fa-spin');\n this.list();\n });\n }\n\n selectItem() {\n $('[data-action=\"addSelection\"]').on('click', event => {\n event.preventDefault();\n });\n }\n\n selectAll() {\n $('[data-action=\"selectAll\"]').on('click', event => {\n event.preventDefault();\n });\n }\n\n selectiveDeletion() {\n $('[data-action=\"selective-deletion\"]').on('mousedown', event => {\n new ActionsClass().deleteSelected();\n });\n }\n\n addFolderButton() {\n $('[data-action=\"add-folder\"]').unbind().on('click', () => {\n new ActionsClass().folder($('#file_listing').data('current-dir') || '/');\n })\n }\n\n selectRow() {\n $('#file_listing tr').on('mousedown', event => {\n if (event.which === 1) {\n if ($(event.target).is('th') || $(event.target).is('input[data-action=\"selectAll\"]')) {\n new ActionsClass().highlightAll(event);\n } else if ($(event.target).is('td') || $(event.target).is('input[data-action=\"addSelection\"]')) {\n new ActionsClass().toggleHighlight(event);\n }\n\n new ActionsClass().toggleMassActions();\n }\n });\n }\n\n decodeHash() {\n return decodeURIComponent(window.location.hash.substring(1));\n }\n\n}\n\nwindow.Files = new FileManager;\n"]} \ No newline at end of file diff --git a/public/themes/pterodactyl/js/frontend/files/src/index.js b/public/themes/pterodactyl/js/frontend/files/src/index.js index 3b3f6993..e8011d6c 100644 --- a/public/themes/pterodactyl/js/frontend/files/src/index.js +++ b/public/themes/pterodactyl/js/frontend/files/src/index.js @@ -63,6 +63,11 @@ class FileManager { if (_.isFunction(next)) { return next(new Error('Failed to load file listing.')); } + + if ((path !== '' && path !== '/') && jqXHR.status === 404) { + return this.list('', next); + } + swal({ type: 'error', title: 'File Error',