diff --git a/.gitignore b/.gitignore index a0c3e0a..3a14bb0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,11 @@ .idea .vscode .phpactor* + /vendor/ /vendor-bin/**/vendor/ + /js/ node_modules/ + /.php-cs-fixer.cache diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 9d6b7fe..ee938bb 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -21,5 +21,7 @@ ->notPath('src') ->notPath('vendor') ->notPath('vendor-bin') + ->notPath('build') + ->notPath('node_modules') ->in(__DIR__); return $config; diff --git a/CHANGELOG.md b/CHANGELOG.md index 706dc3e..73ae544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ - SPDX-FileCopyrightText: 2025 LibreCode coop and contributors - SPDX-License-Identifier: AGPL-3.0-or-later --> +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 1.3.6 diff --git a/README.md b/README.md index 9fba6c0..969ba5b 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,22 @@ This app does only support local external storage backend ## Supported -* Zip -* Rar -* Tar -* Gzip -* 7z -* Deb -* Bzip2 +- Zip +- Rar +- Tar +- Gzip +- 7z +- Deb +- Bzip2 ## Requirements -* Rar PHP extension +- Rar PHP extension ```bash pecl -v install rar ## or ## sudo apt-get install unrar ``` -* p7zip and p7zip-full +- p7zip and p7zip-full ## Steps to install p7zip on Linux » Ubuntu and Fedora or CentOS / RHEL @@ -78,9 +78,9 @@ sudo rpm -U --quiet p7zip-plugins-16.02-10.el6.x86_64.rpm ## TODO -* Add password support -* Add viewer for archives -* Support nextcloud's encryption module +- Add password support +- Add viewer for archives +- Support nextcloud's encryption module ## Preview diff --git a/composer.json b/composer.json index c9ac574..590bf9f 100644 --- a/composer.json +++ b/composer.json @@ -1,28 +1,20 @@ { - "name": "extract/extract", + "name": "librecode/extract", "description": "Allows to extract archive from the web interface", - "type": "project", - "license": "AGPL", + "license": "AGPL-3.0-or-later", "authors": [ { "name": "Paul Lereverend" + }, + { + "name": "LibreCode Coop" } ], - "config": { - "optimize-autoloader": true, - "classmap-authoritative": true, - "sort-packages": true, - "platform": { - "php": "8.1" - }, - "allow-plugins": { - "bamarni/composer-bin-plugin": true + "autoload": { + "psr-4": { + "OCA\\Extract\\": "lib/" } }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8", - "nextcloud/ocp": "dev-master" - }, "scripts": { "bin": "echo 'bin not installed'", "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l", @@ -39,6 +31,24 @@ "composer dump-autoload" ] }, + "require": { + "bamarni/composer-bin-plugin": "^1.8", + "php": "^8.1" + }, + "require-dev": { + "nextcloud/ocp": "dev-master" + }, + "config": { + "optimize-autoloader": true, + "classmap-authoritative": true, + "sort-packages": true, + "platform": { + "php": "8.1" + }, + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, "extra": { "bamarni-bin": { "bin-links": true, @@ -49,10 +59,5 @@ "psr-4": { "OCP\\": "vendor/nextcloud/ocp/OCP/" } - }, - "autoload": { - "psr-4": { - "OCA\\Extract\\": "lib/" - } } } diff --git a/composer.lock b/composer.lock index d276f1d..ecdb765 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7365f43b6c225a61f49e55a7f4cc6d43", - "packages": [], - "packages-dev": [ + "content-hash": "8b97ca295ed78f1cd04575a07a8d5a87", + "packages": [ { "name": "bamarni/composer-bin-plugin", "version": "1.8.2", @@ -63,19 +62,21 @@ "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2" }, "time": "2022-10-31T08:38:03+00:00" - }, + } + ], + "packages-dev": [ { "name": "nextcloud/ocp", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "dcc83e350a5bbf3f4d679a772e2b46c5f0844d75" + "reference": "f1f6aa62139bbd44e6e9fbbf9e0715831430f9d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/dcc83e350a5bbf3f4d679a772e2b46c5f0844d75", - "reference": "dcc83e350a5bbf3f4d679a772e2b46c5f0844d75", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/f1f6aa62139bbd44e6e9fbbf9e0715831430f9d1", + "reference": "f1f6aa62139bbd44e6e9fbbf9e0715831430f9d1", "shasum": "" }, "require": { @@ -111,7 +112,7 @@ "issues": "https://github.com/nextcloud-deps/ocp/issues", "source": "https://github.com/nextcloud-deps/ocp/tree/master" }, - "time": "2025-09-04T08:38:27+00:00" + "time": "2025-09-23T00:46:33+00:00" }, { "name": "psr/clock", @@ -322,7 +323,9 @@ }, "prefer-stable": false, "prefer-lowest": false, - "platform": {}, + "platform": { + "php": "^8.1" + }, "platform-dev": {}, "platform-overrides": { "php": "8.1" diff --git a/css/style.css b/css/style.css deleted file mode 100644 index f39be96..0000000 --- a/css/style.css +++ /dev/null @@ -1,9 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2025 LibreCode coop and contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -.icon-extract { - background-image: url("../img/extracticon.svg"); -} - diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 0ebc862..34499b7 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -19,19 +19,16 @@ final class Application extends App implements IBootstrap { public const APP_ID = 'extract'; - public function __construct(array $urlParams = []) { - parent::__construct(self::APP_ID, $urlParams); + public function __construct() { + parent::__construct(self::APP_ID); } - // Called later than "register". #[\Override] - public function boot(IBootContext $context): void { + public function register(IRegistrationContext $context): void { + $context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadExtractActions::class); } - // Called earlier than boot, so anything initialized in the - // "boot()" method must not be used here. #[\Override] - public function register(IRegistrationContext $context): void { - $context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadExtractActions::class); + public function boot(IBootContext $context): void { } } diff --git a/package.json b/package.json index 93d991d..87bcc15 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "dev": "vite build --mode development", "lint": "eslint", "lint:fix": "eslint --fix", - "stylelint": "stylelint css/*.css css/*.scss src/**/*.scss", - "stylelint:fix": "stylelint css/*.css css/*.scss src/**/*.scss --fix", + "stylelint": "stylelint src/**/*.scss src/**/*.css --allow-empty-input", + "stylelint:fix": "src/**/*.scss src/**/*.css --fix", "typescript:check": "tsc --noEmit", "typescript:generate": "npx openapi-typescript ./openapi.json -t -o src/types/openapi/openapi.ts", "watch": "vite build --mode development --watch" diff --git a/vendor-bin/coding-standard/composer.lock b/vendor-bin/coding-standard/composer.lock index 77c89e6..22a02aa 100644 --- a/vendor-bin/coding-standard/composer.lock +++ b/vendor-bin/coding-standard/composer.lock @@ -9,26 +9,26 @@ "packages-dev": [ { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.32.0", + "version": "v3.34.0", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "c3a815a496f5cd6356726902f421013cbb7ba3f3" + "reference": "230dd015f9fa253850430250caf65f5af1cc1e89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/c3a815a496f5cd6356726902f421013cbb7ba3f3", - "reference": "c3a815a496f5cd6356726902f421013cbb7ba3f3", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/230dd015f9fa253850430250caf65f5af1cc1e89", + "reference": "230dd015f9fa253850430250caf65f5af1cc1e89", "shasum": "" }, "require": { "ext-filter": "*", "ext-tokenizer": "*", - "friendsofphp/php-cs-fixer": "^3.85", + "friendsofphp/php-cs-fixer": "^3.87", "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.6.22 || 10.5.45 || ^11.5.7" + "phpunit/phpunit": "^9.6.24 || ^10.5.51 || ^11.5.32" }, "type": "library", "autoload": { @@ -49,7 +49,7 @@ "description": "A set of custom fixers for PHP CS Fixer", "support": { "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", - "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.32.0" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.34.0" }, "funding": [ { @@ -57,7 +57,7 @@ "type": "github" } ], - "time": "2025-08-01T06:10:10+00:00" + "time": "2025-09-21T10:46:10+00:00" }, { "name": "nextcloud/coding-standard", @@ -106,16 +106,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.87.1", + "version": "v3.88.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "9225ae45f794eea949198f0f8e417b078c006283" + "reference": "f0ac6c4006ed7817cadb251f2741db2c111a009f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/9225ae45f794eea949198f0f8e417b078c006283", - "reference": "9225ae45f794eea949198f0f8e417b078c006283", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/f0ac6c4006ed7817cadb251f2741db2c111a009f", + "reference": "f0ac6c4006ed7817cadb251f2741db2c111a009f", "shasum": "" }, "require": { @@ -152,9 +152,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.87.1" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.88.0" }, - "time": "2025-09-02T15:28:21+00:00" + "time": "2025-09-24T21:32:19+00:00" } ], "aliases": [],