diff --git a/.editorconfig b/.editorconfig index 9a9710a..f9f8af8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,5 @@ trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false -[*.yml] -indent_size = 2 \ No newline at end of file +[{*.yml,*.js}] +indent_size = 2 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..76e1142 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - + package-ecosystem: composer + directory: "/" + schedule: + interval: weekly + versioning-strategy: auto + groups: + dev-dependencies: + dependency-type: "development" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39528f4..4bd8fe5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,102 +12,13 @@ on: - master - main - develop + schedule: + - cron: "0 6 * * *" -jobs: - laravel9-tests: - runs-on: ubuntu-latest - - strategy: - matrix: - operating-system: [ ubuntu-latest ] - php: [ '8.1', '8.2' ] - dependency-stability: [ 'prefer-stable' ] - - laravel: [ '9.*' ] - include: - - laravel: 9.* - testbench: 8.* - - name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - - name: Cache node_modules directory - uses: actions/cache@v4 - id: node_modules-cache - with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} - - - name: Install NPM packages - if: steps.node_modules-cache.outputs.cache-hit != 'true' - run: npm ci --include=dev - - - name: Install PHP versions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache Composer dependencies - uses: actions/cache@v4 - id: actions-cache - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Cache PHP dependencies (vendor) - uses: actions/cache@v4 - id: vendor-cache - with: - path: vendor - key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }} - - - name: Install Laravel Dependencies - if: steps.vendor-cache.outputs.cache-hit != 'true' - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction --no-suggest - - - name: Update Dependencies with latest stable - if: matrix.dependency-stability == 'prefer-stable' - run: composer update --prefer-stable - - - name: Update Dependencies with lowest stable - if: matrix.dependency-stability == 'prefer-lowest' - run: composer update --prefer-stable --prefer-lowest - - - name: Set up Git User - run: | - git config --global user.email "github-actions@example.com" - git config --global user.name "GitHub Actions" - - # Code quality - - name: Execute tests (Unit and Feature tests) via PestPHP - shell: 'script -q -e -c "bash {0}"' - # Set environment - env: - SESSION_DRIVER: array - TTY: true - - run: vendor/bin/pest - - - name: Execute Code Sniffer via Laravel Pint - run: vendor/bin/pint --test src config +permissions: + contents: read +jobs: laravel10-tests: runs-on: ubuntu-latest @@ -138,7 +49,7 @@ jobs: id: node_modules-cache with: path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} - name: Install NPM packages if: steps.node_modules-cache.outputs.cache-hit != 'true' @@ -159,16 +70,16 @@ jobs: id: actions-cache with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-composer-laravel-10-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-composer- + ${{ runner.os }}-composer-laravel-10-${{ matrix.php }}- - name: Cache PHP dependencies (vendor) uses: actions/cache@v4 id: vendor-cache with: path: vendor - key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-build-laravel-10-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} - name: Install Laravel Dependencies if: steps.vendor-cache.outputs.cache-hit != 'true' @@ -202,13 +113,22 @@ jobs: - name: Execute Code Sniffer via Laravel Pint run: vendor/bin/pint --test src config + - name: Execute PHP Stan + run: vendor/bin/phpstan + + - name: Execute Rector + run: vendor/bin/rector --dry-run + + - name: Execute PHP Insights + run: vendor/bin/phpinsights --no-interaction + laravel11-tests: runs-on: ubuntu-latest strategy: matrix: operating-system: [ ubuntu-latest ] - php: [ '8.2', '8.3' ] + php: [ '8.2', '8.3', '8.4' ] dependency-stability: [ 'prefer-stable' ] laravel: [ '11.*' ] @@ -232,7 +152,7 @@ jobs: id: node_modules-cache with: path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} - name: Install NPM packages if: steps.node_modules-cache.outputs.cache-hit != 'true' @@ -253,16 +173,16 @@ jobs: id: actions-cache with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-composer-laravel-11-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-composer- + ${{ runner.os }}-composer-laravel-11-${{ matrix.php }}- - name: Cache PHP dependencies (vendor) uses: actions/cache@v4 id: vendor-cache with: path: vendor - key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-build-laravel-11-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} - name: Install Laravel Dependencies if: steps.vendor-cache.outputs.cache-hit != 'true' @@ -296,3 +216,12 @@ jobs: - name: Execute Code Sniffer via Laravel Pint run: vendor/bin/pint --test src config + - name: Execute PHP Stan + run: vendor/bin/phpstan + + - name: Execute Rector + run: vendor/bin/rector --dry-run + + - name: Execute PHP Insights + run: vendor/bin/phpinsights --no-interaction + diff --git a/.scrutinizer.yml b/.scrutinizer.yml index d5c49ed..a6af569 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,8 +1,9 @@ build: + image: default-jammy environment: + node: v20 php: - version: 8.1 - node: "v16.20.0" + version: 8.3.3 nodes: analysis: project_setup: diff --git a/README.md b/README.md index 0707e70..1268ac6 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,13 @@ ## ✨ Features -- **Pre-configured Hooks:** Laravel Git Hooks comes with pre-configured pre-commit hooks for popular tools, such as Laravel Pint, PHPCS, ESLint, Prettier, Larastan, Enlightn, and Blade Formatter, making it easy to enforce coding standards and style guidelines right away. +- **Pre-configured Hooks:** Laravel Git Hooks comes with pre-configured pre-commit hooks for popular tools, such as Laravel Pint, PHPCS, ESLint, Prettier, Larastan, Enlightn, Rector, PHP Insights and Blade Formatter, making it easy to enforce coding standards and style guidelines right away. - **Manage Git Hooks:** Easily manage your Git hooks in your Laravel projects with a streamlined and organized approach. - **Edit Commit Messages:** Gain control over your commit messages by customizing them to meet your project requirements and maintain a clean Git history. - **Create Custom Hooks:** Add and integrate custom hooks tailored to your specific project needs, ensuring better code quality and adherence to guidelines. - **Artisan Command for Hook Generation:** The package includes a convenient Artisan command that allows you to effortlessly generate new hooks of various types. Such as: `pre-commit`, `prepare-commit-msg`, `commit-msg`, `post-commit`, `pre-push` -- **Code Quality:** The package is thoroughly tested, with 100% of code coverage, ensuring its reliability and stability in a wide range of Laravel projects. +- **Code Quality:** The package is thoroughly tested, with >95% of code coverage, ensuring its reliability and stability in a wide range of Laravel projects. +- **Docker support:** Each hook can be configured to either run locally or inside a docker container. ## 1️⃣ Installation @@ -61,9 +62,106 @@ To use the already created pre-commit hooks of this package, you can simply edit \Igorsgm\GitHooks\Console\Commands\Hooks\EnlightnPreCommitHook::class, // Enlightn \Igorsgm\GitHooks\Console\Commands\Hooks\ESLintPreCommitHook::class, // ESLint \Igorsgm\GitHooks\Console\Commands\Hooks\PrettierPreCommitHook::class, // Prettier + \Igorsgm\GitHooks\Console\Commands\Hooks\PhpInsightsPreCommitHook::class, // PhpInsights + \Igorsgm\GitHooks\Console\Commands\Hooks\RectorPreCommitHook::class, // Rector ], ``` +By default the pre-commit hooks will stop at first failure and will not continue with the remaining tools. + +If the tool contains a fixer option it will prompt in the CLI to run the fix command. + +This behavior can be adjusted using the following parameters from git-hooks.php config file: +```php + /* + |-------------------------------------------------------------------------- + | Automatically fix errors + |-------------------------------------------------------------------------- + | + | This configuration option allows you to configure the git hooks to + | automatically run the fixer without any CLI prompt. + | + */ + 'automatically_fix_errors' => false, + + /* + |-------------------------------------------------------------------------- + | Automatically re-run analyzer after autofix + |-------------------------------------------------------------------------- + | + | This configuration option allows you to configure the git hooks to + | automatically re-run the analyzer command after autofix. + | The git hooks will not fail in case the re-run is succesful. + | + */ + 'rerun_analyzer_after_autofix' => false, + + /* + |-------------------------------------------------------------------------- + | Stop at first analyzer failure + |-------------------------------------------------------------------------- + | + | This configuration option allows you to configure the git hooks to + | stop (or not) at the first analyzer failure encountered. + | + */ + 'stop_at_first_analyzer_failure' => true, +``` + +There are also several debug options which can be adjusted using the following parameters from git-hooks.php config file: + +```php + /* + |-------------------------------------------------------------------------- + | Output errors + |-------------------------------------------------------------------------- + | + | This configuration option allows you output any errors encountered + | during execution directly for easy debug. + | + */ + 'output_errors' => false, + + /* + |-------------------------------------------------------------------------- + | Debug commands + |-------------------------------------------------------------------------- + | + | This configuration option allows you to configure the git hooks to + | display the commands that are executed (usually for debug purpose). + | + */ + 'debug_commands' => false, + + /* + |-------------------------------------------------------------------------- + | Debug output + |-------------------------------------------------------------------------- + | + | This configuration option allows you display the output of each + | command during execution directly for easy debug. + | + */ + 'debug_output' => false, +``` +### Laravel Sail support + +If you are using Laravel Sail and maybe not lokal PHP is installed, you can adjust the following parameters in the git-hooks.php config file: + +```php + 'use_sail' => env('GITHOOKS_USE_SAIL', false), +``` +This will force the local git hooks to use the `sail` command to execute the hooks. + +### Docker support + +By default commands are executed locally, however this behavior can be adjusted for each hook using the parameters `run_in_docker` and `docker_container`: + +```php + 'run_in_docker' => env('LARAVEL_PINT_RUN_IN_DOCKER', true), + 'docker_container' => env('LARAVEL_PINT_DOCKER_CONTAINER', 'app'), +``` + ### Creating Custom Git Hooks 1) If you need to create a custom Git hook for your project, Laravel Git Hooks makes it easy with the `git-hooks:make` Artisan command. To create a new custom hook, simply run the following command: ```bash diff --git a/composer.json b/composer.json index 7853733..2c0a8df 100644 --- a/composer.json +++ b/composer.json @@ -22,21 +22,24 @@ ], "require": { "php": "^8.1", - "illuminate/config": "^9.0|^10.0|^11.0", - "illuminate/console": "^9.0|^10.0|^11.0", - "illuminate/container": "^9.0|^10.0|^11.0", - "illuminate/contracts": "^9.0|^10.0|^11.0", - "illuminate/pipeline": "^9.0|^10.0|^11.0", - "illuminate/support": "^9.0|^10.0|^11.0" + "illuminate/config": "^10.0|^11.0", + "illuminate/console": "^10.0|^11.0", + "illuminate/container": "^10.0|^11.0", + "illuminate/contracts": "^10.0|^11.0", + "illuminate/pipeline": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0" }, "require-dev": { "enlightn/enlightn": "^2.3", - "laravel/pint": "^1.2", - "mockery/mockery": "^1.5.1", "larastan/larastan": "^2.9", + "laravel/pint": "^1.2", + "mockery/mockery": "^1.6.1", + "nunomaduro/phpinsights": "^2.12", "orchestra/testbench": "^v8.0.0|^v9.0.0", - "pestphp/pest": "^2.0", - "squizlabs/php_codesniffer": "^3.7" + "pestphp/pest": "^2.0|^3.0", + "pestphp/pest-plugin-laravel": "^2.0 | ^3.0", + "rector/rector": "^1.0 | ^2.0 | ^3.0", + "squizlabs/php_codesniffer": "^3.11.0" }, "autoload": { "psr-4": { @@ -55,7 +58,8 @@ "config": { "sort-packages": true, "allow-plugins": { - "pestphp/pest-plugin": true + "pestphp/pest-plugin": true, + "dealerdirect/phpcodesniffer-composer-installer": true } }, "extra": { diff --git a/config/git-hooks.php b/config/git-hooks.php index 47d4cb1..ecb3952 100644 --- a/config/git-hooks.php +++ b/config/git-hooks.php @@ -1,5 +1,7 @@ env('LARASTAN_PATH', 'vendor/bin/phpstan'), 'config' => env('LARASTAN_CONFIG', 'phpstan.neon'), 'additional_params' => env('LARASTAN_ADDITIONAL_PARAMS', '--xdebug'), + 'file_extensions' => env('LARASTAN_FILE_EXTENSIONS', '/\.php$/'), 'run_in_docker' => env('LARAVEL_LARASTAN_RUN_IN_DOCKER', false), 'docker_container' => env('LARAVEL_LARASTAN_DOCKER_CONTAINER', ''), ], @@ -199,6 +202,22 @@ 'run_in_docker' => env('BLADE_FORMATTER_RUN_IN_DOCKER', false), 'docker_container' => env('BLADE_FORMATTER_DOCKER_CONTAINER', ''), ], + 'rector' => [ + 'path' => env('RECTOR_PATH', 'vendor/bin/rector'), + 'config' => env('RECTOR_CONFIG', 'rector.php'), + 'file_extensions' => env('RECTOR_FILE_EXTENSIONS', '/\.php$/'), + 'additional_params' => env('RECTOR_ADDITIONAL_PARAMS', ''), + 'run_in_docker' => env('RECTOR_RUN_IN_DOCKER', false), + 'docker_container' => env('RECTOR_DOCKER_CONTAINER', ''), + ], + 'phpinsights' => [ + 'path' => env('PHPINSIGHTS_PATH', 'vendor/bin/phpinsights'), + 'config' => env('PHPINSIGHTS_CONFIG', 'phpinsights.php'), + 'file_extensions' => env('PHPINSIGHTS_FILE_EXTENSIONS', '/\.php$/'), + 'additional_params' => env('PHPINSIGHTS_ADDITIONAL_PARAMS', ''), + 'run_in_docker' => env('PHPINSIGHTS_RUN_IN_DOCKER', false), + 'docker_container' => env('PHPINSIGHTS_DOCKER_CONTAINER', ''), + ], 'prettier' => [ 'path' => env('PRETTIER_PATH', 'node_modules/.bin/prettier'), 'config' => env('PRETTIER_CONFIG', '.prettierrc.json'), @@ -237,14 +256,41 @@ /* |-------------------------------------------------------------------------- - | Output errors + | Laravel Sail |-------------------------------------------------------------------------- | - | This configuration option allows you output any errors encountered - | during execution directly for easy debug. + | If you are using Laravel Sail you may not have local PHP or Composer. + | + | This configuration option allows you to use local Git but still run Artisan commands with `sail` in front of them. + | + | The `artisan_path` configuration is ignored. + | + */ + 'use_sail' => env('GITHOOKS_USE_SAIL', false), + + /* + |-------------------------------------------------------------------------- + | Validate paths + |-------------------------------------------------------------------------- + | + | This configuration option allows you enable (or not) validation + | of paths. This can be useful when binary files are not part of the + | project directly. | */ - 'output_errors' => false, + 'validate_paths' => env('GITHOOKS_VALIDATE_PATHS', true), + + /* + |-------------------------------------------------------------------------- + | Analyzer chunk size + |-------------------------------------------------------------------------- + | + | This configuration option allows you to set the number of files to be + | sent in chunks to the analyzers. Can also be set to 1 to send them + | one by one. + | + */ + 'analyzer_chunk_size' => env('GITHOOKS_ANALYZER_CHUNK_SIZE', 100), /* |-------------------------------------------------------------------------- @@ -255,7 +301,7 @@ | automatically run the fixer without any CLI prompt. | */ - 'automatically_fix_errors' => false, + 'automatically_fix_errors' => env('GITHOOKS_AUTOMATICALLY_FIX_ERRORS', false), /* |-------------------------------------------------------------------------- @@ -267,7 +313,7 @@ | The git hooks will not fail in case the re-run is succesful. | */ - 'rerun_analyzer_after_autofix' => false, + 'rerun_analyzer_after_autofix' => env('GITHOOKS_RERUN_ANALYZER_AFTER_AUTOFIX', false), /* |-------------------------------------------------------------------------- @@ -278,7 +324,18 @@ | stop (or not) at the first analyzer failure encountered. | */ - 'stop_at_first_analyzer_failure' => true, + 'stop_at_first_analyzer_failure' => env('GITHOOKS_STOP_AT_FIRST_ANALYZER_FAILURE', true), + + /* + |-------------------------------------------------------------------------- + | Output errors + |-------------------------------------------------------------------------- + | + | This configuration option allows you output any errors encountered + | during execution directly for easy debug. + | + */ + 'output_errors' => env('GITHOOKS_OUTPUT_ERRORS', false), /* |-------------------------------------------------------------------------- @@ -289,5 +346,16 @@ | display the commands that are executed (usually for debug purpose). | */ - 'debug_commands' => false, + 'debug_commands' => env('GITHOOKS_DEBUG_COMMANDS', false), + + /* + |-------------------------------------------------------------------------- + | Debug output + |-------------------------------------------------------------------------- + | + | This configuration option allows you display the output of each + | command during execution directly for easy debug. + | + */ + 'debug_output' => env('GITHOOKS_DEBUG_OUTPUT', false), ]; diff --git a/package-lock.json b/package-lock.json index 8c6845d..2cfcf96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,25 +5,12 @@ "packages": { "": { "devDependencies": { - "blade-formatter": "^1.32.9", - "eslint": "^8.37.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-standard": "^17.0.0", - "eslint-plugin-import": "^2.27.5", + "blade-formatter": "^1.42.0", + "eslint": "^9.15.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-vue": "^9.10.0", - "prettier": "2.8.7" - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "prettier": "2.8.8" } }, "node_modules/@alloc/quick-lru": { @@ -40,9 +27,9 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.4.tgz", - "integrity": "sha512-VOQOexSilscN24VEY810G/PqtpFvx/z6UqDIjIWbDe2368HhDLkYN5TYwaEz/+eRCUkhJ2WaNLLmQAlxzfWj4w==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.26.0.tgz", + "integrity": "sha512-YXHu5lN8kJCb1LOb9PgV6pvak43X2h4HvRApcN5SdWeaItQOzfn1hgP6jasD6KWQyJDBxrVmA9o9OivlnNJK/w==", "dev": true, "license": "MIT", "dependencies": { @@ -54,42 +41,86 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.5", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz", + "integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -97,35 +128,116 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.18.0.tgz", + "integrity": "sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "node_modules/@eslint/plugin-kit": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz", + "integrity": "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.10.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -142,12 +254,19 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -168,9 +287,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "engines": { @@ -253,9 +372,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "dev": true, "license": "MIT", "dependencies": { @@ -288,9 +407,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true, "license": "MIT" }, @@ -361,6 +480,13 @@ "node": ">=14" } }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, "node_modules/@shufo/tailwindcss-class-sorter": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@shufo/tailwindcss-class-sorter/-/tailwindcss-class-sorter-3.0.1.tgz", @@ -376,6 +502,20 @@ "node": ">= 14.0.0" } }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -383,13 +523,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true, - "license": "ISC" - }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", @@ -401,9 +534,9 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -441,16 +574,16 @@ "license": "MIT" }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -519,14 +652,14 @@ "license": "Python-2.0" }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" }, "engines": { "node": ">= 0.4" @@ -578,16 +711,16 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -597,16 +730,16 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -616,20 +749,19 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -675,9 +807,9 @@ } }, "node_modules/blade-formatter": { - "version": "1.41.1", - "resolved": "https://registry.npmjs.org/blade-formatter/-/blade-formatter-1.41.1.tgz", - "integrity": "sha512-J4L0hsw+r6XSnrEpHMPDldfPeaEmhHwXacs5oFh+9FgDu2Ec7p1tLxA8QXdgcXZU0ILTMkzAtusia10oP05g3Q==", + "version": "1.42.0", + "resolved": "https://registry.npmjs.org/blade-formatter/-/blade-formatter-1.42.0.tgz", + "integrity": "sha512-eQ/3U1UVXsZhdaHqIbiPrkMEtkXrUSzTUMNXcyFNmWJTnbqpRsC3H/CmraYfPUZdxJTPeCxcZ1UpxaeB3K4GrA==", "dev": true, "license": "MIT", "dependencies": { @@ -691,10 +823,10 @@ "find-config": "^1.0.0", "glob": "^8.0.1", "html-attribute-sorter": "^0.4.3", - "ignore": "^5.1.8", + "ignore": "^6.0.0", "js-beautify": "^1.14.8", "lodash": "^4.17.19", - "php-parser": "3.1.5", + "php-parser": "3.2.1", "prettier": "^3.2.5", "string-replace-async": "^2.0.0", "tailwindcss": "^3.1.8", @@ -724,67 +856,10 @@ "prettier": "^3.0.0" } }, - "node_modules/blade-formatter/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/blade-formatter/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/blade-formatter/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, - "node_modules/blade-formatter/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/blade-formatter/node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, "license": "MIT", "bin": { @@ -797,31 +872,25 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true, - "license": "ISC" - }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -844,18 +913,61 @@ "semver": "^7.0.0" } }, + "node_modules/builtins/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dev": true, "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -926,6 +1038,19 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -1005,17 +1130,10 @@ "proto-list": "~1.2.1" } }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true, - "license": "MIT" - }, "node_modules/core-js-pure": { - "version": "3.36.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.36.1.tgz", - "integrity": "sha512-NXCvHvSVYSrewP0L5OhltzXeWFJLo2AL2TYnj6iLV3Bw8mM62wAQMNgUCRI6EBu6hVVpbCxmOPlxh1Ikw2PfUA==", + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.40.0.tgz", + "integrity": "sha512-AtDzVIgRrmRKQai62yuSIN5vNiQjcJakJb4fbhVw3ehxx7Lohphvw9SGNWKhLFqSxC4ilD0g/L1huAYFQU3Q6A==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1025,9 +1143,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { @@ -1053,15 +1171,15 @@ } }, "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -1071,31 +1189,31 @@ } }, "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/inspect-js" } }, "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" }, @@ -1107,13 +1225,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1204,6 +1322,21 @@ "node": ">=0.10.0" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1230,6 +1363,16 @@ "node": ">=14" } }, + "node_modules/editorconfig/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/editorconfig/node_modules/minimatch": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", @@ -1246,6 +1389,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/editorconfig/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -1254,58 +1410,63 @@ "license": "MIT" }, "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" }, "engines": { "node": ">= 0.4" @@ -1315,14 +1476,11 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" } @@ -1338,9 +1496,9 @@ } }, "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "dev": true, "license": "MIT", "dependencies": { @@ -1351,15 +1509,16 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -1376,15 +1535,15 @@ } }, "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "dev": true, "license": "MIT", "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" }, "engines": { "node": ">= 0.4" @@ -1394,9 +1553,9 @@ } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "license": "MIT", "engines": { @@ -1417,119 +1576,63 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.18.0.tgz", + "integrity": "sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.10.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.18.0", + "@eslint/plugin-kit": "^0.2.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-airbnb-base": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", - "dev": true, - "license": "MIT", - "dependencies": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5", - "semver": "^6.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" + "url": "https://eslint.org/donate" }, "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.2" - } - }, - "node_modules/eslint-config-airbnb-base/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-config-standard": { - "version": "17.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz", - "integrity": "sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "engines": { - "node": ">=12.0.0" + "jiti": "*" }, - "peerDependencies": { - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", - "eslint-plugin-promise": "^6.0.0" + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-import-resolver-node": { @@ -1554,17 +1657,10 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-import-resolver-node/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, "node_modules/eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", "dev": true, "license": "MIT", "dependencies": { @@ -1589,13 +1685,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-module-utils/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, "node_modules/eslint-plugin-es": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", @@ -1643,35 +1732,37 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, "license": "MIT", "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", "array.prototype.flat": "^1.3.2", "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" } }, "node_modules/eslint-plugin-import/node_modules/debug": { @@ -1684,23 +1775,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/eslint-plugin-n": { "version": "15.7.0", "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", @@ -1727,46 +1801,49 @@ "eslint": ">=7.0.0" } }, - "node_modules/eslint-plugin-promise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", - "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", + "node_modules/eslint-plugin-n/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, - "license": "ISC", + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "node": ">= 4" } }, - "node_modules/eslint-plugin-vue": { - "version": "9.24.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.24.1.tgz", - "integrity": "sha512-wk3SuwmS1pZdcuJlokGYEi/buDOwD6KltvhIZyOnpJ/378dcQ4zchu9PAMbbLAaydCz1iYc5AozszcOOgZIIOg==", + "node_modules/eslint-plugin-n/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "globals": "^13.24.0", - "natural-compare": "^1.4.0", - "nth-check": "^2.1.1", - "postcss-selector-parser": "^6.0.15", - "semver": "^7.6.0", - "vue-eslint-parser": "^9.4.2", - "xml-name-validator": "^4.0.0" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": "^14.17.0 || >=16.0.0" + "node": ">=10" + } + }, + "node_modules/eslint-plugin-promise": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz", + "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" }, "peerDependencies": { - "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -1774,7 +1851,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1810,66 +1887,74 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "esutils": "^2.0.2" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=6.0.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, + "license": "MIT", "engines": { - "node": ">=10.13.0" + "node": ">= 4" } }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -1920,9 +2005,9 @@ "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { @@ -1930,12 +2015,25 @@ "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1950,10 +2048,27 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.5.tgz", + "integrity": "sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", + "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", "dev": true, "license": "ISC", "dependencies": { @@ -1961,22 +2076,22 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { @@ -2017,24 +2132,23 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true, "license": "ISC" }, @@ -2049,9 +2163,9 @@ } }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "license": "ISC", "dependencies": { @@ -2072,6 +2186,21 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2083,16 +2212,18 @@ } }, "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" }, "engines": { "node": ">= 0.4" @@ -2122,17 +2253,22 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "dev": true, "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2141,16 +2277,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -2160,81 +2310,84 @@ } }, "node_modules/glob": { - "version": "10.3.12", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", - "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "license": "ISC", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.6", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.10.2" - }, - "bin": { - "glob": "dist/esm/bin.mjs" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "license": "ISC", "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" } }, "node_modules/glob/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=10" } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "license": "MIT", "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -2244,31 +2397,27 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2297,11 +2446,14 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", "dev": true, "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2310,9 +2462,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "license": "MIT", "engines": { @@ -2362,9 +2514,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", "dev": true, "license": "MIT", "engines": { @@ -2402,6 +2554,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "license": "ISC", "dependencies": { @@ -2424,29 +2577,49 @@ "license": "ISC" }, "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-async-function": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.0.tgz", + "integrity": "sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2456,13 +2629,16 @@ } }, "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "dev": true, "license": "MIT", "dependencies": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2482,14 +2658,14 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", + "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2512,25 +2688,30 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "dev": true, "license": "MIT", "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", "is-typed-array": "^1.1.13" }, "engines": { @@ -2541,13 +2722,14 @@ } }, "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2566,6 +2748,22 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -2576,6 +2774,25 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2589,10 +2806,10 @@ "node": ">=0.10.0" } }, - "node_modules/is-negative-zero": { + "node_modules/is-map": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true, "license": "MIT", "engines": { @@ -2613,13 +2830,14 @@ } }, "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2628,26 +2846,31 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, "engines": { "node": ">= 0.4" }, @@ -2656,13 +2879,13 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -2672,13 +2895,14 @@ } }, "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2688,13 +2912,15 @@ } }, "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2704,13 +2930,13 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -2719,14 +2945,47 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.0.tgz", + "integrity": "sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2747,17 +3006,14 @@ "license": "ISC" }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -2766,9 +3022,9 @@ } }, "node_modules/jiti": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", - "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", "dev": true, "license": "MIT", "bin": { @@ -2797,6 +3053,53 @@ "node": ">=14" } }, + "node_modules/js-beautify/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/js-beautify/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/js-beautify/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/js-cookie": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", @@ -2828,9 +3131,9 @@ "license": "MIT" }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, "license": "MIT" }, @@ -2879,13 +3182,16 @@ } }, "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { @@ -2933,16 +3239,20 @@ "license": "MIT" }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, + "license": "ISC" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">= 0.4" } }, "node_modules/merge2": { @@ -2956,13 +3266,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -2982,17 +3292,6 @@ "node": "*" } }, - "node_modules/minimatch/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -3004,9 +3303,9 @@ } }, "node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "license": "ISC", "engines": { @@ -3014,9 +3313,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, @@ -3033,9 +3332,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -3059,9 +3358,9 @@ "license": "MIT" }, "node_modules/nopt": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", - "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", "dev": true, "license": "ISC", "dependencies": { @@ -3084,19 +3383,6 @@ "node": ">=0.10.0" } }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -3118,11 +3404,14 @@ } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3138,15 +3427,17 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -3156,21 +3447,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.fromentries": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", @@ -3206,13 +3482,14 @@ } }, "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, @@ -3234,18 +3511,18 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "license": "MIT", "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -3261,6 +3538,24 @@ "node": ">=0.10.0" } }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -3293,6 +3588,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -3316,16 +3618,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -3344,9 +3636,9 @@ "license": "MIT" }, "node_modules/path-scurry": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", - "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -3354,33 +3646,23 @@ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "dev": true, - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/php-parser": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.1.5.tgz", - "integrity": "sha512-jEY2DcbgCm5aclzBdfW86GM6VEIWcSlhTBSHN1qhJguVePlYe28GhwS0yoeLYXpM2K8y6wzLwrbq814n2PHSoQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.2.1.tgz", + "integrity": "sha512-WT5AMqe39ZdqAxp9Yp7uR6e3clBWlT1dxHHs49GmnDx2d+975NEiLSVy2tRGLdSC9tgdQOLiN1Yz54g1d2cZDQ==", "dev": true, "license": "BSD-3-Clause" }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, @@ -3428,9 +3710,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", + "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", "dev": true, "funding": [ { @@ -3448,9 +3730,9 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -3530,43 +3812,36 @@ } } }, - "node_modules/postcss-load-config/node_modules/lilconfig": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", - "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, "node_modules/postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", "dependencies": { - "postcss-selector-parser": "^6.0.11" + "postcss-selector-parser": "^6.1.1" }, "engines": { "node": ">=12.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, "peerDependencies": { "postcss": "^8.2.14" } }, "node_modules/postcss-selector-parser": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz", - "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "license": "MIT", "dependencies": { @@ -3595,9 +3870,9 @@ } }, "node_modules/prettier": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", - "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "license": "MIT", "bin": { @@ -3686,6 +3961,29 @@ "node": ">=8.10.0" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", @@ -3694,16 +3992,18 @@ "license": "MIT" }, "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -3746,19 +4046,22 @@ } }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3784,43 +4087,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -3846,15 +4112,16 @@ } }, "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "engines": { @@ -3885,16 +4152,33 @@ ], "license": "MIT" }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "is-regex": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -3904,19 +4188,13 @@ } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/set-function-length": { @@ -3953,6 +4231,21 @@ "node": ">= 0.4" } }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -3977,16 +4270,73 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -4009,9 +4359,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -4070,16 +4420,19 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4089,16 +4442,20 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4194,6 +4551,16 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/sucrase/node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -4204,6 +4571,43 @@ "node": ">= 6" } }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4231,34 +4635,34 @@ } }, "node_modules/tailwindcss": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", - "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==", + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", "dev": true, "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", - "chokidar": "^3.5.3", + "chokidar": "^3.6.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.3.0", + "fast-glob": "^3.3.2", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.21.0", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", + "jiti": "^1.21.6", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", "postcss-import": "^15.1.0", "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" + "postcss-load-config": "^4.0.2", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" }, "bin": { "tailwind": "lib/cli.js", @@ -4268,26 +4672,6 @@ "node": ">=14.0.0" } }, - "node_modules/tailwindcss/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -4357,46 +4741,33 @@ "node": ">= 0.8.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -4406,18 +4777,19 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -4427,18 +4799,18 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-proto": "^1.0.3", "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" }, "engines": { "node": ">= 0.4" @@ -4455,16 +4827,19 @@ "license": "MIT" }, "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4514,31 +4889,6 @@ "dev": true, "license": "MIT" }, - "node_modules/vue-eslint-parser": { - "version": "9.4.2", - "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.2.tgz", - "integrity": "sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", - "esquery": "^1.4.0", - "lodash": "^4.17.21", - "semver": "^7.3.6" - }, - "engines": { - "node": "^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=6.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -4556,33 +4906,84 @@ } }, "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "license": "MIT", "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "for-each": "^0.3.3", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" }, "engines": { @@ -4592,6 +4993,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -4636,16 +5047,6 @@ "dev": true, "license": "ISC" }, - "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12" - } - }, "node_modules/xregexp": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-5.1.1.tgz", @@ -4666,17 +5067,10 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" - }, "node_modules/yaml": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", - "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", "dev": true, "license": "ISC", "bin": { diff --git a/package.json b/package.json index 032728e..131e87e 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,10 @@ { "devDependencies": { - "blade-formatter": "^1.32.9", - "eslint": "^8.37.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-standard": "^17.0.0", - "eslint-plugin-import": "^2.27.5", + "blade-formatter": "^1.42.0", + "eslint": "^9.15.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-vue": "^9.10.0", - "prettier": "2.8.7" + "prettier": "2.8.8" } } diff --git a/phpinsights.php b/phpinsights.php new file mode 100644 index 0000000..f2a2652 --- /dev/null +++ b/phpinsights.php @@ -0,0 +1,49 @@ + 'laravel', + 'exclude' => [ + 'src/Console/Commands/', + 'src/HooksPipeline.php', + 'src/Git/Log.php', + ], + 'add' => [ + // ExampleMetric::class => [ + // ExampleInsight::class, + // ] + ], + 'remove' => [ + SlevomatCodingStandard\Sniffs\Classes\ForbiddenPublicPropertySniff::class, + SlevomatCodingStandard\Sniffs\ControlStructures\DisallowEmptySniff::class, + SlevomatCodingStandard\Sniffs\TypeHints\DisallowMixedTypeHintSniff::class, + SlevomatCodingStandard\Sniffs\Classes\SuperfluousExceptionNamingSniff::class, + SlevomatCodingStandard\Sniffs\Functions\FunctionLengthSniff::class, + SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff::class, + NunoMaduro\PhpInsights\Domain\Sniffs\ForbiddenSetterSniff::class, + NunoMaduro\PhpInsights\Domain\Insights\CyclomaticComplexityIsHigh::class, + NunoMaduro\PhpInsights\Domain\Insights\ForbiddenNormalClasses::class, + NunoMaduro\PhpInsights\Domain\Insights\ForbiddenTraits::class, + PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff::class, + PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff::class, + PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ScopeClosingBraceSniff::class, + PHP_CodeSniffer\Standards\PEAR\Sniffs\WhiteSpace\ScopeClosingBraceSniff::class, + PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes\ClassInstantiationSniff::class, + PhpCsFixer\Fixer\Basic\BracesFixer::class, + PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer::class, + PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer::class, + PhpCsFixer\Fixer\Operator\NewWithBracesFixer::class, + ], + 'config' => [ + // ExampleInsight::class => [ + // 'key' => 'value', + // ], + ], + 'requirements' => [ + 'min-quality' => 100, + 'min-complexity' => 0, + 'min-architecture' => 100, + 'min-style' => 100, + ], +]; diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..0959766 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,5 @@ +parameters: + paths: + - ./src + # The level 9 is the highest level (with check for mixed type) + level: 8 \ No newline at end of file diff --git a/rector.php b/rector.php new file mode 100644 index 0000000..f72bf9e --- /dev/null +++ b/rector.php @@ -0,0 +1,16 @@ +withPaths([ + __DIR__.'/src', + ]) + // uncomment to reach your current PHP version + ->withPhpSets() + ->withRules([ + AddVoidReturnTypeWhereNoReturnRector::class, + ]); diff --git a/src/Console/Commands/CommitMessage.php b/src/Console/Commands/CommitMessage.php index 8fe3d3e..0b72321 100644 --- a/src/Console/Commands/CommitMessage.php +++ b/src/Console/Commands/CommitMessage.php @@ -1,5 +1,7 @@ |string */ - protected $name; + public array|string $fileExtensions = []; - /* - * List of files extensions that will be analyzed by the hook. - * Can also be a regular expression. - * @var array|string + /** + * Name of the hook */ - public $fileExtensions = []; + protected string $name; /** * The path to the analyzer executable. - * - * @var string */ - protected $analyzerExecutable; + protected string $analyzerExecutable; /** * The path to the fixer executable. In multiple cases it's the same of the analyzer executable. - * - * @var string */ - protected $fixerExecutable; + protected string $fixerExecutable; /** * The list of paths of files that are badly formatted and should be fixed. * - * @var array + * @var array */ - protected $filesBadlyFormattedPaths = []; + protected array $filesBadlyFormattedPaths = []; /** * Run tool in docker - * - * @var bool */ - protected $runInDocker = false; + protected bool $runInDocker = false; /** * Docker container on which to run - * - * @var string */ - protected $dockerContainer = ''; + protected string $dockerContainer = ''; + + /** + * Chunk size used for analyze + */ + protected int $chunkSize = 100; public function __construct() { $this->setCwd(base_path()); + + $this->chunkSize = config('git-hooks.analyzer_chunk_size'); } /** * Handles the committed files and checks if they are properly formatted. * - * @param ChangedFiles $files The instance of the changed files. - * @param Closure $next The closure to be executed after the files are handled. - * @return mixed|void - * * @throws HookFailException If the hook fails to analyze the committed files. */ - public function handleCommittedFiles(ChangedFiles $files, Closure $next) + public function handleCommittedFiles(ChangedFiles $files, Closure $next): mixed { $commitFiles = $files->getStaged(); @@ -107,27 +105,127 @@ public function handleCommittedFiles(ChangedFiles $files, Closure $next) return $next($files); } + /** + * Get output method + */ + public function getOutput(): ?OutputStyle + { + if (! config('git-hooks.debug_output')) { + return null; + } + + return $this->command->getOutput(); + } + + public function setCommand(Command $command): void + { + $this->command = $command; + } + + /** + * Get the name of the hook. + */ + public function getName(): ?string + { + return $this->name; + } + + /** + * @param array|string $fileExtensions + */ + public function setFileExtensions(array|string $fileExtensions): self + { + $this->fileExtensions = $fileExtensions; + + return $this; + } + + public function setAnalyzerExecutable(string $executablePath, bool $isSameAsFixer = false): self + { + $this->analyzerExecutable = $executablePath; + + return $isSameAsFixer ? $this->setFixerExecutable($executablePath) : $this; + } + + public function getAnalyzerExecutable(): string + { + return $this->analyzerExecutable; + } + + public function setFixerExecutable(string $executablePath): self + { + $this->fixerExecutable = $executablePath; + + return $this; + } + + public function getFixerExecutable(): string + { + return $this->fixerExecutable; + } + + public function setRunInDocker(bool $runInDocker): self + { + $this->runInDocker = (bool) $runInDocker; + + return $this; + } + + public function getRunInDocker(): bool + { + return $this->runInDocker; + } + + public function setDockerContainer(string $dockerContainer): self + { + $this->dockerContainer = $dockerContainer; + + return $this; + } + + public function getDockerContainer(): string + { + return $this->dockerContainer; + } + /** * Analyzes an array of ChangedFile objects and checks whether each file can be analyzed, * whether it is properly formatted according to the configured analyzer, and collects * paths of any files that are not properly formatted. * - * @param ChangedFile[]|Collection $commitFiles The files to analyze. + * @param Collection $commitFiles The files to analyze. * @return $this */ - protected function analizeCommittedFiles($commitFiles) + protected function analizeCommittedFiles(Collection $commitFiles): self { - foreach ($commitFiles as $file) { - if (! $this->canFileBeAnalyzed($file)) { + /** @var Collection $chunk */ + foreach ($commitFiles->chunk($this->chunkSize) as $chunk) { + $filePaths = []; + + /** @var ChangedFile $file */ + foreach ($chunk as $file) { + if (! $this->canFileBeAnalyzed($file)) { + continue; + } + + $filePaths[] = $file->getFilePath(); + } + + if (empty($filePaths)) { continue; } - $filePath = $file->getFilePath(); + $filePath = implode(' ', $filePaths); $command = $this->dockerCommand($this->analyzerCommand().' '.$filePath); - $process = $this->runCommands($command); + $params = [ + 'show-output' => config('git-hooks.debug_output'), + ]; + + $process = $this->runCommands($command, $params); if (config('git-hooks.debug_commands')) { + $this->command->newLine(); $this->command->getOutput()->write(PHP_EOL.' DEBUG Executed command: '.$process->getCommandLine().PHP_EOL); } @@ -143,7 +241,7 @@ protected function analizeCommittedFiles($commitFiles) ); $this->filesBadlyFormattedPaths[] = $filePath; - if (config('git-hooks.output_errors')) { + if (config('git-hooks.output_errors') && ! config('git-hooks.debug_output')) { $this->command->newLine(); $this->command->getOutput()->write($process->getOutput()); } @@ -167,18 +265,21 @@ protected function canFileBeAnalyzed(ChangedFile $file): bool /** * Returns the message to display when the commit fails. - * - * @return $this */ - protected function commitFailMessage() + protected function commitFailMessage(): self { $this->command->newLine(); $message = ' COMMIT FAILED '; - $message .= sprintf("Your commit contains files that should pass %s but do not. Please fix the errors in the files above and try again.\n", - $this->getName()); - $message .= sprintf('You can check which %s errors happened in them by executing: %s {filePath}', - $this->getName(), $this->analyzerCommand()); + $message .= sprintf( + "Your commit contains files that should pass %s but do not. Please fix the errors in the files above and try again.\n", + $this->getName() + ); + $message .= sprintf( + 'You can check which %s errors happened in them by executing: %s {filePath}', + $this->getName(), + $this->analyzerCommand() + ); $this->command->getOutput()->writeln($message); @@ -188,48 +289,47 @@ protected function commitFailMessage() /** * Check if the BaseCodeAnalyzerPreCommitHook is installed. * - * @return $this - * * @throws HookFailException */ - protected function validateAnalyzerInstallation() + protected function validateAnalyzerInstallation(): self { - if (file_exists($this->analyzerExecutable)) { + if (! config('git-hooks.validate_paths') || file_exists($this->analyzerExecutable)) { return $this; } $this->command->newLine(2); $this->command->getOutput()->writeln( - sprintf(' ERROR %s is not installed. Please install it and try again.', - $this->getName()) + sprintf( + ' ERROR %s is not installed. Please install it and try again.', + $this->getName() + ) ); $this->command->newLine(); - throw new HookFailException(); + throw new HookFailException; } /** * Validates the given configuration path. * - * @param string $path The path to the configuration file. - * @return $this This instance for method chaining. - * * @throws HookFailException If the configuration file does not exist. */ - protected function validateConfigPath($path) + protected function validateConfigPath(string $path): self { - if (file_exists($path)) { + if (! config('git-hooks.validate_paths') || file_exists($path)) { return $this; } $this->command->newLine(2); $this->command->getOutput()->writeln( - sprintf(' ERROR %s config file does not exist. Please check the path and try again.', - $this->getName()) + sprintf( + ' ERROR %s config file does not exist. Please check the path and try again.', + $this->getName() + ) ); $this->command->newLine(); - throw new HookFailException(); + throw new HookFailException; } /** @@ -260,8 +360,10 @@ protected function suggestAutoFixOrExit(): bool } } + $this->markPipelineFailed(); + if (config('git-hooks.stop_at_first_analyzer_failure')) { - throw new HookFailException(); + throw new HookFailException; } return false; @@ -272,18 +374,31 @@ protected function suggestAutoFixOrExit(): bool * configured fixer command. For each fixed file, adds it to Git and removes its path * from the `$filesBadlyFormattedPaths` array. * - * * @throws HookFailException if any files cannot be fixed. */ private function autoFixFiles(): bool { + $params = [ + 'show-output' => config('git-hooks.debug_output'), + ]; + foreach ($this->filesBadlyFormattedPaths as $key => $filePath) { $fixerCommand = $this->dockerCommand($this->fixerCommand().' '.$filePath); - $process = $this->runCommands($fixerCommand); + $process = $this->runCommands($fixerCommand, $params); + + if (config('git-hooks.debug_commands')) { + $this->command->newLine(); + $this->command->getOutput()->write(PHP_EOL.' DEBUG Executed command: '.$process->getCommandLine().PHP_EOL); + } if (config('git-hooks.rerun_analyzer_after_autofix')) { $command = $this->dockerCommand($this->analyzerCommand().' '.$filePath); - $process = $this->runCommands($command); + $process = $this->runCommands($command, $params); + + if (config('git-hooks.debug_commands')) { + $this->command->newLine(); + $this->command->getOutput()->write(PHP_EOL.' DEBUG Executed command: '.$process->getCommandLine().PHP_EOL); + } } $wasProperlyFixed = $process->isSuccessful(); @@ -299,7 +414,7 @@ private function autoFixFiles(): bool sprintf(' %s Autofix Failed: %s', $this->getName(), $filePath) ); - if (config('git-hooks.output_errors')) { + if (config('git-hooks.output_errors') && ! config('git-hooks.debug_output')) { $this->command->newLine(); $this->command->getOutput()->write($process->getOutput()); } @@ -308,86 +423,6 @@ private function autoFixFiles(): bool return empty($this->filesBadlyFormattedPaths); } - /** - * Get the name of the hook. - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param array|string $fileExtensions - * @return BaseCodeAnalyzerPreCommitHook - */ - public function setFileExtensions($fileExtensions) - { - $this->fileExtensions = $fileExtensions; - - return $this; - } - - /** - * @return BaseCodeAnalyzerPreCommitHook - */ - public function setAnalyzerExecutable($executablePath, $isSameAsFixer = false) - { - $this->analyzerExecutable = './'.trim($executablePath, '/'); - - return $isSameAsFixer ? $this->setFixerExecutable($executablePath) : $this; - } - - public function getAnalyzerExecutable(): string - { - return $this->analyzerExecutable; - } - - /** - * @return BaseCodeAnalyzerPreCommitHook - */ - public function setFixerExecutable($exacutablePath) - { - $this->fixerExecutable = './'.trim($exacutablePath, '/'); - - return $this; - } - - public function getFixerExecutable(): string - { - return $this->fixerExecutable; - } - - /** - * @return BaseCodeAnalyzerPreCommitHook - */ - public function setRunInDocker($runInDocker) - { - $this->runInDocker = (bool) $runInDocker; - - return $this; - } - - public function getRunInDocker(): bool - { - return $this->runInDocker; - } - - /** - * @param string $dockerContainer - * @return BaseCodeAnalyzerPreCommitHook - */ - public function setDockerContainer($dockerContainer) - { - $this->dockerContainer = $dockerContainer; - - return $this; - } - - public function getDockerContainer(): string - { - return $this->dockerContainer; - } - private function dockerCommand(string $command): string { if (! $this->runInDocker || empty($this->dockerContainer)) { diff --git a/src/Console/Commands/Hooks/BladeFormatterPreCommitHook.php b/src/Console/Commands/Hooks/BladeFormatterPreCommitHook.php index 1c6228d..0ba17d7 100644 --- a/src/Console/Commands/Hooks/BladeFormatterPreCommitHook.php +++ b/src/Console/Commands/Hooks/BladeFormatterPreCommitHook.php @@ -1,5 +1,7 @@ configParam = $this->configParam(); @@ -63,7 +56,7 @@ public function fixerCommand(): string */ public function configParam(): string { - $bladeFormatterConfig = rtrim(config('git-hooks.code_analyzers.blade_formatter.config'), '/'); + $bladeFormatterConfig = rtrim((string) config('git-hooks.code_analyzers.blade_formatter.config'), '/'); $this->validateConfigPath($bladeFormatterConfig); return empty($bladeFormatterConfig) ? '' : '--config='.$bladeFormatterConfig; diff --git a/src/Console/Commands/Hooks/ESLintPreCommitHook.php b/src/Console/Commands/Hooks/ESLintPreCommitHook.php index 177b9df..76332f8 100644 --- a/src/Console/Commands/Hooks/ESLintPreCommitHook.php +++ b/src/Console/Commands/Hooks/ESLintPreCommitHook.php @@ -1,5 +1,7 @@ configParam = $this->configParam(); @@ -67,7 +63,7 @@ public function fixerCommand(): string */ protected function configParam(): string { - $eslintConfig = rtrim(config('git-hooks.code_analyzers.eslint.config'), '/'); + $eslintConfig = rtrim((string) config('git-hooks.code_analyzers.eslint.config'), '/'); $this->validateConfigPath($eslintConfig); return empty($eslintConfig) ? '' : '--config='.$eslintConfig; @@ -79,11 +75,11 @@ protected function configParam(): string */ protected function additionalParams(): ?string { - $additionalParams = config('git-hooks.code_analyzers.eslint.additional_params'); + $additionalParams = (string) config('git-hooks.code_analyzers.eslint.additional_params'); if (! empty($additionalParams)) { - $additionalParams = preg_replace('/\s+\.(?:(\s)|$)/', '$1', $additionalParams); - $additionalParams = preg_replace('/\s*--(config|c)\b(=\S*)?\s*/', '', $additionalParams); + $additionalParams = (string) preg_replace('/\s+\.(?:(\s)|$)/', '$1', (string) $additionalParams); + $additionalParams = (string) preg_replace('/\s*--(config|c)\b(=\S*)?\s*/', '', (string) $additionalParams); } return $additionalParams; diff --git a/src/Console/Commands/Hooks/EnlightnPreCommitHook.php b/src/Console/Commands/Hooks/EnlightnPreCommitHook.php index f096079..c84b3b3 100644 --- a/src/Console/Commands/Hooks/EnlightnPreCommitHook.php +++ b/src/Console/Commands/Hooks/EnlightnPreCommitHook.php @@ -1,5 +1,7 @@ getAddedToCommit(); @@ -58,17 +57,16 @@ public function fixerCommand(): string /** * Returns the message to display when the commit fails. - * - * @return $this */ - protected function commitFailMessage() + protected function commitFailMessage(): self { $this->command->newLine(); $message = ' COMMIT FAILED '; $message .= sprintf( 'You can check which %s errors happened by executing: %s', - $this->getName(), $this->analyzerCommand() + $this->getName(), + $this->analyzerCommand() ); $this->command->getOutput()->writeln($message); diff --git a/src/Console/Commands/Hooks/LarastanPreCommitHook.php b/src/Console/Commands/Hooks/LarastanPreCommitHook.php index 32a8c40..26796f5 100644 --- a/src/Console/Commands/Hooks/LarastanPreCommitHook.php +++ b/src/Console/Commands/Hooks/LarastanPreCommitHook.php @@ -1,5 +1,7 @@ configParam = $this->configParam(); - return $this->setAnalyzerExecutable(config('git-hooks.code_analyzers.larastan.path')) + return $this->setFileExtensions(config('git-hooks.code_analyzers.larastan.file_extensions')) + ->setAnalyzerExecutable(config('git-hooks.code_analyzers.larastan.path')) ->setRunInDocker(config('git-hooks.code_analyzers.larastan.run_in_docker')) ->setDockerContainer(config('git-hooks.code_analyzers.larastan.docker_container')) ->handleCommittedFiles($files, $next); @@ -43,12 +40,12 @@ public function handle(ChangedFiles $files, Closure $next) */ public function analyzerCommand(): string { - $additionalParams = config('git-hooks.code_analyzers.larastan.additional_params'); + $additionalParams = (string) config('git-hooks.code_analyzers.larastan.additional_params'); if (! empty($additionalParams)) { // Removing configuration/c/xdebug parameters from additional parameters to avoid conflicts // because they are already set in the command by default. - $additionalParams = preg_replace('/\s*--(configuration|c|xdebug)\b(=\S*)?\s*/', '', $additionalParams); + $additionalParams = (string) preg_replace('/\s*--(configuration|c|xdebug)\b(=\S*)?\s*/', '', (string) $additionalParams); } return trim( @@ -71,7 +68,7 @@ public function fixerCommand(): string */ protected function configParam(): string { - $phpStanConfigFile = rtrim(config('git-hooks.code_analyzers.larastan.config'), '/'); + $phpStanConfigFile = rtrim((string) config('git-hooks.code_analyzers.larastan.config'), '/'); $this->validateConfigPath($phpStanConfigFile); return empty($phpStanConfigFile) ? '' : '--configuration='.$phpStanConfigFile; diff --git a/src/Console/Commands/Hooks/PHPCodeSnifferPreCommitHook.php b/src/Console/Commands/Hooks/PHPCodeSnifferPreCommitHook.php index 07dafce..9f4e669 100644 --- a/src/Console/Commands/Hooks/PHPCodeSnifferPreCommitHook.php +++ b/src/Console/Commands/Hooks/PHPCodeSnifferPreCommitHook.php @@ -1,5 +1,7 @@ configParam = $this->configParam(); @@ -64,7 +60,7 @@ public function fixerCommand(): string */ public function configParam(): string { - $phpCSStandard = rtrim(config('git-hooks.code_analyzers.php_code_sniffer.config'), '/'); + $phpCSStandard = rtrim((string) config('git-hooks.code_analyzers.php_code_sniffer.config'), '/'); $this->validateConfigPath($phpCSStandard); return empty($phpCSStandard) ? '' : '--standard='.$phpCSStandard; diff --git a/src/Console/Commands/Hooks/PhpInsightsPreCommitHook.php b/src/Console/Commands/Hooks/PhpInsightsPreCommitHook.php new file mode 100644 index 0000000..1a58732 --- /dev/null +++ b/src/Console/Commands/Hooks/PhpInsightsPreCommitHook.php @@ -0,0 +1,80 @@ +configParam = $this->configParam(); + + return $this->setFileExtensions(config('git-hooks.code_analyzers.phpinsights.file_extensions')) + ->setAnalyzerExecutable(config('git-hooks.code_analyzers.phpinsights.path'), true) + ->setRunInDocker(config('git-hooks.code_analyzers.phpinsights.run_in_docker')) + ->setDockerContainer(config('git-hooks.code_analyzers.phpinsights.docker_container')) + ->handleCommittedFiles($files, $next); + } + + /** + * Returns the command to run phpinsights + */ + public function analyzerCommand(): string + { + return trim(sprintf('%s analyse %s --no-interaction %s', $this->getAnalyzerExecutable(), $this->configParam, $this->additionalParams())); + } + + /** + * Fixer command + */ + public function fixerCommand(): string + { + return trim(sprintf('%s analyse %s --no-interaction --fix %s', $this->getAnalyzerExecutable(), $this->configParam, $this->additionalParams())); + } + + /** + * Gets the command-line parameter for specifying the configuration file for phpinsights. + * + * @return string The command-line parameter for the configuration file, or an empty string if not set. + */ + protected function configParam(): string + { + $phpInsightsConfigFile = (string) config('git-hooks.code_analyzers.phpinsights.config'); + + if (! empty($phpInsightsConfigFile)) { + $this->validateConfigPath($phpInsightsConfigFile); + + return '--config-path='.$phpInsightsConfigFile; + } + + return ''; + } + + /** + * Retrieves additional parameters for the phpinsights from the configuration file + */ + protected function additionalParams(): ?string + { + $additionalParams = (string) config('git-hooks.code_analyzers.phpinsights.additional_params'); + + return $additionalParams; + } +} diff --git a/src/Console/Commands/Hooks/PintPreCommitHook.php b/src/Console/Commands/Hooks/PintPreCommitHook.php index 8bcf4a4..5b263f6 100644 --- a/src/Console/Commands/Hooks/PintPreCommitHook.php +++ b/src/Console/Commands/Hooks/PintPreCommitHook.php @@ -1,5 +1,7 @@ configParam = $this->configParam(); @@ -63,12 +59,14 @@ protected function configParam(): string { $pintConfigFile = config('git-hooks.code_analyzers.laravel_pint.config'); - if (! empty($pintConfigFile) && $this->validateConfigPath($pintConfigFile)) { - return '--config '.trim($pintConfigFile, '/'); + if (! empty($pintConfigFile)) { + $this->validateConfigPath($pintConfigFile); + + return '--config '.trim((string) $pintConfigFile, '/'); } $pintPreset = config('git-hooks.code_analyzers.laravel_pint.preset'); - return empty($pintPreset) ? '' : '--preset '.trim($pintPreset, '/'); + return empty($pintPreset) ? '' : '--preset '.trim((string) $pintPreset, '/'); } } diff --git a/src/Console/Commands/Hooks/PrettierPreCommitHook.php b/src/Console/Commands/Hooks/PrettierPreCommitHook.php index 23c536f..a4a0e5a 100644 --- a/src/Console/Commands/Hooks/PrettierPreCommitHook.php +++ b/src/Console/Commands/Hooks/PrettierPreCommitHook.php @@ -1,5 +1,7 @@ configParam = $this->configParam(); @@ -65,7 +61,7 @@ public function fixerCommand(): string */ protected function configParam(): string { - $prettierConfig = rtrim(config('git-hooks.code_analyzers.prettier.config'), '/'); + $prettierConfig = rtrim((string) config('git-hooks.code_analyzers.prettier.config'), '/'); $this->validateConfigPath($prettierConfig); return empty($prettierConfig) ? '' : '--config='.$prettierConfig; @@ -77,11 +73,11 @@ protected function configParam(): string */ protected function additionalParams(): ?string { - $additionalParams = config('git-hooks.code_analyzers.prettier.additional_params'); + $additionalParams = (string) config('git-hooks.code_analyzers.prettier.additional_params'); if (! empty($additionalParams)) { - $additionalParams = preg_replace('/\s+\.(?:(\s)|$)/', '$1', $additionalParams); - $additionalParams = preg_replace('/\s*--(config|find-config-path|write|check)\b(=\S*)?\s*/', '', $additionalParams); + $additionalParams = (string) preg_replace('/\s+\.(?:(\s)|$)/', '$1', (string) $additionalParams); + $additionalParams = (string) preg_replace('/\s*--(config|find-config-path|write|check)\b(=\S*)?\s*/', '', (string) $additionalParams); } return $additionalParams; diff --git a/src/Console/Commands/Hooks/RectorPreCommitHook.php b/src/Console/Commands/Hooks/RectorPreCommitHook.php new file mode 100644 index 0000000..ae89b85 --- /dev/null +++ b/src/Console/Commands/Hooks/RectorPreCommitHook.php @@ -0,0 +1,80 @@ +configParam = $this->configParam(); + + return $this->setFileExtensions(config('git-hooks.code_analyzers.rector.file_extensions')) + ->setAnalyzerExecutable(config('git-hooks.code_analyzers.rector.path'), true) + ->setRunInDocker(config('git-hooks.code_analyzers.rector.run_in_docker')) + ->setDockerContainer(config('git-hooks.code_analyzers.rector.docker_container')) + ->handleCommittedFiles($files, $next); + } + + /** + * Returns the command to run Rector tester + */ + public function analyzerCommand(): string + { + return trim(sprintf('%s process --dry-run %s %s', $this->getAnalyzerExecutable(), $this->configParam, $this->additionalParams())); + } + + /** + * Fixer command + */ + public function fixerCommand(): string + { + return trim(sprintf('%s process %s %s', $this->getAnalyzerExecutable(), $this->configParam, $this->additionalParams())); + } + + /** + * Gets the command-line parameter for specifying the configuration file for Rector. + * + * @return string The command-line parameter for the configuration file, or an empty string if not set. + */ + protected function configParam(): string + { + $rectorConfigFile = (string) config('git-hooks.code_analyzers.rector.config'); + + if (! empty($rectorConfigFile)) { + $this->validateConfigPath($rectorConfigFile); + + return '--config='.$rectorConfigFile; + } + + return ''; + } + + /** + * Retrieves additional parameters for the Rector code analyzer from the configuration file + */ + protected function additionalParams(): ?string + { + $additionalParams = (string) config('git-hooks.code_analyzers.rector.additional_params'); + + return $additionalParams; + } +} diff --git a/src/Console/Commands/MakeHook.php b/src/Console/Commands/MakeHook.php index c59c01b..fda865f 100644 --- a/src/Console/Commands/MakeHook.php +++ b/src/Console/Commands/MakeHook.php @@ -1,10 +1,13 @@ argument('hookType').'-console.stub'; + $hookType = $this->argument('hookType'); + + if (! is_string($hookType) || empty($hookType)) { + throw new FileNotFoundException('Invalid hook type provided'); + } + + $relativePath = '/stubs/'.$hookType.'-console.stub'; return file_exists($customPath = $this->laravel->basePath(trim($relativePath, '/'))) ? $customPath @@ -101,9 +110,9 @@ protected function getDefaultNamespace($rootNamespace) /** * Get the console command arguments. * - * @return array + * @return array> */ - protected function getArguments() + protected function getArguments(): array { return [ ['hookType', InputArgument::REQUIRED, 'The type of the Git Hook', null, GitHooks::getSupportedHooks()], @@ -114,9 +123,9 @@ protected function getArguments() /** * Get the console command options. * - * @return array + * @return array> */ - protected function getOptions() + protected function getOptions(): array { return [ ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the Git Hook already exists'], @@ -126,15 +135,15 @@ protected function getOptions() /** * Prompt for missing input arguments using the returned questions. * - * @return array + * @return array */ - protected function promptForMissingArgumentsUsing() + protected function promptForMissingArgumentsUsing(): array { $supportedHooks = implode(', ', GitHooks::getSupportedHooks()); return [ 'name' => 'What should the '.strtolower($this->type).' be named?', - 'hookType' => 'What type of the '.strtolower($this->type)."? Possible values: ($supportedHooks)", + 'hookType' => 'What type of the '.strtolower($this->type)."? Possible values: ({$supportedHooks})", ]; } } diff --git a/src/Console/Commands/PostCommit.php b/src/Console/Commands/PostCommit.php index b6b67d5..2706274 100644 --- a/src/Console/Commands/PostCommit.php +++ b/src/Console/Commands/PostCommit.php @@ -1,5 +1,7 @@ clearPipelineFailed(); + $this->sendChangedFilesThroughHooks( new ChangedFiles( GitHooks::getListOfChangedFiles() ) ); - } catch (HookFailException $e) { + + if ($this->checkPipelineFailed()) { + $this->clearPipelineFailed(); + throw new HookFailException; + } + } catch (HookFailException) { return 1; } + + return 0; } /** diff --git a/src/Console/Commands/PrePush.php b/src/Console/Commands/PrePush.php index 353956b..720cd0a 100644 --- a/src/Console/Commands/PrePush.php +++ b/src/Console/Commands/PrePush.php @@ -1,5 +1,7 @@ getAvailableHooks(); diff --git a/src/Console/Commands/stubs/commit-msg-console.stub b/src/Console/Commands/stubs/commit-msg-console.stub index 0277f12..e9fc50b 100644 --- a/src/Console/Commands/stubs/commit-msg-console.stub +++ b/src/Console/Commands/stubs/commit-msg-console.stub @@ -21,9 +21,9 @@ class {{ class }} implements MessageHook * * @param CommitMessage $message The commit message. * @param Closure $next The next hook in the chain to execute. - * @return mixed|null + * @return mixed */ - public function handle(CommitMessage $message, Closure $next) + public function handle(CommitMessage $message, Closure $next): mixed { // TODO: Implement your commit msg hook logic here. diff --git a/src/Console/Commands/stubs/hook b/src/Console/Commands/stubs/hook index df94d95..2cfa70e 100644 --- a/src/Console/Commands/stubs/hook +++ b/src/Console/Commands/stubs/hook @@ -4,4 +4,4 @@ if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then exec < /dev/tty fi -php {artisanPath} {command} $@ >&2 +{php|sail} {artisanPath} {command} $@ >&2 diff --git a/src/Console/Commands/stubs/post-commit-console.stub b/src/Console/Commands/stubs/post-commit-console.stub index 9e183f4..10a3b80 100644 --- a/src/Console/Commands/stubs/post-commit-console.stub +++ b/src/Console/Commands/stubs/post-commit-console.stub @@ -23,7 +23,7 @@ class {{ class }} implements PostCommitHook * @param Closure $next The next hook in the chain to execute. * @return mixed|null */ - public function handle(Log $log, Closure $next) + public function handle(Log $log, Closure $next): mixed { // TODO: Implement post commit hook logic here. diff --git a/src/Console/Commands/stubs/pre-commit-console.stub b/src/Console/Commands/stubs/pre-commit-console.stub index f08d0dd..a6e4ed7 100644 --- a/src/Console/Commands/stubs/pre-commit-console.stub +++ b/src/Console/Commands/stubs/pre-commit-console.stub @@ -23,7 +23,7 @@ class {{ class }} implements PreCommitHook * @param Closure $next The next hook in the chain to execute. * @return mixed|null */ - public function handle(ChangedFiles $files, Closure $next) + public function handle(ChangedFiles $files, Closure $next): mixed { // TODO: Implement your pre commit hook logic here. diff --git a/src/Console/Commands/stubs/pre-push-console.stub b/src/Console/Commands/stubs/pre-push-console.stub index 6935a89..f05b8ee 100644 --- a/src/Console/Commands/stubs/pre-push-console.stub +++ b/src/Console/Commands/stubs/pre-push-console.stub @@ -23,7 +23,7 @@ class {{ class }} implements PrePushHook * @param Closure $next The next hook in the chain to execute. * @return mixed|null */ - public function handle(Log $log, Closure $next) + public function handle(Log $log, Closure $next): mixed { // TODO: Implement pre push hook logic here. diff --git a/src/Console/Commands/stubs/prepare-commit-msg-console.stub b/src/Console/Commands/stubs/prepare-commit-msg-console.stub index 3b63a42..bdbf0ee 100644 --- a/src/Console/Commands/stubs/prepare-commit-msg-console.stub +++ b/src/Console/Commands/stubs/prepare-commit-msg-console.stub @@ -21,9 +21,9 @@ class {{ class }} implements MessageHook * * @param CommitMessage $message The commit message. * @param Closure $next The next hook in the chain to execute. - * @return mixed|null + * @return mixed */ - public function handle(CommitMessage $message, Closure $next) + public function handle(CommitMessage $message, Closure $next): mixed { // TODO: Implement your prepare commit msg hook logic here. diff --git a/src/Contracts/CodeAnalyzerPreCommitHook.php b/src/Contracts/CodeAnalyzerPreCommitHook.php index f382b85..bcfc22a 100644 --- a/src/Contracts/CodeAnalyzerPreCommitHook.php +++ b/src/Contracts/CodeAnalyzerPreCommitHook.php @@ -1,5 +1,7 @@ */ public function getRegisteredHooks(): array; } diff --git a/src/Contracts/MessageHook.php b/src/Contracts/MessageHook.php index 5a62308..bcb7703 100644 --- a/src/Contracts/MessageHook.php +++ b/src/Contracts/MessageHook.php @@ -1,5 +1,7 @@ [A|M|D|R|C|U|\?]{1,2}| )(?[A|M|D|R|C|U|\?]{1,2}| )\s(?\S+)(\s->\S+)?$/'; + public const PATTERN = '/^\s?(?[A|M|D|R|C|U|\?]{1,2}| )(?[A|M|D|R|C|U|\?]{1,2}| )\s(?\S+)(\s\->\S+)?$/'; - /** - * @var string - */ - protected $line; + protected string $line; - /** - * @var string - */ - protected $file; + protected string $file; - /** - * @var int - */ - protected $X = 0; + protected int $X = 0; - /** - * @var int - */ - protected $Y = 0; + protected int $Y = 0; /** - * @var array + * @var array */ - protected $bitMap = [ + protected array $bitMap = [ 'A' => self::A, 'M' => self::M, 'D' => self::D, @@ -53,11 +43,11 @@ class ChangedFile '?' => self::N, ]; - public function __construct(string $line) + public function __construct(bool|string $line) { - $this->line = $line; + $this->line = (string) $line; - preg_match(static::PATTERN, $line, $matches); + preg_match(self::PATTERN, $this->line, $matches); if (isset($matches['X'])) { $this->X = $this->bitMap[$matches['X']] ?? 0; @@ -70,12 +60,17 @@ public function __construct(string $line) $this->file = $matches['file'] ?? ''; } + public function __toString(): string + { + return $this->line; + } + /** * Check if file in commit */ public function isInCommit(): bool { - return $this->X > 0 && $this->X ^ static::N; + return $this->X > 0 && $this->X ^ self::N; } /** @@ -93,34 +88,26 @@ public function isStaged(): bool public function isAdded(): bool { - return $this->X & static::A || $this->Y & static::A; + return $this->X & self::A || $this->Y & self::A; } public function isModified(): bool { - return $this->X & static::M || $this->Y & static::M; + return $this->X & self::M || $this->Y & self::M; } public function isDeleted(): bool { - return $this->X & static::D || $this->Y & static::D; + return $this->X & self::D || $this->Y & self::D; } public function isUntracked(): bool { - return $this->X & static::N || $this->Y & static::N; + return $this->X & self::N || $this->Y & self::N; } public function isCopied(): bool { - return $this->X & static::C || $this->Y & static::C; - } - - /** - * @return string - */ - public function __toString() - { - return $this->line; + return $this->X & self::C || $this->Y & self::C; } } diff --git a/src/Git/ChangedFiles.php b/src/Git/ChangedFiles.php index 5033a44..6353966 100644 --- a/src/Git/ChangedFiles.php +++ b/src/Git/ChangedFiles.php @@ -1,5 +1,7 @@ */ - protected $files; + protected Collection $files; public function __construct(string $log) { @@ -17,13 +19,13 @@ public function __construct(string $log) $this->files = collect($files) ->filter() - ->map(function (string $line) { - return new ChangedFile($line); - }); + ->map(fn (bool|string $line) => new ChangedFile($line)); } /** * Get all files with changes + * + * @return Collection */ public function getFiles(): Collection { @@ -31,41 +33,34 @@ public function getFiles(): Collection } /** - * Get list of staged files - * - * @return Collection|ChangedFile[] + * @return Collection */ public function getStaged(): Collection { - return $this->files->filter(function (ChangedFile $file) { - return $file->isStaged(); - }); + return $this->files->filter(fn (ChangedFile $file) => $file->isStaged()); } /** - * Get added to commit files + * @return Collection */ public function getAddedToCommit(): Collection { - return $this->files->filter(function (ChangedFile $file) { - return $file->isInCommit(); - }); + return $this->files->filter(fn (ChangedFile $file) => $file->isInCommit()); } + /** + * @return Collection + */ public function getDeleted(): Collection { - return $this->files->filter(function (ChangedFile $file) { - return $file->isDeleted(); - }); + return $this->files->filter(fn (ChangedFile $file) => $file->isDeleted()); } /** - * Get untracked files + * @return Collection */ public function getUntracked(): Collection { - return $this->files->filter(function (ChangedFile $file) { - return $file->isUntracked(); - }); + return $this->files->filter(fn (ChangedFile $file) => $file->isUntracked()); } } diff --git a/src/Git/CommitMessage.php b/src/Git/CommitMessage.php index ebd8657..f7eeab7 100644 --- a/src/Git/CommitMessage.php +++ b/src/Git/CommitMessage.php @@ -1,23 +1,21 @@ setMessage($message); - $this->files = $files; + } + + public function __toString(): string + { + return $this->message; } /** @@ -43,12 +41,4 @@ public function getFiles(): ChangedFiles { return $this->files; } - - /** - * @return string - */ - public function __toString() - { - return $this->message; - } } diff --git a/src/Git/Log.php b/src/Git/Log.php index 80a03f7..0ffc8ac 100644 --- a/src/Git/Log.php +++ b/src/Git/Log.php @@ -1,79 +1,65 @@ */ - private $date; + private array $merge = []; - /** - * @var array - */ - private $merge = []; - - /** - * @var string - */ - private $message = ''; + private string $message = ''; /** * Log constructor. */ - public function __construct(string $log) + public function __construct(protected string $log) { - $this->log = $log; - $lines = preg_split("/\r\n|\n|\r/", $log); + $lines = preg_split("/\r\n|\n|\r/", $this->log); - $this->parse($lines); + if ($lines !== false) { + $this->parse($lines); + } } /** * Parse current log into variables + * + * @param array $lines */ private function parse(array $lines): void { $handlers = collect([ - 'commit' => function ($line) { + 'commit' => function ($line): void { preg_match('/(?[a-z0-9]{40})/', $line, $matches); $this->hash = $matches['hash'] ?? null; }, - 'Author' => function ($line) { + 'Author' => function ($line): void { $this->author = substr($line, strlen('Author:') + 1); }, - 'Date' => function ($line) { + 'Date' => function ($line): void { $this->date = Carbon::parse(substr($line, strlen('Date:') + 3)); }, - 'Merge' => function ($line) { + 'Merge' => function ($line): void { $merge = substr($line, strlen('Merge:') + 1); $this->merge = explode(' ', $merge); }, ]); foreach ($lines as $line) { - $handler = $handlers->first(function ($handler, $prefix) use ($line) { - return Str::startsWith($line, $prefix); - }); + $handler = $handlers->first(fn ($handler, $prefix) => Str::startsWith($line, $prefix)); if ($handler !== null) { $handler($line); @@ -86,7 +72,7 @@ private function parse(array $lines): void /** * Get commit hash */ - public function getHash(): string + public function getHash(): ?string { return $this->hash; } @@ -102,13 +88,15 @@ public function getAuthor(): ?string /** * Get commit date */ - public function getDate(): Carbon + public function getDate(): ?Carbon { return $this->date; } /** * Get merge information + * + * @return array */ public function getMerge(): array { @@ -123,12 +111,9 @@ public function getMessage(): string return $this->message; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { - return $this->getHash(); + return $this->getHash() ?? ''; } public function getLog(): string diff --git a/src/GitHooks.php b/src/GitHooks.php index 7e52bec..938a92e 100644 --- a/src/GitHooks.php +++ b/src/GitHooks.php @@ -1,5 +1,7 @@ */ - public function getSupportedHooks() + public function getSupportedHooks(): array { return [ 'pre-commit', @@ -29,24 +33,22 @@ public function getSupportedHooks() /** * Get all available git hooks being used + * + * @return array */ - public function getAvailableHooks() + public function getAvailableHooks(): array { $configGitHooks = config('git-hooks'); - return array_filter($this->getSupportedHooks(), function ($hook) use ($configGitHooks) { - return ! empty($configGitHooks[$hook]); - }); + return array_filter($this->getSupportedHooks(), fn ($hook) => ! empty($configGitHooks[$hook])); } /** * Install git hook * - * @return void - * * @throws Exception */ - public function install(string $hookName) + public function install(string $hookName): void { if (! is_dir($this->getGitHooksDir())) { throw new Exception('Git not initialized in this project.'); @@ -56,33 +58,49 @@ public function install(string $hookName) $hookPath = $this->getGitHooksDir().'/'.$hookName; $hookScript = str_replace( - ['{command}', '{artisanPath}'], - [$command, config('git-hooks.artisan_path')], - $this->getHookStub() + '{command}', + $command, + (string) $this->getHookStub() ); + if (config('git-hooks.use_sail')) { + $hookScript = str_replace( + ['{php|sail}', '{artisanPath}'], + ['vendor/bin/sail', 'artisan'], + $hookScript + ); + } else { + $hookScript = str_replace( + ['{php|sail}', '{artisanPath}'], + ['php', config('git-hooks.artisan_path')], + $hookScript + ); + } + file_put_contents($hookPath, $hookScript); chmod($hookPath, 0777); } /** * Returns the content of the git hook stub. - * - * @return false|string */ - public function getHookStub() + public function getHookStub(): ?string { $hookStubPath = __DIR__.str_replace('/', DIRECTORY_SEPARATOR, '/Console/Commands/stubs/hook'); - return file_get_contents($hookStubPath); + $stub = file_get_contents($hookStubPath); + + if ($stub === false) { + throw new Exception('Hook stub not found: '.$hookStubPath); + } + + return $stub; } /** * Returns the path to the git hooks directory. - * - * @return string */ - public function getGitHooksDir() + public function getGitHooksDir(): string { return base_path('.git'.DIRECTORY_SEPARATOR.'hooks'); } diff --git a/src/GitHooksServiceProvider.php b/src/GitHooksServiceProvider.php index 82b829d..8ec4b7f 100644 --- a/src/GitHooksServiceProvider.php +++ b/src/GitHooksServiceProvider.php @@ -1,5 +1,7 @@ app->runningInConsole()) { $this->publishes([ @@ -32,13 +34,11 @@ public function boot() /** * Register the application services. */ - public function register() + public function register(): void { // Automatically apply the package configuration $this->mergeConfigFrom(__DIR__.'/../config/git-hooks.php', 'laravel-git-hooks'); - $this->app->singleton('laravel-git-hooks', function () { - return new GitHooks; - }); + $this->app->singleton('laravel-git-hooks', fn () => new GitHooks); } } diff --git a/src/HooksPipeline.php b/src/HooksPipeline.php index 1163dff..ac1a034 100644 --- a/src/HooksPipeline.php +++ b/src/HooksPipeline.php @@ -1,5 +1,7 @@ hook = $hook; } - /** - * @return $this - */ - public function withPipeStartCallback(Closure $callback) + public function withPipeStartCallback(Closure $callback): self { $this->pipeStartCallback = $callback; return $this; } - /** - * @return $this - */ - public function withPipeEndCallback(Closure $callback) + public function withPipeEndCallback(Closure $callback): self { $this->pipeEndCallback = $callback; @@ -55,60 +36,55 @@ public function withPipeEndCallback(Closure $callback) /** * Get a Closure that represents a slice of the application onion. - * - * @return Closure */ - protected function carry() + protected function carry(): Closure { - return function ($stack, $pipe) { - return function ($passable) use ($stack, $pipe) { - try { - if (is_callable($pipe)) { - // If the pipe is a callable, then we will call it directly, but otherwise we - // will resolve the pipes out of the dependency container and call it with - // the appropriate method and arguments, returning the results back out. - return $pipe($passable, $stack); - } elseif (! is_object($pipe)) { - $hookParameters = (array) config('git-hooks.'.$this->hook.'.'.$pipe); - - // If the pipe is a string we will parse the string and resolve the class out - // of the dependency injection container. We can then build a callable and - // execute the pipe function giving in the parameters that are required. - $pipe = $this->getContainer()->make($pipe, ['parameters' => $hookParameters]); - - $this->handlePipeEnd(true); - - if ($this->pipeStartCallback) { - call_user_func_array($this->pipeStartCallback, [$pipe]); - } - - $parameters = [$passable, $stack]; - } else { - // If the pipe is already an object we'll just make a callable and pass it to - // the pipe as-is. There is no need to do any extra parsing and formatting - // since the object we're given was already a fully instantiated object. - $parameters = [$passable, $stack]; - } + return fn ($stack, $pipe) => function ($passable) use ($stack, $pipe) { + try { + if (is_callable($pipe)) { + // If the pipe is a callable, then we will call it directly, but otherwise we + // will resolve the pipes out of the dependency container and call it with + // the appropriate method and arguments, returning the results back out. + return $pipe($passable, $stack); + } - $carry = method_exists($pipe, $this->method) - ? $pipe->{$this->method}(...$parameters) - : $pipe(...$parameters); + if (! is_object($pipe)) { + $hookParameters = (array) config('git-hooks.'.$this->hook.'.'.$pipe); - return $this->handleCarry($carry); - } catch (Throwable $e) { - return $this->handleException($passable, $e); + // If the pipe is a string we will parse the string and resolve the class out + // of the dependency injection container. We can then build a callable and + // execute the pipe function giving in the parameters that are required. + $pipe = $this->getContainer()->make($pipe, ['parameters' => $hookParameters]); + + $this->handlePipeEnd(true); + + if ($this->pipeStartCallback) { + call_user_func_array($this->pipeStartCallback, [$pipe]); + } + + $parameters = [$passable, $stack]; + } else { + // If the pipe is already an object we'll just make a callable and pass it to + // the pipe as-is. There is no need to do any extra parsing and formatting + // since the object we're given was already a fully instantiated object. + $parameters = [$passable, $stack]; } - }; + + $carry = method_exists($pipe, $this->method) + ? $pipe->{$this->method}(...$parameters) + : $pipe(...$parameters); + + return $this->handleCarry($carry); + } catch (Throwable $e) { + return $this->handleException($passable, $e); + } }; } /** * Handle the call back call once a specific pipe has finished or errored. - * - * @param bool $success - * @return void */ - protected function handlePipeEnd($success) + protected function handlePipeEnd(bool $success): void { if ($this->pipeEndCallback) { call_user_func_array($this->pipeEndCallback, [$success]); @@ -117,11 +93,8 @@ protected function handlePipeEnd($success) /** * Handle the value returned from each pipe before passing it to the next. - * - * @param mixed $carry - * @return mixed */ - protected function handleCarry($carry) + protected function handleCarry(mixed $carry): mixed { $this->handlePipeEnd(true); @@ -131,12 +104,9 @@ protected function handleCarry($carry) /** * Handle the given exception. * - * @param mixed $passable - * @return mixed - * * @throws \Throwable */ - protected function handleException($passable, Throwable $e) + protected function handleException(mixed $passable, Throwable $e): mixed { $this->handlePipeEnd(false); diff --git a/src/Traits/GitHelper.php b/src/Traits/GitHelper.php index 77f1f1f..7e6e730 100644 --- a/src/Traits/GitHelper.php +++ b/src/Traits/GitHelper.php @@ -1,50 +1,38 @@ runCommandAndGetOutput('git status --short'); } - /** - * @return string - */ - public function getLastCommitFromLog() + public function getLastCommitFromLog(): string { return $this->runCommandAndGetOutput('git log -1 HEAD'); } /** - * @param string|array $commands - * @return string + * Get commit message content form local file */ - private function runCommandAndGetOutput($commands) + public function getCommitMessageContentFromFile(string $filePath): string { - $process = $this->runCommands($commands); + $content = file_get_contents($filePath); - if (! $process->isSuccessful()) { - throw new ProcessFailedException($process); + if ($content === false) { + throw new Exception('Fail to read file: '.$filePath); } - return $process->getOutput(); - } - - /** - * Get commit message content form local file - */ - public function getCommitMessageContentFromFile(string $filePath): string - { - return file_get_contents($filePath); + return $content; } /** @@ -57,10 +45,8 @@ public function updateCommitMessageContentInFile(string $path, string $message): /** * @read https://stackoverflow.com/questions/30733415/how-to-determine-if-git-merge-is-in-process#answer-30781568 - * - * @return bool */ - public function isMergeInProgress() + public function isMergeInProgress(): bool { $command = $this->runCommands('git merge HEAD', [ 'silent' => true, @@ -69,4 +55,18 @@ public function isMergeInProgress() // If a merge is in progress, the process returns code 128 return $command->getExitCode() === 128; } + + /** + * @param string|array $commands + */ + private function runCommandAndGetOutput(string|array $commands): string + { + $process = $this->runCommands($commands); + + if (! $process->isSuccessful()) { + throw new ProcessFailedException($process); + } + + return $process->getOutput(); + } } diff --git a/src/Traits/ProcessHelper.php b/src/Traits/ProcessHelper.php index a7a21bd..783aa32 100644 --- a/src/Traits/ProcessHelper.php +++ b/src/Traits/ProcessHelper.php @@ -1,5 +1,7 @@ $commands + * @param array $params */ - public function runCommands($commands, $params = []) + public function runCommands(string|array $commands, array $params = []): Process { - $input = $this->input ?? null; $output = method_exists($this, 'getOutput') ? $this->getOutput() : null; if ($output && ! $output->isDecorated()) { - $commands = $this->transformCommands($commands, function ($value) { - return $value.' --no-ansi'; - }); - } - - if (! empty($input->definition) && $input->definition->hasOption('quiet') && - ! empty($input) && $input->getOption('quiet') - ) { - $commands = $this->transformCommands($commands, function ($value) { - return $value.' --quiet'; - }); + $commands = $this->transformCommands($commands, fn ($value) => $value.' --no-ansi'); } if (data_get($params, 'silent')) { - $commands = $this->transformCommands($commands, function ($value) { - return $this->buildNoOutputCommand($value); - }); + $commands = $this->transformCommands($commands, fn ($value) => $this->buildNoOutputCommand($value)); } $process = Process::fromShellCommandline( @@ -53,8 +40,8 @@ public function runCommands($commands, $params = []) data_get($params, 'timeout') ); - $showOutput = data_get($params, 'tty') === true || data_get($params, 'show-output') === true; - if ($showOutput && '\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) { + $showOutput = (data_get($params, 'tty') === true || data_get($params, 'show-output') === true) && $output; + if ($showOutput && DIRECTORY_SEPARATOR !== '\\' && file_exists('/dev/tty') && is_readable('/dev/tty')) { try { $process->setTty(true); } catch (RuntimeException $e) { @@ -62,22 +49,23 @@ public function runCommands($commands, $params = []) } } - $process->run(! $showOutput ? null : function ($type, $line) use ($output) { - $output->write(' '.$line); + $process->run(! $showOutput ? null : function (string $line) use ($output): void { + if ($output !== null) { + $output->write(' '.$line); + } }); return $process; } /** - * @param array|string $commands - * @param callable $callback - * @return array + * @param string|array $commands + * @return array */ - public function transformCommands($commands, $callback) + public function transformCommands(string|array $commands, callable $callback): array { return array_map(function ($value) use ($callback) { - if (substr($value, 0, 5) === 'chmod') { + if (str_starts_with($value, 'chmod')) { return $value; } @@ -87,20 +75,13 @@ public function transformCommands($commands, $callback) /** * Builds the string for a command without console output - * - * @param string $command - * @return string */ - public function buildNoOutputCommand($command = '') + public function buildNoOutputCommand(string $command = ''): string { return trim($command).' > '.(PHP_OS_FAMILY === 'Windows' ? 'NUL' : '/dev/null 2>&1'); } - /** - * @param string $cwd - * @return $this - */ - public function setCwd($cwd) + public function setCwd(string $cwd): self { $this->cwd = $cwd; diff --git a/src/Traits/WithCommitLog.php b/src/Traits/WithCommitLog.php index bca117f..de6fe30 100644 --- a/src/Traits/WithCommitLog.php +++ b/src/Traits/WithCommitLog.php @@ -1,5 +1,7 @@ sendLogCommitThroughHooks( @@ -23,9 +23,11 @@ public function handle() GitHooks::getLastCommitFromLog() ) ); - } catch (HookFailException $e) { + } catch (HookFailException) { return 1; } + + return 0; } /** diff --git a/src/Traits/WithCommitMessage.php b/src/Traits/WithCommitMessage.php index e6b6453..dc2f8d2 100644 --- a/src/Traits/WithCommitMessage.php +++ b/src/Traits/WithCommitMessage.php @@ -1,5 +1,7 @@ argument('file'); - - return base_path($file); + return 0; } /** @@ -62,11 +54,25 @@ protected function sendMessageThroughHooks(CommitMessage $message): void */ protected function storeMessage(): Closure { - return function (CommitMessage $message) { + return function (CommitMessage $message): void { GitHooks::updateCommitMessageContentInFile( $this->getMessagePath(), (string) $message ); }; } + + /** + * Get the git message path (By default .git/COMMIT_MESSAGE) + */ + private function getMessagePath(): string + { + $file = $this->argument('file'); + + if (! is_string($file)) { + throw new HookFailException('Invalid file argument provided'); + } + + return base_path($file); + } } diff --git a/src/Traits/WithPipeline.php b/src/Traits/WithPipeline.php index 98557b3..debe846 100644 --- a/src/Traits/WithPipeline.php +++ b/src/Traits/WithPipeline.php @@ -1,5 +1,7 @@ getHook())); + + return $hooks->map(fn ($hook, $i) => is_int($i) ? $hook : $i)->all(); + } + + public function getHookTaskTitle(Hook $hook): string + { + $hookName = $hook->getName() ?? class_basename($hook); + + return sprintf(' HOOK %s', $hookName); + } /** * Make pipeline instance @@ -29,32 +46,20 @@ protected function makePipeline(): Pipeline ->withPipeEndCallback($this->finishHookConsoleTask()); } - /** - * {@inheritDoc} - */ - public function getRegisteredHooks(): array - { - $hooks = collect((array) config('git-hooks.'.$this->getHook())); - - return $hooks->map(function ($hook, $i) { - return is_int($i) ? $hook : $i; - })->all(); - } - /** * Show information about Hook which is being executed */ protected function startHookConsoleTask(): Closure { - return function (Hook $hook) { + return function (Hook $hook): void { $this->hookExecuting = $hook; // Binding the Command instance to the Hook, so it can be used inside the Hook - $hook->command = $this; + $hook->setCommand($this); $taskTitle = $this->getHookTaskTitle($hook); $loadingText = 'loading...'; - $this->output->write("$taskTitle: {$loadingText}"); + $this->output->write("{$taskTitle}: {$loadingText}"); }; } @@ -63,7 +68,7 @@ protected function startHookConsoleTask(): Closure */ protected function finishHookConsoleTask(): Closure { - return function ($success) { + return function ($success): void { if (empty($this->hookExecuting)) { return; } @@ -81,17 +86,10 @@ protected function finishHookConsoleTask(): Closure $taskTitle = $this->getHookTaskTitle($this->hookExecuting); $this->output->writeln( - "$taskTitle: ".($success ? '' : 'failed') + "{$taskTitle}: ".($success ? '' : 'failed') ); $this->hookExecuting = null; }; } - - public function getHookTaskTitle(Hook $hook): string - { - $hookName = $hook->getName() ?? class_basename($hook); - - return sprintf(' HOOK %s', $hookName); - } } diff --git a/src/Traits/WithPipelineFailCheck.php b/src/Traits/WithPipelineFailCheck.php new file mode 100644 index 0000000..b65a70d --- /dev/null +++ b/src/Traits/WithPipelineFailCheck.php @@ -0,0 +1,39 @@ +getPipelineFailedTempFile(); + if (touch($tmpFile) === false) { + throw new HookFailException; + } + } + + protected function checkPipelineFailed(): bool + { + $tmpFile = $this->getPipelineFailedTempFile(); + + return file_exists($tmpFile); + } + + protected function clearPipelineFailed(): void + { + $tmpFile = $this->getPipelineFailedTempFile(); + + if (file_exists($tmpFile)) { + unlink($tmpFile); + } + } + + protected function getPipelineFailedTempFile(): string + { + return sys_get_temp_dir().DIRECTORY_SEPARATOR.'githooks-pipeline-fail-'.getmypid(); + } +} diff --git a/tests/Datasets/GitLogsDataset.php b/tests/Datasets/GitLogsDataset.php index 3b2eec7..9e10951 100644 --- a/tests/Datasets/GitLogsDataset.php +++ b/tests/Datasets/GitLogsDataset.php @@ -31,6 +31,13 @@ ]), ]); +dataset('listOfRectorPhpFiles', [ + 'List of Rector Files' => implode(PHP_EOL, [ + 'AM temp/ClassWithRectorIssues.php', + 'AM temp/fixable-blade-file.blade.php', + ]), +]); + dataset('listOfFixableJSFiles', [ 'List of Fixable Files' => implode(PHP_EOL, [ 'AM temp/fixable-js-file.js', diff --git a/tests/Datasets/PreCommitHooksDataset.php b/tests/Datasets/PreCommitHooksDataset.php index e7032ec..7dabe4c 100644 --- a/tests/Datasets/PreCommitHooksDataset.php +++ b/tests/Datasets/PreCommitHooksDataset.php @@ -3,8 +3,10 @@ use Igorsgm\GitHooks\Console\Commands\Hooks\BladeFormatterPreCommitHook; use Igorsgm\GitHooks\Console\Commands\Hooks\LarastanPreCommitHook; use Igorsgm\GitHooks\Console\Commands\Hooks\PHPCodeSnifferPreCommitHook; +use Igorsgm\GitHooks\Console\Commands\Hooks\PhpInsightsPreCommitHook; use Igorsgm\GitHooks\Console\Commands\Hooks\PintPreCommitHook; use Igorsgm\GitHooks\Console\Commands\Hooks\PrettierPreCommitHook; +use Igorsgm\GitHooks\Console\Commands\Hooks\RectorPreCommitHook; dataset('pintConfiguration', [ 'Config File' => [ @@ -12,6 +14,8 @@ 'path' => '../../../bin/pint', 'config' => __DIR__.'/../Fixtures/pintFixture.json', 'file_extensions' => '/\.php$/', + 'run_in_docker' => false, + 'docker_container' => '', ], ], 'Preset' => [ @@ -19,6 +23,8 @@ 'path' => '../../../bin/pint', 'preset' => 'psr12', 'file_extensions' => '/\.php$/', + 'run_in_docker' => false, + 'docker_container' => '', ], ], ]); @@ -30,6 +36,34 @@ 'phpcbf_path' => '../../../bin/phpcbf', 'config' => __DIR__.'/../Fixtures/phpcsFixture.xml', 'file_extensions' => '/\.php$/', + 'run_in_docker' => false, + 'docker_container' => '', + ], + ], +]); + +dataset('phpinsightsConfiguration', [ + 'phpinsights.php file' => [ + [ + 'path' => '../../../bin/phpinsights', + 'config' => __DIR__.'/../Fixtures/phpinsightsFixture.php', + 'additional_params' => '', + 'file_extensions' => '/\.php$/', + 'run_in_docker' => false, + 'docker_container' => '', + ], + ], +]); + +dataset('rectorConfiguration', [ + 'rector.php file' => [ + [ + 'path' => '../../../bin/rector', + 'config' => __DIR__.'/../Fixtures/rectorFixture.php', + 'additional_params' => '', + 'file_extensions' => '/\.php$/', + 'run_in_docker' => false, + 'docker_container' => '', ], ], ]); @@ -40,6 +74,8 @@ 'path' => '../../../../node_modules/.bin/blade-formatter', 'config' => __DIR__.'/../Fixtures/bladeFormatterFixture.json', 'file_extensions' => '/\.blade\.php$/', + 'run_in_docker' => false, + 'docker_container' => '', ], ], ]); @@ -50,6 +86,9 @@ 'path' => '../../../bin/phpstan', 'config' => __DIR__.'/../Fixtures/phpstanFixture.neon', 'additional_params' => '--xdebug', + 'file_extensions' => '/\.php$/', + 'run_in_docker' => false, + 'docker_container' => '', ], ], ]); @@ -61,6 +100,8 @@ 'config' => __DIR__.'/../Fixtures/.prettierrcFixture.json', 'additional_params' => '--config --find-config-path', 'file_extensions' => '/\.(jsx?|tsx?|vue)$/', + 'run_in_docker' => false, + 'docker_container' => '', ], ], ]); @@ -72,6 +113,8 @@ 'config' => __DIR__.'/../Fixtures/.eslintrcFixture.js', 'additional_params' => '--config', 'file_extensions' => '/\.(jsx?|tsx?|vue)$/', + 'run_in_docker' => false, + 'docker_container' => '', ], ], ]); @@ -79,9 +122,12 @@ $nonExistentPath = [ 'path' => 'nonexistent/path', 'phpcs_path' => 'nonexistent/path', + 'phpcbf_path' => 'nonexistent/path', 'preset' => null, 'config' => __DIR__.'/../Fixtures/pintFixture.json', - + 'file_extensions' => '', + 'run_in_docker' => false, + 'docker_container' => '', ]; dataset('codeAnalyzersList', [ @@ -110,4 +156,14 @@ $nonExistentPath, PrettierPreCommitHook::class, ], + 'PHP Insights' => [ + 'phpinsights', + $nonExistentPath, + PhpInsightsPreCommitHook::class, + ], + 'Rector' => [ + 'rector', + $nonExistentPath, + RectorPreCommitHook::class, + ], ]); diff --git a/tests/Features/Commands/Hooks/BaseCodeAnalyzerPreCommitHookTest.php b/tests/Features/Commands/Hooks/BaseCodeAnalyzerPreCommitHookTest.php index c878054..d794de2 100644 --- a/tests/Features/Commands/Hooks/BaseCodeAnalyzerPreCommitHookTest.php +++ b/tests/Features/Commands/Hooks/BaseCodeAnalyzerPreCommitHookTest.php @@ -15,11 +15,9 @@ ->andReturn(collect()) ->getMock(); - $next = function ($files) { - return 'passed'; - }; + $next = fn ($files) => 'passed'; - $hook = new ConcreteBaseCodeAnalyzerFixture(); + $hook = new ConcreteBaseCodeAnalyzerFixture; $result = $hook->handleCommittedFiles($changedFiles, $next); expect($result)->toBe('passed'); }); @@ -28,11 +26,9 @@ $changedFiles = new ChangedFiles($modifiedFilesList); GitHooks::shouldReceive('isMergeInProgress')->andReturn(true); - $next = function ($files) { - return 'passed'; - }; + $next = fn ($files) => 'passed'; - $hook = new ConcreteBaseCodeAnalyzerFixture(); + $hook = new ConcreteBaseCodeAnalyzerFixture; $result = $hook->handleCommittedFiles($changedFiles, $next); expect($result)->toBe('passed'); })->with('modifiedFilesList'); @@ -48,7 +44,7 @@ function ($configName, $nonExistentPathConfig, $preCommitHookClass, $listOfFixab GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixablePhpFiles); - $preCommitHook = new $preCommitHookClass(); + $preCommitHook = new $preCommitHookClass; $this->artisan('git-hooks:pre-commit') ->expectsOutputToContain($preCommitHook->getName().' is not installed.') ->assertExitCode(1); @@ -66,7 +62,7 @@ function ($configName, $nonExistentPathConfig, $preCommitHookClass, $listOfFixab GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixablePhpFiles); - $preCommitHook = new $preCommitHookClass(); + $preCommitHook = new $preCommitHookClass; $this->artisan('git-hooks:pre-commit') ->expectsOutputToContain($preCommitHook->getName().' config file does not exist.') ->assertExitCode(1); diff --git a/tests/Features/Commands/Hooks/EnlightnPreCommitHookTest.php b/tests/Features/Commands/Hooks/EnlightnPreCommitHookTest.php index 3567c8c..57f02f0 100644 --- a/tests/Features/Commands/Hooks/EnlightnPreCommitHookTest.php +++ b/tests/Features/Commands/Hooks/EnlightnPreCommitHookTest.php @@ -20,11 +20,9 @@ ->andReturn(collect()) ->getMock(); - $next = function ($files) { - return 'passed'; - }; + $next = fn ($files) => 'passed'; - $hook = new EnlightnPreCommitHook(); + $hook = new EnlightnPreCommitHook; $result = $hook->handle($changedFiles, $next); expect($result)->toBe('passed'); }); @@ -37,9 +35,7 @@ GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfChangedFiles); - Artisan::command('enlightn', function () { - return 1; - }); + Artisan::command('enlightn', fn () => 1); // Get all registered commands $commands = Artisan::all(); @@ -48,7 +44,7 @@ $command = $commands['git-hooks:pre-commit']; $input = new ArrayInput([]); - $output = new BufferedOutput(); + $output = new BufferedOutput; $exitCode = $command->run($input, $output); $outputText = $output->fetch(); @@ -66,9 +62,7 @@ GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfChangedFiles); - Artisan::command('enlightn', function () { - return 0; - }); + Artisan::command('enlightn', fn () => 0); $this->artisan('git-hooks:pre-commit')->assertSuccessful(); })->with('listOfChangedFiles'); diff --git a/tests/Features/Commands/Hooks/PhpInsightsPreCommitHookTest.php b/tests/Features/Commands/Hooks/PhpInsightsPreCommitHookTest.php new file mode 100644 index 0000000..f0454ec --- /dev/null +++ b/tests/Features/Commands/Hooks/PhpInsightsPreCommitHookTest.php @@ -0,0 +1,69 @@ +gitInit(); + $this->initializeTempDirectory(base_path('temp')); +}); + +test('Skips PhpInsights check when there is none php files added to commit', function ($phpInsightsConfiguration) { + $this->config->set('git-hooks.code_analyzers.phpinsights', $phpInsightsConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PhpInsightsPreCommitHook::class, + ]); + + $this->makeTempFile('sample.js', + file_get_contents(__DIR__.'/../../../Fixtures/sample.js') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn('AM src/sample.js'); + + $this->artisan('git-hooks:pre-commit')->assertSuccessful(); +})->with('phpinsightsConfiguration'); + +test('Fails commit when PhpInsights is not passing and user does not autofix the files', + function ($phpInsightsConfiguration, $listOfFixablePhpFiles) { + $this->config->set('git-hooks.code_analyzers.phpinsights', $phpInsightsConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PhpInsightsPreCommitHook::class, + ]); + + $this->makeTempFile('ClassWithFixableIssues.php', + file_get_contents(__DIR__.'/../../../Fixtures/ClassWithFixableIssues.php') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixablePhpFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('PhpInsights Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsConfirmation('Would you like to attempt to correct files automagically?', 'no') + ->assertExitCode(1); + })->with('phpinsightsConfiguration', 'listOfFixablePhpFiles'); + +test('Commit passes when PhpInsights fixes the files', function ($phpInsightsConfiguration, $listOfFixablePhpFiles) { + $this->config->set('git-hooks.code_analyzers.phpinsights', $phpInsightsConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PhpInsightsPreCommitHook::class, + ]); + + $this->makeTempFile('ClassWithFixableIssues.php', + file_get_contents(__DIR__.'/../../../Fixtures/ClassWithFixableIssues.php') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixablePhpFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('PhpInsights Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsConfirmation('Would you like to attempt to correct files automagically?', 'yes'); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('PhpInsights Failed') + ->assertSuccessful(); +})->with('phpinsightsConfiguration', 'listOfFixablePhpFiles'); diff --git a/tests/Features/Commands/Hooks/PintPreCommitHookTest.php b/tests/Features/Commands/Hooks/PintPreCommitHookTest.php index 068817e..41dcf12 100644 --- a/tests/Features/Commands/Hooks/PintPreCommitHookTest.php +++ b/tests/Features/Commands/Hooks/PintPreCommitHookTest.php @@ -67,3 +67,111 @@ function ($pintConfiguration, $listOfFixablePhpFiles) { ->doesntExpectOutputToContain('Pint Failed') ->assertSuccessful(); })->with('pintConfiguration', 'listOfFixablePhpFiles'); + +test('Commit passes when Pint fixes the files automatically', function ($pintConfiguration, $listOfFixablePhpFiles) { + $this->config->set('git-hooks.code_analyzers.laravel_pint', $pintConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PintPreCommitHook::class, + ]); + $this->config->set('git-hooks.automatically_fix_errors', true); + + $this->makeTempFile('ClassWithFixableIssues.php', + file_get_contents(__DIR__.'/../../../Fixtures/ClassWithFixableIssues.php') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixablePhpFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Pint Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsOutputToContain('AUTOFIX') + ->assertSuccessful(); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Pint Failed') + ->assertSuccessful(); +})->with('pintConfiguration', 'listOfFixablePhpFiles'); + +test('Commit passes when Pint fixes the files automatically with analyzer rerun', function ($pintConfiguration, $listOfFixablePhpFiles) { + $this->config->set('git-hooks.code_analyzers.laravel_pint', $pintConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PintPreCommitHook::class, + ]); + $this->config->set('git-hooks.automatically_fix_errors', true); + $this->config->set('git-hooks.rerun_analyzer_after_autofix', true); + $this->config->set('git-hooks.debug_commands', true); + + $this->makeTempFile('ClassWithFixableIssues.php', + file_get_contents(__DIR__.'/../../../Fixtures/ClassWithFixableIssues.php') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixablePhpFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Pint Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsOutputToContain('AUTOFIX') + ->doesntExpectOutputToContain('Pint Failed') + ->assertSuccessful(); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Pint Failed') + ->assertSuccessful(); +})->with('pintConfiguration', 'listOfFixablePhpFiles'); + +test('Commit passes when Pint fixes the files automatically with debug commands', function ($pintConfiguration, $listOfFixablePhpFiles) { + $this->config->set('git-hooks.code_analyzers.laravel_pint', $pintConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PintPreCommitHook::class, + ]); + $this->config->set('git-hooks.automatically_fix_errors', true); + $this->config->set('git-hooks.debug_commands', true); + + $this->makeTempFile('ClassWithFixableIssues.php', + file_get_contents(__DIR__.'/../../../Fixtures/ClassWithFixableIssues.php') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixablePhpFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Pint Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsOutputToContain('AUTOFIX') + ->doesntExpectOutputToContain('Pint Failed') + ->assertSuccessful(); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Pint Failed') + ->assertSuccessful(); +})->with('pintConfiguration', 'listOfFixablePhpFiles'); + +test('Commit passes when Pint fixes the files automatically with output errors', function ($pintConfiguration, $listOfFixablePhpFiles) { + $this->config->set('git-hooks.code_analyzers.laravel_pint', $pintConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PintPreCommitHook::class, + ]); + $this->config->set('git-hooks.automatically_fix_errors', true); + $this->config->set('git-hooks.output_errors', true); + $this->config->set('git-hooks.debug_commands', false); + + $this->makeTempFile('ClassWithFixableIssues.php', + file_get_contents(__DIR__.'/../../../Fixtures/ClassWithFixableIssues.php') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixablePhpFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Pint Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsOutputToContain('AUTOFIX') + ->doesntExpectOutputToContain('Pint Failed') + ->assertSuccessful(); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Pint Failed') + ->assertSuccessful(); +})->with('pintConfiguration', 'listOfFixablePhpFiles'); diff --git a/tests/Features/Commands/Hooks/PrettierPreCommitHookTest.php b/tests/Features/Commands/Hooks/PrettierPreCommitHookTest.php index 6110504..18623c9 100644 --- a/tests/Features/Commands/Hooks/PrettierPreCommitHookTest.php +++ b/tests/Features/Commands/Hooks/PrettierPreCommitHookTest.php @@ -45,7 +45,7 @@ function ($prettierConfiguration, $listOfFixableJSFiles) { ->assertExitCode(1); })->with('prettierConfiguration', 'listOfFixableJSFiles'); -test('Commit passes when Prettier fixes the files', function ($prettierConfiguration, $listOfFixableJSFiles) { +test('Commit passes when Prettier fixes the files with CLI confirmation', function ($prettierConfiguration, $listOfFixableJSFiles) { $this->config->set('git-hooks.code_analyzers.prettier', $prettierConfiguration); $this->config->set('git-hooks.pre-commit', [ PrettierPreCommitHook::class, @@ -67,3 +67,111 @@ function ($prettierConfiguration, $listOfFixableJSFiles) { ->doesntExpectOutputToContain('Prettier Failed') ->assertSuccessful(); })->with('prettierConfiguration', 'listOfFixableJSFiles'); + +test('Commit passes when Prettier fixes the files automatically', function ($prettierConfiguration, $listOfFixableJSFiles) { + $this->config->set('git-hooks.code_analyzers.prettier', $prettierConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PrettierPreCommitHook::class, + ]); + $this->config->set('git-hooks.automatically_fix_errors', true); + + $this->makeTempFile('fixable-js-file.js', + file_get_contents(__DIR__.'/../../../Fixtures/fixable-js-file.js') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixableJSFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Prettier Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsOutputToContain('AUTOFIX') + ->assertSuccessful(); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Prettier Failed') + ->assertSuccessful(); +})->with('prettierConfiguration', 'listOfFixableJSFiles'); + +test('Commit passes when Prettier fixes the files automatically with analyzer rerun', function ($prettierConfiguration, $listOfFixableJSFiles) { + $this->config->set('git-hooks.code_analyzers.prettier', $prettierConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PrettierPreCommitHook::class, + ]); + $this->config->set('git-hooks.automatically_fix_errors', true); + $this->config->set('git-hooks.rerun_analyzer_after_autofix', true); + $this->config->set('git-hooks.debug_commands', true); + + $this->makeTempFile('fixable-js-file.js', + file_get_contents(__DIR__.'/../../../Fixtures/fixable-js-file.js') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixableJSFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Prettier Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsOutputToContain('AUTOFIX') + ->doesntExpectOutputToContain('Prettier Failed') + ->assertSuccessful(); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Prettier Failed') + ->assertSuccessful(); +})->with('prettierConfiguration', 'listOfFixableJSFiles'); + +test('Commit passes when Prettier fixes the files automatically with debug commands', function ($prettierConfiguration, $listOfFixableJSFiles) { + $this->config->set('git-hooks.code_analyzers.prettier', $prettierConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PrettierPreCommitHook::class, + ]); + $this->config->set('git-hooks.automatically_fix_errors', true); + $this->config->set('git-hooks.debug_commands', true); + + $this->makeTempFile('fixable-js-file.js', + file_get_contents(__DIR__.'/../../../Fixtures/fixable-js-file.js') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixableJSFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Prettier Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsOutputToContain('AUTOFIX') + ->doesntExpectOutputToContain('Prettier Failed') + ->assertSuccessful(); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Prettier Failed') + ->assertSuccessful(); +})->with('prettierConfiguration', 'listOfFixableJSFiles'); + +test('Commit passes when Prettier fixes the files automatically with output errors', function ($prettierConfiguration, $listOfFixableJSFiles) { + $this->config->set('git-hooks.code_analyzers.prettier', $prettierConfiguration); + $this->config->set('git-hooks.pre-commit', [ + PrettierPreCommitHook::class, + ]); + $this->config->set('git-hooks.automatically_fix_errors', true); + $this->config->set('git-hooks.output_errors', true); + $this->config->set('git-hooks.debug_commands', false); + + $this->makeTempFile('fixable-js-file.js', + file_get_contents(__DIR__.'/../../../Fixtures/fixable-js-file.js') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfFixableJSFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Prettier Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsOutputToContain('AUTOFIX') + ->doesntExpectOutputToContain('Prettier Failed') + ->assertSuccessful(); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Prettier Failed') + ->assertSuccessful(); +})->with('prettierConfiguration', 'listOfFixableJSFiles'); diff --git a/tests/Features/Commands/Hooks/RectorPreCommitHookTest.php b/tests/Features/Commands/Hooks/RectorPreCommitHookTest.php new file mode 100644 index 0000000..4e82f93 --- /dev/null +++ b/tests/Features/Commands/Hooks/RectorPreCommitHookTest.php @@ -0,0 +1,69 @@ +gitInit(); + $this->initializeTempDirectory(base_path('temp')); +}); + +test('Skips Rector check when there is none php files added to commit', function ($rectorConfiguration) { + $this->config->set('git-hooks.code_analyzers.rector', $rectorConfiguration); + $this->config->set('git-hooks.pre-commit', [ + RectorPreCommitHook::class, + ]); + + $this->makeTempFile('sample.js', + file_get_contents(__DIR__.'/../../../Fixtures/sample.js') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn('AM src/sample.js'); + + $this->artisan('git-hooks:pre-commit')->assertSuccessful(); +})->with('rectorConfiguration'); + +test('Fails commit when Rector is not passing', + function ($rectorConfiguration, $listOfRectorPhpFiles) { + $this->config->set('git-hooks.code_analyzers.rector', $rectorConfiguration); + $this->config->set('git-hooks.pre-commit', [ + RectorPreCommitHook::class, + ]); + + $this->makeTempFile('ClassWithRectorIssues.php', + file_get_contents(__DIR__.'/../../../Fixtures/ClassWithRectorIssues.php') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfRectorPhpFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Rector Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsConfirmation('Would you like to attempt to correct files automagically?', 'no') + ->assertExitCode(1); + })->with('rectorConfiguration', 'listOfRectorPhpFiles'); + +test('Commit passes when Rector is passing', function ($rectorConfiguration, $listOfRectorPhpFiles) { + $this->config->set('git-hooks.code_analyzers.rector', $rectorConfiguration); + $this->config->set('git-hooks.pre-commit', [ + RectorPreCommitHook::class, + ]); + + $this->makeTempFile('ClassWithRectorIssues.php', + file_get_contents(__DIR__.'/../../../Fixtures/ClassWithRectorIssues.php') + ); + + GitHooks::shouldReceive('isMergeInProgress')->andReturn(false); + GitHooks::shouldReceive('getListOfChangedFiles')->andReturn($listOfRectorPhpFiles); + + $this->artisan('git-hooks:pre-commit') + ->expectsOutputToContain('Rector Failed') + ->expectsOutputToContain('COMMIT FAILED') + ->expectsConfirmation('Would you like to attempt to correct files automagically?', 'yes'); + + $this->artisan('git-hooks:pre-commit') + ->doesntExpectOutputToContain('Rector Failed') + ->assertSuccessful(); +})->with('rectorConfiguration', 'listOfRectorPhpFiles'); diff --git a/tests/Features/Commands/MakeHookTest.php b/tests/Features/Commands/MakeHookTest.php index 02298ea..b5aa7e2 100644 --- a/tests/Features/Commands/MakeHookTest.php +++ b/tests/Features/Commands/MakeHookTest.php @@ -20,9 +20,7 @@ test('Generates a hook file with a valid hook type', function () { $filesystem = Mockery::mock(Filesystem::class) - ->expects('put')->withArgs(function ($path, $contents) { - return Str::contains($path, 'MyCustomPreCommitHook.php'); - })->andReturns(true) + ->expects('put')->withArgs(fn ($path, $contents) => Str::contains($path, 'MyCustomPreCommitHook.php'))->andReturns(true) ->shouldReceive([ 'isDirectory' => true, 'exists' => false, @@ -55,7 +53,7 @@ test('Uses custom stub if available', function () { $customStubContent = 'Custom stub content'; $customStubPath = $this->app->basePath('stubs/pre-commit-console.stub'); - File::ensureDirectoryExists(dirname($customStubPath)); + File::ensureDirectoryExists(dirname((string) $customStubPath)); File::put($customStubPath, $customStubContent); $hookPath = $this->app->basePath('app/Console/GitHooks/PreCommitHook.php'); diff --git a/tests/Features/Commands/PostCommitTest.php b/tests/Features/Commands/PostCommitTest.php index afa97f7..a033049 100644 --- a/tests/Features/Commands/PostCommitTest.php +++ b/tests/Features/Commands/PostCommitTest.php @@ -39,8 +39,8 @@ $postCommitHook1 = Mockery::mock(PostCommitHook::class); $postCommitHook1->expects('handle') - ->andReturnUsing(function (Log $log, Closure $closure) { - throw new HookFailException(); + ->andReturnUsing(function (Log $log, Closure $closure): never { + throw new HookFailException; }); $this->config->set('git-hooks.post-commit', [ diff --git a/tests/Features/Commands/PreCommitTest.php b/tests/Features/Commands/PreCommitTest.php index e18e263..75fb9a7 100644 --- a/tests/Features/Commands/PreCommitTest.php +++ b/tests/Features/Commands/PreCommitTest.php @@ -43,8 +43,8 @@ // ); $preCommitHook1 = Mockery::mock(PreCommitHook::class); $preCommitHook1->expects('handle') - ->andReturnUsing(function (ChangedFiles $files, Closure $closure) { - throw new HookFailException(); + ->andReturnUsing(function (ChangedFiles $files, Closure $closure): never { + throw new HookFailException; }); $this->config->set('git-hooks.pre-commit', [ diff --git a/tests/Features/Commands/PrepareCommitMessageTest.php b/tests/Features/Commands/PrepareCommitMessageTest.php index 50914db..cfdf61c 100644 --- a/tests/Features/Commands/PrepareCommitMessageTest.php +++ b/tests/Features/Commands/PrepareCommitMessageTest.php @@ -44,8 +44,8 @@ // ); $postCommitHook1 = Mockery::mock(MessageHook::class); $postCommitHook1->expects('handle') - ->andReturnUsing(function (CommitMessage $commitMessage, Closure $closure) { - throw new HookFailException(); + ->andReturnUsing(function (CommitMessage $commitMessage, Closure $closure): never { + throw new HookFailException; }); $this->config->set('git-hooks.prepare-commit-msg', [ diff --git a/tests/Fixtures/.eslintrcFixture.js b/tests/Fixtures/.eslintrcFixture.js index d1d719f..4a468b9 100644 --- a/tests/Fixtures/.eslintrcFixture.js +++ b/tests/Fixtures/.eslintrcFixture.js @@ -1,21 +1,25 @@ -module.exports = { - env: { - browser: true, - es2021: true, - }, - extends: [ - 'plugin:vue/vue3-essential', - 'airbnb-base', - ], - overrides: [ - ], - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - }, - plugins: [ - 'vue', - ], - rules: { - }, -}; +module.exports = [ + { + files: ['**/*.{js,jsx,mjs,cjs,vue}'], + languageOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + globals: { + browser: true + } + }, + rules: { + // Auto-fixable rules to catch issues in fixable-js-file.js + 'brace-style': ['error', '1tbs', { allowSingleLine: true }], + 'no-multiple-empty-lines': ['error', { max: 1 }], + 'padded-blocks': ['error', 'never'], + 'space-before-blocks': ['error', 'always'], + 'space-before-function-paren': ['error', 'never'], + + // Non-fixable rules to not fix in not-fully-fixable-js-file.js + 'no-unused-vars': 'error', + 'complexity': ['error', 1], + 'no-empty-function': 'error' + } + } +]; diff --git a/tests/Fixtures/ClassWithRectorIssues.php b/tests/Fixtures/ClassWithRectorIssues.php new file mode 100644 index 0000000..12dbdf9 --- /dev/null +++ b/tests/Fixtures/ClassWithRectorIssues.php @@ -0,0 +1,19 @@ +setMessage($message->getMessage().' hook1'); @@ -24,4 +25,12 @@ public function getName(): string { return 'Commit Message Test Hook 1'; } + + /** + * {@inheritDoc} + */ + public function setCommand(Command $command): void + { + // nothing to do + } } diff --git a/tests/Fixtures/CommitMessageFixtureHook2.php b/tests/Fixtures/CommitMessageFixtureHook2.php index c77f489..75aba06 100644 --- a/tests/Fixtures/CommitMessageFixtureHook2.php +++ b/tests/Fixtures/CommitMessageFixtureHook2.php @@ -4,13 +4,14 @@ use Closure; use Igorsgm\GitHooks\Contracts\MessageHook; +use Illuminate\Console\Command; class CommitMessageFixtureHook2 implements MessageHook { /** * {@inheritDoc} */ - public function handle(\Igorsgm\GitHooks\Git\CommitMessage $message, Closure $next) + public function handle(\Igorsgm\GitHooks\Git\CommitMessage $message, Closure $next): mixed { $message->setMessage($message->getMessage().' hook2'); @@ -24,4 +25,12 @@ public function getName(): string { return 'Commit Message Test Hook 2'; } + + /** + * {@inheritDoc} + */ + public function setCommand(Command $command): void + { + // nothing to do + } } diff --git a/tests/Fixtures/CommitMessageFixtureHook4.php b/tests/Fixtures/CommitMessageFixtureHook4.php index 8b99e16..9ef1190 100644 --- a/tests/Fixtures/CommitMessageFixtureHook4.php +++ b/tests/Fixtures/CommitMessageFixtureHook4.php @@ -4,6 +4,7 @@ use Closure; use Igorsgm\GitHooks\Contracts\MessageHook; +use Illuminate\Console\Command; class CommitMessageFixtureHook4 implements MessageHook { @@ -20,7 +21,7 @@ public function __construct(array $parameters) /** * {@inheritDoc} */ - public function handle(\Igorsgm\GitHooks\Git\CommitMessage $message, Closure $next) + public function handle(\Igorsgm\GitHooks\Git\CommitMessage $message, Closure $next): mixed { $message->setMessage($message->getMessage().' '.$this->parameters['param1'].' '.$this->parameters['param2']); @@ -34,4 +35,12 @@ public function getName(): string { return 'hook 4'; } + + /** + * {@inheritDoc} + */ + public function setCommand(Command $command): void + { + // nothing to do + } } diff --git a/tests/Fixtures/ConcreteBaseCodeAnalyzerFixture.php b/tests/Fixtures/ConcreteBaseCodeAnalyzerFixture.php index e5e76d9..cdce3f4 100644 --- a/tests/Fixtures/ConcreteBaseCodeAnalyzerFixture.php +++ b/tests/Fixtures/ConcreteBaseCodeAnalyzerFixture.php @@ -6,4 +6,9 @@ class ConcreteBaseCodeAnalyzerFixture extends BaseCodeAnalyzerPreCommitHook { + public function analyzerCommand(): string {} + + public function fixerCommand(): string {} + + public function handle(\Igorsgm\GitHooks\Git\ChangedFiles $files, \Closure $next): mixed {} } diff --git a/tests/Fixtures/HooksPipelineDefaultFixture1.php b/tests/Fixtures/HooksPipelineDefaultFixture1.php index 121365b..ccec7c4 100644 --- a/tests/Fixtures/HooksPipelineDefaultFixture1.php +++ b/tests/Fixtures/HooksPipelineDefaultFixture1.php @@ -3,6 +3,7 @@ namespace Igorsgm\GitHooks\Tests\Fixtures; use Igorsgm\GitHooks\Contracts\Hook; +use Illuminate\Console\Command; class HooksPipelineDefaultFixture1 implements Hook { @@ -20,4 +21,9 @@ public function handle(string $message, $next) return $next($message); } + + public function setCommand(Command $command): void + { + // nothing to do + } } diff --git a/tests/Fixtures/HooksPipelineWithParamsFixture2.php b/tests/Fixtures/HooksPipelineWithParamsFixture2.php index 6b0ea79..816e4e3 100644 --- a/tests/Fixtures/HooksPipelineWithParamsFixture2.php +++ b/tests/Fixtures/HooksPipelineWithParamsFixture2.php @@ -3,18 +3,11 @@ namespace Igorsgm\GitHooks\Tests\Fixtures; use Igorsgm\GitHooks\Contracts\Hook; +use Illuminate\Console\Command; class HooksPipelineWithParamsFixture2 implements Hook { - /** - * @var array - */ - private $parameters; - - public function __construct(array $parameters) - { - $this->parameters = $parameters; - } + public function __construct(private array $parameters) {} /** * Get hook name @@ -30,4 +23,9 @@ public function handle(string $message, $next) return $next($message); } + + public function setCommand(Command $command): void + { + // nothing to do + } } diff --git a/tests/Fixtures/PreCommitFixtureHook.php b/tests/Fixtures/PreCommitFixtureHook.php index 2e4ec23..4423c28 100644 --- a/tests/Fixtures/PreCommitFixtureHook.php +++ b/tests/Fixtures/PreCommitFixtureHook.php @@ -5,6 +5,7 @@ use Closure; use Igorsgm\GitHooks\Contracts\PreCommitHook; use Igorsgm\GitHooks\Git\ChangedFiles; +use Illuminate\Console\Command; class PreCommitFixtureHook implements PreCommitHook { @@ -13,8 +14,13 @@ public function getName(): string return 'MyPreCommitHook1'; } - public function handle(ChangedFiles $files, Closure $next) + public function handle(ChangedFiles $files, Closure $next): mixed { return $next($files); } + + public function setCommand(Command $command): void + { + // nothing to do + } } diff --git a/tests/Fixtures/PrepareCommitMessageFixtureHook1.php b/tests/Fixtures/PrepareCommitMessageFixtureHook1.php index a7835df..0e7771c 100644 --- a/tests/Fixtures/PrepareCommitMessageFixtureHook1.php +++ b/tests/Fixtures/PrepareCommitMessageFixtureHook1.php @@ -5,13 +5,14 @@ use Closure; use Igorsgm\GitHooks\Contracts\MessageHook; use Igorsgm\GitHooks\Git\CommitMessage; +use Illuminate\Console\Command; class PrepareCommitMessageFixtureHook1 implements MessageHook { /** * {@inheritDoc} */ - public function handle(CommitMessage $message, Closure $next) + public function handle(CommitMessage $message, Closure $next): mixed { $message->setMessage($message->getMessage().' hook1'); @@ -25,4 +26,9 @@ public function getName(): string { return 'Prepare Commit Message Hook 1'; } + + public function setCommand(Command $command): void + { + // nothing to do + } } diff --git a/tests/Fixtures/PrepareCommitMessageFixtureHook2.php b/tests/Fixtures/PrepareCommitMessageFixtureHook2.php index 4a16be8..f6c37f2 100644 --- a/tests/Fixtures/PrepareCommitMessageFixtureHook2.php +++ b/tests/Fixtures/PrepareCommitMessageFixtureHook2.php @@ -5,13 +5,14 @@ use Closure; use Igorsgm\GitHooks\Contracts\MessageHook; use Igorsgm\GitHooks\Git\CommitMessage; +use Illuminate\Console\Command; class PrepareCommitMessageFixtureHook2 implements MessageHook { /** * {@inheritDoc} */ - public function handle(CommitMessage $message, Closure $next) + public function handle(CommitMessage $message, Closure $next): mixed { $message->setMessage($message->getMessage().' hook2'); @@ -25,4 +26,9 @@ public function getName(): string { return 'Prepare Commit Message Hook 2'; } + + public function setCommand(Command $command): void + { + // nothing to do + } } diff --git a/tests/Fixtures/phpinsightsFixture.php b/tests/Fixtures/phpinsightsFixture.php new file mode 100644 index 0000000..264262b --- /dev/null +++ b/tests/Fixtures/phpinsightsFixture.php @@ -0,0 +1,28 @@ + 'default', + 'exclude' => [ + ], + 'add' => [ + // ExampleMetric::class => [ + // ExampleInsight::class, + // ] + ], + 'remove' => [ + NunoMaduro\PhpInsights\Domain\Insights\ForbiddenNormalClasses::class, + ], + 'config' => [ + // ExampleInsight::class => [ + // 'key' => 'value', + // ], + ], + 'requirements' => [ + 'min-quality' => 100, + 'min-complexity' => 0, + 'min-architecture' => 100, + 'min-style' => 100, + ], +]; diff --git a/tests/Fixtures/rectorFixture.php b/tests/Fixtures/rectorFixture.php new file mode 100644 index 0000000..90af356 --- /dev/null +++ b/tests/Fixtures/rectorFixture.php @@ -0,0 +1,16 @@ +withPaths([ + './', + ]) + // uncomment to reach your current PHP version + ->withPhpSets(php81: true) + ->withRules([ + SimplifyEmptyCheckOnEmptyArrayRector::class, + ]); diff --git a/tests/Pest.php b/tests/Pest.php index 1aba653..2932fb6 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -28,9 +28,7 @@ | */ -expect()->extend('toBeOne', function () { - return $this->toBe(1); -}); +expect()->extend('toBeOne', fn () => $this->toBe(1)); expect()->extend('toContainHookArtisanCommand', function ($hookName) { $this->value = file_get_contents($this->value); diff --git a/tests/TestCase.php b/tests/TestCase.php index f7587bd..50a1047 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -29,9 +29,8 @@ protected function setUp(): void * Define environment setup. * * @param \Illuminate\Foundation\Application $app - * @return void */ - public function defineEnvironment($app) + public function defineEnvironment($app): void { $app['config']->set('database.default', 'sqlite'); $app['config']->set('database.connections.sqlite', [ @@ -53,10 +52,13 @@ public function defineEnvironment($app) 'code_analyzers' => [], 'artisan_path' => base_path('artisan'), 'output_errors' => false, + 'analyzer_chunk_size' => 100, + 'validate_paths' => true, 'automatically_fix_errors' => false, 'rerun_analyzer_after_autofix' => false, 'stop_at_first_analyzer_failure' => true, 'debug_commands' => false, + 'debug_output' => false, 'run_in_docker' => false, 'docker_command' => '', ]); @@ -99,10 +101,7 @@ public function gitInit() return $this; } - /** - * @return void - */ - public function initializeGitAsTempDirectory() + public function initializeGitAsTempDirectory(): void { $this->gitInit() ->initializeTempDirectory(base_path('.git')); diff --git a/tests/Traits/WithTmpFiles.php b/tests/Traits/WithTmpFiles.php index cbb76c0..d065e7f 100644 --- a/tests/Traits/WithTmpFiles.php +++ b/tests/Traits/WithTmpFiles.php @@ -8,7 +8,7 @@ trait WithTmpFiles { private $tempDirectoryPath; - public function initializeTempDirectory(?string $path = '', bool $force = false) + public function initializeTempDirectory(?string $path = '', bool $force = false): void { if ($path) { $this->setTempDirectoryPath($path); diff --git a/tests/Unit/HooksPipelineTest.php b/tests/Unit/HooksPipelineTest.php index 7038838..3880803 100644 --- a/tests/Unit/HooksPipelineTest.php +++ b/tests/Unit/HooksPipelineTest.php @@ -4,8 +4,8 @@ use Illuminate\Container\Container; test('Data is sent through Pipes', function ($hook, ?array $parameters = null) { - $parameters = $parameters ?? []; - $container = new Container(); + $parameters ??= []; + $container = new Container; $hookConfig = ! empty($parameters) ? [$hook => $parameters] : [$hook]; $this->config->set('git-hooks.pre-commit', $hookConfig); @@ -21,7 +21,7 @@ })->with('pipelineHooks'); test('Data is sent through Pipes with Closure', function () { - $container = new Container(); + $container = new Container; $closureHook = function ($message, $next) { $message .= ' Hook 4'; diff --git a/tests/Unit/Traits/GitHelperTest.php b/tests/Unit/Traits/GitHelperTest.php index 66a4062..3f7df95 100644 --- a/tests/Unit/Traits/GitHelperTest.php +++ b/tests/Unit/Traits/GitHelperTest.php @@ -84,7 +84,7 @@ $noOutputSuffix = ' > '.(PHP_OS_FAMILY === 'Windows' ? 'NUL' : '/dev/null 2>&1'); foreach ($commandsToGenerateFakeMerge as $command) { - if (strpos($command, 'git') === 0) { + if (str_starts_with($command, 'git')) { $command .= $noOutputSuffix; } shell_exec($command); diff --git a/tests/Unit/Traits/WithPipelineTest.php b/tests/Unit/Traits/WithPipelineTest.php index be10098..ca8a11e 100644 --- a/tests/Unit/Traits/WithPipelineTest.php +++ b/tests/Unit/Traits/WithPipelineTest.php @@ -5,8 +5,8 @@ use Symfony\Component\Console\Output\OutputInterface; test('Starts and Finishes Pipe Task with decorated output', function () { - $command = new PreCommit(); - $hook = new PreCommitFixtureHook(); + $command = new PreCommit; + $hook = new PreCommitFixtureHook; $outputMock = $this->createMock(OutputInterface::class); $outputMock->expects($this->once())